Skip to content

Commit

Permalink
[docs] Add missing API definition files for Select (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak authored Nov 15, 2024
1 parent c3d06db commit c2a8483
Show file tree
Hide file tree
Showing 15 changed files with 353 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/reference/generated/select-arrow.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
24 changes: 24 additions & 0 deletions docs/reference/generated/select-backdrop.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
14 changes: 14 additions & 0 deletions docs/reference/generated/select-group-label.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
14 changes: 14 additions & 0 deletions docs/reference/generated/select-group.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
14 changes: 14 additions & 0 deletions docs/reference/generated/select-icon.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
19 changes: 19 additions & 0 deletions docs/reference/generated/select-option-indicator.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
5 changes: 5 additions & 0 deletions docs/reference/generated/select-option-text.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "SelectOptionText",
"description": "",
"props": {}
}
20 changes: 20 additions & 0 deletions docs/reference/generated/select-option.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
18 changes: 18 additions & 0 deletions docs/reference/generated/select-popup.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
77 changes: 77 additions & 0 deletions docs/reference/generated/select-positioner.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
61 changes: 61 additions & 0 deletions docs/reference/generated/select-root.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
11 changes: 11 additions & 0 deletions docs/reference/generated/select-scroll-down-arrow.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
11 changes: 11 additions & 0 deletions docs/reference/generated/select-scroll-up-arrow.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
28 changes: 28 additions & 0 deletions docs/reference/generated/select-trigger.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
18 changes: 18 additions & 0 deletions docs/reference/generated/select-value.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}

0 comments on commit c2a8483

Please sign in to comment.