@seed-design/react 1.2.15 → 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 +2 -7
- 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 +51 -22
- 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
package/lib/utils/styled.js
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { isResponsiveObject } from "../types/responsive.js";
|
|
2
3
|
import { vars } from "@seed-design/css/vars";
|
|
3
4
|
import { forwardRef } from "react";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
//#region src/utils/styled.tsx
|
|
7
|
+
function resolveResponsive(varName, value, transform) {
|
|
8
|
+
if (!isResponsiveObject(value)) {
|
|
9
|
+
const transformed = transform(value);
|
|
10
|
+
if (transformed === void 0) return {};
|
|
11
|
+
return { [`${varName}-base`]: transformed };
|
|
12
|
+
}
|
|
13
|
+
const result = {};
|
|
14
|
+
for (const [breakpoint, breakpointValue] of Object.entries(value)) {
|
|
15
|
+
if (breakpointValue === void 0) continue;
|
|
16
|
+
const transformed = transform(breakpointValue);
|
|
17
|
+
if (transformed === void 0) continue;
|
|
18
|
+
result[`${varName}-${breakpoint}`] = transformed;
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
6
22
|
function handleColor(color) {
|
|
7
23
|
if (!color) return;
|
|
8
24
|
const [type, value] = color.split(".");
|
|
@@ -37,58 +53,8 @@ function handleGradient(gradientToken, direction) {
|
|
|
37
53
|
if (!colorStops) return;
|
|
38
54
|
return `linear-gradient(${direction}, ${colorStops})`;
|
|
39
55
|
}
|
|
40
|
-
function handleDisplay(display) {
|
|
41
|
-
if (!display) return;
|
|
42
|
-
if (process.env.NODE_ENV !== "production") {
|
|
43
|
-
if (display === "inlineFlex" || display === "inlineBlock") console.warn(`[SEED Design System] display='${display}' is deprecated and will be removed in @seed-design/react@2.0.0. Use display='${display === "inlineFlex" ? "inline-flex" : "inline-block"}' instead.`);
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
flex: "flex",
|
|
47
|
-
inlineFlex: "inline-flex",
|
|
48
|
-
inlineBlock: "inline-block",
|
|
49
|
-
none: "none"
|
|
50
|
-
}[display] ?? display;
|
|
51
|
-
}
|
|
52
|
-
function handleFlexDirection(flexDirection) {
|
|
53
|
-
if (!flexDirection) return;
|
|
54
|
-
if (process.env.NODE_ENV !== "production") {
|
|
55
|
-
if (flexDirection === "rowReverse" || flexDirection === "columnReverse") console.warn(`[SEED Design System] flexDirection='${flexDirection}' is deprecated and will be removed in @seed-design/react@2.0.0. Use flexDirection='${flexDirection === "rowReverse" ? "row-reverse" : "column-reverse"}' instead.`);
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
row: "row",
|
|
59
|
-
column: "column",
|
|
60
|
-
rowReverse: "row-reverse",
|
|
61
|
-
columnReverse: "column-reverse"
|
|
62
|
-
}[flexDirection] ?? flexDirection;
|
|
63
|
-
}
|
|
64
|
-
function handleJustifyContent(justifyContent) {
|
|
65
|
-
if (!justifyContent) return;
|
|
66
|
-
if (process.env.NODE_ENV !== "production") {
|
|
67
|
-
if (justifyContent === "flexStart" || justifyContent === "flexEnd") console.warn(`[SEED Design System] justifyContent='${justifyContent}' is deprecated and will be removed in @seed-design/react@2.0.0. Use justifyContent='${justifyContent === "flexStart" ? "flex-start" : "flex-end"}' instead.`);
|
|
68
|
-
if (justifyContent === "spaceBetween" || justifyContent === "spaceAround") console.warn(`[SEED Design System] justifyContent='${justifyContent}' is deprecated and will be removed in @seed-design/react@2.0.0. Use justifyContent='${justifyContent === "spaceBetween" ? "space-between" : "space-around"}' instead.`);
|
|
69
|
-
}
|
|
70
|
-
return {
|
|
71
|
-
flexStart: "flex-start",
|
|
72
|
-
flexEnd: "flex-end",
|
|
73
|
-
center: "center",
|
|
74
|
-
spaceBetween: "space-between",
|
|
75
|
-
spaceAround: "space-around"
|
|
76
|
-
}[justifyContent] ?? justifyContent;
|
|
77
|
-
}
|
|
78
|
-
function handleAlignItems(alignItems) {
|
|
79
|
-
if (!alignItems) return;
|
|
80
|
-
if (process.env.NODE_ENV !== "production") {
|
|
81
|
-
if (alignItems === "flexStart" || alignItems === "flexEnd") console.warn(`[SEED Design System] alignItems='${alignItems}' is deprecated and will be removed in @seed-design/react@2.0.0. Use alignItems='${alignItems === "flexStart" ? "flex-start" : "flex-end"}' instead.`);
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
flexStart: "flex-start",
|
|
85
|
-
flexEnd: "flex-end",
|
|
86
|
-
center: "center",
|
|
87
|
-
stretch: "stretch"
|
|
88
|
-
}[alignItems] ?? alignItems;
|
|
89
|
-
}
|
|
90
56
|
function useStyleProps(props) {
|
|
91
|
-
const { background, bg, bgGradient, backgroundGradient, bgGradientDirection, backgroundGradientDirection, color, borderColor, borderWidth, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth, borderRadius, borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius, boxShadow, width, minWidth, maxWidth, height, minHeight, maxHeight, padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, p, px, py, pt, pr, pb, pl, bleedX, bleedY, bleedTop, bleedRight, bleedBottom, bleedLeft, bottom, left, right, top, display, position, overflowX, overflowY, zIndex, flexGrow, flexShrink, flexDirection, flexWrap, justifyContent, justifySelf, alignItems, alignContent, alignSelf, gap, gridColumn, gridRow, unstable_transform, _active, style, ...restProps } = props;
|
|
57
|
+
const { background, bg, bgGradient, backgroundGradient, bgGradientDirection, backgroundGradientDirection, color, borderColor, borderWidth, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth, borderRadius, borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius, boxShadow, width, minWidth, maxWidth, height, minHeight, maxHeight, padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, p, px, py, pt, pr, pb, pl, bleed, bleedX, bleedY, bleedTop, bleedRight, bleedBottom, bleedLeft, margin, m, marginX, mx, marginY, my, marginTop, mt, marginRight, mr, marginBottom, mb, marginLeft, ml, bottom, left, right, top, display, position, overflowX, overflowY, zIndex, flexGrow, flexShrink, flexDirection, flexWrap, justifyContent, justifySelf, alignItems, alignContent, alignSelf, gap, gridColumn, gridRow, unstable_transform, _active, style, ...restProps } = props;
|
|
92
58
|
const gradientValue = handleGradient(bgGradient ?? backgroundGradient, bgGradientDirection ?? backgroundGradientDirection);
|
|
93
59
|
return {
|
|
94
60
|
style: {
|
|
@@ -106,46 +72,53 @@ function useStyleProps(props) {
|
|
|
106
72
|
"--seed-box-border-bottom-right-radius": handleRadius(borderBottomRightRadius),
|
|
107
73
|
"--seed-box-border-bottom-left-radius": handleRadius(borderBottomLeftRadius),
|
|
108
74
|
"--seed-box-box-shadow": handleShadow(boxShadow),
|
|
109
|
-
"--seed-box-width": handleDimension(width),
|
|
110
|
-
"--seed-box-min-width": handleDimension(minWidth),
|
|
111
|
-
"--seed-box-max-width": handleDimension(maxWidth),
|
|
112
|
-
"--seed-box-height": handleDimension(height),
|
|
113
|
-
"--seed-box-min-height": handleDimension(minHeight),
|
|
114
|
-
"--seed-box-max-height": handleDimension(maxHeight),
|
|
115
|
-
"--seed-box-padding": handleDimension(padding ?? p),
|
|
116
|
-
"--seed-box-padding-x": handleDimension(paddingX ?? px),
|
|
117
|
-
"--seed-box-padding-y": handleDimension(paddingY ?? py),
|
|
118
|
-
"--seed-box-padding-top": handlePaddingWithSafeArea(paddingTop ?? pt, "top"),
|
|
119
|
-
"--seed-box-padding-right": handleDimension(paddingRight ?? pr),
|
|
120
|
-
"--seed-box-padding-bottom": handlePaddingWithSafeArea(paddingBottom ?? pb, "bottom"),
|
|
121
|
-
"--seed-box-padding-left": handleDimension(paddingLeft ?? pl),
|
|
122
|
-
"--seed-box-bleed-top": handleBleed(bleedTop ?? bleedY, "top"),
|
|
123
|
-
"--seed-box-bleed-right": handleBleed(bleedRight ?? bleedX, "right"),
|
|
124
|
-
"--seed-box-bleed-bottom": handleBleed(bleedBottom ?? bleedY, "bottom"),
|
|
125
|
-
"--seed-box-bleed-left": handleBleed(bleedLeft ?? bleedX, "left"),
|
|
126
75
|
"--seed-box-top": top,
|
|
127
76
|
"--seed-box-left": left,
|
|
128
77
|
"--seed-box-right": right,
|
|
129
78
|
"--seed-box-bottom": bottom,
|
|
130
|
-
"--seed-box-gap": handleDimension(gap),
|
|
131
|
-
"--seed-box-display": handleDisplay(display),
|
|
132
79
|
"--seed-box-position": position,
|
|
133
80
|
"--seed-box-overflow-x": overflowX,
|
|
134
81
|
"--seed-box-overflow-y": overflowY,
|
|
135
82
|
"--seed-box-z-index": zIndex,
|
|
136
83
|
"--seed-box-flex-grow": flexGrow === true ? 1 : flexGrow,
|
|
137
84
|
"--seed-box-flex-shrink": flexShrink === true ? 1 : flexShrink,
|
|
138
|
-
"--seed-box-flex-direction": handleFlexDirection(flexDirection),
|
|
139
85
|
"--seed-box-flex-wrap": flexWrap === true ? "wrap" : flexWrap,
|
|
140
|
-
"--seed-box-justify-content":
|
|
86
|
+
"--seed-box-justify-content": justifyContent,
|
|
141
87
|
"--seed-box-justify-self": justifySelf,
|
|
142
|
-
"--seed-box-align-items":
|
|
143
|
-
"--seed-box-align-content":
|
|
144
|
-
"--seed-box-align-self":
|
|
88
|
+
"--seed-box-align-items": alignItems,
|
|
89
|
+
"--seed-box-align-content": alignContent,
|
|
90
|
+
"--seed-box-align-self": alignSelf,
|
|
145
91
|
"--seed-box-grid-column": gridColumn,
|
|
146
92
|
"--seed-box-grid-row": gridRow,
|
|
147
93
|
"--seed-box-unstable-transform": unstable_transform,
|
|
148
94
|
"--seed-box-background--active": handleColor(_active?.bg ?? _active?.background),
|
|
95
|
+
...width !== void 0 && resolveResponsive("--seed-box-width", width, handleDimension),
|
|
96
|
+
...minWidth !== void 0 && resolveResponsive("--seed-box-min-width", minWidth, handleDimension),
|
|
97
|
+
...maxWidth !== void 0 && resolveResponsive("--seed-box-max-width", maxWidth, handleDimension),
|
|
98
|
+
...height !== void 0 && resolveResponsive("--seed-box-height", height, handleDimension),
|
|
99
|
+
...minHeight !== void 0 && resolveResponsive("--seed-box-min-height", minHeight, handleDimension),
|
|
100
|
+
...maxHeight !== void 0 && resolveResponsive("--seed-box-max-height", maxHeight, handleDimension),
|
|
101
|
+
...(padding ?? p) !== void 0 && resolveResponsive("--seed-box-padding", padding ?? p, handleDimension),
|
|
102
|
+
...(paddingX ?? px) !== void 0 && resolveResponsive("--seed-box-padding-x", paddingX ?? px, handleDimension),
|
|
103
|
+
...(paddingY ?? py) !== void 0 && resolveResponsive("--seed-box-padding-y", paddingY ?? py, handleDimension),
|
|
104
|
+
...(paddingTop ?? pt) !== void 0 && resolveResponsive("--seed-box-padding-top", paddingTop ?? pt, (v) => handlePaddingWithSafeArea(v, "top")),
|
|
105
|
+
...(paddingRight ?? pr) !== void 0 && resolveResponsive("--seed-box-padding-right", paddingRight ?? pr, handleDimension),
|
|
106
|
+
...(paddingBottom ?? pb) !== void 0 && resolveResponsive("--seed-box-padding-bottom", paddingBottom ?? pb, (v) => handlePaddingWithSafeArea(v, "bottom")),
|
|
107
|
+
...(paddingLeft ?? pl) !== void 0 && resolveResponsive("--seed-box-padding-left", paddingLeft ?? pl, handleDimension),
|
|
108
|
+
...(bleedTop ?? bleedY ?? bleed) !== void 0 && resolveResponsive("--seed-box-bleed-top", bleedTop ?? bleedY ?? bleed, (v) => handleBleed(v, "top")),
|
|
109
|
+
...(bleedRight ?? bleedX ?? bleed) !== void 0 && resolveResponsive("--seed-box-bleed-right", bleedRight ?? bleedX ?? bleed, (v) => handleBleed(v, "right")),
|
|
110
|
+
...(bleedBottom ?? bleedY ?? bleed) !== void 0 && resolveResponsive("--seed-box-bleed-bottom", bleedBottom ?? bleedY ?? bleed, (v) => handleBleed(v, "bottom")),
|
|
111
|
+
...(bleedLeft ?? bleedX ?? bleed) !== void 0 && resolveResponsive("--seed-box-bleed-left", bleedLeft ?? bleedX ?? bleed, (v) => handleBleed(v, "left")),
|
|
112
|
+
...(margin ?? m) !== void 0 && resolveResponsive("--seed-box-margin", margin ?? m, handleDimension),
|
|
113
|
+
...(marginX ?? mx) !== void 0 && resolveResponsive("--seed-box-margin-x", marginX ?? mx, handleDimension),
|
|
114
|
+
...(marginY ?? my) !== void 0 && resolveResponsive("--seed-box-margin-y", marginY ?? my, handleDimension),
|
|
115
|
+
...(marginTop ?? mt) !== void 0 && resolveResponsive("--seed-box-margin-top", marginTop ?? mt, handleDimension),
|
|
116
|
+
...(marginRight ?? mr) !== void 0 && resolveResponsive("--seed-box-margin-right", marginRight ?? mr, handleDimension),
|
|
117
|
+
...(marginBottom ?? mb) !== void 0 && resolveResponsive("--seed-box-margin-bottom", marginBottom ?? mb, handleDimension),
|
|
118
|
+
...(marginLeft ?? ml) !== void 0 && resolveResponsive("--seed-box-margin-left", marginLeft ?? ml, handleDimension),
|
|
119
|
+
...gap !== void 0 && resolveResponsive("--seed-box-gap", gap, handleDimension),
|
|
120
|
+
...display !== void 0 && resolveResponsive("--seed-box-display", display, (v) => v),
|
|
121
|
+
...flexDirection !== void 0 && resolveResponsive("--seed-box-flex-direction", flexDirection, (v) => v),
|
|
149
122
|
...style
|
|
150
123
|
},
|
|
151
124
|
restProps: {
|
|
@@ -167,4 +140,4 @@ function withStyleProps(Component) {
|
|
|
167
140
|
return Node;
|
|
168
141
|
}
|
|
169
142
|
//#endregion
|
|
170
|
-
export { handleColor, handleDimension, handleRadius, useStyleProps, withStyleProps };
|
|
143
|
+
export { handleColor, handleDimension, handleRadius, resolveResponsive, useStyleProps, withStyleProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
@@ -36,38 +36,45 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@radix-ui/react-compose-refs": "^1.1.2",
|
|
39
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
40
39
|
"@radix-ui/react-slot": "^1.2.3",
|
|
41
40
|
"@radix-ui/react-use-controllable-state": "1.2.2",
|
|
42
41
|
"@radix-ui/react-use-layout-effect": "^1.1.1",
|
|
43
|
-
"@seed-design/dom-utils": "
|
|
44
|
-
"@seed-design/react-
|
|
45
|
-
"@seed-design/react-
|
|
46
|
-
"@seed-design/react-
|
|
47
|
-
"@seed-design/react-
|
|
48
|
-
"@seed-design/react-
|
|
49
|
-
"@seed-design/react-
|
|
50
|
-
"@seed-design/react-
|
|
51
|
-
"@seed-design/react-
|
|
52
|
-
"@seed-design/react-field-button": "
|
|
53
|
-
"@seed-design/react-
|
|
54
|
-
"@seed-design/react-
|
|
55
|
-
"@seed-design/react-
|
|
56
|
-
"@seed-design/react-
|
|
57
|
-
"@seed-design/react-
|
|
58
|
-
"@seed-design/react-
|
|
59
|
-
"@seed-design/react-
|
|
60
|
-
"@seed-design/react-
|
|
61
|
-
"@seed-design/react-
|
|
62
|
-
"@seed-design/react-
|
|
63
|
-
"@seed-design/react-
|
|
64
|
-
"@seed-design/react-
|
|
65
|
-
"@seed-design/react-
|
|
42
|
+
"@seed-design/dom-utils": "^2.0.0",
|
|
43
|
+
"@seed-design/react-accordion": "^1.0.0",
|
|
44
|
+
"@seed-design/react-attachment-display": "^1.0.0",
|
|
45
|
+
"@seed-design/react-avatar": "^2.0.0",
|
|
46
|
+
"@seed-design/react-checkbox": "^2.0.0",
|
|
47
|
+
"@seed-design/react-collapsible": "^1.0.0",
|
|
48
|
+
"@seed-design/react-dialog": "^2.0.0",
|
|
49
|
+
"@seed-design/react-drawer": "^2.0.0",
|
|
50
|
+
"@seed-design/react-field": "^2.0.0",
|
|
51
|
+
"@seed-design/react-field-button": "^2.0.0",
|
|
52
|
+
"@seed-design/react-fieldset": "^1.0.0",
|
|
53
|
+
"@seed-design/react-file-upload": "^1.0.0",
|
|
54
|
+
"@seed-design/react-image": "^1.0.0",
|
|
55
|
+
"@seed-design/react-menu": "^1.0.0",
|
|
56
|
+
"@seed-design/react-middle-truncate": "^1.0.0",
|
|
57
|
+
"@seed-design/react-navigation-menu": "^1.0.0",
|
|
58
|
+
"@seed-design/react-popover": "^2.0.0",
|
|
59
|
+
"@seed-design/react-portal": "^2.0.0",
|
|
60
|
+
"@seed-design/react-primitive": "^2.0.0",
|
|
61
|
+
"@seed-design/react-progress": "^2.0.0",
|
|
62
|
+
"@seed-design/react-pull-to-refresh": "^2.0.0",
|
|
63
|
+
"@seed-design/react-radio-group": "^2.0.0",
|
|
64
|
+
"@seed-design/react-segmented-control": "^2.0.0",
|
|
65
|
+
"@seed-design/react-side-navigation": "^1.0.0",
|
|
66
|
+
"@seed-design/react-slider": "^2.0.0",
|
|
67
|
+
"@seed-design/react-snackbar": "^2.0.0",
|
|
68
|
+
"@seed-design/react-switch": "^2.0.0",
|
|
69
|
+
"@seed-design/react-tabs": "^2.0.0",
|
|
70
|
+
"@seed-design/react-text-field": "^2.0.0",
|
|
71
|
+
"@seed-design/react-toggle": "^2.0.0",
|
|
72
|
+
"@seed-design/react-tooltip": "^1.0.0",
|
|
66
73
|
"clsx": "^2.1.1",
|
|
67
74
|
"unicode-segmenter": "^0.14.4"
|
|
68
75
|
},
|
|
69
76
|
"peerDependencies": {
|
|
70
|
-
"@seed-design/css": "
|
|
77
|
+
"@seed-design/css": "^2.0.0",
|
|
71
78
|
"react": ">=18.0.0",
|
|
72
79
|
"react-dom": ">=18.0.0"
|
|
73
80
|
},
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AccordionRoot as Root,
|
|
3
|
+
AccordionItem as Item,
|
|
4
|
+
AccordionHeader as Header,
|
|
5
|
+
AccordionTrigger as Trigger,
|
|
6
|
+
AccordionContent as Content,
|
|
7
|
+
AccordionBody as Body,
|
|
8
|
+
AccordionTitle as Title,
|
|
9
|
+
AccordionDescription as Description,
|
|
10
|
+
AccordionPrefix as Prefix,
|
|
11
|
+
AccordionSuffixIcon as SuffixIcon,
|
|
12
|
+
type AccordionRootProps as RootProps,
|
|
13
|
+
type AccordionItemProps as ItemProps,
|
|
14
|
+
type AccordionHeaderProps as HeaderProps,
|
|
15
|
+
type AccordionTriggerProps as TriggerProps,
|
|
16
|
+
type AccordionContentProps as ContentProps,
|
|
17
|
+
type AccordionBodyProps as BodyProps,
|
|
18
|
+
type AccordionTitleProps as TitleProps,
|
|
19
|
+
type AccordionDescriptionProps as DescriptionProps,
|
|
20
|
+
type AccordionPrefixProps as PrefixProps,
|
|
21
|
+
type AccordionSuffixIconProps as SuffixIconProps,
|
|
22
|
+
} from "./Accordion";
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { accordion, type AccordionVariantProps } from "@seed-design/css/recipes/accordion";
|
|
4
|
+
import {
|
|
5
|
+
Accordion as AccordionPrimitive,
|
|
6
|
+
useAccordionItemContext,
|
|
7
|
+
} from "@seed-design/react-accordion";
|
|
8
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
9
|
+
import type * as React from "react";
|
|
10
|
+
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
11
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
12
|
+
|
|
13
|
+
const { withProvider, withContext } = createSlotRecipeContext(accordion);
|
|
14
|
+
const withStateProps = createWithStateProps([useAccordionItemContext]);
|
|
15
|
+
|
|
16
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
17
|
+
|
|
18
|
+
export interface AccordionRootProps extends AccordionVariantProps, AccordionPrimitive.RootProps {}
|
|
19
|
+
|
|
20
|
+
export const AccordionRoot = withProvider<HTMLDivElement, AccordionRootProps>(
|
|
21
|
+
AccordionPrimitive.Root,
|
|
22
|
+
"root",
|
|
23
|
+
);
|
|
24
|
+
AccordionRoot.displayName = "AccordionRoot";
|
|
25
|
+
|
|
26
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
27
|
+
|
|
28
|
+
export interface AccordionItemProps extends AccordionPrimitive.ItemProps {}
|
|
29
|
+
|
|
30
|
+
export const AccordionItem = withContext<HTMLDivElement, AccordionItemProps>(
|
|
31
|
+
AccordionPrimitive.Item,
|
|
32
|
+
"item",
|
|
33
|
+
);
|
|
34
|
+
AccordionItem.displayName = "AccordionItem";
|
|
35
|
+
|
|
36
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
37
|
+
|
|
38
|
+
export interface AccordionHeaderProps extends AccordionPrimitive.HeaderProps {}
|
|
39
|
+
|
|
40
|
+
export const AccordionHeader = withContext<HTMLHeadingElement, AccordionHeaderProps>(
|
|
41
|
+
AccordionPrimitive.Header,
|
|
42
|
+
"header",
|
|
43
|
+
);
|
|
44
|
+
AccordionHeader.displayName = "AccordionHeader";
|
|
45
|
+
|
|
46
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
47
|
+
|
|
48
|
+
export interface AccordionTriggerProps extends AccordionPrimitive.TriggerProps {}
|
|
49
|
+
|
|
50
|
+
export const AccordionTrigger = withContext<HTMLButtonElement, AccordionTriggerProps>(
|
|
51
|
+
AccordionPrimitive.Trigger,
|
|
52
|
+
"trigger",
|
|
53
|
+
);
|
|
54
|
+
AccordionTrigger.displayName = "AccordionTrigger";
|
|
55
|
+
|
|
56
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
57
|
+
|
|
58
|
+
export interface AccordionContentProps extends AccordionPrimitive.ContentProps {}
|
|
59
|
+
|
|
60
|
+
export const AccordionContent = withContext<HTMLDivElement, AccordionContentProps>(
|
|
61
|
+
AccordionPrimitive.Content,
|
|
62
|
+
"content",
|
|
63
|
+
);
|
|
64
|
+
AccordionContent.displayName = "AccordionContent";
|
|
65
|
+
|
|
66
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
67
|
+
|
|
68
|
+
export interface AccordionBodyProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}
|
|
69
|
+
|
|
70
|
+
export const AccordionBody = withContext<HTMLDivElement, AccordionBodyProps>(Primitive.div, "body");
|
|
71
|
+
AccordionBody.displayName = "AccordionBody";
|
|
72
|
+
|
|
73
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
74
|
+
|
|
75
|
+
export interface AccordionTitleProps
|
|
76
|
+
extends PrimitiveProps,
|
|
77
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
78
|
+
|
|
79
|
+
export const AccordionTitle = withContext<HTMLSpanElement, AccordionTitleProps>(
|
|
80
|
+
withStateProps(Primitive.span),
|
|
81
|
+
"title",
|
|
82
|
+
);
|
|
83
|
+
AccordionTitle.displayName = "AccordionTitle";
|
|
84
|
+
|
|
85
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
86
|
+
|
|
87
|
+
export interface AccordionDescriptionProps
|
|
88
|
+
extends PrimitiveProps,
|
|
89
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
90
|
+
|
|
91
|
+
export const AccordionDescription = withContext<HTMLSpanElement, AccordionDescriptionProps>(
|
|
92
|
+
withStateProps(Primitive.span),
|
|
93
|
+
"description",
|
|
94
|
+
);
|
|
95
|
+
AccordionDescription.displayName = "AccordionDescription";
|
|
96
|
+
|
|
97
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
98
|
+
|
|
99
|
+
export interface AccordionPrefixProps
|
|
100
|
+
extends PrimitiveProps,
|
|
101
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
102
|
+
|
|
103
|
+
export const AccordionPrefix = withContext<HTMLDivElement, AccordionPrefixProps>(
|
|
104
|
+
withStateProps(Primitive.div),
|
|
105
|
+
"prefix",
|
|
106
|
+
);
|
|
107
|
+
AccordionPrefix.displayName = "AccordionPrefix";
|
|
108
|
+
|
|
109
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
110
|
+
|
|
111
|
+
export interface AccordionSuffixIconProps
|
|
112
|
+
extends PrimitiveProps,
|
|
113
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
114
|
+
|
|
115
|
+
export const AccordionSuffixIcon = withContext<HTMLDivElement, AccordionSuffixIconProps>(
|
|
116
|
+
withStateProps(Primitive.div),
|
|
117
|
+
"suffixIcon",
|
|
118
|
+
);
|
|
119
|
+
AccordionSuffixIcon.displayName = "AccordionSuffixIcon";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AccordionRoot,
|
|
3
|
+
AccordionItem,
|
|
4
|
+
AccordionHeader,
|
|
5
|
+
AccordionTrigger,
|
|
6
|
+
AccordionContent,
|
|
7
|
+
AccordionBody,
|
|
8
|
+
AccordionTitle,
|
|
9
|
+
AccordionDescription,
|
|
10
|
+
AccordionPrefix,
|
|
11
|
+
AccordionSuffixIcon,
|
|
12
|
+
type AccordionRootProps,
|
|
13
|
+
type AccordionItemProps,
|
|
14
|
+
type AccordionHeaderProps,
|
|
15
|
+
type AccordionTriggerProps,
|
|
16
|
+
type AccordionContentProps,
|
|
17
|
+
type AccordionBodyProps,
|
|
18
|
+
type AccordionTitleProps,
|
|
19
|
+
type AccordionDescriptionProps,
|
|
20
|
+
type AccordionPrefixProps,
|
|
21
|
+
type AccordionSuffixIconProps,
|
|
22
|
+
} from "./Accordion";
|
|
23
|
+
|
|
24
|
+
export * as Accordion from "./Accordion.namespace";
|
|
@@ -23,7 +23,7 @@ export interface ActionButtonProps
|
|
|
23
23
|
extends ActionButtonVariantProps,
|
|
24
24
|
UsePendingButtonProps,
|
|
25
25
|
PrimitiveProps,
|
|
26
|
-
Pick<StyleProps, "flexGrow" | "bleedX" | "bleedY">,
|
|
26
|
+
Pick<StyleProps, "flexGrow" | "bleed" | "bleedX" | "bleedY">,
|
|
27
27
|
React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
28
28
|
/**
|
|
29
29
|
* Color of the label and icons inside the button.
|
|
@@ -17,7 +17,7 @@ const withStateProps = createWithStateProps([useDialogContext]);
|
|
|
17
17
|
////////////////////////////////////////////////////////////////////////////////////
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* @deprecated Use `
|
|
20
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
21
21
|
*/
|
|
22
22
|
export interface ActionSheetRootProps extends ActionSheetVariantProps, DialogPrimitive.RootProps {
|
|
23
23
|
/**
|
|
@@ -31,7 +31,7 @@ export interface ActionSheetRootProps extends ActionSheetVariantProps, DialogPri
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* @deprecated Use `
|
|
34
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
35
35
|
*/
|
|
36
36
|
export const ActionSheetRoot = withRootProvider<ActionSheetRootProps>(DialogPrimitive.Root, {
|
|
37
37
|
defaultProps: {
|
|
@@ -43,24 +43,24 @@ export const ActionSheetRoot = withRootProvider<ActionSheetRootProps>(DialogPrim
|
|
|
43
43
|
////////////////////////////////////////////////////////////////////////////////////
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
* @deprecated Use `
|
|
46
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
47
47
|
*/
|
|
48
48
|
export interface ActionSheetTriggerProps extends DialogPrimitive.TriggerProps {}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* @deprecated Use `
|
|
51
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
52
52
|
*/
|
|
53
53
|
export const ActionSheetTrigger = DialogPrimitive.Trigger;
|
|
54
54
|
|
|
55
55
|
////////////////////////////////////////////////////////////////////////////////////
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
* @deprecated Use `
|
|
58
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
59
59
|
*/
|
|
60
60
|
export interface ActionSheetPositionerProps extends DialogPrimitive.PositionerProps {}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* @deprecated Use `
|
|
63
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
64
64
|
*/
|
|
65
65
|
export const ActionSheetPositioner = withContext<HTMLDivElement, ActionSheetPositionerProps>(
|
|
66
66
|
DialogPrimitive.Positioner,
|
|
@@ -70,12 +70,12 @@ export const ActionSheetPositioner = withContext<HTMLDivElement, ActionSheetPosi
|
|
|
70
70
|
////////////////////////////////////////////////////////////////////////////////////
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* @deprecated Use `
|
|
73
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
74
74
|
*/
|
|
75
75
|
export interface ActionSheetBackdropProps extends DialogPrimitive.BackdropProps {}
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
|
-
* @deprecated Use `
|
|
78
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
79
79
|
*/
|
|
80
80
|
export const ActionSheetBackdrop = withContext<HTMLDivElement, ActionSheetBackdropProps>(
|
|
81
81
|
DialogPrimitive.Backdrop,
|
|
@@ -85,12 +85,12 @@ export const ActionSheetBackdrop = withContext<HTMLDivElement, ActionSheetBackdr
|
|
|
85
85
|
////////////////////////////////////////////////////////////////////////////////////
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* @deprecated Use `
|
|
88
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
89
89
|
*/
|
|
90
90
|
export interface ActionSheetContentProps extends DialogPrimitive.ContentProps {}
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* @deprecated Use `
|
|
93
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
94
94
|
*/
|
|
95
95
|
export const ActionSheetContent = withContext<HTMLDivElement, ActionSheetContentProps>(
|
|
96
96
|
DialogPrimitive.Content,
|
|
@@ -100,14 +100,14 @@ export const ActionSheetContent = withContext<HTMLDivElement, ActionSheetContent
|
|
|
100
100
|
////////////////////////////////////////////////////////////////////////////////////
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
* @deprecated Use `
|
|
103
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
104
104
|
*/
|
|
105
105
|
export interface ActionSheetHeaderProps
|
|
106
106
|
extends PrimitiveProps,
|
|
107
107
|
React.HTMLAttributes<HTMLDivElement> {}
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* @deprecated Use `
|
|
110
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
111
111
|
*/
|
|
112
112
|
export const ActionSheetHeader = withContext<HTMLDivElement, ActionSheetHeaderProps>(
|
|
113
113
|
withStateProps(Primitive.div),
|
|
@@ -117,12 +117,12 @@ export const ActionSheetHeader = withContext<HTMLDivElement, ActionSheetHeaderPr
|
|
|
117
117
|
////////////////////////////////////////////////////////////////////////////////////
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* @deprecated Use `
|
|
120
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
121
121
|
*/
|
|
122
122
|
export interface ActionSheetTitleProps extends DialogPrimitive.TitleProps {}
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
* @deprecated Use `
|
|
125
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
126
126
|
*/
|
|
127
127
|
export const ActionSheetTitle = withContext<HTMLHeadingElement, ActionSheetTitleProps>(
|
|
128
128
|
withStateProps(Primitive.h2),
|
|
@@ -132,12 +132,12 @@ export const ActionSheetTitle = withContext<HTMLHeadingElement, ActionSheetTitle
|
|
|
132
132
|
////////////////////////////////////////////////////////////////////////////////////
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
* @deprecated Use `
|
|
135
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
136
136
|
*/
|
|
137
137
|
export interface ActionSheetDescriptionProps extends DialogPrimitive.DescriptionProps {}
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
|
-
* @deprecated Use `
|
|
140
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
141
141
|
*/
|
|
142
142
|
export const ActionSheetDescription = withContext<
|
|
143
143
|
HTMLParagraphElement,
|
|
@@ -147,12 +147,12 @@ export const ActionSheetDescription = withContext<
|
|
|
147
147
|
////////////////////////////////////////////////////////////////////////////////////
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
|
-
* @deprecated Use `
|
|
150
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
151
151
|
*/
|
|
152
152
|
export interface ActionSheetListProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
|
-
* @deprecated Use `
|
|
155
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
156
156
|
*/
|
|
157
157
|
export const ActionSheetList = withContext<HTMLDivElement, ActionSheetListProps>(
|
|
158
158
|
withStateProps(Primitive.div),
|
|
@@ -162,7 +162,7 @@ export const ActionSheetList = withContext<HTMLDivElement, ActionSheetListProps>
|
|
|
162
162
|
////////////////////////////////////////////////////////////////////////////////////
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
|
-
* @deprecated Use `
|
|
165
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
166
166
|
*/
|
|
167
167
|
export interface ActionSheetItemProps
|
|
168
168
|
extends PrimitiveProps,
|
|
@@ -170,7 +170,7 @@ export interface ActionSheetItemProps
|
|
|
170
170
|
React.HTMLAttributes<HTMLButtonElement> {}
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
|
-
* @deprecated Use `
|
|
173
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
174
174
|
*/
|
|
175
175
|
export const ActionSheetItem = withItemContext<HTMLButtonElement, ActionSheetItemProps>(
|
|
176
176
|
withStateProps(Primitive.button),
|
|
@@ -179,12 +179,12 @@ export const ActionSheetItem = withItemContext<HTMLButtonElement, ActionSheetIte
|
|
|
179
179
|
////////////////////////////////////////////////////////////////////////////////////
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
* @deprecated Use `
|
|
182
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
183
183
|
*/
|
|
184
184
|
export interface ActionSheetCloseButtonProps extends DialogPrimitive.CloseButtonProps {}
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
|
-
* @deprecated Use `
|
|
187
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
188
188
|
*/
|
|
189
189
|
export const ActionSheetCloseButton = withContext<HTMLDivElement, ActionSheetCloseButtonProps>(
|
|
190
190
|
DialogPrimitive.CloseButton,
|
|
@@ -3,7 +3,7 @@ import { Box, type BoxProps } from "../Box/Box";
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { article } from "@seed-design/css/recipes/article";
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export type ArticleProps = BoxProps;
|
|
7
7
|
|
|
8
8
|
export const Article = React.forwardRef<HTMLElement, ArticleProps>(
|
|
9
9
|
({ as = "article", className, ...props }, ref) => {
|
|
@@ -3,7 +3,7 @@ import clsx from "clsx";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Box, type BoxProps } from "../Box/Box";
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export type AspectRatioProps = BoxProps & {
|
|
7
7
|
/**
|
|
8
8
|
* The aspect ratio of the aspect ratio container (width / height).
|
|
9
9
|
* @default 4 / 3
|
|
@@ -24,7 +24,7 @@ export interface AspectRatioProps extends BoxProps {
|
|
|
24
24
|
* @default "hidden"
|
|
25
25
|
*/
|
|
26
26
|
overflowY?: BoxProps["overflowY"];
|
|
27
|
-
}
|
|
27
|
+
};
|
|
28
28
|
|
|
29
29
|
export const AspectRatio = React.forwardRef<HTMLDivElement, AspectRatioProps>(
|
|
30
30
|
({ ratio = 4 / 3, children, className, style, ...rest }, ref) => {
|