Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Add radix accordion (#2100)

Bogdan Chadkin8540cb2280c1
diff --git a/packages/sdk-components-react-radix/package.json b/packages/sdk-components-react-radix/package.json
index 668a4a378e..430f57f837 100644
--- a/packages/sdk-components-react-radix/package.json
+++ b/packages/sdk-components-react-radix/package.json
@@ -53,6 +53,7 @@
"react-dom": "^18.2.0"
},
"dependencies": {
+ "@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.4",
"@radix-ui/react-label": "^2.0.2",
diff --git a/packages/sdk-components-react-radix/src/__generated__/accordion.props.ts b/packages/sdk-components-react-radix/src/__generated__/accordion.props.ts
new file mode 100644
index 0000000000..0d235fa8aa
--- /dev/null
+++ b/packages/sdk-components-react-radix/src/__generated__/accordion.props.ts
@@ -0,0 +1,2382 @@
+import type { PropMeta } from "@webstudio-is/generate-arg-types";
+
+export const propsAccordion: Record<string, PropMeta> = {
+ about: { required: false, control: "text", type: "string" },
+ accessKey: { required: false, control: "text", type: "string" },
+ "aria-activedescendant": {
+ description:
+ "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-atomic": {
+ description:
+ "Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-autocomplete": {
+ description:
+ "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["list", "none", "inline", "both"],
+ },
+ "aria-braillelabel": {
+ description:
+ "Defines a string value that labels the current element, which is intended to be converted into Braille.\n@see aria-label.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-brailleroledescription": {
+ description:
+ "Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.\n@see aria-roledescription.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-busy": { required: false, control: "boolean", type: "boolean" },
+ "aria-checked": {
+ description:
+ 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colcount": {
+ description:
+ "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindex": {
+ description:
+ "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindextext": {
+ description:
+ "Defines a human readable text alternative of aria-colindex.\n@see aria-rowindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colspan": {
+ description:
+ "Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-controls": {
+ description:
+ "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-current": {
+ description:
+ "Indicates the element that represents the current item within a container or set of related elements.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-describedby": {
+ description:
+ "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-description": {
+ description:
+ "Defines a string value that describes or annotates the current element.\n@see related aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-details": {
+ description:
+ "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-disabled": {
+ description:
+ "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-dropeffect": {
+ description:
+ "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["link", "none", "copy", "execute", "move", "popup"],
+ },
+ "aria-errormessage": {
+ description:
+ "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-expanded": {
+ description:
+ "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-flowto": {
+ description:
+ "Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-grabbed": {
+ description:
+ 'Indicates an element\'s "grabbed" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-haspopup": {
+ description:
+ "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-hidden": {
+ description:
+ "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-invalid": {
+ description:
+ "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-keyshortcuts": {
+ description:
+ "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-label": {
+ description:
+ "Defines a string value that labels the current element.\n@see aria-labelledby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-labelledby": {
+ description:
+ "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-level": {
+ description:
+ "Defines the hierarchical level of an element within a structure.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-live": {
+ description:
+ "Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["off", "assertive", "polite"],
+ },
+ "aria-modal": {
+ description: "Indicates whether an element is modal when displayed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiline": {
+ description:
+ "Indicates whether a text box accepts multiple lines of input or only a single line.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiselectable": {
+ description:
+ "Indicates that the user may select more than one item from the current selectable descendants.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-orientation": {
+ description:
+ "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["horizontal", "vertical"],
+ },
+ "aria-owns": {
+ description:
+ "Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-placeholder": {
+ description:
+ "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-posinset": {
+ description:
+ "Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-pressed": {
+ description:
+ 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-readonly": {
+ description:
+ "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-relevant": {
+ description:
+ "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "text",
+ "additions",
+ "additions removals",
+ "additions text",
+ "all",
+ "removals",
+ "removals additions",
+ "removals text",
+ "text additions",
+ "text removals",
+ ],
+ },
+ "aria-required": {
+ description:
+ "Indicates that user input is required on the element before a form may be submitted.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-roledescription": {
+ description:
+ "Defines a human-readable, author-localized description for the role of an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowcount": {
+ description:
+ "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindex": {
+ description:
+ "Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindextext": {
+ description:
+ "Defines a human readable text alternative of aria-rowindex.\n@see aria-colindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowspan": {
+ description:
+ "Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-selected": {
+ description:
+ 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-setsize": {
+ description:
+ "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-sort": {
+ description:
+ "Indicates if items in a table or grid are sorted in ascending or descending order.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["none", "ascending", "descending", "other"],
+ },
+ "aria-valuemax": {
+ description: "Defines the maximum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuemin": {
+ description: "Defines the minimum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuenow": {
+ description:
+ "Defines the current value for a range widget.\n@see aria-valuetext.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuetext": {
+ description:
+ "Defines the human readable text alternative of aria-valuenow for a range widget.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ autoCapitalize: { required: false, control: "text", type: "string" },
+ autoCorrect: { required: false, control: "text", type: "string" },
+ autoFocus: { required: false, control: "boolean", type: "boolean" },
+ autoSave: { required: false, control: "text", type: "string" },
+ className: { required: false, control: "text", type: "string" },
+ color: { required: false, control: "color", type: "string" },
+ content: { required: false, control: "text", type: "string" },
+ contextMenu: { required: false, control: "text", type: "string" },
+ datatype: { required: false, control: "text", type: "string" },
+ defaultChecked: { required: false, control: "boolean", type: "boolean" },
+ dir: {
+ description: "The language read direction.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["ltr", "rtl"],
+ },
+ disabled: {
+ description:
+ "Whether or not an accordion is disabled from user interaction.\n@defaultValue false",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ draggable: { required: false, control: "boolean", type: "boolean" },
+ hidden: { required: false, control: "boolean", type: "boolean" },
+ id: { required: false, control: "text", type: "string" },
+ inputMode: {
+ description:
+ "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "search",
+ "text",
+ "none",
+ "tel",
+ "url",
+ "email",
+ "numeric",
+ "decimal",
+ ],
+ },
+ is: {
+ description:
+ "Specify that a standard HTML element should behave like a defined custom built-in element\n@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ itemID: { required: false, control: "text", type: "string" },
+ itemProp: { required: false, control: "text", type: "string" },
+ itemRef: { required: false, control: "text", type: "string" },
+ itemScope: { required: false, control: "boolean", type: "boolean" },
+ itemType: { required: false, control: "text", type: "string" },
+ lang: { required: false, control: "text", type: "string" },
+ nonce: { required: false, control: "text", type: "string" },
+ orientation: {
+ description: "The layout in which the Accordion operates.",
+ required: false,
+ control: "radio",
+ type: "string",
+ defaultValue: "vertical",
+ options: ["horizontal", "vertical"],
+ },
+ placeholder: { required: false, control: "text", type: "string" },
+ prefix: { required: false, control: "text", type: "string" },
+ property: { required: false, control: "text", type: "string" },
+ radioGroup: { required: false, control: "text", type: "string" },
+ rel: { required: false, control: "text", type: "string" },
+ resource: { required: false, control: "text", type: "string" },
+ results: { required: false, control: "number", type: "number" },
+ rev: { required: false, control: "text", type: "string" },
+ role: { required: false, control: "text", type: "string" },
+ security: { required: false, control: "text", type: "string" },
+ slot: { required: false, control: "text", type: "string" },
+ spellCheck: { required: false, control: "boolean", type: "boolean" },
+ suppressContentEditableWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ suppressHydrationWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ tabIndex: { required: false, control: "number", type: "number" },
+ title: { required: false, control: "text", type: "string" },
+ translate: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["yes", "no"],
+ },
+ typeof: { required: false, control: "text", type: "string" },
+ unselectable: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["on", "off"],
+ },
+ value: { required: true, control: "text", type: "string" },
+ vocab: { required: false, control: "text", type: "string" },
+};
+export const propsAccordionItem: Record<string, PropMeta> = {
+ about: { required: false, control: "text", type: "string" },
+ accessKey: { required: false, control: "text", type: "string" },
+ "aria-activedescendant": {
+ description:
+ "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-atomic": {
+ description:
+ "Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-autocomplete": {
+ description:
+ "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["list", "none", "inline", "both"],
+ },
+ "aria-braillelabel": {
+ description:
+ "Defines a string value that labels the current element, which is intended to be converted into Braille.\n@see aria-label.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-brailleroledescription": {
+ description:
+ "Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.\n@see aria-roledescription.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-busy": { required: false, control: "boolean", type: "boolean" },
+ "aria-checked": {
+ description:
+ 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colcount": {
+ description:
+ "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindex": {
+ description:
+ "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindextext": {
+ description:
+ "Defines a human readable text alternative of aria-colindex.\n@see aria-rowindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colspan": {
+ description:
+ "Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-controls": {
+ description:
+ "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-current": {
+ description:
+ "Indicates the element that represents the current item within a container or set of related elements.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-describedby": {
+ description:
+ "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-description": {
+ description:
+ "Defines a string value that describes or annotates the current element.\n@see related aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-details": {
+ description:
+ "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-disabled": {
+ description:
+ "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-dropeffect": {
+ description:
+ "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["link", "none", "copy", "execute", "move", "popup"],
+ },
+ "aria-errormessage": {
+ description:
+ "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-expanded": {
+ description:
+ "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-flowto": {
+ description:
+ "Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-grabbed": {
+ description:
+ 'Indicates an element\'s "grabbed" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-haspopup": {
+ description:
+ "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-hidden": {
+ description:
+ "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-invalid": {
+ description:
+ "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-keyshortcuts": {
+ description:
+ "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-label": {
+ description:
+ "Defines a string value that labels the current element.\n@see aria-labelledby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-labelledby": {
+ description:
+ "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-level": {
+ description:
+ "Defines the hierarchical level of an element within a structure.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-live": {
+ description:
+ "Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["off", "assertive", "polite"],
+ },
+ "aria-modal": {
+ description: "Indicates whether an element is modal when displayed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiline": {
+ description:
+ "Indicates whether a text box accepts multiple lines of input or only a single line.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiselectable": {
+ description:
+ "Indicates that the user may select more than one item from the current selectable descendants.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-orientation": {
+ description:
+ "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["horizontal", "vertical"],
+ },
+ "aria-owns": {
+ description:
+ "Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-placeholder": {
+ description:
+ "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-posinset": {
+ description:
+ "Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-pressed": {
+ description:
+ 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-readonly": {
+ description:
+ "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-relevant": {
+ description:
+ "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "text",
+ "additions",
+ "additions removals",
+ "additions text",
+ "all",
+ "removals",
+ "removals additions",
+ "removals text",
+ "text additions",
+ "text removals",
+ ],
+ },
+ "aria-required": {
+ description:
+ "Indicates that user input is required on the element before a form may be submitted.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-roledescription": {
+ description:
+ "Defines a human-readable, author-localized description for the role of an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowcount": {
+ description:
+ "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindex": {
+ description:
+ "Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindextext": {
+ description:
+ "Defines a human readable text alternative of aria-rowindex.\n@see aria-colindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowspan": {
+ description:
+ "Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-selected": {
+ description:
+ 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-setsize": {
+ description:
+ "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-sort": {
+ description:
+ "Indicates if items in a table or grid are sorted in ascending or descending order.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["none", "ascending", "descending", "other"],
+ },
+ "aria-valuemax": {
+ description: "Defines the maximum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuemin": {
+ description: "Defines the minimum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuenow": {
+ description:
+ "Defines the current value for a range widget.\n@see aria-valuetext.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuetext": {
+ description:
+ "Defines the human readable text alternative of aria-valuenow for a range widget.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ autoCapitalize: { required: false, control: "text", type: "string" },
+ autoCorrect: { required: false, control: "text", type: "string" },
+ autoFocus: { required: false, control: "boolean", type: "boolean" },
+ autoSave: { required: false, control: "text", type: "string" },
+ className: { required: false, control: "text", type: "string" },
+ color: { required: false, control: "color", type: "string" },
+ content: { required: false, control: "text", type: "string" },
+ contextMenu: { required: false, control: "text", type: "string" },
+ datatype: { required: false, control: "text", type: "string" },
+ defaultChecked: { required: false, control: "boolean", type: "boolean" },
+ dir: { required: false, control: "text", type: "string" },
+ disabled: {
+ description:
+ "Whether or not an accordion item is disabled from user interaction.\n@defaultValue false",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ draggable: { required: false, control: "boolean", type: "boolean" },
+ hidden: { required: false, control: "boolean", type: "boolean" },
+ id: { required: false, control: "text", type: "string" },
+ inputMode: {
+ description:
+ "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "search",
+ "text",
+ "none",
+ "tel",
+ "url",
+ "email",
+ "numeric",
+ "decimal",
+ ],
+ },
+ is: {
+ description:
+ "Specify that a standard HTML element should behave like a defined custom built-in element\n@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ itemID: { required: false, control: "text", type: "string" },
+ itemProp: { required: false, control: "text", type: "string" },
+ itemRef: { required: false, control: "text", type: "string" },
+ itemScope: { required: false, control: "boolean", type: "boolean" },
+ itemType: { required: false, control: "text", type: "string" },
+ lang: { required: false, control: "text", type: "string" },
+ nonce: { required: false, control: "text", type: "string" },
+ placeholder: { required: false, control: "text", type: "string" },
+ prefix: { required: false, control: "text", type: "string" },
+ property: { required: false, control: "text", type: "string" },
+ radioGroup: { required: false, control: "text", type: "string" },
+ rel: { required: false, control: "text", type: "string" },
+ resource: { required: false, control: "text", type: "string" },
+ results: { required: false, control: "number", type: "number" },
+ rev: { required: false, control: "text", type: "string" },
+ role: { required: false, control: "text", type: "string" },
+ security: { required: false, control: "text", type: "string" },
+ slot: { required: false, control: "text", type: "string" },
+ spellCheck: { required: false, control: "boolean", type: "boolean" },
+ suppressContentEditableWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ suppressHydrationWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ tabIndex: { required: false, control: "number", type: "number" },
+ title: { required: false, control: "text", type: "string" },
+ translate: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["yes", "no"],
+ },
+ typeof: { required: false, control: "text", type: "string" },
+ unselectable: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["on", "off"],
+ },
+ value: {
+ description:
+ "A string value for the accordion item. All items within an accordion should use a unique value.",
+ required: true,
+ control: "text",
+ type: "string",
+ },
+ vocab: { required: false, control: "text", type: "string" },
+};
+export const propsAccordionHeader: Record<string, PropMeta> = {
+ about: { required: false, control: "text", type: "string" },
+ accessKey: { required: false, control: "text", type: "string" },
+ "aria-activedescendant": {
+ description:
+ "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-atomic": {
+ description:
+ "Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-autocomplete": {
+ description:
+ "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["list", "none", "inline", "both"],
+ },
+ "aria-braillelabel": {
+ description:
+ "Defines a string value that labels the current element, which is intended to be converted into Braille.\n@see aria-label.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-brailleroledescription": {
+ description:
+ "Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.\n@see aria-roledescription.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-busy": { required: false, control: "boolean", type: "boolean" },
+ "aria-checked": {
+ description:
+ 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colcount": {
+ description:
+ "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindex": {
+ description:
+ "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindextext": {
+ description:
+ "Defines a human readable text alternative of aria-colindex.\n@see aria-rowindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colspan": {
+ description:
+ "Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-controls": {
+ description:
+ "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-current": {
+ description:
+ "Indicates the element that represents the current item within a container or set of related elements.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-describedby": {
+ description:
+ "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-description": {
+ description:
+ "Defines a string value that describes or annotates the current element.\n@see related aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-details": {
+ description:
+ "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-disabled": {
+ description:
+ "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-dropeffect": {
+ description:
+ "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["link", "none", "copy", "execute", "move", "popup"],
+ },
+ "aria-errormessage": {
+ description:
+ "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-expanded": {
+ description:
+ "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-flowto": {
+ description:
+ "Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-grabbed": {
+ description:
+ 'Indicates an element\'s "grabbed" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-haspopup": {
+ description:
+ "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-hidden": {
+ description:
+ "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-invalid": {
+ description:
+ "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-keyshortcuts": {
+ description:
+ "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-label": {
+ description:
+ "Defines a string value that labels the current element.\n@see aria-labelledby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-labelledby": {
+ description:
+ "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-level": {
+ description:
+ "Defines the hierarchical level of an element within a structure.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-live": {
+ description:
+ "Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["off", "assertive", "polite"],
+ },
+ "aria-modal": {
+ description: "Indicates whether an element is modal when displayed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiline": {
+ description:
+ "Indicates whether a text box accepts multiple lines of input or only a single line.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiselectable": {
+ description:
+ "Indicates that the user may select more than one item from the current selectable descendants.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-orientation": {
+ description:
+ "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["horizontal", "vertical"],
+ },
+ "aria-owns": {
+ description:
+ "Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-placeholder": {
+ description:
+ "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-posinset": {
+ description:
+ "Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-pressed": {
+ description:
+ 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-readonly": {
+ description:
+ "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-relevant": {
+ description:
+ "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "text",
+ "additions",
+ "additions removals",
+ "additions text",
+ "all",
+ "removals",
+ "removals additions",
+ "removals text",
+ "text additions",
+ "text removals",
+ ],
+ },
+ "aria-required": {
+ description:
+ "Indicates that user input is required on the element before a form may be submitted.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-roledescription": {
+ description:
+ "Defines a human-readable, author-localized description for the role of an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowcount": {
+ description:
+ "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindex": {
+ description:
+ "Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindextext": {
+ description:
+ "Defines a human readable text alternative of aria-rowindex.\n@see aria-colindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowspan": {
+ description:
+ "Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-selected": {
+ description:
+ 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-setsize": {
+ description:
+ "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-sort": {
+ description:
+ "Indicates if items in a table or grid are sorted in ascending or descending order.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["none", "ascending", "descending", "other"],
+ },
+ "aria-valuemax": {
+ description: "Defines the maximum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuemin": {
+ description: "Defines the minimum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuenow": {
+ description:
+ "Defines the current value for a range widget.\n@see aria-valuetext.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuetext": {
+ description:
+ "Defines the human readable text alternative of aria-valuenow for a range widget.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ autoCapitalize: { required: false, control: "text", type: "string" },
+ autoCorrect: { required: false, control: "text", type: "string" },
+ autoFocus: { required: false, control: "boolean", type: "boolean" },
+ autoSave: { required: false, control: "text", type: "string" },
+ className: { required: false, control: "text", type: "string" },
+ color: { required: false, control: "color", type: "string" },
+ content: { required: false, control: "text", type: "string" },
+ contextMenu: { required: false, control: "text", type: "string" },
+ datatype: { required: false, control: "text", type: "string" },
+ defaultChecked: { required: false, control: "boolean", type: "boolean" },
+ dir: { required: false, control: "text", type: "string" },
+ draggable: { required: false, control: "boolean", type: "boolean" },
+ hidden: { required: false, control: "boolean", type: "boolean" },
+ id: { required: false, control: "text", type: "string" },
+ inputMode: {
+ description:
+ "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "search",
+ "text",
+ "none",
+ "tel",
+ "url",
+ "email",
+ "numeric",
+ "decimal",
+ ],
+ },
+ is: {
+ description:
+ "Specify that a standard HTML element should behave like a defined custom built-in element\n@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ itemID: { required: false, control: "text", type: "string" },
+ itemProp: { required: false, control: "text", type: "string" },
+ itemRef: { required: false, control: "text", type: "string" },
+ itemScope: { required: false, control: "boolean", type: "boolean" },
+ itemType: { required: false, control: "text", type: "string" },
+ lang: { required: false, control: "text", type: "string" },
+ nonce: { required: false, control: "text", type: "string" },
+ placeholder: { required: false, control: "text", type: "string" },
+ prefix: { required: false, control: "text", type: "string" },
+ property: { required: false, control: "text", type: "string" },
+ radioGroup: { required: false, control: "text", type: "string" },
+ rel: { required: false, control: "text", type: "string" },
+ resource: { required: false, control: "text", type: "string" },
+ results: { required: false, control: "number", type: "number" },
+ rev: { required: false, control: "text", type: "string" },
+ role: { required: false, control: "text", type: "string" },
+ security: { required: false, control: "text", type: "string" },
+ slot: { required: false, control: "text", type: "string" },
+ spellCheck: { required: false, control: "boolean", type: "boolean" },
+ suppressContentEditableWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ suppressHydrationWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ tabIndex: { required: false, control: "number", type: "number" },
+ title: { required: false, control: "text", type: "string" },
+ translate: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["yes", "no"],
+ },
+ typeof: { required: false, control: "text", type: "string" },
+ unselectable: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["on", "off"],
+ },
+ vocab: { required: false, control: "text", type: "string" },
+};
+export const propsAccordionTrigger: Record<string, PropMeta> = {
+ about: { required: false, control: "text", type: "string" },
+ accessKey: { required: false, control: "text", type: "string" },
+ "aria-activedescendant": {
+ description:
+ "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-atomic": {
+ description:
+ "Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-autocomplete": {
+ description:
+ "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["list", "none", "inline", "both"],
+ },
+ "aria-braillelabel": {
+ description:
+ "Defines a string value that labels the current element, which is intended to be converted into Braille.\n@see aria-label.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-brailleroledescription": {
+ description:
+ "Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.\n@see aria-roledescription.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-busy": { required: false, control: "boolean", type: "boolean" },
+ "aria-checked": {
+ description:
+ 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colcount": {
+ description:
+ "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindex": {
+ description:
+ "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindextext": {
+ description:
+ "Defines a human readable text alternative of aria-colindex.\n@see aria-rowindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colspan": {
+ description:
+ "Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-controls": {
+ description:
+ "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-current": {
+ description:
+ "Indicates the element that represents the current item within a container or set of related elements.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-describedby": {
+ description:
+ "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-description": {
+ description:
+ "Defines a string value that describes or annotates the current element.\n@see related aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-details": {
+ description:
+ "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-disabled": {
+ description:
+ "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-dropeffect": {
+ description:
+ "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["link", "none", "copy", "execute", "move", "popup"],
+ },
+ "aria-errormessage": {
+ description:
+ "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-expanded": {
+ description:
+ "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-flowto": {
+ description:
+ "Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-grabbed": {
+ description:
+ 'Indicates an element\'s "grabbed" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-haspopup": {
+ description:
+ "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-hidden": {
+ description:
+ "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-invalid": {
+ description:
+ "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-keyshortcuts": {
+ description:
+ "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-label": {
+ description:
+ "Defines a string value that labels the current element.\n@see aria-labelledby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-labelledby": {
+ description:
+ "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-level": {
+ description:
+ "Defines the hierarchical level of an element within a structure.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-live": {
+ description:
+ "Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["off", "assertive", "polite"],
+ },
+ "aria-modal": {
+ description: "Indicates whether an element is modal when displayed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiline": {
+ description:
+ "Indicates whether a text box accepts multiple lines of input or only a single line.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiselectable": {
+ description:
+ "Indicates that the user may select more than one item from the current selectable descendants.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-orientation": {
+ description:
+ "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["horizontal", "vertical"],
+ },
+ "aria-owns": {
+ description:
+ "Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-placeholder": {
+ description:
+ "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-posinset": {
+ description:
+ "Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-pressed": {
+ description:
+ 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-readonly": {
+ description:
+ "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-relevant": {
+ description:
+ "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "text",
+ "additions",
+ "additions removals",
+ "additions text",
+ "all",
+ "removals",
+ "removals additions",
+ "removals text",
+ "text additions",
+ "text removals",
+ ],
+ },
+ "aria-required": {
+ description:
+ "Indicates that user input is required on the element before a form may be submitted.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-roledescription": {
+ description:
+ "Defines a human-readable, author-localized description for the role of an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowcount": {
+ description:
+ "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindex": {
+ description:
+ "Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindextext": {
+ description:
+ "Defines a human readable text alternative of aria-rowindex.\n@see aria-colindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowspan": {
+ description:
+ "Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-selected": {
+ description:
+ 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-setsize": {
+ description:
+ "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-sort": {
+ description:
+ "Indicates if items in a table or grid are sorted in ascending or descending order.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["none", "ascending", "descending", "other"],
+ },
+ "aria-valuemax": {
+ description: "Defines the maximum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuemin": {
+ description: "Defines the minimum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuenow": {
+ description:
+ "Defines the current value for a range widget.\n@see aria-valuetext.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuetext": {
+ description:
+ "Defines the human readable text alternative of aria-valuenow for a range widget.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ autoCapitalize: { required: false, control: "text", type: "string" },
+ autoCorrect: { required: false, control: "text", type: "string" },
+ autoFocus: { required: false, control: "boolean", type: "boolean" },
+ autoSave: { required: false, control: "text", type: "string" },
+ className: { required: false, control: "text", type: "string" },
+ color: { required: false, control: "color", type: "string" },
+ content: { required: false, control: "text", type: "string" },
+ contextMenu: { required: false, control: "text", type: "string" },
+ datatype: { required: false, control: "text", type: "string" },
+ defaultChecked: { required: false, control: "boolean", type: "boolean" },
+ dir: { required: false, control: "text", type: "string" },
+ disabled: { required: false, control: "boolean", type: "boolean" },
+ draggable: { required: false, control: "boolean", type: "boolean" },
+ form: { required: false, control: "text", type: "string" },
+ formAction: { required: false, control: "text", type: "string" },
+ formEncType: { required: false, control: "text", type: "string" },
+ formMethod: { required: false, control: "text", type: "string" },
+ formNoValidate: { required: false, control: "boolean", type: "boolean" },
+ formTarget: { required: false, control: "text", type: "string" },
+ hidden: { required: false, control: "boolean", type: "boolean" },
+ id: { required: false, control: "text", type: "string" },
+ inputMode: {
+ description:
+ "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "search",
+ "text",
+ "none",
+ "tel",
+ "url",
+ "email",
+ "numeric",
+ "decimal",
+ ],
+ },
+ is: {
+ description:
+ "Specify that a standard HTML element should behave like a defined custom built-in element\n@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ itemID: { required: false, control: "text", type: "string" },
+ itemProp: { required: false, control: "text", type: "string" },
+ itemRef: { required: false, control: "text", type: "string" },
+ itemScope: { required: false, control: "boolean", type: "boolean" },
+ itemType: { required: false, control: "text", type: "string" },
+ lang: { required: false, control: "text", type: "string" },
+ name: { required: false, control: "text", type: "string" },
+ nonce: { required: false, control: "text", type: "string" },
+ placeholder: { required: false, control: "text", type: "string" },
+ prefix: { required: false, control: "text", type: "string" },
+ property: { required: false, control: "text", type: "string" },
+ radioGroup: { required: false, control: "text", type: "string" },
+ rel: { required: false, control: "text", type: "string" },
+ resource: { required: false, control: "text", type: "string" },
+ results: { required: false, control: "number", type: "number" },
+ rev: { required: false, control: "text", type: "string" },
+ role: { required: false, control: "text", type: "string" },
+ security: { required: false, control: "text", type: "string" },
+ slot: { required: false, control: "text", type: "string" },
+ spellCheck: { required: false, control: "boolean", type: "boolean" },
+ suppressContentEditableWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ suppressHydrationWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ tabIndex: { required: false, control: "number", type: "number" },
+ title: { required: false, control: "text", type: "string" },
+ translate: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["yes", "no"],
+ },
+ type: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["button", "submit", "reset"],
+ },
+ typeof: { required: false, control: "text", type: "string" },
+ unselectable: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["on", "off"],
+ },
+ vocab: { required: false, control: "text", type: "string" },
+};
+export const propsAccordionContent: Record<string, PropMeta> = {
+ about: { required: false, control: "text", type: "string" },
+ accessKey: { required: false, control: "text", type: "string" },
+ "aria-activedescendant": {
+ description:
+ "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-atomic": {
+ description:
+ "Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-autocomplete": {
+ description:
+ "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["list", "none", "inline", "both"],
+ },
+ "aria-braillelabel": {
+ description:
+ "Defines a string value that labels the current element, which is intended to be converted into Braille.\n@see aria-label.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-brailleroledescription": {
+ description:
+ "Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.\n@see aria-roledescription.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-busy": { required: false, control: "boolean", type: "boolean" },
+ "aria-checked": {
+ description:
+ 'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colcount": {
+ description:
+ "Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindex": {
+ description:
+ "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-colindextext": {
+ description:
+ "Defines a human readable text alternative of aria-colindex.\n@see aria-rowindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-colspan": {
+ description:
+ "Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-controls": {
+ description:
+ "Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-current": {
+ description:
+ "Indicates the element that represents the current item within a container or set of related elements.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-describedby": {
+ description:
+ "Identifies the element (or elements) that describes the object.\n@see aria-labelledby",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-description": {
+ description:
+ "Defines a string value that describes or annotates the current element.\n@see related aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-details": {
+ description:
+ "Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-disabled": {
+ description:
+ "Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-dropeffect": {
+ description:
+ "Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["link", "none", "copy", "execute", "move", "popup"],
+ },
+ "aria-errormessage": {
+ description:
+ "Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-expanded": {
+ description:
+ "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-flowto": {
+ description:
+ "Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-grabbed": {
+ description:
+ 'Indicates an element\'s "grabbed" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-haspopup": {
+ description:
+ "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-hidden": {
+ description:
+ "Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-invalid": {
+ description:
+ "Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-keyshortcuts": {
+ description:
+ "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-label": {
+ description:
+ "Defines a string value that labels the current element.\n@see aria-labelledby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-labelledby": {
+ description:
+ "Identifies the element (or elements) that labels the current element.\n@see aria-describedby.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-level": {
+ description:
+ "Defines the hierarchical level of an element within a structure.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-live": {
+ description:
+ "Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["off", "assertive", "polite"],
+ },
+ "aria-modal": {
+ description: "Indicates whether an element is modal when displayed.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiline": {
+ description:
+ "Indicates whether a text box accepts multiple lines of input or only a single line.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-multiselectable": {
+ description:
+ "Indicates that the user may select more than one item from the current selectable descendants.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-orientation": {
+ description:
+ "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["horizontal", "vertical"],
+ },
+ "aria-owns": {
+ description:
+ "Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-placeholder": {
+ description:
+ "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-posinset": {
+ description:
+ "Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-pressed": {
+ description:
+ 'Indicates the current "pressed" state of toggle buttons.\n@see aria-checked\n@see aria-selected.',
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-readonly": {
+ description:
+ "Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-relevant": {
+ description:
+ "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "text",
+ "additions",
+ "additions removals",
+ "additions text",
+ "all",
+ "removals",
+ "removals additions",
+ "removals text",
+ "text additions",
+ "text removals",
+ ],
+ },
+ "aria-required": {
+ description:
+ "Indicates that user input is required on the element before a form may be submitted.",
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-roledescription": {
+ description:
+ "Defines a human-readable, author-localized description for the role of an element.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowcount": {
+ description:
+ "Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindex": {
+ description:
+ "Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-rowindextext": {
+ description:
+ "Defines a human readable text alternative of aria-rowindex.\n@see aria-colindextext.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ "aria-rowspan": {
+ description:
+ "Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-selected": {
+ description:
+ 'Indicates the current "selected" state of various widgets.\n@see aria-checked\n@see aria-pressed.',
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ "aria-setsize": {
+ description:
+ "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-sort": {
+ description:
+ "Indicates if items in a table or grid are sorted in ascending or descending order.",
+ required: false,
+ control: "select",
+ type: "string",
+ options: ["none", "ascending", "descending", "other"],
+ },
+ "aria-valuemax": {
+ description: "Defines the maximum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuemin": {
+ description: "Defines the minimum allowed value for a range widget.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuenow": {
+ description:
+ "Defines the current value for a range widget.\n@see aria-valuetext.",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ "aria-valuetext": {
+ description:
+ "Defines the human readable text alternative of aria-valuenow for a range widget.",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ autoCapitalize: { required: false, control: "text", type: "string" },
+ autoCorrect: { required: false, control: "text", type: "string" },
+ autoFocus: { required: false, control: "boolean", type: "boolean" },
+ autoSave: { required: false, control: "text", type: "string" },
+ className: { required: false, control: "text", type: "string" },
+ color: { required: false, control: "color", type: "string" },
+ content: { required: false, control: "text", type: "string" },
+ contextMenu: { required: false, control: "text", type: "string" },
+ datatype: { required: false, control: "text", type: "string" },
+ defaultChecked: { required: false, control: "boolean", type: "boolean" },
+ dir: { required: false, control: "text", type: "string" },
+ draggable: { required: false, control: "boolean", type: "boolean" },
+ hidden: { required: false, control: "boolean", type: "boolean" },
+ id: { required: false, control: "text", type: "string" },
+ inputMode: {
+ description:
+ "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
+ required: false,
+ control: "select",
+ type: "string",
+ options: [
+ "search",
+ "text",
+ "none",
+ "tel",
+ "url",
+ "email",
+ "numeric",
+ "decimal",
+ ],
+ },
+ is: {
+ description:
+ "Specify that a standard HTML element should behave like a defined custom built-in element\n@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
+ required: false,
+ control: "text",
+ type: "string",
+ },
+ itemID: { required: false, control: "text", type: "string" },
+ itemProp: { required: false, control: "text", type: "string" },
+ itemRef: { required: false, control: "text", type: "string" },
+ itemScope: { required: false, control: "boolean", type: "boolean" },
+ itemType: { required: false, control: "text", type: "string" },
+ lang: { required: false, control: "text", type: "string" },
+ nonce: { required: false, control: "text", type: "string" },
+ placeholder: { required: false, control: "text", type: "string" },
+ prefix: { required: false, control: "text", type: "string" },
+ property: { required: false, control: "text", type: "string" },
+ radioGroup: { required: false, control: "text", type: "string" },
+ rel: { required: false, control: "text", type: "string" },
+ resource: { required: false, control: "text", type: "string" },
+ results: { required: false, control: "number", type: "number" },
+ rev: { required: false, control: "text", type: "string" },
+ role: { required: false, control: "text", type: "string" },
+ security: { required: false, control: "text", type: "string" },
+ slot: { required: false, control: "text", type: "string" },
+ spellCheck: { required: false, control: "boolean", type: "boolean" },
+ suppressContentEditableWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ suppressHydrationWarning: {
+ required: false,
+ control: "boolean",
+ type: "boolean",
+ },
+ tabIndex: { required: false, control: "number", type: "number" },
+ title: { required: false, control: "text", type: "string" },
+ translate: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["yes", "no"],
+ },
+ typeof: { required: false, control: "text", type: "string" },
+ unselectable: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["on", "off"],
+ },
+ vocab: { required: false, control: "text", type: "string" },
+};
diff --git a/packages/sdk-components-react-radix/src/accordion.stories.tsx b/packages/sdk-components-react-radix/src/accordion.stories.tsx
new file mode 100644
index 0000000000..9c74b7aecf
--- /dev/null
+++ b/packages/sdk-components-react-radix/src/accordion.stories.tsx
@@ -0,0 +1,21 @@
+import type { Meta, StoryObj } from "@storybook/react";
+import { renderComponentTemplate } from "@webstudio-is/react-sdk";
+import { Accordion as AccordionPrimitive } from "./accordion";
+import * as baseComponents from "@webstudio-is/sdk-components-react";
+import * as baseMetas from "@webstudio-is/sdk-components-react/metas";
+import * as radixComponents from "./components";
+import * as radixMetas from "./metas";
+
+export default {
+ title: "Components/Accordion",
+ component: AccordionPrimitive,
+} satisfies Meta<typeof AccordionPrimitive>;
+
+export const Accordion: StoryObj<typeof AccordionPrimitive> = {
+ render: () =>
+ renderComponentTemplate({
+ name: "Accordion",
+ components: { ...baseComponents, ...radixComponents },
+ metas: { ...baseMetas, ...radixMetas },
+ }),
+};
diff --git a/packages/sdk-components-react-radix/src/accordion.tsx b/packages/sdk-components-react-radix/src/accordion.tsx
new file mode 100644
index 0000000000..3d5f608dff
--- /dev/null
+++ b/packages/sdk-components-react-radix/src/accordion.tsx
@@ -0,0 +1,81 @@
+/* eslint-disable react/display-name */
+// We can't use .displayName until this is merged https://github.com/styleguidist/react-docgen-typescript/pull/449
+
+import {
+ type ComponentPropsWithoutRef,
+ type ForwardRefExoticComponent,
+ type ComponentPropsWithRef,
+ forwardRef,
+} from "react";
+import {
+ Root,
+ Item,
+ Header,
+ Trigger,
+ Content,
+} from "@radix-ui/react-accordion";
+import {
+ getClosestInstance,
+ getIndexWithinAncestorFromComponentProps,
+ type Hook,
+} from "@webstudio-is/react-sdk";
+
+export const Accordion = forwardRef<
+ HTMLDivElement,
+ Omit<
+ ComponentPropsWithoutRef<typeof Root>,
+ "type" | "asChild" | "defaultValue" | "value" | "onValueChange"
+ > & {
+ value: string;
+ onValueChange: (value: string) => void;
+ }
+>((props, ref) => {
+ return <Root ref={ref} type="single" {...props} />;
+});
+
+export const AccordionItem = forwardRef<
+ HTMLDivElement,
+ Omit<ComponentPropsWithoutRef<typeof Item>, "asChild">
+>(({ value, ...props }, ref) => {
+ const index = getIndexWithinAncestorFromComponentProps(props);
+ return <Item ref={ref} value={value ?? index} {...props} />;
+});
+
+export const AccordionHeader: ForwardRefExoticComponent<
+ Omit<ComponentPropsWithRef<typeof Header>, "asChild">
+> = Header;
+
+export const AccordionTrigger: ForwardRefExoticComponent<
+ Omit<ComponentPropsWithRef<typeof Trigger>, "asChild">
+> = Trigger;
+
+export const AccordionContent: ForwardRefExoticComponent<
+ Omit<ComponentPropsWithRef<typeof Content>, "asChild">
+> = Content;
+
+/* BUILDER HOOKS */
+
+const namespace = "@webstudio-is/sdk-components-react-radix";
+
+// For each AccordionItem component within the selection,
+// we identify its closest parent Accordion component
+// and update its open prop bound to variable.
+export const hooksAccordion: Hook = {
+ onNavigatorSelect: (context, event) => {
+ for (const instance of event.instancePath) {
+ if (instance.component === `${namespace}:AccordionItem`) {
+ const accordion = getClosestInstance(
+ event.instancePath,
+ instance,
+ `${namespace}:Accordion`
+ );
+ const itemValue =
+ context.getPropValue(instance.id, "value") ??
+ context.indexesWithinAncestors.get(instance.id)?.toString();
+ if (accordion && itemValue) {
+ context.setPropVariable(accordion.id, "value", itemValue);
+ }
+ }
+ }
+ },
+};
diff --git a/packages/sdk-components-react-radix/src/accordion.ws.ts b/packages/sdk-components-react-radix/src/accordion.ws.ts
new file mode 100644
index 0000000000..b7c02afbbb
--- /dev/null
+++ b/packages/sdk-components-react-radix/src/accordion.ws.ts
@@ -0,0 +1,275 @@
+import {
+ AccordionIcon,
+ ItemIcon,
+ HeaderIcon,
+ TriggerIcon,
+ ContentIcon,
+} from "@webstudio-is/icons/svg";
+import type {
+ EmbedTemplateStyleDecl,
+ PresetStyle,
+ WsComponentMeta,
+ WsComponentPropsMeta,
+} from "@webstudio-is/react-sdk";
+import { div, h3, button } from "@webstudio-is/react-sdk/css-normalize";
+import * as tc from "./theme/tailwind-classes";
+import {
+ propsAccordion,
+ propsAccordionItem,
+ propsAccordionHeader,
+ propsAccordionTrigger,
+ propsAccordionContent,
+} from "./__generated__/accordion.props";
+
+const presetStyle = {
+ div,
+} satisfies PresetStyle<"div">;
+
+/**
+ * Styles source without animations:
+ * https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/accordion.tsx
+ *
+ * Attributions
+ * MIT License
+ * Copyright (c) 2023 shadcn
+ **/
+
+// border-b
+const accordionItemStyles: EmbedTemplateStyleDecl[] = [tc.borderB()].flat();
+
+// flex
+const accordionHeaderStyles: EmbedTemplateStyleDecl[] = [tc.flex()].flat();
+
+// flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180
+const accordionTriggerStyles: EmbedTemplateStyleDecl[] = [
+ tc.flex(),
+ tc.flex(1),
+ tc.items("center"),
+ tc.justify("between"),
+ tc.py(4),
+ tc.font("medium"),
+ tc.transition("all"),
+ tc.hover([tc.underline()].flat()),
+].flat();
+
+// overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down
+// pb-4 pt-0
+const accordionContentStyles: EmbedTemplateStyleDecl[] = [
+ tc.overflow("hidden"),
+ tc.text("sm"),
+ // transition does not work with display: none
+ // tc.transition("all"),
+ tc.pb(4),
+].flat();
+
+export const metaAccordion: WsComponentMeta = {
+ category: "radix",
+ type: "container",
+ label: "Accordion",
+ icon: AccordionIcon,
+ presetStyle,
+ template: [
+ {
+ type: "instance",
+ component: "Accordion",
+ dataSources: {
+ accordionValue: { type: "variable", initialValue: "0" },
+ },
+ props: [
+ { type: "boolean", name: "collapsible", value: true },
+ { type: "dataSource", name: "value", dataSourceName: "accordionValue" },
+ {
+ name: "onValueChange",
+ type: "action",
+ value: [
+ {
+ type: "execute",
+ args: ["value"],
+ code: `accordionValue = value`,
+ },
+ ],
+ },
+ ],
+ children: [
+ {
+ type: "instance",
+ component: "AccordionItem",
+ styles: accordionItemStyles,
+ children: [
+ {
+ type: "instance",
+ component: "AccordionHeader",
+ styles: accordionHeaderStyles,
+ children: [
+ {
+ type: "instance",
+ component: "AccordionTrigger",
+ styles: accordionTriggerStyles,
+ children: [{ type: "text", value: "Is it accessible?" }],
+ },
+ ],
+ },
+ {
+ type: "instance",
+ component: "AccordionContent",
+ styles: accordionContentStyles,
+ children: [
+ {
+ type: "text",
+ value: "Yes. It adheres to the WAI-ARIA design pattern.",
+ },
+ ],
+ },
+ ],
+ },
+
+ {
+ type: "instance",
+ component: "AccordionItem",
+ styles: accordionItemStyles,
+ children: [
+ {
+ type: "instance",
+ component: "AccordionHeader",
+ styles: accordionHeaderStyles,
+ children: [
+ {
+ type: "instance",
+ component: "AccordionTrigger",
+ styles: accordionTriggerStyles,
+ children: [{ type: "text", value: "Is it styled?" }],
+ },
+ ],
+ },
+ {
+ type: "instance",
+ component: "AccordionContent",
+ styles: accordionContentStyles,
+ children: [
+ {
+ type: "text",
+ value:
+ "Yes. It comes with default styles that matches the other components' aesthetic.",
+ },
+ ],
+ },
+ ],
+ },
+
+ {
+ type: "instance",
+ component: "AccordionItem",
+ styles: accordionItemStyles,
+ children: [
+ {
+ type: "instance",
+ component: "AccordionHeader",
+ styles: accordionHeaderStyles,
+ children: [
+ {
+ type: "instance",
+ component: "AccordionTrigger",
+ styles: accordionTriggerStyles,
+ children: [{ type: "text", value: "Is it animated?" }],
+ },
+ ],
+ },
+ {
+ type: "instance",
+ component: "AccordionContent",
+ styles: accordionContentStyles,
+ children: [
+ {
+ type: "text",
+ value:
+ "Yes. It's animated by default, but you can disable it if you prefer.",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+};
+
+export const metaAccordionItem: WsComponentMeta = {
+ category: "hidden",
+ type: "container",
+ label: "Accordion Item",
+ icon: ItemIcon,
+ requiredAncestors: ["Accordion"],
+ indexWithinAncestor: "Accordion",
+ presetStyle,
+};
+
+export const metaAccordionHeader: WsComponentMeta = {
+ category: "hidden",
+ type: "container",
+ label: "Accordion Header",
+ icon: HeaderIcon,
+ requiredAncestors: ["AccordionItem"],
+ detachable: false,
+ presetStyle: {
+ h3: [h3, tc.my(0)].flat(),
+ },
+};
+
+export const metaAccordionTrigger: WsComponentMeta = {
+ category: "hidden",
+ type: "container",
+ label: "Accordion Trigger",
+ icon: TriggerIcon,
+ requiredAncestors: ["AccordionHeader"],
+ detachable: false,
+ presetStyle: {
+ button: [
+ button,
+ {
+ property: "backgroundColor",
+ value: { type: "keyword", value: "transparent" },
+ } as const,
+ {
+ property: "backgroundImage",
+ value: { type: "keyword", value: "none" },
+ } as const,
+ {
+ property: "cursor",
+ value: { type: "keyword", value: "pointer" },
+ } as const,
+ tc.px(0),
+ tc.border(0),
+ ].flat(),
+ },
+};
+
+export const metaAccordionContent: WsComponentMeta = {
+ category: "hidden",
+ type: "container",
+ label: "Accordion Content",
+ icon: ContentIcon,
+ requiredAncestors: ["AccordionItem"],
+ detachable: false,
+ presetStyle,
+};
+
+export const propsMetaAccordion: WsComponentPropsMeta = {
+ props: propsAccordion,
+ initialProps: ["value", "collapsible", "dir", "orientation"],
+};
+
+export const propsMetaAccordionItem: WsComponentPropsMeta = {
+ props: propsAccordionItem,
+};
+
+export const propsMetaAccordionHeader: WsComponentPropsMeta = {
+ props: propsAccordionHeader,
+};
+
+export const propsMetaAccordionTrigger: WsComponentPropsMeta = {
+ props: propsAccordionTrigger,
+};
+
+export const propsMetaAccordionContent: WsComponentPropsMeta = {
+ props: propsAccordionContent,
+};
diff --git a/packages/sdk-components-react-radix/src/components.ts b/packages/sdk-components-react-radix/src/components.ts
index 737ae70198..15e4a4d602 100644
--- a/packages/sdk-components-react-radix/src/components.ts
+++ b/packages/sdk-components-react-radix/src/components.ts
@@ -28,3 +28,10 @@ export { Button } from "./button";
export { Input } from "./input";
export { Textarea } from "./textarea";
export { Label } from "./label";
+export {
+ Accordion,
+ AccordionItem,
+ AccordionHeader,
+ AccordionTrigger,
+ AccordionContent,
+} from "./accordion";
diff --git a/packages/sdk-components-react-radix/src/hooks.ts b/packages/sdk-components-react-radix/src/hooks.ts
index 2c43400472..91737f859e 100644
--- a/packages/sdk-components-react-radix/src/hooks.ts
+++ b/packages/sdk-components-react-radix/src/hooks.ts
@@ -5,6 +5,7 @@ import { hooksDialog } from "./dialog";
import { hooksPopover } from "./popover";
import { hooksSheet } from "./sheet";
import { hooksTooltip } from "./tooltip";
+import { hooksAccordion } from "./accordion";
export const hooks: Hook[] = [
hooksCollapsible,
@@ -13,4 +14,5 @@ export const hooks: Hook[] = [
hooksPopover,
hooksSheet,
hooksTooltip,
+ hooksAccordion,
];
diff --git a/packages/sdk-components-react-radix/src/metas.ts b/packages/sdk-components-react-radix/src/metas.ts
index a9159fd7b6..17b9578ceb 100644
--- a/packages/sdk-components-react-radix/src/metas.ts
+++ b/packages/sdk-components-react-radix/src/metas.ts
@@ -41,3 +41,10 @@ export { meta as Button } from "./button.ws";
export { meta as Input } from "./input.ws";
export { meta as Textarea } from "./textarea.ws";
export { meta as Label } from "./label.ws";
+export {
+ metaAccordion as Accordion,
+ metaAccordionItem as AccordionItem,
+ metaAccordionHeader as AccordionHeader,
+ metaAccordionTrigger as AccordionTrigger,
+ metaAccordionContent as AccordionContent,
+} from "./accordion.ws";
diff --git a/packages/sdk-components-react-radix/src/props.ts b/packages/sdk-components-react-radix/src/props.ts
index f69330779c..18f9426a1c 100644
--- a/packages/sdk-components-react-radix/src/props.ts
+++ b/packages/sdk-components-react-radix/src/props.ts
@@ -41,3 +41,10 @@ export { propsMeta as Button } from "./button.ws";
export { propsMeta as Input } from "./input.ws";
export { propsMeta as Textarea } from "./textarea.ws";
export { propsMeta as Label } from "./label.ws";
+export {
+ propsMetaAccordion as Accordion,
+ propsMetaAccordionItem as AccordionItem,
+ propsMetaAccordionHeader as AccordionHeader,
+ propsMetaAccordionTrigger as AccordionTrigger,
+ propsMetaAccordionContent as AccordionContent,
+} from "./accordion.ws";
diff --git a/packages/sdk-components-react-radix/src/tabs.ws.ts b/packages/sdk-components-react-radix/src/tabs.ws.ts
index 5b966e8e2d..ac9e5b25ea 100644
--- a/packages/sdk-components-react-radix/src/tabs.ws.ts
+++ b/packages/sdk-components-react-radix/src/tabs.ws.ts
@@ -164,13 +164,6 @@ export const metaTabsTrigger: WsComponentMeta = {
requiredAncestors: ["TabsList"],
invalidAncestors: ["TabsTrigger"],
indexWithinAncestor: "Tabs",
- template: [
- {
- type: "instance",
- component: "TabsTrigger",
- children: [{ type: "text", value: "New Tab" }],
- },
- ],
};
export const metaTabsContent: WsComponentMeta = {
@@ -181,13 +174,6 @@ export const metaTabsContent: WsComponentMeta = {
requiredAncestors: ["Tabs"],
indexWithinAncestor: "Tabs",
presetStyle,
- template: [
- {
- type: "instance",
- component: "TabsContent",
- children: [{ type: "text", value: "New Tab Content" }],
- },
- ],
};
export const propsMetaTabs: WsComponentPropsMeta = {
diff --git a/packages/sdk-components-react-radix/src/theme/tailwind-classes.ts b/packages/sdk-components-react-radix/src/theme/tailwind-classes.ts
index 7d18fdeeb4..081f9c99bc 100644
--- a/packages/sdk-components-react-radix/src/theme/tailwind-classes.ts
+++ b/packages/sdk-components-react-radix/src/theme/tailwind-classes.ts
@@ -3,7 +3,11 @@
*/
import type { EmbedTemplateStyleDecl } from "@webstudio-is/react-sdk";
import { theme } from "./tailwind-theme";
-import { parseCssValue, parseBoxShadow } from "@webstudio-is/css-data";
+import {
+ parseCssValue,
+ parseBoxShadow,
+ StyleValue,
+} from "@webstudio-is/css-data";
import type { EvaluatedDefaultTheme } from "./radix-common-types";
// https://github.com/tailwindlabs/tailwindcss/blob/master/src/css/preflight.css
@@ -150,42 +154,83 @@ export const border = (
];
};
-export const px = (
- padding:
- | StringEnumToNumeric<keyof EvaluatedDefaultTheme["padding"]>
- | NonNumeric<keyof EvaluatedDefaultTheme["padding"]>
+export const borderB = (
+ borderWidthOrColor?:
+ | StringEnumToNumeric<keyof EvaluatedDefaultTheme["borderWidth"]>
+ | keyof EvaluatedDefaultTheme["colors"]
): EmbedTemplateStyleDecl[] => {
- const key = `${padding}` as const;
- const valueString = theme("padding")?.[key] ?? "0";
- const value = parseCssValue("paddingLeft", valueString);
+ let widthValue: StyleValue = { type: "unit", value: 1, unit: "number" };
+ let colorValue: StyleValue = parseCssValue(
+ "color",
+ theme("colors")["border"]
+ );
+ if (
+ typeof borderWidthOrColor === "number" ||
+ borderWidthOrColor === undefined
+ ) {
+ const key = `${borderWidthOrColor ?? "DEFAULT"}` as const;
+ const valueString = theme("borderWidth")[key] ?? "1px";
+ widthValue = parseCssValue("borderTopWidth", valueString);
+ } else {
+ colorValue = parseCssValue("color", theme("colors")[borderWidthOrColor]);
+ }
return [
- { property: "paddingLeft", value },
- { property: "paddingRight", value },
+ {
+ property: "borderBottomWidth",
+ value: widthValue,
+ },
+ {
+ property: "borderBottomStyle",
+ value: { type: "keyword", value: "solid" },
+ },
+ {
+ property: "borderBottomColor",
+ value: colorValue,
+ },
];
};
-export const py = (
- padding:
- | StringEnumToNumeric<keyof EvaluatedDefaultTheme["padding"]>
- | NonNumeric<keyof EvaluatedDefaultTheme["padding"]>
-): EmbedTemplateStyleDecl[] => {
- const key = `${padding}` as const;
- const valueString = theme("padding")[key];
- const value = parseCssValue("paddingTop", valueString);
+const paddingProperty =
+ (property: "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft") =>
+ (
+ padding:
+ | StringEnumToNumeric<keyof EvaluatedDefaultTheme["padding"]>
+ | NonNumeric<keyof EvaluatedDefaultTheme["padding"]>
+ ): EmbedTemplateStyleDecl[] => {
+ const key = `${padding}` as const;
+ const valueString = theme("padding")?.[key] ?? "0";
+ const value = parseCssValue(property, valueString);
- return [
- { property: "paddingTop", value },
- { property: "paddingBottom", value },
- ];
+ return [{ property, value }];
+ };
+
+export const pt: ReturnType<typeof paddingProperty> = (padding) => {
+ return paddingProperty("paddingTop")(padding);
};
-export const p = (
- padding:
- | StringEnumToNumeric<keyof EvaluatedDefaultTheme["padding"]>
- | NonNumeric<keyof EvaluatedDefaultTheme["padding"]>
-): EmbedTemplateStyleDecl[] => {
- return [...px(padding), ...py(padding)];
+export const pb: ReturnType<typeof paddingProperty> = (padding) => {
+ return paddingProperty("paddingBottom")(padding);
+};
+
+export const pl: ReturnType<typeof paddingProperty> = (padding) => {
+ return paddingProperty("paddingLeft")(padding);
+};
+
+export const pr: ReturnType<typeof paddingProperty> = (padding) => {
+ return paddingProperty("paddingRight")(padding);
+};
+
+export const px: ReturnType<typeof paddingProperty> = (padding) => {
+ return [pl(padding), pr(padding)].flat();
+};
+
+export const py: ReturnType<typeof paddingProperty> = (padding) => {
+ return [pt(padding), pb(padding)].flat();
+};
+
+export const p: ReturnType<typeof paddingProperty> = (padding) => {
+ return [px(padding), py(padding)].flat();
};
const marginProperty =
@@ -448,11 +493,83 @@ export const inlineFlex = (): EmbedTemplateStyleDecl[] => {
const flexDirection = { row: "row", col: "column" } as const;
type FlexDirection = keyof typeof flexDirection;
-export const flex = (flexParam?: FlexDirection): EmbedTemplateStyleDecl[] => {
+type FlexSizing = 1 | "auto" | "initial" | "none";
+
+export const flex = (
+ flexParam?: FlexDirection | FlexSizing
+): EmbedTemplateStyleDecl[] => {
if (flexParam === undefined) {
return [{ property: "display", value: { type: "keyword", value: "flex" } }];
}
+ if (flexParam === 1) {
+ return [
+ {
+ property: "flexGrow",
+ value: { type: "unit", value: 1, unit: "number" },
+ },
+ {
+ property: "flexShrink",
+ value: { type: "unit", value: 1, unit: "number" },
+ },
+ {
+ property: "flexBasis",
+ value: { type: "unit", value: 0, unit: "%" },
+ },
+ ];
+ }
+
+ if (flexParam === "auto") {
+ return [
+ {
+ property: "flexGrow",
+ value: { type: "unit", value: 1, unit: "number" },
+ },
+ {
+ property: "flexShrink",
+ value: { type: "unit", value: 1, unit: "number" },
+ },
+ {
+ property: "flexBasis",
+ value: { type: "keyword", value: "auto" },
+ },
+ ];
+ }
+
+ if (flexParam === "initial") {
+ return [
+ {
+ property: "flexGrow",
+ value: { type: "unit", value: 0, unit: "number" },
+ },
+ {
+ property: "flexShrink",
+ value: { type: "unit", value: 1, unit: "number" },
+ },
+ {
+ property: "flexBasis",
+ value: { type: "keyword", value: "auto" },
+ },
+ ];
+ }
+
+ if (flexParam === "none") {
+ return [
+ {
+ property: "flexGrow",
+ value: { type: "unit", value: 0, unit: "number" },
+ },
+ {
+ property: "flexShrink",
+ value: { type: "unit", value: 0, unit: "number" },
+ },
+ {
+ property: "flexBasis",
+ value: { type: "keyword", value: "auto" },
+ },
+ ];
+ }
+
return [
{
property: "flexDirection",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 45923321ef..5387539b4a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1341,6 +1341,9 @@ importers:
packages/sdk-components-react-radix:
dependencies:
+ '@radix-ui/react-accordion':
+ specifier: ^1.1.2
'@radix-ui/react-collapsible':
specifier: ^1.0.3
@@ -4700,6 +4703,35 @@ packages:
react-dom: 18.2.0([email protected])
dev: false
+ resolution: {integrity: sha512-fDG7jcoNKVjSK6yfmuAs0EnPDro0WMXIhMtXdTBWqEioVW206ku+4Lw07e+13lUkFkpoEQ2PdeMIAGpdqEAmDg==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+ dependencies:
+ '@babel/runtime': 7.22.3
+ '@radix-ui/primitive': 1.0.1
+ '@radix-ui/react-collapsible': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])
+ '@radix-ui/react-collection': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])
+ '@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.0.1(@types/[email protected])([email protected])
+ '@radix-ui/react-direction': 1.0.1(@types/[email protected])([email protected])
+ '@radix-ui/react-id': 1.0.1(@types/[email protected])([email protected])
+ '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.0.1(@types/[email protected])([email protected])
+ '@types/react': 18.2.20
+ '@types/react-dom': 18.2.7
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ dev: false
+
resolution: {integrity: sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==}
peerDependencies: