Skip to content

Commit aef03db

Browse files
atomiksJanpot
andauthored
[all components] Fix type portability (#2912)
Co-authored-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
1 parent 182d970 commit aef03db

File tree

317 files changed

+6198
-4524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+6198
-4524
lines changed

.circleci/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,12 @@ jobs:
304304
- run:
305305
name: Build packages
306306
command: pnpm release:build
307+
- run:
308+
name: Validate type declarations
309+
command: pnpm validate-declarations
310+
- run:
311+
name: Check public types
312+
command: pnpm -r run release:test
307313
- run:
308314
name: Test Node.js module resolution
309315
command: pnpm -F @base-ui/test-node-resolution test

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
3636
- run: pnpm install
3737
- run: pnpm release:build
38-
- run: pnpm validate-declarations
3938
- name: Publish packages
4039
if: matrix.os == 'ubuntu-latest'
4140
uses: mui/mui-public/.github/actions/ci-publish@master

docs/reference/generated/accordion-item.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Groups an accordion header with the corresponding panel.\nRenders a `<div>` element.",
44
"props": {
55
"value": {
6-
"type": "AccordionItemValue",
6+
"type": "any",
77
"description": "A unique value that identifies this accordion item.\nIf no value is provided, a unique ID will be generated automatically.\nUse when controlling the accordion programmatically, or to set an initial\nopen state.",
88
"example": "```tsx\n<Accordion.Root value={['a']}>\n <Accordion.Item value=\"a\" /> // initially open\n <Accordion.Item value=\"b\" /> // initially closed\n</Accordion.Root>\n```"
99
},

docs/reference/generated/alert-dialog-close.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
},
1111
"className": {
1212
"type": "string | ((state: AlertDialog.Close.State) => string)",
13-
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.",
14-
"detailedType": "| string\n| ((state: AlertDialog.Close.State) => string)"
13+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
1514
},
1615
"render": {
1716
"type": "ReactElement | ((props: HTMLProps, state: AlertDialog.Close.State) => ReactElement)",

docs/reference/generated/alert-dialog-popup.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
},
1515
"className": {
1616
"type": "string | ((state: AlertDialog.Popup.State) => string)",
17-
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.",
18-
"detailedType": "| string\n| ((state: AlertDialog.Popup.State) => string)"
17+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
1918
},
2019
"render": {
2120
"type": "ReactElement | ((props: HTMLProps, state: AlertDialog.Popup.State) => ReactElement)",

docs/reference/generated/alert-dialog-title.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"props": {
55
"className": {
66
"type": "string | ((state: AlertDialog.Title.State) => string)",
7-
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.",
8-
"detailedType": "| string\n| ((state: AlertDialog.Title.State) => string)"
7+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
98
},
109
"render": {
1110
"type": "ReactElement | ((props: HTMLProps, state: AlertDialog.Title.State) => ReactElement)",

docs/reference/generated/checkbox-group.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"detailedType": "string[] | undefined"
1414
},
1515
"onValueChange": {
16-
"type": "((value: string[], eventDetails: Checkbox.Group.ChangeEventDetails) => void)",
16+
"type": "((value: string[], eventDetails: CheckboxGroupChangeEventDetails) => void)",
1717
"description": "Event handler called when a checkbox in the group is ticked or unticked.\nProvides the new value as an argument.",
18-
"detailedType": "| ((\n value: string[],\n eventDetails: Checkbox.Group.ChangeEventDetails,\n ) => void)\n| undefined"
18+
"detailedType": "| ((\n value: string[],\n eventDetails: CheckboxGroupChangeEventDetails,\n ) => void)\n| undefined"
1919
},
2020
"allValues": {
2121
"type": "string[]",
@@ -29,13 +29,13 @@
2929
"detailedType": "boolean | undefined"
3030
},
3131
"className": {
32-
"type": "string | ((state: Checkbox.Group.State) => string)",
32+
"type": "string | ((state: CheckboxGroup.State) => string)",
3333
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
3434
},
3535
"render": {
36-
"type": "ReactElement | ((props: HTMLProps, state: Checkbox.Group.State) => ReactElement)",
36+
"type": "ReactElement | ((props: HTMLProps, state: CheckboxGroup.State) => ReactElement)",
3737
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.",
38-
"detailedType": "| ReactElement\n| ((\n props: HTMLProps,\n state: Checkbox.Group.State,\n ) => ReactElement)"
38+
"detailedType": "| ReactElement\n| ((\n props: HTMLProps,\n state: CheckboxGroup.State,\n ) => ReactElement)"
3939
}
4040
},
4141
"dataAttributes": {

docs/reference/generated/collapsible-panel.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
},
1111
"className": {
1212
"type": "string | ((state: Collapsible.Panel.State) => string)",
13-
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.",
14-
"detailedType": "| string\n| ((state: Collapsible.Panel.State) => string)"
13+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
1514
},
1615
"keepMounted": {
1716
"type": "boolean",

docs/reference/generated/collapsible-root.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
},
2727
"className": {
2828
"type": "string | ((state: Collapsible.Root.State) => string)",
29-
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.",
30-
"detailedType": "| string\n| ((state: Collapsible.Root.State) => string)"
29+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
3130
},
3231
"render": {
3332
"type": "ReactElement | ((props: HTMLProps, state: Collapsible.Root.State) => ReactElement) | null",

docs/reference/generated/collapsible-trigger.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
},
1111
"className": {
1212
"type": "string | ((state: Collapsible.Root.State) => string)",
13-
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.",
14-
"detailedType": "| string\n| ((state: Collapsible.Root.State) => string)"
13+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
1514
},
1615
"render": {
1716
"type": "ReactElement | ((props: HTMLProps, state: Collapsible.Root.State) => ReactElement)",

0 commit comments

Comments
 (0)