@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,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_createSlotRecipeContext = require("../../utils/createSlotRecipeContext.cjs");
|
|
5
|
+
const require_createWithStateProps = require("../../utils/createWithStateProps.cjs");
|
|
6
|
+
let _seed_design_react_file_upload = require("@seed-design/react-file-upload");
|
|
7
|
+
let _seed_design_react_primitive = require("@seed-design/react-primitive");
|
|
8
|
+
let react = require("react");
|
|
9
|
+
react = require_runtime.__toESM(react);
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
let _seed_design_dom_utils = require("@seed-design/dom-utils");
|
|
12
|
+
let _seed_design_react_field = require("@seed-design/react-field");
|
|
13
|
+
let _seed_design_css_recipes_attachment_input = require("@seed-design/css/recipes/attachment-input");
|
|
14
|
+
//#region src/components/AttachmentInput/AttachmentInput.tsx
|
|
15
|
+
var { withProvider, withContext } = require_createSlotRecipeContext.createSlotRecipeContext(_seed_design_css_recipes_attachment_input.attachmentInput);
|
|
16
|
+
var withStateProps = require_createWithStateProps.createWithStateProps([_seed_design_react_file_upload.useFileUploadContext]);
|
|
17
|
+
var AttachmentInputRoot = withProvider(_seed_design_react_file_upload.FileUpload.Root, "root");
|
|
18
|
+
var AttachmentInputContainer = withContext(withStateProps(_seed_design_react_primitive.Primitive.div), "container");
|
|
19
|
+
var AttachmentInputHiddenInput = react.forwardRef((props, ref) => {
|
|
20
|
+
const fileUploadContext = (0, _seed_design_react_file_upload.useFileUploadContext)();
|
|
21
|
+
const fieldContext = (0, _seed_design_react_field.useFieldContext)({ strict: false });
|
|
22
|
+
const { "aria-readonly": _ariaReadOnly, ...rest } = (0, _seed_design_dom_utils.mergeProps)(fieldContext ? fieldContext.inputAriaAttributes : {}, fileUploadContext.hiddenInputProps, fieldContext ? fieldContext.inputProps : {}, props);
|
|
23
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_file_upload.FileUpload.HiddenInput, {
|
|
24
|
+
ref,
|
|
25
|
+
...rest
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
AttachmentInputHiddenInput.displayName = "AttachmentInputHiddenInput";
|
|
29
|
+
var AttachmentInputItemGroup = withContext(withStateProps(_seed_design_react_primitive.Primitive.ul), "itemGroup");
|
|
30
|
+
var AttachmentInputContext = _seed_design_react_file_upload.FileUpload.Context;
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.AttachmentInputContainer = AttachmentInputContainer;
|
|
33
|
+
exports.AttachmentInputContext = AttachmentInputContext;
|
|
34
|
+
exports.AttachmentInputHiddenInput = AttachmentInputHiddenInput;
|
|
35
|
+
exports.AttachmentInputItemGroup = AttachmentInputItemGroup;
|
|
36
|
+
exports.AttachmentInputRoot = AttachmentInputRoot;
|
|
37
|
+
exports.withContext = withContext;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AttachmentInputVariantProps, AttachmentInputSlotName } from '@seed-design/css/recipes/attachment-input';
|
|
2
|
+
import { FileUpload as FileUploadPrimitive } from '@seed-design/react-file-upload';
|
|
3
|
+
import { PrimitiveProps } from '@seed-design/react-primitive';
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
export declare const withProvider: <T, P>(Component: React.ElementType<any>, slot: AttachmentInputSlotName, options?: {
|
|
6
|
+
defaultProps?: Partial<P> | undefined;
|
|
7
|
+
} | undefined) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>, withContext: <T, P>(Component: React.ElementType<any>, slot?: AttachmentInputSlotName | undefined) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
|
|
8
|
+
export interface AttachmentInputRootProps extends AttachmentInputVariantProps, FileUploadPrimitive.RootProps {
|
|
9
|
+
}
|
|
10
|
+
export declare const AttachmentInputRoot: React.ForwardRefExoticComponent<AttachmentInputRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export interface AttachmentInputContainerProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
}
|
|
13
|
+
export declare const AttachmentInputContainer: React.ForwardRefExoticComponent<AttachmentInputContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export interface AttachmentInputHiddenInputProps extends FileUploadPrimitive.HiddenInputProps {
|
|
15
|
+
}
|
|
16
|
+
export declare const AttachmentInputHiddenInput: React.ForwardRefExoticComponent<AttachmentInputHiddenInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
17
|
+
export interface AttachmentInputItemGroupProps extends PrimitiveProps, React.HTMLAttributes<HTMLUListElement> {
|
|
18
|
+
}
|
|
19
|
+
export declare const AttachmentInputItemGroup: React.ForwardRefExoticComponent<AttachmentInputItemGroupProps & React.RefAttributes<HTMLUListElement>>;
|
|
20
|
+
export interface AttachmentInputContextProps extends FileUploadPrimitive.ContextProps {
|
|
21
|
+
}
|
|
22
|
+
export declare const AttachmentInputContext: (props: FileUploadPrimitive.ContextProps) => React.ReactNode;
|
|
23
|
+
//# sourceMappingURL=AttachmentInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentInput.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentInput/AttachmentInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,UAAU,IAAI,mBAAmB,EAElC,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9E,eAAO,MAAQ,YAAY;;sGAAE,WAAW,iOAA6C,CAAC;AAItF,MAAM,WAAW,wBACf,SAAQ,2BAA2B,EACjC,mBAAmB,CAAC,SAAS;CAAG;AAEpC,eAAO,MAAM,mBAAmB,iGAG/B,CAAC;AAEF,MAAM,WAAW,6BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,wBAAwB,sGAGpC,CAAC;AAEF,MAAM,WAAW,+BAAgC,SAAQ,mBAAmB,CAAC,gBAAgB;CAAG;AAEhG,eAAO,MAAM,0BAA0B,0GAoBrC,CAAC;AAGH,MAAM,WAAW,6BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;CAAG;AAE7C,eAAO,MAAM,wBAAwB,wGAGO,CAAC;AAE7C,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB,CAAC,YAAY;CAAG;AAExF,eAAO,MAAM,sBAAsB,8DAA8B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext.js";
|
|
4
|
+
import { createWithStateProps } from "../../utils/createWithStateProps.js";
|
|
5
|
+
import { FileUpload, useFileUploadContext } from "@seed-design/react-file-upload";
|
|
6
|
+
import { Primitive } from "@seed-design/react-primitive";
|
|
7
|
+
import * as React$1 from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { mergeProps } from "@seed-design/dom-utils";
|
|
10
|
+
import { useFieldContext } from "@seed-design/react-field";
|
|
11
|
+
import { attachmentInput } from "@seed-design/css/recipes/attachment-input";
|
|
12
|
+
//#region src/components/AttachmentInput/AttachmentInput.tsx
|
|
13
|
+
var { withProvider, withContext } = createSlotRecipeContext(attachmentInput);
|
|
14
|
+
var withStateProps = createWithStateProps([useFileUploadContext]);
|
|
15
|
+
var AttachmentInputRoot = withProvider(FileUpload.Root, "root");
|
|
16
|
+
var AttachmentInputContainer = withContext(withStateProps(Primitive.div), "container");
|
|
17
|
+
var AttachmentInputHiddenInput = React$1.forwardRef((props, ref) => {
|
|
18
|
+
const fileUploadContext = useFileUploadContext();
|
|
19
|
+
const fieldContext = useFieldContext({ strict: false });
|
|
20
|
+
const { "aria-readonly": _ariaReadOnly, ...rest } = mergeProps(fieldContext ? fieldContext.inputAriaAttributes : {}, fileUploadContext.hiddenInputProps, fieldContext ? fieldContext.inputProps : {}, props);
|
|
21
|
+
return /* @__PURE__ */ jsx(FileUpload.HiddenInput, {
|
|
22
|
+
ref,
|
|
23
|
+
...rest
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
AttachmentInputHiddenInput.displayName = "AttachmentInputHiddenInput";
|
|
27
|
+
var AttachmentInputItemGroup = withContext(withStateProps(Primitive.ul), "itemGroup");
|
|
28
|
+
var AttachmentInputContext = FileUpload.Context;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { AttachmentInputContainer, AttachmentInputContext, AttachmentInputHiddenInput, AttachmentInputItemGroup, AttachmentInputRoot, withContext };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_AttachmentInput = require("./AttachmentInput.cjs");
|
|
3
|
+
const require_AttachmentInputDropzone = require("./AttachmentInputDropzone.cjs");
|
|
4
|
+
const require_AttachmentInputItem = require("./AttachmentInputItem.cjs");
|
|
5
|
+
const require_AttachmentInputTrigger = require("./AttachmentInputTrigger.cjs");
|
|
6
|
+
//#region src/components/AttachmentInput/AttachmentInput.namespace.ts
|
|
7
|
+
var AttachmentInput_namespace_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
8
|
+
Container: () => require_AttachmentInput.AttachmentInputContainer,
|
|
9
|
+
Context: () => require_AttachmentInput.AttachmentInputContext,
|
|
10
|
+
Dropzone: () => require_AttachmentInputDropzone.AttachmentInputDropzone,
|
|
11
|
+
DropzoneLabel: () => require_AttachmentInputDropzone.AttachmentInputDropzoneLabel,
|
|
12
|
+
HiddenInput: () => require_AttachmentInput.AttachmentInputHiddenInput,
|
|
13
|
+
Item: () => require_AttachmentInputItem.AttachmentInputItem,
|
|
14
|
+
ItemActionButton: () => require_AttachmentInputItem.AttachmentInputItemActionButton,
|
|
15
|
+
ItemBackdrop: () => require_AttachmentInputItem.AttachmentInputItemBackdrop,
|
|
16
|
+
ItemBadge: () => require_AttachmentInputItem.AttachmentInputItemBadge,
|
|
17
|
+
ItemGroup: () => require_AttachmentInput.AttachmentInputItemGroup,
|
|
18
|
+
ItemImage: () => require_AttachmentInputItem.AttachmentInputItemImage,
|
|
19
|
+
ItemMetadata: () => require_AttachmentInputItem.AttachmentInputItemMetadata,
|
|
20
|
+
ItemName: () => require_AttachmentInputItem.AttachmentInputItemName,
|
|
21
|
+
ItemRemoveButton: () => require_AttachmentInputItem.AttachmentInputItemRemoveButton,
|
|
22
|
+
ItemSize: () => require_AttachmentInputItem.AttachmentInputItemSize,
|
|
23
|
+
ItemThumbnail: () => require_AttachmentInputItem.AttachmentInputItemThumbnail,
|
|
24
|
+
Root: () => require_AttachmentInput.AttachmentInputRoot,
|
|
25
|
+
Trigger: () => require_AttachmentInputTrigger.AttachmentInputTrigger,
|
|
26
|
+
TriggerIcon: () => require_AttachmentInputTrigger.AttachmentInputTriggerIcon,
|
|
27
|
+
TriggerItemCount: () => require_AttachmentInputTrigger.AttachmentInputTriggerItemCount
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
Object.defineProperty(exports, "AttachmentInput_namespace_exports", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function() {
|
|
33
|
+
return AttachmentInput_namespace_exports;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AttachmentInputContainer as Container, AttachmentInputHiddenInput as HiddenInput, AttachmentInputItemGroup as ItemGroup, AttachmentInputRoot as Root, type AttachmentInputContainerProps as ContainerProps, type AttachmentInputHiddenInputProps as HiddenInputProps, type AttachmentInputItemGroupProps as ItemGroupProps, type AttachmentInputRootProps as RootProps, } from './AttachmentInput';
|
|
2
|
+
export { AttachmentInputContext as Context, type AttachmentInputContextProps as ContextProps, } from './AttachmentInput';
|
|
3
|
+
export { AttachmentInputDropzone as Dropzone, AttachmentInputDropzoneLabel as DropzoneLabel, type AttachmentInputDropzoneLabelProps as DropzoneLabelProps, type AttachmentInputDropzoneProps as DropzoneProps, } from './AttachmentInputDropzone';
|
|
4
|
+
export { AttachmentInputItem as Item, AttachmentInputItemActionButton as ItemActionButton, AttachmentInputItemBackdrop as ItemBackdrop, AttachmentInputItemBadge as ItemBadge, AttachmentInputItemImage as ItemImage, AttachmentInputItemMetadata as ItemMetadata, AttachmentInputItemName as ItemName, AttachmentInputItemRemoveButton as ItemRemoveButton, AttachmentInputItemSize as ItemSize, AttachmentInputItemThumbnail as ItemThumbnail, type AttachmentInputItemActionButtonProps as ItemActionButtonProps, type AttachmentInputItemBackdropProps as ItemBackdropProps, type AttachmentInputItemBadgeProps as ItemBadgeProps, type AttachmentInputItemImageProps as ItemImageProps, type AttachmentInputItemMetadataProps as ItemMetadataProps, type AttachmentInputItemNameProps as ItemNameProps, type AttachmentInputItemProps as ItemProps, type AttachmentInputItemRemoveButtonProps as ItemRemoveButtonProps, type AttachmentInputItemSizeProps as ItemSizeProps, type AttachmentInputItemThumbnailProps as ItemThumbnailProps, } from './AttachmentInputItem';
|
|
5
|
+
export { AttachmentInputTrigger as Trigger, AttachmentInputTriggerIcon as TriggerIcon, AttachmentInputTriggerItemCount as TriggerItemCount, type AttachmentInputTriggerIconProps as TriggerIconProps, type AttachmentInputTriggerItemCountProps as TriggerItemCountProps, type AttachmentInputTriggerProps as TriggerProps, } from './AttachmentInputTrigger';
|
|
6
|
+
//# sourceMappingURL=AttachmentInput.namespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentInput.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentInput/AttachmentInput.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,IAAI,SAAS,EACrC,0BAA0B,IAAI,WAAW,EACzC,wBAAwB,IAAI,SAAS,EACrC,mBAAmB,IAAI,IAAI,EAC3B,KAAK,6BAA6B,IAAI,cAAc,EACpD,KAAK,+BAA+B,IAAI,gBAAgB,EACxD,KAAK,6BAA6B,IAAI,cAAc,EACpD,KAAK,wBAAwB,IAAI,SAAS,GAC3C,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,sBAAsB,IAAI,OAAO,EACjC,KAAK,2BAA2B,IAAI,YAAY,GACjD,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,uBAAuB,IAAI,QAAQ,EACnC,4BAA4B,IAAI,aAAa,EAC7C,KAAK,iCAAiC,IAAI,kBAAkB,EAC5D,KAAK,4BAA4B,IAAI,aAAa,GACnD,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,mBAAmB,IAAI,IAAI,EAC3B,+BAA+B,IAAI,gBAAgB,EACnD,2BAA2B,IAAI,YAAY,EAC3C,wBAAwB,IAAI,SAAS,EACrC,wBAAwB,IAAI,SAAS,EACrC,2BAA2B,IAAI,YAAY,EAC3C,uBAAuB,IAAI,QAAQ,EACnC,+BAA+B,IAAI,gBAAgB,EACnD,uBAAuB,IAAI,QAAQ,EACnC,4BAA4B,IAAI,aAAa,EAC7C,KAAK,oCAAoC,IAAI,qBAAqB,EAClE,KAAK,gCAAgC,IAAI,iBAAiB,EAC1D,KAAK,6BAA6B,IAAI,cAAc,EACpD,KAAK,6BAA6B,IAAI,cAAc,EACpD,KAAK,gCAAgC,IAAI,iBAAiB,EAC1D,KAAK,4BAA4B,IAAI,aAAa,EAClD,KAAK,wBAAwB,IAAI,SAAS,EAC1C,KAAK,oCAAoC,IAAI,qBAAqB,EAClE,KAAK,4BAA4B,IAAI,aAAa,EAClD,KAAK,iCAAiC,IAAI,kBAAkB,GAC7D,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,sBAAsB,IAAI,OAAO,EACjC,0BAA0B,IAAI,WAAW,EACzC,+BAA+B,IAAI,gBAAgB,EACnD,KAAK,+BAA+B,IAAI,gBAAgB,EACxD,KAAK,oCAAoC,IAAI,qBAAqB,EAClE,KAAK,2BAA2B,IAAI,YAAY,GACjD,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { AttachmentInputContainer, AttachmentInputContext, AttachmentInputHiddenInput, AttachmentInputItemGroup, AttachmentInputRoot } from "./AttachmentInput.js";
|
|
3
|
+
import { AttachmentInputDropzone, AttachmentInputDropzoneLabel } from "./AttachmentInputDropzone.js";
|
|
4
|
+
import { AttachmentInputItem, AttachmentInputItemActionButton, AttachmentInputItemBackdrop, AttachmentInputItemBadge, AttachmentInputItemImage, AttachmentInputItemMetadata, AttachmentInputItemName, AttachmentInputItemRemoveButton, AttachmentInputItemSize, AttachmentInputItemThumbnail } from "./AttachmentInputItem.js";
|
|
5
|
+
import { AttachmentInputTrigger, AttachmentInputTriggerIcon, AttachmentInputTriggerItemCount } from "./AttachmentInputTrigger.js";
|
|
6
|
+
//#region src/components/AttachmentInput/AttachmentInput.namespace.ts
|
|
7
|
+
var AttachmentInput_namespace_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
Container: () => AttachmentInputContainer,
|
|
9
|
+
Context: () => AttachmentInputContext,
|
|
10
|
+
Dropzone: () => AttachmentInputDropzone,
|
|
11
|
+
DropzoneLabel: () => AttachmentInputDropzoneLabel,
|
|
12
|
+
HiddenInput: () => AttachmentInputHiddenInput,
|
|
13
|
+
Item: () => AttachmentInputItem,
|
|
14
|
+
ItemActionButton: () => AttachmentInputItemActionButton,
|
|
15
|
+
ItemBackdrop: () => AttachmentInputItemBackdrop,
|
|
16
|
+
ItemBadge: () => AttachmentInputItemBadge,
|
|
17
|
+
ItemGroup: () => AttachmentInputItemGroup,
|
|
18
|
+
ItemImage: () => AttachmentInputItemImage,
|
|
19
|
+
ItemMetadata: () => AttachmentInputItemMetadata,
|
|
20
|
+
ItemName: () => AttachmentInputItemName,
|
|
21
|
+
ItemRemoveButton: () => AttachmentInputItemRemoveButton,
|
|
22
|
+
ItemSize: () => AttachmentInputItemSize,
|
|
23
|
+
ItemThumbnail: () => AttachmentInputItemThumbnail,
|
|
24
|
+
Root: () => AttachmentInputRoot,
|
|
25
|
+
Trigger: () => AttachmentInputTrigger,
|
|
26
|
+
TriggerIcon: () => AttachmentInputTriggerIcon,
|
|
27
|
+
TriggerItemCount: () => AttachmentInputTriggerItemCount
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { AttachmentInput_namespace_exports };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentInput.test.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentInput/AttachmentInput.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_AttachmentInput = require("./AttachmentInput.cjs");
|
|
5
|
+
let _seed_design_react_file_upload = require("@seed-design/react-file-upload");
|
|
6
|
+
let _seed_design_react_primitive = require("@seed-design/react-primitive");
|
|
7
|
+
//#region src/components/AttachmentInput/AttachmentInputDropzone.tsx
|
|
8
|
+
var AttachmentInputDropzone = require_AttachmentInput.withContext(_seed_design_react_file_upload.FileUpload.Dropzone, "dropzone");
|
|
9
|
+
var AttachmentInputDropzoneLabel = require_AttachmentInput.withContext(_seed_design_react_primitive.Primitive.div, "dropzoneLabel");
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.AttachmentInputDropzone = AttachmentInputDropzone;
|
|
12
|
+
exports.AttachmentInputDropzoneLabel = AttachmentInputDropzoneLabel;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PrimitiveProps } from '@seed-design/react-primitive';
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
export interface AttachmentInputDropzoneProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
}
|
|
5
|
+
export declare const AttachmentInputDropzone: React.ForwardRefExoticComponent<AttachmentInputDropzoneProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export interface AttachmentInputDropzoneLabelProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
}
|
|
8
|
+
export declare const AttachmentInputDropzoneLabel: React.ForwardRefExoticComponent<AttachmentInputDropzoneLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//# sourceMappingURL=AttachmentInputDropzone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentInputDropzone.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentInput/AttachmentInputDropzone.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9E,MAAM,WAAW,4BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,uBAAuB,qGAGnC,CAAC;AAEF,MAAM,WAAW,iCACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,4BAA4B,0GAGR,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { withContext } from "./AttachmentInput.js";
|
|
4
|
+
import { FileUpload } from "@seed-design/react-file-upload";
|
|
5
|
+
import { Primitive } from "@seed-design/react-primitive";
|
|
6
|
+
//#region src/components/AttachmentInput/AttachmentInputDropzone.tsx
|
|
7
|
+
var AttachmentInputDropzone = withContext(FileUpload.Dropzone, "dropzone");
|
|
8
|
+
var AttachmentInputDropzoneLabel = withContext(Primitive.div, "dropzoneLabel");
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AttachmentInputDropzone, AttachmentInputDropzoneLabel };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_createSlotRecipeContext = require("../../utils/createSlotRecipeContext.cjs");
|
|
5
|
+
const require_createRenderTrackingContext = require("../../utils/createRenderTrackingContext.cjs");
|
|
6
|
+
let _seed_design_react_file_upload = require("@seed-design/react-file-upload");
|
|
7
|
+
let _seed_design_react_middle_truncate = require("@seed-design/react-middle-truncate");
|
|
8
|
+
let _seed_design_react_primitive = require("@seed-design/react-primitive");
|
|
9
|
+
let clsx = require("clsx");
|
|
10
|
+
clsx = require_runtime.__toESM(clsx);
|
|
11
|
+
let react = require("react");
|
|
12
|
+
react = require_runtime.__toESM(react);
|
|
13
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
|
+
let _seed_design_dom_utils = require("@seed-design/dom-utils");
|
|
15
|
+
let _radix_ui_react_compose_refs = require("@radix-ui/react-compose-refs");
|
|
16
|
+
let _seed_design_css_recipes_attachment_input_item = require("@seed-design/css/recipes/attachment-input-item");
|
|
17
|
+
//#region src/components/AttachmentInput/AttachmentInputItem.tsx
|
|
18
|
+
var { useClassNames, ClassNamesProvider, withContext } = require_createSlotRecipeContext.createSlotRecipeContext(_seed_design_css_recipes_attachment_input_item.attachmentInputItem);
|
|
19
|
+
var overlayTracker = require_createRenderTrackingContext.createRenderTrackingContext("AttachmentInputItemOverlay");
|
|
20
|
+
var AttachmentInputItem = react.forwardRef(({ className, fileEntry, ...props }, ref) => {
|
|
21
|
+
const { acceptType, stateProps } = (0, _seed_design_react_file_upload.useFileUploadContext)();
|
|
22
|
+
const api = (0, _seed_design_react_file_upload.useFileUploadItem)(fileEntry);
|
|
23
|
+
const [variantProps, otherProps] = _seed_design_css_recipes_attachment_input_item.attachmentInputItem.splitVariantProps({
|
|
24
|
+
type: acceptType,
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
const classNames = (0, _seed_design_css_recipes_attachment_input_item.attachmentInputItem)(variantProps);
|
|
28
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClassNamesProvider, {
|
|
29
|
+
value: classNames,
|
|
30
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_file_upload.FileUploadItemProvider, {
|
|
31
|
+
value: api,
|
|
32
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(overlayTracker.Provider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_primitive.Primitive.li, {
|
|
33
|
+
ref,
|
|
34
|
+
className: (0, clsx.default)(classNames.root, className),
|
|
35
|
+
...stateProps,
|
|
36
|
+
...otherProps
|
|
37
|
+
}) })
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
AttachmentInputItem.displayName = "AttachmentInputItem";
|
|
42
|
+
var AttachmentInputItemName = react.forwardRef(({ className, children, ...props }, ref) => {
|
|
43
|
+
const classNames = useClassNames();
|
|
44
|
+
const { file } = (0, _seed_design_react_file_upload.useFileUploadItemContext)();
|
|
45
|
+
const { extension } = (0, _seed_design_react_file_upload.splitFileName)(file.name);
|
|
46
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_file_upload.FileUpload.ItemName, {
|
|
47
|
+
ref,
|
|
48
|
+
className: (0, clsx.default)(classNames.name, className),
|
|
49
|
+
...props,
|
|
50
|
+
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_middle_truncate.MiddleTruncate, {
|
|
51
|
+
maxLines: 2,
|
|
52
|
+
end: extension.length,
|
|
53
|
+
children: file.name
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
AttachmentInputItemName.displayName = "AttachmentInputItemName";
|
|
58
|
+
var AttachmentInputItemSize = react.forwardRef(({ className, ...props }, ref) => {
|
|
59
|
+
const classNames = useClassNames();
|
|
60
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_file_upload.FileUpload.ItemSize, {
|
|
61
|
+
ref,
|
|
62
|
+
className: (0, clsx.default)(classNames.size, className),
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
AttachmentInputItemSize.displayName = "AttachmentInputItemSize";
|
|
67
|
+
var AttachmentInputItemRemoveButton = withContext(_seed_design_react_file_upload.FileUpload.ItemRemoveButton, "removeButton");
|
|
68
|
+
var AttachmentInputItemImage = withContext(_seed_design_react_file_upload.FileUpload.ItemImage, "image");
|
|
69
|
+
var AttachmentInputItemThumbnail = react.forwardRef(({ className, ...props }, ref) => {
|
|
70
|
+
const classNames = useClassNames();
|
|
71
|
+
const { stateProps } = (0, _seed_design_react_file_upload.useFileUploadContext)();
|
|
72
|
+
const { isRendered } = overlayTracker.useRenderTracking();
|
|
73
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_primitive.Primitive.div, {
|
|
74
|
+
ref,
|
|
75
|
+
"data-has-overlay": (0, _seed_design_dom_utils.dataAttr)(isRendered),
|
|
76
|
+
...stateProps,
|
|
77
|
+
className: (0, clsx.default)(classNames.thumbnail, className),
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
AttachmentInputItemThumbnail.displayName = "AttachmentInputItemThumbnail";
|
|
82
|
+
var AttachmentInputItemBadge = react.forwardRef(({ className, children, ...props }, ref) => {
|
|
83
|
+
const classNames = useClassNames();
|
|
84
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_primitive.Primitive.div, {
|
|
85
|
+
ref,
|
|
86
|
+
className: (0, clsx.default)(classNames.badge, className),
|
|
87
|
+
...props,
|
|
88
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_primitive.Primitive.span, {
|
|
89
|
+
className: classNames.badgeLabel,
|
|
90
|
+
children
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
AttachmentInputItemBadge.displayName = "AttachmentInputItemBadge";
|
|
95
|
+
var AttachmentInputItemActionButton = react.forwardRef(({ className, ...props }, ref) => {
|
|
96
|
+
const classNames = useClassNames();
|
|
97
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_primitive.Primitive.button, {
|
|
98
|
+
type: "button",
|
|
99
|
+
ref,
|
|
100
|
+
className: (0, clsx.default)(classNames.actionButton, className),
|
|
101
|
+
...props
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
AttachmentInputItemActionButton.displayName = "AttachmentInputItemActionButton";
|
|
105
|
+
var AttachmentInputItemBackdrop = react.forwardRef(({ className, ...props }, ref) => {
|
|
106
|
+
const classNames = useClassNames();
|
|
107
|
+
const { trackRef } = overlayTracker.useRenderTracking();
|
|
108
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_file_upload.FileUpload.ItemBackdrop, {
|
|
109
|
+
ref: (0, _radix_ui_react_compose_refs.composeRefs)(ref, trackRef),
|
|
110
|
+
className: (0, clsx.default)(classNames.backdrop, className),
|
|
111
|
+
...props
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
AttachmentInputItemBackdrop.displayName = "AttachmentInputItemBackdrop";
|
|
115
|
+
var AttachmentInputItemMetadata = react.forwardRef(({ className, ...props }, ref) => {
|
|
116
|
+
const classNames = useClassNames();
|
|
117
|
+
const { stateProps } = (0, _seed_design_react_file_upload.useFileUploadContext)();
|
|
118
|
+
const { isRendered } = overlayTracker.useRenderTracking();
|
|
119
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_primitive.Primitive.div, {
|
|
120
|
+
ref,
|
|
121
|
+
"data-has-overlay": (0, _seed_design_dom_utils.dataAttr)(isRendered),
|
|
122
|
+
...stateProps,
|
|
123
|
+
className: (0, clsx.default)(classNames.metadata, className),
|
|
124
|
+
...props
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
AttachmentInputItemMetadata.displayName = "AttachmentInputItemMetadata";
|
|
128
|
+
//#endregion
|
|
129
|
+
exports.AttachmentInputItem = AttachmentInputItem;
|
|
130
|
+
exports.AttachmentInputItemActionButton = AttachmentInputItemActionButton;
|
|
131
|
+
exports.AttachmentInputItemBackdrop = AttachmentInputItemBackdrop;
|
|
132
|
+
exports.AttachmentInputItemBadge = AttachmentInputItemBadge;
|
|
133
|
+
exports.AttachmentInputItemImage = AttachmentInputItemImage;
|
|
134
|
+
exports.AttachmentInputItemMetadata = AttachmentInputItemMetadata;
|
|
135
|
+
exports.AttachmentInputItemName = AttachmentInputItemName;
|
|
136
|
+
exports.AttachmentInputItemRemoveButton = AttachmentInputItemRemoveButton;
|
|
137
|
+
exports.AttachmentInputItemSize = AttachmentInputItemSize;
|
|
138
|
+
exports.AttachmentInputItemThumbnail = AttachmentInputItemThumbnail;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AttachmentInputItemVariantProps } from '@seed-design/css/recipes/attachment-input-item';
|
|
2
|
+
import { FileUpload as FileUploadPrimitive, FileEntry } from '@seed-design/react-file-upload';
|
|
3
|
+
import { PrimitiveProps } from '@seed-design/react-primitive';
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
export interface AttachmentInputItemProps extends AttachmentInputItemVariantProps, PrimitiveProps, React.LiHTMLAttributes<HTMLLIElement> {
|
|
6
|
+
fileEntry: FileEntry;
|
|
7
|
+
}
|
|
8
|
+
export declare const AttachmentInputItem: React.ForwardRefExoticComponent<AttachmentInputItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
9
|
+
export interface AttachmentInputItemNameProps extends PrimitiveProps, FileUploadPrimitive.ItemNameProps {
|
|
10
|
+
}
|
|
11
|
+
export declare const AttachmentInputItemName: React.ForwardRefExoticComponent<AttachmentInputItemNameProps & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
export interface AttachmentInputItemSizeProps extends FileUploadPrimitive.ItemSizeProps {
|
|
13
|
+
}
|
|
14
|
+
export declare const AttachmentInputItemSize: React.ForwardRefExoticComponent<AttachmentInputItemSizeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
export interface AttachmentInputItemRemoveButtonProps extends FileUploadPrimitive.ItemRemoveButtonProps {
|
|
16
|
+
}
|
|
17
|
+
export declare const AttachmentInputItemRemoveButton: React.ForwardRefExoticComponent<AttachmentInputItemRemoveButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export interface AttachmentInputItemImageProps extends FileUploadPrimitive.ItemImageProps {
|
|
19
|
+
}
|
|
20
|
+
export declare const AttachmentInputItemImage: React.ForwardRefExoticComponent<AttachmentInputItemImageProps & React.RefAttributes<HTMLImageElement>>;
|
|
21
|
+
export interface AttachmentInputItemThumbnailProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
}
|
|
23
|
+
export declare const AttachmentInputItemThumbnail: React.ForwardRefExoticComponent<AttachmentInputItemThumbnailProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export interface AttachmentInputItemBadgeProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
25
|
+
}
|
|
26
|
+
export declare const AttachmentInputItemBadge: React.ForwardRefExoticComponent<AttachmentInputItemBadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export interface AttachmentInputItemActionButtonProps extends PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
28
|
+
}
|
|
29
|
+
export declare const AttachmentInputItemActionButton: React.ForwardRefExoticComponent<AttachmentInputItemActionButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
export interface AttachmentInputItemBackdropProps extends FileUploadPrimitive.ItemBackdropProps {
|
|
31
|
+
}
|
|
32
|
+
export declare const AttachmentInputItemBackdrop: React.ForwardRefExoticComponent<AttachmentInputItemBackdropProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
export interface AttachmentInputItemMetadataProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
34
|
+
}
|
|
35
|
+
export declare const AttachmentInputItemMetadata: React.ForwardRefExoticComponent<AttachmentInputItemMetadataProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
//# sourceMappingURL=AttachmentInputItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentInputItem.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentInput/AttachmentInputItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,gDAAgD,CAAC;AAGxD,OAAO,EACL,UAAU,IAAI,mBAAmB,EAKjC,KAAK,SAAS,EAEf,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAU9E,MAAM,WAAW,wBACf,SAAQ,+BAA+B,EACrC,cAAc,EACd,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACvC,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,gGA2B/B,CAAC;AAKF,MAAM,WAAW,4BACf,SAAQ,cAAc,EACpB,mBAAmB,CAAC,aAAa;CAAG;AAExC,eAAO,MAAM,uBAAuB,sGAiBlC,CAAC;AAKH,MAAM,WAAW,4BAA6B,SAAQ,mBAAmB,CAAC,aAAa;CAAG;AAE1F,eAAO,MAAM,uBAAuB,sGAalC,CAAC;AAKH,MAAM,WAAW,oCACf,SAAQ,mBAAmB,CAAC,qBAAqB;CAAG;AAEtD,eAAO,MAAM,+BAA+B,gHAGW,CAAC;AAExD,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB,CAAC,cAAc;CAAG;AAE5F,eAAO,MAAM,wBAAwB,wGAGI,CAAC;AAE1C,MAAM,WAAW,iCACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAG3C,eAAO,MAAM,4BAA4B,0GAiBvC,CAAC;AAMH,MAAM,WAAW,6BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,wBAAwB,sGAWnC,CAAC;AAKH,MAAM,WAAW,oCACf,SAAQ,cAAc,EACpB,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD,eAAO,MAAM,+BAA+B,gHAc1C,CAAC;AAKH,MAAM,WAAW,gCAAiC,SAAQ,mBAAmB,CAAC,iBAAiB;CAAG;AAElG,eAAO,MAAM,2BAA2B,yGActC,CAAC;AAMH,MAAM,WAAW,gCACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,2BAA2B,yGAiBtC,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext.js";
|
|
4
|
+
import { createRenderTrackingContext } from "../../utils/createRenderTrackingContext.js";
|
|
5
|
+
import { FileUpload, FileUploadItemProvider, splitFileName, useFileUploadContext, useFileUploadItem, useFileUploadItemContext } from "@seed-design/react-file-upload";
|
|
6
|
+
import { MiddleTruncate } from "@seed-design/react-middle-truncate";
|
|
7
|
+
import { Primitive } from "@seed-design/react-primitive";
|
|
8
|
+
import clsx$1 from "clsx";
|
|
9
|
+
import * as React$1 from "react";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
import { dataAttr } from "@seed-design/dom-utils";
|
|
12
|
+
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
13
|
+
import { attachmentInputItem } from "@seed-design/css/recipes/attachment-input-item";
|
|
14
|
+
//#region src/components/AttachmentInput/AttachmentInputItem.tsx
|
|
15
|
+
var { useClassNames, ClassNamesProvider, withContext } = createSlotRecipeContext(attachmentInputItem);
|
|
16
|
+
var overlayTracker = createRenderTrackingContext("AttachmentInputItemOverlay");
|
|
17
|
+
var AttachmentInputItem = React$1.forwardRef(({ className, fileEntry, ...props }, ref) => {
|
|
18
|
+
const { acceptType, stateProps } = useFileUploadContext();
|
|
19
|
+
const api = useFileUploadItem(fileEntry);
|
|
20
|
+
const [variantProps, otherProps] = attachmentInputItem.splitVariantProps({
|
|
21
|
+
type: acceptType,
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
const classNames = attachmentInputItem(variantProps);
|
|
25
|
+
return /* @__PURE__ */ jsx(ClassNamesProvider, {
|
|
26
|
+
value: classNames,
|
|
27
|
+
children: /* @__PURE__ */ jsx(FileUploadItemProvider, {
|
|
28
|
+
value: api,
|
|
29
|
+
children: /* @__PURE__ */ jsx(overlayTracker.Provider, { children: /* @__PURE__ */ jsx(Primitive.li, {
|
|
30
|
+
ref,
|
|
31
|
+
className: clsx$1(classNames.root, className),
|
|
32
|
+
...stateProps,
|
|
33
|
+
...otherProps
|
|
34
|
+
}) })
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
AttachmentInputItem.displayName = "AttachmentInputItem";
|
|
39
|
+
var AttachmentInputItemName = React$1.forwardRef(({ className, children, ...props }, ref) => {
|
|
40
|
+
const classNames = useClassNames();
|
|
41
|
+
const { file } = useFileUploadItemContext();
|
|
42
|
+
const { extension } = splitFileName(file.name);
|
|
43
|
+
return /* @__PURE__ */ jsx(FileUpload.ItemName, {
|
|
44
|
+
ref,
|
|
45
|
+
className: clsx$1(classNames.name, className),
|
|
46
|
+
...props,
|
|
47
|
+
children: children ?? /* @__PURE__ */ jsx(MiddleTruncate, {
|
|
48
|
+
maxLines: 2,
|
|
49
|
+
end: extension.length,
|
|
50
|
+
children: file.name
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
AttachmentInputItemName.displayName = "AttachmentInputItemName";
|
|
55
|
+
var AttachmentInputItemSize = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
56
|
+
const classNames = useClassNames();
|
|
57
|
+
return /* @__PURE__ */ jsx(FileUpload.ItemSize, {
|
|
58
|
+
ref,
|
|
59
|
+
className: clsx$1(classNames.size, className),
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
AttachmentInputItemSize.displayName = "AttachmentInputItemSize";
|
|
64
|
+
var AttachmentInputItemRemoveButton = withContext(FileUpload.ItemRemoveButton, "removeButton");
|
|
65
|
+
var AttachmentInputItemImage = withContext(FileUpload.ItemImage, "image");
|
|
66
|
+
var AttachmentInputItemThumbnail = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
67
|
+
const classNames = useClassNames();
|
|
68
|
+
const { stateProps } = useFileUploadContext();
|
|
69
|
+
const { isRendered } = overlayTracker.useRenderTracking();
|
|
70
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
71
|
+
ref,
|
|
72
|
+
"data-has-overlay": dataAttr(isRendered),
|
|
73
|
+
...stateProps,
|
|
74
|
+
className: clsx$1(classNames.thumbnail, className),
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
AttachmentInputItemThumbnail.displayName = "AttachmentInputItemThumbnail";
|
|
79
|
+
var AttachmentInputItemBadge = React$1.forwardRef(({ className, children, ...props }, ref) => {
|
|
80
|
+
const classNames = useClassNames();
|
|
81
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
82
|
+
ref,
|
|
83
|
+
className: clsx$1(classNames.badge, className),
|
|
84
|
+
...props,
|
|
85
|
+
children: /* @__PURE__ */ jsx(Primitive.span, {
|
|
86
|
+
className: classNames.badgeLabel,
|
|
87
|
+
children
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
AttachmentInputItemBadge.displayName = "AttachmentInputItemBadge";
|
|
92
|
+
var AttachmentInputItemActionButton = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
93
|
+
const classNames = useClassNames();
|
|
94
|
+
return /* @__PURE__ */ jsx(Primitive.button, {
|
|
95
|
+
type: "button",
|
|
96
|
+
ref,
|
|
97
|
+
className: clsx$1(classNames.actionButton, className),
|
|
98
|
+
...props
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
AttachmentInputItemActionButton.displayName = "AttachmentInputItemActionButton";
|
|
102
|
+
var AttachmentInputItemBackdrop = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
103
|
+
const classNames = useClassNames();
|
|
104
|
+
const { trackRef } = overlayTracker.useRenderTracking();
|
|
105
|
+
return /* @__PURE__ */ jsx(FileUpload.ItemBackdrop, {
|
|
106
|
+
ref: composeRefs(ref, trackRef),
|
|
107
|
+
className: clsx$1(classNames.backdrop, className),
|
|
108
|
+
...props
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
AttachmentInputItemBackdrop.displayName = "AttachmentInputItemBackdrop";
|
|
112
|
+
var AttachmentInputItemMetadata = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
113
|
+
const classNames = useClassNames();
|
|
114
|
+
const { stateProps } = useFileUploadContext();
|
|
115
|
+
const { isRendered } = overlayTracker.useRenderTracking();
|
|
116
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
117
|
+
ref,
|
|
118
|
+
"data-has-overlay": dataAttr(isRendered),
|
|
119
|
+
...stateProps,
|
|
120
|
+
className: clsx$1(classNames.metadata, className),
|
|
121
|
+
...props
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
AttachmentInputItemMetadata.displayName = "AttachmentInputItemMetadata";
|
|
125
|
+
//#endregion
|
|
126
|
+
export { AttachmentInputItem, AttachmentInputItemActionButton, AttachmentInputItemBackdrop, AttachmentInputItemBadge, AttachmentInputItemImage, AttachmentInputItemMetadata, AttachmentInputItemName, AttachmentInputItemRemoveButton, AttachmentInputItemSize, AttachmentInputItemThumbnail };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_createSlotRecipeContext = require("../../utils/createSlotRecipeContext.cjs");
|
|
5
|
+
const require_Icon = require("../private/Icon.cjs");
|
|
6
|
+
let _seed_design_react_file_upload = require("@seed-design/react-file-upload");
|
|
7
|
+
let _seed_design_react_primitive = require("@seed-design/react-primitive");
|
|
8
|
+
let clsx = require("clsx");
|
|
9
|
+
clsx = require_runtime.__toESM(clsx);
|
|
10
|
+
let react = require("react");
|
|
11
|
+
react = require_runtime.__toESM(react);
|
|
12
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
+
let _seed_design_dom_utils = require("@seed-design/dom-utils");
|
|
14
|
+
let _seed_design_css_recipes_attachment_input_trigger = require("@seed-design/css/recipes/attachment-input-trigger");
|
|
15
|
+
//#region src/components/AttachmentInput/AttachmentInputTrigger.tsx
|
|
16
|
+
var { withProvider, useClassNames } = require_createSlotRecipeContext.createSlotRecipeContext(_seed_design_css_recipes_attachment_input_trigger.attachmentInputTrigger);
|
|
17
|
+
var AttachmentInputTrigger = withProvider(_seed_design_react_file_upload.FileUpload.Trigger, "root");
|
|
18
|
+
var AttachmentInputTriggerIcon = react.forwardRef(({ image, general, ...props }, ref) => {
|
|
19
|
+
const { acceptType, stateProps } = (0, _seed_design_react_file_upload.useFileUploadContext)();
|
|
20
|
+
const mergedProps = (0, _seed_design_dom_utils.mergeProps)(stateProps, { className: useClassNames().icon }, props);
|
|
21
|
+
if (acceptType === "image" && image) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.InternalIcon, {
|
|
22
|
+
svg: image,
|
|
23
|
+
ref,
|
|
24
|
+
...mergedProps
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.InternalIcon, {
|
|
27
|
+
svg: general,
|
|
28
|
+
ref,
|
|
29
|
+
...mergedProps
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
var AttachmentInputTriggerItemCount = react.forwardRef(({ className, ...otherProps }, ref) => {
|
|
33
|
+
const classNames = useClassNames();
|
|
34
|
+
const { currentFileEntryCount, maxFiles, stateProps } = (0, _seed_design_react_file_upload.useFileUploadContext)();
|
|
35
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_seed_design_react_primitive.Primitive.div, {
|
|
36
|
+
className: (0, clsx.default)(classNames.itemCountArea, className),
|
|
37
|
+
ref,
|
|
38
|
+
...otherProps,
|
|
39
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
40
|
+
...currentFileEntryCount === 0 && { "data-empty": true },
|
|
41
|
+
className: classNames.itemCount,
|
|
42
|
+
...stateProps,
|
|
43
|
+
children: currentFileEntryCount
|
|
44
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
45
|
+
className: classNames.maxItemCount,
|
|
46
|
+
...stateProps,
|
|
47
|
+
children: ["/", maxFiles]
|
|
48
|
+
})]
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
//#endregion
|
|
52
|
+
exports.AttachmentInputTrigger = AttachmentInputTrigger;
|
|
53
|
+
exports.AttachmentInputTriggerIcon = AttachmentInputTriggerIcon;
|
|
54
|
+
exports.AttachmentInputTriggerItemCount = AttachmentInputTriggerItemCount;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AttachmentInputTriggerVariantProps } from '@seed-design/css/recipes/attachment-input-trigger';
|
|
2
|
+
import { FileAcceptType } from '@seed-design/react-file-upload';
|
|
3
|
+
import { PrimitiveProps } from '@seed-design/react-primitive';
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
export interface AttachmentInputTriggerProps extends AttachmentInputTriggerVariantProps, PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
}
|
|
7
|
+
export declare const AttachmentInputTrigger: React.ForwardRefExoticComponent<AttachmentInputTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
export type AttachmentInputTriggerIconProps = React.SVGAttributes<SVGElement> & {
|
|
9
|
+
[K in NonNullable<FileAcceptType>]?: React.ReactNode;
|
|
10
|
+
} & {
|
|
11
|
+
general: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare const AttachmentInputTriggerIcon: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
|
|
14
|
+
image?: React.ReactNode;
|
|
15
|
+
} & {
|
|
16
|
+
general: React.ReactNode;
|
|
17
|
+
} & React.RefAttributes<SVGSVGElement>>;
|
|
18
|
+
export interface AttachmentInputTriggerItemCountProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
}
|
|
20
|
+
export declare const AttachmentInputTriggerItemCount: React.ForwardRefExoticComponent<AttachmentInputTriggerItemCountProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
//# sourceMappingURL=AttachmentInputTrigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentInputTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentInput/AttachmentInputTrigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQ9E,MAAM,WAAW,2BACf,SAAQ,kCAAkC,EACxC,cAAc,EACd,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD,eAAO,MAAM,sBAAsB,uGAGlC,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG;KAC7E,CAAC,IAAI,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS;CACrD,GAAG;IACF,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;aAH5B,KAAK,CAAC,SAAS;uCAuBxB,CAAC;AAEH,MAAM,WAAW,oCACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,+BAA+B,6GAqB1C,CAAC"}
|