-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Add missing API definition files for Select (#822)
- Loading branch information
1 parent
c3d06db
commit c2a8483
Showing
15 changed files
with
353 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "SelectOptionText", | ||
"description": "", | ||
"props": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
} | ||
} |