@seed-design/react 1.1.26 → 1.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/ActionButton/ActionButton.cjs +72 -46
- package/lib/components/ActionButton/ActionButton.js +49 -43
- package/lib/components/ActionButton/index.cjs +9 -3
- package/lib/components/ActionButton/index.js +1 -2
- package/lib/components/ActionChip/ActionChip.cjs +16 -13
- package/lib/components/ActionChip/ActionChip.js +12 -12
- package/lib/components/ActionChip/index.cjs +9 -3
- package/lib/components/ActionChip/index.js +1 -2
- package/lib/components/ActionSheet/ActionSheet.cjs +56 -61
- package/lib/components/ActionSheet/ActionSheet.js +52 -60
- package/lib/components/ActionSheet/ActionSheet.namespace.cjs +19 -23
- package/lib/components/ActionSheet/ActionSheet.namespace.js +1 -18
- package/lib/components/ActionSheet/index.cjs +21 -20
- package/lib/components/ActionSheet/index.js +3 -3
- package/lib/components/Article/Article.cjs +44 -19
- package/lib/components/Article/Article.js +21 -16
- package/lib/components/Article/index.cjs +9 -3
- package/lib/components/Article/index.js +1 -2
- package/lib/components/Avatar/Avatar.cjs +58 -35
- package/lib/components/Avatar/Avatar.js +36 -33
- package/lib/components/Avatar/Avatar.namespace.cjs +13 -17
- package/lib/components/Avatar/Avatar.namespace.js +1 -12
- package/lib/components/Avatar/index.cjs +15 -14
- package/lib/components/Avatar/index.js +3 -3
- package/lib/components/Badge/Badge.cjs +19 -23
- package/lib/components/Badge/Badge.js +15 -21
- package/lib/components/Badge/index.cjs +9 -3
- package/lib/components/Badge/index.js +1 -2
- package/lib/components/BottomSheet/BottomSheet.cjs +52 -21
- package/lib/components/BottomSheet/BottomSheet.js +48 -20
- package/lib/components/BottomSheet/BottomSheet.namespace.cjs +21 -25
- package/lib/components/BottomSheet/BottomSheet.namespace.js +2 -20
- package/lib/components/BottomSheet/index.cjs +21 -20
- package/lib/components/BottomSheet/index.js +3 -3
- package/lib/components/BottomSheetHandle/BottomSheetHandle.cjs +19 -24
- package/lib/components/BottomSheetHandle/BottomSheetHandle.js +15 -21
- package/lib/components/BottomSheetHandle/index.cjs +9 -3
- package/lib/components/BottomSheetHandle/index.js +1 -2
- package/lib/components/Box/Box.cjs +38 -26
- package/lib/components/Box/Box.js +15 -23
- package/lib/components/Box/index.cjs +9 -3
- package/lib/components/Box/index.js +1 -2
- package/lib/components/Callout/Callout.cjs +33 -15
- package/lib/components/Callout/Callout.js +29 -14
- package/lib/components/Callout/Callout.namespace.cjs +14 -18
- package/lib/components/Callout/Callout.namespace.js +1 -13
- package/lib/components/Callout/index.cjs +16 -15
- package/lib/components/Callout/index.js +3 -3
- package/lib/components/Celsius/Celsius.cjs +8 -5
- package/lib/components/Celsius/Celsius.js +4 -5
- package/lib/components/Celsius/index.cjs +9 -3
- package/lib/components/Celsius/index.js +1 -2
- package/lib/components/Checkbox/Checkbox.cjs +89 -66
- package/lib/components/Checkbox/Checkbox.js +85 -64
- package/lib/components/Checkbox/Checkbox.namespace.cjs +13 -17
- package/lib/components/Checkbox/Checkbox.namespace.js +1 -12
- package/lib/components/Checkbox/index.cjs +15 -14
- package/lib/components/Checkbox/index.js +3 -3
- package/lib/components/Chip/Chip.cjs +39 -24
- package/lib/components/Chip/Chip.js +35 -23
- package/lib/components/Chip/Chip.namespace.cjs +13 -17
- package/lib/components/Chip/Chip.namespace.js +1 -12
- package/lib/components/Chip/index.cjs +15 -14
- package/lib/components/Chip/index.js +3 -3
- package/lib/components/ChipTabs/ChipTabs.cjs +53 -30
- package/lib/components/ChipTabs/ChipTabs.js +49 -28
- package/lib/components/ChipTabs/ChipTabs.namespace.cjs +14 -18
- package/lib/components/ChipTabs/ChipTabs.namespace.js +1 -13
- package/lib/components/ChipTabs/index.cjs +16 -15
- package/lib/components/ChipTabs/index.js +3 -3
- package/lib/components/Columns/Columns.cjs +55 -34
- package/lib/components/Columns/Columns.js +32 -32
- package/lib/components/Columns/index.cjs +10 -4
- package/lib/components/Columns/index.js +1 -2
- package/lib/components/ConsistentWidth/ConsistentWidth.cjs +22 -17
- package/lib/components/ConsistentWidth/ConsistentWidth.js +18 -15
- package/lib/components/ConsistentWidth/index.cjs +9 -3
- package/lib/components/ConsistentWidth/index.js +1 -2
- package/lib/components/ContextualFloatingButton/ContextualFloatingButton.cjs +51 -36
- package/lib/components/ContextualFloatingButton/ContextualFloatingButton.js +28 -33
- package/lib/components/ContextualFloatingButton/index.cjs +9 -3
- package/lib/components/ContextualFloatingButton/index.js +1 -2
- package/lib/components/ControlChip/ControlChip.cjs +16 -13
- package/lib/components/ControlChip/ControlChip.js +12 -12
- package/lib/components/ControlChip/index.cjs +9 -3
- package/lib/components/ControlChip/index.js +1 -2
- package/lib/components/Count/Count.cjs +14 -16
- package/lib/components/Count/Count.js +10 -14
- package/lib/components/Count/index.cjs +9 -3
- package/lib/components/Count/index.js +1 -2
- package/lib/components/Dialog/Dialog.cjs +44 -24
- package/lib/components/Dialog/Dialog.js +40 -23
- package/lib/components/Dialog/Dialog.namespace.cjs +18 -22
- package/lib/components/Dialog/Dialog.namespace.js +1 -17
- package/lib/components/Dialog/index.cjs +20 -19
- package/lib/components/Dialog/index.js +3 -3
- package/lib/components/Divider/Divider.cjs +68 -32
- package/lib/components/Divider/Divider.js +45 -30
- package/lib/components/Divider/index.cjs +9 -3
- package/lib/components/Divider/index.js +1 -2
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.cjs +43 -65
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.js +39 -64
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.cjs +20 -24
- package/lib/components/ExtendedActionSheet/ExtendedActionSheet.namespace.js +1 -19
- package/lib/components/ExtendedActionSheet/index.cjs +22 -21
- package/lib/components/ExtendedActionSheet/index.js +3 -3
- package/lib/components/ExtendedFab/ExtendedFab.cjs +17 -15
- package/lib/components/ExtendedFab/ExtendedFab.js +13 -14
- package/lib/components/ExtendedFab/index.cjs +9 -3
- package/lib/components/ExtendedFab/index.js +1 -2
- package/lib/components/Fab/Fab.cjs +12 -12
- package/lib/components/Fab/Fab.js +8 -11
- package/lib/components/Fab/index.cjs +9 -3
- package/lib/components/Fab/index.js +1 -2
- package/lib/components/Field/Field.cjs +107 -62
- package/lib/components/Field/Field.js +103 -60
- package/lib/components/Field/Field.namespace.cjs +17 -21
- package/lib/components/Field/Field.namespace.js +1 -16
- package/lib/components/Field/index.cjs +19 -18
- package/lib/components/Field/index.js +3 -3
- package/lib/components/FieldButton/FieldButton.cjs +177 -94
- package/lib/components/FieldButton/FieldButton.js +154 -91
- package/lib/components/FieldButton/FieldButton.namespace.cjs +26 -30
- package/lib/components/FieldButton/FieldButton.namespace.js +1 -25
- package/lib/components/FieldButton/index.cjs +28 -27
- package/lib/components/FieldButton/index.js +3 -3
- package/lib/components/Flex/Flex.cjs +45 -21
- package/lib/components/Flex/Flex.js +22 -19
- package/lib/components/Flex/index.cjs +9 -3
- package/lib/components/Flex/index.js +1 -2
- package/lib/components/Float/Float.cjs +104 -70
- package/lib/components/Float/Float.js +81 -68
- package/lib/components/Float/index.cjs +9 -3
- package/lib/components/Float/index.js +1 -2
- package/lib/components/FloatingActionButton/FloatingActionButton.cjs +15 -12
- package/lib/components/FloatingActionButton/FloatingActionButton.js +11 -11
- package/lib/components/FloatingActionButton/FloatingActionButton.namespace.cjs +11 -15
- package/lib/components/FloatingActionButton/FloatingActionButton.namespace.js +1 -10
- package/lib/components/FloatingActionButton/index.cjs +13 -12
- package/lib/components/FloatingActionButton/index.js +3 -3
- package/lib/components/HelpBubble/HelpBubble.cjs +81 -51
- package/lib/components/HelpBubble/HelpBubble.js +77 -49
- package/lib/components/HelpBubble/HelpBubble.namespace.cjs +19 -23
- package/lib/components/HelpBubble/HelpBubble.namespace.js +1 -18
- package/lib/components/HelpBubble/index.cjs +21 -20
- package/lib/components/HelpBubble/index.js +3 -3
- package/lib/components/Icon/Icon.cjs +120 -99
- package/lib/components/Icon/Icon.js +116 -98
- package/lib/components/Icon/index.cjs +11 -5
- package/lib/components/Icon/index.js +1 -2
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.cjs +71 -50
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.js +48 -48
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.cjs +10 -14
- package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.js +1 -9
- package/lib/components/IdentityPlaceholder/index.cjs +12 -11
- package/lib/components/IdentityPlaceholder/index.js +3 -3
- package/lib/components/Inline/Inline.cjs +42 -21
- package/lib/components/Inline/Inline.js +19 -19
- package/lib/components/Inline/index.cjs +9 -3
- package/lib/components/Inline/index.js +1 -2
- package/lib/components/InlineBanner/InlineBanner.cjs +36 -33
- package/lib/components/InlineBanner/InlineBanner.js +32 -32
- package/lib/components/InlineBanner/InlineBanner.namespace.cjs +14 -18
- package/lib/components/InlineBanner/InlineBanner.namespace.js +1 -13
- package/lib/components/InlineBanner/index.cjs +16 -15
- package/lib/components/InlineBanner/index.js +3 -3
- package/lib/components/LinkContent/LinkContent.cjs +15 -13
- package/lib/components/LinkContent/LinkContent.js +11 -12
- package/lib/components/LinkContent/index.cjs +9 -3
- package/lib/components/LinkContent/index.js +1 -2
- package/lib/components/List/List.cjs +63 -46
- package/lib/components/List/List.js +59 -45
- package/lib/components/List/List.namespace.cjs +15 -19
- package/lib/components/List/List.namespace.js +1 -14
- package/lib/components/List/ListHeader.cjs +18 -18
- package/lib/components/List/ListHeader.js +14 -16
- package/lib/components/List/index.cjs +19 -18
- package/lib/components/List/index.js +4 -4
- package/lib/components/LoadingIndicator/LoadingIndicator.cjs +26 -24
- package/lib/components/LoadingIndicator/LoadingIndicator.js +22 -23
- package/lib/components/LoadingIndicator/index.cjs +9 -3
- package/lib/components/LoadingIndicator/index.js +1 -2
- package/lib/components/LoadingIndicator/usePendingButton.cjs +46 -22
- package/lib/components/LoadingIndicator/usePendingButton.js +23 -20
- package/lib/components/MannerTemp/MannerTemp.cjs +18 -20
- package/lib/components/MannerTemp/MannerTemp.js +14 -19
- package/lib/components/MannerTemp/MannerTempEmote.cjs +96 -130
- package/lib/components/MannerTemp/MannerTempEmote.js +92 -129
- package/lib/components/MannerTemp/index.cjs +11 -5
- package/lib/components/MannerTemp/index.js +2 -3
- package/lib/components/MannerTempBadge/MannerTempBadge.cjs +12 -9
- package/lib/components/MannerTempBadge/MannerTempBadge.js +8 -8
- package/lib/components/MannerTempBadge/index.cjs +9 -3
- package/lib/components/MannerTempBadge/index.js +1 -2
- package/lib/components/MenuSheet/MenuSheet.cjs +106 -61
- package/lib/components/MenuSheet/MenuSheet.js +83 -59
- package/lib/components/MenuSheet/MenuSheet.namespace.cjs +20 -24
- package/lib/components/MenuSheet/MenuSheet.namespace.js +1 -19
- package/lib/components/MenuSheet/index.cjs +22 -21
- package/lib/components/MenuSheet/index.js +3 -3
- package/lib/components/NotificationBadge/NotificationBadge.cjs +41 -29
- package/lib/components/NotificationBadge/NotificationBadge.js +19 -27
- package/lib/components/NotificationBadge/index.cjs +10 -4
- package/lib/components/NotificationBadge/index.js +1 -2
- package/lib/components/PageBanner/PageBanner.cjs +51 -32
- package/lib/components/PageBanner/PageBanner.js +47 -30
- package/lib/components/PageBanner/PageBanner.namespace.cjs +15 -19
- package/lib/components/PageBanner/PageBanner.namespace.js +1 -14
- package/lib/components/PageBanner/index.cjs +17 -16
- package/lib/components/PageBanner/index.js +3 -3
- package/lib/components/Portal/index.cjs +10 -7
- package/lib/components/Portal/index.js +1 -2
- package/lib/components/ProgressCircle/ProgressCircle.cjs +23 -11
- package/lib/components/ProgressCircle/ProgressCircle.js +19 -10
- package/lib/components/ProgressCircle/ProgressCircle.namespace.cjs +11 -15
- package/lib/components/ProgressCircle/ProgressCircle.namespace.js +1 -10
- package/lib/components/ProgressCircle/index.cjs +13 -12
- package/lib/components/ProgressCircle/index.js +3 -3
- package/lib/components/PullToRefresh/PullToRefresh.cjs +20 -11
- package/lib/components/PullToRefresh/PullToRefresh.js +16 -10
- package/lib/components/PullToRefresh/PullToRefresh.namespace.cjs +15 -16
- package/lib/components/PullToRefresh/PullToRefresh.namespace.js +2 -12
- package/lib/components/PullToRefresh/index.cjs +16 -18
- package/lib/components/PullToRefresh/index.js +4 -4
- package/lib/components/RadioGroup/RadioGroup.cjs +72 -66
- package/lib/components/RadioGroup/RadioGroup.js +68 -64
- package/lib/components/RadioGroup/RadioGroup.namespace.cjs +14 -18
- package/lib/components/RadioGroup/RadioGroup.namespace.js +1 -13
- package/lib/components/RadioGroup/index.cjs +16 -15
- package/lib/components/RadioGroup/index.js +3 -3
- package/lib/components/ReactionButton/ReactionButton.cjs +47 -28
- package/lib/components/ReactionButton/ReactionButton.js +24 -25
- package/lib/components/ReactionButton/index.cjs +9 -3
- package/lib/components/ReactionButton/index.js +1 -2
- package/lib/components/ResponsivePair/ResponsivePair.cjs +57 -34
- package/lib/components/ResponsivePair/ResponsivePair.js +34 -32
- package/lib/components/ResponsivePair/index.cjs +9 -3
- package/lib/components/ResponsivePair/index.js +1 -2
- package/lib/components/ScrollFog/ScrollFog.cjs +61 -49
- package/lib/components/ScrollFog/ScrollFog.js +57 -47
- package/lib/components/ScrollFog/index.cjs +9 -3
- package/lib/components/ScrollFog/index.js +1 -2
- package/lib/components/SegmentedControl/SegmentedControl.cjs +22 -13
- package/lib/components/SegmentedControl/SegmentedControl.js +18 -12
- package/lib/components/SegmentedControl/SegmentedControl.namespace.cjs +12 -16
- package/lib/components/SegmentedControl/SegmentedControl.namespace.js +1 -11
- package/lib/components/SegmentedControl/index.cjs +14 -13
- package/lib/components/SegmentedControl/index.js +3 -3
- package/lib/components/SelectBox/CheckSelectBox.cjs +35 -29
- package/lib/components/SelectBox/CheckSelectBox.js +31 -28
- package/lib/components/SelectBox/CheckSelectBox.namespace.cjs +13 -17
- package/lib/components/SelectBox/CheckSelectBox.namespace.js +1 -12
- package/lib/components/SelectBox/RadioSelectBox.cjs +33 -19
- package/lib/components/SelectBox/RadioSelectBox.js +29 -18
- package/lib/components/SelectBox/RadioSelectBox.namespace.cjs +13 -17
- package/lib/components/SelectBox/RadioSelectBox.namespace.js +1 -12
- package/lib/components/SelectBox/index.cjs +23 -27
- package/lib/components/SelectBox/index.js +6 -5
- package/lib/components/Skeleton/Skeleton.cjs +13 -10
- package/lib/components/Skeleton/Skeleton.js +9 -9
- package/lib/components/Skeleton/index.cjs +9 -3
- package/lib/components/Skeleton/index.js +1 -2
- package/lib/components/Slider/Slider.cjs +90 -69
- package/lib/components/Slider/Slider.js +86 -67
- package/lib/components/Slider/Slider.namespace.cjs +21 -25
- package/lib/components/Slider/Slider.namespace.js +1 -20
- package/lib/components/Slider/index.cjs +23 -22
- package/lib/components/Slider/index.js +3 -3
- package/lib/components/Snackbar/Snackbar.cjs +55 -38
- package/lib/components/Snackbar/Snackbar.js +51 -37
- package/lib/components/Snackbar/Snackbar.namespace.cjs +18 -22
- package/lib/components/Snackbar/Snackbar.namespace.js +1 -17
- package/lib/components/Snackbar/index.cjs +24 -26
- package/lib/components/Snackbar/index.js +5 -5
- package/lib/components/Snackbar/useSnackbarAdapter.cjs +26 -22
- package/lib/components/Snackbar/useSnackbarAdapter.js +22 -21
- package/lib/components/Stack/Stack.cjs +35 -32
- package/lib/components/Stack/Stack.js +12 -30
- package/lib/components/Stack/index.cjs +11 -5
- package/lib/components/Stack/index.js +1 -2
- package/lib/components/Switch/Switch.cjs +63 -45
- package/lib/components/Switch/Switch.js +59 -42
- package/lib/components/Switch/Switch.namespace.cjs +13 -17
- package/lib/components/Switch/Switch.namespace.js +1 -12
- package/lib/components/Switch/index.cjs +15 -14
- package/lib/components/Switch/index.js +3 -3
- package/lib/components/Tabs/Tabs.cjs +33 -15
- package/lib/components/Tabs/Tabs.js +29 -14
- package/lib/components/Tabs/Tabs.namespace.cjs +19 -20
- package/lib/components/Tabs/Tabs.namespace.js +2 -16
- package/lib/components/Tabs/index.cjs +20 -22
- package/lib/components/Tabs/index.js +4 -4
- package/lib/components/TagGroup/TagGroup.cjs +35 -44
- package/lib/components/TagGroup/TagGroup.js +31 -42
- package/lib/components/TagGroup/TagGroup.namespace.cjs +10 -14
- package/lib/components/TagGroup/TagGroup.namespace.js +1 -9
- package/lib/components/TagGroup/index.cjs +12 -11
- package/lib/components/TagGroup/index.js +3 -3
- package/lib/components/Text/Text.cjs +85 -49
- package/lib/components/Text/Text.js +81 -47
- package/lib/components/Text/index.cjs +9 -3
- package/lib/components/Text/index.js +1 -2
- package/lib/components/TextField/TextField.cjs +122 -82
- package/lib/components/TextField/TextField.js +118 -80
- package/lib/components/TextField/TextField.namespace.cjs +15 -19
- package/lib/components/TextField/TextField.namespace.js +1 -14
- package/lib/components/TextField/index.cjs +19 -18
- package/lib/components/TextField/index.js +4 -4
- package/lib/components/TextField/memoize.cjs +15 -10
- package/lib/components/TextField/memoize.js +11 -10
- package/lib/components/TextField/useTextFieldWithGraphemes.cjs +50 -40
- package/lib/components/TextField/useTextFieldWithGraphemes.js +46 -39
- package/lib/components/ToggleButton/ToggleButton.cjs +47 -31
- package/lib/components/ToggleButton/ToggleButton.js +24 -28
- package/lib/components/ToggleButton/index.cjs +9 -3
- package/lib/components/ToggleButton/index.js +1 -2
- package/lib/components/VisuallyHidden/VisuallyHidden.cjs +14 -18
- package/lib/components/VisuallyHidden/VisuallyHidden.js +10 -17
- package/lib/components/VisuallyHidden/index.cjs +9 -3
- package/lib/components/VisuallyHidden/index.js +1 -2
- package/lib/components/index.cjs +401 -554
- package/lib/components/index.js +129 -100
- package/lib/components/private/Icon.cjs +15 -15
- package/lib/components/private/Icon.js +11 -14
- package/lib/components/private/useDismissible.cjs +73 -54
- package/lib/components/private/useDismissible.js +48 -53
- package/lib/index.cjs +401 -554
- package/lib/index.js +129 -100
- package/lib/primitive.cjs +55 -73
- package/lib/primitive.js +12 -12
- package/lib/utils/createRecipeContext.cjs +37 -46
- package/lib/utils/createRecipeContext.js +33 -44
- package/lib/utils/createSlotRecipeContext.cjs +74 -91
- package/lib/utils/createSlotRecipeContext.js +70 -89
- package/lib/utils/createWithStateProps.cjs +25 -23
- package/lib/utils/createWithStateProps.js +21 -22
- package/lib/utils/splitMultipleVariantsProps.cjs +29 -16
- package/lib/utils/splitMultipleVariantsProps.js +25 -16
- package/lib/utils/styled.cjs +273 -141
- package/lib/utils/styled.js +269 -141
- package/lib/vars.cjs +11 -7
- package/lib/vars.js +1 -1
- package/package.json +2 -2
- package/lib/_virtual/_rolldown/runtime.cjs +0 -34
- package/lib/_virtual/_rolldown/runtime.js +0 -14
package/lib/components/index.js
CHANGED
|
@@ -1,100 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
import
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
import
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
import
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
import
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
import
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
import
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
import
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
import
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
import
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
import
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
import
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
import
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
import
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
import
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
import
|
|
100
|
-
export {
|
|
1
|
+
export { ActionButton } from './ActionButton/ActionButton.js';
|
|
2
|
+
export { ActionChip } from './ActionChip/ActionChip.js';
|
|
3
|
+
export { ActionSheetBackdrop, ActionSheetCloseButton, ActionSheetContent, ActionSheetDescription, ActionSheetHeader, ActionSheetItem, ActionSheetList, ActionSheetPositioner, ActionSheetRoot, ActionSheetTitle, ActionSheetTrigger } from './ActionSheet/ActionSheet.js';
|
|
4
|
+
import * as ActionSheet_namespace from './ActionSheet/ActionSheet.namespace.js';
|
|
5
|
+
export { ActionSheet_namespace as ActionSheet };
|
|
6
|
+
export { Article } from './Article/Article.js';
|
|
7
|
+
export { AvatarBadge, AvatarFallback, AvatarImage, AvatarRoot, AvatarStack } from './Avatar/Avatar.js';
|
|
8
|
+
import * as Avatar_namespace from './Avatar/Avatar.namespace.js';
|
|
9
|
+
export { Avatar_namespace as Avatar };
|
|
10
|
+
export { Badge } from './Badge/Badge.js';
|
|
11
|
+
export { BottomSheetBackdrop, BottomSheetBody, BottomSheetCloseButton, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHeader, BottomSheetPositioner, BottomSheetRoot, BottomSheetTitle, BottomSheetTrigger } from './BottomSheet/BottomSheet.js';
|
|
12
|
+
import * as BottomSheet_namespace from './BottomSheet/BottomSheet.namespace.js';
|
|
13
|
+
export { BottomSheet_namespace as BottomSheet };
|
|
14
|
+
export { Box } from './Box/Box.js';
|
|
15
|
+
export { CalloutCloseButton, CalloutContent, CalloutDescription, CalloutLink, CalloutRoot, CalloutTitle } from './Callout/Callout.js';
|
|
16
|
+
import * as Callout_namespace from './Callout/Callout.namespace.js';
|
|
17
|
+
export { Callout_namespace as Callout };
|
|
18
|
+
export { Celsius } from './Celsius/Celsius.js';
|
|
19
|
+
export { CheckboxControl, CheckboxHiddenInput, CheckboxIndicator, CheckboxLabel, CheckboxRoot } from './Checkbox/Checkbox.js';
|
|
20
|
+
import * as Checkbox_namespace from './Checkbox/Checkbox.namespace.js';
|
|
21
|
+
export { Checkbox_namespace as Checkbox };
|
|
22
|
+
export { ChipLabel, ChipPrefixAvatar, ChipPrefixIcon, ChipRoot, ChipSuffixIcon } from './Chip/Chip.js';
|
|
23
|
+
import * as Chip_namespace from './Chip/Chip.namespace.js';
|
|
24
|
+
export { Chip_namespace as Chip };
|
|
25
|
+
export { ChipTabsCarousel, ChipTabsCarouselCamera, ChipTabsContent, ChipTabsList, ChipTabsRoot, ChipTabsTrigger } from './ChipTabs/ChipTabs.js';
|
|
26
|
+
import * as ChipTabs_namespace from './ChipTabs/ChipTabs.namespace.js';
|
|
27
|
+
export { ChipTabs_namespace as ChipTabs };
|
|
28
|
+
export { Column, Columns } from './Columns/Columns.js';
|
|
29
|
+
export { ConsistentWidth } from './ConsistentWidth/ConsistentWidth.js';
|
|
30
|
+
export { ContextualFloatingButton } from './ContextualFloatingButton/ContextualFloatingButton.js';
|
|
31
|
+
export { ControlChip } from './ControlChip/ControlChip.js';
|
|
32
|
+
export { Count } from './Count/Count.js';
|
|
33
|
+
export { DialogAction, DialogBackdrop, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPositioner, DialogRoot, DialogTitle, DialogTrigger } from './Dialog/Dialog.js';
|
|
34
|
+
import * as Dialog_namespace from './Dialog/Dialog.namespace.js';
|
|
35
|
+
export { Dialog_namespace as Dialog };
|
|
36
|
+
export { Divider } from './Divider/Divider.js';
|
|
37
|
+
export { ExtendedActionSheetBackdrop, ExtendedActionSheetCloseButton, ExtendedActionSheetContent, ExtendedActionSheetFooter, ExtendedActionSheetGroup, ExtendedActionSheetHeader, ExtendedActionSheetItem, ExtendedActionSheetList, ExtendedActionSheetPositioner, ExtendedActionSheetRoot, ExtendedActionSheetTitle, ExtendedActionSheetTrigger } from './ExtendedActionSheet/ExtendedActionSheet.js';
|
|
38
|
+
import * as ExtendedActionSheet_namespace from './ExtendedActionSheet/ExtendedActionSheet.namespace.js';
|
|
39
|
+
export { ExtendedActionSheet_namespace as ExtendedActionSheet };
|
|
40
|
+
export { ExtendedFab } from './ExtendedFab/ExtendedFab.js';
|
|
41
|
+
export { Fab } from './Fab/Fab.js';
|
|
42
|
+
export { FieldCharacterCount, FieldDescription, FieldErrorMessage, FieldFooter, FieldHeader, FieldIndicatorText, FieldLabel, FieldRequiredIndicator, FieldRoot } from './Field/Field.js';
|
|
43
|
+
import * as Field_namespace from './Field/Field.namespace.js';
|
|
44
|
+
export { Field_namespace as Field };
|
|
45
|
+
export { FieldButtonButton, FieldButtonClearButton, FieldButtonControl, FieldButtonDescription, FieldButtonErrorMessage, FieldButtonFooter, FieldButtonHeader, FieldButtonHiddenInput, FieldButtonIndicatorText, FieldButtonLabel, FieldButtonPlaceholder, FieldButtonPrefixIcon, FieldButtonPrefixText, FieldButtonRequiredIndicator, FieldButtonRoot, FieldButtonSuffixIcon, FieldButtonSuffixText, FieldButtonValue } from './FieldButton/FieldButton.js';
|
|
46
|
+
import * as FieldButton_namespace from './FieldButton/FieldButton.namespace.js';
|
|
47
|
+
export { FieldButton_namespace as FieldButton };
|
|
48
|
+
export { Flex } from './Flex/Flex.js';
|
|
49
|
+
export { Float } from './Float/Float.js';
|
|
50
|
+
export { FloatingActionButtonIcon, FloatingActionButtonLabel, FloatingActionButtonRoot } from './FloatingActionButton/FloatingActionButton.js';
|
|
51
|
+
import * as FloatingActionButton_namespace from './FloatingActionButton/FloatingActionButton.namespace.js';
|
|
52
|
+
export { FloatingActionButton_namespace as FloatingActionButton };
|
|
53
|
+
export { HelpBubbleAnchor, HelpBubbleArrow, HelpBubbleArrowTip, HelpBubbleCloseButton, HelpBubbleContent, HelpBubbleDescription, HelpBubblePositioner, HelpBubblePositionerPortal, HelpBubbleRoot, HelpBubbleTitle, HelpBubbleTrigger } from './HelpBubble/HelpBubble.js';
|
|
54
|
+
import * as HelpBubble_namespace from './HelpBubble/HelpBubble.namespace.js';
|
|
55
|
+
export { HelpBubble_namespace as HelpBubble };
|
|
56
|
+
export { Icon, PrefixIcon, SuffixIcon } from './Icon/Icon.js';
|
|
57
|
+
export { IdentityPlaceholderImage, IdentityPlaceholderRoot } from './IdentityPlaceholder/IdentityPlaceholder.js';
|
|
58
|
+
import * as IdentityPlaceholder_namespace from './IdentityPlaceholder/IdentityPlaceholder.namespace.js';
|
|
59
|
+
export { IdentityPlaceholder_namespace as IdentityPlaceholder };
|
|
60
|
+
export { Inline } from './Inline/Inline.js';
|
|
61
|
+
export { InlineBannerCloseButton, InlineBannerContent, InlineBannerDescription, InlineBannerLink, InlineBannerRoot, InlineBannerTitle } from './InlineBanner/InlineBanner.js';
|
|
62
|
+
import * as InlineBanner_namespace from './InlineBanner/InlineBanner.namespace.js';
|
|
63
|
+
export { InlineBanner_namespace as InlineBanner };
|
|
64
|
+
export { LinkContent } from './LinkContent/LinkContent.js';
|
|
65
|
+
export { ListContent, ListDetail, ListItem, ListPrefix, ListRoot, ListSuffix, ListTitle } from './List/List.js';
|
|
66
|
+
export { ListHeader } from './List/ListHeader.js';
|
|
67
|
+
import * as List_namespace from './List/List.namespace.js';
|
|
68
|
+
export { List_namespace as List };
|
|
69
|
+
export { LoadingIndicator } from './LoadingIndicator/LoadingIndicator.js';
|
|
70
|
+
export { MannerTemp } from './MannerTemp/MannerTemp.js';
|
|
71
|
+
export { MannerTempEmote } from './MannerTemp/MannerTempEmote.js';
|
|
72
|
+
export { MannerTempBadge } from './MannerTempBadge/MannerTempBadge.js';
|
|
73
|
+
export { MenuSheetBackdrop, MenuSheetCloseButton, MenuSheetContent, MenuSheetFooter, MenuSheetGroup, MenuSheetHeader, MenuSheetItem, MenuSheetList, MenuSheetPositioner, MenuSheetRoot, MenuSheetTitle, MenuSheetTrigger } from './MenuSheet/MenuSheet.js';
|
|
74
|
+
import * as MenuSheet_namespace from './MenuSheet/MenuSheet.namespace.js';
|
|
75
|
+
export { MenuSheet_namespace as MenuSheet };
|
|
76
|
+
export { NotificationBadge, NotificationBadgePositioner } from './NotificationBadge/NotificationBadge.js';
|
|
77
|
+
export { PageBannerBody, PageBannerButton, PageBannerCloseButton, PageBannerContent, PageBannerDescription, PageBannerRoot, PageBannerTitle } from './PageBanner/PageBanner.js';
|
|
78
|
+
import * as PageBanner_namespace from './PageBanner/PageBanner.namespace.js';
|
|
79
|
+
export { PageBanner_namespace as PageBanner };
|
|
80
|
+
export { Portal } from '@seed-design/react-portal';
|
|
81
|
+
export { ProgressCircleRange, ProgressCircleRoot, ProgressCircleTrack } from './ProgressCircle/ProgressCircle.js';
|
|
82
|
+
import * as ProgressCircle_namespace from './ProgressCircle/ProgressCircle.namespace.js';
|
|
83
|
+
export { ProgressCircle_namespace as ProgressCircle };
|
|
84
|
+
export { PullToRefreshContent, PullToRefreshIndicator, PullToRefreshRoot } from './PullToRefresh/PullToRefresh.js';
|
|
85
|
+
export { pullToRefreshPreventPull } from '@seed-design/react-pull-to-refresh';
|
|
86
|
+
import * as PullToRefresh_namespace from './PullToRefresh/PullToRefresh.namespace.js';
|
|
87
|
+
export { PullToRefresh_namespace as PullToRefresh };
|
|
88
|
+
export { RadioGroupItem, RadioGroupItemControl, RadioGroupItemHiddenInput, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot } from './RadioGroup/RadioGroup.js';
|
|
89
|
+
import * as RadioGroup_namespace from './RadioGroup/RadioGroup.namespace.js';
|
|
90
|
+
export { RadioGroup_namespace as RadioGroup };
|
|
91
|
+
export { ReactionButton } from './ReactionButton/ReactionButton.js';
|
|
92
|
+
export { ResponsivePair } from './ResponsivePair/ResponsivePair.js';
|
|
93
|
+
export { ScrollFog } from './ScrollFog/ScrollFog.js';
|
|
94
|
+
export { SegmentedControlIndicator, SegmentedControlItem, SegmentedControlItemHiddenInput, SegmentedControlRoot } from './SegmentedControl/SegmentedControl.js';
|
|
95
|
+
import * as SegmentedControl_namespace from './SegmentedControl/SegmentedControl.namespace.js';
|
|
96
|
+
export { SegmentedControl_namespace as SegmentedControl };
|
|
97
|
+
export { CheckSelectBoxContent, CheckSelectBoxDescription, CheckSelectBoxGroup, CheckSelectBoxLabel, CheckSelectBoxRoot } from './SelectBox/CheckSelectBox.js';
|
|
98
|
+
export { RadioSelectBoxContent, RadioSelectBoxDescription, RadioSelectBoxItem, RadioSelectBoxLabel, RadioSelectBoxRoot } from './SelectBox/RadioSelectBox.js';
|
|
99
|
+
import * as CheckSelectBox_namespace from './SelectBox/CheckSelectBox.namespace.js';
|
|
100
|
+
export { CheckSelectBox_namespace as CheckSelectBox };
|
|
101
|
+
import * as RadioSelectBox_namespace from './SelectBox/RadioSelectBox.namespace.js';
|
|
102
|
+
export { RadioSelectBox_namespace as RadioSelectBox };
|
|
103
|
+
export { Skeleton } from './Skeleton/Skeleton.js';
|
|
104
|
+
export { SliderControl, SliderHiddenInput, SliderMarker, SliderMarkers, SliderRange, SliderRoot, SliderThumb, SliderTick, SliderTrack, SliderValueIndicatorArrow, SliderValueIndicatorArrowTip, SliderValueIndicatorLabel, SliderValueIndicatorRoot } from './Slider/Slider.js';
|
|
105
|
+
import * as Slider_namespace from './Slider/Slider.namespace.js';
|
|
106
|
+
export { Slider_namespace as Slider };
|
|
107
|
+
export { SnackbarActionButton, SnackbarAvoidOverlap, SnackbarHiddenCloseButton, SnackbarMessage, SnackbarPrefixIcon, SnackbarRegion, SnackbarRenderer, SnackbarRoot, SnackbarRootProvider } from './Snackbar/Snackbar.js';
|
|
108
|
+
export { useSnackbarContext } from '@seed-design/react-snackbar';
|
|
109
|
+
export { useSnackbarAdapter } from './Snackbar/useSnackbarAdapter.js';
|
|
110
|
+
import * as Snackbar_namespace from './Snackbar/Snackbar.namespace.js';
|
|
111
|
+
export { Snackbar_namespace as Snackbar };
|
|
112
|
+
export { HStack, Stack, VStack } from './Stack/Stack.js';
|
|
113
|
+
export { SwitchControl, SwitchHiddenInput, SwitchLabel, SwitchRoot, SwitchThumb } from './Switch/Switch.js';
|
|
114
|
+
import * as Switch_namespace from './Switch/Switch.namespace.js';
|
|
115
|
+
export { Switch_namespace as Switch };
|
|
116
|
+
export { TabsCarousel, TabsCarouselCamera, TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from './Tabs/Tabs.js';
|
|
117
|
+
export { tabsCarouselPreventDrag } from '@seed-design/react-tabs';
|
|
118
|
+
import * as Tabs_namespace from './Tabs/Tabs.namespace.js';
|
|
119
|
+
export { Tabs_namespace as Tabs };
|
|
120
|
+
export { TagGroupItem, TagGroupRoot } from './TagGroup/TagGroup.js';
|
|
121
|
+
import * as TagGroup_namespace from './TagGroup/TagGroup.namespace.js';
|
|
122
|
+
export { TagGroup_namespace as TagGroup };
|
|
123
|
+
export { Text } from './Text/Text.js';
|
|
124
|
+
export { TextFieldInput, TextFieldPrefixIcon, TextFieldPrefixText, TextFieldRoot, TextFieldSuffixIcon, TextFieldSuffixText, TextFieldTextarea } from './TextField/TextField.js';
|
|
125
|
+
export { useTextFieldWithGraphemes } from './TextField/useTextFieldWithGraphemes.js';
|
|
126
|
+
import * as TextField_namespace from './TextField/TextField.namespace.js';
|
|
127
|
+
export { TextField_namespace as TextField };
|
|
128
|
+
export { ToggleButton } from './ToggleButton/ToggleButton.js';
|
|
129
|
+
export { VisuallyHidden } from './VisuallyHidden/VisuallyHidden.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const reactSlot = require('@radix-ui/react-slot');
|
|
8
|
+
const React = require('react');
|
|
9
|
+
|
|
10
|
+
const InternalIcon = React.forwardRef(
|
|
11
|
+
({ svg, ...otherProps }, ref) => {
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { ref, "aria-hidden": true, ...otherProps, children: svg });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
|
|
16
16
|
exports.InternalIcon = InternalIcon;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
//#endregion
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
|
|
6
|
+
const InternalIcon = forwardRef(
|
|
7
|
+
({ svg, ...otherProps }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(Slot, { ref, "aria-hidden": true, ...otherProps, children: svg });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
|
|
15
12
|
export { InternalIcon };
|
|
@@ -1,60 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const reactUseControllableState = require('@radix-ui/react-use-controllable-state');
|
|
8
|
+
const domUtils = require('@seed-design/dom-utils');
|
|
9
|
+
const reactPrimitive = require('@seed-design/react-primitive');
|
|
10
|
+
const React = require('react');
|
|
11
|
+
|
|
12
|
+
function _interopNamespaceDefault(e) {
|
|
13
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
14
|
+
if (e) {
|
|
15
|
+
for (const k in e) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: () => e[k]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
30
|
+
|
|
10
31
|
function useDismissible(props) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
const [open = true, setOpen] = reactUseControllableState.useControllableState({
|
|
33
|
+
prop: props.open,
|
|
34
|
+
defaultProp: props.defaultOpen,
|
|
35
|
+
onChange: (open2) => {
|
|
36
|
+
if (!open2) {
|
|
37
|
+
props.onDismiss?.();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const dismiss = React__namespace.useCallback(() => setOpen(false), [setOpen]);
|
|
42
|
+
return {
|
|
43
|
+
open,
|
|
44
|
+
dismiss,
|
|
45
|
+
rootProps: domUtils.elementProps({}),
|
|
46
|
+
dismissButtonProps: domUtils.buttonProps({
|
|
47
|
+
onClick: (e) => {
|
|
48
|
+
if (e.defaultPrevented) return;
|
|
49
|
+
dismiss();
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
};
|
|
28
53
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
54
|
+
const DismissibleContext = React__namespace.createContext(null);
|
|
55
|
+
const DismissibleProvider = DismissibleContext.Provider;
|
|
56
|
+
const useDismissibleContext = () => {
|
|
57
|
+
const context = React__namespace.useContext(DismissibleContext);
|
|
58
|
+
if (context === null) {
|
|
59
|
+
throw new Error("useDismissibleContext should be used within DismissibleProvider");
|
|
60
|
+
}
|
|
61
|
+
return context;
|
|
35
62
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
ref,
|
|
47
|
-
...otherProps
|
|
48
|
-
})
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
var DismissibleCloseButton = react.forwardRef((props, ref) => {
|
|
52
|
-
const { dismissButtonProps } = useDismissibleContext();
|
|
53
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_primitive.Primitive.button, {
|
|
54
|
-
ref,
|
|
55
|
-
...(0, _seed_design_dom_utils.mergeProps)(dismissButtonProps, props)
|
|
56
|
-
});
|
|
63
|
+
const DismissibleRoot = React__namespace.forwardRef(
|
|
64
|
+
({ defaultOpen, open, onDismiss, ...otherProps }, ref) => {
|
|
65
|
+
const api = useDismissible({ defaultOpen, open, onDismiss });
|
|
66
|
+
if (!api.open) return null;
|
|
67
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DismissibleProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(reactPrimitive.Primitive.div, { ref, ...otherProps }) });
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
const DismissibleCloseButton = React__namespace.forwardRef((props, ref) => {
|
|
71
|
+
const { dismissButtonProps } = useDismissibleContext();
|
|
72
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactPrimitive.Primitive.button, { ref, ...domUtils.mergeProps(dismissButtonProps, props) });
|
|
57
73
|
});
|
|
58
|
-
|
|
74
|
+
|
|
59
75
|
exports.DismissibleCloseButton = DismissibleCloseButton;
|
|
76
|
+
exports.DismissibleProvider = DismissibleProvider;
|
|
60
77
|
exports.DismissibleRoot = DismissibleRoot;
|
|
78
|
+
exports.useDismissible = useDismissible;
|
|
79
|
+
exports.useDismissibleContext = useDismissibleContext;
|
|
@@ -1,57 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
4
|
+
import { mergeProps, buttonProps, elementProps } from '@seed-design/dom-utils';
|
|
5
|
+
import { Primitive } from '@seed-design/react-primitive';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
|
|
8
8
|
function useDismissible(props) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
const [open = true, setOpen] = useControllableState({
|
|
10
|
+
prop: props.open,
|
|
11
|
+
defaultProp: props.defaultOpen,
|
|
12
|
+
onChange: (open2) => {
|
|
13
|
+
if (!open2) {
|
|
14
|
+
props.onDismiss?.();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const dismiss = React.useCallback(() => setOpen(false), [setOpen]);
|
|
19
|
+
return {
|
|
20
|
+
open,
|
|
21
|
+
dismiss,
|
|
22
|
+
rootProps: elementProps({}),
|
|
23
|
+
dismissButtonProps: buttonProps({
|
|
24
|
+
onClick: (e) => {
|
|
25
|
+
if (e.defaultPrevented) return;
|
|
26
|
+
dismiss();
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
};
|
|
26
30
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const DismissibleContext = React.createContext(null);
|
|
32
|
+
const DismissibleProvider = DismissibleContext.Provider;
|
|
33
|
+
const useDismissibleContext = () => {
|
|
34
|
+
const context = React.useContext(DismissibleContext);
|
|
35
|
+
if (context === null) {
|
|
36
|
+
throw new Error("useDismissibleContext should be used within DismissibleProvider");
|
|
37
|
+
}
|
|
38
|
+
return context;
|
|
33
39
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
ref,
|
|
45
|
-
...otherProps
|
|
46
|
-
})
|
|
47
|
-
});
|
|
40
|
+
const DismissibleRoot = React.forwardRef(
|
|
41
|
+
({ defaultOpen, open, onDismiss, ...otherProps }, ref) => {
|
|
42
|
+
const api = useDismissible({ defaultOpen, open, onDismiss });
|
|
43
|
+
if (!api.open) return null;
|
|
44
|
+
return /* @__PURE__ */ jsx(DismissibleProvider, { value: api, children: /* @__PURE__ */ jsx(Primitive.div, { ref, ...otherProps }) });
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
const DismissibleCloseButton = React.forwardRef((props, ref) => {
|
|
48
|
+
const { dismissButtonProps } = useDismissibleContext();
|
|
49
|
+
return /* @__PURE__ */ jsx(Primitive.button, { ref, ...mergeProps(dismissButtonProps, props) });
|
|
48
50
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return /* @__PURE__ */ jsx(Primitive.button, {
|
|
52
|
-
ref,
|
|
53
|
-
...mergeProps(dismissButtonProps, props)
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
//#endregion
|
|
57
|
-
export { DismissibleCloseButton, DismissibleRoot };
|
|
51
|
+
|
|
52
|
+
export { DismissibleCloseButton, DismissibleProvider, DismissibleRoot, useDismissible, useDismissibleContext };
|