From 3d74e5282dd69b61bbc93990f44b8f58e3793f89 Mon Sep 17 00:00:00 2001 From: Vlad Moroz Date: Wed, 11 Dec 2024 19:19:23 +0100 Subject: [PATCH] [docs] Refine common props descriptions (#1045) --- .../tailwind/index.js | 6 +- .../tailwind/index.js | 6 +- .../tailwind/index.js | 18 ++- .../tailwind/index.js | 9 +- .../tailwind/index.js | 18 ++- .../tailwind/index.js | 9 +- .../reference/generated/accordion-header.json | 4 +- docs/reference/generated/accordion-item.json | 8 +- docs/reference/generated/accordion-panel.json | 8 +- docs/reference/generated/accordion-root.json | 22 ++-- .../generated/accordion-trigger.json | 4 +- .../generated/alert-dialog-backdrop.json | 6 +- .../generated/alert-dialog-close.json | 4 +- .../generated/alert-dialog-description.json | 4 +- .../generated/alert-dialog-popup.json | 10 +- .../generated/alert-dialog-root.json | 6 +- .../generated/alert-dialog-title.json | 4 +- .../generated/alert-dialog-trigger.json | 4 +- docs/reference/generated/checkbox-group.json | 6 +- .../generated/checkbox-indicator.json | 6 +- docs/reference/generated/checkbox-root.json | 22 ++-- .../generated/collapsible-panel.json | 8 +- .../reference/generated/collapsible-root.json | 10 +- .../generated/collapsible-trigger.json | 4 +- docs/reference/generated/dialog-backdrop.json | 6 +- docs/reference/generated/dialog-close.json | 4 +- .../generated/dialog-description.json | 4 +- docs/reference/generated/dialog-popup.json | 10 +- docs/reference/generated/dialog-root.json | 6 +- docs/reference/generated/dialog-title.json | 4 +- docs/reference/generated/dialog-trigger.json | 4 +- docs/reference/generated/field-control.json | 4 +- .../generated/field-description.json | 4 +- docs/reference/generated/field-error.json | 4 +- docs/reference/generated/field-label.json | 4 +- docs/reference/generated/field-root.json | 10 +- docs/reference/generated/fieldset-legend.json | 4 +- docs/reference/generated/fieldset-root.json | 4 +- docs/reference/generated/form.json | 4 +- docs/reference/generated/input.json | 4 +- docs/reference/generated/menu-arrow.json | 4 +- docs/reference/generated/menu-backdrop.json | 6 +- .../menu-checkbox-item-indicator.json | 6 +- .../generated/menu-checkbox-item.json | 8 +- .../reference/generated/menu-group-label.json | 4 +- docs/reference/generated/menu-group.json | 4 +- docs/reference/generated/menu-item.json | 2 +- docs/reference/generated/menu-popup.json | 4 +- docs/reference/generated/menu-positioner.json | 6 +- .../reference/generated/menu-radio-group.json | 4 +- .../generated/menu-radio-item-indicator.json | 6 +- docs/reference/generated/menu-radio-item.json | 2 +- docs/reference/generated/menu-root.json | 10 +- .../generated/menu-submenu-trigger.json | 6 +- docs/reference/generated/menu-trigger.json | 6 +- .../generated/number-field-decrement.json | 4 +- .../generated/number-field-group.json | 4 +- .../generated/number-field-increment.json | 4 +- .../generated/number-field-input.json | 4 +- .../generated/number-field-root.json | 14 +-- .../number-field-scrub-area-cursor.json | 4 +- .../generated/number-field-scrub-area.json | 4 +- docs/reference/generated/popover-arrow.json | 4 +- .../reference/generated/popover-backdrop.json | 6 +- docs/reference/generated/popover-close.json | 4 +- .../generated/popover-description.json | 4 +- docs/reference/generated/popover-popup.json | 8 +- .../generated/popover-positioner.json | 6 +- docs/reference/generated/popover-root.json | 7 +- docs/reference/generated/popover-title.json | 4 +- docs/reference/generated/popover-trigger.json | 4 +- docs/reference/generated/portal.json | 2 +- .../generated/preview-card-arrow.json | 4 +- .../generated/preview-card-backdrop.json | 6 +- .../generated/preview-card-popup.json | 4 +- .../generated/preview-card-positioner.json | 6 +- .../generated/preview-card-root.json | 7 +- .../generated/preview-card-trigger.json | 4 +- .../generated/progress-indicator.json | 4 +- docs/reference/generated/progress-root.json | 4 +- docs/reference/generated/progress-track.json | 4 +- docs/reference/generated/radio-group.json | 12 +- docs/reference/generated/radio-indicator.json | 6 +- docs/reference/generated/radio-root.json | 10 +- .../generated/scroll-area-corner.json | 4 +- .../reference/generated/scroll-area-root.json | 4 +- .../generated/scroll-area-scrollbar.json | 6 +- .../generated/scroll-area-thumb.json | 4 +- .../generated/scroll-area-viewport.json | 4 +- docs/reference/generated/select-arrow.json | 4 +- docs/reference/generated/select-backdrop.json | 6 +- .../generated/select-group-label.json | 4 +- docs/reference/generated/select-group.json | 4 +- docs/reference/generated/select-icon.json | 4 +- .../generated/select-item-indicator.json | 6 +- docs/reference/generated/select-item.json | 2 +- docs/reference/generated/select-popup.json | 4 +- .../generated/select-positioner.json | 4 +- docs/reference/generated/select-root.json | 14 +-- .../generated/select-scroll-down-arrow.json | 2 +- .../generated/select-scroll-up-arrow.json | 2 +- docs/reference/generated/select-trigger.json | 6 +- docs/reference/generated/select-value.json | 4 +- docs/reference/generated/separator.json | 4 +- docs/reference/generated/slider-control.json | 4 +- .../reference/generated/slider-indicator.json | 4 +- docs/reference/generated/slider-output.json | 4 +- docs/reference/generated/slider-root.json | 8 +- docs/reference/generated/slider-thumb.json | 4 +- docs/reference/generated/slider-track.json | 4 +- docs/reference/generated/switch-root.json | 20 +-- docs/reference/generated/switch-thumb.json | 4 +- docs/reference/generated/tabs-indicator.json | 4 +- docs/reference/generated/tabs-list.json | 6 +- docs/reference/generated/tabs-panel.json | 6 +- docs/reference/generated/tabs-root.json | 4 +- docs/reference/generated/tabs-tab.json | 4 +- docs/reference/generated/toggle-group.json | 14 ++- docs/reference/generated/toggle.json | 6 +- docs/reference/generated/tooltip-arrow.json | 4 +- docs/reference/generated/tooltip-popup.json | 4 +- .../generated/tooltip-positioner.json | 6 +- docs/reference/generated/tooltip-root.json | 7 +- docs/reference/generated/tooltip-trigger.json | 4 +- .../reference/ReferenceTablePopover.tsx | 4 +- docs/src/mdx-components.tsx | 3 +- docs/src/syntax-highlighting/index.css | 2 + package.json | 2 +- .../src/accordion/header/AccordionHeader.tsx | 8 +- .../src/accordion/item/AccordionItem.tsx | 12 +- .../src/accordion/panel/AccordionPanel.tsx | 20 +-- .../src/accordion/root/AccordionRoot.tsx | 58 +++++---- .../src/accordion/root/useAccordionRoot.ts | 25 ++-- .../accordion/trigger/AccordionTrigger.tsx | 8 +- .../backdrop/AlertDialogBackdrop.tsx | 17 ++- .../alert-dialog/close/AlertDialogClose.tsx | 8 +- .../description/AlertDialogDescription.tsx | 8 +- .../alert-dialog/popup/AlertDialogPopup.tsx | 35 +++--- .../src/alert-dialog/root/AlertDialogRoot.tsx | 8 +- .../alert-dialog/title/AlertDialogTitle.tsx | 8 +- .../trigger/AlertDialogTrigger.tsx | 11 +- .../src/checkbox-group/CheckboxGroup.tsx | 15 ++- .../checkbox/indicator/CheckboxIndicator.tsx | 12 +- .../react/src/checkbox/root/CheckboxRoot.tsx | 50 +++++--- .../src/checkbox/root/useCheckboxRoot.ts | 29 ++--- .../collapsible/panel/CollapsiblePanel.tsx | 38 +++--- .../collapsible/panel/useCollapsiblePanel.ts | 14 +-- .../src/collapsible/root/CollapsibleRoot.tsx | 16 +-- .../collapsible/root/useCollapsibleRoot.ts | 18 +-- .../trigger/CollapsibleTrigger.tsx | 8 +- .../trigger/useCollapsibleTrigger.ts | 6 +- .../src/composite/item/CompositeItem.tsx | 8 +- .../src/composite/root/CompositeRoot.tsx | 8 +- .../src/dialog/backdrop/DialogBackdrop.tsx | 17 ++- .../react/src/dialog/close/DialogClose.tsx | 8 +- .../react/src/dialog/close/useDialogClose.ts | 4 +- .../dialog/description/DialogDescription.tsx | 8 +- .../react/src/dialog/popup/DialogPopup.tsx | 35 +++--- .../react/src/dialog/popup/useDialogPopup.tsx | 9 +- packages/react/src/dialog/root/DialogRoot.tsx | 8 +- .../react/src/dialog/root/useDialogRoot.ts | 12 +- .../react/src/dialog/title/DialogTitle.tsx | 8 +- .../src/dialog/trigger/DialogTrigger.tsx | 11 +- .../react/src/field/control/FieldControl.tsx | 8 +- .../field/description/FieldDescription.tsx | 8 +- packages/react/src/field/error/FieldError.tsx | 8 +- packages/react/src/field/label/FieldLabel.tsx | 8 +- packages/react/src/field/root/FieldRoot.tsx | 29 +++-- .../src/fieldset/legend/FieldsetLegend.tsx | 11 +- .../react/src/fieldset/root/FieldsetRoot.tsx | 11 +- packages/react/src/form/Form.tsx | 8 +- packages/react/src/input/Input.tsx | 8 +- packages/react/src/menu/arrow/MenuArrow.tsx | 11 +- .../react/src/menu/backdrop/MenuBackdrop.tsx | 15 ++- .../MenuCheckboxItemIndicator.tsx | 20 ++- .../menu/checkbox-item/MenuCheckboxItem.tsx | 47 ++++--- .../src/menu/group-label/MenuGroupLabel.tsx | 8 +- packages/react/src/menu/group/MenuGroup.tsx | 8 +- packages/react/src/menu/item/MenuItem.tsx | 17 ++- packages/react/src/menu/item/useMenuItem.ts | 2 +- packages/react/src/menu/popup/MenuPopup.tsx | 11 +- .../src/menu/positioner/MenuPositioner.tsx | 13 +- .../src/menu/positioner/useMenuPositioner.ts | 4 +- .../src/menu/radio-group/MenuRadioGroup.tsx | 8 +- .../MenuRadioItemIndicator.tsx | 20 ++- .../src/menu/radio-item/MenuRadioItem.tsx | 20 ++- packages/react/src/menu/root/MenuRoot.tsx | 28 ++--- packages/react/src/menu/root/useMenuRoot.ts | 14 ++- .../submenu-trigger/MenuSubmenuTrigger.tsx | 18 ++- .../submenu-trigger/useMenuSubmenuTrigger.ts | 2 +- .../react/src/menu/trigger/MenuTrigger.tsx | 15 ++- .../react/src/menu/trigger/useMenuTrigger.ts | 4 +- .../decrement/NumberFieldDecrement.tsx | 8 +- .../number-field/group/NumberFieldGroup.tsx | 8 +- .../increment/NumberFieldIncrement.tsx | 8 +- .../number-field/input/NumberFieldInput.tsx | 8 +- .../src/number-field/root/NumberFieldRoot.tsx | 32 ++--- .../number-field/root/useNumberFieldRoot.ts | 10 +- .../NumberFieldScrubAreaCursor.tsx | 8 +- .../scrub-area/NumberFieldScrubArea.tsx | 8 +- .../react/src/popover/arrow/PopoverArrow.tsx | 11 +- .../src/popover/backdrop/PopoverBackdrop.tsx | 15 ++- .../react/src/popover/close/PopoverClose.tsx | 8 +- .../description/PopoverDescription.tsx | 8 +- .../react/src/popover/popup/PopoverPopup.tsx | 29 +++-- .../popover/positioner/PopoverPositioner.tsx | 13 +- .../positioner/usePopoverPositioner.tsx | 5 +- .../react/src/popover/root/PopoverRoot.tsx | 10 +- .../react/src/popover/root/usePopoverRoot.ts | 10 +- .../react/src/popover/title/PopoverTitle.tsx | 8 +- .../src/popover/trigger/PopoverTrigger.tsx | 11 +- packages/react/src/portal/Portal.tsx | 4 +- .../preview-card/arrow/PreviewCardArrow.tsx | 11 +- .../backdrop/PreviewCardBackdrop.tsx | 15 ++- .../preview-card/popup/PreviewCardPopup.tsx | 11 +- .../positioner/PreviewCardPositioner.tsx | 13 +- .../positioner/usePreviewCardPositioner.ts | 4 +- .../src/preview-card/root/PreviewCardRoot.tsx | 10 +- .../preview-card/root/usePreviewCardRoot.ts | 10 +- .../trigger/PreviewCardTrigger.tsx | 11 +- .../progress/indicator/ProgressIndicator.tsx | 8 +- .../react/src/progress/root/ProgressRoot.tsx | 8 +- .../src/progress/track/ProgressTrack.tsx | 8 +- packages/react/src/radio-group/RadioGroup.tsx | 30 +++-- .../src/radio/indicator/RadioIndicator.tsx | 15 ++- packages/react/src/radio/root/RadioRoot.tsx | 29 +++-- .../scroll-area/corner/ScrollAreaCorner.tsx | 8 +- .../src/scroll-area/root/ScrollAreaRoot.tsx | 8 +- .../scrollbar/ScrollAreaScrollbar.tsx | 12 +- .../src/scroll-area/thumb/ScrollAreaThumb.tsx | 8 +- .../viewport/ScrollAreaViewport.tsx | 8 +- .../react/src/select/arrow/SelectArrow.tsx | 11 +- .../src/select/backdrop/SelectBackdrop.tsx | 15 ++- .../select/group-label/SelectGroupLabel.tsx | 8 +- .../react/src/select/group/SelectGroup.tsx | 8 +- packages/react/src/select/icon/SelectIcon.tsx | 8 +- .../item-indicator/SelectItemIndicator.tsx | 14 ++- .../src/select/item-text/SelectItemText.tsx | 8 +- packages/react/src/select/item/SelectItem.tsx | 20 ++- .../react/src/select/item/useSelectItem.ts | 4 +- .../react/src/select/popup/SelectPopup.tsx | 8 +- .../select/positioner/SelectPositioner.tsx | 8 +- .../select/positioner/useSelectPositioner.ts | 4 +- packages/react/src/select/root/SelectRoot.tsx | 17 ++- .../react/src/select/root/useSelectRoot.ts | 17 ++- .../select/scroll-arrow/SelectScrollArrow.tsx | 12 +- .../SelectScrollDownArrow.tsx | 4 +- .../scroll-up-arrow/SelectScrollUpArrow.tsx | 4 +- .../src/select/trigger/SelectTrigger.tsx | 15 ++- .../src/select/trigger/useSelectTrigger.ts | 2 +- .../react/src/select/value/SelectValue.tsx | 8 +- packages/react/src/separator/Separator.tsx | 8 +- .../src/slider/control/SliderControl.tsx | 8 +- .../src/slider/indicator/SliderIndicator.tsx | 8 +- .../react/src/slider/output/SliderOutput.tsx | 8 +- packages/react/src/slider/root/SliderRoot.tsx | 20 +-- .../react/src/slider/root/useSliderRoot.ts | 8 +- .../react/src/slider/thumb/SliderThumb.tsx | 13 +- .../react/src/slider/track/SliderTrack.tsx | 8 +- packages/react/src/switch/root/SwitchRoot.tsx | 45 ++++--- .../react/src/switch/root/useSwitchRoot.ts | 27 ++-- .../react/src/switch/thumb/SwitchThumb.tsx | 8 +- .../src/tabs/indicator/TabsIndicator.tsx | 8 +- packages/react/src/tabs/list/TabsList.tsx | 16 ++- packages/react/src/tabs/panel/TabsPanel.tsx | 12 +- packages/react/src/tabs/root/TabsRoot.tsx | 8 +- packages/react/src/tabs/tab/TabsTab.tsx | 11 +- packages/react/src/tabs/tab/useTabsTab.ts | 2 +- .../react/src/toggle-group/ToggleGroup.tsx | 19 ++- .../react/src/toggle-group/useToggleGroup.ts | 10 +- packages/react/src/toggle/Toggle.tsx | 15 ++- packages/react/src/toggle/useToggle.ts | 6 +- .../react/src/tooltip/arrow/TooltipArrow.tsx | 11 +- .../react/src/tooltip/popup/TooltipPopup.tsx | 11 +- .../tooltip/positioner/TooltipPositioner.tsx | 13 +- .../positioner/useTooltipPositioner.ts | 8 +- .../react/src/tooltip/root/TooltipRoot.tsx | 9 +- .../react/src/tooltip/root/useTooltipRoot.ts | 9 +- .../src/tooltip/trigger/TooltipTrigger.tsx | 11 +- packages/react/src/use-button/useButton.ts | 2 +- packages/react/src/utils/types.ts | 8 +- pnpm-lock.yaml | 116 +++++++++--------- 282 files changed, 1737 insertions(+), 1071 deletions(-) diff --git a/docs/data/components/checkbox-group/UnstyledCheckboxGroupIntroduction/tailwind/index.js b/docs/data/components/checkbox-group/UnstyledCheckboxGroupIntroduction/tailwind/index.js index a15b47f467..b20e85c483 100644 --- a/docs/data/components/checkbox-group/UnstyledCheckboxGroupIntroduction/tailwind/index.js +++ b/docs/data/components/checkbox-group/UnstyledCheckboxGroupIntroduction/tailwind/index.js @@ -92,7 +92,8 @@ const Checkbox = React.forwardRef(function Checkbox(props, ref) { Checkbox.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -118,7 +119,8 @@ const Indicator = React.forwardRef(function Indicator(props, ref) { Indicator.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; diff --git a/docs/data/components/checkbox/UnstyledCheckboxIntroduction/tailwind/index.js b/docs/data/components/checkbox/UnstyledCheckboxIntroduction/tailwind/index.js index 2ff92dbb73..229b134b2d 100644 --- a/docs/data/components/checkbox/UnstyledCheckboxIntroduction/tailwind/index.js +++ b/docs/data/components/checkbox/UnstyledCheckboxIntroduction/tailwind/index.js @@ -64,7 +64,8 @@ const Checkbox = React.forwardRef(function Checkbox(props, ref) { Checkbox.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -90,7 +91,8 @@ const Indicator = React.forwardRef(function Indicator(props, ref) { Indicator.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; diff --git a/docs/data/components/number-field/UnstyledNumberFieldIntroduction/tailwind/index.js b/docs/data/components/number-field/UnstyledNumberFieldIntroduction/tailwind/index.js index f990d2237e..4650e0b721 100644 --- a/docs/data/components/number-field/UnstyledNumberFieldIntroduction/tailwind/index.js +++ b/docs/data/components/number-field/UnstyledNumberFieldIntroduction/tailwind/index.js @@ -84,7 +84,8 @@ const NumberFieldGroup = React.forwardRef(function NumberFieldGroup(props, ref) NumberFieldGroup.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -110,7 +111,8 @@ const NumberFieldScrubArea = React.forwardRef( NumberFieldScrubArea.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -136,7 +138,8 @@ const NumberFieldVirtualCursor = React.forwardRef( NumberFieldVirtualCursor.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -168,7 +171,8 @@ const NumberFieldInput = React.forwardRef(function NumberFieldInput(props, ref) NumberFieldInput.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -211,7 +215,8 @@ const NumberFieldDecrement = React.forwardRef( NumberFieldDecrement.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -239,7 +244,8 @@ const NumberFieldIncrement = React.forwardRef( NumberFieldIncrement.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; diff --git a/docs/data/components/progress/UnstyledProgressIntroduction/tailwind/index.js b/docs/data/components/progress/UnstyledProgressIntroduction/tailwind/index.js index 6a3411f163..aa553aa9dc 100644 --- a/docs/data/components/progress/UnstyledProgressIntroduction/tailwind/index.js +++ b/docs/data/components/progress/UnstyledProgressIntroduction/tailwind/index.js @@ -38,7 +38,8 @@ const Progress = React.forwardRef(function Progress(props, ref) { Progress.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -62,7 +63,8 @@ const ProgressTrack = React.forwardRef(function ProgressTrack(props, ref) { ProgressTrack.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -86,7 +88,8 @@ const ProgressIndicator = React.forwardRef(function ProgressIndicator(props, ref ProgressIndicator.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; diff --git a/docs/data/components/slider/UnstyledSliderIntroduction/tailwind/index.js b/docs/data/components/slider/UnstyledSliderIntroduction/tailwind/index.js index fd6d08dff0..4b72e9a1cd 100644 --- a/docs/data/components/slider/UnstyledSliderIntroduction/tailwind/index.js +++ b/docs/data/components/slider/UnstyledSliderIntroduction/tailwind/index.js @@ -57,7 +57,8 @@ const Slider = React.forwardRef(function Slider(props, ref) { Slider.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -81,7 +82,8 @@ const SliderOutput = React.forwardRef(function SliderOutput(props, ref) { SliderOutput.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -106,7 +108,8 @@ const SliderControl = React.forwardRef(function SliderControl(props, ref) { SliderControl.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -130,7 +133,8 @@ const SliderTrack = React.forwardRef(function SliderTrack(props, ref) { SliderTrack.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -156,7 +160,8 @@ const SliderThumb = React.forwardRef(function SliderThumb(props, ref) { SliderThumb.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -180,7 +185,8 @@ const SliderIndicator = React.forwardRef(function SliderIndicator(props, ref) { SliderIndicator.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; diff --git a/docs/data/components/tabs/UnstyledTabsIntroduction/tailwind/index.js b/docs/data/components/tabs/UnstyledTabsIntroduction/tailwind/index.js index af32b33012..01697af804 100644 --- a/docs/data/components/tabs/UnstyledTabsIntroduction/tailwind/index.js +++ b/docs/data/components/tabs/UnstyledTabsIntroduction/tailwind/index.js @@ -46,7 +46,8 @@ const TabsList = React.forwardRef((props, ref) => { TabsList.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -75,7 +76,8 @@ const Tab = React.forwardRef((props, ref) => { Tab.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; @@ -96,7 +98,8 @@ const TabPanel = React.forwardRef((props, ref) => { TabPanel.propTypes = { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), }; diff --git a/docs/reference/generated/accordion-header.json b/docs/reference/generated/accordion-header.json index b1f72844c1..0a231c549c 100644 --- a/docs/reference/generated/accordion-header.json +++ b/docs/reference/generated/accordion-header.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/accordion-item.json b/docs/reference/generated/accordion-item.json index 74bde71031..5df374b8f1 100644 --- a/docs/reference/generated/accordion-item.json +++ b/docs/reference/generated/accordion-item.json @@ -4,20 +4,20 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the component is disabled." + "description": "Whether the component should ignore user actions." }, "onOpenChange": { "type": "(open) => void", - "description": "Callback fired when the Collapsible is opened or closed." + "description": "Event handler called when the panel is opened or closed." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/accordion-panel.json b/docs/reference/generated/accordion-panel.json index ab3150aa10..431f5d2f92 100644 --- a/docs/reference/generated/accordion-panel.json +++ b/docs/reference/generated/accordion-panel.json @@ -4,21 +4,21 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "hiddenUntilFound": { "type": "boolean", "default": "false", - "description": "If `true`, sets `hidden=\"until-found\"` when closed. Accordion panels\nwill remain mounted in the DOM when closed and overrides `keepMounted`.\nIf `false`, sets `hidden` when closed." + "description": "Allows the browser’s built-in page search to find and expand the panel contents.\n\nOverrides the `keepMounted` prop and uses `hidden=\"until-found\"`\nto hide the element without removing it from the DOM." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, accordion panels remains mounted when closed and is instead\nhidden using the `hidden` attribute.\nIf `false`, accordion panels are unmounted when closed." + "description": "Whether to keep the element in the DOM while the panel is closed.\nThis prop is ignored when `hiddenUntilFound` is used." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/accordion-root.json b/docs/reference/generated/accordion-root.json index 4ff8e9cfa4..bbae62e20a 100644 --- a/docs/reference/generated/accordion-root.json +++ b/docs/reference/generated/accordion-root.json @@ -4,53 +4,53 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultValue": { "type": "array", - "description": "The default value representing the currently open `Accordion.Item`\nThis is the uncontrolled counterpart of `value`." + "description": "The uncontrolled value of the item(s) that should be expanded.\nTo render a controlled accordion, use the `value` prop instead." }, "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the component is disabled." + "description": "Whether the component should ignore user actions." }, "hiddenUntilFound": { "type": "boolean", "default": "false", - "description": "If `true`, sets `hidden=\"until-found\"` when closed. Accordion panels\nwill remain mounted in the DOM when closed and overrides `keepMounted`.\nIf `false`, sets `hidden` when closed." + "description": "Allows the browser’s built-in page search to find and expand the panel contents.\n\nOverrides the `keepMounted` prop and uses `hidden=\"until-found\"`\nto hide the element without removing it from the DOM." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, accordion panels remains mounted when closed and is instead\nhidden using the `hidden` attribute.\nIf `false`, accordion panels are unmounted when closed." + "description": "Whether to keep the element in the DOM while the panel is closed.\nThis prop is ignored when `hiddenUntilFound` is used." }, "loop": { "type": "boolean", "default": "true", - "description": "If `true`, focus will loop when moving focus between `Trigger`s using\nthe arrow keys." + "description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys." }, "onValueChange": { "type": "(value) => void", - "description": "Callback fired when an Accordion section is opened or closed.\nThe value representing the involved section is provided as an argument." + "description": "Event handler called when an accordion item is expanded or collapsed.\nProvides the new value as an argument." }, "openMultiple": { "type": "boolean", "default": "true", - "description": "Whether multiple Accordion sections can be opened at the same time." + "description": "Whether multiple items can be open at the same time." }, "orientation": { "type": "'horizontal' | 'vertical'", "default": "'vertical'", - "description": "The orientation of the accordion." + "description": "The visual orientation of the accordion.\nControls whether the roving focus uses left/right or up/down arrow keys." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "value": { "type": "array", - "description": "The value of the currently open `Accordion.Item`\nThis is the controlled counterpart of `defaultValue`." + "description": "The controlled value of the item(s) that should be expanded.\nTo render an controlled accordion, use the `defaultValue` prop instead." } }, "dataAttributes": { diff --git a/docs/reference/generated/accordion-trigger.json b/docs/reference/generated/accordion-trigger.json index 06ea114635..e35912b480 100644 --- a/docs/reference/generated/accordion-trigger.json +++ b/docs/reference/generated/accordion-trigger.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/alert-dialog-backdrop.json b/docs/reference/generated/alert-dialog-backdrop.json index a5e270a234..4cd2a52e9d 100644 --- a/docs/reference/generated/alert-dialog-backdrop.json +++ b/docs/reference/generated/alert-dialog-backdrop.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, the backdrop element is kept in the DOM when closed." + "description": "Whether to keep the element in the DOM while the alert dialog is hidden." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/alert-dialog-close.json b/docs/reference/generated/alert-dialog-close.json index 5da3e39c96..710db97ea3 100644 --- a/docs/reference/generated/alert-dialog-close.json +++ b/docs/reference/generated/alert-dialog-close.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/alert-dialog-description.json b/docs/reference/generated/alert-dialog-description.json index 6e71d77858..72c48f6a45 100644 --- a/docs/reference/generated/alert-dialog-description.json +++ b/docs/reference/generated/alert-dialog-description.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/alert-dialog-popup.json b/docs/reference/generated/alert-dialog-popup.json index daa9a3512d..1898017325 100644 --- a/docs/reference/generated/alert-dialog-popup.json +++ b/docs/reference/generated/alert-dialog-popup.json @@ -4,24 +4,24 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "finalFocus": { "type": "React.Ref", - "description": "Determines an element to focus after the dialog is closed.\nIf not provided, the focus returns to the trigger." + "description": "Determines the element to focus when the dialog is closed.\nBy default, focus returns to trigger." }, "initialFocus": { "type": "React.Ref | (interactionType => HTMLElement | null)", - "description": "Determines an element to focus when the dialog is opened.\nIt can be either a ref to the element or a function that returns such a ref.\nIf not provided, the first focusable element is focused." + "description": "Determines the element to focus when the dialog is opened.\nBy default, the first focusable element is focused." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, the dialog element is kept in the DOM when closed." + "description": "Whether to keep the element in the DOM while the alert dialog is hidden." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/alert-dialog-root.json b/docs/reference/generated/alert-dialog-root.json index aabd14e661..8a164c1be0 100644 --- a/docs/reference/generated/alert-dialog-root.json +++ b/docs/reference/generated/alert-dialog-root.json @@ -5,15 +5,15 @@ "defaultOpen": { "type": "boolean", "default": "false", - "description": "Determines whether the dialog is initally open.\nThis is an uncontrolled equivalent of the `open` prop." + "description": "Whether the dialog is initially open.\n\nTo render a controlled dialog, use the `open` prop instead." }, "onOpenChange": { "type": "(open, event) => void", - "description": "Callback invoked when the dialog is being opened or closed." + "description": "Event handler called when the dialog is opened or closed." }, "open": { "type": "boolean", - "description": "Determines whether the dialog is open." + "description": "Whether the dialog is currently open." } } } diff --git a/docs/reference/generated/alert-dialog-title.json b/docs/reference/generated/alert-dialog-title.json index fcb91f9284..2d80e40e3e 100644 --- a/docs/reference/generated/alert-dialog-title.json +++ b/docs/reference/generated/alert-dialog-title.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/alert-dialog-trigger.json b/docs/reference/generated/alert-dialog-trigger.json index 54f9b00572..fcdcd92d25 100644 --- a/docs/reference/generated/alert-dialog-trigger.json +++ b/docs/reference/generated/alert-dialog-trigger.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/checkbox-group.json b/docs/reference/generated/checkbox-group.json index 2e76b6943e..ae7c0888bc 100644 --- a/docs/reference/generated/checkbox-group.json +++ b/docs/reference/generated/checkbox-group.json @@ -8,7 +8,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultValue": { "type": "string[]", @@ -17,7 +17,7 @@ "disabled": { "type": "boolean", "default": "false", - "description": "Whether the checkbox group is disabled." + "description": "Whether the component should ignore user actions." }, "onValueChange": { "type": "(value, event) => void", @@ -25,7 +25,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "value": { "type": "string[]", diff --git a/docs/reference/generated/checkbox-indicator.json b/docs/reference/generated/checkbox-indicator.json index 664d292a10..8f8ad72831 100644 --- a/docs/reference/generated/checkbox-indicator.json +++ b/docs/reference/generated/checkbox-indicator.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "Determines if the indicator stays mounted when unchecked." + "description": "Whether to keep the element in the DOM when the checkbox is not checked." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/checkbox-root.json b/docs/reference/generated/checkbox-root.json index 34d077da6b..75d1775663 100644 --- a/docs/reference/generated/checkbox-root.json +++ b/docs/reference/generated/checkbox-root.json @@ -5,39 +5,39 @@ "checked": { "type": "boolean", "default": "undefined", - "description": "If `true`, the component is checked." + "description": "Whether the checkbox is currently ticked.\n\nTo render an uncontrolled checkbox, use the `defaultChecked` prop instead." }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultChecked": { "type": "boolean", "default": "false", - "description": "The default checked state. Use when the component is not controlled." + "description": "Whether the checkbox is initially ticked.\n\nTo render a controlled checkbox, use the `checked` prop instead." }, "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the component is disabled." + "description": "Whether the component should ignore user actions." }, "indeterminate": { "type": "boolean", "default": "false", - "description": "If `true`, the checkbox will be indeterminate." + "description": "Whether the checkbox is in a mixed state: neither ticked, nor unticked." }, "inputRef": { "type": "React.Ref", - "description": "The ref to the input element." + "description": "A React ref to access the hidden `` element." }, "name": { "type": "string", "default": "undefined", - "description": "Name of the underlying input element." + "description": "Identifies the field when a form is submitted." }, "onCheckedChange": { "type": "(checked, event) => void", - "description": "Callback fired when the checked state is changed." + "description": "Event handler called when the checkbox is ticked or unticked." }, "parent": { "type": "boolean", @@ -47,16 +47,16 @@ "readOnly": { "type": "boolean", "default": "false", - "description": "If `true`, the component is read only." + "description": "Whether the user should be unable to tick or untick the checkbox." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "required": { "type": "boolean", "default": "false", - "description": "If `true`, the `input` element is required." + "description": "Whether the user must tick the checkbox before submitting a form." } }, "dataAttributes": { diff --git a/docs/reference/generated/collapsible-panel.json b/docs/reference/generated/collapsible-panel.json index 7a5b3d2ce3..347905ebcf 100644 --- a/docs/reference/generated/collapsible-panel.json +++ b/docs/reference/generated/collapsible-panel.json @@ -4,21 +4,21 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "hiddenUntilFound": { "type": "boolean", "default": "false", - "description": "If `true`, sets the hidden state using `hidden=\"until-found\"`. The panel\nremains mounted in the DOM when closed and overrides `keepMounted`.\nIf `false`, sets the hidden state using `hidden`." + "description": "Allows the browser’s built-in page search to find and expand the panel contents.\n\nOverrides the `keepMounted` prop and uses `hidden=\"until-found\"`\nto hide the element without removing it from the DOM." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, the panel remains mounted when closed and is instead\nhidden using the `hidden` attribute\nIf `false`, the panel is unmounted when closed.\nIf the `hiddenUntilFound` prop is used, the panel overrides this prop and\nis remains mounted when closed." + "description": "Whether to keep the element in the DOM while the panel is hidden.\nThis prop is ignored when `hiddenUntilFound` is used." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "cssVariables": { diff --git a/docs/reference/generated/collapsible-root.json b/docs/reference/generated/collapsible-root.json index 5909a8f109..33adb7ffac 100644 --- a/docs/reference/generated/collapsible-root.json +++ b/docs/reference/generated/collapsible-root.json @@ -4,25 +4,25 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultOpen": { "type": "boolean", "default": "false", - "description": "If `true`, the Collapsible is initially open.\nThis is the uncontrolled counterpart of `open`." + "description": "Whether the collapsible panel is initially open.\n\nTo render a controlled collapsible, use the `open` prop instead." }, "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the component is disabled." + "description": "Whether the component should ignore user actions." }, "onOpenChange": { "type": "(open) => void", - "description": "Callback fired when the Collapsible is opened or closed." + "description": "Event handler called when the panel is opened or closed." }, "open": { "type": "boolean", - "description": "If `true`, the Collapsible is initially open.\nThis is the controlled counterpart of `defaultOpen`." + "description": "Whether the collapsible panel is currently open.\nTo render an uncontrolled collapsible, use the `defaultOpen` prop instead." } } } diff --git a/docs/reference/generated/collapsible-trigger.json b/docs/reference/generated/collapsible-trigger.json index e106198972..f4f8b946dc 100644 --- a/docs/reference/generated/collapsible-trigger.json +++ b/docs/reference/generated/collapsible-trigger.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/dialog-backdrop.json b/docs/reference/generated/dialog-backdrop.json index abcb0e2d01..1f9d320f20 100644 --- a/docs/reference/generated/dialog-backdrop.json +++ b/docs/reference/generated/dialog-backdrop.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, the backdrop element is kept in the DOM when closed." + "description": "Whether to keep the HTML element in the DOM while the dialog is hidden." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/dialog-close.json b/docs/reference/generated/dialog-close.json index aef7d07602..a583d6716c 100644 --- a/docs/reference/generated/dialog-close.json +++ b/docs/reference/generated/dialog-close.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/dialog-description.json b/docs/reference/generated/dialog-description.json index c36feb594b..1c53b0cb12 100644 --- a/docs/reference/generated/dialog-description.json +++ b/docs/reference/generated/dialog-description.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/dialog-popup.json b/docs/reference/generated/dialog-popup.json index 25b0494992..100eb9d821 100644 --- a/docs/reference/generated/dialog-popup.json +++ b/docs/reference/generated/dialog-popup.json @@ -4,24 +4,24 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "finalFocus": { "type": "React.Ref", - "description": "Determines an element to focus after the dialog is closed.\nIf not provided, the focus returns to the trigger." + "description": "Determines the element to focus when the dialog is closed.\nBy default, focus returns to trigger." }, "initialFocus": { "type": "React.Ref | (interactionType => HTMLElement | null)", - "description": "Determines an element to focus when the dialog is opened.\nIt can be either a ref to the element or a function that returns such a ref.\nIf not provided, the first focusable element is focused." + "description": "Determines the element to focus when the dialog is opened.\nBy default, the first focusable element is focused." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, the dialog element is kept in the DOM when closed." + "description": "Whether to keep the HTML element in the DOM while the dialog is hidden." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/dialog-root.json b/docs/reference/generated/dialog-root.json index 2d024099bf..7d21ed801d 100644 --- a/docs/reference/generated/dialog-root.json +++ b/docs/reference/generated/dialog-root.json @@ -5,7 +5,7 @@ "defaultOpen": { "type": "boolean", "default": "false", - "description": "Determines whether the dialog is initally open.\nThis is an uncontrolled equivalent of the `open` prop." + "description": "Whether the dialog is initially open.\n\nTo render a controlled dialog, use the `open` prop instead." }, "dismissible": { "type": "boolean", @@ -19,11 +19,11 @@ }, "onOpenChange": { "type": "(open, event) => void", - "description": "Callback invoked when the dialog is being opened or closed." + "description": "Event handler called when the dialog is opened or closed." }, "open": { "type": "boolean", - "description": "Determines whether the dialog is open." + "description": "Whether the dialog is currently open." } } } diff --git a/docs/reference/generated/dialog-title.json b/docs/reference/generated/dialog-title.json index e89580eb62..f8ae9823fb 100644 --- a/docs/reference/generated/dialog-title.json +++ b/docs/reference/generated/dialog-title.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/dialog-trigger.json b/docs/reference/generated/dialog-trigger.json index 8912b71ab1..5bbcec7368 100644 --- a/docs/reference/generated/dialog-trigger.json +++ b/docs/reference/generated/dialog-trigger.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/field-control.json b/docs/reference/generated/field-control.json index f2afd6c0ea..564f35f9f0 100644 --- a/docs/reference/generated/field-control.json +++ b/docs/reference/generated/field-control.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "onValueChange": { "type": "(value, event) => void", @@ -12,7 +12,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/field-description.json b/docs/reference/generated/field-description.json index d612b97967..313a107eb4 100644 --- a/docs/reference/generated/field-description.json +++ b/docs/reference/generated/field-description.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/field-error.json b/docs/reference/generated/field-error.json index 030d4e5726..271ebfe649 100644 --- a/docs/reference/generated/field-error.json +++ b/docs/reference/generated/field-error.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "forceShow": { "type": "boolean", @@ -16,7 +16,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/field-label.json b/docs/reference/generated/field-label.json index 3fc22fb124..218c694a6b 100644 --- a/docs/reference/generated/field-label.json +++ b/docs/reference/generated/field-label.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/field-root.json b/docs/reference/generated/field-root.json index 16583fd751..a0e977fa0b 100644 --- a/docs/reference/generated/field-root.json +++ b/docs/reference/generated/field-root.json @@ -4,24 +4,24 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "disabled": { "type": "boolean", "default": "false", - "description": "Whether the field is disabled. Takes precedence over the `disabled` prop of the `Field.Control`\ncomponent." + "description": "Whether the component should ignore user actions.\nTakes precedence over the `disabled` prop on the `` component." }, "invalid": { "type": "boolean", - "description": "Determines if the field is forcefully marked as invalid." + "description": "Whether the field is forcefully marked as invalid." }, "name": { "type": "string", - "description": "The field's name. Takes precedence over the `name` prop of the `Field.Control` component." + "description": "Identifies the field when a form is submitted.\nTakes precedence over the `name` prop on the `` component." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "validate": { "type": "(value) => string | string[] | null | Promise", diff --git a/docs/reference/generated/fieldset-legend.json b/docs/reference/generated/fieldset-legend.json index c36529bd2a..440b05c867 100644 --- a/docs/reference/generated/fieldset-legend.json +++ b/docs/reference/generated/fieldset-legend.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/fieldset-root.json b/docs/reference/generated/fieldset-root.json index 759fbe0084..8bc055feb7 100644 --- a/docs/reference/generated/fieldset-root.json +++ b/docs/reference/generated/fieldset-root.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/form.json b/docs/reference/generated/form.json index b82c1aa797..c5a4bd932d 100644 --- a/docs/reference/generated/form.json +++ b/docs/reference/generated/form.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "errors": { "type": "Record", @@ -16,7 +16,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/input.json b/docs/reference/generated/input.json index 94b50aaf56..6f4649c1f1 100644 --- a/docs/reference/generated/input.json +++ b/docs/reference/generated/input.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/menu-arrow.json b/docs/reference/generated/menu-arrow.json index 5701e7bb23..f743382c30 100644 --- a/docs/reference/generated/menu-arrow.json +++ b/docs/reference/generated/menu-arrow.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/menu-backdrop.json b/docs/reference/generated/menu-backdrop.json index a893a88361..5a27418d9b 100644 --- a/docs/reference/generated/menu-backdrop.json +++ b/docs/reference/generated/menu-backdrop.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, the backdrop remains mounted when the menu popup is closed." + "description": "Whether to keep the HTML element in the DOM when the menu is hidden." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/menu-checkbox-item-indicator.json b/docs/reference/generated/menu-checkbox-item-indicator.json index 96370fa334..e15e42f37b 100644 --- a/docs/reference/generated/menu-checkbox-item-indicator.json +++ b/docs/reference/generated/menu-checkbox-item-indicator.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "true", - "description": "If `true`, the component is mounted even if the checkbox is not checked." + "description": "Whether to keep the HTML element in the DOM when the checkbox item is not checked." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/menu-checkbox-item.json b/docs/reference/generated/menu-checkbox-item.json index f326c69930..52a7fede81 100644 --- a/docs/reference/generated/menu-checkbox-item.json +++ b/docs/reference/generated/menu-checkbox-item.json @@ -4,7 +4,7 @@ "props": { "checked": { "type": "boolean", - "description": "If `true`, the checkbox is checked." + "description": "Whether the checkbox item is currently ticked.\n\nTo render an uncontrolled checkbox item, use the `defaultChecked` prop instead." }, "closeOnClick": { "type": "boolean", @@ -14,12 +14,12 @@ "defaultChecked": { "type": "boolean", "default": "false", - "description": "The default checked state. Use when the component is uncontrolled." + "description": "Whether the checkbox item is initially ticked.\n\nTo render a controlled checkbox item, use the `checked` prop instead." }, "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the menu item will be disabled." + "description": "Whether the component should ignore user actions." }, "id": { "type": "string", @@ -31,7 +31,7 @@ }, "onCheckedChange": { "type": "function", - "description": "Callback fired when the checked state is changed." + "description": "Event handler called when the checkbox item is ticked or unticked." }, "onClick": { "type": "(event) => void", diff --git a/docs/reference/generated/menu-group-label.json b/docs/reference/generated/menu-group-label.json index e1325732f2..ac9f292728 100644 --- a/docs/reference/generated/menu-group-label.json +++ b/docs/reference/generated/menu-group-label.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/menu-group.json b/docs/reference/generated/menu-group.json index e533494a2f..3516552451 100644 --- a/docs/reference/generated/menu-group.json +++ b/docs/reference/generated/menu-group.json @@ -8,11 +8,11 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/menu-item.json b/docs/reference/generated/menu-item.json index 72e13cc9dc..104296d359 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": "If `true`, the menu item will be disabled." + "description": "Whether the component should ignore user actions." }, "id": { "type": "string", diff --git a/docs/reference/generated/menu-popup.json b/docs/reference/generated/menu-popup.json index 73af7e61e3..8584bd02ee 100644 --- a/docs/reference/generated/menu-popup.json +++ b/docs/reference/generated/menu-popup.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "id": { "type": "string", @@ -12,7 +12,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/menu-positioner.json b/docs/reference/generated/menu-positioner.json index ddc38dd34b..5d2b115c70 100644 --- a/docs/reference/generated/menu-positioner.json +++ b/docs/reference/generated/menu-positioner.json @@ -23,7 +23,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "collisionBoundary": { "type": "'clippingAncestors' | Element | Element[] | Rect", @@ -38,7 +38,7 @@ "keepMounted": { "type": "boolean", "default": "false", - "description": "Whether the menu popup remains mounted in the DOM while closed." + "description": "Whether to keep the HTML element in the DOM while the menu is hidden." }, "positionMethod": { "type": "'absolute' | 'fixed'", @@ -47,7 +47,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "side": { "type": "'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top'", diff --git a/docs/reference/generated/menu-radio-group.json b/docs/reference/generated/menu-radio-group.json index b9e3754f52..ea28993748 100644 --- a/docs/reference/generated/menu-radio-group.json +++ b/docs/reference/generated/menu-radio-group.json @@ -8,7 +8,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultValue": { "type": "any", @@ -21,7 +21,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "value": { "type": "any", diff --git a/docs/reference/generated/menu-radio-item-indicator.json b/docs/reference/generated/menu-radio-item-indicator.json index 23df148c0a..02bb0125c4 100644 --- a/docs/reference/generated/menu-radio-item-indicator.json +++ b/docs/reference/generated/menu-radio-item-indicator.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "true", - "description": "If `true`, the component is mounted even if the Radio is not checked." + "description": "Whether to keep the HTML element in the DOM when the radio item is inactive." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/menu-radio-item.json b/docs/reference/generated/menu-radio-item.json index 407a6dd9e1..a088f08d9c 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": "If `true`, the menu item will be disabled." + "description": "Whether the component should ignore user actions." }, "id": { "type": "string", diff --git a/docs/reference/generated/menu-root.json b/docs/reference/generated/menu-root.json index e7f5e65929..3db758783f 100644 --- a/docs/reference/generated/menu-root.json +++ b/docs/reference/generated/menu-root.json @@ -10,7 +10,7 @@ "defaultOpen": { "type": "boolean", "default": "false", - "description": "If `true`, the Menu is initially open." + "description": "Whether the menu is initially open.\n\nTo render a controlled menu, use the `open` prop instead." }, "delay": { "type": "number", @@ -20,20 +20,20 @@ "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the Menu is disabled." + "description": "Whether the component should ignore user actions." }, "loop": { "type": "boolean", "default": "true", - "description": "If `true`, using keyboard navigation will wrap focus to the other end of the list once the end is reached." + "description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys." }, "onOpenChange": { "type": "(open, event) => void", - "description": "Callback fired when the component requests to be opened or closed." + "description": "Event handler called when the menu is opened or closed." }, "open": { "type": "boolean", - "description": "Allows to control whether the dropdown is open.\nThis is a controlled counterpart of `defaultOpen`." + "description": "Whether the menu is currently open." }, "openOnHover": { "type": "boolean", diff --git a/docs/reference/generated/menu-submenu-trigger.json b/docs/reference/generated/menu-submenu-trigger.json index feac29a81f..8fcc96d0ac 100644 --- a/docs/reference/generated/menu-submenu-trigger.json +++ b/docs/reference/generated/menu-submenu-trigger.json @@ -4,12 +4,12 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the menu item will be disabled." + "description": "Whether the component should ignore user actions." }, "label": { "type": "string", @@ -17,7 +17,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/menu-trigger.json b/docs/reference/generated/menu-trigger.json index e6daea1721..20e509a26f 100644 --- a/docs/reference/generated/menu-trigger.json +++ b/docs/reference/generated/menu-trigger.json @@ -4,12 +4,12 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the component is disabled." + "description": "Whether the component should ignore user actions." }, "label": { "type": "string", @@ -17,7 +17,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "dataAttributes": { diff --git a/docs/reference/generated/number-field-decrement.json b/docs/reference/generated/number-field-decrement.json index 152e056732..ffea4061b0 100644 --- a/docs/reference/generated/number-field-decrement.json +++ b/docs/reference/generated/number-field-decrement.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/number-field-group.json b/docs/reference/generated/number-field-group.json index 1773d8f108..8bd1719d68 100644 --- a/docs/reference/generated/number-field-group.json +++ b/docs/reference/generated/number-field-group.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/number-field-increment.json b/docs/reference/generated/number-field-increment.json index dd96fcb717..f75f83fbf7 100644 --- a/docs/reference/generated/number-field-increment.json +++ b/docs/reference/generated/number-field-increment.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/number-field-input.json b/docs/reference/generated/number-field-input.json index 60a7cefd30..5453cd1a12 100644 --- a/docs/reference/generated/number-field-input.json +++ b/docs/reference/generated/number-field-input.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/number-field-root.json b/docs/reference/generated/number-field-root.json index 74ea1bbc1e..e225242573 100644 --- a/docs/reference/generated/number-field-root.json +++ b/docs/reference/generated/number-field-root.json @@ -14,7 +14,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultValue": { "type": "number", @@ -23,7 +23,7 @@ "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the input element is disabled." + "description": "Whether the component should ignore user actions." }, "format": { "type": "Intl.NumberFormatOptions", @@ -36,7 +36,7 @@ "invalid": { "type": "boolean", "default": "false", - "description": "If `true`, the input element is invalid." + "description": "Whether the field is forcefully marked as invalid." }, "largeStep": { "type": "number", @@ -53,7 +53,7 @@ }, "name": { "type": "string", - "description": "The name of the input element." + "description": "Identifies the field when a form is submitted." }, "onValueChange": { "type": "(value, event) => void", @@ -62,16 +62,16 @@ "readOnly": { "type": "boolean", "default": "false", - "description": "If `true`, the input element is read only." + "description": "Whether the user should be unable to change the field value." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "required": { "type": "boolean", "default": "false", - "description": "If `true`, the input element is required." + "description": "Whether the user must enter a value before submitting a form." }, "smallStep": { "type": "number", diff --git a/docs/reference/generated/number-field-scrub-area-cursor.json b/docs/reference/generated/number-field-scrub-area-cursor.json index c7d310e9ca..426b641ebd 100644 --- a/docs/reference/generated/number-field-scrub-area-cursor.json +++ b/docs/reference/generated/number-field-scrub-area-cursor.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/number-field-scrub-area.json b/docs/reference/generated/number-field-scrub-area.json index 4f5781bbb2..772a53475b 100644 --- a/docs/reference/generated/number-field-scrub-area.json +++ b/docs/reference/generated/number-field-scrub-area.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "direction": { "type": "'horizontal' | 'vertical'", @@ -18,7 +18,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "teleportDistance": { "type": "number", diff --git a/docs/reference/generated/popover-arrow.json b/docs/reference/generated/popover-arrow.json index e9b89ddafc..42abf023a8 100644 --- a/docs/reference/generated/popover-arrow.json +++ b/docs/reference/generated/popover-arrow.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/popover-backdrop.json b/docs/reference/generated/popover-backdrop.json index 8cd939c4fa..5a8d9af1a5 100644 --- a/docs/reference/generated/popover-backdrop.json +++ b/docs/reference/generated/popover-backdrop.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, the backdrop remains mounted when the popover content is closed." + "description": "Whether to keep the HTML element in the DOM while the popover is hidden." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/popover-close.json b/docs/reference/generated/popover-close.json index 18a240aaa9..f1c1180329 100644 --- a/docs/reference/generated/popover-close.json +++ b/docs/reference/generated/popover-close.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/popover-description.json b/docs/reference/generated/popover-description.json index d212bb3ee1..77a30edc53 100644 --- a/docs/reference/generated/popover-description.json +++ b/docs/reference/generated/popover-description.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/popover-popup.json b/docs/reference/generated/popover-popup.json index 77238a326f..87ca7825bf 100644 --- a/docs/reference/generated/popover-popup.json +++ b/docs/reference/generated/popover-popup.json @@ -4,19 +4,19 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "finalFocus": { "type": "React.Ref", - "description": "Determines an element to focus after the popover is closed.\nIf not provided, the focus returns to the trigger." + "description": "Determines the element to focus when the popover is closed.\nBy default, focus returns to trigger." }, "initialFocus": { "type": "React.Ref | (interactionType => HTMLElement | null)", - "description": "Determines an element to focus when the popover is opened.\nIt can be either a ref to the element or a function that returns such a ref.\nIf not provided, the first focusable element is focused." + "description": "Determines the element to focus when the popover is opened.\nBy default, the first focusable element is focused." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/popover-positioner.json b/docs/reference/generated/popover-positioner.json index b14184d8f7..3ae0c7c2a3 100644 --- a/docs/reference/generated/popover-positioner.json +++ b/docs/reference/generated/popover-positioner.json @@ -23,7 +23,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "collisionBoundary": { "type": "'clippingAncestors' | Element | Element[] | Rect", @@ -38,7 +38,7 @@ "keepMounted": { "type": "boolean", "default": "false", - "description": "Whether the popover remains mounted in the DOM while closed." + "description": "Whether to keep the HTML element in the DOM when the popover is hidden." }, "positionMethod": { "type": "'absolute' | 'fixed'", @@ -47,7 +47,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "side": { "type": "'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top'", diff --git a/docs/reference/generated/popover-root.json b/docs/reference/generated/popover-root.json index 2e2d18a589..993a3a229c 100644 --- a/docs/reference/generated/popover-root.json +++ b/docs/reference/generated/popover-root.json @@ -10,7 +10,7 @@ "defaultOpen": { "type": "boolean", "default": "false", - "description": "Whether the popover popup is open by default. Use when uncontrolled." + "description": "Whether the popover is initially open.\n\nTo render a controlled popover, use the `open` prop instead." }, "delay": { "type": "number", @@ -19,12 +19,11 @@ }, "onOpenChange": { "type": "(open, event, reason) => void", - "description": "Callback fired when the popover popup is requested to be opened or closed. Use when\ncontrolled." + "description": "Event handler called when the popover is opened or closed." }, "open": { "type": "boolean", - "default": "false", - "description": "Whether the popover popup is open. Use when controlled." + "description": "Whether the popover is currently open." }, "openOnHover": { "type": "boolean", diff --git a/docs/reference/generated/popover-title.json b/docs/reference/generated/popover-title.json index 27f6ba0c66..9a356bc4fd 100644 --- a/docs/reference/generated/popover-title.json +++ b/docs/reference/generated/popover-title.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/popover-trigger.json b/docs/reference/generated/popover-trigger.json index d5c0b72da3..23eff157ac 100644 --- a/docs/reference/generated/popover-trigger.json +++ b/docs/reference/generated/popover-trigger.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/portal.json b/docs/reference/generated/portal.json index 949b3d0375..1fd7dbb790 100644 --- a/docs/reference/generated/portal.json +++ b/docs/reference/generated/portal.json @@ -9,7 +9,7 @@ "keepMounted": { "type": "boolean", "default": "false", - "description": "Whether to keep the portal mounted in the DOM when the popup is closed." + "description": "Whether to keep the portal mounted in the DOM when the popup is hidden." } } } diff --git a/docs/reference/generated/preview-card-arrow.json b/docs/reference/generated/preview-card-arrow.json index 5f54f1f47d..b89c7ac280 100644 --- a/docs/reference/generated/preview-card-arrow.json +++ b/docs/reference/generated/preview-card-arrow.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/preview-card-backdrop.json b/docs/reference/generated/preview-card-backdrop.json index b692c680ba..34c9ff65e2 100644 --- a/docs/reference/generated/preview-card-backdrop.json +++ b/docs/reference/generated/preview-card-backdrop.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "Whether the `Backdrop` remains mounted when the Preview Card `Popup` is closed." + "description": "Whether to keep the HTML element in the DOM while the preview card is hidden." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/preview-card-popup.json b/docs/reference/generated/preview-card-popup.json index 2dbb67f1a6..de45ba6e41 100644 --- a/docs/reference/generated/preview-card-popup.json +++ b/docs/reference/generated/preview-card-popup.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/preview-card-positioner.json b/docs/reference/generated/preview-card-positioner.json index 25d0140607..947d758a27 100644 --- a/docs/reference/generated/preview-card-positioner.json +++ b/docs/reference/generated/preview-card-positioner.json @@ -23,7 +23,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "collisionBoundary": { "type": "'clippingAncestors' | Element | Element[] | Rect", @@ -38,7 +38,7 @@ "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, preview card stays mounted in the DOM when closed." + "description": "Whether to keep the HTML element in the DOM while the preview card is hidden." }, "positionMethod": { "type": "'absolute' | 'fixed'", @@ -47,7 +47,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "side": { "type": "'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top'", diff --git a/docs/reference/generated/preview-card-root.json b/docs/reference/generated/preview-card-root.json index 4a7dbd336a..84c645ed59 100644 --- a/docs/reference/generated/preview-card-root.json +++ b/docs/reference/generated/preview-card-root.json @@ -10,7 +10,7 @@ "defaultOpen": { "type": "boolean", "default": "false", - "description": "Whether the preview card popup is open by default. Use when uncontrolled." + "description": "Whether the preview card is initially open.\n\nTo render a controlled preview card, use the `open` prop instead." }, "delay": { "type": "number", @@ -19,12 +19,11 @@ }, "onOpenChange": { "type": "(open, event, reason) => void", - "description": "Callback fired when the preview card popup is requested to be opened or closed. Use when\ncontrolled." + "description": "Event handler called when the preview card is opened or closed." }, "open": { "type": "boolean", - "default": "false", - "description": "Whether the preview card popup is open. Use when controlled." + "description": "Whether the preview card is currently open." } } } diff --git a/docs/reference/generated/preview-card-trigger.json b/docs/reference/generated/preview-card-trigger.json index 36ac439f48..5f0fa8ac59 100644 --- a/docs/reference/generated/preview-card-trigger.json +++ b/docs/reference/generated/preview-card-trigger.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/progress-indicator.json b/docs/reference/generated/progress-indicator.json index df23eaf053..c1d462544e 100644 --- a/docs/reference/generated/progress-indicator.json +++ b/docs/reference/generated/progress-indicator.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/progress-root.json b/docs/reference/generated/progress-root.json index 67f88846b4..d4a4c62246 100644 --- a/docs/reference/generated/progress-root.json +++ b/docs/reference/generated/progress-root.json @@ -16,7 +16,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "getAriaLabel": { "type": "(value) => string", @@ -38,7 +38,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "value": { "type": "number", diff --git a/docs/reference/generated/progress-track.json b/docs/reference/generated/progress-track.json index 67666f804e..5eeb030f16 100644 --- a/docs/reference/generated/progress-track.json +++ b/docs/reference/generated/progress-track.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/radio-group.json b/docs/reference/generated/radio-group.json index 8f0ce05c8b..d6bf1b49a2 100644 --- a/docs/reference/generated/radio-group.json +++ b/docs/reference/generated/radio-group.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultValue": { "type": "any", @@ -13,11 +13,11 @@ "disabled": { "type": "boolean", "default": "false", - "description": "Determines if the radio group is disabled." + "description": "Whether the component should ignore user actions." }, "name": { "type": "string", - "description": "The name of the radio group submitted with the form data." + "description": "Identifies the field when a form is submitted." }, "onValueChange": { "type": "(value, event) => void", @@ -26,16 +26,16 @@ "readOnly": { "type": "boolean", "default": "false", - "description": "Determines if the radio group is readonly." + "description": "Whether the user should be unable to select a different radio button in the group." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "required": { "type": "boolean", "default": "false", - "description": "Determines if the radio group is required." + "description": "Whether the user must choose a value before submitting a form." }, "value": { "type": "any", diff --git a/docs/reference/generated/radio-indicator.json b/docs/reference/generated/radio-indicator.json index f9244970ce..5200a7072a 100644 --- a/docs/reference/generated/radio-indicator.json +++ b/docs/reference/generated/radio-indicator.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "true", - "description": "Whether the component should be kept mounted when not checked." + "description": "Whether to keep the HTML element in the DOM when the radio button is inactive." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/radio-root.json b/docs/reference/generated/radio-root.json index 7e55a92c70..97fcc57687 100644 --- a/docs/reference/generated/radio-root.json +++ b/docs/reference/generated/radio-root.json @@ -9,26 +9,26 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "disabled": { "type": "boolean", "default": "false", - "description": "Determines if the radio is disabled." + "description": "Whether the component should ignore user actions." }, "readOnly": { "type": "boolean", "default": "false", - "description": "Determines if the radio is readonly." + "description": "Whether the user should be unable to select the radio button." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "required": { "type": "boolean", "default": "false", - "description": "Determines if the radio is required." + "description": "Whether the user must choose a value before submitting a form." } } } diff --git a/docs/reference/generated/scroll-area-corner.json b/docs/reference/generated/scroll-area-corner.json index bd96818fa1..5a00944a5e 100644 --- a/docs/reference/generated/scroll-area-corner.json +++ b/docs/reference/generated/scroll-area-corner.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/scroll-area-root.json b/docs/reference/generated/scroll-area-root.json index b884b3a7d0..f12e5dfb68 100644 --- a/docs/reference/generated/scroll-area-root.json +++ b/docs/reference/generated/scroll-area-root.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "gutter": { "type": "number | string", @@ -13,7 +13,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "cssVariables": { diff --git a/docs/reference/generated/scroll-area-scrollbar.json b/docs/reference/generated/scroll-area-scrollbar.json index ddd2c54e81..fdd7f1f69d 100644 --- a/docs/reference/generated/scroll-area-scrollbar.json +++ b/docs/reference/generated/scroll-area-scrollbar.json @@ -4,12 +4,12 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "Whether the scrollbars remain mounted in the DOM when there is no overflow." + "description": "Whether to keep the HTML element in the DOM when the viewport isn’t scrollable." }, "orientation": { "type": "'horizontal' | 'vertical'", @@ -18,7 +18,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } }, "cssVariables": { diff --git a/docs/reference/generated/scroll-area-thumb.json b/docs/reference/generated/scroll-area-thumb.json index c111c380e0..3761295f26 100644 --- a/docs/reference/generated/scroll-area-thumb.json +++ b/docs/reference/generated/scroll-area-thumb.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/scroll-area-viewport.json b/docs/reference/generated/scroll-area-viewport.json index d3a405f813..4b8abdd15b 100644 --- a/docs/reference/generated/scroll-area-viewport.json +++ b/docs/reference/generated/scroll-area-viewport.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/select-arrow.json b/docs/reference/generated/select-arrow.json index 2dbcc770aa..aacdf5625d 100644 --- a/docs/reference/generated/select-arrow.json +++ b/docs/reference/generated/select-arrow.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/select-backdrop.json b/docs/reference/generated/select-backdrop.json index 73b4f52711..d6daa17d49 100644 --- a/docs/reference/generated/select-backdrop.json +++ b/docs/reference/generated/select-backdrop.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, the Backdrop remains mounted when the Select popup is closed." + "description": "Whether to keep the HTML element in the DOM while the select menu is hidden." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/select-group-label.json b/docs/reference/generated/select-group-label.json index dc0364d23e..dba1c3e089 100644 --- a/docs/reference/generated/select-group-label.json +++ b/docs/reference/generated/select-group-label.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/select-group.json b/docs/reference/generated/select-group.json index aa60d07ee0..83b855680a 100644 --- a/docs/reference/generated/select-group.json +++ b/docs/reference/generated/select-group.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/select-icon.json b/docs/reference/generated/select-icon.json index f38a950747..9328ea6ea5 100644 --- a/docs/reference/generated/select-icon.json +++ b/docs/reference/generated/select-icon.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/select-item-indicator.json b/docs/reference/generated/select-item-indicator.json index 3d752bef1d..9a86f400a7 100644 --- a/docs/reference/generated/select-item-indicator.json +++ b/docs/reference/generated/select-item-indicator.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, the item indicator remains mounted when the item is not\nselected." + "description": "Whether to keep the HTML element in the DOM when the item is not selected." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/select-item.json b/docs/reference/generated/select-item.json index a529d25e6c..1328d30317 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": "If `true`, the select item will be disabled." + "description": "Whether the component should ignore user actions." }, "label": { "type": "string", diff --git a/docs/reference/generated/select-popup.json b/docs/reference/generated/select-popup.json index 67e509245d..72ece7df57 100644 --- a/docs/reference/generated/select-popup.json +++ b/docs/reference/generated/select-popup.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "id": { "type": "string", @@ -12,7 +12,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/select-positioner.json b/docs/reference/generated/select-positioner.json index d5019a4ea8..609c442f0f 100644 --- a/docs/reference/generated/select-positioner.json +++ b/docs/reference/generated/select-positioner.json @@ -23,7 +23,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "collisionBoundary": { "type": "'clippingAncestors' | Element | Element[] | Rect", @@ -42,7 +42,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "side": { "type": "'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top'", diff --git a/docs/reference/generated/select-root.json b/docs/reference/generated/select-root.json index 05e319667c..a9668fb97b 100644 --- a/docs/reference/generated/select-root.json +++ b/docs/reference/generated/select-root.json @@ -10,7 +10,7 @@ "defaultOpen": { "type": "boolean", "default": "false", - "description": "If `true`, the Select is initially open." + "description": "Whether the select menu is initially open.\n\nTo render a controlled select menu, use the `open` prop instead." }, "defaultValue": { "type": "any", @@ -20,15 +20,15 @@ "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the Select is disabled." + "description": "Whether the component should ignore user actions." }, "name": { "type": "string", - "description": "The name of the Select in the owning form." + "description": "Identifies the field when a form is submitted." }, "onOpenChange": { "type": "function", - "description": "Callback fired when the component requests to be opened or closed." + "description": "Event handler called when the select menu is opened or closed." }, "onValueChange": { "type": "function", @@ -36,17 +36,17 @@ }, "open": { "type": "boolean", - "description": "Allows to control whether the dropdown is open.\nThis is a controlled counterpart of `defaultOpen`." + "description": "Whether the select menu is currently open." }, "readOnly": { "type": "boolean", "default": "false", - "description": "If `true`, the Select is read-only." + "description": "Whether the user should be unable to choose a different option from the select menu." }, "required": { "type": "boolean", "default": "false", - "description": "If `true`, the Select is required." + "description": "Whether the user must choose a value before submitting a form." }, "value": { "type": "any", diff --git a/docs/reference/generated/select-scroll-down-arrow.json b/docs/reference/generated/select-scroll-down-arrow.json index 932420f6b5..63d4b28c22 100644 --- a/docs/reference/generated/select-scroll-down-arrow.json +++ b/docs/reference/generated/select-scroll-down-arrow.json @@ -5,7 +5,7 @@ "keepMounted": { "type": "boolean", "default": "false", - "description": "Whether the component should be kept mounted when it is not rendered." + "description": "Whether to keep the HTML element in the DOM while the select menu is not scrollable." } } } diff --git a/docs/reference/generated/select-scroll-up-arrow.json b/docs/reference/generated/select-scroll-up-arrow.json index 3a6d57de59..3f8279599b 100644 --- a/docs/reference/generated/select-scroll-up-arrow.json +++ b/docs/reference/generated/select-scroll-up-arrow.json @@ -5,7 +5,7 @@ "keepMounted": { "type": "boolean", "default": "false", - "description": "Whether the component should be kept mounted when it is not rendered." + "description": "Whether to keep the HTML element in the DOM while the select menu is not scrollable." } } } diff --git a/docs/reference/generated/select-trigger.json b/docs/reference/generated/select-trigger.json index 1627a72407..31bc61d0b2 100644 --- a/docs/reference/generated/select-trigger.json +++ b/docs/reference/generated/select-trigger.json @@ -4,12 +4,12 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the component is disabled." + "description": "Whether the component should ignore user actions." }, "label": { "type": "string", @@ -17,7 +17,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/select-value.json b/docs/reference/generated/select-value.json index cf86554a77..5cd67b796a 100644 --- a/docs/reference/generated/select-value.json +++ b/docs/reference/generated/select-value.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "placeholder": { "type": "string", @@ -12,7 +12,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/separator.json b/docs/reference/generated/separator.json index 4ca0099184..3a95f1f551 100644 --- a/docs/reference/generated/separator.json +++ b/docs/reference/generated/separator.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/slider-control.json b/docs/reference/generated/slider-control.json index 086fceecda..eb4789eae3 100644 --- a/docs/reference/generated/slider-control.json +++ b/docs/reference/generated/slider-control.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/slider-indicator.json b/docs/reference/generated/slider-indicator.json index df4dcdfbdc..1fd7874658 100644 --- a/docs/reference/generated/slider-indicator.json +++ b/docs/reference/generated/slider-indicator.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/slider-output.json b/docs/reference/generated/slider-output.json index 398b3c6737..19eac9b862 100644 --- a/docs/reference/generated/slider-output.json +++ b/docs/reference/generated/slider-output.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/slider-root.json b/docs/reference/generated/slider-root.json index 922c06e31d..eb0ed9a0eb 100644 --- a/docs/reference/generated/slider-root.json +++ b/docs/reference/generated/slider-root.json @@ -8,7 +8,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultValue": { "type": "Array | number", @@ -17,7 +17,7 @@ "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the component is disabled." + "description": "Whether the component should ignore user actions." }, "largeStep": { "type": "number", @@ -41,7 +41,7 @@ }, "name": { "type": "string", - "description": "Name attribute of the hidden `input` element." + "description": "Identifies the field when a form is submitted." }, "onValueChange": { "type": "(value, event, activeThumbIndex) => void", @@ -58,7 +58,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "step": { "type": "number", diff --git a/docs/reference/generated/slider-thumb.json b/docs/reference/generated/slider-thumb.json index b1d07b18a7..2679c77616 100644 --- a/docs/reference/generated/slider-thumb.json +++ b/docs/reference/generated/slider-thumb.json @@ -12,7 +12,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "getAriaLabel": { "type": "function(index: number) => string", @@ -24,7 +24,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/slider-track.json b/docs/reference/generated/slider-track.json index bbaf80a319..6916f9de25 100644 --- a/docs/reference/generated/slider-track.json +++ b/docs/reference/generated/slider-track.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/switch-root.json b/docs/reference/generated/switch-root.json index 1876440e1b..0a627623da 100644 --- a/docs/reference/generated/switch-root.json +++ b/docs/reference/generated/switch-root.json @@ -4,47 +4,47 @@ "props": { "checked": { "type": "boolean", - "description": "If `true`, the switch is checked." + "description": "Whether the switch is currently active.\n\nTo render an uncontrolled switch, use the `defaultChecked` prop instead." }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultChecked": { "type": "boolean", "default": "false", - "description": "The default checked state. Use when the component is uncontrolled." + "description": "Whether the switch is initially active.\n\nTo render a controlled switch, use the `checked` prop instead." }, "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the component is disabled and can't be interacted with." + "description": "Whether the component should ignore user actions." }, "inputRef": { "type": "React.Ref", - "description": "Ref to the underlying input element." + "description": "A React ref to access the hidden `` element." }, "name": { "type": "string", - "description": "Name of the underlying input element." + "description": "Identifies the field when a form is submitted." }, "onCheckedChange": { "type": "(checked, event) => void", - "description": "Callback fired when the checked state is changed." + "description": "Event handler called when the switch is activated or deactivated." }, "readOnly": { "type": "boolean", "default": "false", - "description": "If `true`, the component is read-only.\nFunctionally, this is equivalent to being disabled, but the assistive technologies will announce this differently." + "description": "Whether the user should be unable to activate or deactivate the switch." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "required": { "type": "boolean", "default": "false", - "description": "If `true`, the switch must be checked for the browser validation to pass." + "description": "Whether the user must activate the switch before submitting a form." } } } diff --git a/docs/reference/generated/switch-thumb.json b/docs/reference/generated/switch-thumb.json index b8c42c7b0f..f76484cbd2 100644 --- a/docs/reference/generated/switch-thumb.json +++ b/docs/reference/generated/switch-thumb.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/tabs-indicator.json b/docs/reference/generated/tabs-indicator.json index 073837d4f8..e8819dc414 100644 --- a/docs/reference/generated/tabs-indicator.json +++ b/docs/reference/generated/tabs-indicator.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "renderBeforeHydration": { "type": "boolean", diff --git a/docs/reference/generated/tabs-list.json b/docs/reference/generated/tabs-list.json index 68f1181fb5..ee90d0e829 100644 --- a/docs/reference/generated/tabs-list.json +++ b/docs/reference/generated/tabs-list.json @@ -9,16 +9,16 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "loop": { "type": "boolean", "default": "true", - "description": "If `true`, using keyboard navigation will wrap focus to the other end of the list once the end is reached." + "description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/tabs-panel.json b/docs/reference/generated/tabs-panel.json index a26484a714..cace9d01ff 100644 --- a/docs/reference/generated/tabs-panel.json +++ b/docs/reference/generated/tabs-panel.json @@ -4,16 +4,16 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "keepMounted": { "type": "boolean", "default": "false", - "description": "If `true`, keeps the contents of the hidden TabPanel in the DOM." + "description": "Whether to keep the HTML element in the DOM while the panel is hidden." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "value": { "type": "any", diff --git a/docs/reference/generated/tabs-root.json b/docs/reference/generated/tabs-root.json index 1a4bb89e6c..d6fdce9ac8 100644 --- a/docs/reference/generated/tabs-root.json +++ b/docs/reference/generated/tabs-root.json @@ -4,7 +4,7 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultValue": { "type": "any", @@ -22,7 +22,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "value": { "type": "any", diff --git a/docs/reference/generated/tabs-tab.json b/docs/reference/generated/tabs-tab.json index c5427fd124..b45123ad3e 100644 --- a/docs/reference/generated/tabs-tab.json +++ b/docs/reference/generated/tabs-tab.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "value": { "type": "any", diff --git a/docs/reference/generated/toggle-group.json b/docs/reference/generated/toggle-group.json index cf19e6f3f6..ce075710b1 100644 --- a/docs/reference/generated/toggle-group.json +++ b/docs/reference/generated/toggle-group.json @@ -4,19 +4,29 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultValue": { "type": "array", "description": "The open state of the ToggleGroup represented by an array of\nthe values of all pressed ``s.\nThis is the uncontrolled counterpart of `value`." }, + "disabled": { + "type": "boolean", + "default": "false", + "description": "Whether the component should ignore user actions." + }, + "loop": { + "type": "boolean", + "default": "true", + "description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys." + }, "onValueChange": { "type": "function(groupValue: Array, event: Event) => void", "description": "Callback fired when the pressed states of the ToggleGroup changes." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "toggleMultiple": { "type": "boolean", diff --git a/docs/reference/generated/toggle.json b/docs/reference/generated/toggle.json index 62e0b32fb9..fcfb1aa913 100644 --- a/docs/reference/generated/toggle.json +++ b/docs/reference/generated/toggle.json @@ -12,7 +12,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "defaultPressed": { "type": "boolean", @@ -22,7 +22,7 @@ "disabled": { "type": "boolean", "default": "false", - "description": "If `true`, the component is disabled." + "description": "Whether the component should ignore user actions." }, "onPressedChange": { "type": "function(pressed: boolean, event: Event) => void", @@ -34,7 +34,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "value": { "type": "string", diff --git a/docs/reference/generated/tooltip-arrow.json b/docs/reference/generated/tooltip-arrow.json index e60fcb1ab2..e7cf5fe01c 100644 --- a/docs/reference/generated/tooltip-arrow.json +++ b/docs/reference/generated/tooltip-arrow.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/tooltip-popup.json b/docs/reference/generated/tooltip-popup.json index 59f81bbd21..aba47067d0 100644 --- a/docs/reference/generated/tooltip-popup.json +++ b/docs/reference/generated/tooltip-popup.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/reference/generated/tooltip-positioner.json b/docs/reference/generated/tooltip-positioner.json index 927f7b7113..86836e0fc3 100644 --- a/docs/reference/generated/tooltip-positioner.json +++ b/docs/reference/generated/tooltip-positioner.json @@ -23,7 +23,7 @@ }, "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "collisionBoundary": { "type": "'clippingAncestors' | Element | Element[] | Rect", @@ -38,7 +38,7 @@ "keepMounted": { "type": "boolean", "default": "false", - "description": "Whether the tooltip remains mounted in the DOM while closed." + "description": "Whether to keep the HTML element in the DOM while the tooltip is hidden." }, "positionMethod": { "type": "'absolute' | 'fixed'", @@ -47,7 +47,7 @@ }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, "side": { "type": "'bottom' | 'inline-end' | 'inline-start' | 'left' | 'right' | 'top'", diff --git a/docs/reference/generated/tooltip-root.json b/docs/reference/generated/tooltip-root.json index b905ff5ef7..c1ad32ed75 100644 --- a/docs/reference/generated/tooltip-root.json +++ b/docs/reference/generated/tooltip-root.json @@ -10,7 +10,7 @@ "defaultOpen": { "type": "boolean", "default": "false", - "description": "Whether the tooltip popup is open by default. Use when uncontrolled." + "description": "Whether the tooltip is initially open.\n\nTo render a controlled tooltip, use the `open` prop instead." }, "delay": { "type": "number", @@ -24,12 +24,11 @@ }, "onOpenChange": { "type": "(open, event, reason) => void", - "description": "Callback fired when the tooltip popup is requested to be opened or closed. Use when controlled." + "description": "Event handler called when the tooltip is opened or closed." }, "open": { "type": "boolean", - "default": "false", - "description": "Whether the tooltip popup is open. Use when controlled." + "description": "Whether the tooltip is currently open." }, "trackCursorAxis": { "type": "'none' | 'x' | 'y' | 'both'", diff --git a/docs/reference/generated/tooltip-trigger.json b/docs/reference/generated/tooltip-trigger.json index e61c281c62..82736e2411 100644 --- a/docs/reference/generated/tooltip-trigger.json +++ b/docs/reference/generated/tooltip-trigger.json @@ -4,11 +4,11 @@ "props": { "className": { "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." + "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state." }, "render": { "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." + "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." } } } diff --git a/docs/src/components/reference/ReferenceTablePopover.tsx b/docs/src/components/reference/ReferenceTablePopover.tsx index a3e23432b0..06cf8f3476 100644 --- a/docs/src/components/reference/ReferenceTablePopover.tsx +++ b/docs/src/components/reference/ReferenceTablePopover.tsx @@ -33,9 +33,7 @@ export function ReferenceTablePopover({ children }: React.PropsWithChildren) { collisionPadding={16} > }> -
- {children} -
+
{children}
diff --git a/docs/src/mdx-components.tsx b/docs/src/mdx-components.tsx index c18f7bacda..33b065923c 100644 --- a/docs/src/mdx-components.tsx +++ b/docs/src/mdx-components.tsx @@ -81,8 +81,7 @@ export const mdxComponents: MDXComponents = { export const inlineMdxComponents: MDXComponents = { ...mdxComponents, - // eslint-disable-next-line react/jsx-no-useless-fragment - p: (props) => , + p: (props) =>

, }; export const tableMdxComponents: MDXComponents = { diff --git a/docs/src/syntax-highlighting/index.css b/docs/src/syntax-highlighting/index.css index f1e776619e..e7a4ef1c2a 100644 --- a/docs/src/syntax-highlighting/index.css +++ b/docs/src/syntax-highlighting/index.css @@ -24,4 +24,6 @@ --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/package.json b/package.json index 212495e911..f6c99a9994 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@mui/internal-markdown": "^1.0.22", "@mui/internal-scripts": "^1.0.29", "@mui/internal-test-utils": "https://pkg.csb.dev/mui/material-ui/commit/92c23999/@mui/internal-test-utils", - "@mui/monorepo": "github:mui/material-ui#v6.2.0", + "@mui/monorepo": "github:mui/material-ui#6b5d751b0c7f46919cca75238b3da7ee751ac8a6", "@next/eslint-plugin-next": "^14.2.18", "@octokit/rest": "^20.1.1", "@playwright/test": "1.49.0", diff --git a/packages/react/src/accordion/header/AccordionHeader.tsx b/packages/react/src/accordion/header/AccordionHeader.tsx index e5a4a29247..2e85e0c152 100644 --- a/packages/react/src/accordion/header/AccordionHeader.tsx +++ b/packages/react/src/accordion/header/AccordionHeader.tsx @@ -49,11 +49,15 @@ AccordionHeader.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/accordion/item/AccordionItem.tsx b/packages/react/src/accordion/item/AccordionItem.tsx index 135c2427b3..c20be5837d 100644 --- a/packages/react/src/accordion/item/AccordionItem.tsx +++ b/packages/react/src/accordion/item/AccordionItem.tsx @@ -161,20 +161,24 @@ AccordionItem.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** - * Callback fired when the Collapsible is opened or closed. + * Event handler called when the panel is opened or closed. */ onOpenChange: PropTypes.func, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/accordion/panel/AccordionPanel.tsx b/packages/react/src/accordion/panel/AccordionPanel.tsx index d32e578ef9..3c112052ab 100644 --- a/packages/react/src/accordion/panel/AccordionPanel.tsx +++ b/packages/react/src/accordion/panel/AccordionPanel.tsx @@ -111,13 +111,15 @@ AccordionPanel.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, sets `hidden="until-found"` when closed. Accordion panels - * will remain mounted in the DOM when closed and overrides `keepMounted`. - * If `false`, sets `hidden` when closed. + * Allows the browser’s built-in page search to find and expand the panel contents. + * + * Overrides the `keepMounted` prop and uses `hidden="until-found"` + * to hide the element without removing it from the DOM. * @default false */ hiddenUntilFound: PropTypes.bool, @@ -126,14 +128,16 @@ AccordionPanel.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * If `true`, accordion panels remains mounted when closed and is instead - * hidden using the `hidden` attribute. - * If `false`, accordion panels are unmounted when closed. + * Whether to keep the element in the DOM while the panel is closed. + * This prop is ignored when `hiddenUntilFound` is used. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/accordion/root/AccordionRoot.tsx b/packages/react/src/accordion/root/AccordionRoot.tsx index cd5845c83b..9396967dc0 100644 --- a/packages/react/src/accordion/root/AccordionRoot.tsx +++ b/packages/react/src/accordion/root/AccordionRoot.tsx @@ -117,6 +117,9 @@ const AccordionRoot = React.forwardRef(function AccordionRoot( export namespace AccordionRoot { export interface State { value: AccordionValue; + /** + * Whether the component should ignore user actions. + */ disabled: boolean; orientation: AccordionOrientation; } @@ -136,16 +139,16 @@ export namespace AccordionRoot { >, Omit, 'defaultValue'> { /** - * If `true`, sets `hidden="until-found"` when closed. Accordion panels - * will remain mounted in the DOM when closed and overrides `keepMounted`. - * If `false`, sets `hidden` when closed. + * Allows the browser’s built-in page search to find and expand the panel contents. + * + * Overrides the `keepMounted` prop and uses `hidden="until-found"` + * to hide the element without removing it from the DOM. * @default false */ hiddenUntilFound?: boolean; /** - * If `true`, accordion panels remains mounted when closed and is instead - * hidden using the `hidden` attribute. - * If `false`, accordion panels are unmounted when closed. + * Whether to keep the element in the DOM while the panel is closed. + * This prop is ignored when `hiddenUntilFound` is used. * @default false */ keepMounted?: boolean; @@ -164,61 +167,66 @@ AccordionRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * The default value representing the currently open `Accordion.Item` - * This is the uncontrolled counterpart of `value`. + * The uncontrolled value of the item(s) that should be expanded. + * To render a controlled accordion, use the `value` prop instead. */ defaultValue: PropTypes.array, /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** - * If `true`, sets `hidden="until-found"` when closed. Accordion panels - * will remain mounted in the DOM when closed and overrides `keepMounted`. - * If `false`, sets `hidden` when closed. + * Allows the browser’s built-in page search to find and expand the panel contents. + * + * Overrides the `keepMounted` prop and uses `hidden="until-found"` + * to hide the element without removing it from the DOM. * @default false */ hiddenUntilFound: PropTypes.bool, /** - * If `true`, accordion panels remains mounted when closed and is instead - * hidden using the `hidden` attribute. - * If `false`, accordion panels are unmounted when closed. + * Whether to keep the element in the DOM while the panel is closed. + * This prop is ignored when `hiddenUntilFound` is used. * @default false */ keepMounted: PropTypes.bool, /** - * If `true`, focus will loop when moving focus between `Trigger`s using - * the arrow keys. + * Whether to loop keyboard focus back to the first item + * when the end of the list is reached while using the arrow keys. * @default true */ loop: PropTypes.bool, /** - * Callback fired when an Accordion section is opened or closed. - * The value representing the involved section is provided as an argument. + * Event handler called when an accordion item is expanded or collapsed. + * Provides the new value as an argument. */ onValueChange: PropTypes.func, /** - * Whether multiple Accordion sections can be opened at the same time. + * Whether multiple items can be open at the same time. * @default true */ openMultiple: PropTypes.bool, /** - * The orientation of the accordion. + * The visual orientation of the accordion. + * Controls whether the roving focus uses left/right or up/down arrow keys. * @default 'vertical' */ orientation: PropTypes.oneOf(['horizontal', 'vertical']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * The value of the currently open `Accordion.Item` - * This is the controlled counterpart of `defaultValue`. + * The controlled value of the item(s) that should be expanded. + * To render an 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 7e3d19ab2b..40ad814036 100644 --- a/packages/react/src/accordion/root/useAccordionRoot.ts +++ b/packages/react/src/accordion/root/useAccordionRoot.ts @@ -187,39 +187,40 @@ export type AccordionOrientation = 'horizontal' | 'vertical'; export namespace useAccordionRoot { export interface Parameters { /** - * The value of the currently open `Accordion.Item` - * This is the controlled counterpart of `defaultValue`. + * The controlled value of the item(s) that should be expanded. + * To render an controlled accordion, use the `defaultValue` prop instead. */ value?: AccordionValue; /** - * The default value representing the currently open `Accordion.Item` - * This is the uncontrolled counterpart of `value`. + * The uncontrolled value of the item(s) that should be expanded. + * To render a controlled accordion, use the `value` prop instead. */ defaultValue?: AccordionValue; /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: boolean; direction: Direction; /** - * If `true`, focus will loop when moving focus between `Trigger`s using - * the arrow keys. + * Whether to loop keyboard focus back to the first item + * when the end of the list is reached while using the arrow keys. * @default true */ loop: boolean; /** - * Callback fired when an Accordion section is opened or closed. - * The value representing the involved section is provided as an argument. + * Event handler called when an accordion item is expanded or collapsed. + * Provides the new value as an argument. */ onValueChange: (value: AccordionValue) => void; /** - * Whether multiple Accordion sections can be opened at the same time. + * Whether multiple items can be open at the same time. * @default true */ openMultiple: boolean; /** - * The orientation of the accordion. + * The visual orientation of the accordion. + * Controls whether the roving focus uses left/right or up/down arrow keys. * @default 'vertical' */ orientation: AccordionOrientation; @@ -232,7 +233,7 @@ export namespace useAccordionRoot { accordionItemRefs: React.RefObject<(HTMLElement | null)[]>; direction: Direction; /** - * The disabled state of the Accordion + * Whether the component should ignore user actions. */ disabled: boolean; handleValueChange: (value: number | string, nextOpen: boolean) => void; diff --git a/packages/react/src/accordion/trigger/AccordionTrigger.tsx b/packages/react/src/accordion/trigger/AccordionTrigger.tsx index 9bd517dedf..6b573bbb10 100644 --- a/packages/react/src/accordion/trigger/AccordionTrigger.tsx +++ b/packages/react/src/accordion/trigger/AccordionTrigger.tsx @@ -75,7 +75,8 @@ AccordionTrigger.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -87,7 +88,10 @@ AccordionTrigger.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/alert-dialog/backdrop/AlertDialogBackdrop.tsx b/packages/react/src/alert-dialog/backdrop/AlertDialogBackdrop.tsx index 401b663704..a0dc0a507c 100644 --- a/packages/react/src/alert-dialog/backdrop/AlertDialogBackdrop.tsx +++ b/packages/react/src/alert-dialog/backdrop/AlertDialogBackdrop.tsx @@ -56,14 +56,16 @@ const AlertDialogBackdrop = React.forwardRef(function AlertDialogBackdrop( namespace AlertDialogBackdrop { export interface Props extends BaseUIComponentProps<'div', State> { /** - * If `true`, the backdrop element is kept in the DOM when closed. - * + * Whether to keep the element in the DOM while the alert dialog is hidden. * @default false */ keepMounted?: boolean; } export interface State { + /** + * Whether the dialog is currently open. + */ open: boolean; transitionStatus: TransitionStatus; } @@ -79,17 +81,20 @@ AlertDialogBackdrop.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the backdrop element is kept in the DOM when closed. - * + * Whether to keep the element in the DOM while the alert dialog is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/alert-dialog/close/AlertDialogClose.tsx b/packages/react/src/alert-dialog/close/AlertDialogClose.tsx index 5bb2f21a02..a1ff9612f5 100644 --- a/packages/react/src/alert-dialog/close/AlertDialogClose.tsx +++ b/packages/react/src/alert-dialog/close/AlertDialogClose.tsx @@ -50,11 +50,15 @@ AlertDialogClose.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/alert-dialog/description/AlertDialogDescription.tsx b/packages/react/src/alert-dialog/description/AlertDialogDescription.tsx index 2027011671..3c5f3d04d0 100644 --- a/packages/react/src/alert-dialog/description/AlertDialogDescription.tsx +++ b/packages/react/src/alert-dialog/description/AlertDialogDescription.tsx @@ -58,7 +58,8 @@ AlertDialogDescription.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -66,7 +67,10 @@ AlertDialogDescription.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/alert-dialog/popup/AlertDialogPopup.tsx b/packages/react/src/alert-dialog/popup/AlertDialogPopup.tsx index d12cd9debe..b67c7fee2e 100644 --- a/packages/react/src/alert-dialog/popup/AlertDialogPopup.tsx +++ b/packages/react/src/alert-dialog/popup/AlertDialogPopup.tsx @@ -110,27 +110,28 @@ const AlertDialogPopup = React.forwardRef(function AlertDialogPopup( namespace AlertDialogPopup { export interface Props extends BaseUIComponentProps<'div', State> { /** - * If `true`, the dialog element is kept in the DOM when closed. - * + * Whether to keep the element in the DOM while the alert dialog is hidden. * @default false */ keepMounted?: boolean; /** - * Determines an element to focus when the dialog is opened. - * It can be either a ref to the element or a function that returns such a ref. - * If not provided, the first focusable element is focused. + * Determines the element to focus when the dialog is opened. + * By default, the first focusable element is focused. */ initialFocus?: | React.RefObject | ((interactionType: InteractionType) => React.RefObject); /** - * Determines an element to focus after the dialog is closed. - * If not provided, the focus returns to the trigger. + * Determines the element to focus when the dialog is closed. + * By default, focus returns to trigger. */ finalFocus?: React.RefObject; } export interface State { + /** + * Whether the dialog is currently open. + */ open: boolean; nestedOpenDialogCount: number; transitionStatus: TransitionStatus; @@ -147,12 +148,13 @@ AlertDialogPopup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Determines an element to focus after the dialog is closed. - * If not provided, the focus returns to the trigger. + * Determines the element to focus when the dialog is closed. + * By default, focus returns to trigger. */ finalFocus: refType, /** @@ -160,22 +162,23 @@ AlertDialogPopup.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * Determines an element to focus when the dialog is opened. - * It can be either a ref to the element or a function that returns such a ref. - * If not provided, the first focusable element is focused. + * Determines the element to focus when the dialog is opened. + * By default, the first focusable element is focused. */ initialFocus: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ PropTypes.func, refType, ]), /** - * If `true`, the dialog element is kept in the DOM when closed. - * + * Whether to keep the element in the DOM while the alert dialog is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/alert-dialog/root/AlertDialogRoot.tsx b/packages/react/src/alert-dialog/root/AlertDialogRoot.tsx index 6d18c9bc8e..10158ec8b4 100644 --- a/packages/react/src/alert-dialog/root/AlertDialogRoot.tsx +++ b/packages/react/src/alert-dialog/root/AlertDialogRoot.tsx @@ -55,18 +55,18 @@ AlertDialogRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Determines whether the dialog is initally open. - * This is an uncontrolled equivalent of the `open` prop. + * Whether the dialog is initially open. * + * To render a controlled dialog, use the `open` prop instead. * @default false */ defaultOpen: PropTypes.bool, /** - * Callback invoked when the dialog is being opened or closed. + * Event handler called when the dialog is opened or closed. */ onOpenChange: PropTypes.func, /** - * Determines whether the dialog is open. + * Whether the dialog is currently open. */ open: PropTypes.bool, } as any; diff --git a/packages/react/src/alert-dialog/title/AlertDialogTitle.tsx b/packages/react/src/alert-dialog/title/AlertDialogTitle.tsx index 1cba18d908..43311f117d 100644 --- a/packages/react/src/alert-dialog/title/AlertDialogTitle.tsx +++ b/packages/react/src/alert-dialog/title/AlertDialogTitle.tsx @@ -58,7 +58,8 @@ AlertDialogTitle.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -66,7 +67,10 @@ AlertDialogTitle.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/alert-dialog/trigger/AlertDialogTrigger.tsx b/packages/react/src/alert-dialog/trigger/AlertDialogTrigger.tsx index a97285ea4e..0a3610b626 100644 --- a/packages/react/src/alert-dialog/trigger/AlertDialogTrigger.tsx +++ b/packages/react/src/alert-dialog/trigger/AlertDialogTrigger.tsx @@ -41,6 +41,9 @@ namespace AlertDialogTrigger { export interface Props extends BaseUIComponentProps<'button', State> {} export interface State { + /** + * Whether the dialog is currently open. + */ open: boolean; } } @@ -55,11 +58,15 @@ AlertDialogTrigger.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/checkbox-group/CheckboxGroup.tsx b/packages/react/src/checkbox-group/CheckboxGroup.tsx index 125d0ddced..8e7d51846c 100644 --- a/packages/react/src/checkbox-group/CheckboxGroup.tsx +++ b/packages/react/src/checkbox-group/CheckboxGroup.tsx @@ -76,6 +76,9 @@ const CheckboxGroup = React.forwardRef(function CheckboxGroup( namespace CheckboxGroup { export interface State extends FieldRoot.State { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; } export interface Props extends BaseUIComponentProps<'div', State> { @@ -97,7 +100,7 @@ namespace CheckboxGroup { */ allValues?: string[]; /** - * Whether the checkbox group is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -118,7 +121,8 @@ CheckboxGroup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -126,7 +130,7 @@ CheckboxGroup.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.arrayOf(PropTypes.string), /** - * Whether the checkbox group is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -136,7 +140,10 @@ CheckboxGroup.propTypes /* remove-proptypes */ = { */ onValueChange: PropTypes.func, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/checkbox/indicator/CheckboxIndicator.tsx b/packages/react/src/checkbox/indicator/CheckboxIndicator.tsx index d51250f159..ecd33b33cc 100644 --- a/packages/react/src/checkbox/indicator/CheckboxIndicator.tsx +++ b/packages/react/src/checkbox/indicator/CheckboxIndicator.tsx @@ -86,7 +86,7 @@ namespace CheckboxIndicator { export interface Props extends BaseUIComponentProps<'span', State> { /** - * Determines if the indicator stays mounted when unchecked. + * Whether to keep the element in the DOM when the checkbox is not checked. * @default false */ keepMounted?: boolean; @@ -103,16 +103,20 @@ CheckboxIndicator.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Determines if the indicator stays mounted when unchecked. + * Whether to keep the element in the DOM when the checkbox is not checked. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/checkbox/root/CheckboxRoot.tsx b/packages/react/src/checkbox/root/CheckboxRoot.tsx index ef7599b600..daaf53c573 100644 --- a/packages/react/src/checkbox/root/CheckboxRoot.tsx +++ b/packages/react/src/checkbox/root/CheckboxRoot.tsx @@ -114,10 +114,25 @@ const CheckboxRoot = React.forwardRef(function CheckboxRoot( namespace CheckboxRoot { export interface State extends FieldRoot.State { + /** + * Whether the checkbox is currently ticked. + */ checked: boolean; + /** + * Whether the component should ignore user actions. + */ disabled: boolean; + /** + * Whether the user should be unable to tick or untick the checkbox. + */ readOnly: boolean; + /** + * Whether the user must tick the checkbox before submitting a form. + */ required: boolean; + /** + * Whether the checkbox is in a mixed state: neither ticked, nor unticked. + */ indeterminate: boolean; } export interface Props @@ -131,8 +146,9 @@ CheckboxRoot.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * If `true`, the component is checked. + * Whether the checkbox is currently ticked. * + * To render an uncontrolled checkbox, use the `defaultChecked` prop instead. * @default undefined */ checked: PropTypes.bool, @@ -141,29 +157,29 @@ CheckboxRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * The default checked state. Use when the component is not controlled. + * Whether the checkbox is initially ticked. * + * To render a controlled checkbox, use the `checked` prop instead. * @default false */ defaultChecked: PropTypes.bool, /** - * If `true`, the component is disabled. - * + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** - * If `true`, the checkbox will be indeterminate. - * + * Whether the checkbox is in a mixed state: neither ticked, nor unticked. * @default false */ indeterminate: PropTypes.bool, /** - * The ref to the input element. + * A React ref to access the hidden `` element. */ inputRef: PropTypes.oneOfType([ PropTypes.func, @@ -172,16 +188,15 @@ CheckboxRoot.propTypes /* remove-proptypes */ = { }), ]), /** - * Name of the underlying input element. - * + * Identifies the field when a form is submitted. * @default undefined */ name: PropTypes.string, /** - * Callback fired when the checked state is changed. + * Event handler called when the checkbox is ticked or unticked. * * @param {boolean} checked The new checked state. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. */ onCheckedChange: PropTypes.func, /** @@ -190,18 +205,19 @@ CheckboxRoot.propTypes /* remove-proptypes */ = { */ parent: PropTypes.bool, /** - * If `true`, the component is read only. - * + * Whether the user should be unable to tick or untick the checkbox. * @default false */ readOnly: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * If `true`, the `input` element is required. - * + * Whether the user must tick the checkbox before submitting a form. * @default false */ required: PropTypes.bool, diff --git a/packages/react/src/checkbox/root/useCheckboxRoot.ts b/packages/react/src/checkbox/root/useCheckboxRoot.ts index edfb25b3b6..28cd04695c 100644 --- a/packages/react/src/checkbox/root/useCheckboxRoot.ts +++ b/packages/react/src/checkbox/root/useCheckboxRoot.ts @@ -186,45 +186,43 @@ export namespace UseCheckboxRoot { */ id?: string; /** - * Name of the underlying input element. - * + * Identifies the field when a form is submitted. * @default undefined */ name?: string; /** - * If `true`, the component is checked. + * Whether the checkbox is currently ticked. * + * To render an uncontrolled checkbox, use the `defaultChecked` prop instead. * @default undefined */ checked?: boolean; /** - * The default checked state. Use when the component is not controlled. + * Whether the checkbox is initially ticked. * + * To render a controlled checkbox, use the `checked` prop instead. * @default false */ defaultChecked?: boolean; /** - * If `true`, the component is disabled. - * + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; /** - * Callback fired when the checked state is changed. + * Event handler called when the checkbox is ticked or unticked. * * @param {boolean} checked The new checked state. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. */ onCheckedChange?: (checked: boolean, event: Event) => void; /** - * If `true`, the component is read only. - * + * Whether the user should be unable to tick or untick the checkbox. * @default false */ readOnly?: boolean; /** - * If `true`, the `input` element is required. - * + * Whether the user must tick the checkbox before submitting a form. * @default false */ required?: boolean; @@ -235,13 +233,12 @@ export namespace UseCheckboxRoot { */ autoFocus?: boolean; /** - * If `true`, the checkbox will be indeterminate. - * + * Whether the checkbox is in a mixed state: neither ticked, nor unticked. * @default false */ indeterminate?: boolean; /** - * The ref to the input element. + * A React ref to access the hidden `` element. */ inputRef?: React.Ref; /** @@ -253,7 +250,7 @@ export namespace UseCheckboxRoot { export interface ReturnValue { /** - * If `true`, the checkbox is checked. + * Whether the checkbox is currently ticked. */ checked: boolean; /** diff --git a/packages/react/src/collapsible/panel/CollapsiblePanel.tsx b/packages/react/src/collapsible/panel/CollapsiblePanel.tsx index c5467d192d..e5356ea845 100644 --- a/packages/react/src/collapsible/panel/CollapsiblePanel.tsx +++ b/packages/react/src/collapsible/panel/CollapsiblePanel.tsx @@ -92,18 +92,17 @@ export { CollapsiblePanel }; namespace CollapsiblePanel { export interface Props extends BaseUIComponentProps<'div', CollapsibleRoot.State> { /** - * If `true`, sets the hidden state using `hidden="until-found"`. The panel - * remains mounted in the DOM when closed and overrides `keepMounted`. - * If `false`, sets the hidden state using `hidden`. + * Allows the browser’s built-in page search to find and expand the panel contents. + * + * Overrides the `keepMounted` prop and uses `hidden="until-found"` + * to hide the element without removing it from the DOM. + * * @default false */ hiddenUntilFound?: boolean; /** - * If `true`, the panel remains mounted when closed and is instead - * hidden using the `hidden` attribute - * If `false`, the panel is unmounted when closed. - * If the `hiddenUntilFound` prop is used, the panel overrides this prop and - * is remains mounted when closed. + * Whether to keep the element in the DOM while the panel is hidden. + * This prop is ignored when `hiddenUntilFound` is used. * @default false */ keepMounted?: boolean; @@ -120,13 +119,16 @@ CollapsiblePanel.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, sets the hidden state using `hidden="until-found"`. The panel - * remains mounted in the DOM when closed and overrides `keepMounted`. - * If `false`, sets the hidden state using `hidden`. + * Allows the browser’s built-in page search to find and expand the panel contents. + * + * Overrides the `keepMounted` prop and uses `hidden="until-found"` + * to hide the element without removing it from the DOM. + * * @default false */ hiddenUntilFound: PropTypes.bool, @@ -135,16 +137,16 @@ CollapsiblePanel.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * If `true`, the panel remains mounted when closed and is instead - * hidden using the `hidden` attribute - * If `false`, the panel is unmounted when closed. - * If the `hiddenUntilFound` prop is used, the panel overrides this prop and - * is remains mounted when closed. + * Whether to keep the element in the DOM while the panel is hidden. + * This prop is ignored when `hiddenUntilFound` is used. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/collapsible/panel/useCollapsiblePanel.ts b/packages/react/src/collapsible/panel/useCollapsiblePanel.ts index 721f30a477..e7d65f9e6c 100644 --- a/packages/react/src/collapsible/panel/useCollapsiblePanel.ts +++ b/packages/react/src/collapsible/panel/useCollapsiblePanel.ts @@ -308,21 +308,21 @@ export function useCollapsiblePanel( export namespace useCollapsiblePanel { export interface Parameters { /** - * If `true`, sets the hidden state using `hidden="until-found"`. The panel - * remains mounted in the DOM when closed and overrides `keepMounted`. - * If `false`, sets the hidden state using `hidden`. + * Allows the browser’s built-in page search to find and expand the panel contents. + * + * Overrides the `keepMounted` prop and uses `hidden="until-found"` + * to hide the element without removing it from the DOM. */ hiddenUntilFound: boolean; panelId: React.HTMLAttributes['id']; /** - * If `true` the panel remains mounted in the DOM when closed and is hidden - * using the HTML `hidden` attribute. - * Using `hiddenUntilFound` overrides this and forces `keepMounted={true}` + * Whether to keep the element in the DOM while the panel is closed. + * This prop is ignored when `hiddenUntilFound` is used. */ keepMounted: boolean; mounted: boolean; /** - * The open state of the Collapsible. + * Whether the collapsible panel is currently open. */ open: boolean; ref: React.Ref; diff --git a/packages/react/src/collapsible/root/CollapsibleRoot.tsx b/packages/react/src/collapsible/root/CollapsibleRoot.tsx index d31b0885bc..07cfa69362 100644 --- a/packages/react/src/collapsible/root/CollapsibleRoot.tsx +++ b/packages/react/src/collapsible/root/CollapsibleRoot.tsx @@ -103,27 +103,29 @@ CollapsibleRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the Collapsible is initially open. - * This is the uncontrolled counterpart of `open`. + * Whether the collapsible panel is initially open. + * + * To render a controlled collapsible, use the `open` prop instead. * @default false */ defaultOpen: PropTypes.bool, /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** - * Callback fired when the Collapsible is opened or closed. + * Event handler called when the panel is opened or closed. */ onOpenChange: PropTypes.func, /** - * If `true`, the Collapsible is initially open. - * This is the controlled counterpart of `defaultOpen`. + * Whether the collapsible panel is currently open. + * To render an uncontrolled collapsible, use the `defaultOpen` prop instead. */ open: PropTypes.bool, /** diff --git a/packages/react/src/collapsible/root/useCollapsibleRoot.ts b/packages/react/src/collapsible/root/useCollapsibleRoot.ts index 42c6dcaa6b..32396bf837 100644 --- a/packages/react/src/collapsible/root/useCollapsibleRoot.ts +++ b/packages/react/src/collapsible/root/useCollapsibleRoot.ts @@ -44,22 +44,23 @@ export function useCollapsibleRoot( export namespace useCollapsibleRoot { export interface Parameters { /** - * If `true`, the Collapsible is initially open. - * This is the controlled counterpart of `defaultOpen`. + * Whether the collapsible panel is currently open. + * To render an uncontrolled collapsible, use the `defaultOpen` prop instead. */ open?: boolean; /** - * If `true`, the Collapsible is initially open. - * This is the uncontrolled counterpart of `open`. + * Whether the collapsible panel is initially open. + * + * To render a controlled collapsible, use the `open` prop instead. * @default false */ defaultOpen?: boolean; /** - * Callback fired when the Collapsible is opened or closed. + * Event handler called when the panel is opened or closed. */ onOpenChange: (open: boolean) => void; /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: boolean; @@ -68,12 +69,13 @@ export namespace useCollapsibleRoot { export interface ReturnValue { panelId: React.HTMLAttributes['id']; /** - * The disabled state of the Collapsible + * Whether the component should ignore user actions. */ disabled: boolean; mounted: boolean; /** - * The open state of the Collapsible + * Whether the collapsible panel is currently open. + * To render an uncontrolled collapsible, use the `defaultOpen` prop instead. */ open: boolean; setPanelId: (id: string | undefined) => void; diff --git a/packages/react/src/collapsible/trigger/CollapsibleTrigger.tsx b/packages/react/src/collapsible/trigger/CollapsibleTrigger.tsx index 45d19d7f94..99d5619949 100644 --- a/packages/react/src/collapsible/trigger/CollapsibleTrigger.tsx +++ b/packages/react/src/collapsible/trigger/CollapsibleTrigger.tsx @@ -58,7 +58,8 @@ CollapsibleTrigger.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -70,7 +71,10 @@ CollapsibleTrigger.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/collapsible/trigger/useCollapsibleTrigger.ts b/packages/react/src/collapsible/trigger/useCollapsibleTrigger.ts index 41350cfd16..1453d328ab 100644 --- a/packages/react/src/collapsible/trigger/useCollapsibleTrigger.ts +++ b/packages/react/src/collapsible/trigger/useCollapsibleTrigger.ts @@ -50,9 +50,13 @@ export namespace useCollapsibleTrigger { * The id of the element controlled by the Trigger */ panelId: React.HTMLAttributes['id']; + /** + * Whether the component should ignore user actions. + */ disabled: boolean; /** - * The open state of the Collapsible + * Whether the collapsible panel is currently open. + * To render an uncontrolled collapsible, use the `defaultOpen` prop instead. */ open: boolean; rootRef: React.Ref; diff --git a/packages/react/src/composite/item/CompositeItem.tsx b/packages/react/src/composite/item/CompositeItem.tsx index 4dcbf503c4..6fbd1f9cd0 100644 --- a/packages/react/src/composite/item/CompositeItem.tsx +++ b/packages/react/src/composite/item/CompositeItem.tsx @@ -62,7 +62,8 @@ CompositeItem.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -74,7 +75,10 @@ CompositeItem.propTypes /* remove-proptypes */ = { */ metadata: PropTypes.any, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/composite/root/CompositeRoot.tsx b/packages/react/src/composite/root/CompositeRoot.tsx index 8d40e6527c..d23f8de6f4 100644 --- a/packages/react/src/composite/root/CompositeRoot.tsx +++ b/packages/react/src/composite/root/CompositeRoot.tsx @@ -100,7 +100,8 @@ CompositeRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -149,7 +150,10 @@ CompositeRoot.propTypes /* remove-proptypes */ = { */ orientation: PropTypes.oneOf(['both', 'horizontal', 'vertical']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/dialog/backdrop/DialogBackdrop.tsx b/packages/react/src/dialog/backdrop/DialogBackdrop.tsx index c22c57b26b..6b5def6906 100644 --- a/packages/react/src/dialog/backdrop/DialogBackdrop.tsx +++ b/packages/react/src/dialog/backdrop/DialogBackdrop.tsx @@ -56,14 +56,16 @@ const DialogBackdrop = React.forwardRef(function DialogBackdrop( namespace DialogBackdrop { export interface Props extends BaseUIComponentProps<'div', State> { /** - * If `true`, the backdrop element is kept in the DOM when closed. - * + * Whether to keep the HTML element in the DOM while the dialog is hidden. * @default false */ keepMounted?: boolean; } export interface State { + /** + * Whether the dialog is currently open. + */ open: boolean; transitionStatus: TransitionStatus; } @@ -79,17 +81,20 @@ DialogBackdrop.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the backdrop element is kept in the DOM when closed. - * + * Whether to keep the HTML element in the DOM while the dialog is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/dialog/close/DialogClose.tsx b/packages/react/src/dialog/close/DialogClose.tsx index e5b2ab46e5..93b7818e37 100644 --- a/packages/react/src/dialog/close/DialogClose.tsx +++ b/packages/react/src/dialog/close/DialogClose.tsx @@ -50,11 +50,15 @@ DialogClose.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/dialog/close/useDialogClose.ts b/packages/react/src/dialog/close/useDialogClose.ts index 45af0d84f6..079b91dea8 100644 --- a/packages/react/src/dialog/close/useDialogClose.ts +++ b/packages/react/src/dialog/close/useDialogClose.ts @@ -21,11 +21,11 @@ export function useDialogClose(params: useDialogClose.Parameters): useDialogClos export namespace useDialogClose { export interface Parameters { /** - * Determines whether the dialog is open. + * Whether the dialog is currently open. */ open: boolean; /** - * Callback invoked when the dialog is being opened or closed. + * Event handler called when the dialog is opened or closed. */ onOpenChange: (open: boolean) => void; } diff --git a/packages/react/src/dialog/description/DialogDescription.tsx b/packages/react/src/dialog/description/DialogDescription.tsx index 01d6bbdb47..e767800560 100644 --- a/packages/react/src/dialog/description/DialogDescription.tsx +++ b/packages/react/src/dialog/description/DialogDescription.tsx @@ -58,7 +58,8 @@ DialogDescription.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -66,7 +67,10 @@ DialogDescription.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/dialog/popup/DialogPopup.tsx b/packages/react/src/dialog/popup/DialogPopup.tsx index fa1e7f61ca..491d103bc2 100644 --- a/packages/react/src/dialog/popup/DialogPopup.tsx +++ b/packages/react/src/dialog/popup/DialogPopup.tsx @@ -110,27 +110,28 @@ const DialogPopup = React.forwardRef(function DialogPopup( namespace DialogPopup { export interface Props extends BaseUIComponentProps<'div', State> { /** - * If `true`, the dialog element is kept in the DOM when closed. - * + * Whether to keep the HTML element in the DOM while the dialog is hidden. * @default false */ keepMounted?: boolean; /** - * Determines an element to focus when the dialog is opened. - * It can be either a ref to the element or a function that returns such a ref. - * If not provided, the first focusable element is focused. + * Determines the element to focus when the dialog is opened. + * By default, the first focusable element is focused. */ initialFocus?: | React.RefObject | ((interactionType: InteractionType) => React.RefObject); /** - * Determines an element to focus after the dialog is closed. - * If not provided, the focus returns to the trigger. + * Determines the element to focus when the dialog is closed. + * By default, focus returns to trigger. */ finalFocus?: React.RefObject; } export interface State { + /** + * Whether the dialog is currently open. + */ open: boolean; nestedOpenDialogCount: number; transitionStatus: TransitionStatus; @@ -147,12 +148,13 @@ DialogPopup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Determines an element to focus after the dialog is closed. - * If not provided, the focus returns to the trigger. + * Determines the element to focus when the dialog is closed. + * By default, focus returns to trigger. */ finalFocus: refType, /** @@ -160,22 +162,23 @@ DialogPopup.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * Determines an element to focus when the dialog is opened. - * It can be either a ref to the element or a function that returns such a ref. - * If not provided, the first focusable element is focused. + * Determines the element to focus when the dialog is opened. + * By default, the first focusable element is focused. */ initialFocus: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ PropTypes.func, refType, ]), /** - * If `true`, the dialog element is kept in the DOM when closed. - * + * Whether to keep the HTML element in the DOM while the dialog is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/dialog/popup/useDialogPopup.tsx b/packages/react/src/dialog/popup/useDialogPopup.tsx index 9d2c74adc6..be3f408807 100644 --- a/packages/react/src/dialog/popup/useDialogPopup.tsx +++ b/packages/react/src/dialog/popup/useDialogPopup.tsx @@ -105,12 +105,12 @@ export namespace useDialogPopup { */ modal: boolean; /** - * Determines if the dialog is open. + * Whether the dialog is currently open. */ open: boolean; openMethod: InteractionType | null; /** - * Callback fired when the dialog is requested to be opened or closed. + * Event handler called when the dialog is opened or closed. */ onOpenChange: (open: boolean, event?: Event) => void; /** @@ -126,9 +126,8 @@ export namespace useDialogPopup { */ setPopupElementId: (id: string | undefined) => void; /** - * Determines an element to focus when the dialog is opened. - * It can be either a ref to the element or a function that returns such a ref. - * If not provided, the first focusable element is focused. + * Determines the element to focus when the dialog is opened. + * By default, the first focusable element is focused. */ initialFocus?: | React.RefObject diff --git a/packages/react/src/dialog/root/DialogRoot.tsx b/packages/react/src/dialog/root/DialogRoot.tsx index 126e35b167..80487ab090 100644 --- a/packages/react/src/dialog/root/DialogRoot.tsx +++ b/packages/react/src/dialog/root/DialogRoot.tsx @@ -63,9 +63,9 @@ DialogRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Determines whether the dialog is initally open. - * This is an uncontrolled equivalent of the `open` prop. + * Whether the dialog is initially open. * + * To render a controlled dialog, use the `open` prop instead. * @default false */ defaultOpen: PropTypes.bool, @@ -80,11 +80,11 @@ DialogRoot.propTypes /* remove-proptypes */ = { */ modal: PropTypes.bool, /** - * Callback invoked when the dialog is being opened or closed. + * Event handler called when the dialog is opened or closed. */ onOpenChange: PropTypes.func, /** - * Determines whether the dialog is open. + * Whether the dialog is currently open. */ open: PropTypes.bool, } as any; diff --git a/packages/react/src/dialog/root/useDialogRoot.ts b/packages/react/src/dialog/root/useDialogRoot.ts index 3407c45eac..6653d925d1 100644 --- a/packages/react/src/dialog/root/useDialogRoot.ts +++ b/packages/react/src/dialog/root/useDialogRoot.ts @@ -154,13 +154,13 @@ export function useDialogRoot(parameters: useDialogRoot.Parameters): useDialogRo export interface CommonParameters { /** - * Determines whether the dialog is open. + * Whether the dialog is currently open. */ open?: boolean; /** - * Determines whether the dialog is initally open. - * This is an uncontrolled equivalent of the `open` prop. + * Whether the dialog is initially open. * + * To render a controlled dialog, use the `open` prop instead. * @default false */ defaultOpen?: boolean; @@ -170,7 +170,7 @@ export interface CommonParameters { */ modal?: boolean; /** - * Callback invoked when the dialog is being opened or closed. + * Event handler called when the dialog is opened or closed. */ onOpenChange?: (open: boolean, event?: Event) => void; /** @@ -214,11 +214,11 @@ export namespace useDialogRoot { */ onNestedDialogOpen?: (ownChildrenCount: number) => void; /** - * Callback to fire when the dialog is requested to be opened or closed. + * Event handler called when the dialog is opened or closed. */ onOpenChange: (open: boolean, event?: Event) => void; /** - * Determines if the dialog is open. + * Whether the dialog is currently open. */ open: boolean; /** diff --git a/packages/react/src/dialog/title/DialogTitle.tsx b/packages/react/src/dialog/title/DialogTitle.tsx index 0bd6b7af69..2be2963abd 100644 --- a/packages/react/src/dialog/title/DialogTitle.tsx +++ b/packages/react/src/dialog/title/DialogTitle.tsx @@ -58,7 +58,8 @@ DialogTitle.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -66,7 +67,10 @@ DialogTitle.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/dialog/trigger/DialogTrigger.tsx b/packages/react/src/dialog/trigger/DialogTrigger.tsx index a60bc50828..9e244b7f39 100644 --- a/packages/react/src/dialog/trigger/DialogTrigger.tsx +++ b/packages/react/src/dialog/trigger/DialogTrigger.tsx @@ -41,6 +41,9 @@ namespace DialogTrigger { export interface Props extends BaseUIComponentProps<'button', State> {} export interface State { + /** + * Whether the dialog is currently open. + */ open: boolean; } } @@ -55,11 +58,15 @@ DialogTrigger.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/field/control/FieldControl.tsx b/packages/react/src/field/control/FieldControl.tsx index 2d7d234a2c..a83e73b28e 100644 --- a/packages/react/src/field/control/FieldControl.tsx +++ b/packages/react/src/field/control/FieldControl.tsx @@ -87,7 +87,8 @@ FieldControl.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -115,7 +116,10 @@ FieldControl.propTypes /* remove-proptypes */ = { */ onValueChange: PropTypes.func, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/field/description/FieldDescription.tsx b/packages/react/src/field/description/FieldDescription.tsx index c6581222f8..620bf3eee8 100644 --- a/packages/react/src/field/description/FieldDescription.tsx +++ b/packages/react/src/field/description/FieldDescription.tsx @@ -53,7 +53,8 @@ FieldDescription.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -61,7 +62,10 @@ FieldDescription.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/field/error/FieldError.tsx b/packages/react/src/field/error/FieldError.tsx index fbf1ab02cb..89e2f48610 100644 --- a/packages/react/src/field/error/FieldError.tsx +++ b/packages/react/src/field/error/FieldError.tsx @@ -81,7 +81,8 @@ FieldError.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -110,7 +111,10 @@ FieldError.propTypes /* remove-proptypes */ = { 'valueMissing', ]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/field/label/FieldLabel.tsx b/packages/react/src/field/label/FieldLabel.tsx index da5f8466e5..1fe3b2758e 100644 --- a/packages/react/src/field/label/FieldLabel.tsx +++ b/packages/react/src/field/label/FieldLabel.tsx @@ -64,7 +64,8 @@ FieldLabel.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -72,7 +73,10 @@ FieldLabel.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/field/root/FieldRoot.tsx b/packages/react/src/field/root/FieldRoot.tsx index 37be8eae79..9c6dea0f67 100644 --- a/packages/react/src/field/root/FieldRoot.tsx +++ b/packages/react/src/field/root/FieldRoot.tsx @@ -154,6 +154,9 @@ export interface FieldValidityData { namespace FieldRoot { export interface State { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; touched: boolean; dirty: boolean; @@ -162,13 +165,14 @@ namespace FieldRoot { export interface Props extends BaseUIComponentProps<'div', State> { /** - * Whether the field is disabled. Takes precedence over the `disabled` prop of the `Field.Control` - * component. + * Whether the component should ignore user actions. + * Takes precedence over the `disabled` prop on the `` component. * @default false */ disabled?: boolean; /** - * The field's name. Takes precedence over the `name` prop of the `Field.Control` component. + * Identifies the field when a form is submitted. + * Takes precedence over the `name` prop on the `` component. */ name?: string; /** @@ -188,7 +192,7 @@ namespace FieldRoot { */ validationDebounceTime?: number; /** - * Determines if the field is forcefully marked as invalid. + * Whether the field is forcefully marked as invalid. */ invalid?: boolean; } @@ -204,25 +208,30 @@ FieldRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the field is disabled. Takes precedence over the `disabled` prop of the `Field.Control` - * component. + * Whether the component should ignore user actions. + * Takes precedence over the `disabled` prop on the `` component. * @default false */ disabled: PropTypes.bool, /** - * Determines if the field is forcefully marked as invalid. + * Whether the field is forcefully marked as invalid. */ invalid: PropTypes.bool, /** - * The field's name. Takes precedence over the `name` prop of the `Field.Control` component. + * Identifies the field when a form is submitted. + * Takes precedence over the `name` prop on the `` component. */ name: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/fieldset/legend/FieldsetLegend.tsx b/packages/react/src/fieldset/legend/FieldsetLegend.tsx index 86a81985d9..4d39b14e59 100644 --- a/packages/react/src/fieldset/legend/FieldsetLegend.tsx +++ b/packages/react/src/fieldset/legend/FieldsetLegend.tsx @@ -43,6 +43,9 @@ const FieldsetLegend = React.forwardRef(function FieldsetLegend( namespace FieldsetLegend { export interface State { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; } @@ -59,7 +62,8 @@ FieldsetLegend.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -67,7 +71,10 @@ FieldsetLegend.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/fieldset/root/FieldsetRoot.tsx b/packages/react/src/fieldset/root/FieldsetRoot.tsx index a948756d69..62bf66fb6e 100644 --- a/packages/react/src/fieldset/root/FieldsetRoot.tsx +++ b/packages/react/src/fieldset/root/FieldsetRoot.tsx @@ -54,6 +54,9 @@ const FieldsetRoot = React.forwardRef(function FieldsetRoot( namespace FieldsetRoot { export type State = { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; }; @@ -70,7 +73,8 @@ FieldsetRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -78,7 +82,10 @@ FieldsetRoot.propTypes /* remove-proptypes */ = { */ disabled: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/form/Form.tsx b/packages/react/src/form/Form.tsx index 71b2344ff5..2895e53837 100644 --- a/packages/react/src/form/Form.tsx +++ b/packages/react/src/form/Form.tsx @@ -114,7 +114,8 @@ Form.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -131,7 +132,10 @@ Form.propTypes /* remove-proptypes */ = { */ onSubmit: PropTypes.func, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/input/Input.tsx b/packages/react/src/input/Input.tsx index 22c4846fd0..b21be126fe 100644 --- a/packages/react/src/input/Input.tsx +++ b/packages/react/src/input/Input.tsx @@ -34,11 +34,15 @@ Input.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/menu/arrow/MenuArrow.tsx b/packages/react/src/menu/arrow/MenuArrow.tsx index ef19b17b61..a608447b90 100644 --- a/packages/react/src/menu/arrow/MenuArrow.tsx +++ b/packages/react/src/menu/arrow/MenuArrow.tsx @@ -56,6 +56,9 @@ const MenuArrow = React.forwardRef(function MenuArrow( namespace MenuArrow { export interface State { + /** + * Whether the menu is currently open. + */ open: boolean; side: Side; align: Align; @@ -75,11 +78,15 @@ MenuArrow.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/menu/backdrop/MenuBackdrop.tsx b/packages/react/src/menu/backdrop/MenuBackdrop.tsx index cede5dc423..d6098dbf9c 100644 --- a/packages/react/src/menu/backdrop/MenuBackdrop.tsx +++ b/packages/react/src/menu/backdrop/MenuBackdrop.tsx @@ -54,13 +54,16 @@ const MenuBackdrop = React.forwardRef(function MenuBackdrop( namespace MenuBackdrop { export interface State { + /** + * Whether the menu is currently open. + */ open: boolean; transitionStatus: TransitionStatus; } export interface Props extends BaseUIComponentProps<'div', State> { /** - * If `true`, the backdrop remains mounted when the menu popup is closed. + * Whether to keep the HTML element in the DOM when the menu is hidden. * @default false */ keepMounted?: boolean; @@ -77,16 +80,20 @@ MenuBackdrop.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the backdrop remains mounted when the menu popup is closed. + * Whether to keep the HTML element in the DOM when the menu is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.tsx b/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.tsx index 3bc0b06926..fb1c9fcfbd 100644 --- a/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.tsx +++ b/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.tsx @@ -46,17 +46,20 @@ MenuCheckboxItemIndicator.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the component is mounted even if the checkbox is not checked. - * + * Whether to keep the HTML element in the DOM when the checkbox item is not checked. * @default true */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; @@ -64,15 +67,20 @@ MenuCheckboxItemIndicator.propTypes /* remove-proptypes */ = { namespace MenuCheckboxItemIndicator { export interface Props extends BaseUIComponentProps<'span', State> { /** - * If `true`, the component is mounted even if the checkbox is not checked. - * + * Whether to keep the HTML element in the DOM when the checkbox item is not checked. * @default true */ keepMounted?: boolean; } export interface State { + /** + * Whether the checkbox item is currently ticked. + */ checked: boolean; + /** + * Whether the component should ignore user actions. + */ 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 381930ed65..b5db4d7a53 100644 --- a/packages/react/src/menu/checkbox-item/MenuCheckboxItem.tsx +++ b/packages/react/src/menu/checkbox-item/MenuCheckboxItem.tsx @@ -73,7 +73,9 @@ InnerMenuCheckboxItem.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * If `true`, the checkbox is checked. + * Whether the checkbox item is currently ticked. + * + * To render an uncontrolled checkbox item, use the `defaultChecked` prop instead. */ checked: PropTypes.bool, /** @@ -81,7 +83,8 @@ InnerMenuCheckboxItem.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -91,13 +94,14 @@ InnerMenuCheckboxItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * The default checked state. Use when the component is uncontrolled. + * Whether the checkbox item is initially ticked. * + * To render a controlled checkbox item, use the `checked` prop instead. * @default false */ defaultChecked: PropTypes.bool, /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -123,7 +127,7 @@ InnerMenuCheckboxItem.propTypes /* remove-proptypes */ = { on: PropTypes.func.isRequired, }).isRequired, /** - * Callback fired when the checked state is changed. + * Event handler called when the checkbox item is ticked or unticked. */ onCheckedChange: PropTypes.func, /** @@ -135,7 +139,10 @@ InnerMenuCheckboxItem.propTypes /* remove-proptypes */ = { */ propGetter: PropTypes.func.isRequired, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** @@ -202,24 +209,33 @@ interface InnerMenuCheckboxItemProps extends MenuCheckboxItem.Props { namespace MenuCheckboxItem { export type State = { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; highlighted: boolean; + /** + * Whether the checkbox item is currently ticked. + */ checked: boolean; }; export interface Props extends BaseUIComponentProps<'div', State> { /** - * If `true`, the checkbox is checked. + * Whether the checkbox item is currently ticked. + * + * To render an uncontrolled checkbox item, use the `defaultChecked` prop instead. */ checked?: boolean; /** - * The default checked state. Use when the component is uncontrolled. + * Whether the checkbox item is initially ticked. * + * To render a controlled checkbox item, use the `checked` prop instead. * @default false */ defaultChecked?: boolean; /** - * Callback fired when the checked state is changed. + * Event handler called when the checkbox item is ticked or unticked. */ onCheckedChange?: (checked: boolean, event: Event) => void; children?: React.ReactNode; @@ -228,7 +244,7 @@ namespace MenuCheckboxItem { */ onClick?: React.MouseEventHandler; /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -256,7 +272,9 @@ MenuCheckboxItem.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * If `true`, the checkbox is checked. + * Whether the checkbox item is currently ticked. + * + * To render an uncontrolled checkbox item, use the `defaultChecked` prop instead. */ checked: PropTypes.bool, /** @@ -270,13 +288,14 @@ MenuCheckboxItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * The default checked state. Use when the component is uncontrolled. + * Whether the checkbox item is initially ticked. * + * To render a controlled checkbox item, use the `checked` prop instead. * @default false */ defaultChecked: PropTypes.bool, /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -290,7 +309,7 @@ MenuCheckboxItem.propTypes /* remove-proptypes */ = { */ label: PropTypes.string, /** - * Callback fired when the checked state is changed. + * Event handler called when the checkbox item is ticked or unticked. */ onCheckedChange: PropTypes.func, /** diff --git a/packages/react/src/menu/group-label/MenuGroupLabel.tsx b/packages/react/src/menu/group-label/MenuGroupLabel.tsx index f6579a5480..4e232b9b7b 100644 --- a/packages/react/src/menu/group-label/MenuGroupLabel.tsx +++ b/packages/react/src/menu/group-label/MenuGroupLabel.tsx @@ -53,7 +53,8 @@ MenuGroupLabel.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -61,7 +62,10 @@ MenuGroupLabel.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/menu/group/MenuGroup.tsx b/packages/react/src/menu/group/MenuGroup.tsx index 536727511e..161efdfe91 100644 --- a/packages/react/src/menu/group/MenuGroup.tsx +++ b/packages/react/src/menu/group/MenuGroup.tsx @@ -48,11 +48,15 @@ MenuGroup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/menu/item/MenuItem.tsx b/packages/react/src/menu/item/MenuItem.tsx index c8e6d1ae42..694c0af4e2 100644 --- a/packages/react/src/menu/item/MenuItem.tsx +++ b/packages/react/src/menu/item/MenuItem.tsx @@ -73,7 +73,8 @@ InnerMenuItem.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -83,7 +84,7 @@ InnerMenuItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -117,7 +118,10 @@ InnerMenuItem.propTypes /* remove-proptypes */ = { */ propGetter: PropTypes.func.isRequired, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** @@ -182,6 +186,9 @@ interface InnerMenuItemProps extends MenuItem.Props { namespace MenuItem { export type State = { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; highlighted: boolean; }; @@ -193,7 +200,7 @@ namespace MenuItem { */ onClick?: React.MouseEventHandler; /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -231,7 +238,7 @@ MenuItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/menu/item/useMenuItem.ts b/packages/react/src/menu/item/useMenuItem.ts index e88cdabbe9..60160755e6 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; /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. */ disabled: boolean; /** diff --git a/packages/react/src/menu/popup/MenuPopup.tsx b/packages/react/src/menu/popup/MenuPopup.tsx index b57b8b8e9c..0442776f28 100644 --- a/packages/react/src/menu/popup/MenuPopup.tsx +++ b/packages/react/src/menu/popup/MenuPopup.tsx @@ -82,6 +82,9 @@ namespace MenuPopup { transitionStatus: TransitionStatus; side: Side; align: 'start' | 'end' | 'center'; + /** + * Whether the menu is currently open. + */ open: boolean; }; } @@ -96,7 +99,8 @@ MenuPopup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -104,7 +108,10 @@ MenuPopup.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/menu/positioner/MenuPositioner.tsx b/packages/react/src/menu/positioner/MenuPositioner.tsx index 40bb585d2e..8d227776df 100644 --- a/packages/react/src/menu/positioner/MenuPositioner.tsx +++ b/packages/react/src/menu/positioner/MenuPositioner.tsx @@ -142,6 +142,9 @@ const MenuPositioner = React.forwardRef(function MenuPositioner( export namespace MenuPositioner { export interface State { + /** + * Whether the menu is currently open. + */ open: boolean; side: Side; align: 'start' | 'end' | 'center'; @@ -187,7 +190,8 @@ MenuPositioner.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -219,7 +223,7 @@ MenuPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * Whether the menu popup remains mounted in the DOM while closed. + * Whether to keep the HTML element in the DOM while the menu is hidden. * @default false */ keepMounted: PropTypes.bool, @@ -229,7 +233,10 @@ MenuPositioner.propTypes /* remove-proptypes */ = { */ positionMethod: PropTypes.oneOf(['absolute', 'fixed']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/menu/positioner/useMenuPositioner.ts b/packages/react/src/menu/positioner/useMenuPositioner.ts index 7a3f521b70..c794f9b837 100644 --- a/packages/react/src/menu/positioner/useMenuPositioner.ts +++ b/packages/react/src/menu/positioner/useMenuPositioner.ts @@ -76,7 +76,7 @@ export function useMenuPositioner( export namespace useMenuPositioner { export interface SharedParameters { /** - * If `true`, the Menu is open. + * Whether the menu is currently open. */ open?: boolean; /** @@ -124,7 +124,7 @@ export namespace useMenuPositioner { */ collisionPadding?: Padding; /** - * Whether the menu popup remains mounted in the DOM while closed. + * Whether to keep the HTML element in the DOM while the menu is hidden. * @default false */ keepMounted?: boolean; diff --git a/packages/react/src/menu/radio-group/MenuRadioGroup.tsx b/packages/react/src/menu/radio-group/MenuRadioGroup.tsx index 4468c82cc4..23cf4a3c1e 100644 --- a/packages/react/src/menu/radio-group/MenuRadioGroup.tsx +++ b/packages/react/src/menu/radio-group/MenuRadioGroup.tsx @@ -104,7 +104,8 @@ MenuRadioGroup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -119,7 +120,10 @@ MenuRadioGroup.propTypes /* remove-proptypes */ = { */ onValueChange: PropTypes.func, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.tsx b/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.tsx index 159cb62308..d4d8e96aee 100644 --- a/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.tsx +++ b/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.tsx @@ -46,17 +46,20 @@ MenuRadioItemIndicator.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the component is mounted even if the Radio is not checked. - * + * Whether to keep the HTML element in the DOM when the radio item is inactive. * @default true */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; @@ -64,15 +67,20 @@ MenuRadioItemIndicator.propTypes /* remove-proptypes */ = { namespace MenuRadioItemIndicator { export interface Props extends BaseUIComponentProps<'span', State> { /** - * If `true`, the component is mounted even if the Radio is not checked. - * + * Whether to keep the HTML element in the DOM when the radio item is inactive. * @default true */ keepMounted?: boolean; } export interface State { + /** + * Whether the radio item is currently selected. + */ checked: boolean; + /** + * Whether the component should ignore user actions. + */ 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 a93d0dff49..2b92f9d199 100644 --- a/packages/react/src/menu/radio-item/MenuRadioItem.tsx +++ b/packages/react/src/menu/radio-item/MenuRadioItem.tsx @@ -80,7 +80,8 @@ InnerMenuRadioItem.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -90,7 +91,7 @@ InnerMenuRadioItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -124,7 +125,10 @@ InnerMenuRadioItem.propTypes /* remove-proptypes */ = { */ propGetter: PropTypes.func.isRequired, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** @@ -217,8 +221,14 @@ interface InnerMenuRadioItemProps extends Omit { namespace MenuRadioItem { export type State = { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; highlighted: boolean; + /** + * Whether the radio item is currently selected. + */ checked: boolean; }; @@ -234,7 +244,7 @@ namespace MenuRadioItem { */ onClick?: React.MouseEventHandler; /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -272,7 +282,7 @@ MenuRadioItem.propTypes /* remove-proptypes */ = { */ closeOnClick: PropTypes.bool, /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/menu/root/MenuRoot.tsx b/packages/react/src/menu/root/MenuRoot.tsx index 1957b032ee..0414197cb4 100644 --- a/packages/react/src/menu/root/MenuRoot.tsx +++ b/packages/react/src/menu/root/MenuRoot.tsx @@ -98,23 +98,24 @@ namespace MenuRoot { export interface Props { children: React.ReactNode; /** - * If `true`, the Menu is initially open. + * Whether the menu is initially open. * + * To render a controlled menu, use the `open` prop instead. * @default false */ defaultOpen?: boolean; /** - * If `true`, using keyboard navigation will wrap focus to the other end of the list once the end is reached. + * Whether to loop keyboard focus back to the first item + * when the end of the list is reached while using the arrow keys. * @default true */ loop?: boolean; /** - * Callback fired when the component requests to be opened or closed. + * Event handler called when the menu is opened or closed. */ onOpenChange?: (open: boolean, event?: Event) => void; /** - * Allows to control whether the dropdown is open. - * This is a controlled counterpart of `defaultOpen`. + * Whether the menu is currently open. */ open?: boolean; /** @@ -124,8 +125,7 @@ namespace MenuRoot { */ orientation?: MenuOrientation; /** - * If `true`, the Menu is disabled. - * + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -171,8 +171,9 @@ MenuRoot.propTypes /* remove-proptypes */ = { */ closeParentOnEsc: PropTypes.bool, /** - * If `true`, the Menu is initially open. + * Whether the menu is initially open. * + * To render a controlled menu, use the `open` prop instead. * @default false */ defaultOpen: PropTypes.bool, @@ -183,23 +184,22 @@ MenuRoot.propTypes /* remove-proptypes */ = { */ delay: PropTypes.number, /** - * If `true`, the Menu is disabled. - * + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** - * If `true`, using keyboard navigation will wrap focus to the other end of the list once the end is reached. + * Whether to loop keyboard focus back to the first item + * when the end of the list is reached while using the arrow keys. * @default true */ loop: PropTypes.bool, /** - * Callback fired when the component requests to be opened or closed. + * Event handler called when the menu is opened or closed. */ onOpenChange: PropTypes.func, /** - * Allows to control whether the dropdown is open. - * This is a controlled counterpart of `defaultOpen`. + * Whether the menu is currently open. */ open: PropTypes.bool, /** diff --git a/packages/react/src/menu/root/useMenuRoot.ts b/packages/react/src/menu/root/useMenuRoot.ts index 90ffa69f52..7b22a73cfe 100644 --- a/packages/react/src/menu/root/useMenuRoot.ts +++ b/packages/react/src/menu/root/useMenuRoot.ts @@ -194,20 +194,22 @@ export type MenuOrientation = 'horizontal' | 'vertical'; export namespace useMenuRoot { export interface Parameters { /** - * Allows to control whether the Menu is open. - * This is a controlled counterpart of `defaultOpen`. + * Whether the menu is currently open. */ open: boolean | undefined; /** - * Callback fired when the component requests to be opened or closed. + * Event handler called when the menu is opened or closed. */ onOpenChange: ((open: boolean, event?: Event) => void) | undefined; /** - * If `true`, the Menu is initially open. + * Whether the menu is initially open. + * + * To render a controlled menu, use the `open` prop instead. */ defaultOpen: boolean; /** - * If `true`, using keyboard navigation will wrap focus to the other end of the list once the end is reached. + * Whether to loop keyboard focus back to the first item + * when the end of the list is reached while using the arrow keys. */ loop: boolean; /** @@ -223,7 +225,7 @@ export namespace useMenuRoot { */ direction: TextDirection; /** - * If `true`, the Menu is disabled. + * Whether the component should ignore user actions. */ disabled: boolean; /** diff --git a/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.tsx b/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.tsx index 4df02d79e6..2a8a96e6b2 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; /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -92,8 +92,14 @@ namespace MenuSubmenuTrigger { } export interface State { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; highlighted: boolean; + /** + * Whether the menu is currently open. + */ open: boolean; } } @@ -108,11 +114,12 @@ MenuSubmenuTrigger.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -130,7 +137,10 @@ MenuSubmenuTrigger.propTypes /* remove-proptypes */ = { */ onClick: PropTypes.func, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/menu/submenu-trigger/useMenuSubmenuTrigger.ts b/packages/react/src/menu/submenu-trigger/useMenuSubmenuTrigger.ts index 3d5dc77df6..39f19cc923 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; /** - * If `true`, the menu item will be disabled. + * Whether the component should ignore user actions. */ disabled: boolean; /** diff --git a/packages/react/src/menu/trigger/MenuTrigger.tsx b/packages/react/src/menu/trigger/MenuTrigger.tsx index 95d27bf27e..e1a0dd7f75 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; /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -70,6 +70,9 @@ namespace MenuTrigger { } export type State = { + /** + * Whether the menu is currently open. + */ open: boolean; }; } @@ -84,11 +87,12 @@ MenuTrigger.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -97,7 +101,10 @@ MenuTrigger.propTypes /* remove-proptypes */ = { */ label: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/menu/trigger/useMenuTrigger.ts b/packages/react/src/menu/trigger/useMenuTrigger.ts index 274e9ae219..2c3452b7c6 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 { /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -103,7 +103,7 @@ export namespace useMenuTrigger { */ setTriggerElement: (element: HTMLElement | null) => void; /** - * If `true`, the Menu is open. + * Whether the menu is currently open. */ open: boolean; /** diff --git a/packages/react/src/number-field/decrement/NumberFieldDecrement.tsx b/packages/react/src/number-field/decrement/NumberFieldDecrement.tsx index 2469e7ed0c..b32df47e80 100644 --- a/packages/react/src/number-field/decrement/NumberFieldDecrement.tsx +++ b/packages/react/src/number-field/decrement/NumberFieldDecrement.tsx @@ -47,11 +47,15 @@ NumberFieldDecrement.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/number-field/group/NumberFieldGroup.tsx b/packages/react/src/number-field/group/NumberFieldGroup.tsx index d73fdaf8f5..9f8bb3d66f 100644 --- a/packages/react/src/number-field/group/NumberFieldGroup.tsx +++ b/packages/react/src/number-field/group/NumberFieldGroup.tsx @@ -47,11 +47,15 @@ NumberFieldGroup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/number-field/increment/NumberFieldIncrement.tsx b/packages/react/src/number-field/increment/NumberFieldIncrement.tsx index 069382f5ca..d7a8e7f57b 100644 --- a/packages/react/src/number-field/increment/NumberFieldIncrement.tsx +++ b/packages/react/src/number-field/increment/NumberFieldIncrement.tsx @@ -47,11 +47,15 @@ NumberFieldIncrement.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/number-field/input/NumberFieldInput.tsx b/packages/react/src/number-field/input/NumberFieldInput.tsx index d7ed064894..60330ed370 100644 --- a/packages/react/src/number-field/input/NumberFieldInput.tsx +++ b/packages/react/src/number-field/input/NumberFieldInput.tsx @@ -50,11 +50,15 @@ NumberFieldInput.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/number-field/root/NumberFieldRoot.tsx b/packages/react/src/number-field/root/NumberFieldRoot.tsx index f8e6adabc9..4a3d2ef38c 100644 --- a/packages/react/src/number-field/root/NumberFieldRoot.tsx +++ b/packages/react/src/number-field/root/NumberFieldRoot.tsx @@ -99,31 +99,31 @@ export namespace NumberFieldRoot { export interface State extends FieldRoot.State { /** - * The raw number value of the input element. + * The raw numeric value of the field. */ value: number | null; /** - * The string value of the input element. + * The formatted string value presented in the input element. */ inputValue: string; /** - * If `true`, the input element is required. + * Whether the user must enter a value before submitting a form. */ required: boolean; /** - * If `true`, the input element is disabled. + * Whether the component should ignore user actions. */ disabled: boolean; /** - * If `true`, the input element is invalid. + * Whether the field is currently invalid. */ invalid: boolean; /** - * If `true`, the input element is read only. + * Whether the user should be unable to change the field value. */ readOnly: boolean; /** - * If `true`, the value is being scrubbed. + * Whether the user is currently scrubbing the field. */ scrubbing: boolean; } @@ -150,7 +150,8 @@ NumberFieldRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -158,7 +159,7 @@ NumberFieldRoot.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.number, /** - * If `true`, the input element is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -189,7 +190,7 @@ NumberFieldRoot.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * If `true`, the input element is invalid. + * Whether the field is forcefully marked as invalid. * @default false */ invalid: PropTypes.bool, @@ -208,7 +209,7 @@ NumberFieldRoot.propTypes /* remove-proptypes */ = { */ min: PropTypes.number, /** - * The name of the input element. + * Identifies the field when a form is submitted. */ name: PropTypes.string, /** @@ -218,16 +219,19 @@ NumberFieldRoot.propTypes /* remove-proptypes */ = { */ onValueChange: PropTypes.func, /** - * If `true`, the input element is read only. + * Whether the user should be unable to change the field value. * @default false */ readOnly: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * If `true`, the input element is required. + * Whether the user must enter a value before submitting a form. * @default false */ required: PropTypes.bool, diff --git a/packages/react/src/number-field/root/useNumberFieldRoot.ts b/packages/react/src/number-field/root/useNumberFieldRoot.ts index 8a047c400f..0d04ce6ffd 100644 --- a/packages/react/src/number-field/root/useNumberFieldRoot.ts +++ b/packages/react/src/number-field/root/useNumberFieldRoot.ts @@ -807,17 +807,17 @@ export namespace UseNumberFieldRoot { */ largeStep?: number; /** - * If `true`, the input element is required. + * Whether the user must enter a value before submitting a form. * @default false */ required?: boolean; /** - * If `true`, the input element is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; /** - * If `true`, the input element is invalid. + * Whether the field is forcefully marked as invalid. * @default false */ invalid?: boolean; @@ -827,12 +827,12 @@ export namespace UseNumberFieldRoot { */ autoFocus?: boolean; /** - * If `true`, the input element is read only. + * Whether the user should be unable to change the field value. * @default false */ readOnly?: boolean; /** - * The name of the input element. + * Identifies the field when a form is submitted. */ name?: string; /** diff --git a/packages/react/src/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.tsx b/packages/react/src/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.tsx index 9689ddd88c..95918dc81e 100644 --- a/packages/react/src/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.tsx +++ b/packages/react/src/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.tsx @@ -63,11 +63,15 @@ NumberFieldScrubAreaCursor.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/number-field/scrub-area/NumberFieldScrubArea.tsx b/packages/react/src/number-field/scrub-area/NumberFieldScrubArea.tsx index 781e86ce8a..fbaf613f67 100644 --- a/packages/react/src/number-field/scrub-area/NumberFieldScrubArea.tsx +++ b/packages/react/src/number-field/scrub-area/NumberFieldScrubArea.tsx @@ -80,7 +80,8 @@ NumberFieldScrubArea.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -95,7 +96,10 @@ NumberFieldScrubArea.propTypes /* remove-proptypes */ = { */ pixelSensitivity: PropTypes.number, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/popover/arrow/PopoverArrow.tsx b/packages/react/src/popover/arrow/PopoverArrow.tsx index f4fc8f8672..40caaf0192 100644 --- a/packages/react/src/popover/arrow/PopoverArrow.tsx +++ b/packages/react/src/popover/arrow/PopoverArrow.tsx @@ -56,6 +56,9 @@ const PopoverArrow = React.forwardRef(function PopoverArrow( namespace PopoverArrow { export interface State { + /** + * Whether the popover is currently open. + */ open: boolean; side: Side; align: Align; @@ -75,11 +78,15 @@ PopoverArrow.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/popover/backdrop/PopoverBackdrop.tsx b/packages/react/src/popover/backdrop/PopoverBackdrop.tsx index 7c171a38b4..0ebee86807 100644 --- a/packages/react/src/popover/backdrop/PopoverBackdrop.tsx +++ b/packages/react/src/popover/backdrop/PopoverBackdrop.tsx @@ -55,13 +55,16 @@ const PopoverBackdrop = React.forwardRef(function PopoverBackdrop( namespace PopoverBackdrop { export interface State { + /** + * Whether the popover is currently open. + */ open: boolean; transitionStatus: TransitionStatus; } export interface Props extends BaseUIComponentProps<'div', State> { /** - * If `true`, the backdrop remains mounted when the popover content is closed. + * Whether to keep the HTML element in the DOM while the popover is hidden. * @default false */ keepMounted?: boolean; @@ -78,16 +81,20 @@ PopoverBackdrop.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the backdrop remains mounted when the popover content is closed. + * Whether to keep the HTML element in the DOM while the popover is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/popover/close/PopoverClose.tsx b/packages/react/src/popover/close/PopoverClose.tsx index 631468e28c..37520a7707 100644 --- a/packages/react/src/popover/close/PopoverClose.tsx +++ b/packages/react/src/popover/close/PopoverClose.tsx @@ -56,11 +56,15 @@ PopoverClose.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/popover/description/PopoverDescription.tsx b/packages/react/src/popover/description/PopoverDescription.tsx index f92ff2ce0b..a6611b88fd 100644 --- a/packages/react/src/popover/description/PopoverDescription.tsx +++ b/packages/react/src/popover/description/PopoverDescription.tsx @@ -55,7 +55,8 @@ PopoverDescription.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -63,7 +64,10 @@ PopoverDescription.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/popover/popup/PopoverPopup.tsx b/packages/react/src/popover/popup/PopoverPopup.tsx index b4fa65a684..11189a29be 100644 --- a/packages/react/src/popover/popup/PopoverPopup.tsx +++ b/packages/react/src/popover/popup/PopoverPopup.tsx @@ -97,6 +97,9 @@ const PopoverPopup = React.forwardRef(function PopoverPopup( namespace PopoverPopup { export interface State { + /** + * Whether the popover is currently open. + */ open: boolean; side: Side; align: Align; @@ -105,16 +108,15 @@ namespace PopoverPopup { export interface Props extends BaseUIComponentProps<'div', State> { /** - * Determines an element to focus when the popover is opened. - * It can be either a ref to the element or a function that returns such a ref. - * If not provided, the first focusable element is focused. + * Determines the element to focus when the popover is opened. + * By default, the first focusable element is focused. */ initialFocus?: | React.RefObject | ((interactionType: InteractionType) => React.RefObject); /** - * Determines an element to focus after the popover is closed. - * If not provided, the focus returns to the trigger. + * Determines the element to focus when the popover is closed. + * By default, focus returns to trigger. */ finalFocus?: React.RefObject; } @@ -130,25 +132,28 @@ PopoverPopup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Determines an element to focus after the popover is closed. - * If not provided, the focus returns to the trigger. + * Determines the element to focus when the popover is closed. + * By default, focus returns to trigger. */ finalFocus: refType, /** - * Determines an element to focus when the popover is opened. - * It can be either a ref to the element or a function that returns such a ref. - * If not provided, the first focusable element is focused. + * Determines the element to focus when the popover is opened. + * By default, the first focusable element is focused. */ initialFocus: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ PropTypes.func, refType, ]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/popover/positioner/PopoverPositioner.tsx b/packages/react/src/popover/positioner/PopoverPositioner.tsx index 65b07bacbd..14cf07cb14 100644 --- a/packages/react/src/popover/positioner/PopoverPositioner.tsx +++ b/packages/react/src/popover/positioner/PopoverPositioner.tsx @@ -96,6 +96,9 @@ const PopoverPositioner = React.forwardRef(function PopoverPositioner( namespace PopoverPositioner { export interface State { + /** + * Whether the popover is currently open. + */ open: boolean; side: Side; align: Align; @@ -141,7 +144,8 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -174,7 +178,7 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * Whether the popover remains mounted in the DOM while closed. + * Whether to keep the HTML element in the DOM when the popover is hidden. * @default false */ keepMounted: PropTypes.bool, @@ -184,7 +188,10 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { */ positionMethod: PropTypes.oneOf(['absolute', 'fixed']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/popover/positioner/usePopoverPositioner.tsx b/packages/react/src/popover/positioner/usePopoverPositioner.tsx index b460c6fb32..4c66e5f73d 100644 --- a/packages/react/src/popover/positioner/usePopoverPositioner.tsx +++ b/packages/react/src/popover/positioner/usePopoverPositioner.tsx @@ -131,7 +131,7 @@ export namespace usePopoverPositioner { */ arrowPadding?: number; /** - * Whether the popover remains mounted in the DOM while closed. + * Whether to keep the HTML element in the DOM when the popover is hidden. * @default false */ keepMounted?: boolean; @@ -148,8 +148,7 @@ export namespace usePopoverPositioner { */ mounted: boolean; /** - * Whether the popover is open. - * @default false + * Whether the popover is currently open. */ open?: boolean; /** diff --git a/packages/react/src/popover/root/PopoverRoot.tsx b/packages/react/src/popover/root/PopoverRoot.tsx index b5fb8fa541..17fe43bb1c 100644 --- a/packages/react/src/popover/root/PopoverRoot.tsx +++ b/packages/react/src/popover/root/PopoverRoot.tsx @@ -127,7 +127,9 @@ PopoverRoot.propTypes /* remove-proptypes */ = { */ closeDelay: PropTypes.number, /** - * Whether the popover popup is open by default. Use when uncontrolled. + * Whether the popover is initially open. + * + * To render a controlled popover, use the `open` prop instead. * @default false */ defaultOpen: PropTypes.bool, @@ -137,13 +139,11 @@ PopoverRoot.propTypes /* remove-proptypes */ = { */ delay: PropTypes.number, /** - * Callback fired when the popover popup is requested to be opened or closed. Use when - * controlled. + * Event handler called when the popover is opened or closed. */ onOpenChange: PropTypes.func, /** - * Whether the popover popup is open. Use when controlled. - * @default false + * Whether the popover is currently open. */ open: PropTypes.bool, /** diff --git a/packages/react/src/popover/root/usePopoverRoot.ts b/packages/react/src/popover/root/usePopoverRoot.ts index 2400db7580..0eb12fabf9 100644 --- a/packages/react/src/popover/root/usePopoverRoot.ts +++ b/packages/react/src/popover/root/usePopoverRoot.ts @@ -195,18 +195,18 @@ export function usePopoverRoot(params: usePopoverRoot.Parameters): usePopoverRoo export namespace usePopoverRoot { export interface Parameters { /** - * Whether the popover popup is open by default. Use when uncontrolled. + * Whether the popover is initially open. + * + * To render a controlled popover, use the `open` prop instead. * @default false */ defaultOpen?: boolean; /** - * Whether the popover popup is open. Use when controlled. - * @default false + * Whether the popover is currently open. */ open?: boolean; /** - * Callback fired when the popover popup is requested to be opened or closed. Use when - * controlled. + * Event handler called when the popover is opened or closed. */ onOpenChange?: (open: boolean, event?: Event, reason?: OpenChangeReason) => void; /** diff --git a/packages/react/src/popover/title/PopoverTitle.tsx b/packages/react/src/popover/title/PopoverTitle.tsx index 6029c0308a..e3b9327cd2 100644 --- a/packages/react/src/popover/title/PopoverTitle.tsx +++ b/packages/react/src/popover/title/PopoverTitle.tsx @@ -56,7 +56,8 @@ PopoverTitle.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -64,7 +65,10 @@ PopoverTitle.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/popover/trigger/PopoverTrigger.tsx b/packages/react/src/popover/trigger/PopoverTrigger.tsx index 51afb06d2b..c988bcf31a 100644 --- a/packages/react/src/popover/trigger/PopoverTrigger.tsx +++ b/packages/react/src/popover/trigger/PopoverTrigger.tsx @@ -57,6 +57,9 @@ const PopoverTrigger = React.forwardRef(function PopoverTrigger( namespace PopoverTrigger { export interface State { + /** + * Whether the popover is currently open. + */ open: boolean; } @@ -69,11 +72,15 @@ PopoverTrigger.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/portal/Portal.tsx b/packages/react/src/portal/Portal.tsx index a25f54ba55..2f9255ace8 100644 --- a/packages/react/src/portal/Portal.tsx +++ b/packages/react/src/portal/Portal.tsx @@ -32,7 +32,7 @@ namespace Portal { */ container?: HTMLElement | null | React.RefObject; /** - * Whether to keep the portal mounted in the DOM when the popup is closed. + * Whether to keep the portal mounted in the DOM when 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 closed. + * Whether to keep the portal mounted in the DOM when the popup is hidden. * @default false */ keepMounted: PropTypes.bool, diff --git a/packages/react/src/preview-card/arrow/PreviewCardArrow.tsx b/packages/react/src/preview-card/arrow/PreviewCardArrow.tsx index 3a20731255..08695fa4f5 100644 --- a/packages/react/src/preview-card/arrow/PreviewCardArrow.tsx +++ b/packages/react/src/preview-card/arrow/PreviewCardArrow.tsx @@ -56,6 +56,9 @@ const PreviewCardArrow = React.forwardRef(function PreviewCardArrow( namespace PreviewCardArrow { export interface State { + /** + * Whether the preview card is currently open. + */ open: boolean; side: Side; align: Align; @@ -75,11 +78,15 @@ PreviewCardArrow.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/preview-card/backdrop/PreviewCardBackdrop.tsx b/packages/react/src/preview-card/backdrop/PreviewCardBackdrop.tsx index d5179dbaa3..99c9424006 100644 --- a/packages/react/src/preview-card/backdrop/PreviewCardBackdrop.tsx +++ b/packages/react/src/preview-card/backdrop/PreviewCardBackdrop.tsx @@ -55,13 +55,16 @@ const PreviewCardBackdrop = React.forwardRef(function PreviewCardBackdrop( namespace PreviewCardBackdrop { export interface State { + /** + * Whether the preview card is currently open. + */ open: boolean; transitionStatus: TransitionStatus; } export interface Props extends BaseUIComponentProps<'div', State> { /** - * Whether the `Backdrop` remains mounted when the Preview Card `Popup` is closed. + * Whether to keep the HTML element in the DOM while the preview card is hidden. * @default false */ keepMounted?: boolean; @@ -78,16 +81,20 @@ PreviewCardBackdrop.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the `Backdrop` remains mounted when the Preview Card `Popup` is closed. + * Whether to keep the HTML element in the DOM while the preview card is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/preview-card/popup/PreviewCardPopup.tsx b/packages/react/src/preview-card/popup/PreviewCardPopup.tsx index 29e39a47fa..7f39e66324 100644 --- a/packages/react/src/preview-card/popup/PreviewCardPopup.tsx +++ b/packages/react/src/preview-card/popup/PreviewCardPopup.tsx @@ -70,6 +70,9 @@ const PreviewCardPopup = React.forwardRef(function PreviewCardPopup( namespace PreviewCardPopup { export interface State { + /** + * Whether the preview card is currently open. + */ open: boolean; side: Side; align: Align; @@ -89,11 +92,15 @@ PreviewCardPopup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/preview-card/positioner/PreviewCardPositioner.tsx b/packages/react/src/preview-card/positioner/PreviewCardPositioner.tsx index 614f39fd28..d08693f8f4 100644 --- a/packages/react/src/preview-card/positioner/PreviewCardPositioner.tsx +++ b/packages/react/src/preview-card/positioner/PreviewCardPositioner.tsx @@ -110,6 +110,9 @@ const PreviewCardPositioner = React.forwardRef(function PreviewCardPositioner( namespace PreviewCardPositioner { export interface State { + /** + * Whether the preview card is currently open. + */ open: boolean; side: Side; align: Align; @@ -155,7 +158,8 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -187,7 +191,7 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * If `true`, preview card stays mounted in the DOM when closed. + * Whether to keep the HTML element in the DOM while the preview card is hidden. * @default false */ keepMounted: PropTypes.bool, @@ -197,7 +201,10 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { */ positionMethod: PropTypes.oneOf(['absolute', 'fixed']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts b/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts index a57409114e..7f4ffed09f 100644 --- a/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts +++ b/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts @@ -132,7 +132,7 @@ export namespace usePreviewCardPositioner { */ arrowPadding?: number; /** - * If `true`, preview card stays mounted in the DOM when closed. + * Whether to keep the HTML element in the DOM while the preview card is hidden. * @default false */ keepMounted?: boolean; @@ -150,7 +150,7 @@ export namespace usePreviewCardPositioner { */ mounted: boolean; /** - * If `true`, the preview card is open. + * Whether the preview card is currently open. */ open?: boolean; /** diff --git a/packages/react/src/preview-card/root/PreviewCardRoot.tsx b/packages/react/src/preview-card/root/PreviewCardRoot.tsx index ed172841e1..f23716f634 100644 --- a/packages/react/src/preview-card/root/PreviewCardRoot.tsx +++ b/packages/react/src/preview-card/root/PreviewCardRoot.tsx @@ -107,7 +107,9 @@ PreviewCardRoot.propTypes /* remove-proptypes */ = { */ closeDelay: PropTypes.number, /** - * Whether the preview card popup is open by default. Use when uncontrolled. + * Whether the preview card is initially open. + * + * To render a controlled preview card, use the `open` prop instead. * @default false */ defaultOpen: PropTypes.bool, @@ -117,13 +119,11 @@ PreviewCardRoot.propTypes /* remove-proptypes */ = { */ delay: PropTypes.number, /** - * Callback fired when the preview card popup is requested to be opened or closed. Use when - * controlled. + * Event handler called when the preview card is opened or closed. */ onOpenChange: PropTypes.func, /** - * Whether the preview card popup is open. Use when controlled. - * @default false + * Whether the preview card is currently open. */ open: PropTypes.bool, } as any; diff --git a/packages/react/src/preview-card/root/usePreviewCardRoot.ts b/packages/react/src/preview-card/root/usePreviewCardRoot.ts index 013a309d32..36f82edcaf 100644 --- a/packages/react/src/preview-card/root/usePreviewCardRoot.ts +++ b/packages/react/src/preview-card/root/usePreviewCardRoot.ts @@ -146,18 +146,18 @@ export function usePreviewCardRoot( export namespace usePreviewCardRoot { export interface Parameters { /** - * Whether the preview card popup is open by default. Use when uncontrolled. + * Whether the preview card is initially open. + * + * To render a controlled preview card, use the `open` prop instead. * @default false */ defaultOpen?: boolean; /** - * Whether the preview card popup is open. Use when controlled. - * @default false + * Whether the preview card is currently open. */ open?: boolean; /** - * Callback fired when the preview card popup is requested to be opened or closed. Use when - * controlled. + * Event handler called when the preview card is opened or closed. */ onOpenChange?: (open: boolean, event?: Event, reason?: OpenChangeReason) => void; /** diff --git a/packages/react/src/preview-card/trigger/PreviewCardTrigger.tsx b/packages/react/src/preview-card/trigger/PreviewCardTrigger.tsx index c724cda0ab..261d1ff360 100644 --- a/packages/react/src/preview-card/trigger/PreviewCardTrigger.tsx +++ b/packages/react/src/preview-card/trigger/PreviewCardTrigger.tsx @@ -40,6 +40,9 @@ const PreviewCardTrigger = React.forwardRef(function PreviewCardTrigger( namespace PreviewCardTrigger { export interface State { + /** + * Whether the preview card is currently open. + */ open: boolean; } @@ -56,11 +59,15 @@ PreviewCardTrigger.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/progress/indicator/ProgressIndicator.tsx b/packages/react/src/progress/indicator/ProgressIndicator.tsx index 6ad8e08221..54aa1694e5 100644 --- a/packages/react/src/progress/indicator/ProgressIndicator.tsx +++ b/packages/react/src/progress/indicator/ProgressIndicator.tsx @@ -57,11 +57,15 @@ ProgressIndicator.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/progress/root/ProgressRoot.tsx b/packages/react/src/progress/root/ProgressRoot.tsx index 40326b7379..008d19eeeb 100644 --- a/packages/react/src/progress/root/ProgressRoot.tsx +++ b/packages/react/src/progress/root/ProgressRoot.tsx @@ -108,7 +108,8 @@ ProgressRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -134,7 +135,10 @@ ProgressRoot.propTypes /* remove-proptypes */ = { */ min: PropTypes.number, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/progress/track/ProgressTrack.tsx b/packages/react/src/progress/track/ProgressTrack.tsx index 9ea460fa7a..26d36ccbd2 100644 --- a/packages/react/src/progress/track/ProgressTrack.tsx +++ b/packages/react/src/progress/track/ProgressTrack.tsx @@ -49,11 +49,15 @@ ProgressTrack.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/radio-group/RadioGroup.tsx b/packages/react/src/radio-group/RadioGroup.tsx index 98983f05d1..7c186aa556 100644 --- a/packages/react/src/radio-group/RadioGroup.tsx +++ b/packages/react/src/radio-group/RadioGroup.tsx @@ -94,29 +94,35 @@ const RadioGroup = React.forwardRef(function RadioGroup( namespace RadioGroup { export interface State { + /** + * Whether the component should ignore user actions. + */ disabled: boolean | undefined; + /** + * Whether the user should be unable to select a different radio button in the group. + */ readOnly: boolean | undefined; } export interface Props extends Omit, 'value' | 'defaultValue'> { /** - * Determines if the radio group is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; /** - * Determines if the radio group is readonly. + * Whether the user should be unable to select a different radio button in the group. * @default false */ readOnly?: boolean; /** - * Determines if the radio group is required. + * Whether the user must choose a value before submitting a form. * @default false */ required?: boolean; /** - * The name of the radio group submitted with the form data. + * Identifies the field when a form is submitted. */ name?: string; /** @@ -144,7 +150,8 @@ RadioGroup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -152,12 +159,12 @@ RadioGroup.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.any, /** - * Determines if the radio group is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** - * The name of the radio group submitted with the form data. + * Identifies the field when a form is submitted. */ name: PropTypes.string, /** @@ -165,16 +172,19 @@ RadioGroup.propTypes /* remove-proptypes */ = { */ onValueChange: PropTypes.func, /** - * Determines if the radio group is readonly. + * Whether the user should be unable to select a different radio button in the group. * @default false */ readOnly: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * Determines if the radio group is required. + * Whether the user must choose a value before submitting a form. * @default false */ required: PropTypes.bool, diff --git a/packages/react/src/radio/indicator/RadioIndicator.tsx b/packages/react/src/radio/indicator/RadioIndicator.tsx index 0c98819b76..908612c8fe 100644 --- a/packages/react/src/radio/indicator/RadioIndicator.tsx +++ b/packages/react/src/radio/indicator/RadioIndicator.tsx @@ -40,13 +40,16 @@ const RadioIndicator = React.forwardRef(function RadioIndicator( namespace RadioIndicator { export interface Props extends BaseUIComponentProps<'span', State> { /** - * Whether the component should be kept mounted when not checked. + * Whether to keep the HTML element in the DOM when the radio button is inactive. * @default true */ keepMounted?: boolean; } export interface State { + /** + * Whether the radio button is currently selected. + */ checked: boolean; } } @@ -61,16 +64,20 @@ RadioIndicator.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the component should be kept mounted when not checked. + * Whether to keep the HTML element in the DOM when the radio button is inactive. * @default true */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/radio/root/RadioRoot.tsx b/packages/react/src/radio/root/RadioRoot.tsx index b2b9ae21d2..979b179fc3 100644 --- a/packages/react/src/radio/root/RadioRoot.tsx +++ b/packages/react/src/radio/root/RadioRoot.tsx @@ -87,26 +87,35 @@ namespace RadioRoot { */ value: unknown; /** - * Determines if the radio is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; /** - * Determines if the radio is required. + * Whether the user must choose a value before submitting a form. * @default false */ required?: boolean; /** - * Determines if the radio is readonly. + * Whether the user should be unable to select the radio button. * @default false */ readOnly?: boolean; } export interface State { + /** + * Whether the radio button is currently selected. + */ checked: boolean; disabled: boolean; + /** + * Whether the user should be unable to select the radio button. + */ readOnly: boolean; + /** + * Whether the user must choose a value before submitting a form. + */ required: boolean; } } @@ -121,25 +130,29 @@ RadioRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Determines if the radio is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** - * Determines if the radio is readonly. + * Whether the user should be unable to select the radio button. * @default false */ readOnly: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * Determines if the radio is required. + * Whether the user must choose a value before submitting a form. * @default false */ required: PropTypes.bool, diff --git a/packages/react/src/scroll-area/corner/ScrollAreaCorner.tsx b/packages/react/src/scroll-area/corner/ScrollAreaCorner.tsx index 05d0be2790..5d41aa88c5 100644 --- a/packages/react/src/scroll-area/corner/ScrollAreaCorner.tsx +++ b/packages/react/src/scroll-area/corner/ScrollAreaCorner.tsx @@ -64,11 +64,15 @@ ScrollAreaCorner.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/scroll-area/root/ScrollAreaRoot.tsx b/packages/react/src/scroll-area/root/ScrollAreaRoot.tsx index 032bba4f21..28e9dbeb27 100644 --- a/packages/react/src/scroll-area/root/ScrollAreaRoot.tsx +++ b/packages/react/src/scroll-area/root/ScrollAreaRoot.tsx @@ -86,7 +86,8 @@ ScrollAreaRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -99,7 +100,10 @@ ScrollAreaRoot.propTypes /* remove-proptypes */ = { */ gutter: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/scroll-area/scrollbar/ScrollAreaScrollbar.tsx b/packages/react/src/scroll-area/scrollbar/ScrollAreaScrollbar.tsx index 932078b86e..19052bee1c 100644 --- a/packages/react/src/scroll-area/scrollbar/ScrollAreaScrollbar.tsx +++ b/packages/react/src/scroll-area/scrollbar/ScrollAreaScrollbar.tsx @@ -81,7 +81,7 @@ namespace ScrollAreaScrollbar { */ orientation?: 'vertical' | 'horizontal'; /** - * Whether the scrollbars remain mounted in the DOM when there is no overflow. + * Whether to keep the HTML element in the DOM when the viewport isn’t scrollable. * @default false */ keepMounted?: boolean; @@ -98,11 +98,12 @@ ScrollAreaScrollbar.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * Whether the scrollbars remain mounted in the DOM when there is no overflow. + * Whether to keep the HTML element in the DOM when the viewport isn’t scrollable. * @default false */ keepMounted: PropTypes.bool, @@ -112,7 +113,10 @@ ScrollAreaScrollbar.propTypes /* remove-proptypes */ = { */ orientation: PropTypes.oneOf(['horizontal', 'vertical']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/scroll-area/thumb/ScrollAreaThumb.tsx b/packages/react/src/scroll-area/thumb/ScrollAreaThumb.tsx index f99b66fa83..c87d8189cc 100644 --- a/packages/react/src/scroll-area/thumb/ScrollAreaThumb.tsx +++ b/packages/react/src/scroll-area/thumb/ScrollAreaThumb.tsx @@ -80,11 +80,15 @@ ScrollAreaThumb.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/scroll-area/viewport/ScrollAreaViewport.tsx b/packages/react/src/scroll-area/viewport/ScrollAreaViewport.tsx index 440310b5ff..b6569fbb4c 100644 --- a/packages/react/src/scroll-area/viewport/ScrollAreaViewport.tsx +++ b/packages/react/src/scroll-area/viewport/ScrollAreaViewport.tsx @@ -54,11 +54,15 @@ ScrollAreaViewport.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/arrow/SelectArrow.tsx b/packages/react/src/select/arrow/SelectArrow.tsx index de989fc7c1..499b113a66 100644 --- a/packages/react/src/select/arrow/SelectArrow.tsx +++ b/packages/react/src/select/arrow/SelectArrow.tsx @@ -64,6 +64,9 @@ const SelectArrow = React.forwardRef(function SelectArrow( namespace SelectArrow { export interface State { + /** + * Whether the select menu is currently open. + */ open: boolean; side: Side | 'none'; align: Align; @@ -83,11 +86,15 @@ SelectArrow.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/backdrop/SelectBackdrop.tsx b/packages/react/src/select/backdrop/SelectBackdrop.tsx index 46c43857cf..f45cf3f592 100644 --- a/packages/react/src/select/backdrop/SelectBackdrop.tsx +++ b/packages/react/src/select/backdrop/SelectBackdrop.tsx @@ -53,13 +53,16 @@ const SelectBackdrop = React.forwardRef(function SelectBackdrop( namespace SelectBackdrop { export interface Props extends BaseUIComponentProps<'div', State> { /** - * If `true`, the Backdrop remains mounted when the Select popup is closed. + * Whether to keep the HTML element in the DOM while the select menu is hidden. * @default false */ keepMounted?: boolean; } export interface State { + /** + * Whether the select menu is currently open. + */ open: boolean; transitionStatus: TransitionStatus; } @@ -75,16 +78,20 @@ SelectBackdrop.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the Backdrop remains mounted when the Select popup is closed. + * Whether to keep the HTML element in the DOM while the select menu is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/group-label/SelectGroupLabel.tsx b/packages/react/src/select/group-label/SelectGroupLabel.tsx index c702e7165d..cf4cfbbb43 100644 --- a/packages/react/src/select/group-label/SelectGroupLabel.tsx +++ b/packages/react/src/select/group-label/SelectGroupLabel.tsx @@ -66,7 +66,8 @@ SelectGroupLabel.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -74,7 +75,10 @@ SelectGroupLabel.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/group/SelectGroup.tsx b/packages/react/src/select/group/SelectGroup.tsx index b49d88a2b6..d496f01924 100644 --- a/packages/react/src/select/group/SelectGroup.tsx +++ b/packages/react/src/select/group/SelectGroup.tsx @@ -71,11 +71,15 @@ SelectGroup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/icon/SelectIcon.tsx b/packages/react/src/select/icon/SelectIcon.tsx index a973fef5bd..d0e35514c6 100644 --- a/packages/react/src/select/icon/SelectIcon.tsx +++ b/packages/react/src/select/icon/SelectIcon.tsx @@ -54,11 +54,15 @@ SelectIcon.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/item-indicator/SelectItemIndicator.tsx b/packages/react/src/select/item-indicator/SelectItemIndicator.tsx index d70f793e63..6d5c9f7dbd 100644 --- a/packages/react/src/select/item-indicator/SelectItemIndicator.tsx +++ b/packages/react/src/select/item-indicator/SelectItemIndicator.tsx @@ -57,8 +57,7 @@ namespace SelectItemIndicator { export interface Props extends BaseUIComponentProps<'span', State> { children?: React.ReactNode; /** - * If `true`, the item indicator remains mounted when the item is not - * selected. + * Whether to keep the HTML element in the DOM when the item is not selected. * @default false */ keepMounted?: boolean; @@ -79,17 +78,20 @@ SelectItemIndicator.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the item indicator remains mounted when the item is not - * selected. + * Whether to keep the HTML element in the DOM when the item is not selected. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/item-text/SelectItemText.tsx b/packages/react/src/select/item-text/SelectItemText.tsx index d5042ee725..fd1864aac4 100644 --- a/packages/react/src/select/item-text/SelectItemText.tsx +++ b/packages/react/src/select/item-text/SelectItemText.tsx @@ -60,7 +60,8 @@ InnerSelectItemText.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -70,7 +71,10 @@ InnerSelectItemText.propTypes /* remove-proptypes */ = { current: PropTypes.number.isRequired, }).isRequired, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/select/item/SelectItem.tsx b/packages/react/src/select/item/SelectItem.tsx index 6e2fc7ff6b..f8cfca7a3b 100644 --- a/packages/react/src/select/item/SelectItem.tsx +++ b/packages/react/src/select/item/SelectItem.tsx @@ -127,11 +127,12 @@ InnerSelectItem.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the select item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -165,7 +166,10 @@ InnerSelectItem.propTypes /* remove-proptypes */ = { current: PropTypes.object, }).isRequired, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** @@ -276,9 +280,15 @@ const SelectItem = React.forwardRef(function SelectItem( namespace SelectItem { export interface State { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; highlighted: boolean; selected: boolean; + /** + * Whether the select menu is currently open. + */ open: boolean; } @@ -290,7 +300,7 @@ namespace SelectItem { */ value?: any; /** - * If `true`, the select item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -312,7 +322,7 @@ SelectItem.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * If `true`, the select item will be disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, diff --git a/packages/react/src/select/item/useSelectItem.ts b/packages/react/src/select/item/useSelectItem.ts index 196cf83d11..11d1cfb3f3 100644 --- a/packages/react/src/select/item/useSelectItem.ts +++ b/packages/react/src/select/item/useSelectItem.ts @@ -177,7 +177,7 @@ export function useSelectItem(params: useSelectItem.Parameters): useSelectItem.R export namespace useSelectItem { export interface Parameters { /** - * If `true`, the select item will be disabled. + * Whether the component should ignore user actions. */ disabled: boolean; /** @@ -193,7 +193,7 @@ export namespace useSelectItem { */ ref?: React.Ref; /** - * The open state of the select. + * Whether the select menu is currently open. */ open: boolean; /** diff --git a/packages/react/src/select/popup/SelectPopup.tsx b/packages/react/src/select/popup/SelectPopup.tsx index 0297bfa144..aaf65e1689 100644 --- a/packages/react/src/select/popup/SelectPopup.tsx +++ b/packages/react/src/select/popup/SelectPopup.tsx @@ -121,7 +121,8 @@ SelectPopup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -129,7 +130,10 @@ SelectPopup.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/positioner/SelectPositioner.tsx b/packages/react/src/select/positioner/SelectPositioner.tsx index 73feb76187..be3613e0f7 100644 --- a/packages/react/src/select/positioner/SelectPositioner.tsx +++ b/packages/react/src/select/positioner/SelectPositioner.tsx @@ -167,7 +167,8 @@ SelectPositioner.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -220,7 +221,10 @@ SelectPositioner.propTypes /* remove-proptypes */ = { */ positionMethod: PropTypes.oneOf(['absolute', 'fixed']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/select/positioner/useSelectPositioner.ts b/packages/react/src/select/positioner/useSelectPositioner.ts index 7c0154ea2b..02f53a3844 100644 --- a/packages/react/src/select/positioner/useSelectPositioner.ts +++ b/packages/react/src/select/positioner/useSelectPositioner.ts @@ -149,7 +149,7 @@ export namespace useSelectPositioner { */ collisionPadding?: Padding; /** - * Whether the select popup remains mounted in the DOM while closed. + * Whether to keep the HTML element in the DOM while the select menu is hidden. * @default true */ keepMounted?: boolean; @@ -178,7 +178,7 @@ export namespace useSelectPositioner { */ mounted: boolean; /** - * If `true`, the Select is open. + * Whether the select menu is currently open. */ open?: boolean; /** diff --git a/packages/react/src/select/root/SelectRoot.tsx b/packages/react/src/select/root/SelectRoot.tsx index e1d59e6328..ebd54cb1be 100644 --- a/packages/react/src/select/root/SelectRoot.tsx +++ b/packages/react/src/select/root/SelectRoot.tsx @@ -124,8 +124,9 @@ SelectRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * If `true`, the Select is initially open. + * Whether the select menu is initially open. * + * To render a controlled select menu, use the `open` prop instead. * @default false */ defaultOpen: PropTypes.bool, @@ -135,17 +136,16 @@ SelectRoot.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.any, /** - * If `true`, the Select is disabled. - * + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** - * The name of the Select in the owning form. + * Identifies the field when a form is submitted. */ name: PropTypes.string, /** - * Callback fired when the component requests to be opened or closed. + * Event handler called when the select menu is opened or closed. */ onOpenChange: PropTypes.func, /** @@ -153,17 +153,16 @@ SelectRoot.propTypes /* remove-proptypes */ = { */ onValueChange: PropTypes.func, /** - * Allows to control whether the dropdown is open. - * This is a controlled counterpart of `defaultOpen`. + * Whether the select menu is currently open. */ open: PropTypes.bool, /** - * If `true`, the Select is read-only. + * Whether the user should be unable to choose a different option from the select menu. * @default false */ readOnly: PropTypes.bool, /** - * If `true`, the Select is required. + * Whether the user must choose a value before submitting a form. * @default false */ required: PropTypes.bool, diff --git a/packages/react/src/select/root/useSelectRoot.ts b/packages/react/src/select/root/useSelectRoot.ts index 73e6913cc5..29efe2f655 100644 --- a/packages/react/src/select/root/useSelectRoot.ts +++ b/packages/react/src/select/root/useSelectRoot.ts @@ -278,7 +278,7 @@ export function useSelectRoot(params: useSelectRoot.Parameters): useSelect export namespace useSelectRoot { export interface Parameters { /** - * The name of the Select in the owning form. + * Identifies the field when a form is submitted. */ name?: string; /** @@ -286,18 +286,17 @@ export namespace useSelectRoot { */ id?: string; /** - * If `true`, the Select is required. + * Whether the user must choose a value before submitting a form. * @default false */ required?: boolean; /** - * If `true`, the Select is read-only. + * Whether the user should be unable to choose a different option from the select menu. * @default false */ readOnly?: boolean; /** - * If `true`, the Select is disabled. - * + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -315,18 +314,18 @@ export namespace useSelectRoot { */ defaultValue?: Value | null; /** - * If `true`, the Select is initially open. + * Whether the select menu is initially open. * + * To render a controlled select menu, use the `open` prop instead. * @default false */ defaultOpen?: boolean; /** - * Callback fired when the component requests to be opened or closed. + * Event handler called when the select menu is opened or closed. */ onOpenChange?: (open: boolean, event: Event | undefined) => void; /** - * Allows to control whether the dropdown is open. - * This is a controlled counterpart of `defaultOpen`. + * Whether the select menu is currently open. */ open?: boolean; /** diff --git a/packages/react/src/select/scroll-arrow/SelectScrollArrow.tsx b/packages/react/src/select/scroll-arrow/SelectScrollArrow.tsx index ee032475e3..c3265f680c 100644 --- a/packages/react/src/select/scroll-arrow/SelectScrollArrow.tsx +++ b/packages/react/src/select/scroll-arrow/SelectScrollArrow.tsx @@ -136,7 +136,7 @@ namespace SelectScrollArrow { export interface Props extends BaseUIComponentProps<'div', State> { direction: 'up' | 'down'; /** - * Whether the component should be kept mounted when it is not rendered. + * Whether to keep the HTML element in the DOM while the select menu is not scrollable. * @default false */ keepMounted?: boolean; @@ -153,7 +153,8 @@ SelectScrollArrow.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -161,12 +162,15 @@ SelectScrollArrow.propTypes /* remove-proptypes */ = { */ direction: PropTypes.oneOf(['down', 'up']).isRequired, /** - * Whether the component should be kept mounted when it is not rendered. + * Whether to keep the HTML element in the DOM while the select menu is not scrollable. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/scroll-down-arrow/SelectScrollDownArrow.tsx b/packages/react/src/select/scroll-down-arrow/SelectScrollDownArrow.tsx index 8c48d402ad..8924cc69b2 100644 --- a/packages/react/src/select/scroll-down-arrow/SelectScrollDownArrow.tsx +++ b/packages/react/src/select/scroll-down-arrow/SelectScrollDownArrow.tsx @@ -21,7 +21,7 @@ namespace SelectScrollDownArrow { export interface State {} export interface Props extends BaseUIComponentProps<'div', State> { /** - * Whether the component should be kept mounted when it is not rendered. + * Whether to keep the HTML element in the DOM while the select menu is not scrollable. * @default false */ keepMounted?: boolean; @@ -38,7 +38,7 @@ SelectScrollDownArrow.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Whether the component should be kept mounted when it is not rendered. + * Whether to keep the HTML element in the DOM while the select menu is not scrollable. * @default false */ keepMounted: PropTypes.bool, diff --git a/packages/react/src/select/scroll-up-arrow/SelectScrollUpArrow.tsx b/packages/react/src/select/scroll-up-arrow/SelectScrollUpArrow.tsx index 0bc65330c7..e9190ae4da 100644 --- a/packages/react/src/select/scroll-up-arrow/SelectScrollUpArrow.tsx +++ b/packages/react/src/select/scroll-up-arrow/SelectScrollUpArrow.tsx @@ -21,7 +21,7 @@ namespace SelectScrollUpArrow { export interface State {} export interface Props extends BaseUIComponentProps<'div', State> { /** - * Whether the component should be kept mounted when it is not rendered. + * Whether to keep the HTML element in the DOM while the select menu is not scrollable. * @default false */ keepMounted?: boolean; @@ -38,7 +38,7 @@ SelectScrollUpArrow.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Whether the component should be kept mounted when it is not rendered. + * Whether to keep the HTML element in the DOM while the select menu is not scrollable. * @default false */ keepMounted: PropTypes.bool, diff --git a/packages/react/src/select/trigger/SelectTrigger.tsx b/packages/react/src/select/trigger/SelectTrigger.tsx index 7dc7c4f111..6dcb6f6cb4 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; /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -73,6 +73,9 @@ namespace SelectTrigger { } export interface State { + /** + * Whether the select menu is currently open. + */ open: boolean; } } @@ -87,11 +90,12 @@ SelectTrigger.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -104,7 +108,10 @@ SelectTrigger.propTypes /* remove-proptypes */ = { */ label: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/select/trigger/useSelectTrigger.ts b/packages/react/src/select/trigger/useSelectTrigger.ts index dae812e96a..eb13df8e9c 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 { /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; diff --git a/packages/react/src/select/value/SelectValue.tsx b/packages/react/src/select/value/SelectValue.tsx index f6556a5421..da0edf5745 100644 --- a/packages/react/src/select/value/SelectValue.tsx +++ b/packages/react/src/select/value/SelectValue.tsx @@ -67,7 +67,8 @@ SelectValue.propTypes /* remove-proptypes */ = { */ children: PropTypes.func, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -75,7 +76,10 @@ SelectValue.propTypes /* remove-proptypes */ = { */ placeholder: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/separator/Separator.tsx b/packages/react/src/separator/Separator.tsx index e25dadfbfb..9c6c3f9115 100644 --- a/packages/react/src/separator/Separator.tsx +++ b/packages/react/src/separator/Separator.tsx @@ -39,11 +39,15 @@ Separator.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/slider/control/SliderControl.tsx b/packages/react/src/slider/control/SliderControl.tsx index ae33f92fe9..21e5529fa0 100644 --- a/packages/react/src/slider/control/SliderControl.tsx +++ b/packages/react/src/slider/control/SliderControl.tsx @@ -84,11 +84,15 @@ SliderControl.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/slider/indicator/SliderIndicator.tsx b/packages/react/src/slider/indicator/SliderIndicator.tsx index 4d66c82933..7c09a0ae60 100644 --- a/packages/react/src/slider/indicator/SliderIndicator.tsx +++ b/packages/react/src/slider/indicator/SliderIndicator.tsx @@ -58,11 +58,15 @@ SliderIndicator.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/slider/output/SliderOutput.tsx b/packages/react/src/slider/output/SliderOutput.tsx index d8e954aec5..cfadc2ca3d 100644 --- a/packages/react/src/slider/output/SliderOutput.tsx +++ b/packages/react/src/slider/output/SliderOutput.tsx @@ -58,11 +58,15 @@ SliderOutput.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/slider/root/SliderRoot.tsx b/packages/react/src/slider/root/SliderRoot.tsx index 798a297fed..8a7bed2a08 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; /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. */ disabled: boolean; /** @@ -176,7 +176,7 @@ export namespace SliderRoot { */ defaultValue?: number | ReadonlyArray; /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -205,7 +205,8 @@ SliderRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -213,7 +214,7 @@ SliderRoot.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]), /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -244,14 +245,14 @@ SliderRoot.propTypes /* remove-proptypes */ = { */ minStepsBetweenValues: PropTypes.number, /** - * Name attribute of the hidden `input` element. + * Identifies the field when a form is submitted. */ name: PropTypes.string, /** * Callback function that is fired when the slider's value changed. * * @param {number | number[]} value The new value. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. * You can pull out the new value by accessing `event.target.value` (any). * @param {number} activeThumbIndex Index of the currently moved thumb. */ @@ -260,7 +261,7 @@ SliderRoot.propTypes /* remove-proptypes */ = { * Callback function that is fired when the `pointerup` is triggered. * * @param {number | number[]} value The new value. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. * **Warning**: This is a generic event not a change event. */ onValueCommitted: PropTypes.func, @@ -270,7 +271,10 @@ SliderRoot.propTypes /* remove-proptypes */ = { */ orientation: PropTypes.oneOf(['horizontal', 'vertical']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/slider/root/useSliderRoot.ts b/packages/react/src/slider/root/useSliderRoot.ts index e36a0c03d0..5024502fde 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; /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -519,14 +519,14 @@ export namespace useSliderRoot { */ minStepsBetweenValues?: number; /** - * Name attribute of the hidden `input` element. + * Identifies the field when a form is submitted. */ name?: string; /** * Callback function that is fired when the slider's value changed. * * @param {number | number[]} value The new value. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. * You can pull out the new value by accessing `event.target.value` (any). * @param {number} activeThumbIndex Index of the currently moved thumb. */ @@ -535,7 +535,7 @@ export namespace useSliderRoot { * Callback function that is fired when the `pointerup` is triggered. * * @param {number | number[]} value The new value. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. * **Warning**: This is a generic event not a change event. */ onValueCommitted?: (value: number | number[], event: Event) => void; diff --git a/packages/react/src/slider/thumb/SliderThumb.tsx b/packages/react/src/slider/thumb/SliderThumb.tsx index 69ea9873b3..7d22f343ad 100644 --- a/packages/react/src/slider/thumb/SliderThumb.tsx +++ b/packages/react/src/slider/thumb/SliderThumb.tsx @@ -150,7 +150,10 @@ export namespace SliderThumb { onFocus?: React.FocusEventHandler; onKeyDown?: React.KeyboardEventHandler; /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render?: | (( @@ -182,7 +185,8 @@ SliderThumb.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -228,7 +232,10 @@ SliderThumb.propTypes /* remove-proptypes */ = { */ onPointerOver: PropTypes.func, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ PropTypes.func, diff --git a/packages/react/src/slider/track/SliderTrack.tsx b/packages/react/src/slider/track/SliderTrack.tsx index 8ca65c4bae..47fec87bd9 100644 --- a/packages/react/src/slider/track/SliderTrack.tsx +++ b/packages/react/src/slider/track/SliderTrack.tsx @@ -55,11 +55,15 @@ SliderTrack.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/switch/root/SwitchRoot.tsx b/packages/react/src/switch/root/SwitchRoot.tsx index b657ed5dc4..3b7d9b8361 100644 --- a/packages/react/src/switch/root/SwitchRoot.tsx +++ b/packages/react/src/switch/root/SwitchRoot.tsx @@ -74,9 +74,21 @@ namespace SwitchRoot { Omit, 'onChange'> {} export interface State extends FieldRoot.State { + /** + * Whether the switch is currently active. + */ checked: boolean; + /** + * Whether the component should ignore user actions. + */ disabled: boolean; + /** + * Whether the user should be unable to activate or deactivate the switch. + */ readOnly: boolean; + /** + * Whether the user must activate the switch before submitting a form. + */ required: boolean; } } @@ -87,7 +99,9 @@ SwitchRoot.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * If `true`, the switch is checked. + * Whether the switch is currently active. + * + * To render an uncontrolled switch, use the `defaultChecked` prop instead. */ checked: PropTypes.bool, /** @@ -95,50 +109,51 @@ SwitchRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * The default checked state. Use when the component is uncontrolled. + * Whether the switch is initially active. * + * To render a controlled switch, use the `checked` prop instead. * @default false */ defaultChecked: PropTypes.bool, /** - * If `true`, the component is disabled and can't be interacted with. - * + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** - * Ref to the underlying input element. + * A React ref to access the hidden `` element. */ inputRef: refType, /** - * Name of the underlying input element. + * Identifies the field when a form is submitted. */ name: PropTypes.string, /** - * Callback fired when the checked state is changed. + * Event handler called when the switch is activated or deactivated. * * @param {boolean} checked The new checked state. - * @param {React.ChangeEvent} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. */ onCheckedChange: PropTypes.func, /** - * If `true`, the component is read-only. - * Functionally, this is equivalent to being disabled, but the assistive technologies will announce this differently. - * + * Whether the user should be unable to activate or deactivate the switch. * @default false */ readOnly: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** - * If `true`, the switch must be checked for the browser validation to pass. - * + * Whether the user must activate the switch before submitting a form. * @default false */ required: PropTypes.bool, diff --git a/packages/react/src/switch/root/useSwitchRoot.ts b/packages/react/src/switch/root/useSwitchRoot.ts index 215bd705ad..a5d7bcde33 100644 --- a/packages/react/src/switch/root/useSwitchRoot.ts +++ b/packages/react/src/switch/root/useSwitchRoot.ts @@ -150,46 +150,45 @@ export namespace useSwitchRoot { */ id?: string; /** - * If `true`, the switch is checked. + * Whether the switch is currently active. + * + * To render an uncontrolled switch, use the `defaultChecked` prop instead. */ checked?: boolean; /** - * The default checked state. Use when the component is uncontrolled. + * Whether the switch is initially active. * + * To render a controlled switch, use the `checked` prop instead. * @default false */ defaultChecked?: boolean; /** - * If `true`, the component is disabled and can't be interacted with. - * + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; /** - * Ref to the underlying input element. + * A React ref to access the hidden `` element. */ inputRef?: React.Ref; /** - * Name of the underlying input element. + * Identifies the field when a form is submitted. */ name?: string; /** - * Callback fired when the checked state is changed. + * Event handler called when the switch is activated or deactivated. * * @param {boolean} checked The new checked state. - * @param {React.ChangeEvent} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. */ onCheckedChange?: (checked: boolean, event: Event) => void; /** - * If `true`, the component is read-only. - * Functionally, this is equivalent to being disabled, but the assistive technologies will announce this differently. - * + * Whether the user should be unable to activate or deactivate the switch. * @default false */ readOnly?: boolean; /** - * If `true`, the switch must be checked for the browser validation to pass. - * + * Whether the user must activate the switch before submitting a form. * @default false */ required?: boolean; @@ -197,7 +196,7 @@ export namespace useSwitchRoot { export interface ReturnValue { /** - * If `true`, the component will be checked. + * Whether the switch is currently active. */ checked: boolean; /** diff --git a/packages/react/src/switch/thumb/SwitchThumb.tsx b/packages/react/src/switch/thumb/SwitchThumb.tsx index 4e65feb3ce..09ce435f3f 100644 --- a/packages/react/src/switch/thumb/SwitchThumb.tsx +++ b/packages/react/src/switch/thumb/SwitchThumb.tsx @@ -53,11 +53,15 @@ SwitchThumb.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/tabs/indicator/TabsIndicator.tsx b/packages/react/src/tabs/indicator/TabsIndicator.tsx index 0d9ed07e9e..f13472497f 100644 --- a/packages/react/src/tabs/indicator/TabsIndicator.tsx +++ b/packages/react/src/tabs/indicator/TabsIndicator.tsx @@ -114,11 +114,15 @@ TabsIndicator.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/tabs/list/TabsList.tsx b/packages/react/src/tabs/list/TabsList.tsx index 56f7029df1..ad3f97bd41 100644 --- a/packages/react/src/tabs/list/TabsList.tsx +++ b/packages/react/src/tabs/list/TabsList.tsx @@ -111,8 +111,8 @@ namespace TabsList { */ activateOnFocus?: boolean; /** - * If `true`, using keyboard navigation will wrap focus to the other end of the list once the end is reached. - * + * Whether to loop keyboard focus back to the first item + * when the end of the list is reached while using the arrow keys. * @default true */ loop?: boolean; @@ -138,17 +138,21 @@ TabsList.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, using keyboard navigation will wrap focus to the other end of the list once the end is reached. - * + * Whether to loop keyboard focus back to the first item + * when the end of the list is reached while using the arrow keys. * @default true */ loop: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/tabs/panel/TabsPanel.tsx b/packages/react/src/tabs/panel/TabsPanel.tsx index a888487c04..d6cfc17579 100644 --- a/packages/react/src/tabs/panel/TabsPanel.tsx +++ b/packages/react/src/tabs/panel/TabsPanel.tsx @@ -68,7 +68,7 @@ namespace TabsPanel { */ value?: TabValue; /** - * If `true`, keeps the contents of the hidden TabPanel in the DOM. + * Whether to keep the HTML element in the DOM while the panel is hidden. * @default false */ keepMounted?: boolean; @@ -87,16 +87,20 @@ TabsPanel.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * If `true`, keeps the contents of the hidden TabPanel in the DOM. + * Whether to keep the HTML element in the DOM while the panel is hidden. * @default false */ keepMounted: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/tabs/root/TabsRoot.tsx b/packages/react/src/tabs/root/TabsRoot.tsx index a9fa4909a1..b5861e87d5 100644 --- a/packages/react/src/tabs/root/TabsRoot.tsx +++ b/packages/react/src/tabs/root/TabsRoot.tsx @@ -142,7 +142,8 @@ TabsRoot.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -161,7 +162,10 @@ TabsRoot.propTypes /* remove-proptypes */ = { */ orientation: PropTypes.oneOf(['horizontal', 'vertical']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/tabs/tab/TabsTab.tsx b/packages/react/src/tabs/tab/TabsTab.tsx index 6df348eac2..1329e8d204 100644 --- a/packages/react/src/tabs/tab/TabsTab.tsx +++ b/packages/react/src/tabs/tab/TabsTab.tsx @@ -75,6 +75,9 @@ namespace TabsTab { } export interface State { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; selected: boolean; orientation: TabsOrientation; @@ -93,7 +96,8 @@ TabsTab.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -105,7 +109,10 @@ TabsTab.propTypes /* remove-proptypes */ = { */ id: PropTypes.string, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/tabs/tab/useTabsTab.ts b/packages/react/src/tabs/tab/useTabsTab.ts index 8d90a8c934..f5e1f3115c 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; /** - * If `true`, the tab will be disabled. + * Whether the component should ignore user actions. */ disabled?: boolean; highlightedTabIndex: number; diff --git a/packages/react/src/toggle-group/ToggleGroup.tsx b/packages/react/src/toggle-group/ToggleGroup.tsx index 6748d4e6d0..d10199e332 100644 --- a/packages/react/src/toggle-group/ToggleGroup.tsx +++ b/packages/react/src/toggle-group/ToggleGroup.tsx @@ -101,6 +101,9 @@ export type ToggleGroupOrientation = 'horizontal' | 'vertical'; export namespace ToggleGroup { export interface State { + /** + * Whether the component should ignore user actions. + */ disabled: boolean; multiple: boolean; } @@ -109,6 +112,7 @@ export namespace ToggleGroup { extends Partial, Omit, 'defaultValue'> { /** + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; @@ -117,6 +121,8 @@ export namespace ToggleGroup { */ orientation?: ToggleGroupOrientation; /** + * Whether to loop keyboard focus back to the first item + * when the end of the list is reached while using the arrow keys. * @default true */ loop?: boolean; @@ -133,7 +139,8 @@ ToggleGroup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -143,10 +150,13 @@ ToggleGroup.propTypes /* remove-proptypes */ = { */ defaultValue: PropTypes.array, /** + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, /** + * Whether to loop keyboard focus back to the first item + * when the end of the list is reached while using the arrow keys. * @default true */ loop: PropTypes.bool, @@ -154,7 +164,7 @@ ToggleGroup.propTypes /* remove-proptypes */ = { * Callback fired when the pressed states of the ToggleGroup changes. * * @param {any[]} groupValue An array of the `value`s of all the pressed items. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. */ onValueChange: PropTypes.func, /** @@ -162,7 +172,10 @@ ToggleGroup.propTypes /* remove-proptypes */ = { */ orientation: PropTypes.oneOf(['horizontal', 'vertical']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/toggle-group/useToggleGroup.ts b/packages/react/src/toggle-group/useToggleGroup.ts index 9c1b75e7c8..c7286d3064 100644 --- a/packages/react/src/toggle-group/useToggleGroup.ts +++ b/packages/react/src/toggle-group/useToggleGroup.ts @@ -72,12 +72,12 @@ export namespace UseToggleGroup { * Callback fired when the pressed states of the ToggleGroup changes. * * @param {any[]} groupValue An array of the `value`s of all the pressed items. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. */ onValueChange: (groupValue: any[], event: Event) => void; /** - * When `true` the component is disabled - * @false + * Whether the component should ignore user actions. + * @default false */ disabled: boolean; /** @@ -92,8 +92,8 @@ export namespace UseToggleGroup { export interface ReturnValue { getRootProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps; /** - * When `true` the component is disabled. - * @false + * Whether the component should ignore user actions. + * @default false */ disabled: boolean; /** diff --git a/packages/react/src/toggle/Toggle.tsx b/packages/react/src/toggle/Toggle.tsx index 6dcb9175da..973a7479db 100644 --- a/packages/react/src/toggle/Toggle.tsx +++ b/packages/react/src/toggle/Toggle.tsx @@ -74,6 +74,9 @@ export { Toggle }; export namespace Toggle { export interface State { pressed: boolean; + /** + * Whether the component should ignore user actions. + */ disabled: boolean; } @@ -114,7 +117,8 @@ Toggle.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -123,7 +127,7 @@ Toggle.propTypes /* remove-proptypes */ = { */ defaultPressed: PropTypes.bool, /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: PropTypes.bool, @@ -135,7 +139,7 @@ Toggle.propTypes /* remove-proptypes */ = { * Callback fired when the pressed state is changed. * * @param {boolean} pressed The new pressed state. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. */ onPressedChange: PropTypes.func, /** @@ -143,7 +147,10 @@ Toggle.propTypes /* remove-proptypes */ = { */ pressed: PropTypes.bool, /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/toggle/useToggle.ts b/packages/react/src/toggle/useToggle.ts index 49c5558f19..f497480242 100644 --- a/packages/react/src/toggle/useToggle.ts +++ b/packages/react/src/toggle/useToggle.ts @@ -78,7 +78,7 @@ export namespace useToggle { */ defaultPressed?: boolean; /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled: boolean; @@ -86,7 +86,7 @@ export namespace useToggle { * Callback fired when the pressed state is changed. * * @param {boolean} pressed The new pressed state. - * @param {Event} event The event source of the callback. + * @param {Event} event The corresponding event that initiated the change. */ onPressedChange: (pressed: boolean, event: Event) => void; /** @@ -109,7 +109,7 @@ export namespace useToggle { */ getRootProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps; /** - * If `true`, the Toggle is disabled. + * Whether the component should ignore user actions. */ disabled: boolean; /** diff --git a/packages/react/src/tooltip/arrow/TooltipArrow.tsx b/packages/react/src/tooltip/arrow/TooltipArrow.tsx index 517e86aaad..c3064cb752 100644 --- a/packages/react/src/tooltip/arrow/TooltipArrow.tsx +++ b/packages/react/src/tooltip/arrow/TooltipArrow.tsx @@ -55,6 +55,9 @@ const TooltipArrow = React.forwardRef(function TooltipArrow( namespace TooltipArrow { export interface State { + /** + * Whether the tooltip is currently open. + */ open: boolean; side: Side; align: Align; @@ -74,11 +77,15 @@ TooltipArrow.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/tooltip/popup/TooltipPopup.tsx b/packages/react/src/tooltip/popup/TooltipPopup.tsx index ba572f6563..e0e3951462 100644 --- a/packages/react/src/tooltip/popup/TooltipPopup.tsx +++ b/packages/react/src/tooltip/popup/TooltipPopup.tsx @@ -69,6 +69,9 @@ const TooltipPopup = React.forwardRef(function TooltipPopup( namespace TooltipPopup { export interface State { + /** + * Whether the tooltip is currently open. + */ open: boolean; side: Side; align: Align; @@ -89,11 +92,15 @@ TooltipPopup.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/tooltip/positioner/TooltipPositioner.tsx b/packages/react/src/tooltip/positioner/TooltipPositioner.tsx index 1163ad9831..be7a997ce9 100644 --- a/packages/react/src/tooltip/positioner/TooltipPositioner.tsx +++ b/packages/react/src/tooltip/positioner/TooltipPositioner.tsx @@ -105,6 +105,9 @@ const TooltipPositioner = React.forwardRef(function TooltipPositioner( namespace TooltipPositioner { export interface State { + /** + * Whether the tooltip is currently open. + */ open: boolean; side: Side; align: Align; @@ -150,7 +153,8 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { */ children: PropTypes.node, /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** @@ -183,7 +187,7 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { }), ]), /** - * Whether the tooltip remains mounted in the DOM while closed. + * Whether to keep the HTML element in the DOM while the tooltip is hidden. * @default false */ keepMounted: PropTypes.bool, @@ -193,7 +197,10 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { */ positionMethod: PropTypes.oneOf(['absolute', 'fixed']), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), /** diff --git a/packages/react/src/tooltip/positioner/useTooltipPositioner.ts b/packages/react/src/tooltip/positioner/useTooltipPositioner.ts index 564c51129d..6ae307053b 100644 --- a/packages/react/src/tooltip/positioner/useTooltipPositioner.ts +++ b/packages/react/src/tooltip/positioner/useTooltipPositioner.ts @@ -81,8 +81,7 @@ export namespace useTooltipPositioner { | React.MutableRefObject | (() => Element | VirtualElement | null); /** - * Whether the tooltip is open. - * @default false + * Whether the tooltip is currently open. */ open?: boolean; /** @@ -134,7 +133,7 @@ export namespace useTooltipPositioner { */ arrowPadding?: number; /** - * Whether the tooltip remains mounted in the DOM while closed. + * Whether to keep the HTML element in the DOM while the tooltip is hidden. * @default false */ keepMounted?: boolean; @@ -161,8 +160,7 @@ export namespace useTooltipPositioner { */ mounted: boolean; /** - * Whether the tooltip is open. - * @default false + * Whether the tooltip is currently open. */ open?: boolean; /** diff --git a/packages/react/src/tooltip/root/TooltipRoot.tsx b/packages/react/src/tooltip/root/TooltipRoot.tsx index 342ac6abc8..f75ac293a1 100644 --- a/packages/react/src/tooltip/root/TooltipRoot.tsx +++ b/packages/react/src/tooltip/root/TooltipRoot.tsx @@ -111,7 +111,9 @@ TooltipRoot.propTypes /* remove-proptypes */ = { */ closeDelay: PropTypes.number, /** - * Whether the tooltip popup is open by default. Use when uncontrolled. + * Whether the tooltip is initially open. + * + * To render a controlled tooltip, use the `open` prop instead. * @default false */ defaultOpen: PropTypes.bool, @@ -127,12 +129,11 @@ TooltipRoot.propTypes /* remove-proptypes */ = { */ hoverable: PropTypes.bool, /** - * Callback fired when the tooltip popup is requested to be opened or closed. Use when controlled. + * Event handler called when the tooltip is opened or closed. */ onOpenChange: PropTypes.func, /** - * Whether the tooltip popup is open. Use when controlled. - * @default false + * Whether the tooltip is currently open. */ open: PropTypes.bool, /** diff --git a/packages/react/src/tooltip/root/useTooltipRoot.ts b/packages/react/src/tooltip/root/useTooltipRoot.ts index 940e2aeeb1..f8eb29d864 100644 --- a/packages/react/src/tooltip/root/useTooltipRoot.ts +++ b/packages/react/src/tooltip/root/useTooltipRoot.ts @@ -169,17 +169,18 @@ export function useTooltipRoot(params: useTooltipRoot.Parameters): useTooltipRoo export namespace useTooltipRoot { export interface Parameters { /** - * Whether the tooltip popup is open by default. Use when uncontrolled. + * Whether the tooltip is initially open. + * + * To render a controlled tooltip, use the `open` prop instead. * @default false */ defaultOpen?: boolean; /** - * Whether the tooltip popup is open. Use when controlled. - * @default false + * Whether the tooltip is currently open. */ open?: boolean; /** - * Callback fired when the tooltip popup is requested to be opened or closed. Use when controlled. + * Event handler called when the tooltip is opened or closed. */ onOpenChange?: (open: boolean, event?: Event, reason?: OpenChangeReason) => void; /** diff --git a/packages/react/src/tooltip/trigger/TooltipTrigger.tsx b/packages/react/src/tooltip/trigger/TooltipTrigger.tsx index 9aaacaceaa..994af93f3c 100644 --- a/packages/react/src/tooltip/trigger/TooltipTrigger.tsx +++ b/packages/react/src/tooltip/trigger/TooltipTrigger.tsx @@ -40,6 +40,9 @@ const TooltipTrigger = React.forwardRef(function TooltipTrigger( namespace TooltipTrigger { export interface State { + /** + * Whether the tooltip is currently open. + */ open: boolean; } @@ -52,11 +55,15 @@ TooltipTrigger.propTypes /* remove-proptypes */ = { // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), } as any; diff --git a/packages/react/src/use-button/useButton.ts b/packages/react/src/use-button/useButton.ts index b34bc0a63c..01a8dc3df5 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 { /** - * If `true`, the component is disabled. + * Whether the component should ignore user actions. * @default false */ disabled?: boolean; diff --git a/packages/react/src/utils/types.ts b/packages/react/src/utils/types.ts index beac0f68a9..26ff46ddda 100644 --- a/packages/react/src/utils/types.ts +++ b/packages/react/src/utils/types.ts @@ -44,11 +44,15 @@ export type BaseUIComponentProps< RenderFunctionProps = React.HTMLAttributes, > = Omit>, 'className'> & { /** - * Class names applied to the element or a function that returns them based on the component's state. + * CSS class applied to the element, or a function that + * returns a class based on the component’s state. */ className?: string | ((state: State) => string); /** - * A function to customize rendering of the component. + * Allows you to replace the component’s HTML element + * with a different tag, or compose it with another component. + * + * Accepts a `ReactElement` or a function that returns the element to render. */ render?: | ComponentRenderFn diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0657e0d237..5471441b37 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,8 +63,8 @@ importers: specifier: https://pkg.csb.dev/mui/material-ui/commit/92c23999/@mui/internal-test-utils version: https://pkg.csb.dev/mui/material-ui/commit/92c23999/@mui/internal-test-utils(@babel/core@7.26.0)(react-dom@19.0.0-rc-fb9a90fa48-20240614(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) '@mui/monorepo': - specifier: github:mui/material-ui#v6.2.0 - version: https://codeload.github.com/mui/material-ui/tar.gz/564be143f8ecf0afa12d2ca8c4873d5296b4f5c1(encoding@0.1.13) + specifier: github:mui/material-ui#6b5d751b0c7f46919cca75238b3da7ee751ac8a6 + version: https://codeload.github.com/mui/material-ui/tar.gz/6b5d751b0c7f46919cca75238b3da7ee751ac8a6(encoding@0.1.13) '@next/eslint-plugin-next': specifier: ^14.2.18 version: 14.2.18 @@ -2150,8 +2150,8 @@ packages: react: ^18.2.0 react-dom: ^18.2.0 - '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/564be143f8ecf0afa12d2ca8c4873d5296b4f5c1': - resolution: {tarball: https://codeload.github.com/mui/material-ui/tar.gz/564be143f8ecf0afa12d2ca8c4873d5296b4f5c1} + '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/6b5d751b0c7f46919cca75238b3da7ee751ac8a6': + resolution: {tarball: https://codeload.github.com/mui/material-ui/tar.gz/6b5d751b0c7f46919cca75238b3da7ee751ac8a6} version: 6.2.0 engines: {pnpm: 9.14.4} @@ -2916,20 +2916,20 @@ packages: resolution: {integrity: sha512-Wz7QYfPAlG/DR+DfABddUZeNgoeY7d1J39OCR2jR+v7VBsB8ezulDK5szTnDDPDwLH5IWhLvXIHlCFZV7MSKgA==} engines: {node: '>= 18', npm: '>= 8.6.0'} - '@slack/oauth@3.0.1': - resolution: {integrity: sha512-TuR9PI6bYKX6qHC7FQI4keMnhj45TNfSNQtTU3mtnHUX4XLM2dYLvRkUNADyiLTle2qu2rsOQtCIsZJw6H0sDA==} + '@slack/oauth@3.0.2': + resolution: {integrity: sha512-MdPS8AP9n3u/hBeqRFu+waArJLD/q+wOSZ48ktMTwxQLc6HJyaWPf8soqAyS/b0D6IlvI5TxAdyRyyv3wQ5IVw==} engines: {node: '>=18', npm: '>=8.6.0'} - '@slack/socket-mode@2.0.2': - resolution: {integrity: sha512-WSLBnGY9eE19jx6QLIP78oFpxNVU74soDIP0dupi35MFY6WfLBAikbuy4Y/rR4v9eJ7MNnd5/BdQNETgv32F8Q==} + '@slack/socket-mode@2.0.3': + resolution: {integrity: sha512-aY1AhQd3HAgxLYC2Mz47dXtW6asjyYp8bJ24MWalg+qFWPaXj8VBYi+5w3rfGqBW5IxlIhs3vJTEQtIBrqQf5A==} engines: {node: '>= 18', npm: '>= 8.6.0'} '@slack/types@2.14.0': resolution: {integrity: sha512-n0EGm7ENQRxlXbgKSrQZL69grzg1gHLAVd+GlRVQJ1NSORo0FrApR7wql/gaKdu2n4TO83Sq/AmeUOqD60aXUA==} engines: {node: '>= 12.13.0', npm: '>= 6.12.0'} - '@slack/web-api@7.7.0': - resolution: {integrity: sha512-DtRyjgQi0mObA2uC6H8nL2OhAISKDhvtOXgRjGRBnBhiaWb6df5vPmKHsOHjpweYALBMHtiqE5ajZFkDW/ag8Q==} + '@slack/web-api@7.8.0': + resolution: {integrity: sha512-d4SdG+6UmGdzWw38a4sN3lF/nTEzsDxhzU13wm10ejOpPehtmRoqBKnPztQUfFiWbNvSb4czkWYJD4kt+5+Fuw==} engines: {node: '>= 18', npm: '>= 8.6.0'} '@socket.io/component-emitter@3.1.1': @@ -3109,8 +3109,8 @@ packages: '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - '@types/express-serve-static-core@4.19.0': - resolution: {integrity: sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==} + '@types/express-serve-static-core@4.19.6': + resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} '@types/express@4.17.21': resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} @@ -3184,8 +3184,8 @@ packages: '@types/prop-types@15.7.13': resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} - '@types/qs@6.9.15': - resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==} + '@types/qs@6.9.17': + resolution: {integrity: sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==} '@types/range-parser@1.2.7': resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} @@ -3767,8 +3767,8 @@ packages: resolution: {integrity: sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==} engines: {node: '>=4'} - axios@1.7.7: - resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} + axios@1.7.9: + resolution: {integrity: sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==} axobject-query@4.1.0: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} @@ -5368,8 +5368,8 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - gaxios@6.5.0: - resolution: {integrity: sha512-R9QGdv8j4/dlNoQbX3hSaK/S0rkMijqjVvW3YM06CoBdbU/VdKd159j4hePpng0KuE6Lh6JJ7UdmVGJZFcAG1w==} + gaxios@6.7.1: + resolution: {integrity: sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==} engines: {node: '>=14'} gcp-metadata@6.1.0: @@ -5535,8 +5535,8 @@ packages: resolution: {integrity: sha512-7ccSEJFDFO7exFbO6NRyC+xH8/mZ1GZGG2xxx9iHxZWcjUjJpjWxIMw3cofAKcueZ6DATiukmmprD7yavQHOyQ==} engines: {node: '>=14'} - googleapis-common@7.1.0: - resolution: {integrity: sha512-p3KHiWDBBWJEXk6SYauBEvxw5+UmRy7k2scxGtsNv9eHsTbpopJ3/7If4OrNnzJ9XMLg3IlyQXpVp8YPQsStiw==} + googleapis-common@7.2.0: + resolution: {integrity: sha512-/fhDZEJZvOV3X5jmD+fKxMqma5q2Q9nZNSF3kn1F18tpxmA86BcTxAGBQdM0N89Z3bEaIs+HVznSmFJEAmMTjA==} engines: {node: '>=14.0.0'} gopd@1.0.1: @@ -6083,8 +6083,8 @@ packages: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} - is-unicode-supported@2.0.0: - resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} engines: {node: '>=18'} is-weakmap@2.0.2: @@ -7863,8 +7863,8 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - pretty-ms@9.0.0: - resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==} + pretty-ms@9.2.0: + resolution: {integrity: sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==} engines: {node: '>=18'} pretty-quick@4.0.0: @@ -9676,8 +9676,8 @@ packages: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} - yoctocolors@2.0.2: - resolution: {integrity: sha512-Ct97huExsu7cWeEjmrXlofevF8CvzUglJ4iGUet5B8xn1oumtAZBpHU4GzYuoE6PVqcZ5hghtBrSlhwHuR1Jmw==} + yoctocolors@2.1.1: + resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} engines: {node: '>=18'} zwitch@2.0.4: @@ -9725,7 +9725,7 @@ snapshots: dependencies: '@argos-ci/api-client': 0.7.0 '@argos-ci/util': 2.2.0 - axios: 1.7.7(debug@4.3.7) + axios: 1.7.9(debug@4.3.7) convict: 6.2.4 debug: 4.3.7(supports-color@8.1.1) fast-glob: 3.3.2 @@ -10926,7 +10926,7 @@ snapshots: '@googleapis/sheets@9.3.1(encoding@0.1.13)': dependencies: - googleapis-common: 7.1.0(encoding@0.1.13) + googleapis-common: 7.2.0(encoding@0.1.13) transitivePeerDependencies: - encoding - supports-color @@ -11293,7 +11293,7 @@ snapshots: - supports-color - utf-8-validate - '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/564be143f8ecf0afa12d2ca8c4873d5296b4f5c1(encoding@0.1.13)': + '@mui/monorepo@https://codeload.github.com/mui/material-ui/tar.gz/6b5d751b0c7f46919cca75238b3da7ee751ac8a6(encoding@0.1.13)': dependencies: '@googleapis/sheets': 9.3.1(encoding@0.1.13) '@netlify/functions': 2.8.2 @@ -12104,12 +12104,12 @@ snapshots: '@slack/bolt@4.1.1': dependencies: '@slack/logger': 4.0.0 - '@slack/oauth': 3.0.1 - '@slack/socket-mode': 2.0.2 + '@slack/oauth': 3.0.2 + '@slack/socket-mode': 2.0.3 '@slack/types': 2.14.0 - '@slack/web-api': 7.7.0 + '@slack/web-api': 7.8.0 '@types/express': 4.17.21 - axios: 1.7.7(debug@4.3.7) + axios: 1.7.9(debug@4.3.7) express: 5.0.1 path-to-regexp: 8.2.0 raw-body: 3.0.0 @@ -12124,10 +12124,10 @@ snapshots: dependencies: '@types/node': 18.19.67 - '@slack/oauth@3.0.1': + '@slack/oauth@3.0.2': dependencies: '@slack/logger': 4.0.0 - '@slack/web-api': 7.7.0 + '@slack/web-api': 7.8.0 '@types/jsonwebtoken': 9.0.7 '@types/node': 18.19.67 jsonwebtoken: 9.0.2 @@ -12135,10 +12135,10 @@ snapshots: transitivePeerDependencies: - debug - '@slack/socket-mode@2.0.2': + '@slack/socket-mode@2.0.3': dependencies: '@slack/logger': 4.0.0 - '@slack/web-api': 7.7.0 + '@slack/web-api': 7.8.0 '@types/node': 18.19.67 '@types/ws': 8.5.13 eventemitter3: 5.0.1 @@ -12150,13 +12150,13 @@ snapshots: '@slack/types@2.14.0': {} - '@slack/web-api@7.7.0': + '@slack/web-api@7.8.0': dependencies: '@slack/logger': 4.0.0 '@slack/types': 2.14.0 '@types/node': 18.19.67 '@types/retry': 0.12.0 - axios: 1.7.7(debug@4.3.7) + axios: 1.7.9(debug@4.3.7) eventemitter3: 5.0.1 form-data: 4.0.0 is-electron: 2.2.2 @@ -12344,18 +12344,18 @@ snapshots: '@types/estree@1.0.6': {} - '@types/express-serve-static-core@4.19.0': + '@types/express-serve-static-core@4.19.6': dependencies: '@types/node': 18.19.67 - '@types/qs': 6.9.15 + '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 '@types/express@4.17.21': dependencies: '@types/body-parser': 1.19.5 - '@types/express-serve-static-core': 4.19.0 - '@types/qs': 6.9.15 + '@types/express-serve-static-core': 4.19.6 + '@types/qs': 6.9.17 '@types/serve-static': 1.15.7 '@types/fs-extra@11.0.4': @@ -12419,7 +12419,7 @@ snapshots: '@types/prop-types@15.7.13': {} - '@types/qs@6.9.15': {} + '@types/qs@6.9.17': {} '@types/range-parser@1.2.7': {} @@ -13122,7 +13122,7 @@ snapshots: axe-core@4.10.0: {} - axios@1.7.7(debug@4.3.7): + axios@1.7.9(debug@4.3.7): dependencies: follow-redirects: 1.15.6(debug@4.3.7) form-data: 4.0.0 @@ -14803,10 +14803,10 @@ snapshots: is-plain-obj: 4.1.0 is-stream: 4.0.1 npm-run-path: 6.0.0 - pretty-ms: 9.0.0 + pretty-ms: 9.2.0 signal-exit: 4.1.0 strip-final-newline: 4.0.0 - yoctocolors: 2.0.2 + yoctocolors: 2.1.1 expand-tilde@2.0.2: dependencies: @@ -14903,7 +14903,7 @@ snapshots: figures@6.1.0: dependencies: - is-unicode-supported: 2.0.0 + is-unicode-supported: 2.1.0 file-entry-cache@6.0.1: dependencies: @@ -15098,7 +15098,7 @@ snapshots: functions-have-names@1.2.3: {} - gaxios@6.5.0(encoding@0.1.13): + gaxios@6.7.1(encoding@0.1.13): dependencies: extend: 3.0.2 https-proxy-agent: 7.0.4 @@ -15111,7 +15111,7 @@ snapshots: gcp-metadata@6.1.0(encoding@0.1.13): dependencies: - gaxios: 6.5.0(encoding@0.1.13) + gaxios: 6.7.1(encoding@0.1.13) json-bigint: 1.0.0 transitivePeerDependencies: - encoding @@ -15307,7 +15307,7 @@ snapshots: dependencies: base64-js: 1.5.1 ecdsa-sig-formatter: 1.0.11 - gaxios: 6.5.0(encoding@0.1.13) + gaxios: 6.7.1(encoding@0.1.13) gcp-metadata: 6.1.0(encoding@0.1.13) gtoken: 7.1.0(encoding@0.1.13) jws: 4.0.0 @@ -15315,10 +15315,10 @@ snapshots: - encoding - supports-color - googleapis-common@7.1.0(encoding@0.1.13): + googleapis-common@7.2.0(encoding@0.1.13): dependencies: extend: 3.0.2 - gaxios: 6.5.0(encoding@0.1.13) + gaxios: 6.7.1(encoding@0.1.13) google-auth-library: 9.15.0(encoding@0.1.13) qs: 6.13.0 url-template: 2.0.8 @@ -15339,7 +15339,7 @@ snapshots: gtoken@7.1.0(encoding@0.1.13): dependencies: - gaxios: 6.5.0(encoding@0.1.13) + gaxios: 6.7.1(encoding@0.1.13) jws: 4.0.0 transitivePeerDependencies: - encoding @@ -15908,7 +15908,7 @@ snapshots: is-unicode-supported@0.1.0: {} - is-unicode-supported@2.0.0: {} + is-unicode-supported@2.1.0: {} is-weakmap@2.0.2: {} @@ -17597,7 +17597,7 @@ snapshots: '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.0-rc.46 '@zkochan/js-yaml': 0.0.6 - axios: 1.7.7(debug@4.3.7) + axios: 1.7.9(debug@4.3.7) chalk: 4.1.2 cli-cursor: 3.1.0 cli-spinners: 2.6.1 @@ -18208,7 +18208,7 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.3.1 - pretty-ms@9.0.0: + pretty-ms@9.2.0: dependencies: parse-ms: 4.0.0 @@ -20320,6 +20320,6 @@ snapshots: yoctocolors-cjs@2.1.2: {} - yoctocolors@2.0.2: {} + yoctocolors@2.1.1: {} zwitch@2.0.4: {}