@seed-design/react 1.2.14 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Accordion/Accordion.cjs +42 -0
- package/lib/components/Accordion/Accordion.d.ts +35 -0
- package/lib/components/Accordion/Accordion.d.ts.map +1 -0
- package/lib/components/Accordion/Accordion.js +32 -0
- package/lib/components/Accordion/Accordion.namespace.cjs +22 -0
- package/lib/components/Accordion/Accordion.namespace.d.ts +2 -0
- package/lib/components/Accordion/Accordion.namespace.d.ts.map +1 -0
- package/lib/components/Accordion/Accordion.namespace.js +17 -0
- package/lib/components/Accordion/index.cjs +19 -0
- package/lib/components/Accordion/index.d.ts +3 -0
- package/lib/components/Accordion/index.d.ts.map +1 -0
- package/lib/components/Accordion/index.js +3 -0
- package/lib/components/ActionButton/ActionButton.cjs +1 -1
- package/lib/components/ActionButton/ActionButton.d.ts +1 -1
- package/lib/components/ActionButton/ActionButton.d.ts.map +1 -1
- package/lib/components/ActionButton/ActionButton.js +1 -1
- package/lib/components/ActionSheet/ActionSheet.cjs +12 -12
- package/lib/components/ActionSheet/ActionSheet.d.ts +22 -22
- package/lib/components/ActionSheet/ActionSheet.js +12 -12
- package/lib/components/Article/Article.d.ts +2 -3
- package/lib/components/Article/Article.d.ts.map +1 -1
- package/lib/components/AspectRatio/AspectRatio.d.ts +2 -2
- package/lib/components/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplay.cjs +63 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts +43 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.js +49 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.cjs +37 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.d.ts +5 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.js +32 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.cjs +110 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts +30 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.js +100 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.cjs +50 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.d.ts +18 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.js +45 -0
- package/lib/components/AttachmentDisplay/index.cjs +34 -0
- package/lib/components/AttachmentDisplay/index.d.ts +6 -0
- package/lib/components/AttachmentDisplay/index.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/index.js +5 -0
- package/lib/components/AttachmentInput/AttachmentInput.cjs +37 -0
- package/lib/components/AttachmentInput/AttachmentInput.d.ts +23 -0
- package/lib/components/AttachmentInput/AttachmentInput.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInput.js +30 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.cjs +35 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.d.ts +6 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.js +30 -0
- package/lib/components/AttachmentInput/AttachmentInput.test.d.ts +2 -0
- package/lib/components/AttachmentInput/AttachmentInput.test.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.cjs +12 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.d.ts +9 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.js +10 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.cjs +138 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.d.ts +36 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.js +126 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.cjs +54 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.d.ts +21 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.js +49 -0
- package/lib/components/AttachmentInput/index.cjs +32 -0
- package/lib/components/AttachmentInput/index.d.ts +7 -0
- package/lib/components/AttachmentInput/index.d.ts.map +1 -0
- package/lib/components/AttachmentInput/index.js +6 -0
- package/lib/components/BottomSheet/BottomSheet.cjs +36 -9
- package/lib/components/BottomSheet/BottomSheet.d.ts +3 -4
- package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/components/BottomSheet/BottomSheet.js +35 -9
- package/lib/components/Box/Box.cjs +10 -3
- package/lib/components/Box/Box.d.ts +4 -2
- package/lib/components/Box/Box.d.ts.map +1 -1
- package/lib/components/Box/Box.js +10 -3
- package/lib/components/Checkbox/Checkbox.cjs +2 -6
- package/lib/components/Checkbox/Checkbox.d.ts +1 -7
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +2 -6
- package/lib/components/Chip/Chip.cjs +1 -1
- package/lib/components/Chip/Chip.js +1 -1
- package/lib/components/ChipTabs/ChipTabs.cjs +0 -1
- package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -1
- package/lib/components/ChipTabs/ChipTabs.js +0 -1
- package/lib/components/Columns/Columns.d.ts +4 -4
- package/lib/components/Columns/Columns.d.ts.map +1 -1
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.cjs +13 -13
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts +24 -24
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.js +13 -13
- package/lib/components/FieldButton/FieldButton.cjs +22 -3
- package/lib/components/FieldButton/FieldButton.d.ts +3 -2
- package/lib/components/FieldButton/FieldButton.d.ts.map +1 -1
- package/lib/components/FieldButton/FieldButton.js +23 -3
- package/lib/components/Flex/Flex.d.ts +5 -3
- package/lib/components/Flex/Flex.d.ts.map +1 -1
- package/lib/components/Footer/Footer.namespace.cjs +11 -0
- package/lib/components/Footer/Footer.namespace.d.ts +2 -0
- package/lib/components/Footer/Footer.namespace.d.ts.map +1 -0
- package/lib/components/Footer/Footer.namespace.js +6 -0
- package/lib/components/Footer/FooterLinkText.cjs +23 -0
- package/lib/components/Footer/FooterLinkText.d.ts +7 -0
- package/lib/components/Footer/FooterLinkText.d.ts.map +1 -0
- package/lib/components/Footer/FooterLinkText.js +20 -0
- package/lib/components/Footer/index.cjs +10 -0
- package/lib/components/Footer/index.d.ts +3 -0
- package/lib/components/Footer/index.d.ts.map +1 -0
- package/lib/components/Footer/index.js +3 -0
- package/lib/components/Grid/Grid.cjs +7 -2
- package/lib/components/Grid/Grid.d.ts +7 -5
- package/lib/components/Grid/Grid.d.ts.map +1 -1
- package/lib/components/Grid/Grid.js +7 -2
- package/lib/components/GridItem/GridItem.d.ts +3 -2
- package/lib/components/GridItem/GridItem.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.cjs +4 -7
- package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.js +4 -7
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.cjs +64 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.d.ts +60 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.d.ts.map +1 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.js +52 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.cjs +23 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.d.ts +2 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.d.ts.map +1 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.js +18 -0
- package/lib/components/HelpBubbleTooltip/index.cjs +20 -0
- package/lib/components/HelpBubbleTooltip/index.d.ts +3 -0
- package/lib/components/HelpBubbleTooltip/index.d.ts.map +1 -0
- package/lib/components/HelpBubbleTooltip/index.js +3 -0
- package/lib/components/Icon/Icon.d.ts +2 -1
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/ImageFrame/ImageFrame.cjs +3 -2
- package/lib/components/ImageFrame/ImageFrame.d.ts +3 -8
- package/lib/components/ImageFrame/ImageFrame.d.ts.map +1 -1
- package/lib/components/ImageFrame/ImageFrame.js +3 -2
- package/lib/components/Inline/Inline.d.ts +2 -2
- package/lib/components/Inline/Inline.d.ts.map +1 -1
- package/lib/components/Layout/Layout.cjs +12 -0
- package/lib/components/Layout/Layout.d.ts +10 -0
- package/lib/components/Layout/Layout.d.ts.map +1 -0
- package/lib/components/Layout/Layout.js +10 -0
- package/lib/components/Layout/Layout.namespace.cjs +14 -0
- package/lib/components/Layout/Layout.namespace.d.ts +2 -0
- package/lib/components/Layout/Layout.namespace.d.ts.map +1 -0
- package/lib/components/Layout/Layout.namespace.js +9 -0
- package/lib/components/Layout/index.cjs +11 -0
- package/lib/components/Layout/index.d.ts +3 -0
- package/lib/components/Layout/index.d.ts.map +1 -0
- package/lib/components/Layout/index.js +3 -0
- package/lib/components/List/List.cjs +1 -1
- package/lib/components/List/List.d.ts +1 -1
- package/lib/components/List/List.d.ts.map +1 -1
- package/lib/components/List/List.js +1 -1
- package/lib/components/Menu/Menu.cjs +76 -0
- package/lib/components/Menu/Menu.d.ts +42 -0
- package/lib/components/Menu/Menu.d.ts.map +1 -0
- package/lib/components/Menu/Menu.js +62 -0
- package/lib/components/Menu/Menu.namespace.cjs +24 -0
- package/lib/components/Menu/Menu.namespace.d.ts +2 -0
- package/lib/components/Menu/Menu.namespace.d.ts.map +1 -0
- package/lib/components/Menu/Menu.namespace.js +19 -0
- package/lib/components/Menu/index.cjs +21 -0
- package/lib/components/Menu/index.d.ts +3 -0
- package/lib/components/Menu/index.d.ts.map +1 -0
- package/lib/components/Menu/index.js +3 -0
- package/lib/components/MenuSheet/MenuSheet.cjs +48 -0
- package/lib/components/MenuSheet/MenuSheet.d.ts +96 -0
- package/lib/components/MenuSheet/MenuSheet.d.ts.map +1 -1
- package/lib/components/MenuSheet/MenuSheet.js +48 -0
- package/lib/components/NavigationMenu/NavigationMenu.cjs +76 -0
- package/lib/components/NavigationMenu/NavigationMenu.d.ts +42 -0
- package/lib/components/NavigationMenu/NavigationMenu.d.ts.map +1 -0
- package/lib/components/NavigationMenu/NavigationMenu.js +62 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.cjs +24 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.d.ts +2 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.d.ts.map +1 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.js +19 -0
- package/lib/components/NavigationMenu/index.cjs +21 -0
- package/lib/components/NavigationMenu/index.d.ts +3 -0
- package/lib/components/NavigationMenu/index.d.ts.map +1 -0
- package/lib/components/NavigationMenu/index.js +3 -0
- package/lib/components/RadioGroup/RadioGroup.cjs +1 -1
- package/lib/components/RadioGroup/RadioGroup.js +1 -1
- package/lib/components/ResponsivePair/ResponsivePair.cjs +8 -5
- package/lib/components/ResponsivePair/ResponsivePair.d.ts +3 -2
- package/lib/components/ResponsivePair/ResponsivePair.d.ts.map +1 -1
- package/lib/components/ResponsivePair/ResponsivePair.js +8 -5
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.cjs +184 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.d.ts +65 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.d.ts.map +1 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.js +170 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.cjs +24 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.d.ts +2 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.d.ts.map +1 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.js +19 -0
- package/lib/components/ResponsiveSidePanel/index.cjs +22 -0
- package/lib/components/ResponsiveSidePanel/index.d.ts +3 -0
- package/lib/components/ResponsiveSidePanel/index.d.ts.map +1 -0
- package/lib/components/ResponsiveSidePanel/index.js +3 -0
- package/lib/components/SelectBox/CheckSelectBox.cjs +2 -2
- package/lib/components/SelectBox/CheckSelectBox.d.ts +1 -1
- package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -1
- package/lib/components/SelectBox/CheckSelectBox.js +1 -1
- package/lib/components/SideNavigation/SideNavigation.cjs +175 -0
- package/lib/components/SideNavigation/SideNavigation.d.ts +59 -0
- package/lib/components/SideNavigation/SideNavigation.d.ts.map +1 -0
- package/lib/components/SideNavigation/SideNavigation.js +157 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.cjs +28 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.d.ts +3 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.d.ts.map +1 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.js +23 -0
- package/lib/components/SideNavigation/index.cjs +25 -0
- package/lib/components/SideNavigation/index.d.ts +4 -0
- package/lib/components/SideNavigation/index.d.ts.map +1 -0
- package/lib/components/SideNavigation/index.js +3 -0
- package/lib/components/SidePanel/SidePanel.cjs +100 -0
- package/lib/components/SidePanel/SidePanel.d.ts +41 -0
- package/lib/components/SidePanel/SidePanel.d.ts.map +1 -0
- package/lib/components/SidePanel/SidePanel.js +87 -0
- package/lib/components/SidePanel/SidePanel.namespace.cjs +23 -0
- package/lib/components/SidePanel/SidePanel.namespace.d.ts +2 -0
- package/lib/components/SidePanel/SidePanel.namespace.d.ts.map +1 -0
- package/lib/components/SidePanel/SidePanel.namespace.js +18 -0
- package/lib/components/SidePanel/index.cjs +20 -0
- package/lib/components/SidePanel/index.d.ts +3 -0
- package/lib/components/SidePanel/index.d.ts.map +1 -0
- package/lib/components/SidePanel/index.js +3 -0
- package/lib/components/Slider/Slider.cjs +2 -2
- package/lib/components/Slider/Slider.js +2 -2
- package/lib/components/Snackbar/Snackbar.cjs +2 -2
- package/lib/components/Snackbar/Snackbar.d.ts +1 -1
- package/lib/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/lib/components/Snackbar/Snackbar.js +2 -2
- package/lib/components/Stack/Stack.d.ts +4 -6
- package/lib/components/Stack/Stack.d.ts.map +1 -1
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.cjs +123 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts +60 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.js +104 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.cjs +29 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts +2 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.js +24 -0
- package/lib/components/SwipeableMenuSheet/index.cjs +26 -0
- package/lib/components/SwipeableMenuSheet/index.d.ts +3 -0
- package/lib/components/SwipeableMenuSheet/index.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/index.js +3 -0
- package/lib/components/Switch/Switch.cjs +1 -5
- package/lib/components/Switch/Switch.d.ts +1 -7
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Switch/Switch.js +1 -5
- package/lib/components/TagGroup/TagGroup.cjs +1 -1
- package/lib/components/TagGroup/TagGroup.js +1 -1
- package/lib/components/TextField/TextField.cjs +1 -1
- package/lib/components/TextField/TextField.js +1 -1
- package/lib/components/index.cjs +249 -0
- package/lib/components/index.d.ts +12 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +30 -1
- package/lib/components/private/useDismissible.d.ts +6 -6
- package/lib/hooks/useBreakpoint.cjs +15 -0
- package/lib/hooks/useBreakpoint.d.ts +12 -0
- package/lib/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/hooks/useBreakpoint.js +13 -0
- package/lib/hooks/useBreakpoint.test.d.ts +2 -0
- package/lib/hooks/useBreakpoint.test.d.ts.map +1 -0
- package/lib/hooks/useBreakpointValue.cjs +23 -0
- package/lib/hooks/useBreakpointValue.d.ts +8 -0
- package/lib/hooks/useBreakpointValue.d.ts.map +1 -0
- package/lib/hooks/useBreakpointValue.js +22 -0
- package/lib/hooks/useBreakpointValue.test.d.ts +2 -0
- package/lib/hooks/useBreakpointValue.test.d.ts.map +1 -0
- package/lib/index.cjs +255 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +33 -1
- package/lib/primitive.cjs +45 -0
- package/lib/primitive.d.ts +5 -0
- package/lib/primitive.d.ts.map +1 -1
- package/lib/primitive.js +5 -0
- package/lib/primitives/breakpoint-store.cjs +52 -0
- package/lib/primitives/breakpoint-store.d.ts +7 -0
- package/lib/primitives/breakpoint-store.d.ts.map +1 -0
- package/lib/primitives/breakpoint-store.js +50 -0
- package/lib/providers/BreakpointProvider.cjs +20 -0
- package/lib/providers/BreakpointProvider.d.ts +8 -0
- package/lib/providers/BreakpointProvider.d.ts.map +1 -0
- package/lib/providers/BreakpointProvider.js +19 -0
- package/lib/types/responsive.cjs +7 -0
- package/lib/types/responsive.d.ts +12 -0
- package/lib/types/responsive.d.ts.map +1 -0
- package/lib/types/responsive.js +7 -0
- package/lib/utils/createRenderTrackingContext.cjs +45 -0
- package/lib/utils/createRenderTrackingContext.d.ts +28 -0
- package/lib/utils/createRenderTrackingContext.d.ts.map +1 -0
- package/lib/utils/createRenderTrackingContext.js +44 -0
- package/lib/utils/getHelpBubbleArrowTipPath.cjs +14 -0
- package/lib/utils/getHelpBubbleArrowTipPath.d.ts +7 -0
- package/lib/utils/getHelpBubbleArrowTipPath.d.ts.map +1 -0
- package/lib/utils/getHelpBubbleArrowTipPath.js +14 -0
- package/lib/utils/styled.cjs +49 -75
- package/lib/utils/styled.d.ts +180 -62
- package/lib/utils/styled.d.ts.map +1 -1
- package/lib/utils/styled.js +49 -76
- package/package.json +33 -26
- package/src/components/Accordion/Accordion.namespace.ts +22 -0
- package/src/components/Accordion/Accordion.tsx +119 -0
- package/src/components/Accordion/index.ts +24 -0
- package/src/components/ActionButton/ActionButton.tsx +1 -1
- package/src/components/ActionSheet/ActionSheet.tsx +22 -22
- package/src/components/Article/Article.tsx +1 -1
- package/src/components/AspectRatio/AspectRatio.tsx +2 -2
- package/src/components/AttachmentDisplay/AttachmentDisplay.namespace.ts +57 -0
- package/src/components/AttachmentDisplay/AttachmentDisplay.tsx +165 -0
- package/src/components/AttachmentDisplay/AttachmentDisplayItem.tsx +204 -0
- package/src/components/AttachmentDisplay/AttachmentDisplayTrigger.tsx +82 -0
- package/src/components/AttachmentDisplay/index.ts +59 -0
- package/src/components/AttachmentInput/AttachmentInput.namespace.ts +54 -0
- package/src/components/AttachmentInput/AttachmentInput.test.tsx +161 -0
- package/src/components/AttachmentInput/AttachmentInput.tsx +77 -0
- package/src/components/AttachmentInput/AttachmentInputDropzone.tsx +25 -0
- package/src/components/AttachmentInput/AttachmentInputItem.tsx +246 -0
- package/src/components/AttachmentInput/AttachmentInputTrigger.tsx +85 -0
- package/src/components/AttachmentInput/index.ts +56 -0
- package/src/components/BottomSheet/BottomSheet.tsx +54 -18
- package/src/components/Box/Box.tsx +30 -7
- package/src/components/Checkbox/Checkbox.tsx +3 -31
- package/src/components/ChipTabs/ChipTabs.tsx +0 -6
- package/src/components/Columns/Columns.tsx +4 -3
- package/src/components/ExtendedActionSheet/ExtendedActionSheet.tsx +24 -24
- package/src/components/FieldButton/FieldButton.tsx +36 -8
- package/src/components/Flex/Flex.tsx +5 -3
- package/src/components/Footer/Footer.namespace.ts +4 -0
- package/src/components/Footer/FooterLinkText.tsx +23 -0
- package/src/components/Footer/index.ts +3 -0
- package/src/components/Grid/Grid.tsx +15 -8
- package/src/components/GridItem/GridItem.tsx +3 -2
- package/src/components/HelpBubble/HelpBubble.tsx +2 -5
- package/src/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.ts +24 -0
- package/src/components/HelpBubbleTooltip/HelpBubbleTooltip.tsx +169 -0
- package/src/components/HelpBubbleTooltip/index.ts +26 -0
- package/src/components/Icon/Icon.tsx +2 -1
- package/src/components/ImageFrame/ImageFrame.test.tsx +1 -3
- package/src/components/ImageFrame/ImageFrame.tsx +25 -23
- package/src/components/Inline/Inline.tsx +2 -1
- package/src/components/Layout/Layout.namespace.ts +6 -0
- package/src/components/Layout/Layout.tsx +21 -0
- package/src/components/Layout/index.ts +8 -0
- package/src/components/List/List.tsx +5 -1
- package/src/components/Menu/Menu.namespace.ts +26 -0
- package/src/components/Menu/Menu.tsx +157 -0
- package/src/components/Menu/index.ts +28 -0
- package/src/components/MenuSheet/MenuSheet.tsx +96 -0
- package/src/components/NavigationMenu/NavigationMenu.namespace.ts +26 -0
- package/src/components/NavigationMenu/NavigationMenu.tsx +172 -0
- package/src/components/NavigationMenu/index.ts +28 -0
- package/src/components/ResponsivePair/ResponsivePair.tsx +13 -7
- package/src/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.ts +26 -0
- package/src/components/ResponsiveSidePanel/ResponsiveSidePanel.tsx +316 -0
- package/src/components/ResponsiveSidePanel/index.ts +29 -0
- package/src/components/SelectBox/CheckSelectBox.tsx +1 -1
- package/src/components/SideNavigation/SideNavigation.namespace.ts +37 -0
- package/src/components/SideNavigation/SideNavigation.tsx +342 -0
- package/src/components/SideNavigation/index.ts +39 -0
- package/src/components/SidePanel/SidePanel.namespace.ts +24 -0
- package/src/components/SidePanel/SidePanel.tsx +216 -0
- package/src/components/SidePanel/index.ts +26 -0
- package/src/components/Snackbar/Snackbar.tsx +2 -4
- package/src/components/Stack/Stack.tsx +4 -3
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.ts +36 -0
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +269 -0
- package/src/components/SwipeableMenuSheet/index.ts +38 -0
- package/src/components/Switch/Switch.tsx +3 -26
- package/src/components/index.ts +12 -0
- package/src/hooks/useBreakpoint.test.tsx +94 -0
- package/src/hooks/useBreakpoint.ts +24 -0
- package/src/hooks/useBreakpointValue.test.tsx +102 -0
- package/src/hooks/useBreakpointValue.ts +33 -0
- package/src/index.ts +8 -0
- package/src/primitive.ts +5 -0
- package/src/primitives/breakpoint-store.ts +69 -0
- package/src/providers/BreakpointProvider.tsx +26 -0
- package/src/types/responsive.ts +19 -0
- package/src/utils/createRenderTrackingContext.tsx +50 -0
- package/src/utils/getHelpBubbleArrowTipPath.ts +11 -0
- package/src/utils/styled.tsx +387 -268
|
@@ -1,22 +1,41 @@
|
|
|
1
1
|
import { bottomSheet, type BottomSheetVariantProps } from "@seed-design/css/recipes/bottom-sheet";
|
|
2
|
+
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
2
3
|
import { dataAttr } from "@seed-design/dom-utils";
|
|
3
|
-
import { Drawer
|
|
4
|
+
import { Drawer } from "@seed-design/react-drawer";
|
|
4
5
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
6
|
+
import clsx from "clsx";
|
|
5
7
|
import { forwardRef } from "react";
|
|
8
|
+
import { createRenderTrackingContext } from "../../utils/createRenderTrackingContext";
|
|
6
9
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
7
10
|
import { withStyleProps, type StyleProps } from "../../utils/styled";
|
|
8
11
|
|
|
9
|
-
const {
|
|
12
|
+
const { withContext, useClassNames, ClassNamesProvider } = createSlotRecipeContext(bottomSheet);
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
const closeButtonTracker = createRenderTrackingContext("BottomSheetCloseButton");
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
14
17
|
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
export interface BottomSheetRootProps
|
|
19
|
+
extends BottomSheetVariantProps,
|
|
20
|
+
Omit<Drawer.RootProps, "direction"> {}
|
|
21
|
+
|
|
22
|
+
export function BottomSheetRoot(props: BottomSheetRootProps) {
|
|
23
|
+
const [variantProps, otherProps] = bottomSheet.splitVariantProps({
|
|
24
|
+
direction: "bottom" as const,
|
|
25
|
+
lazyMount: true,
|
|
26
|
+
unmountOnExit: true,
|
|
27
|
+
...props,
|
|
28
|
+
});
|
|
29
|
+
const classNames = bottomSheet(variantProps);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<ClassNamesProvider value={classNames}>
|
|
33
|
+
<closeButtonTracker.Provider>
|
|
34
|
+
<Drawer.Root {...otherProps} />
|
|
35
|
+
</closeButtonTracker.Provider>
|
|
36
|
+
</ClassNamesProvider>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
20
39
|
|
|
21
40
|
////////////////////////////////////////////////////////////////////////////////////
|
|
22
41
|
|
|
@@ -64,15 +83,20 @@ export const BottomSheetHeader = withContext<HTMLDivElement, BottomSheetHeaderPr
|
|
|
64
83
|
|
|
65
84
|
export interface BottomSheetTitleProps extends Drawer.TitleProps {}
|
|
66
85
|
|
|
67
|
-
export const BottomSheetTitle =
|
|
68
|
-
|
|
69
|
-
const
|
|
86
|
+
export const BottomSheetTitle = forwardRef<HTMLHeadingElement, BottomSheetTitleProps>(
|
|
87
|
+
({ className, ...props }, ref) => {
|
|
88
|
+
const classNames = useClassNames();
|
|
89
|
+
const { isRendered } = closeButtonTracker.useRenderTracking();
|
|
70
90
|
|
|
71
91
|
return (
|
|
72
|
-
<Drawer.Title
|
|
92
|
+
<Drawer.Title
|
|
93
|
+
ref={ref}
|
|
94
|
+
data-show-close-button={dataAttr(isRendered)}
|
|
95
|
+
className={clsx(classNames.title, className)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
73
98
|
);
|
|
74
|
-
}
|
|
75
|
-
"title",
|
|
99
|
+
},
|
|
76
100
|
);
|
|
77
101
|
|
|
78
102
|
BottomSheetTitle.displayName = "BottomSheetTitle";
|
|
@@ -116,7 +140,19 @@ export const BottomSheetFooter = withContext<HTMLDivElement, BottomSheetFooterPr
|
|
|
116
140
|
|
|
117
141
|
export interface BottomSheetCloseButtonProps extends Drawer.CloseButtonProps {}
|
|
118
142
|
|
|
119
|
-
export const BottomSheetCloseButton =
|
|
120
|
-
|
|
121
|
-
|
|
143
|
+
export const BottomSheetCloseButton = forwardRef<HTMLButtonElement, BottomSheetCloseButtonProps>(
|
|
144
|
+
({ className, ...props }, ref) => {
|
|
145
|
+
const classNames = useClassNames();
|
|
146
|
+
const { trackRef } = closeButtonTracker.useRenderTracking();
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<Drawer.CloseButton
|
|
150
|
+
ref={composeRefs(ref, trackRef)}
|
|
151
|
+
className={clsx(classNames.closeButton, className)}
|
|
152
|
+
{...props}
|
|
153
|
+
/>
|
|
154
|
+
);
|
|
155
|
+
},
|
|
122
156
|
);
|
|
157
|
+
|
|
158
|
+
BottomSheetCloseButton.displayName = "BottomSheetCloseButton";
|
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import type { BreakpointThreshold } from "../../types/responsive";
|
|
3
4
|
import { useStyleProps, type StyleProps } from "../../utils/styled";
|
|
4
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
5
6
|
|
|
6
|
-
export
|
|
7
|
-
|
|
7
|
+
export type BoxProps = StyleProps &
|
|
8
|
+
Omit<React.HTMLAttributes<HTMLDivElement>, "color"> & {
|
|
9
|
+
as?: React.ElementType;
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
|
|
13
|
+
hideFrom?: BreakpointThreshold;
|
|
14
|
+
};
|
|
11
15
|
|
|
12
16
|
export const Box = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {
|
|
13
|
-
const {
|
|
17
|
+
const { hideFrom, ...rest } = props;
|
|
18
|
+
const { style, restProps } = useStyleProps(rest);
|
|
14
19
|
const { as: Comp = "div", asChild = false, className, ...nativeProps } = restProps;
|
|
15
20
|
|
|
16
21
|
if (asChild) {
|
|
17
22
|
return (
|
|
18
|
-
<Slot
|
|
23
|
+
<Slot
|
|
24
|
+
ref={ref}
|
|
25
|
+
className={clsx("seed-box", className)}
|
|
26
|
+
style={{
|
|
27
|
+
...style,
|
|
28
|
+
...(hideFrom && { [`--seed-box-display-${hideFrom}`]: "none" }),
|
|
29
|
+
}}
|
|
30
|
+
{...nativeProps}
|
|
31
|
+
/>
|
|
19
32
|
);
|
|
20
33
|
}
|
|
21
34
|
|
|
22
|
-
return
|
|
35
|
+
return (
|
|
36
|
+
<Comp
|
|
37
|
+
ref={ref}
|
|
38
|
+
className={clsx("seed-box", className)}
|
|
39
|
+
style={{
|
|
40
|
+
...style,
|
|
41
|
+
...(hideFrom && { [`--seed-box-display-${hideFrom}`]: "none" }),
|
|
42
|
+
}}
|
|
43
|
+
{...nativeProps}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
23
46
|
});
|
|
@@ -35,43 +35,15 @@ export const CheckboxGroup = withGroupContext<HTMLDivElement, CheckboxGroupProps
|
|
|
35
35
|
|
|
36
36
|
////////////////////////////////////////////////////////////////////////////////////
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* @deprecated Use `regular` or `bold` instead of `default` or `stronger`
|
|
40
|
-
*/
|
|
41
|
-
type CheckboxVariantDeprecatedWeightProps = "default" | "stronger";
|
|
42
|
-
|
|
43
38
|
export interface CheckboxRootProps
|
|
44
|
-
extends
|
|
39
|
+
extends CheckboxVariantProps,
|
|
45
40
|
CheckmarkVariantProps,
|
|
46
|
-
CheckboxPrimitive.RootProps {
|
|
47
|
-
weight?: CheckboxVariantProps["weight"] | CheckboxVariantDeprecatedWeightProps;
|
|
48
|
-
}
|
|
41
|
+
CheckboxPrimitive.RootProps {}
|
|
49
42
|
|
|
50
43
|
export const CheckboxRoot = Object.assign(
|
|
51
44
|
forwardRef<HTMLLabelElement, CheckboxRootProps>(({ className, ...props }, ref) => {
|
|
52
|
-
if (
|
|
53
|
-
process.env.NODE_ENV !== "production" &&
|
|
54
|
-
(props.weight === "default" || props.weight === "stronger")
|
|
55
|
-
) {
|
|
56
|
-
console.warn(
|
|
57
|
-
`[SEED Design System] Checkbox weight='${props.weight}' is deprecated and will be removed in @seed-design/react@2.0.0. Use weight='${props.weight === "default" ? "regular" : "bold"}' instead.`,
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
45
|
const [{ checkbox: checkboxVariantProps, checkmark: checkmarkVariantProps }, otherProps] =
|
|
62
|
-
splitMultipleVariantsProps(
|
|
63
|
-
{
|
|
64
|
-
...props,
|
|
65
|
-
// TODO: replace this mapping completely
|
|
66
|
-
weight:
|
|
67
|
-
props.weight === "stronger"
|
|
68
|
-
? "bold"
|
|
69
|
-
: props.weight === "default"
|
|
70
|
-
? "regular"
|
|
71
|
-
: props.weight,
|
|
72
|
-
},
|
|
73
|
-
{ checkbox, checkmark },
|
|
74
|
-
);
|
|
46
|
+
splitMultipleVariantsProps(props, { checkbox, checkmark });
|
|
75
47
|
|
|
76
48
|
const classNames = checkbox(checkboxVariantProps);
|
|
77
49
|
|
|
@@ -12,12 +12,6 @@ export interface ChipTabsRootProps extends ChipTabsVariantProps, TabsPrimitive.R
|
|
|
12
12
|
|
|
13
13
|
export const ChipTabsRoot = forwardRef<HTMLDivElement, ChipTabsRootProps>(
|
|
14
14
|
({ className, ...props }, ref) => {
|
|
15
|
-
if (process.env.NODE_ENV !== "production" && props.variant === "brandSolid") {
|
|
16
|
-
console.warn(
|
|
17
|
-
"[SEED Design System] ChipTabs variant='brandSolid' is deprecated and will be removed in @seed-design/react@2.0.0. Use variant='neutralSolid' or variant='neutralOutline' instead.",
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
15
|
const [variantProps, otherProps] = chipTabs.splitVariantProps(props);
|
|
22
16
|
const classNames = chipTabs(variantProps);
|
|
23
17
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { DistributiveOmit } from "../../utils/styled";
|
|
2
3
|
import { Box, type BoxProps } from "../Box/Box";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @deprecated Use `HStack` instead.
|
|
6
7
|
*/
|
|
7
|
-
export
|
|
8
|
+
export type ColumnsProps = DistributiveOmit<BoxProps, "display" | "direction">;
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @deprecated Use `HStack` instead.
|
|
@@ -25,9 +26,9 @@ export const Columns = React.forwardRef<HTMLDivElement, ColumnsProps>((props, re
|
|
|
25
26
|
/**
|
|
26
27
|
* @deprecated Use `HStack` instead.
|
|
27
28
|
*/
|
|
28
|
-
export
|
|
29
|
+
export type ColumnProps = DistributiveOmit<BoxProps, "display" | "flexDirection" | "width"> & {
|
|
29
30
|
width?: BoxProps["width"] | "content";
|
|
30
|
-
}
|
|
31
|
+
};
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* @deprecated Use `HStack` instead.
|
|
@@ -20,7 +20,7 @@ const withStateProps = createWithStateProps([useDialogContext]);
|
|
|
20
20
|
////////////////////////////////////////////////////////////////////////////////////
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* @deprecated Use `
|
|
23
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
24
24
|
*/
|
|
25
25
|
export interface ExtendedActionSheetRootProps
|
|
26
26
|
extends ExtendedActionSheetVariantProps,
|
|
@@ -36,7 +36,7 @@ export interface ExtendedActionSheetRootProps
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* @deprecated Use `
|
|
39
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
40
40
|
*/
|
|
41
41
|
export const ExtendedActionSheetRoot = withRootProvider<ExtendedActionSheetRootProps>(
|
|
42
42
|
DialogPrimitive.Root,
|
|
@@ -51,24 +51,24 @@ export const ExtendedActionSheetRoot = withRootProvider<ExtendedActionSheetRootP
|
|
|
51
51
|
////////////////////////////////////////////////////////////////////////////////////
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
* @deprecated Use `
|
|
54
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
55
55
|
*/
|
|
56
56
|
export interface ExtendedActionSheetTriggerProps extends DialogPrimitive.TriggerProps {}
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* @deprecated Use `
|
|
59
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
60
60
|
*/
|
|
61
61
|
export const ExtendedActionSheetTrigger = DialogPrimitive.Trigger;
|
|
62
62
|
|
|
63
63
|
////////////////////////////////////////////////////////////////////////////////////
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* @deprecated Use `
|
|
66
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
67
67
|
*/
|
|
68
68
|
export interface ExtendedActionSheetPositionerProps extends DialogPrimitive.PositionerProps {}
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
* @deprecated Use `
|
|
71
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
72
72
|
*/
|
|
73
73
|
export const ExtendedActionSheetPositioner = withContext<
|
|
74
74
|
HTMLDivElement,
|
|
@@ -78,12 +78,12 @@ export const ExtendedActionSheetPositioner = withContext<
|
|
|
78
78
|
////////////////////////////////////////////////////////////////////////////////////
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* @deprecated Use `
|
|
81
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
82
82
|
*/
|
|
83
83
|
export interface ExtendedActionSheetBackdropProps extends DialogPrimitive.BackdropProps {}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* @deprecated Use `
|
|
86
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
87
87
|
*/
|
|
88
88
|
export const ExtendedActionSheetBackdrop = withContext<
|
|
89
89
|
HTMLDivElement,
|
|
@@ -93,12 +93,12 @@ export const ExtendedActionSheetBackdrop = withContext<
|
|
|
93
93
|
////////////////////////////////////////////////////////////////////////////////////
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* @deprecated Use `
|
|
96
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
97
97
|
*/
|
|
98
98
|
export interface ExtendedActionSheetContentProps extends DialogPrimitive.ContentProps {}
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* @deprecated Use `
|
|
101
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
102
102
|
*/
|
|
103
103
|
export const ExtendedActionSheetContent = withContext<
|
|
104
104
|
HTMLDivElement,
|
|
@@ -108,14 +108,14 @@ export const ExtendedActionSheetContent = withContext<
|
|
|
108
108
|
////////////////////////////////////////////////////////////////////////////////////
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
* @deprecated Use `
|
|
111
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
112
112
|
*/
|
|
113
113
|
export interface ExtendedActionSheetHeaderProps
|
|
114
114
|
extends PrimitiveProps,
|
|
115
115
|
React.HTMLAttributes<HTMLDivElement> {}
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
-
* @deprecated Use `
|
|
118
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
119
119
|
*/
|
|
120
120
|
export const ExtendedActionSheetHeader = withContext<
|
|
121
121
|
HTMLDivElement,
|
|
@@ -125,12 +125,12 @@ export const ExtendedActionSheetHeader = withContext<
|
|
|
125
125
|
////////////////////////////////////////////////////////////////////////////////////
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* @deprecated Use `
|
|
128
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
129
129
|
*/
|
|
130
130
|
export interface ExtendedActionSheetTitleProps extends DialogPrimitive.TitleProps {}
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* @deprecated Use `
|
|
133
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
134
134
|
*/
|
|
135
135
|
export const ExtendedActionSheetTitle = withContext<
|
|
136
136
|
HTMLHeadingElement,
|
|
@@ -140,14 +140,14 @@ export const ExtendedActionSheetTitle = withContext<
|
|
|
140
140
|
////////////////////////////////////////////////////////////////////////////////////
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
|
-
* @deprecated Use `
|
|
143
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
144
144
|
*/
|
|
145
145
|
export interface ExtendedActionSheetListProps
|
|
146
146
|
extends PrimitiveProps,
|
|
147
147
|
React.HTMLAttributes<HTMLDivElement> {}
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
|
-
* @deprecated Use `
|
|
150
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
151
151
|
*/
|
|
152
152
|
export const ExtendedActionSheetList = withContext<HTMLDivElement, ExtendedActionSheetListProps>(
|
|
153
153
|
withStateProps(Primitive.div),
|
|
@@ -157,12 +157,12 @@ export const ExtendedActionSheetList = withContext<HTMLDivElement, ExtendedActio
|
|
|
157
157
|
////////////////////////////////////////////////////////////////////////////////////
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
|
-
* @deprecated Use `
|
|
160
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
161
161
|
*/
|
|
162
162
|
export interface ExtendedActionSheetGroupProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
|
-
* @deprecated Use `
|
|
165
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
166
166
|
*/
|
|
167
167
|
export const ExtendedActionSheetGroup = withContext<HTMLDivElement, ExtendedActionSheetGroupProps>(
|
|
168
168
|
withStateProps(Primitive.div),
|
|
@@ -172,7 +172,7 @@ export const ExtendedActionSheetGroup = withContext<HTMLDivElement, ExtendedActi
|
|
|
172
172
|
////////////////////////////////////////////////////////////////////////////////////
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
* @deprecated Use `
|
|
175
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
176
176
|
*/
|
|
177
177
|
export interface ExtendedActionSheetItemProps
|
|
178
178
|
extends PrimitiveProps,
|
|
@@ -180,7 +180,7 @@ export interface ExtendedActionSheetItemProps
|
|
|
180
180
|
React.HTMLAttributes<HTMLButtonElement> {}
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
|
-
* @deprecated Use `
|
|
183
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
184
184
|
*/
|
|
185
185
|
export const ExtendedActionSheetItem = withItemContext<
|
|
186
186
|
HTMLButtonElement,
|
|
@@ -190,14 +190,14 @@ export const ExtendedActionSheetItem = withItemContext<
|
|
|
190
190
|
////////////////////////////////////////////////////////////////////////////////////
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
* @deprecated Use `
|
|
193
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
194
194
|
*/
|
|
195
195
|
export interface ExtendedActionSheetFooterProps
|
|
196
196
|
extends PrimitiveProps,
|
|
197
197
|
React.HTMLAttributes<HTMLDivElement> {}
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
|
-
* @deprecated Use `
|
|
200
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
201
201
|
*/
|
|
202
202
|
export const ExtendedActionSheetFooter = withContext<
|
|
203
203
|
HTMLDivElement,
|
|
@@ -207,12 +207,12 @@ export const ExtendedActionSheetFooter = withContext<
|
|
|
207
207
|
////////////////////////////////////////////////////////////////////////////////////
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
|
-
* @deprecated Use `
|
|
210
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
211
211
|
*/
|
|
212
212
|
export interface ExtendedActionSheetCloseButtonProps extends DialogPrimitive.CloseButtonProps {}
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
|
-
* @deprecated Use `
|
|
215
|
+
* @deprecated Use `SwipeableMenuSheet` instead.
|
|
216
216
|
*/
|
|
217
217
|
export const ExtendedActionSheetCloseButton = withContext<
|
|
218
218
|
HTMLDivElement,
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
2
|
import { FieldButton, useFieldButtonContext } from "@seed-design/react-field-button";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import { forwardRef } from "react";
|
|
4
5
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
5
6
|
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
7
|
+
import { splitMultipleVariantsProps } from "../../utils/splitMultipleVariantsProps";
|
|
6
8
|
import { field, type FieldVariantProps } from "@seed-design/css/recipes/field";
|
|
7
9
|
import { fieldLabel, type FieldLabelVariantProps } from "@seed-design/css/recipes/field-label";
|
|
8
10
|
import { InternalIcon, type InternalIconProps } from "../private/Icon";
|
|
9
|
-
import { inputButton } from "@seed-design/css/recipes/input-button";
|
|
11
|
+
import { inputButton, type InputButtonVariantProps } from "@seed-design/css/recipes/input-button";
|
|
10
12
|
import clsx from "clsx";
|
|
11
13
|
|
|
12
|
-
const {
|
|
14
|
+
const { ClassNamesProvider: FieldClassNamesProvider, withContext: withFieldContext } =
|
|
13
15
|
createSlotRecipeContext(field);
|
|
14
|
-
const {
|
|
16
|
+
const {
|
|
17
|
+
withProvider,
|
|
18
|
+
withContext,
|
|
19
|
+
useClassNames,
|
|
20
|
+
PropsProvider: InputButtonPropsProvider,
|
|
21
|
+
} = createSlotRecipeContext(inputButton);
|
|
15
22
|
const {
|
|
16
23
|
withProvider: withLabelProvider,
|
|
17
24
|
withContext: withLabelContext,
|
|
@@ -22,12 +29,32 @@ const withStateProps = createWithStateProps([useFieldButtonContext]);
|
|
|
22
29
|
|
|
23
30
|
////////////////////////////////////////////////////////////////////////////////////
|
|
24
31
|
|
|
25
|
-
export interface FieldButtonRootProps
|
|
32
|
+
export interface FieldButtonRootProps
|
|
33
|
+
extends FieldVariantProps,
|
|
34
|
+
InputButtonVariantProps,
|
|
35
|
+
FieldButton.RootProps {}
|
|
26
36
|
|
|
27
|
-
export const FieldButtonRoot =
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
export const FieldButtonRoot = forwardRef<HTMLDivElement, FieldButtonRootProps>(
|
|
38
|
+
({ className, ...props }, ref) => {
|
|
39
|
+
const [{ field: fieldVariantProps, inputButton: inputButtonVariantProps }, otherProps] =
|
|
40
|
+
splitMultipleVariantsProps(props, { field, inputButton });
|
|
41
|
+
|
|
42
|
+
const fieldClassNames = field(fieldVariantProps);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<InputButtonPropsProvider value={inputButtonVariantProps}>
|
|
46
|
+
<FieldClassNamesProvider value={fieldClassNames}>
|
|
47
|
+
<FieldButton.Root
|
|
48
|
+
ref={ref}
|
|
49
|
+
className={clsx(fieldClassNames.root, className)}
|
|
50
|
+
{...otherProps}
|
|
51
|
+
/>
|
|
52
|
+
</FieldClassNamesProvider>
|
|
53
|
+
</InputButtonPropsProvider>
|
|
54
|
+
);
|
|
55
|
+
},
|
|
30
56
|
);
|
|
57
|
+
FieldButtonRoot.displayName = "FieldButtonRoot";
|
|
31
58
|
|
|
32
59
|
////////////////////////////////////////////////////////////////////////////////////
|
|
33
60
|
|
|
@@ -189,7 +216,8 @@ export const FieldButtonButton = withContext<HTMLButtonElement, FieldButtonButto
|
|
|
189
216
|
);
|
|
190
217
|
|
|
191
218
|
export interface FieldButtonControlProps
|
|
192
|
-
extends
|
|
219
|
+
extends InputButtonVariantProps,
|
|
220
|
+
PrimitiveProps,
|
|
193
221
|
React.HTMLAttributes<HTMLDivElement> {}
|
|
194
222
|
|
|
195
223
|
export const FieldButtonControl = withProvider<HTMLDivElement, FieldButtonControlProps>(
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { ResponsiveValue } from "../../types/responsive";
|
|
3
|
+
import type { DistributiveOmit } from "../../utils/styled";
|
|
2
4
|
import { Box, type BoxProps } from "../Box/Box";
|
|
3
5
|
|
|
4
|
-
export
|
|
6
|
+
export type FlexProps = DistributiveOmit<BoxProps, "display"> & {
|
|
5
7
|
/**
|
|
6
8
|
* @default "flex"
|
|
7
9
|
*/
|
|
8
|
-
display?: "flex" | "none"
|
|
10
|
+
display?: ResponsiveValue<"flex" | "none">;
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* Shorthand for `flexDirection`.
|
|
@@ -36,7 +38,7 @@ export interface FlexProps extends Omit<BoxProps, "display"> {
|
|
|
36
38
|
* Shorthand for `flexShrink`.
|
|
37
39
|
*/
|
|
38
40
|
shrink?: BoxProps["flexShrink"];
|
|
39
|
-
}
|
|
41
|
+
};
|
|
40
42
|
|
|
41
43
|
export const Flex = React.forwardRef<HTMLDivElement, FlexProps>((props, ref) => {
|
|
42
44
|
const { direction, wrap, align, justify, grow, shrink, ...rest } = props;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { footer, type FooterVariantProps } from "@seed-design/css/recipes/footer";
|
|
2
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
export interface FooterLinkTextProps
|
|
7
|
+
extends FooterVariantProps,
|
|
8
|
+
PrimitiveProps,
|
|
9
|
+
React.AnchorHTMLAttributes<HTMLAnchorElement> {}
|
|
10
|
+
|
|
11
|
+
export const FooterLinkText = React.forwardRef<HTMLAnchorElement, FooterLinkTextProps>(
|
|
12
|
+
({ className, children, ...props }, ref) => {
|
|
13
|
+
const [variantProps, restProps] = footer.splitVariantProps(props);
|
|
14
|
+
const classNames = footer(variantProps);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Primitive.a ref={ref} className={clsx(classNames.linkText, className)} {...restProps}>
|
|
18
|
+
{children}
|
|
19
|
+
</Primitive.a>
|
|
20
|
+
);
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
FooterLinkText.displayName = "FooterLinkText";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { mergeProps } from "@seed-design/dom-utils";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import type { ResponsiveValue } from "../../types/responsive";
|
|
4
|
+
import { resolveResponsive, type DistributiveOmit } from "../../utils/styled";
|
|
3
5
|
import { Box, type BoxProps } from "../Box/Box";
|
|
4
6
|
|
|
5
|
-
export
|
|
7
|
+
export type GridProps = DistributiveOmit<BoxProps, "display"> & {
|
|
6
8
|
/**
|
|
7
9
|
* @default "grid"
|
|
8
10
|
*/
|
|
9
|
-
display?: "grid" | "none"
|
|
11
|
+
display?: ResponsiveValue<"grid" | "none">;
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Shorthand for `alignItems`.
|
|
@@ -24,13 +26,13 @@ export interface GridProps extends Omit<BoxProps, "display"> {
|
|
|
24
26
|
* Shorthand for `gridTemplateColumns`.
|
|
25
27
|
* If number, `repeat({columns}, minmax(0, 1fr))` is applied.
|
|
26
28
|
*/
|
|
27
|
-
columns?: number | string
|
|
29
|
+
columns?: ResponsiveValue<number | string>;
|
|
28
30
|
|
|
29
31
|
/**
|
|
30
32
|
* Shorthand for `gridTemplateRows`.
|
|
31
33
|
* If number, `repeat({rows}, minmax(0, 1fr))` is applied.
|
|
32
34
|
*/
|
|
33
|
-
rows?: number | string
|
|
35
|
+
rows?: ResponsiveValue<number | string>;
|
|
34
36
|
|
|
35
37
|
// NOTE: grid-template-areas not currently supported here.
|
|
36
38
|
// since grid-area is a shorthand of grid-column/row (in a grid item),
|
|
@@ -50,6 +52,10 @@ export interface GridProps extends Omit<BoxProps, "display"> {
|
|
|
50
52
|
* Shorthand for `gridAutoRows`.
|
|
51
53
|
*/
|
|
52
54
|
autoRows?: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
function handleGridTemplate(v: number | string): string {
|
|
58
|
+
return typeof v === "number" ? `repeat(${v}, minmax(0, 1fr))` : v;
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
export const Grid = React.forwardRef<HTMLDivElement, GridProps>((props, ref) => {
|
|
@@ -57,17 +63,18 @@ export const Grid = React.forwardRef<HTMLDivElement, GridProps>((props, ref) =>
|
|
|
57
63
|
props;
|
|
58
64
|
|
|
59
65
|
return (
|
|
60
|
-
// @ts-expect-error: display: "grid" is not allowed in the Box component
|
|
61
66
|
<Box
|
|
62
67
|
ref={ref}
|
|
68
|
+
display="grid"
|
|
63
69
|
alignItems={align}
|
|
64
70
|
justifyContent={justify}
|
|
65
71
|
{...mergeProps(rest, {
|
|
66
72
|
className: "seed-grid",
|
|
67
73
|
style: {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
...(columns !== undefined &&
|
|
75
|
+
resolveResponsive("--seed-grid-columns", columns, handleGridTemplate)),
|
|
76
|
+
...(rows !== undefined &&
|
|
77
|
+
resolveResponsive("--seed-grid-rows", rows, handleGridTemplate)),
|
|
71
78
|
"--seed-grid-auto-flow": autoFlow,
|
|
72
79
|
"--seed-grid-auto-columns": autoColumns,
|
|
73
80
|
"--seed-grid-auto-rows": autoRows,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { DistributiveOmit } from "../../utils/styled";
|
|
2
3
|
import { Box, type BoxProps } from "../Box/Box";
|
|
3
4
|
|
|
4
|
-
export
|
|
5
|
+
export type GridItemProps = DistributiveOmit<BoxProps, "gridColumn" | "gridRow" | "gridArea"> & {
|
|
5
6
|
/**
|
|
6
7
|
* If true, the component will render its children directly without a wrapper element.
|
|
7
8
|
* @default false
|
|
@@ -39,7 +40,7 @@ export interface GridItemProps extends Omit<BoxProps, "gridColumn" | "gridRow" |
|
|
|
39
40
|
rowEnd?: number;
|
|
40
41
|
|
|
41
42
|
// NOTE: grid-area is not currently supported here: see Grid.tsx
|
|
42
|
-
}
|
|
43
|
+
};
|
|
43
44
|
|
|
44
45
|
export const GridItem = React.forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {
|
|
45
46
|
const { asChild = false, colSpan, colStart, colEnd, rowSpan, rowStart, rowEnd, ...rest } = props;
|