@deepnoid/ui 0.0.88 → 0.0.90
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/{chunk-4VIEZ5FT.mjs → chunk-2BCJZILI.mjs} +10 -9
- package/dist/chunk-2ZFHB4JM.mjs +76 -0
- package/dist/{chunk-4DLTBZUQ.mjs → chunk-3DRIHQOM.mjs} +7 -5
- package/dist/{chunk-IXFP2WQ4.mjs → chunk-6YE26GOI.mjs} +10 -8
- package/dist/chunk-75HLCORR.mjs +1 -0
- package/dist/{chunk-K6HPMTN4.mjs → chunk-7HHFRKJU.mjs} +1 -1
- package/dist/{chunk-H2HUJ4N2.mjs → chunk-A3RWT3JJ.mjs} +9 -4
- package/dist/{chunk-BE2OG6M4.mjs → chunk-ANYPMQH4.mjs} +28 -21
- package/dist/{chunk-5HSZ5AYM.mjs → chunk-B4KZBOGT.mjs} +16 -16
- package/dist/{chunk-KHWFCTPX.mjs → chunk-DWROPKZW.mjs} +6 -6
- package/dist/{chunk-FPCP4OOL.mjs → chunk-EDEV4IK4.mjs} +3 -3
- package/dist/{chunk-IOV7MEPG.mjs → chunk-IOCRFIQF.mjs} +30 -0
- package/dist/{chunk-SFNR4F3J.mjs → chunk-L6BQA6GI.mjs} +2 -2
- package/dist/{chunk-YGTJU3GD.mjs → chunk-L7P6OBUX.mjs} +10 -17
- package/dist/{chunk-PRUAIZTU.mjs → chunk-LCI6RPWE.mjs} +1 -1
- package/dist/{chunk-QVGXHUYW.mjs → chunk-N2JULHST.mjs} +9 -9
- package/dist/chunk-N6IEGD4K.mjs +119 -0
- package/dist/chunk-OJ2OEI5B.mjs +202 -0
- package/dist/chunk-P732YGHO.mjs +18 -0
- package/dist/{chunk-QRHT7MSO.mjs → chunk-PXUBPWKU.mjs} +1 -1
- package/dist/{chunk-PCIONGEJ.mjs → chunk-QWFOYO3D.mjs} +37 -19
- package/dist/{chunk-LY6LJRUX.mjs → chunk-RZZWHI6O.mjs} +1 -1
- package/dist/chunk-S2VUKVCH.mjs +319 -0
- package/dist/{chunk-IZOMH2SL.mjs → chunk-S3O52LLG.mjs} +14 -14
- package/dist/chunk-UR64ZUAU.mjs +671 -0
- package/dist/{chunk-PUFNT5LS.mjs → chunk-VG4644BG.mjs} +1 -1
- package/dist/chunk-WX32MAKV.mjs +219 -0
- package/dist/components/accordion/accordion.d.mts +3 -3
- package/dist/components/accordion/accordion.d.ts +3 -3
- package/dist/components/accordion/accordion.test.mjs +3 -3
- package/dist/components/accordion/accordionItem.d.mts +3 -3
- package/dist/components/accordion/accordionItem.d.ts +3 -3
- package/dist/components/accordion/accordionItem.js +31 -1
- package/dist/components/accordion/accordionItem.mjs +3 -3
- package/dist/components/accordion/index.js +31 -1
- package/dist/components/accordion/index.mjs +3 -3
- package/dist/components/button/button-group.d.mts +2 -2
- package/dist/components/button/button-group.d.ts +2 -2
- package/dist/components/button/button-group.test.js +4103 -167
- package/dist/components/button/button-group.test.mjs +7 -3
- package/dist/components/button/button.d.mts +360 -12
- package/dist/components/button/button.d.ts +360 -12
- package/dist/components/button/button.js +4054 -110
- package/dist/components/button/button.mjs +5 -1
- package/dist/components/button/button.test.js +4059 -125
- package/dist/components/button/button.test.mjs +7 -3
- package/dist/components/button/index.d.mts +3 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.js +4046 -112
- package/dist/components/button/index.mjs +5 -1
- package/dist/components/card/card.d.mts +3 -3
- package/dist/components/card/card.d.ts +3 -3
- package/dist/components/checkbox/checkbox.d.mts +71 -71
- package/dist/components/checkbox/checkbox.d.ts +71 -71
- package/dist/components/checkbox/checkbox.js +28 -21
- package/dist/components/checkbox/checkbox.mjs +1 -1
- package/dist/components/checkbox/checkbox.test.js +28 -21
- package/dist/components/checkbox/checkbox.test.mjs +4 -4
- package/dist/components/checkbox/index.js +28 -21
- package/dist/components/checkbox/index.mjs +1 -1
- package/dist/components/dateTimePicker/calendar.d.mts +118 -0
- package/dist/components/dateTimePicker/calendar.d.ts +118 -0
- package/dist/components/dateTimePicker/calendar.js +3854 -0
- package/dist/components/dateTimePicker/calendar.mjs +16 -0
- package/dist/components/dateTimePicker/dateTimePicker.d.mts +443 -0
- package/dist/components/dateTimePicker/dateTimePicker.d.ts +443 -0
- package/dist/components/dateTimePicker/dateTimePicker.js +4486 -0
- package/dist/components/dateTimePicker/dateTimePicker.mjs +22 -0
- package/dist/components/dateTimePicker/index.d.mts +5 -0
- package/dist/components/dateTimePicker/index.d.ts +5 -0
- package/dist/components/dateTimePicker/index.js +4487 -0
- package/dist/components/dateTimePicker/index.mjs +21 -0
- package/dist/components/dateTimePicker/timePicker.d.mts +10 -0
- package/dist/components/dateTimePicker/timePicker.d.ts +10 -0
- package/dist/components/dateTimePicker/timePicker.js +342 -0
- package/dist/components/dateTimePicker/timePicker.mjs +13 -0
- package/dist/components/dateTimePicker/useDateTimePicker.d.mts +31 -0
- package/dist/components/dateTimePicker/useDateTimePicker.d.ts +31 -0
- package/dist/components/dateTimePicker/useDateTimePicker.js +106 -0
- package/dist/components/dateTimePicker/useDateTimePicker.mjs +9 -0
- package/dist/components/dateTimePicker/util.d.mts +4 -0
- package/dist/components/dateTimePicker/util.d.ts +4 -0
- package/dist/components/dateTimePicker/util.js +42 -0
- package/dist/components/dateTimePicker/util.mjs +10 -0
- package/dist/components/icon/Icon.d.mts +4 -0
- package/dist/components/icon/Icon.d.ts +4 -0
- package/dist/components/icon/Icon.js +30 -0
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.js +30 -0
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.d.mts +1 -0
- package/dist/components/icon/template.d.ts +1 -0
- package/dist/components/icon/template.js +30 -0
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +36 -4
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.d.mts +9 -4
- package/dist/components/input/input.d.ts +9 -4
- package/dist/components/input/input.js +36 -4
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/input/input.test.js +36 -4
- package/dist/components/input/input.test.mjs +6 -6
- package/dist/components/list/index.js +3 -3
- package/dist/components/list/index.mjs +1 -1
- package/dist/components/list/list.d.mts +3 -3
- package/dist/components/list/list.d.ts +3 -3
- package/dist/components/list/list.test.mjs +1 -1
- package/dist/components/list/listItem.d.mts +4 -4
- package/dist/components/list/listItem.d.ts +4 -4
- package/dist/components/list/listItem.js +3 -3
- package/dist/components/list/listItem.mjs +1 -1
- package/dist/components/modal/index.js +506 -128
- package/dist/components/modal/index.mjs +6 -5
- package/dist/components/modal/modal.d.mts +2 -2
- package/dist/components/modal/modal.d.ts +2 -2
- package/dist/components/modal/modal.js +506 -128
- package/dist/components/modal/modal.mjs +6 -5
- package/dist/components/modal/modal.test.js +498 -130
- package/dist/components/modal/modal.test.mjs +6 -5
- package/dist/components/pagination/index.js +16 -16
- package/dist/components/pagination/index.mjs +1 -1
- package/dist/components/pagination/pagination.d.mts +2 -2
- package/dist/components/pagination/pagination.d.ts +2 -2
- package/dist/components/pagination/pagination.js +16 -16
- package/dist/components/pagination/pagination.mjs +1 -1
- package/dist/components/pagination/pagination.test.js +16 -16
- package/dist/components/pagination/pagination.test.mjs +2 -2
- package/dist/components/progress/index.js +9 -9
- package/dist/components/progress/index.mjs +1 -1
- package/dist/components/progress/progress.d.mts +35 -35
- package/dist/components/progress/progress.d.ts +35 -35
- package/dist/components/progress/progress.js +9 -9
- package/dist/components/progress/progress.mjs +1 -1
- package/dist/components/progress/progress.test.js +9 -9
- package/dist/components/progress/progress.test.mjs +1 -1
- package/dist/components/radio/index.js +37 -19
- package/dist/components/radio/index.mjs +1 -1
- package/dist/components/radio/radio.d.mts +35 -35
- package/dist/components/radio/radio.d.ts +35 -35
- package/dist/components/radio/radio.js +37 -19
- package/dist/components/radio/radio.mjs +1 -1
- package/dist/components/radio/radio.test.js +37 -19
- package/dist/components/radio/radio.test.mjs +2 -2
- package/dist/components/select/index.js +36 -5
- package/dist/components/select/index.mjs +4 -4
- package/dist/components/select/option.js +30 -0
- package/dist/components/select/option.mjs +3 -3
- package/dist/components/select/select.d.mts +4 -4
- package/dist/components/select/select.d.ts +4 -4
- package/dist/components/select/select.js +36 -5
- package/dist/components/select/select.mjs +4 -4
- package/dist/components/select/select.test.js +36 -5
- package/dist/components/select/select.test.mjs +9 -9
- package/dist/components/select/useSelect.d.mts +3 -3
- package/dist/components/select/useSelect.d.ts +3 -3
- package/dist/components/slider/index.js +9 -4
- package/dist/components/slider/index.mjs +1 -1
- package/dist/components/slider/slider.d.mts +28 -2
- package/dist/components/slider/slider.d.ts +28 -2
- package/dist/components/slider/slider.js +9 -4
- package/dist/components/slider/slider.mjs +1 -1
- package/dist/components/slider/slider.test.js +9 -4
- package/dist/components/slider/slider.test.mjs +1 -1
- package/dist/components/switch/index.js +14 -14
- package/dist/components/switch/index.mjs +1 -1
- package/dist/components/switch/switch.d.mts +50 -50
- package/dist/components/switch/switch.d.ts +50 -50
- package/dist/components/switch/switch.js +14 -14
- package/dist/components/switch/switch.mjs +1 -1
- package/dist/components/switch/switch.test.js +14 -14
- package/dist/components/switch/switch.test.mjs +2 -2
- package/dist/components/table/index.js +66 -27
- package/dist/components/table/index.mjs +7 -7
- package/dist/components/table/table-body.d.mts +2 -2
- package/dist/components/table/table-body.d.ts +2 -2
- package/dist/components/table/table-body.js +60 -23
- package/dist/components/table/table-body.mjs +5 -5
- package/dist/components/table/table-head.js +28 -21
- package/dist/components/table/table-head.mjs +2 -2
- package/dist/components/table/table.d.mts +26 -12
- package/dist/components/table/table.d.ts +26 -12
- package/dist/components/table/table.js +66 -27
- package/dist/components/table/table.mjs +7 -7
- package/dist/components/table/table.test.js +66 -27
- package/dist/components/table/table.test.mjs +8 -8
- package/dist/components/tabs/tabs.d.mts +3 -3
- package/dist/components/tabs/tabs.d.ts +3 -3
- package/dist/components/tabs/tabs.test.mjs +4 -4
- package/dist/components/textarea/index.d.mts +3 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/index.js +89 -30
- package/dist/components/textarea/index.mjs +2 -1
- package/dist/components/textarea/textarea.d.mts +512 -11
- package/dist/components/textarea/textarea.d.ts +512 -11
- package/dist/components/textarea/textarea.js +89 -30
- package/dist/components/textarea/textarea.mjs +2 -1
- package/dist/components/textarea/textarea.test.js +89 -30
- package/dist/components/textarea/textarea.test.mjs +3 -2
- package/dist/components/toast/index.js +30 -0
- package/dist/components/toast/index.mjs +4 -4
- package/dist/components/toast/toast.d.mts +2 -2
- package/dist/components/toast/toast.d.ts +2 -2
- package/dist/components/toast/toast.js +30 -0
- package/dist/components/toast/toast.mjs +3 -3
- package/dist/components/toast/toast.test.js +30 -0
- package/dist/components/toast/toast.test.mjs +5 -5
- package/dist/components/toast/use-toast.js +30 -0
- package/dist/components/toast/use-toast.mjs +4 -4
- package/dist/components/tooltip/index.d.mts +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/tooltip-utils.d.mts +1 -1
- package/dist/components/tooltip/tooltip-utils.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.mts +3 -3
- package/dist/components/tooltip/tooltip.d.ts +3 -3
- package/dist/components/tooltip/tooltip.test.js +4034 -118
- package/dist/components/tooltip/tooltip.test.mjs +7 -4
- package/dist/components/tooltip/useTooltip.d.mts +1 -1
- package/dist/components/tooltip/useTooltip.d.ts +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3741 -2611
- package/dist/index.mjs +71 -52
- package/dist/{tooltip-utils-DCKA5gnI.d.ts → tooltip-utils-CrCabndd.d.mts} +2 -2
- package/dist/{tooltip-utils-DCKA5gnI.d.mts → tooltip-utils-CrCabndd.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/chunk-66WCZEEU.mjs +0 -320
- package/dist/chunk-WOX3SLJB.mjs +0 -162
|
@@ -1,17 +1,518 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
|
|
4
|
+
import * as React from 'react';
|
|
2
5
|
import { ComponentProps } from 'react';
|
|
6
|
+
import { SlotsToClasses } from '../../utils/types.js';
|
|
3
7
|
|
|
4
|
-
interface
|
|
5
|
-
color?: "primary" | "secondary";
|
|
6
|
-
size?: "sm" | "md" | "lg";
|
|
7
|
-
variant?: "solid" | "line";
|
|
8
|
-
radius?: "default" | "full" | "none";
|
|
8
|
+
interface Props extends Omit<ComponentProps<"textarea">, "size"> {
|
|
9
9
|
label?: string;
|
|
10
10
|
errorMessage?: string;
|
|
11
|
-
|
|
12
|
-
isDisabled?: boolean;
|
|
13
|
-
isRequired?: boolean;
|
|
11
|
+
classNames?: SlotsToClasses<TextareaSlots>;
|
|
14
12
|
}
|
|
15
|
-
|
|
13
|
+
type TextareaProps = Props & TextareaVariantProps;
|
|
14
|
+
declare const Textarea: React.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
declare const textareaStyle: tailwind_variants.TVReturnType<{
|
|
17
|
+
variant: {
|
|
18
|
+
solid: {
|
|
19
|
+
textareaWrapper: string[];
|
|
20
|
+
};
|
|
21
|
+
line: {
|
|
22
|
+
textareaWrapper: string[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
color: {
|
|
26
|
+
primary: {};
|
|
27
|
+
secondary: {};
|
|
28
|
+
};
|
|
29
|
+
size: {
|
|
30
|
+
sm: {
|
|
31
|
+
base: string;
|
|
32
|
+
textareaWrapper: string;
|
|
33
|
+
textarea: string;
|
|
34
|
+
label: string;
|
|
35
|
+
errorMessage: string;
|
|
36
|
+
};
|
|
37
|
+
md: {
|
|
38
|
+
base: string;
|
|
39
|
+
textareaWrapper: string;
|
|
40
|
+
textarea: string;
|
|
41
|
+
label: string;
|
|
42
|
+
errorMessage: string;
|
|
43
|
+
};
|
|
44
|
+
lg: {
|
|
45
|
+
base: string;
|
|
46
|
+
textareaWrapper: string;
|
|
47
|
+
textarea: string;
|
|
48
|
+
label: string;
|
|
49
|
+
errorMessage: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
radius: {
|
|
53
|
+
default: {};
|
|
54
|
+
none: {
|
|
55
|
+
textareaWrapper: string;
|
|
56
|
+
textarea: string;
|
|
57
|
+
};
|
|
58
|
+
full: {
|
|
59
|
+
textareaWrapper: string;
|
|
60
|
+
textarea: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
fullWidth: {
|
|
64
|
+
true: {
|
|
65
|
+
base: string;
|
|
66
|
+
textareaWrapper: string;
|
|
67
|
+
textarea: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
isDisabled: {
|
|
71
|
+
true: {
|
|
72
|
+
base: string[];
|
|
73
|
+
textareaWrapper: string[];
|
|
74
|
+
textarea: string[];
|
|
75
|
+
label: string[];
|
|
76
|
+
errorMessage: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
isRequired: {
|
|
80
|
+
true: {
|
|
81
|
+
label: string[];
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
base: string[];
|
|
86
|
+
label: string[];
|
|
87
|
+
innerWrapper: string[];
|
|
88
|
+
textareaWrapper: string[];
|
|
89
|
+
textarea: string[];
|
|
90
|
+
errorMessage: string[];
|
|
91
|
+
}, undefined, tailwind_variants_dist_config.TVConfig<{
|
|
92
|
+
variant: {
|
|
93
|
+
solid: {
|
|
94
|
+
textareaWrapper: string[];
|
|
95
|
+
};
|
|
96
|
+
line: {
|
|
97
|
+
textareaWrapper: string[];
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
color: {
|
|
101
|
+
primary: {};
|
|
102
|
+
secondary: {};
|
|
103
|
+
};
|
|
104
|
+
size: {
|
|
105
|
+
sm: {
|
|
106
|
+
base: string;
|
|
107
|
+
textareaWrapper: string;
|
|
108
|
+
textarea: string;
|
|
109
|
+
label: string;
|
|
110
|
+
errorMessage: string;
|
|
111
|
+
};
|
|
112
|
+
md: {
|
|
113
|
+
base: string;
|
|
114
|
+
textareaWrapper: string;
|
|
115
|
+
textarea: string;
|
|
116
|
+
label: string;
|
|
117
|
+
errorMessage: string;
|
|
118
|
+
};
|
|
119
|
+
lg: {
|
|
120
|
+
base: string;
|
|
121
|
+
textareaWrapper: string;
|
|
122
|
+
textarea: string;
|
|
123
|
+
label: string;
|
|
124
|
+
errorMessage: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
radius: {
|
|
128
|
+
default: {};
|
|
129
|
+
none: {
|
|
130
|
+
textareaWrapper: string;
|
|
131
|
+
textarea: string;
|
|
132
|
+
};
|
|
133
|
+
full: {
|
|
134
|
+
textareaWrapper: string;
|
|
135
|
+
textarea: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
fullWidth: {
|
|
139
|
+
true: {
|
|
140
|
+
base: string;
|
|
141
|
+
textareaWrapper: string;
|
|
142
|
+
textarea: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
isDisabled: {
|
|
146
|
+
true: {
|
|
147
|
+
base: string[];
|
|
148
|
+
textareaWrapper: string[];
|
|
149
|
+
textarea: string[];
|
|
150
|
+
label: string[];
|
|
151
|
+
errorMessage: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
isRequired: {
|
|
155
|
+
true: {
|
|
156
|
+
label: string[];
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
}, {
|
|
160
|
+
variant: {
|
|
161
|
+
solid: {
|
|
162
|
+
textareaWrapper: string[];
|
|
163
|
+
};
|
|
164
|
+
line: {
|
|
165
|
+
textareaWrapper: string[];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
color: {
|
|
169
|
+
primary: {};
|
|
170
|
+
secondary: {};
|
|
171
|
+
};
|
|
172
|
+
size: {
|
|
173
|
+
sm: {
|
|
174
|
+
base: string;
|
|
175
|
+
textareaWrapper: string;
|
|
176
|
+
textarea: string;
|
|
177
|
+
label: string;
|
|
178
|
+
errorMessage: string;
|
|
179
|
+
};
|
|
180
|
+
md: {
|
|
181
|
+
base: string;
|
|
182
|
+
textareaWrapper: string;
|
|
183
|
+
textarea: string;
|
|
184
|
+
label: string;
|
|
185
|
+
errorMessage: string;
|
|
186
|
+
};
|
|
187
|
+
lg: {
|
|
188
|
+
base: string;
|
|
189
|
+
textareaWrapper: string;
|
|
190
|
+
textarea: string;
|
|
191
|
+
label: string;
|
|
192
|
+
errorMessage: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
radius: {
|
|
196
|
+
default: {};
|
|
197
|
+
none: {
|
|
198
|
+
textareaWrapper: string;
|
|
199
|
+
textarea: string;
|
|
200
|
+
};
|
|
201
|
+
full: {
|
|
202
|
+
textareaWrapper: string;
|
|
203
|
+
textarea: string;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
fullWidth: {
|
|
207
|
+
true: {
|
|
208
|
+
base: string;
|
|
209
|
+
textareaWrapper: string;
|
|
210
|
+
textarea: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
isDisabled: {
|
|
214
|
+
true: {
|
|
215
|
+
base: string[];
|
|
216
|
+
textareaWrapper: string[];
|
|
217
|
+
textarea: string[];
|
|
218
|
+
label: string[];
|
|
219
|
+
errorMessage: string;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
isRequired: {
|
|
223
|
+
true: {
|
|
224
|
+
label: string[];
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
}>, {
|
|
228
|
+
variant: {
|
|
229
|
+
solid: {
|
|
230
|
+
textareaWrapper: string[];
|
|
231
|
+
};
|
|
232
|
+
line: {
|
|
233
|
+
textareaWrapper: string[];
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
color: {
|
|
237
|
+
primary: {};
|
|
238
|
+
secondary: {};
|
|
239
|
+
};
|
|
240
|
+
size: {
|
|
241
|
+
sm: {
|
|
242
|
+
base: string;
|
|
243
|
+
textareaWrapper: string;
|
|
244
|
+
textarea: string;
|
|
245
|
+
label: string;
|
|
246
|
+
errorMessage: string;
|
|
247
|
+
};
|
|
248
|
+
md: {
|
|
249
|
+
base: string;
|
|
250
|
+
textareaWrapper: string;
|
|
251
|
+
textarea: string;
|
|
252
|
+
label: string;
|
|
253
|
+
errorMessage: string;
|
|
254
|
+
};
|
|
255
|
+
lg: {
|
|
256
|
+
base: string;
|
|
257
|
+
textareaWrapper: string;
|
|
258
|
+
textarea: string;
|
|
259
|
+
label: string;
|
|
260
|
+
errorMessage: string;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
radius: {
|
|
264
|
+
default: {};
|
|
265
|
+
none: {
|
|
266
|
+
textareaWrapper: string;
|
|
267
|
+
textarea: string;
|
|
268
|
+
};
|
|
269
|
+
full: {
|
|
270
|
+
textareaWrapper: string;
|
|
271
|
+
textarea: string;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
fullWidth: {
|
|
275
|
+
true: {
|
|
276
|
+
base: string;
|
|
277
|
+
textareaWrapper: string;
|
|
278
|
+
textarea: string;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
isDisabled: {
|
|
282
|
+
true: {
|
|
283
|
+
base: string[];
|
|
284
|
+
textareaWrapper: string[];
|
|
285
|
+
textarea: string[];
|
|
286
|
+
label: string[];
|
|
287
|
+
errorMessage: string;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
isRequired: {
|
|
291
|
+
true: {
|
|
292
|
+
label: string[];
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
}, {
|
|
296
|
+
base: string[];
|
|
297
|
+
label: string[];
|
|
298
|
+
innerWrapper: string[];
|
|
299
|
+
textareaWrapper: string[];
|
|
300
|
+
textarea: string[];
|
|
301
|
+
errorMessage: string[];
|
|
302
|
+
}, tailwind_variants.TVReturnType<{
|
|
303
|
+
variant: {
|
|
304
|
+
solid: {
|
|
305
|
+
textareaWrapper: string[];
|
|
306
|
+
};
|
|
307
|
+
line: {
|
|
308
|
+
textareaWrapper: string[];
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
color: {
|
|
312
|
+
primary: {};
|
|
313
|
+
secondary: {};
|
|
314
|
+
};
|
|
315
|
+
size: {
|
|
316
|
+
sm: {
|
|
317
|
+
base: string;
|
|
318
|
+
textareaWrapper: string;
|
|
319
|
+
textarea: string;
|
|
320
|
+
label: string;
|
|
321
|
+
errorMessage: string;
|
|
322
|
+
};
|
|
323
|
+
md: {
|
|
324
|
+
base: string;
|
|
325
|
+
textareaWrapper: string;
|
|
326
|
+
textarea: string;
|
|
327
|
+
label: string;
|
|
328
|
+
errorMessage: string;
|
|
329
|
+
};
|
|
330
|
+
lg: {
|
|
331
|
+
base: string;
|
|
332
|
+
textareaWrapper: string;
|
|
333
|
+
textarea: string;
|
|
334
|
+
label: string;
|
|
335
|
+
errorMessage: string;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
radius: {
|
|
339
|
+
default: {};
|
|
340
|
+
none: {
|
|
341
|
+
textareaWrapper: string;
|
|
342
|
+
textarea: string;
|
|
343
|
+
};
|
|
344
|
+
full: {
|
|
345
|
+
textareaWrapper: string;
|
|
346
|
+
textarea: string;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
fullWidth: {
|
|
350
|
+
true: {
|
|
351
|
+
base: string;
|
|
352
|
+
textareaWrapper: string;
|
|
353
|
+
textarea: string;
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
isDisabled: {
|
|
357
|
+
true: {
|
|
358
|
+
base: string[];
|
|
359
|
+
textareaWrapper: string[];
|
|
360
|
+
textarea: string[];
|
|
361
|
+
label: string[];
|
|
362
|
+
errorMessage: string;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
isRequired: {
|
|
366
|
+
true: {
|
|
367
|
+
label: string[];
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
}, {
|
|
371
|
+
base: string[];
|
|
372
|
+
label: string[];
|
|
373
|
+
innerWrapper: string[];
|
|
374
|
+
textareaWrapper: string[];
|
|
375
|
+
textarea: string[];
|
|
376
|
+
errorMessage: string[];
|
|
377
|
+
}, undefined, tailwind_variants_dist_config.TVConfig<{
|
|
378
|
+
variant: {
|
|
379
|
+
solid: {
|
|
380
|
+
textareaWrapper: string[];
|
|
381
|
+
};
|
|
382
|
+
line: {
|
|
383
|
+
textareaWrapper: string[];
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
color: {
|
|
387
|
+
primary: {};
|
|
388
|
+
secondary: {};
|
|
389
|
+
};
|
|
390
|
+
size: {
|
|
391
|
+
sm: {
|
|
392
|
+
base: string;
|
|
393
|
+
textareaWrapper: string;
|
|
394
|
+
textarea: string;
|
|
395
|
+
label: string;
|
|
396
|
+
errorMessage: string;
|
|
397
|
+
};
|
|
398
|
+
md: {
|
|
399
|
+
base: string;
|
|
400
|
+
textareaWrapper: string;
|
|
401
|
+
textarea: string;
|
|
402
|
+
label: string;
|
|
403
|
+
errorMessage: string;
|
|
404
|
+
};
|
|
405
|
+
lg: {
|
|
406
|
+
base: string;
|
|
407
|
+
textareaWrapper: string;
|
|
408
|
+
textarea: string;
|
|
409
|
+
label: string;
|
|
410
|
+
errorMessage: string;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
radius: {
|
|
414
|
+
default: {};
|
|
415
|
+
none: {
|
|
416
|
+
textareaWrapper: string;
|
|
417
|
+
textarea: string;
|
|
418
|
+
};
|
|
419
|
+
full: {
|
|
420
|
+
textareaWrapper: string;
|
|
421
|
+
textarea: string;
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
fullWidth: {
|
|
425
|
+
true: {
|
|
426
|
+
base: string;
|
|
427
|
+
textareaWrapper: string;
|
|
428
|
+
textarea: string;
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
isDisabled: {
|
|
432
|
+
true: {
|
|
433
|
+
base: string[];
|
|
434
|
+
textareaWrapper: string[];
|
|
435
|
+
textarea: string[];
|
|
436
|
+
label: string[];
|
|
437
|
+
errorMessage: string;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
isRequired: {
|
|
441
|
+
true: {
|
|
442
|
+
label: string[];
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
}, {
|
|
446
|
+
variant: {
|
|
447
|
+
solid: {
|
|
448
|
+
textareaWrapper: string[];
|
|
449
|
+
};
|
|
450
|
+
line: {
|
|
451
|
+
textareaWrapper: string[];
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
color: {
|
|
455
|
+
primary: {};
|
|
456
|
+
secondary: {};
|
|
457
|
+
};
|
|
458
|
+
size: {
|
|
459
|
+
sm: {
|
|
460
|
+
base: string;
|
|
461
|
+
textareaWrapper: string;
|
|
462
|
+
textarea: string;
|
|
463
|
+
label: string;
|
|
464
|
+
errorMessage: string;
|
|
465
|
+
};
|
|
466
|
+
md: {
|
|
467
|
+
base: string;
|
|
468
|
+
textareaWrapper: string;
|
|
469
|
+
textarea: string;
|
|
470
|
+
label: string;
|
|
471
|
+
errorMessage: string;
|
|
472
|
+
};
|
|
473
|
+
lg: {
|
|
474
|
+
base: string;
|
|
475
|
+
textareaWrapper: string;
|
|
476
|
+
textarea: string;
|
|
477
|
+
label: string;
|
|
478
|
+
errorMessage: string;
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
radius: {
|
|
482
|
+
default: {};
|
|
483
|
+
none: {
|
|
484
|
+
textareaWrapper: string;
|
|
485
|
+
textarea: string;
|
|
486
|
+
};
|
|
487
|
+
full: {
|
|
488
|
+
textareaWrapper: string;
|
|
489
|
+
textarea: string;
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
fullWidth: {
|
|
493
|
+
true: {
|
|
494
|
+
base: string;
|
|
495
|
+
textareaWrapper: string;
|
|
496
|
+
textarea: string;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
isDisabled: {
|
|
500
|
+
true: {
|
|
501
|
+
base: string[];
|
|
502
|
+
textareaWrapper: string[];
|
|
503
|
+
textarea: string[];
|
|
504
|
+
label: string[];
|
|
505
|
+
errorMessage: string;
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
isRequired: {
|
|
509
|
+
true: {
|
|
510
|
+
label: string[];
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
}>, unknown, unknown, undefined>>;
|
|
514
|
+
type TextareaVariantProps = VariantProps<typeof textareaStyle>;
|
|
515
|
+
type TextareaSlots = keyof ReturnType<typeof textareaStyle>;
|
|
516
|
+
type TextareaReturnType = ReturnType<typeof textareaStyle>;
|
|
517
|
+
|
|
518
|
+
export { type Props, type TextareaProps, type TextareaReturnType, type TextareaSlots, type TextareaVariantProps, Textarea as default };
|
|
@@ -26,24 +26,79 @@ __export(textarea_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(textarea_exports);
|
|
27
27
|
var import_react = require("react");
|
|
28
28
|
var import_tailwind_variants = require("tailwind-variants");
|
|
29
|
+
|
|
30
|
+
// src/utils/props.ts
|
|
31
|
+
var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
|
|
32
|
+
if (!variantKeys) {
|
|
33
|
+
return [props, {}];
|
|
34
|
+
}
|
|
35
|
+
const picked = variantKeys.reduce((acc, key) => {
|
|
36
|
+
if (key in props) {
|
|
37
|
+
return { ...acc, [key]: props[key] };
|
|
38
|
+
} else {
|
|
39
|
+
return acc;
|
|
40
|
+
}
|
|
41
|
+
}, {});
|
|
42
|
+
if (removeVariantProps) {
|
|
43
|
+
const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
|
|
44
|
+
return [omitted, picked];
|
|
45
|
+
} else {
|
|
46
|
+
return [props, picked];
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// src/components/textarea/textarea.tsx
|
|
29
51
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
-
var Textarea = (0, import_react.forwardRef)((
|
|
31
|
-
const
|
|
32
|
-
const {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
var Textarea = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
53
|
+
const [props, variantProps] = mapPropsVariants(originalProps, textareaStyle.variantKeys);
|
|
54
|
+
const { classNames, label, errorMessage, ...textareaProps } = props;
|
|
55
|
+
const slots = (0, import_react.useMemo)(() => textareaStyle({ ...variantProps }), [variantProps]);
|
|
56
|
+
const getBaseProps = (0, import_react.useCallback)(
|
|
57
|
+
() => ({
|
|
58
|
+
className: slots.base({ class: classNames == null ? void 0 : classNames.base })
|
|
59
|
+
}),
|
|
60
|
+
[slots, classNames]
|
|
61
|
+
);
|
|
62
|
+
const getLabelProps = (0, import_react.useCallback)(
|
|
63
|
+
() => ({
|
|
64
|
+
className: slots.label({ class: classNames == null ? void 0 : classNames.label })
|
|
65
|
+
}),
|
|
66
|
+
[slots, classNames]
|
|
67
|
+
);
|
|
68
|
+
const getInnerWrapperProps = (0, import_react.useCallback)(
|
|
69
|
+
() => ({
|
|
70
|
+
className: slots.innerWrapper({ class: classNames == null ? void 0 : classNames.innerWrapper })
|
|
71
|
+
}),
|
|
72
|
+
[slots, classNames]
|
|
73
|
+
);
|
|
74
|
+
const getTextareaWrapperProps = (0, import_react.useCallback)(
|
|
75
|
+
() => ({
|
|
76
|
+
className: slots.textareaWrapper({ class: classNames == null ? void 0 : classNames.textareaWrapper })
|
|
77
|
+
}),
|
|
78
|
+
[slots, classNames]
|
|
79
|
+
);
|
|
80
|
+
const getTextareaProps = (0, import_react.useCallback)(
|
|
81
|
+
() => ({
|
|
82
|
+
...textareaProps,
|
|
83
|
+
ref,
|
|
84
|
+
className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea }),
|
|
85
|
+
disabled: originalProps.isDisabled,
|
|
86
|
+
required: originalProps.isRequired,
|
|
87
|
+
size: 0
|
|
88
|
+
}),
|
|
89
|
+
[textareaProps, ref, slots, classNames == null ? void 0 : classNames.textarea, originalProps.isDisabled, originalProps.isRequired]
|
|
90
|
+
);
|
|
91
|
+
const getErrorMessageProps = (0, import_react.useCallback)(
|
|
92
|
+
() => ({
|
|
93
|
+
className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
|
|
94
|
+
}),
|
|
95
|
+
[slots, classNames]
|
|
96
|
+
);
|
|
97
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getBaseProps(), children: [
|
|
98
|
+
props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { ...getLabelProps(), children: props.label }),
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getInnerWrapperProps(), children: [
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getTextareaWrapperProps(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { ...getTextareaProps() }) }),
|
|
101
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { ...getErrorMessageProps(), children: props.errorMessage })
|
|
47
102
|
] })
|
|
48
103
|
] });
|
|
49
104
|
});
|
|
@@ -51,15 +106,15 @@ Textarea.displayName = "Textarea";
|
|
|
51
106
|
var textarea_default = Textarea;
|
|
52
107
|
var textareaStyle = (0, import_tailwind_variants.tv)({
|
|
53
108
|
slots: {
|
|
54
|
-
base: ["group", "flex", "flex-col", "gap-[10px]"],
|
|
109
|
+
base: ["group/textarea", "flex", "flex-col", "gap-[10px]", "select-none"],
|
|
55
110
|
label: ["flex", "items-center"],
|
|
56
111
|
innerWrapper: ["flex", "flex-col", "gap-[6px]"],
|
|
57
112
|
textareaWrapper: [
|
|
58
113
|
"flex",
|
|
59
114
|
"bg-transparent",
|
|
60
115
|
"border-neutral-main",
|
|
61
|
-
"
|
|
62
|
-
"group-has-[p]:
|
|
116
|
+
"group-has-[p]/textarea:border-danger-main",
|
|
117
|
+
"group-has-[p]/textarea:bg-danger-soft",
|
|
63
118
|
"transition duration-200"
|
|
64
119
|
],
|
|
65
120
|
textarea: [
|
|
@@ -69,7 +124,7 @@ var textareaStyle = (0, import_tailwind_variants.tv)({
|
|
|
69
124
|
"focus-visible:outline-none",
|
|
70
125
|
"resize-none"
|
|
71
126
|
],
|
|
72
|
-
|
|
127
|
+
errorMessage: ["text-danger-main"]
|
|
73
128
|
},
|
|
74
129
|
variants: {
|
|
75
130
|
variant: {
|
|
@@ -87,21 +142,24 @@ var textareaStyle = (0, import_tailwind_variants.tv)({
|
|
|
87
142
|
size: {
|
|
88
143
|
sm: {
|
|
89
144
|
base: "gap-[6px]",
|
|
90
|
-
textareaWrapper: "w-[240px] rounded-sm",
|
|
145
|
+
textareaWrapper: "w-[240px] rounded-sm p-[6px]",
|
|
91
146
|
textarea: "text-sm rounded-sm",
|
|
92
|
-
label: "text-sm"
|
|
147
|
+
label: "text-sm",
|
|
148
|
+
errorMessage: "text-sm"
|
|
93
149
|
},
|
|
94
150
|
md: {
|
|
95
151
|
base: "gap-[8px]",
|
|
96
|
-
textareaWrapper: "w-[240px] rounded-md",
|
|
152
|
+
textareaWrapper: "w-[240px] rounded-md p-[8px]",
|
|
97
153
|
textarea: "text-md rounded-md",
|
|
98
|
-
label: "text-md"
|
|
154
|
+
label: "text-md",
|
|
155
|
+
errorMessage: "text-md"
|
|
99
156
|
},
|
|
100
157
|
lg: {
|
|
101
158
|
base: "gap-[10px]",
|
|
102
|
-
textareaWrapper: "w-[240px] rounded-lg",
|
|
159
|
+
textareaWrapper: "w-[240px] rounded-lg p-[10px]",
|
|
103
160
|
textarea: "text-lg rounded-lg",
|
|
104
|
-
label: "text-lg"
|
|
161
|
+
label: "text-lg",
|
|
162
|
+
errorMessage: "text-lg"
|
|
105
163
|
}
|
|
106
164
|
},
|
|
107
165
|
radius: {
|
|
@@ -125,9 +183,10 @@ var textareaStyle = (0, import_tailwind_variants.tv)({
|
|
|
125
183
|
isDisabled: {
|
|
126
184
|
true: {
|
|
127
185
|
base: ["opacity-disabled", "pointer-events-none"],
|
|
128
|
-
textareaWrapper: ["border-neutral-light", "pointer-events-none"],
|
|
129
|
-
textarea: ["
|
|
130
|
-
label: ["text-neutral-light", "pointer-events-none"]
|
|
186
|
+
textareaWrapper: ["bg-neutral-soft", "border-neutral-light", "pointer-events-none"],
|
|
187
|
+
textarea: ["text-neutral-light placeholder:text-neutral-light", "border-neutral-light"],
|
|
188
|
+
label: ["text-neutral-light", "pointer-events-none"],
|
|
189
|
+
errorMessage: "text-danger-light"
|
|
131
190
|
}
|
|
132
191
|
},
|
|
133
192
|
isRequired: {
|