@astryxdesign/core 0.4.4 → 0.4.5-canary.0472ec1
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 +40 -0
- package/dist/AvatarGroup/AvatarGroupOverflow.js +1 -1
- 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/BottomSheet.d.ts +11 -2
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +4 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts +5 -2
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +77 -18
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.d.ts.map +1 -1
- package/dist/BottomSheet/snapOffsets.d.ts +57 -20
- package/dist/BottomSheet/snapOffsets.d.ts.map +1 -1
- package/dist/BottomSheet/snapOffsets.js +106 -30
- package/dist/BottomSheet/useSheetGestures.d.ts +13 -8
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +160 -64
- package/dist/Breadcrumbs/BreadcrumbItem.js +6 -6
- package/dist/Button/Button.js +5 -5
- package/dist/Calendar/Calendar.d.ts +17 -0
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +55 -15
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts +14 -0
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts.map +1 -0
- package/dist/Calendar/getStandaloneShortWeekdayNames.js +26 -0
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts +22 -1
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarConstraints.js +26 -4
- package/dist/Calendar/hooks/useCalendarDays.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarDays.js +14 -10
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarNavigation.js +8 -4
- package/dist/Calendar/standaloneShortWeekdayNames.generated.d.ts +47 -0
- package/dist/Calendar/standaloneShortWeekdayNames.generated.d.ts.map +1 -0
- package/dist/Calendar/standaloneShortWeekdayNames.generated.js +40 -0
- package/dist/Calendar/styles.js +3 -3
- 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 +2 -2
- package/dist/Chat/ChatToolCalls.js +1 -1
- 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/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +9 -0
- package/dist/Citation/Citation.js +3 -3
- package/dist/ClickableCard/ClickableCard.js +2 -2
- package/dist/CommandPalette/CommandPaletteItem.js +1 -1
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +8 -3
- package/dist/DateInput/DateInput.d.ts +31 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +92 -19
- package/dist/DateInput/MonthScroller.d.ts +35 -0
- package/dist/DateInput/MonthScroller.d.ts.map +1 -0
- package/dist/DateInput/MonthScroller.js +573 -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 +23 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +47 -9
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +18 -10
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +3 -3
- package/dist/Field/FieldLabel.d.ts +2 -1
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +21 -3
- package/dist/Field/InputClearButton.d.ts +2 -1
- package/dist/Field/InputClearButton.d.ts.map +1 -1
- package/dist/Field/InputClearButton.js +12 -1
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +4 -4
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +2 -2
- package/dist/FormLayout/FormLayout.d.ts +24 -2
- package/dist/FormLayout/FormLayout.d.ts.map +1 -1
- package/dist/FormLayout/FormLayout.js +7 -2
- package/dist/FormLayout/FormLayoutContext.d.ts +15 -2
- package/dist/FormLayout/FormLayoutContext.d.ts.map +1 -1
- package/dist/FormLayout/FormLayoutContext.js +19 -4
- package/dist/FormLayout/index.d.ts +1 -1
- package/dist/FormLayout/index.d.ts.map +1 -1
- 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/Item/Item.d.ts +9 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +46 -8
- 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 +2 -1
- package/dist/Link/Link.js +4 -4
- package/dist/Markdown/Markdown.d.ts +8 -0
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +31 -3
- package/dist/Markdown/parser.d.ts +14 -2
- package/dist/Markdown/parser.d.ts.map +1 -1
- package/dist/Markdown/parser.js +50 -2
- 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 -3
- package/dist/NavItem/navItemStyles.stylex.d.ts +2 -2
- package/dist/NavItem/navItemStyles.stylex.js +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -1
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +38 -5
- package/dist/Outline/Outline.js +2 -2
- package/dist/Outline/parseOutlineFromMarkdown.d.ts +2 -0
- package/dist/Outline/parseOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/parseOutlineFromMarkdown.js +5 -31
- 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/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +12 -1
- package/dist/RadioList/RadioListItem.d.ts +2 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +68 -38
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +3 -3
- 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 +6 -1
- package/dist/SelectableCard/SelectableCard.js +1 -1
- package/dist/Selector/Selector.d.ts +26 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +95 -17
- 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.js +1 -1
- package/dist/SideNav/SideNavItem.js +1 -1
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +3 -3
- 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/StatusDot/StatusDot.d.ts +43 -3
- package/dist/StatusDot/StatusDot.d.ts.map +1 -1
- package/dist/StatusDot/StatusDot.js +42 -5
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +9 -0
- package/dist/TabList/TabMenu.js +1 -1
- 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/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +7 -2
- 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.js +2 -2
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +6 -1
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +6 -1
- package/dist/Thumbnail/Thumbnail.js +1 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +6 -1
- 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/Token/Token.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.js +2 -2
- package/dist/TopNav/TopNavItem.js +2 -2
- package/dist/TopNav/TopNavMegaMenu.js +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +1 -1
- package/dist/TopNav/TopNavMenu.js +2 -2
- package/dist/TreeList/TreeListItem.js +1 -1
- package/dist/astryx.css +123 -60
- 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/useResolvedRequired.d.ts +19 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -0
- package/dist/hooks/useResolvedRequired.js +40 -0
- 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/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/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 +11 -2
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +32 -4
- package/locales/af-ZA.json +958 -0
- package/locales/ar-SA.json +998 -0
- package/locales/ca-ES.json +974 -0
- package/locales/cs-CZ.json +990 -0
- package/locales/da-DK.json +966 -0
- package/locales/de-DE.json +966 -0
- package/locales/el-GR.json +990 -0
- package/locales/en.json +32 -0
- package/locales/es-ES.json +978 -0
- package/locales/fi-FI.json +990 -0
- package/locales/fr-FR.json +928 -0
- package/locales/he-IL.json +990 -0
- package/locales/hu-HU.json +990 -0
- package/locales/it-IT.json +978 -0
- package/locales/ja-JP.json +998 -0
- package/locales/ko-KR.json +990 -0
- package/locales/nl-NL.json +954 -0
- package/locales/no-NO.json +978 -0
- package/locales/pl-PL.json +982 -0
- package/locales/pseudo.json +24 -0
- package/locales/pt-BR.json +982 -0
- package/locales/pt-PT.json +982 -0
- package/locales/ro-RO.json +982 -0
- package/locales/ru-RU.json +990 -0
- package/locales/sr-SP.json +990 -0
- package/locales/sv-SE.json +986 -0
- package/locales/tr-TR.json +990 -0
- package/locales/uk-UA.json +990 -0
- package/locales/vi-VN.json +986 -0
- package/locales/zh-CN.json +998 -0
- package/locales/zh-TW.json +998 -0
- package/package.json +3 -3
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +1 -1
- 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 +36 -3
- package/src/BottomSheet/BottomSheet.test.tsx +177 -2
- package/src/BottomSheet/BottomSheet.tsx +16 -2
- package/src/BottomSheet/BottomSheetPanel.test.tsx +91 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +121 -15
- package/src/BottomSheet/index.ts +5 -1
- package/src/BottomSheet/snapOffsets.test.ts +114 -47
- package/src/BottomSheet/snapOffsets.ts +119 -33
- package/src/BottomSheet/useSheetGestures.test.ts +113 -15
- package/src/BottomSheet/useSheetGestures.ts +196 -100
- package/src/Breadcrumbs/BreadcrumbItem.tsx +1 -1
- package/src/Button/Button.tsx +7 -7
- package/src/Calendar/Calendar.doc.mjs +16 -0
- package/src/Calendar/Calendar.test.tsx +137 -0
- package/src/Calendar/Calendar.tsx +80 -11
- package/src/Calendar/getStandaloneShortWeekdayNames.test.ts +54 -0
- package/src/Calendar/getStandaloneShortWeekdayNames.ts +38 -0
- package/src/Calendar/hooks/useCalendarConstraints.ts +54 -3
- package/src/Calendar/hooks/useCalendarDays.ts +13 -10
- package/src/Calendar/hooks/useCalendarNavigation.ts +6 -4
- package/src/Calendar/standaloneShortWeekdayNames.generated.ts +50 -0
- package/src/Calendar/styles.ts +3 -3
- 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 +7 -4
- package/src/Chat/ChatToolCalls.tsx +1 -1
- 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/CheckboxInput/CheckboxInput.tsx +6 -0
- package/src/Citation/Citation.tsx +3 -3
- package/src/ClickableCard/ClickableCard.tsx +2 -2
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -1
- package/src/ComplexSelector/ComplexSelector.doc.mjs +10 -0
- package/src/ComplexSelector/ComplexSelector.tsx +8 -5
- package/src/DateInput/DateInput.test.tsx +17 -1
- package/src/DateInput/DateInput.tsx +90 -19
- package/src/DateInput/DateInputTouch.test.tsx +2393 -0
- package/src/DateInput/MonthScroller.tsx +784 -0
- package/src/DateInput/MonthYearWheels.tsx +147 -0
- package/src/DateInput/TouchDateField.tsx +1214 -0
- package/src/DateInput/Wheel.tsx +470 -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 +16 -0
- package/src/DateRangeInput/DateRangeInput.test.tsx +81 -1
- package/src/DateRangeInput/DateRangeInput.tsx +88 -8
- package/src/DateTimeInput/DateTimeInput.tsx +23 -8
- package/src/Dialog/Dialog.test.tsx +24 -0
- package/src/Dialog/Dialog.tsx +3 -0
- package/src/Field/Field.doc.mjs +3 -0
- package/src/Field/FieldLabel.tsx +20 -4
- package/src/Field/InputClearButton.test.tsx +134 -2
- package/src/Field/InputClearButton.tsx +42 -1
- package/src/Field/inputStyles.stylex.ts +16 -12
- package/src/FileInput/FileInput.tsx +5 -4
- package/src/FormLayout/FormLayout.doc.mjs +13 -0
- package/src/FormLayout/FormLayout.test.tsx +181 -4
- package/src/FormLayout/FormLayout.tsx +33 -2
- package/src/FormLayout/FormLayoutContext.ts +22 -7
- package/src/FormLayout/index.ts +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/Item/Item.doc.mjs +1 -0
- package/src/Item/Item.test.tsx +50 -0
- package/src/Item/Item.tsx +41 -2
- 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 +2 -1
- package/src/Link/Link.tsx +4 -4
- package/src/Markdown/Markdown.doc.mjs +3 -0
- package/src/Markdown/Markdown.test.tsx +78 -0
- package/src/Markdown/Markdown.tsx +41 -1
- package/src/Markdown/parser.ts +60 -2
- 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 +8 -5
- package/src/NavItem/navItemStyles.stylex.ts +2 -2
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -1
- package/src/NumberInput/NumberInput.doc.mjs +24 -0
- package/src/NumberInput/NumberInput.test.tsx +138 -0
- package/src/NumberInput/NumberInput.tsx +44 -6
- package/src/Outline/Outline.doc.mjs +2 -0
- package/src/Outline/Outline.tsx +1 -1
- package/src/Outline/parseOutlineFromMarkdown.ts +10 -40
- 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/RadioList.tsx +9 -1
- package/src/RadioList/RadioListItem.tsx +83 -51
- package/src/Resizable/ResizeHandle.test.tsx +22 -0
- package/src/Resizable/ResizeHandle.tsx +9 -3
- 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 +11 -2
- package/src/SelectableCard/SelectableCard.tsx +1 -1
- package/src/Selector/Selector.doc.mjs +16 -2
- package/src/Selector/Selector.test.tsx +525 -1
- package/src/Selector/Selector.tsx +166 -21
- 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 +2 -2
- package/src/SideNav/SideNavItem.tsx +1 -1
- package/src/Slider/Slider.tsx +11 -1
- 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/StatusDot/StatusDot.doc.mjs +13 -0
- package/src/StatusDot/StatusDot.test.tsx +115 -8
- package/src/StatusDot/StatusDot.tsx +74 -9
- package/src/Switch/Switch.tsx +6 -0
- package/src/TabList/TabMenu.tsx +1 -1
- package/src/Table/TableRow.tsx +4 -4
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +2 -1
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +2 -1
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +22 -4
- 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 +2 -2
- package/src/TextArea/TextArea.doc.mjs +1 -1
- package/src/TextArea/TextArea.tsx +3 -1
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/Thumbnail/Thumbnail.tsx +1 -1
- package/src/TimeInput/TimeInput.tsx +3 -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/Token/Token.tsx +1 -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 +1 -1
- package/src/TopNav/TopNavItem.tsx +2 -2
- package/src/TopNav/TopNavMegaMenu.tsx +1 -1
- package/src/TopNav/TopNavMegaMenuItem.tsx +1 -1
- package/src/TopNav/TopNavMenu.tsx +2 -2
- package/src/TreeList/TreeListItem.tsx +1 -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/useResolvedRequired.ts +42 -0
- 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/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/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 +56 -0
- package/src/utils/plainDate.ts +33 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatFilterValue.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/formatFilterValue.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAE,WAAW,EAAW,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"formatFilterValue.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/formatFilterValue.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAE,WAAW,EAAW,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AAoBlD,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAUR;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,CAMR;AAcD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,cAAc,EACvB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,EACjB,CAAC,EAAE,YAAY,EACf,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAwHR"}
|
|
@@ -18,11 +18,11 @@ function formatEnumLabel(value, enumValues) {
|
|
|
18
18
|
const item = enumValues.find(v => v.value === value);
|
|
19
19
|
return item?.label ?? value;
|
|
20
20
|
}
|
|
21
|
-
function formatNumber(value, units) {
|
|
22
|
-
const formatted = new Intl.NumberFormat().format(value);
|
|
21
|
+
function formatNumber(value, locale, units) {
|
|
22
|
+
const formatted = new Intl.NumberFormat(locale).format(value);
|
|
23
23
|
return units ? `${formatted} ${units}` : formatted;
|
|
24
24
|
}
|
|
25
|
-
function formatDateAbsolute(unixSeconds, timezoneID) {
|
|
25
|
+
export function formatDateAbsolute(unixSeconds, locale, timezoneID) {
|
|
26
26
|
const options = {
|
|
27
27
|
year: 'numeric',
|
|
28
28
|
month: 'short',
|
|
@@ -33,7 +33,22 @@ function formatDateAbsolute(unixSeconds, timezoneID) {
|
|
|
33
33
|
timeZone: timezoneID
|
|
34
34
|
} : {})
|
|
35
35
|
};
|
|
36
|
-
return new Intl.DateTimeFormat(
|
|
36
|
+
return new Intl.DateTimeFormat(locale, options).format(unixSeconds * 1000);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Compact date-only rendering (no time-of-day) for the token pill's inline
|
|
41
|
+
* value display, which has less room than the editor's full summary. Kept
|
|
42
|
+
* separate from {@link formatDateAbsolute} rather than reusing it with
|
|
43
|
+
* different options threaded through a param, since the two callers want
|
|
44
|
+
* genuinely different shapes, not a parameterization of the same one.
|
|
45
|
+
*/
|
|
46
|
+
export function formatDateAbsoluteCompact(unixSeconds, locale) {
|
|
47
|
+
return new Intl.DateTimeFormat(locale, {
|
|
48
|
+
year: 'numeric',
|
|
49
|
+
month: 'short',
|
|
50
|
+
day: 'numeric'
|
|
51
|
+
}).format(unixSeconds * 1000);
|
|
37
52
|
}
|
|
38
53
|
function formatRelativeDate(value) {
|
|
39
54
|
// value is stored as a descriptive string like "7d" or "1w"
|
|
@@ -42,16 +57,16 @@ function formatRelativeDate(value) {
|
|
|
42
57
|
function formatDateRange(_value, t) {
|
|
43
58
|
return t('@astryx.powersearch.valueEditor.dateRange');
|
|
44
59
|
}
|
|
45
|
-
export function formatFilterValue(_config, operatorValue, filterValue, maxLength, t, timezoneID) {
|
|
60
|
+
export function formatFilterValue(_config, operatorValue, filterValue, maxLength, t, locale, timezoneID) {
|
|
46
61
|
switch (filterValue.type) {
|
|
47
62
|
case 'empty':
|
|
48
63
|
return '';
|
|
49
64
|
case 'string':
|
|
50
65
|
return truncate(filterValue.value, maxLength);
|
|
51
66
|
case 'integer':
|
|
52
|
-
return formatNumber(filterValue.value, operatorValue.type === 'integer' ? operatorValue.units : undefined);
|
|
67
|
+
return formatNumber(filterValue.value, locale, operatorValue.type === 'integer' ? operatorValue.units : undefined);
|
|
53
68
|
case 'float':
|
|
54
|
-
return formatNumber(filterValue.value, operatorValue.type === 'float' ? operatorValue.units : undefined);
|
|
69
|
+
return formatNumber(filterValue.value, locale, operatorValue.type === 'float' ? operatorValue.units : undefined);
|
|
55
70
|
case 'enum':
|
|
56
71
|
if (operatorValue.type === 'enum') {
|
|
57
72
|
return truncate(formatEnumLabel(filterValue.value, operatorValue.values), maxLength);
|
|
@@ -120,7 +135,7 @@ export function formatFilterValue(_config, operatorValue, filterValue, maxLength
|
|
|
120
135
|
case 'time':
|
|
121
136
|
return filterValue.value;
|
|
122
137
|
case 'date_absolute':
|
|
123
|
-
return truncate(formatDateAbsolute(filterValue.unixSeconds, timezoneID), maxLength);
|
|
138
|
+
return truncate(formatDateAbsolute(filterValue.unixSeconds, locale, timezoneID), maxLength);
|
|
124
139
|
case 'date_relative':
|
|
125
140
|
return formatRelativeDate(filterValue.value);
|
|
126
141
|
case 'date_range':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioList.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioList.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC,MAAM,WAAW,qBA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ACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,EACxB,GAAG,EACH,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,KAAK,EACL,QAAQ,EACR,WAAwB,EACxB,UAAkB,EAClB,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,IAAW,EACX,MAAM,EACN,YAAY,EACZ,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,UAAU,EACzB,QAAQ,EACR,QAAQ,GACT,EAAE,cAAc,qBAwMhB;yBA9Ne,SAAS"}
|
|
@@ -21,6 +21,7 @@ import "../theme/tokens.stylex.js";
|
|
|
21
21
|
import { spacingVars } from "../theme/tokens.stylex.js";
|
|
22
22
|
import { Field } from "../Field/Field.js";
|
|
23
23
|
import { useTooltip } from "../Tooltip/index.js";
|
|
24
|
+
import { useResolvedRequired } from "../hooks/useResolvedRequired.js";
|
|
24
25
|
import { mergeProps } from "../utils/index.js";
|
|
25
26
|
import { themeProps } from "../utils/themeProps.js";
|
|
26
27
|
|
|
@@ -76,6 +77,16 @@ export function RadioList({
|
|
|
76
77
|
const statusMessageID = useId();
|
|
77
78
|
const groupRef = useRef(null);
|
|
78
79
|
|
|
80
|
+
// The radiogroup exposes the *effective* required state so a form-wide
|
|
81
|
+
// `defaultOptionality="required"` is announced even when the group carries no
|
|
82
|
+
// visible indicator. Individual radios keep their native `required` bound to
|
|
83
|
+
// the explicit `isRequired` (via context), so a layout default never switches
|
|
84
|
+
// on browser validation for the group.
|
|
85
|
+
const isEffectivelyRequired = useResolvedRequired({
|
|
86
|
+
isRequired,
|
|
87
|
+
isOptional
|
|
88
|
+
});
|
|
89
|
+
|
|
79
90
|
// Disabled-reason tooltip. Applies to the whole-group disabled state. Disabled
|
|
80
91
|
// controls swallow pointer events, so the tooltip listeners attach to the
|
|
81
92
|
// radiogroup container and the radios stay perceivable via aria-disabled
|
|
@@ -203,7 +214,7 @@ export function RadioList({
|
|
|
203
214
|
onFocus: handleFocus,
|
|
204
215
|
"aria-describedby": [description ? descriptionID : null, status?.message ? statusMessageID : null, showsDisabledMessage ? disabledMessageTooltip.describedBy : null].filter(Boolean).join(' ') || undefined,
|
|
205
216
|
"aria-invalid": status?.type === 'error' ? true : undefined,
|
|
206
|
-
"aria-required":
|
|
217
|
+
"aria-required": isEffectivelyRequired || undefined,
|
|
207
218
|
...mergeProps(themeProps('radio-list', {
|
|
208
219
|
orientation,
|
|
209
220
|
size
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file RadioListItem.tsx
|
|
3
|
-
* @input Uses React use, useId, RadioListContext
|
|
3
|
+
* @input Uses React use, useId, useRef, RadioListContext, Item
|
|
4
4
|
* @output Exports RadioListItem component, RadioListItemProps
|
|
5
5
|
* @position Core implementation; consumed by index.ts, tested by RadioList.test.tsx
|
|
6
6
|
*
|
|
@@ -56,7 +56,7 @@ export interface RadioListItemProps extends BaseProps<HTMLDivElement> {
|
|
|
56
56
|
* />
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
export declare function RadioListItem({ ref, label, value, description, isDisabled: isItemDisabled, startContent, endContent, xstyle, className, style, ...rest }: RadioListItemProps): React.JSX.Element;
|
|
59
|
+
export declare function RadioListItem({ ref, label, value, description, isDisabled: isItemDisabled, startContent, endContent, xstyle, className, style, onClick, ...rest }: RadioListItemProps): React.JSX.Element;
|
|
60
60
|
export declare namespace RadioListItem {
|
|
61
61
|
var displayName: string;
|
|
62
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioListItem.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioListItem.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAsF5C,MAAM,WAAW,kBAAmB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACnE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,KAAK,EACL,WAAW,EACX,UAAU,EAAE,cAAsB,EAClC,YAAY,EACZ,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,GAAG,IAAI,EACR,EAAE,kBAAkB,qBA4IpB;yBAzJe,aAAa"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file RadioListItem.tsx
|
|
7
|
-
* @input Uses React use, useId, RadioListContext
|
|
7
|
+
* @input Uses React use, useId, useRef, RadioListContext, Item
|
|
8
8
|
* @output Exports RadioListItem component, RadioListItemProps
|
|
9
9
|
* @position Core implementation; consumed by index.ts, tested by RadioList.test.tsx
|
|
10
10
|
*
|
|
@@ -19,10 +19,8 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import React, { use, useId, useRef } from 'react';
|
|
21
21
|
import * as stylex from '@stylexjs/stylex';
|
|
22
|
-
import "../theme/tokens.stylex.js";
|
|
23
|
-
import { colorVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
24
22
|
import { RadioListContext } from "./RadioList.js";
|
|
25
|
-
import { mergeProps } from "../utils/index.js";
|
|
23
|
+
import { mergeProps, isRenderable } from "../utils/index.js";
|
|
26
24
|
import { indicatorScope } from "../Indicator/indicator.markers.stylex.js";
|
|
27
25
|
import { useIndicatorFocusRing } from "../hooks/useIndicatorFocusRing.js";
|
|
28
26
|
import { useIndicator } from "../Indicator/index.js";
|
|
@@ -30,12 +28,6 @@ import { Item } from "../Item/index.js";
|
|
|
30
28
|
import { themeProps } from "../utils/themeProps.js";
|
|
31
29
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
32
30
|
const styles = {
|
|
33
|
-
container: {
|
|
34
|
-
k1xSpc: "x78zum5",
|
|
35
|
-
kGNEyG: "x6s0dn4",
|
|
36
|
-
kOIVth: "x1txdalj",
|
|
37
|
-
$$css: true
|
|
38
|
-
},
|
|
39
31
|
radioWrapper: {
|
|
40
32
|
kVAEAm: "x1n2onr6",
|
|
41
33
|
k1xSpc: "x78zum5",
|
|
@@ -76,13 +68,13 @@ const wrapperSizeStyles = {
|
|
|
76
68
|
$$css: true
|
|
77
69
|
}
|
|
78
70
|
};
|
|
79
|
-
const
|
|
71
|
+
const rowStyles = {
|
|
80
72
|
root: {
|
|
81
73
|
k8WAf4: "xt970qd",
|
|
82
74
|
kg3NbH: "xnjsko4",
|
|
83
75
|
kaIpWk: "x2u8bby",
|
|
84
|
-
kUk6DE: "x98rzlu",
|
|
85
76
|
k7Eaqz: "xeuugli",
|
|
77
|
+
kWkggS: "xjbqb8w",
|
|
86
78
|
$$css: true
|
|
87
79
|
}
|
|
88
80
|
};
|
|
@@ -110,6 +102,7 @@ export function RadioListItem({
|
|
|
110
102
|
xstyle,
|
|
111
103
|
className,
|
|
112
104
|
style,
|
|
105
|
+
onClick,
|
|
113
106
|
...rest
|
|
114
107
|
}) {
|
|
115
108
|
const context = use(RadioListContext);
|
|
@@ -135,15 +128,27 @@ export function RadioListItem({
|
|
|
135
128
|
const {
|
|
136
129
|
focusProps
|
|
137
130
|
} = useIndicatorFocusRing(indicatorRef, isDisabled);
|
|
131
|
+
|
|
132
|
+
// The radio is the row's single keyboard control and action. The row is an
|
|
133
|
+
// enlarged click/tap target that delegates surface clicks — the description
|
|
134
|
+
// and the empty hover area, not just the control and its label — to the
|
|
135
|
+
// input via Item's `interactiveRef` (useClickableContainer). This matches
|
|
136
|
+
// CheckboxListItem so the whole row is clickable, and keeps one tab stop per
|
|
137
|
+
// option (WCAG 4.1.2). The radio carries its accessible name via `aria-label`
|
|
138
|
+
// since the visible label is now a plain (non-`<label>`) text node — a real
|
|
139
|
+
// `<label htmlFor>` would double-fire under delegation.
|
|
140
|
+
const radioRef = useRef(null);
|
|
138
141
|
const radioCircle = /*#__PURE__*/_jsxs("div", {
|
|
139
142
|
...stylex.props(styles.radioWrapper, wrapperSizeStyles[size]),
|
|
140
143
|
...focusProps,
|
|
141
144
|
children: [/*#__PURE__*/_jsx("input", {
|
|
145
|
+
ref: radioRef,
|
|
142
146
|
id: id,
|
|
143
147
|
type: "radio",
|
|
144
148
|
name: context.name,
|
|
145
149
|
value: value,
|
|
146
150
|
checked: isChecked,
|
|
151
|
+
"aria-label": label,
|
|
147
152
|
disabled: isDisabled && !keepsFocusableForMessage,
|
|
148
153
|
"aria-disabled": keepsFocusableForMessage ? 'true' : undefined
|
|
149
154
|
// A focusable-disabled radio is not natively disabled, so detach it
|
|
@@ -157,7 +162,12 @@ export function RadioListItem({
|
|
|
157
162
|
return;
|
|
158
163
|
}
|
|
159
164
|
context.onChange(value);
|
|
160
|
-
}
|
|
165
|
+
}
|
|
166
|
+
// A consumer onClick rides on the radio input itself, so it fires for
|
|
167
|
+
// both direct control clicks and row-surface clicks the row delegates
|
|
168
|
+
// to the input — the same routing CheckboxListItem uses.
|
|
169
|
+
,
|
|
170
|
+
onClick: onClick,
|
|
161
171
|
"aria-describedby": description ? descriptionID : undefined,
|
|
162
172
|
...stylex.props(styles.input, wrapperSizeStyles[size], isDisabled && styles.inputDisabled)
|
|
163
173
|
}), /*#__PURE__*/_jsx("span", {
|
|
@@ -172,35 +182,55 @@ export function RadioListItem({
|
|
|
172
182
|
})
|
|
173
183
|
})]
|
|
174
184
|
});
|
|
175
|
-
const mediaContent = startContent
|
|
185
|
+
const mediaContent = isRenderable(startContent) ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
176
186
|
children: [radioCircle, startContent]
|
|
177
187
|
}) : radioCircle;
|
|
178
|
-
return /*#__PURE__*/_jsx(
|
|
188
|
+
return /*#__PURE__*/_jsx(Item, {
|
|
179
189
|
ref: ref,
|
|
180
|
-
|
|
190
|
+
startContent: mediaContent
|
|
191
|
+
// Delegate row-surface clicks (label text, description, and the empty
|
|
192
|
+
// hover area) to the radio input. The input stays the option's sole
|
|
193
|
+
// focusable control, so the row adds no second tab stop.
|
|
194
|
+
,
|
|
195
|
+
interactiveRef: radioRef,
|
|
196
|
+
isDisabled: isDisabled,
|
|
197
|
+
label: /*#__PURE__*/_jsx("span", {
|
|
198
|
+
children: label
|
|
199
|
+
}),
|
|
200
|
+
description: isRenderable(description) ? /*#__PURE__*/_jsx("span", {
|
|
201
|
+
id: descriptionID,
|
|
202
|
+
children: description
|
|
203
|
+
}) : undefined,
|
|
204
|
+
endContent: endContent,
|
|
205
|
+
xstyle: [
|
|
181
206
|
// Hover reaches the radio visual through this ancestor marker rather
|
|
182
|
-
// than props, so hovering the row tints the control.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
207
|
+
// than props, so hovering the row tints the control. The marker rides
|
|
208
|
+
// the painting row element (Item), the same element that carries the
|
|
209
|
+
// theme target, so a theme's hover styling stays in step with the tint.
|
|
210
|
+
!isDisabled && indicatorScope,
|
|
211
|
+
// Restore the bare default look: zero Item's padding/radius and its
|
|
212
|
+
// interactive hover/press background. Applied after Item's own base
|
|
213
|
+
// styles so it wins within the base layer; a `radio-list-item` theme
|
|
214
|
+
// still overrides it from the higher `astryx-theme` layer.
|
|
215
|
+
rowStyles.root, xstyle],
|
|
216
|
+
...mergeProps(
|
|
217
|
+
// One target for every row, carrying its size and runtime state so a
|
|
218
|
+
// theme can express "selected option at large" or restyle disabled
|
|
219
|
+
// rows without reaching for structural selectors. It lands on the
|
|
220
|
+
// element Item paints — the row surface — so a theme styling
|
|
221
|
+
// `radio-list-item`'s background/padding/borderRadius (and its
|
|
222
|
+
// `:hover`) actually takes effect from the `astryx-theme` layer, even
|
|
223
|
+
// though the component zeroes those by default. Converges with how
|
|
224
|
+
// ListItem lands `list-item` on the same element as `astryx-item`.
|
|
225
|
+
themeProps('radio-list-item', {
|
|
226
|
+
size,
|
|
227
|
+
selected: isChecked ? 'selected' : null,
|
|
228
|
+
disabled: isDisabled ? 'disabled' : null
|
|
229
|
+
}), {
|
|
230
|
+
className,
|
|
231
|
+
style
|
|
232
|
+
}),
|
|
233
|
+
...rest
|
|
204
234
|
});
|
|
205
235
|
}
|
|
206
236
|
RadioListItem.displayName = 'RadioListItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResizeHandle.d.ts","sourceRoot":"","sources":["../../src/Resizable/ResizeHandle.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAErC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CA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,EAC3B,SAAwB,EACxB,QAAQ,EAAE,YAAuB,EACjC,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,eAAsB,EACtB,aAAsB,EACtB,KAAK,EAAE,cAAc,EACrB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,iBAAiB,+BA6RnB;yBA5Se,YAAY"}
|
|
@@ -225,11 +225,11 @@ const _temp4 = {
|
|
|
225
225
|
};
|
|
226
226
|
const dynamicStyles = {
|
|
227
227
|
hitAreaOffsetX: dir => [_temp, {
|
|
228
|
-
"--x-qthpiu": `
|
|
229
|
-
"--x-sj6hyi": `
|
|
228
|
+
"--x-qthpiu": `translateX(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) - 6.5px))` != null ? `translateX(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) - 6.5px))` : undefined,
|
|
229
|
+
"--x-sj6hyi": `translateX(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) + 6.5px))` != null ? `translateX(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) + 6.5px))` : undefined
|
|
230
230
|
}],
|
|
231
231
|
hitAreaOffsetY: dir => [_temp2, {
|
|
232
|
-
"--x-transform": `
|
|
232
|
+
"--x-transform": `translateY(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) - 6.5px))` != null ? `translateY(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) - 6.5px))` : undefined
|
|
233
233
|
}],
|
|
234
234
|
pillOffsetX: dir => [_temp3, {
|
|
235
235
|
"--x-transform": `translate(calc(${dir} * (100% + ${spacingVars['--spacing-1']})), -50%)` != null ? `translate(calc(${dir} * (100% + ${spacingVars['--spacing-1']})), -50%)` : undefined
|
|
@@ -69,6 +69,27 @@ export interface SectionProps extends BaseProps<HTMLElement> {
|
|
|
69
69
|
* @default 4 (16px)
|
|
70
70
|
*/
|
|
71
71
|
padding?: SpacingStep;
|
|
72
|
+
/**
|
|
73
|
+
* Inline (horizontal) padding override. When set, overrides only the inline
|
|
74
|
+
* axis padding while preserving block padding from `padding` or the
|
|
75
|
+
* container theme default.
|
|
76
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
77
|
+
*/
|
|
78
|
+
paddingInline?: SpacingStep;
|
|
79
|
+
/**
|
|
80
|
+
* Inline-start padding override. Logical: the left edge in LTR, the right
|
|
81
|
+
* edge in RTL. Takes precedence over `paddingInline` and `padding` on that
|
|
82
|
+
* edge only; every other edge is left alone.
|
|
83
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
84
|
+
*/
|
|
85
|
+
paddingInlineStart?: SpacingStep;
|
|
86
|
+
/**
|
|
87
|
+
* Inline-end padding override. Logical: the right edge in LTR, the left
|
|
88
|
+
* edge in RTL. Takes precedence over `paddingInline` and `padding` on that
|
|
89
|
+
* edge only; every other edge is left alone.
|
|
90
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
91
|
+
*/
|
|
92
|
+
paddingInlineEnd?: SpacingStep;
|
|
72
93
|
/**
|
|
73
94
|
* Block (vertical) padding override. When set, overrides only the block
|
|
74
95
|
* axis padding while preserving inline padding from `padding` or the
|
|
@@ -76,6 +97,20 @@ export interface SectionProps extends BaseProps<HTMLElement> {
|
|
|
76
97
|
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
77
98
|
*/
|
|
78
99
|
paddingBlock?: SpacingStep;
|
|
100
|
+
/**
|
|
101
|
+
* Block-start (top) padding override. Takes precedence over `paddingBlock`
|
|
102
|
+
* and `padding` on that edge only; the block-end edge and both inline edges
|
|
103
|
+
* are left alone.
|
|
104
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
105
|
+
*/
|
|
106
|
+
paddingBlockStart?: SpacingStep;
|
|
107
|
+
/**
|
|
108
|
+
* Block-end (bottom) padding override. Takes precedence over `paddingBlock`
|
|
109
|
+
* and `padding` on that edge only; the block-start edge and both inline
|
|
110
|
+
* edges are left alone.
|
|
111
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
112
|
+
*/
|
|
113
|
+
paddingBlockEnd?: SpacingStep;
|
|
79
114
|
}
|
|
80
115
|
/**
|
|
81
116
|
* A section container with background variants.
|
|
@@ -95,7 +130,7 @@ export interface SectionProps extends BaseProps<HTMLElement> {
|
|
|
95
130
|
* </Section>
|
|
96
131
|
* ```
|
|
97
132
|
*/
|
|
98
|
-
export declare function Section({ variant, width, height, maxWidth, minHeight, children, dividers, padding, paddingBlock, xstyle, className, style, ref, ...props }: SectionProps): import("react").JSX.Element;
|
|
133
|
+
export declare function Section({ variant, width, height, maxWidth, minHeight, children, dividers, padding, paddingInline, paddingInlineStart, paddingInlineEnd, paddingBlock, paddingBlockStart, paddingBlockEnd, xstyle, className, style, ref, ...props }: SectionProps): import("react").JSX.Element;
|
|
99
134
|
export declare namespace Section {
|
|
100
135
|
var displayName: string;
|
|
101
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../src/Section/Section.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../src/Section/Section.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAmB5C,OAAO,KAAK,EAAC,SAAS,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,EACP,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,YAAY,+BAgGd;yBApHe,OAAO"}
|
package/dist/Section/Section.js
CHANGED
|
@@ -17,7 +17,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
17
17
|
import "../theme/tokens.stylex.js";
|
|
18
18
|
import { colorVars } from "../theme/tokens.stylex.js";
|
|
19
19
|
import { container } from "../Layout/container.stylex.js";
|
|
20
|
-
import { paddingStyles, paddingBlockStyles, containerPaddingInlineVarStyles, containerPaddingBlockStartVarStyles, containerPaddingBlockEndVarStyles, sectionPaddingPropagationStyles, spacingStepToToken } from "../Layout/padding.stylex.js";
|
|
20
|
+
import { paddingStyles, paddingInlineStyles, paddingInlineStartStyles, paddingInlineEndStyles, paddingBlockStyles, paddingBlockStartStyles, paddingBlockEndStyles, containerPaddingInlineVarStyles, containerPaddingInlineStartVarStyles, containerPaddingInlineEndVarStyles, containerPaddingBlockStartVarStyles, containerPaddingBlockEndVarStyles, sectionPaddingPropagationStyles, spacingStepToToken } from "../Layout/padding.stylex.js";
|
|
21
21
|
import { mergeProps } from "../utils/index.js";
|
|
22
22
|
import { themeProps } from "../utils/themeProps.js";
|
|
23
23
|
|
|
@@ -130,7 +130,12 @@ export function Section({
|
|
|
130
130
|
children,
|
|
131
131
|
dividers,
|
|
132
132
|
padding,
|
|
133
|
+
paddingInline,
|
|
134
|
+
paddingInlineStart,
|
|
135
|
+
paddingInlineEnd,
|
|
133
136
|
paddingBlock,
|
|
137
|
+
paddingBlockStart,
|
|
138
|
+
paddingBlockEnd,
|
|
134
139
|
xstyle,
|
|
135
140
|
className,
|
|
136
141
|
style,
|
|
@@ -160,7 +165,12 @@ export function Section({
|
|
|
160
165
|
paddingInnerY: paddingToken,
|
|
161
166
|
paddingOuterX: paddingToken,
|
|
162
167
|
paddingOuterY: paddingToken
|
|
163
|
-
}), !useThemeDefault && effectivePadding !== 4 && paddingStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingInlineVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockStartVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockEndVarStyles[effectivePadding], !useThemeDefault && sectionPaddingPropagationStyles[effectivePadding],
|
|
168
|
+
}), !useThemeDefault && effectivePadding !== 4 && paddingStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingInlineVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockStartVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockEndVarStyles[effectivePadding], !useThemeDefault && sectionPaddingPropagationStyles[effectivePadding], paddingInline != null && paddingInlineStyles[paddingInline], paddingInline != null && containerPaddingInlineVarStyles[paddingInline], paddingBlock != null && paddingBlockStyles[paddingBlock], paddingBlock != null && containerPaddingBlockStartVarStyles[paddingBlock], paddingBlock != null && containerPaddingBlockEndVarStyles[paddingBlock],
|
|
169
|
+
// Per-edge overrides come last so they win over `paddingBlock`
|
|
170
|
+
// and `padding` on their own edge. The matching container var is
|
|
171
|
+
// updated alongside so bleed children (Table, Divider, nested
|
|
172
|
+
// Section) compensate against the padding actually applied.
|
|
173
|
+
paddingBlockStart != null && paddingBlockStartStyles[paddingBlockStart], paddingBlockStart != null && containerPaddingBlockStartVarStyles[paddingBlockStart], paddingBlockEnd != null && paddingBlockEndStyles[paddingBlockEnd], paddingBlockEnd != null && containerPaddingBlockEndVarStyles[paddingBlockEnd], paddingInlineStart != null && paddingInlineStartStyles[paddingInlineStart], paddingInlineStart != null && containerPaddingInlineStartVarStyles[paddingInlineStart], paddingInlineEnd != null && paddingInlineEndStyles[paddingInlineEnd], paddingInlineEnd != null && containerPaddingInlineEndVarStyles[paddingInlineEnd], variantStyles[variant], dividers?.includes('top') && dividerStyles.top, dividers?.includes('bottom') && dividerStyles.bottom, dividers?.includes('start') && dividerStyles.start, dividers?.includes('end') && dividerStyles.end)),
|
|
164
174
|
children: children
|
|
165
175
|
})
|
|
166
176
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlItem.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControlItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAe5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAI5C,MAAM,WAAW,yBAA0B,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAC7E,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"SegmentedControlItem.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControlItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAe5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAI5C,MAAM,WAAW,yBAA0B,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAC7E,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA8GD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,GAAG,EACH,KAAK,EACL,KAAK,EACL,aAAqB,EACrB,IAAI,EACJ,UAAkB,EAClB,OAAO,EAAE,WAAW,EACpB,MAAM,EACN,GAAG,IAAI,EACR,EAAE,yBAAyB,qBAmE3B;yBA7Ee,oBAAoB"}
|
|
@@ -44,13 +44,14 @@ const styles = {
|
|
|
44
44
|
k63SB2: "x1e4wzip",
|
|
45
45
|
kMwMTN: "xv1l7n4",
|
|
46
46
|
kkrTdU: "x1ypdohk",
|
|
47
|
+
khDVqt: "xuxw1ft",
|
|
47
48
|
k1ekBW: "x1vix5yk",
|
|
48
49
|
kIyJzY: "xuedmi6",
|
|
49
50
|
kAMwcw: "xlr8y92",
|
|
50
51
|
$$css: true
|
|
51
52
|
},
|
|
52
53
|
hover: {
|
|
53
|
-
kWkggS: "
|
|
54
|
+
kWkggS: "xoevpu5",
|
|
54
55
|
$$css: true
|
|
55
56
|
},
|
|
56
57
|
selected: {
|
|
@@ -68,6 +69,7 @@ const styles = {
|
|
|
68
69
|
},
|
|
69
70
|
fill: {
|
|
70
71
|
kUk6DE: "x98rzlu",
|
|
72
|
+
k7Eaqz: "xeuugli",
|
|
71
73
|
kjj79g: "xl56j7k",
|
|
72
74
|
$$css: true
|
|
73
75
|
},
|
|
@@ -184,6 +186,9 @@ export function SegmentedControlItem({
|
|
|
184
186
|
disabled: isItemDisabled ? 'disabled' : null
|
|
185
187
|
}), focusOutlineProps.focusVisible(styles.base, sizeStyles[size], isFill && styles.fill, isSelected && styles.selected, !isSelected && !isItemDisabled && styles.hover, isItemDisabled && styles.disabled, xstyle)),
|
|
186
188
|
children: [iconElement, !isLabelHidden && /*#__PURE__*/_jsx("span", {
|
|
189
|
+
...{
|
|
190
|
+
className: "xb3r6kr xlyipyv xeuugli"
|
|
191
|
+
},
|
|
187
192
|
children: label
|
|
188
193
|
})]
|
|
189
194
|
});
|
|
@@ -137,7 +137,8 @@ interface SelectorPropsBase<T extends SelectorOptionType = SelectorOptionType> e
|
|
|
137
137
|
*/
|
|
138
138
|
labelTooltip?: string;
|
|
139
139
|
/**
|
|
140
|
-
* Icon displayed at the start of the selector trigger.
|
|
140
|
+
* Icon displayed at the start of the selector trigger. Takes precedence over
|
|
141
|
+
* the selected option's own `icon`, which the trigger otherwise renders.
|
|
141
142
|
*/
|
|
142
143
|
startIcon?: ReactNode | IconType;
|
|
143
144
|
/**
|
|
@@ -145,6 +146,30 @@ interface SelectorPropsBase<T extends SelectorOptionType = SelectorOptionType> e
|
|
|
145
146
|
* Only called for selectable options (not dividers/sections).
|
|
146
147
|
*/
|
|
147
148
|
renderOption?: (option: SelectorOptionData) => ReactNode;
|
|
149
|
+
/**
|
|
150
|
+
* Custom render function for the selected option inside the closed trigger.
|
|
151
|
+
* Only called when something is selected; the placeholder is unaffected.
|
|
152
|
+
*
|
|
153
|
+
* Passing this does not change the trigger's height — what it draws does. A
|
|
154
|
+
* one-line value measures exactly the `size` token, so the control still
|
|
155
|
+
* lines up with the Buttons and inputs beside it; each further line of
|
|
156
|
+
* content adds one text line. Inside an `InputGroup` the group owns the row
|
|
157
|
+
* height: the trigger clamps its value box to that row, so a `SelectorOption`
|
|
158
|
+
* folds onto one line and ellipsizes, and anything taller than the row is cut
|
|
159
|
+
* off at it rather than bleeding over the rows above and below.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```
|
|
163
|
+
* renderValue={option => (
|
|
164
|
+
* <SelectorOption
|
|
165
|
+
* icon={option.icon}
|
|
166
|
+
* label={option.label}
|
|
167
|
+
* description={option.description}
|
|
168
|
+
* />
|
|
169
|
+
* )}
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
renderValue?: (option: SelectorOptionData) => ReactNode;
|
|
148
173
|
/**
|
|
149
174
|
* Which edge of the option row carries the selected mark. `start` reserves a
|
|
150
175
|
* mark column ahead of every label so they stay aligned, the way a native
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Selector.d.ts","sourceRoot":"","sources":["../../src/Selector/Selector.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EASZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE5D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAEpD,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAgBtD,OAAO,KAAK,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Selector.d.ts","sourceRoot":"","sources":["../../src/Selector/Selector.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EASZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE5D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAEpD,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAgBtD,OAAO,KAAK,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAepE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AA0W9C,MAAM,MAAM,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