@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,158 @@
|
|
|
1
|
+
import { Popover as PopoverPrimitive, usePopoverContext } from "@seed-design/react-popover";
|
|
2
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
3
|
+
import { helpBubble, type HelpBubbleVariantProps } from "@seed-design/recipe/helpBubble";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
6
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
7
|
+
import { Box, type BoxProps } from "../Box";
|
|
8
|
+
import { Icon, type IconProps } from "../private/Icon";
|
|
9
|
+
|
|
10
|
+
const { withRootProvider, withContext } = createStyleContext(helpBubble);
|
|
11
|
+
const withStateProps = createWithStateProps([usePopoverContext]);
|
|
12
|
+
|
|
13
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
14
|
+
|
|
15
|
+
export interface HelpBubbleRootProps extends HelpBubbleVariantProps, PopoverPrimitive.RootProps {}
|
|
16
|
+
|
|
17
|
+
export const HelpBubbleRoot = withRootProvider<HelpBubbleRootProps>(PopoverPrimitive.Root, {
|
|
18
|
+
defaultProps: {
|
|
19
|
+
placement: "top",
|
|
20
|
+
gutter: 4,
|
|
21
|
+
overflowPadding: 16,
|
|
22
|
+
arrowPadding: 14,
|
|
23
|
+
flip: true,
|
|
24
|
+
slide: true,
|
|
25
|
+
strategy: "absolute",
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
30
|
+
|
|
31
|
+
export interface HelpBubbleAnchorProps extends PopoverPrimitive.AnchorProps {}
|
|
32
|
+
|
|
33
|
+
export const HelpBubbleAnchor = PopoverPrimitive.Anchor;
|
|
34
|
+
|
|
35
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
36
|
+
|
|
37
|
+
export interface HelpBubbleTriggerProps extends PopoverPrimitive.TriggerProps {}
|
|
38
|
+
|
|
39
|
+
export const HelpBubbleTrigger = PopoverPrimitive.Trigger;
|
|
40
|
+
|
|
41
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
42
|
+
|
|
43
|
+
export interface HelpBubblePositionerProps extends PopoverPrimitive.PositionerProps {}
|
|
44
|
+
|
|
45
|
+
export const HelpBubblePositioner = withContext<HTMLDivElement, HelpBubblePositionerProps>(
|
|
46
|
+
PopoverPrimitive.Positioner,
|
|
47
|
+
"positioner",
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
51
|
+
|
|
52
|
+
export interface HelpBubbleBackdropProps
|
|
53
|
+
extends PrimitiveProps,
|
|
54
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
55
|
+
|
|
56
|
+
export const HelpBubbleBackdrop = withContext<HTMLDivElement, HelpBubbleBackdropProps>(
|
|
57
|
+
withStateProps(Primitive.div),
|
|
58
|
+
"backdrop",
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
62
|
+
|
|
63
|
+
export interface HelpBubbleContentProps
|
|
64
|
+
extends PrimitiveProps,
|
|
65
|
+
Pick<BoxProps, "maxWidth">,
|
|
66
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
67
|
+
|
|
68
|
+
export const HelpBubbleContent = withContext<HTMLDivElement, HelpBubbleContentProps>(
|
|
69
|
+
withStateProps(Box),
|
|
70
|
+
"content",
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
74
|
+
|
|
75
|
+
export interface HelpBubbleArrowProps extends PopoverPrimitive.ArrowProps {}
|
|
76
|
+
|
|
77
|
+
export const HelpBubbleArrow = withContext<HTMLDivElement, HelpBubbleArrowProps>(
|
|
78
|
+
PopoverPrimitive.Arrow,
|
|
79
|
+
"arrow",
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
83
|
+
|
|
84
|
+
export interface HelpBubbleArrowTipProps extends React.SVGProps<SVGSVGElement> {
|
|
85
|
+
/**
|
|
86
|
+
* radius of the arrow tip
|
|
87
|
+
* @default 1
|
|
88
|
+
*/
|
|
89
|
+
tipRadius?: number;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export const HelpBubbleArrowTip = forwardRef<SVGSVGElement, HelpBubbleArrowTipProps>(
|
|
93
|
+
(props, ref) => {
|
|
94
|
+
const { tipRadius = 1, ...otherProps } = props;
|
|
95
|
+
const api = usePopoverContext();
|
|
96
|
+
const width = api.rects.arrow?.width || 0;
|
|
97
|
+
const height = api.rects.arrow?.height || 0;
|
|
98
|
+
const pathData = `M0,0
|
|
99
|
+
H${width}
|
|
100
|
+
L${width / 2 + tipRadius},${height - tipRadius}
|
|
101
|
+
Q${width / 2},${height} ${width / 2 - tipRadius},${height - tipRadius}
|
|
102
|
+
Z`;
|
|
103
|
+
|
|
104
|
+
// TODO: mergeProps with api.stateProps
|
|
105
|
+
return (
|
|
106
|
+
<svg
|
|
107
|
+
aria-hidden="true"
|
|
108
|
+
width={width}
|
|
109
|
+
height={width}
|
|
110
|
+
viewBox={`0 0 ${width} ${height > width ? height : width}`}
|
|
111
|
+
ref={ref}
|
|
112
|
+
{...otherProps}
|
|
113
|
+
>
|
|
114
|
+
<path stroke="none" d={pathData} />
|
|
115
|
+
</svg>
|
|
116
|
+
);
|
|
117
|
+
},
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
121
|
+
|
|
122
|
+
export interface HelpBubbleCloseButtonProps extends PopoverPrimitive.CloseButtonProps {}
|
|
123
|
+
|
|
124
|
+
export const HelpBubbleCloseButton = withContext<HTMLButtonElement, HelpBubbleCloseButtonProps>(
|
|
125
|
+
PopoverPrimitive.CloseButton,
|
|
126
|
+
"closeButton",
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
130
|
+
|
|
131
|
+
export interface HelpBubbleCloseIconProps extends IconProps {}
|
|
132
|
+
|
|
133
|
+
export const HelpBubbleCloseIcon = withContext<SVGSVGElement, HelpBubbleCloseIconProps>(
|
|
134
|
+
withStateProps(Icon),
|
|
135
|
+
"closeIcon",
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
139
|
+
|
|
140
|
+
export interface HelpBubbleTitleProps
|
|
141
|
+
extends PrimitiveProps,
|
|
142
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
143
|
+
|
|
144
|
+
export const HelpBubbleTitle = withContext<HTMLSpanElement, HelpBubbleTitleProps>(
|
|
145
|
+
withStateProps(Primitive.span),
|
|
146
|
+
"title",
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
150
|
+
|
|
151
|
+
export interface HelpBubbleDescriptionProps
|
|
152
|
+
extends PrimitiveProps,
|
|
153
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
154
|
+
|
|
155
|
+
export const HelpBubbleDescription = withContext<HTMLDivElement, HelpBubbleDescriptionProps>(
|
|
156
|
+
withStateProps(Primitive.div),
|
|
157
|
+
"description",
|
|
158
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export {
|
|
2
|
+
HelpBubbleAnchor,
|
|
3
|
+
HelpBubbleArrow,
|
|
4
|
+
HelpBubbleArrowTip,
|
|
5
|
+
HelpBubbleBackdrop,
|
|
6
|
+
HelpBubbleCloseButton,
|
|
7
|
+
HelpBubbleCloseIcon,
|
|
8
|
+
HelpBubbleContent,
|
|
9
|
+
HelpBubbleDescription,
|
|
10
|
+
HelpBubblePositioner,
|
|
11
|
+
HelpBubbleRoot,
|
|
12
|
+
HelpBubbleTitle,
|
|
13
|
+
HelpBubbleTrigger,
|
|
14
|
+
type HelpBubbleAnchorProps,
|
|
15
|
+
type HelpBubbleArrowProps,
|
|
16
|
+
type HelpBubbleArrowTipProps,
|
|
17
|
+
type HelpBubbleBackdropProps,
|
|
18
|
+
type HelpBubbleCloseButtonProps,
|
|
19
|
+
type HelpBubbleCloseIconProps,
|
|
20
|
+
type HelpBubbleContentProps,
|
|
21
|
+
type HelpBubbleDescriptionProps,
|
|
22
|
+
type HelpBubblePositionerProps,
|
|
23
|
+
type HelpBubbleRootProps,
|
|
24
|
+
type HelpBubbleTitleProps,
|
|
25
|
+
type HelpBubbleTriggerProps,
|
|
26
|
+
} from "./HelpBubble";
|
|
27
|
+
|
|
28
|
+
export * as HelpBubble from "./HelpBubble.namespace";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Box, type BoxProps } from "../Box/Box";
|
|
3
|
+
|
|
4
|
+
export interface InlineProps extends Omit<BoxProps, "display" | "direction" | "flexWrap"> {}
|
|
5
|
+
|
|
6
|
+
export const Inline = React.forwardRef<HTMLDivElement, InlineProps>((props, ref) => {
|
|
7
|
+
return (
|
|
8
|
+
<Box
|
|
9
|
+
ref={ref}
|
|
10
|
+
display="flex"
|
|
11
|
+
flexDirection="row"
|
|
12
|
+
flexWrap="wrap"
|
|
13
|
+
alignItems="flexStart"
|
|
14
|
+
justifyContent="flexStart"
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Inline, type InlineProps } from "./Inline";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export {
|
|
2
|
+
InlineBannerActionableIcon as ActionableIcon,
|
|
3
|
+
InlineBannerContent as Content,
|
|
4
|
+
InlineBannerDescription as Description,
|
|
5
|
+
InlineBannerDismissButton as DismissButton,
|
|
6
|
+
InlineBannerDismissIcon as DismissIcon,
|
|
7
|
+
InlineBannerIcon as Icon,
|
|
8
|
+
InlineBannerLink as Link,
|
|
9
|
+
InlineBannerRoot as Root,
|
|
10
|
+
InlineBannerTextContent as TextContent,
|
|
11
|
+
InlineBannerTitle as Title,
|
|
12
|
+
type InlineBannerActionableIconProps as ActionableIconProps,
|
|
13
|
+
type InlineBannerContentProps as ContentProps,
|
|
14
|
+
type InlineBannerDescriptionProps as DescriptionProps,
|
|
15
|
+
type InlineBannerDismissButtonProps as DismissButtonProps,
|
|
16
|
+
type InlineBannerDismissIconProps as DismissIconProps,
|
|
17
|
+
type InlineBannerIconProps as IconProps,
|
|
18
|
+
type InlineBannerLinkProps as LinkProps,
|
|
19
|
+
type InlineBannerRootProps as RootProps,
|
|
20
|
+
type InlineBannerTextContentProps as TextContentProps,
|
|
21
|
+
type InlineBannerTitleProps as TitleProps,
|
|
22
|
+
} from "./InlineBanner";
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
5
|
+
import { inlineBanner, type InlineBannerVariantProps } from "@seed-design/recipe/inlineBanner";
|
|
6
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
7
|
+
import { Icon, type IconProps } from "../private/Icon";
|
|
8
|
+
import {
|
|
9
|
+
DismissibleDismissButton,
|
|
10
|
+
DismissibleRoot,
|
|
11
|
+
type DismissibleRootProps,
|
|
12
|
+
} from "../private/useDismissible";
|
|
13
|
+
|
|
14
|
+
const { withContext, withProvider, useClassNames } = createStyleContext(inlineBanner);
|
|
15
|
+
|
|
16
|
+
export interface InlineBannerRootProps extends InlineBannerVariantProps, DismissibleRootProps {}
|
|
17
|
+
|
|
18
|
+
export const InlineBannerRoot = withProvider<HTMLDivElement, InlineBannerRootProps>(
|
|
19
|
+
DismissibleRoot,
|
|
20
|
+
"root",
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export interface InlineBannerContentProps
|
|
24
|
+
extends PrimitiveProps,
|
|
25
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
26
|
+
|
|
27
|
+
export const InlineBannerContent = withContext<HTMLDivElement, InlineBannerContentProps>(
|
|
28
|
+
Primitive.div,
|
|
29
|
+
"content",
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export interface InlineBannerIconProps extends IconProps {}
|
|
33
|
+
|
|
34
|
+
export const InlineBannerIcon = withContext<SVGSVGElement, InlineBannerIconProps>(Icon, "icon");
|
|
35
|
+
|
|
36
|
+
export interface InlineBannerTextContentProps
|
|
37
|
+
extends PrimitiveProps,
|
|
38
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
39
|
+
|
|
40
|
+
export const InlineBannerTextContent = React.forwardRef<
|
|
41
|
+
HTMLDivElement,
|
|
42
|
+
InlineBannerTextContentProps
|
|
43
|
+
>((props, ref) => {
|
|
44
|
+
return <Primitive.div ref={ref} {...props} />;
|
|
45
|
+
});
|
|
46
|
+
InlineBannerTextContent.displayName = "InlineBannerTextContent";
|
|
47
|
+
|
|
48
|
+
export interface InlineBannerTitleProps
|
|
49
|
+
extends PrimitiveProps,
|
|
50
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
51
|
+
|
|
52
|
+
export const InlineBannerTitle = React.forwardRef<HTMLSpanElement, InlineBannerTitleProps>(
|
|
53
|
+
({ className, ...otherProps }, ref) => {
|
|
54
|
+
const classNames = useClassNames();
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<>
|
|
58
|
+
<Primitive.span ref={ref} className={clsx(classNames.title, className)} {...otherProps} />
|
|
59
|
+
<Primitive.span className={classNames.spacer}> </Primitive.span>
|
|
60
|
+
</>
|
|
61
|
+
);
|
|
62
|
+
},
|
|
63
|
+
);
|
|
64
|
+
InlineBannerTitle.displayName = "InlineBannerTitle";
|
|
65
|
+
|
|
66
|
+
export interface InlineBannerDescriptionProps
|
|
67
|
+
extends PrimitiveProps,
|
|
68
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
69
|
+
|
|
70
|
+
export const InlineBannerDescription = withContext<HTMLSpanElement, InlineBannerDescriptionProps>(
|
|
71
|
+
Primitive.span,
|
|
72
|
+
"description",
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
export interface InlineBannerLinkProps
|
|
76
|
+
extends PrimitiveProps,
|
|
77
|
+
React.ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
78
|
+
|
|
79
|
+
export const InlineBannerLink = withContext<HTMLButtonElement, InlineBannerLinkProps>(
|
|
80
|
+
Primitive.button,
|
|
81
|
+
"linkLabel",
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
export interface InlineBannerDismissButtonProps
|
|
85
|
+
extends PrimitiveProps,
|
|
86
|
+
React.ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
87
|
+
|
|
88
|
+
export const InlineBannerDismissButton = withContext<
|
|
89
|
+
HTMLButtonElement,
|
|
90
|
+
InlineBannerDismissButtonProps
|
|
91
|
+
>(DismissibleDismissButton, "dismissButton");
|
|
92
|
+
|
|
93
|
+
export interface InlineBannerDismissIconProps extends IconProps {}
|
|
94
|
+
|
|
95
|
+
export const InlineBannerDismissIcon = withContext<SVGSVGElement, InlineBannerDismissIconProps>(
|
|
96
|
+
Icon,
|
|
97
|
+
"dismissIcon",
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
export interface InlineBannerActionableIconProps extends IconProps {}
|
|
101
|
+
|
|
102
|
+
export const InlineBannerActionableIcon = withContext<
|
|
103
|
+
SVGSVGElement,
|
|
104
|
+
InlineBannerActionableIconProps
|
|
105
|
+
>(Icon, "actionableIcon");
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export {
|
|
2
|
+
InlineBannerActionableIcon,
|
|
3
|
+
InlineBannerContent,
|
|
4
|
+
InlineBannerDescription,
|
|
5
|
+
InlineBannerDismissButton,
|
|
6
|
+
InlineBannerDismissIcon,
|
|
7
|
+
InlineBannerIcon,
|
|
8
|
+
InlineBannerLink,
|
|
9
|
+
InlineBannerRoot,
|
|
10
|
+
InlineBannerTextContent,
|
|
11
|
+
InlineBannerTitle,
|
|
12
|
+
type InlineBannerActionableIconProps,
|
|
13
|
+
type InlineBannerContentProps,
|
|
14
|
+
type InlineBannerDescriptionProps,
|
|
15
|
+
type InlineBannerDismissButtonProps,
|
|
16
|
+
type InlineBannerDismissIconProps,
|
|
17
|
+
type InlineBannerIconProps,
|
|
18
|
+
type InlineBannerLinkProps,
|
|
19
|
+
type InlineBannerRootProps,
|
|
20
|
+
type InlineBannerTextContentProps,
|
|
21
|
+
type InlineBannerTitleProps,
|
|
22
|
+
} from "./InlineBanner";
|
|
23
|
+
|
|
24
|
+
export * as InlineBanner from "./InlineBanner.namespace";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
+
import {
|
|
3
|
+
mannerTempBadge,
|
|
4
|
+
type MannerTempBadgeVariantProps,
|
|
5
|
+
} from "@seed-design/recipe/mannerTempBadge";
|
|
6
|
+
import type * as React from "react";
|
|
7
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
8
|
+
|
|
9
|
+
const { withProvider, withContext } = createStyleContext(mannerTempBadge);
|
|
10
|
+
|
|
11
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
12
|
+
|
|
13
|
+
export interface MannerTempBadgeRootProps
|
|
14
|
+
extends MannerTempBadgeVariantProps,
|
|
15
|
+
PrimitiveProps,
|
|
16
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
17
|
+
|
|
18
|
+
export const MannerTempBadgeRoot = withProvider<HTMLSpanElement, MannerTempBadgeRootProps>(
|
|
19
|
+
Primitive.span,
|
|
20
|
+
"root",
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
24
|
+
|
|
25
|
+
export interface MannerTempBadgeLabelProps
|
|
26
|
+
extends PrimitiveProps,
|
|
27
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
28
|
+
|
|
29
|
+
export const MannerTempBadgeLabel = withContext<HTMLSpanElement, MannerTempBadgeLabelProps>(
|
|
30
|
+
Primitive.span,
|
|
31
|
+
"label",
|
|
32
|
+
);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ProgressCircleRoot as Root,
|
|
3
|
+
ProgressCircleTrack as Track,
|
|
4
|
+
ProgressCircleRange as Range,
|
|
5
|
+
type ProgressCircleRootProps as RootProps,
|
|
6
|
+
type ProgressCircleTrackProps as TrackProps,
|
|
7
|
+
type ProgressCircleRangeProps as RangeProps,
|
|
8
|
+
} from "./ProgressCircle";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ProgressCircle as ProgressCirclePrimitive } from "@seed-design/react-progress";
|
|
2
|
+
import {
|
|
3
|
+
progressCircle,
|
|
4
|
+
type ProgressCircleVariantProps,
|
|
5
|
+
} from "@seed-design/recipe/progressCircle";
|
|
6
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
7
|
+
|
|
8
|
+
const { withContext, withProvider } = createStyleContext(progressCircle);
|
|
9
|
+
|
|
10
|
+
export interface ProgressCircleRootProps
|
|
11
|
+
extends ProgressCirclePrimitive.RootProps,
|
|
12
|
+
Omit<ProgressCircleVariantProps, "indeterminate"> {}
|
|
13
|
+
|
|
14
|
+
export const ProgressCircleRoot = withProvider<SVGSVGElement, ProgressCircleRootProps>(
|
|
15
|
+
ProgressCirclePrimitive.Root,
|
|
16
|
+
"root",
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export interface ProgressCircleTrackProps extends ProgressCirclePrimitive.TrackProps {}
|
|
20
|
+
|
|
21
|
+
export const ProgressCircleTrack = withContext<SVGCircleElement, ProgressCircleTrackProps>(
|
|
22
|
+
ProgressCirclePrimitive.Track,
|
|
23
|
+
"track",
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export interface ProgressCircleRangeProps extends ProgressCirclePrimitive.RangeProps {}
|
|
27
|
+
|
|
28
|
+
export const ProgressCircleRange = withContext<SVGCircleElement, ProgressCircleRangeProps>(
|
|
29
|
+
ProgressCirclePrimitive.Range,
|
|
30
|
+
"range",
|
|
31
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ProgressCircleRoot,
|
|
3
|
+
ProgressCircleTrack,
|
|
4
|
+
ProgressCircleRange,
|
|
5
|
+
type ProgressCircleRootProps,
|
|
6
|
+
type ProgressCircleTrackProps,
|
|
7
|
+
type ProgressCircleRangeProps,
|
|
8
|
+
} from "./ProgressCircle";
|
|
9
|
+
|
|
10
|
+
export * as ProgressCircle from "./ProgressCircle.namespace";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export {
|
|
2
|
+
PullToRefreshContent as Content,
|
|
3
|
+
PullToRefreshIndicator as Indicator,
|
|
4
|
+
PullToRefreshRoot as Root,
|
|
5
|
+
type PullToRefreshContentProps as ContentProps,
|
|
6
|
+
type PullToRefreshIndicatorProps as IndicatorProps,
|
|
7
|
+
type PullToRefreshRootProps as RootProps,
|
|
8
|
+
} from "./PullToRefresh";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PullToRefresh as PullToRefreshPrimitive } from "@seed-design/react-pull-to-refresh";
|
|
2
|
+
import { pullToRefresh, type PullToRefreshVariantProps } from "@seed-design/recipe/pullToRefresh";
|
|
3
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
4
|
+
|
|
5
|
+
const { withContext, withProvider } = createStyleContext(pullToRefresh);
|
|
6
|
+
|
|
7
|
+
export interface PullToRefreshRootProps
|
|
8
|
+
extends PullToRefreshVariantProps,
|
|
9
|
+
PullToRefreshPrimitive.RootProps {}
|
|
10
|
+
|
|
11
|
+
export const PullToRefreshRoot = withProvider<SVGSVGElement, PullToRefreshRootProps>(
|
|
12
|
+
PullToRefreshPrimitive.Root,
|
|
13
|
+
"root",
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export interface PullToRefreshIndicatorProps extends PullToRefreshPrimitive.IndicatorProps {}
|
|
17
|
+
|
|
18
|
+
export const PullToRefreshIndicator = withContext<SVGCircleElement, PullToRefreshIndicatorProps>(
|
|
19
|
+
PullToRefreshPrimitive.Indicator,
|
|
20
|
+
"indicator",
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export interface PullToRefreshContentProps extends PullToRefreshPrimitive.ContentProps {}
|
|
24
|
+
|
|
25
|
+
export const PullToRefreshContent = PullToRefreshPrimitive.Content;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export {
|
|
2
|
+
PullToRefreshContent,
|
|
3
|
+
PullToRefreshIndicator,
|
|
4
|
+
PullToRefreshRoot,
|
|
5
|
+
type PullToRefreshContentProps,
|
|
6
|
+
type PullToRefreshIndicatorProps,
|
|
7
|
+
type PullToRefreshRootProps,
|
|
8
|
+
} from "./PullToRefresh";
|
|
9
|
+
|
|
10
|
+
export * as PullToRefresh from "./PullToRefresh.namespace";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ReactionButtonCount as Count,
|
|
3
|
+
ReactionButtonLabel as Label,
|
|
4
|
+
ReactionButtonPrefixIcon as PrefixIcon,
|
|
5
|
+
ReactionButtonProgressIndicator as ProgressIndicator,
|
|
6
|
+
ReactionButtonRoot as Root,
|
|
7
|
+
type ReactionButtonCountProps as CountProps,
|
|
8
|
+
type ReactionButtonLabelProps as LabelProps,
|
|
9
|
+
type ReactionButtonPrefixIconProps as PrefixIconProps,
|
|
10
|
+
type ReactionButtonProgressIndicatorProps as ProgressIndicatorProps,
|
|
11
|
+
type ReactionButtonRootProps as RootProps,
|
|
12
|
+
} from "./ReactionButton";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
+
import { Toggle as TogglePrimitive, useToggleContext } from "@seed-design/react-toggle";
|
|
3
|
+
import {
|
|
4
|
+
reactionButton,
|
|
5
|
+
type ReactionButtonVariantProps,
|
|
6
|
+
} from "@seed-design/recipe/reactionButton";
|
|
7
|
+
import clsx from "clsx";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { createStyleContext } from "../../utils/createStyleContext";
|
|
10
|
+
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
11
|
+
import { Icon, type IconProps } from "../private/Icon";
|
|
12
|
+
import {
|
|
13
|
+
PendingButtonProvider,
|
|
14
|
+
usePendingButton,
|
|
15
|
+
usePendingButtonContext,
|
|
16
|
+
type UsePendingButtonProps,
|
|
17
|
+
} from "../private/usePendingButton";
|
|
18
|
+
|
|
19
|
+
const { ClassNamesProvider, withContext } = createStyleContext(reactionButton);
|
|
20
|
+
const withStateProps = createWithStateProps([usePendingButtonContext, useToggleContext]);
|
|
21
|
+
|
|
22
|
+
export interface ReactionButtonRootProps
|
|
23
|
+
extends ReactionButtonVariantProps,
|
|
24
|
+
UsePendingButtonProps,
|
|
25
|
+
TogglePrimitive.RootProps {}
|
|
26
|
+
|
|
27
|
+
export const ReactionButtonRoot = React.forwardRef<HTMLButtonElement, ReactionButtonRootProps>(
|
|
28
|
+
({ size = "small", loading = false, className, ...otherProps }, ref) => {
|
|
29
|
+
const classNames = reactionButton({ size });
|
|
30
|
+
const api = usePendingButton({ loading, disabled: otherProps.disabled });
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<ClassNamesProvider value={classNames}>
|
|
34
|
+
<PendingButtonProvider value={api}>
|
|
35
|
+
<TogglePrimitive.Root
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={clsx(classNames.root, className)}
|
|
38
|
+
{...api.stateProps}
|
|
39
|
+
{...otherProps}
|
|
40
|
+
/>
|
|
41
|
+
</PendingButtonProvider>
|
|
42
|
+
</ClassNamesProvider>
|
|
43
|
+
);
|
|
44
|
+
},
|
|
45
|
+
);
|
|
46
|
+
ReactionButtonRoot.displayName = "ReactionButton";
|
|
47
|
+
|
|
48
|
+
export interface ReactionButtonLabelProps
|
|
49
|
+
extends PrimitiveProps,
|
|
50
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
51
|
+
|
|
52
|
+
export const ReactionButtonLabel = withContext<HTMLSpanElement, ReactionButtonLabelProps>(
|
|
53
|
+
withStateProps(Primitive.span),
|
|
54
|
+
"label",
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
export interface ReactionButtonCountProps
|
|
58
|
+
extends PrimitiveProps,
|
|
59
|
+
React.HTMLAttributes<HTMLSpanElement> {}
|
|
60
|
+
|
|
61
|
+
export const ReactionButtonCount = withContext<HTMLSpanElement, ReactionButtonCountProps>(
|
|
62
|
+
withStateProps(Primitive.span),
|
|
63
|
+
"count",
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
export interface ReactionButtonPrefixIconProps extends IconProps {}
|
|
67
|
+
|
|
68
|
+
export const ReactionButtonPrefixIcon = withContext<SVGSVGElement, ReactionButtonPrefixIconProps>(
|
|
69
|
+
withStateProps(Icon),
|
|
70
|
+
"prefixIcon",
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
export interface ReactionButtonProgressIndicatorProps
|
|
74
|
+
extends PrimitiveProps,
|
|
75
|
+
React.HTMLAttributes<HTMLDivElement> {}
|
|
76
|
+
|
|
77
|
+
export const ReactionButtonProgressIndicator = withContext<
|
|
78
|
+
HTMLDivElement,
|
|
79
|
+
ReactionButtonProgressIndicatorProps
|
|
80
|
+
>(withStateProps(Primitive.div), "progressIndicator");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ReactionButtonCount,
|
|
3
|
+
ReactionButtonLabel,
|
|
4
|
+
ReactionButtonPrefixIcon,
|
|
5
|
+
ReactionButtonProgressIndicator,
|
|
6
|
+
ReactionButtonRoot,
|
|
7
|
+
type ReactionButtonCountProps,
|
|
8
|
+
type ReactionButtonLabelProps,
|
|
9
|
+
type ReactionButtonPrefixIconProps,
|
|
10
|
+
type ReactionButtonProgressIndicatorProps,
|
|
11
|
+
type ReactionButtonRootProps,
|
|
12
|
+
} from "./ReactionButton";
|
|
13
|
+
|
|
14
|
+
export * as ReactionButton from "./ReactionButton.namespace";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export {
|
|
2
|
+
SegmentedControlIndicator as Indicator,
|
|
3
|
+
SegmentedControlRoot as Root,
|
|
4
|
+
SegmentedControlItem as Item,
|
|
5
|
+
SegmentedControlItemHiddenInput as SegmentHiddenInput,
|
|
6
|
+
SegmentedControlItemLabel as SegmentLabel,
|
|
7
|
+
type SegmentedControlIndicatorProps as IndicatorProps,
|
|
8
|
+
type SegmentedControlRootProps as RootProps,
|
|
9
|
+
type SegmentedControlItemProps as ItemProps,
|
|
10
|
+
type SegmentedControlItemHiddenInputProps as SegmentHiddenInputProps,
|
|
11
|
+
type SegmentedControlItemLabelProps as SegmentLabelProps,
|
|
12
|
+
} from "./SegmentedControl";
|