@seed-design/react 1.2.15 → 2.0.1
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 +10 -10
- package/lib/components/ImageFrame/ImageFrame.d.ts +3 -11
- package/lib/components/ImageFrame/ImageFrame.d.ts.map +1 -1
- package/lib/components/ImageFrame/ImageFrame.js +10 -10
- 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/ScrollFog/ScrollFog.cjs +1 -2
- package/lib/components/ScrollFog/ScrollFog.d.ts.map +1 -1
- package/lib/components/ScrollFog/ScrollFog.js +4 -5
- 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 +29 -35
- 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/ScrollFog/ScrollFog.tsx +2 -11
- 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/src/utils/styled.tsx
CHANGED
|
@@ -13,6 +13,34 @@ import type {
|
|
|
13
13
|
} from "@seed-design/css/vars";
|
|
14
14
|
import { vars } from "@seed-design/css/vars";
|
|
15
15
|
import { forwardRef } from "react";
|
|
16
|
+
import { type ResponsiveValue, isResponsiveObject } from "../types/responsive";
|
|
17
|
+
|
|
18
|
+
export function resolveResponsive<T>(
|
|
19
|
+
varName: string,
|
|
20
|
+
value: ResponsiveValue<T>,
|
|
21
|
+
transform: (v: T) => string | number | undefined,
|
|
22
|
+
): Record<string, string | number> {
|
|
23
|
+
if (!isResponsiveObject(value)) {
|
|
24
|
+
const transformed = transform(value);
|
|
25
|
+
if (transformed === undefined) return {};
|
|
26
|
+
|
|
27
|
+
return { [`${varName}-base`]: transformed };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const result: Record<string, string | number> = {};
|
|
31
|
+
|
|
32
|
+
for (const [breakpoint, breakpointValue] of Object.entries(value)) {
|
|
33
|
+
if (breakpointValue === undefined) continue;
|
|
34
|
+
|
|
35
|
+
const transformed = transform(breakpointValue);
|
|
36
|
+
|
|
37
|
+
if (transformed === undefined) continue;
|
|
38
|
+
|
|
39
|
+
result[`${varName}-${breakpoint}`] = transformed;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
16
44
|
|
|
17
45
|
export function handleColor(color: string | undefined) {
|
|
18
46
|
if (!color) {
|
|
@@ -62,7 +90,7 @@ function handleShadow(shadow: Shadow | (string & {}) | undefined) {
|
|
|
62
90
|
return vars.$shadow[shadow] ?? shadow;
|
|
63
91
|
}
|
|
64
92
|
|
|
65
|
-
|
|
93
|
+
function handlePaddingWithSafeArea(
|
|
66
94
|
padding: string | 0 | undefined,
|
|
67
95
|
direction: "top" | "bottom",
|
|
68
96
|
): string | undefined {
|
|
@@ -97,105 +125,214 @@ function handleGradient(gradientToken: string | undefined, direction: string | u
|
|
|
97
125
|
return `linear-gradient(${direction}, ${colorStops})`;
|
|
98
126
|
}
|
|
99
127
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
128
|
+
interface MarginStyleProps {
|
|
129
|
+
/**
|
|
130
|
+
* Margin on all four sides.
|
|
131
|
+
*
|
|
132
|
+
* Cannot be combined with any `bleed*` prop.
|
|
133
|
+
*/
|
|
134
|
+
margin?: ResponsiveValue<
|
|
135
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
136
|
+
>;
|
|
104
137
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
138
|
+
/**
|
|
139
|
+
* Shorthand for `margin`.
|
|
140
|
+
*
|
|
141
|
+
* Cannot be combined with any `bleed*` prop.
|
|
142
|
+
*/
|
|
143
|
+
m?: ResponsiveValue<
|
|
144
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
145
|
+
>;
|
|
112
146
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
}
|
|
147
|
+
/**
|
|
148
|
+
* Horizontal margin (left + right).
|
|
149
|
+
*
|
|
150
|
+
* Cannot be combined with any `bleed*` prop.
|
|
151
|
+
*/
|
|
152
|
+
marginX?: ResponsiveValue<
|
|
153
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
154
|
+
>;
|
|
122
155
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
156
|
+
/**
|
|
157
|
+
* Shorthand for `marginX`.
|
|
158
|
+
*
|
|
159
|
+
* Cannot be combined with any `bleed*` prop.
|
|
160
|
+
*/
|
|
161
|
+
mx?: ResponsiveValue<
|
|
162
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
163
|
+
>;
|
|
127
164
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
165
|
+
/**
|
|
166
|
+
* Vertical margin (top + bottom).
|
|
167
|
+
*
|
|
168
|
+
* Cannot be combined with any `bleed*` prop.
|
|
169
|
+
*/
|
|
170
|
+
marginY?: ResponsiveValue<
|
|
171
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
172
|
+
>;
|
|
135
173
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
}
|
|
174
|
+
/**
|
|
175
|
+
* Shorthand for `marginY`.
|
|
176
|
+
*
|
|
177
|
+
* Cannot be combined with any `bleed*` prop.
|
|
178
|
+
*/
|
|
179
|
+
my?: ResponsiveValue<
|
|
180
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
181
|
+
>;
|
|
145
182
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
183
|
+
/**
|
|
184
|
+
* Top margin.
|
|
185
|
+
*
|
|
186
|
+
* Cannot be combined with any `bleed*` prop.
|
|
187
|
+
*/
|
|
188
|
+
marginTop?: ResponsiveValue<
|
|
189
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
190
|
+
>;
|
|
150
191
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
`[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.`,
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
192
|
+
/**
|
|
193
|
+
* Shorthand for `marginTop`.
|
|
194
|
+
*
|
|
195
|
+
* Cannot be combined with any `bleed*` prop.
|
|
196
|
+
*/
|
|
197
|
+
mt?: ResponsiveValue<
|
|
198
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
199
|
+
>;
|
|
163
200
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
201
|
+
/**
|
|
202
|
+
* Right margin.
|
|
203
|
+
*
|
|
204
|
+
* Cannot be combined with any `bleed*` prop.
|
|
205
|
+
*/
|
|
206
|
+
marginRight?: ResponsiveValue<
|
|
207
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
208
|
+
>;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Shorthand for `marginRight`.
|
|
212
|
+
*
|
|
213
|
+
* Cannot be combined with any `bleed*` prop.
|
|
214
|
+
*/
|
|
215
|
+
mr?: ResponsiveValue<
|
|
216
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
217
|
+
>;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Bottom margin.
|
|
221
|
+
*
|
|
222
|
+
* Cannot be combined with any `bleed*` prop.
|
|
223
|
+
*/
|
|
224
|
+
marginBottom?: ResponsiveValue<
|
|
225
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
226
|
+
>;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Shorthand for `marginBottom`.
|
|
230
|
+
*
|
|
231
|
+
* Cannot be combined with any `bleed*` prop.
|
|
232
|
+
*/
|
|
233
|
+
mb?: ResponsiveValue<
|
|
234
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
235
|
+
>;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Left margin.
|
|
239
|
+
*
|
|
240
|
+
* Cannot be combined with any `bleed*` prop.
|
|
241
|
+
*/
|
|
242
|
+
marginLeft?: ResponsiveValue<
|
|
243
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
244
|
+
>;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Shorthand for `marginLeft`.
|
|
248
|
+
*
|
|
249
|
+
* Cannot be combined with any `bleed*` prop.
|
|
250
|
+
*/
|
|
251
|
+
ml?: ResponsiveValue<
|
|
252
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "auto" | (string & {})
|
|
253
|
+
>;
|
|
173
254
|
}
|
|
174
255
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
256
|
+
interface BleedStyleProps {
|
|
257
|
+
/**
|
|
258
|
+
* Negative margin on all four sides to extend the element outside its parent.
|
|
259
|
+
* If set to "asPadding", it will use the padding value in the same direction.
|
|
260
|
+
*
|
|
261
|
+
* Cannot be combined with any `margin*` prop.
|
|
262
|
+
*/
|
|
263
|
+
bleed?: ResponsiveValue<
|
|
264
|
+
"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
265
|
+
>;
|
|
179
266
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
267
|
+
/**
|
|
268
|
+
* Negative x-axis margin to extend the element outside its parent.
|
|
269
|
+
* If set to "asPadding", it will use the padding value in the same direction.
|
|
270
|
+
*
|
|
271
|
+
* Cannot be combined with any `margin*` prop.
|
|
272
|
+
*/
|
|
273
|
+
bleedX?: ResponsiveValue<
|
|
274
|
+
"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
275
|
+
>;
|
|
187
276
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
277
|
+
/**
|
|
278
|
+
* Negative y-axis margin to extend the element outside its parent.
|
|
279
|
+
* If set to "asPadding", it will use the padding value in the same direction.
|
|
280
|
+
*
|
|
281
|
+
* Cannot be combined with any `margin*` prop.
|
|
282
|
+
*/
|
|
283
|
+
bleedY?: ResponsiveValue<
|
|
284
|
+
"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
285
|
+
>;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Negative top margin to extend the element outside its parent.
|
|
289
|
+
* If set to "asPadding", it will use the padding value in the same direction.
|
|
290
|
+
*
|
|
291
|
+
* Cannot be combined with any `margin*` prop.
|
|
292
|
+
*/
|
|
293
|
+
bleedTop?: ResponsiveValue<
|
|
294
|
+
"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
295
|
+
>;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Negative right margin to extend the element outside its parent.
|
|
299
|
+
* If set to "asPadding", it will use the padding value in the same direction.
|
|
300
|
+
*
|
|
301
|
+
* Cannot be combined with any `margin*` prop.
|
|
302
|
+
*/
|
|
303
|
+
bleedRight?: ResponsiveValue<
|
|
304
|
+
"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
305
|
+
>;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Negative bottom margin to extend the element outside its parent.
|
|
309
|
+
* If set to "asPadding", it will use the padding value in the same direction.
|
|
310
|
+
*
|
|
311
|
+
* Cannot be combined with any `margin*` prop.
|
|
312
|
+
*/
|
|
313
|
+
bleedBottom?: ResponsiveValue<
|
|
314
|
+
"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
315
|
+
>;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Negative left margin to extend the element outside its parent.
|
|
319
|
+
* If set to "asPadding", it will use the padding value in the same direction.
|
|
320
|
+
*
|
|
321
|
+
* Cannot be combined with any `margin*` prop.
|
|
322
|
+
*/
|
|
323
|
+
bleedLeft?: ResponsiveValue<
|
|
324
|
+
"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
325
|
+
>;
|
|
196
326
|
}
|
|
197
327
|
|
|
198
|
-
|
|
328
|
+
/** Distributes `Omit` over each union branch, preserving the union structure. */
|
|
329
|
+
export type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Margin and bleed props both resolve to CSS `margin-*` values, so they
|
|
333
|
+
* are mutually exclusive at the type level — pick one family, not both.
|
|
334
|
+
*/
|
|
335
|
+
export type StyleProps = {
|
|
199
336
|
/**
|
|
200
337
|
* Shorthand for `background`.
|
|
201
338
|
*/
|
|
@@ -265,17 +402,29 @@ export interface StyleProps {
|
|
|
265
402
|
|
|
266
403
|
boxShadow?: Shadow | (string & {});
|
|
267
404
|
|
|
268
|
-
width?:
|
|
405
|
+
width?: ResponsiveValue<
|
|
406
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {})
|
|
407
|
+
>;
|
|
269
408
|
|
|
270
|
-
minWidth?:
|
|
409
|
+
minWidth?: ResponsiveValue<
|
|
410
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {})
|
|
411
|
+
>;
|
|
271
412
|
|
|
272
|
-
maxWidth?:
|
|
413
|
+
maxWidth?: ResponsiveValue<
|
|
414
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {})
|
|
415
|
+
>;
|
|
273
416
|
|
|
274
|
-
height?:
|
|
417
|
+
height?: ResponsiveValue<
|
|
418
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {})
|
|
419
|
+
>;
|
|
275
420
|
|
|
276
|
-
minHeight?:
|
|
421
|
+
minHeight?: ResponsiveValue<
|
|
422
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {})
|
|
423
|
+
>;
|
|
277
424
|
|
|
278
|
-
maxHeight?:
|
|
425
|
+
maxHeight?: ResponsiveValue<
|
|
426
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {})
|
|
427
|
+
>;
|
|
279
428
|
|
|
280
429
|
top?: 0 | (string & {});
|
|
281
430
|
|
|
@@ -285,148 +434,86 @@ export interface StyleProps {
|
|
|
285
434
|
|
|
286
435
|
bottom?: 0 | (string & {});
|
|
287
436
|
|
|
288
|
-
padding?:
|
|
437
|
+
padding?: ResponsiveValue<
|
|
438
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
439
|
+
>;
|
|
289
440
|
|
|
290
441
|
/**
|
|
291
442
|
* Shorthand for `padding`.
|
|
292
443
|
*/
|
|
293
|
-
p?:
|
|
444
|
+
p?: ResponsiveValue<
|
|
445
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
446
|
+
>;
|
|
294
447
|
|
|
295
|
-
paddingX?:
|
|
448
|
+
paddingX?: ResponsiveValue<
|
|
449
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
450
|
+
>;
|
|
296
451
|
|
|
297
452
|
/**
|
|
298
453
|
* Shorthand for `paddingX`.
|
|
299
454
|
*/
|
|
300
|
-
px?:
|
|
455
|
+
px?: ResponsiveValue<
|
|
456
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
457
|
+
>;
|
|
301
458
|
|
|
302
|
-
paddingY?:
|
|
459
|
+
paddingY?: ResponsiveValue<
|
|
460
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
461
|
+
>;
|
|
303
462
|
|
|
304
463
|
/**
|
|
305
464
|
* Shorthand for `paddingY`.
|
|
306
465
|
*/
|
|
307
|
-
py?:
|
|
466
|
+
py?: ResponsiveValue<
|
|
467
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
468
|
+
>;
|
|
308
469
|
|
|
309
|
-
paddingTop?:
|
|
310
|
-
|
|
|
311
|
-
|
|
312
|
-
| `spacingY.${SpacingY}`
|
|
313
|
-
| 0
|
|
314
|
-
| "safeArea"
|
|
315
|
-
| (string & {});
|
|
470
|
+
paddingTop?: ResponsiveValue<
|
|
471
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "safeArea" | (string & {})
|
|
472
|
+
>;
|
|
316
473
|
|
|
317
474
|
/**
|
|
318
475
|
* Shorthand for `paddingTop`.
|
|
319
476
|
*/
|
|
320
|
-
pt?:
|
|
477
|
+
pt?: ResponsiveValue<
|
|
478
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "safeArea" | (string & {})
|
|
479
|
+
>;
|
|
321
480
|
|
|
322
|
-
paddingRight?:
|
|
481
|
+
paddingRight?: ResponsiveValue<
|
|
482
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
483
|
+
>;
|
|
323
484
|
|
|
324
485
|
/**
|
|
325
486
|
* Shorthand for `paddingRight`.
|
|
326
487
|
*/
|
|
327
|
-
pr?:
|
|
488
|
+
pr?: ResponsiveValue<
|
|
489
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
490
|
+
>;
|
|
328
491
|
|
|
329
|
-
paddingBottom?:
|
|
330
|
-
|
|
|
331
|
-
|
|
332
|
-
| `spacingY.${SpacingY}`
|
|
333
|
-
| 0
|
|
334
|
-
| "safeArea"
|
|
335
|
-
| (string & {});
|
|
492
|
+
paddingBottom?: ResponsiveValue<
|
|
493
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "safeArea" | (string & {})
|
|
494
|
+
>;
|
|
336
495
|
|
|
337
496
|
/**
|
|
338
497
|
* Shorthand for `paddingBottom`.
|
|
339
498
|
*/
|
|
340
|
-
pb?:
|
|
499
|
+
pb?: ResponsiveValue<
|
|
500
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | "safeArea" | (string & {})
|
|
501
|
+
>;
|
|
341
502
|
|
|
342
|
-
paddingLeft?:
|
|
503
|
+
paddingLeft?: ResponsiveValue<
|
|
504
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
505
|
+
>;
|
|
343
506
|
|
|
344
507
|
/**
|
|
345
508
|
* Shorthand for `paddingLeft`.
|
|
346
509
|
*/
|
|
347
|
-
pl?:
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
* Negative x-axis margin to extend the element outside its parent.
|
|
351
|
-
* If set to "asPadding", it will use the padding value in the same direction.
|
|
352
|
-
*/
|
|
353
|
-
bleedX?:
|
|
354
|
-
| "asPadding"
|
|
355
|
-
| Dimension
|
|
356
|
-
| `spacingX.${SpacingX}`
|
|
357
|
-
| `spacingY.${SpacingY}`
|
|
358
|
-
| 0
|
|
359
|
-
| (string & {});
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Negative y-axis margin to extend the element outside its parent.
|
|
363
|
-
* If set to "asPadding", it will use the padding value in the same direction.
|
|
364
|
-
*/
|
|
365
|
-
bleedY?:
|
|
366
|
-
| "asPadding"
|
|
367
|
-
| Dimension
|
|
368
|
-
| `spacingX.${SpacingX}`
|
|
369
|
-
| `spacingY.${SpacingY}`
|
|
370
|
-
| 0
|
|
371
|
-
| (string & {});
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Negative top margin to extend the element outside its parent.
|
|
375
|
-
* If set to "asPadding", it will use the padding value in the same direction.
|
|
376
|
-
*/
|
|
377
|
-
bleedTop?:
|
|
378
|
-
| "asPadding"
|
|
379
|
-
| Dimension
|
|
380
|
-
| `spacingX.${SpacingX}`
|
|
381
|
-
| `spacingY.${SpacingY}`
|
|
382
|
-
| 0
|
|
383
|
-
| (string & {});
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Negative right margin to extend the element outside its parent.
|
|
387
|
-
* If set to "asPadding", it will use the padding value in the same direction.
|
|
388
|
-
*/
|
|
389
|
-
bleedRight?:
|
|
390
|
-
| "asPadding"
|
|
391
|
-
| Dimension
|
|
392
|
-
| `spacingX.${SpacingX}`
|
|
393
|
-
| `spacingY.${SpacingY}`
|
|
394
|
-
| 0
|
|
395
|
-
| (string & {});
|
|
396
|
-
|
|
397
|
-
/**
|
|
398
|
-
* Negative bottom margin to extend the element outside its parent.
|
|
399
|
-
* If set to "asPadding", it will use the padding value in the same direction.
|
|
400
|
-
*/
|
|
401
|
-
bleedBottom?:
|
|
402
|
-
| "asPadding"
|
|
403
|
-
| Dimension
|
|
404
|
-
| `spacingX.${SpacingX}`
|
|
405
|
-
| `spacingY.${SpacingY}`
|
|
406
|
-
| 0
|
|
407
|
-
| (string & {});
|
|
510
|
+
pl?: ResponsiveValue<
|
|
511
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
512
|
+
>;
|
|
408
513
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
*/
|
|
413
|
-
bleedLeft?:
|
|
414
|
-
| "asPadding"
|
|
415
|
-
| Dimension
|
|
416
|
-
| `spacingX.${SpacingX}`
|
|
417
|
-
| `spacingY.${SpacingY}`
|
|
418
|
-
| 0
|
|
419
|
-
| (string & {});
|
|
420
|
-
|
|
421
|
-
display?:
|
|
422
|
-
| "block"
|
|
423
|
-
| "flex"
|
|
424
|
-
| "inline-flex"
|
|
425
|
-
| "inline"
|
|
426
|
-
| "inline-block"
|
|
427
|
-
| "none"
|
|
428
|
-
| "inlineFlex" // @deprecated Use `inline-flex` instead.
|
|
429
|
-
| "inlineBlock"; // @deprecated Use `inline-block` instead.
|
|
514
|
+
display?: ResponsiveValue<
|
|
515
|
+
"block" | "flex" | "grid" | "inline-flex" | "inline" | "inline-block" | "none"
|
|
516
|
+
>;
|
|
430
517
|
|
|
431
518
|
position?: "relative" | "absolute" | "fixed" | "sticky";
|
|
432
519
|
|
|
@@ -447,60 +534,29 @@ export interface StyleProps {
|
|
|
447
534
|
flexShrink?: 0 | (number & {}) | true;
|
|
448
535
|
|
|
449
536
|
// Flex
|
|
450
|
-
flexDirection?:
|
|
451
|
-
| "row"
|
|
452
|
-
| "column"
|
|
453
|
-
| "row-reverse"
|
|
454
|
-
| "column-reverse"
|
|
455
|
-
| "rowReverse" // @deprecated Use `row-reverse` instead.
|
|
456
|
-
| "columnReverse"; // @deprecated Use `column-reverse` instead.
|
|
537
|
+
flexDirection?: ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse">;
|
|
457
538
|
|
|
458
539
|
/**
|
|
459
540
|
* If true, flex-wrap will be set to `wrap`.
|
|
460
541
|
*/
|
|
461
542
|
flexWrap?: "wrap" | "wrap-reverse" | "nowrap" | true;
|
|
462
543
|
|
|
463
|
-
justifyContent?:
|
|
464
|
-
| "flex-start"
|
|
465
|
-
| "flex-end"
|
|
466
|
-
| "center"
|
|
467
|
-
| "space-between"
|
|
468
|
-
| "space-around"
|
|
469
|
-
| "flexStart" // @deprecated Use `flex-start` instead.
|
|
470
|
-
| "flexEnd" // @deprecated Use `flex-end` instead.
|
|
471
|
-
| "spaceBetween" // @deprecated Use `space-between` instead.
|
|
472
|
-
| "spaceAround"; // @deprecated Use `space-around` instead.
|
|
544
|
+
justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around";
|
|
473
545
|
|
|
474
546
|
/**
|
|
475
547
|
* In flexbox layout, this property is ignored.
|
|
476
548
|
*/
|
|
477
549
|
justifySelf?: "center" | "start" | "end" | "stretch";
|
|
478
550
|
|
|
479
|
-
alignItems?:
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
| "flex-start"
|
|
489
|
-
| "flex-end"
|
|
490
|
-
| "center"
|
|
491
|
-
| "stretch"
|
|
492
|
-
| "flexStart" // @deprecated Use `flex-start` instead.
|
|
493
|
-
| "flexEnd"; // @deprecated Use `flex-end` instead.
|
|
494
|
-
|
|
495
|
-
alignSelf?:
|
|
496
|
-
| "flex-start"
|
|
497
|
-
| "flex-end"
|
|
498
|
-
| "center"
|
|
499
|
-
| "stretch"
|
|
500
|
-
| "flexStart" // @deprecated Use `flex-start` instead.
|
|
501
|
-
| "flexEnd"; // @deprecated Use `flex-end` instead.
|
|
502
|
-
|
|
503
|
-
gap?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {});
|
|
551
|
+
alignItems?: "flex-start" | "flex-end" | "center" | "stretch";
|
|
552
|
+
|
|
553
|
+
alignContent?: "flex-start" | "flex-end" | "center" | "stretch";
|
|
554
|
+
|
|
555
|
+
alignSelf?: "flex-start" | "flex-end" | "center" | "stretch";
|
|
556
|
+
|
|
557
|
+
gap?: ResponsiveValue<
|
|
558
|
+
Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})
|
|
559
|
+
>;
|
|
504
560
|
|
|
505
561
|
// Grid Item
|
|
506
562
|
// NOTE: gridArea는 지원하지 않습니다.
|
|
@@ -517,11 +573,14 @@ export interface StyleProps {
|
|
|
517
573
|
|
|
518
574
|
background?: ScopedColorBg | ScopedColorPalette | (string & {});
|
|
519
575
|
};
|
|
520
|
-
}
|
|
576
|
+
} & (
|
|
577
|
+
| (BleedStyleProps & { [K in keyof MarginStyleProps]?: never })
|
|
578
|
+
| (MarginStyleProps & { [K in keyof BleedStyleProps]?: never })
|
|
579
|
+
);
|
|
521
580
|
|
|
522
|
-
|
|
581
|
+
type UseStyleProps = StyleProps & {
|
|
523
582
|
style?: React.CSSProperties;
|
|
524
|
-
}
|
|
583
|
+
};
|
|
525
584
|
|
|
526
585
|
export function useStyleProps<T extends UseStyleProps>(
|
|
527
586
|
props: T,
|
|
@@ -569,12 +628,27 @@ export function useStyleProps<T extends UseStyleProps>(
|
|
|
569
628
|
pr,
|
|
570
629
|
pb,
|
|
571
630
|
pl,
|
|
631
|
+
bleed,
|
|
572
632
|
bleedX,
|
|
573
633
|
bleedY,
|
|
574
634
|
bleedTop,
|
|
575
635
|
bleedRight,
|
|
576
636
|
bleedBottom,
|
|
577
637
|
bleedLeft,
|
|
638
|
+
margin,
|
|
639
|
+
m,
|
|
640
|
+
marginX,
|
|
641
|
+
mx,
|
|
642
|
+
marginY,
|
|
643
|
+
my,
|
|
644
|
+
marginTop,
|
|
645
|
+
mt,
|
|
646
|
+
marginRight,
|
|
647
|
+
mr,
|
|
648
|
+
marginBottom,
|
|
649
|
+
mb,
|
|
650
|
+
marginLeft,
|
|
651
|
+
ml,
|
|
578
652
|
bottom,
|
|
579
653
|
left,
|
|
580
654
|
right,
|
|
@@ -609,6 +683,7 @@ export function useStyleProps<T extends UseStyleProps>(
|
|
|
609
683
|
|
|
610
684
|
return {
|
|
611
685
|
style: {
|
|
686
|
+
// Non-responsive props
|
|
612
687
|
"--seed-box-background": handleColor(background ?? bg) ?? gradientValue,
|
|
613
688
|
"--seed-box-color": handleColor(color),
|
|
614
689
|
"--seed-box-border-color": handleColor(borderColor),
|
|
@@ -627,48 +702,92 @@ export function useStyleProps<T extends UseStyleProps>(
|
|
|
627
702
|
"--seed-box-border-bottom-right-radius": handleRadius(borderBottomRightRadius),
|
|
628
703
|
"--seed-box-border-bottom-left-radius": handleRadius(borderBottomLeftRadius),
|
|
629
704
|
"--seed-box-box-shadow": handleShadow(boxShadow),
|
|
630
|
-
"--seed-box-width": handleDimension(width),
|
|
631
|
-
"--seed-box-min-width": handleDimension(minWidth),
|
|
632
|
-
"--seed-box-max-width": handleDimension(maxWidth),
|
|
633
|
-
"--seed-box-height": handleDimension(height),
|
|
634
|
-
"--seed-box-min-height": handleDimension(minHeight),
|
|
635
|
-
"--seed-box-max-height": handleDimension(maxHeight),
|
|
636
|
-
"--seed-box-padding": handleDimension(padding ?? p),
|
|
637
|
-
"--seed-box-padding-x": handleDimension(paddingX ?? px),
|
|
638
|
-
"--seed-box-padding-y": handleDimension(paddingY ?? py),
|
|
639
|
-
"--seed-box-padding-top": handlePaddingWithSafeArea(paddingTop ?? pt, "top"),
|
|
640
|
-
"--seed-box-padding-right": handleDimension(paddingRight ?? pr),
|
|
641
|
-
"--seed-box-padding-bottom": handlePaddingWithSafeArea(paddingBottom ?? pb, "bottom"),
|
|
642
|
-
"--seed-box-padding-left": handleDimension(paddingLeft ?? pl),
|
|
643
|
-
"--seed-box-bleed-top": handleBleed(bleedTop ?? bleedY, "top"),
|
|
644
|
-
"--seed-box-bleed-right": handleBleed(bleedRight ?? bleedX, "right"),
|
|
645
|
-
"--seed-box-bleed-bottom": handleBleed(bleedBottom ?? bleedY, "bottom"),
|
|
646
|
-
"--seed-box-bleed-left": handleBleed(bleedLeft ?? bleedX, "left"),
|
|
647
705
|
"--seed-box-top": top,
|
|
648
706
|
"--seed-box-left": left,
|
|
649
707
|
"--seed-box-right": right,
|
|
650
708
|
"--seed-box-bottom": bottom,
|
|
651
|
-
"--seed-box-gap": handleDimension(gap),
|
|
652
|
-
"--seed-box-display": handleDisplay(display),
|
|
653
709
|
"--seed-box-position": position,
|
|
654
710
|
"--seed-box-overflow-x": overflowX,
|
|
655
711
|
"--seed-box-overflow-y": overflowY,
|
|
656
712
|
"--seed-box-z-index": zIndex,
|
|
657
713
|
"--seed-box-flex-grow": flexGrow === true ? 1 : flexGrow,
|
|
658
714
|
"--seed-box-flex-shrink": flexShrink === true ? 1 : flexShrink,
|
|
659
|
-
"--seed-box-flex-direction": handleFlexDirection(flexDirection),
|
|
660
715
|
"--seed-box-flex-wrap": flexWrap === true ? "wrap" : flexWrap,
|
|
661
|
-
"--seed-box-justify-content":
|
|
716
|
+
"--seed-box-justify-content": justifyContent,
|
|
662
717
|
"--seed-box-justify-self": justifySelf,
|
|
663
|
-
"--seed-box-align-items":
|
|
664
|
-
"--seed-box-align-content":
|
|
665
|
-
"--seed-box-align-self":
|
|
718
|
+
"--seed-box-align-items": alignItems,
|
|
719
|
+
"--seed-box-align-content": alignContent,
|
|
720
|
+
"--seed-box-align-self": alignSelf,
|
|
666
721
|
"--seed-box-grid-column": gridColumn,
|
|
667
722
|
"--seed-box-grid-row": gridRow,
|
|
668
723
|
"--seed-box-unstable-transform": unstable_transform,
|
|
669
724
|
|
|
670
725
|
// Active
|
|
671
726
|
"--seed-box-background--active": handleColor(_active?.bg ?? _active?.background),
|
|
727
|
+
|
|
728
|
+
// Responsive props (breakpoint-suffixed)
|
|
729
|
+
...(width !== undefined && resolveResponsive("--seed-box-width", width, handleDimension)),
|
|
730
|
+
...(minWidth !== undefined &&
|
|
731
|
+
resolveResponsive("--seed-box-min-width", minWidth, handleDimension)),
|
|
732
|
+
...(maxWidth !== undefined &&
|
|
733
|
+
resolveResponsive("--seed-box-max-width", maxWidth, handleDimension)),
|
|
734
|
+
...(height !== undefined && resolveResponsive("--seed-box-height", height, handleDimension)),
|
|
735
|
+
...(minHeight !== undefined &&
|
|
736
|
+
resolveResponsive("--seed-box-min-height", minHeight, handleDimension)),
|
|
737
|
+
...(maxHeight !== undefined &&
|
|
738
|
+
resolveResponsive("--seed-box-max-height", maxHeight, handleDimension)),
|
|
739
|
+
...((padding ?? p) !== undefined &&
|
|
740
|
+
resolveResponsive("--seed-box-padding", padding ?? p, handleDimension)),
|
|
741
|
+
...((paddingX ?? px) !== undefined &&
|
|
742
|
+
resolveResponsive("--seed-box-padding-x", paddingX ?? px, handleDimension)),
|
|
743
|
+
...((paddingY ?? py) !== undefined &&
|
|
744
|
+
resolveResponsive("--seed-box-padding-y", paddingY ?? py, handleDimension)),
|
|
745
|
+
...((paddingTop ?? pt) !== undefined &&
|
|
746
|
+
resolveResponsive("--seed-box-padding-top", paddingTop ?? pt, (v) =>
|
|
747
|
+
handlePaddingWithSafeArea(v, "top"),
|
|
748
|
+
)),
|
|
749
|
+
...((paddingRight ?? pr) !== undefined &&
|
|
750
|
+
resolveResponsive("--seed-box-padding-right", paddingRight ?? pr, handleDimension)),
|
|
751
|
+
...((paddingBottom ?? pb) !== undefined &&
|
|
752
|
+
resolveResponsive("--seed-box-padding-bottom", paddingBottom ?? pb, (v) =>
|
|
753
|
+
handlePaddingWithSafeArea(v, "bottom"),
|
|
754
|
+
)),
|
|
755
|
+
...((paddingLeft ?? pl) !== undefined &&
|
|
756
|
+
resolveResponsive("--seed-box-padding-left", paddingLeft ?? pl, handleDimension)),
|
|
757
|
+
...((bleedTop ?? bleedY ?? bleed) !== undefined &&
|
|
758
|
+
resolveResponsive("--seed-box-bleed-top", bleedTop ?? bleedY ?? bleed, (v) =>
|
|
759
|
+
handleBleed(v, "top"),
|
|
760
|
+
)),
|
|
761
|
+
...((bleedRight ?? bleedX ?? bleed) !== undefined &&
|
|
762
|
+
resolveResponsive("--seed-box-bleed-right", bleedRight ?? bleedX ?? bleed, (v) =>
|
|
763
|
+
handleBleed(v, "right"),
|
|
764
|
+
)),
|
|
765
|
+
...((bleedBottom ?? bleedY ?? bleed) !== undefined &&
|
|
766
|
+
resolveResponsive("--seed-box-bleed-bottom", bleedBottom ?? bleedY ?? bleed, (v) =>
|
|
767
|
+
handleBleed(v, "bottom"),
|
|
768
|
+
)),
|
|
769
|
+
...((bleedLeft ?? bleedX ?? bleed) !== undefined &&
|
|
770
|
+
resolveResponsive("--seed-box-bleed-left", bleedLeft ?? bleedX ?? bleed, (v) =>
|
|
771
|
+
handleBleed(v, "left"),
|
|
772
|
+
)),
|
|
773
|
+
...((margin ?? m) !== undefined &&
|
|
774
|
+
resolveResponsive("--seed-box-margin", margin ?? m, handleDimension)),
|
|
775
|
+
...((marginX ?? mx) !== undefined &&
|
|
776
|
+
resolveResponsive("--seed-box-margin-x", marginX ?? mx, handleDimension)),
|
|
777
|
+
...((marginY ?? my) !== undefined &&
|
|
778
|
+
resolveResponsive("--seed-box-margin-y", marginY ?? my, handleDimension)),
|
|
779
|
+
...((marginTop ?? mt) !== undefined &&
|
|
780
|
+
resolveResponsive("--seed-box-margin-top", marginTop ?? mt, handleDimension)),
|
|
781
|
+
...((marginRight ?? mr) !== undefined &&
|
|
782
|
+
resolveResponsive("--seed-box-margin-right", marginRight ?? mr, handleDimension)),
|
|
783
|
+
...((marginBottom ?? mb) !== undefined &&
|
|
784
|
+
resolveResponsive("--seed-box-margin-bottom", marginBottom ?? mb, handleDimension)),
|
|
785
|
+
...((marginLeft ?? ml) !== undefined &&
|
|
786
|
+
resolveResponsive("--seed-box-margin-left", marginLeft ?? ml, handleDimension)),
|
|
787
|
+
...(gap !== undefined && resolveResponsive("--seed-box-gap", gap, handleDimension)),
|
|
788
|
+
...(display !== undefined && resolveResponsive("--seed-box-display", display, (v) => v)),
|
|
789
|
+
...(flexDirection !== undefined &&
|
|
790
|
+
resolveResponsive("--seed-box-flex-direction", flexDirection, (v) => v)),
|
|
672
791
|
...style,
|
|
673
792
|
} as React.CSSProperties,
|
|
674
793
|
restProps: {
|