Skip to content

Commit

Permalink
[docs] Refine prop descriptions: positioning props and misc nits (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladmoroz authored Dec 12, 2024
1 parent ac42d11 commit f44b24d
Show file tree
Hide file tree
Showing 116 changed files with 343 additions and 321 deletions.
2 changes: 1 addition & 1 deletion docs/reference/generated/accordion-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"onOpenChange": {
"type": "(open) => void",
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/accordion-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"hiddenUntilFound": {
"type": "boolean",
Expand Down Expand Up @@ -50,7 +50,7 @@
},
"value": {
"type": "array",
"description": "The controlled value of the item(s) that should be expanded.\nTo render an controlled accordion, use the `defaultValue` prop instead."
"description": "The controlled value of the item(s) that should be expanded.\nTo render a controlled accordion, use the `defaultValue` prop instead."
}
},
"dataAttributes": {
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/alert-dialog-popup.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"finalFocus": {
"type": "React.Ref",
"description": "Determines the element to focus when the dialog is closed.\nBy default, focus returns to trigger."
"description": "Determines the element to focus when the dialog is closed.\nBy default, focus returns to the trigger."
},
"initialFocus": {
"type": "React.Ref | (interactionType => HTMLElement | null)",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/checkbox-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"onValueChange": {
"type": "(value, event) => void",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/checkbox-indicator.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"description": "Present when the checkbox indicator is animating in."
},
"data-touched": {
"description": "Present when the checkbox has been thouched (when wrapped in Field.Root)."
"description": "Present when the checkbox has been touched (when wrapped in Field.Root)."
},
"data-unchecked": {
"description": "Present when the checkbox is not checked."
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/checkbox-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"indeterminate": {
"type": "boolean",
Expand Down Expand Up @@ -79,7 +79,7 @@
"description": "Present when the checkbox is required."
},
"data-touched": {
"description": "Present when the checkbox has been thouched (when wrapped in Field.Root)."
"description": "Present when the checkbox has been touched (when wrapped in Field.Root)."
},
"data-unchecked": {
"description": "Present when the checkbox is not checked."
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/collapsible-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"onOpenChange": {
"type": "(open) => void",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/dialog-popup.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"finalFocus": {
"type": "React.Ref",
"description": "Determines the element to focus when the dialog is closed.\nBy default, focus returns to trigger."
"description": "Determines the element to focus when the dialog is closed.\nBy default, focus returns to the trigger."
},
"initialFocus": {
"type": "React.Ref | (interactionType => HTMLElement | null)",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/field-control.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"description": "Present when the field is in invalid state."
},
"data-touched": {
"description": "Present when the field has been thouched."
"description": "Present when the field has been touched."
},
"data-valid": {
"description": "Present when the field is in valid state."
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/field-description.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"description": "Present when the field is in invalid state."
},
"data-touched": {
"description": "Present when the field has been thouched."
"description": "Present when the field has been touched."
},
"data-valid": {
"description": "Present when the field is in valid state."
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/field-error.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"description": "Present when the field is in invalid state."
},
"data-touched": {
"description": "Present when the field has been thouched."
"description": "Present when the field has been touched."
},
"data-valid": {
"description": "Present when the field is in valid state."
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/field-label.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"description": "Present when the field is in invalid state."
},
"data-touched": {
"description": "Present when the field has been thouched."
"description": "Present when the field has been touched."
},
"data-valid": {
"description": "Present when the field is in valid state."
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/field-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions.\nTakes precedence over the `disabled` prop on the `<Field.Control>` component."
"description": "Whether the component should ignore user interaction.\nTakes precedence over the `disabled` prop on the `<Field.Control>` component."
},
"invalid": {
"type": "boolean",
Expand Down Expand Up @@ -46,7 +46,7 @@
"description": "Present when the field is disabled."
},
"data-touched": {
"description": "Present when the field has been thouched."
"description": "Present when the field has been touched."
}
}
}
2 changes: 1 addition & 1 deletion docs/reference/generated/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"description": "Present when the input is in invalid state."
},
"data-touched": {
"description": "Present when the input has been thouched."
"description": "Present when the input has been touched."
},
"data-valid": {
"description": "Present when the input is in valid state."
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/menu-backdrop.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"keepMounted": {
"type": "boolean",
"default": "false",
"description": "Whether to keep the HTML element in the DOM when the menu is hidden."
"description": "Whether to keep the HTML element in the DOM while the menu is hidden."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/menu-checkbox-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"id": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/menu-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"id": {
"type": "string",
Expand Down
18 changes: 9 additions & 9 deletions docs/reference/generated/menu-positioner.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
"align": {
"type": "'start' | 'center' | 'end'",
"default": "'center'",
"description": "The align of the Menu element to the anchor element along its cross axis."
"description": "How to align the popup relative to the specified side."
},
"alignOffset": {
"type": "number",
"default": "0",
"description": "The offset of the Menu element along its align axis."
"description": "Additional offset along the alignment axis of the element."
},
"anchor": {
"type": "React.Ref | Element | VirtualElement | (() => Element | VirtualElement | null) | null",
"description": "The anchor element to which the Menu popup will be placed at."
"description": "An element to position the popup against.\nBy default, the popup will be positioned against the trigger."
},
"arrowPadding": {
"type": "number",
"default": "5",
"description": "Determines the padding between the arrow and the Menu popup's edges. Useful when the popover\npopup has rounded corners via `border-radius`."
"description": "Minimum distance to maintain between the arrow and the edges of the popup.\n\nUse it to prevent the arrow element from hanging out of the rounded corners of a popup."
},
"className": {
"type": "string | (state) => string",
Expand All @@ -28,12 +28,12 @@
"collisionBoundary": {
"type": "'clippingAncestors' | Element | Element[] | Rect",
"default": "'clipping-ancestors'",
"description": "The boundary that the Menu element should be constrained to."
"description": "An element or a rectangle that delimits the area that the popup is confined to."
},
"collisionPadding": {
"type": "number | Rect",
"default": "5",
"description": "The padding of the collision boundary."
"description": "Additional space to maintain from the edge of the collision boundary."
},
"keepMounted": {
"type": "boolean",
Expand All @@ -43,7 +43,7 @@
"positionMethod": {
"type": "'absolute' | 'fixed'",
"default": "'absolute'",
"description": "The CSS position strategy for positioning the Menu popup element."
"description": "Determines which CSS `position` property to use."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
Expand All @@ -52,12 +52,12 @@
"side": {
"type": "'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top'",
"default": "'bottom'",
"description": "The side of the anchor element that the Menu element should align to."
"description": "Which side of the anchor element to align the popup against.\nMay automatically change to avoid collisions."
},
"sideOffset": {
"type": "number",
"default": "0",
"description": "The gap between the anchor element and the Menu element."
"description": "Distance between the anchor and the popup."
},
"sticky": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/menu-radio-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"id": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/menu-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"loop": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/menu-submenu-trigger.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"label": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/menu-trigger.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"label": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/number-field-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"disabled": {
"type": "boolean",
"default": "false",
"description": "Whether the component should ignore user actions."
"description": "Whether the component should ignore user interaction."
},
"format": {
"type": "Intl.NumberFormatOptions",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/generated/popover-popup.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"finalFocus": {
"type": "React.Ref",
"description": "Determines the element to focus when the popover is closed.\nBy default, focus returns to trigger."
"description": "Determines the element to focus when the popover is closed.\nBy default, focus returns to the trigger."
},
"initialFocus": {
"type": "React.Ref | (interactionType => HTMLElement | null)",
Expand Down
22 changes: 11 additions & 11 deletions docs/reference/generated/popover-positioner.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
"align": {
"type": "'start' | 'center' | 'end'",
"default": "'center'",
"description": "The align of the popover element to the anchor element along its cross axis."
"description": "How to align the popup relative to the specified side."
},
"alignOffset": {
"type": "number",
"default": "0",
"description": "The offset of the popover element along its align axis."
"description": "Additional offset along the alignment axis of the element."
},
"anchor": {
"type": "React.Ref | Element | VirtualElement | (() => Element | VirtualElement | null) | null",
"description": "The element to which the popover element is anchored to."
"description": "An element to position the popup against.\nBy default, the popup will be positioned against the trigger."
},
"arrowPadding": {
"type": "number",
"default": "5",
"description": "Determines the padding between the arrow and the popover edges. Useful when the popover\nelement has rounded corners via `border-radius`."
"description": "Minimum distance to maintain between the arrow and the edges of the popup.\n\nUse it to prevent the arrow element from hanging out of the rounded corners of a popup."
},
"className": {
"type": "string | (state) => string",
Expand All @@ -28,22 +28,22 @@
"collisionBoundary": {
"type": "'clippingAncestors' | Element | Element[] | Rect",
"default": "'clipping-ancestors'",
"description": "The boundary that the popover element should be constrained to."
"description": "An element or a rectangle that delimits the area that the popup is confined to."
},
"collisionPadding": {
"type": "number | Rect",
"default": "5",
"description": "The padding between the popover element and the edges of the collision boundary to add\nwhitespace between them to prevent them from touching."
"description": "Additional space to maintain from the edge of the collision boundary."
},
"keepMounted": {
"type": "boolean",
"default": "false",
"description": "Whether to keep the HTML element in the DOM when the popover is hidden."
"description": "Whether to keep the HTML element in the DOM while the popover is hidden."
},
"positionMethod": {
"type": "'absolute' | 'fixed'",
"default": "'absolute'",
"description": "The CSS position strategy for positioning the popover element."
"description": "Determines which CSS `position` property to use."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
Expand All @@ -52,17 +52,17 @@
"side": {
"type": "'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top'",
"default": "'bottom'",
"description": "The side of the anchor element that the popover element should be placed at."
"description": "Which side of the anchor element to align the popup against.\nMay automatically change to avoid collisions."
},
"sideOffset": {
"type": "number",
"default": "0",
"description": "The gap between the anchor element and the popover element."
"description": "Distance between the anchor and the popup."
},
"sticky": {
"type": "boolean",
"default": "false",
"description": "Whether to allow the popover to remain stuck in view while the anchor element is scrolled out\nof view."
"description": "Whether to maintain the popup in the viewport after\nthe anchor element is scrolled out of view."
}
},
"cssVariables": {
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/portal.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Portal",
"description": "A portal element that moves the popup to a different part of the DOM.\nBy default, the portal element is appended to the `<body>`.",
"description": "A portal element that moves the popup to a different part of the DOM.\nBy default, the portal element is appended to `<body>`.",
"props": {
"container": {
"type": "React.Ref | HTMLElement | null",
Expand All @@ -9,7 +9,7 @@
"keepMounted": {
"type": "boolean",
"default": "false",
"description": "Whether to keep the portal mounted in the DOM when the popup is hidden."
"description": "Whether to keep the portal mounted in the DOM while the popup is hidden."
}
}
}
Loading

0 comments on commit f44b24d

Please sign in to comment.