@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
package/lib/primitive.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
|
|
17
|
+
// src/primitive.ts
|
|
18
|
+
var primitive_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(primitive_exports);
|
|
20
|
+
__reExport(primitive_exports, require("@seed-design/react-avatar"), module.exports);
|
|
21
|
+
__reExport(primitive_exports, require("@seed-design/react-checkbox"), module.exports);
|
|
22
|
+
__reExport(primitive_exports, require("@seed-design/react-dialog"), module.exports);
|
|
23
|
+
__reExport(primitive_exports, require("@seed-design/react-popover"), module.exports);
|
|
24
|
+
__reExport(primitive_exports, require("@seed-design/react-progress"), module.exports);
|
|
25
|
+
__reExport(primitive_exports, require("@seed-design/react-pull-to-refresh"), module.exports);
|
|
26
|
+
__reExport(primitive_exports, require("@seed-design/react-radio-group"), module.exports);
|
|
27
|
+
__reExport(primitive_exports, require("@seed-design/react-snackbar"), module.exports);
|
|
28
|
+
__reExport(primitive_exports, require("@seed-design/react-switch"), module.exports);
|
|
29
|
+
__reExport(primitive_exports, require("@seed-design/react-tabs"), module.exports);
|
|
30
|
+
__reExport(primitive_exports, require("@seed-design/react-toggle"), module.exports);
|
|
31
|
+
//# sourceMappingURL=primitive.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/primitive.ts"],
|
|
4
|
+
"sourcesContent": ["export * from \"@seed-design/react-avatar\";\nexport * from \"@seed-design/react-checkbox\";\nexport * from \"@seed-design/react-dialog\";\nexport * from \"@seed-design/react-popover\";\nexport * from \"@seed-design/react-progress\";\nexport * from \"@seed-design/react-pull-to-refresh\";\nexport * from \"@seed-design/react-radio-group\";\nexport * from \"@seed-design/react-snackbar\";\nexport * from \"@seed-design/react-switch\";\nexport * from \"@seed-design/react-tabs\";\nexport * from \"@seed-design/react-toggle\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,8BAAc,sCAAd;AACA,8BAAc,wCADd;AAEA,8BAAc,sCAFd;AAGA,8BAAc,uCAHd;AAIA,8BAAc,wCAJd;AAKA,8BAAc,+CALd;AAMA,8BAAc,2CANd;AAOA,8BAAc,wCAPd;AAQA,8BAAc,sCARd;AASA,8BAAc,oCATd;AAUA,8BAAc,sCAVd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/primitive.ts
|
|
2
|
+
export * from "@seed-design/react-avatar";
|
|
3
|
+
export * from "@seed-design/react-checkbox";
|
|
4
|
+
export * from "@seed-design/react-dialog";
|
|
5
|
+
export * from "@seed-design/react-popover";
|
|
6
|
+
export * from "@seed-design/react-progress";
|
|
7
|
+
export * from "@seed-design/react-pull-to-refresh";
|
|
8
|
+
export * from "@seed-design/react-radio-group";
|
|
9
|
+
export * from "@seed-design/react-snackbar";
|
|
10
|
+
export * from "@seed-design/react-switch";
|
|
11
|
+
export * from "@seed-design/react-tabs";
|
|
12
|
+
export * from "@seed-design/react-toggle";
|
|
13
|
+
//# sourceMappingURL=primitive.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/primitive.ts"],
|
|
4
|
+
"sourcesContent": ["export * from \"@seed-design/react-avatar\";\nexport * from \"@seed-design/react-checkbox\";\nexport * from \"@seed-design/react-dialog\";\nexport * from \"@seed-design/react-popover\";\nexport * from \"@seed-design/react-progress\";\nexport * from \"@seed-design/react-pull-to-refresh\";\nexport * from \"@seed-design/react-radio-group\";\nexport * from \"@seed-design/react-snackbar\";\nexport * from \"@seed-design/react-switch\";\nexport * from \"@seed-design/react-tabs\";\nexport * from \"@seed-design/react-toggle\";\n"],
|
|
5
|
+
"mappings": ";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type Recipe<Props extends Record<string, string | boolean | undefined>, Classnames extends Record<string, string>> = ((props?: Props) => Classnames) & {
|
|
2
|
+
splitVariantProps: <T extends Props>(props: T) => [Props, Omit<T, keyof Props>];
|
|
3
|
+
};
|
|
4
|
+
export declare function createStyleContext<Props extends Record<string, string | boolean | undefined>, Classnames extends Record<string, string>>(recipe: Recipe<Props, Classnames>): {
|
|
5
|
+
ClassNamesProvider: ({ children, value, }: {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
value: Classnames;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
PropsProvider: ({ children, value }: {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
value: Props;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
useClassNames: () => Classnames;
|
|
14
|
+
useProps: () => Props | null;
|
|
15
|
+
withRootProvider: <P>(Component: React.ElementType<any>, options?: {
|
|
16
|
+
defaultProps?: Partial<P>;
|
|
17
|
+
}) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P>>;
|
|
18
|
+
withProvider: <T, P>(Component: React.ElementType<any>, slot: keyof Classnames, options?: {
|
|
19
|
+
defaultProps?: Partial<P>;
|
|
20
|
+
}) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
|
|
21
|
+
withContext: <T, P>(Component: React.ElementType<any>, slot?: keyof Classnames) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=createStyleContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStyleContext.d.ts","sourceRoot":"","sources":["../../src/utils/createStyleContext.tsx"],"names":[],"mappings":"AAGA,KAAK,MAAM,CACT,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,EAC1D,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IACvC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,UAAU,CAAC,GAAG;IACpC,iBAAiB,EAAE,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC,CAAC;CACjF,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,EAC1D,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACzC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC;+CAO9B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAE;yCAIP;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE;;;uBAmB7D,CAAC,aACd,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,YACvB;QACR,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;KAC3B,KACA,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;mBAsBtC,CAAC,EAAE,CAAC,aACb,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,QAC3B,MAAM,UAAU,YACZ;QACR,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;KAC3B,KACA,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;kBAuBhE,CAAC,EAAE,CAAC,aACZ,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAC1B,MAAM,UAAU,KACtB,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;EAsBtF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type AtLeastOne<T> = [T, ...T[]];
|
|
2
|
+
export declare function createWithStateProps(useContexts: AtLeastOne<(prop?: {
|
|
3
|
+
strict?: boolean;
|
|
4
|
+
}) => {
|
|
5
|
+
stateProps: React.HTMLAttributes<HTMLElement>;
|
|
6
|
+
} | null>, options?: {
|
|
7
|
+
strict?: boolean;
|
|
8
|
+
}): <P, R>(Component: React.ComponentType<P & React.RefAttributes<R>>) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<P> & import("react").RefAttributes<R>>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=createWithStateProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createWithStateProps.d.ts","sourceRoot":"","sources":["../../src/utils/createWithStateProps.tsx"],"names":[],"mappings":"AAEA,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AAEjC,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,UAAU,CACrB,CAAC,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,KAAK;IAAE,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;CAAE,GAAG,IAAI,CAC1F,EACD,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,IAIC,CAAC,EAAE,CAAC,aAAa,KAAK,CAAC,aAAa,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,sHAehG"}
|
package/lib/vars.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vars.d.ts","sourceRoot":"","sources":["../src/vars.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
package/lib/vars.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
|
|
17
|
+
// src/vars.ts
|
|
18
|
+
var vars_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(vars_exports);
|
|
20
|
+
__reExport(vars_exports, require("@seed-design/vars"), module.exports);
|
|
21
|
+
//# sourceMappingURL=vars.js.map
|
package/lib/vars.js.map
ADDED
package/lib/vars.mjs
ADDED
package/lib/vars.mjs.map
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@seed-design/react",
|
|
3
|
+
"version": "0.0.1-alpha-20250210081704",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/daangn/seed-design.git",
|
|
7
|
+
"directory": "packages/react"
|
|
8
|
+
},
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./lib/index.d.ts",
|
|
13
|
+
"require": "./lib/index.js",
|
|
14
|
+
"import": "./lib/index.mjs"
|
|
15
|
+
},
|
|
16
|
+
"./vars": {
|
|
17
|
+
"types": "./lib/vars.d.ts",
|
|
18
|
+
"require": "./lib/vars.js",
|
|
19
|
+
"import": "./lib/vars.mjs"
|
|
20
|
+
},
|
|
21
|
+
"./primitive": {
|
|
22
|
+
"types": "./lib/primitive.d.ts",
|
|
23
|
+
"require": "./lib/primitive.js",
|
|
24
|
+
"import": "./lib/primitive.mjs"
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"main": "./lib/index.js",
|
|
29
|
+
"files": [
|
|
30
|
+
"lib",
|
|
31
|
+
"src"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"prepack": "bun run build",
|
|
35
|
+
"clean": "rm -rf lib",
|
|
36
|
+
"build": "bun build.mjs && tsc --emitDeclarationOnly",
|
|
37
|
+
"dev": "bun run dev.mjs"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@radix-ui/react-compose-refs": "^1.1.1",
|
|
41
|
+
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
42
|
+
"@radix-ui/react-use-layout-effect": "^1.1.0",
|
|
43
|
+
"@seed-design/dom-utils": "0.0.0-alpha-20250210081704",
|
|
44
|
+
"@seed-design/react-avatar": "0.0.0-alpha-20250210081704",
|
|
45
|
+
"@seed-design/react-checkbox": "0.0.0-alpha-20250210081704",
|
|
46
|
+
"@seed-design/react-dialog": "0.0.1-alpha-20250210081704",
|
|
47
|
+
"@seed-design/react-popover": "0.0.0-alpha-20250210081704",
|
|
48
|
+
"@seed-design/react-primitive": "0.0.1-alpha-20250210081704",
|
|
49
|
+
"@seed-design/react-progress": "0.0.1-alpha-20250210081704",
|
|
50
|
+
"@seed-design/react-pull-to-refresh": "0.0.1-alpha-20250210081704",
|
|
51
|
+
"@seed-design/react-radio-group": "0.0.0-alpha-20250210081704",
|
|
52
|
+
"@seed-design/react-segmented-control": "0.0.1-alpha-20250210081704",
|
|
53
|
+
"@seed-design/react-snackbar": "0.0.1-alpha-20250210081704",
|
|
54
|
+
"@seed-design/react-switch": "0.0.0-alpha-20250210081704",
|
|
55
|
+
"@seed-design/react-text-field": "0.0.0-alpha-20250210081704",
|
|
56
|
+
"@seed-design/react-tabs": "0.0.0-alpha-20250210081704",
|
|
57
|
+
"@seed-design/react-toggle": "0.0.1-alpha-20250210081704",
|
|
58
|
+
"@seed-design/vars": "0.0.1-alpha-20250210081704",
|
|
59
|
+
"clsx": "^2.1.1"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@seed-design/recipe": "0.0.0-alpha-20250210081704",
|
|
63
|
+
"@stackflow/react": ">=1.4.1",
|
|
64
|
+
"@stackflow/react-ui-core": ">=1.2.1",
|
|
65
|
+
"react": ">=18.0.0",
|
|
66
|
+
"react-dom": ">=18.0.0"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public"
|
|
70
|
+
},
|
|
71
|
+
"ultra": {
|
|
72
|
+
"concurrent": [
|
|
73
|
+
"dev",
|
|
74
|
+
"build"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"esbuild": "^0.25.0"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ActionButtonIcon as Icon,
|
|
3
|
+
ActionButtonLabel as Label,
|
|
4
|
+
ActionButtonPrefixIcon as PrefixIcon,
|
|
5
|
+
ActionButtonProgressIndicator as ProgressIndicator,
|
|
6
|
+
ActionButtonRoot as Root,
|
|
7
|
+
ActionButtonSuffixIcon as SuffixIcon,
|
|
8
|
+
type ActionButtonIconProps as IconProps,
|
|
9
|
+
type ActionButtonLabelProps as LabelProps,
|
|
10
|
+
type ActionButtonPrefixIconProps as PrefixIconProps,
|
|
11
|
+
type ActionButtonProgressIndicatorProps as ProgressIndicatorProps,
|
|
12
|
+
type ActionButtonRootProps as RootProps,
|
|
13
|
+
type ActionButtonSuffixIconProps as SuffixIconProps,
|
|
14
|
+
} from "./ActionButton";
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
+
import { actionButton, type ActionButtonVariantProps } from "@seed-design/recipe/actionButton";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
6
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
7
|
+
import { Icon, type IconProps } from "../private/Icon";
|
|
8
|
+
import {
|
|
9
|
+
PendingButtonProvider,
|
|
10
|
+
usePendingButton,
|
|
11
|
+
usePendingButtonContext,
|
|
12
|
+
type UsePendingButtonProps,
|
|
13
|
+
} from "../private/usePendingButton";
|
|
14
|
+
|
|
15
|
+
const { ClassNamesProvider, withContext } = createStyleContext(actionButton);
|
|
16
|
+
const withStateProps = createWithStateProps([usePendingButtonContext]);
|
|
17
|
+
|
|
18
|
+
export interface ActionButtonRootProps
|
|
19
|
+
extends ActionButtonVariantProps,
|
|
20
|
+
UsePendingButtonProps,
|
|
21
|
+
PrimitiveProps,
|
|
22
|
+
React.ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
23
|
+
|
|
24
|
+
export const ActionButtonRoot = React.forwardRef<HTMLButtonElement, ActionButtonRootProps>(
|
|
25
|
+
(
|
|
26
|
+
{
|
|
27
|
+
variant = "brandSolid",
|
|
28
|
+
size = "medium",
|
|
29
|
+
loading = false,
|
|
30
|
+
layout = "withText",
|
|
31
|
+
className,
|
|
32
|
+
...otherProps
|
|
33
|
+
},
|
|
34
|
+
ref,
|
|
35
|
+
) => {
|
|
36
|
+
const classNames = actionButton({ variant, layout, size });
|
|
37
|
+
const api = usePendingButton({ loading, disabled: otherProps.disabled });
|
|
38
|
+
|
|
39
|
+
if (layout === "iconOnly" && !(otherProps["aria-label"] || otherProps["aria-labelledby"])) {
|
|
40
|
+
console.warn(
|
|
41
|
+
"When layout is 'iconOnly', 'aria-label' or 'aria-labelledby' should be provided.",
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<ClassNamesProvider value={classNames}>
|
|
47
|
+
<PendingButtonProvider value={api}>
|
|
48
|
+
<Primitive.button
|
|
49
|
+
ref={ref}
|
|
50
|
+
className={clsx(classNames.root, className)}
|
|
51
|
+
{...api.stateProps}
|
|
52
|
+
{...otherProps}
|
|
53
|
+
/>
|
|
54
|
+
</PendingButtonProvider>
|
|
55
|
+
</ClassNamesProvider>
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
);
|
|
59
|
+
ActionButtonRoot.displayName = "ActionButton";
|
|
60
|
+
|
|
61
|
+
export interface ActionButtonLabelProps
|
|
62
|
+
extends PrimitiveProps,
|
|
63
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
64
|
+
|
|
65
|
+
export const ActionButtonLabel = withContext<HTMLSpanElement, ActionButtonLabelProps>(
|
|
66
|
+
withStateProps(Primitive.span),
|
|
67
|
+
"label",
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
export interface ActionButtonPrefixIconProps extends IconProps {}
|
|
71
|
+
|
|
72
|
+
export const ActionButtonPrefixIcon = withContext<SVGSVGElement, ActionButtonPrefixIconProps>(
|
|
73
|
+
withStateProps(Icon),
|
|
74
|
+
"prefixIcon",
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
export interface ActionButtonSuffixIconProps extends IconProps {}
|
|
78
|
+
|
|
79
|
+
export const ActionButtonSuffixIcon = withContext<SVGSVGElement, ActionButtonSuffixIconProps>(
|
|
80
|
+
withStateProps(Icon),
|
|
81
|
+
"suffixIcon",
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
export interface ActionButtonIconProps extends IconProps {}
|
|
85
|
+
|
|
86
|
+
export const ActionButtonIcon = withContext<SVGSVGElement, ActionButtonIconProps>(
|
|
87
|
+
withStateProps(Icon),
|
|
88
|
+
"icon",
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
export interface ActionButtonProgressIndicatorProps
|
|
92
|
+
extends PrimitiveProps,
|
|
93
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
94
|
+
|
|
95
|
+
export const ActionButtonProgressIndicator = withContext<
|
|
96
|
+
HTMLDivElement,
|
|
97
|
+
ActionButtonProgressIndicatorProps
|
|
98
|
+
>(withStateProps(Primitive.div), "progressIndicator");
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ActionButtonIcon,
|
|
3
|
+
ActionButtonLabel,
|
|
4
|
+
ActionButtonPrefixIcon,
|
|
5
|
+
ActionButtonProgressIndicator,
|
|
6
|
+
ActionButtonRoot,
|
|
7
|
+
ActionButtonSuffixIcon,
|
|
8
|
+
type ActionButtonIconProps,
|
|
9
|
+
type ActionButtonLabelProps,
|
|
10
|
+
type ActionButtonPrefixIconProps,
|
|
11
|
+
type ActionButtonProgressIndicatorProps,
|
|
12
|
+
type ActionButtonRootProps,
|
|
13
|
+
type ActionButtonSuffixIconProps,
|
|
14
|
+
} from "./ActionButton";
|
|
15
|
+
|
|
16
|
+
export * as ActionButton from "./ActionButton.namespace";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ActionChipCount as Count,
|
|
3
|
+
ActionChipIcon as Icon,
|
|
4
|
+
ActionChipLabel as Label,
|
|
5
|
+
ActionChipPrefixIcon as PrefixIcon,
|
|
6
|
+
ActionChipRoot as Root,
|
|
7
|
+
ActionChipSuffixIcon as SuffixIcon,
|
|
8
|
+
type ActionChipCountProps as CountProps,
|
|
9
|
+
type ActionChipIconProps as IconProps,
|
|
10
|
+
type ActionChipLabelProps as LabelProps,
|
|
11
|
+
type ActionChipPrefixIconProps as PrefixIconProps,
|
|
12
|
+
type ActionChipRootProps as RootProps,
|
|
13
|
+
type ActionChipSuffixIconProps as SuffixIconProps,
|
|
14
|
+
} from "./ActionChip";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
+
import { actionChip, type ActionChipVariantProps } from "@seed-design/recipe/actionChip";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
5
|
+
import { Icon, type IconProps } from "../private/Icon";
|
|
6
|
+
|
|
7
|
+
const { withProvider, withContext } = createStyleContext(actionChip);
|
|
8
|
+
|
|
9
|
+
export interface ActionChipRootProps
|
|
10
|
+
extends ActionChipVariantProps,
|
|
11
|
+
PrimitiveProps,
|
|
12
|
+
React.ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
13
|
+
|
|
14
|
+
export const ActionChipRoot = withProvider<HTMLButtonElement, ActionChipRootProps>(
|
|
15
|
+
Primitive.button,
|
|
16
|
+
"root",
|
|
17
|
+
);
|
|
18
|
+
ActionChipRoot.displayName = "ActionChip";
|
|
19
|
+
|
|
20
|
+
export interface ActionChipLabelProps
|
|
21
|
+
extends PrimitiveProps,
|
|
22
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
23
|
+
|
|
24
|
+
export const ActionChipLabel = withContext<HTMLSpanElement, ActionChipLabelProps>(
|
|
25
|
+
Primitive.span,
|
|
26
|
+
"label",
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export interface ActionChipPrefixIconProps extends IconProps {}
|
|
30
|
+
|
|
31
|
+
export const ActionChipPrefixIcon = withContext<SVGSVGElement, ActionChipPrefixIconProps>(
|
|
32
|
+
Icon,
|
|
33
|
+
"prefixIcon",
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export interface ActionChipSuffixIconProps extends IconProps {}
|
|
37
|
+
|
|
38
|
+
export const ActionChipSuffixIcon = withContext<SVGSVGElement, ActionChipSuffixIconProps>(
|
|
39
|
+
Icon,
|
|
40
|
+
"suffixIcon",
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
export interface ActionChipIconProps extends IconProps {}
|
|
44
|
+
|
|
45
|
+
export const ActionChipIcon = withContext<SVGSVGElement, ActionChipIconProps>(Icon, "icon");
|
|
46
|
+
|
|
47
|
+
export interface ActionChipCountProps
|
|
48
|
+
extends PrimitiveProps,
|
|
49
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
50
|
+
|
|
51
|
+
export const ActionChipCount = withContext<HTMLSpanElement, ActionChipCountProps>(
|
|
52
|
+
Primitive.span,
|
|
53
|
+
"count",
|
|
54
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ActionChipCount,
|
|
3
|
+
ActionChipIcon,
|
|
4
|
+
ActionChipLabel,
|
|
5
|
+
ActionChipPrefixIcon,
|
|
6
|
+
ActionChipRoot,
|
|
7
|
+
ActionChipSuffixIcon,
|
|
8
|
+
type ActionChipCountProps,
|
|
9
|
+
type ActionChipIconProps,
|
|
10
|
+
type ActionChipLabelProps,
|
|
11
|
+
type ActionChipPrefixIconProps,
|
|
12
|
+
type ActionChipRootProps,
|
|
13
|
+
type ActionChipSuffixIconProps,
|
|
14
|
+
} from "./ActionChip";
|
|
15
|
+
|
|
16
|
+
export * as ActionChip from "./ActionChip.namespace";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ActionSheetBackdrop as Backdrop,
|
|
3
|
+
ActionSheetPositioner as Positioner,
|
|
4
|
+
ActionSheetContent as Content,
|
|
5
|
+
ActionSheetHeader as Header,
|
|
6
|
+
ActionSheetRoot as Root,
|
|
7
|
+
ActionSheetTitle as Title,
|
|
8
|
+
ActionSheetDescription as Description,
|
|
9
|
+
ActionSheetTrigger as Trigger,
|
|
10
|
+
ActionSheetList as List,
|
|
11
|
+
ActionSheetItem as Item,
|
|
12
|
+
ActionSheetItemLabel as ItemLabel,
|
|
13
|
+
ActionSheetCloseButton as CloseButton,
|
|
14
|
+
ActionSheetCloseButtonLabel as CloseButtonLabel,
|
|
15
|
+
type ActionSheetBackdropProps as BackdropProps,
|
|
16
|
+
type ActionSheetPositionerProps as PositionerProps,
|
|
17
|
+
type ActionSheetContentProps as ContentProps,
|
|
18
|
+
type ActionSheetHeaderProps as HeaderProps,
|
|
19
|
+
type ActionSheetRootProps as RootProps,
|
|
20
|
+
type ActionSheetTitleProps as TitleProps,
|
|
21
|
+
type ActionSheetDescriptionProps as DescriptionProps,
|
|
22
|
+
type ActionSheetTriggerProps as TriggerProps,
|
|
23
|
+
type ActionSheetListProps as ListProps,
|
|
24
|
+
type ActionSheetItemProps as ItemProps,
|
|
25
|
+
type ActionSheetItemLabelProps as ItemLabelProps,
|
|
26
|
+
type ActionSheetCloseButtonProps as CloseButtonProps,
|
|
27
|
+
type ActionSheetCloseButtonLabelProps as CloseButtonLabelProps,
|
|
28
|
+
} from "./ActionSheet";
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive, useDialogContext } from "@seed-design/react-dialog";
|
|
2
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
3
|
+
import { actionSheet, type ActionSheetVariantProps } from "@seed-design/recipe/actionSheet";
|
|
4
|
+
import {
|
|
5
|
+
actionSheetCloseButton,
|
|
6
|
+
type ActionSheetCloseButtonVariantProps,
|
|
7
|
+
} from "@seed-design/recipe/actionSheetCloseButton";
|
|
8
|
+
import {
|
|
9
|
+
actionSheetItem,
|
|
10
|
+
type ActionSheetItemVariantProps,
|
|
11
|
+
} from "@seed-design/recipe/actionSheetItem";
|
|
12
|
+
import type * as React from "react";
|
|
13
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
14
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
15
|
+
|
|
16
|
+
const { withRootProvider, withContext } = createStyleContext(actionSheet);
|
|
17
|
+
const { withProvider: withItemProvider, withContext: withItemContext } =
|
|
18
|
+
createStyleContext(actionSheetItem);
|
|
19
|
+
const { withProvider: withCloseButtonProvider, withContext: withCloseButtonContext } =
|
|
20
|
+
createStyleContext(actionSheetCloseButton);
|
|
21
|
+
const withStateProps = createWithStateProps([useDialogContext]);
|
|
22
|
+
|
|
23
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
24
|
+
|
|
25
|
+
export interface ActionSheetRootProps extends ActionSheetVariantProps, DialogPrimitive.RootProps {}
|
|
26
|
+
|
|
27
|
+
export const ActionSheetRoot = withRootProvider<ActionSheetRootProps>(DialogPrimitive.Root, {
|
|
28
|
+
defaultProps: {
|
|
29
|
+
lazyMount: true,
|
|
30
|
+
unmountOnExit: true,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
35
|
+
|
|
36
|
+
export interface ActionSheetTriggerProps extends DialogPrimitive.TriggerProps {}
|
|
37
|
+
|
|
38
|
+
export const ActionSheetTrigger = DialogPrimitive.Trigger;
|
|
39
|
+
|
|
40
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
41
|
+
|
|
42
|
+
export interface ActionSheetPositionerProps extends DialogPrimitive.PositionerProps {}
|
|
43
|
+
|
|
44
|
+
export const ActionSheetPositioner = withContext<HTMLDivElement, ActionSheetPositionerProps>(
|
|
45
|
+
DialogPrimitive.Positioner,
|
|
46
|
+
"positioner",
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
50
|
+
|
|
51
|
+
export interface ActionSheetBackdropProps extends DialogPrimitive.BackdropProps {}
|
|
52
|
+
|
|
53
|
+
export const ActionSheetBackdrop = withContext<HTMLDivElement, ActionSheetBackdropProps>(
|
|
54
|
+
DialogPrimitive.Backdrop,
|
|
55
|
+
"backdrop",
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
59
|
+
|
|
60
|
+
export interface ActionSheetContentProps extends DialogPrimitive.ContentProps {}
|
|
61
|
+
|
|
62
|
+
export const ActionSheetContent = withContext<HTMLDivElement, ActionSheetContentProps>(
|
|
63
|
+
DialogPrimitive.Content,
|
|
64
|
+
"content",
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
68
|
+
|
|
69
|
+
export interface ActionSheetHeaderProps
|
|
70
|
+
extends PrimitiveProps,
|
|
71
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
72
|
+
|
|
73
|
+
export const ActionSheetHeader = withContext<HTMLDivElement, ActionSheetHeaderProps>(
|
|
74
|
+
withStateProps(Primitive.div),
|
|
75
|
+
"header",
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
79
|
+
|
|
80
|
+
export interface ActionSheetTitleProps extends DialogPrimitive.TitleProps {}
|
|
81
|
+
|
|
82
|
+
export const ActionSheetTitle = withContext<HTMLHeadingElement, ActionSheetTitleProps>(
|
|
83
|
+
withStateProps(Primitive.h2),
|
|
84
|
+
"title",
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
88
|
+
|
|
89
|
+
export interface ActionSheetDescriptionProps extends DialogPrimitive.DescriptionProps {}
|
|
90
|
+
|
|
91
|
+
export const ActionSheetDescription = withContext<
|
|
92
|
+
HTMLParagraphElement,
|
|
93
|
+
ActionSheetDescriptionProps
|
|
94
|
+
>(withStateProps(Primitive.p), "description");
|
|
95
|
+
|
|
96
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
97
|
+
|
|
98
|
+
export interface ActionSheetListProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
99
|
+
|
|
100
|
+
export const ActionSheetList = withContext<HTMLDivElement, ActionSheetListProps>(
|
|
101
|
+
withStateProps(Primitive.div),
|
|
102
|
+
"list",
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
106
|
+
|
|
107
|
+
export interface ActionSheetItemProps
|
|
108
|
+
extends PrimitiveProps,
|
|
109
|
+
ActionSheetItemVariantProps,
|
|
110
|
+
React.HTMLAttributes<HTMLButtonElement> {}
|
|
111
|
+
|
|
112
|
+
export const ActionSheetItem = withItemProvider<HTMLButtonElement, ActionSheetItemProps>(
|
|
113
|
+
withStateProps(Primitive.button),
|
|
114
|
+
"root",
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
118
|
+
|
|
119
|
+
export interface ActionSheetItemLabelProps
|
|
120
|
+
extends PrimitiveProps,
|
|
121
|
+
React.HTMLAttributes<HTMLSpanElement> {
|
|
122
|
+
asChild?: boolean;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export const ActionSheetItemLabel = withItemContext<HTMLSpanElement, ActionSheetItemLabelProps>(
|
|
126
|
+
withStateProps(Primitive.span),
|
|
127
|
+
"label",
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
131
|
+
|
|
132
|
+
export interface ActionSheetCloseButtonProps
|
|
133
|
+
extends DialogPrimitive.CloseButtonProps,
|
|
134
|
+
ActionSheetCloseButtonVariantProps {}
|
|
135
|
+
|
|
136
|
+
export const ActionSheetCloseButton = withCloseButtonProvider<
|
|
137
|
+
HTMLDivElement,
|
|
138
|
+
ActionSheetCloseButtonProps
|
|
139
|
+
>(DialogPrimitive.CloseButton, "root");
|
|
140
|
+
|
|
141
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
142
|
+
|
|
143
|
+
export interface ActionSheetCloseButtonLabelProps
|
|
144
|
+
extends PrimitiveProps,
|
|
145
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
146
|
+
|
|
147
|
+
export const ActionSheetCloseButtonLabel = withCloseButtonContext<
|
|
148
|
+
HTMLSpanElement,
|
|
149
|
+
ActionSheetCloseButtonLabelProps
|
|
150
|
+
>(Primitive.span, "label");
|