@rovula/ui 0.1.7 → 0.1.9
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 +273 -126
- 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 +20 -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 +84 -0
- 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/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 +273 -126
- 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 +20 -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 +84 -0
- package/dist/index.d.ts +248 -2
- package/dist/index.js +3 -0
- package/dist/src/theme/global.css +340 -151
- package/dist/theme/ThemeColorCoverageRuntime.stories.js +91 -0
- package/dist/utils/colors.js +92 -0
- 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 +10 -10
- 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 +95 -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 +223 -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/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/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/presets/colors.js +155 -44
- package/src/theme/themes/xspector/components/loading.css +2 -2
- package/src/theme/tokens/color.css +3 -3
- package/src/theme/tokens/components/action-button.css +1 -1
- package/src/theme/tokens/components/dropdown-menu.css +3 -3
- package/src/theme/tokens/components/loading.css +2 -2
- package/src/theme/tokens/components/switch.css +1 -1
- package/src/theme/utils.js +164 -25
- package/src/utils/colors.ts +92 -0
|
@@ -56,17 +56,17 @@ export const textareaVariant = cva(
|
|
|
56
56
|
{
|
|
57
57
|
hasClearIcon: true,
|
|
58
58
|
size: "sm",
|
|
59
|
-
|
|
59
|
+
className: "focus:pe-6",
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
hasClearIcon: true,
|
|
63
63
|
size: "md",
|
|
64
|
-
|
|
64
|
+
className: "focus:pe-8",
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
hasClearIcon: true,
|
|
68
68
|
size: "lg",
|
|
69
|
-
|
|
69
|
+
className: "focus:pe-10",
|
|
70
70
|
},
|
|
71
71
|
],
|
|
72
72
|
defaultVariants: {
|
|
@@ -15,7 +15,7 @@ const meta = {
|
|
|
15
15
|
},
|
|
16
16
|
decorators: [
|
|
17
17
|
(Story) => (
|
|
18
|
-
<div className="p-5 flex h-full w-full bg-
|
|
18
|
+
<div className="p-5 flex h-full w-full bg-modal-surface">
|
|
19
19
|
<Story />
|
|
20
20
|
</div>
|
|
21
21
|
),
|
|
@@ -212,7 +212,7 @@ const KeepFooterSpaceDemo = () => {
|
|
|
212
212
|
const [hasError, setHasError] = useState(false);
|
|
213
213
|
return (
|
|
214
214
|
<div className="flex flex-col gap-8 w-full max-w-md">
|
|
215
|
-
<p className="text-sm text-text-
|
|
215
|
+
<p className="text-sm text-text-g-contrast-low">
|
|
216
216
|
Use <code>keepFooterSpace</code> to always reserve space for the
|
|
217
217
|
footer/helper area, preventing layout shift when an error or helper text
|
|
218
218
|
is shown or hidden.
|
|
@@ -228,7 +228,7 @@ const KeepFooterSpaceDemo = () => {
|
|
|
228
228
|
</label>
|
|
229
229
|
<div className="flex flex-col gap-4">
|
|
230
230
|
<div>
|
|
231
|
-
<h4 className="text-sm font-medium mb-2 text-text-
|
|
231
|
+
<h4 className="text-sm font-medium mb-2 text-text-g-contrast-low">
|
|
232
232
|
With keepFooterSpace (layout stays stable)
|
|
233
233
|
</h4>
|
|
234
234
|
<TextInput
|
|
@@ -241,7 +241,7 @@ const KeepFooterSpaceDemo = () => {
|
|
|
241
241
|
/>
|
|
242
242
|
</div>
|
|
243
243
|
<div>
|
|
244
|
-
<h4 className="text-sm font-medium mb-2 text-text-
|
|
244
|
+
<h4 className="text-sm font-medium mb-2 text-text-g-contrast-low">
|
|
245
245
|
Without keepFooterSpace (layout shifts when error appears)
|
|
246
246
|
</h4>
|
|
247
247
|
<TextInput
|
|
@@ -275,7 +275,7 @@ const FeedbackApiDemo = () => {
|
|
|
275
275
|
|
|
276
276
|
return (
|
|
277
277
|
<div className="flex flex-col gap-6 w-full max-w-2xl">
|
|
278
|
-
<div className="flex flex-wrap items-center gap-4 text-sm text-text-
|
|
278
|
+
<div className="flex flex-wrap items-center gap-4 text-sm text-text-g-contrast-low">
|
|
279
279
|
<label className="flex items-center gap-2 cursor-pointer">
|
|
280
280
|
<input
|
|
281
281
|
type="checkbox"
|
|
@@ -304,7 +304,7 @@ const FeedbackApiDemo = () => {
|
|
|
304
304
|
|
|
305
305
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
306
306
|
<div className="flex flex-col gap-2">
|
|
307
|
-
<h4 className="text-sm font-medium text-text-
|
|
307
|
+
<h4 className="text-sm font-medium text-text-g-contrast-low">
|
|
308
308
|
Legacy API (error / warning)
|
|
309
309
|
</h4>
|
|
310
310
|
<TextInput
|
|
@@ -320,7 +320,7 @@ const FeedbackApiDemo = () => {
|
|
|
320
320
|
</div>
|
|
321
321
|
|
|
322
322
|
<div className="flex flex-col gap-2">
|
|
323
|
-
<h4 className="text-sm font-medium text-text-
|
|
323
|
+
<h4 className="text-sm font-medium text-text-g-contrast-low">
|
|
324
324
|
New API (status + message)
|
|
325
325
|
</h4>
|
|
326
326
|
<TextInput
|
|
@@ -16,7 +16,7 @@ export const inputVariant = cva(
|
|
|
16
16
|
},
|
|
17
17
|
rounded: {
|
|
18
18
|
none: "rounded-none",
|
|
19
|
-
normal: "
|
|
19
|
+
normal: "",
|
|
20
20
|
full: "rounded-full",
|
|
21
21
|
},
|
|
22
22
|
variant: {
|
|
@@ -58,6 +58,16 @@ export const inputVariant = cva(
|
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
compoundVariants: [
|
|
61
|
+
{
|
|
62
|
+
rounded: "normal",
|
|
63
|
+
size: "sm",
|
|
64
|
+
className: "rounded-sm",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
rounded: "normal",
|
|
68
|
+
size: ["md", "lg"],
|
|
69
|
+
className: "rounded-md",
|
|
70
|
+
},
|
|
61
71
|
{
|
|
62
72
|
variant: "underline",
|
|
63
73
|
className: "rounded-none",
|
|
@@ -65,62 +75,62 @@ export const inputVariant = cva(
|
|
|
65
75
|
{
|
|
66
76
|
hasClearIcon: true,
|
|
67
77
|
size: "sm",
|
|
68
|
-
|
|
78
|
+
className: "focus:pe-6",
|
|
69
79
|
},
|
|
70
80
|
{
|
|
71
81
|
hasClearIcon: true,
|
|
72
82
|
size: "md",
|
|
73
|
-
|
|
83
|
+
className: "focus:pe-8",
|
|
74
84
|
},
|
|
75
85
|
{
|
|
76
86
|
hasClearIcon: true,
|
|
77
87
|
size: "lg",
|
|
78
|
-
|
|
88
|
+
className: "focus:pe-10",
|
|
79
89
|
},
|
|
80
90
|
{
|
|
81
91
|
hasSearchIcon: true,
|
|
82
92
|
size: "sm",
|
|
83
|
-
|
|
93
|
+
className: "!ps-[26px]",
|
|
84
94
|
},
|
|
85
95
|
{
|
|
86
96
|
hasSearchIcon: true,
|
|
87
97
|
size: "md",
|
|
88
|
-
|
|
98
|
+
className: "!ps-[40px]",
|
|
89
99
|
},
|
|
90
100
|
{
|
|
91
101
|
hasSearchIcon: true,
|
|
92
102
|
size: "lg",
|
|
93
|
-
|
|
103
|
+
className: "!ps-[52px]",
|
|
94
104
|
},
|
|
95
105
|
{
|
|
96
106
|
leftSectionIcon: true,
|
|
97
107
|
size: "sm",
|
|
98
|
-
|
|
108
|
+
className: "!ps-[38px]",
|
|
99
109
|
},
|
|
100
110
|
{
|
|
101
111
|
leftSectionIcon: true,
|
|
102
112
|
size: "md",
|
|
103
|
-
|
|
113
|
+
className: "!ps-[46px]",
|
|
104
114
|
},
|
|
105
115
|
{
|
|
106
116
|
leftSectionIcon: true,
|
|
107
117
|
size: "lg",
|
|
108
|
-
|
|
118
|
+
className: "!ps-[72px]",
|
|
109
119
|
},
|
|
110
120
|
{
|
|
111
121
|
rightSectionIcon: true,
|
|
112
122
|
size: "sm",
|
|
113
|
-
|
|
123
|
+
className: "!pe-[38px]",
|
|
114
124
|
},
|
|
115
125
|
{
|
|
116
126
|
rightSectionIcon: true,
|
|
117
127
|
size: "md",
|
|
118
|
-
|
|
128
|
+
className: "!pe-[46px]",
|
|
119
129
|
},
|
|
120
130
|
{
|
|
121
131
|
rightSectionIcon: true,
|
|
122
132
|
size: "lg",
|
|
123
|
-
|
|
133
|
+
className: "!pe-[72px]",
|
|
124
134
|
},
|
|
125
135
|
],
|
|
126
136
|
defaultVariants: {
|
|
@@ -224,7 +234,7 @@ export const labelVariant = cva(
|
|
|
224
234
|
hasSearchIcon: true,
|
|
225
235
|
size: "sm",
|
|
226
236
|
className: [
|
|
227
|
-
"left-
|
|
237
|
+
"left-[26px] -top-1.5 typography-label2 bg-input-label-bg",
|
|
228
238
|
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent",
|
|
229
239
|
"peer-focus:-top-1.5 peer-focus:typography-label2",
|
|
230
240
|
],
|
|
@@ -234,7 +244,7 @@ export const labelVariant = cva(
|
|
|
234
244
|
hasSearchIcon: true,
|
|
235
245
|
size: "md",
|
|
236
246
|
className: [
|
|
237
|
-
"left-
|
|
247
|
+
"left-[40px] -top-1.5 typography-label1 bg-input-label-bg",
|
|
238
248
|
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent",
|
|
239
249
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
240
250
|
],
|
|
@@ -244,7 +254,7 @@ export const labelVariant = cva(
|
|
|
244
254
|
hasSearchIcon: true,
|
|
245
255
|
size: "lg",
|
|
246
256
|
className: [
|
|
247
|
-
"left-
|
|
257
|
+
"left-[52px] -top-1.5 typography-label1 bg-input-label-bg",
|
|
248
258
|
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent",
|
|
249
259
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
250
260
|
],
|
|
@@ -255,7 +265,7 @@ export const labelVariant = cva(
|
|
|
255
265
|
hasSearchIcon: true,
|
|
256
266
|
size: "sm",
|
|
257
267
|
className: [
|
|
258
|
-
"left-
|
|
268
|
+
"left-[26px] peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1",
|
|
259
269
|
],
|
|
260
270
|
},
|
|
261
271
|
{
|
|
@@ -263,7 +273,7 @@ export const labelVariant = cva(
|
|
|
263
273
|
hasSearchIcon: true,
|
|
264
274
|
size: "md",
|
|
265
275
|
className: [
|
|
266
|
-
"left-
|
|
276
|
+
"left-[40px] peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4",
|
|
267
277
|
],
|
|
268
278
|
},
|
|
269
279
|
{
|
|
@@ -271,7 +281,7 @@ export const labelVariant = cva(
|
|
|
271
281
|
hasSearchIcon: true,
|
|
272
282
|
size: "lg",
|
|
273
283
|
className: [
|
|
274
|
-
"left-
|
|
284
|
+
"left-[52px] peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1",
|
|
275
285
|
],
|
|
276
286
|
},
|
|
277
287
|
|
|
@@ -432,6 +442,19 @@ export const iconActionVariant = cva(["cursor-pointer z-50 select-none"], {
|
|
|
432
442
|
},
|
|
433
443
|
});
|
|
434
444
|
|
|
445
|
+
export const searchIconVariant = cva(["cursor-pointer z-50 select-none"], {
|
|
446
|
+
variants: {
|
|
447
|
+
size: {
|
|
448
|
+
sm: "size-[14px]",
|
|
449
|
+
md: "size-5",
|
|
450
|
+
lg: "size-6",
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
defaultVariants: {
|
|
454
|
+
size: "md",
|
|
455
|
+
},
|
|
456
|
+
});
|
|
457
|
+
|
|
435
458
|
export const segmentedIconWrapperVariant = cva(
|
|
436
459
|
[
|
|
437
460
|
"cursor-pointer",
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
inlineStartIconWrapperVariant,
|
|
14
14
|
inputVariant,
|
|
15
15
|
labelVariant,
|
|
16
|
+
searchIconVariant,
|
|
16
17
|
segmentedIconWrapperVariant,
|
|
17
18
|
} from "./TextInput.styles";
|
|
18
19
|
import {
|
|
@@ -152,6 +153,7 @@ export const TextInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
152
153
|
size,
|
|
153
154
|
});
|
|
154
155
|
const iconActionClassname = iconActionVariant({ size });
|
|
156
|
+
const searchIconClassname = searchIconVariant({ size });
|
|
155
157
|
|
|
156
158
|
// TODO wait for clearify aboutm start,end, search and clearIcon with iconMode
|
|
157
159
|
|
|
@@ -332,7 +334,7 @@ export const TextInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
332
334
|
classes?.iconSearchWrapper
|
|
333
335
|
)}
|
|
334
336
|
>
|
|
335
|
-
<Search className={cn(
|
|
337
|
+
<Search className={cn(searchIconClassname, classes?.icon)} />
|
|
336
338
|
</div>
|
|
337
339
|
)}
|
|
338
340
|
{startIconElement}
|
|
@@ -3,9 +3,9 @@ import { cva } from "class-variance-authority";
|
|
|
3
3
|
export const toastVariants = cva(
|
|
4
4
|
[
|
|
5
5
|
"group pointer-events-auto relative flex w-full",
|
|
6
|
-
"rounded-lg shadow-[0px_8px_16px_0px_rgba(0,0,0,0.
|
|
6
|
+
"rounded-lg shadow-[0px_8px_16px_0px_rgba(0,0,0,0.08)] px-4 py-3 gap-1",
|
|
7
7
|
"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",
|
|
8
|
-
"bg-
|
|
8
|
+
"bg-modal-surface text-text-contrast-low",
|
|
9
9
|
],
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
@@ -52,7 +52,7 @@ export const toastVariants = cva(
|
|
|
52
52
|
variant: "success",
|
|
53
53
|
showBorder: false,
|
|
54
54
|
},
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
56
|
);
|
|
57
57
|
|
|
58
58
|
export const toastViewportVariants = cva(
|
|
@@ -71,7 +71,7 @@ export const toastViewportVariants = cva(
|
|
|
71
71
|
defaultVariants: {
|
|
72
72
|
position: "top-center",
|
|
73
73
|
},
|
|
74
|
-
}
|
|
74
|
+
},
|
|
75
75
|
);
|
|
76
76
|
|
|
77
77
|
export const toastIconVariants = cva(
|
|
@@ -79,7 +79,7 @@ export const toastIconVariants = cva(
|
|
|
79
79
|
{
|
|
80
80
|
variants: {
|
|
81
81
|
variant: {
|
|
82
|
-
default: "",
|
|
82
|
+
default: "text-text-g-contrast-high",
|
|
83
83
|
success: "bg-success-transparent-8 text-success",
|
|
84
84
|
info: "bg-info-transparent-8 text-info",
|
|
85
85
|
warning: "bg-warning-transparent-8 text-warning",
|
|
@@ -89,14 +89,14 @@ export const toastIconVariants = cva(
|
|
|
89
89
|
defaultVariants: {
|
|
90
90
|
variant: "success",
|
|
91
91
|
},
|
|
92
|
-
}
|
|
92
|
+
},
|
|
93
93
|
);
|
|
94
94
|
|
|
95
95
|
export const toastContentVariants = cva(["flex flex-1"], {
|
|
96
96
|
variants: {
|
|
97
97
|
contentMode: {
|
|
98
98
|
horizontal: "items-center flex-row gap-2",
|
|
99
|
-
vertical: "flex-col gap-
|
|
99
|
+
vertical: "items-start flex-col gap-0",
|
|
100
100
|
},
|
|
101
101
|
},
|
|
102
102
|
defaultVariants: {
|
|
@@ -15,7 +15,7 @@ const ToastProvider = ToastPrimitives.Provider;
|
|
|
15
15
|
const ToastViewport = React.forwardRef<
|
|
16
16
|
React.ElementRef<typeof ToastPrimitives.Viewport>,
|
|
17
17
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport> &
|
|
18
|
-
|
|
18
|
+
VariantProps<typeof toastViewportVariants>
|
|
19
19
|
>(({ className, position, ...props }, ref) => (
|
|
20
20
|
<ToastPrimitives.Viewport
|
|
21
21
|
ref={ref}
|
|
@@ -28,7 +28,7 @@ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
|
28
28
|
const Toast = React.forwardRef<
|
|
29
29
|
React.ElementRef<typeof ToastPrimitives.Root>,
|
|
30
30
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
|
|
31
|
-
|
|
31
|
+
VariantProps<typeof toastVariants>
|
|
32
32
|
>(({ className, variant, showBorder, ...props }, ref) => {
|
|
33
33
|
return (
|
|
34
34
|
<ToastPrimitives.Root
|
|
@@ -63,7 +63,8 @@ const ToastClose = React.forwardRef<
|
|
|
63
63
|
>(({ className, ...props }, ref) => (
|
|
64
64
|
<ToastPrimitives.Close
|
|
65
65
|
ref={ref}
|
|
66
|
-
className={cn("-mr-2 self-center text-
|
|
66
|
+
// className={cn("-mr-2 self-center text-text-g-contrast-high", className)}
|
|
67
|
+
className={cn("self-center text-text-g-contrast-high", className)}
|
|
67
68
|
toast-close=""
|
|
68
69
|
{...props}
|
|
69
70
|
asChild
|
|
@@ -93,7 +94,7 @@ const ToastDescription = React.forwardRef<
|
|
|
93
94
|
>(({ className, ...props }, ref) => (
|
|
94
95
|
<ToastPrimitives.Description
|
|
95
96
|
ref={ref}
|
|
96
|
-
className={cn("typography-subtitle4 text-
|
|
97
|
+
className={cn("typography-subtitle4 text-text-g-contrast-high", className)}
|
|
97
98
|
{...props}
|
|
98
99
|
/>
|
|
99
100
|
));
|
|
@@ -51,28 +51,28 @@ export function Toaster({
|
|
|
51
51
|
props.variant === "error"
|
|
52
52
|
? "circle-x"
|
|
53
53
|
: props.variant === "warning"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
? "circle-alert"
|
|
55
|
+
: props.variant === "info"
|
|
56
|
+
? "info"
|
|
57
|
+
: "circle-check";
|
|
58
58
|
|
|
59
59
|
const titleToneClass =
|
|
60
60
|
props.variant === "error"
|
|
61
61
|
? "text-error"
|
|
62
62
|
: props.variant === "warning"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
? "text-warning"
|
|
64
|
+
: props.variant === "info"
|
|
65
|
+
? "text-info"
|
|
66
|
+
: props.variant === "success"
|
|
67
|
+
? "text-success"
|
|
68
|
+
: "text-text-g-contrast-high";
|
|
69
69
|
|
|
70
70
|
return (
|
|
71
71
|
<Toast key={id} {...props}>
|
|
72
72
|
<div
|
|
73
73
|
className={cn(
|
|
74
74
|
toastIconVariants({ variant: props.variant }),
|
|
75
|
-
iconWrapperClassName
|
|
75
|
+
iconWrapperClassName,
|
|
76
76
|
)}
|
|
77
77
|
>
|
|
78
78
|
{renderIcon ? (
|
|
@@ -89,7 +89,7 @@ export function Toaster({
|
|
|
89
89
|
<div
|
|
90
90
|
className={cn(
|
|
91
91
|
toastContentVariants({ contentMode }),
|
|
92
|
-
contentClassName
|
|
92
|
+
contentClassName,
|
|
93
93
|
)}
|
|
94
94
|
>
|
|
95
95
|
{title && (
|
|
@@ -103,14 +103,11 @@ export function Toaster({
|
|
|
103
103
|
</ToastDescription>
|
|
104
104
|
)}
|
|
105
105
|
</div>
|
|
106
|
-
|
|
107
|
-
className={cn(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
>
|
|
112
|
-
{action}
|
|
113
|
-
</div>
|
|
106
|
+
{action ? (
|
|
107
|
+
<div className={cn("self-center mx-5", actionWrapperClassName)}>
|
|
108
|
+
{action}
|
|
109
|
+
</div>
|
|
110
|
+
) : null}
|
|
114
111
|
<ToastClose />
|
|
115
112
|
</Toast>
|
|
116
113
|
);
|
package/src/index.ts
CHANGED
|
@@ -22,6 +22,8 @@ export { Avatar, AvatarGroup } from "./components/Avatar";
|
|
|
22
22
|
export { Collapsible } from "./components/Collapsible";
|
|
23
23
|
export { Calendar } from "./components/Calendar";
|
|
24
24
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
25
|
+
export { default as OtpInput } from "./components/OtpInput";
|
|
26
|
+
export { OtpInputGroup } from "./components/OtpInput";
|
|
25
27
|
export {
|
|
26
28
|
Popover,
|
|
27
29
|
PopoverTrigger,
|
|
@@ -48,6 +50,7 @@ export * from "./components/Toast/useToast";
|
|
|
48
50
|
export * from "./components/Tree";
|
|
49
51
|
export * from "./components/FocusedScrollView/FocusedScrollView";
|
|
50
52
|
export * from "./components/RadioGroup/RadioGroup";
|
|
53
|
+
export * from "./components/Form";
|
|
51
54
|
|
|
52
55
|
// Export component types
|
|
53
56
|
export type { ButtonProps } from "./components/Button/Button";
|
|
@@ -59,6 +62,8 @@ export type {
|
|
|
59
62
|
} from "./components/MaskedTextInput";
|
|
60
63
|
export type { NumberInputProps } from "./components/NumberInput/NumberInput";
|
|
61
64
|
export type { TextAreaProps } from "./components/TextArea/TextArea";
|
|
65
|
+
export type { OtpInputProps } from "./components/OtpInput";
|
|
66
|
+
export type { OtpInputGroupProps } from "./components/OtpInput";
|
|
62
67
|
export type { DropdownProps, Options } from "./components/Dropdown/Dropdown";
|
|
63
68
|
export type { NavbarProps, NavbarVariant } from "./components/Navbar/Navbar";
|
|
64
69
|
export type { FooterProps, FooterVariant } from "./components/Footer/Footer";
|