@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,53 @@
|
|
|
1
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
+
import {
|
|
3
|
+
SegmentedControl as SegmentedControlPrimitive,
|
|
4
|
+
useSegmentedControlItemContext,
|
|
5
|
+
} from "@seed-design/react-segmented-control";
|
|
6
|
+
import {
|
|
7
|
+
segmentedControl,
|
|
8
|
+
type SegmentedControlVariantProps,
|
|
9
|
+
} from "@seed-design/recipe/segmentedControl";
|
|
10
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
11
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
12
|
+
|
|
13
|
+
const { withProvider, withContext } = createStyleContext(segmentedControl);
|
|
14
|
+
const withStateProps = createWithStateProps([useSegmentedControlItemContext]);
|
|
15
|
+
|
|
16
|
+
export interface SegmentedControlRootProps
|
|
17
|
+
extends SegmentedControlVariantProps,
|
|
18
|
+
SegmentedControlPrimitive.RootProps {}
|
|
19
|
+
|
|
20
|
+
export const SegmentedControlRoot = withProvider<HTMLDivElement, SegmentedControlRootProps>(
|
|
21
|
+
SegmentedControlPrimitive.Root,
|
|
22
|
+
"root",
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export interface SegmentedControlIndicatorProps
|
|
26
|
+
extends PrimitiveProps,
|
|
27
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
28
|
+
|
|
29
|
+
export const SegmentedControlIndicator = withContext<
|
|
30
|
+
HTMLDivElement,
|
|
31
|
+
SegmentedControlIndicatorProps
|
|
32
|
+
>(Primitive.div, "indicator");
|
|
33
|
+
|
|
34
|
+
export interface SegmentedControlItemProps extends SegmentedControlPrimitive.ItemProps {}
|
|
35
|
+
|
|
36
|
+
export const SegmentedControlItem = withContext<HTMLLabelElement, SegmentedControlItemProps>(
|
|
37
|
+
SegmentedControlPrimitive.Item,
|
|
38
|
+
"item",
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export interface SegmentedControlItemHiddenInputProps
|
|
42
|
+
extends SegmentedControlPrimitive.ItemHiddenInputProps {}
|
|
43
|
+
|
|
44
|
+
export const SegmentedControlItemHiddenInput = SegmentedControlPrimitive.ItemHiddenInput;
|
|
45
|
+
|
|
46
|
+
export interface SegmentedControlItemLabelProps
|
|
47
|
+
extends PrimitiveProps,
|
|
48
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
49
|
+
|
|
50
|
+
export const SegmentedControlItemLabel = withContext<
|
|
51
|
+
HTMLSpanElement,
|
|
52
|
+
SegmentedControlItemLabelProps
|
|
53
|
+
>(withStateProps(Primitive.span), "itemLabel");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
SegmentedControlIndicator,
|
|
3
|
+
SegmentedControlRoot,
|
|
4
|
+
SegmentedControlItem,
|
|
5
|
+
SegmentedControlItemHiddenInput,
|
|
6
|
+
SegmentedControlItemLabel,
|
|
7
|
+
type SegmentedControlIndicatorProps,
|
|
8
|
+
type SegmentedControlRootProps,
|
|
9
|
+
type SegmentedControlItemProps,
|
|
10
|
+
type SegmentedControlItemHiddenInputProps,
|
|
11
|
+
type SegmentedControlItemLabelProps,
|
|
12
|
+
} from "./SegmentedControl";
|
|
13
|
+
|
|
14
|
+
export * as SegmentedControl from "./SegmentedControl.namespace";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export {
|
|
2
|
+
CheckSelectBoxContent as Content,
|
|
3
|
+
CheckSelectBoxControl as Control,
|
|
4
|
+
CheckSelectBoxDescription as Description,
|
|
5
|
+
CheckSelectBoxGroup as Group,
|
|
6
|
+
CheckSelectBoxHiddenInput as HiddenInput,
|
|
7
|
+
CheckSelectBoxIcon as Icon,
|
|
8
|
+
CheckSelectBoxLabel as Label,
|
|
9
|
+
CheckSelectBoxRoot as Root,
|
|
10
|
+
type CheckSelectBoxContentProps as ContentProps,
|
|
11
|
+
type CheckSelectBoxControlProps as ControlProps,
|
|
12
|
+
type CheckSelectBoxDescriptionProps as DescriptionProps,
|
|
13
|
+
type CheckSelectBoxGroupProps as GroupProps,
|
|
14
|
+
type CheckSelectBoxHiddenInputProps as HiddenInputProps,
|
|
15
|
+
type CheckSelectBoxIconProps as IconProps,
|
|
16
|
+
type CheckSelectBoxLabelProps as LabelProps,
|
|
17
|
+
type CheckSelectBoxRootProps as RootProps,
|
|
18
|
+
} from "./CheckSelectBox";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Checkbox as CheckboxPrimitive, useCheckboxContext } from "@seed-design/react-checkbox";
|
|
2
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
3
|
+
import { selectBox } from "@seed-design/recipe/selectBox";
|
|
4
|
+
import { selectBoxGroup } from "@seed-design/recipe/selectBoxGroup";
|
|
5
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
6
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
7
|
+
import { Icon, type IconProps } from "../private/Icon";
|
|
8
|
+
import { forwardRef } from "react";
|
|
9
|
+
|
|
10
|
+
const { withProvider: withGroupProvider } = createStyleContext(selectBoxGroup);
|
|
11
|
+
const { withProvider, withContext } = createStyleContext(selectBox);
|
|
12
|
+
const withStateProps = createWithStateProps([useCheckboxContext]);
|
|
13
|
+
|
|
14
|
+
export interface CheckSelectBoxGroupProps
|
|
15
|
+
extends PrimitiveProps,
|
|
16
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* CheckSelectBoxGroup is a simple div wrapper for future extensibility.
|
|
20
|
+
* It does not have spacing by default, nesting <Stack> under it is recommended.
|
|
21
|
+
*/
|
|
22
|
+
export const CheckSelectBoxGroup = withGroupProvider<HTMLDivElement, CheckSelectBoxGroupProps>(
|
|
23
|
+
forwardRef<HTMLDivElement, CheckSelectBoxGroupProps>((props, ref) => (
|
|
24
|
+
<Primitive.div ref={ref} role="group" {...props} />
|
|
25
|
+
)),
|
|
26
|
+
"root",
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export interface CheckSelectBoxRootProps extends CheckboxPrimitive.RootProps {}
|
|
30
|
+
|
|
31
|
+
export const CheckSelectBoxRoot = withProvider<HTMLLabelElement, CheckSelectBoxRootProps>(
|
|
32
|
+
CheckboxPrimitive.Root,
|
|
33
|
+
"root",
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export interface CheckSelectBoxContentProps
|
|
37
|
+
extends PrimitiveProps,
|
|
38
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
39
|
+
|
|
40
|
+
export const CheckSelectBoxContent = withContext<HTMLDivElement, CheckSelectBoxContentProps>(
|
|
41
|
+
withStateProps(Primitive.div),
|
|
42
|
+
"content",
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export interface CheckSelectBoxLabelProps
|
|
46
|
+
extends PrimitiveProps,
|
|
47
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
48
|
+
|
|
49
|
+
export const CheckSelectBoxLabel = withContext<HTMLSpanElement, CheckSelectBoxLabelProps>(
|
|
50
|
+
withStateProps(Primitive.span),
|
|
51
|
+
"label",
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
export interface CheckSelectBoxDescriptionProps
|
|
55
|
+
extends PrimitiveProps,
|
|
56
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
57
|
+
|
|
58
|
+
export const CheckSelectBoxDescription = withContext<
|
|
59
|
+
HTMLSpanElement,
|
|
60
|
+
CheckSelectBoxDescriptionProps
|
|
61
|
+
>(withStateProps(Primitive.span), "description");
|
|
62
|
+
|
|
63
|
+
export interface CheckSelectBoxControlProps extends CheckboxPrimitive.ControlProps {}
|
|
64
|
+
|
|
65
|
+
export const CheckSelectBoxControl = withContext<HTMLDivElement, CheckSelectBoxControlProps>(
|
|
66
|
+
CheckboxPrimitive.Control,
|
|
67
|
+
"checkboxControl",
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
export interface CheckSelectBoxIconProps extends IconProps {}
|
|
71
|
+
|
|
72
|
+
export const CheckSelectBoxIcon = withContext<SVGSVGElement, CheckSelectBoxIconProps>(
|
|
73
|
+
withStateProps(Icon),
|
|
74
|
+
"checkboxIcon",
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
export interface CheckSelectBoxHiddenInputProps extends CheckboxPrimitive.HiddenInputProps {}
|
|
78
|
+
|
|
79
|
+
export const CheckSelectBoxHiddenInput = CheckboxPrimitive.HiddenInput;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export {
|
|
2
|
+
RadioSelectBoxContent as Content,
|
|
3
|
+
RadioSelectBoxControl as Control,
|
|
4
|
+
RadioSelectBoxDescription as Description,
|
|
5
|
+
RadioSelectBoxHiddenInput as HiddenInput,
|
|
6
|
+
RadioSelectBoxIcon as Icon,
|
|
7
|
+
RadioSelectBoxItem as Item,
|
|
8
|
+
RadioSelectBoxLabel as Label,
|
|
9
|
+
RadioSelectBoxRoot as Root,
|
|
10
|
+
type RadioSelectBoxContentProps as ContentProps,
|
|
11
|
+
type RadioSelectBoxControlProps as ControlProps,
|
|
12
|
+
type RadioSelectBoxDescriptionProps as DescriptionProps,
|
|
13
|
+
type RadioSelectBoxHiddenInputProps as HiddenInputProps,
|
|
14
|
+
type RadioSelectBoxIconProps as IconProps,
|
|
15
|
+
type RadioSelectBoxItemProps as ItemProps,
|
|
16
|
+
type RadioSelectBoxLabelProps as LabelProps,
|
|
17
|
+
type RadioSelectBoxRootProps as RootProps,
|
|
18
|
+
} from "./RadioSelectBox";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
+
import {
|
|
3
|
+
RadioGroup as RadioGroupPrimitive,
|
|
4
|
+
useRadioGroupItemContext,
|
|
5
|
+
} from "@seed-design/react-radio-group";
|
|
6
|
+
import { selectBox } from "@seed-design/recipe/selectBox";
|
|
7
|
+
import { selectBoxGroup } from "@seed-design/recipe/selectBoxGroup";
|
|
8
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
9
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
10
|
+
import { Icon, type IconProps } from "../private/Icon";
|
|
11
|
+
|
|
12
|
+
const { withProvider: withGroupProvider } = createStyleContext(selectBoxGroup);
|
|
13
|
+
const { withProvider, withContext } = createStyleContext(selectBox);
|
|
14
|
+
const withStateProps = createWithStateProps([useRadioGroupItemContext]);
|
|
15
|
+
|
|
16
|
+
export interface RadioSelectBoxRootProps extends RadioGroupPrimitive.RootProps {}
|
|
17
|
+
|
|
18
|
+
export const RadioSelectBoxRoot = withGroupProvider<HTMLDivElement, RadioSelectBoxRootProps>(
|
|
19
|
+
RadioGroupPrimitive.Root,
|
|
20
|
+
"root",
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export interface RadioSelectBoxItemProps extends RadioGroupPrimitive.ItemProps {}
|
|
24
|
+
|
|
25
|
+
export const RadioSelectBoxItem = withProvider<HTMLLabelElement, RadioSelectBoxItemProps>(
|
|
26
|
+
RadioGroupPrimitive.Item,
|
|
27
|
+
"root",
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export interface RadioSelectBoxContentProps
|
|
31
|
+
extends PrimitiveProps,
|
|
32
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
33
|
+
|
|
34
|
+
export const RadioSelectBoxContent = withContext<HTMLDivElement, RadioSelectBoxContentProps>(
|
|
35
|
+
withStateProps(Primitive.div),
|
|
36
|
+
"content",
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export interface RadioSelectBoxLabelProps
|
|
40
|
+
extends PrimitiveProps,
|
|
41
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
42
|
+
|
|
43
|
+
export const RadioSelectBoxLabel = withContext<HTMLSpanElement, RadioSelectBoxLabelProps>(
|
|
44
|
+
withStateProps(Primitive.span),
|
|
45
|
+
"label",
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export interface RadioSelectBoxDescriptionProps
|
|
49
|
+
extends PrimitiveProps,
|
|
50
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
51
|
+
|
|
52
|
+
export const RadioSelectBoxDescription = withContext<
|
|
53
|
+
HTMLSpanElement,
|
|
54
|
+
RadioSelectBoxDescriptionProps
|
|
55
|
+
>(withStateProps(Primitive.span), "description");
|
|
56
|
+
|
|
57
|
+
export interface RadioSelectBoxControlProps extends RadioGroupPrimitive.ItemControlProps {}
|
|
58
|
+
|
|
59
|
+
export const RadioSelectBoxControl = withContext<HTMLDivElement, RadioSelectBoxControlProps>(
|
|
60
|
+
RadioGroupPrimitive.ItemControl,
|
|
61
|
+
"radioControl",
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
export interface RadioSelectBoxIconProps extends IconProps {}
|
|
65
|
+
|
|
66
|
+
export const RadioSelectBoxIcon = withContext<SVGSVGElement, RadioSelectBoxIconProps>(
|
|
67
|
+
withStateProps(Icon),
|
|
68
|
+
"radioIcon",
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
export interface RadioSelectBoxHiddenInputProps extends RadioGroupPrimitive.ItemHiddenInputProps {}
|
|
72
|
+
|
|
73
|
+
export const RadioSelectBoxHiddenInput = RadioGroupPrimitive.ItemHiddenInput;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export {
|
|
2
|
+
CheckSelectBoxContent,
|
|
3
|
+
CheckSelectBoxControl,
|
|
4
|
+
CheckSelectBoxDescription,
|
|
5
|
+
CheckSelectBoxGroup,
|
|
6
|
+
CheckSelectBoxHiddenInput,
|
|
7
|
+
CheckSelectBoxIcon,
|
|
8
|
+
CheckSelectBoxLabel,
|
|
9
|
+
CheckSelectBoxRoot,
|
|
10
|
+
type CheckSelectBoxContentProps,
|
|
11
|
+
type CheckSelectBoxControlProps,
|
|
12
|
+
type CheckSelectBoxDescriptionProps,
|
|
13
|
+
type CheckSelectBoxGroupProps,
|
|
14
|
+
type CheckSelectBoxHiddenInputProps,
|
|
15
|
+
type CheckSelectBoxIconProps,
|
|
16
|
+
type CheckSelectBoxLabelProps,
|
|
17
|
+
type CheckSelectBoxRootProps,
|
|
18
|
+
} from "./CheckSelectBox";
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
RadioSelectBoxContent,
|
|
22
|
+
RadioSelectBoxControl,
|
|
23
|
+
RadioSelectBoxDescription,
|
|
24
|
+
RadioSelectBoxHiddenInput,
|
|
25
|
+
RadioSelectBoxIcon,
|
|
26
|
+
RadioSelectBoxItem,
|
|
27
|
+
RadioSelectBoxLabel,
|
|
28
|
+
RadioSelectBoxRoot,
|
|
29
|
+
type RadioSelectBoxContentProps,
|
|
30
|
+
type RadioSelectBoxControlProps,
|
|
31
|
+
type RadioSelectBoxDescriptionProps,
|
|
32
|
+
type RadioSelectBoxHiddenInputProps,
|
|
33
|
+
type RadioSelectBoxIconProps,
|
|
34
|
+
type RadioSelectBoxItemProps,
|
|
35
|
+
type RadioSelectBoxLabelProps,
|
|
36
|
+
type RadioSelectBoxRootProps,
|
|
37
|
+
} from "./RadioSelectBox";
|
|
38
|
+
|
|
39
|
+
export * as CheckSelectBox from "./CheckSelectBox.namespace";
|
|
40
|
+
export * as RadioSelectBox from "./RadioSelectBox.namespace";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { skeleton, type SkeletonVariantProps } from "@seed-design/recipe/skeleton";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
4
|
+
import { Box, type BoxProps } from "../Box";
|
|
5
|
+
|
|
6
|
+
const { withProvider } = createStyleContext(skeleton);
|
|
7
|
+
|
|
8
|
+
export interface SkeletonProps
|
|
9
|
+
extends SkeletonVariantProps,
|
|
10
|
+
Pick<BoxProps, "width" | "height">,
|
|
11
|
+
Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {}
|
|
12
|
+
|
|
13
|
+
export const Skeleton = withProvider<HTMLDivElement, SkeletonProps>(Box, "root");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton, type SkeletonProps } from "./Skeleton";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export {
|
|
2
|
+
SnackbarActionButton as ActionButton,
|
|
3
|
+
SnackbarAvoidOverlap as AvoidOverlap,
|
|
4
|
+
SnackbarCloseButton as CloseButton,
|
|
5
|
+
SnackbarMessage as Message,
|
|
6
|
+
SnackbarPrefixIcon as PrefixIcon,
|
|
7
|
+
SnackbarRegion as Region,
|
|
8
|
+
SnackbarRenderer as Renderer,
|
|
9
|
+
SnackbarRoot as Root,
|
|
10
|
+
SnackbarRootProvider as RootProvider,
|
|
11
|
+
type SnackbarActionButtonProps as ActionButtonProps,
|
|
12
|
+
type SnackbarAvoidOverlapProps as AvoidOverlapProps,
|
|
13
|
+
type SnackbarCloseButtonProps as CloseButtonProps,
|
|
14
|
+
type SnackbarMessageProps as MessageProps,
|
|
15
|
+
type SnackbarPrefixIconProps as PrefixIconProps,
|
|
16
|
+
type SnackbarRegionProps as RegionProps,
|
|
17
|
+
type SnackbarRendererProps as RendererProps,
|
|
18
|
+
type SnackbarRootProps as RootProps,
|
|
19
|
+
type SnackbarRootProviderProps as RootProviderProps,
|
|
20
|
+
} from "./Snackbar";
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
+
import { Snackbar as SnackbarPrimitive } from "@seed-design/react-snackbar";
|
|
3
|
+
import { snackbar, type SnackbarVariantProps } from "@seed-design/recipe/snackbar";
|
|
4
|
+
import { snackbarRegion } from "@seed-design/recipe/snackbarRegion";
|
|
5
|
+
import { visuallyHidden } from "@seed-design/recipe/visuallyHidden";
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
import { forwardRef, useMemo } from "react";
|
|
8
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
9
|
+
import { Icon, type IconProps } from "../private/Icon";
|
|
10
|
+
|
|
11
|
+
const { withProvider: withRegionProvider } = createStyleContext(snackbarRegion);
|
|
12
|
+
const { withProvider, withContext } = createStyleContext(snackbar);
|
|
13
|
+
|
|
14
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
15
|
+
|
|
16
|
+
export interface SnackbarRootProviderProps extends SnackbarPrimitive.RootProviderProps {}
|
|
17
|
+
|
|
18
|
+
export const SnackbarRootProvider = SnackbarPrimitive.RootProvider;
|
|
19
|
+
|
|
20
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
21
|
+
|
|
22
|
+
export interface SnackbarRegionProps extends SnackbarVariantProps, SnackbarPrimitive.RegionProps {}
|
|
23
|
+
|
|
24
|
+
export const SnackbarRegion = withRegionProvider<HTMLDivElement, SnackbarRegionProps>(
|
|
25
|
+
SnackbarPrimitive.Region,
|
|
26
|
+
"root",
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
30
|
+
|
|
31
|
+
export interface SnackbarRootProps extends SnackbarVariantProps, SnackbarPrimitive.RootProps {}
|
|
32
|
+
|
|
33
|
+
export const SnackbarRoot = withProvider<HTMLDivElement, SnackbarRootProps>(
|
|
34
|
+
SnackbarPrimitive.Root,
|
|
35
|
+
"root",
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
39
|
+
|
|
40
|
+
export interface SnackbarMessageProps
|
|
41
|
+
extends PrimitiveProps,
|
|
42
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
43
|
+
|
|
44
|
+
export const SnackbarMessage = withContext<HTMLDivElement, SnackbarMessageProps>(
|
|
45
|
+
Primitive.span,
|
|
46
|
+
"message",
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
50
|
+
|
|
51
|
+
export interface SnackbarPrefixIconProps extends IconProps {}
|
|
52
|
+
|
|
53
|
+
export const SnackbarPrefixIcon = withContext<HTMLDivElement, SnackbarPrefixIconProps>(
|
|
54
|
+
Icon,
|
|
55
|
+
"prefixIcon",
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
59
|
+
|
|
60
|
+
export interface SnackbarActionButtonProps
|
|
61
|
+
extends PrimitiveProps,
|
|
62
|
+
React.HTMLAttributes<HTMLButtonElement> {}
|
|
63
|
+
|
|
64
|
+
export const SnackbarActionButton = withContext<HTMLButtonElement, SnackbarActionButtonProps>(
|
|
65
|
+
Primitive.button,
|
|
66
|
+
"actionButton",
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
70
|
+
|
|
71
|
+
export interface SnackbarCloseButtonProps extends SnackbarPrimitive.CloseButtonProps {}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Visually hidden button that closes the snackbar (for screen readers).
|
|
75
|
+
*/
|
|
76
|
+
export const SnackbarCloseButton = forwardRef<HTMLButtonElement, SnackbarCloseButtonProps>(
|
|
77
|
+
(props, ref) => {
|
|
78
|
+
const { className, ...otherProps } = props;
|
|
79
|
+
const classNames = useMemo(() => visuallyHidden(), []);
|
|
80
|
+
return (
|
|
81
|
+
<SnackbarPrimitive.CloseButton
|
|
82
|
+
ref={ref}
|
|
83
|
+
className={clsx(classNames.root, className)}
|
|
84
|
+
{...otherProps}
|
|
85
|
+
/>
|
|
86
|
+
);
|
|
87
|
+
},
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
91
|
+
|
|
92
|
+
export interface SnackbarRendererProps extends SnackbarPrimitive.RendererProps {}
|
|
93
|
+
|
|
94
|
+
export const SnackbarRenderer = SnackbarPrimitive.Renderer;
|
|
95
|
+
|
|
96
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
97
|
+
|
|
98
|
+
export interface SnackbarAvoidOverlapProps extends SnackbarPrimitive.AvoidOverlapProps {}
|
|
99
|
+
|
|
100
|
+
export const SnackbarAvoidOverlap = SnackbarPrimitive.AvoidOverlap;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export {
|
|
2
|
+
SnackbarActionButton,
|
|
3
|
+
SnackbarAvoidOverlap,
|
|
4
|
+
SnackbarCloseButton,
|
|
5
|
+
SnackbarMessage,
|
|
6
|
+
SnackbarPrefixIcon,
|
|
7
|
+
SnackbarRegion,
|
|
8
|
+
SnackbarRenderer,
|
|
9
|
+
SnackbarRoot,
|
|
10
|
+
SnackbarRootProvider,
|
|
11
|
+
type SnackbarActionButtonProps,
|
|
12
|
+
type SnackbarAvoidOverlapProps,
|
|
13
|
+
type SnackbarCloseButtonProps,
|
|
14
|
+
type SnackbarMessageProps,
|
|
15
|
+
type SnackbarPrefixIconProps,
|
|
16
|
+
type SnackbarRegionProps,
|
|
17
|
+
type SnackbarRendererProps,
|
|
18
|
+
type SnackbarRootProps,
|
|
19
|
+
type SnackbarRootProviderProps,
|
|
20
|
+
} from "./Snackbar";
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
useSnackbarContext,
|
|
24
|
+
type UseSnackbarContext,
|
|
25
|
+
type CreateSnackbarOptions,
|
|
26
|
+
} from "@seed-design/react-snackbar";
|
|
27
|
+
export {
|
|
28
|
+
useSnackbarAdapter,
|
|
29
|
+
type UseSnackbarAdapterReturn,
|
|
30
|
+
} from "./useSnackbarAdapter";
|
|
31
|
+
|
|
32
|
+
export * as Snackbar from "./Snackbar.namespace";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useSnackbarContext, type CreateSnackbarOptions } from "@seed-design/react-snackbar";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
|
|
4
|
+
export type UseSnackbarAdapterReturn = ReturnType<typeof useSnackbarAdapter>;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* wraps the snackbar context to provide a more user-friendly API
|
|
8
|
+
*/
|
|
9
|
+
export function useSnackbarAdapter() {
|
|
10
|
+
const api = useSnackbarContext();
|
|
11
|
+
const adapter = useMemo(
|
|
12
|
+
() => ({
|
|
13
|
+
visible: api.visible,
|
|
14
|
+
create: (options: CreateSnackbarOptions) => {
|
|
15
|
+
return api.create({
|
|
16
|
+
timeout: options.timeout ?? 5000,
|
|
17
|
+
removeDelay: options.removeDelay ?? 200,
|
|
18
|
+
onClose: options.onClose,
|
|
19
|
+
render: options.render,
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
dismiss: api.dismiss,
|
|
23
|
+
}),
|
|
24
|
+
[api],
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return adapter;
|
|
28
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Box, type BoxProps } from "../Box/Box";
|
|
3
|
+
|
|
4
|
+
export interface StackProps extends Omit<BoxProps, "display" | "direction"> {}
|
|
5
|
+
|
|
6
|
+
export const Stack = React.forwardRef<HTMLDivElement, StackProps>((props, ref) => {
|
|
7
|
+
return <Box ref={ref} display="flex" flexDirection="column" {...props} />;
|
|
8
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stack, type StackProps } from "./Stack";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export {
|
|
2
|
+
SwitchControl as Control,
|
|
3
|
+
SwitchHiddenInput as HiddenInput,
|
|
4
|
+
SwitchLabel as Label,
|
|
5
|
+
SwitchRoot as Root,
|
|
6
|
+
SwitchThumb as Thumb,
|
|
7
|
+
type SwitchControlProps as ControlProps,
|
|
8
|
+
type SwitchHiddenInputProps as HiddenInputProps,
|
|
9
|
+
type SwitchLabelProps as LabelProps,
|
|
10
|
+
type SwitchRootProps as RootProps,
|
|
11
|
+
type SwitchThumbProps as ThumbProps,
|
|
12
|
+
} from "./Switch";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Switch as SwitchPrimitive, useSwitchContext } from "@seed-design/react-switch";
|
|
2
|
+
import { switchStyle, type SwitchVariantProps } from "@seed-design/recipe/switch";
|
|
3
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
4
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
5
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
6
|
+
|
|
7
|
+
const { withProvider, withContext } = createStyleContext(switchStyle);
|
|
8
|
+
const withStateProps = createWithStateProps([useSwitchContext]);
|
|
9
|
+
|
|
10
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
11
|
+
|
|
12
|
+
export interface SwitchRootProps extends SwitchVariantProps, SwitchPrimitive.RootProps {}
|
|
13
|
+
|
|
14
|
+
export const SwitchRoot = withProvider<HTMLLabelElement, SwitchRootProps>(
|
|
15
|
+
SwitchPrimitive.Root,
|
|
16
|
+
"root",
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
20
|
+
|
|
21
|
+
export interface SwitchControlProps extends SwitchPrimitive.ControlProps {}
|
|
22
|
+
|
|
23
|
+
export const SwitchControl = withContext<HTMLDivElement, SwitchControlProps>(
|
|
24
|
+
SwitchPrimitive.Control,
|
|
25
|
+
"control",
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
29
|
+
|
|
30
|
+
export interface SwitchThumbProps extends SwitchPrimitive.ThumbProps {}
|
|
31
|
+
|
|
32
|
+
export const SwitchThumb = withContext<HTMLDivElement, SwitchThumbProps>(
|
|
33
|
+
SwitchPrimitive.Thumb,
|
|
34
|
+
"thumb",
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
38
|
+
|
|
39
|
+
export interface SwitchLabelProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {}
|
|
40
|
+
|
|
41
|
+
export const SwitchLabel = withContext<HTMLSpanElement, SwitchLabelProps>(
|
|
42
|
+
withStateProps(Primitive.span),
|
|
43
|
+
"label",
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
47
|
+
|
|
48
|
+
export interface SwitchHiddenInputProps extends SwitchPrimitive.HiddenInputProps {}
|
|
49
|
+
|
|
50
|
+
export const SwitchHiddenInput = SwitchPrimitive.HiddenInput;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
SwitchControl,
|
|
3
|
+
SwitchHiddenInput,
|
|
4
|
+
SwitchLabel,
|
|
5
|
+
SwitchRoot,
|
|
6
|
+
SwitchThumb,
|
|
7
|
+
type SwitchControlProps,
|
|
8
|
+
type SwitchHiddenInputProps,
|
|
9
|
+
type SwitchLabelProps,
|
|
10
|
+
type SwitchRootProps,
|
|
11
|
+
type SwitchThumbProps,
|
|
12
|
+
} from "./Switch";
|
|
13
|
+
|
|
14
|
+
export * as Switch from "./Switch.namespace";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export {
|
|
2
|
+
TabsContent as Content,
|
|
3
|
+
TabsIndicator as Indicator,
|
|
4
|
+
TabsList as List,
|
|
5
|
+
TabsRoot as Root,
|
|
6
|
+
TabsCarouselCamera as CarouselCamera,
|
|
7
|
+
TabsCarousel as Carousel,
|
|
8
|
+
TabsTrigger as Trigger,
|
|
9
|
+
TabsTriggerLabel as TriggerLabel,
|
|
10
|
+
TabsTriggerNotification as TriggerNotification,
|
|
11
|
+
type TabsContentProps as ContentProps,
|
|
12
|
+
type TabsIndicatorProps as IndicatorProps,
|
|
13
|
+
type TabsListProps as ListProps,
|
|
14
|
+
type TabsRootProps as RootProps,
|
|
15
|
+
type TabsCarouselCameraProps as CarouselCameraProps,
|
|
16
|
+
type TabsCarouselProps as CarouselProps,
|
|
17
|
+
type TabsTriggerLabelProps as TriggerLabelProps,
|
|
18
|
+
type TabsTriggerNotificationProps as TriggerNotificationProps,
|
|
19
|
+
type TabsTriggerProps as TriggerProps,
|
|
20
|
+
} from "./Tabs";
|