diff --git a/docs/reference/generated/accordion-item.json b/docs/reference/generated/accordion-item.json index 5df374b8f1..72f6ded859 100644 --- a/docs/reference/generated/accordion-item.json +++ b/docs/reference/generated/accordion-item.json @@ -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", diff --git a/docs/reference/generated/accordion-root.json b/docs/reference/generated/accordion-root.json index bbae62e20a..54cc7da836 100644 --- a/docs/reference/generated/accordion-root.json +++ b/docs/reference/generated/accordion-root.json @@ -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", @@ -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": { diff --git a/docs/reference/generated/alert-dialog-popup.json b/docs/reference/generated/alert-dialog-popup.json index 1898017325..a63a90fad7 100644 --- a/docs/reference/generated/alert-dialog-popup.json +++ b/docs/reference/generated/alert-dialog-popup.json @@ -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)", diff --git a/docs/reference/generated/checkbox-group.json b/docs/reference/generated/checkbox-group.json index ae7c0888bc..0ba1b0d03b 100644 --- a/docs/reference/generated/checkbox-group.json +++ b/docs/reference/generated/checkbox-group.json @@ -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", diff --git a/docs/reference/generated/checkbox-indicator.json b/docs/reference/generated/checkbox-indicator.json index 8f8ad72831..6a6ce37bb9 100644 --- a/docs/reference/generated/checkbox-indicator.json +++ b/docs/reference/generated/checkbox-indicator.json @@ -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." diff --git a/docs/reference/generated/checkbox-root.json b/docs/reference/generated/checkbox-root.json index 75d1775663..bb48da0c0f 100644 --- a/docs/reference/generated/checkbox-root.json +++ b/docs/reference/generated/checkbox-root.json @@ -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", @@ -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." diff --git a/docs/reference/generated/collapsible-root.json b/docs/reference/generated/collapsible-root.json index 33adb7ffac..31b22e6527 100644 --- a/docs/reference/generated/collapsible-root.json +++ b/docs/reference/generated/collapsible-root.json @@ -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", diff --git a/docs/reference/generated/dialog-popup.json b/docs/reference/generated/dialog-popup.json index 100eb9d821..0d0c1452d6 100644 --- a/docs/reference/generated/dialog-popup.json +++ b/docs/reference/generated/dialog-popup.json @@ -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)", diff --git a/docs/reference/generated/field-control.json b/docs/reference/generated/field-control.json index 564f35f9f0..d83afa872c 100644 --- a/docs/reference/generated/field-control.json +++ b/docs/reference/generated/field-control.json @@ -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." diff --git a/docs/reference/generated/field-description.json b/docs/reference/generated/field-description.json index 313a107eb4..3b34e76ccb 100644 --- a/docs/reference/generated/field-description.json +++ b/docs/reference/generated/field-description.json @@ -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." diff --git a/docs/reference/generated/field-error.json b/docs/reference/generated/field-error.json index 271ebfe649..a34fa76217 100644 --- a/docs/reference/generated/field-error.json +++ b/docs/reference/generated/field-error.json @@ -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." diff --git a/docs/reference/generated/field-label.json b/docs/reference/generated/field-label.json index 218c694a6b..a5d3b3fcfe 100644 --- a/docs/reference/generated/field-label.json +++ b/docs/reference/generated/field-label.json @@ -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." diff --git a/docs/reference/generated/field-root.json b/docs/reference/generated/field-root.json index a0e977fa0b..ca74f02503 100644 --- a/docs/reference/generated/field-root.json +++ b/docs/reference/generated/field-root.json @@ -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 `` component." + "description": "Whether the component should ignore user interaction.\nTakes precedence over the `disabled` prop on the `` component." }, "invalid": { "type": "boolean", @@ -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." } } } diff --git a/docs/reference/generated/input.json b/docs/reference/generated/input.json index 6f4649c1f1..8ee90b5bb1 100644 --- a/docs/reference/generated/input.json +++ b/docs/reference/generated/input.json @@ -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." diff --git a/docs/reference/generated/menu-backdrop.json b/docs/reference/generated/menu-backdrop.json index 5a27418d9b..d29e23118d 100644 --- a/docs/reference/generated/menu-backdrop.json +++ b/docs/reference/generated/menu-backdrop.json @@ -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", diff --git a/docs/reference/generated/menu-checkbox-item.json b/docs/reference/generated/menu-checkbox-item.json index 52a7fede81..978d9b297a 100644 --- a/docs/reference/generated/menu-checkbox-item.json +++ b/docs/reference/generated/menu-checkbox-item.json @@ -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", diff --git a/docs/reference/generated/menu-item.json b/docs/reference/generated/menu-item.json index 104296d359..b439a2655f 100644 --- a/docs/reference/generated/menu-item.json +++ b/docs/reference/generated/menu-item.json @@ -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", diff --git a/docs/reference/generated/menu-positioner.json b/docs/reference/generated/menu-positioner.json index 5d2b115c70..705c72fcb1 100644 --- a/docs/reference/generated/menu-positioner.json +++ b/docs/reference/generated/menu-positioner.json @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/docs/reference/generated/menu-radio-item.json b/docs/reference/generated/menu-radio-item.json index a088f08d9c..5c2e03c817 100644 --- a/docs/reference/generated/menu-radio-item.json +++ b/docs/reference/generated/menu-radio-item.json @@ -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", diff --git a/docs/reference/generated/menu-root.json b/docs/reference/generated/menu-root.json index 3db758783f..3e4ef0a4f9 100644 --- a/docs/reference/generated/menu-root.json +++ b/docs/reference/generated/menu-root.json @@ -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", diff --git a/docs/reference/generated/menu-submenu-trigger.json b/docs/reference/generated/menu-submenu-trigger.json index 8fcc96d0ac..29d63f8cb4 100644 --- a/docs/reference/generated/menu-submenu-trigger.json +++ b/docs/reference/generated/menu-submenu-trigger.json @@ -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", diff --git a/docs/reference/generated/menu-trigger.json b/docs/reference/generated/menu-trigger.json index 20e509a26f..d0c261519c 100644 --- a/docs/reference/generated/menu-trigger.json +++ b/docs/reference/generated/menu-trigger.json @@ -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", diff --git a/docs/reference/generated/number-field-root.json b/docs/reference/generated/number-field-root.json index e225242573..d5dc8929cd 100644 --- a/docs/reference/generated/number-field-root.json +++ b/docs/reference/generated/number-field-root.json @@ -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", diff --git a/docs/reference/generated/popover-popup.json b/docs/reference/generated/popover-popup.json index 87ca7825bf..eeb3fbfdab 100644 --- a/docs/reference/generated/popover-popup.json +++ b/docs/reference/generated/popover-popup.json @@ -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)", diff --git a/docs/reference/generated/popover-positioner.json b/docs/reference/generated/popover-positioner.json index 3ae0c7c2a3..15f8982feb 100644 --- a/docs/reference/generated/popover-positioner.json +++ b/docs/reference/generated/popover-positioner.json @@ -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", @@ -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", @@ -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": { diff --git a/docs/reference/generated/portal.json b/docs/reference/generated/portal.json index 1fd7dbb790..26e63adfbf 100644 --- a/docs/reference/generated/portal.json +++ b/docs/reference/generated/portal.json @@ -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 ``.", + "description": "A portal element that moves the popup to a different part of the DOM.\nBy default, the portal element is appended to ``.", "props": { "container": { "type": "React.Ref | HTMLElement | null", @@ -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." } } } diff --git a/docs/reference/generated/preview-card-positioner.json b/docs/reference/generated/preview-card-positioner.json index 947d758a27..db65a39d57 100644 --- a/docs/reference/generated/preview-card-positioner.json +++ b/docs/reference/generated/preview-card-positioner.json @@ -5,21 +5,21 @@ "align": { "type": "'start' | 'center' | 'end'", "default": "'center'", - "description": "The align of the preview card 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 preview card 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 preview card 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 preview card popup's edges. Useful when the\npreview card popup 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", @@ -28,12 +28,12 @@ "collisionBoundary": { "type": "'clippingAncestors' | Element | Element[] | Rect", "default": "'clipping-ancestors'", - "description": "The boundary that the preview card 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", @@ -43,7 +43,7 @@ "positionMethod": { "type": "'absolute' | 'fixed'", "default": "'absolute'", - "description": "The CSS position strategy for positioning the preview card popup element." + "description": "Determines which CSS `position` property to use." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", @@ -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 preview card 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 preview card element." + "description": "Distance between the anchor and the popup." }, "sticky": { "type": "boolean", diff --git a/docs/reference/generated/radio-group.json b/docs/reference/generated/radio-group.json index d6bf1b49a2..23e57b5a8a 100644 --- a/docs/reference/generated/radio-group.json +++ b/docs/reference/generated/radio-group.json @@ -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." }, "name": { "type": "string", diff --git a/docs/reference/generated/radio-root.json b/docs/reference/generated/radio-root.json index 97fcc57687..dca6b2eeaa 100644 --- a/docs/reference/generated/radio-root.json +++ b/docs/reference/generated/radio-root.json @@ -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." }, "readOnly": { "type": "boolean", diff --git a/docs/reference/generated/select-item.json b/docs/reference/generated/select-item.json index 1328d30317..906f558169 100644 --- a/docs/reference/generated/select-item.json +++ b/docs/reference/generated/select-item.json @@ -5,7 +5,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", diff --git a/docs/reference/generated/select-portal.json b/docs/reference/generated/select-portal.json index 83ef8a0768..8ab40ed905 100644 --- a/docs/reference/generated/select-portal.json +++ b/docs/reference/generated/select-portal.json @@ -1,6 +1,6 @@ { "name": "SelectPortal", - "description": "A portal element that moves the popup to a different part of the DOM.\nBy default, the portal element is appended to the ``.", + "description": "A portal element that moves the popup to a different part of the DOM.\nBy default, the portal element is appended to ``.", "props": { "container": { "type": "React.Ref | HTMLElement | null", diff --git a/docs/reference/generated/select-positioner.json b/docs/reference/generated/select-positioner.json index 609c442f0f..1209b82b3c 100644 --- a/docs/reference/generated/select-positioner.json +++ b/docs/reference/generated/select-positioner.json @@ -5,21 +5,21 @@ "align": { "type": "'start' | 'center' | 'end'", "default": "'start'", - "description": "The align of the Select 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 Select 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 Select 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 Select 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", @@ -28,12 +28,12 @@ "collisionBoundary": { "type": "'clippingAncestors' | Element | Element[] | Rect", "default": "'clipping-ancestors'", - "description": "The boundary that the Select 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." }, "positionMethod": { "type": "'absolute' | 'fixed'", @@ -47,12 +47,12 @@ "side": { "type": "'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top'", "default": "'bottom'", - "description": "The side of the anchor element that the Select 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 Select element." + "description": "Distance between the anchor and the popup." }, "sticky": { "type": "boolean", diff --git a/docs/reference/generated/select-root.json b/docs/reference/generated/select-root.json index a9668fb97b..ecacc295cc 100644 --- a/docs/reference/generated/select-root.json +++ b/docs/reference/generated/select-root.json @@ -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." }, "name": { "type": "string", diff --git a/docs/reference/generated/select-trigger.json b/docs/reference/generated/select-trigger.json index 31bc61d0b2..98342f7919 100644 --- a/docs/reference/generated/select-trigger.json +++ b/docs/reference/generated/select-trigger.json @@ -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", diff --git a/docs/reference/generated/slider-root.json b/docs/reference/generated/slider-root.json index eb0ed9a0eb..53dfe629a3 100644 --- a/docs/reference/generated/slider-root.json +++ b/docs/reference/generated/slider-root.json @@ -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." }, "largeStep": { "type": "number", diff --git a/docs/reference/generated/switch-root.json b/docs/reference/generated/switch-root.json index 0a627623da..fd93055b26 100644 --- a/docs/reference/generated/switch-root.json +++ b/docs/reference/generated/switch-root.json @@ -18,7 +18,7 @@ "disabled": { "type": "boolean", "default": "false", - "description": "Whether the component should ignore user actions." + "description": "Whether the component should ignore user interaction." }, "inputRef": { "type": "React.Ref", diff --git a/docs/reference/generated/toggle-group.json b/docs/reference/generated/toggle-group.json index ce075710b1..7186974bb2 100644 --- a/docs/reference/generated/toggle-group.json +++ b/docs/reference/generated/toggle-group.json @@ -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." }, "loop": { "type": "boolean", diff --git a/docs/reference/generated/toggle.json b/docs/reference/generated/toggle.json index fcfb1aa913..8d124016d7 100644 --- a/docs/reference/generated/toggle.json +++ b/docs/reference/generated/toggle.json @@ -22,7 +22,7 @@ "disabled": { "type": "boolean", "default": "false", - "description": "Whether the component should ignore user actions." + "description": "Whether the component should ignore user interaction." }, "onPressedChange": { "type": "function(pressed: boolean, event: Event) => void", diff --git a/docs/reference/generated/tooltip-positioner.json b/docs/reference/generated/tooltip-positioner.json index 86836e0fc3..e18d242a6d 100644 --- a/docs/reference/generated/tooltip-positioner.json +++ b/docs/reference/generated/tooltip-positioner.json @@ -5,21 +5,21 @@ "align": { "type": "'start' | 'center' | 'end'", "default": "'center'", - "description": "The align of the tooltip 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 tooltip 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 tooltip 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 tooltip edges. Useful when the tooltip\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", @@ -28,12 +28,12 @@ "collisionBoundary": { "type": "'clippingAncestors' | Element | Element[] | Rect", "default": "'clipping-ancestors'", - "description": "The boundary that the tooltip 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 tooltip 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", @@ -43,7 +43,7 @@ "positionMethod": { "type": "'absolute' | 'fixed'", "default": "'absolute'", - "description": "The CSS position strategy for positioning the tooltip element." + "description": "Determines which CSS `position` property to use." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", @@ -52,17 +52,17 @@ "side": { "type": "'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top'", "default": "'top'", - "description": "The side of the anchor element that the tooltip 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 tooltip element." + "description": "Distance between the anchor and the popup." }, "sticky": { "type": "boolean", "default": "false", - "description": "Whether to allow the tooltip 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 was scrolled out of view." } }, "cssVariables": { diff --git a/docs/reference/generated/tooltip-provider.json b/docs/reference/generated/tooltip-provider.json index 6e7c40bf82..1d8b7a47ae 100644 --- a/docs/reference/generated/tooltip-provider.json +++ b/docs/reference/generated/tooltip-provider.json @@ -4,16 +4,16 @@ "props": { "closeDelay": { "type": "number", - "description": "The delay in milliseconds until tooltips within the group are closed." + "description": "How long to wait before closing a tooltip. Specified in milliseconds." }, "delay": { "type": "number", - "description": "The delay in milliseconds until tooltips within the group are open." + "description": "How long to wait before opening a tooltip. Specified in milliseconds." }, "timeout": { "type": "number", "default": "400", - "description": "The timeout in milliseconds until the grouping logic is no longer active after the last tooltip\nin the group has closed." + "description": "Another tooltip will open instantly if the previous tooltip\nis closed within this timeout. Specified in milliseconds." } } } diff --git a/docs/reference/generated/tooltip-root.json b/docs/reference/generated/tooltip-root.json index c1ad32ed75..12d7f6478e 100644 --- a/docs/reference/generated/tooltip-root.json +++ b/docs/reference/generated/tooltip-root.json @@ -20,7 +20,7 @@ "hoverable": { "type": "boolean", "default": "true", - "description": "Whether the user can move their cursor from the trigger element toward the tooltip popup element\nwithout it closing using a \"safe polygon\" technique." + "description": "Whether the tooltip contents can be hovered without closing the tooltip." }, "onOpenChange": { "type": "(open, event, reason) => void", diff --git a/docs/src/components/reference/ReferenceTablePopover.tsx b/docs/src/components/reference/ReferenceTablePopover.tsx index 06cf8f3476..88175a1e10 100644 --- a/docs/src/components/reference/ReferenceTablePopover.tsx +++ b/docs/src/components/reference/ReferenceTablePopover.tsx @@ -33,7 +33,7 @@ export function ReferenceTablePopover({ children }: React.PropsWithChildren) { collisionPadding={16} > }> -
{children}
+
{children}
diff --git a/docs/src/syntax-highlighting/index.css b/docs/src/syntax-highlighting/index.css index e7a4ef1c2a..f1e776619e 100644 --- a/docs/src/syntax-highlighting/index.css +++ b/docs/src/syntax-highlighting/index.css @@ -24,6 +24,4 @@ --syntax-entity: var(--color-blue); --syntax-parameter: var(--color-blue); --syntax-variable: var(--color-blue); - --syntax-keyword: var(--color-blue); - --syntax-string: var(--color-blue); } diff --git a/packages/react/src/accordion/item/AccordionItem.tsx b/packages/react/src/accordion/item/AccordionItem.tsx index c20be5837d..da61d1d6e7 100644 --- a/packages/react/src/accordion/item/AccordionItem.tsx +++ b/packages/react/src/accordion/item/AccordionItem.tsx @@ -166,7 +166,7 @@ AccordionItem.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/accordion/root/AccordionRoot.tsx b/packages/react/src/accordion/root/AccordionRoot.tsx index 9396967dc0..aa488e5c47 100644 --- a/packages/react/src/accordion/root/AccordionRoot.tsx +++ b/packages/react/src/accordion/root/AccordionRoot.tsx @@ -118,7 +118,7 @@ export namespace AccordionRoot { export interface State { value: AccordionValue; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; orientation: AccordionOrientation; @@ -177,7 +177,7 @@ AccordionRoot.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.array, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, @@ -226,7 +226,7 @@ AccordionRoot.propTypes /* remove-proptypes */ = { render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** * The controlled value of the item(s) that should be expanded. - * To render an controlled accordion, use the `defaultValue` prop instead. + * To render a controlled accordion, use the `defaultValue` prop instead. */ value: PropTypes.array, } as any; diff --git a/packages/react/src/accordion/root/useAccordionRoot.ts b/packages/react/src/accordion/root/useAccordionRoot.ts index 40ad814036..3671ec86a1 100644 --- a/packages/react/src/accordion/root/useAccordionRoot.ts +++ b/packages/react/src/accordion/root/useAccordionRoot.ts @@ -188,7 +188,7 @@ export namespace useAccordionRoot { export interface Parameters { /** * The controlled value of the item(s) that should be expanded. - * To render an controlled accordion, use the `defaultValue` prop instead. + * To render a controlled accordion, use the `defaultValue` prop instead. */ value?: AccordionValue; /** @@ -197,7 +197,7 @@ export namespace useAccordionRoot { */ defaultValue?: AccordionValue; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: boolean; @@ -233,7 +233,7 @@ export namespace useAccordionRoot { accordionItemRefs: React.RefObject<(HTMLElement | null)[]>; direction: Direction; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; handleValueChange: (value: number | string, nextOpen: boolean) => void; diff --git a/packages/react/src/alert-dialog/popup/AlertDialogPopup.tsx b/packages/react/src/alert-dialog/popup/AlertDialogPopup.tsx index b67c7fee2e..137695bfea 100644 --- a/packages/react/src/alert-dialog/popup/AlertDialogPopup.tsx +++ b/packages/react/src/alert-dialog/popup/AlertDialogPopup.tsx @@ -123,7 +123,7 @@ namespace AlertDialogPopup { | ((interactionType: InteractionType) => React.RefObject); /** * Determines the element to focus when the dialog is closed. - * By default, focus returns to trigger. + * By default, focus returns to the trigger. */ finalFocus?: React.RefObject; } @@ -154,7 +154,7 @@ AlertDialogPopup.propTypes /* remove-proptypes */ = { className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** * Determines the element to focus when the dialog is closed. - * By default, focus returns to trigger. + * By default, focus returns to the trigger. */ finalFocus: refType, /** diff --git a/packages/react/src/checkbox-group/CheckboxGroup.tsx b/packages/react/src/checkbox-group/CheckboxGroup.tsx index 8e7d51846c..3cad7a92ca 100644 --- a/packages/react/src/checkbox-group/CheckboxGroup.tsx +++ b/packages/react/src/checkbox-group/CheckboxGroup.tsx @@ -77,7 +77,7 @@ const CheckboxGroup = React.forwardRef(function CheckboxGroup( namespace CheckboxGroup { export interface State extends FieldRoot.State { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; } @@ -100,7 +100,7 @@ namespace CheckboxGroup { */ allValues?: string[]; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -130,7 +130,7 @@ CheckboxGroup.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.arrayOf(PropTypes.string), /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/checkbox/indicator/CheckboxIndicatorDataAttributes.ts b/packages/react/src/checkbox/indicator/CheckboxIndicatorDataAttributes.ts index 5dc42b2ae0..d35a3b0401 100644 --- a/packages/react/src/checkbox/indicator/CheckboxIndicatorDataAttributes.ts +++ b/packages/react/src/checkbox/indicator/CheckboxIndicatorDataAttributes.ts @@ -36,7 +36,7 @@ export enum CheckboxIndicatorDataAttributes { */ invalid = 'data-invalid', /** - * Present when the checkbox has been thouched (when wrapped in Field.Root). + * Present when the checkbox has been touched (when wrapped in Field.Root). */ touched = 'data-touched', /** diff --git a/packages/react/src/checkbox/root/CheckboxRoot.tsx b/packages/react/src/checkbox/root/CheckboxRoot.tsx index daaf53c573..70245f2772 100644 --- a/packages/react/src/checkbox/root/CheckboxRoot.tsx +++ b/packages/react/src/checkbox/root/CheckboxRoot.tsx @@ -119,7 +119,7 @@ namespace CheckboxRoot { */ checked: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** @@ -169,7 +169,7 @@ CheckboxRoot.propTypes /* remove-proptypes */ = { */ defaultChecked: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/checkbox/root/CheckboxRootDataAttributes.ts b/packages/react/src/checkbox/root/CheckboxRootDataAttributes.ts index c374a32b06..42c9ac879d 100644 --- a/packages/react/src/checkbox/root/CheckboxRootDataAttributes.ts +++ b/packages/react/src/checkbox/root/CheckboxRootDataAttributes.ts @@ -28,7 +28,7 @@ export enum CheckboxRootDataAttributes { */ invalid = 'data-invalid', /** - * Present when the checkbox has been thouched (when wrapped in Field.Root). + * Present when the checkbox has been touched (when wrapped in Field.Root). */ touched = 'data-touched', /** diff --git a/packages/react/src/checkbox/root/useCheckboxRoot.ts b/packages/react/src/checkbox/root/useCheckboxRoot.ts index 28cd04695c..9797ea60ff 100644 --- a/packages/react/src/checkbox/root/useCheckboxRoot.ts +++ b/packages/react/src/checkbox/root/useCheckboxRoot.ts @@ -205,7 +205,7 @@ export namespace UseCheckboxRoot { */ defaultChecked?: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; diff --git a/packages/react/src/collapsible/root/CollapsibleRoot.tsx b/packages/react/src/collapsible/root/CollapsibleRoot.tsx index 7098f86e74..bb37d0f7c9 100644 --- a/packages/react/src/collapsible/root/CollapsibleRoot.tsx +++ b/packages/react/src/collapsible/root/CollapsibleRoot.tsx @@ -112,7 +112,7 @@ CollapsibleRoot.propTypes /* remove-proptypes */ = { */ defaultOpen: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/collapsible/root/useCollapsibleRoot.ts b/packages/react/src/collapsible/root/useCollapsibleRoot.ts index 32396bf837..e01ac4d97c 100644 --- a/packages/react/src/collapsible/root/useCollapsibleRoot.ts +++ b/packages/react/src/collapsible/root/useCollapsibleRoot.ts @@ -60,7 +60,7 @@ export namespace useCollapsibleRoot { */ onOpenChange: (open: boolean) => void; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: boolean; @@ -69,7 +69,7 @@ export namespace useCollapsibleRoot { export interface ReturnValue { panelId: React.HTMLAttributes['id']; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; mounted: boolean; diff --git a/packages/react/src/collapsible/trigger/useCollapsibleTrigger.ts b/packages/react/src/collapsible/trigger/useCollapsibleTrigger.ts index 1453d328ab..d93555d13a 100644 --- a/packages/react/src/collapsible/trigger/useCollapsibleTrigger.ts +++ b/packages/react/src/collapsible/trigger/useCollapsibleTrigger.ts @@ -51,7 +51,7 @@ export namespace useCollapsibleTrigger { */ panelId: React.HTMLAttributes['id']; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** diff --git a/packages/react/src/dialog/popup/DialogPopup.tsx b/packages/react/src/dialog/popup/DialogPopup.tsx index 491d103bc2..c184a35dae 100644 --- a/packages/react/src/dialog/popup/DialogPopup.tsx +++ b/packages/react/src/dialog/popup/DialogPopup.tsx @@ -123,7 +123,7 @@ namespace DialogPopup { | ((interactionType: InteractionType) => React.RefObject); /** * Determines the element to focus when the dialog is closed. - * By default, focus returns to trigger. + * By default, focus returns to the trigger. */ finalFocus?: React.RefObject; } @@ -154,7 +154,7 @@ DialogPopup.propTypes /* remove-proptypes */ = { className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** * Determines the element to focus when the dialog is closed. - * By default, focus returns to trigger. + * By default, focus returns to the trigger. */ finalFocus: refType, /** diff --git a/packages/react/src/field/control/FieldControlDataAttributes.ts b/packages/react/src/field/control/FieldControlDataAttributes.ts index 34f261d11d..0a07cb1f8b 100644 --- a/packages/react/src/field/control/FieldControlDataAttributes.ts +++ b/packages/react/src/field/control/FieldControlDataAttributes.ts @@ -12,7 +12,7 @@ export enum FieldControlDataAttributes { */ invalid = 'data-invalid', /** - * Present when the field has been thouched. + * Present when the field has been touched. */ touched = 'data-touched', /** diff --git a/packages/react/src/field/description/FieldDescriptionDataAttributes.ts b/packages/react/src/field/description/FieldDescriptionDataAttributes.ts index 65a38267b4..7d656c48d0 100644 --- a/packages/react/src/field/description/FieldDescriptionDataAttributes.ts +++ b/packages/react/src/field/description/FieldDescriptionDataAttributes.ts @@ -12,7 +12,7 @@ export enum FieldDescriptionDataAttributes { */ invalid = 'data-invalid', /** - * Present when the field has been thouched. + * Present when the field has been touched. */ touched = 'data-touched', /** diff --git a/packages/react/src/field/error/FieldErrorDataAttributes.ts b/packages/react/src/field/error/FieldErrorDataAttributes.ts index b09cfe2421..570c81ea66 100644 --- a/packages/react/src/field/error/FieldErrorDataAttributes.ts +++ b/packages/react/src/field/error/FieldErrorDataAttributes.ts @@ -8,7 +8,7 @@ export enum FieldErrorDataAttributes { */ invalid = 'data-invalid', /** - * Present when the field has been thouched. + * Present when the field has been touched. */ touched = 'data-touched', /** diff --git a/packages/react/src/field/label/FieldLabelDataAttributes.ts b/packages/react/src/field/label/FieldLabelDataAttributes.ts index e65b37f7d5..129e79ffc6 100644 --- a/packages/react/src/field/label/FieldLabelDataAttributes.ts +++ b/packages/react/src/field/label/FieldLabelDataAttributes.ts @@ -12,7 +12,7 @@ export enum FieldLabelDataAttributes { */ invalid = 'data-invalid', /** - * Present when the field has been thouched. + * Present when the field has been touched. */ touched = 'data-touched', /** diff --git a/packages/react/src/field/root/FieldRoot.tsx b/packages/react/src/field/root/FieldRoot.tsx index 9c6dea0f67..d47db3bcff 100644 --- a/packages/react/src/field/root/FieldRoot.tsx +++ b/packages/react/src/field/root/FieldRoot.tsx @@ -155,7 +155,7 @@ export interface FieldValidityData { namespace FieldRoot { export interface State { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; touched: boolean; @@ -165,7 +165,7 @@ namespace FieldRoot { export interface Props extends BaseUIComponentProps<'div', State> { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * Takes precedence over the `disabled` prop on the `` component. * @default false */ @@ -213,7 +213,7 @@ FieldRoot.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * Takes precedence over the `disabled` prop on the `` component. * @default false */ diff --git a/packages/react/src/field/root/FieldRootDataAttributes.ts b/packages/react/src/field/root/FieldRootDataAttributes.ts index e855bd52aa..f484ca706d 100644 --- a/packages/react/src/field/root/FieldRootDataAttributes.ts +++ b/packages/react/src/field/root/FieldRootDataAttributes.ts @@ -4,7 +4,7 @@ export enum FieldRootDataAttributes { */ disabled = 'data-disabled', /** - * Present when the field has been thouched. + * Present when the field has been touched. */ touched = 'data-touched', /** diff --git a/packages/react/src/fieldset/legend/FieldsetLegend.tsx b/packages/react/src/fieldset/legend/FieldsetLegend.tsx index 4d39b14e59..fbcc602816 100644 --- a/packages/react/src/fieldset/legend/FieldsetLegend.tsx +++ b/packages/react/src/fieldset/legend/FieldsetLegend.tsx @@ -44,7 +44,7 @@ const FieldsetLegend = React.forwardRef(function FieldsetLegend( namespace FieldsetLegend { export interface State { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; } diff --git a/packages/react/src/fieldset/root/FieldsetRoot.tsx b/packages/react/src/fieldset/root/FieldsetRoot.tsx index 62bf66fb6e..357f028519 100644 --- a/packages/react/src/fieldset/root/FieldsetRoot.tsx +++ b/packages/react/src/fieldset/root/FieldsetRoot.tsx @@ -55,7 +55,7 @@ const FieldsetRoot = React.forwardRef(function FieldsetRoot( namespace FieldsetRoot { export type State = { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; }; diff --git a/packages/react/src/input/InputDataAttributes.ts b/packages/react/src/input/InputDataAttributes.ts index 26ea6bf164..eeacc8ed74 100644 --- a/packages/react/src/input/InputDataAttributes.ts +++ b/packages/react/src/input/InputDataAttributes.ts @@ -12,7 +12,7 @@ export enum InputDataAttributes { */ invalid = 'data-invalid', /** - * Present when the input has been thouched. + * Present when the input has been touched. */ touched = 'data-touched', /** diff --git a/packages/react/src/menu/backdrop/MenuBackdrop.tsx b/packages/react/src/menu/backdrop/MenuBackdrop.tsx index d6098dbf9c..7955ac1df8 100644 --- a/packages/react/src/menu/backdrop/MenuBackdrop.tsx +++ b/packages/react/src/menu/backdrop/MenuBackdrop.tsx @@ -63,7 +63,7 @@ namespace MenuBackdrop { export interface Props extends BaseUIComponentProps<'div', State> { /** - * Whether to keep the HTML element in the DOM when the menu is hidden. + * Whether to keep the HTML element in the DOM while the menu is hidden. * @default false */ keepMounted?: boolean; @@ -85,7 +85,7 @@ MenuBackdrop.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether to keep the HTML element in the DOM when the menu is hidden. + * Whether to keep the HTML element in the DOM while the menu is hidden. * @default false */ keepMounted: PropTypes.bool, diff --git a/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.tsx b/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.tsx index fb1c9fcfbd..cddbae8419 100644 --- a/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.tsx +++ b/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.tsx @@ -79,7 +79,7 @@ namespace MenuCheckboxItemIndicator { */ checked: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; highlighted: boolean; diff --git a/packages/react/src/menu/checkbox-item/MenuCheckboxItem.tsx b/packages/react/src/menu/checkbox-item/MenuCheckboxItem.tsx index b5db4d7a53..dfda5b6701 100644 --- a/packages/react/src/menu/checkbox-item/MenuCheckboxItem.tsx +++ b/packages/react/src/menu/checkbox-item/MenuCheckboxItem.tsx @@ -101,7 +101,7 @@ InnerMenuCheckboxItem.propTypes /* remove-proptypes */ = { */ defaultChecked: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, @@ -210,7 +210,7 @@ interface InnerMenuCheckboxItemProps extends MenuCheckboxItem.Props { namespace MenuCheckboxItem { export type State = { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; highlighted: boolean; @@ -244,7 +244,7 @@ namespace MenuCheckboxItem { */ onClick?: React.MouseEventHandler; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -295,7 +295,7 @@ MenuCheckboxItem.propTypes /* remove-proptypes */ = { */ defaultChecked: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/menu/item/MenuItem.tsx b/packages/react/src/menu/item/MenuItem.tsx index 694c0af4e2..32af44810f 100644 --- a/packages/react/src/menu/item/MenuItem.tsx +++ b/packages/react/src/menu/item/MenuItem.tsx @@ -84,7 +84,7 @@ InnerMenuItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, @@ -187,7 +187,7 @@ interface InnerMenuItemProps extends MenuItem.Props { namespace MenuItem { export type State = { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; highlighted: boolean; @@ -200,7 +200,7 @@ namespace MenuItem { */ onClick?: React.MouseEventHandler; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -238,7 +238,7 @@ MenuItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/menu/item/useMenuItem.ts b/packages/react/src/menu/item/useMenuItem.ts index 60160755e6..b9ccf3f84b 100644 --- a/packages/react/src/menu/item/useMenuItem.ts +++ b/packages/react/src/menu/item/useMenuItem.ts @@ -71,7 +71,7 @@ export namespace useMenuItem { */ closeOnClick: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** diff --git a/packages/react/src/menu/positioner/MenuPositioner.tsx b/packages/react/src/menu/positioner/MenuPositioner.tsx index 2ee0187a40..f7fc1e0d3f 100644 --- a/packages/react/src/menu/positioner/MenuPositioner.tsx +++ b/packages/react/src/menu/positioner/MenuPositioner.tsx @@ -140,17 +140,18 @@ MenuPositioner.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * The align of the Menu element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'center' */ align: PropTypes.oneOf(['center', 'end', 'start']), /** - * The offset of the Menu element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset: PropTypes.number, /** - * The anchor element to which the Menu popup will be placed at. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ HTMLElementType, @@ -158,8 +159,9 @@ MenuPositioner.propTypes /* remove-proptypes */ = { PropTypes.func, ]), /** - * Determines the padding between the arrow and the Menu popup's edges. Useful when the popover - * popup has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding: PropTypes.number, @@ -173,7 +175,7 @@ MenuPositioner.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * The boundary that the Menu element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ @@ -188,7 +190,7 @@ MenuPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * The padding of the collision boundary. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding: PropTypes.oneOfType([ @@ -206,7 +208,7 @@ MenuPositioner.propTypes /* remove-proptypes */ = { */ keepMounted: PropTypes.bool, /** - * The CSS position strategy for positioning the Menu popup element. + * Determines which CSS `position` property to use. * @default 'absolute' */ positionMethod: PropTypes.oneOf(['absolute', 'fixed']), @@ -218,12 +220,13 @@ MenuPositioner.propTypes /* remove-proptypes */ = { */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * The side of the anchor element that the Menu element should align to. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'bottom' */ side: PropTypes.oneOf(['bottom', 'inline-end', 'inline-start', 'left', 'right', 'top']), /** - * The gap between the anchor element and the Menu element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset: PropTypes.number, diff --git a/packages/react/src/menu/positioner/MenuPositionerContext.ts b/packages/react/src/menu/positioner/MenuPositionerContext.ts index 6116a030f9..47b0062e96 100644 --- a/packages/react/src/menu/positioner/MenuPositionerContext.ts +++ b/packages/react/src/menu/positioner/MenuPositionerContext.ts @@ -9,7 +9,7 @@ export interface MenuPositionerContext { */ side: Side; /** - * The align of the anchor element the popup is positioned relative to. + * How to align the popup relative to the specified side. */ align: 'start' | 'end' | 'center'; arrowRef: React.MutableRefObject; diff --git a/packages/react/src/menu/positioner/useMenuPositioner.ts b/packages/react/src/menu/positioner/useMenuPositioner.ts index c794f9b837..d29a3b2987 100644 --- a/packages/react/src/menu/positioner/useMenuPositioner.ts +++ b/packages/react/src/menu/positioner/useMenuPositioner.ts @@ -80,7 +80,8 @@ export namespace useMenuPositioner { */ open?: boolean; /** - * The anchor element to which the Menu popup will be placed at. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor?: | Element @@ -89,37 +90,38 @@ export namespace useMenuPositioner { | React.MutableRefObject | (() => Element | VirtualElement | null); /** - * The CSS position strategy for positioning the Menu popup element. + * Determines which CSS `position` property to use. * @default 'absolute' */ positionMethod?: 'absolute' | 'fixed'; /** - * The side of the anchor element that the Menu element should align to. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'bottom' */ side?: Side; /** - * The gap between the anchor element and the Menu element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset?: number; /** - * The align of the Menu element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'center' */ align?: 'start' | 'end' | 'center'; /** - * The offset of the Menu element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset?: number; /** - * The boundary that the Menu element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary?: Boundary; /** - * The padding of the collision boundary. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding?: Padding; @@ -135,8 +137,9 @@ export namespace useMenuPositioner { */ sticky?: boolean; /** - * Determines the padding between the arrow and the Menu popup's edges. Useful when the popover - * popup has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding?: number; diff --git a/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.tsx b/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.tsx index d4d8e96aee..b3c7870c98 100644 --- a/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.tsx +++ b/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.tsx @@ -79,7 +79,7 @@ namespace MenuRadioItemIndicator { */ checked: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; highlighted: boolean; diff --git a/packages/react/src/menu/radio-item/MenuRadioItem.tsx b/packages/react/src/menu/radio-item/MenuRadioItem.tsx index 2b92f9d199..dc72fa2946 100644 --- a/packages/react/src/menu/radio-item/MenuRadioItem.tsx +++ b/packages/react/src/menu/radio-item/MenuRadioItem.tsx @@ -91,7 +91,7 @@ InnerMenuRadioItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, @@ -222,7 +222,7 @@ interface InnerMenuRadioItemProps extends Omit { namespace MenuRadioItem { export type State = { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; highlighted: boolean; @@ -244,7 +244,7 @@ namespace MenuRadioItem { */ onClick?: React.MouseEventHandler; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -282,7 +282,7 @@ MenuRadioItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/menu/root/MenuRoot.tsx b/packages/react/src/menu/root/MenuRoot.tsx index 0414197cb4..29f5645507 100644 --- a/packages/react/src/menu/root/MenuRoot.tsx +++ b/packages/react/src/menu/root/MenuRoot.tsx @@ -125,7 +125,7 @@ namespace MenuRoot { */ orientation?: MenuOrientation; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -184,7 +184,7 @@ MenuRoot.propTypes /* remove-proptypes */ = { */ delay: PropTypes.number, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/menu/root/useMenuRoot.ts b/packages/react/src/menu/root/useMenuRoot.ts index f8610e65db..75d5bf9306 100644 --- a/packages/react/src/menu/root/useMenuRoot.ts +++ b/packages/react/src/menu/root/useMenuRoot.ts @@ -225,7 +225,7 @@ export namespace useMenuRoot { */ direction: TextDirection; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** diff --git a/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.tsx b/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.tsx index 2a8a96e6b2..0c5cb4c4b9 100644 --- a/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.tsx +++ b/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.tsx @@ -79,7 +79,7 @@ namespace MenuSubmenuTrigger { children?: React.ReactNode; onClick?: React.MouseEventHandler; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -93,7 +93,7 @@ namespace MenuSubmenuTrigger { export interface State { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; highlighted: boolean; @@ -119,7 +119,7 @@ MenuSubmenuTrigger.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/menu/submenu-trigger/useMenuSubmenuTrigger.ts b/packages/react/src/menu/submenu-trigger/useMenuSubmenuTrigger.ts index 39f19cc923..5c7dfb73e5 100644 --- a/packages/react/src/menu/submenu-trigger/useMenuSubmenuTrigger.ts +++ b/packages/react/src/menu/submenu-trigger/useMenuSubmenuTrigger.ts @@ -59,7 +59,7 @@ export namespace useSubmenuTrigger { id: string | undefined; highlighted: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** diff --git a/packages/react/src/menu/trigger/MenuTrigger.tsx b/packages/react/src/menu/trigger/MenuTrigger.tsx index e1a0dd7f75..7cc821c5c1 100644 --- a/packages/react/src/menu/trigger/MenuTrigger.tsx +++ b/packages/react/src/menu/trigger/MenuTrigger.tsx @@ -59,7 +59,7 @@ namespace MenuTrigger { export interface Props extends BaseUIComponentProps<'button', State> { children?: React.ReactNode; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -92,7 +92,7 @@ MenuTrigger.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/menu/trigger/useMenuTrigger.ts b/packages/react/src/menu/trigger/useMenuTrigger.ts index 2c3452b7c6..b2c6622677 100644 --- a/packages/react/src/menu/trigger/useMenuTrigger.ts +++ b/packages/react/src/menu/trigger/useMenuTrigger.ts @@ -90,7 +90,7 @@ export function useMenuTrigger(parameters: useMenuTrigger.Parameters): useMenuTr export namespace useMenuTrigger { export interface Parameters { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; diff --git a/packages/react/src/number-field/root/NumberFieldRoot.tsx b/packages/react/src/number-field/root/NumberFieldRoot.tsx index 4a3d2ef38c..01e270b1d6 100644 --- a/packages/react/src/number-field/root/NumberFieldRoot.tsx +++ b/packages/react/src/number-field/root/NumberFieldRoot.tsx @@ -111,7 +111,7 @@ export namespace NumberFieldRoot { */ required: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** @@ -159,7 +159,7 @@ NumberFieldRoot.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.number, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/number-field/root/useNumberFieldRoot.ts b/packages/react/src/number-field/root/useNumberFieldRoot.ts index 0d04ce6ffd..26e8adb422 100644 --- a/packages/react/src/number-field/root/useNumberFieldRoot.ts +++ b/packages/react/src/number-field/root/useNumberFieldRoot.ts @@ -812,7 +812,7 @@ export namespace UseNumberFieldRoot { */ required?: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; diff --git a/packages/react/src/popover/popup/PopoverPopup.tsx b/packages/react/src/popover/popup/PopoverPopup.tsx index 11189a29be..5dec881b1c 100644 --- a/packages/react/src/popover/popup/PopoverPopup.tsx +++ b/packages/react/src/popover/popup/PopoverPopup.tsx @@ -116,7 +116,7 @@ namespace PopoverPopup { | ((interactionType: InteractionType) => React.RefObject); /** * Determines the element to focus when the popover is closed. - * By default, focus returns to trigger. + * By default, focus returns to the trigger. */ finalFocus?: React.RefObject; } @@ -138,7 +138,7 @@ PopoverPopup.propTypes /* remove-proptypes */ = { className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** * Determines the element to focus when the popover is closed. - * By default, focus returns to trigger. + * By default, focus returns to the trigger. */ finalFocus: refType, /** diff --git a/packages/react/src/popover/positioner/PopoverPositioner.tsx b/packages/react/src/popover/positioner/PopoverPositioner.tsx index 14cf07cb14..0b8ded616d 100644 --- a/packages/react/src/popover/positioner/PopoverPositioner.tsx +++ b/packages/react/src/popover/positioner/PopoverPositioner.tsx @@ -116,17 +116,18 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * The align of the popover element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'center' */ align: PropTypes.oneOf(['center', 'end', 'start']), /** - * The offset of the popover element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset: PropTypes.number, /** - * The element to which the popover element is anchored to. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ HTMLElementType, @@ -134,8 +135,9 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { PropTypes.func, ]), /** - * Determines the padding between the arrow and the popover edges. Useful when the popover - * element has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding: PropTypes.number, @@ -149,7 +151,7 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * The boundary that the popover element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ @@ -164,8 +166,7 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * The padding between the popover element and the edges of the collision boundary to add - * whitespace between them to prevent them from touching. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding: PropTypes.oneOfType([ @@ -178,12 +179,12 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * Whether to keep the HTML element in the DOM when the popover is hidden. + * Whether to keep the HTML element in the DOM while the popover is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * The CSS position strategy for positioning the popover element. + * Determines which CSS `position` property to use. * @default 'absolute' */ positionMethod: PropTypes.oneOf(['absolute', 'fixed']), @@ -195,18 +196,19 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * The side of the anchor element that the popover element should be placed at. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'bottom' */ side: PropTypes.oneOf(['bottom', 'inline-end', 'inline-start', 'left', 'right', 'top']), /** - * The gap between the anchor element and the popover element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset: PropTypes.number, /** - * Whether to allow the popover to remain stuck in view while the anchor element is scrolled out - * of view. + * Whether to maintain the popup in the viewport after + * the anchor element is scrolled out of view. * @default false */ sticky: PropTypes.bool, diff --git a/packages/react/src/popover/positioner/usePopoverPositioner.tsx b/packages/react/src/popover/positioner/usePopoverPositioner.tsx index 4c66e5f73d..6d9456b5ec 100644 --- a/packages/react/src/popover/positioner/usePopoverPositioner.tsx +++ b/packages/react/src/popover/positioner/usePopoverPositioner.tsx @@ -74,7 +74,8 @@ export function usePopoverPositioner( export namespace usePopoverPositioner { export interface SharedParameters { /** - * The element to which the popover element is anchored to. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor?: | Element @@ -83,55 +84,56 @@ export namespace usePopoverPositioner { | React.MutableRefObject | (() => Element | VirtualElement | null); /** - * The CSS position strategy for positioning the popover element. + * Determines which CSS `position` property to use. * @default 'absolute' */ positionMethod?: 'absolute' | 'fixed'; /** - * The side of the anchor element that the popover element should be placed at. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'bottom' */ side?: Side; /** - * The gap between the anchor element and the popover element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset?: number; /** - * The align of the popover element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'center' */ align?: 'start' | 'end' | 'center'; /** - * The offset of the popover element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset?: number; /** - * The boundary that the popover element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary?: Boundary; /** - * The padding between the popover element and the edges of the collision boundary to add - * whitespace between them to prevent them from touching. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding?: Padding; /** - * Whether to allow the popover to remain stuck in view while the anchor element is scrolled out - * of view. + * Whether to maintain the popup in the viewport after + * the anchor element is scrolled out of view. * @default false */ sticky?: boolean; /** - * Determines the padding between the arrow and the popover edges. Useful when the popover - * element has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding?: number; /** - * Whether to keep the HTML element in the DOM when the popover is hidden. + * Whether to keep the HTML element in the DOM while the popover is hidden. * @default false */ keepMounted?: boolean; diff --git a/packages/react/src/portal/Portal.tsx b/packages/react/src/portal/Portal.tsx index 2f9255ace8..06057ab1f9 100644 --- a/packages/react/src/portal/Portal.tsx +++ b/packages/react/src/portal/Portal.tsx @@ -7,7 +7,7 @@ import { HTMLElementType, refType } from '../utils/proptypes'; /** * A portal element that moves the popup to a different part of the DOM. - * By default, the portal element is appended to the ``. + * By default, the portal element is appended to ``. * * Documentation: https://base-ui.com */ @@ -32,7 +32,7 @@ namespace Portal { */ container?: HTMLElement | null | React.RefObject; /** - * Whether to keep the portal mounted in the DOM when the popup is hidden. + * Whether to keep the portal mounted in the DOM while the popup is hidden. * @default false */ keepMounted?: boolean; @@ -55,7 +55,7 @@ Portal.propTypes /* remove-proptypes */ = { */ container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, refType]), /** - * Whether to keep the portal mounted in the DOM when the popup is hidden. + * Whether to keep the portal mounted in the DOM while the popup is hidden. * @default false */ keepMounted: PropTypes.bool, diff --git a/packages/react/src/preview-card/positioner/PreviewCardPositioner.tsx b/packages/react/src/preview-card/positioner/PreviewCardPositioner.tsx index d08693f8f4..3d354f7553 100644 --- a/packages/react/src/preview-card/positioner/PreviewCardPositioner.tsx +++ b/packages/react/src/preview-card/positioner/PreviewCardPositioner.tsx @@ -130,17 +130,18 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * The align of the preview card element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'center' */ align: PropTypes.oneOf(['center', 'end', 'start']), /** - * The offset of the preview card element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset: PropTypes.number, /** - * The anchor element to which the preview card popup will be placed at. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ HTMLElementType, @@ -148,8 +149,9 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { PropTypes.func, ]), /** - * Determines the padding between the arrow and the preview card popup's edges. Useful when the - * preview card popup has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding: PropTypes.number, @@ -163,7 +165,7 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * The boundary that the preview card element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ @@ -178,7 +180,7 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * The padding of the collision boundary. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding: PropTypes.oneOfType([ @@ -196,7 +198,7 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { */ keepMounted: PropTypes.bool, /** - * The CSS position strategy for positioning the preview card popup element. + * Determines which CSS `position` property to use. * @default 'absolute' */ positionMethod: PropTypes.oneOf(['absolute', 'fixed']), @@ -208,12 +210,13 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * The side of the anchor element that the preview card element should align to. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'bottom' */ side: PropTypes.oneOf(['bottom', 'inline-end', 'inline-start', 'left', 'right', 'top']), /** - * The gap between the anchor element and the preview card element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset: PropTypes.number, diff --git a/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts b/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts index 7f4ffed09f..18bbc70ba4 100644 --- a/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts +++ b/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts @@ -76,7 +76,8 @@ export function usePreviewCardPositioner( export namespace usePreviewCardPositioner { export interface SharedParameters { /** - * The anchor element to which the preview card popup will be placed at. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor?: | Element @@ -85,37 +86,38 @@ export namespace usePreviewCardPositioner { | React.MutableRefObject | (() => Element | VirtualElement | null); /** - * The CSS position strategy for positioning the preview card popup element. + * Determines which CSS `position` property to use. * @default 'absolute' */ positionMethod?: 'absolute' | 'fixed'; /** - * The side of the anchor element that the preview card element should align to. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'bottom' */ side?: Side; /** - * The gap between the anchor element and the preview card element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset?: number; /** - * The align of the preview card element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'center' */ align?: 'start' | 'end' | 'center'; /** - * The offset of the preview card element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset?: number; /** - * The boundary that the preview card element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary?: Boundary; /** - * The padding of the collision boundary. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding?: Padding; @@ -126,8 +128,9 @@ export namespace usePreviewCardPositioner { */ sticky?: boolean; /** - * Determines the padding between the arrow and the preview card popup's edges. Useful when the - * preview card popup has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding?: number; diff --git a/packages/react/src/radio-group/RadioGroup.tsx b/packages/react/src/radio-group/RadioGroup.tsx index 7c186aa556..4f57ca427c 100644 --- a/packages/react/src/radio-group/RadioGroup.tsx +++ b/packages/react/src/radio-group/RadioGroup.tsx @@ -95,7 +95,7 @@ const RadioGroup = React.forwardRef(function RadioGroup( namespace RadioGroup { export interface State { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean | undefined; /** @@ -107,7 +107,7 @@ namespace RadioGroup { export interface Props extends Omit, 'value' | 'defaultValue'> { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -159,7 +159,7 @@ RadioGroup.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.any, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/radio/root/RadioRoot.tsx b/packages/react/src/radio/root/RadioRoot.tsx index 979b179fc3..6f051ebe3a 100644 --- a/packages/react/src/radio/root/RadioRoot.tsx +++ b/packages/react/src/radio/root/RadioRoot.tsx @@ -87,7 +87,7 @@ namespace RadioRoot { */ value: unknown; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -135,7 +135,7 @@ RadioRoot.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/select/item/SelectItem.tsx b/packages/react/src/select/item/SelectItem.tsx index f8cfca7a3b..93b8b153d8 100644 --- a/packages/react/src/select/item/SelectItem.tsx +++ b/packages/react/src/select/item/SelectItem.tsx @@ -132,7 +132,7 @@ InnerSelectItem.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, @@ -281,7 +281,7 @@ const SelectItem = React.forwardRef(function SelectItem( namespace SelectItem { export interface State { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; highlighted: boolean; @@ -300,7 +300,7 @@ namespace SelectItem { */ value?: any; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -322,7 +322,7 @@ SelectItem.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/select/item/useSelectItem.ts b/packages/react/src/select/item/useSelectItem.ts index 16adaf263f..446e806740 100644 --- a/packages/react/src/select/item/useSelectItem.ts +++ b/packages/react/src/select/item/useSelectItem.ts @@ -168,7 +168,7 @@ export function useSelectItem(params: useSelectItem.Parameters): useSelectItem.R export namespace useSelectItem { export interface Parameters { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** diff --git a/packages/react/src/select/portal/SelectPortal.tsx b/packages/react/src/select/portal/SelectPortal.tsx index 1bd5b3fd09..e76b0550c1 100644 --- a/packages/react/src/select/portal/SelectPortal.tsx +++ b/packages/react/src/select/portal/SelectPortal.tsx @@ -6,7 +6,7 @@ import { HTMLElementType, refType } from '../../utils/proptypes'; /** * A portal element that moves the popup to a different part of the DOM. - * By default, the portal element is appended to the ``. + * By default, the portal element is appended to ``. * * Documentation: [Base UI Select](https://base-ui.com/react/components/select) */ diff --git a/packages/react/src/select/positioner/SelectPositioner.tsx b/packages/react/src/select/positioner/SelectPositioner.tsx index be3613e0f7..c97aa0d98a 100644 --- a/packages/react/src/select/positioner/SelectPositioner.tsx +++ b/packages/react/src/select/positioner/SelectPositioner.tsx @@ -108,17 +108,18 @@ SelectPositioner.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * The align of the Select element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'start' */ align: PropTypes.oneOf(['center', 'end', 'start']), /** - * The offset of the Select element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset: PropTypes.number, /** - * The anchor element to which the Select popup will be placed at. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor: PropTypes.oneOfType([ (props, propName) => { @@ -157,8 +158,9 @@ SelectPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * Determines the padding between the arrow and the Select popup's edges. Useful when the popover - * popup has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding: PropTypes.number, @@ -172,7 +174,7 @@ SelectPositioner.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * The boundary that the Select element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary: PropTypes.oneOfType([ @@ -203,7 +205,7 @@ SelectPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * The padding of the collision boundary. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding: PropTypes.oneOfType([ @@ -228,12 +230,13 @@ SelectPositioner.propTypes /* remove-proptypes */ = { */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * The side of the anchor element that the Select element should align to. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'bottom' */ side: PropTypes.oneOf(['bottom', 'inline-end', 'inline-start', 'left', 'right', 'top']), /** - * The gap between the anchor element and the Select element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset: PropTypes.number, diff --git a/packages/react/src/select/positioner/useSelectPositioner.ts b/packages/react/src/select/positioner/useSelectPositioner.ts index 02f53a3844..dac7175c3f 100644 --- a/packages/react/src/select/positioner/useSelectPositioner.ts +++ b/packages/react/src/select/positioner/useSelectPositioner.ts @@ -105,7 +105,8 @@ export function useSelectPositioner( export namespace useSelectPositioner { export interface SharedParameters { /** - * The anchor element to which the Select popup will be placed at. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor?: | Element @@ -119,32 +120,33 @@ export namespace useSelectPositioner { */ positionMethod?: 'absolute' | 'fixed'; /** - * The side of the anchor element that the Select element should align to. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'bottom' */ side?: Side; /** - * The gap between the anchor element and the Select element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset?: number; /** - * The align of the Select element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'start' */ align?: 'start' | 'end' | 'center'; /** - * The offset of the Select element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset?: number; /** - * The boundary that the Select element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary?: Boundary; /** - * The padding of the collision boundary. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding?: Padding; @@ -160,8 +162,9 @@ export namespace useSelectPositioner { */ sticky?: boolean; /** - * Determines the padding between the arrow and the Select popup's edges. Useful when the popover - * popup has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding?: number; diff --git a/packages/react/src/select/root/SelectRoot.tsx b/packages/react/src/select/root/SelectRoot.tsx index ebd54cb1be..8b40d5ecbc 100644 --- a/packages/react/src/select/root/SelectRoot.tsx +++ b/packages/react/src/select/root/SelectRoot.tsx @@ -136,7 +136,7 @@ SelectRoot.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.any, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/select/root/useSelectRoot.ts b/packages/react/src/select/root/useSelectRoot.ts index 044ee4d80a..50479341bb 100644 --- a/packages/react/src/select/root/useSelectRoot.ts +++ b/packages/react/src/select/root/useSelectRoot.ts @@ -319,7 +319,7 @@ export namespace useSelectRoot { */ readOnly?: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; diff --git a/packages/react/src/select/trigger/SelectTrigger.tsx b/packages/react/src/select/trigger/SelectTrigger.tsx index 6dcb6f6cb4..b9863c799e 100644 --- a/packages/react/src/select/trigger/SelectTrigger.tsx +++ b/packages/react/src/select/trigger/SelectTrigger.tsx @@ -62,7 +62,7 @@ namespace SelectTrigger { export interface Props extends BaseUIComponentProps<'div', State> { children?: React.ReactNode; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -95,7 +95,7 @@ SelectTrigger.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/select/trigger/useSelectTrigger.ts b/packages/react/src/select/trigger/useSelectTrigger.ts index eb13df8e9c..d5b10943cd 100644 --- a/packages/react/src/select/trigger/useSelectTrigger.ts +++ b/packages/react/src/select/trigger/useSelectTrigger.ts @@ -169,7 +169,7 @@ export function useSelectTrigger( export namespace useSelectTrigger { export interface Parameters { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; diff --git a/packages/react/src/slider/root/SliderRoot.tsx b/packages/react/src/slider/root/SliderRoot.tsx index 8a7bed2a08..9f938f242c 100644 --- a/packages/react/src/slider/root/SliderRoot.tsx +++ b/packages/react/src/slider/root/SliderRoot.tsx @@ -125,7 +125,7 @@ export namespace SliderRoot { */ activeThumbIndex: number; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** @@ -176,7 +176,7 @@ export namespace SliderRoot { */ defaultValue?: number | ReadonlyArray; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -214,7 +214,7 @@ SliderRoot.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]), /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/slider/root/useSliderRoot.ts b/packages/react/src/slider/root/useSliderRoot.ts index 5024502fde..04b8bf0cc2 100644 --- a/packages/react/src/slider/root/useSliderRoot.ts +++ b/packages/react/src/slider/root/useSliderRoot.ts @@ -497,7 +497,7 @@ export namespace useSliderRoot { */ direction: TextDirection; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; diff --git a/packages/react/src/switch/root/SwitchRoot.tsx b/packages/react/src/switch/root/SwitchRoot.tsx index 3b7d9b8361..5632ec8f81 100644 --- a/packages/react/src/switch/root/SwitchRoot.tsx +++ b/packages/react/src/switch/root/SwitchRoot.tsx @@ -79,7 +79,7 @@ namespace SwitchRoot { */ checked: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** @@ -121,7 +121,7 @@ SwitchRoot.propTypes /* remove-proptypes */ = { */ defaultChecked: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/switch/root/useSwitchRoot.ts b/packages/react/src/switch/root/useSwitchRoot.ts index a5d7bcde33..a48bc2503a 100644 --- a/packages/react/src/switch/root/useSwitchRoot.ts +++ b/packages/react/src/switch/root/useSwitchRoot.ts @@ -163,7 +163,7 @@ export namespace useSwitchRoot { */ defaultChecked?: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; diff --git a/packages/react/src/tabs/tab/TabsTab.tsx b/packages/react/src/tabs/tab/TabsTab.tsx index 1329e8d204..0c73704e6d 100644 --- a/packages/react/src/tabs/tab/TabsTab.tsx +++ b/packages/react/src/tabs/tab/TabsTab.tsx @@ -76,7 +76,7 @@ namespace TabsTab { export interface State { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; selected: boolean; diff --git a/packages/react/src/tabs/tab/useTabsTab.ts b/packages/react/src/tabs/tab/useTabsTab.ts index f5e1f3115c..228613ff18 100644 --- a/packages/react/src/tabs/tab/useTabsTab.ts +++ b/packages/react/src/tabs/tab/useTabsTab.ts @@ -141,7 +141,7 @@ namespace useTabsTab { */ onClick?: React.MouseEventHandler; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled?: boolean; highlightedTabIndex: number; diff --git a/packages/react/src/toggle-group/ToggleGroup.tsx b/packages/react/src/toggle-group/ToggleGroup.tsx index d10199e332..bf5f377e1e 100644 --- a/packages/react/src/toggle-group/ToggleGroup.tsx +++ b/packages/react/src/toggle-group/ToggleGroup.tsx @@ -102,7 +102,7 @@ export type ToggleGroupOrientation = 'horizontal' | 'vertical'; export namespace ToggleGroup { export interface State { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; multiple: boolean; @@ -112,7 +112,7 @@ export namespace ToggleGroup { extends Partial, Omit, 'defaultValue'> { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; @@ -150,7 +150,7 @@ ToggleGroup.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.array, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/toggle-group/useToggleGroup.ts b/packages/react/src/toggle-group/useToggleGroup.ts index c7286d3064..0ebb2ee7af 100644 --- a/packages/react/src/toggle-group/useToggleGroup.ts +++ b/packages/react/src/toggle-group/useToggleGroup.ts @@ -76,7 +76,7 @@ export namespace UseToggleGroup { */ onValueChange: (groupValue: any[], event: Event) => void; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: boolean; @@ -92,7 +92,7 @@ export namespace UseToggleGroup { export interface ReturnValue { getRootProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: boolean; diff --git a/packages/react/src/toggle/Toggle.tsx b/packages/react/src/toggle/Toggle.tsx index 973a7479db..76ed4424f2 100644 --- a/packages/react/src/toggle/Toggle.tsx +++ b/packages/react/src/toggle/Toggle.tsx @@ -75,7 +75,7 @@ export namespace Toggle { export interface State { pressed: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; } @@ -127,7 +127,7 @@ Toggle.propTypes /* remove-proptypes */ = { */ defaultPressed: PropTypes.bool, /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/toggle/useToggle.ts b/packages/react/src/toggle/useToggle.ts index f497480242..cee9e9d9c6 100644 --- a/packages/react/src/toggle/useToggle.ts +++ b/packages/react/src/toggle/useToggle.ts @@ -78,7 +78,7 @@ export namespace useToggle { */ defaultPressed?: boolean; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled: boolean; @@ -109,7 +109,7 @@ export namespace useToggle { */ getRootProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps; /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. */ disabled: boolean; /** diff --git a/packages/react/src/tooltip/positioner/TooltipPositioner.tsx b/packages/react/src/tooltip/positioner/TooltipPositioner.tsx index be7a997ce9..8d9b5e5eb9 100644 --- a/packages/react/src/tooltip/positioner/TooltipPositioner.tsx +++ b/packages/react/src/tooltip/positioner/TooltipPositioner.tsx @@ -125,17 +125,18 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * The align of the tooltip element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'center' */ align: PropTypes.oneOf(['center', 'end', 'start']), /** - * The offset of the tooltip element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset: PropTypes.number, /** - * The element to which the tooltip element is anchored to. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ HTMLElementType, @@ -143,8 +144,9 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { PropTypes.func, ]), /** - * Determines the padding between the arrow and the tooltip edges. Useful when the tooltip - * element has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding: PropTypes.number, @@ -158,7 +160,7 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * The boundary that the tooltip element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ @@ -173,8 +175,7 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * The padding between the tooltip element and the edges of the collision boundary to add - * whitespace between them to prevent them from touching. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding: PropTypes.oneOfType([ @@ -192,7 +193,7 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { */ keepMounted: PropTypes.bool, /** - * The CSS position strategy for positioning the tooltip element. + * Determines which CSS `position` property to use. * @default 'absolute' */ positionMethod: PropTypes.oneOf(['absolute', 'fixed']), @@ -204,18 +205,19 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * The side of the anchor element that the tooltip element should be placed at. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'top' */ side: PropTypes.oneOf(['bottom', 'inline-end', 'inline-start', 'left', 'right', 'top']), /** - * The gap between the anchor element and the tooltip element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset: PropTypes.number, /** - * Whether to allow the tooltip to remain stuck in view while the anchor element is scrolled out - * of view. + * Whether to maintain the popup in the viewport after + * the anchor element was scrolled out of view. * @default false */ sticky: PropTypes.bool, diff --git a/packages/react/src/tooltip/positioner/useTooltipPositioner.ts b/packages/react/src/tooltip/positioner/useTooltipPositioner.ts index 6ae307053b..4bfa1e1a16 100644 --- a/packages/react/src/tooltip/positioner/useTooltipPositioner.ts +++ b/packages/react/src/tooltip/positioner/useTooltipPositioner.ts @@ -72,7 +72,8 @@ export function useTooltipPositioner( export namespace useTooltipPositioner { export interface SharedParameters { /** - * The element to which the tooltip element is anchored to. + * An element to position the popup against. + * By default, the popup will be positioned against the trigger. */ anchor?: | Element @@ -85,50 +86,51 @@ export namespace useTooltipPositioner { */ open?: boolean; /** - * The CSS position strategy for positioning the tooltip element. + * Determines which CSS `position` property to use. * @default 'absolute' */ positionMethod?: 'absolute' | 'fixed'; /** - * The side of the anchor element that the tooltip element should be placed at. + * Which side of the anchor element to align the popup against. + * May automatically change to avoid collisions. * @default 'top' */ side?: Side; /** - * The gap between the anchor element and the tooltip element. + * Distance between the anchor and the popup. * @default 0 */ sideOffset?: number; /** - * The align of the tooltip element to the anchor element along its cross axis. + * How to align the popup relative to the specified side. * @default 'center' */ align?: 'start' | 'end' | 'center'; /** - * The offset of the tooltip element along its align axis. + * Additional offset along the alignment axis of the element. * @default 0 */ alignOffset?: number; /** - * The boundary that the tooltip element should be constrained to. + * An element or a rectangle that delimits the area that the popup is confined to. * @default 'clipping-ancestors' */ collisionBoundary?: Boundary; /** - * The padding between the tooltip element and the edges of the collision boundary to add - * whitespace between them to prevent them from touching. + * Additional space to maintain from the edge of the collision boundary. * @default 5 */ collisionPadding?: Padding; /** - * Whether to allow the tooltip to remain stuck in view while the anchor element is scrolled out - * of view. + * Whether to maintain the popup in the viewport after + * the anchor element was scrolled out of view. * @default false */ sticky?: boolean; /** - * Determines the padding between the arrow and the tooltip edges. Useful when the tooltip - * element has rounded corners via `border-radius`. + * Minimum distance to maintain between the arrow and the edges of the popup. + * + * Use it to prevent the arrow element from hanging out of the rounded corners of a popup. * @default 5 */ arrowPadding?: number; diff --git a/packages/react/src/tooltip/provider/TooltipProvider.tsx b/packages/react/src/tooltip/provider/TooltipProvider.tsx index 84cbf60fbe..bfb2a82e93 100644 --- a/packages/react/src/tooltip/provider/TooltipProvider.tsx +++ b/packages/react/src/tooltip/provider/TooltipProvider.tsx @@ -22,16 +22,16 @@ namespace TooltipProvider { export interface Props { children?: React.ReactNode; /** - * The delay in milliseconds until tooltips within the group are open. + * How long to wait before opening a tooltip. Specified in milliseconds. */ delay?: number; /** - * The delay in milliseconds until tooltips within the group are closed. + * How long to wait before closing a tooltip. Specified in milliseconds. */ closeDelay?: number; /** - * The timeout in milliseconds until the grouping logic is no longer active after the last tooltip - * in the group has closed. + * Another tooltip will open instantly if the previous tooltip + * is closed within this timeout. Specified in milliseconds. * @default 400 */ timeout?: number; @@ -48,16 +48,16 @@ TooltipProvider.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * The delay in milliseconds until tooltips within the group are closed. + * How long to wait before closing a tooltip. Specified in milliseconds. */ closeDelay: PropTypes.number, /** - * The delay in milliseconds until tooltips within the group are open. + * How long to wait before opening a tooltip. Specified in milliseconds. */ delay: PropTypes.number, /** - * The timeout in milliseconds until the grouping logic is no longer active after the last tooltip - * in the group has closed. + * Another tooltip will open instantly if the previous tooltip + * is closed within this timeout. Specified in milliseconds. * @default 400 */ timeout: PropTypes.number, diff --git a/packages/react/src/tooltip/root/TooltipRoot.tsx b/packages/react/src/tooltip/root/TooltipRoot.tsx index f75ac293a1..97771d7179 100644 --- a/packages/react/src/tooltip/root/TooltipRoot.tsx +++ b/packages/react/src/tooltip/root/TooltipRoot.tsx @@ -123,8 +123,7 @@ TooltipRoot.propTypes /* remove-proptypes */ = { */ delay: PropTypes.number, /** - * Whether the user can move their cursor from the trigger element toward the tooltip popup element - * without it closing using a "safe polygon" technique. + * Whether the tooltip contents can be hovered without closing the tooltip. * @default true */ hoverable: PropTypes.bool, diff --git a/packages/react/src/tooltip/root/useTooltipRoot.ts b/packages/react/src/tooltip/root/useTooltipRoot.ts index f8eb29d864..b4f8ea8ac5 100644 --- a/packages/react/src/tooltip/root/useTooltipRoot.ts +++ b/packages/react/src/tooltip/root/useTooltipRoot.ts @@ -184,8 +184,7 @@ export namespace useTooltipRoot { */ onOpenChange?: (open: boolean, event?: Event, reason?: OpenChangeReason) => void; /** - * Whether the user can move their cursor from the trigger element toward the tooltip popup element - * without it closing using a "safe polygon" technique. + * Whether the tooltip contents can be hovered without closing the tooltip. * @default true */ hoverable?: boolean; diff --git a/packages/react/src/use-button/useButton.ts b/packages/react/src/use-button/useButton.ts index 01a8dc3df5..9972aeff3a 100644 --- a/packages/react/src/use-button/useButton.ts +++ b/packages/react/src/use-button/useButton.ts @@ -143,7 +143,7 @@ export function useButton(parameters: useButton.Parameters = {}): useButton.Retu export namespace useButton { export interface Parameters { /** - * Whether the component should ignore user actions. + * Whether the component should ignore user interaction. * @default false */ disabled?: boolean;