Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feat/Select
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed Oct 20, 2024
2 parents 3ed69fc + 342cb97 commit 261f40b
Show file tree
Hide file tree
Showing 363 changed files with 1,884 additions and 2,677 deletions.
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"publishDirectory": {
"@base_ui/react": "packages/mui-base/build"
},
"sandboxes": ["/examples/base-ui-cra-ts"],
"sandboxes": ["/.codesandbox/template"],
"silent": true
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
* @atomiks @michaldudak
/docs/data/ @atomiks @colmtuite @michaldudak
/examples/ @atomiks @colmtuite @michaldudak
/packages/mui-base/ @atomiks @colmtuite @michaldudak
/scripts/ @michaldudak
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/docs/app/playground/*
!/docs/app/playground/\[slug\]
/docs/public/feed/
/examples/**/.cache
/test/bundling/fixtures/*/yarn.lock
/test/bundling/fixtures/*/pnpm-lock.yaml
# created by test/bundling/scripts/createFixture
Expand Down
3 changes: 1 addition & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ module.exports = function getBabelConfig(api) {

const defaultAlias = {
'@base_ui/react': resolveAliasPath('./packages/mui-base/src'),
docs: resolveAliasPath('./node_modules/@mui/monorepo/docs'),
'docs-base': resolveAliasPath('./docs'),
docs: resolveAliasPath('./docs'),
test: resolveAliasPath('./test'),
'@mui-internal/api-docs-builder': resolveAliasPath(
'./node_modules/@mui/monorepo/packages/api-docs-builder',
Expand Down
4 changes: 0 additions & 4 deletions docs/data/api/popover-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"closeDelay": { "type": { "name": "number" }, "default": "0" },
"defaultOpen": { "type": { "name": "bool" }, "default": "false" },
"delay": { "type": { "name": "number" }, "default": "300" },
"delayType": {
"type": { "name": "enum", "description": "'hover'<br>&#124;&nbsp;'rest'" },
"default": "'rest'"
},
"onOpenChange": { "type": { "name": "func" } },
"open": { "type": { "name": "bool" }, "default": "false" },
"openOnHover": { "type": { "name": "bool" }, "default": "false" }
Expand Down
4 changes: 0 additions & 4 deletions docs/data/api/preview-card-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"closeDelay": { "type": { "name": "number" }, "default": "300" },
"defaultOpen": { "type": { "name": "bool" }, "default": "false" },
"delay": { "type": { "name": "number" }, "default": "600" },
"delayType": {
"type": { "name": "enum", "description": "'hover'<br>&#124;&nbsp;'rest'" },
"default": "'rest'"
},
"onOpenChange": { "type": { "name": "func" } },
"open": { "type": { "name": "bool" }, "default": "false" }
},
Expand Down
4 changes: 0 additions & 4 deletions docs/data/api/tooltip-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"closeDelay": { "type": { "name": "number" }, "default": "0" },
"defaultOpen": { "type": { "name": "bool" }, "default": "false" },
"delay": { "type": { "name": "number" }, "default": "600" },
"delayType": {
"type": { "name": "enum", "description": "'hover'<br>&#124;&nbsp;'rest'" },
"default": "'rest'"
},
"hoverable": { "type": { "name": "bool" }, "default": "true" },
"onOpenChange": { "type": { "name": "func" } },
"open": { "type": { "name": "bool" }, "default": "false" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Popup = styled(BaseAlertDialog.Popup)(
opacity: 0;
transform: translate(-50%, -35%) scale(0.8);
&[data-state='open'] {
&[data-open] {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
transition-timing-function: ease-out;
Expand All @@ -75,7 +75,7 @@ const Backdrop = styled(BaseAlertDialog.Backdrop)`
transition-duration: 250ms;
transition-timing-function: ease-in;
&[data-state='open'] {
&[data-open] {
backdrop-filter: blur(6px);
opacity: 1;
transition-timing-function: ease-out;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Popup = styled(BaseAlertDialog.Popup)(
opacity: 0;
transform: translate(-50%, -35%) scale(0.8);
&[data-state='open'] {
&[data-open] {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
transition-timing-function: ease-out;
Expand All @@ -75,7 +75,7 @@ const Backdrop = styled(BaseAlertDialog.Backdrop)`
transition-duration: 250ms;
transition-timing-function: ease-in;
&[data-state='open'] {
&[data-open] {
backdrop-filter: blur(6px);
opacity: 1;
transition-timing-function: ease-out;
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/alert-dialog/NestedAlertDialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Popup = styled(BaseAlertDialog.Popup)(
opacity var(--transition-duration) ease-in,
visibility var(--transition-duration) step-end;
&[data-state='open'] {
&[data-open] {
@starting-style {
& {
transform: translate(-50%, -35%) scale(0.8) translateY(0);
Expand Down Expand Up @@ -124,7 +124,7 @@ const Backdrop = styled(BaseAlertDialog.Backdrop)`
transition-duration: 250ms;
transition-timing-function: ease-in;
&[data-state='open'] {
&[data-open] {
backdrop-filter: blur(6px);
opacity: 1;
transition-timing-function: ease-out;
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/alert-dialog/NestedAlertDialogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Popup = styled(BaseAlertDialog.Popup)(
opacity var(--transition-duration) ease-in,
visibility var(--transition-duration) step-end;
&[data-state='open'] {
&[data-open] {
@starting-style {
& {
transform: translate(-50%, -35%) scale(0.8) translateY(0);
Expand Down Expand Up @@ -124,7 +124,7 @@ const Backdrop = styled(BaseAlertDialog.Backdrop)`
transition-duration: 250ms;
transition-timing-function: ease-in;
&[data-state='open'] {
&[data-open] {
backdrop-filter: blur(6px);
opacity: 1;
transition-timing-function: ease-out;
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/alert-dialog/alert-dialog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Here is an example of how to apply a symmetric scale and fade transition with th
}

/* Represents the final styles once entered */
.AlertDialogPopup[data-state='open'] {
.AlertDialogPopup[data-open] {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
Expand Down Expand Up @@ -160,7 +160,7 @@ In newer browsers, there is a feature called `@starting-style` which allows tran

/* Official Browser API - no Firefox support as of May 2024 */
@starting-style {
.AlertDialogPopup[data-state='open'] {
.AlertDialogPopup[data-open] {
opacity: 0;
transform: translate(-50%, -35%) scale(0.8);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Label(props) {
// eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/no-noninteractive-element-interactions
<label
className="flex gap-2 mb-2"
onMouseDown={(e) => e.preventDefault()}
onMouseDown={(event) => event.preventDefault()}
{...props}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Label(props: React.ComponentPropsWithoutRef<'label'>) {
// eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/no-noninteractive-element-interactions
<label
className="flex gap-2 mb-2"
onMouseDown={(e) => e.preventDefault()}
onMouseDown={(event) => event.preventDefault()}
{...props}
/>
);
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/dialog/DialogWithTransitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Popup = styled(BaseDialog.Popup)(
opacity: 0;
transform: translate(-50%, -35%) scale(0.8);
&[data-state='open'] {
&[data-open] {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
transition-timing-function: ease-out;
Expand All @@ -75,7 +75,7 @@ const Backdrop = styled(BaseDialog.Backdrop)`
transition-duration: 250ms;
transition-timing-function: ease-in;
&[data-state='open'] {
&[data-open] {
backdrop-filter: blur(6px);
opacity: 1;
transition-timing-function: ease-out;
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/dialog/DialogWithTransitions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Popup = styled(BaseDialog.Popup)(
opacity: 0;
transform: translate(-50%, -35%) scale(0.8);
&[data-state='open'] {
&[data-open] {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
transition-timing-function: ease-out;
Expand All @@ -75,7 +75,7 @@ const Backdrop = styled(BaseDialog.Backdrop)`
transition-duration: 250ms;
transition-timing-function: ease-in;
&[data-state='open'] {
&[data-open] {
backdrop-filter: blur(6px);
opacity: 1;
transition-timing-function: ease-out;
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/dialog/NestedDialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Popup = styled(BaseDialog.Popup)(
opacity var(--transition-duration) ease-in,
visibility var(--transition-duration) step-end;
&[data-state='open'] {
&[data-open] {
@starting-style {
& {
transform: translate(-50%, -35%) scale(0.8) translateY(0);
Expand Down Expand Up @@ -140,7 +140,7 @@ const Backdrop = styled(BaseDialog.Backdrop)`
transition-duration: 250ms;
transition-timing-function: ease-in;
&[data-state='open'] {
&[data-open] {
backdrop-filter: blur(6px);
opacity: 1;
transition-timing-function: ease-out;
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/dialog/NestedDialogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Popup = styled(BaseDialog.Popup)(
opacity var(--transition-duration) ease-in,
visibility var(--transition-duration) step-end;
&[data-state='open'] {
&[data-open] {
@starting-style {
& {
transform: translate(-50%, -35%) scale(0.8) translateY(0);
Expand Down Expand Up @@ -140,7 +140,7 @@ const Backdrop = styled(BaseDialog.Backdrop)`
transition-duration: 250ms;
transition-timing-function: ease-in;
&[data-state='open'] {
&[data-open] {
backdrop-filter: blur(6px);
opacity: 1;
transition-timing-function: ease-out;
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/dialog/dialog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Here is an example of how to apply a symmetric scale and fade transition with th
}

/* Represents the final styles once entered */
.DialogPopup[data-state='open'] {
.DialogPopup[data-open] {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
Expand Down Expand Up @@ -183,7 +183,7 @@ In newer browsers, there is a feature called `@starting-style` which allows tran

/* Official Browser API - no Firefox support as of May 2024 */
@starting-style {
.DialogPopup[data-state='open'] {
.DialogPopup[data-open] {
opacity: 0;
transform: translate(-50%, -35%) scale(0.8);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/components/field/UnstyledFieldAsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function UnstyledFieldAsync() {
const error = await checkAvailability(name);
setLoading(false);
return error;
} catch (e) {
} catch {
setLoading(false);
return 'Failed to fetch name availability';
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/components/field/UnstyledFieldAsync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function UnstyledFieldAsync() {
const error = await checkAvailability(name);
setLoading(false);
return error;
} catch (e) {
} catch {
setLoading(false);
return 'Failed to fetch name availability';
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/components/menu/CheckboxItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const Indicator = styled(Menu.CheckboxItemIndicator)(
border-radius: 2px;
&[data-checkboxitem=checked] {
&[data-checked] {
background: ${theme.palette.mode === 'dark' ? grey[800] : grey[700]};
box-shadow: 0 0 0 2px ${theme.palette.mode === 'dark' ? grey[900] : '#fff'} inset;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/components/menu/CheckboxItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const Indicator = styled(Menu.CheckboxItemIndicator)(
border-radius: 2px;
&[data-checkboxitem=checked] {
&[data-checked] {
background: ${theme.palette.mode === 'dark' ? grey[800] : grey[700]};
box-shadow: 0 0 0 2px ${theme.palette.mode === 'dark' ? grey[900] : '#fff'} inset;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
transform 200ms ease-in;
}

&[data-state='open'] {
&[data-open] {
opacity: 1;
transform: scale(1, 1);
transition:
Expand Down
2 changes: 1 addition & 1 deletion docs/data/components/menu/NestedMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const SubmenuTrigger = styled(Menu.SubmenuTrigger)(
float: right;
}
&[data-state='open'] {
&[data-popup-open] {
background-color: ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/components/menu/NestedMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const SubmenuTrigger = styled(Menu.SubmenuTrigger)(
float: right;
}
&[data-state='open'] {
&[data-popup-open] {
background-color: ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]};
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/components/menu/RadioItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const Indicator = styled(Menu.RadioItemIndicator)(
box-sizing: border-box;
border-radius: 50%;
&[data-radioitem=checked] {
&[data-checked] {
background: ${theme.palette.mode === 'dark' ? grey[800] : grey[700]};
box-shadow: 0 0 0 2px ${theme.palette.mode === 'dark' ? grey[900] : '#fff'} inset;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/components/menu/RadioItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const Indicator = styled(Menu.RadioItemIndicator)(
box-sizing: border-box;
border-radius: 50%;
&[data-radioitem=checked] {
&[data-checked] {
background: ${theme.palette.mode === 'dark' ? grey[800] : grey[700]};
box-shadow: 0 0 0 2px ${theme.palette.mode === 'dark' ? grey[900] : '#fff'} inset;
}
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/menu/menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Here is an example of how to apply a symmetric scale and fade transition with th
}

/* Represents the final styles once entered */
.MenuPopup[data-state='open'] {
.MenuPopup[data-open] {
opacity: 1;
transform: scale(1);
}
Expand Down Expand Up @@ -337,7 +337,7 @@ In newer browsers, there is a feature called `@starting-style` which allows tran

/* Official Browser API - no Firefox support as of May 2024 */
@starting-style {
.MenuPopup[data-state='open'] {
.MenuPopup[data-open] {
opacity: 0;
transform: scale(0.9);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const AnchorButton = styled(Popover.Trigger)`
}
&:hover,
&[data-state='open'] {
&[data-popup-open] {
background: ${blue[800]};
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const AnchorButton = styled(Popover.Trigger)`
}
&:hover,
&[data-state='open'] {
&[data-popup-open] {
background: ${blue[800]};
}
`;
Expand Down
4 changes: 2 additions & 2 deletions docs/data/components/popover/UnstyledPopoverTransition.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const PopoverPopup = styled(Popover.Popup)`
transform: scale(0.9);
transform-origin: var(--transform-origin);
&[data-state='open'] {
&[data-open] {
opacity: 1;
transform: scale(1);
}
Expand Down Expand Up @@ -75,7 +75,7 @@ export const AnchorButton = styled(Popover.Trigger)`
}
&:hover,
&[data-state='open'] {
&[data-popup-open] {
background: ${blue[800]};
}
`;
Loading

0 comments on commit 261f40b

Please sign in to comment.