@astryxdesign/core 0.4.5 → 0.4.6-canary.cea9ecd
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 +134 -0
- package/dist/Avatar/Avatar.d.ts +10 -5
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +139 -30
- package/dist/Avatar/AvatarStatusDot.d.ts +2 -1
- package/dist/Avatar/AvatarStatusDot.d.ts.map +1 -1
- package/dist/Avatar/AvatarStatusDot.js +30 -4
- package/dist/Avatar/AvatarStatusLabelContext.d.ts +39 -0
- package/dist/Avatar/AvatarStatusLabelContext.d.ts.map +1 -0
- package/dist/Avatar/AvatarStatusLabelContext.js +41 -0
- package/dist/AvatarGroup/AvatarGroup.d.ts +3 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +15 -9
- package/dist/Blockquote/Blockquote.d.ts +4 -3
- package/dist/Blockquote/Blockquote.d.ts.map +1 -1
- package/dist/Blockquote/Blockquote.js +9 -10
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +21 -5
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +47 -34
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +7 -7
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +21 -12
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarNavigation.js +8 -4
- package/dist/Calendar/styles.d.ts +2 -2
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +5 -5
- package/dist/Center/Center.d.ts +23 -1
- package/dist/Center/Center.d.ts.map +1 -1
- package/dist/Center/Center.js +12 -6
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +3 -3
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +2 -2
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +2 -2
- package/dist/Chat/useChatDictation.d.ts +1 -1
- package/dist/Chat/useChatDictation.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.d.ts +1 -1
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +4 -3
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +2 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +2 -2
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +5 -5
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +4 -4
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +1 -1
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +2 -2
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +3 -3
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +6 -6
- package/dist/DateInput/DateInput.d.ts +31 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +90 -22
- package/dist/DateInput/MonthScroller.d.ts +35 -0
- package/dist/DateInput/MonthScroller.d.ts.map +1 -0
- package/dist/DateInput/MonthScroller.js +658 -0
- package/dist/DateInput/MonthYearWheels.d.ts +24 -0
- package/dist/DateInput/MonthYearWheels.d.ts.map +1 -0
- package/dist/DateInput/MonthYearWheels.js +114 -0
- package/dist/DateInput/TouchDateField.d.ts +10 -0
- package/dist/DateInput/TouchDateField.d.ts.map +1 -0
- package/dist/DateInput/TouchDateField.js +810 -0
- package/dist/DateInput/Wheel.d.ts +41 -0
- package/dist/DateInput/Wheel.d.ts.map +1 -0
- package/dist/DateInput/Wheel.js +315 -0
- package/dist/DateInput/monthGeometry.d.ts +65 -0
- package/dist/DateInput/monthGeometry.d.ts.map +1 -0
- package/dist/DateInput/monthGeometry.js +98 -0
- package/dist/DateInput/tokens.stylex.d.ts +63 -0
- package/dist/DateInput/tokens.stylex.d.ts.map +1 -0
- package/dist/DateInput/tokens.stylex.js +74 -0
- package/dist/DateInput/useOwnScrollGesture.d.ts +41 -0
- package/dist/DateInput/useOwnScrollGesture.d.ts.map +1 -0
- package/dist/DateInput/useOwnScrollGesture.js +202 -0
- package/dist/DateInput/usePointerDragScroll.d.ts +15 -0
- package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -0
- package/dist/DateInput/usePointerDragScroll.js +216 -0
- package/dist/DateInput/useScrollSettle.d.ts +26 -0
- package/dist/DateInput/useScrollSettle.d.ts.map +1 -0
- package/dist/DateInput/useScrollSettle.js +149 -0
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +17 -14
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +17 -14
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +3 -3
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +2 -2
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +2 -2
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +2 -2
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +2 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +4 -4
- package/dist/Field/InputClearButton.d.ts.map +1 -1
- package/dist/Field/InputClearButton.js +6 -0
- package/dist/Field/inputStyles.stylex.d.ts +1 -1
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +5 -5
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +6 -6
- package/dist/HoverCard/HoverCard.d.ts +13 -3
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +2 -0
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.d.ts +17 -2
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +78 -9
- package/dist/InputGroup/InputGroup.js +1 -1
- package/dist/Item/Item.d.ts +9 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +52 -14
- package/dist/Layer/index.d.ts +4 -2
- package/dist/Layer/index.d.ts.map +1 -1
- package/dist/Layer/index.js +2 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +3 -2
- package/dist/Layer/useTouchTrigger.d.ts +113 -0
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -0
- package/dist/Layer/useTouchTrigger.js +241 -0
- package/dist/Layout/container.stylex.d.ts +4 -2
- package/dist/Layout/container.stylex.d.ts.map +1 -1
- package/dist/Layout/container.stylex.js +19 -11
- package/dist/Layout/index.d.ts +1 -0
- package/dist/Layout/index.d.ts.map +1 -1
- package/dist/Layout/index.js +4 -0
- package/dist/Layout/padding.stylex.d.ts +315 -12
- package/dist/Layout/padding.stylex.d.ts.map +1 -1
- package/dist/Layout/padding.stylex.js +389 -12
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +5 -4
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +6 -6
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +1 -1
- package/dist/MobileNav/MobileNav.d.ts +1 -0
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +24 -6
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +8 -8
- package/dist/NavItem/navItemStyles.stylex.d.ts +4 -4
- package/dist/NavItem/navItemStyles.stylex.d.ts.map +1 -1
- package/dist/NavItem/navItemStyles.stylex.js +4 -4
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +3 -3
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +36 -8
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +3 -3
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +2 -2
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +11 -12
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +3 -1
- package/dist/PowerSearch/formatFilterValue.d.ts +11 -2
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +23 -8
- package/dist/RadioList/RadioListItem.d.ts +2 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +70 -40
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +7 -7
- package/dist/Section/Section.d.ts +36 -1
- package/dist/Section/Section.d.ts.map +1 -1
- package/dist/Section/Section.js +12 -2
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +7 -2
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +3 -3
- package/dist/Selector/Selector.d.ts +26 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +93 -20
- package/dist/Selector/SelectorOption.d.ts +14 -1
- package/dist/Selector/SelectorOption.d.ts.map +1 -1
- package/dist/Selector/SelectorOption.js +6 -0
- package/dist/Selector/SelectorRowLayoutContext.d.ts +8 -0
- package/dist/Selector/SelectorRowLayoutContext.d.ts.map +1 -0
- package/dist/Selector/SelectorRowLayoutContext.js +27 -0
- package/dist/Selector/types.d.ts +1 -0
- package/dist/Selector/types.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +4 -4
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +3 -3
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +7 -7
- package/dist/Stack/Stack.d.ts +23 -1
- package/dist/Stack/Stack.d.ts.map +1 -1
- package/dist/Stack/Stack.js +12 -6
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +2 -2
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +1 -1
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +3 -3
- package/dist/Table/TableRow.js +4 -4
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +2 -2
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +2 -2
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +2 -2
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts +5 -3
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.js +12 -9
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +3 -3
- package/dist/TextArea/TextArea.js +1 -1
- package/dist/TextInput/TextInput.js +1 -1
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +3 -3
- package/dist/TimeInput/TimeInput.js +2 -2
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +6 -4
- package/dist/Timestamp/formatInstant.d.ts +3 -2
- package/dist/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +8 -8
- package/dist/Timestamp/tooltipEntries.d.ts +2 -1
- package/dist/Timestamp/tooltipEntries.d.ts.map +1 -1
- package/dist/Timestamp/tooltipEntries.js +5 -3
- package/dist/Toast/Toast.d.ts +4 -3
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +10 -7
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +6 -6
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +1 -1
- package/dist/Tooltip/Tooltip.d.ts +16 -3
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +2 -0
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.d.ts +21 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +71 -13
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +4 -4
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +3 -3
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +2 -2
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +2 -2
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +4 -4
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +7 -7
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +2 -2
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +1 -1
- package/dist/astryx.css +124 -62
- package/dist/hooks/containerReveal.stylex.d.ts.map +1 -1
- package/dist/hooks/containerReveal.stylex.js +18 -18
- package/dist/hooks/scrollbarGutter.d.ts +28 -0
- package/dist/hooks/scrollbarGutter.d.ts.map +1 -0
- package/dist/hooks/scrollbarGutter.js +103 -0
- package/dist/hooks/useAutoMediaMode.d.ts +31 -0
- package/dist/hooks/useAutoMediaMode.d.ts.map +1 -0
- package/dist/hooks/useAutoMediaMode.js +201 -0
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +1 -1
- package/dist/hooks/useListFocus.d.ts +5 -2
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +12 -6
- package/dist/hooks/useScrollLock.d.ts +4 -0
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +13 -1
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +2 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +6 -0
- package/dist/i18n/useCollator.d.ts +12 -0
- package/dist/i18n/useCollator.d.ts.map +1 -0
- package/dist/i18n/useCollator.js +40 -0
- package/dist/i18n/useLocale.d.ts +3 -0
- package/dist/i18n/useLocale.d.ts.map +1 -0
- package/dist/i18n/useLocale.js +31 -0
- package/dist/theme/MediaTheme.d.ts +25 -5
- package/dist/theme/MediaTheme.d.ts.map +1 -1
- package/dist/theme/MediaTheme.js +31 -6
- package/dist/theme/defineTheme.d.ts +5 -0
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +5 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +7 -0
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +66 -5
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/syntax/index.d.ts +6 -0
- package/dist/theme/syntax/index.d.ts.map +1 -1
- package/dist/theme/syntax/index.js +7 -2
- package/dist/utils/dateParser.d.ts +4 -3
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +8 -8
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/plainDate.d.ts +5 -2
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +20 -4
- package/locales/en.json +28 -0
- package/locales/pseudo.json +21 -0
- package/package.json +3 -3
- package/src/Avatar/Avatar.doc.mjs +10 -6
- package/src/Avatar/Avatar.test.tsx +219 -1
- package/src/Avatar/Avatar.tsx +179 -37
- package/src/Avatar/AvatarStatusDot.tsx +30 -4
- package/src/Avatar/AvatarStatusLabelContext.ts +47 -0
- package/src/AvatarGroup/AvatarGroup.doc.mjs +10 -6
- package/src/AvatarGroup/AvatarGroup.test.tsx +62 -0
- package/src/AvatarGroup/AvatarGroup.tsx +3 -1
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +31 -8
- package/src/Banner/Banner.doc.mjs +2 -0
- package/src/Blockquote/Blockquote.doc.mjs +30 -7
- package/src/Blockquote/Blockquote.test.tsx +34 -3
- package/src/Blockquote/Blockquote.tsx +11 -9
- package/src/BottomSheet/BottomSheet.doc.mjs +3 -3
- package/src/BottomSheet/BottomSheet.test.tsx +24 -0
- package/src/BottomSheet/BottomSheetPanel.test.tsx +91 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +58 -3
- package/src/Breadcrumbs/BreadcrumbItem.tsx +36 -23
- package/src/Breadcrumbs/Breadcrumbs.doc.mjs +26 -2
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +31 -0
- package/src/Button/Button.tsx +12 -9
- package/src/Calendar/Calendar.tsx +15 -9
- package/src/Calendar/hooks/useCalendarNavigation.ts +6 -4
- package/src/Calendar/styles.ts +8 -5
- package/src/Center/Center.doc.mjs +48 -0
- package/src/Center/Center.test.tsx +158 -0
- package/src/Center/Center.tsx +50 -9
- package/src/Chat/ChatComposer.tsx +11 -5
- package/src/Chat/ChatComposerDrawer.tsx +4 -1
- package/src/Chat/ChatToolCalls.tsx +13 -4
- package/src/Chat/{useChatDictation.test.ts → useChatDictation.test.tsx} +29 -14
- package/src/Chat/useChatDictation.ts +1 -1
- package/src/Chat/useSpeechRecognition.ts +5 -3
- package/src/Chat/useTriggerMenu.tsx +4 -1
- package/src/CheckboxInput/CheckboxInput.tsx +5 -2
- package/src/Citation/Citation.test.tsx +6 -1
- package/src/Citation/Citation.tsx +11 -5
- package/src/ClickableCard/ClickableCard.tsx +7 -4
- package/src/CodeBlock/CodeBlock.tsx +4 -1
- package/src/Collapsible/Collapsible.tsx +5 -2
- package/src/CommandPalette/CommandPaletteItem.tsx +6 -3
- package/src/ComplexSelector/ComplexSelector.doc.mjs +10 -0
- package/src/ComplexSelector/ComplexSelector.tsx +14 -7
- package/src/DateInput/DateInput.test.tsx +17 -1
- package/src/DateInput/DateInput.tsx +93 -21
- package/src/DateInput/DateInputTouch.test.tsx +2582 -0
- package/src/DateInput/MonthScroller.tsx +878 -0
- package/src/DateInput/MonthYearWheels.tsx +147 -0
- package/src/DateInput/TouchDateField.tsx +1223 -0
- package/src/DateInput/Wheel.tsx +473 -0
- package/src/DateInput/monthGeometry.ts +118 -0
- package/src/DateInput/tokens.stylex.ts +99 -0
- package/src/DateInput/useOwnScrollGesture.ts +227 -0
- package/src/DateInput/usePointerDragScroll.ts +220 -0
- package/src/DateInput/useScrollSettle.ts +164 -0
- package/src/DateRangeInput/DateRangeInput.doc.mjs +1 -1
- package/src/DateRangeInput/DateRangeInput.tsx +31 -13
- package/src/DateTimeInput/DateTimeInput.tsx +25 -9
- package/src/Dialog/Dialog.test.tsx +24 -0
- package/src/Dialog/Dialog.tsx +3 -0
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +5 -2
- package/src/DropdownMenu/DropdownMenuItem.tsx +5 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +5 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +5 -2
- package/src/Field/Field.doc.mjs +2 -0
- package/src/Field/FieldLabel.tsx +9 -3
- package/src/Field/InputClearButton.test.tsx +110 -3
- package/src/Field/InputClearButton.tsx +38 -0
- package/src/Field/inputStyles.stylex.ts +17 -13
- package/src/FileInput/FileInput.tsx +15 -8
- package/src/FormLayout/FormLayout.doc.mjs +1 -1
- package/src/HoverCard/HoverCard.doc.mjs +18 -0
- package/src/HoverCard/HoverCard.test.tsx +189 -0
- package/src/HoverCard/HoverCard.tsx +22 -2
- package/src/HoverCard/index.ts +1 -0
- package/src/HoverCard/useHoverCard.doc.mjs +2 -0
- package/src/HoverCard/useHoverCard.tsx +103 -7
- package/src/InputGroup/InputGroup.tsx +1 -1
- package/src/Item/Item.doc.mjs +1 -0
- package/src/Item/Item.test.tsx +50 -0
- package/src/Item/Item.tsx +54 -6
- package/src/Layer/index.ts +10 -0
- package/src/Layer/useLayer.tsx +13 -2
- package/src/Layer/useTouchTrigger.test.ts +70 -0
- package/src/Layer/useTouchTrigger.ts +366 -0
- package/src/Layout/Layout.doc.mjs +18 -0
- package/src/Layout/container.stylex.ts +11 -3
- package/src/Layout/index.ts +4 -0
- package/src/Layout/overlayPaddingReset.test.tsx +222 -0
- package/src/Layout/padding.stylex.ts +192 -12
- package/src/Lightbox/Lightbox.tsx +11 -3
- package/src/Link/Link.tsx +9 -6
- package/src/MetadataList/MetadataList.tsx +4 -1
- package/src/MobileNav/MobileNav.tsx +61 -5
- package/src/MobileNav/MobileNavEntryAnimation.test.tsx +212 -0
- package/src/MobileNav/MobileNavScrollbarGutter.test.tsx +109 -0
- package/src/MultiSelector/MultiSelector.test.tsx +1 -1
- package/src/MultiSelector/MultiSelector.tsx +26 -10
- package/src/NavItem/navItemStyles.stylex.ts +7 -4
- package/src/NavMenu/NavHeadingMenuItem.tsx +6 -3
- package/src/NumberInput/NumberInput.doc.mjs +24 -0
- package/src/NumberInput/NumberInput.test.tsx +138 -0
- package/src/NumberInput/NumberInput.tsx +47 -8
- package/src/Outline/Outline.tsx +5 -2
- package/src/Pagination/Pagination.tsx +5 -2
- package/src/Popover/Popover.test.tsx +27 -1
- package/src/PowerSearch/PowerSearch.tsx +17 -8
- package/src/PowerSearch/PowerSearchToken.tsx +3 -0
- package/src/PowerSearch/formatFilterValue.test.ts +22 -2
- package/src/PowerSearch/formatFilterValue.ts +31 -6
- package/src/RadioList/RadioList.doc.mjs +1 -1
- package/src/RadioList/RadioList.test.tsx +170 -2
- package/src/RadioList/RadioListItem.tsx +88 -53
- package/src/Resizable/ResizeHandle.test.tsx +22 -0
- package/src/Resizable/ResizeHandle.tsx +25 -7
- package/src/Section/Section.doc.mjs +55 -0
- package/src/Section/Section.test.tsx +201 -4
- package/src/Section/Section.tsx +69 -0
- package/src/SegmentedControl/SegmentedControl.test.tsx +31 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +15 -3
- package/src/SelectableCard/SelectableCard.tsx +6 -3
- package/src/Selector/Selector.doc.mjs +16 -2
- package/src/Selector/Selector.test.tsx +525 -1
- package/src/Selector/Selector.tsx +180 -25
- package/src/Selector/SelectorOption.doc.mjs +7 -0
- package/src/Selector/SelectorOption.tsx +21 -0
- package/src/Selector/SelectorRowLayoutContext.ts +32 -0
- package/src/Selector/types.ts +4 -4
- package/src/SideNav/SideNavHeading.tsx +14 -5
- package/src/SideNav/SideNavItem.tsx +9 -3
- package/src/Slider/Slider.tsx +25 -6
- package/src/Stack/Stack.doc.mjs +72 -0
- package/src/Stack/Stack.test.tsx +156 -0
- package/src/Stack/Stack.tsx +50 -8
- package/src/Switch/Switch.tsx +5 -2
- package/src/TabList/Tab.tsx +4 -1
- package/src/TabList/TabMenu.tsx +9 -3
- package/src/Table/TableRow.tsx +4 -4
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +6 -2
- package/src/Table/plugins/filtering/useTableFiltering.tsx +4 -1
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +10 -3
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +6 -3
- package/src/Table/plugins/sortable/useTableSortable.tsx +4 -1
- package/src/Table/plugins/sortable/useTableSortableState.test.tsx +34 -0
- package/src/Table/plugins/sortable/useTableSortableState.tsx +26 -23
- package/src/Table/plugins/tree/useTableTreeData.tsx +10 -4
- package/src/TextArea/TextArea.doc.mjs +1 -1
- package/src/TextArea/TextArea.tsx +1 -1
- package/src/TextInput/TextInput.tsx +1 -1
- package/src/Thumbnail/Thumbnail.tsx +9 -3
- package/src/TimeInput/TimeInput.tsx +1 -1
- package/src/Timestamp/Timestamp.test.tsx +27 -7
- package/src/Timestamp/Timestamp.tsx +8 -4
- package/src/Timestamp/formatInstant.ts +9 -7
- package/src/Timestamp/tooltipEntries.test.ts +11 -6
- package/src/Timestamp/tooltipEntries.ts +6 -2
- package/src/Toast/Toast.tsx +9 -7
- package/src/Token/Token.tsx +14 -5
- package/src/Tokenizer/Tokenizer.tsx +4 -1
- package/src/Tooltip/Tooltip.doc.mjs +18 -0
- package/src/Tooltip/Tooltip.test.tsx +254 -1
- package/src/Tooltip/Tooltip.tsx +22 -2
- package/src/Tooltip/index.ts +1 -0
- package/src/Tooltip/useTooltip.doc.mjs +2 -0
- package/src/Tooltip/useTooltip.tsx +99 -21
- package/src/TopNav/TopNavHeading.tsx +13 -4
- package/src/TopNav/TopNavItem.tsx +6 -3
- package/src/TopNav/TopNavMegaMenu.tsx +5 -2
- package/src/TopNav/TopNavMegaMenuItem.tsx +5 -2
- package/src/TopNav/TopNavMenu.tsx +10 -4
- package/src/TreeList/TreeListItem.tsx +22 -7
- package/src/Typeahead/BaseTypeahead.tsx +5 -2
- package/src/Typeahead/Typeahead.tsx +4 -1
- package/src/hooks/containerReveal.stylex.ts +54 -18
- package/src/hooks/scrollbarGutter.test.ts +167 -0
- package/src/hooks/scrollbarGutter.ts +121 -0
- package/src/hooks/useAutoMediaMode.test.ts +109 -0
- package/src/hooks/useAutoMediaMode.ts +233 -0
- package/src/hooks/useInputStatusIcon.tsx +4 -1
- package/src/hooks/useListFocus.doc.mjs +2 -2
- package/src/hooks/useListFocus.test.tsx +65 -3
- package/src/hooks/useListFocus.ts +15 -7
- package/src/hooks/useScrollLock.doc.mjs +4 -4
- package/src/hooks/useScrollLock.test.ts +73 -0
- package/src/hooks/useScrollLock.ts +14 -0
- package/src/i18n/InternationalizationContext.ts +2 -0
- package/src/i18n/__tests__/e2e-powersearch.test.tsx +37 -1
- package/src/i18n/__tests__/useCollator.test.tsx +115 -0
- package/src/i18n/__tests__/useLocale.test.tsx +52 -0
- package/src/i18n/index.ts +6 -0
- package/src/i18n/useCollator.doc.mjs +84 -0
- package/src/i18n/useCollator.ts +44 -0
- package/src/i18n/useLocale.doc.mjs +70 -0
- package/src/i18n/useLocale.ts +34 -0
- package/src/i18n/useTranslator.doc.mjs +1 -1
- package/src/reset.css +9 -2
- package/src/reset.test.ts +22 -0
- package/src/theme/MediaTheme.doc.mjs +23 -4
- package/src/theme/MediaTheme.dom.test.tsx +97 -0
- package/src/theme/MediaTheme.tsx +42 -7
- package/src/theme/defineTheme.test.ts +9 -3
- package/src/theme/defineTheme.ts +5 -0
- package/src/theme/derivedVarRegistry.test.ts +19 -5
- package/src/theme/derivedVarRegistry.ts +4 -0
- package/src/theme/generateThemeRules.test.ts +118 -0
- package/src/theme/generateThemeRules.ts +83 -5
- package/src/theme/index.ts +1 -1
- package/src/theme/syntax/index.ts +6 -2
- package/src/theme/syntax/serverSafeSyntax.test.ts +68 -0
- package/src/utils/dateParser.test.ts +20 -0
- package/src/utils/dateParser.ts +14 -7
- package/src/utils/index.ts +2 -0
- package/src/utils/plainDate.test.ts +6 -0
- package/src/utils/plainDate.ts +21 -4
|
@@ -39,12 +39,13 @@ import {
|
|
|
39
39
|
typeScaleVars,
|
|
40
40
|
radiusVars,
|
|
41
41
|
} from '../theme/tokens.stylex';
|
|
42
|
-
import {BreadcrumbContext} from './Breadcrumbs';
|
|
42
|
+
import {BreadcrumbContext, type BreadcrumbsVariant} from './Breadcrumbs';
|
|
43
43
|
import {useLinkComponent} from '../Link/useLinkComponent';
|
|
44
44
|
import type {LinkComponentType} from '../Link/types';
|
|
45
45
|
import {mergeProps, mergeRefs} from '../utils';
|
|
46
46
|
import type {BaseProps} from '../BaseProps';
|
|
47
47
|
import {themeProps} from '../utils/themeProps';
|
|
48
|
+
import {focusOutlineProps} from '../utils/focusOutline.stylex';
|
|
48
49
|
import {Icon} from '../Icon';
|
|
49
50
|
import {usePopover} from '../Popover/usePopover';
|
|
50
51
|
import {useListFocus} from '../hooks/useListFocus';
|
|
@@ -158,17 +159,23 @@ const itemStyles = stylex.create({
|
|
|
158
159
|
paddingBlock: spacingVars['--spacing-1'],
|
|
159
160
|
textDecoration: {
|
|
160
161
|
default: 'none',
|
|
161
|
-
':hover': {
|
|
162
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))': {
|
|
162
163
|
'@media (hover: hover)': 'underline',
|
|
163
164
|
},
|
|
164
165
|
},
|
|
165
|
-
cursor:
|
|
166
|
+
cursor: {
|
|
167
|
+
default: 'pointer',
|
|
168
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
169
|
+
},
|
|
166
170
|
},
|
|
167
|
-
// Reset native button styles so onClick-only items match link appearance
|
|
171
|
+
// Reset native button styles so onClick-only items match link appearance.
|
|
172
|
+
// paddingInline rather than padding: a blanket `padding` also overrides the
|
|
173
|
+
// paddingBlock `link` sets above, which shrank the button crumbs to 20px
|
|
174
|
+
// against their sibling links' 28px.
|
|
168
175
|
buttonReset: {
|
|
169
176
|
background: 'none',
|
|
170
177
|
border: 'none',
|
|
171
|
-
|
|
178
|
+
paddingInline: 0,
|
|
172
179
|
margin: 0,
|
|
173
180
|
font: 'inherit',
|
|
174
181
|
},
|
|
@@ -351,7 +358,7 @@ export function BreadcrumbItem({
|
|
|
351
358
|
<li
|
|
352
359
|
ref={mergeRefs(ref, liRef)}
|
|
353
360
|
{...mergeProps(
|
|
354
|
-
themeProps('breadcrumb-item'),
|
|
361
|
+
themeProps('breadcrumb-item', {variant: ctx.variant}),
|
|
355
362
|
stylex.props(
|
|
356
363
|
itemStyles.root,
|
|
357
364
|
isSupporting ? itemStyles.supportingSize : itemStyles.defaultSize,
|
|
@@ -372,7 +379,7 @@ export function BreadcrumbItem({
|
|
|
372
379
|
ref={contentRef}
|
|
373
380
|
menu={menu}
|
|
374
381
|
menuSize={resolvedMenuSize}
|
|
375
|
-
|
|
382
|
+
variant={ctx.variant}
|
|
376
383
|
isCurrent
|
|
377
384
|
label={children}>
|
|
378
385
|
{content}
|
|
@@ -400,7 +407,7 @@ export function BreadcrumbItem({
|
|
|
400
407
|
<li
|
|
401
408
|
ref={mergeRefs(ref, liRef)}
|
|
402
409
|
{...mergeProps(
|
|
403
|
-
themeProps('breadcrumb-item'),
|
|
410
|
+
themeProps('breadcrumb-item', {variant: ctx.variant}),
|
|
404
411
|
stylex.props(
|
|
405
412
|
itemStyles.root,
|
|
406
413
|
isSupporting ? itemStyles.supportingSize : itemStyles.defaultSize,
|
|
@@ -419,7 +426,7 @@ export function BreadcrumbItem({
|
|
|
419
426
|
ref={contentRef}
|
|
420
427
|
menu={menu}
|
|
421
428
|
menuSize={resolvedMenuSize}
|
|
422
|
-
|
|
429
|
+
variant={ctx.variant}
|
|
423
430
|
label={children}>
|
|
424
431
|
{content}
|
|
425
432
|
</BreadcrumbMenuTrigger>
|
|
@@ -428,7 +435,7 @@ export function BreadcrumbItem({
|
|
|
428
435
|
ref={contentRef}
|
|
429
436
|
href={href}
|
|
430
437
|
onClick={onClick}
|
|
431
|
-
{...
|
|
438
|
+
{...focusOutlineProps.focusVisible(
|
|
432
439
|
itemStyles.link,
|
|
433
440
|
isSupporting ? itemStyles.supportingLink : itemStyles.defaultLink,
|
|
434
441
|
)}>
|
|
@@ -439,7 +446,7 @@ export function BreadcrumbItem({
|
|
|
439
446
|
ref={contentRef as React.RefObject<HTMLButtonElement | null>}
|
|
440
447
|
type="button"
|
|
441
448
|
onClick={onClick}
|
|
442
|
-
{...
|
|
449
|
+
{...focusOutlineProps.focusVisible(
|
|
443
450
|
itemStyles.link,
|
|
444
451
|
itemStyles.buttonReset,
|
|
445
452
|
isSupporting ? itemStyles.supportingLink : itemStyles.defaultLink,
|
|
@@ -477,7 +484,7 @@ interface BreadcrumbMenuTriggerProps {
|
|
|
477
484
|
label: ReactNode;
|
|
478
485
|
menu: DropdownMenuOption[] | ReactNode;
|
|
479
486
|
menuSize: DropdownMenuSize;
|
|
480
|
-
|
|
487
|
+
variant: BreadcrumbsVariant;
|
|
481
488
|
isCurrent?: boolean;
|
|
482
489
|
}
|
|
483
490
|
|
|
@@ -494,11 +501,12 @@ function BreadcrumbMenuTrigger({
|
|
|
494
501
|
label,
|
|
495
502
|
menu,
|
|
496
503
|
menuSize,
|
|
497
|
-
|
|
504
|
+
variant,
|
|
498
505
|
isCurrent = false,
|
|
499
506
|
}: BreadcrumbMenuTriggerProps) {
|
|
500
507
|
const menuId = useId();
|
|
501
508
|
const buttonRef = useRef<HTMLButtonElement>(null);
|
|
509
|
+
const isSupporting = variant === 'supporting';
|
|
502
510
|
|
|
503
511
|
const popover = usePopover({
|
|
504
512
|
onHide: useCallback(() => {
|
|
@@ -615,16 +623,21 @@ function BreadcrumbMenuTrigger({
|
|
|
615
623
|
type="button"
|
|
616
624
|
onClick={handleClick}
|
|
617
625
|
onKeyDown={handleKeyDown}
|
|
618
|
-
{...
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
626
|
+
{...popover.triggerProps}
|
|
627
|
+
aria-haspopup="menu"
|
|
628
|
+
aria-controls={menuId}
|
|
629
|
+
aria-current={isCurrent ? 'page' : undefined}
|
|
630
|
+
{...mergeProps(
|
|
631
|
+
themeProps('breadcrumb-item-menu-trigger', {variant}),
|
|
632
|
+
// Through mergeProps, not a second spread: a sibling stylex.props()
|
|
633
|
+
// spread replaces the className themeProps() built, which is how the
|
|
634
|
+
// documented breadcrumb-item-menu-trigger target came to render on
|
|
635
|
+
// nothing.
|
|
636
|
+
focusOutlineProps.focusVisible(
|
|
637
|
+
itemStyles.link,
|
|
638
|
+
itemStyles.buttonReset,
|
|
639
|
+
isSupporting ? itemStyles.supportingLink : itemStyles.defaultLink,
|
|
640
|
+
),
|
|
628
641
|
)}>
|
|
629
642
|
{children}
|
|
630
643
|
<Icon
|
|
@@ -16,9 +16,12 @@ export const docs = {
|
|
|
16
16
|
{guidance: true, description: 'Keep labels short and match the page titles they link to: "Settings" not "Application Settings Page".'},
|
|
17
17
|
{guidance: true, description: 'Use the supporting variant in dense UIs like admin panels or sidebars where the breadcrumb should be subtle.'},
|
|
18
18
|
{guidance: true, description: 'Make the last item plain text, not a link; it represents the current page. The component does this automatically when you set isCurrent.'},
|
|
19
|
+
{guidance: true, description: 'The component implements the WAI-ARIA APG Breadcrumb pattern: a labelled nav landmark wrapping an ordered list, with aria-current="page" on the current item. A crumb with a menu additionally implements the APG Menu Button pattern, opening on Enter, Space or ArrowDown and closing on Escape.'},
|
|
20
|
+
{guidance: true, description: 'Give each trail its own label when a page renders more than one, so the nav landmarks stay distinguishable in a screen reader landmark list.'},
|
|
19
21
|
{guidance: false, description: 'Use breadcrumbs as the primary navigation. They supplement a sidebar or top nav, not replace it.'},
|
|
20
22
|
{guidance: false, description: 'Show breadcrumbs on top-level pages that have no parent; they add clutter without helping the user.'},
|
|
21
23
|
{guidance: false, description: 'Let the trail grow beyond 5 levels. If you need more, consider simplifying the page hierarchy instead.'},
|
|
24
|
+
{guidance: false, description: 'Mirror a separator the bidi algorithm already mirrors. An angle-quote glyph such as › is Bidi_Mirrored, so it flips under RTL on its own and rtlStyles.mirror would flip it back. An arrow glyph such as → and any Icon separator are not, so those do need rtlStyles.mirror through xstyle.'},
|
|
22
25
|
],
|
|
23
26
|
anatomy: [
|
|
24
27
|
{name: 'Trail', required: true, description: 'The ordered list of links from root to current page.'},
|
|
@@ -29,8 +32,11 @@ export const docs = {
|
|
|
29
32
|
},
|
|
30
33
|
theming: {
|
|
31
34
|
targets: [
|
|
32
|
-
{className: 'astryx-breadcrumb-item'},
|
|
33
|
-
{
|
|
35
|
+
{className: 'astryx-breadcrumb-item', visualProps: ['variant']},
|
|
36
|
+
{
|
|
37
|
+
className: 'astryx-breadcrumb-item-menu-trigger',
|
|
38
|
+
visualProps: ['variant'],
|
|
39
|
+
},
|
|
34
40
|
{className: 'astryx-breadcrumb-menu'},
|
|
35
41
|
{className: 'astryx-breadcrumbs', visualProps: ['variant']},
|
|
36
42
|
],
|
|
@@ -123,6 +129,18 @@ export const docs = {
|
|
|
123
129
|
type: 'LinkComponentType',
|
|
124
130
|
description: 'Custom link component to render instead of <a>. Overrides the provider-level default from LinkProvider. Only applies to non-current items.',
|
|
125
131
|
},
|
|
132
|
+
{
|
|
133
|
+
name: 'menu',
|
|
134
|
+
type: 'DropdownMenuOption[] | ReactNode',
|
|
135
|
+
description:
|
|
136
|
+
'Menu opened when the item is activated, using the same item API as DropdownMenu/MoreMenu/ContextMenu (a DropdownMenuOption[] array or composed DropdownMenuItem children). Renders a link-styled menu trigger with a chevron and aria-haspopup="menu". Takes precedence over href/onClick.',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'menuSize',
|
|
140
|
+
type: "'sm' | 'md' | 'lg'",
|
|
141
|
+
description:
|
|
142
|
+
"Size passed to the menu items. Defaults from the breadcrumb variant ('supporting' → 'sm', otherwise 'md').",
|
|
143
|
+
},
|
|
126
144
|
],
|
|
127
145
|
},
|
|
128
146
|
],
|
|
@@ -138,9 +156,12 @@ export const docsZh = {
|
|
|
138
156
|
{guidance: true, description: 'Keep labels short and match the page titles they link to: "Settings" not "Application Settings Page".'},
|
|
139
157
|
{guidance: true, description: 'Use the supporting variant in dense UIs like admin panels or sidebars where the breadcrumb should be subtle.'},
|
|
140
158
|
{guidance: true, description: 'Make the last item plain text, not a link; it represents the current page. The component does this automatically when you set isCurrent.'},
|
|
159
|
+
{guidance: true, description: 'The component implements the WAI-ARIA APG Breadcrumb pattern: a labelled nav landmark wrapping an ordered list, with aria-current="page" on the current item. A crumb with a menu additionally implements the APG Menu Button pattern, opening on Enter, Space or ArrowDown and closing on Escape.'},
|
|
160
|
+
{guidance: true, description: 'Give each trail its own label when a page renders more than one, so the nav landmarks stay distinguishable in a screen reader landmark list.'},
|
|
141
161
|
{guidance: false, description: 'Use breadcrumbs as the primary navigation. They supplement a sidebar or top nav, not replace it.'},
|
|
142
162
|
{guidance: false, description: 'Show breadcrumbs on top-level pages that have no parent; they add clutter without helping the user.'},
|
|
143
163
|
{guidance: false, description: 'Let the trail grow beyond 5 levels. If you need more, consider simplifying the page hierarchy instead.'},
|
|
164
|
+
{guidance: false, description: 'Mirror a separator the bidi algorithm already mirrors. An angle-quote glyph such as › is Bidi_Mirrored, so it flips under RTL on its own and rtlStyles.mirror would flip it back. An arrow glyph such as → and any Icon separator are not, so those do need rtlStyles.mirror through xstyle.'},
|
|
144
165
|
],
|
|
145
166
|
},
|
|
146
167
|
};
|
|
@@ -156,9 +177,12 @@ export const docsDense = {
|
|
|
156
177
|
{guidance: true, description: 'Keep labels short + matching page titles they link to: "Settings" not "Application Settings Page".'},
|
|
157
178
|
{guidance: true, description: 'Use supporting variant in dense UIs where the breadcrumb should be subtle.'},
|
|
158
179
|
{guidance: true, description: 'Last item plain text, not a link; represents current page; done automatically when you set isCurrent.'},
|
|
180
|
+
{guidance: true, description: 'Implements APG Breadcrumb: labelled nav landmark + ol + aria-current="page". A menu crumb also implements APG Menu Button (Enter/Space/ArrowDown to open, Escape to close).'},
|
|
181
|
+
{guidance: true, description: 'Give each trail its own label when a page renders more than one.'},
|
|
159
182
|
{guidance: false, description: 'Use as primary navigation; breadcrumbs supplement, not replace, a main nav.'},
|
|
160
183
|
{guidance: false, description: 'Show on top-level pages with no parent.'},
|
|
161
184
|
{guidance: false, description: 'Let the trail exceed 5 levels; simplify the hierarchy instead.'},
|
|
185
|
+
{guidance: false, description: 'Mirror a separator that already mirrors itself: › is Bidi_Mirrored and flips under RTL on its own. → and Icon separators are not, so those need rtlStyles.mirror via xstyle.'},
|
|
162
186
|
],
|
|
163
187
|
},
|
|
164
188
|
};
|
|
@@ -676,6 +676,37 @@ describe('BreadcrumbItem menu', () => {
|
|
|
676
676
|
warn.mockRestore();
|
|
677
677
|
});
|
|
678
678
|
|
|
679
|
+
it('reflects the variant on the item and menu-trigger theme targets', () => {
|
|
680
|
+
const {container} = render(
|
|
681
|
+
<Breadcrumbs variant="supporting">
|
|
682
|
+
<BreadcrumbItem href="/">Home</BreadcrumbItem>
|
|
683
|
+
<BreadcrumbItem menu={items}>Teams</BreadcrumbItem>
|
|
684
|
+
<BreadcrumbItem isCurrent>Overview</BreadcrumbItem>
|
|
685
|
+
</Breadcrumbs>,
|
|
686
|
+
);
|
|
687
|
+
// The variant selects between style objects on both elements, so a theme
|
|
688
|
+
// needs it as a data attribute on both targets to reach them.
|
|
689
|
+
for (const item of container.querySelectorAll('.astryx-breadcrumb-item')) {
|
|
690
|
+
expect(item).toHaveAttribute('data-variant', 'supporting');
|
|
691
|
+
}
|
|
692
|
+
expect(
|
|
693
|
+
container.querySelector('.astryx-breadcrumb-item-menu-trigger'),
|
|
694
|
+
).toHaveAttribute('data-variant', 'supporting');
|
|
695
|
+
});
|
|
696
|
+
|
|
697
|
+
it('defaults the item theme target to the default variant', () => {
|
|
698
|
+
const {container} = render(
|
|
699
|
+
<Breadcrumbs>
|
|
700
|
+
<BreadcrumbItem href="/">Home</BreadcrumbItem>
|
|
701
|
+
<BreadcrumbItem isCurrent>Overview</BreadcrumbItem>
|
|
702
|
+
</Breadcrumbs>,
|
|
703
|
+
);
|
|
704
|
+
expect(container.querySelector('.astryx-breadcrumb-item')).toHaveAttribute(
|
|
705
|
+
'data-variant',
|
|
706
|
+
'default',
|
|
707
|
+
);
|
|
708
|
+
});
|
|
709
|
+
|
|
679
710
|
it('keeps mid-trail separators intact around a menu crumb', () => {
|
|
680
711
|
const {container} = render(
|
|
681
712
|
<Breadcrumbs>
|
package/src/Button/Button.tsx
CHANGED
|
@@ -82,7 +82,10 @@ const styles = stylex.create({
|
|
|
82
82
|
lineHeight: typeScaleVars['--text-label-leading'],
|
|
83
83
|
fontWeight: fontWeightVars['--font-weight-medium'],
|
|
84
84
|
whiteSpace: 'nowrap',
|
|
85
|
-
cursor:
|
|
85
|
+
cursor: {
|
|
86
|
+
default: 'pointer',
|
|
87
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
88
|
+
},
|
|
86
89
|
transitionProperty:
|
|
87
90
|
'background-image, background-color, color, opacity, transform',
|
|
88
91
|
transitionDuration: {
|
|
@@ -98,7 +101,7 @@ const styles = stylex.create({
|
|
|
98
101
|
},
|
|
99
102
|
},
|
|
100
103
|
disabled: {
|
|
101
|
-
cursor: '
|
|
104
|
+
cursor: 'default',
|
|
102
105
|
opacity: 0.5,
|
|
103
106
|
backgroundImage: 'none',
|
|
104
107
|
transform: {
|
|
@@ -107,11 +110,11 @@ const styles = stylex.create({
|
|
|
107
110
|
},
|
|
108
111
|
},
|
|
109
112
|
ariaDisabled: {
|
|
113
|
+
// The variants' hover treatment already steps aside for
|
|
114
|
+
// `[aria-disabled]`; `:active` still matches a press on an aria-disabled
|
|
115
|
+
// button, so that one is suppressed here.
|
|
110
116
|
backgroundImage: {
|
|
111
117
|
default: 'none',
|
|
112
|
-
':hover': {
|
|
113
|
-
'@media (hover: hover)': 'none',
|
|
114
|
-
},
|
|
115
118
|
':active': 'none',
|
|
116
119
|
},
|
|
117
120
|
},
|
|
@@ -198,7 +201,7 @@ const variants = stylex.create({
|
|
|
198
201
|
color: colorVars['--color-on-accent'],
|
|
199
202
|
backgroundImage: {
|
|
200
203
|
default: null,
|
|
201
|
-
':hover': {
|
|
204
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))': {
|
|
202
205
|
'@media (hover: hover)': `linear-gradient(${colorVars['--color-overlay-hover']}, ${colorVars['--color-overlay-hover']})`,
|
|
203
206
|
},
|
|
204
207
|
':active': `linear-gradient(${colorVars['--color-overlay-pressed']}, ${colorVars['--color-overlay-pressed']})`,
|
|
@@ -209,7 +212,7 @@ const variants = stylex.create({
|
|
|
209
212
|
color: colorVars['--color-text-primary'],
|
|
210
213
|
backgroundImage: {
|
|
211
214
|
default: null,
|
|
212
|
-
':hover': {
|
|
215
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))': {
|
|
213
216
|
'@media (hover: hover)': `linear-gradient(${colorVars['--color-overlay-hover']}, ${colorVars['--color-overlay-hover']})`,
|
|
214
217
|
},
|
|
215
218
|
':active': `linear-gradient(${colorVars['--color-overlay-pressed']}, ${colorVars['--color-overlay-pressed']})`,
|
|
@@ -220,7 +223,7 @@ const variants = stylex.create({
|
|
|
220
223
|
color: colorVars['--color-text-primary'],
|
|
221
224
|
backgroundImage: {
|
|
222
225
|
default: null,
|
|
223
|
-
':hover': {
|
|
226
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))': {
|
|
224
227
|
'@media (hover: hover)': `linear-gradient(${colorVars['--color-overlay-hover']}, ${colorVars['--color-overlay-hover']})`,
|
|
225
228
|
},
|
|
226
229
|
':active': `linear-gradient(${colorVars['--color-overlay-pressed']}, ${colorVars['--color-overlay-pressed']})`,
|
|
@@ -235,7 +238,7 @@ const variants = stylex.create({
|
|
|
235
238
|
outlineColor: {default: null, ':focus-visible': colorVars['--color-error']},
|
|
236
239
|
backgroundImage: {
|
|
237
240
|
default: null,
|
|
238
|
-
':hover': {
|
|
241
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))': {
|
|
239
242
|
'@media (hover: hover)': `linear-gradient(${colorVars['--color-overlay-hover']}, ${colorVars['--color-overlay-hover']})`,
|
|
240
243
|
},
|
|
241
244
|
':active': `linear-gradient(${colorVars['--color-overlay-pressed']}, ${colorVars['--color-overlay-pressed']})`,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
|
+
use,
|
|
21
22
|
useState,
|
|
22
23
|
useMemo,
|
|
23
24
|
useCallback,
|
|
@@ -86,7 +87,7 @@ import type {
|
|
|
86
87
|
} from '../utils/dateTypes';
|
|
87
88
|
import {normalizeDayOfWeek} from '../utils/dateTypes';
|
|
88
89
|
import {themeProps} from '../utils/themeProps';
|
|
89
|
-
import {useTranslator} from '../i18n';
|
|
90
|
+
import {useTranslator, InternationalizationContext} from '../i18n';
|
|
90
91
|
|
|
91
92
|
/** Imperative handle for Calendar handleRef */
|
|
92
93
|
|
|
@@ -220,6 +221,7 @@ export type CalendarProps = CalendarSingleProps | CalendarRangeProps;
|
|
|
220
221
|
*/
|
|
221
222
|
export function Calendar({ref, ...props}: CalendarProps) {
|
|
222
223
|
const t = useTranslator();
|
|
224
|
+
const {locale} = use(InternationalizationContext);
|
|
223
225
|
const {
|
|
224
226
|
handleRef,
|
|
225
227
|
mode = 'single',
|
|
@@ -327,12 +329,12 @@ export function Calendar({ref, ...props}: CalendarProps) {
|
|
|
327
329
|
// Format month header
|
|
328
330
|
const monthYearLabel = useMemo(() => {
|
|
329
331
|
if (numberOfMonths === 1) {
|
|
330
|
-
return plainDateFormat(visibleMonths[0], DATE_FORMAT_MONTH_YEAR);
|
|
332
|
+
return plainDateFormat(visibleMonths[0], DATE_FORMAT_MONTH_YEAR, locale);
|
|
331
333
|
}
|
|
332
334
|
return visibleMonths
|
|
333
|
-
.map(m => plainDateFormat(m, DATE_FORMAT_MONTH_YEAR))
|
|
335
|
+
.map(m => plainDateFormat(m, DATE_FORMAT_MONTH_YEAR, locale))
|
|
334
336
|
.join(' – ');
|
|
335
|
-
}, [visibleMonths, numberOfMonths]);
|
|
337
|
+
}, [visibleMonths, numberOfMonths, locale]);
|
|
336
338
|
|
|
337
339
|
// Announce the newly visible month to screen readers whenever it changes.
|
|
338
340
|
// The visible month label (`<span>`) carries no live semantics, so paging the
|
|
@@ -440,7 +442,7 @@ export function Calendar({ref, ...props}: CalendarProps) {
|
|
|
440
442
|
setRangeSelectionStart(iso);
|
|
441
443
|
announce(
|
|
442
444
|
t('@astryx.calendar.rangeStartAnnounce', {
|
|
443
|
-
date: plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY),
|
|
445
|
+
date: plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY, locale),
|
|
444
446
|
}),
|
|
445
447
|
);
|
|
446
448
|
} else {
|
|
@@ -486,17 +488,19 @@ export function Calendar({ref, ...props}: CalendarProps) {
|
|
|
486
488
|
start: plainDateFormat(
|
|
487
489
|
plainDateFromISO(start),
|
|
488
490
|
DATE_FORMAT_WITH_WEEKDAY,
|
|
491
|
+
locale,
|
|
489
492
|
),
|
|
490
493
|
end: plainDateFormat(
|
|
491
494
|
plainDateFromISO(end),
|
|
492
495
|
DATE_FORMAT_WITH_WEEKDAY,
|
|
496
|
+
locale,
|
|
493
497
|
),
|
|
494
498
|
}),
|
|
495
499
|
);
|
|
496
500
|
}
|
|
497
501
|
}
|
|
498
502
|
},
|
|
499
|
-
[mode, onChange, rangeSelectionStart, announce, t],
|
|
503
|
+
[mode, onChange, rangeSelectionStart, announce, t, locale],
|
|
500
504
|
);
|
|
501
505
|
|
|
502
506
|
return (
|
|
@@ -645,6 +649,7 @@ function MonthGrid({
|
|
|
645
649
|
pendingFocus,
|
|
646
650
|
onPendingFocusHandled,
|
|
647
651
|
}: MonthGridProps) {
|
|
652
|
+
const {locale} = use(InternationalizationContext);
|
|
648
653
|
const year = month.year;
|
|
649
654
|
|
|
650
655
|
// Use hooks for days generation and constraints
|
|
@@ -866,8 +871,8 @@ function MonthGrid({
|
|
|
866
871
|
|
|
867
872
|
// Month label for announcements
|
|
868
873
|
const monthLabel = useMemo(() => {
|
|
869
|
-
return plainDateFormat(month, DATE_FORMAT_MONTH_YEAR);
|
|
870
|
-
}, [month]);
|
|
874
|
+
return plainDateFormat(month, DATE_FORMAT_MONTH_YEAR, locale);
|
|
875
|
+
}, [month, locale]);
|
|
871
876
|
|
|
872
877
|
return (
|
|
873
878
|
<div {...stylex.props(monthGridStyles.monthGrid)}>
|
|
@@ -1025,6 +1030,7 @@ function DayCell({
|
|
|
1025
1030
|
onDayHover,
|
|
1026
1031
|
}: DayCellProps) {
|
|
1027
1032
|
const t = useTranslator();
|
|
1033
|
+
const {locale} = use(InternationalizationContext);
|
|
1028
1034
|
const {date, isOutside, dayNumber} = day;
|
|
1029
1035
|
|
|
1030
1036
|
if (isOutside && !hasOutsideDays) {
|
|
@@ -1070,7 +1076,7 @@ function DayCell({
|
|
|
1070
1076
|
// params rather than string concatenation. A mid-flight first pick (where
|
|
1071
1077
|
// rangeStart === rangeEnd) reads as "range start" only; a completed one-day
|
|
1072
1078
|
// range reads as both start and end.
|
|
1073
|
-
const dateLabel = plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY);
|
|
1079
|
+
const dateLabel = plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY, locale);
|
|
1074
1080
|
const dayLabel = state.isSelected
|
|
1075
1081
|
? t('@astryx.calendar.daySelected', {date: dateLabel})
|
|
1076
1082
|
: state.isRangeStart && state.isRangeEnd
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - /packages/core/src/Calendar/hooks/index.ts
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {useState, useMemo, useCallback} from 'react';
|
|
15
|
+
import {use, useState, useMemo, useCallback} from 'react';
|
|
16
16
|
import type {ISODateString} from '../../utils/dateTypes';
|
|
17
17
|
import {
|
|
18
18
|
type PlainDate,
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
plainDateFormat,
|
|
26
26
|
DATE_FORMAT_MONTH_YEAR,
|
|
27
27
|
} from '../../utils/plainDate';
|
|
28
|
+
import {InternationalizationContext} from '../../i18n';
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* Configuration for calendar navigation
|
|
@@ -98,6 +99,7 @@ export function useCalendarNavigation(
|
|
|
98
99
|
onFocusDateChange,
|
|
99
100
|
numberOfMonths = 1,
|
|
100
101
|
} = options;
|
|
102
|
+
const {locale} = use(InternationalizationContext);
|
|
101
103
|
|
|
102
104
|
// Pending focus target after month navigation
|
|
103
105
|
const [pendingFocus, setPendingFocus] = useState<ISODateString | null>(null);
|
|
@@ -135,12 +137,12 @@ export function useCalendarNavigation(
|
|
|
135
137
|
// Format month header
|
|
136
138
|
const monthYearLabel = useMemo(() => {
|
|
137
139
|
if (numberOfMonths === 1) {
|
|
138
|
-
return plainDateFormat(visibleMonths[0], DATE_FORMAT_MONTH_YEAR);
|
|
140
|
+
return plainDateFormat(visibleMonths[0], DATE_FORMAT_MONTH_YEAR, locale);
|
|
139
141
|
}
|
|
140
142
|
return visibleMonths
|
|
141
|
-
.map(m => plainDateFormat(m, DATE_FORMAT_MONTH_YEAR))
|
|
143
|
+
.map(m => plainDateFormat(m, DATE_FORMAT_MONTH_YEAR, locale))
|
|
142
144
|
.join(' – ');
|
|
143
|
-
}, [visibleMonths, numberOfMonths]);
|
|
145
|
+
}, [visibleMonths, numberOfMonths, locale]);
|
|
144
146
|
|
|
145
147
|
// Navigate to previous/next month
|
|
146
148
|
const navigateMonth = useCallback(
|
package/src/Calendar/styles.ts
CHANGED
|
@@ -198,7 +198,10 @@ export const dayCellStyles = stylex.create({
|
|
|
198
198
|
borderRadius: '50%',
|
|
199
199
|
borderWidth: 0,
|
|
200
200
|
borderStyle: 'none',
|
|
201
|
-
cursor:
|
|
201
|
+
cursor: {
|
|
202
|
+
default: 'pointer',
|
|
203
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
204
|
+
},
|
|
202
205
|
fontFamily: 'inherit',
|
|
203
206
|
fontSize: typeScaleVars['--text-body-size'],
|
|
204
207
|
padding: 0,
|
|
@@ -229,7 +232,7 @@ export const dayCellStyles = stylex.create({
|
|
|
229
232
|
dayTodayInRange: {},
|
|
230
233
|
daySelected: {},
|
|
231
234
|
dayDisabled: {
|
|
232
|
-
cursor: '
|
|
235
|
+
cursor: 'default',
|
|
233
236
|
},
|
|
234
237
|
});
|
|
235
238
|
|
|
@@ -254,7 +257,7 @@ export const dayCellTheme = stylex.create({
|
|
|
254
257
|
backgroundColor: 'transparent',
|
|
255
258
|
backgroundImage: {
|
|
256
259
|
default: null,
|
|
257
|
-
':hover': {
|
|
260
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))': {
|
|
258
261
|
'@media (hover: hover)': `linear-gradient(${colorVars['--color-overlay-hover']}, ${colorVars['--color-overlay-hover']})`,
|
|
259
262
|
},
|
|
260
263
|
},
|
|
@@ -281,7 +284,7 @@ export const dayCellTheme = stylex.create({
|
|
|
281
284
|
color: colorVars['--color-on-accent'],
|
|
282
285
|
backgroundImage: {
|
|
283
286
|
default: null,
|
|
284
|
-
':hover': {
|
|
287
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))': {
|
|
285
288
|
'@media (hover: hover)': `linear-gradient(${colorVars['--color-overlay-hover']}, ${colorVars['--color-overlay-hover']})`,
|
|
286
289
|
},
|
|
287
290
|
},
|
|
@@ -292,7 +295,7 @@ export const dayCellTheme = stylex.create({
|
|
|
292
295
|
opacity: 0.3,
|
|
293
296
|
backgroundImage: {
|
|
294
297
|
default: 'none',
|
|
295
|
-
':hover': {
|
|
298
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))': {
|
|
296
299
|
'@media (hover: hover)': 'none',
|
|
297
300
|
},
|
|
298
301
|
},
|
|
@@ -48,12 +48,36 @@ export const docs = {
|
|
|
48
48
|
description:
|
|
49
49
|
'Inline (horizontal) padding, using the spacing scale. Overrides padding on the inline axis when both are set.',
|
|
50
50
|
},
|
|
51
|
+
{
|
|
52
|
+
name: 'paddingInlineStart',
|
|
53
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
54
|
+
description:
|
|
55
|
+
'Inline-start padding, using the spacing scale (left in LTR, right in RTL). Overrides paddingInline and padding on that edge only.',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'paddingInlineEnd',
|
|
59
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
60
|
+
description:
|
|
61
|
+
'Inline-end padding, using the spacing scale (right in LTR, left in RTL). Overrides paddingInline and padding on that edge only.',
|
|
62
|
+
},
|
|
51
63
|
{
|
|
52
64
|
name: 'paddingBlock',
|
|
53
65
|
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
54
66
|
description:
|
|
55
67
|
'Block (vertical) padding, using the spacing scale. Overrides padding on the block axis when both are set.',
|
|
56
68
|
},
|
|
69
|
+
{
|
|
70
|
+
name: 'paddingBlockStart',
|
|
71
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
72
|
+
description:
|
|
73
|
+
'Block-start (top) padding, using the spacing scale. Overrides paddingBlock and padding on that edge only.',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'paddingBlockEnd',
|
|
77
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
78
|
+
description:
|
|
79
|
+
'Block-end (bottom) padding, using the spacing scale. Overrides paddingBlock and padding on that edge only.',
|
|
80
|
+
},
|
|
57
81
|
{
|
|
58
82
|
name: 'isInline',
|
|
59
83
|
type: 'boolean',
|
|
@@ -124,11 +148,31 @@ export const docsZh = {
|
|
|
124
148
|
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
125
149
|
description: '行内(水平)内边距,使用间距刻度。两者同时设置时在行内轴上覆盖 padding。',
|
|
126
150
|
},
|
|
151
|
+
{
|
|
152
|
+
name: 'paddingInlineStart',
|
|
153
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
154
|
+
description: '行内起始内边距,使用间距刻度(LTR 中为左侧,RTL 中为右侧)。仅在该边上覆盖 paddingInline 和 padding。',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'paddingInlineEnd',
|
|
158
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
159
|
+
description: '行内结束内边距,使用间距刻度(LTR 中为右侧,RTL 中为左侧)。仅在该边上覆盖 paddingInline 和 padding。',
|
|
160
|
+
},
|
|
127
161
|
{
|
|
128
162
|
name: 'paddingBlock',
|
|
129
163
|
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
130
164
|
description: '块(垂直)内边距,使用间距刻度。两者同时设置时在块轴上覆盖 padding。',
|
|
131
165
|
},
|
|
166
|
+
{
|
|
167
|
+
name: 'paddingBlockStart',
|
|
168
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
169
|
+
description: '块起始(顶部)内边距,使用间距刻度。仅在该边上覆盖 paddingBlock 和 padding。',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'paddingBlockEnd',
|
|
173
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
174
|
+
description: '块结束(底部)内边距,使用间距刻度。仅在该边上覆盖 paddingBlock 和 padding。',
|
|
175
|
+
},
|
|
132
176
|
{name: 'isInline', type: 'boolean', description: '使用 inline-flex(适用于文本/图标)。', default: 'false'},
|
|
133
177
|
{name: 'children', type: 'ReactNode', description: '要居中的内容。'},
|
|
134
178
|
{
|
|
@@ -171,7 +215,11 @@ export const docsDense = {
|
|
|
171
215
|
padding:
|
|
172
216
|
'inner padding on all sides (spacing step: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10)',
|
|
173
217
|
paddingInline: 'inline (horizontal) padding; overrides padding on that axis',
|
|
218
|
+
paddingInlineStart: 'inline-start padding (left in LTR); overrides paddingInline/padding on that edge',
|
|
219
|
+
paddingInlineEnd: 'inline-end padding (right in LTR); overrides paddingInline/padding on that edge',
|
|
174
220
|
paddingBlock: 'block (vertical) padding; overrides padding on that axis',
|
|
221
|
+
paddingBlockStart: 'block-start (top) padding; overrides paddingBlock/padding on that edge',
|
|
222
|
+
paddingBlockEnd: 'block-end (bottom) padding; overrides paddingBlock/padding on that edge',
|
|
175
223
|
isInline: 'use inline-flex for text/icons',
|
|
176
224
|
children: 'content to center',
|
|
177
225
|
xstyle: 'StyleX styles for layout (margins, positioning, sizing); must be stylex.create() value',
|