@astryxdesign/core 0.1.1 → 0.1.2-canary.04e71b2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +105 -0
- package/README.md +131 -13
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +11 -5
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +4 -1
- package/dist/Banner/Banner.d.ts +7 -0
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +9 -2
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +24 -5
- package/dist/Button/Button.d.ts +12 -2
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +53 -17
- package/dist/Calendar/Calendar.d.ts +5 -4
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +82 -43
- package/dist/Calendar/hooks/index.d.ts +0 -2
- package/dist/Calendar/hooks/index.d.ts.map +1 -1
- package/dist/Calendar/hooks/index.js +1 -2
- package/dist/Calendar/index.d.ts +3 -3
- package/dist/Calendar/index.d.ts.map +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/Calendar/styles.d.ts +3 -9
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +3 -11
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +17 -3
- package/dist/Center/Center.d.ts +11 -1
- package/dist/Center/Center.d.ts.map +1 -1
- package/dist/Center/Center.js +9 -3
- package/dist/Chat/ChatMessageList.d.ts +14 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +2 -0
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +4 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts +23 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +51 -9
- package/dist/CheckboxList/CheckboxList.d.ts +13 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +39 -9
- package/dist/CheckboxList/CheckboxListContext.d.ts +7 -0
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +3 -3
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +49 -37
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +5 -5
- package/dist/ContextMenu/ContextMenu.d.ts +4 -5
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +93 -11
- package/dist/DateInput/DateInput.d.ts +23 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +59 -8
- package/dist/DateRangeInput/DateRangeInput.d.ts +23 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +42 -9
- package/dist/DateTimeInput/DateTimeInput.d.ts +35 -2
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +78 -15
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +12 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -8
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +42 -14
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +7 -1
- package/dist/Field/Field.d.ts +19 -2
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +4 -0
- package/dist/Field/FieldLabel.d.ts +21 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +41 -26
- package/dist/FileInput/FileInput.d.ts +22 -1
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +56 -10
- package/dist/Grid/Grid.d.ts +11 -1
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +8 -0
- package/dist/HoverCard/HoverCard.d.ts +2 -2
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +18 -6
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +7 -3
- package/dist/InputGroup/InputGroup.d.ts +2 -2
- package/dist/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/InputGroup/InputGroup.js +14 -5
- package/dist/InputGroup/InputGroupContext.d.ts +4 -0
- package/dist/InputGroup/InputGroupContext.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupContext.js +2 -2
- package/dist/InputGroup/index.d.ts +1 -0
- package/dist/InputGroup/index.d.ts.map +1 -1
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +34 -2
- package/dist/Layer/anchorName.d.ts +20 -0
- package/dist/Layer/anchorName.d.ts.map +1 -0
- package/dist/Layer/anchorName.js +36 -0
- package/dist/Layer/layerAnimations.stylex.d.ts +4 -0
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +8 -4
- package/dist/Layer/useLayer.d.ts +29 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +55 -11
- package/dist/Layout/Layout.d.ts +4 -11
- package/dist/Layout/Layout.d.ts.map +1 -1
- package/dist/Layout/Layout.js +10 -11
- package/dist/Layout/LayoutFooter.d.ts +2 -2
- package/dist/Layout/LayoutFooter.d.ts.map +1 -1
- package/dist/Layout/LayoutHeader.d.ts +2 -2
- package/dist/Layout/LayoutHeader.d.ts.map +1 -1
- package/dist/Layout/LayoutPanel.d.ts +2 -2
- package/dist/Layout/LayoutPanel.d.ts.map +1 -1
- package/dist/Layout/padding.stylex.d.ts +51 -0
- package/dist/Layout/padding.stylex.d.ts.map +1 -1
- package/dist/Layout/padding.stylex.js +63 -0
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +4 -2
- package/dist/Link/Link.d.ts +17 -2
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +20 -9
- package/dist/Link/LinkProvider.d.ts +1 -0
- package/dist/Link/LinkProvider.d.ts.map +1 -1
- package/dist/Link/LinkProvider.js +1 -0
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +18 -3
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +13 -0
- package/dist/MoreMenu/MoreMenu.d.ts +1 -7
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MoreMenu/MoreMenu.js +0 -2
- package/dist/MultiSelector/MultiSelector.d.ts +25 -2
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +103 -22
- package/dist/MultiSelector/hooks.d.ts +12 -1
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +14 -1
- package/dist/NavMenu/NavHeadingMenu.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenu.js +34 -3
- package/dist/NumberInput/NumberInput.d.ts +23 -2
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +62 -12
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +46 -28
- package/dist/Popover/usePopover.d.ts +25 -2
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +18 -6
- package/dist/PowerSearch/PowerSearch.d.ts +11 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +6 -1
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +3 -5
- package/dist/RadioList/RadioList.d.ts +20 -2
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +105 -9
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +13 -2
- package/dist/SegmentedControl/SegmentedControl.d.ts +13 -2
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +78 -44
- package/dist/SegmentedControl/SegmentedControlContext.d.ts +7 -0
- package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +13 -2
- package/dist/Selector/Selector.d.ts +22 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +84 -23
- package/dist/Selector/hooks.d.ts +8 -1
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +14 -1
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +1 -1
- package/dist/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +8 -2
- package/dist/Slider/Slider.d.ts +21 -0
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +38 -11
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +1 -1
- package/dist/Stack/Stack.d.ts +38 -23
- package/dist/Stack/Stack.d.ts.map +1 -1
- package/dist/Stack/Stack.js +25 -1
- package/dist/Stack/StackItem.d.ts +12 -23
- package/dist/Stack/StackItem.d.ts.map +1 -1
- package/dist/Stack/StackItem.js +8 -1
- package/dist/Switch/Switch.d.ts +23 -2
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +41 -11
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +6 -0
- package/dist/TabList/TabList.d.ts +16 -4
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +86 -10
- package/dist/TabList/TabListContext.d.ts +5 -0
- package/dist/TabList/TabListContext.d.ts.map +1 -1
- package/dist/TabList/TabListContext.js +5 -0
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +6 -1
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +38 -16
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +36 -7
- package/dist/Table/TableCell.d.ts +8 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +10 -10
- package/dist/Table/TableHeaderCell.d.ts +8 -1
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +16 -16
- package/dist/Table/TableRow.d.ts +6 -1
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +15 -7
- package/dist/Table/index.d.ts +4 -1
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +3 -2
- package/dist/Table/plugins/pagination/paginateData.d.ts +2 -1
- package/dist/Table/plugins/pagination/paginateData.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/paginateData.js +8 -3
- package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/useTablePagination.js +6 -1
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +59 -3
- package/dist/Table/plugins/stickyColumns/index.d.ts +3 -0
- package/dist/Table/plugins/stickyColumns/index.d.ts.map +1 -0
- package/dist/Table/plugins/stickyColumns/index.js +3 -0
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts +25 -0
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -0
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +369 -0
- package/dist/Table/tableContextMenu.d.ts +33 -0
- package/dist/Table/tableContextMenu.d.ts.map +1 -0
- package/dist/Table/tableContextMenu.js +133 -0
- package/dist/Table/types.d.ts +161 -5
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/Table/useBaseTablePlugins.d.ts.map +1 -1
- package/dist/Table/useBaseTablePlugins.js +1 -1
- package/dist/Text/text.stylex.d.ts +2 -2
- package/dist/Text/text.stylex.js +2 -2
- package/dist/TextArea/TextArea.d.ts +22 -1
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +41 -9
- package/dist/TextInput/TextInput.d.ts +23 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +55 -10
- package/dist/TimeInput/TimeInput.d.ts +23 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +53 -10
- package/dist/Timestamp/Timestamp.d.ts +1 -1
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +28 -3
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +14 -0
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +132 -3
- package/dist/ToggleButton/ToggleButton.d.ts +7 -9
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +34 -57
- package/dist/Tokenizer/Tokenizer.d.ts +12 -1
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +27 -5
- package/dist/Toolbar/Toolbar.d.ts +3 -3
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +51 -7
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +57 -9
- package/dist/TreeList/TreeList.d.ts +1 -1
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +72 -2
- package/dist/TreeList/TreeListItem.d.ts +11 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +51 -12
- package/dist/TreeList/treeListItem.markers.stylex.d.ts +16 -0
- package/dist/TreeList/treeListItem.markers.stylex.d.ts.map +1 -0
- package/dist/TreeList/treeListItem.markers.stylex.js +22 -0
- package/dist/Typeahead/BaseTypeahead.d.ts +9 -0
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +67 -6
- package/dist/Typeahead/Typeahead.d.ts +24 -1
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +29 -5
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +61 -0
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/VisuallyHidden/VisuallyHidden.js +65 -0
- package/dist/VisuallyHidden/index.d.ts +11 -0
- package/dist/VisuallyHidden/index.d.ts.map +1 -0
- package/dist/VisuallyHidden/index.js +13 -0
- package/dist/astryx.css +40 -1
- package/dist/astryx.umd.js +147 -0
- package/dist/astryx.umd.js.map +7 -0
- package/dist/hooks/focusableSelector.d.ts +22 -0
- package/dist/hooks/focusableSelector.d.ts.map +1 -0
- package/dist/hooks/focusableSelector.js +24 -0
- package/dist/hooks/index.d.ts +12 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +7 -2
- package/dist/hooks/useAnnounce.d.ts +40 -0
- package/dist/hooks/useAnnounce.d.ts.map +1 -0
- package/dist/hooks/useAnnounce.js +142 -0
- package/dist/hooks/useClickableContainer.d.ts +16 -1
- package/dist/hooks/useClickableContainer.d.ts.map +1 -1
- package/dist/hooks/useClickableContainer.js +16 -4
- package/dist/hooks/useEntryAnimation.d.ts.map +1 -1
- package/dist/hooks/useEntryAnimation.js +4 -4
- package/dist/hooks/useFocusTrap.d.ts +18 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +87 -3
- package/dist/hooks/useGridFocus.d.ts +88 -1
- package/dist/hooks/useGridFocus.d.ts.map +1 -1
- package/dist/hooks/useGridFocus.js +261 -62
- package/dist/hooks/useKeyboardHint.d.ts +82 -0
- package/dist/hooks/useKeyboardHint.d.ts.map +1 -0
- package/dist/hooks/useKeyboardHint.js +220 -0
- package/dist/hooks/useListFocus.d.ts +78 -7
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +305 -52
- package/dist/hooks/useLongPress.d.ts +21 -0
- package/dist/hooks/useLongPress.d.ts.map +1 -0
- package/dist/hooks/useLongPress.js +89 -0
- package/dist/hooks/useTreeFocus.d.ts +157 -0
- package/dist/hooks/useTreeFocus.d.ts.map +1 -0
- package/dist/hooks/useTreeFocus.js +337 -0
- package/dist/hooks/useTypeahead.d.ts +63 -0
- package/dist/hooks/useTypeahead.d.ts.map +1 -0
- package/dist/hooks/useTypeahead.js +117 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/theme/generateThemeRules.js +1 -1
- package/dist/theme/syntax/SyntaxTheme.d.ts +1 -1
- package/dist/theme/syntax/SyntaxTheme.js +1 -1
- package/dist/theme/syntax/defineSyntaxTheme.d.ts.map +1 -1
- package/dist/theme/syntax/defineSyntaxTheme.js +2 -2
- package/dist/theme/syntax/presets.d.ts +1 -1
- package/dist/theme/syntax/presets.d.ts.map +1 -1
- package/dist/theme/syntax/presets.js +1 -1
- package/dist/theme/syntax/tokens.d.ts +1 -1
- package/dist/theme/syntax/tokens.js +1 -1
- package/dist/theme/types.d.ts +1 -1
- package/dist/utils/dateTypes.d.ts +12 -0
- package/dist/utils/dateTypes.d.ts.map +1 -1
- package/dist/utils/dateTypes.js +41 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/inputAria.d.ts +29 -0
- package/dist/utils/inputAria.d.ts.map +1 -0
- package/dist/utils/inputAria.js +30 -0
- package/dist/utils/timeParser.d.ts.map +1 -1
- package/dist/utils/timeParser.js +5 -2
- package/package.json +15 -5
- package/src/Avatar/Avatar.test.tsx +37 -0
- package/src/Avatar/Avatar.tsx +10 -5
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +3 -0
- package/src/Banner/Banner.doc.mjs +8 -0
- package/src/Banner/Banner.test.tsx +16 -7
- package/src/Banner/Banner.tsx +9 -2
- package/src/Breadcrumbs/BreadcrumbItem.tsx +25 -7
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +31 -10
- package/src/Button/Button.doc.mjs +6 -0
- package/src/Button/Button.test.tsx +105 -11
- package/src/Button/Button.tsx +76 -21
- package/src/Calendar/Calendar.doc.mjs +4 -4
- package/src/Calendar/Calendar.test.tsx +168 -30
- package/src/Calendar/Calendar.tsx +121 -66
- package/src/Calendar/hooks/index.ts +0 -6
- package/src/Calendar/index.ts +1 -3
- package/src/Calendar/styles.ts +4 -9
- package/src/Carousel/Carousel.doc.mjs +7 -1
- package/src/Carousel/Carousel.test.tsx +20 -0
- package/src/Carousel/Carousel.tsx +16 -1
- package/src/Center/Center.doc.mjs +12 -2
- package/src/Center/Center.tsx +28 -3
- package/src/Chat/ChatComposer.doc.mjs +3 -0
- package/src/Chat/ChatComposerDrawer.doc.mjs +12 -0
- package/src/Chat/ChatMessageList.doc.mjs +8 -0
- package/src/Chat/ChatMessageList.test.tsx +18 -0
- package/src/Chat/ChatMessageList.tsx +16 -0
- package/src/Chat/useTriggerMenu.tsx +3 -0
- package/src/CheckboxInput/CheckboxInput.doc.mjs +18 -0
- package/src/CheckboxInput/CheckboxInput.test.tsx +172 -27
- package/src/CheckboxInput/CheckboxInput.tsx +78 -6
- package/src/CheckboxList/CheckboxList.doc.mjs +9 -0
- package/src/CheckboxList/CheckboxList.test.tsx +169 -16
- package/src/CheckboxList/CheckboxList.tsx +56 -3
- package/src/CheckboxList/CheckboxListContext.tsx +7 -0
- package/src/Citation/Citation.doc.mjs +10 -0
- package/src/Citation/Citation.test.tsx +117 -0
- package/src/Citation/Citation.tsx +9 -1
- package/src/ClickableCard/ClickableCard.doc.mjs +15 -0
- package/src/CodeBlock/CodeBlock.test.tsx +115 -0
- package/src/CodeBlock/CodeBlock.tsx +61 -33
- package/src/CommandPalette/CommandPalette.test.tsx +47 -1
- package/src/CommandPalette/CommandPalette.tsx +9 -21
- package/src/ContextMenu/ContextMenu.doc.mjs +4 -4
- package/src/ContextMenu/ContextMenu.test.tsx +155 -1
- package/src/ContextMenu/ContextMenu.tsx +113 -16
- package/src/DateInput/DateInput.doc.mjs +281 -56
- package/src/DateInput/DateInput.test.tsx +188 -2
- package/src/DateInput/DateInput.tsx +89 -10
- package/src/DateRangeInput/DateRangeInput.doc.mjs +251 -46
- package/src/DateRangeInput/DateRangeInput.test.tsx +182 -20
- package/src/DateRangeInput/DateRangeInput.tsx +63 -5
- package/src/DateTimeInput/DateTimeInput.doc.mjs +368 -67
- package/src/DateTimeInput/DateTimeInput.test.tsx +279 -11
- package/src/DateTimeInput/DateTimeInput.tsx +125 -17
- package/src/Dialog/Dialog.doc.mjs +2 -2
- package/src/Dialog/Dialog.tsx +12 -0
- package/src/DropdownMenu/DropdownMenu.doc.mjs +1 -8
- package/src/DropdownMenu/DropdownMenu.test.tsx +56 -42
- package/src/DropdownMenu/DropdownMenu.tsx +52 -18
- package/src/EmptyState/EmptyState.test.tsx +4 -2
- package/src/EmptyState/EmptyState.tsx +6 -2
- package/src/Field/Field.test.tsx +32 -0
- package/src/Field/Field.tsx +23 -5
- package/src/Field/FieldLabel.tsx +55 -17
- package/src/FileInput/FileInput.doc.mjs +17 -0
- package/src/FileInput/FileInput.test.tsx +283 -49
- package/src/FileInput/FileInput.tsx +76 -4
- package/src/Grid/Grid.doc.mjs +14 -4
- package/src/Grid/Grid.tsx +20 -0
- package/src/HoverCard/HoverCard.doc.mjs +3 -0
- package/src/HoverCard/HoverCard.test.tsx +189 -2
- package/src/HoverCard/HoverCard.tsx +20 -16
- package/src/HoverCard/useHoverCard.tsx +13 -10
- package/src/Icon/Icon.doc.mjs +8 -0
- package/src/InputGroup/InputGroup.doc.mjs +2 -2
- package/src/InputGroup/InputGroup.test.tsx +98 -60
- package/src/InputGroup/InputGroup.tsx +21 -4
- package/src/InputGroup/InputGroupContext.ts +9 -4
- package/src/InputGroup/index.ts +1 -0
- package/src/Kbd/Kbd.test.tsx +22 -4
- package/src/Kbd/Kbd.tsx +37 -12
- package/src/Layer/anchorName.test.ts +146 -0
- package/src/Layer/anchorName.ts +46 -0
- package/src/Layer/layerAnimations.stylex.ts +20 -4
- package/src/Layer/useLayer.doc.mjs +12 -2
- package/src/Layer/useLayer.tsx +100 -15
- package/src/Layout/Layout.doc.mjs +1 -1
- package/src/Layout/Layout.tsx +8 -16
- package/src/Layout/LayoutFooter.doc.mjs +4 -4
- package/src/Layout/LayoutFooter.tsx +3 -3
- package/src/Layout/LayoutHeader.doc.mjs +4 -4
- package/src/Layout/LayoutHeader.tsx +3 -3
- package/src/Layout/LayoutPanel.tsx +3 -3
- package/src/Layout/padding.stylex.ts +52 -0
- package/src/Lightbox/Lightbox.doc.mjs +9 -2
- package/src/Lightbox/Lightbox.test.tsx +53 -5
- package/src/Lightbox/Lightbox.tsx +9 -4
- package/src/Link/Link.doc.mjs +14 -0
- package/src/Link/Link.test.tsx +52 -2
- package/src/Link/Link.tsx +42 -7
- package/src/Link/LinkProvider.tsx +1 -0
- package/src/List/List.doc.mjs +7 -0
- package/src/Markdown/Markdown.doc.mjs +2 -0
- package/src/Markdown/Markdown.test.tsx +28 -26
- package/src/Markdown/Markdown.tsx +21 -6
- package/src/MetadataList/MetadataListItem.doc.mjs +4 -0
- package/src/MobileNav/MobileNav.doc.mjs +8 -8
- package/src/MobileNav/MobileNav.tsx +13 -0
- package/src/MobileNav/MobileNavReopen.test.tsx +118 -0
- package/src/MoreMenu/MoreMenu.doc.mjs +2 -17
- package/src/MoreMenu/MoreMenu.tsx +0 -9
- package/src/MultiSelector/MultiSelector.doc.mjs +25 -0
- package/src/MultiSelector/MultiSelector.test.tsx +375 -8
- package/src/MultiSelector/MultiSelector.tsx +145 -21
- package/src/MultiSelector/hooks.ts +27 -0
- package/src/NavMenu/NavHeadingMenu.test.tsx +77 -1
- package/src/NavMenu/NavHeadingMenu.tsx +50 -3
- package/src/NumberInput/NumberInput.doc.mjs +17 -0
- package/src/NumberInput/NumberInput.test.tsx +242 -40
- package/src/NumberInput/NumberInput.tsx +89 -11
- package/src/OverflowList/OverflowList.doc.mjs +17 -0
- package/src/Pagination/Pagination.doc.mjs +3 -3
- package/src/Pagination/Pagination.test.tsx +250 -14
- package/src/Pagination/Pagination.tsx +54 -29
- package/src/Popover/usePopover.doc.mjs +7 -3
- package/src/Popover/usePopover.tsx +49 -6
- package/src/PowerSearch/PowerSearch.doc.mjs +15 -0
- package/src/PowerSearch/PowerSearch.test.tsx +97 -1
- package/src/PowerSearch/PowerSearch.tsx +16 -3
- package/src/ProgressBar/ProgressBar.test.tsx +45 -27
- package/src/ProgressBar/ProgressBar.tsx +3 -4
- package/src/RadioList/RadioList.doc.mjs +9 -0
- package/src/RadioList/RadioList.test.tsx +252 -16
- package/src/RadioList/RadioList.tsx +166 -10
- package/src/RadioList/RadioListItem.tsx +14 -2
- package/src/Resizable/Resizable.doc.mjs +1 -1
- package/src/Section/Section.doc.mjs +11 -0
- package/src/SegmentedControl/SegmentedControl.doc.mjs +9 -0
- package/src/SegmentedControl/SegmentedControl.test.tsx +214 -42
- package/src/SegmentedControl/SegmentedControl.tsx +102 -54
- package/src/SegmentedControl/SegmentedControlContext.ts +7 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +14 -1
- package/src/SelectableCard/SelectableCard.doc.mjs +15 -0
- package/src/Selector/Selector.doc.mjs +25 -0
- package/src/Selector/Selector.test.tsx +322 -15
- package/src/Selector/Selector.tsx +126 -40
- package/src/Selector/hooks.ts +23 -0
- package/src/SideNav/SideNav.test.tsx +16 -0
- package/src/SideNav/SideNavItem.tsx +2 -4
- package/src/Skeleton/Skeleton.doc.mjs +11 -1
- package/src/Skeleton/Skeleton.test.tsx +25 -0
- package/src/Skeleton/Skeleton.tsx +11 -1
- package/src/Slider/Slider.doc.mjs +19 -0
- package/src/Slider/Slider.test.tsx +158 -18
- package/src/Slider/Slider.tsx +54 -6
- package/src/Spinner/Spinner.tsx +7 -1
- package/src/Stack/Stack.doc.mjs +77 -0
- package/src/Stack/Stack.test.tsx +55 -5
- package/src/Stack/Stack.tsx +73 -24
- package/src/Stack/StackItem.test.tsx +23 -0
- package/src/Stack/StackItem.tsx +20 -23
- package/src/Switch/Switch.doc.mjs +15 -0
- package/src/Switch/Switch.test.tsx +162 -27
- package/src/Switch/Switch.tsx +61 -21
- package/src/TabList/Tab.tsx +6 -0
- package/src/TabList/TabList.doc.mjs +12 -0
- package/src/TabList/TabList.test.tsx +208 -0
- package/src/TabList/TabList.tsx +102 -12
- package/src/TabList/TabListContext.ts +7 -3
- package/src/TabList/TabMenu.tsx +6 -3
- package/src/Table/BaseTable.tsx +72 -41
- package/src/Table/Table.doc.mjs +14 -0
- package/src/Table/Table.test.tsx +39 -30
- package/src/Table/Table.tsx +27 -1
- package/src/Table/TableCell.tsx +25 -23
- package/src/Table/TableHeaderCell.tsx +28 -29
- package/src/Table/TableRow.tsx +37 -7
- package/src/Table/index.ts +6 -2
- package/src/Table/plugins/pagination/paginateData.ts +10 -3
- package/src/Table/plugins/pagination/useTablePagination.test.tsx +16 -0
- package/src/Table/plugins/pagination/useTablePagination.tsx +8 -1
- package/src/Table/plugins/sortable/useTableSortable.test.tsx +91 -2
- package/src/Table/plugins/sortable/useTableSortable.tsx +53 -1
- package/src/Table/plugins/stickyColumns/index.ts +4 -0
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.test.tsx +163 -0
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +407 -0
- package/src/Table/tableContextMenu.test.tsx +157 -0
- package/src/Table/tableContextMenu.tsx +142 -0
- package/src/Table/types.ts +175 -4
- package/src/Table/useBaseTablePlugins.ts +1 -0
- package/src/Table/useTableColumnResize.doc.mjs +96 -0
- package/src/Table/useTableStickyColumns.doc.mjs +59 -0
- package/src/Text/Heading.doc.mjs +15 -2
- package/src/Text/Text.doc.mjs +7 -1
- package/src/Text/text.stylex.ts +2 -2
- package/src/TextArea/TextArea.doc.mjs +17 -0
- package/src/TextArea/TextArea.test.tsx +167 -35
- package/src/TextArea/TextArea.tsx +62 -15
- package/src/TextInput/TextInput.doc.mjs +17 -0
- package/src/TextInput/TextInput.test.tsx +168 -34
- package/src/TextInput/TextInput.tsx +77 -9
- package/src/TimeInput/TimeInput.doc.mjs +335 -60
- package/src/TimeInput/TimeInput.test.tsx +144 -7
- package/src/TimeInput/TimeInput.tsx +74 -5
- package/src/Timestamp/Timestamp.doc.mjs +9 -0
- package/src/Timestamp/Timestamp.test.tsx +44 -18
- package/src/Timestamp/Timestamp.tsx +30 -10
- package/src/Toast/Toast.tsx +14 -0
- package/src/Toast/ToastViewport.test.tsx +204 -0
- package/src/Toast/ToastViewport.tsx +167 -21
- package/src/ToggleButton/ToggleButton.doc.mjs +9 -3
- package/src/ToggleButton/ToggleButton.test.tsx +39 -18
- package/src/ToggleButton/ToggleButton.tsx +46 -83
- package/src/Tokenizer/Tokenizer.doc.mjs +15 -0
- package/src/Tokenizer/Tokenizer.test.tsx +105 -1
- package/src/Tokenizer/Tokenizer.tsx +41 -2
- package/src/Toolbar/Toolbar.doc.mjs +65 -5
- package/src/Toolbar/Toolbar.test.tsx +109 -6
- package/src/Toolbar/Toolbar.tsx +59 -5
- package/src/Tooltip/Tooltip.test.tsx +81 -0
- package/src/Tooltip/useTooltip.tsx +57 -11
- package/src/TreeList/TreeList.test.tsx +295 -6
- package/src/TreeList/TreeList.tsx +73 -1
- package/src/TreeList/TreeListItem.tsx +51 -5
- package/src/TreeList/treeListItem.markers.stylex.ts +20 -0
- package/src/Typeahead/BaseTypeahead.tsx +86 -9
- package/src/Typeahead/Typeahead.doc.mjs +136 -30
- package/src/Typeahead/Typeahead.test.tsx +331 -1
- package/src/Typeahead/Typeahead.tsx +52 -1
- package/src/VisuallyHidden/VisuallyHidden.doc.mjs +80 -0
- package/src/VisuallyHidden/VisuallyHidden.test.tsx +76 -0
- package/src/VisuallyHidden/VisuallyHidden.tsx +113 -0
- package/src/VisuallyHidden/index.ts +15 -0
- package/src/hooks/focusableSelector.ts +25 -0
- package/src/hooks/index.ts +28 -2
- package/src/hooks/useAnnounce.test.tsx +101 -0
- package/src/hooks/useAnnounce.ts +168 -0
- package/src/hooks/useClickableContainer.ts +16 -4
- package/src/hooks/useEntryAnimation.ts +16 -4
- package/src/hooks/useFocusTrap.test.tsx +132 -0
- package/src/hooks/useFocusTrap.ts +98 -4
- package/src/hooks/useGridFocus.doc.mjs +40 -2
- package/src/hooks/useGridFocus.test.tsx +132 -0
- package/src/hooks/useGridFocus.ts +343 -67
- package/src/hooks/useImageMode.test.ts +133 -0
- package/src/hooks/useKeyboardHint.doc.mjs +101 -0
- package/src/hooks/useKeyboardHint.test.tsx +70 -0
- package/src/hooks/useKeyboardHint.tsx +332 -0
- package/src/hooks/useListFocus.doc.mjs +50 -10
- package/src/hooks/useListFocus.test.tsx +375 -0
- package/src/hooks/useListFocus.ts +395 -57
- package/src/hooks/useLongPress.test.tsx +134 -0
- package/src/hooks/useLongPress.ts +119 -0
- package/src/hooks/useTreeFocus.doc.mjs +140 -0
- package/src/hooks/useTreeFocus.test.tsx +214 -0
- package/src/hooks/useTreeFocus.ts +559 -0
- package/src/hooks/useTypeahead.test.tsx +109 -0
- package/src/hooks/useTypeahead.ts +183 -0
- package/src/index.ts +1 -0
- package/src/theme/derivedVarRegistry.test.ts +4 -0
- package/src/theme/generateThemeRules.test.ts +7 -8
- package/src/theme/generateThemeRules.ts +1 -1
- package/src/theme/syntax/SyntaxTheme.tsx +1 -1
- package/src/theme/syntax/defineSyntaxTheme.ts +20 -11
- package/src/theme/syntax/presets.ts +5 -2
- package/src/theme/syntax/tokens.ts +1 -1
- package/src/theme/types.ts +1 -1
- package/src/utils/dateTypes.test.ts +40 -0
- package/src/utils/dateTypes.ts +40 -0
- package/src/utils/index.ts +9 -0
- package/src/utils/inputAria.test.ts +39 -0
- package/src/utils/inputAria.ts +58 -0
- package/src/utils/timeParser.test.ts +10 -0
- package/src/utils/timeParser.ts +5 -2
- package/dist/Calendar/hooks/useCalendarRovingTabindex.d.ts +0 -57
- package/dist/Calendar/hooks/useCalendarRovingTabindex.d.ts.map +0 -1
- package/dist/Calendar/hooks/useCalendarRovingTabindex.js +0 -96
- package/src/Calendar/hooks/useCalendarRovingTabindex.ts +0 -118
package/src/Table/types.ts
CHANGED
|
@@ -261,6 +261,26 @@ export interface HeaderCellRenderProps {
|
|
|
261
261
|
overlay?: ReactNode;
|
|
262
262
|
/** Content rendered below the header label row (e.g. inline filter controls). */
|
|
263
263
|
below?: ReactNode;
|
|
264
|
+
/**
|
|
265
|
+
* Right-click context-menu actions for this header cell. Plugins append
|
|
266
|
+
* their actions in `transformHeaderCell`; BaseTable concatenates the arrays
|
|
267
|
+
* across plugins (never overridden) and renders one menu per header cell.
|
|
268
|
+
*/
|
|
269
|
+
contextMenuActions?: TableContextActions;
|
|
270
|
+
/**
|
|
271
|
+
* Index of this column within the final, ordered list of rendered columns
|
|
272
|
+
* (after column injection/reordering by other plugins). Populated by
|
|
273
|
+
* BaseTable. Optional for backward compatibility with hand-constructed
|
|
274
|
+
* renders in tests.
|
|
275
|
+
*/
|
|
276
|
+
columnIndex?: number;
|
|
277
|
+
/**
|
|
278
|
+
* The full, final ordered list of columns being rendered (after column
|
|
279
|
+
* injection/reordering by other plugins). Populated by BaseTable so plugins
|
|
280
|
+
* can reason about column position — e.g. cumulative sticky offsets. Optional
|
|
281
|
+
* for backward compatibility.
|
|
282
|
+
*/
|
|
283
|
+
columns?: ReadonlyArray<TableColumn<Record<string, unknown>>>;
|
|
264
284
|
}
|
|
265
285
|
|
|
266
286
|
/** Props passed through the plugin pipeline for each body `<tr>` */
|
|
@@ -276,8 +296,102 @@ export interface BodyRowRenderProps {
|
|
|
276
296
|
export interface BodyCellRenderProps {
|
|
277
297
|
htmlProps: TdHTMLAttributes<HTMLTableCellElement>;
|
|
278
298
|
styles: StyleXStyles[];
|
|
299
|
+
/**
|
|
300
|
+
* Right-click context-menu actions for this body cell. Plugins append their
|
|
301
|
+
* actions in `transformBodyCell`; BaseTable concatenates the arrays across
|
|
302
|
+
* plugins and across the row's cells (never overridden) and renders one menu
|
|
303
|
+
* per row.
|
|
304
|
+
*/
|
|
305
|
+
contextMenuActions?: TableContextActions;
|
|
306
|
+
/**
|
|
307
|
+
* Index of this cell's column within the final ordered column list.
|
|
308
|
+
* Mirrors the `columnIndex` passed to `transformHeaderCell`. Populated by
|
|
309
|
+
* BaseTable. Optional for backward compatibility with hand-constructed
|
|
310
|
+
* renders in tests.
|
|
311
|
+
*/
|
|
312
|
+
columnIndex?: number;
|
|
313
|
+
/**
|
|
314
|
+
* The full, final ordered list of columns being rendered. Populated by
|
|
315
|
+
* BaseTable so plugins can reason about column position — e.g. cumulative
|
|
316
|
+
* sticky offsets. Optional for backward compatibility.
|
|
317
|
+
*/
|
|
318
|
+
columns?: ReadonlyArray<TableColumn<Record<string, unknown>>>;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Props passed through the plugin pipeline for the scroll-wrapper region — the
|
|
323
|
+
* `<div>` wrapping the `<table>` element (the horizontal scroll container, see
|
|
324
|
+
* the `scrollWrapper` prop on `BaseTableProps`). Lets plugins attach a `ref` to
|
|
325
|
+
* the scrollable element (e.g. for scroll-aware sticky-column shadows or
|
|
326
|
+
* virtualization) and inject chrome before/after the table.
|
|
327
|
+
*
|
|
328
|
+
* Named after `scrollWrapper` (not "layout") to avoid ambiguity: it transforms
|
|
329
|
+
* the wrapper element, not the internal header/body/footer layout of `<table>`.
|
|
330
|
+
*
|
|
331
|
+
* Runs after `transformTable`/cell transforms but inside `transformTableContext`,
|
|
332
|
+
* so plugin chrome added here stays within any context providers but wraps the
|
|
333
|
+
* scroll area.
|
|
334
|
+
*/
|
|
335
|
+
export interface ScrollWrapperRenderProps {
|
|
336
|
+
/**
|
|
337
|
+
* HTML attributes applied to the scroll container `<div>`, including an
|
|
338
|
+
* optional `ref`. Plugins compose refs by reading the existing `ref` and
|
|
339
|
+
* merging their own (see `useTableStickyColumns`).
|
|
340
|
+
*/
|
|
341
|
+
htmlProps: HTMLAttributes<HTMLDivElement> & {
|
|
342
|
+
ref?: Ref<HTMLDivElement>;
|
|
343
|
+
};
|
|
344
|
+
styles: StyleXStyles[];
|
|
345
|
+
/** Content rendered before the `<table>`, inside the scroll container. */
|
|
346
|
+
beforeTable?: ReactNode;
|
|
347
|
+
/** Content rendered after the `<table>`, inside the scroll container. */
|
|
348
|
+
afterTable?: ReactNode;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// =============================================================================
|
|
352
|
+
// Context-menu actions
|
|
353
|
+
// =============================================================================
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* A single right-click context-menu action contributed by a plugin.
|
|
357
|
+
*
|
|
358
|
+
* Plugins contribute actions via the `contextMenuActions` field on
|
|
359
|
+
* `HeaderCellRenderProps` / `BodyCellRenderProps` (set in
|
|
360
|
+
* `transformHeaderCell` / `transformBodyCell`); the table aggregates actions
|
|
361
|
+
* from every enabled plugin into a single menu per header cell / row.
|
|
362
|
+
*/
|
|
363
|
+
export interface TableContextAction {
|
|
364
|
+
/** Stable identifier, unique within a single menu. */
|
|
365
|
+
id: string;
|
|
366
|
+
/** Visible label for the menu item. */
|
|
367
|
+
label: ReactNode;
|
|
368
|
+
/** Optional leading icon. */
|
|
369
|
+
icon?: ReactNode;
|
|
370
|
+
/** Invoked when the item is selected. */
|
|
371
|
+
onSelect: () => void;
|
|
372
|
+
/** When true, the item is rendered but not selectable. */
|
|
373
|
+
disabled?: boolean;
|
|
374
|
+
/**
|
|
375
|
+
* Group key used to cluster related actions and insert a divider between
|
|
376
|
+
* groups (e.g. 'sort', 'selection'). Actions without a group form a trailing
|
|
377
|
+
* group. Group order follows first-seen order across the aggregated list.
|
|
378
|
+
*/
|
|
379
|
+
group?: string;
|
|
380
|
+
/** When true, the item renders as checked (e.g. the active sort direction). */
|
|
381
|
+
checked?: boolean;
|
|
279
382
|
}
|
|
280
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Context-menu actions for a cell — either a static array, or a getter that
|
|
386
|
+
* returns the actions lazily. Prefer the getter for actions derived from state
|
|
387
|
+
* (e.g. the active sort direction): it's only invoked when the menu is opened,
|
|
388
|
+
* so the plugin doesn't build an action array (with closures) for every cell on
|
|
389
|
+
* every render.
|
|
390
|
+
*/
|
|
391
|
+
export type TableContextActions =
|
|
392
|
+
| TableContextAction[]
|
|
393
|
+
| (() => TableContextAction[]);
|
|
394
|
+
|
|
281
395
|
// =============================================================================
|
|
282
396
|
// Plugin Interface
|
|
283
397
|
// =============================================================================
|
|
@@ -294,7 +408,12 @@ export interface BodyCellRenderProps {
|
|
|
294
408
|
* 4. `transformHeaderCell` — transform each `<th>` props
|
|
295
409
|
* 5. `transformBodyRow` — transform each body `<tr>` props
|
|
296
410
|
* 6. `transformBodyCell` — transform each body `<td>` props
|
|
297
|
-
* 7. `
|
|
411
|
+
* 7. `transformScrollWrapper` — transform the scroll-container wrapper around the table
|
|
412
|
+
* 8. `transformTableContext` — wrap the table output in context providers
|
|
413
|
+
*
|
|
414
|
+
* Plugins may also contribute right-click menu actions by appending to
|
|
415
|
+
* `contextMenuActions` in `transformHeaderCell` / `transformBodyCell`
|
|
416
|
+
* (aggregated into one menu per header cell / row).
|
|
298
417
|
*/
|
|
299
418
|
export interface TablePlugin<
|
|
300
419
|
T extends Record<string, unknown> = Record<string, unknown>,
|
|
@@ -309,10 +428,17 @@ export interface TablePlugin<
|
|
|
309
428
|
transformTable?: (props: TableRenderProps) => TableRenderProps;
|
|
310
429
|
/** Transform the header `<tr>` props */
|
|
311
430
|
transformHeaderRow?: (props: HeaderRowRenderProps) => HeaderRowRenderProps;
|
|
312
|
-
/**
|
|
431
|
+
/**
|
|
432
|
+
* Transform each `<th>` props.
|
|
433
|
+
*
|
|
434
|
+
* `columnIndex` and the full `columns` list are provided for plugins that
|
|
435
|
+
* need to reason about column position (e.g. cumulative sticky offsets).
|
|
436
|
+
*/
|
|
313
437
|
transformHeaderCell?: (
|
|
314
438
|
props: HeaderCellRenderProps,
|
|
315
439
|
column: TableColumn<T>,
|
|
440
|
+
columnIndex: number,
|
|
441
|
+
columns: ReadonlyArray<TableColumn<T>>,
|
|
316
442
|
) => HeaderCellRenderProps;
|
|
317
443
|
/** Transform each body `<tr>` props */
|
|
318
444
|
transformBodyRow?: (
|
|
@@ -320,12 +446,28 @@ export interface TablePlugin<
|
|
|
320
446
|
item: T,
|
|
321
447
|
index: number,
|
|
322
448
|
) => BodyRowRenderProps;
|
|
323
|
-
/**
|
|
449
|
+
/**
|
|
450
|
+
* Transform each body `<td>` props.
|
|
451
|
+
*
|
|
452
|
+
* `columnIndex` and the full `columns` list are provided for plugins that
|
|
453
|
+
* need to reason about column position (e.g. cumulative sticky offsets).
|
|
454
|
+
*/
|
|
324
455
|
transformBodyCell?: (
|
|
325
456
|
props: BodyCellRenderProps,
|
|
326
457
|
column: TableColumn<T>,
|
|
327
458
|
item: T,
|
|
459
|
+
columnIndex: number,
|
|
460
|
+
columns: ReadonlyArray<TableColumn<T>>,
|
|
328
461
|
) => BodyCellRenderProps;
|
|
462
|
+
/**
|
|
463
|
+
* Transform the scroll-wrapper region — the `<div>` wrapping the `<table>`
|
|
464
|
+
* (see the `scrollWrapper` prop). Use to attach a `ref` to the scrollable
|
|
465
|
+
* element (scroll-aware shadows, virtualization) or to inject chrome
|
|
466
|
+
* before/after the table.
|
|
467
|
+
*/
|
|
468
|
+
transformScrollWrapper?: (
|
|
469
|
+
props: ScrollWrapperRenderProps,
|
|
470
|
+
) => ScrollWrapperRenderProps;
|
|
329
471
|
/** Wrap the table output in context providers */
|
|
330
472
|
transformTableContext?: (children: ReactNode) => ReactNode;
|
|
331
473
|
}
|
|
@@ -340,18 +482,36 @@ export interface TableRowComponentProps extends HTMLAttributes<HTMLTableRowEleme
|
|
|
340
482
|
ref?: Ref<HTMLTableRowElement>;
|
|
341
483
|
children: ReactNode;
|
|
342
484
|
xstyle?: StyleXStyles[];
|
|
485
|
+
/**
|
|
486
|
+
* Whether this row is the header row. Header rows skip the striped/hover
|
|
487
|
+
* row styling, which is only meant for body rows.
|
|
488
|
+
*/
|
|
489
|
+
isHeaderRow?: boolean;
|
|
343
490
|
}
|
|
344
491
|
|
|
345
492
|
/** Props for cell components used in the components prop */
|
|
346
493
|
export interface TableCellComponentProps extends TdHTMLAttributes<HTMLTableCellElement> {
|
|
347
494
|
children?: ReactNode;
|
|
348
495
|
xstyle?: StyleXStyles | StyleXStyles[];
|
|
496
|
+
/**
|
|
497
|
+
* Right-click actions to render as a context menu around the cell content.
|
|
498
|
+
* The cell owns the menu wrapper so it can control how it interacts with
|
|
499
|
+
* padding / content sizing. Empty/undefined renders no menu (native passes
|
|
500
|
+
* through).
|
|
501
|
+
*/
|
|
502
|
+
contextMenuActions?: TableContextActions;
|
|
349
503
|
}
|
|
350
504
|
|
|
351
505
|
/** Props for header cell components used in the components prop */
|
|
352
506
|
export interface TableHeaderCellComponentProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
353
507
|
children?: ReactNode;
|
|
354
508
|
xstyle?: StyleXStyles | StyleXStyles[];
|
|
509
|
+
/**
|
|
510
|
+
* Right-click actions to render as a context menu around the header content.
|
|
511
|
+
* The cell owns the menu wrapper so it can control how it interacts with
|
|
512
|
+
* padding / content sizing. Empty/undefined renders no menu.
|
|
513
|
+
*/
|
|
514
|
+
contextMenuActions?: TableContextActions;
|
|
355
515
|
}
|
|
356
516
|
|
|
357
517
|
// =============================================================================
|
|
@@ -390,8 +550,19 @@ export interface BaseTableProps<
|
|
|
390
550
|
* plugin `transformTableContext` layer. Used by `Table` to add a
|
|
391
551
|
* horizontal scroll container so plugin chrome (pagination, toolbars)
|
|
392
552
|
* stays outside the scrollable area.
|
|
553
|
+
*
|
|
554
|
+
* Receives `htmlProps` (including an optional `ref`) and `styles` produced
|
|
555
|
+
* by the plugin `transformScrollWrapper` pipeline, plus `beforeTable`/`afterTable`
|
|
556
|
+
* chrome. The wrapper must spread `htmlProps` (and apply `styles`) onto its
|
|
557
|
+
* scroll-container element so plugins can attach refs / scroll listeners.
|
|
393
558
|
*/
|
|
394
|
-
scrollWrapper?: ComponentType<{
|
|
559
|
+
scrollWrapper?: ComponentType<{
|
|
560
|
+
children: ReactNode;
|
|
561
|
+
htmlProps?: HTMLAttributes<HTMLDivElement> & {ref?: Ref<HTMLDivElement>};
|
|
562
|
+
styles?: StyleXStyles[];
|
|
563
|
+
beforeTable?: ReactNode;
|
|
564
|
+
afterTable?: ReactNode;
|
|
565
|
+
}>;
|
|
395
566
|
/**
|
|
396
567
|
* How default-rendered body cell text behaves when it exceeds column width.
|
|
397
568
|
*
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('../docs-types').ComponentDoc} */
|
|
4
|
+
|
|
5
|
+
export const docs = {
|
|
6
|
+
name: 'useTableColumnResize',
|
|
7
|
+
subComponentOf: 'Table',
|
|
8
|
+
displayName: 'useTableColumnResize',
|
|
9
|
+
description:
|
|
10
|
+
'Hook that returns a TablePlugin adding draggable resize handles to column header borders. Supports pointer + keyboard (WAI-ARIA window splitter) resizing, RTL, per-column min/max widths, and proportional-column preservation (resizes the neighbor so the table stays full-width). Commits widths on release.',
|
|
11
|
+
props: [
|
|
12
|
+
{
|
|
13
|
+
name: 'columnWidths',
|
|
14
|
+
type: 'Record<string, number>',
|
|
15
|
+
description:
|
|
16
|
+
'Controlled pixel-width overrides keyed by column key. When a key is present it overrides the column\'s declared width.',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'onColumnResizeEnd',
|
|
20
|
+
type: '(updates: Record<string, number>) => void',
|
|
21
|
+
description:
|
|
22
|
+
'Called when a resize completes (pointerup / Enter). Receives a map of every column key whose width changed; merge it into your columnWidths state.',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'minWidth',
|
|
26
|
+
type: 'number',
|
|
27
|
+
description:
|
|
28
|
+
'Global minimum column width in pixels during resize. Overrides per-column defaults when set.',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'maxWidth',
|
|
32
|
+
type: 'number',
|
|
33
|
+
description: 'Global maximum column width in pixels during resize.',
|
|
34
|
+
default: 'Infinity',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'columns',
|
|
38
|
+
type: 'TableColumn<T>[]',
|
|
39
|
+
description:
|
|
40
|
+
'Column definitions, needed to derive per-column min widths and detect proportional vs pixel columns for neighbor/last-column resize behavior.',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const docsZh = {
|
|
46
|
+
name: 'useTableColumnResize',
|
|
47
|
+
displayName: 'useTableColumnResize',
|
|
48
|
+
description:
|
|
49
|
+
'返回 TablePlugin 的 Hook,为列表头边框添加可拖动的调整手柄。支持指针 + 键盘(WAI-ARIA 窗口分隔符)调整、RTL、每列最小/最大宽度,以及比例列保留(调整相邻列以保持表格全宽)。在释放时提交宽度。',
|
|
50
|
+
props: [
|
|
51
|
+
{
|
|
52
|
+
name: 'columnWidths',
|
|
53
|
+
type: 'Record<string, number>',
|
|
54
|
+
description: '受控的像素宽度覆盖,按列键索引。存在某键时会覆盖该列声明的宽度。',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'onColumnResizeEnd',
|
|
58
|
+
type: '(updates: Record<string, number>) => void',
|
|
59
|
+
description:
|
|
60
|
+
'调整完成时(pointerup / Enter)调用。接收所有宽度发生变化的列键的映射——将其合并到你的 columnWidths 状态中。',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'minWidth',
|
|
64
|
+
type: 'number',
|
|
65
|
+
description: '调整期间的全局最小列宽(像素)。设置后覆盖每列默认值。',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'maxWidth',
|
|
69
|
+
type: 'number',
|
|
70
|
+
description: '调整期间的全局最大列宽(像素)。',
|
|
71
|
+
default: 'Infinity',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'columns',
|
|
75
|
+
type: 'TableColumn<T>[]',
|
|
76
|
+
description:
|
|
77
|
+
'列定义——用于推导每列最小宽度,并区分比例列与像素列以确定相邻列/末列的调整行为。',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const docsDense = {
|
|
83
|
+
name: 'useTableColumnResize',
|
|
84
|
+
displayName: 'useTableColumnResize',
|
|
85
|
+
description:
|
|
86
|
+
'Hook returning TablePlugin w/ draggable column resize handles. Pointer + keyboard (WAI-ARIA splitter), RTL, per-column min/max, proportional-preserving (resizes neighbor). Commits on release.',
|
|
87
|
+
propDescriptions: {
|
|
88
|
+
columnWidths: 'Controlled pixel-width overrides keyed by column key.',
|
|
89
|
+
onColumnResizeEnd:
|
|
90
|
+
'Called on resize end; receives map of all changed column widths to merge into state.',
|
|
91
|
+
minWidth: 'Global min column width (px) during resize.',
|
|
92
|
+
maxWidth: 'Global max column width (px) during resize. Default Infinity.',
|
|
93
|
+
columns:
|
|
94
|
+
'Column defs: derive per-column mins + proportional/pixel detection for neighbor/last-column behavior.',
|
|
95
|
+
},
|
|
96
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('../docs-types').ComponentDoc} */
|
|
4
|
+
|
|
5
|
+
export const docs = {
|
|
6
|
+
name: 'useTableStickyColumns',
|
|
7
|
+
subComponentOf: 'Table',
|
|
8
|
+
displayName: 'useTableStickyColumns',
|
|
9
|
+
description:
|
|
10
|
+
'Hook that returns a TablePlugin which pins a contiguous run of columns to the start and/or end edge of the table. Pinned columns get cumulative offsets and a soft, scroll-aware shadow over the scrolling content. An empty config ({}) is a valid no-op that pins nothing.',
|
|
11
|
+
props: [
|
|
12
|
+
{
|
|
13
|
+
name: 'startKeys',
|
|
14
|
+
type: 'string[]',
|
|
15
|
+
description:
|
|
16
|
+
'Column keys pinned to the start (inline-start / left in LTR) edge: the contiguous run from the first column through the last listed key.',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'endKeys',
|
|
20
|
+
type: 'string[]',
|
|
21
|
+
description:
|
|
22
|
+
'Column keys pinned to the end (inline-end / right in LTR) edge: the contiguous run from the first listed key through the last column.',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const docsZh = {
|
|
28
|
+
name: 'useTableStickyColumns',
|
|
29
|
+
displayName: 'useTableStickyColumns',
|
|
30
|
+
description:
|
|
31
|
+
'返回 TablePlugin 的 Hook,将一组连续的列固定到表格的起始和/或结束边缘。固定的列具有累积偏移量,并在滚动内容上方显示柔和的、随滚动感知的阴影。空配置 ({}) 是有效的空操作,不固定任何列。',
|
|
32
|
+
props: [
|
|
33
|
+
{
|
|
34
|
+
name: 'startKeys',
|
|
35
|
+
type: 'string[]',
|
|
36
|
+
description:
|
|
37
|
+
'固定到起始(inline-start / LTR 中为左侧)边缘的列键——从第一列到最后列出的键的连续范围。',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'endKeys',
|
|
41
|
+
type: 'string[]',
|
|
42
|
+
description:
|
|
43
|
+
'固定到结束(inline-end / LTR 中为右侧)边缘的列键——从第一个列出的键到最后一列的连续范围。',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const docsDense = {
|
|
49
|
+
name: 'useTableStickyColumns',
|
|
50
|
+
displayName: 'useTableStickyColumns',
|
|
51
|
+
description:
|
|
52
|
+
'Hook returning TablePlugin that pins contiguous column runs to start/end edges w/ cumulative offsets + scroll-aware shadow. Empty config = no-op.',
|
|
53
|
+
propDescriptions: {
|
|
54
|
+
startKeys:
|
|
55
|
+
'Column keys pinned to the start edge (contiguous run from column 0 through the last listed key).',
|
|
56
|
+
endKeys:
|
|
57
|
+
'Column keys pinned to the end edge (contiguous run from the first listed key through the last column).',
|
|
58
|
+
},
|
|
59
|
+
};
|
package/src/Text/Heading.doc.mjs
CHANGED
|
@@ -32,7 +32,7 @@ export const docs = {
|
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
name: 'color',
|
|
35
|
-
type: "'primary' | 'secondary' | 'disabled' | 'placeholder' | '
|
|
35
|
+
type: "'primary' | 'secondary' | 'disabled' | 'placeholder' | 'accent' | 'inherit'",
|
|
36
36
|
description: 'Text color.',
|
|
37
37
|
default: "'primary'",
|
|
38
38
|
},
|
|
@@ -64,6 +64,12 @@ export const docs = {
|
|
|
64
64
|
type: "'wrap' | 'nowrap' | 'balance' | 'pretty'",
|
|
65
65
|
description: 'Text wrapping behavior.',
|
|
66
66
|
},
|
|
67
|
+
{
|
|
68
|
+
name: 'justify',
|
|
69
|
+
type: "'start' | 'center' | 'end'",
|
|
70
|
+
description: 'Text alignment (justification). Uses logical values (start/end) for i18n/RTL compatibility.',
|
|
71
|
+
default: "'start'",
|
|
72
|
+
},
|
|
67
73
|
{
|
|
68
74
|
name: 'hasCapsize',
|
|
69
75
|
type: 'boolean',
|
|
@@ -113,7 +119,7 @@ export const docsZh = {
|
|
|
113
119
|
},
|
|
114
120
|
{
|
|
115
121
|
name: 'color',
|
|
116
|
-
type: "'primary' | 'secondary' | 'disabled' | 'placeholder' | '
|
|
122
|
+
type: "'primary' | 'secondary' | 'disabled' | 'placeholder' | 'accent' | 'inherit'",
|
|
117
123
|
description: '文本颜色。',
|
|
118
124
|
default: "'primary'",
|
|
119
125
|
},
|
|
@@ -145,6 +151,12 @@ export const docsZh = {
|
|
|
145
151
|
type: "'wrap' | 'nowrap' | 'balance' | 'pretty'",
|
|
146
152
|
description: '文本换行行为。',
|
|
147
153
|
},
|
|
154
|
+
{
|
|
155
|
+
name: 'justify',
|
|
156
|
+
type: "'start' | 'center' | 'end'",
|
|
157
|
+
description: '文本对齐(两端对齐)。使用逻辑值(start/end)以兼容 i18n/RTL。',
|
|
158
|
+
default: "'start'",
|
|
159
|
+
},
|
|
148
160
|
{
|
|
149
161
|
name: 'hasCapsize',
|
|
150
162
|
type: 'boolean',
|
|
@@ -180,6 +192,7 @@ export const docsDense = {
|
|
|
180
192
|
hasTruncateTooltip: "Tooltip for truncated text; true=default position, false=disabled, or a placement ('above' | 'below' | 'start' | 'end').",
|
|
181
193
|
wordBreak: "Word break behavior; defaults 'break-all' for single-line, 'break-word' otherwise.",
|
|
182
194
|
textWrap: 'Text wrapping behavior.',
|
|
195
|
+
justify: "Text alignment (justification); logical values 'start' | 'center' | 'end' for RTL.",
|
|
183
196
|
hasCapsize: 'Optical alignment via text-box-trim; forces block display.',
|
|
184
197
|
hasStrikethrough: 'Strikethrough text decoration.',
|
|
185
198
|
id: 'HTML id attribute.',
|
package/src/Text/Text.doc.mjs
CHANGED
|
@@ -40,7 +40,7 @@ export const docs = {
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
name: 'color',
|
|
43
|
-
type: "'primary' | 'secondary' | 'disabled' | 'placeholder' | '
|
|
43
|
+
type: "'primary' | 'secondary' | 'disabled' | 'placeholder' | 'accent' | 'inherit'",
|
|
44
44
|
description: "Text color. Defaults to 'secondary' for the 'supporting' type, 'primary' for all others.",
|
|
45
45
|
},
|
|
46
46
|
{
|
|
@@ -82,6 +82,12 @@ export const docs = {
|
|
|
82
82
|
type: "'wrap' | 'nowrap' | 'balance' | 'pretty'",
|
|
83
83
|
description: 'Text wrapping behavior.',
|
|
84
84
|
},
|
|
85
|
+
{
|
|
86
|
+
name: 'justify',
|
|
87
|
+
type: "'start' | 'center' | 'end'",
|
|
88
|
+
description: 'Text alignment (justification). Uses logical values (start/end) for i18n/RTL compatibility.',
|
|
89
|
+
default: "'start'",
|
|
90
|
+
},
|
|
85
91
|
{
|
|
86
92
|
name: 'hasCapsize',
|
|
87
93
|
type: 'boolean',
|
package/src/Text/text.stylex.ts
CHANGED
|
@@ -35,8 +35,8 @@ export const colorStyles = stylex.create({
|
|
|
35
35
|
placeholder: {
|
|
36
36
|
color: colorVars['--color-text-secondary'],
|
|
37
37
|
},
|
|
38
|
-
|
|
39
|
-
color: colorVars['--color-accent'],
|
|
38
|
+
accent: {
|
|
39
|
+
color: colorVars['--color-text-accent'],
|
|
40
40
|
},
|
|
41
41
|
inherit: {
|
|
42
42
|
color: 'inherit',
|
|
@@ -70,6 +70,12 @@ export const docs = {
|
|
|
70
70
|
description: 'Disables the textarea, preventing interaction.',
|
|
71
71
|
default: 'false',
|
|
72
72
|
},
|
|
73
|
+
{
|
|
74
|
+
name: 'disabledMessage',
|
|
75
|
+
type: 'string',
|
|
76
|
+
description:
|
|
77
|
+
'Explains why the textarea is disabled. With isDisabled, shows a tooltip on hover/keyboard focus and keeps the textarea focusable via aria-disabled (the field becomes read-only). Use this instead of wrapping a disabled TextArea in Tooltip — disabled controls swallow the hover events an external Tooltip needs.',
|
|
78
|
+
},
|
|
73
79
|
{
|
|
74
80
|
name: 'isLoading',
|
|
75
81
|
type: 'boolean',
|
|
@@ -174,6 +180,7 @@ export const docs = {
|
|
|
174
180
|
{ guidance: false, description: 'Avoid using TextArea for short, single-line values like names or emails; use TextInput instead.' },
|
|
175
181
|
{ guidance: false, description: 'Don\'t rely solely on placeholder text to communicate the purpose of the field; placeholders disappear on focus and are not accessible labels.' },
|
|
176
182
|
{ guidance: false, description: 'Don\'t show a status message without also setting the status type; the colored border and icon are what draw the user\'s attention to the message.' },
|
|
183
|
+
{ guidance: false, description: 'Don\'t wrap a disabled TextArea in Tooltip to explain why it\'s disabled; disabled controls swallow the hover events the wrapper needs. Use the disabledMessage prop instead.' },
|
|
177
184
|
],
|
|
178
185
|
},
|
|
179
186
|
};
|
|
@@ -239,6 +246,12 @@ export const docsZh = {
|
|
|
239
246
|
description: '禁用文本域,阻止交互。',
|
|
240
247
|
default: 'false',
|
|
241
248
|
},
|
|
249
|
+
{
|
|
250
|
+
name: 'disabledMessage',
|
|
251
|
+
type: 'string',
|
|
252
|
+
description:
|
|
253
|
+
'说明文本域被禁用的原因。与 isDisabled 一起使用时,在悬停/键盘聚焦时显示工具提示,并通过 aria-disabled 保持文本域可聚焦(字段变为只读)。请使用此属性,而不是用 Tooltip 包裹已禁用的 TextArea。',
|
|
254
|
+
},
|
|
242
255
|
{
|
|
243
256
|
name: 'isLoading',
|
|
244
257
|
type: 'boolean',
|
|
@@ -336,6 +349,7 @@ export const docsZh = {
|
|
|
336
349
|
{ guidance: false, description: 'Avoid using TextArea for short, single-line values like names or emails; use TextInput instead.' },
|
|
337
350
|
{ guidance: false, description: 'Don\'t rely solely on placeholder text to communicate the purpose of the field; placeholders disappear on focus and are not accessible labels.' },
|
|
338
351
|
{ guidance: false, description: 'Don\'t show a status message without also setting the status type; the colored border and icon are what draw the user\'s attention to the message.' },
|
|
352
|
+
{ guidance: false, description: 'Don\'t wrap a disabled TextArea in Tooltip to explain why it\'s disabled; disabled controls swallow the hover events the wrapper needs. Use the disabledMessage prop instead.' },
|
|
339
353
|
],
|
|
340
354
|
},
|
|
341
355
|
};
|
|
@@ -354,6 +368,7 @@ export const docsDense = {
|
|
|
354
368
|
{ guidance: false, description: 'Avoid TextArea for single-line values; use TextInput.' },
|
|
355
369
|
{ guidance: false, description: 'Don\'t use placeholder as only label; disappears on focus, not accessible.' },
|
|
356
370
|
{ guidance: false, description: 'Don\'t show status message without status type; border and icon draw attention.' },
|
|
371
|
+
{ guidance: false, description: 'Don\'t wrap a disabled TextArea in Tooltip to explain the disabled state; use the disabledMessage prop instead.' },
|
|
357
372
|
],
|
|
358
373
|
},
|
|
359
374
|
propDescriptions: {
|
|
@@ -367,6 +382,8 @@ export const docsDense = {
|
|
|
367
382
|
isOptional: 'Shows "Optional" indicator. Mutually exclusive w/ isRequired.',
|
|
368
383
|
isRequired: 'Shows "Required" indicator+sets aria-required. Mutually exclusive w/ isOptional.',
|
|
369
384
|
isDisabled: 'Disables textarea, prevents interaction.',
|
|
385
|
+
disabledMessage:
|
|
386
|
+
'Explains why textarea is disabled. With isDisabled, shows tooltip on hover/focus + keeps textarea focusable via aria-disabled (field becomes read-only). Use instead of wrapping a disabled TextArea in Tooltip.',
|
|
370
387
|
isLoading: 'Loading state w/ spinner inside input.',
|
|
371
388
|
placeholder: 'Placeholder when textarea empty.',
|
|
372
389
|
rows: 'Visible text rows.',
|