@seed-design/react 1.2.14 → 2.0.0
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/lib/components/Accordion/Accordion.cjs +42 -0
- package/lib/components/Accordion/Accordion.d.ts +35 -0
- package/lib/components/Accordion/Accordion.d.ts.map +1 -0
- package/lib/components/Accordion/Accordion.js +32 -0
- package/lib/components/Accordion/Accordion.namespace.cjs +22 -0
- package/lib/components/Accordion/Accordion.namespace.d.ts +2 -0
- package/lib/components/Accordion/Accordion.namespace.d.ts.map +1 -0
- package/lib/components/Accordion/Accordion.namespace.js +17 -0
- package/lib/components/Accordion/index.cjs +19 -0
- package/lib/components/Accordion/index.d.ts +3 -0
- package/lib/components/Accordion/index.d.ts.map +1 -0
- package/lib/components/Accordion/index.js +3 -0
- package/lib/components/ActionButton/ActionButton.cjs +1 -1
- package/lib/components/ActionButton/ActionButton.d.ts +1 -1
- package/lib/components/ActionButton/ActionButton.d.ts.map +1 -1
- package/lib/components/ActionButton/ActionButton.js +1 -1
- package/lib/components/ActionSheet/ActionSheet.cjs +12 -12
- package/lib/components/ActionSheet/ActionSheet.d.ts +22 -22
- package/lib/components/ActionSheet/ActionSheet.js +12 -12
- package/lib/components/Article/Article.d.ts +2 -3
- package/lib/components/Article/Article.d.ts.map +1 -1
- package/lib/components/AspectRatio/AspectRatio.d.ts +2 -2
- package/lib/components/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplay.cjs +63 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts +43 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.js +49 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.cjs +37 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.d.ts +5 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.js +32 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.cjs +110 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts +30 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.js +100 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.cjs +50 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.d.ts +18 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.js +45 -0
- package/lib/components/AttachmentDisplay/index.cjs +34 -0
- package/lib/components/AttachmentDisplay/index.d.ts +6 -0
- package/lib/components/AttachmentDisplay/index.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/index.js +5 -0
- package/lib/components/AttachmentInput/AttachmentInput.cjs +37 -0
- package/lib/components/AttachmentInput/AttachmentInput.d.ts +23 -0
- package/lib/components/AttachmentInput/AttachmentInput.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInput.js +30 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.cjs +35 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.d.ts +6 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.js +30 -0
- package/lib/components/AttachmentInput/AttachmentInput.test.d.ts +2 -0
- package/lib/components/AttachmentInput/AttachmentInput.test.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.cjs +12 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.d.ts +9 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.js +10 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.cjs +138 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.d.ts +36 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.js +126 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.cjs +54 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.d.ts +21 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.js +49 -0
- package/lib/components/AttachmentInput/index.cjs +32 -0
- package/lib/components/AttachmentInput/index.d.ts +7 -0
- package/lib/components/AttachmentInput/index.d.ts.map +1 -0
- package/lib/components/AttachmentInput/index.js +6 -0
- package/lib/components/BottomSheet/BottomSheet.cjs +36 -9
- package/lib/components/BottomSheet/BottomSheet.d.ts +3 -4
- package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/components/BottomSheet/BottomSheet.js +35 -9
- package/lib/components/Box/Box.cjs +10 -3
- package/lib/components/Box/Box.d.ts +4 -2
- package/lib/components/Box/Box.d.ts.map +1 -1
- package/lib/components/Box/Box.js +10 -3
- package/lib/components/Checkbox/Checkbox.cjs +2 -6
- package/lib/components/Checkbox/Checkbox.d.ts +1 -7
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +2 -6
- package/lib/components/Chip/Chip.cjs +1 -1
- package/lib/components/Chip/Chip.js +1 -1
- package/lib/components/ChipTabs/ChipTabs.cjs +0 -1
- package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -1
- package/lib/components/ChipTabs/ChipTabs.js +0 -1
- package/lib/components/Columns/Columns.d.ts +4 -4
- package/lib/components/Columns/Columns.d.ts.map +1 -1
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.cjs +13 -13
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts +24 -24
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.js +13 -13
- package/lib/components/FieldButton/FieldButton.cjs +22 -3
- package/lib/components/FieldButton/FieldButton.d.ts +3 -2
- package/lib/components/FieldButton/FieldButton.d.ts.map +1 -1
- package/lib/components/FieldButton/FieldButton.js +23 -3
- package/lib/components/Flex/Flex.d.ts +5 -3
- package/lib/components/Flex/Flex.d.ts.map +1 -1
- package/lib/components/Footer/Footer.namespace.cjs +11 -0
- package/lib/components/Footer/Footer.namespace.d.ts +2 -0
- package/lib/components/Footer/Footer.namespace.d.ts.map +1 -0
- package/lib/components/Footer/Footer.namespace.js +6 -0
- package/lib/components/Footer/FooterLinkText.cjs +23 -0
- package/lib/components/Footer/FooterLinkText.d.ts +7 -0
- package/lib/components/Footer/FooterLinkText.d.ts.map +1 -0
- package/lib/components/Footer/FooterLinkText.js +20 -0
- package/lib/components/Footer/index.cjs +10 -0
- package/lib/components/Footer/index.d.ts +3 -0
- package/lib/components/Footer/index.d.ts.map +1 -0
- package/lib/components/Footer/index.js +3 -0
- package/lib/components/Grid/Grid.cjs +7 -2
- package/lib/components/Grid/Grid.d.ts +7 -5
- package/lib/components/Grid/Grid.d.ts.map +1 -1
- package/lib/components/Grid/Grid.js +7 -2
- package/lib/components/GridItem/GridItem.d.ts +3 -2
- package/lib/components/GridItem/GridItem.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.cjs +4 -7
- package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.js +4 -7
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.cjs +64 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.d.ts +60 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.d.ts.map +1 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.js +52 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.cjs +23 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.d.ts +2 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.d.ts.map +1 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.js +18 -0
- package/lib/components/HelpBubbleTooltip/index.cjs +20 -0
- package/lib/components/HelpBubbleTooltip/index.d.ts +3 -0
- package/lib/components/HelpBubbleTooltip/index.d.ts.map +1 -0
- package/lib/components/HelpBubbleTooltip/index.js +3 -0
- package/lib/components/Icon/Icon.d.ts +2 -1
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/ImageFrame/ImageFrame.cjs +3 -2
- package/lib/components/ImageFrame/ImageFrame.d.ts +3 -8
- package/lib/components/ImageFrame/ImageFrame.d.ts.map +1 -1
- package/lib/components/ImageFrame/ImageFrame.js +3 -2
- package/lib/components/Inline/Inline.d.ts +2 -2
- package/lib/components/Inline/Inline.d.ts.map +1 -1
- package/lib/components/Layout/Layout.cjs +12 -0
- package/lib/components/Layout/Layout.d.ts +10 -0
- package/lib/components/Layout/Layout.d.ts.map +1 -0
- package/lib/components/Layout/Layout.js +10 -0
- package/lib/components/Layout/Layout.namespace.cjs +14 -0
- package/lib/components/Layout/Layout.namespace.d.ts +2 -0
- package/lib/components/Layout/Layout.namespace.d.ts.map +1 -0
- package/lib/components/Layout/Layout.namespace.js +9 -0
- package/lib/components/Layout/index.cjs +11 -0
- package/lib/components/Layout/index.d.ts +3 -0
- package/lib/components/Layout/index.d.ts.map +1 -0
- package/lib/components/Layout/index.js +3 -0
- package/lib/components/List/List.cjs +1 -1
- package/lib/components/List/List.d.ts +1 -1
- package/lib/components/List/List.d.ts.map +1 -1
- package/lib/components/List/List.js +1 -1
- package/lib/components/Menu/Menu.cjs +76 -0
- package/lib/components/Menu/Menu.d.ts +42 -0
- package/lib/components/Menu/Menu.d.ts.map +1 -0
- package/lib/components/Menu/Menu.js +62 -0
- package/lib/components/Menu/Menu.namespace.cjs +24 -0
- package/lib/components/Menu/Menu.namespace.d.ts +2 -0
- package/lib/components/Menu/Menu.namespace.d.ts.map +1 -0
- package/lib/components/Menu/Menu.namespace.js +19 -0
- package/lib/components/Menu/index.cjs +21 -0
- package/lib/components/Menu/index.d.ts +3 -0
- package/lib/components/Menu/index.d.ts.map +1 -0
- package/lib/components/Menu/index.js +3 -0
- package/lib/components/MenuSheet/MenuSheet.cjs +48 -0
- package/lib/components/MenuSheet/MenuSheet.d.ts +96 -0
- package/lib/components/MenuSheet/MenuSheet.d.ts.map +1 -1
- package/lib/components/MenuSheet/MenuSheet.js +48 -0
- package/lib/components/NavigationMenu/NavigationMenu.cjs +76 -0
- package/lib/components/NavigationMenu/NavigationMenu.d.ts +42 -0
- package/lib/components/NavigationMenu/NavigationMenu.d.ts.map +1 -0
- package/lib/components/NavigationMenu/NavigationMenu.js +62 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.cjs +24 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.d.ts +2 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.d.ts.map +1 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.js +19 -0
- package/lib/components/NavigationMenu/index.cjs +21 -0
- package/lib/components/NavigationMenu/index.d.ts +3 -0
- package/lib/components/NavigationMenu/index.d.ts.map +1 -0
- package/lib/components/NavigationMenu/index.js +3 -0
- package/lib/components/RadioGroup/RadioGroup.cjs +1 -1
- package/lib/components/RadioGroup/RadioGroup.js +1 -1
- package/lib/components/ResponsivePair/ResponsivePair.cjs +8 -5
- package/lib/components/ResponsivePair/ResponsivePair.d.ts +3 -2
- package/lib/components/ResponsivePair/ResponsivePair.d.ts.map +1 -1
- package/lib/components/ResponsivePair/ResponsivePair.js +8 -5
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.cjs +184 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.d.ts +65 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.d.ts.map +1 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.js +170 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.cjs +24 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.d.ts +2 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.d.ts.map +1 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.js +19 -0
- package/lib/components/ResponsiveSidePanel/index.cjs +22 -0
- package/lib/components/ResponsiveSidePanel/index.d.ts +3 -0
- package/lib/components/ResponsiveSidePanel/index.d.ts.map +1 -0
- package/lib/components/ResponsiveSidePanel/index.js +3 -0
- package/lib/components/SelectBox/CheckSelectBox.cjs +2 -2
- package/lib/components/SelectBox/CheckSelectBox.d.ts +1 -1
- package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -1
- package/lib/components/SelectBox/CheckSelectBox.js +1 -1
- package/lib/components/SideNavigation/SideNavigation.cjs +175 -0
- package/lib/components/SideNavigation/SideNavigation.d.ts +59 -0
- package/lib/components/SideNavigation/SideNavigation.d.ts.map +1 -0
- package/lib/components/SideNavigation/SideNavigation.js +157 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.cjs +28 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.d.ts +3 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.d.ts.map +1 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.js +23 -0
- package/lib/components/SideNavigation/index.cjs +25 -0
- package/lib/components/SideNavigation/index.d.ts +4 -0
- package/lib/components/SideNavigation/index.d.ts.map +1 -0
- package/lib/components/SideNavigation/index.js +3 -0
- package/lib/components/SidePanel/SidePanel.cjs +100 -0
- package/lib/components/SidePanel/SidePanel.d.ts +41 -0
- package/lib/components/SidePanel/SidePanel.d.ts.map +1 -0
- package/lib/components/SidePanel/SidePanel.js +87 -0
- package/lib/components/SidePanel/SidePanel.namespace.cjs +23 -0
- package/lib/components/SidePanel/SidePanel.namespace.d.ts +2 -0
- package/lib/components/SidePanel/SidePanel.namespace.d.ts.map +1 -0
- package/lib/components/SidePanel/SidePanel.namespace.js +18 -0
- package/lib/components/SidePanel/index.cjs +20 -0
- package/lib/components/SidePanel/index.d.ts +3 -0
- package/lib/components/SidePanel/index.d.ts.map +1 -0
- package/lib/components/SidePanel/index.js +3 -0
- package/lib/components/Slider/Slider.cjs +2 -2
- package/lib/components/Slider/Slider.js +2 -2
- package/lib/components/Snackbar/Snackbar.cjs +2 -2
- package/lib/components/Snackbar/Snackbar.d.ts +1 -1
- package/lib/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/lib/components/Snackbar/Snackbar.js +2 -2
- package/lib/components/Stack/Stack.d.ts +4 -6
- package/lib/components/Stack/Stack.d.ts.map +1 -1
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.cjs +123 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts +60 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.js +104 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.cjs +29 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts +2 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.js +24 -0
- package/lib/components/SwipeableMenuSheet/index.cjs +26 -0
- package/lib/components/SwipeableMenuSheet/index.d.ts +3 -0
- package/lib/components/SwipeableMenuSheet/index.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/index.js +3 -0
- package/lib/components/Switch/Switch.cjs +1 -5
- package/lib/components/Switch/Switch.d.ts +1 -7
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Switch/Switch.js +1 -5
- package/lib/components/TagGroup/TagGroup.cjs +1 -1
- package/lib/components/TagGroup/TagGroup.js +1 -1
- package/lib/components/TextField/TextField.cjs +1 -1
- package/lib/components/TextField/TextField.js +1 -1
- package/lib/components/index.cjs +249 -0
- package/lib/components/index.d.ts +12 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +30 -1
- package/lib/components/private/useDismissible.d.ts +6 -6
- package/lib/hooks/useBreakpoint.cjs +15 -0
- package/lib/hooks/useBreakpoint.d.ts +12 -0
- package/lib/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/hooks/useBreakpoint.js +13 -0
- package/lib/hooks/useBreakpoint.test.d.ts +2 -0
- package/lib/hooks/useBreakpoint.test.d.ts.map +1 -0
- package/lib/hooks/useBreakpointValue.cjs +23 -0
- package/lib/hooks/useBreakpointValue.d.ts +8 -0
- package/lib/hooks/useBreakpointValue.d.ts.map +1 -0
- package/lib/hooks/useBreakpointValue.js +22 -0
- package/lib/hooks/useBreakpointValue.test.d.ts +2 -0
- package/lib/hooks/useBreakpointValue.test.d.ts.map +1 -0
- package/lib/index.cjs +255 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +33 -1
- package/lib/primitive.cjs +45 -0
- package/lib/primitive.d.ts +5 -0
- package/lib/primitive.d.ts.map +1 -1
- package/lib/primitive.js +5 -0
- package/lib/primitives/breakpoint-store.cjs +52 -0
- package/lib/primitives/breakpoint-store.d.ts +7 -0
- package/lib/primitives/breakpoint-store.d.ts.map +1 -0
- package/lib/primitives/breakpoint-store.js +50 -0
- package/lib/providers/BreakpointProvider.cjs +20 -0
- package/lib/providers/BreakpointProvider.d.ts +8 -0
- package/lib/providers/BreakpointProvider.d.ts.map +1 -0
- package/lib/providers/BreakpointProvider.js +19 -0
- package/lib/types/responsive.cjs +7 -0
- package/lib/types/responsive.d.ts +12 -0
- package/lib/types/responsive.d.ts.map +1 -0
- package/lib/types/responsive.js +7 -0
- package/lib/utils/createRenderTrackingContext.cjs +45 -0
- package/lib/utils/createRenderTrackingContext.d.ts +28 -0
- package/lib/utils/createRenderTrackingContext.d.ts.map +1 -0
- package/lib/utils/createRenderTrackingContext.js +44 -0
- package/lib/utils/getHelpBubbleArrowTipPath.cjs +14 -0
- package/lib/utils/getHelpBubbleArrowTipPath.d.ts +7 -0
- package/lib/utils/getHelpBubbleArrowTipPath.d.ts.map +1 -0
- package/lib/utils/getHelpBubbleArrowTipPath.js +14 -0
- package/lib/utils/styled.cjs +49 -75
- package/lib/utils/styled.d.ts +180 -62
- package/lib/utils/styled.d.ts.map +1 -1
- package/lib/utils/styled.js +49 -76
- package/package.json +33 -26
- package/src/components/Accordion/Accordion.namespace.ts +22 -0
- package/src/components/Accordion/Accordion.tsx +119 -0
- package/src/components/Accordion/index.ts +24 -0
- package/src/components/ActionButton/ActionButton.tsx +1 -1
- package/src/components/ActionSheet/ActionSheet.tsx +22 -22
- package/src/components/Article/Article.tsx +1 -1
- package/src/components/AspectRatio/AspectRatio.tsx +2 -2
- package/src/components/AttachmentDisplay/AttachmentDisplay.namespace.ts +57 -0
- package/src/components/AttachmentDisplay/AttachmentDisplay.tsx +165 -0
- package/src/components/AttachmentDisplay/AttachmentDisplayItem.tsx +204 -0
- package/src/components/AttachmentDisplay/AttachmentDisplayTrigger.tsx +82 -0
- package/src/components/AttachmentDisplay/index.ts +59 -0
- package/src/components/AttachmentInput/AttachmentInput.namespace.ts +54 -0
- package/src/components/AttachmentInput/AttachmentInput.test.tsx +161 -0
- package/src/components/AttachmentInput/AttachmentInput.tsx +77 -0
- package/src/components/AttachmentInput/AttachmentInputDropzone.tsx +25 -0
- package/src/components/AttachmentInput/AttachmentInputItem.tsx +246 -0
- package/src/components/AttachmentInput/AttachmentInputTrigger.tsx +85 -0
- package/src/components/AttachmentInput/index.ts +56 -0
- package/src/components/BottomSheet/BottomSheet.tsx +54 -18
- package/src/components/Box/Box.tsx +30 -7
- package/src/components/Checkbox/Checkbox.tsx +3 -31
- package/src/components/ChipTabs/ChipTabs.tsx +0 -6
- package/src/components/Columns/Columns.tsx +4 -3
- package/src/components/ExtendedActionSheet/ExtendedActionSheet.tsx +24 -24
- package/src/components/FieldButton/FieldButton.tsx +36 -8
- package/src/components/Flex/Flex.tsx +5 -3
- package/src/components/Footer/Footer.namespace.ts +4 -0
- package/src/components/Footer/FooterLinkText.tsx +23 -0
- package/src/components/Footer/index.ts +3 -0
- package/src/components/Grid/Grid.tsx +15 -8
- package/src/components/GridItem/GridItem.tsx +3 -2
- package/src/components/HelpBubble/HelpBubble.tsx +2 -5
- package/src/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.ts +24 -0
- package/src/components/HelpBubbleTooltip/HelpBubbleTooltip.tsx +169 -0
- package/src/components/HelpBubbleTooltip/index.ts +26 -0
- package/src/components/Icon/Icon.tsx +2 -1
- package/src/components/ImageFrame/ImageFrame.test.tsx +1 -3
- package/src/components/ImageFrame/ImageFrame.tsx +25 -23
- package/src/components/Inline/Inline.tsx +2 -1
- package/src/components/Layout/Layout.namespace.ts +6 -0
- package/src/components/Layout/Layout.tsx +21 -0
- package/src/components/Layout/index.ts +8 -0
- package/src/components/List/List.tsx +5 -1
- package/src/components/Menu/Menu.namespace.ts +26 -0
- package/src/components/Menu/Menu.tsx +157 -0
- package/src/components/Menu/index.ts +28 -0
- package/src/components/MenuSheet/MenuSheet.tsx +96 -0
- package/src/components/NavigationMenu/NavigationMenu.namespace.ts +26 -0
- package/src/components/NavigationMenu/NavigationMenu.tsx +172 -0
- package/src/components/NavigationMenu/index.ts +28 -0
- package/src/components/ResponsivePair/ResponsivePair.tsx +13 -7
- package/src/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.ts +26 -0
- package/src/components/ResponsiveSidePanel/ResponsiveSidePanel.tsx +316 -0
- package/src/components/ResponsiveSidePanel/index.ts +29 -0
- package/src/components/SelectBox/CheckSelectBox.tsx +1 -1
- package/src/components/SideNavigation/SideNavigation.namespace.ts +37 -0
- package/src/components/SideNavigation/SideNavigation.tsx +342 -0
- package/src/components/SideNavigation/index.ts +39 -0
- package/src/components/SidePanel/SidePanel.namespace.ts +24 -0
- package/src/components/SidePanel/SidePanel.tsx +216 -0
- package/src/components/SidePanel/index.ts +26 -0
- package/src/components/Snackbar/Snackbar.tsx +2 -4
- package/src/components/Stack/Stack.tsx +4 -3
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.ts +36 -0
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +269 -0
- package/src/components/SwipeableMenuSheet/index.ts +38 -0
- package/src/components/Switch/Switch.tsx +3 -26
- package/src/components/index.ts +12 -0
- package/src/hooks/useBreakpoint.test.tsx +94 -0
- package/src/hooks/useBreakpoint.ts +24 -0
- package/src/hooks/useBreakpointValue.test.tsx +102 -0
- package/src/hooks/useBreakpointValue.ts +33 -0
- package/src/index.ts +8 -0
- package/src/primitive.ts +5 -0
- package/src/primitives/breakpoint-store.ts +69 -0
- package/src/providers/BreakpointProvider.tsx +26 -0
- package/src/types/responsive.ts +19 -0
- package/src/utils/createRenderTrackingContext.tsx +50 -0
- package/src/utils/getHelpBubbleArrowTipPath.ts +11 -0
- package/src/utils/styled.tsx +387 -268
|
@@ -21,6 +21,9 @@ const withStateProps = createWithStateProps([useDialogContext]);
|
|
|
21
21
|
|
|
22
22
|
////////////////////////////////////////////////////////////////////////////////////
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
26
|
+
*/
|
|
24
27
|
export interface MenuSheetRootProps extends MenuSheetVariantProps, DialogPrimitive.RootProps {
|
|
25
28
|
/**
|
|
26
29
|
* @default true
|
|
@@ -32,6 +35,9 @@ export interface MenuSheetRootProps extends MenuSheetVariantProps, DialogPrimiti
|
|
|
32
35
|
unmountOnExit?: DialogPrimitive.RootProps["unmountOnExit"];
|
|
33
36
|
}
|
|
34
37
|
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
40
|
+
*/
|
|
35
41
|
export const MenuSheetRoot = withRootProvider<MenuSheetRootProps>(DialogPrimitive.Root, {
|
|
36
42
|
defaultProps: {
|
|
37
43
|
lazyMount: true,
|
|
@@ -41,14 +47,26 @@ export const MenuSheetRoot = withRootProvider<MenuSheetRootProps>(DialogPrimitiv
|
|
|
41
47
|
|
|
42
48
|
////////////////////////////////////////////////////////////////////////////////////
|
|
43
49
|
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
52
|
+
*/
|
|
44
53
|
export interface MenuSheetTriggerProps extends DialogPrimitive.TriggerProps {}
|
|
45
54
|
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
57
|
+
*/
|
|
46
58
|
export const MenuSheetTrigger = DialogPrimitive.Trigger;
|
|
47
59
|
|
|
48
60
|
////////////////////////////////////////////////////////////////////////////////////
|
|
49
61
|
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
64
|
+
*/
|
|
50
65
|
export interface MenuSheetPositionerProps extends DialogPrimitive.PositionerProps {}
|
|
51
66
|
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
69
|
+
*/
|
|
52
70
|
export const MenuSheetPositioner = withContext<HTMLDivElement, MenuSheetPositionerProps>(
|
|
53
71
|
DialogPrimitive.Positioner,
|
|
54
72
|
"positioner",
|
|
@@ -56,8 +74,14 @@ export const MenuSheetPositioner = withContext<HTMLDivElement, MenuSheetPosition
|
|
|
56
74
|
|
|
57
75
|
////////////////////////////////////////////////////////////////////////////////////
|
|
58
76
|
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
79
|
+
*/
|
|
59
80
|
export interface MenuSheetBackdropProps extends DialogPrimitive.BackdropProps {}
|
|
60
81
|
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
84
|
+
*/
|
|
61
85
|
export const MenuSheetBackdrop = withContext<HTMLDivElement, MenuSheetBackdropProps>(
|
|
62
86
|
DialogPrimitive.Backdrop,
|
|
63
87
|
"backdrop",
|
|
@@ -65,10 +89,16 @@ export const MenuSheetBackdrop = withContext<HTMLDivElement, MenuSheetBackdropPr
|
|
|
65
89
|
|
|
66
90
|
////////////////////////////////////////////////////////////////////////////////////
|
|
67
91
|
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
94
|
+
*/
|
|
68
95
|
export interface MenuSheetContentProps
|
|
69
96
|
extends DialogPrimitive.ContentProps,
|
|
70
97
|
Pick<MenuSheetItemVariantProps, "labelAlign"> {}
|
|
71
98
|
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
101
|
+
*/
|
|
72
102
|
export const MenuSheetContent = React.forwardRef<HTMLDivElement, MenuSheetContentProps>(
|
|
73
103
|
({ className, ...props }, ref) => {
|
|
74
104
|
const [variantProps, otherProps] = menuSheetItem.splitVariantProps(props);
|
|
@@ -88,10 +118,16 @@ export const MenuSheetContent = React.forwardRef<HTMLDivElement, MenuSheetConten
|
|
|
88
118
|
|
|
89
119
|
////////////////////////////////////////////////////////////////////////////////////
|
|
90
120
|
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
123
|
+
*/
|
|
91
124
|
export interface MenuSheetHeaderProps
|
|
92
125
|
extends PrimitiveProps,
|
|
93
126
|
React.HTMLAttributes<HTMLDivElement> {}
|
|
94
127
|
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
130
|
+
*/
|
|
95
131
|
export const MenuSheetHeader = withContext<HTMLDivElement, MenuSheetHeaderProps>(
|
|
96
132
|
withStateProps(Primitive.div),
|
|
97
133
|
"header",
|
|
@@ -100,8 +136,14 @@ export const MenuSheetHeader = withContext<HTMLDivElement, MenuSheetHeaderProps>
|
|
|
100
136
|
// NOTE: uses DialogPrimitive.TitleProps,
|
|
101
137
|
// but actual rendered component is a Primitive.h2 rather than a DialogPrimitive.Title
|
|
102
138
|
// find out why later; h2 is same but missing and some a11y features
|
|
139
|
+
/**
|
|
140
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
141
|
+
*/
|
|
103
142
|
export interface MenuSheetTitleProps extends DialogPrimitive.TitleProps {}
|
|
104
143
|
|
|
144
|
+
/**
|
|
145
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
146
|
+
*/
|
|
105
147
|
export const MenuSheetTitle = withContext<HTMLHeadingElement, MenuSheetTitleProps>(
|
|
106
148
|
withStateProps(Primitive.h2),
|
|
107
149
|
"title",
|
|
@@ -110,8 +152,14 @@ export const MenuSheetTitle = withContext<HTMLHeadingElement, MenuSheetTitleProp
|
|
|
110
152
|
// NOTE: uses DialogPrimitive.DescriptionProps,
|
|
111
153
|
// but actual rendered component is a Primitive.p rather than a DialogPrimitive.Description
|
|
112
154
|
// find out why later; p is same but missing and some a11y features
|
|
155
|
+
/**
|
|
156
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
157
|
+
*/
|
|
113
158
|
export interface MenuSheetDescriptionProps extends DialogPrimitive.DescriptionProps {}
|
|
114
159
|
|
|
160
|
+
/**
|
|
161
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
162
|
+
*/
|
|
115
163
|
export const MenuSheetDescription = withContext<HTMLParagraphElement, MenuSheetDescriptionProps>(
|
|
116
164
|
withStateProps(Primitive.p),
|
|
117
165
|
"description",
|
|
@@ -119,8 +167,14 @@ export const MenuSheetDescription = withContext<HTMLParagraphElement, MenuSheetD
|
|
|
119
167
|
|
|
120
168
|
////////////////////////////////////////////////////////////////////////////////////
|
|
121
169
|
|
|
170
|
+
/**
|
|
171
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
172
|
+
*/
|
|
122
173
|
export interface MenuSheetListProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}
|
|
123
174
|
|
|
175
|
+
/**
|
|
176
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
177
|
+
*/
|
|
124
178
|
export const MenuSheetList = withContext<HTMLDivElement, MenuSheetListProps>(
|
|
125
179
|
withStateProps(Primitive.div),
|
|
126
180
|
"list",
|
|
@@ -128,10 +182,16 @@ export const MenuSheetList = withContext<HTMLDivElement, MenuSheetListProps>(
|
|
|
128
182
|
|
|
129
183
|
////////////////////////////////////////////////////////////////////////////////////
|
|
130
184
|
|
|
185
|
+
/**
|
|
186
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
187
|
+
*/
|
|
131
188
|
export interface MenuSheetGroupProps
|
|
132
189
|
extends React.HTMLAttributes<HTMLDivElement>,
|
|
133
190
|
Pick<MenuSheetItemVariantProps, "labelAlign"> {}
|
|
134
191
|
|
|
192
|
+
/**
|
|
193
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
194
|
+
*/
|
|
135
195
|
export const MenuSheetGroup = React.forwardRef<HTMLDivElement, MenuSheetGroupProps>(
|
|
136
196
|
({ className, ...props }, ref) => {
|
|
137
197
|
const [variantProps, otherProps] = menuSheetItem.splitVariantProps(props);
|
|
@@ -155,11 +215,17 @@ export const MenuSheetGroup = React.forwardRef<HTMLDivElement, MenuSheetGroupPro
|
|
|
155
215
|
|
|
156
216
|
////////////////////////////////////////////////////////////////////////////////////
|
|
157
217
|
|
|
218
|
+
/**
|
|
219
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
220
|
+
*/
|
|
158
221
|
export interface MenuSheetItemProps
|
|
159
222
|
extends PrimitiveProps,
|
|
160
223
|
MenuSheetItemVariantProps,
|
|
161
224
|
React.HTMLAttributes<HTMLButtonElement> {}
|
|
162
225
|
|
|
226
|
+
/**
|
|
227
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
228
|
+
*/
|
|
163
229
|
export const MenuSheetItem = React.forwardRef<HTMLButtonElement, MenuSheetItemProps>(
|
|
164
230
|
({ className: propClassName, ...props }, ref) => {
|
|
165
231
|
const [variantProps, otherProps] = menuSheetItem.splitVariantProps(props);
|
|
@@ -181,28 +247,46 @@ export const MenuSheetItem = React.forwardRef<HTMLButtonElement, MenuSheetItemPr
|
|
|
181
247
|
},
|
|
182
248
|
);
|
|
183
249
|
|
|
250
|
+
/**
|
|
251
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
252
|
+
*/
|
|
184
253
|
export interface MenuSheetItemContentProps
|
|
185
254
|
extends PrimitiveProps,
|
|
186
255
|
React.HTMLAttributes<HTMLDivElement> {}
|
|
187
256
|
|
|
257
|
+
/**
|
|
258
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
259
|
+
*/
|
|
188
260
|
export const MenuSheetItemContent = withItemContext<HTMLDivElement, MenuSheetItemContentProps>(
|
|
189
261
|
withStateProps(Primitive.div),
|
|
190
262
|
"content",
|
|
191
263
|
);
|
|
192
264
|
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
267
|
+
*/
|
|
193
268
|
export interface MenuSheetItemLabelProps
|
|
194
269
|
extends PrimitiveProps,
|
|
195
270
|
React.HTMLAttributes<HTMLSpanElement> {}
|
|
196
271
|
|
|
272
|
+
/**
|
|
273
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
274
|
+
*/
|
|
197
275
|
export const MenuSheetItemLabel = withItemContext<HTMLSpanElement, MenuSheetItemLabelProps>(
|
|
198
276
|
withStateProps(Primitive.span),
|
|
199
277
|
"label",
|
|
200
278
|
);
|
|
201
279
|
|
|
280
|
+
/**
|
|
281
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
282
|
+
*/
|
|
202
283
|
export interface MenuSheetItemDescriptionProps
|
|
203
284
|
extends PrimitiveProps,
|
|
204
285
|
React.HTMLAttributes<HTMLSpanElement> {}
|
|
205
286
|
|
|
287
|
+
/**
|
|
288
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
289
|
+
*/
|
|
206
290
|
export const MenuSheetItemDescription = withItemContext<
|
|
207
291
|
HTMLSpanElement,
|
|
208
292
|
MenuSheetItemDescriptionProps
|
|
@@ -210,10 +294,16 @@ export const MenuSheetItemDescription = withItemContext<
|
|
|
210
294
|
|
|
211
295
|
////////////////////////////////////////////////////////////////////////////////////
|
|
212
296
|
|
|
297
|
+
/**
|
|
298
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
299
|
+
*/
|
|
213
300
|
export interface MenuSheetFooterProps
|
|
214
301
|
extends PrimitiveProps,
|
|
215
302
|
React.HTMLAttributes<HTMLDivElement> {}
|
|
216
303
|
|
|
304
|
+
/**
|
|
305
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
306
|
+
*/
|
|
217
307
|
export const MenuSheetFooter = withContext<HTMLDivElement, MenuSheetFooterProps>(
|
|
218
308
|
withStateProps(Primitive.div),
|
|
219
309
|
"footer",
|
|
@@ -221,8 +311,14 @@ export const MenuSheetFooter = withContext<HTMLDivElement, MenuSheetFooterProps>
|
|
|
221
311
|
|
|
222
312
|
////////////////////////////////////////////////////////////////////////////////////
|
|
223
313
|
|
|
314
|
+
/**
|
|
315
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
316
|
+
*/
|
|
224
317
|
export interface MenuSheetCloseButtonProps extends DialogPrimitive.CloseButtonProps {}
|
|
225
318
|
|
|
319
|
+
/**
|
|
320
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
321
|
+
*/
|
|
226
322
|
export const MenuSheetCloseButton = withContext<HTMLDivElement, MenuSheetCloseButtonProps>(
|
|
227
323
|
DialogPrimitive.CloseButton,
|
|
228
324
|
"closeButton",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export {
|
|
2
|
+
NavigationMenuProvider as Provider,
|
|
3
|
+
NavigationMenuRoot as Root,
|
|
4
|
+
NavigationMenuTrigger as Trigger,
|
|
5
|
+
NavigationMenuPositioner as Positioner,
|
|
6
|
+
NavigationMenuContent as Content,
|
|
7
|
+
NavigationMenuScrollArea as ScrollArea,
|
|
8
|
+
NavigationMenuGroup as Group,
|
|
9
|
+
NavigationMenuGroupLabel as GroupLabel,
|
|
10
|
+
NavigationMenuItem as Item,
|
|
11
|
+
NavigationMenuItemBody as ItemBody,
|
|
12
|
+
NavigationMenuItemLabel as ItemLabel,
|
|
13
|
+
NavigationMenuItemDescription as ItemDescription,
|
|
14
|
+
type NavigationMenuProviderProps as ProviderProps,
|
|
15
|
+
type NavigationMenuRootProps as RootProps,
|
|
16
|
+
type NavigationMenuTriggerProps as TriggerProps,
|
|
17
|
+
type NavigationMenuPositionerProps as PositionerProps,
|
|
18
|
+
type NavigationMenuContentProps as ContentProps,
|
|
19
|
+
type NavigationMenuScrollAreaProps as ScrollAreaProps,
|
|
20
|
+
type NavigationMenuGroupProps as GroupProps,
|
|
21
|
+
type NavigationMenuGroupLabelProps as GroupLabelProps,
|
|
22
|
+
type NavigationMenuItemProps as ItemProps,
|
|
23
|
+
type NavigationMenuItemBodyProps as ItemBodyProps,
|
|
24
|
+
type NavigationMenuItemLabelProps as ItemLabelProps,
|
|
25
|
+
type NavigationMenuItemDescriptionProps as ItemDescriptionProps,
|
|
26
|
+
} from "./NavigationMenu";
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { menu, type MenuVariantProps } from "@seed-design/css/recipes/menu";
|
|
4
|
+
import { menuItem, type MenuItemVariantProps } from "@seed-design/css/recipes/menu-item";
|
|
5
|
+
import {
|
|
6
|
+
NavigationMenu as NavigationMenuPrimitive,
|
|
7
|
+
useNavigationMenuItemContext,
|
|
8
|
+
useNavigationMenuRootContext,
|
|
9
|
+
} from "@seed-design/react-navigation-menu";
|
|
10
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
14
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
15
|
+
|
|
16
|
+
const { ClassNamesProvider, withContext, useClassNames } = createSlotRecipeContext(menu);
|
|
17
|
+
const {
|
|
18
|
+
PropsProvider: ItemPropsProvider,
|
|
19
|
+
useProps: useItemProps,
|
|
20
|
+
withContext: withItemContext,
|
|
21
|
+
ClassNamesProvider: ItemClassNamesProvider,
|
|
22
|
+
} = createSlotRecipeContext(menuItem);
|
|
23
|
+
const withStateProps = createWithStateProps([useNavigationMenuRootContext]);
|
|
24
|
+
const withItemStateProps = createWithStateProps([useNavigationMenuItemContext]);
|
|
25
|
+
|
|
26
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
27
|
+
|
|
28
|
+
export interface NavigationMenuProviderProps
|
|
29
|
+
extends MenuVariantProps,
|
|
30
|
+
NavigationMenuPrimitive.ProviderProps {}
|
|
31
|
+
|
|
32
|
+
export const NavigationMenuProvider = (props: NavigationMenuProviderProps) => {
|
|
33
|
+
const [variantProps, otherProps] = menu.splitVariantProps(props);
|
|
34
|
+
const classNames = menu(variantProps);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<ClassNamesProvider value={classNames}>
|
|
38
|
+
<ItemPropsProvider value={{ size: variantProps.size }}>
|
|
39
|
+
<NavigationMenuPrimitive.Provider {...otherProps} />
|
|
40
|
+
</ItemPropsProvider>
|
|
41
|
+
</ClassNamesProvider>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
46
|
+
|
|
47
|
+
export interface NavigationMenuRootProps extends NavigationMenuPrimitive.RootProps {}
|
|
48
|
+
|
|
49
|
+
export const NavigationMenuRoot = NavigationMenuPrimitive.Root;
|
|
50
|
+
|
|
51
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
52
|
+
|
|
53
|
+
export interface NavigationMenuTriggerProps extends NavigationMenuPrimitive.TriggerProps {}
|
|
54
|
+
|
|
55
|
+
export const NavigationMenuTrigger = NavigationMenuPrimitive.Trigger;
|
|
56
|
+
|
|
57
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
58
|
+
|
|
59
|
+
export interface NavigationMenuPositionerProps extends NavigationMenuPrimitive.PositionerProps {}
|
|
60
|
+
|
|
61
|
+
export const NavigationMenuPositioner = React.forwardRef<
|
|
62
|
+
HTMLDivElement,
|
|
63
|
+
NavigationMenuPositionerProps
|
|
64
|
+
>(({ className, ...props }, ref) => {
|
|
65
|
+
const classNames = useClassNames();
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<NavigationMenuPrimitive.Positioner
|
|
69
|
+
ref={ref}
|
|
70
|
+
className={clsx(classNames.positioner, className)}
|
|
71
|
+
{...props}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
NavigationMenuPositioner.displayName = "NavigationMenuPositioner";
|
|
76
|
+
|
|
77
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
78
|
+
|
|
79
|
+
export interface NavigationMenuContentProps extends NavigationMenuPrimitive.ContentProps {}
|
|
80
|
+
|
|
81
|
+
export const NavigationMenuContent = withContext<HTMLDivElement, NavigationMenuContentProps>(
|
|
82
|
+
NavigationMenuPrimitive.Content,
|
|
83
|
+
"content",
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
87
|
+
|
|
88
|
+
export interface NavigationMenuScrollAreaProps
|
|
89
|
+
extends PrimitiveProps,
|
|
90
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
91
|
+
|
|
92
|
+
export const NavigationMenuScrollArea = withContext<HTMLDivElement, NavigationMenuScrollAreaProps>(
|
|
93
|
+
withStateProps(Primitive.div),
|
|
94
|
+
"scrollArea",
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
98
|
+
|
|
99
|
+
export interface NavigationMenuGroupProps extends NavigationMenuPrimitive.GroupProps {}
|
|
100
|
+
|
|
101
|
+
export const NavigationMenuGroup = withContext<HTMLDivElement, NavigationMenuGroupProps>(
|
|
102
|
+
NavigationMenuPrimitive.Group,
|
|
103
|
+
"group",
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
107
|
+
|
|
108
|
+
export interface NavigationMenuGroupLabelProps extends NavigationMenuPrimitive.GroupLabelProps {}
|
|
109
|
+
|
|
110
|
+
export const NavigationMenuGroupLabel = withContext<HTMLDivElement, NavigationMenuGroupLabelProps>(
|
|
111
|
+
NavigationMenuPrimitive.GroupLabel,
|
|
112
|
+
"groupLabel",
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
116
|
+
|
|
117
|
+
export interface NavigationMenuItemProps
|
|
118
|
+
extends MenuItemVariantProps,
|
|
119
|
+
NavigationMenuPrimitive.ItemProps {}
|
|
120
|
+
|
|
121
|
+
export const NavigationMenuItem = React.forwardRef<HTMLButtonElement, NavigationMenuItemProps>(
|
|
122
|
+
({ className: propClassName, ...props }, ref) => {
|
|
123
|
+
const [variantProps, otherProps] = menuItem.splitVariantProps(props);
|
|
124
|
+
const parentProps = useItemProps();
|
|
125
|
+
|
|
126
|
+
const classNames = menuItem({ ...parentProps, ...variantProps });
|
|
127
|
+
|
|
128
|
+
return (
|
|
129
|
+
<ItemClassNamesProvider value={classNames}>
|
|
130
|
+
<NavigationMenuPrimitive.Item
|
|
131
|
+
ref={ref}
|
|
132
|
+
className={clsx(classNames.root, propClassName)}
|
|
133
|
+
{...otherProps}
|
|
134
|
+
/>
|
|
135
|
+
</ItemClassNamesProvider>
|
|
136
|
+
);
|
|
137
|
+
},
|
|
138
|
+
);
|
|
139
|
+
NavigationMenuItem.displayName = "NavigationMenuItem";
|
|
140
|
+
|
|
141
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
142
|
+
|
|
143
|
+
export interface NavigationMenuItemBodyProps
|
|
144
|
+
extends PrimitiveProps,
|
|
145
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
146
|
+
|
|
147
|
+
export const NavigationMenuItemBody = withItemContext<HTMLDivElement, NavigationMenuItemBodyProps>(
|
|
148
|
+
withItemStateProps(Primitive.div),
|
|
149
|
+
"body",
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
153
|
+
|
|
154
|
+
export interface NavigationMenuItemLabelProps
|
|
155
|
+
extends PrimitiveProps,
|
|
156
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
157
|
+
|
|
158
|
+
export const NavigationMenuItemLabel = withItemContext<
|
|
159
|
+
HTMLSpanElement,
|
|
160
|
+
NavigationMenuItemLabelProps
|
|
161
|
+
>(withItemStateProps(Primitive.span), "label");
|
|
162
|
+
|
|
163
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
164
|
+
|
|
165
|
+
export interface NavigationMenuItemDescriptionProps
|
|
166
|
+
extends PrimitiveProps,
|
|
167
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
168
|
+
|
|
169
|
+
export const NavigationMenuItemDescription = withItemContext<
|
|
170
|
+
HTMLSpanElement,
|
|
171
|
+
NavigationMenuItemDescriptionProps
|
|
172
|
+
>(withItemStateProps(Primitive.span), "description");
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export {
|
|
2
|
+
NavigationMenuProvider,
|
|
3
|
+
NavigationMenuRoot,
|
|
4
|
+
NavigationMenuTrigger,
|
|
5
|
+
NavigationMenuPositioner,
|
|
6
|
+
NavigationMenuContent,
|
|
7
|
+
NavigationMenuScrollArea,
|
|
8
|
+
NavigationMenuGroup,
|
|
9
|
+
NavigationMenuGroupLabel,
|
|
10
|
+
NavigationMenuItem,
|
|
11
|
+
NavigationMenuItemBody,
|
|
12
|
+
NavigationMenuItemLabel,
|
|
13
|
+
NavigationMenuItemDescription,
|
|
14
|
+
type NavigationMenuProviderProps,
|
|
15
|
+
type NavigationMenuRootProps,
|
|
16
|
+
type NavigationMenuTriggerProps,
|
|
17
|
+
type NavigationMenuPositionerProps,
|
|
18
|
+
type NavigationMenuContentProps,
|
|
19
|
+
type NavigationMenuScrollAreaProps,
|
|
20
|
+
type NavigationMenuGroupProps,
|
|
21
|
+
type NavigationMenuGroupLabelProps,
|
|
22
|
+
type NavigationMenuItemProps,
|
|
23
|
+
type NavigationMenuItemBodyProps,
|
|
24
|
+
type NavigationMenuItemLabelProps,
|
|
25
|
+
type NavigationMenuItemDescriptionProps,
|
|
26
|
+
} from "./NavigationMenu";
|
|
27
|
+
|
|
28
|
+
export * as NavigationMenu from "./NavigationMenu.namespace";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { Slot } from "@radix-ui/react-slot";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import type { DistributiveOmit } from "../../utils/styled";
|
|
4
4
|
import { Flex, type FlexProps } from "../Flex";
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export type ResponsivePairProps = DistributiveOmit<FlexProps, "flexDirection" | "flexWrap"> & {
|
|
7
7
|
/**
|
|
8
8
|
* @default "wrap-reverse"
|
|
9
9
|
*/
|
|
10
10
|
wrap?: "wrap" | "wrap-reverse";
|
|
11
11
|
|
|
12
12
|
children: [React.ReactNode, React.ReactNode];
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
|
|
15
15
|
export const ResponsivePair = React.forwardRef<HTMLDivElement, ResponsivePairProps>(
|
|
16
16
|
(props, ref) => {
|
|
17
17
|
const { wrap = "wrap-reverse", gap, children, ...rest } = props;
|
|
18
18
|
const childrenArray = React.Children.toArray(children);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
19
|
+
const style = {
|
|
20
|
+
"--seed-box-min-width": `calc(${100 / childrenArray.length}% - var(--responsive-pair-gap) / ${childrenArray.length})`,
|
|
21
|
+
"--seed-box-flex-grow": 1,
|
|
22
|
+
} as React.CSSProperties;
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<Flex
|
|
@@ -30,6 +30,12 @@ export const ResponsivePair = React.forwardRef<HTMLDivElement, ResponsivePairPro
|
|
|
30
30
|
flexWrap={wrap}
|
|
31
31
|
gap={gap}
|
|
32
32
|
{...rest}
|
|
33
|
+
style={
|
|
34
|
+
{
|
|
35
|
+
"--responsive-pair-gap": "var(--seed-box-gap, 0px)",
|
|
36
|
+
...rest.style,
|
|
37
|
+
} as React.CSSProperties
|
|
38
|
+
}
|
|
33
39
|
>
|
|
34
40
|
<Slot style={style}>{childrenArray[0]}</Slot>
|
|
35
41
|
<Slot style={style}>{childrenArray[1]}</Slot>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ResponsiveSidePanelBackdrop as Backdrop,
|
|
3
|
+
ResponsiveSidePanelBody as Body,
|
|
4
|
+
ResponsiveSidePanelContent as Content,
|
|
5
|
+
ResponsiveSidePanelDescription as Description,
|
|
6
|
+
ResponsiveSidePanelFooter as Footer,
|
|
7
|
+
ResponsiveSidePanelHandle as Handle,
|
|
8
|
+
ResponsiveSidePanelHeader as Header,
|
|
9
|
+
ResponsiveSidePanelPositioner as Positioner,
|
|
10
|
+
ResponsiveSidePanelRoot as Root,
|
|
11
|
+
ResponsiveSidePanelTitle as Title,
|
|
12
|
+
ResponsiveSidePanelTrigger as Trigger,
|
|
13
|
+
ResponsiveSidePanelCloseButton as CloseButton,
|
|
14
|
+
type ResponsiveSidePanelBackdropProps as BackdropProps,
|
|
15
|
+
type ResponsiveSidePanelBodyProps as BodyProps,
|
|
16
|
+
type ResponsiveSidePanelContentProps as ContentProps,
|
|
17
|
+
type ResponsiveSidePanelDescriptionProps as DescriptionProps,
|
|
18
|
+
type ResponsiveSidePanelFooterProps as FooterProps,
|
|
19
|
+
type ResponsiveSidePanelHandleProps as HandleProps,
|
|
20
|
+
type ResponsiveSidePanelHeaderProps as HeaderProps,
|
|
21
|
+
type ResponsiveSidePanelPositionerProps as PositionerProps,
|
|
22
|
+
type ResponsiveSidePanelRootProps as RootProps,
|
|
23
|
+
type ResponsiveSidePanelTitleProps as TitleProps,
|
|
24
|
+
type ResponsiveSidePanelTriggerProps as TriggerProps,
|
|
25
|
+
type ResponsiveSidePanelCloseButtonProps as CloseButtonProps,
|
|
26
|
+
} from "./ResponsiveSidePanel";
|