@seed-design/react 1.2.15 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Accordion/Accordion.cjs +42 -0
- package/lib/components/Accordion/Accordion.d.ts +35 -0
- package/lib/components/Accordion/Accordion.d.ts.map +1 -0
- package/lib/components/Accordion/Accordion.js +32 -0
- package/lib/components/Accordion/Accordion.namespace.cjs +22 -0
- package/lib/components/Accordion/Accordion.namespace.d.ts +2 -0
- package/lib/components/Accordion/Accordion.namespace.d.ts.map +1 -0
- package/lib/components/Accordion/Accordion.namespace.js +17 -0
- package/lib/components/Accordion/index.cjs +19 -0
- package/lib/components/Accordion/index.d.ts +3 -0
- package/lib/components/Accordion/index.d.ts.map +1 -0
- package/lib/components/Accordion/index.js +3 -0
- package/lib/components/ActionButton/ActionButton.cjs +1 -1
- package/lib/components/ActionButton/ActionButton.d.ts +1 -1
- package/lib/components/ActionButton/ActionButton.d.ts.map +1 -1
- package/lib/components/ActionButton/ActionButton.js +1 -1
- package/lib/components/ActionSheet/ActionSheet.cjs +12 -12
- package/lib/components/ActionSheet/ActionSheet.d.ts +22 -22
- package/lib/components/ActionSheet/ActionSheet.js +12 -12
- package/lib/components/Article/Article.d.ts +2 -3
- package/lib/components/Article/Article.d.ts.map +1 -1
- package/lib/components/AspectRatio/AspectRatio.d.ts +2 -2
- package/lib/components/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/lib/components/AttachmentDisplay/AttachmentDisplay.cjs +63 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts +43 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.js +49 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.cjs +37 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.d.ts +5 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplay.namespace.js +32 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.cjs +110 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts +30 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayItem.js +100 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.cjs +50 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.d.ts +18 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/AttachmentDisplayTrigger.js +45 -0
- package/lib/components/AttachmentDisplay/index.cjs +34 -0
- package/lib/components/AttachmentDisplay/index.d.ts +6 -0
- package/lib/components/AttachmentDisplay/index.d.ts.map +1 -0
- package/lib/components/AttachmentDisplay/index.js +5 -0
- package/lib/components/AttachmentInput/AttachmentInput.cjs +37 -0
- package/lib/components/AttachmentInput/AttachmentInput.d.ts +23 -0
- package/lib/components/AttachmentInput/AttachmentInput.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInput.js +30 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.cjs +35 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.d.ts +6 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInput.namespace.js +30 -0
- package/lib/components/AttachmentInput/AttachmentInput.test.d.ts +2 -0
- package/lib/components/AttachmentInput/AttachmentInput.test.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.cjs +12 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.d.ts +9 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputDropzone.js +10 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.cjs +138 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.d.ts +36 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputItem.js +126 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.cjs +54 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.d.ts +21 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.d.ts.map +1 -0
- package/lib/components/AttachmentInput/AttachmentInputTrigger.js +49 -0
- package/lib/components/AttachmentInput/index.cjs +32 -0
- package/lib/components/AttachmentInput/index.d.ts +7 -0
- package/lib/components/AttachmentInput/index.d.ts.map +1 -0
- package/lib/components/AttachmentInput/index.js +6 -0
- package/lib/components/BottomSheet/BottomSheet.cjs +36 -9
- package/lib/components/BottomSheet/BottomSheet.d.ts +2 -7
- package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/components/BottomSheet/BottomSheet.js +35 -9
- package/lib/components/Box/Box.cjs +10 -3
- package/lib/components/Box/Box.d.ts +4 -2
- package/lib/components/Box/Box.d.ts.map +1 -1
- package/lib/components/Box/Box.js +10 -3
- package/lib/components/Checkbox/Checkbox.cjs +2 -6
- package/lib/components/Checkbox/Checkbox.d.ts +1 -7
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +2 -6
- package/lib/components/Chip/Chip.cjs +1 -1
- package/lib/components/Chip/Chip.js +1 -1
- package/lib/components/ChipTabs/ChipTabs.cjs +0 -1
- package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -1
- package/lib/components/ChipTabs/ChipTabs.js +0 -1
- package/lib/components/Columns/Columns.d.ts +4 -4
- package/lib/components/Columns/Columns.d.ts.map +1 -1
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.cjs +13 -13
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts +24 -24
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.js +13 -13
- package/lib/components/FieldButton/FieldButton.cjs +22 -3
- package/lib/components/FieldButton/FieldButton.d.ts +3 -2
- package/lib/components/FieldButton/FieldButton.d.ts.map +1 -1
- package/lib/components/FieldButton/FieldButton.js +23 -3
- package/lib/components/Flex/Flex.d.ts +5 -3
- package/lib/components/Flex/Flex.d.ts.map +1 -1
- package/lib/components/Footer/Footer.namespace.cjs +11 -0
- package/lib/components/Footer/Footer.namespace.d.ts +2 -0
- package/lib/components/Footer/Footer.namespace.d.ts.map +1 -0
- package/lib/components/Footer/Footer.namespace.js +6 -0
- package/lib/components/Footer/FooterLinkText.cjs +23 -0
- package/lib/components/Footer/FooterLinkText.d.ts +7 -0
- package/lib/components/Footer/FooterLinkText.d.ts.map +1 -0
- package/lib/components/Footer/FooterLinkText.js +20 -0
- package/lib/components/Footer/index.cjs +10 -0
- package/lib/components/Footer/index.d.ts +3 -0
- package/lib/components/Footer/index.d.ts.map +1 -0
- package/lib/components/Footer/index.js +3 -0
- package/lib/components/Grid/Grid.cjs +7 -2
- package/lib/components/Grid/Grid.d.ts +7 -5
- package/lib/components/Grid/Grid.d.ts.map +1 -1
- package/lib/components/Grid/Grid.js +7 -2
- package/lib/components/GridItem/GridItem.d.ts +3 -2
- package/lib/components/GridItem/GridItem.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.cjs +4 -7
- package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -1
- package/lib/components/HelpBubble/HelpBubble.js +4 -7
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.cjs +64 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.d.ts +60 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.d.ts.map +1 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.js +52 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.cjs +23 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.d.ts +2 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.d.ts.map +1 -0
- package/lib/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.js +18 -0
- package/lib/components/HelpBubbleTooltip/index.cjs +20 -0
- package/lib/components/HelpBubbleTooltip/index.d.ts +3 -0
- package/lib/components/HelpBubbleTooltip/index.d.ts.map +1 -0
- package/lib/components/HelpBubbleTooltip/index.js +3 -0
- package/lib/components/Icon/Icon.d.ts +2 -1
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/ImageFrame/ImageFrame.cjs +3 -2
- package/lib/components/ImageFrame/ImageFrame.d.ts +3 -8
- package/lib/components/ImageFrame/ImageFrame.d.ts.map +1 -1
- package/lib/components/ImageFrame/ImageFrame.js +3 -2
- package/lib/components/Inline/Inline.d.ts +2 -2
- package/lib/components/Inline/Inline.d.ts.map +1 -1
- package/lib/components/Layout/Layout.cjs +12 -0
- package/lib/components/Layout/Layout.d.ts +10 -0
- package/lib/components/Layout/Layout.d.ts.map +1 -0
- package/lib/components/Layout/Layout.js +10 -0
- package/lib/components/Layout/Layout.namespace.cjs +14 -0
- package/lib/components/Layout/Layout.namespace.d.ts +2 -0
- package/lib/components/Layout/Layout.namespace.d.ts.map +1 -0
- package/lib/components/Layout/Layout.namespace.js +9 -0
- package/lib/components/Layout/index.cjs +11 -0
- package/lib/components/Layout/index.d.ts +3 -0
- package/lib/components/Layout/index.d.ts.map +1 -0
- package/lib/components/Layout/index.js +3 -0
- package/lib/components/List/List.cjs +1 -1
- package/lib/components/List/List.d.ts +1 -1
- package/lib/components/List/List.d.ts.map +1 -1
- package/lib/components/List/List.js +1 -1
- package/lib/components/Menu/Menu.cjs +76 -0
- package/lib/components/Menu/Menu.d.ts +42 -0
- package/lib/components/Menu/Menu.d.ts.map +1 -0
- package/lib/components/Menu/Menu.js +62 -0
- package/lib/components/Menu/Menu.namespace.cjs +24 -0
- package/lib/components/Menu/Menu.namespace.d.ts +2 -0
- package/lib/components/Menu/Menu.namespace.d.ts.map +1 -0
- package/lib/components/Menu/Menu.namespace.js +19 -0
- package/lib/components/Menu/index.cjs +21 -0
- package/lib/components/Menu/index.d.ts +3 -0
- package/lib/components/Menu/index.d.ts.map +1 -0
- package/lib/components/Menu/index.js +3 -0
- package/lib/components/MenuSheet/MenuSheet.cjs +48 -0
- package/lib/components/MenuSheet/MenuSheet.d.ts +96 -0
- package/lib/components/MenuSheet/MenuSheet.d.ts.map +1 -1
- package/lib/components/MenuSheet/MenuSheet.js +48 -0
- package/lib/components/NavigationMenu/NavigationMenu.cjs +76 -0
- package/lib/components/NavigationMenu/NavigationMenu.d.ts +42 -0
- package/lib/components/NavigationMenu/NavigationMenu.d.ts.map +1 -0
- package/lib/components/NavigationMenu/NavigationMenu.js +62 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.cjs +24 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.d.ts +2 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.d.ts.map +1 -0
- package/lib/components/NavigationMenu/NavigationMenu.namespace.js +19 -0
- package/lib/components/NavigationMenu/index.cjs +21 -0
- package/lib/components/NavigationMenu/index.d.ts +3 -0
- package/lib/components/NavigationMenu/index.d.ts.map +1 -0
- package/lib/components/NavigationMenu/index.js +3 -0
- package/lib/components/RadioGroup/RadioGroup.cjs +1 -1
- package/lib/components/RadioGroup/RadioGroup.js +1 -1
- package/lib/components/ResponsivePair/ResponsivePair.cjs +8 -5
- package/lib/components/ResponsivePair/ResponsivePair.d.ts +3 -2
- package/lib/components/ResponsivePair/ResponsivePair.d.ts.map +1 -1
- package/lib/components/ResponsivePair/ResponsivePair.js +8 -5
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.cjs +184 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.d.ts +65 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.d.ts.map +1 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.js +170 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.cjs +24 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.d.ts +2 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.d.ts.map +1 -0
- package/lib/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.js +19 -0
- package/lib/components/ResponsiveSidePanel/index.cjs +22 -0
- package/lib/components/ResponsiveSidePanel/index.d.ts +3 -0
- package/lib/components/ResponsiveSidePanel/index.d.ts.map +1 -0
- package/lib/components/ResponsiveSidePanel/index.js +3 -0
- package/lib/components/SelectBox/CheckSelectBox.cjs +2 -2
- package/lib/components/SelectBox/CheckSelectBox.d.ts +1 -1
- package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -1
- package/lib/components/SelectBox/CheckSelectBox.js +1 -1
- package/lib/components/SideNavigation/SideNavigation.cjs +175 -0
- package/lib/components/SideNavigation/SideNavigation.d.ts +59 -0
- package/lib/components/SideNavigation/SideNavigation.d.ts.map +1 -0
- package/lib/components/SideNavigation/SideNavigation.js +157 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.cjs +28 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.d.ts +3 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.d.ts.map +1 -0
- package/lib/components/SideNavigation/SideNavigation.namespace.js +23 -0
- package/lib/components/SideNavigation/index.cjs +25 -0
- package/lib/components/SideNavigation/index.d.ts +4 -0
- package/lib/components/SideNavigation/index.d.ts.map +1 -0
- package/lib/components/SideNavigation/index.js +3 -0
- package/lib/components/SidePanel/SidePanel.cjs +100 -0
- package/lib/components/SidePanel/SidePanel.d.ts +41 -0
- package/lib/components/SidePanel/SidePanel.d.ts.map +1 -0
- package/lib/components/SidePanel/SidePanel.js +87 -0
- package/lib/components/SidePanel/SidePanel.namespace.cjs +23 -0
- package/lib/components/SidePanel/SidePanel.namespace.d.ts +2 -0
- package/lib/components/SidePanel/SidePanel.namespace.d.ts.map +1 -0
- package/lib/components/SidePanel/SidePanel.namespace.js +18 -0
- package/lib/components/SidePanel/index.cjs +20 -0
- package/lib/components/SidePanel/index.d.ts +3 -0
- package/lib/components/SidePanel/index.d.ts.map +1 -0
- package/lib/components/SidePanel/index.js +3 -0
- package/lib/components/Slider/Slider.cjs +2 -2
- package/lib/components/Slider/Slider.js +2 -2
- package/lib/components/Snackbar/Snackbar.cjs +2 -2
- package/lib/components/Snackbar/Snackbar.d.ts +1 -1
- package/lib/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/lib/components/Snackbar/Snackbar.js +2 -2
- package/lib/components/Stack/Stack.d.ts +4 -6
- package/lib/components/Stack/Stack.d.ts.map +1 -1
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.cjs +123 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts +60 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.js +104 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.cjs +29 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts +2 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.js +24 -0
- package/lib/components/SwipeableMenuSheet/index.cjs +26 -0
- package/lib/components/SwipeableMenuSheet/index.d.ts +3 -0
- package/lib/components/SwipeableMenuSheet/index.d.ts.map +1 -0
- package/lib/components/SwipeableMenuSheet/index.js +3 -0
- package/lib/components/Switch/Switch.cjs +1 -5
- package/lib/components/Switch/Switch.d.ts +1 -7
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Switch/Switch.js +1 -5
- package/lib/components/TagGroup/TagGroup.cjs +1 -1
- package/lib/components/TagGroup/TagGroup.js +1 -1
- package/lib/components/TextField/TextField.cjs +1 -1
- package/lib/components/TextField/TextField.js +1 -1
- package/lib/components/index.cjs +249 -0
- package/lib/components/index.d.ts +12 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +30 -1
- package/lib/components/private/useDismissible.d.ts +6 -6
- package/lib/hooks/useBreakpoint.cjs +15 -0
- package/lib/hooks/useBreakpoint.d.ts +12 -0
- package/lib/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/hooks/useBreakpoint.js +13 -0
- package/lib/hooks/useBreakpoint.test.d.ts +2 -0
- package/lib/hooks/useBreakpoint.test.d.ts.map +1 -0
- package/lib/hooks/useBreakpointValue.cjs +23 -0
- package/lib/hooks/useBreakpointValue.d.ts +8 -0
- package/lib/hooks/useBreakpointValue.d.ts.map +1 -0
- package/lib/hooks/useBreakpointValue.js +22 -0
- package/lib/hooks/useBreakpointValue.test.d.ts +2 -0
- package/lib/hooks/useBreakpointValue.test.d.ts.map +1 -0
- package/lib/index.cjs +255 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +33 -1
- package/lib/primitive.cjs +45 -0
- package/lib/primitive.d.ts +5 -0
- package/lib/primitive.d.ts.map +1 -1
- package/lib/primitive.js +5 -0
- package/lib/primitives/breakpoint-store.cjs +52 -0
- package/lib/primitives/breakpoint-store.d.ts +7 -0
- package/lib/primitives/breakpoint-store.d.ts.map +1 -0
- package/lib/primitives/breakpoint-store.js +50 -0
- package/lib/providers/BreakpointProvider.cjs +20 -0
- package/lib/providers/BreakpointProvider.d.ts +8 -0
- package/lib/providers/BreakpointProvider.d.ts.map +1 -0
- package/lib/providers/BreakpointProvider.js +19 -0
- package/lib/types/responsive.cjs +7 -0
- package/lib/types/responsive.d.ts +12 -0
- package/lib/types/responsive.d.ts.map +1 -0
- package/lib/types/responsive.js +7 -0
- package/lib/utils/createRenderTrackingContext.cjs +45 -0
- package/lib/utils/createRenderTrackingContext.d.ts +28 -0
- package/lib/utils/createRenderTrackingContext.d.ts.map +1 -0
- package/lib/utils/createRenderTrackingContext.js +44 -0
- package/lib/utils/getHelpBubbleArrowTipPath.cjs +14 -0
- package/lib/utils/getHelpBubbleArrowTipPath.d.ts +7 -0
- package/lib/utils/getHelpBubbleArrowTipPath.d.ts.map +1 -0
- package/lib/utils/getHelpBubbleArrowTipPath.js +14 -0
- package/lib/utils/styled.cjs +49 -75
- package/lib/utils/styled.d.ts +180 -62
- package/lib/utils/styled.d.ts.map +1 -1
- package/lib/utils/styled.js +49 -76
- package/package.json +33 -26
- package/src/components/Accordion/Accordion.namespace.ts +22 -0
- package/src/components/Accordion/Accordion.tsx +119 -0
- package/src/components/Accordion/index.ts +24 -0
- package/src/components/ActionButton/ActionButton.tsx +1 -1
- package/src/components/ActionSheet/ActionSheet.tsx +22 -22
- package/src/components/Article/Article.tsx +1 -1
- package/src/components/AspectRatio/AspectRatio.tsx +2 -2
- package/src/components/AttachmentDisplay/AttachmentDisplay.namespace.ts +57 -0
- package/src/components/AttachmentDisplay/AttachmentDisplay.tsx +165 -0
- package/src/components/AttachmentDisplay/AttachmentDisplayItem.tsx +204 -0
- package/src/components/AttachmentDisplay/AttachmentDisplayTrigger.tsx +82 -0
- package/src/components/AttachmentDisplay/index.ts +59 -0
- package/src/components/AttachmentInput/AttachmentInput.namespace.ts +54 -0
- package/src/components/AttachmentInput/AttachmentInput.test.tsx +161 -0
- package/src/components/AttachmentInput/AttachmentInput.tsx +77 -0
- package/src/components/AttachmentInput/AttachmentInputDropzone.tsx +25 -0
- package/src/components/AttachmentInput/AttachmentInputItem.tsx +246 -0
- package/src/components/AttachmentInput/AttachmentInputTrigger.tsx +85 -0
- package/src/components/AttachmentInput/index.ts +56 -0
- package/src/components/BottomSheet/BottomSheet.tsx +51 -22
- package/src/components/Box/Box.tsx +30 -7
- package/src/components/Checkbox/Checkbox.tsx +3 -31
- package/src/components/ChipTabs/ChipTabs.tsx +0 -6
- package/src/components/Columns/Columns.tsx +4 -3
- package/src/components/ExtendedActionSheet/ExtendedActionSheet.tsx +24 -24
- package/src/components/FieldButton/FieldButton.tsx +36 -8
- package/src/components/Flex/Flex.tsx +5 -3
- package/src/components/Footer/Footer.namespace.ts +4 -0
- package/src/components/Footer/FooterLinkText.tsx +23 -0
- package/src/components/Footer/index.ts +3 -0
- package/src/components/Grid/Grid.tsx +15 -8
- package/src/components/GridItem/GridItem.tsx +3 -2
- package/src/components/HelpBubble/HelpBubble.tsx +2 -5
- package/src/components/HelpBubbleTooltip/HelpBubbleTooltip.namespace.ts +24 -0
- package/src/components/HelpBubbleTooltip/HelpBubbleTooltip.tsx +169 -0
- package/src/components/HelpBubbleTooltip/index.ts +26 -0
- package/src/components/Icon/Icon.tsx +2 -1
- package/src/components/ImageFrame/ImageFrame.test.tsx +1 -3
- package/src/components/ImageFrame/ImageFrame.tsx +25 -23
- package/src/components/Inline/Inline.tsx +2 -1
- package/src/components/Layout/Layout.namespace.ts +6 -0
- package/src/components/Layout/Layout.tsx +21 -0
- package/src/components/Layout/index.ts +8 -0
- package/src/components/List/List.tsx +5 -1
- package/src/components/Menu/Menu.namespace.ts +26 -0
- package/src/components/Menu/Menu.tsx +157 -0
- package/src/components/Menu/index.ts +28 -0
- package/src/components/MenuSheet/MenuSheet.tsx +96 -0
- package/src/components/NavigationMenu/NavigationMenu.namespace.ts +26 -0
- package/src/components/NavigationMenu/NavigationMenu.tsx +172 -0
- package/src/components/NavigationMenu/index.ts +28 -0
- package/src/components/ResponsivePair/ResponsivePair.tsx +13 -7
- package/src/components/ResponsiveSidePanel/ResponsiveSidePanel.namespace.ts +26 -0
- package/src/components/ResponsiveSidePanel/ResponsiveSidePanel.tsx +316 -0
- package/src/components/ResponsiveSidePanel/index.ts +29 -0
- package/src/components/SelectBox/CheckSelectBox.tsx +1 -1
- package/src/components/SideNavigation/SideNavigation.namespace.ts +37 -0
- package/src/components/SideNavigation/SideNavigation.tsx +342 -0
- package/src/components/SideNavigation/index.ts +39 -0
- package/src/components/SidePanel/SidePanel.namespace.ts +24 -0
- package/src/components/SidePanel/SidePanel.tsx +216 -0
- package/src/components/SidePanel/index.ts +26 -0
- package/src/components/Snackbar/Snackbar.tsx +2 -4
- package/src/components/Stack/Stack.tsx +4 -3
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.namespace.ts +36 -0
- package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +269 -0
- package/src/components/SwipeableMenuSheet/index.ts +38 -0
- package/src/components/Switch/Switch.tsx +3 -26
- package/src/components/index.ts +12 -0
- package/src/hooks/useBreakpoint.test.tsx +94 -0
- package/src/hooks/useBreakpoint.ts +24 -0
- package/src/hooks/useBreakpointValue.test.tsx +102 -0
- package/src/hooks/useBreakpointValue.ts +33 -0
- package/src/index.ts +8 -0
- package/src/primitive.ts +5 -0
- package/src/primitives/breakpoint-store.ts +69 -0
- package/src/providers/BreakpointProvider.tsx +26 -0
- package/src/types/responsive.ts +19 -0
- package/src/utils/createRenderTrackingContext.tsx +50 -0
- package/src/utils/getHelpBubbleArrowTipPath.ts +11 -0
- package/src/utils/styled.tsx +387 -268
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AttachmentDisplayContainer as Container,
|
|
3
|
+
AttachmentDisplayControl as Control,
|
|
4
|
+
AttachmentDisplayDescription as Description,
|
|
5
|
+
AttachmentDisplayErrorMessage as ErrorMessage,
|
|
6
|
+
AttachmentDisplayFooter as Footer,
|
|
7
|
+
AttachmentDisplayHeader as Header,
|
|
8
|
+
AttachmentDisplayIndicatorText as IndicatorText,
|
|
9
|
+
AttachmentDisplayItemGroup as ItemGroup,
|
|
10
|
+
AttachmentDisplayLabel as Label,
|
|
11
|
+
AttachmentDisplayRequiredIndicator as RequiredIndicator,
|
|
12
|
+
AttachmentDisplayRoot as Root,
|
|
13
|
+
type AttachmentDisplayContainerProps as ContainerProps,
|
|
14
|
+
type AttachmentDisplayControlProps as ControlProps,
|
|
15
|
+
type AttachmentDisplayDescriptionProps as DescriptionProps,
|
|
16
|
+
type AttachmentDisplayErrorMessageProps as ErrorMessageProps,
|
|
17
|
+
type AttachmentDisplayFooterProps as FooterProps,
|
|
18
|
+
type AttachmentDisplayHeaderProps as HeaderProps,
|
|
19
|
+
type AttachmentDisplayIndicatorTextProps as IndicatorTextProps,
|
|
20
|
+
type AttachmentDisplayItemGroupProps as ItemGroupProps,
|
|
21
|
+
type AttachmentDisplayLabelProps as LabelProps,
|
|
22
|
+
type AttachmentDisplayRequiredIndicatorProps as RequiredIndicatorProps,
|
|
23
|
+
type AttachmentDisplayRootProps as RootProps,
|
|
24
|
+
} from "./AttachmentDisplay";
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
AttachmentDisplayContext as Context,
|
|
28
|
+
type AttachmentDisplayContextProps as ContextProps,
|
|
29
|
+
} from "./AttachmentDisplay";
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
AttachmentDisplayItem as Item,
|
|
33
|
+
AttachmentDisplayItemActionButton as ItemActionButton,
|
|
34
|
+
AttachmentDisplayItemBackdrop as ItemBackdrop,
|
|
35
|
+
AttachmentDisplayItemBadge as ItemBadge,
|
|
36
|
+
AttachmentDisplayItemImage as ItemImage,
|
|
37
|
+
AttachmentDisplayItemMetadata as ItemMetadata,
|
|
38
|
+
AttachmentDisplayItemRemoveButton as ItemRemoveButton,
|
|
39
|
+
AttachmentDisplayItemThumbnail as ItemThumbnail,
|
|
40
|
+
type AttachmentDisplayItemActionButtonProps as ItemActionButtonProps,
|
|
41
|
+
type AttachmentDisplayItemBackdropProps as ItemBackdropProps,
|
|
42
|
+
type AttachmentDisplayItemBadgeProps as ItemBadgeProps,
|
|
43
|
+
type AttachmentDisplayItemImageProps as ItemImageProps,
|
|
44
|
+
type AttachmentDisplayItemMetadataProps as ItemMetadataProps,
|
|
45
|
+
type AttachmentDisplayItemProps as ItemProps,
|
|
46
|
+
type AttachmentDisplayItemRemoveButtonProps as ItemRemoveButtonProps,
|
|
47
|
+
type AttachmentDisplayItemThumbnailProps as ItemThumbnailProps,
|
|
48
|
+
} from "./AttachmentDisplayItem";
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
AttachmentDisplayTrigger as Trigger,
|
|
52
|
+
AttachmentDisplayTriggerIcon as TriggerIcon,
|
|
53
|
+
AttachmentDisplayTriggerItemCount as TriggerItemCount,
|
|
54
|
+
type AttachmentDisplayTriggerIconProps as TriggerIconProps,
|
|
55
|
+
type AttachmentDisplayTriggerItemCountProps as TriggerItemCountProps,
|
|
56
|
+
type AttachmentDisplayTriggerProps as TriggerProps,
|
|
57
|
+
} from "./AttachmentDisplayTrigger";
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
attachmentInput,
|
|
5
|
+
type AttachmentInputVariantProps,
|
|
6
|
+
} from "@seed-design/css/recipes/attachment-input";
|
|
7
|
+
import { field, type FieldVariantProps } from "@seed-design/css/recipes/field";
|
|
8
|
+
import { fieldLabel, type FieldLabelVariantProps } from "@seed-design/css/recipes/field-label";
|
|
9
|
+
import {
|
|
10
|
+
AttachmentDisplay as AttachmentDisplayPrimitive,
|
|
11
|
+
useAttachmentDisplayContext,
|
|
12
|
+
} from "@seed-design/react-attachment-display";
|
|
13
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
14
|
+
import clsx from "clsx";
|
|
15
|
+
import * as React from "react";
|
|
16
|
+
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
17
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
18
|
+
import { InternalIcon } from "../private/Icon";
|
|
19
|
+
|
|
20
|
+
const { withProvider: withAttachmentInputProvider, withContext: withAttachmentInputContext } =
|
|
21
|
+
createSlotRecipeContext(attachmentInput);
|
|
22
|
+
const { withProvider: withFieldProvider, withContext: withFieldContext } =
|
|
23
|
+
createSlotRecipeContext(field);
|
|
24
|
+
const {
|
|
25
|
+
withProvider: withLabelProvider,
|
|
26
|
+
withContext: withLabelContext,
|
|
27
|
+
useClassNames: useLabelClassNames,
|
|
28
|
+
} = createSlotRecipeContext(fieldLabel);
|
|
29
|
+
|
|
30
|
+
const withStateProps = createWithStateProps([useAttachmentDisplayContext]);
|
|
31
|
+
|
|
32
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
33
|
+
|
|
34
|
+
export interface AttachmentDisplayRootProps
|
|
35
|
+
extends FieldVariantProps,
|
|
36
|
+
AttachmentDisplayPrimitive.RootProps {}
|
|
37
|
+
|
|
38
|
+
export const AttachmentDisplayRoot = withFieldProvider<HTMLDivElement, AttachmentDisplayRootProps>(
|
|
39
|
+
AttachmentDisplayPrimitive.Root,
|
|
40
|
+
"root",
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
44
|
+
|
|
45
|
+
export interface AttachmentDisplayHeaderProps
|
|
46
|
+
extends PrimitiveProps,
|
|
47
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
48
|
+
|
|
49
|
+
export const AttachmentDisplayHeader = withFieldContext<
|
|
50
|
+
HTMLDivElement,
|
|
51
|
+
AttachmentDisplayHeaderProps
|
|
52
|
+
>(withStateProps(Primitive.div), "header");
|
|
53
|
+
|
|
54
|
+
export interface AttachmentDisplayLabelProps
|
|
55
|
+
extends PrimitiveProps,
|
|
56
|
+
FieldLabelVariantProps,
|
|
57
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
58
|
+
|
|
59
|
+
export const AttachmentDisplayLabel = withLabelProvider<
|
|
60
|
+
HTMLDivElement,
|
|
61
|
+
AttachmentDisplayLabelProps
|
|
62
|
+
>(withStateProps(Primitive.div), "root");
|
|
63
|
+
|
|
64
|
+
export interface AttachmentDisplayIndicatorTextProps
|
|
65
|
+
extends PrimitiveProps,
|
|
66
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
67
|
+
|
|
68
|
+
export const AttachmentDisplayIndicatorText = withLabelContext<
|
|
69
|
+
HTMLSpanElement,
|
|
70
|
+
AttachmentDisplayIndicatorTextProps
|
|
71
|
+
>(withStateProps(Primitive.span), "indicatorText");
|
|
72
|
+
|
|
73
|
+
export interface AttachmentDisplayRequiredIndicatorProps extends React.SVGProps<SVGElement> {}
|
|
74
|
+
|
|
75
|
+
export const AttachmentDisplayRequiredIndicator = React.forwardRef<
|
|
76
|
+
SVGSVGElement,
|
|
77
|
+
AttachmentDisplayRequiredIndicatorProps
|
|
78
|
+
>(({ className, ...props }, ref) => {
|
|
79
|
+
const { indicatorIcon } = useLabelClassNames();
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<InternalIcon
|
|
83
|
+
svg={
|
|
84
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: InternalIcon is aria-hidden
|
|
85
|
+
<svg
|
|
86
|
+
viewBox="0 0 6 6"
|
|
87
|
+
fill="none"
|
|
88
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
89
|
+
className={clsx(indicatorIcon, className)}
|
|
90
|
+
>
|
|
91
|
+
<path
|
|
92
|
+
d="M3.75002 1.55859L4.41318 1.09468C4.75243 0.857361 5.21982 0.939865 5.45732 1.27899C5.69499 1.61836 5.61243 2.08615 5.27295 2.32366L4.30763 2.99902L5.27372 3.67612C5.61285 3.91381 5.69517 4.38137 5.45761 4.72059C5.21999 5.0599 4.7523 5.14233 4.41299 4.90471L3.75002 4.44043V5.25C3.75002 5.66421 3.41423 6 3.00002 6C2.5858 6 2.25002 5.66421 2.25002 5.25V4.44043L1.58704 4.90471C1.24773 5.14233 0.780041 5.0599 0.542418 4.72059C0.304856 4.38137 0.387176 3.91381 0.726309 3.67612L1.6924 2.99902L0.727079 2.32366C0.387603 2.08615 0.305043 1.61836 0.542707 1.27899C0.780206 0.939865 1.2476 0.857361 1.58685 1.09468L2.25002 1.55859V0.75C2.25002 0.335786 2.5858 0 3.00002 0C3.41423 0 3.75002 0.335786 3.75002 0.75V1.55859Z"
|
|
93
|
+
fill="currentColor"
|
|
94
|
+
/>
|
|
95
|
+
</svg>
|
|
96
|
+
}
|
|
97
|
+
ref={ref}
|
|
98
|
+
{...props}
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
AttachmentDisplayRequiredIndicator.displayName = "AttachmentDisplayRequiredIndicator";
|
|
103
|
+
|
|
104
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
105
|
+
|
|
106
|
+
export interface AttachmentDisplayControlProps
|
|
107
|
+
extends AttachmentInputVariantProps,
|
|
108
|
+
PrimitiveProps,
|
|
109
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
110
|
+
|
|
111
|
+
export const AttachmentDisplayControl = withAttachmentInputProvider<
|
|
112
|
+
HTMLDivElement,
|
|
113
|
+
AttachmentDisplayControlProps
|
|
114
|
+
>(withStateProps(Primitive.div), "root");
|
|
115
|
+
|
|
116
|
+
export interface AttachmentDisplayContainerProps
|
|
117
|
+
extends PrimitiveProps,
|
|
118
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
119
|
+
|
|
120
|
+
export const AttachmentDisplayContainer = withAttachmentInputContext<
|
|
121
|
+
HTMLDivElement,
|
|
122
|
+
AttachmentDisplayContainerProps
|
|
123
|
+
>(withStateProps(Primitive.div), "container");
|
|
124
|
+
|
|
125
|
+
export interface AttachmentDisplayItemGroupProps
|
|
126
|
+
extends PrimitiveProps,
|
|
127
|
+
React.HTMLAttributes<HTMLUListElement> {}
|
|
128
|
+
|
|
129
|
+
export const AttachmentDisplayItemGroup = withAttachmentInputContext<
|
|
130
|
+
HTMLUListElement,
|
|
131
|
+
AttachmentDisplayItemGroupProps
|
|
132
|
+
>(withStateProps(Primitive.ul), "itemGroup");
|
|
133
|
+
|
|
134
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
135
|
+
|
|
136
|
+
export interface AttachmentDisplayFooterProps
|
|
137
|
+
extends PrimitiveProps,
|
|
138
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
139
|
+
|
|
140
|
+
export const AttachmentDisplayFooter = withFieldContext<
|
|
141
|
+
HTMLDivElement,
|
|
142
|
+
AttachmentDisplayFooterProps
|
|
143
|
+
>(withStateProps(Primitive.div), "footer");
|
|
144
|
+
|
|
145
|
+
export interface AttachmentDisplayDescriptionProps
|
|
146
|
+
extends AttachmentDisplayPrimitive.DescriptionProps {}
|
|
147
|
+
|
|
148
|
+
export const AttachmentDisplayDescription = withFieldContext<
|
|
149
|
+
HTMLSpanElement,
|
|
150
|
+
AttachmentDisplayDescriptionProps
|
|
151
|
+
>(AttachmentDisplayPrimitive.Description, "description");
|
|
152
|
+
|
|
153
|
+
export interface AttachmentDisplayErrorMessageProps
|
|
154
|
+
extends AttachmentDisplayPrimitive.ErrorMessageProps {}
|
|
155
|
+
|
|
156
|
+
export const AttachmentDisplayErrorMessage = withFieldContext<
|
|
157
|
+
HTMLSpanElement,
|
|
158
|
+
AttachmentDisplayErrorMessageProps
|
|
159
|
+
>(AttachmentDisplayPrimitive.ErrorMessage, "errorMessage");
|
|
160
|
+
|
|
161
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
162
|
+
|
|
163
|
+
export interface AttachmentDisplayContextProps extends AttachmentDisplayPrimitive.ContextProps {}
|
|
164
|
+
|
|
165
|
+
export const AttachmentDisplayContext = AttachmentDisplayPrimitive.Context;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
attachmentInputItem,
|
|
5
|
+
type AttachmentInputItemVariantProps,
|
|
6
|
+
} from "@seed-design/css/recipes/attachment-input-item";
|
|
7
|
+
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
8
|
+
import { dataAttr } from "@seed-design/dom-utils";
|
|
9
|
+
import {
|
|
10
|
+
AttachmentDisplay as AttachmentDisplayPrimitive,
|
|
11
|
+
AttachmentDisplayItemProvider,
|
|
12
|
+
useAttachmentDisplayContext,
|
|
13
|
+
useAttachmentDisplayItem,
|
|
14
|
+
type DisplayItemEntry,
|
|
15
|
+
} from "@seed-design/react-attachment-display";
|
|
16
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
17
|
+
import clsx from "clsx";
|
|
18
|
+
import * as React from "react";
|
|
19
|
+
import { createRenderTrackingContext } from "../../utils/createRenderTrackingContext";
|
|
20
|
+
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
21
|
+
|
|
22
|
+
const { useClassNames, ClassNamesProvider, withContext } =
|
|
23
|
+
createSlotRecipeContext(attachmentInputItem);
|
|
24
|
+
|
|
25
|
+
// Tracks whether a Backdrop (overlay) is rendered so the Thumbnail/Metadata can emit
|
|
26
|
+
// `data-has-overlay` for the css recipe. Styling-only signal owned by the styled layer.
|
|
27
|
+
const overlayTracker = createRenderTrackingContext("AttachmentDisplayItemOverlay");
|
|
28
|
+
|
|
29
|
+
export interface AttachmentDisplayItemProps
|
|
30
|
+
extends Omit<AttachmentInputItemVariantProps, "type">,
|
|
31
|
+
PrimitiveProps,
|
|
32
|
+
React.LiHTMLAttributes<HTMLLIElement> {
|
|
33
|
+
entry: DisplayItemEntry;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const AttachmentDisplayItem = React.forwardRef<HTMLLIElement, AttachmentDisplayItemProps>(
|
|
37
|
+
({ className, entry, ...props }, ref) => {
|
|
38
|
+
const { stateProps } = useAttachmentDisplayContext();
|
|
39
|
+
const api = useAttachmentDisplayItem(entry);
|
|
40
|
+
|
|
41
|
+
const [variantProps, otherProps] = attachmentInputItem.splitVariantProps({
|
|
42
|
+
type: "image",
|
|
43
|
+
...props,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const classNames = attachmentInputItem(variantProps);
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<ClassNamesProvider value={classNames}>
|
|
50
|
+
<AttachmentDisplayItemProvider value={api}>
|
|
51
|
+
<overlayTracker.Provider>
|
|
52
|
+
<Primitive.li
|
|
53
|
+
ref={ref}
|
|
54
|
+
className={clsx(classNames.root, className)}
|
|
55
|
+
{...stateProps}
|
|
56
|
+
{...otherProps}
|
|
57
|
+
/>
|
|
58
|
+
</overlayTracker.Provider>
|
|
59
|
+
</AttachmentDisplayItemProvider>
|
|
60
|
+
</ClassNamesProvider>
|
|
61
|
+
);
|
|
62
|
+
},
|
|
63
|
+
);
|
|
64
|
+
AttachmentDisplayItem.displayName = "AttachmentDisplayItem";
|
|
65
|
+
|
|
66
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
67
|
+
|
|
68
|
+
export interface AttachmentDisplayItemImageProps
|
|
69
|
+
extends AttachmentDisplayPrimitive.ItemImageProps {}
|
|
70
|
+
|
|
71
|
+
export const AttachmentDisplayItemImage = withContext<
|
|
72
|
+
HTMLImageElement,
|
|
73
|
+
AttachmentDisplayItemImageProps
|
|
74
|
+
>(AttachmentDisplayPrimitive.ItemImage, "image");
|
|
75
|
+
|
|
76
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
77
|
+
|
|
78
|
+
export interface AttachmentDisplayItemThumbnailProps
|
|
79
|
+
extends PrimitiveProps,
|
|
80
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
81
|
+
|
|
82
|
+
export const AttachmentDisplayItemThumbnail = React.forwardRef<
|
|
83
|
+
HTMLDivElement,
|
|
84
|
+
AttachmentDisplayItemThumbnailProps
|
|
85
|
+
>(({ className, ...props }, ref) => {
|
|
86
|
+
const classNames = useClassNames();
|
|
87
|
+
const { stateProps } = useAttachmentDisplayContext();
|
|
88
|
+
const { isRendered } = overlayTracker.useRenderTracking();
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<Primitive.div
|
|
92
|
+
ref={ref}
|
|
93
|
+
data-has-overlay={dataAttr(isRendered)}
|
|
94
|
+
{...stateProps}
|
|
95
|
+
className={clsx(classNames.thumbnail, className)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
AttachmentDisplayItemThumbnail.displayName = "AttachmentDisplayItemThumbnail";
|
|
102
|
+
|
|
103
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
104
|
+
|
|
105
|
+
export interface AttachmentDisplayItemMetadataProps
|
|
106
|
+
extends PrimitiveProps,
|
|
107
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
108
|
+
|
|
109
|
+
export const AttachmentDisplayItemMetadata = React.forwardRef<
|
|
110
|
+
HTMLDivElement,
|
|
111
|
+
AttachmentDisplayItemMetadataProps
|
|
112
|
+
>(({ className, ...props }, ref) => {
|
|
113
|
+
const classNames = useClassNames();
|
|
114
|
+
const { stateProps } = useAttachmentDisplayContext();
|
|
115
|
+
const { isRendered } = overlayTracker.useRenderTracking();
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<Primitive.div
|
|
119
|
+
ref={ref}
|
|
120
|
+
data-has-overlay={dataAttr(isRendered)}
|
|
121
|
+
{...stateProps}
|
|
122
|
+
className={clsx(classNames.metadata, className)}
|
|
123
|
+
{...props}
|
|
124
|
+
/>
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
AttachmentDisplayItemMetadata.displayName = "AttachmentDisplayItemMetadata";
|
|
129
|
+
|
|
130
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
131
|
+
|
|
132
|
+
export interface AttachmentDisplayItemBackdropProps
|
|
133
|
+
extends AttachmentDisplayPrimitive.ItemBackdropProps {}
|
|
134
|
+
|
|
135
|
+
export const AttachmentDisplayItemBackdrop = React.forwardRef<
|
|
136
|
+
HTMLDivElement,
|
|
137
|
+
AttachmentDisplayItemBackdropProps
|
|
138
|
+
>(({ className, ...props }, ref) => {
|
|
139
|
+
const classNames = useClassNames();
|
|
140
|
+
const { trackRef } = overlayTracker.useRenderTracking();
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<AttachmentDisplayPrimitive.ItemBackdrop
|
|
144
|
+
ref={composeRefs(ref, trackRef)}
|
|
145
|
+
className={clsx(classNames.backdrop, className)}
|
|
146
|
+
{...props}
|
|
147
|
+
/>
|
|
148
|
+
);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
AttachmentDisplayItemBackdrop.displayName = "AttachmentDisplayItemBackdrop";
|
|
152
|
+
|
|
153
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
154
|
+
|
|
155
|
+
export interface AttachmentDisplayItemBadgeProps
|
|
156
|
+
extends PrimitiveProps,
|
|
157
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
158
|
+
|
|
159
|
+
export const AttachmentDisplayItemBadge = React.forwardRef<
|
|
160
|
+
HTMLDivElement,
|
|
161
|
+
AttachmentDisplayItemBadgeProps
|
|
162
|
+
>(({ className, children, ...props }, ref) => {
|
|
163
|
+
const classNames = useClassNames();
|
|
164
|
+
|
|
165
|
+
return (
|
|
166
|
+
<Primitive.div ref={ref} className={clsx(classNames.badge, className)} {...props}>
|
|
167
|
+
<Primitive.span className={classNames.badgeLabel}>{children}</Primitive.span>
|
|
168
|
+
</Primitive.div>
|
|
169
|
+
);
|
|
170
|
+
});
|
|
171
|
+
AttachmentDisplayItemBadge.displayName = "AttachmentDisplayItemBadge";
|
|
172
|
+
|
|
173
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
174
|
+
|
|
175
|
+
export interface AttachmentDisplayItemActionButtonProps
|
|
176
|
+
extends PrimitiveProps,
|
|
177
|
+
React.ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
178
|
+
|
|
179
|
+
export const AttachmentDisplayItemActionButton = React.forwardRef<
|
|
180
|
+
HTMLButtonElement,
|
|
181
|
+
AttachmentDisplayItemActionButtonProps
|
|
182
|
+
>(({ className, ...props }, ref) => {
|
|
183
|
+
const classNames = useClassNames();
|
|
184
|
+
|
|
185
|
+
return (
|
|
186
|
+
<Primitive.button
|
|
187
|
+
type="button"
|
|
188
|
+
ref={ref}
|
|
189
|
+
className={clsx(classNames.actionButton, className)}
|
|
190
|
+
{...props}
|
|
191
|
+
/>
|
|
192
|
+
);
|
|
193
|
+
});
|
|
194
|
+
AttachmentDisplayItemActionButton.displayName = "AttachmentDisplayItemActionButton";
|
|
195
|
+
|
|
196
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
197
|
+
|
|
198
|
+
export interface AttachmentDisplayItemRemoveButtonProps
|
|
199
|
+
extends AttachmentDisplayPrimitive.ItemRemoveButtonProps {}
|
|
200
|
+
|
|
201
|
+
export const AttachmentDisplayItemRemoveButton = withContext<
|
|
202
|
+
HTMLButtonElement,
|
|
203
|
+
AttachmentDisplayItemRemoveButtonProps
|
|
204
|
+
>(AttachmentDisplayPrimitive.ItemRemoveButton, "removeButton");
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
attachmentInputTrigger,
|
|
5
|
+
type AttachmentInputTriggerVariantProps,
|
|
6
|
+
} from "@seed-design/css/recipes/attachment-input-trigger";
|
|
7
|
+
import {
|
|
8
|
+
AttachmentDisplay as AttachmentDisplayPrimitive,
|
|
9
|
+
useAttachmentDisplayContext,
|
|
10
|
+
} from "@seed-design/react-attachment-display";
|
|
11
|
+
import { mergeProps } from "@seed-design/dom-utils";
|
|
12
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
13
|
+
import clsx from "clsx";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { InternalIcon } from "../private/Icon";
|
|
16
|
+
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
17
|
+
|
|
18
|
+
const { withProvider, useClassNames } = createSlotRecipeContext(attachmentInputTrigger);
|
|
19
|
+
|
|
20
|
+
export interface AttachmentDisplayTriggerProps
|
|
21
|
+
extends AttachmentInputTriggerVariantProps,
|
|
22
|
+
PrimitiveProps,
|
|
23
|
+
React.ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
24
|
+
|
|
25
|
+
export const AttachmentDisplayTrigger = withProvider<
|
|
26
|
+
HTMLButtonElement,
|
|
27
|
+
AttachmentDisplayTriggerProps
|
|
28
|
+
>(AttachmentDisplayPrimitive.Trigger, "root");
|
|
29
|
+
|
|
30
|
+
// Display currently only supports image content. The parametric form mirrors
|
|
31
|
+
// AttachmentInput.TriggerIcon so future expansion (e.g., "general") can be added
|
|
32
|
+
// without changing the prop shape.
|
|
33
|
+
type DisplayAcceptType = "image";
|
|
34
|
+
|
|
35
|
+
export type AttachmentDisplayTriggerIconProps = React.SVGAttributes<SVGElement> & {
|
|
36
|
+
[K in DisplayAcceptType]: React.ReactNode;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const AttachmentDisplayTriggerIcon = React.forwardRef<
|
|
40
|
+
SVGSVGElement,
|
|
41
|
+
AttachmentDisplayTriggerIconProps
|
|
42
|
+
>(({ image, ...props }, ref) => {
|
|
43
|
+
const { stateProps } = useAttachmentDisplayContext();
|
|
44
|
+
const classNames = useClassNames();
|
|
45
|
+
|
|
46
|
+
const mergedProps = mergeProps(
|
|
47
|
+
stateProps,
|
|
48
|
+
{ className: classNames.icon },
|
|
49
|
+
props as React.HTMLAttributes<HTMLElement>,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
return <InternalIcon svg={image} ref={ref} {...mergedProps} />;
|
|
53
|
+
});
|
|
54
|
+
AttachmentDisplayTriggerIcon.displayName = "AttachmentDisplayTriggerIcon";
|
|
55
|
+
|
|
56
|
+
export interface AttachmentDisplayTriggerItemCountProps
|
|
57
|
+
extends PrimitiveProps,
|
|
58
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
59
|
+
|
|
60
|
+
export const AttachmentDisplayTriggerItemCount = React.forwardRef<
|
|
61
|
+
HTMLDivElement,
|
|
62
|
+
AttachmentDisplayTriggerItemCountProps
|
|
63
|
+
>(({ className, ...otherProps }, ref) => {
|
|
64
|
+
const classNames = useClassNames();
|
|
65
|
+
const { currentEntryCount, maxEntries, stateProps } = useAttachmentDisplayContext();
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<Primitive.div className={clsx(classNames.itemCountArea, className)} ref={ref} {...otherProps}>
|
|
69
|
+
<span
|
|
70
|
+
{...(currentEntryCount === 0 && { "data-empty": true })}
|
|
71
|
+
className={classNames.itemCount}
|
|
72
|
+
{...stateProps}
|
|
73
|
+
>
|
|
74
|
+
{currentEntryCount}
|
|
75
|
+
</span>
|
|
76
|
+
<span className={classNames.maxItemCount} {...stateProps}>
|
|
77
|
+
/{maxEntries}
|
|
78
|
+
</span>
|
|
79
|
+
</Primitive.div>
|
|
80
|
+
);
|
|
81
|
+
});
|
|
82
|
+
AttachmentDisplayTriggerItemCount.displayName = "AttachmentDisplayTriggerItemCount";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AttachmentDisplayContainer,
|
|
3
|
+
AttachmentDisplayControl,
|
|
4
|
+
AttachmentDisplayDescription,
|
|
5
|
+
AttachmentDisplayErrorMessage,
|
|
6
|
+
AttachmentDisplayFooter,
|
|
7
|
+
AttachmentDisplayHeader,
|
|
8
|
+
AttachmentDisplayIndicatorText,
|
|
9
|
+
AttachmentDisplayItemGroup,
|
|
10
|
+
AttachmentDisplayLabel,
|
|
11
|
+
AttachmentDisplayRequiredIndicator,
|
|
12
|
+
AttachmentDisplayRoot,
|
|
13
|
+
type AttachmentDisplayContainerProps,
|
|
14
|
+
type AttachmentDisplayControlProps,
|
|
15
|
+
type AttachmentDisplayDescriptionProps,
|
|
16
|
+
type AttachmentDisplayErrorMessageProps,
|
|
17
|
+
type AttachmentDisplayFooterProps,
|
|
18
|
+
type AttachmentDisplayHeaderProps,
|
|
19
|
+
type AttachmentDisplayIndicatorTextProps,
|
|
20
|
+
type AttachmentDisplayItemGroupProps,
|
|
21
|
+
type AttachmentDisplayLabelProps,
|
|
22
|
+
type AttachmentDisplayRequiredIndicatorProps,
|
|
23
|
+
type AttachmentDisplayRootProps,
|
|
24
|
+
} from "./AttachmentDisplay";
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
AttachmentDisplayContext,
|
|
28
|
+
type AttachmentDisplayContextProps,
|
|
29
|
+
} from "./AttachmentDisplay";
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
AttachmentDisplayItem,
|
|
33
|
+
AttachmentDisplayItemActionButton,
|
|
34
|
+
AttachmentDisplayItemBackdrop,
|
|
35
|
+
AttachmentDisplayItemBadge,
|
|
36
|
+
AttachmentDisplayItemImage,
|
|
37
|
+
AttachmentDisplayItemMetadata,
|
|
38
|
+
AttachmentDisplayItemRemoveButton,
|
|
39
|
+
AttachmentDisplayItemThumbnail,
|
|
40
|
+
type AttachmentDisplayItemActionButtonProps,
|
|
41
|
+
type AttachmentDisplayItemBackdropProps,
|
|
42
|
+
type AttachmentDisplayItemBadgeProps,
|
|
43
|
+
type AttachmentDisplayItemImageProps,
|
|
44
|
+
type AttachmentDisplayItemMetadataProps,
|
|
45
|
+
type AttachmentDisplayItemProps,
|
|
46
|
+
type AttachmentDisplayItemRemoveButtonProps,
|
|
47
|
+
type AttachmentDisplayItemThumbnailProps,
|
|
48
|
+
} from "./AttachmentDisplayItem";
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
AttachmentDisplayTrigger,
|
|
52
|
+
AttachmentDisplayTriggerIcon,
|
|
53
|
+
AttachmentDisplayTriggerItemCount,
|
|
54
|
+
type AttachmentDisplayTriggerIconProps,
|
|
55
|
+
type AttachmentDisplayTriggerItemCountProps,
|
|
56
|
+
type AttachmentDisplayTriggerProps,
|
|
57
|
+
} from "./AttachmentDisplayTrigger";
|
|
58
|
+
|
|
59
|
+
export * as AttachmentDisplay from "./AttachmentDisplay.namespace";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AttachmentInputContainer as Container,
|
|
3
|
+
AttachmentInputHiddenInput as HiddenInput,
|
|
4
|
+
AttachmentInputItemGroup as ItemGroup,
|
|
5
|
+
AttachmentInputRoot as Root,
|
|
6
|
+
type AttachmentInputContainerProps as ContainerProps,
|
|
7
|
+
type AttachmentInputHiddenInputProps as HiddenInputProps,
|
|
8
|
+
type AttachmentInputItemGroupProps as ItemGroupProps,
|
|
9
|
+
type AttachmentInputRootProps as RootProps,
|
|
10
|
+
} from "./AttachmentInput";
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
AttachmentInputContext as Context,
|
|
14
|
+
type AttachmentInputContextProps as ContextProps,
|
|
15
|
+
} from "./AttachmentInput";
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
AttachmentInputDropzone as Dropzone,
|
|
19
|
+
AttachmentInputDropzoneLabel as DropzoneLabel,
|
|
20
|
+
type AttachmentInputDropzoneLabelProps as DropzoneLabelProps,
|
|
21
|
+
type AttachmentInputDropzoneProps as DropzoneProps,
|
|
22
|
+
} from "./AttachmentInputDropzone";
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
AttachmentInputItem as Item,
|
|
26
|
+
AttachmentInputItemActionButton as ItemActionButton,
|
|
27
|
+
AttachmentInputItemBackdrop as ItemBackdrop,
|
|
28
|
+
AttachmentInputItemBadge as ItemBadge,
|
|
29
|
+
AttachmentInputItemImage as ItemImage,
|
|
30
|
+
AttachmentInputItemMetadata as ItemMetadata,
|
|
31
|
+
AttachmentInputItemName as ItemName,
|
|
32
|
+
AttachmentInputItemRemoveButton as ItemRemoveButton,
|
|
33
|
+
AttachmentInputItemSize as ItemSize,
|
|
34
|
+
AttachmentInputItemThumbnail as ItemThumbnail,
|
|
35
|
+
type AttachmentInputItemActionButtonProps as ItemActionButtonProps,
|
|
36
|
+
type AttachmentInputItemBackdropProps as ItemBackdropProps,
|
|
37
|
+
type AttachmentInputItemBadgeProps as ItemBadgeProps,
|
|
38
|
+
type AttachmentInputItemImageProps as ItemImageProps,
|
|
39
|
+
type AttachmentInputItemMetadataProps as ItemMetadataProps,
|
|
40
|
+
type AttachmentInputItemNameProps as ItemNameProps,
|
|
41
|
+
type AttachmentInputItemProps as ItemProps,
|
|
42
|
+
type AttachmentInputItemRemoveButtonProps as ItemRemoveButtonProps,
|
|
43
|
+
type AttachmentInputItemSizeProps as ItemSizeProps,
|
|
44
|
+
type AttachmentInputItemThumbnailProps as ItemThumbnailProps,
|
|
45
|
+
} from "./AttachmentInputItem";
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
AttachmentInputTrigger as Trigger,
|
|
49
|
+
AttachmentInputTriggerIcon as TriggerIcon,
|
|
50
|
+
AttachmentInputTriggerItemCount as TriggerItemCount,
|
|
51
|
+
type AttachmentInputTriggerIconProps as TriggerIconProps,
|
|
52
|
+
type AttachmentInputTriggerItemCountProps as TriggerItemCountProps,
|
|
53
|
+
type AttachmentInputTriggerProps as TriggerProps,
|
|
54
|
+
} from "./AttachmentInputTrigger";
|