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.

Navigation Menu Radix Component (#2146)

Ivan Starkovab903af13031
diff --git a/packages/sdk-components-react-radix/package.json b/packages/sdk-components-react-radix/package.json
index 3dae87c698..a90364b0bc 100644
--- a/packages/sdk-components-react-radix/package.json
+++ b/packages/sdk-components-react-radix/package.json
@@ -57,6 +57,7 @@
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.4",
"@radix-ui/react-label": "^2.0.2",
+ "@radix-ui/react-navigation-menu": "^1.1.3",
"@radix-ui/react-popover": "^1.0.6",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-tooltip": "^1.0.6",
diff --git a/packages/sdk-components-react-radix/src/__generated__/button.props.ts b/packages/sdk-components-react-radix/src/__generated__/button.props.ts
index 226741dbe5..989e433e84 100644
--- a/packages/sdk-components-react-radix/src/__generated__/button.props.ts
+++ b/packages/sdk-components-react-radix/src/__generated__/button.props.ts
@@ -445,13 +445,6 @@ export const props: Record<string, PropMeta> = {
rev: { required: false, control: "text", type: "string" },
role: { required: false, control: "text", type: "string" },
security: { required: false, control: "text", type: "string" },
- size: {
- required: false,
- control: "select",
- type: "string",
- defaultValue: "default",
- options: ["default", "sm", "lg", "icon"],
- },
slot: { required: false, control: "text", type: "string" },
spellCheck: { required: false, control: "boolean", type: "boolean" },
suppressContentEditableWarning: {
@@ -485,19 +478,5 @@ export const props: Record<string, PropMeta> = {
type: "string",
options: ["on", "off"],
},
- variant: {
- required: false,
- control: "select",
- type: "string",
- defaultValue: "default",
- options: [
- "link",
- "default",
- "destructive",
- "outline",
- "secondary",
- "ghost",
- ],
- },
vocab: { required: false, control: "text", type: "string" },
};
diff --git a/packages/sdk-components-react-radix/src/__generated__/navigation-menu.props.ts b/packages/sdk-components-react-radix/src/__generated__/navigation-menu.props.ts
new file mode 100644
index 0000000000..7e017dcecf
--- /dev/null
+++ b/packages/sdk-components-react-radix/src/__generated__/navigation-menu.props.ts
@@ -0,0 +1,2359 @@
+import type { PropMeta } from "@webstudio-is/generate-arg-types";
+
+export const propsNavigationMenu: 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-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",
+ },
+ asChild: { required: false, control: "boolean", type: "boolean" },
+ 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" },
+ defaultValue: { required: false, control: "text", type: "string" },
+ delayDuration: {
+ description:
+ "The duration from when the pointer enters the trigger until the tooltip gets opened.\n@defaultValue 200",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ dir: {
+ required: false,
+ control: "radio",
+ type: "string",
+ options: ["ltr", "rtl"],
+ },
+ 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" },
+ skipDelayDuration: {
+ description:
+ "How much time a user has to enter another trigger without incurring a delay again.\n@defaultValue 300",
+ required: false,
+ control: "number",
+ type: "number",
+ },
+ 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: false, control: "text", type: "string" },
+ vocab: { required: false, control: "text", type: "string" },
+};
+export const propsNavigationMenuList: 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",
+ },
+ asChild: { required: false, control: "boolean", type: "boolean" },
+ 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 propsNavigationMenuViewport: 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",
+ },
+ asChild: { required: false, control: "boolean", type: "boolean" },
+ 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 propsNavigationMenuContent: 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",
+ },
+ asChild: { required: false, control: "boolean", type: "boolean" },
+ 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" },
+ disableOutsidePointerEvents: {
+ description:
+ "When `true`, hover/focus/click interactions will be disabled on elements outside\nthe `DismissableLayer`. Users will need to click twice on outside elements to\ninteract with them: once to close the `DismissableLayer`, and again to trigger the element.",
+ 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"],
+ },
+ vocab: { required: false, control: "text", type: "string" },
+};
+export const propsNavigationMenuItem: 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"],
+ },
+ value: { required: false, control: "text", type: "string" },
+ vocab: { required: false, control: "text", type: "string" },
+};
+export const propsNavigationMenuLink: Record<string, PropMeta> = {};
+export const propsNavigationMenuTrigger: Record<string, PropMeta> = {};
diff --git a/packages/sdk-components-react-radix/src/components.ts b/packages/sdk-components-react-radix/src/components.ts
index 15e4a4d602..46b714673a 100644
--- a/packages/sdk-components-react-radix/src/components.ts
+++ b/packages/sdk-components-react-radix/src/components.ts
@@ -35,3 +35,13 @@ export {
AccordionTrigger,
AccordionContent,
} from "./accordion";
+
+export {
+ NavigationMenu,
+ NavigationMenuList,
+ NavigationMenuItem,
+ NavigationMenuTrigger,
+ NavigationMenuContent,
+ NavigationMenuLink,
+ NavigationMenuViewport,
+} from "./navigation-menu";
diff --git a/packages/sdk-components-react-radix/src/hooks.ts b/packages/sdk-components-react-radix/src/hooks.ts
index 91737f859e..4fdafddc7b 100644
--- a/packages/sdk-components-react-radix/src/hooks.ts
+++ b/packages/sdk-components-react-radix/src/hooks.ts
@@ -6,6 +6,7 @@ import { hooksPopover } from "./popover";
import { hooksSheet } from "./sheet";
import { hooksTooltip } from "./tooltip";
import { hooksAccordion } from "./accordion";
+import { hooksNavigationMenu } from "./navigation-menu";
export const hooks: Hook[] = [
hooksCollapsible,
@@ -15,4 +16,5 @@ export const hooks: Hook[] = [
hooksSheet,
hooksTooltip,
hooksAccordion,
+ hooksNavigationMenu,
];
diff --git a/packages/sdk-components-react-radix/src/metas.ts b/packages/sdk-components-react-radix/src/metas.ts
index 17b9578ceb..eea6c394ed 100644
--- a/packages/sdk-components-react-radix/src/metas.ts
+++ b/packages/sdk-components-react-radix/src/metas.ts
@@ -48,3 +48,13 @@ export {
metaAccordionTrigger as AccordionTrigger,
metaAccordionContent as AccordionContent,
} from "./accordion.ws";
+
+export {
+ metaNavigationMenu as NavigationMenu,
+ metaNavigationMenuList as NavigationMenuList,
+ metaNavigationMenuItem as NavigationMenuItem,
+ metaNavigationMenuTrigger as NavigationMenuTrigger,
+ metaNavigationMenuContent as NavigationMenuContent,
+ metaNavigationMenuLink as NavigationMenuLink,
+ metaNavigationMenuViewport as NavigationMenuViewport,
+} from "./navigation-menu.ws";
diff --git a/packages/sdk-components-react-radix/src/navigation-menu.stories.tsx b/packages/sdk-components-react-radix/src/navigation-menu.stories.tsx
new file mode 100644
index 0000000000..e6ddd42c3b
--- /dev/null
+++ b/packages/sdk-components-react-radix/src/navigation-menu.stories.tsx
@@ -0,0 +1,21 @@
+import type { Meta, StoryObj } from "@storybook/react";
+import { renderComponentTemplate } from "@webstudio-is/react-sdk";
+import { NavigationMenu as NavigationMenuPrimitive } from "./navigation-menu";
+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/NavigationMenu",
+ component: NavigationMenuPrimitive,
+} satisfies Meta<typeof NavigationMenuPrimitive>;
+
+export const NavigationMenu: StoryObj<typeof NavigationMenuPrimitive> = {
+ render: () =>
+ renderComponentTemplate({
+ name: "NavigationMenu",
+ components: { ...baseComponents, ...radixComponents },
+ metas: { ...baseMetas, ...radixMetas },
+ }),
+};
diff --git a/packages/sdk-components-react-radix/src/navigation-menu.tsx b/packages/sdk-components-react-radix/src/navigation-menu.tsx
new file mode 100644
index 0000000000..8cd1bf6b64
--- /dev/null
+++ b/packages/sdk-components-react-radix/src/navigation-menu.tsx
@@ -0,0 +1,120 @@
+/* eslint-disable react/display-name */
+import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
+import {
+ getClosestInstance,
+ getIndexWithinAncestorFromComponentProps,
+ ReactSdkContext,
+ type Hook,
+} from "@webstudio-is/react-sdk";
+import {
+ Children,
+ forwardRef,
+ type ComponentPropsWithoutRef,
+ type ReactNode,
+ useContext,
+} from "react";
+
+export const NavigationMenu = forwardRef<
+ HTMLLIElement,
+ Omit<
+ ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>,
+ "orientation" | "aria-orientation"
+ >
+>(({ value: propsValue, ...props }, ref) => {
+ /**
+ * If the value is an empty string, "NavigationMenuViewport" isn't in the tree.
+ * This is Radix's way to differentiate animations. However, in the builder, we can't style non-existing elements.
+ * Since we don't need animations in the builder, we can trick Radix by setting a non-empty string like "-1" to the value property.
+ * This ensures "NavigationMenuViewport" always appears in the HTML tree.
+ **/
+ const { renderer } = useContext(ReactSdkContext);
+ let value = propsValue;
+ if (renderer === "canvas") {
+ value = value === "" ? "-1" : value;
+ }
+
+ return <NavigationMenuPrimitive.Root ref={ref} value={value} {...props} />;
+});
+
+export const NavigationMenuList = NavigationMenuPrimitive.List;
+
+export const NavigationMenuViewport = NavigationMenuPrimitive.Viewport;
+export const NavigationMenuContent = NavigationMenuPrimitive.Content;
+
+export const NavigationMenuItem = forwardRef<
+ HTMLLIElement,
+ Omit<ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item>, "asChild">
+>(({ value, ...props }, ref) => {
+ const index = getIndexWithinAncestorFromComponentProps(props);
+ return (
+ <NavigationMenuPrimitive.Item ref={ref} value={value ?? index} {...props} />
+ );
+});
+
+export const NavigationMenuLink = forwardRef<
+ HTMLAnchorElement,
+ { children: ReactNode }
+>(({ children, ...props }, ref) => {
+ const firstChild = Children.toArray(children)[0];
+
+ return (
+ <NavigationMenuPrimitive.Link asChild={true} ref={ref} {...props}>
+ {firstChild ?? <a>Add link component</a>}
+ </NavigationMenuPrimitive.Link>
+ );
+});
+
+export const NavigationMenuTrigger = forwardRef<
+ HTMLButtonElement,
+ { children: ReactNode }
+>(({ children, ...props }, ref) => {
+ const firstChild = Children.toArray(children)[0];
+
+ return (
+ <NavigationMenuPrimitive.Trigger asChild={true} ref={ref} {...props}>
+ {firstChild ?? <button>Add button or link</button>}
+ </NavigationMenuPrimitive.Trigger>
+ );
+});
+
+const namespace = "@webstudio-is/sdk-components-react-radix";
+
+// For each NavigationMenuItem component within the selection,
+// we identify its closest parent NavigationMenu component
+// and update its open prop bound to variable.
+export const hooksNavigationMenu: Hook = {
+ onNavigatorUnselect: (context, event) => {
+ for (const instance of event.instancePath) {
+ if (instance.component === `${namespace}:NavigationMenuContent`) {
+ const menu = getClosestInstance(
+ event.instancePath,
+ instance,
+ `${namespace}:NavigationMenu`
+ );
+
+ if (menu) {
+ context.setPropVariable(menu.id, "value", "");
+ }
+ }
+ }
+ },
+ onNavigatorSelect: (context, event) => {
+ for (const instance of event.instancePath) {
+ if (instance.component === `${namespace}:NavigationMenuContent`) {
+ const menu = getClosestInstance(
+ event.instancePath,
+ instance,
+ `${namespace}:NavigationMenu`
+ );
+
+ const contentValue =
+ context.getPropValue(instance.id, "value") ??
+ context.indexesWithinAncestors.get(instance.id)?.toString();
+
+ if (menu && contentValue) {
+ context.setPropVariable(menu.id, "value", contentValue);
+ }
+ }
+ }
+ },
+};
diff --git a/packages/sdk-components-react-radix/src/navigation-menu.ws.ts b/packages/sdk-components-react-radix/src/navigation-menu.ws.ts
new file mode 100644
index 0000000000..7e052dfa03
--- /dev/null
+++ b/packages/sdk-components-react-radix/src/navigation-menu.ws.ts
@@ -0,0 +1,323 @@
+import {
+ ContentIcon,
+ HeaderIcon,
+ HamburgerMenuIcon,
+ ItemIcon,
+ TriggerIcon,
+ LinkIcon,
+ ExternalLinkIcon,
+} from "@webstudio-is/icons/svg";
+import type {
+ PresetStyle,
+ WsComponentMeta,
+ WsComponentPropsMeta,
+} from "@webstudio-is/react-sdk";
+
+import { template as buttonTemplate } from "./button.ws";
+
+import { div } from "@webstudio-is/react-sdk/css-normalize";
+
+import * as tc from "./theme/tailwind-classes";
+
+import {
+ propsNavigationMenu,
+ propsNavigationMenuItem,
+ propsNavigationMenuTrigger,
+ propsNavigationMenuContent,
+ propsNavigationMenuLink,
+ propsNavigationMenuList,
+ propsNavigationMenuViewport,
+} from "./__generated__/navigation-menu.props";
+
+const presetStyle = {
+ div,
+} satisfies PresetStyle<"div">;
+
+const menuItem = (props: {
+ title: string;
+ linkPrefix: string;
+ linkCount: number;
+}): NonNullable<WsComponentMeta["template"]> => [
+ {
+ type: "instance",
+ component: "NavigationMenuItem",
+ children: [
+ {
+ type: "instance",
+ component: "NavigationMenuTrigger",
+ children: buttonTemplate({
+ children: [{ type: "text", value: props.title }],
+ }),
+ },
+ {
+ type: "instance",
+ component: "NavigationMenuContent",
+ tokens: ["navigationMenuContent"],
+ children: [
+ {
+ type: "instance",
+ component: "Box",
+ label: "Content Container",
+ styles: [tc.flex(), tc.gap(4)].flat(),
+
+ children: [
+ {
+ type: "instance",
+ component: "Box",
+ styles: [tc.bg("border"), tc.p(4)].flat(),
+ children: [
+ {
+ type: "text",
+ value: "Content",
+ },
+ ],
+ },
+
+ {
+ type: "instance",
+ component: "Box",
+ label: "Content Container",
+ styles: [tc.flex(), tc.gap(4), tc.flex("col")].flat(),
+ children: Array.from(Array(props.linkCount), (_, index) => ({
+ type: "instance",
+ component: "NavigationMenuLink",
+ children: [
+ {
+ type: "instance",
+ component: "Link",
+ children: [
+ {
+ type: "text",
+ value: `${props.linkPrefix} + ${index}`,
+ },
+ ],
+ },
+ ],
+ })),
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+];
+
+export const metaNavigationMenu: WsComponentMeta = {
+ category: "radix",
+ order: 2,
+ type: "container",
+ icon: HamburgerMenuIcon,
+ presetStyle,
+ presetTokens: {
+ navigationMenu: {
+ // relative
+ // Omiting this: z-10 flex max-w-max flex-1 items-center justify-center
+ styles: [tc.relative()].flat(),
+ },
+ },
+ template: [
+ {
+ type: "instance",
+ component: "NavigationMenu",
+
+ dataSources: {
+ menuValue: { type: "variable", initialValue: "" },
+ },
+ props: [
+ { type: "dataSource", name: "value", dataSourceName: "menuValue" },
+ {
+ name: "onValueChange",
+ type: "action",
+ value: [
+ {
+ type: "execute",
+ args: ["value"],
+ code: `menuValue = value`,
+ },
+ ],
+ },
+ ],
+
+ tokens: ["navigationMenu"],
+
+ children: [
+ {
+ type: "instance",
+ component: "NavigationMenuList",
+ tokens: ["navigationMenuList"],
+ children: [
+ ...menuItem({
+ title: "Item One",
+ linkCount: 5,
+ linkPrefix: "Link to page",
+ }),
+ ...menuItem({
+ title: "Item Two",
+ linkCount: 3,
+ linkPrefix: "Link to other page",
+ }),
+ ],
+ },
+
+ {
+ type: "instance",
+ component: "Box",
+ label: "Viewport Container",
+ // absolute left-0 top-full flex justify-center
+ styles: [
+ tc.absolute(),
+ tc.left(0),
+ tc.top("full"),
+ tc.flex(),
+ tc.justify("center"),
+ ].flat(),
+
+ children: [
+ {
+ type: "instance",
+ component: "NavigationMenuViewport",
+ tokens: ["navigationMenuViewport"],
+ children: [],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+};
+
+export const metaNavigationMenuList: WsComponentMeta = {
+ category: "hidden",
+ detachable: false,
+ type: "container",
+ icon: HeaderIcon,
+ requiredAncestors: ["NavigationMenu"],
+ presetStyle,
+ presetTokens: {
+ navigationMenuList: {
+ styles: [
+ // ul defaults in tailwind
+ tc.p(0),
+ tc.m(0),
+ // shadcdn styles
+ tc.flex(),
+ tc.flex(1),
+ tc.list("none"),
+ tc.items("center"),
+ tc.justify("center"),
+ tc.gap(1),
+ ].flat(),
+ },
+ },
+};
+
+export const metaNavigationMenuItem: WsComponentMeta = {
+ category: "hidden",
+ detachable: false,
+ type: "container",
+ icon: ItemIcon,
+ requiredAncestors: ["NavigationMenu"],
+ presetStyle,
+ indexWithinAncestor: "NavigationMenu",
+ // no default tokens
+};
+export const metaNavigationMenuTrigger: WsComponentMeta = {
+ category: "hidden",
+ detachable: false,
+ stylable: false,
+ type: "container",
+ icon: TriggerIcon,
+ requiredAncestors: ["NavigationMenuItem"],
+ presetStyle,
+};
+export const metaNavigationMenuContent: WsComponentMeta = {
+ category: "hidden",
+ detachable: false,
+ type: "container",
+ icon: ContentIcon,
+ requiredAncestors: ["NavigationMenuItem"],
+ indexWithinAncestor: "NavigationMenu",
+
+ presetTokens: {
+ navigationMenuContent: {
+ // left-0 top-0 absolute w-max
+ styles: [
+ tc.left(0),
+ tc.top(0),
+ tc.absolute(),
+ tc.w("max"),
+ tc.p(4),
+ ].flat(),
+ },
+ },
+
+ presetStyle,
+};
+
+export const metaNavigationMenuLink: WsComponentMeta = {
+ category: "hidden",
+ detachable: true,
+ type: "container",
+ stylable: false,
+ icon: LinkIcon,
+ requiredAncestors: ["NavigationMenuContent"],
+ presetStyle,
+};
+
+export const metaNavigationMenuViewport: WsComponentMeta = {
+ category: "hidden",
+ detachable: false,
+ type: "container",
+ icon: ExternalLinkIcon,
+ requiredAncestors: ["NavigationMenu"],
+ presetStyle,
+ presetTokens: {
+ navigationMenuViewport: {
+ /*
+ origin-top-center relative mt-1.5 w-full
+ overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg
+ h-[var(--radix-navigation-menu-viewport-height)]
+ w-[var(--radix-navigation-menu-viewport-width)]
+ // anims
+ [animation-duration:150ms!important] [transition-duration:150ms!important]
+ data-[state=open]:animate-in data-[state=closed]:animate-out
+ data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90
+ */
+ styles: [
+ tc.relative(),
+ tc.mt(1.5),
+ tc.overflow("hidden"),
+ tc.rounded("md"),
+ tc.border(),
+ tc.bg("popover"),
+ tc.text("popoverForeground"),
+ tc.shadow("lg"),
+ tc.property("height", "--radix-navigation-menu-viewport-height"),
+ tc.property("width", "--radix-navigation-menu-viewport-width"),
+ ].flat(),
+ },
+ },
+};
+
+export const propsMetaNavigationMenu: WsComponentPropsMeta = {
+ props: propsNavigationMenu,
+};
+export const propsMetaNavigationMenuItem: WsComponentPropsMeta = {
+ props: propsNavigationMenuItem,
+};
+export const propsMetaNavigationMenuTrigger: WsComponentPropsMeta = {
+ props: propsNavigationMenuTrigger,
+};
+export const propsMetaNavigationMenuContent: WsComponentPropsMeta = {
+ props: propsNavigationMenuContent,
+};
+export const propsMetaNavigationMenuLink: WsComponentPropsMeta = {
+ props: propsNavigationMenuLink,
+};
+export const propsMetaNavigationMenuList: WsComponentPropsMeta = {
+ props: propsNavigationMenuList,
+};
+export const propsMetaNavigationMenuViewport: WsComponentPropsMeta = {
+ props: propsNavigationMenuViewport,
+};
diff --git a/packages/sdk-components-react-radix/src/props.ts b/packages/sdk-components-react-radix/src/props.ts
index 18f9426a1c..df0acdf189 100644
--- a/packages/sdk-components-react-radix/src/props.ts
+++ b/packages/sdk-components-react-radix/src/props.ts
@@ -48,3 +48,13 @@ export {
propsMetaAccordionTrigger as AccordionTrigger,
propsMetaAccordionContent as AccordionContent,
} from "./accordion.ws";
+
+export {
+ propsMetaNavigationMenu as NavigationMenu,
+ propsMetaNavigationMenuList as NavigationMenuList,
+ propsMetaNavigationMenuItem as NavigationMenuItem,
+ propsMetaNavigationMenuTrigger as NavigationMenuTrigger,
+ propsMetaNavigationMenuContent as NavigationMenuContent,
+ propsMetaNavigationMenuLink as NavigationMenuLink,
+ propsMetaNavigationMenuViewport as NavigationMenuViewport,
+} from "./navigation-menu.ws";
diff --git a/packages/sdk-components-react-radix/src/theme/radix-common-types.ts b/packages/sdk-components-react-radix/src/theme/radix-common-types.ts
index 92938f5774..e2f3ccd51a 100644
--- a/packages/sdk-components-react-radix/src/theme/radix-common-types.ts
+++ b/packages/sdk-components-react-radix/src/theme/radix-common-types.ts
@@ -467,8 +467,9 @@ type DefaultTheme = {
export type EvaluatedDefaultTheme = DefaultTheme & {
padding: DefaultTheme["spacing"];
colors: typeof colors;
- width: DefaultTheme["spacing"] & Record<"full", string>;
- height: DefaultTheme["spacing"];
+ inset: DefaultTheme["spacing"] & Record<"full", string>;
+ width: DefaultTheme["spacing"] & Record<"full" | "max", string>;
+ height: DefaultTheme["spacing"] & Record<"max", string>;
margin: DefaultTheme["spacing"] & Record<"auto", string>;
maxWidth: DefaultTheme["spacing"] &
Record<
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 be717a1bf5..9bb11b12aa 100644
--- a/packages/sdk-components-react-radix/src/theme/tailwind-classes.ts
+++ b/packages/sdk-components-react-radix/src/theme/tailwind-classes.ts
@@ -369,33 +369,45 @@ export const maxW = (
const positionStyle = (
property: "left" | "right" | "top" | "bottom",
- spacing: StringEnumToNumeric<keyof EvaluatedDefaultTheme["spacing"]>
+ spacing:
+ | StringEnumToNumeric<keyof EvaluatedDefaultTheme["inset"]>
+ | NonNumeric<keyof EvaluatedDefaultTheme["inset"]>
): EmbedTemplateStyleDecl => {
const key = `${spacing}` as const;
- const valueString = theme("spacing")?.[key] ?? "0";
+ const valueString = theme("inset")?.[key] ?? "0";
const value = parseCssValue(property, valueString);
return { property, value };
};
export const top = (
- spacing: StringEnumToNumeric<keyof EvaluatedDefaultTheme["spacing"]>
+ spacing:
+ | StringEnumToNumeric<keyof EvaluatedDefaultTheme["inset"]>
+ | NonNumeric<keyof EvaluatedDefaultTheme["inset"]>
): EmbedTemplateStyleDecl[] => [positionStyle("top", spacing)];
export const right = (
- spacing: StringEnumToNumeric<keyof EvaluatedDefaultTheme["spacing"]>
+ spacing:
+ | StringEnumToNumeric<keyof EvaluatedDefaultTheme["inset"]>
+ | NonNumeric<keyof EvaluatedDefaultTheme["inset"]>
): EmbedTemplateStyleDecl[] => [positionStyle("right", spacing)];
export const bottom = (
- spacing: StringEnumToNumeric<keyof EvaluatedDefaultTheme["spacing"]>
+ spacing:
+ | StringEnumToNumeric<keyof EvaluatedDefaultTheme["inset"]>
+ | NonNumeric<keyof EvaluatedDefaultTheme["inset"]>
): EmbedTemplateStyleDecl[] => [positionStyle("bottom", spacing)];
export const left = (
- spacing: StringEnumToNumeric<keyof EvaluatedDefaultTheme["spacing"]>
+ spacing:
+ | StringEnumToNumeric<keyof EvaluatedDefaultTheme["inset"]>
+ | NonNumeric<keyof EvaluatedDefaultTheme["inset"]>
): EmbedTemplateStyleDecl[] => [positionStyle("left", spacing)];
export const inset = (
- spacing: StringEnumToNumeric<keyof EvaluatedDefaultTheme["spacing"]>
+ spacing:
+ | StringEnumToNumeric<keyof EvaluatedDefaultTheme["inset"]>
+ | NonNumeric<keyof EvaluatedDefaultTheme["inset"]>
): EmbedTemplateStyleDecl[] => [
positionStyle("left", spacing),
positionStyle("right", spacing),
@@ -415,6 +427,15 @@ export const backdropBlur = (
return [{ property: "backdropFilter", value }];
};
+export const list = (
+ listStyle: keyof EvaluatedDefaultTheme["listStyleType"]
+): EmbedTemplateStyleDecl[] => {
+ const valueString = theme("listStyleType")[listStyle];
+ const value = parseCssValue("listStyleType", valueString);
+
+ return [{ property: "listStyleType", value }];
+};
+
export const bg = (
color: keyof EvaluatedDefaultTheme["colors"],
alpha?: number
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f8b212ff0f..fd4537d74e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1377,6 +1377,9 @@ importers:
'@radix-ui/react-label':
specifier: ^2.0.2
+ '@radix-ui/react-navigation-menu':
+ specifier: ^1.1.3
'@radix-ui/react-popover':
specifier: ^1.0.6
@@ -5120,6 +5123,40 @@ packages:
react-remove-scroll: 2.5.5(@types/[email protected])([email protected])
dev: false
+ resolution: {integrity: sha512-x4Uv0N47ABx3/frJazYXxvMpZeKJe0qmRIgQ2o3lhTqnTVg+CaZfVVO4nQLn3QJcDkTz8icElKffhFng47XIBA==}
+ 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-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-dismissable-layer': 1.0.4(@types/[email protected])(@types/[email protected])([email protected])([email protected])
+ '@radix-ui/react-id': 1.0.1(@types/[email protected])([email protected])
+ '@radix-ui/react-presence': 1.0.1(@types/[email protected])(@types/[email protected])([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-callback-ref': 1.0.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.0.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.0.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-previous': 1.0.1(@types/[email protected])([email protected])
+ '@radix-ui/react-visually-hidden': 1.0.3(@types/[email protected])(@types/[email protected])([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-cZ4defGpkZ0qTRtlIBzJLSzL6ht7ofhhW4i1+pkemjV1IKXm0wgCRnee154qlV6r9Ttunmh2TNZhMfV2bavUyA==}
peerDependencies: