@astryxdesign/core 0.7.17-canary.gdaeb596 → 0.7.17-canary.gdcdd9fa
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/README.md +21 -7
- package/dist/AppShell/AppShell.d.ts +7 -3
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +44 -10
- package/dist/AppShell/unreadWidthPoint.d.ts +29 -0
- package/dist/AppShell/unreadWidthPoint.d.ts.map +1 -0
- package/dist/AppShell/unreadWidthPoint.js +134 -0
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +1 -0
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +2 -2
- package/dist/Banner/Banner.d.ts +6 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -29
- package/dist/Breadcrumbs/BreadcrumbItem.js +4 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +4 -0
- package/dist/Calendar/styles.d.ts +10 -6
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +7 -3
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +4 -4
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +8 -4
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +7 -0
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +1 -1
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +3 -0
- package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
- package/dist/Chat/ChatSystemMessage.js +1 -0
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +7 -0
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +2 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts +2 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +69 -18
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +1 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +13 -1
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +2 -0
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +1 -0
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +3 -2
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +1 -0
- package/dist/DateInput/PickerWheel.d.ts.map +1 -1
- package/dist/DateInput/PickerWheel.js +3 -2
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +8 -8
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +7 -0
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +2 -1
- package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +7 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +3 -1
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +1 -0
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +1 -0
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +6 -3
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +31 -7
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +2 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +2 -2
- package/dist/Grid/Grid.d.ts +2 -1
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +5 -2
- package/dist/Heading/Heading.d.ts +1 -1
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +15 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +32 -2
- package/dist/Indicator/CheckboxIndicator.d.ts.map +1 -1
- package/dist/Indicator/CheckboxIndicator.js +12 -6
- package/dist/Indicator/RadioIndicator.d.ts.map +1 -1
- package/dist/Indicator/RadioIndicator.js +18 -4
- package/dist/Indicator/indicatorRegistry.d.ts +3 -26
- package/dist/Indicator/indicatorRegistry.d.ts.map +1 -1
- package/dist/Indicator/indicatorRegistry.js +2 -11
- package/dist/Indicator/themeIndicators.d.ts +15 -0
- package/dist/Indicator/themeIndicators.d.ts.map +1 -0
- package/dist/Indicator/themeIndicators.js +21 -0
- package/dist/Indicator/types.d.ts +14 -0
- package/dist/Indicator/types.d.ts.map +1 -1
- package/dist/Indicator/useThemeIndicator.d.ts +3 -0
- package/dist/Indicator/useThemeIndicator.d.ts.map +1 -0
- package/dist/Indicator/useThemeIndicator.js +19 -0
- package/dist/Item/Item.d.ts +6 -2
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +30 -2
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +7 -0
- package/dist/Layout/LayoutContainerContext.js +3 -3
- package/dist/Layout/LayoutContent.d.ts +2 -1
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +7 -2
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +324 -6
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +14 -6
- package/dist/List/ListContext.d.ts +38 -1
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +50 -2
- package/dist/List/ListItem.js +2 -2
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +72 -74
- package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
- package/dist/MetadataList/MetadataListItem.js +11 -3
- package/dist/MobileNav/MobileNav.d.ts +1 -1
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +3 -2
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +29 -8
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +6 -2
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +51 -25
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +33 -13
- package/dist/PowerSearch/PowerSearch.d.ts +2 -0
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +1 -1
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +51 -0
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +1 -1
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +1 -1
- package/dist/Resizable/resizableModel.d.ts +45 -3
- package/dist/Resizable/resizableModel.d.ts.map +1 -1
- package/dist/Resizable/resizableModel.js +91 -3
- package/dist/Resizable/useResizable.d.ts +1 -33
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +8 -72
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +1 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +17 -11
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +3 -1
- package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
- package/dist/Selector/useSelectorPresentation.js +9 -3
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +5 -1
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +1 -1
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +47 -33
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +20 -11
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +17 -1
- package/dist/Switch/useSwitchTouch.d.ts +17 -1
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +43 -3
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +3 -3
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +25 -16
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +31 -13
- package/dist/Table/TableBody.d.ts.map +1 -1
- package/dist/Table/TableBody.js +5 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +6 -0
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +3 -0
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +9 -1
- package/dist/Table/TableRowPlacementContext.d.ts +18 -0
- package/dist/Table/TableRowPlacementContext.d.ts.map +1 -0
- package/dist/Table/TableRowPlacementContext.js +41 -0
- package/dist/Table/TableSelectionToolbar.d.ts.map +1 -1
- package/dist/Table/TableSelectionToolbar.js +7 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +2 -2
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +5 -1
- package/dist/Text/text.stylex.d.ts +2 -2
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +13 -1
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +14 -2
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +55 -4
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +74 -39
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +47 -17
- package/dist/Toast/types.d.ts +8 -0
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +14 -7
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +1 -0
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +6 -29
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +33 -5
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +24 -8
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +12 -6
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +1 -1
- package/dist/TopNav/TopNavRenderContext.d.ts +13 -0
- package/dist/TopNav/TopNavRenderContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavRenderContext.js +24 -9
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +7 -1
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +1 -1
- package/dist/astryx.css +73 -22
- package/dist/gestures/GestureHost.d.ts +7 -0
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +37 -0
- package/dist/hooks/computeOverflow.d.ts.map +1 -1
- package/dist/hooks/computeOverflow.js +7 -0
- package/dist/hooks/scrollEdgeFade.d.ts +34 -0
- package/dist/hooks/scrollEdgeFade.d.ts.map +1 -0
- package/dist/hooks/scrollEdgeFade.js +173 -0
- package/dist/hooks/useGroupPressTracking.d.ts +1 -1
- package/dist/hooks/useGroupPressTracking.js +1 -1
- package/dist/hooks/useOverflow.d.ts +25 -2
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +137 -8
- package/dist/hooks/useResolvedRequired.d.ts +27 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
- package/dist/hooks/useResolvedRequired.js +30 -1
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +4 -2
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.js +8 -8
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +1 -0
- package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.js +1 -0
- package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextInput/TextInput.generated.js +1 -0
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.js +2 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +4 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +4 -0
- package/dist/internal/touch.d.ts +2 -0
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +5 -1
- package/dist/privateAttributes/mediaDarkPage.d.ts +5 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts.map +1 -0
- package/dist/privateAttributes/mediaDarkPage.js +27 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +2 -1
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/pressGroupItem.stylex.js +2 -1
- package/dist/privateAttributes/travelling.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/travelling.stylex.js +2 -2
- package/dist/theme/MediaDarkPage.d.ts +18 -0
- package/dist/theme/MediaDarkPage.d.ts.map +1 -0
- package/dist/theme/MediaDarkPage.js +35 -0
- package/dist/theme/MediaTheme.d.ts.map +1 -1
- package/dist/theme/MediaTheme.js +9 -1
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +81 -23
- package/dist/theme/defineTheme.d.ts +1 -1
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +0 -6
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +16 -0
- package/dist/theme/expandRadiusScale.d.ts +1 -2
- package/dist/theme/expandRadiusScale.d.ts.map +1 -1
- package/dist/theme/expandRadiusScale.js +1 -5
- package/dist/theme/generateThemeRules.d.ts +0 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +203 -205
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -1
- package/dist/theme/invertedSurfaceSide.d.ts +17 -0
- package/dist/theme/invertedSurfaceSide.d.ts.map +1 -0
- package/dist/theme/invertedSurfaceSide.js +47 -0
- package/dist/theme/resolveThemeValues.d.ts +5 -2
- package/dist/theme/resolveThemeValues.d.ts.map +1 -1
- package/dist/theme/resolveThemeValues.js +7 -1
- package/dist/theme/statusRoleDefaults.d.ts +43 -0
- package/dist/theme/statusRoleDefaults.d.ts.map +1 -0
- package/dist/theme/statusRoleDefaults.js +196 -0
- package/dist/theme/statusRoleDerivation.d.ts +4 -0
- package/dist/theme/statusRoleDerivation.d.ts.map +1 -1
- package/dist/theme/statusRoleDerivation.js +3 -1
- package/dist/theme/themeAdaptations.d.ts +24 -1
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +48 -5
- package/dist/theme/tokens.js +1 -1
- package/dist/theme/tokens.stylex.d.ts +4 -4
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +6 -5
- package/dist/theme/useTheme.d.ts +29 -0
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +56 -7
- package/dist/utils/hitArea.d.ts +28 -0
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +52 -18
- package/dist/utils/touchPresentation.d.ts +2 -2
- package/dist/utils/touchPresentation.d.ts.map +1 -1
- package/dist/utils/touchPresentation.js +10 -7
- package/dist/utils/touchPresentation.stylex.d.ts +4 -3
- package/dist/utils/touchPresentation.stylex.d.ts.map +1 -1
- package/dist/utils/touchPresentation.stylex.js +3 -3
- package/dist/utils/typeaheadMatch.d.ts +13 -0
- package/dist/utils/typeaheadMatch.d.ts.map +1 -1
- package/dist/utils/typeaheadMatch.js +15 -1
- package/locales/en.json +16 -0
- package/locales/pseudo.json +12 -0
- package/package.json +4 -4
- package/scripts/agent-doc-state.mjs +70 -3
- package/src/AppShell/AppShell.tsx +62 -18
- package/src/AppShell/unreadWidthPoint.ts +162 -0
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +1 -0
- package/src/Badge/Badge.tsx +5 -2
- package/src/Banner/Banner.doc.mjs +15 -0
- package/src/Banner/Banner.tsx +56 -45
- package/src/Breadcrumbs/BreadcrumbItem.tsx +4 -1
- package/src/Button/Button.tsx +6 -0
- package/src/Calendar/styles.ts +12 -3
- package/src/Chat/Chat.doc.mjs +1 -1
- package/src/Chat/ChatComposer.doc.mjs +3 -3
- package/src/Chat/ChatComposer.tsx +11 -5
- package/src/Chat/ChatComposerDrawer.tsx +11 -7
- package/src/Chat/ChatDictationButton.tsx +12 -0
- package/src/Chat/ChatMessageBubble.tsx +2 -2
- package/src/Chat/ChatPastedTextToken.tsx +1 -0
- package/src/Chat/ChatSendButton.tsx +5 -0
- package/src/Chat/ChatSystemMessage.tsx +1 -0
- package/src/Chat/ChatToolCalls.tsx +12 -0
- package/src/Chat/useTriggerMenu.tsx +2 -0
- package/src/CheckboxInput/CheckboxInput.doc.mjs +20 -0
- package/src/CheckboxInput/CheckboxInput.tsx +83 -26
- package/src/CheckboxList/CheckboxList.doc.mjs +15 -0
- package/src/CheckboxList/CheckboxListItem.doc.mjs +3 -3
- package/src/Citation/Citation.tsx +4 -1
- package/src/CodeBlock/CodeBlock.tsx +21 -1
- package/src/Collapsible/Collapsible.tsx +2 -0
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +30 -2
- package/src/ComplexSelector/ComplexSelector.tsx +7 -1
- package/src/ContextMenu/ContextMenu.tsx +6 -2
- package/src/ContextMenu/ContextMenuItem.doc.mjs +55 -5
- package/src/DateInput/MonthScroller.tsx +1 -0
- package/src/DateInput/PickerWheel.tsx +1 -0
- package/src/DateInput/TouchDateField.tsx +2 -0
- package/src/DateInput/Wheel.tsx +1 -0
- package/src/DateRangeInput/DateRangeInput.tsx +16 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +2 -0
- package/src/Dialog/Dialog.tsx +7 -0
- package/src/DropdownMenu/DropdownMenu.tsx +3 -1
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuItem.doc.mjs +5 -5
- package/src/DropdownMenu/DropdownMenuItem.tsx +1 -0
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +3 -3
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +1 -0
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +37 -9
- package/src/EmptyState/EmptyState.tsx +2 -0
- package/src/Field/Field.doc.mjs +1 -1
- package/src/Field/FieldLabel.doc.mjs +3 -3
- package/src/Field/FieldLabel.tsx +9 -2
- package/src/Grid/Grid.doc.mjs +6 -3
- package/src/Grid/Grid.tsx +5 -2
- package/src/Heading/Heading.tsx +24 -1
- package/src/Icon/Icon.doc.mjs +1 -1
- package/src/Icon/Icon.tsx +40 -2
- package/src/Indicator/CheckboxIndicator.tsx +11 -6
- package/src/Indicator/Indicator.doc.mjs +1 -1
- package/src/Indicator/RadioIndicator.tsx +31 -4
- package/src/Indicator/indicatorRegistry.ts +7 -23
- package/src/Indicator/themeIndicators.ts +29 -0
- package/src/Indicator/types.ts +14 -0
- package/src/Indicator/useThemeIndicator.ts +24 -0
- package/src/Item/Item.doc.mjs +3 -3
- package/src/Item/Item.tsx +48 -7
- package/src/Kbd/Kbd.tsx +12 -0
- package/src/Layout/Layout.doc.mjs +1 -1
- package/src/Layout/LayoutContainerContext.ts +3 -3
- package/src/Layout/LayoutContent.tsx +5 -2
- package/src/Lightbox/Lightbox.tsx +460 -8
- package/src/List/List.tsx +14 -2
- package/src/List/ListContext.tsx +60 -1
- package/src/List/ListItem.doc.mjs +11 -9
- package/src/List/ListItem.tsx +4 -4
- package/src/Markdown/Markdown.tsx +171 -168
- package/src/MetadataList/MetadataListItem.tsx +18 -3
- package/src/MobileNav/MobileNav.doc.mjs +126 -50
- package/src/MobileNav/MobileNav.tsx +3 -2
- package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
- package/src/MultiSelector/MultiSelector.tsx +43 -7
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -0
- package/src/NavMenu/NavMenu.doc.mjs +105 -2
- package/src/NumberInput/NumberInput.doc.mjs +12 -10
- package/src/NumberInput/NumberInput.tsx +17 -11
- package/src/OverflowList/OverflowList.doc.mjs +15 -0
- package/src/OverflowList/OverflowList.tsx +62 -26
- package/src/Pagination/Pagination.doc.mjs +12 -0
- package/src/Pagination/Pagination.tsx +40 -6
- package/src/PowerSearch/PowerSearch.doc.mjs +8 -8
- package/src/PowerSearch/PowerSearch.tsx +4 -1
- package/src/PowerSearch/PowerSearchEditPopover.tsx +1 -0
- package/src/RadioList/RadioList.tsx +63 -0
- package/src/RadioList/RadioListItem.tsx +4 -1
- package/src/Resizable/ResizeHandle.tsx +2 -3
- package/src/Resizable/resizableModel.ts +105 -3
- package/src/Resizable/useResizable.ts +14 -75
- package/src/SegmentedControl/SegmentedControlItem.tsx +1 -0
- package/src/Selector/Selector.doc.mjs +34 -7
- package/src/Selector/Selector.tsx +23 -16
- package/src/Selector/SelectorOption.doc.mjs +5 -5
- package/src/Selector/hooks.ts +2 -2
- package/src/Selector/useSelectorPresentation.ts +18 -3
- package/src/SideNav/SideNavHeading.tsx +5 -1
- package/src/SideNav/SideNavItem.doc.mjs +10 -10
- package/src/Slider/Slider.tsx +1 -0
- package/src/Spinner/Spinner.tsx +56 -41
- package/src/Stepper/Step.tsx +14 -3
- package/src/Stepper/Stepper.doc.mjs +14 -2
- package/src/Switch/Switch.doc.mjs +27 -5
- package/src/Switch/Switch.tsx +24 -9
- package/src/Switch/useSwitchTouch.ts +52 -3
- package/src/TabList/Tab.tsx +6 -0
- package/src/Table/BaseTable.tsx +46 -34
- package/src/Table/Table.doc.mjs +17 -2
- package/src/Table/Table.tsx +38 -14
- package/src/Table/TableBody.tsx +10 -1
- package/src/Table/TableCell.tsx +6 -0
- package/src/Table/TableHeaderCell.tsx +3 -0
- package/src/Table/TableRow.tsx +8 -1
- package/src/Table/TableRowPlacementContext.ts +58 -0
- package/src/Table/TableSelectionToolbar.tsx +12 -0
- package/src/Table/plugins/columnSettings/useTableColumnSettingsState.doc.mjs +1 -1
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +1 -0
- package/src/Table/plugins/sortable/useTableSortableState.doc.mjs +1 -1
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +8 -0
- package/src/Table/useTableColumnResize.doc.mjs +3 -3
- package/src/Table/useTableColumnSettings.doc.mjs +3 -3
- package/src/Table/useTableFiltering.doc.mjs +12 -6
- package/src/Table/useTableInfiniteScroll.doc.mjs +2 -2
- package/src/Table/useTablePagination.doc.mjs +24 -3
- package/src/Table/useTableSelectionState.doc.mjs +30 -2
- package/src/Table/useTableSortable.doc.mjs +28 -19
- package/src/Table/useTableStickyColumns.doc.mjs +3 -3
- package/src/Text/Heading.doc.mjs +2 -2
- package/src/Text/Text.doc.mjs +1 -1
- package/src/TextArea/TextArea.doc.mjs +5 -5
- package/src/TextArea/TextArea.tsx +18 -1
- package/src/TextInput/TextInput.doc.mjs +5 -5
- package/src/TextInput/TextInput.tsx +18 -1
- package/src/Timestamp/Timestamp.tsx +67 -4
- package/src/Toast/Toast.doc.mjs +15 -5
- package/src/Toast/Toast.tsx +80 -52
- package/src/Toast/ToastViewport.tsx +63 -19
- package/src/Toast/types.ts +8 -0
- package/src/Toast/useToast.tsx +18 -7
- package/src/Token/Token.tsx +1 -0
- package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
- package/src/Tokenizer/Tokenizer.tsx +10 -45
- package/src/Toolbar/Toolbar.tsx +55 -4
- package/src/TopNav/TopNav.doc.mjs +1 -1
- package/src/TopNav/TopNav.tsx +13 -3
- package/src/TopNav/TopNavHeading.tsx +12 -6
- package/src/TopNav/TopNavMenu.tsx +1 -0
- package/src/TopNav/TopNavRenderContext.ts +30 -9
- package/src/TreeList/TreeListItem.tsx +9 -1
- package/src/Typeahead/BaseTypeahead.tsx +1 -0
- package/src/Typeahead/Typeahead.doc.mjs +2 -2
- package/src/gestures/GestureHost.ts +34 -0
- package/src/gestures/README.md +9 -6
- package/src/hooks/computeOverflow.ts +10 -0
- package/src/hooks/scrollEdgeFade.ts +129 -0
- package/src/hooks/useGroupPressTracking.ts +1 -1
- package/src/hooks/useOverflow.ts +227 -13
- package/src/hooks/useResolvedRequired.ts +50 -1
- package/src/hooks/useTreeFocus.ts +8 -4
- package/src/hooks/useTypeahead.ts +12 -10
- package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +1 -0
- package/src/i18n/generated-english/TextArea/TextArea.generated.ts +1 -0
- package/src/i18n/generated-english/TextInput/TextInput.generated.ts +1 -0
- package/src/i18n/generated-english/Timestamp/Timestamp.generated.ts +2 -1
- package/src/i18n/generated-locales/en.generated.ts +5 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +5 -0
- package/src/internal/touch.ts +7 -0
- package/src/privateAttributes/mediaDarkPage.ts +27 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +2 -1
- package/src/privateAttributes/travelling.stylex.ts +6 -4
- package/src/reset.css +1 -1
- package/src/theme/MediaDarkPage.tsx +41 -0
- package/src/theme/MediaTheme.tsx +8 -1
- package/src/theme/Theme.doc.mjs +2 -2
- package/src/theme/Theme.tsx +116 -30
- package/src/theme/defineTheme.ts +0 -14
- package/src/theme/derivedVarRegistry.ts +9 -0
- package/src/theme/expandRadiusScale.ts +1 -5
- package/src/theme/generateThemeRules.ts +280 -338
- package/src/theme/index.ts +2 -4
- package/src/theme/invertedSurfaceSide.ts +65 -0
- package/src/theme/resolveThemeValues.ts +8 -2
- package/src/theme/statusRoleDefaults.ts +330 -0
- package/src/theme/statusRoleDerivation.ts +2 -1
- package/src/theme/themeAdaptations.ts +53 -5
- package/src/theme/tokens.stylex.ts +6 -5
- package/src/theme/tokens.ts +1 -1
- package/src/theme/useTheme.ts +76 -7
- package/src/utils/hitArea.ts +70 -33
- package/src/utils/touchPresentation.stylex.ts +7 -6
- package/src/utils/touchPresentation.ts +10 -7
- package/src/utils/typeaheadMatch.ts +20 -1
package/README.md
CHANGED
|
@@ -2,14 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Core UI components, theme system, and utilities for the Astryx design system. For project setup, see [Quick Start](#quick-start) below.
|
|
4
4
|
|
|
5
|
-
> **
|
|
5
|
+
> **Setup is install, then `init`.** Add the CLI at Core's version and run `init` once, before you write UI:
|
|
6
6
|
>
|
|
7
7
|
> ```bash
|
|
8
|
-
> npm install -D @astryxdesign/cli # or: pnpm add -D / yarn add -D / bun add -d
|
|
9
|
-
> npx @astryxdesign/cli init
|
|
8
|
+
> npm install -D -E @astryxdesign/cli@<core version> # or: pnpm add -D -E / yarn add -D -E / bun add -d --exact
|
|
9
|
+
> npx @astryxdesign/cli init # asks no questions
|
|
10
10
|
> ```
|
|
11
11
|
>
|
|
12
|
-
>
|
|
12
|
+
> Use the version of `@astryxdesign/core` you have. Keep `-E` when `package.json` pins Core exactly, as the starters do; leave it out when Core has a `^` or `~` range.
|
|
13
|
+
>
|
|
14
|
+
> `init` prints the getting-started steps (styles, theme) and saves the Astryx guide to your `AGENTS.md`/`CLAUDE.md`: components, templates, and design tokens, so any agent working in the project builds with Astryx instead of guessing. Read it before you write UI. Always use the scoped name: the unscoped `astryx` resolves to an unrelated npm package until `@astryxdesign/cli` is a dependency. See [Astryx CLI](#astryx-cli).
|
|
15
|
+
|
|
16
|
+
> **Building with an AI agent?** Ask the Astryx CLI before you write code. These commands work with or without the install above:
|
|
17
|
+
>
|
|
18
|
+
> ```bash
|
|
19
|
+
> npx @astryxdesign/cli build "<what you are building>" # the template, blocks and components to start from
|
|
20
|
+
> npx @astryxdesign/cli component <Name> # one component's props, variants and examples
|
|
21
|
+
> npx @astryxdesign/cli doctor --built . # checks the setup and the code you wrote
|
|
22
|
+
> ```
|
|
23
|
+
>
|
|
24
|
+
> The `.doc.mjs` files in this package are only part of what the CLI knows: it also has page templates, blocks and checks that no source file shows.
|
|
13
25
|
|
|
14
26
|
## Component Docs
|
|
15
27
|
|
|
@@ -31,7 +43,7 @@ panel slots into common page patterns (dashboards, settings, forms, detail pages
|
|
|
31
43
|
Wrap them in your own app chrome (`AppShell`, `TopNav`, `SideNav`) to add
|
|
32
44
|
global navigation.
|
|
33
45
|
|
|
34
|
-
Requires `@astryxdesign/cli`
|
|
46
|
+
Requires `@astryxdesign/cli` at Core's version: `npm install -D -E @astryxdesign/cli@<core version>` (leave out `-E` when Core has a `^` or `~` range).
|
|
35
47
|
|
|
36
48
|
```bash
|
|
37
49
|
astryx template --list # browse all page and block templates
|
|
@@ -77,13 +89,15 @@ astryx gap-report # report a missing capability
|
|
|
77
89
|
|
|
78
90
|
Astryx requires **React 19** or later (`react` and `react-dom` >= 19.0.0 are peer dependencies).
|
|
79
91
|
|
|
80
|
-
Install Astryx and
|
|
92
|
+
Install Astryx, a theme, and the CLI, then run `init` once:
|
|
81
93
|
|
|
82
94
|
```bash
|
|
83
95
|
npm install @astryxdesign/core @astryxdesign/theme-neutral @stylexjs/stylex
|
|
96
|
+
npm install -D @astryxdesign/cli
|
|
97
|
+
npx @astryxdesign/cli init # prints the getting-started steps; saves the Astryx guide to AGENTS.md
|
|
84
98
|
```
|
|
85
99
|
|
|
86
|
-
Then pick your setup below based on your framework and styling approach.
|
|
100
|
+
Then pick your setup below based on your framework and styling approach. The setup you pick wires the theme, so it replaces the theme step `init` prints.
|
|
87
101
|
|
|
88
102
|
### Next.js (simplest)
|
|
89
103
|
|
|
@@ -72,9 +72,13 @@ export interface MobileNavConfig {
|
|
|
72
72
|
breakpoint?: AppShellBreakpoint;
|
|
73
73
|
/**
|
|
74
74
|
* SSR hint: whether the initial render should assume mobile layout.
|
|
75
|
-
* Seeds the breakpoint state so the server-rendered HTML
|
|
76
|
-
*
|
|
77
|
-
*
|
|
75
|
+
* Seeds the breakpoint state so the server-rendered HTML is the phone
|
|
76
|
+
* layout, menu toggle included. Without it, when the theme keeps the
|
|
77
|
+
* standard width points, the server-rendered wide layout still paints
|
|
78
|
+
* without its inline side nav, and with only the top nav's heading and end
|
|
79
|
+
* content, below the breakpoint, and the toggle arrives when the page's
|
|
80
|
+
* script runs. Ignored when `breakpoint` is
|
|
81
|
+
* `none`, which is always non-mobile.
|
|
78
82
|
*
|
|
79
83
|
* Derive from the User-Agent header or a device-detection cookie
|
|
80
84
|
* in a server component, then pass down.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AA+Cf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAY5C,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AA6ChD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG,MAAM,CAAC;AAE9D;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAEhC;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,eAAe,GAAG,SAAS,CAAC;IAEhD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAwQD,wBAAgB,QAAQ,CAAC,EACvB,OAAoB,EACpB,MAAM,EACN,QAAQ,EACR,cAAc,EACd,aAAa,EAAE,UAAU,EACzB,MAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,qBAo1Bf;yBAn2Be,QAAQ"}
|
|
@@ -39,18 +39,20 @@ import { SideNavRenderContext } from "../SideNav/SideNavRenderContext.js";
|
|
|
39
39
|
import { SideNavShellContext } from "../SideNav/railMotion.js";
|
|
40
40
|
import { useAnimatedLayout } from "../hooks/useAnimatedLayout.js";
|
|
41
41
|
import { holdLayoutSwap, landLayoutGlide, layoutMotionFor, layoutStartFor, playLayoutFrames, playLayoutSwap, reportLayoutChange } from "../motion/animatedLayout.js";
|
|
42
|
-
import { TopNavRenderContext } from "../TopNav/TopNavRenderContext.js";
|
|
42
|
+
import { TopNavRenderContext, TopNavUnreadRegionContext } from "../TopNav/TopNavRenderContext.js";
|
|
43
43
|
import { TopNavMobileContentContext } from "../TopNav/TopNavMobileContentContext.js";
|
|
44
44
|
import { AppShellMobileContext } from "./AppShellMobileContext.js";
|
|
45
|
+
import { UNREAD_STYLES, unreadWidthPoint } from "./unreadWidthPoint.js";
|
|
45
46
|
import { AppShellNestingContext, useAppShellMainId } from "./useAppShellMainId.js";
|
|
46
47
|
import { mergeProps, isRenderable } from "../utils/index.js";
|
|
47
48
|
import { focusOutlineProps, focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
49
|
+
import { useIsHydrating } from "../hooks/useIsHydrating.js";
|
|
48
50
|
import { useMediaQuery } from "../hooks/useMediaQuery.js";
|
|
49
51
|
import { matchesMediaQuery } from "../utils/coarsePointer.js";
|
|
50
52
|
import { observeResize } from "../utils/sharedResizeObserver.js";
|
|
51
53
|
import { themeProps } from "../utils/themeProps.js";
|
|
52
54
|
import { useThemeDefinition } from "../theme/useTheme.js";
|
|
53
|
-
import { DEFAULT_WIDTH_BREAKPOINTS } from "../theme/themeAdaptations.js";
|
|
55
|
+
import { DEFAULT_WIDTH_BREAKPOINTS, widthBelowFeature } from "../theme/themeAdaptations.js";
|
|
54
56
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
55
57
|
import { attachScrollKeyboardDelegation } from "../hooks/scrollKeyboardDelegation.js";
|
|
56
58
|
import { observeMainOverflow } from "./observeMainOverflow.js";
|
|
@@ -171,6 +173,7 @@ const styles = {
|
|
|
171
173
|
kybGjl: "x1hl2dhg",
|
|
172
174
|
k63SB2: "x2mo6ok",
|
|
173
175
|
kGuDYH: "xjm74w1",
|
|
176
|
+
kLWn49: "xw6l6zx",
|
|
174
177
|
$$css: true
|
|
175
178
|
},
|
|
176
179
|
mainFocusTarget: {
|
|
@@ -185,6 +188,14 @@ const styles = {
|
|
|
185
188
|
kInvED: "x1wfwxd8 x1nw7mhf",
|
|
186
189
|
$$css: true
|
|
187
190
|
},
|
|
191
|
+
elevatedBackdrop: {
|
|
192
|
+
kVAEAm: "x10l6tqk",
|
|
193
|
+
kpwlN0: "x10a8y8t",
|
|
194
|
+
kWkggS: "x10xzikg",
|
|
195
|
+
krdFHd: "x183tx6i",
|
|
196
|
+
kfzvcC: "x47corl",
|
|
197
|
+
$$css: true
|
|
198
|
+
},
|
|
188
199
|
contentBgSurface: {
|
|
189
200
|
kWkggS: "x10xzikg",
|
|
190
201
|
$$css: true
|
|
@@ -319,14 +330,19 @@ export function AppShell({
|
|
|
319
330
|
// Mobile nav open state (controlled + uncontrolled)
|
|
320
331
|
// =========================================================================
|
|
321
332
|
const activeWidthBreakpoints = activeTheme?.__adaptations?.widthBreakpoints;
|
|
322
|
-
const
|
|
333
|
+
const breakpointWidth = sideNavBreakpoint === 'none' ? null : activeWidthBreakpoints?.[sideNavBreakpoint] ?? DEFAULT_WIDTH_BREAKPOINTS[sideNavBreakpoint];
|
|
334
|
+
const breakpointQuery = widthBelowFeature(breakpointWidth ?? 0);
|
|
335
|
+
const isMobileOnServer = breakpointWidth != null && mobileNavConfig?.defaultIsMobile === true;
|
|
336
|
+
const isBelowBreakpointNow = useMediaQuery(breakpointQuery, isMobileOnServer);
|
|
337
|
+
const hasReadWindow = !useIsHydrating();
|
|
323
338
|
// The client's first answer can differ from the server's. That correction
|
|
324
339
|
// is an urgent update, and it changes the mobile context above the page.
|
|
325
340
|
// React answers an urgent update above content it has not hydrated by
|
|
326
341
|
// rendering that content again in place of its server HTML. A deferred
|
|
327
342
|
// value takes the client's answer in a transition, which waits for that
|
|
328
343
|
// content to hydrate.
|
|
329
|
-
const
|
|
344
|
+
const layoutWidth = useDeferredValue(!hasReadWindow ? 'unread' : isBelowBreakpointNow ? 'mobile' : 'wide');
|
|
345
|
+
const isBelowBreakpoint = layoutWidth === 'unread' ? isMobileOnServer : layoutWidth === 'mobile';
|
|
330
346
|
const [uncontrolledMobileOpen, setUncontrolledMobileOpen] = useState(false);
|
|
331
347
|
const isMobileNavOpen = mobileNavConfig?.isOpen ?? uncontrolledMobileOpen;
|
|
332
348
|
|
|
@@ -493,6 +509,12 @@ export function AppShell({
|
|
|
493
509
|
// Determine if sideNav should show as overlay (mobile) or inline
|
|
494
510
|
// =========================================================================
|
|
495
511
|
const showSideNavInline = hasSideNav && !isBelowBreakpoint;
|
|
512
|
+
// Until the shell reads the window, a phone can be showing the server's wide
|
|
513
|
+
// layout. CSS then hides the inline side nav and flattens the elevated
|
|
514
|
+
// corner below the breakpoint. A theme that moves the point has no compiled
|
|
515
|
+
// rule, so its shell keeps the server's layout until it reads the window.
|
|
516
|
+
const unreadPoint = unreadWidthPoint(layoutWidth === 'unread', sideNavBreakpoint, breakpointWidth);
|
|
517
|
+
const unreadStyles = showSideNavInline && unreadPoint != null ? UNREAD_STYLES[unreadPoint] : undefined;
|
|
496
518
|
|
|
497
519
|
// Mobile nav rendering modes:
|
|
498
520
|
// 1. ReactNode shorthand — user provided <MobileNav> directly
|
|
@@ -541,13 +563,27 @@ export function AppShell({
|
|
|
541
563
|
value: "drawer-content",
|
|
542
564
|
children: sideNav
|
|
543
565
|
}) : null;
|
|
544
|
-
const
|
|
566
|
+
const topNavTakesMobileBar = !mobileNavDisabled && mobileNavReactNode == null;
|
|
567
|
+
// Until the shell reads the window, the server's full bar can be showing on
|
|
568
|
+
// a phone. The full bar then hides its start and center content below the
|
|
569
|
+
// breakpoint, as the mobile bar does. The toggle arrives when the shell
|
|
570
|
+
// reads the window. A theme that moves the point has no compiled rule, so
|
|
571
|
+
// its bar keeps the server's layout until then.
|
|
572
|
+
const unreadTopNavRegion = !isBelowBreakpoint && topNavTakesMobileBar && unreadPoint != null ? UNREAD_STYLES[unreadPoint].topNavRegion : null;
|
|
573
|
+
const topNavContent = hasTopNav ? isBelowBreakpoint && topNavTakesMobileBar ? /*#__PURE__*/_jsx(TopNavMobileContentContext, {
|
|
545
574
|
value: mobileContentValue,
|
|
546
575
|
children: /*#__PURE__*/_jsx(TopNavRenderContext, {
|
|
547
576
|
value: "mobile-bar",
|
|
548
577
|
children: topNav
|
|
549
578
|
})
|
|
550
|
-
}) :
|
|
579
|
+
}) :
|
|
580
|
+
/*#__PURE__*/
|
|
581
|
+
// Always present on this branch, so reading the window keeps the bar
|
|
582
|
+
// mounted.
|
|
583
|
+
_jsx(TopNavUnreadRegionContext, {
|
|
584
|
+
value: unreadTopNavRegion,
|
|
585
|
+
children: topNav
|
|
586
|
+
}) : null;
|
|
551
587
|
const headerInner = hasTopNav || hasBanner ? /*#__PURE__*/_jsxs(LayoutHeader, {
|
|
552
588
|
padding: 0,
|
|
553
589
|
hasDivider: navHasDividers && hasTopNav,
|
|
@@ -723,7 +759,7 @@ export function AppShell({
|
|
|
723
759
|
...themeProps('app-shell-sidenav', {
|
|
724
760
|
variant
|
|
725
761
|
}),
|
|
726
|
-
xstyle: [navAreaStyle, isAuto && stickyBgStyle, isAuto && styles.panelAutoFill],
|
|
762
|
+
xstyle: [navAreaStyle, isAuto && stickyBgStyle, isAuto && styles.panelAutoFill, unreadStyles?.sideNav],
|
|
727
763
|
children: /*#__PURE__*/_jsx(SideNavShellContext, {
|
|
728
764
|
value: sideNavShell,
|
|
729
765
|
children: sideNav
|
|
@@ -857,9 +893,7 @@ export function AppShell({
|
|
|
857
893
|
}[!!shouldElevateWithCorner << 0],
|
|
858
894
|
children: [shouldElevateWithCorner && /*#__PURE__*/_jsx("div", {
|
|
859
895
|
ref: backdropRef,
|
|
860
|
-
...
|
|
861
|
-
className: "x10l6tqk x10a8y8t x10xzikg x183tx6i x47corl"
|
|
862
|
-
}
|
|
896
|
+
...stylex.props(styles.elevatedBackdrop, unreadStyles?.corner)
|
|
863
897
|
}), mainInner]
|
|
864
898
|
});
|
|
865
899
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file unreadWidthPoint.ts
|
|
3
|
+
* @input The shell's layout state, its side nav breakpoint and the width the
|
|
4
|
+
* theme gives that breakpoint
|
|
5
|
+
* @output unreadWidthPoint (the standard width point below which a shell that
|
|
6
|
+
* has not read the window hides its phone-only regions) and UNREAD_STYLES
|
|
7
|
+
* (the compiled rule for each standard point: the inline side nav, the
|
|
8
|
+
* elevated corner and the top nav's start and center regions)
|
|
9
|
+
* @position Private to AppShell: its layout before it reads the window, and
|
|
10
|
+
* the only module that writes the standard width points as media keys.
|
|
11
|
+
* AppShell computes the point once and hands TopNav its region rule through
|
|
12
|
+
* TopNavUnreadRegionContext.
|
|
13
|
+
*/
|
|
14
|
+
import * as stylex from '@stylexjs/stylex';
|
|
15
|
+
import { type WidthBreakpointName } from '../theme/themeAdaptations.js';
|
|
16
|
+
/**
|
|
17
|
+
* The standard width point below which a shell that has not read the window
|
|
18
|
+
* shows its phone layout through CSS, or null. StyleX compiles media queries
|
|
19
|
+
* ahead of time, so only the standard points have a rule: a theme that moves
|
|
20
|
+
* the point keeps the server's layout until the shell reads the window.
|
|
21
|
+
*/
|
|
22
|
+
export declare function unreadWidthPoint(isUnread: boolean, breakpoint: WidthBreakpointName | 'none', breakpointWidth: number | null): WidthBreakpointName | null;
|
|
23
|
+
/** The rules for each standard width point. */
|
|
24
|
+
export declare const UNREAD_STYLES: Readonly<Record<WidthBreakpointName, {
|
|
25
|
+
sideNav: stylex.StyleXStyles;
|
|
26
|
+
corner: stylex.StyleXStyles;
|
|
27
|
+
topNavRegion: stylex.StyleXStyles;
|
|
28
|
+
}>>;
|
|
29
|
+
//# sourceMappingURL=unreadWidthPoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unreadWidthPoint.d.ts","sourceRoot":"","sources":["../../src/AppShell/unreadWidthPoint.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AAEnC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,mBAAmB,GAAG,MAAM,EACxC,eAAe,EAAE,MAAM,GAAG,IAAI,GAC7B,mBAAmB,GAAG,IAAI,CAM5B;AAsFD,+CAA+C;AAC/C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAClC,MAAM,CACJ,mBAAmB,EACnB;IACE,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;CACnC,CACF,CA2BF,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file unreadWidthPoint.ts
|
|
5
|
+
* @input The shell's layout state, its side nav breakpoint and the width the
|
|
6
|
+
* theme gives that breakpoint
|
|
7
|
+
* @output unreadWidthPoint (the standard width point below which a shell that
|
|
8
|
+
* has not read the window hides its phone-only regions) and UNREAD_STYLES
|
|
9
|
+
* (the compiled rule for each standard point: the inline side nav, the
|
|
10
|
+
* elevated corner and the top nav's start and center regions)
|
|
11
|
+
* @position Private to AppShell: its layout before it reads the window, and
|
|
12
|
+
* the only module that writes the standard width points as media keys.
|
|
13
|
+
* AppShell computes the point once and hands TopNav its region rule through
|
|
14
|
+
* TopNavUnreadRegionContext.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import * as stylex from '@stylexjs/stylex';
|
|
18
|
+
import "../theme/tokens.stylex.js";
|
|
19
|
+
import { radiusVars } from "../theme/tokens.stylex.js";
|
|
20
|
+
import { DEFAULT_WIDTH_BREAKPOINTS } from "../theme/themeAdaptations.js";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The standard width point below which a shell that has not read the window
|
|
24
|
+
* shows its phone layout through CSS, or null. StyleX compiles media queries
|
|
25
|
+
* ahead of time, so only the standard points have a rule: a theme that moves
|
|
26
|
+
* the point keeps the server's layout until the shell reads the window.
|
|
27
|
+
*/
|
|
28
|
+
export function unreadWidthPoint(isUnread, breakpoint, breakpointWidth) {
|
|
29
|
+
return isUnread && breakpoint !== 'none' && breakpointWidth === DEFAULT_WIDTH_BREAKPOINTS[breakpoint] ? breakpoint : null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// One rule per standard width point (`DEFAULT_WIDTH_BREAKPOINTS`). The
|
|
33
|
+
// queries use `not all and (min-width)`: StyleX lowers `(width < N)` to
|
|
34
|
+
// `(max-width: N - 0.01)`, which Chromium rounds up to N, so the rule would
|
|
35
|
+
// also apply at the point itself. Below the point, the inline side nav does
|
|
36
|
+
// not paint, the elevated backdrop loses its corner, and the top nav's start
|
|
37
|
+
// and center regions do not paint, as in the phone layout.
|
|
38
|
+
const sideNavStyles = {
|
|
39
|
+
sm: {
|
|
40
|
+
k1xSpc: "x1d592f6",
|
|
41
|
+
$$css: true
|
|
42
|
+
},
|
|
43
|
+
md: {
|
|
44
|
+
k1xSpc: "xgs58o8",
|
|
45
|
+
$$css: true
|
|
46
|
+
},
|
|
47
|
+
lg: {
|
|
48
|
+
k1xSpc: "xjzer9l",
|
|
49
|
+
$$css: true
|
|
50
|
+
},
|
|
51
|
+
xl: {
|
|
52
|
+
k1xSpc: "x1bwilkz",
|
|
53
|
+
$$css: true
|
|
54
|
+
},
|
|
55
|
+
"2xl": {
|
|
56
|
+
k1xSpc: "x1q9a9pi",
|
|
57
|
+
$$css: true
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const cornerStyles = {
|
|
61
|
+
sm: {
|
|
62
|
+
krdFHd: "x183tx6i xctd0pb",
|
|
63
|
+
$$css: true
|
|
64
|
+
},
|
|
65
|
+
md: {
|
|
66
|
+
krdFHd: "x183tx6i xc4oep8",
|
|
67
|
+
$$css: true
|
|
68
|
+
},
|
|
69
|
+
lg: {
|
|
70
|
+
krdFHd: "x183tx6i x16174yq",
|
|
71
|
+
$$css: true
|
|
72
|
+
},
|
|
73
|
+
xl: {
|
|
74
|
+
krdFHd: "x183tx6i x5asj52",
|
|
75
|
+
$$css: true
|
|
76
|
+
},
|
|
77
|
+
"2xl": {
|
|
78
|
+
krdFHd: "x183tx6i xnnrhfx",
|
|
79
|
+
$$css: true
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
// The regions are flex rows: a StyleX value replaces the whole property, so
|
|
83
|
+
// the rule keeps `flex` above the point.
|
|
84
|
+
const topNavRegionStyles = {
|
|
85
|
+
sm: {
|
|
86
|
+
k1xSpc: "x78zum5 x1d592f6",
|
|
87
|
+
$$css: true
|
|
88
|
+
},
|
|
89
|
+
md: {
|
|
90
|
+
k1xSpc: "x78zum5 xgs58o8",
|
|
91
|
+
$$css: true
|
|
92
|
+
},
|
|
93
|
+
lg: {
|
|
94
|
+
k1xSpc: "x78zum5 xjzer9l",
|
|
95
|
+
$$css: true
|
|
96
|
+
},
|
|
97
|
+
xl: {
|
|
98
|
+
k1xSpc: "x78zum5 x1bwilkz",
|
|
99
|
+
$$css: true
|
|
100
|
+
},
|
|
101
|
+
"2xl": {
|
|
102
|
+
k1xSpc: "x78zum5 x1q9a9pi",
|
|
103
|
+
$$css: true
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/** The rules for each standard width point. */
|
|
108
|
+
export const UNREAD_STYLES = {
|
|
109
|
+
sm: {
|
|
110
|
+
sideNav: sideNavStyles.sm,
|
|
111
|
+
corner: cornerStyles.sm,
|
|
112
|
+
topNavRegion: topNavRegionStyles.sm
|
|
113
|
+
},
|
|
114
|
+
md: {
|
|
115
|
+
sideNav: sideNavStyles.md,
|
|
116
|
+
corner: cornerStyles.md,
|
|
117
|
+
topNavRegion: topNavRegionStyles.md
|
|
118
|
+
},
|
|
119
|
+
lg: {
|
|
120
|
+
sideNav: sideNavStyles.lg,
|
|
121
|
+
corner: cornerStyles.lg,
|
|
122
|
+
topNavRegion: topNavRegionStyles.lg
|
|
123
|
+
},
|
|
124
|
+
xl: {
|
|
125
|
+
sideNav: sideNavStyles.xl,
|
|
126
|
+
corner: cornerStyles.xl,
|
|
127
|
+
topNavRegion: topNavRegionStyles.xl
|
|
128
|
+
},
|
|
129
|
+
'2xl': {
|
|
130
|
+
sideNav: sideNavStyles['2xl'],
|
|
131
|
+
corner: cornerStyles['2xl'],
|
|
132
|
+
topNavRegion: topNavRegionStyles['2xl']
|
|
133
|
+
}
|
|
134
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroupOverflow.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupOverflow.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAa5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAgB5C,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,SAAS,CAAC,WAAW,CAAC,EACtB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"AvatarGroupOverflow.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupOverflow.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAa5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAgB5C,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,SAAS,CAAC,WAAW,CAAC,EACtB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA+ED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,KAAK,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,wBAAwB,GAAG,SAAS,CAuEtC;yBAhFe,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAa5C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAa5C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAiK7C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,UAAW,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC5D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,EACpB,OAAmB,EACnB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,UAAU,+BA+CZ;yBAxDe,KAAK"}
|
package/dist/Badge/Badge.js
CHANGED
package/dist/Banner/Banner.d.ts
CHANGED
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
* - End area restores the ordinary text context for consumer `endContent`; built-in controls opt back into the status foreground
|
|
12
12
|
* - Content area (themeProps 'banner-content'): card background for additional content (children)
|
|
13
13
|
* - Status icon (themeProps 'banner-icon'): the target rides on the default
|
|
14
|
-
* <Icon> itself
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* <Icon> itself, a direct header item, so 'status:X' overrides reach the
|
|
15
|
+
* glyph and hiding it leaves no gap; a custom `icon` node gets a wrapper
|
|
16
|
+
* that carries the target
|
|
17
|
+
* - Message (themeProps 'banner-message'): the title and description column
|
|
18
|
+
* - Title (themeProps 'banner-title') and description (themeProps
|
|
19
|
+
* 'banner-description'): each line owns its own colour and type
|
|
18
20
|
* - The end area carries no target: it is a layout row (flex, wrap, edge
|
|
19
21
|
* compensation) rather than a painted surface, and a theme that wants the
|
|
20
22
|
* header to grow around its buttons sets `padding-block` on 'banner'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAA0B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAgB5C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C,OAAO,KAAK,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAajE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC5D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmRD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,KAAK,EACL,WAAW,EACX,IAAI,EACJ,aAAqB,EACrB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAkB,EAClB,SAAkB,EAClB,WAAkB,EAClB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,cAAc,EACd,oBAAoB,EACpB,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,WAAW,sCA+Rb;yBApTe,MAAM"}
|
package/dist/Banner/Banner.js
CHANGED
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
* - End area restores the ordinary text context for consumer `endContent`; built-in controls opt back into the status foreground
|
|
16
16
|
* - Content area (themeProps 'banner-content'): card background for additional content (children)
|
|
17
17
|
* - Status icon (themeProps 'banner-icon'): the target rides on the default
|
|
18
|
-
* <Icon> itself
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* <Icon> itself, a direct header item, so 'status:X' overrides reach the
|
|
19
|
+
* glyph and hiding it leaves no gap; a custom `icon` node gets a wrapper
|
|
20
|
+
* that carries the target
|
|
21
|
+
* - Message (themeProps 'banner-message'): the title and description column
|
|
22
|
+
* - Title (themeProps 'banner-title') and description (themeProps
|
|
23
|
+
* 'banner-description'): each line owns its own colour and type
|
|
22
24
|
* - The end area carries no target: it is a layout row (flex, wrap, edge
|
|
23
25
|
* compensation) rather than a painted surface, and a theme that wants the
|
|
24
26
|
* header to grow around its buttons sets `padding-block` on 'banner'
|
|
@@ -144,6 +146,10 @@ const styles = {
|
|
|
144
146
|
kGNEyG: "x6s0dn4",
|
|
145
147
|
$$css: true
|
|
146
148
|
},
|
|
149
|
+
icon: {
|
|
150
|
+
kmuXW: "x2lah0s",
|
|
151
|
+
$$css: true
|
|
152
|
+
},
|
|
147
153
|
endArea: {
|
|
148
154
|
k1xSpc: "x78zum5",
|
|
149
155
|
kGNEyG: "x6s0dn4",
|
|
@@ -455,51 +461,48 @@ export function Banner({
|
|
|
455
461
|
container,
|
|
456
462
|
status
|
|
457
463
|
}), stylex.props(styles.header, isSingleLine && styles.headerCentered, hasStatusStyle(status) && statusStyles[status], isCard && (showContent ? styles.headerCardWithContent : styles.headerCardStandalone))),
|
|
458
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
459
|
-
...
|
|
464
|
+
children: [isRenderable(icon) ? /*#__PURE__*/_jsx("div", {
|
|
465
|
+
...mergeProps(themeProps('banner-icon', {
|
|
460
466
|
status
|
|
461
467
|
}), {
|
|
462
468
|
className: "x78zum5 x6s0dn4 x2lah0s"
|
|
463
|
-
}) : {
|
|
464
|
-
className: "x78zum5 x6s0dn4 x2lah0s"
|
|
465
469
|
}),
|
|
466
470
|
"aria-hidden": "true",
|
|
467
|
-
children:
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
}), /*#__PURE__*/_jsxs("div", {
|
|
471
|
+
children: icon
|
|
472
|
+
}) : defaultIconName != null ?
|
|
473
|
+
/*#__PURE__*/
|
|
474
|
+
// The target is on the glyph itself, so a 'banner-icon' 'status:X'
|
|
475
|
+
// color override beats the Icon's own variant.
|
|
476
|
+
_jsx(Icon, {
|
|
477
|
+
icon: defaultIconName,
|
|
478
|
+
size: "md",
|
|
479
|
+
color: iconColor,
|
|
480
|
+
xstyle: styles.icon,
|
|
481
|
+
...themeProps('banner-icon', {
|
|
482
|
+
status
|
|
483
|
+
})
|
|
484
|
+
}) : null, /*#__PURE__*/_jsxs("div", {
|
|
482
485
|
role: isUrgentAlert ? 'alert' : undefined,
|
|
483
486
|
...alertAriaProps,
|
|
484
|
-
...{
|
|
487
|
+
...mergeProps(themeProps('banner-message'), {
|
|
485
488
|
0: {
|
|
486
489
|
className: "x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli"
|
|
487
490
|
},
|
|
488
491
|
1: {
|
|
489
492
|
className: "x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli xgualba"
|
|
490
493
|
}
|
|
491
|
-
}[!!isRenderable(endContent) << 0],
|
|
494
|
+
}[!!isRenderable(endContent) << 0]),
|
|
492
495
|
children: [/*#__PURE__*/_jsx("div", {
|
|
493
|
-
...{
|
|
496
|
+
...mergeProps(themeProps('banner-title'), {
|
|
494
497
|
0: {
|
|
495
498
|
className: "x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0 xj0a0fe x5ujdhh"
|
|
496
499
|
},
|
|
497
500
|
1: {
|
|
498
501
|
className: "x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og xj0a0fe x5ujdhh x1heor9g"
|
|
499
502
|
}
|
|
500
|
-
}[!!hasStatusStyle(status) << 0],
|
|
503
|
+
}[!!hasStatusStyle(status) << 0]),
|
|
501
504
|
children: title
|
|
502
|
-
}),
|
|
505
|
+
}), isRenderable(description) && ' ', isRenderable(description) && /*#__PURE__*/_jsx("div", {
|
|
503
506
|
...mergeProps(themeProps('banner-description'), {
|
|
504
507
|
0: {
|
|
505
508
|
className: "x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4 xj0a0fe x5ujdhh"
|
|
@@ -539,7 +542,7 @@ export function Banner({
|
|
|
539
542
|
color: "inherit"
|
|
540
543
|
}),
|
|
541
544
|
onClick: handleDismiss,
|
|
542
|
-
className: hasStatusStyle(status) ? stylex.props(statusControlStyles[status])
|
|
545
|
+
className: mergeProps(themeProps('banner-close'), hasStatusStyle(status) ? stylex.props(statusControlStyles[status]) : {}).className,
|
|
543
546
|
isIconOnly: true
|
|
544
547
|
})]
|
|
545
548
|
})]
|
|
@@ -114,6 +114,7 @@ const itemStyles = {
|
|
|
114
114
|
kzqmXN: "x5livx5",
|
|
115
115
|
kZKoxP: "x15rwvks",
|
|
116
116
|
kGuDYH: "x141an7d",
|
|
117
|
+
kLWn49: "x1ltkj2j",
|
|
117
118
|
$$css: true
|
|
118
119
|
}
|
|
119
120
|
};
|
|
@@ -148,7 +149,6 @@ const menuStyles = {
|
|
|
148
149
|
},
|
|
149
150
|
popover: {
|
|
150
151
|
k7Eaqz: "x5w4yej",
|
|
151
|
-
kqGvvJ: "xsq74q5",
|
|
152
152
|
$$css: true
|
|
153
153
|
}
|
|
154
154
|
};
|
|
@@ -518,6 +518,9 @@ function BreadcrumbMenuTrigger({
|
|
|
518
518
|
}), {
|
|
519
519
|
placement: 'below',
|
|
520
520
|
alignment: 'start',
|
|
521
|
+
// The layer's own clearance: the layer runtime measures it as the
|
|
522
|
+
// entrance's room to the trigger and keeps it through a flip.
|
|
523
|
+
offset: spacingVars['--spacing-1'],
|
|
521
524
|
xstyle: menuStyles.popover
|
|
522
525
|
})]
|
|
523
526
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AA4C3C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AASrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AA6M9C,QAAA,MAAM,UAAU;;;;;;;;;;EAId,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AA4C3C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AASrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AA6M9C,QAAA,MAAM,UAAU;;;;;;;;;;EAId,CAAC;AAoEH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAC;AAQjD,MAAM,WAAW,WAAY,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAC/D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC,oDAAoD;IACpD,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD;;OAEG;IACH,WAAW,CAAC,EAAE,CACZ,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KACnC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAwSD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAqB,EACrB,IAAI,EAAE,QAAQ,EACd,IAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,eAAuB,EACvB,WAAW,EACX,IAAI,EACJ,UAAkB,EAClB,KAAK,EACL,SAAkB,EAClB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,IAAI,EACJ,EAAE,EACF,MAAM,EACN,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,SAAS,CAiZzB;yBA1ae,MAAM"}
|
package/dist/Button/Button.js
CHANGED
|
@@ -244,6 +244,8 @@ const variants = {
|
|
|
244
244
|
primary: {
|
|
245
245
|
kWkggS: "x1ewilqj",
|
|
246
246
|
kMwMTN: "x17wrial",
|
|
247
|
+
"--_button-fill": "x1kbggj7",
|
|
248
|
+
"--_button-on-fill": "xysjls1",
|
|
247
249
|
$$css: true
|
|
248
250
|
},
|
|
249
251
|
secondary: {
|
|
@@ -259,6 +261,8 @@ const variants = {
|
|
|
259
261
|
destructive: {
|
|
260
262
|
kWkggS: "x1pjz0fi",
|
|
261
263
|
kMwMTN: "x1m024r3",
|
|
264
|
+
"--_button-fill": "x1wai0k",
|
|
265
|
+
"--_button-on-fill": "x9lj7b4",
|
|
262
266
|
kVAM5u: "x1w1tqly",
|
|
263
267
|
kjBf7l: "x1e0x2sz",
|
|
264
268
|
$$css: true
|