From c2a8483e869b6413b5101db048c9c84615e7d7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 15 Nov 2024 11:32:47 +0100 Subject: [PATCH] [docs] Add missing API definition files for Select (#822) --- docs/reference/generated/select-arrow.json | 19 +++++ docs/reference/generated/select-backdrop.json | 24 ++++++ .../generated/select-group-label.json | 14 ++++ docs/reference/generated/select-group.json | 14 ++++ docs/reference/generated/select-icon.json | 14 ++++ .../generated/select-option-indicator.json | 19 +++++ .../generated/select-option-text.json | 5 ++ docs/reference/generated/select-option.json | 20 +++++ docs/reference/generated/select-popup.json | 18 +++++ .../generated/select-positioner.json | 77 +++++++++++++++++++ docs/reference/generated/select-root.json | 61 +++++++++++++++ .../generated/select-scroll-down-arrow.json | 11 +++ .../generated/select-scroll-up-arrow.json | 11 +++ docs/reference/generated/select-trigger.json | 28 +++++++ docs/reference/generated/select-value.json | 18 +++++ 15 files changed, 353 insertions(+) create mode 100644 docs/reference/generated/select-arrow.json create mode 100644 docs/reference/generated/select-backdrop.json create mode 100644 docs/reference/generated/select-group-label.json create mode 100644 docs/reference/generated/select-group.json create mode 100644 docs/reference/generated/select-icon.json create mode 100644 docs/reference/generated/select-option-indicator.json create mode 100644 docs/reference/generated/select-option-text.json create mode 100644 docs/reference/generated/select-option.json create mode 100644 docs/reference/generated/select-popup.json create mode 100644 docs/reference/generated/select-positioner.json create mode 100644 docs/reference/generated/select-root.json create mode 100644 docs/reference/generated/select-scroll-down-arrow.json create mode 100644 docs/reference/generated/select-scroll-up-arrow.json create mode 100644 docs/reference/generated/select-trigger.json create mode 100644 docs/reference/generated/select-value.json diff --git a/docs/reference/generated/select-arrow.json b/docs/reference/generated/select-arrow.json new file mode 100644 index 0000000000..bc1d46efd2 --- /dev/null +++ b/docs/reference/generated/select-arrow.json @@ -0,0 +1,19 @@ +{ + "name": "SelectArrow", + "description": "", + "props": { + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "hideWhenUncentered": { + "type": "boolean", + "default": "false", + "description": "If `true`, the arrow is hidden when it can't point to the center of the anchor element." + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + } + } +} diff --git a/docs/reference/generated/select-backdrop.json b/docs/reference/generated/select-backdrop.json new file mode 100644 index 0000000000..a90d3453d2 --- /dev/null +++ b/docs/reference/generated/select-backdrop.json @@ -0,0 +1,24 @@ +{ + "name": "SelectBackdrop", + "description": "", + "props": { + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "container": { + "type": "React.Ref | HTMLElement | null", + "default": "false", + "description": "The container element to which the Backdrop is appended to." + }, + "keepMounted": { + "type": "boolean", + "default": "false", + "description": "If `true`, the Backdrop remains mounted when the Select popup is closed." + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + } + } +} diff --git a/docs/reference/generated/select-group-label.json b/docs/reference/generated/select-group-label.json new file mode 100644 index 0000000000..206636b1be --- /dev/null +++ b/docs/reference/generated/select-group-label.json @@ -0,0 +1,14 @@ +{ + "name": "SelectGroupLabel", + "description": "", + "props": { + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + } + } +} diff --git a/docs/reference/generated/select-group.json b/docs/reference/generated/select-group.json new file mode 100644 index 0000000000..45137972ba --- /dev/null +++ b/docs/reference/generated/select-group.json @@ -0,0 +1,14 @@ +{ + "name": "SelectGroup", + "description": "", + "props": { + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + } + } +} diff --git a/docs/reference/generated/select-icon.json b/docs/reference/generated/select-icon.json new file mode 100644 index 0000000000..cc45a1789a --- /dev/null +++ b/docs/reference/generated/select-icon.json @@ -0,0 +1,14 @@ +{ + "name": "SelectIcon", + "description": "", + "props": { + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + } + } +} diff --git a/docs/reference/generated/select-option-indicator.json b/docs/reference/generated/select-option-indicator.json new file mode 100644 index 0000000000..fca900b096 --- /dev/null +++ b/docs/reference/generated/select-option-indicator.json @@ -0,0 +1,19 @@ +{ + "name": "SelectOptionIndicator", + "description": "", + "props": { + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "keepMounted": { + "type": "boolean", + "default": "false", + "description": "If `true`, the item indicator remains mounted when the item is not\nselected." + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + } + } +} diff --git a/docs/reference/generated/select-option-text.json b/docs/reference/generated/select-option-text.json new file mode 100644 index 0000000000..154388a990 --- /dev/null +++ b/docs/reference/generated/select-option-text.json @@ -0,0 +1,5 @@ +{ + "name": "SelectOptionText", + "description": "", + "props": {} +} diff --git a/docs/reference/generated/select-option.json b/docs/reference/generated/select-option.json new file mode 100644 index 0000000000..ed2e0c9116 --- /dev/null +++ b/docs/reference/generated/select-option.json @@ -0,0 +1,20 @@ +{ + "name": "SelectOption", + "description": "", + "props": { + "disabled": { + "type": "boolean", + "default": "false", + "description": "If `true`, the select option will be disabled." + }, + "label": { + "type": "string", + "description": "A text representation of the select option's content.\nUsed for keyboard text navigation matching." + }, + "value": { + "type": "any", + "default": "null", + "description": "The value of the select option." + } + } +} diff --git a/docs/reference/generated/select-popup.json b/docs/reference/generated/select-popup.json new file mode 100644 index 0000000000..81eb4dde51 --- /dev/null +++ b/docs/reference/generated/select-popup.json @@ -0,0 +1,18 @@ +{ + "name": "SelectPopup", + "description": "", + "props": { + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "id": { + "type": "string", + "description": "The id of the popup element." + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + } + } +} diff --git a/docs/reference/generated/select-positioner.json b/docs/reference/generated/select-positioner.json new file mode 100644 index 0000000000..9f26988621 --- /dev/null +++ b/docs/reference/generated/select-positioner.json @@ -0,0 +1,77 @@ +{ + "name": "SelectPositioner", + "description": "", + "props": { + "alignment": { + "type": "'start' | 'center' | 'end'", + "default": "'start'", + "description": "The alignment of the Select element to the anchor element along its cross axis." + }, + "alignmentOffset": { + "type": "number", + "default": "0", + "description": "The offset of the Select element along its alignment axis." + }, + "anchor": { + "type": "React.Ref | Element | VirtualElement | (() => Element | VirtualElement | null) | null", + "description": "The anchor element to which the Select popup will be placed at." + }, + "arrowPadding": { + "type": "number", + "default": "5", + "description": "Determines the padding between the arrow and the Select popup's edges. Useful when the popover\npopup has rounded corners via `border-radius`." + }, + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "collisionBoundary": { + "type": "'clippingAncestors' | Element | Element[] | Rect", + "default": "'clippingAncestors'", + "description": "The boundary that the Select element should be constrained to." + }, + "collisionPadding": { + "type": "number | Rect", + "default": "5", + "description": "The padding of the collision boundary." + }, + "container": { + "type": "React.Ref | HTMLElement | null", + "description": "The container element to which the Select popup will be appended to." + }, + "hideWhenDetached": { + "type": "boolean", + "default": "false", + "description": "If `true`, the Select will be hidden if it is detached from its anchor element due to\ndiffering clipping contexts." + }, + "positionMethod": { + "type": "'absolute' | 'fixed'", + "default": "'absolute'", + "description": "The CSS position method for positioning the Select popup element." + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + }, + "side": { + "type": "'top' | 'bottom' | 'left' | 'right'", + "default": "'bottom'", + "description": "The side of the anchor element that the Select element should align to." + }, + "sideOffset": { + "type": "number", + "default": "0", + "description": "The gap between the anchor element and the Select element." + }, + "sticky": { + "type": "boolean", + "default": "false", + "description": "If `true`, allow the Select to remain in stuck view while the anchor element is scrolled out\nof view." + }, + "trackAnchor": { + "type": "boolean", + "default": "true", + "description": "Whether the select popup continuously tracks its anchor after the initial positioning upon mount." + } + } +} diff --git a/docs/reference/generated/select-root.json b/docs/reference/generated/select-root.json new file mode 100644 index 0000000000..cb26d3dfdf --- /dev/null +++ b/docs/reference/generated/select-root.json @@ -0,0 +1,61 @@ +{ + "name": "SelectRoot", + "description": "", + "props": { + "alignOptionToTrigger": { + "type": "boolean", + "default": "true", + "description": "Determines if the selected option inside the popup should align to the trigger element." + }, + "animated": { + "type": "boolean", + "default": "true", + "description": "If `true`, the Select supports CSS-based animations and transitions.\nIt is kept in the DOM until the animation completes." + }, + "defaultOpen": { + "type": "boolean", + "default": "false", + "description": "If `true`, the Select is initially open." + }, + "defaultValue": { + "type": "any", + "default": "null", + "description": "The default value of the select." + }, + "disabled": { + "type": "boolean", + "default": "false", + "description": "If `true`, the Select is disabled." + }, + "name": { + "type": "string", + "description": "The name of the Select in the owning form." + }, + "onOpenChange": { + "type": "function", + "description": "Callback fired when the component requests to be opened or closed." + }, + "onValueChange": { + "type": "function", + "description": "Callback fired when the value of the select changes. Use when controlled." + }, + "open": { + "type": "boolean", + "description": "Allows to control whether the dropdown is open.\nThis is a controlled counterpart of `defaultOpen`." + }, + "readOnly": { + "type": "boolean", + "default": "false", + "description": "If `true`, the Select is read-only." + }, + "required": { + "type": "boolean", + "default": "false", + "description": "If `true`, the Select is required." + }, + "value": { + "type": "any", + "description": "The value of the select." + } + } +} diff --git a/docs/reference/generated/select-scroll-down-arrow.json b/docs/reference/generated/select-scroll-down-arrow.json new file mode 100644 index 0000000000..5bd4ed803c --- /dev/null +++ b/docs/reference/generated/select-scroll-down-arrow.json @@ -0,0 +1,11 @@ +{ + "name": "SelectScrollDownArrow", + "description": "", + "props": { + "keepMounted": { + "type": "boolean", + "default": "false", + "description": "Whether the component should be kept mounted when it is not rendered." + } + } +} diff --git a/docs/reference/generated/select-scroll-up-arrow.json b/docs/reference/generated/select-scroll-up-arrow.json new file mode 100644 index 0000000000..6a28db98e3 --- /dev/null +++ b/docs/reference/generated/select-scroll-up-arrow.json @@ -0,0 +1,11 @@ +{ + "name": "SelectScrollUpArrow", + "description": "", + "props": { + "keepMounted": { + "type": "boolean", + "default": "false", + "description": "Whether the component should be kept mounted when it is not rendered." + } + } +} diff --git a/docs/reference/generated/select-trigger.json b/docs/reference/generated/select-trigger.json new file mode 100644 index 0000000000..24a9b98b9e --- /dev/null +++ b/docs/reference/generated/select-trigger.json @@ -0,0 +1,28 @@ +{ + "name": "SelectTrigger", + "description": "", + "props": { + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "disabled": { + "type": "boolean", + "default": "false", + "description": "If `true`, the component is disabled." + }, + "focusableWhenDisabled": { + "type": "boolean", + "default": "false", + "description": "If `true`, allows a disabled button to receive focus." + }, + "label": { + "type": "string", + "description": "Label of the button" + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + } + } +} diff --git a/docs/reference/generated/select-value.json b/docs/reference/generated/select-value.json new file mode 100644 index 0000000000..6874711e88 --- /dev/null +++ b/docs/reference/generated/select-value.json @@ -0,0 +1,18 @@ +{ + "name": "SelectValue", + "description": "", + "props": { + "className": { + "type": "string | (state) => string", + "description": "Class names applied to the element or a function that returns them based on the component's state." + }, + "placeholder": { + "type": "string", + "description": "The placeholder value to display when the value is empty (such as during SSR)." + }, + "render": { + "type": "React.ReactElement | (props, state) => React.ReactElement", + "description": "A function to customize rendering of the component." + } + } +}