@rovula/ui 0.1.6 → 0.1.8
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/dist/cjs/bundle.css +630 -467
- package/dist/cjs/bundle.js +1545 -1545
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/AlertDialog/AlertDialog.stories.d.ts +3 -0
- package/dist/cjs/types/components/Dialog/Dialog.d.ts +7 -1
- package/dist/cjs/types/components/Dialog/Dialog.stories.d.ts +3 -0
- package/dist/cjs/types/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +2 -0
- package/dist/cjs/types/components/Form/Field.d.ts +26 -0
- package/dist/cjs/types/components/Form/FieldMessage.d.ts +7 -0
- package/dist/cjs/types/components/Form/Form.d.ts +49 -11
- package/dist/cjs/types/components/Form/Form.stories.d.ts +23 -0
- package/dist/cjs/types/components/Form/ValidationHintList.d.ts +17 -0
- package/dist/cjs/types/components/Form/ValidationHintList.stories.d.ts +9 -0
- package/dist/cjs/types/components/Form/index.d.ts +10 -0
- package/dist/cjs/types/components/Form/useOptionBridge.d.ts +17 -0
- package/dist/cjs/types/components/OtpInput/OtpInput.d.ts +17 -0
- package/dist/cjs/types/components/OtpInput/OtpInput.stories.d.ts +15 -0
- package/dist/cjs/types/components/OtpInput/OtpInputGroup.d.ts +25 -0
- package/dist/cjs/types/components/OtpInput/index.d.ts +5 -0
- package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +3 -0
- package/dist/cjs/types/index.d.ts +5 -0
- package/dist/cjs/types/theme/ThemeColorCoverageRuntime.stories.d.ts +10 -0
- package/dist/cjs/types/utils/colors.d.ts +351 -267
- package/dist/components/ActionButton/ActionButton.stories.js +2 -2
- package/dist/components/ActionButton/ActionButton.styles.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +6 -6
- package/dist/components/AlertDialog/AlertDialog.stories.js +3 -0
- package/dist/components/Avatar/Avatar.stories.js +1 -1
- package/dist/components/Avatar/Avatar.styles.js +1 -1
- package/dist/components/Avatar/AvatarBase.js +1 -1
- package/dist/components/Avatar/AvatarGroup.stories.js +1 -1
- package/dist/components/Button/Buttons.stories.js +2 -2
- package/dist/components/Calendar/Calendar.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +17 -7
- package/dist/components/Collapsible/Collapsible.styles.js +1 -1
- package/dist/components/DataTable/DataTable.js +2 -2
- package/dist/components/Dialog/Dialog.js +12 -7
- package/dist/components/Dialog/Dialog.stories.js +90 -2
- package/dist/components/Dropdown/Dropdown.js +2 -2
- package/dist/components/DropdownMenu/DropdownMenu.js +3 -3
- package/dist/components/FocusedScrollView/FocusedScrollView.stories.js +6 -6
- package/dist/components/Form/Field.js +60 -0
- package/dist/components/Form/FieldMessage.js +24 -0
- package/dist/components/Form/Form.js +73 -41
- package/dist/components/Form/Form.stories.js +221 -0
- package/dist/components/Form/ValidationHintList.js +30 -0
- package/dist/components/Form/ValidationHintList.stories.js +50 -0
- package/dist/components/Form/index.js +5 -0
- package/dist/components/Form/useOptionBridge.js +27 -0
- package/dist/components/InputFilter/InputFilter.js +5 -4
- package/dist/components/InputFilter/InputFilter.stories.js +1 -1
- package/dist/components/InputFilter/InputFilter.styles.js +14 -1
- package/dist/components/Label/Label.styles.js +1 -1
- package/dist/components/Menu/Menu.js +2 -2
- package/dist/components/NumberInput/NumberInput.stories.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +118 -0
- package/dist/components/OtpInput/OtpInput.stories.js +60 -0
- package/dist/components/OtpInput/OtpInputGroup.js +23 -0
- package/dist/components/OtpInput/index.js +3 -0
- package/dist/components/PasswordInput/PasswordInput.stories.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +2 -2
- package/dist/components/Search/Search.js +13 -1
- package/dist/components/Search/Search.stories.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider.stories.js +5 -5
- package/dist/components/Switch/Switch.stories.js +2 -2
- package/dist/components/Switch/Switch.styles.js +1 -1
- package/dist/components/Table/Table.js +5 -5
- package/dist/components/Tabs/Tabs.js +12 -9
- package/dist/components/Tabs/Tabs.stories.js +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/Text/Text.stories.js +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.styles.js +3 -3
- package/dist/components/TextInput/TextInput.js +3 -2
- package/dist/components/TextInput/TextInput.stories.js +3 -3
- package/dist/components/TextInput/TextInput.styles.js +41 -19
- package/dist/components/Toast/Toast.js +4 -2
- package/dist/components/Toast/Toast.stories.js +1 -1
- package/dist/components/Toast/Toast.styles.js +4 -4
- package/dist/components/Toast/Toaster.js +2 -2
- package/dist/components/Tree/Tree.stories.js +1 -1
- package/dist/components/Tree/TreeItem.js +1 -1
- package/dist/esm/bundle.css +630 -467
- package/dist/esm/bundle.js +1545 -1545
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/AlertDialog/AlertDialog.stories.d.ts +3 -0
- package/dist/esm/types/components/Dialog/Dialog.d.ts +7 -1
- package/dist/esm/types/components/Dialog/Dialog.stories.d.ts +3 -0
- package/dist/esm/types/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +2 -0
- package/dist/esm/types/components/Form/Field.d.ts +26 -0
- package/dist/esm/types/components/Form/FieldMessage.d.ts +7 -0
- package/dist/esm/types/components/Form/Form.d.ts +49 -11
- package/dist/esm/types/components/Form/Form.stories.d.ts +23 -0
- package/dist/esm/types/components/Form/ValidationHintList.d.ts +17 -0
- package/dist/esm/types/components/Form/ValidationHintList.stories.d.ts +9 -0
- package/dist/esm/types/components/Form/index.d.ts +10 -0
- package/dist/esm/types/components/Form/useOptionBridge.d.ts +17 -0
- package/dist/esm/types/components/OtpInput/OtpInput.d.ts +17 -0
- package/dist/esm/types/components/OtpInput/OtpInput.stories.d.ts +15 -0
- package/dist/esm/types/components/OtpInput/OtpInputGroup.d.ts +25 -0
- package/dist/esm/types/components/OtpInput/index.d.ts +5 -0
- package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +3 -0
- package/dist/esm/types/index.d.ts +5 -0
- package/dist/esm/types/theme/ThemeColorCoverageRuntime.stories.d.ts +10 -0
- package/dist/esm/types/utils/colors.d.ts +351 -267
- package/dist/index.d.ts +512 -269
- package/dist/index.js +3 -0
- package/dist/src/theme/global.css +2739 -2681
- package/dist/theme/ThemeColorCoverageRuntime.stories.js +91 -0
- package/dist/utils/colors.js +359 -267
- package/package.json +4 -2
- package/src/components/ActionButton/ActionButton.stories.tsx +6 -6
- package/src/components/ActionButton/ActionButton.styles.ts +1 -1
- package/src/components/AlertDialog/AlertDialog.stories.tsx +22 -0
- package/src/components/AlertDialog/AlertDialog.tsx +6 -6
- package/src/components/Avatar/Avatar.stories.tsx +1 -1
- package/src/components/Avatar/Avatar.styles.ts +1 -1
- package/src/components/Avatar/AvatarBase.tsx +1 -1
- package/src/components/Avatar/AvatarGroup.stories.tsx +1 -1
- package/src/components/Button/Buttons.stories.tsx +25 -17
- package/src/components/Calendar/Calendar.tsx +3 -3
- package/src/components/Checkbox/Checkbox.stories.tsx +35 -12
- package/src/components/Checkbox/Checkbox.tsx +7 -5
- package/src/components/Collapsible/Collapsible.styles.ts +1 -1
- package/src/components/DataTable/DataTable.tsx +2 -2
- package/src/components/Dialog/Dialog.stories.tsx +173 -0
- package/src/components/Dialog/Dialog.tsx +32 -15
- package/src/components/Dropdown/Dropdown.styles.ts +1 -1
- package/src/components/Dropdown/Dropdown.tsx +16 -14
- package/src/components/DropdownMenu/DropdownMenu.tsx +3 -3
- package/src/components/FocusedScrollView/FocusedScrollView.stories.tsx +10 -10
- package/src/components/Form/Field.tsx +160 -0
- package/src/components/Form/FieldMessage.tsx +38 -0
- package/src/components/Form/Form.docs.mdx +67 -0
- package/src/components/Form/Form.stories.tsx +490 -0
- package/src/components/Form/Form.tsx +185 -87
- package/src/components/Form/README.md +284 -0
- package/src/components/Form/ValidationHintList.stories.tsx +118 -0
- package/src/components/Form/ValidationHintList.tsx +82 -0
- package/src/components/Form/index.ts +28 -0
- package/src/components/Form/useOptionBridge.ts +55 -0
- package/src/components/InputFilter/InputFilter.stories.tsx +1 -1
- package/src/components/InputFilter/InputFilter.styles.ts +14 -1
- package/src/components/InputFilter/InputFilter.tsx +33 -28
- package/src/components/Label/Label.styles.ts +2 -2
- package/src/components/Label/Label.tsx +1 -1
- package/src/components/Menu/Menu.tsx +12 -12
- package/src/components/NumberInput/NumberInput.stories.tsx +1 -1
- package/src/components/OtpInput/OtpInput.stories.tsx +168 -0
- package/src/components/OtpInput/OtpInput.tsx +210 -0
- package/src/components/OtpInput/OtpInputGroup.tsx +74 -0
- package/src/components/OtpInput/index.ts +5 -0
- package/src/components/PasswordInput/PasswordInput.stories.tsx +1 -1
- package/src/components/Popover/Popover.tsx +1 -1
- package/src/components/RadioGroup/RadioGroup.stories.tsx +4 -4
- package/src/components/RadioGroup/RadioGroup.tsx +2 -1
- package/src/components/Search/Search.stories.tsx +1 -1
- package/src/components/Search/Search.tsx +6 -2
- package/src/components/Slider/Slider.stories.tsx +7 -7
- package/src/components/Slider/Slider.tsx +1 -1
- package/src/components/Switch/Switch.stories.tsx +4 -4
- package/src/components/Switch/Switch.styles.ts +1 -1
- package/src/components/Table/Table.tsx +5 -5
- package/src/components/Tabs/Tabs.stories.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +29 -18
- package/src/components/Text/Text.stories.tsx +1 -1
- package/src/components/Text/Text.tsx +1 -1
- package/src/components/TextArea/TextArea.stories.tsx +1 -1
- package/src/components/TextArea/TextArea.styles.ts +3 -3
- package/src/components/TextInput/TextInput.stories.tsx +7 -7
- package/src/components/TextInput/TextInput.styles.ts +42 -19
- package/src/components/TextInput/TextInput.tsx +3 -1
- package/src/components/Toast/Toast.stories.tsx +1 -1
- package/src/components/Toast/Toast.styles.tsx +7 -7
- package/src/components/Toast/Toast.tsx +5 -4
- package/src/components/Toast/Toaster.tsx +17 -20
- package/src/components/Tree/Tree.stories.tsx +1 -1
- package/src/components/Tree/TreeItem.tsx +1 -1
- package/src/index.ts +5 -0
- package/src/theme/THEME_MAPPING.md +36 -37
- package/src/theme/ThemeColorCoverageRuntime.stories.tsx +236 -0
- package/src/theme/direct-token-migration-plan.md +121 -0
- package/src/theme/figma-mcp-check-report.md +225 -0
- package/src/theme/figma-mcp-component-checklist.json +1250 -0
- package/src/theme/global.css +7 -3
- package/src/theme/presets/colors.js +173 -64
- package/src/theme/themes/skyller/baseline.css +0 -4
- package/src/theme/themes/variable-mapping.css +1064 -0
- package/src/theme/themes/variable.css +248 -230
- package/src/theme/themes/xspector/baseline.css +0 -4
- package/src/theme/themes/xspector/components/dropdown-menu.css +4 -4
- package/src/theme/themes/xspector/components/loading.css +2 -2
- package/src/theme/tokens/baseline.css +0 -3
- package/src/theme/tokens/color.css +36 -65
- package/src/theme/tokens/components/action-button.css +6 -6
- package/src/theme/tokens/components/button.css +189 -189
- package/src/theme/tokens/components/dropdown-menu.css +5 -5
- package/src/theme/tokens/components/footer.css +1 -1
- package/src/theme/tokens/components/loading.css +2 -2
- package/src/theme/tokens/components/switch.css +11 -11
- package/src/theme/tokens/typography.css +28 -28
- package/src/theme/tokens_old/baseline.css +13 -0
- package/src/theme/tokens_old/color.css +78 -0
- package/src/theme/tokens_old/components/action-button.css +127 -0
- package/src/theme/tokens_old/components/button.css +512 -0
- package/src/theme/tokens_old/components/dropdown-menu.css +27 -0
- package/src/theme/tokens_old/components/footer.css +9 -0
- package/src/theme/tokens_old/components/loading.css +11 -0
- package/src/theme/tokens_old/components/navbar.css +9 -0
- package/src/theme/tokens_old/components/progress-bar.css +8 -0
- package/src/theme/tokens_old/components/switch.css +29 -0
- package/src/theme/tokens_old/typography.css +199 -0
- package/src/theme/tokens_old/variables.css +28 -0
- package/src/theme/utils.js +172 -33
- package/src/utils/colors.ts +367 -278
- package/src/theme/themes/skyller/color.css +0 -79
- package/src/theme/themes/skyller/palette.css +0 -143
- package/src/theme/themes/skyller/state.css +0 -94
- package/src/theme/themes/skyller/transparent.css +0 -94
- package/src/theme/themes/xspector/color.css +0 -83
- package/src/theme/themes/xspector/palette.css +0 -142
- package/src/theme/themes/xspector/state.css +0 -94
- package/src/theme/themes/xspector/transparent.css +0 -93
- /package/src/theme/{tokens → tokens_old}/palette.css +0 -0
- /package/src/theme/{tokens → tokens_old}/state.css +0 -0
- /package/src/theme/{tokens → tokens_old}/transparent.css +0 -0
|
@@ -13,7 +13,7 @@ export const inputVariant = cva([
|
|
|
13
13
|
},
|
|
14
14
|
rounded: {
|
|
15
15
|
none: "rounded-none",
|
|
16
|
-
normal: "
|
|
16
|
+
normal: "",
|
|
17
17
|
full: "rounded-full",
|
|
18
18
|
},
|
|
19
19
|
variant: {
|
|
@@ -54,6 +54,16 @@ export const inputVariant = cva([
|
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
compoundVariants: [
|
|
57
|
+
{
|
|
58
|
+
rounded: "normal",
|
|
59
|
+
size: "sm",
|
|
60
|
+
className: "rounded-sm",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
rounded: "normal",
|
|
64
|
+
size: ["md", "lg"],
|
|
65
|
+
className: "rounded-md",
|
|
66
|
+
},
|
|
57
67
|
{
|
|
58
68
|
variant: "underline",
|
|
59
69
|
className: "rounded-none",
|
|
@@ -61,62 +71,62 @@ export const inputVariant = cva([
|
|
|
61
71
|
{
|
|
62
72
|
hasClearIcon: true,
|
|
63
73
|
size: "sm",
|
|
64
|
-
|
|
74
|
+
className: "focus:pe-6",
|
|
65
75
|
},
|
|
66
76
|
{
|
|
67
77
|
hasClearIcon: true,
|
|
68
78
|
size: "md",
|
|
69
|
-
|
|
79
|
+
className: "focus:pe-8",
|
|
70
80
|
},
|
|
71
81
|
{
|
|
72
82
|
hasClearIcon: true,
|
|
73
83
|
size: "lg",
|
|
74
|
-
|
|
84
|
+
className: "focus:pe-10",
|
|
75
85
|
},
|
|
76
86
|
{
|
|
77
87
|
hasSearchIcon: true,
|
|
78
88
|
size: "sm",
|
|
79
|
-
|
|
89
|
+
className: "!ps-[26px]",
|
|
80
90
|
},
|
|
81
91
|
{
|
|
82
92
|
hasSearchIcon: true,
|
|
83
93
|
size: "md",
|
|
84
|
-
|
|
94
|
+
className: "!ps-[40px]",
|
|
85
95
|
},
|
|
86
96
|
{
|
|
87
97
|
hasSearchIcon: true,
|
|
88
98
|
size: "lg",
|
|
89
|
-
|
|
99
|
+
className: "!ps-[52px]",
|
|
90
100
|
},
|
|
91
101
|
{
|
|
92
102
|
leftSectionIcon: true,
|
|
93
103
|
size: "sm",
|
|
94
|
-
|
|
104
|
+
className: "!ps-[38px]",
|
|
95
105
|
},
|
|
96
106
|
{
|
|
97
107
|
leftSectionIcon: true,
|
|
98
108
|
size: "md",
|
|
99
|
-
|
|
109
|
+
className: "!ps-[46px]",
|
|
100
110
|
},
|
|
101
111
|
{
|
|
102
112
|
leftSectionIcon: true,
|
|
103
113
|
size: "lg",
|
|
104
|
-
|
|
114
|
+
className: "!ps-[72px]",
|
|
105
115
|
},
|
|
106
116
|
{
|
|
107
117
|
rightSectionIcon: true,
|
|
108
118
|
size: "sm",
|
|
109
|
-
|
|
119
|
+
className: "!pe-[38px]",
|
|
110
120
|
},
|
|
111
121
|
{
|
|
112
122
|
rightSectionIcon: true,
|
|
113
123
|
size: "md",
|
|
114
|
-
|
|
124
|
+
className: "!pe-[46px]",
|
|
115
125
|
},
|
|
116
126
|
{
|
|
117
127
|
rightSectionIcon: true,
|
|
118
128
|
size: "lg",
|
|
119
|
-
|
|
129
|
+
className: "!pe-[72px]",
|
|
120
130
|
},
|
|
121
131
|
],
|
|
122
132
|
defaultVariants: {
|
|
@@ -216,7 +226,7 @@ export const labelVariant = cva([
|
|
|
216
226
|
hasSearchIcon: true,
|
|
217
227
|
size: "sm",
|
|
218
228
|
className: [
|
|
219
|
-
"left-
|
|
229
|
+
"left-[26px] -top-1.5 typography-label2 bg-input-label-bg",
|
|
220
230
|
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent",
|
|
221
231
|
"peer-focus:-top-1.5 peer-focus:typography-label2",
|
|
222
232
|
],
|
|
@@ -226,7 +236,7 @@ export const labelVariant = cva([
|
|
|
226
236
|
hasSearchIcon: true,
|
|
227
237
|
size: "md",
|
|
228
238
|
className: [
|
|
229
|
-
"left-
|
|
239
|
+
"left-[40px] -top-1.5 typography-label1 bg-input-label-bg",
|
|
230
240
|
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent",
|
|
231
241
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
232
242
|
],
|
|
@@ -236,7 +246,7 @@ export const labelVariant = cva([
|
|
|
236
246
|
hasSearchIcon: true,
|
|
237
247
|
size: "lg",
|
|
238
248
|
className: [
|
|
239
|
-
"left-
|
|
249
|
+
"left-[52px] -top-1.5 typography-label1 bg-input-label-bg",
|
|
240
250
|
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent",
|
|
241
251
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
242
252
|
],
|
|
@@ -247,7 +257,7 @@ export const labelVariant = cva([
|
|
|
247
257
|
hasSearchIcon: true,
|
|
248
258
|
size: "sm",
|
|
249
259
|
className: [
|
|
250
|
-
"left-
|
|
260
|
+
"left-[26px] peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1",
|
|
251
261
|
],
|
|
252
262
|
},
|
|
253
263
|
{
|
|
@@ -255,7 +265,7 @@ export const labelVariant = cva([
|
|
|
255
265
|
hasSearchIcon: true,
|
|
256
266
|
size: "md",
|
|
257
267
|
className: [
|
|
258
|
-
"left-
|
|
268
|
+
"left-[40px] peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4",
|
|
259
269
|
],
|
|
260
270
|
},
|
|
261
271
|
{
|
|
@@ -263,7 +273,7 @@ export const labelVariant = cva([
|
|
|
263
273
|
hasSearchIcon: true,
|
|
264
274
|
size: "lg",
|
|
265
275
|
className: [
|
|
266
|
-
"left-
|
|
276
|
+
"left-[52px] peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1",
|
|
267
277
|
],
|
|
268
278
|
},
|
|
269
279
|
// -------- hasLeftSectionIcon ------
|
|
@@ -407,6 +417,18 @@ export const iconActionVariant = cva(["cursor-pointer z-50 select-none"], {
|
|
|
407
417
|
size: "md",
|
|
408
418
|
},
|
|
409
419
|
});
|
|
420
|
+
export const searchIconVariant = cva(["cursor-pointer z-50 select-none"], {
|
|
421
|
+
variants: {
|
|
422
|
+
size: {
|
|
423
|
+
sm: "size-[14px]",
|
|
424
|
+
md: "size-5",
|
|
425
|
+
lg: "size-6",
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
defaultVariants: {
|
|
429
|
+
size: "md",
|
|
430
|
+
},
|
|
431
|
+
});
|
|
410
432
|
export const segmentedIconWrapperVariant = cva([
|
|
411
433
|
"cursor-pointer",
|
|
412
434
|
"absolute items-center justify-center flex",
|
|
@@ -36,7 +36,9 @@ const ToastAction = React.forwardRef((_a, ref) => {
|
|
|
36
36
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
37
37
|
const ToastClose = React.forwardRef((_a, ref) => {
|
|
38
38
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
39
|
-
return (_jsx(ToastPrimitives.Close, Object.assign({ ref: ref,
|
|
39
|
+
return (_jsx(ToastPrimitives.Close, Object.assign({ ref: ref,
|
|
40
|
+
// className={cn("-mr-2 self-center text-text-g-contrast-high", className)}
|
|
41
|
+
className: cn("self-center text-text-g-contrast-high", className), "toast-close": "" }, props, { asChild: true, children: _jsx(ActionButton, { variant: "icon", size: "sm", children: _jsx(Icon, { type: "heroicons", name: "xmark" }) }) })));
|
|
40
42
|
});
|
|
41
43
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
42
44
|
const ToastTitle = React.forwardRef((_a, ref) => {
|
|
@@ -46,7 +48,7 @@ const ToastTitle = React.forwardRef((_a, ref) => {
|
|
|
46
48
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
47
49
|
const ToastDescription = React.forwardRef((_a, ref) => {
|
|
48
50
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
49
|
-
return (_jsx(ToastPrimitives.Description, Object.assign({ ref: ref, className: cn("typography-subtitle4 text-
|
|
51
|
+
return (_jsx(ToastPrimitives.Description, Object.assign({ ref: ref, className: cn("typography-subtitle4 text-text-g-contrast-high", className) }, props)));
|
|
50
52
|
});
|
|
51
53
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
52
54
|
export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
|
|
@@ -17,7 +17,7 @@ const meta = {
|
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
decorators: [
|
|
20
|
-
(Story) => (_jsx("div", { className: "flex max-h-screen w-full bg-
|
|
20
|
+
(Story) => (_jsx("div", { className: "flex max-h-screen w-full bg-bg-bg1 p-4", children: _jsx(Story, {}) })),
|
|
21
21
|
],
|
|
22
22
|
};
|
|
23
23
|
export default meta;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
export const toastVariants = cva([
|
|
3
3
|
"group pointer-events-auto relative flex w-full",
|
|
4
|
-
"rounded-lg shadow-[0px_8px_16px_0px_rgba(0,0,0,0.
|
|
4
|
+
"rounded-lg shadow-[0px_8px_16px_0px_rgba(0,0,0,0.08)] px-4 py-3 gap-1",
|
|
5
5
|
"transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
6
|
-
"bg-
|
|
6
|
+
"bg-modal-surface text-text-contrast-low",
|
|
7
7
|
], {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
@@ -68,7 +68,7 @@ export const toastViewportVariants = cva(["fixed z-[1000] flex w-auto flex-col-r
|
|
|
68
68
|
export const toastIconVariants = cva(["flex items-center justify-center mr-2 rounded-full size-7"], {
|
|
69
69
|
variants: {
|
|
70
70
|
variant: {
|
|
71
|
-
default: "",
|
|
71
|
+
default: "text-text-g-contrast-high",
|
|
72
72
|
success: "bg-success-transparent-8 text-success",
|
|
73
73
|
info: "bg-info-transparent-8 text-info",
|
|
74
74
|
warning: "bg-warning-transparent-8 text-warning",
|
|
@@ -83,7 +83,7 @@ export const toastContentVariants = cva(["flex flex-1"], {
|
|
|
83
83
|
variants: {
|
|
84
84
|
contentMode: {
|
|
85
85
|
horizontal: "items-center flex-row gap-2",
|
|
86
|
-
vertical: "flex-col gap-
|
|
86
|
+
vertical: "items-start flex-col gap-0",
|
|
87
87
|
},
|
|
88
88
|
},
|
|
89
89
|
defaultVariants: {
|
|
@@ -36,7 +36,7 @@ export function Toaster(_a) {
|
|
|
36
36
|
? "text-info"
|
|
37
37
|
: props.variant === "success"
|
|
38
38
|
? "text-success"
|
|
39
|
-
: "text-
|
|
40
|
-
return (_jsxs(Toast, Object.assign({}, props, { children: [_jsx("div", { className: cn(toastIconVariants({ variant: props.variant }), iconWrapperClassName), children: renderIcon ? (renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon()) : (_jsx(Icon, Object.assign({ type: "lucide", name: defaultIconName, className: "size-[22px]" }, iconProps))) }), _jsxs("div", { className: cn(toastContentVariants({ contentMode }), contentClassName), children: [title && (_jsx(ToastTitle, { className: cn(titleToneClass, titleClassName), children: title })), description && (_jsx(ToastDescription, { className: descriptionClassName, children: description }))] }), _jsx("div", { className: cn("self-center
|
|
39
|
+
: "text-text-g-contrast-high";
|
|
40
|
+
return (_jsxs(Toast, Object.assign({}, props, { children: [_jsx("div", { className: cn(toastIconVariants({ variant: props.variant }), iconWrapperClassName), children: renderIcon ? (renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon()) : (_jsx(Icon, Object.assign({ type: "lucide", name: defaultIconName, className: "size-[22px]" }, iconProps))) }), _jsxs("div", { className: cn(toastContentVariants({ contentMode }), contentClassName), children: [title && (_jsx(ToastTitle, { className: cn(titleToneClass, titleClassName), children: title })), description && (_jsx(ToastDescription, { className: descriptionClassName, children: description }))] }), action ? (_jsx("div", { className: cn("self-center mx-5", actionWrapperClassName), children: action })) : null, _jsx(ToastClose, {})] }), id));
|
|
41
41
|
}), _jsx(ToastViewport, { position: position, className: viewportClassName })] })));
|
|
42
42
|
}
|
|
@@ -21,7 +21,7 @@ const meta = {
|
|
|
21
21
|
layout: "fullscreen",
|
|
22
22
|
},
|
|
23
23
|
decorators: [
|
|
24
|
-
(Story) => (_jsx("div", { className: "p-5 flex w-full bg-
|
|
24
|
+
(Story) => (_jsx("div", { className: "p-5 flex w-full bg-bg-bg1", children: _jsx(Story, {}) })),
|
|
25
25
|
],
|
|
26
26
|
};
|
|
27
27
|
export default meta;
|
|
@@ -85,6 +85,6 @@ const TreeItem = ({ id, title, classes, children, isFirstLevel = false, isLeaf =
|
|
|
85
85
|
!isLastItem &&
|
|
86
86
|
((isExpanded && (hasChildren || isLoading)) || !isExpanded) && (_jsx("div", { className: cn("flex w-[2px] h-1/2 bg-grey-150", classes === null || classes === void 0 ? void 0 : classes.branch), style: styles.branch }))] }), _jsxs("div", { className: cn("flex flex-1 items-center py-2 min-h-10", classes === null || classes === void 0 ? void 0 : classes.itemContainer), children: [!isFirstLevel && (_jsx("div", { className: cn("bg-grey-150", classes === null || classes === void 0 ? void 0 : classes.horizontalLine), style: styles.horizontalLine })), isFirstLevel && !shouldExpandButton && (_jsx("div", { className: cn("flex mr-[2px]", classes === null || classes === void 0 ? void 0 : classes.expandButton), style: styles.expandButton })), shouldExpandButton && (_jsx("div", { className: cn("flex mr-[2px]", classes === null || classes === void 0 ? void 0 : classes.expandButton), style: styles.expandButton, onClick: !isLoading && handleExpandToggle, children: _jsx(ActionButton, { variant: "icon", size: "sm", children: isLoading ? (_jsx(Loading, {})) : (_jsx(Icon, { name: isExpanded ? "chevron-down" : "chevron-right" })) }) })), shouldShowCheckbox ? (_jsx(Checkbox, { id: id, className: cn("size-[16px]", classes === null || classes === void 0 ? void 0 : classes.checkbox), checked: isChecked, disabled: disabled, onCheckedChange: (newChecked) => onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange(id, newChecked, itemData) })) : (_jsx("div", { className: isFirstLevel && checkable
|
|
87
87
|
? cn("size-[16px]", classes === null || classes === void 0 ? void 0 : classes.checkbox)
|
|
88
|
-
: "" })), _jsxs("div", { className: cn("ml-2 gap-1 flex flex-1 items-center text-
|
|
88
|
+
: "" })), _jsxs("div", { className: cn("ml-2 gap-1 flex flex-1 items-center text-common-black", classes === null || classes === void 0 ? void 0 : classes.item), onClick: handleOnClickItem, children: [showIcon ? customIcon || defaultIcon : null, _jsx("div", { className: cn("flex flex-1 cursor-pointer text-subtitle5 text-ellipsis overflow-hidden break-all text-left", classes === null || classes === void 0 ? void 0 : classes.title), children: titleContent })] }), rightIcon] })] }), isExpanded && hasChildren && currentLevel < (maxLevel || Infinity) && (_jsxs("div", { className: cn("flex flex-row overflow-hidden", classes === null || classes === void 0 ? void 0 : classes.expandedChildrenWrapper), children: [!isFirstLevel && !isLastItem && (_jsx("div", { className: cn("flex w-[2px] h-full bg-grey-150", classes === null || classes === void 0 ? void 0 : classes.branch), style: styles.branch })), _jsx("div", { className: cn("flex flex-col overflow-hidden", classes === null || classes === void 0 ? void 0 : classes.expandedChildrenWrapperInner), style: styles.childPadding, children: children === null || children === void 0 ? void 0 : children.map((child, idx) => (_jsx(TreeItem, Object.assign({ classes: classes, isLastItem: idx === children.length - 1, checkIsExpanded: checkIsExpanded, checkIsChecked: checkIsChecked, checkAutoDisabled: checkAutoDisabled, checkIsLoading: checkIsLoading, onExpandChange: onExpandChange, onCheckedChange: onCheckedChange, renderIcon: renderIcon, renderElement: renderElement, renderTitle: renderTitle, disabled: checkAutoDisabled(child.id), showIcon: showIcon, lineSize: lineSize, horizontalLineWidth: horizontalLineWidth, expandButtonSize: expandButtonSize, spacing: spacing, notifyClickItem: notifyClickItem, maxLevel: maxLevel, currentLevel: currentLevel + 1, checkable: checkable }, child), child.id))) })] })), enableSeparatorLine && isFirstLevel && !isLastItem && (_jsx("div", { className: cn("bg-grey-150 w-full h-[2px] rounded", classes === null || classes === void 0 ? void 0 : classes.separatorLine) }))] }) }));
|
|
89
89
|
};
|
|
90
90
|
export default TreeItem;
|