@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":"containerReveal.stylex.d.ts","sourceRoot":"","sources":["../../src/hooks/containerReveal.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAU3C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"containerReveal.stylex.d.ts","sourceRoot":"","sources":["../../src/hooks/containerReveal.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAU3C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+OjB,CAAC"}
|
|
@@ -29,30 +29,30 @@ const HOVER_DELAY = 'var(--_hover-delay, 0s)';
|
|
|
29
29
|
export const styles = {
|
|
30
30
|
container: {
|
|
31
31
|
"--_hover-delay": "xhg274n",
|
|
32
|
-
"--_reveal-opacity": "xct0gwe
|
|
33
|
-
"--_reveal-position": "xp0pj8v
|
|
34
|
-
"--_reveal-delay": "x1xiarpw
|
|
35
|
-
"--_reveal-delay-reduced": "xdjmrzf
|
|
36
|
-
"--_conceal-opacity": "x1kgmhs9
|
|
37
|
-
"--_fade-delay": "x13l1x9d
|
|
32
|
+
"--_reveal-opacity": "xct0gwe x2xrgwu xi33vf3 xi7d7de",
|
|
33
|
+
"--_reveal-position": "xp0pj8v x1or4zte xoa21yc xarvkxi",
|
|
34
|
+
"--_reveal-delay": "x1xiarpw xi1ebb6 x1mjsb9v x1pn63d7",
|
|
35
|
+
"--_reveal-delay-reduced": "xdjmrzf xvd8mm8 x1z42dm xm1aeao",
|
|
36
|
+
"--_conceal-opacity": "x1kgmhs9 x1316hva",
|
|
37
|
+
"--_fade-delay": "x13l1x9d x14nxqze x1wfyzv7 x1hl81f0",
|
|
38
38
|
$$css: true
|
|
39
39
|
},
|
|
40
40
|
stateInactive: {
|
|
41
|
-
"--_reveal-opacity": "xct0gwe
|
|
42
|
-
"--_reveal-position": "xp0pj8v
|
|
43
|
-
"--_reveal-delay": "x1xiarpw
|
|
44
|
-
"--_reveal-delay-reduced": "xdjmrzf
|
|
45
|
-
"--_conceal-opacity": "x1kgmhs9
|
|
46
|
-
"--_fade-delay": "x13l1x9d
|
|
41
|
+
"--_reveal-opacity": "xct0gwe xfqgg65 xi33vf3 xi7d7de",
|
|
42
|
+
"--_reveal-position": "xp0pj8v x17ock8y xoa21yc xarvkxi",
|
|
43
|
+
"--_reveal-delay": "x1xiarpw x1tx49wl x1mjsb9v x1pn63d7",
|
|
44
|
+
"--_reveal-delay-reduced": "xdjmrzf xap96qf x1z42dm xm1aeao",
|
|
45
|
+
"--_conceal-opacity": "x1kgmhs9 xuzfaso",
|
|
46
|
+
"--_fade-delay": "x13l1x9d xq03417 x1wfyzv7 x1hl81f0",
|
|
47
47
|
$$css: true
|
|
48
48
|
},
|
|
49
49
|
stateActive: {
|
|
50
|
-
"--_reveal-opacity": "x5setjs
|
|
51
|
-
"--_reveal-position": "x1r6s5ct
|
|
52
|
-
"--_reveal-delay": "x1dejzja
|
|
53
|
-
"--_reveal-delay-reduced": "xdjmrzf
|
|
54
|
-
"--_conceal-opacity": "x9pmotm
|
|
55
|
-
"--_fade-delay": "x13l1x9d
|
|
50
|
+
"--_reveal-opacity": "x5setjs x2xrgwu xi33vf3 xi7d7de",
|
|
51
|
+
"--_reveal-position": "x1r6s5ct x1or4zte xoa21yc xarvkxi",
|
|
52
|
+
"--_reveal-delay": "x1dejzja x1t6fdr0 x1mjsb9v x1pn63d7",
|
|
53
|
+
"--_reveal-delay-reduced": "xdjmrzf xap96qf x1z42dm xm1aeao",
|
|
54
|
+
"--_conceal-opacity": "x9pmotm x1316hva",
|
|
55
|
+
"--_fade-delay": "x13l1x9d xq03417 x1wfyzv7 x1hl81f0",
|
|
56
56
|
$$css: true
|
|
57
57
|
},
|
|
58
58
|
hoverDelay: delay => [{
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ScrollbarGutterHold {
|
|
2
|
+
/**
|
|
3
|
+
* Call once the lock's own styles are applied: measures whether the element
|
|
4
|
+
* grew anyway and, only then, pads the difference away.
|
|
5
|
+
*/
|
|
6
|
+
settle(): void;
|
|
7
|
+
/** Call on unlock: restores everything this hold changed. */
|
|
8
|
+
release(): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Keeps `element`'s content box the width it is right now, across a scroll
|
|
12
|
+
* lock that is about to hide the document's scrollbar.
|
|
13
|
+
*
|
|
14
|
+
* Call it *before* applying the lock's styles, then {@link
|
|
15
|
+
* ScrollbarGutterHold.settle} immediately after, and {@link
|
|
16
|
+
* ScrollbarGutterHold.release} on unlock:
|
|
17
|
+
*
|
|
18
|
+
* ```
|
|
19
|
+
* const hold = holdScrollbarGutter(document.body);
|
|
20
|
+
* body.style.position = 'fixed';
|
|
21
|
+
* hold.settle();
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* Overlay scrollbars (mobile, default macOS) take no layout space, so there is
|
|
25
|
+
* nothing to hold and nothing is touched.
|
|
26
|
+
*/
|
|
27
|
+
export declare function holdScrollbarGutter(element: HTMLElement): ScrollbarGutterHold;
|
|
28
|
+
//# sourceMappingURL=scrollbarGutter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollbarGutter.d.ts","sourceRoot":"","sources":["../../src/hooks/scrollbarGutter.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,MAAM,IAAI,IAAI,CAAC;IACf,6DAA6D;IAC7D,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,mBAAmB,CA+D7E"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file scrollbarGutter.ts
|
|
5
|
+
* @input The element a scroll lock pins, plus live layout measurements
|
|
6
|
+
* @output Exports holdScrollbarGutter and the ScrollbarGutterHold it returns
|
|
7
|
+
* @position Internal hook utility; used by useScrollLock and MobileNav so that
|
|
8
|
+
* locking background scroll does not resize the layout viewport.
|
|
9
|
+
*
|
|
10
|
+
* Locking scroll hides the document's scrollbar. Where that scrollbar is a
|
|
11
|
+
* classic (space-taking) one — Windows/Linux desktop, and macOS set to
|
|
12
|
+
* "Always" show scroll bars — hiding it widens the layout viewport by the
|
|
13
|
+
* scrollbar's width and the whole page jumps sideways behind the overlay.
|
|
14
|
+
*
|
|
15
|
+
* The fix is `scrollbar-gutter: stable`, which holds the gutter open once the
|
|
16
|
+
* scrollbar goes away. Being a real layout change it holds `position: fixed`
|
|
17
|
+
* chrome (sticky headers, toast viewports) as well as in-flow content, which
|
|
18
|
+
* padding fundamentally cannot: fixed elements resolve against the viewport,
|
|
19
|
+
* not against the padded element.
|
|
20
|
+
*
|
|
21
|
+
* Padding is kept only as a fallback for engines without `scrollbar-gutter`
|
|
22
|
+
* (Safari shipped it in 18.2), and it is applied by measuring whether the
|
|
23
|
+
* element actually moved rather than by assuming it did.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
const NOOP = {
|
|
27
|
+
settle() {},
|
|
28
|
+
release() {}
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Keeps `element`'s content box the width it is right now, across a scroll
|
|
32
|
+
* lock that is about to hide the document's scrollbar.
|
|
33
|
+
*
|
|
34
|
+
* Call it *before* applying the lock's styles, then {@link
|
|
35
|
+
* ScrollbarGutterHold.settle} immediately after, and {@link
|
|
36
|
+
* ScrollbarGutterHold.release} on unlock:
|
|
37
|
+
*
|
|
38
|
+
* ```
|
|
39
|
+
* const hold = holdScrollbarGutter(document.body);
|
|
40
|
+
* body.style.position = 'fixed';
|
|
41
|
+
* hold.settle();
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* Overlay scrollbars (mobile, default macOS) take no layout space, so there is
|
|
45
|
+
* nothing to hold and nothing is touched.
|
|
46
|
+
*/
|
|
47
|
+
export function holdScrollbarGutter(element) {
|
|
48
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
49
|
+
return NOOP;
|
|
50
|
+
}
|
|
51
|
+
const root = document.documentElement;
|
|
52
|
+
const viewportWidth = root.clientWidth;
|
|
53
|
+
|
|
54
|
+
// 0 means "no layout to measure" (jsdom, and any non-visual environment),
|
|
55
|
+
// not "the scrollbar is as wide as the window".
|
|
56
|
+
if (viewportWidth === 0) {
|
|
57
|
+
return NOOP;
|
|
58
|
+
}
|
|
59
|
+
const previousGutter = root.style.scrollbarGutter;
|
|
60
|
+
const previousPadding = element.style.paddingRight;
|
|
61
|
+
const widthBefore = element.getBoundingClientRect().width;
|
|
62
|
+
let heldGutter = false;
|
|
63
|
+
let padded = false;
|
|
64
|
+
let settled = false;
|
|
65
|
+
|
|
66
|
+
// Only when a space-taking scrollbar is actually there. Holding the gutter
|
|
67
|
+
// open on a page that never had one would carve out 15px that was never
|
|
68
|
+
// reserved — the same shift, in the other direction.
|
|
69
|
+
if (window.innerWidth > viewportWidth) {
|
|
70
|
+
root.style.scrollbarGutter = 'stable';
|
|
71
|
+
heldGutter = true;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
settle() {
|
|
75
|
+
if (settled) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
settled = true;
|
|
79
|
+
|
|
80
|
+
// What the lock actually did to this element, rather than what we
|
|
81
|
+
// assumed it would do. 0 on any engine where the gutter held — and on a
|
|
82
|
+
// page that already sets `scrollbar-gutter: stable` itself, where the
|
|
83
|
+
// scrollbar was never taking the space back.
|
|
84
|
+
const grew = element.getBoundingClientRect().width - widthBefore;
|
|
85
|
+
if (grew <= 0) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const existing = Number.parseFloat(window.getComputedStyle(element).paddingRight) || 0;
|
|
89
|
+
element.style.paddingRight = `${existing + grew}px`;
|
|
90
|
+
padded = true;
|
|
91
|
+
},
|
|
92
|
+
release() {
|
|
93
|
+
if (padded) {
|
|
94
|
+
element.style.paddingRight = previousPadding;
|
|
95
|
+
padded = false;
|
|
96
|
+
}
|
|
97
|
+
if (heldGutter) {
|
|
98
|
+
root.style.scrollbarGutter = previousGutter;
|
|
99
|
+
heldGutter = false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a field's effective *required* state for `aria-required`, honoring a
|
|
3
|
+
* surrounding `FormLayout`'s `defaultOptionality`.
|
|
4
|
+
*
|
|
5
|
+
* Under `defaultOptionality="required"` a field is required unless it opts out
|
|
6
|
+
* with `isOptional`. The visible indicator is suppressed for the unmarked
|
|
7
|
+
* majority, so those fields must still expose `aria-required` — otherwise a
|
|
8
|
+
* sighted user reads them as required (form-wide default, no indicator) while a
|
|
9
|
+
* screen reader hears "not required". This closes that mismatch.
|
|
10
|
+
*
|
|
11
|
+
* Semantics only: this drives `aria-required`, never the native `required`
|
|
12
|
+
* attribute, so a layout-level default can't silently switch on browser
|
|
13
|
+
* validation bubbles. `isOptional` takes precedence, matching `FieldLabel`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useResolvedRequired({ isRequired, isOptional, }: {
|
|
16
|
+
isRequired?: boolean;
|
|
17
|
+
isOptional?: boolean;
|
|
18
|
+
}): boolean;
|
|
19
|
+
//# sourceMappingURL=useResolvedRequired.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResolvedRequired.d.ts","sourceRoot":"","sources":["../../src/hooks/useResolvedRequired.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,UAAkB,EAClB,UAAkB,GACnB,EAAE;IACD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,OAAO,CAGV"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file useResolvedRequired.ts
|
|
7
|
+
* @input Uses React, FormLayoutContext
|
|
8
|
+
* @output Exports useResolvedRequired
|
|
9
|
+
* @position Resolves a field's effective aria-required against the form default
|
|
10
|
+
*
|
|
11
|
+
* SYNC: When modified, update these files to stay in sync:
|
|
12
|
+
* - /packages/core/src/FormLayout/FormLayoutContext.ts (defaultOptionality source)
|
|
13
|
+
* - /packages/core/src/FormLayout/FormLayout.tsx (prop doc: aria-required behavior)
|
|
14
|
+
*/
|
|
15
|
+
import { use } from 'react';
|
|
16
|
+
import { FormLayoutContext } from "../FormLayout/FormLayoutContext.js";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Resolve a field's effective *required* state for `aria-required`, honoring a
|
|
20
|
+
* surrounding `FormLayout`'s `defaultOptionality`.
|
|
21
|
+
*
|
|
22
|
+
* Under `defaultOptionality="required"` a field is required unless it opts out
|
|
23
|
+
* with `isOptional`. The visible indicator is suppressed for the unmarked
|
|
24
|
+
* majority, so those fields must still expose `aria-required` — otherwise a
|
|
25
|
+
* sighted user reads them as required (form-wide default, no indicator) while a
|
|
26
|
+
* screen reader hears "not required". This closes that mismatch.
|
|
27
|
+
*
|
|
28
|
+
* Semantics only: this drives `aria-required`, never the native `required`
|
|
29
|
+
* attribute, so a layout-level default can't silently switch on browser
|
|
30
|
+
* validation bubbles. `isOptional` takes precedence, matching `FieldLabel`.
|
|
31
|
+
*/
|
|
32
|
+
export function useResolvedRequired({
|
|
33
|
+
isRequired = false,
|
|
34
|
+
isOptional = false
|
|
35
|
+
}) {
|
|
36
|
+
const {
|
|
37
|
+
defaultOptionality
|
|
38
|
+
} = use(FormLayoutContext);
|
|
39
|
+
return !isOptional && (isRequired || defaultOptionality === 'required');
|
|
40
|
+
}
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
* does not prevent body scroll behind modals. Restores scroll position
|
|
7
7
|
* on unlock.
|
|
8
8
|
*
|
|
9
|
+
* Pinning also hides the document's scrollbar, so the gutter that scrollbar
|
|
10
|
+
* occupied is held open for the duration of the lock — without it the page
|
|
11
|
+
* reflows sideways by ~15px the moment an overlay opens.
|
|
12
|
+
*
|
|
9
13
|
* @example
|
|
10
14
|
* ```
|
|
11
15
|
* useScrollLock(isOpen);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollLock.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollLock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useScrollLock.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollLock.ts"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAwDrD"}
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SYNC: When modified, update:
|
|
15
15
|
* - /packages/core/src/hooks/index.ts
|
|
16
|
+
* - /packages/core/src/hooks/scrollbarGutter.ts
|
|
16
17
|
*/
|
|
17
18
|
import { useEffect } from 'react';
|
|
19
|
+
import { holdScrollbarGutter } from "./scrollbarGutter.js";
|
|
18
20
|
let lockCount = 0;
|
|
19
21
|
let originalBodyState = null;
|
|
20
22
|
|
|
@@ -26,6 +28,10 @@ let originalBodyState = null;
|
|
|
26
28
|
* does not prevent body scroll behind modals. Restores scroll position
|
|
27
29
|
* on unlock.
|
|
28
30
|
*
|
|
31
|
+
* Pinning also hides the document's scrollbar, so the gutter that scrollbar
|
|
32
|
+
* occupied is held open for the duration of the lock — without it the page
|
|
33
|
+
* reflows sideways by ~15px the moment an overlay opens.
|
|
34
|
+
*
|
|
29
35
|
* @example
|
|
30
36
|
* ```
|
|
31
37
|
* useScrollLock(isOpen);
|
|
@@ -42,6 +48,9 @@ export function useScrollLock(isLocked) {
|
|
|
42
48
|
if (lockCount === 0) {
|
|
43
49
|
const scrollX = window.scrollX;
|
|
44
50
|
const scrollY = window.scrollY;
|
|
51
|
+
|
|
52
|
+
// Taken before the pinning styles below hide the scrollbar.
|
|
53
|
+
const gutter = holdScrollbarGutter(body);
|
|
45
54
|
originalBodyState = {
|
|
46
55
|
scrollX,
|
|
47
56
|
scrollY,
|
|
@@ -49,13 +58,15 @@ export function useScrollLock(isLocked) {
|
|
|
49
58
|
position: body.style.position,
|
|
50
59
|
top: body.style.top,
|
|
51
60
|
left: body.style.left,
|
|
52
|
-
right: body.style.right
|
|
61
|
+
right: body.style.right,
|
|
62
|
+
gutter
|
|
53
63
|
};
|
|
54
64
|
body.style.overflow = 'hidden';
|
|
55
65
|
body.style.position = 'fixed';
|
|
56
66
|
body.style.top = `-${scrollY}px`;
|
|
57
67
|
body.style.left = '0';
|
|
58
68
|
body.style.right = '0';
|
|
69
|
+
gutter.settle();
|
|
59
70
|
}
|
|
60
71
|
lockCount += 1;
|
|
61
72
|
return () => {
|
|
@@ -70,6 +81,7 @@ export function useScrollLock(isLocked) {
|
|
|
70
81
|
body.style.top = state.top;
|
|
71
82
|
body.style.left = state.left;
|
|
72
83
|
body.style.right = state.right;
|
|
84
|
+
state.gutter.release();
|
|
73
85
|
window.scrollTo(state.scrollX, state.scrollY);
|
|
74
86
|
};
|
|
75
87
|
}, [isLocked]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternationalizationContext.d.ts","sourceRoot":"","sources":["../../src/i18n/InternationalizationContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InternationalizationContext.d.ts","sourceRoot":"","sources":["../../src/i18n/InternationalizationContext.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AAEjE,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,2DAKpC,CAAC"}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* - /packages/core/src/i18n/InternationalizationProvider.tsx
|
|
17
17
|
* - /packages/core/src/i18n/t.client.ts
|
|
18
18
|
* - /packages/core/src/i18n/useDirection.ts
|
|
19
|
+
* - /packages/core/src/i18n/useLocale.ts
|
|
20
|
+
* - /packages/core/src/i18n/useCollator.ts
|
|
19
21
|
* - /packages/core/src/i18n/getLocaleDirection.ts
|
|
20
22
|
* - /packages/core/src/i18n/index.ts
|
|
21
23
|
*/
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -8,12 +8,16 @@
|
|
|
8
8
|
* The public API is deliberately small:
|
|
9
9
|
* - InternationalizationProvider — provider component
|
|
10
10
|
* - useTranslator — hook returning a translator function
|
|
11
|
+
* - useLocale — hook returning the provider locale
|
|
12
|
+
* - useCollator — provider-bound locale-aware comparison
|
|
11
13
|
* - useDirection — hook returning the ambient text direction
|
|
12
14
|
* - getLocaleDirection — server-safe locale → direction helper
|
|
13
15
|
* - Translator — interface for consumer-injected runtimes
|
|
14
16
|
*
|
|
15
17
|
* SYNC: When modified, update these files to stay in sync:
|
|
16
18
|
* - /packages/core/src/index.ts
|
|
19
|
+
* - /packages/core/src/i18n/useLocale.ts
|
|
20
|
+
* - /packages/core/src/i18n/useCollator.ts
|
|
17
21
|
* - /packages/core/src/i18n/useDirection.ts
|
|
18
22
|
* - /packages/core/src/i18n/getLocaleDirection.ts
|
|
19
23
|
*/
|
|
@@ -23,6 +27,8 @@ export { InternationalizationContext } from './InternationalizationContext';
|
|
|
23
27
|
export type { InternationalizationContextValue } from './InternationalizationContext';
|
|
24
28
|
export { useTranslator } from './useTranslator';
|
|
25
29
|
export type { TranslatorFn } from './useTranslator';
|
|
30
|
+
export { useLocale } from './useLocale';
|
|
31
|
+
export { useCollator } from './useCollator';
|
|
26
32
|
export { useDirection } from './useDirection';
|
|
27
33
|
export { getLocaleDirection } from './getLocaleDirection';
|
|
28
34
|
export type { Translator } from './translator';
|
package/dist/i18n/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAC,4BAA4B,EAAC,MAAM,gCAAgC,CAAC;AAC5E,YAAY,EAAC,iCAAiC,EAAC,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAC,2BAA2B,EAAC,MAAM,+BAA+B,CAAC;AAC1E,YAAY,EAAC,gCAAgC,EAAC,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,YAAY,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAC7C,YAAY,EACV,MAAM,EACN,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,SAAS,GACV,MAAM,SAAS,CAAC"}
|
package/dist/i18n/index.js
CHANGED
|
@@ -10,12 +10,16 @@
|
|
|
10
10
|
* The public API is deliberately small:
|
|
11
11
|
* - InternationalizationProvider — provider component
|
|
12
12
|
* - useTranslator — hook returning a translator function
|
|
13
|
+
* - useLocale — hook returning the provider locale
|
|
14
|
+
* - useCollator — provider-bound locale-aware comparison
|
|
13
15
|
* - useDirection — hook returning the ambient text direction
|
|
14
16
|
* - getLocaleDirection — server-safe locale → direction helper
|
|
15
17
|
* - Translator — interface for consumer-injected runtimes
|
|
16
18
|
*
|
|
17
19
|
* SYNC: When modified, update these files to stay in sync:
|
|
18
20
|
* - /packages/core/src/index.ts
|
|
21
|
+
* - /packages/core/src/i18n/useLocale.ts
|
|
22
|
+
* - /packages/core/src/i18n/useCollator.ts
|
|
19
23
|
* - /packages/core/src/i18n/useDirection.ts
|
|
20
24
|
* - /packages/core/src/i18n/getLocaleDirection.ts
|
|
21
25
|
*/
|
|
@@ -23,5 +27,7 @@
|
|
|
23
27
|
export { InternationalizationProvider } from "./InternationalizationProvider.js";
|
|
24
28
|
export { InternationalizationContext } from "./InternationalizationContext.js";
|
|
25
29
|
export { useTranslator } from "./useTranslator.js";
|
|
30
|
+
export { useLocale } from "./useLocale.js";
|
|
31
|
+
export { useCollator } from "./useCollator.js";
|
|
26
32
|
export { useDirection } from "./useDirection.js";
|
|
27
33
|
export { getLocaleDirection } from "./getLocaleDirection.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns an `Intl.Collator` for the active provider locale, memoized across
|
|
3
|
+
* renders where the locale and options object are unchanged.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```
|
|
7
|
+
* const collator = useCollator({numeric: true});
|
|
8
|
+
* const sorted = [...items].sort((a, b) => collator.compare(a.name, b.name));
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare function useCollator(options?: Intl.CollatorOptions): Intl.Collator;
|
|
12
|
+
//# sourceMappingURL=useCollator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCollator.d.ts","sourceRoot":"","sources":["../../src/i18n/useCollator.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAMzE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file useCollator.ts
|
|
7
|
+
* @input InternationalizationContext (via use()), optional Intl.CollatorOptions
|
|
8
|
+
* @output A memoized Intl.Collator bound to the active locale
|
|
9
|
+
* @position Public provider-aware string-comparison hook. Exported from the
|
|
10
|
+
* i18n barrel for components, sibling packages, and consumers that need
|
|
11
|
+
* locale-correct sorting without constructing a raw Intl.Collator. Raw
|
|
12
|
+
* collator construction stays centralized in this hook.
|
|
13
|
+
*
|
|
14
|
+
* Falls back to `'en'` when called outside a provider, matching the
|
|
15
|
+
* useTranslator/useDirection/useLocale fallback.
|
|
16
|
+
*
|
|
17
|
+
* SYNC: When modified, update:
|
|
18
|
+
* - /packages/core/src/i18n/InternationalizationContext.ts
|
|
19
|
+
* - /packages/core/src/i18n/useLocale.ts
|
|
20
|
+
* - /packages/core/src/i18n/useCollator.doc.mjs
|
|
21
|
+
* - /packages/core/src/i18n/index.ts
|
|
22
|
+
* - /packages/core/src/i18n/__tests__/useCollator.test.tsx
|
|
23
|
+
*/
|
|
24
|
+
import { use, useMemo } from 'react';
|
|
25
|
+
import { InternationalizationContext } from "./InternationalizationContext.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns an `Intl.Collator` for the active provider locale, memoized across
|
|
29
|
+
* renders where the locale and options object are unchanged.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```
|
|
33
|
+
* const collator = useCollator({numeric: true});
|
|
34
|
+
* const sorted = [...items].sort((a, b) => collator.compare(a.name, b.name));
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export function useCollator(options) {
|
|
38
|
+
const ctx = use(InternationalizationContext);
|
|
39
|
+
return useMemo(() => new Intl.Collator(ctx.locale, options), [ctx.locale, options]);
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../src/i18n/useLocale.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAEpC,wBAAgB,SAAS,IAAI,MAAM,CAGlC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file useLocale.ts
|
|
7
|
+
* @input InternationalizationContext (via use())
|
|
8
|
+
* @output The active BCP 47 locale tag
|
|
9
|
+
* @position Public provider-aware locale accessor. Exported from the i18n
|
|
10
|
+
* barrel for components, sibling packages, and consumers that must thread
|
|
11
|
+
* the provider locale into pure formatting helpers. Returns `'en'` when
|
|
12
|
+
* called outside a provider, matching useTranslator/useDirection.
|
|
13
|
+
*
|
|
14
|
+
* This is the approved way to read the locale that feeds a formatting helper
|
|
15
|
+
* (`plainDateFormat`, `formatInstant`, chart formatters, …) or `useCollator()`.
|
|
16
|
+
* Reading `InternationalizationContext` directly for just its `locale` field,
|
|
17
|
+
* or reaching for `navigator.language`/a hardcoded literal, bypasses that
|
|
18
|
+
* provider-backed contract.
|
|
19
|
+
*
|
|
20
|
+
* SYNC: When modified, update:
|
|
21
|
+
* - /packages/core/src/i18n/InternationalizationContext.ts
|
|
22
|
+
* - /packages/core/src/i18n/useLocale.doc.mjs
|
|
23
|
+
* - /packages/core/src/i18n/index.ts
|
|
24
|
+
* - /packages/core/src/i18n/__tests__/useLocale.test.tsx
|
|
25
|
+
*/
|
|
26
|
+
import { use } from 'react';
|
|
27
|
+
import { InternationalizationContext } from "./InternationalizationContext.js";
|
|
28
|
+
export function useLocale() {
|
|
29
|
+
const ctx = use(InternationalizationContext);
|
|
30
|
+
return ctx.locale;
|
|
31
|
+
}
|
|
@@ -62,6 +62,11 @@ export type TokenValue = string | [light: string, dark: string];
|
|
|
62
62
|
* to the component selector. Supported pseudo-classes include `:hover`,
|
|
63
63
|
* `:focus-visible`, `:active`, `:checked`, `:disabled`, etc.
|
|
64
64
|
*
|
|
65
|
+
* A `:hover` override describes the ENABLED control: it is emitted with a
|
|
66
|
+
* guard that keeps it off disabled and `aria-disabled` elements, which
|
|
67
|
+
* `:hover` would otherwise still match. Style the disabled state through
|
|
68
|
+
* `:disabled` instead.
|
|
69
|
+
*
|
|
65
70
|
* @example
|
|
66
71
|
* ```ts
|
|
67
72
|
* {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineTheme.d.ts","sourceRoot":"","sources":["../../src/theme/defineTheme.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAC,gBAAgB,EAAa,MAAM,SAAS,CAAC;AAC1D,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EAAoB,KAAK,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAoB,KAAK,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAmB,KAAK,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAE3E,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,UAAU,CAAC;AAQpD,wCAAwC;AACxC,MAAM,MAAM,aAAa,GACrB,MAAM,OAAO,aAAa,GAC1B,MAAM,OAAO,eAAe,GAC5B,MAAM,OAAO,YAAY,GACzB,MAAM,OAAO,cAAc,GAC3B,MAAM,OAAO,aAAa,GAC1B,MAAM,OAAO,cAAc,GAC3B,MAAM,OAAO,cAAc,GAC3B,MAAM,OAAO,gBAAgB,GAC7B,MAAM,OAAO,YAAY,GACzB,MAAM,OAAO,kBAAkB,GAC/B,MAAM,OAAO,gBAAgB,GAC7B,MAAM,OAAO,kBAAkB,GAC/B,MAAM,OAAO,iBAAiB,CAAC;AAEnC,0DAA0D;AAC1D,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,eAAe,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"defineTheme.d.ts","sourceRoot":"","sources":["../../src/theme/defineTheme.ts"],"names":[],"mappings":"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"}
|
|
@@ -69,6 +69,11 @@ import { deepMergeComponents } from "./mergeComponents.js";
|
|
|
69
69
|
* to the component selector. Supported pseudo-classes include `:hover`,
|
|
70
70
|
* `:focus-visible`, `:active`, `:checked`, `:disabled`, etc.
|
|
71
71
|
*
|
|
72
|
+
* A `:hover` override describes the ENABLED control: it is emitted with a
|
|
73
|
+
* guard that keeps it off disabled and `aria-disabled` elements, which
|
|
74
|
+
* `:hover` would otherwise still match. Style the disabled state through
|
|
75
|
+
* `:disabled` instead.
|
|
76
|
+
*
|
|
72
77
|
* @example
|
|
73
78
|
* ```ts
|
|
74
79
|
* {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivedVarRegistry.d.ts","sourceRoot":"","sources":["../../src/theme/derivedVarRegistry.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,eAAe;IAC9B,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,iFAAiF;IACjF,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"derivedVarRegistry.d.ts","sourceRoot":"","sources":["../../src/theme/derivedVarRegistry.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,eAAe;IAC9B,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,iFAAiF;IACjF,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CA8ChE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,eAAe,EAAE,CAMnB"}
|
|
@@ -77,6 +77,13 @@ export const derivedVarRegistry = {
|
|
|
77
77
|
property: 'borderRadius',
|
|
78
78
|
vars: ['--_hovercard-radius']
|
|
79
79
|
}],
|
|
80
|
+
'number-input': [{
|
|
81
|
+
property: 'padding',
|
|
82
|
+
expand: 'container'
|
|
83
|
+
}, {
|
|
84
|
+
property: 'borderRadius',
|
|
85
|
+
vars: ['--_field-radius']
|
|
86
|
+
}],
|
|
80
87
|
popover: [{
|
|
81
88
|
property: 'borderRadius',
|
|
82
89
|
vars: ['--_popover-radius']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateThemeRules.d.ts","sourceRoot":"","sources":["../../src/theme/generateThemeRules.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"generateThemeRules.d.ts","sourceRoot":"","sources":["../../src/theme/generateThemeRules.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAgGhD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,kFAAkF;IAClF,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AA8LD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,EAAE,CAoChE;AAkRD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,GAAG,eAAe,CAe5E;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CA4E9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,cAAc,CA2BpE"}
|