@seed-design/react 0.0.1-alpha-20250210081704
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/README.md +7 -0
- package/lib/components/ActionButton/ActionButton.d.ts +24 -0
- package/lib/components/ActionButton/ActionButton.d.ts.map +1 -0
- package/lib/components/ActionButton/ActionButton.namespace.d.ts +2 -0
- package/lib/components/ActionButton/ActionButton.namespace.d.ts.map +1 -0
- package/lib/components/ActionButton/index.d.ts +3 -0
- package/lib/components/ActionButton/index.d.ts.map +1 -0
- package/lib/components/ActionChip/ActionChip.d.ts +23 -0
- package/lib/components/ActionChip/ActionChip.d.ts.map +1 -0
- package/lib/components/ActionChip/ActionChip.namespace.d.ts +2 -0
- package/lib/components/ActionChip/ActionChip.namespace.d.ts.map +1 -0
- package/lib/components/ActionChip/index.d.ts +3 -0
- package/lib/components/ActionChip/index.d.ts.map +1 -0
- package/lib/components/ActionSheet/ActionSheet.d.ts +47 -0
- package/lib/components/ActionSheet/ActionSheet.d.ts.map +1 -0
- package/lib/components/ActionSheet/ActionSheet.namespace.d.ts +2 -0
- package/lib/components/ActionSheet/ActionSheet.namespace.d.ts.map +1 -0
- package/lib/components/ActionSheet/index.d.ts +3 -0
- package/lib/components/ActionSheet/index.d.ts.map +1 -0
- package/lib/components/Avatar/Avatar.d.ts +21 -0
- package/lib/components/Avatar/Avatar.d.ts.map +1 -0
- package/lib/components/Avatar/Avatar.namespace.d.ts +2 -0
- package/lib/components/Avatar/Avatar.namespace.d.ts.map +1 -0
- package/lib/components/Avatar/index.d.ts +3 -0
- package/lib/components/Avatar/index.d.ts.map +1 -0
- package/lib/components/Badge/Badge.d.ts +10 -0
- package/lib/components/Badge/Badge.d.ts.map +1 -0
- package/lib/components/Badge/Badge.namespace.d.ts +2 -0
- package/lib/components/Badge/Badge.namespace.d.ts.map +1 -0
- package/lib/components/Badge/index.d.ts +3 -0
- package/lib/components/Badge/index.d.ts.map +1 -0
- package/lib/components/BottomSheet/BottomSheet.d.ts +42 -0
- package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/lib/components/BottomSheet/BottomSheet.namespace.d.ts +2 -0
- package/lib/components/BottomSheet/BottomSheet.namespace.d.ts.map +1 -0
- package/lib/components/BottomSheet/index.d.ts +3 -0
- package/lib/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/components/Box/Box.d.ts +50 -0
- package/lib/components/Box/Box.d.ts.map +1 -0
- package/lib/components/Box/index.d.ts +2 -0
- package/lib/components/Box/index.d.ts.map +1 -0
- package/lib/components/Callout/Callout.d.ts +33 -0
- package/lib/components/Callout/Callout.d.ts.map +1 -0
- package/lib/components/Callout/Callout.namespace.d.ts +2 -0
- package/lib/components/Callout/Callout.namespace.d.ts.map +1 -0
- package/lib/components/Callout/index.d.ts +3 -0
- package/lib/components/Callout/index.d.ts.map +1 -0
- package/lib/components/Celcius/Celcius.d.ts +6 -0
- package/lib/components/Celcius/Celcius.d.ts.map +1 -0
- package/lib/components/Celcius/index.d.ts +2 -0
- package/lib/components/Celcius/index.d.ts.map +1 -0
- package/lib/components/Checkbox/Checkbox.d.ts +31 -0
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/lib/components/Checkbox/Checkbox.namespace.d.ts +2 -0
- package/lib/components/Checkbox/Checkbox.namespace.d.ts.map +1 -0
- package/lib/components/Checkbox/index.d.ts +3 -0
- package/lib/components/Checkbox/index.d.ts.map +1 -0
- package/lib/components/ChipTabs/ChipTabs.d.ts +26 -0
- package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -0
- package/lib/components/ChipTabs/ChipTabs.namespace.d.ts +2 -0
- package/lib/components/ChipTabs/ChipTabs.namespace.d.ts.map +1 -0
- package/lib/components/ChipTabs/index.d.ts +3 -0
- package/lib/components/ChipTabs/index.d.ts.map +1 -0
- package/lib/components/Columns/Columns.d.ts +10 -0
- package/lib/components/Columns/Columns.d.ts.map +1 -0
- package/lib/components/Columns/index.d.ts +2 -0
- package/lib/components/Columns/index.d.ts.map +1 -0
- package/lib/components/ControlChip/ControlChip.d.ts +25 -0
- package/lib/components/ControlChip/ControlChip.d.ts.map +1 -0
- package/lib/components/ControlChip/ControlChip.namespace.d.ts +2 -0
- package/lib/components/ControlChip/ControlChip.namespace.d.ts.map +1 -0
- package/lib/components/ControlChip/index.d.ts +3 -0
- package/lib/components/ControlChip/index.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.d.ts +34 -0
- package/lib/components/Dialog/Dialog.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.namespace.d.ts +2 -0
- package/lib/components/Dialog/Dialog.namespace.d.ts.map +1 -0
- package/lib/components/Dialog/index.d.ts +3 -0
- package/lib/components/Dialog/index.d.ts.map +1 -0
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts +54 -0
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.d.ts.map +1 -0
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.d.ts +2 -0
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.d.ts.map +1 -0
- package/lib/components/ExtendedActionSheet/index.d.ts +3 -0
- package/lib/components/ExtendedActionSheet/index.d.ts.map +1 -0
- package/lib/components/ExtendedFab/ExtendedFab.d.ts +13 -0
- package/lib/components/ExtendedFab/ExtendedFab.d.ts.map +1 -0
- package/lib/components/ExtendedFab/ExtendedFab.namespace.d.ts +2 -0
- package/lib/components/ExtendedFab/ExtendedFab.namespace.d.ts.map +1 -0
- package/lib/components/ExtendedFab/index.d.ts +3 -0
- package/lib/components/ExtendedFab/index.d.ts.map +1 -0
- package/lib/components/Fab/Fab.d.ts +11 -0
- package/lib/components/Fab/Fab.d.ts.map +1 -0
- package/lib/components/Fab/Fab.namespace.d.ts +2 -0
- package/lib/components/Fab/Fab.namespace.d.ts.map +1 -0
- package/lib/components/Fab/index.d.ts +3 -0
- package/lib/components/Fab/index.d.ts.map +1 -0
- package/lib/components/Flex/Flex.d.ts +12 -0
- package/lib/components/Flex/Flex.d.ts.map +1 -0
- package/lib/components/Flex/index.d.ts +2 -0
- package/lib/components/Flex/index.d.ts.map +1 -0
- package/lib/components/HelpBubble/HelpBubble.d.ts +47 -0
- package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -0
- package/lib/components/HelpBubble/HelpBubble.namespace.d.ts +2 -0
- package/lib/components/HelpBubble/HelpBubble.namespace.d.ts.map +1 -0
- package/lib/components/HelpBubble/index.d.ts +3 -0
- package/lib/components/HelpBubble/index.d.ts.map +1 -0
- package/lib/components/Inline/Inline.d.ts +6 -0
- package/lib/components/Inline/Inline.d.ts.map +1 -0
- package/lib/components/Inline/index.d.ts +2 -0
- package/lib/components/Inline/index.d.ts.map +1 -0
- package/lib/components/InlineBanner/InlineBanner.d.ts +36 -0
- package/lib/components/InlineBanner/InlineBanner.d.ts.map +1 -0
- package/lib/components/InlineBanner/InlineBanner.namespace.d.ts +2 -0
- package/lib/components/InlineBanner/InlineBanner.namespace.d.ts.map +1 -0
- package/lib/components/InlineBanner/index.d.ts +3 -0
- package/lib/components/InlineBanner/index.d.ts.map +1 -0
- package/lib/components/MannerTempBadge/MannerTempBadge.d.ts +10 -0
- package/lib/components/MannerTempBadge/MannerTempBadge.d.ts.map +1 -0
- package/lib/components/MannerTempBadge/MannerTempBadge.namespace.d.ts +2 -0
- package/lib/components/MannerTempBadge/MannerTempBadge.namespace.d.ts.map +1 -0
- package/lib/components/MannerTempBadge/index.d.ts +3 -0
- package/lib/components/MannerTempBadge/index.d.ts.map +1 -0
- package/lib/components/ProgressCircle/ProgressCircle.d.ts +12 -0
- package/lib/components/ProgressCircle/ProgressCircle.d.ts.map +1 -0
- package/lib/components/ProgressCircle/ProgressCircle.namespace.d.ts +2 -0
- package/lib/components/ProgressCircle/ProgressCircle.namespace.d.ts.map +1 -0
- package/lib/components/ProgressCircle/index.d.ts +3 -0
- package/lib/components/ProgressCircle/index.d.ts.map +1 -0
- package/lib/components/PullToRefresh/PullToRefresh.d.ts +12 -0
- package/lib/components/PullToRefresh/PullToRefresh.d.ts.map +1 -0
- package/lib/components/PullToRefresh/PullToRefresh.namespace.d.ts +2 -0
- package/lib/components/PullToRefresh/PullToRefresh.namespace.d.ts.map +1 -0
- package/lib/components/PullToRefresh/index.d.ts +3 -0
- package/lib/components/PullToRefresh/index.d.ts.map +1 -0
- package/lib/components/ReactionButton/ReactionButton.d.ts +22 -0
- package/lib/components/ReactionButton/ReactionButton.d.ts.map +1 -0
- package/lib/components/ReactionButton/ReactionButton.namespace.d.ts +2 -0
- package/lib/components/ReactionButton/ReactionButton.namespace.d.ts.map +1 -0
- package/lib/components/ReactionButton/index.d.ts +3 -0
- package/lib/components/ReactionButton/index.d.ts.map +1 -0
- package/lib/components/SegmentedControl/SegmentedControl.d.ts +19 -0
- package/lib/components/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/lib/components/SegmentedControl/SegmentedControl.namespace.d.ts +2 -0
- package/lib/components/SegmentedControl/SegmentedControl.namespace.d.ts.map +1 -0
- package/lib/components/SegmentedControl/index.d.ts +3 -0
- package/lib/components/SegmentedControl/index.d.ts.map +1 -0
- package/lib/components/SelectBox/CheckSelectBox.d.ts +32 -0
- package/lib/components/SelectBox/CheckSelectBox.d.ts.map +1 -0
- package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts +2 -0
- package/lib/components/SelectBox/CheckSelectBox.namespace.d.ts.map +1 -0
- package/lib/components/SelectBox/RadioSelectBox.d.ts +28 -0
- package/lib/components/SelectBox/RadioSelectBox.d.ts.map +1 -0
- package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts +2 -0
- package/lib/components/SelectBox/RadioSelectBox.namespace.d.ts.map +1 -0
- package/lib/components/SelectBox/index.d.ts +5 -0
- package/lib/components/SelectBox/index.d.ts.map +1 -0
- package/lib/components/Skeleton/Skeleton.d.ts +7 -0
- package/lib/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/lib/components/Skeleton/index.d.ts +2 -0
- package/lib/components/Skeleton/index.d.ts.map +1 -0
- package/lib/components/Snackbar/Snackbar.d.ts +35 -0
- package/lib/components/Snackbar/Snackbar.d.ts.map +1 -0
- package/lib/components/Snackbar/Snackbar.namespace.d.ts +2 -0
- package/lib/components/Snackbar/Snackbar.namespace.d.ts.map +1 -0
- package/lib/components/Snackbar/index.d.ts +5 -0
- package/lib/components/Snackbar/index.d.ts.map +1 -0
- package/lib/components/Snackbar/useSnackbarAdapter.d.ts +11 -0
- package/lib/components/Snackbar/useSnackbarAdapter.d.ts.map +1 -0
- package/lib/components/Stack/Stack.d.ts +6 -0
- package/lib/components/Stack/Stack.d.ts.map +1 -0
- package/lib/components/Stack/index.d.ts +2 -0
- package/lib/components/Stack/index.d.ts.map +1 -0
- package/lib/components/Switch/Switch.d.ts +19 -0
- package/lib/components/Switch/Switch.d.ts.map +1 -0
- package/lib/components/Switch/Switch.namespace.d.ts +2 -0
- package/lib/components/Switch/Switch.namespace.d.ts.map +1 -0
- package/lib/components/Switch/index.d.ts +3 -0
- package/lib/components/Switch/index.d.ts.map +1 -0
- package/lib/components/Tabs/Tabs.d.ts +32 -0
- package/lib/components/Tabs/Tabs.d.ts.map +1 -0
- package/lib/components/Tabs/Tabs.namespace.d.ts +2 -0
- package/lib/components/Tabs/Tabs.namespace.d.ts.map +1 -0
- package/lib/components/Tabs/index.d.ts +3 -0
- package/lib/components/Tabs/index.d.ts.map +1 -0
- package/lib/components/Text/Text.d.ts +36 -0
- package/lib/components/Text/Text.d.ts.map +1 -0
- package/lib/components/Text/index.d.ts +2 -0
- package/lib/components/Text/index.d.ts.map +1 -0
- package/lib/components/TextButton/TextButton.d.ts +17 -0
- package/lib/components/TextButton/TextButton.d.ts.map +1 -0
- package/lib/components/TextButton/TextButton.namespace.d.ts +2 -0
- package/lib/components/TextButton/TextButton.namespace.d.ts.map +1 -0
- package/lib/components/TextButton/index.d.ts +3 -0
- package/lib/components/TextButton/index.d.ts.map +1 -0
- package/lib/components/TextField/TextField.d.ts +65 -0
- package/lib/components/TextField/TextField.d.ts.map +1 -0
- package/lib/components/TextField/TextField.namespace.d.ts +2 -0
- package/lib/components/TextField/TextField.namespace.d.ts.map +1 -0
- package/lib/components/TextField/index.d.ts +3 -0
- package/lib/components/TextField/index.d.ts.map +1 -0
- package/lib/components/ToggleButton/ToggleButton.d.ts +22 -0
- package/lib/components/ToggleButton/ToggleButton.d.ts.map +1 -0
- package/lib/components/ToggleButton/ToggleButton.namespace.d.ts +2 -0
- package/lib/components/ToggleButton/ToggleButton.namespace.d.ts.map +1 -0
- package/lib/components/ToggleButton/index.d.ts +3 -0
- package/lib/components/ToggleButton/index.d.ts.map +1 -0
- package/lib/components/VisuallyHidden/VisuallyHidden.d.ts +6 -0
- package/lib/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/lib/components/VisuallyHidden/index.d.ts +2 -0
- package/lib/components/VisuallyHidden/index.d.ts.map +1 -0
- package/lib/components/index.d.ts +38 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/private/Icon.d.ts +5 -0
- package/lib/components/private/Icon.d.ts.map +1 -0
- package/lib/components/private/useDismissible.d.ts +1665 -0
- package/lib/components/private/useDismissible.d.ts.map +1 -0
- package/lib/components/private/usePendingButton.d.ts +831 -0
- package/lib/components/private/usePendingButton.d.ts.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2309 -0
- package/lib/index.js.map +7 -0
- package/lib/index.mjs +2318 -0
- package/lib/index.mjs.map +7 -0
- package/lib/primitive.d.ts +12 -0
- package/lib/primitive.d.ts.map +1 -0
- package/lib/primitive.js +31 -0
- package/lib/primitive.js.map +7 -0
- package/lib/primitive.mjs +13 -0
- package/lib/primitive.mjs.map +7 -0
- package/lib/utils/createStyleContext.d.ts +24 -0
- package/lib/utils/createStyleContext.d.ts.map +1 -0
- package/lib/utils/createWithStateProps.d.ts +10 -0
- package/lib/utils/createWithStateProps.d.ts.map +1 -0
- package/lib/vars.d.ts +2 -0
- package/lib/vars.d.ts.map +1 -0
- package/lib/vars.js +21 -0
- package/lib/vars.js.map +7 -0
- package/lib/vars.mjs +3 -0
- package/lib/vars.mjs.map +7 -0
- package/package.json +80 -0
- package/src/components/ActionButton/ActionButton.namespace.ts +14 -0
- package/src/components/ActionButton/ActionButton.tsx +98 -0
- package/src/components/ActionButton/index.ts +16 -0
- package/src/components/ActionChip/ActionChip.namespace.ts +14 -0
- package/src/components/ActionChip/ActionChip.tsx +54 -0
- package/src/components/ActionChip/index.ts +16 -0
- package/src/components/ActionSheet/ActionSheet.namespace.ts +28 -0
- package/src/components/ActionSheet/ActionSheet.tsx +150 -0
- package/src/components/ActionSheet/index.ts +30 -0
- package/src/components/Avatar/Avatar.namespace.ts +12 -0
- package/src/components/Avatar/Avatar.tsx +69 -0
- package/src/components/Avatar/index.ts +14 -0
- package/src/components/Badge/Badge.namespace.ts +6 -0
- package/src/components/Badge/Badge.tsx +21 -0
- package/src/components/Badge/index.ts +8 -0
- package/src/components/BottomSheet/BottomSheet.namespace.ts +26 -0
- package/src/components/BottomSheet/BottomSheet.tsx +123 -0
- package/src/components/BottomSheet/index.ts +28 -0
- package/src/components/Box/Box.tsx +303 -0
- package/src/components/Box/index.ts +1 -0
- package/src/components/Callout/Callout.namespace.ts +20 -0
- package/src/components/Callout/Callout.tsx +101 -0
- package/src/components/Callout/index.ts +22 -0
- package/src/components/Celcius/Celcius.tsx +9 -0
- package/src/components/Celcius/index.ts +4 -0
- package/src/components/Checkbox/Checkbox.namespace.ts +12 -0
- package/src/components/Checkbox/Checkbox.tsx +96 -0
- package/src/components/Checkbox/index.ts +14 -0
- package/src/components/ChipTabs/ChipTabs.namespace.ts +16 -0
- package/src/components/ChipTabs/ChipTabs.tsx +80 -0
- package/src/components/ChipTabs/index.ts +18 -0
- package/src/components/Columns/Columns.tsx +38 -0
- package/src/components/Columns/index.ts +1 -0
- package/src/components/ControlChip/ControlChip.namespace.ts +15 -0
- package/src/components/ControlChip/ControlChip.tsx +63 -0
- package/src/components/ControlChip/index.ts +17 -0
- package/src/components/Dialog/Dialog.namespace.ts +22 -0
- package/src/components/Dialog/Dialog.tsx +94 -0
- package/src/components/Dialog/index.ts +24 -0
- package/src/components/ExtendedActionSheet/ExtendedActionSheet.namespace.ts +32 -0
- package/src/components/ExtendedActionSheet/ExtendedActionSheet.tsx +181 -0
- package/src/components/ExtendedActionSheet/index.ts +34 -0
- package/src/components/ExtendedFab/ExtendedFab.namespace.ts +8 -0
- package/src/components/ExtendedFab/ExtendedFab.tsx +44 -0
- package/src/components/ExtendedFab/index.ts +10 -0
- package/src/components/Fab/Fab.namespace.ts +6 -0
- package/src/components/Fab/Fab.tsx +22 -0
- package/src/components/Fab/index.ts +8 -0
- package/src/components/Flex/Flex.tsx +19 -0
- package/src/components/Flex/index.ts +1 -0
- package/src/components/HelpBubble/HelpBubble.namespace.ts +25 -0
- package/src/components/HelpBubble/HelpBubble.tsx +158 -0
- package/src/components/HelpBubble/index.ts +28 -0
- package/src/components/Inline/Inline.tsx +18 -0
- package/src/components/Inline/index.ts +1 -0
- package/src/components/InlineBanner/InlineBanner.namespace.ts +22 -0
- package/src/components/InlineBanner/InlineBanner.tsx +105 -0
- package/src/components/InlineBanner/index.ts +24 -0
- package/src/components/MannerTempBadge/MannerTempBadge.namespace.ts +6 -0
- package/src/components/MannerTempBadge/MannerTempBadge.tsx +32 -0
- package/src/components/MannerTempBadge/index.ts +8 -0
- package/src/components/ProgressCircle/ProgressCircle.namespace.ts +8 -0
- package/src/components/ProgressCircle/ProgressCircle.tsx +31 -0
- package/src/components/ProgressCircle/index.ts +10 -0
- package/src/components/PullToRefresh/PullToRefresh.namespace.ts +8 -0
- package/src/components/PullToRefresh/PullToRefresh.tsx +25 -0
- package/src/components/PullToRefresh/index.ts +10 -0
- package/src/components/ReactionButton/ReactionButton.namespace.ts +12 -0
- package/src/components/ReactionButton/ReactionButton.tsx +80 -0
- package/src/components/ReactionButton/index.ts +14 -0
- package/src/components/SegmentedControl/SegmentedControl.namespace.ts +12 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +53 -0
- package/src/components/SegmentedControl/index.ts +14 -0
- package/src/components/SelectBox/CheckSelectBox.namespace.ts +18 -0
- package/src/components/SelectBox/CheckSelectBox.tsx +79 -0
- package/src/components/SelectBox/RadioSelectBox.namespace.ts +18 -0
- package/src/components/SelectBox/RadioSelectBox.tsx +73 -0
- package/src/components/SelectBox/index.ts +40 -0
- package/src/components/Skeleton/Skeleton.tsx +13 -0
- package/src/components/Skeleton/index.ts +1 -0
- package/src/components/Snackbar/Snackbar.namespace.ts +20 -0
- package/src/components/Snackbar/Snackbar.tsx +100 -0
- package/src/components/Snackbar/index.ts +32 -0
- package/src/components/Snackbar/useSnackbarAdapter.ts +28 -0
- package/src/components/Stack/Stack.tsx +8 -0
- package/src/components/Stack/index.ts +1 -0
- package/src/components/Switch/Switch.namespace.ts +12 -0
- package/src/components/Switch/Switch.tsx +50 -0
- package/src/components/Switch/index.ts +14 -0
- package/src/components/Tabs/Tabs.namespace.ts +20 -0
- package/src/components/Tabs/Tabs.tsx +94 -0
- package/src/components/Tabs/index.ts +22 -0
- package/src/components/Text/Text.tsx +139 -0
- package/src/components/Text/index.tsx +1 -0
- package/src/components/TextButton/TextButton.namespace.ts +10 -0
- package/src/components/TextButton/TextButton.tsx +41 -0
- package/src/components/TextButton/index.ts +12 -0
- package/src/components/TextField/TextField.namespace.tsx +38 -0
- package/src/components/TextField/TextField.tsx +258 -0
- package/src/components/TextField/index.tsx +40 -0
- package/src/components/ToggleButton/ToggleButton.namespace.ts +12 -0
- package/src/components/ToggleButton/ToggleButton.tsx +75 -0
- package/src/components/ToggleButton/index.ts +14 -0
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +13 -0
- package/src/components/VisuallyHidden/index.tsx +1 -0
- package/src/components/index.ts +37 -0
- package/src/components/private/Icon.tsx +15 -0
- package/src/components/private/useDismissible.tsx +86 -0
- package/src/components/private/usePendingButton.tsx +45 -0
- package/src/index.tsx +1 -0
- package/src/primitive.ts +11 -0
- package/src/utils/createStyleContext.tsx +125 -0
- package/src/utils/createWithStateProps.tsx +28 -0
- package/src/vars.ts +1 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ActionSheetBackdrop,
|
|
3
|
+
ActionSheetPositioner,
|
|
4
|
+
ActionSheetContent,
|
|
5
|
+
ActionSheetHeader,
|
|
6
|
+
ActionSheetRoot,
|
|
7
|
+
ActionSheetTitle,
|
|
8
|
+
ActionSheetDescription,
|
|
9
|
+
ActionSheetTrigger,
|
|
10
|
+
ActionSheetList,
|
|
11
|
+
ActionSheetItem,
|
|
12
|
+
ActionSheetItemLabel,
|
|
13
|
+
ActionSheetCloseButton,
|
|
14
|
+
ActionSheetCloseButtonLabel,
|
|
15
|
+
type ActionSheetBackdropProps,
|
|
16
|
+
type ActionSheetPositionerProps,
|
|
17
|
+
type ActionSheetContentProps,
|
|
18
|
+
type ActionSheetHeaderProps,
|
|
19
|
+
type ActionSheetRootProps,
|
|
20
|
+
type ActionSheetTitleProps,
|
|
21
|
+
type ActionSheetDescriptionProps,
|
|
22
|
+
type ActionSheetTriggerProps,
|
|
23
|
+
type ActionSheetListProps,
|
|
24
|
+
type ActionSheetItemProps,
|
|
25
|
+
type ActionSheetItemLabelProps,
|
|
26
|
+
type ActionSheetCloseButtonProps,
|
|
27
|
+
type ActionSheetCloseButtonLabelProps,
|
|
28
|
+
} from "./ActionSheet";
|
|
29
|
+
|
|
30
|
+
export * as ActionSheet from "./ActionSheet.namespace";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AvatarBadge as Badge,
|
|
3
|
+
AvatarFallback as Fallback,
|
|
4
|
+
AvatarImage as Image,
|
|
5
|
+
AvatarRoot as Root,
|
|
6
|
+
AvatarStack as Stack,
|
|
7
|
+
type AvatarBadgeProps as BadgeProps,
|
|
8
|
+
type AvatarFallbackProps as FallbackProps,
|
|
9
|
+
type AvatarImageProps as ImageProps,
|
|
10
|
+
type AvatarRootProps as RootProps,
|
|
11
|
+
type AvatarStackProps as StackProps,
|
|
12
|
+
} from "./Avatar";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Avatar as AvatarPrimitive } from "@seed-design/react-avatar";
|
|
2
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
3
|
+
import { avatar, type AvatarVariantProps } from "@seed-design/recipe/avatar";
|
|
4
|
+
import { avatarStack, type AvatarStackVariantProps } from "@seed-design/recipe/avatarStack";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { useMemo } from "react";
|
|
8
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
9
|
+
|
|
10
|
+
const { PropsProvider, withProvider, withContext } = createStyleContext(avatar);
|
|
11
|
+
|
|
12
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
13
|
+
|
|
14
|
+
export interface AvatarRootProps extends AvatarVariantProps, AvatarPrimitive.RootProps {}
|
|
15
|
+
|
|
16
|
+
export const AvatarRoot = withProvider<HTMLDivElement, AvatarRootProps>(
|
|
17
|
+
AvatarPrimitive.Root,
|
|
18
|
+
"root",
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
22
|
+
|
|
23
|
+
export interface AvatarImageProps extends AvatarPrimitive.ImageProps {}
|
|
24
|
+
|
|
25
|
+
export const AvatarImage = withContext<HTMLImageElement, AvatarImageProps>(
|
|
26
|
+
AvatarPrimitive.Image,
|
|
27
|
+
"image",
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
31
|
+
|
|
32
|
+
export interface AvatarFallbackProps extends AvatarPrimitive.FallbackProps {}
|
|
33
|
+
|
|
34
|
+
export const AvatarFallback = withContext<HTMLDivElement, AvatarFallbackProps>(
|
|
35
|
+
AvatarPrimitive.Fallback,
|
|
36
|
+
"fallback",
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
40
|
+
|
|
41
|
+
export interface AvatarBadgeProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}
|
|
42
|
+
|
|
43
|
+
export const AvatarBadge = withContext<HTMLDivElement, AvatarBadgeProps>(Primitive.div, "badge");
|
|
44
|
+
|
|
45
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
46
|
+
|
|
47
|
+
export interface AvatarStackProps
|
|
48
|
+
extends AvatarStackVariantProps,
|
|
49
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
50
|
+
|
|
51
|
+
// TODO: implement stacking order
|
|
52
|
+
export const AvatarStack = React.forwardRef<HTMLDivElement, AvatarStackProps>(
|
|
53
|
+
({ className, children, size, ...otherProps }, ref) => {
|
|
54
|
+
const classNames = avatarStack({ size });
|
|
55
|
+
const avatars = React.Children.toArray(children);
|
|
56
|
+
return (
|
|
57
|
+
<PropsProvider value={useMemo(() => ({ size }), [size])}>
|
|
58
|
+
<div ref={ref} className={clsx(classNames.root, className)} {...otherProps}>
|
|
59
|
+
{avatars.map((avatar, index) => (
|
|
60
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: There is no unique key for each child
|
|
61
|
+
<div key={index} className={classNames.item}>
|
|
62
|
+
{avatar}
|
|
63
|
+
</div>
|
|
64
|
+
))}
|
|
65
|
+
</div>
|
|
66
|
+
</PropsProvider>
|
|
67
|
+
);
|
|
68
|
+
},
|
|
69
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AvatarBadge,
|
|
3
|
+
AvatarFallback,
|
|
4
|
+
AvatarImage,
|
|
5
|
+
AvatarRoot,
|
|
6
|
+
AvatarStack,
|
|
7
|
+
type AvatarBadgeProps,
|
|
8
|
+
type AvatarFallbackProps,
|
|
9
|
+
type AvatarImageProps,
|
|
10
|
+
type AvatarRootProps,
|
|
11
|
+
type AvatarStackProps,
|
|
12
|
+
} from "./Avatar";
|
|
13
|
+
|
|
14
|
+
export * as Avatar from "./Avatar.namespace";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
+
import { badge, type BadgeVariantProps } from "@seed-design/recipe/badge";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
5
|
+
|
|
6
|
+
const { withProvider, withContext } = createStyleContext(badge);
|
|
7
|
+
|
|
8
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
9
|
+
|
|
10
|
+
export interface BadgeRootProps
|
|
11
|
+
extends BadgeVariantProps,
|
|
12
|
+
PrimitiveProps,
|
|
13
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
14
|
+
|
|
15
|
+
export const BadgeRoot = withProvider<HTMLSpanElement, BadgeRootProps>(Primitive.span, "root");
|
|
16
|
+
|
|
17
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
18
|
+
|
|
19
|
+
export interface BadgeLabelProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {}
|
|
20
|
+
|
|
21
|
+
export const BadgeLabel = withContext<HTMLSpanElement, BadgeLabelProps>(Primitive.span, "label");
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export {
|
|
2
|
+
BottomSheetBackdrop as Backdrop,
|
|
3
|
+
BottomSheetBody as Body,
|
|
4
|
+
BottomSheetContent as Content,
|
|
5
|
+
BottomSheetDescription as Description,
|
|
6
|
+
BottomSheetFooter as Footer,
|
|
7
|
+
BottomSheetHeader as Header,
|
|
8
|
+
BottomSheetPositioner as Positioner,
|
|
9
|
+
BottomSheetRoot as Root,
|
|
10
|
+
BottomSheetTitle as Title,
|
|
11
|
+
BottomSheetTrigger as Trigger,
|
|
12
|
+
BottomSheetCloseButton as CloseButton,
|
|
13
|
+
BottomSheetCloseIcon as CloseIcon,
|
|
14
|
+
type BottomSheetBackdropProps as BackdropProps,
|
|
15
|
+
type BottomSheetBodyProps as BodyProps,
|
|
16
|
+
type BottomSheetContentProps as ContentProps,
|
|
17
|
+
type BottomSheetDescriptionProps as DescriptionProps,
|
|
18
|
+
type BottomSheetFooterProps as FooterProps,
|
|
19
|
+
type BottomSheetHeaderProps as HeaderProps,
|
|
20
|
+
type BottomSheetPositionerProps as PositionerProps,
|
|
21
|
+
type BottomSheetRootProps as RootProps,
|
|
22
|
+
type BottomSheetTitleProps as TitleProps,
|
|
23
|
+
type BottomSheetTriggerProps as TriggerProps,
|
|
24
|
+
type BottomSheetCloseButtonProps as CloseButtonProps,
|
|
25
|
+
type BottomSheetCloseIconProps as CloseIconProps,
|
|
26
|
+
} from "./BottomSheet";
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive, useDialogContext } from "@seed-design/react-dialog";
|
|
2
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
3
|
+
import { bottomSheet, type BottomSheetVariantProps } from "@seed-design/recipe/bottomSheet";
|
|
4
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
5
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
6
|
+
import { Box, type BoxProps } from "../Box";
|
|
7
|
+
import { Icon, type IconProps } from "../private/Icon";
|
|
8
|
+
|
|
9
|
+
const { withRootProvider, withContext } = createStyleContext(bottomSheet);
|
|
10
|
+
const withStateProps = createWithStateProps([useDialogContext]);
|
|
11
|
+
|
|
12
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
13
|
+
|
|
14
|
+
export interface BottomSheetRootProps extends BottomSheetVariantProps, DialogPrimitive.RootProps {}
|
|
15
|
+
|
|
16
|
+
export const BottomSheetRoot = withRootProvider<BottomSheetRootProps>(DialogPrimitive.Root, {
|
|
17
|
+
defaultProps: {
|
|
18
|
+
lazyMount: true,
|
|
19
|
+
unmountOnExit: true,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
24
|
+
|
|
25
|
+
export interface BottomSheetTriggerProps extends DialogPrimitive.TriggerProps {}
|
|
26
|
+
|
|
27
|
+
export const BottomSheetTrigger = DialogPrimitive.Trigger;
|
|
28
|
+
|
|
29
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
30
|
+
|
|
31
|
+
export interface BottomSheetPositionerProps extends DialogPrimitive.PositionerProps {}
|
|
32
|
+
|
|
33
|
+
export const BottomSheetPositioner = withContext<HTMLDivElement, BottomSheetPositionerProps>(
|
|
34
|
+
DialogPrimitive.Positioner,
|
|
35
|
+
"positioner",
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
39
|
+
|
|
40
|
+
export interface BottomSheetBackdropProps extends DialogPrimitive.BackdropProps {}
|
|
41
|
+
|
|
42
|
+
export const BottomSheetBackdrop = withContext<HTMLDivElement, BottomSheetBackdropProps>(
|
|
43
|
+
DialogPrimitive.Backdrop,
|
|
44
|
+
"backdrop",
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
48
|
+
|
|
49
|
+
export interface BottomSheetContentProps extends DialogPrimitive.ContentProps {}
|
|
50
|
+
|
|
51
|
+
export const BottomSheetContent = withContext<HTMLDivElement, BottomSheetContentProps>(
|
|
52
|
+
DialogPrimitive.Content,
|
|
53
|
+
"content",
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
57
|
+
|
|
58
|
+
export interface BottomSheetHeaderProps
|
|
59
|
+
extends PrimitiveProps,
|
|
60
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
61
|
+
|
|
62
|
+
export const BottomSheetHeader = withContext<HTMLDivElement, BottomSheetHeaderProps>(
|
|
63
|
+
withStateProps(Primitive.div),
|
|
64
|
+
"header",
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
68
|
+
|
|
69
|
+
export interface BottomSheetTitleProps extends DialogPrimitive.TitleProps {}
|
|
70
|
+
|
|
71
|
+
export const BottomSheetTitle = withContext<HTMLHeadingElement, BottomSheetTitleProps>(
|
|
72
|
+
withStateProps(Primitive.h2),
|
|
73
|
+
"title",
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
77
|
+
|
|
78
|
+
export interface BottomSheetDescriptionProps extends DialogPrimitive.DescriptionProps {}
|
|
79
|
+
|
|
80
|
+
export const BottomSheetDescription = withContext<
|
|
81
|
+
HTMLParagraphElement,
|
|
82
|
+
BottomSheetDescriptionProps
|
|
83
|
+
>(withStateProps(Primitive.p), "description");
|
|
84
|
+
|
|
85
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
86
|
+
|
|
87
|
+
export interface BottomSheetBodyProps extends BoxProps {}
|
|
88
|
+
|
|
89
|
+
export const BottomSheetBody = withContext<HTMLDivElement, BottomSheetBodyProps>(
|
|
90
|
+
withStateProps(Box),
|
|
91
|
+
"body",
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
95
|
+
|
|
96
|
+
export interface BottomSheetFooterProps
|
|
97
|
+
extends PrimitiveProps,
|
|
98
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
99
|
+
|
|
100
|
+
export const BottomSheetFooter = withContext<HTMLDivElement, BottomSheetFooterProps>(
|
|
101
|
+
withStateProps(Primitive.div),
|
|
102
|
+
"footer",
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
106
|
+
|
|
107
|
+
export interface BottomSheetCloseButtonProps
|
|
108
|
+
extends PrimitiveProps,
|
|
109
|
+
React.HTMLAttributes<HTMLButtonElement> {}
|
|
110
|
+
|
|
111
|
+
export const BottomSheetCloseButton = withContext<HTMLButtonElement, BottomSheetCloseButtonProps>(
|
|
112
|
+
withStateProps(Primitive.button),
|
|
113
|
+
"closeButton",
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
117
|
+
|
|
118
|
+
export interface BottomSheetCloseIconProps extends IconProps {}
|
|
119
|
+
|
|
120
|
+
export const BottomSheetCloseIcon = withContext<SVGSVGElement, BottomSheetCloseIconProps>(
|
|
121
|
+
Icon,
|
|
122
|
+
"closeIcon",
|
|
123
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export {
|
|
2
|
+
BottomSheetBackdrop,
|
|
3
|
+
BottomSheetBody,
|
|
4
|
+
BottomSheetContent,
|
|
5
|
+
BottomSheetDescription,
|
|
6
|
+
BottomSheetFooter,
|
|
7
|
+
BottomSheetHeader,
|
|
8
|
+
BottomSheetPositioner,
|
|
9
|
+
BottomSheetRoot,
|
|
10
|
+
BottomSheetTitle,
|
|
11
|
+
BottomSheetTrigger,
|
|
12
|
+
BottomSheetCloseButton,
|
|
13
|
+
BottomSheetCloseIcon,
|
|
14
|
+
type BottomSheetBackdropProps,
|
|
15
|
+
type BottomSheetBodyProps,
|
|
16
|
+
type BottomSheetContentProps,
|
|
17
|
+
type BottomSheetDescriptionProps,
|
|
18
|
+
type BottomSheetFooterProps,
|
|
19
|
+
type BottomSheetHeaderProps,
|
|
20
|
+
type BottomSheetPositionerProps,
|
|
21
|
+
type BottomSheetRootProps,
|
|
22
|
+
type BottomSheetTitleProps,
|
|
23
|
+
type BottomSheetTriggerProps,
|
|
24
|
+
type BottomSheetCloseButtonProps,
|
|
25
|
+
type BottomSheetCloseIconProps,
|
|
26
|
+
} from "./BottomSheet";
|
|
27
|
+
|
|
28
|
+
export * as BottomSheet from "./BottomSheet.namespace";
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ColorBg,
|
|
3
|
+
ColorFg,
|
|
4
|
+
ColorPalette,
|
|
5
|
+
ColorStroke,
|
|
6
|
+
Dimension,
|
|
7
|
+
Radius,
|
|
8
|
+
SpacingX,
|
|
9
|
+
SpacingY,
|
|
10
|
+
} from "@seed-design/vars";
|
|
11
|
+
import { vars } from "@seed-design/vars";
|
|
12
|
+
import clsx from "clsx";
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
|
|
15
|
+
function handleColor(color: string | undefined) {
|
|
16
|
+
if (!color) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
const [type, value] = color.split(".");
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
return vars.$color[type][value] ?? undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function handleDimension(dimension: string | undefined) {
|
|
25
|
+
if (!dimension) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const [type, value] = dimension.split(".");
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
return vars.$dimension[dimension] ?? vars.$dimension[type][value] ?? undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function handleSize(size: string | undefined) {
|
|
34
|
+
if (!size) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (size === "full") {
|
|
38
|
+
return "100%";
|
|
39
|
+
}
|
|
40
|
+
// @ts-ignore
|
|
41
|
+
return vars.$dimension[size] ?? size;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function handleRadius(radius: string | undefined) {
|
|
45
|
+
if (!radius) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
return vars.$radius[radius] ?? undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function handleDisplay(
|
|
53
|
+
display: "block" | "flex" | "inlineFlex" | "inline" | "inlineBlock" | "none" | undefined,
|
|
54
|
+
) {
|
|
55
|
+
if (!display) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
block: "block",
|
|
61
|
+
flex: "flex",
|
|
62
|
+
inlineFlex: "inline-flex",
|
|
63
|
+
inline: "inline",
|
|
64
|
+
inlineBlock: "inline-block",
|
|
65
|
+
none: "none",
|
|
66
|
+
}[display];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function handleFlexDirection(flexDirection: string | undefined) {
|
|
70
|
+
if (!flexDirection) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
row: "row",
|
|
76
|
+
column: "column",
|
|
77
|
+
rowReverse: "row-reverse",
|
|
78
|
+
columnReverse: "column-reverse",
|
|
79
|
+
}[flexDirection];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function handleJustifyContent(justifyContent: string | undefined) {
|
|
83
|
+
if (!justifyContent) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
flexStart: "flex-start",
|
|
89
|
+
flexEnd: "flex-end",
|
|
90
|
+
center: "center",
|
|
91
|
+
spaceBetween: "space-between",
|
|
92
|
+
spaceAround: "space-around",
|
|
93
|
+
}[justifyContent];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function handleAlignItems(alignItems: string | undefined) {
|
|
97
|
+
if (!alignItems) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
flexStart: "flex-start",
|
|
103
|
+
flexEnd: "flex-end",
|
|
104
|
+
center: "center",
|
|
105
|
+
stretch: "stretch",
|
|
106
|
+
}[alignItems];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
110
|
+
as?: React.ElementType;
|
|
111
|
+
|
|
112
|
+
background?: `bg.${ColorBg}` | `palette.${ColorPalette}`;
|
|
113
|
+
|
|
114
|
+
color?: `fg.${ColorFg}` | `palette.${ColorPalette}`;
|
|
115
|
+
|
|
116
|
+
borderColor?: `stroke.${ColorStroke}` | `palette.${ColorPalette}`;
|
|
117
|
+
|
|
118
|
+
borderWidth?: 0 | 1 | (number & {});
|
|
119
|
+
|
|
120
|
+
borderTopWidth?: 0 | 1 | (number & {});
|
|
121
|
+
|
|
122
|
+
borderRightWidth?: 0 | 1 | (number & {});
|
|
123
|
+
|
|
124
|
+
borderBottomWidth?: 0 | 1 | (number & {});
|
|
125
|
+
|
|
126
|
+
borderLeftWidth?: 0 | 1 | (number & {});
|
|
127
|
+
|
|
128
|
+
borderRadius?: Radius;
|
|
129
|
+
|
|
130
|
+
borderTopLeftRadius?: Radius;
|
|
131
|
+
|
|
132
|
+
borderTopRightRadius?: Radius;
|
|
133
|
+
|
|
134
|
+
borderBottomRightRadius?: Radius;
|
|
135
|
+
|
|
136
|
+
borderBottomLeftRadius?: Radius;
|
|
137
|
+
|
|
138
|
+
width?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {});
|
|
139
|
+
|
|
140
|
+
minWidth?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {});
|
|
141
|
+
|
|
142
|
+
maxWidth?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {});
|
|
143
|
+
|
|
144
|
+
height?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {});
|
|
145
|
+
|
|
146
|
+
minHeight?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {});
|
|
147
|
+
|
|
148
|
+
maxHeight?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | "full" | (string & {});
|
|
149
|
+
|
|
150
|
+
top?: 0;
|
|
151
|
+
|
|
152
|
+
left?: 0;
|
|
153
|
+
|
|
154
|
+
right?: 0;
|
|
155
|
+
|
|
156
|
+
bottom?: 0;
|
|
157
|
+
|
|
158
|
+
padding?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}`;
|
|
159
|
+
|
|
160
|
+
paddingX?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}`;
|
|
161
|
+
|
|
162
|
+
paddingY?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}`;
|
|
163
|
+
|
|
164
|
+
paddingTop?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}`;
|
|
165
|
+
|
|
166
|
+
paddingRight?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}`;
|
|
167
|
+
|
|
168
|
+
paddingBottom?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}`;
|
|
169
|
+
|
|
170
|
+
paddingLeft?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}`;
|
|
171
|
+
|
|
172
|
+
display?: "block" | "flex" | "inlineFlex" | "inline" | "inlineBlock" | "none";
|
|
173
|
+
|
|
174
|
+
position?: "relative" | "absolute" | "fixed" | "sticky";
|
|
175
|
+
|
|
176
|
+
overflowX?: "visible" | "hidden" | "scroll" | "auto";
|
|
177
|
+
|
|
178
|
+
overflowY?: "visible" | "hidden" | "scroll" | "auto";
|
|
179
|
+
|
|
180
|
+
flexGrow?: 0 | 1 | (number & {});
|
|
181
|
+
|
|
182
|
+
flexShrink?: 0 | (number & {});
|
|
183
|
+
|
|
184
|
+
// Flex
|
|
185
|
+
|
|
186
|
+
flexDirection?: "row" | "column" | "rowReverse" | "columnReverse";
|
|
187
|
+
|
|
188
|
+
flexWrap?: "wrap" | "nowrap";
|
|
189
|
+
|
|
190
|
+
justifyContent?: "flexStart" | "flexEnd" | "center" | "spaceBetween" | "spaceAround";
|
|
191
|
+
|
|
192
|
+
alignItems?: "flexStart" | "flexEnd" | "center" | "stretch";
|
|
193
|
+
|
|
194
|
+
alignContent?: "flexStart" | "flexEnd" | "center" | "stretch";
|
|
195
|
+
|
|
196
|
+
alignSelf?: "flexStart" | "flexEnd" | "center" | "stretch";
|
|
197
|
+
|
|
198
|
+
gap?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}`;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const Box = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {
|
|
202
|
+
const {
|
|
203
|
+
as: Comp = "div",
|
|
204
|
+
background,
|
|
205
|
+
color,
|
|
206
|
+
borderColor,
|
|
207
|
+
borderWidth,
|
|
208
|
+
borderTopWidth,
|
|
209
|
+
borderRightWidth,
|
|
210
|
+
borderBottomWidth,
|
|
211
|
+
borderLeftWidth,
|
|
212
|
+
borderRadius,
|
|
213
|
+
borderTopLeftRadius,
|
|
214
|
+
borderTopRightRadius,
|
|
215
|
+
borderBottomRightRadius,
|
|
216
|
+
borderBottomLeftRadius,
|
|
217
|
+
width,
|
|
218
|
+
minWidth,
|
|
219
|
+
maxWidth,
|
|
220
|
+
height,
|
|
221
|
+
minHeight,
|
|
222
|
+
maxHeight,
|
|
223
|
+
padding,
|
|
224
|
+
paddingX,
|
|
225
|
+
paddingY,
|
|
226
|
+
paddingTop,
|
|
227
|
+
paddingRight,
|
|
228
|
+
paddingBottom,
|
|
229
|
+
paddingLeft,
|
|
230
|
+
display,
|
|
231
|
+
position,
|
|
232
|
+
overflowX,
|
|
233
|
+
overflowY,
|
|
234
|
+
flexGrow,
|
|
235
|
+
flexShrink,
|
|
236
|
+
flexDirection,
|
|
237
|
+
flexWrap,
|
|
238
|
+
justifyContent,
|
|
239
|
+
alignItems,
|
|
240
|
+
alignContent,
|
|
241
|
+
alignSelf,
|
|
242
|
+
gap,
|
|
243
|
+
className,
|
|
244
|
+
style,
|
|
245
|
+
...nativeProps
|
|
246
|
+
} = props;
|
|
247
|
+
|
|
248
|
+
return (
|
|
249
|
+
<Comp
|
|
250
|
+
ref={ref}
|
|
251
|
+
className={clsx("seed-box", className)}
|
|
252
|
+
style={
|
|
253
|
+
{
|
|
254
|
+
"--seed-box-background": handleColor(background),
|
|
255
|
+
"--seed-box-color": handleColor(color),
|
|
256
|
+
"--seed-box-border-color": handleColor(borderColor),
|
|
257
|
+
"--seed-box-border-width": borderWidth !== undefined ? `${borderWidth}px` : undefined,
|
|
258
|
+
"--seed-box-border-top-width":
|
|
259
|
+
borderTopWidth !== undefined ? `${borderTopWidth}px` : undefined,
|
|
260
|
+
"--seed-box-border-right-width":
|
|
261
|
+
borderRightWidth !== undefined ? `${borderRightWidth}px` : undefined,
|
|
262
|
+
"--seed-box-border-bottom-width":
|
|
263
|
+
borderBottomWidth !== undefined ? `${borderBottomWidth}px` : undefined,
|
|
264
|
+
"--seed-box-border-left-width":
|
|
265
|
+
borderLeftWidth !== undefined ? `${borderLeftWidth}px` : undefined,
|
|
266
|
+
"--seed-box-border-radius": handleRadius(borderRadius),
|
|
267
|
+
"--seed-box-border-top-left-radius": handleRadius(borderTopLeftRadius),
|
|
268
|
+
"--seed-box-border-top-right-radius": handleRadius(borderTopRightRadius),
|
|
269
|
+
"--seed-box-border-bottom-right-radius": handleRadius(borderBottomRightRadius),
|
|
270
|
+
"--seed-box-border-bottom-left-radius": handleRadius(borderBottomLeftRadius),
|
|
271
|
+
"--seed-box-width": handleSize(width),
|
|
272
|
+
"--seed-box-min-width": handleSize(minWidth),
|
|
273
|
+
"--seed-box-max-width": handleSize(maxWidth),
|
|
274
|
+
"--seed-box-height": handleSize(height),
|
|
275
|
+
"--seed-box-min-height": handleSize(minHeight),
|
|
276
|
+
"--seed-box-max-height": handleSize(maxHeight),
|
|
277
|
+
"--seed-box-padding": handleDimension(padding),
|
|
278
|
+
"--seed-box-padding-x": handleDimension(paddingX),
|
|
279
|
+
"--seed-box-padding-y": handleDimension(paddingY),
|
|
280
|
+
"--seed-box-padding-top": handleDimension(paddingTop),
|
|
281
|
+
"--seed-box-padding-right": handleDimension(paddingRight),
|
|
282
|
+
"--seed-box-padding-bottom": handleDimension(paddingBottom),
|
|
283
|
+
"--seed-box-padding-left": handleDimension(paddingLeft),
|
|
284
|
+
"--seed-box-gap": handleDimension(gap),
|
|
285
|
+
"--seed-box-display": handleDisplay(display),
|
|
286
|
+
"--seed-box-position": position,
|
|
287
|
+
"--seed-box-overflow-x": overflowX,
|
|
288
|
+
"--seed-box-overflow-y": overflowY,
|
|
289
|
+
"--seed-box-flex-grow": flexGrow,
|
|
290
|
+
"--seed-box-flex-shrink": flexShrink,
|
|
291
|
+
"--seed-box-flex-direction": handleFlexDirection(flexDirection),
|
|
292
|
+
"--seed-box-flex-wrap": flexWrap,
|
|
293
|
+
"--seed-box-justify-content": handleJustifyContent(justifyContent),
|
|
294
|
+
"--seed-box-align-items": handleAlignItems(alignItems),
|
|
295
|
+
"--seed-box-align-content": handleAlignItems(alignContent),
|
|
296
|
+
"--seed-box-align-self": handleAlignItems(alignSelf),
|
|
297
|
+
...style,
|
|
298
|
+
} as React.CSSProperties
|
|
299
|
+
}
|
|
300
|
+
{...nativeProps}
|
|
301
|
+
/>
|
|
302
|
+
);
|
|
303
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Box, type BoxProps } from "./Box";
|