@accelint/design-toolkit 2.3.1 → 2.4.0
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/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/accordion/styles.js +1 -1
- package/dist/components/accordion/styles.js.map +1 -1
- package/dist/components/avatar/index.d.ts +16 -24
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/avatar/styles.d.ts +47 -0
- package/dist/components/avatar/styles.js +2 -0
- package/dist/components/avatar/styles.js.map +1 -0
- package/dist/components/avatar/types.d.ts +19 -0
- package/dist/components/avatar/types.js +2 -0
- package/dist/components/avatar/types.js.map +1 -0
- package/dist/components/badge/index.d.ts +16 -16
- package/dist/components/badge/index.js +1 -1
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/badge/styles.d.ts +32 -0
- package/dist/components/badge/styles.js +2 -0
- package/dist/components/badge/styles.js.map +1 -0
- package/dist/components/badge/types.d.ts +16 -0
- package/dist/components/badge/types.js +2 -0
- package/dist/components/badge/types.js.map +1 -0
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button/styles.d.ts +12 -103
- package/dist/components/button/styles.js +1 -1
- package/dist/components/button/styles.js.map +1 -1
- package/dist/components/button/types.d.ts +3 -1
- package/dist/components/checkbox/index.d.ts +13 -12
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox/styles.d.ts +53 -0
- package/dist/components/checkbox/styles.js +2 -0
- package/dist/components/checkbox/styles.js.map +1 -0
- package/dist/components/checkbox/types.d.ts +22 -0
- package/dist/components/checkbox/types.js +2 -0
- package/dist/components/checkbox/types.js.map +1 -0
- package/dist/components/chip/index.js +1 -1
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip/styles.d.ts +130 -134
- package/dist/components/chip/styles.js +1 -1
- package/dist/components/chip/styles.js.map +1 -1
- package/dist/components/chip/types.d.ts +7 -5
- package/dist/components/classification-badge/index.js +1 -1
- package/dist/components/classification-badge/index.js.map +1 -1
- package/dist/components/classification-badge/styles.d.ts +2 -15
- package/dist/components/classification-badge/styles.js +1 -1
- package/dist/components/classification-badge/styles.js.map +1 -1
- package/dist/components/classification-badge/types.d.ts +3 -1
- package/dist/components/icon/index.d.ts +0 -2
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/icon/styles.d.ts +2 -31
- package/dist/components/icon/styles.js +1 -1
- package/dist/components/icon/styles.js.map +1 -1
- package/dist/components/icon/types.d.ts +4 -4
- package/dist/components/input/index.d.ts +16 -0
- package/dist/components/input/index.js +2 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/styles.d.ts +152 -0
- package/dist/components/input/styles.js +2 -0
- package/dist/components/input/styles.js.map +1 -0
- package/dist/components/input/types.d.ts +20 -0
- package/dist/components/input/types.js +2 -0
- package/dist/components/input/types.js.map +1 -0
- package/dist/components/label/styles.js +1 -1
- package/dist/components/label/styles.js.map +1 -1
- package/dist/components/menu/index.d.ts +48 -0
- package/dist/components/menu/index.js +2 -0
- package/dist/components/menu/index.js.map +1 -0
- package/dist/components/menu/styles.d.ts +95 -0
- package/dist/components/menu/styles.js +2 -0
- package/dist/components/menu/styles.js.map +1 -0
- package/dist/components/menu/types.d.ts +30 -0
- package/dist/components/menu/types.js +2 -0
- package/dist/components/menu/types.js.map +1 -0
- package/dist/components/query-builder/value-editor.js +1 -1
- package/dist/components/query-builder/value-editor.js.map +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.js.map +1 -1
- package/dist/components/switch/styles.js +1 -1
- package/dist/components/switch/styles.js.map +1 -1
- package/dist/components/text-area-field/index.d.ts +0 -2
- package/dist/components/text-area-field/index.js +1 -1
- package/dist/components/text-area-field/index.js.map +1 -1
- package/dist/components/text-area-field/styles.d.ts +33 -93
- package/dist/components/text-area-field/styles.js +1 -1
- package/dist/components/text-area-field/styles.js.map +1 -1
- package/dist/components/text-area-field/types.d.ts +6 -9
- package/dist/components/text-field/index.d.ts +18 -24
- package/dist/components/text-field/index.js +1 -1
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/text-field/styles.d.ts +53 -0
- package/dist/components/text-field/styles.js +2 -0
- package/dist/components/text-field/styles.js.map +1 -0
- package/dist/components/text-field/types.d.ts +26 -0
- package/dist/components/text-field/types.js +2 -0
- package/dist/components/text-field/types.js.map +1 -0
- package/dist/icons/catalog.js +1 -1
- package/dist/icons/catalog.js.map +1 -1
- package/dist/index.css +79 -69
- package/dist/index.d.ts +25 -9
- package/dist/index.js +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/styles.css +876 -240
- package/dist/tokens/{generated/tokens.d.ts → index.d.ts} +19 -4
- package/dist/tokens/index.js +2 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/{generated/themes.css → themes.css} +19 -4
- package/dist/tokens/{generated/tokens.css → tokens.css} +18 -3
- package/dist/tokens/tokens.d.ts +2 -0
- package/package.json +7 -6
- package/dist/tokens/generated/tokens.js +0 -2
- package/dist/tokens/generated/tokens.js.map +0 -1
- /package/dist/tokens/{generated/themes.d.ts → themes.d.ts} +0 -0
@@ -2,7 +2,6 @@ import * as tailwind_variants from 'tailwind-variants';
|
|
2
2
|
|
3
3
|
declare const ButtonStylesDefaults: {
|
4
4
|
readonly color: "info";
|
5
|
-
readonly size: "medium";
|
6
5
|
readonly variant: "filled";
|
7
6
|
};
|
8
7
|
declare const ButtonStyles: tailwind_variants.TVReturnType<{} | {
|
@@ -11,12 +10,6 @@ declare const ButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
11
10
|
serious: tailwind_variants.ClassValue | {};
|
12
11
|
critical: tailwind_variants.ClassValue | {};
|
13
12
|
};
|
14
|
-
size: {
|
15
|
-
large: tailwind_variants.ClassValue | {};
|
16
|
-
medium: tailwind_variants.ClassValue | {};
|
17
|
-
small: tailwind_variants.ClassValue | {};
|
18
|
-
xsmall: tailwind_variants.ClassValue | {};
|
19
|
-
};
|
20
13
|
variant: {
|
21
14
|
filled: tailwind_variants.ClassValue | {};
|
22
15
|
outline: tailwind_variants.ClassValue | {};
|
@@ -30,17 +23,11 @@ declare const ButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
30
23
|
serious: string;
|
31
24
|
critical: string;
|
32
25
|
};
|
33
|
-
size: {
|
34
|
-
large: string;
|
35
|
-
medium: string;
|
36
|
-
small: string;
|
37
|
-
xsmall: string;
|
38
|
-
};
|
39
26
|
variant: {
|
40
27
|
filled: string;
|
41
28
|
outline: string;
|
42
29
|
flat: string;
|
43
|
-
icon: string;
|
30
|
+
icon: string[];
|
44
31
|
floating: string[];
|
45
32
|
};
|
46
33
|
}, undefined, tailwind_variants.TVReturnType<{
|
@@ -49,17 +36,11 @@ declare const ButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
49
36
|
serious: string;
|
50
37
|
critical: string;
|
51
38
|
};
|
52
|
-
size: {
|
53
|
-
large: string;
|
54
|
-
medium: string;
|
55
|
-
small: string;
|
56
|
-
xsmall: string;
|
57
|
-
};
|
58
39
|
variant: {
|
59
40
|
filled: string;
|
60
41
|
outline: string;
|
61
42
|
flat: string;
|
62
|
-
icon: string;
|
43
|
+
icon: string[];
|
63
44
|
floating: string[];
|
64
45
|
};
|
65
46
|
}, undefined, string[], {
|
@@ -68,17 +49,11 @@ declare const ButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
68
49
|
serious: string;
|
69
50
|
critical: string;
|
70
51
|
};
|
71
|
-
size: {
|
72
|
-
large: string;
|
73
|
-
medium: string;
|
74
|
-
small: string;
|
75
|
-
xsmall: string;
|
76
|
-
};
|
77
52
|
variant: {
|
78
53
|
filled: string;
|
79
54
|
outline: string;
|
80
55
|
flat: string;
|
81
|
-
icon: string;
|
56
|
+
icon: string[];
|
82
57
|
floating: string[];
|
83
58
|
};
|
84
59
|
}, undefined, tailwind_variants.TVReturnType<{
|
@@ -87,17 +62,11 @@ declare const ButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
87
62
|
serious: string;
|
88
63
|
critical: string;
|
89
64
|
};
|
90
|
-
size: {
|
91
|
-
large: string;
|
92
|
-
medium: string;
|
93
|
-
small: string;
|
94
|
-
xsmall: string;
|
95
|
-
};
|
96
65
|
variant: {
|
97
66
|
filled: string;
|
98
67
|
outline: string;
|
99
68
|
flat: string;
|
100
|
-
icon: string;
|
69
|
+
icon: string[];
|
101
70
|
floating: string[];
|
102
71
|
};
|
103
72
|
}, undefined, string[], unknown, unknown, undefined>>>;
|
@@ -107,12 +76,6 @@ declare const LinkButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
107
76
|
serious: tailwind_variants.ClassValue | {};
|
108
77
|
critical: tailwind_variants.ClassValue | {};
|
109
78
|
};
|
110
|
-
size: {
|
111
|
-
large: tailwind_variants.ClassValue | {};
|
112
|
-
medium: tailwind_variants.ClassValue | {};
|
113
|
-
small: tailwind_variants.ClassValue | {};
|
114
|
-
xsmall: tailwind_variants.ClassValue | {};
|
115
|
-
};
|
116
79
|
variant: {
|
117
80
|
filled: tailwind_variants.ClassValue | {};
|
118
81
|
outline: tailwind_variants.ClassValue | {};
|
@@ -126,17 +89,11 @@ declare const LinkButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
126
89
|
serious: string;
|
127
90
|
critical: string;
|
128
91
|
};
|
129
|
-
size: {
|
130
|
-
large: string;
|
131
|
-
medium: string;
|
132
|
-
small: string;
|
133
|
-
xsmall: string;
|
134
|
-
};
|
135
92
|
variant: {
|
136
93
|
filled: string;
|
137
94
|
outline: string;
|
138
95
|
flat: string;
|
139
|
-
icon: string;
|
96
|
+
icon: string[];
|
140
97
|
floating: string[];
|
141
98
|
};
|
142
99
|
}, undefined, tailwind_variants.TVReturnType<{
|
@@ -145,17 +102,11 @@ declare const LinkButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
145
102
|
serious: string;
|
146
103
|
critical: string;
|
147
104
|
};
|
148
|
-
size: {
|
149
|
-
large: string;
|
150
|
-
medium: string;
|
151
|
-
small: string;
|
152
|
-
xsmall: string;
|
153
|
-
};
|
154
105
|
variant: {
|
155
106
|
filled: string;
|
156
107
|
outline: string;
|
157
108
|
flat: string;
|
158
|
-
icon: string;
|
109
|
+
icon: string[];
|
159
110
|
floating: string[];
|
160
111
|
};
|
161
112
|
}, undefined, string[], {
|
@@ -164,17 +115,11 @@ declare const LinkButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
164
115
|
serious: string;
|
165
116
|
critical: string;
|
166
117
|
};
|
167
|
-
size: {
|
168
|
-
large: string;
|
169
|
-
medium: string;
|
170
|
-
small: string;
|
171
|
-
xsmall: string;
|
172
|
-
};
|
173
118
|
variant: {
|
174
119
|
filled: string;
|
175
120
|
outline: string;
|
176
121
|
flat: string;
|
177
|
-
icon: string;
|
122
|
+
icon: string[];
|
178
123
|
floating: string[];
|
179
124
|
};
|
180
125
|
}, undefined, tailwind_variants.TVReturnType<{
|
@@ -183,17 +128,11 @@ declare const LinkButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
183
128
|
serious: string;
|
184
129
|
critical: string;
|
185
130
|
};
|
186
|
-
size: {
|
187
|
-
large: string;
|
188
|
-
medium: string;
|
189
|
-
small: string;
|
190
|
-
xsmall: string;
|
191
|
-
};
|
192
131
|
variant: {
|
193
132
|
filled: string;
|
194
133
|
outline: string;
|
195
134
|
flat: string;
|
196
|
-
icon: string;
|
135
|
+
icon: string[];
|
197
136
|
floating: string[];
|
198
137
|
};
|
199
138
|
}, undefined, string[], unknown, unknown, undefined>>>;
|
@@ -203,12 +142,6 @@ declare const ToggleButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
203
142
|
serious: tailwind_variants.ClassValue | {};
|
204
143
|
critical: tailwind_variants.ClassValue | {};
|
205
144
|
};
|
206
|
-
size: {
|
207
|
-
large: tailwind_variants.ClassValue | {};
|
208
|
-
medium: tailwind_variants.ClassValue | {};
|
209
|
-
small: tailwind_variants.ClassValue | {};
|
210
|
-
xsmall: tailwind_variants.ClassValue | {};
|
211
|
-
};
|
212
145
|
variant: {
|
213
146
|
filled: tailwind_variants.ClassValue | {};
|
214
147
|
outline: tailwind_variants.ClassValue | {};
|
@@ -222,17 +155,11 @@ declare const ToggleButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
222
155
|
serious: string;
|
223
156
|
critical: string;
|
224
157
|
};
|
225
|
-
size: {
|
226
|
-
large: string;
|
227
|
-
medium: string;
|
228
|
-
small: string;
|
229
|
-
xsmall: string;
|
230
|
-
};
|
231
158
|
variant: {
|
232
159
|
filled: string;
|
233
160
|
outline: string;
|
234
161
|
flat: string;
|
235
|
-
icon: string;
|
162
|
+
icon: string[];
|
236
163
|
floating: string[];
|
237
164
|
};
|
238
165
|
}, undefined, tailwind_variants.TVReturnType<{
|
@@ -241,17 +168,11 @@ declare const ToggleButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
241
168
|
serious: string;
|
242
169
|
critical: string;
|
243
170
|
};
|
244
|
-
size: {
|
245
|
-
large: string;
|
246
|
-
medium: string;
|
247
|
-
small: string;
|
248
|
-
xsmall: string;
|
249
|
-
};
|
250
171
|
variant: {
|
251
172
|
filled: string;
|
252
173
|
outline: string;
|
253
174
|
flat: string;
|
254
|
-
icon: string;
|
175
|
+
icon: string[];
|
255
176
|
floating: string[];
|
256
177
|
};
|
257
178
|
}, undefined, string[], {
|
@@ -260,17 +181,11 @@ declare const ToggleButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
260
181
|
serious: string;
|
261
182
|
critical: string;
|
262
183
|
};
|
263
|
-
size: {
|
264
|
-
large: string;
|
265
|
-
medium: string;
|
266
|
-
small: string;
|
267
|
-
xsmall: string;
|
268
|
-
};
|
269
184
|
variant: {
|
270
185
|
filled: string;
|
271
186
|
outline: string;
|
272
187
|
flat: string;
|
273
|
-
icon: string;
|
188
|
+
icon: string[];
|
274
189
|
floating: string[];
|
275
190
|
};
|
276
191
|
}, undefined, tailwind_variants.TVReturnType<{
|
@@ -279,17 +194,11 @@ declare const ToggleButtonStyles: tailwind_variants.TVReturnType<{} | {
|
|
279
194
|
serious: string;
|
280
195
|
critical: string;
|
281
196
|
};
|
282
|
-
size: {
|
283
|
-
large: string;
|
284
|
-
medium: string;
|
285
|
-
small: string;
|
286
|
-
xsmall: string;
|
287
|
-
};
|
288
197
|
variant: {
|
289
198
|
filled: string;
|
290
199
|
outline: string;
|
291
200
|
flat: string;
|
292
|
-
icon: string;
|
201
|
+
icon: string[];
|
293
202
|
floating: string[];
|
294
203
|
};
|
295
204
|
}, undefined, string[], unknown, unknown, undefined>>>;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {tv}from'./../../lib/utils.js';var
|
1
|
+
import {tv}from'./../../lib/utils.js';var i={color:"info",variant:"filled"},l=tv({base:["group/button flex w-content cursor-pointer items-center justify-center rounded-medium outline outline-transparent","disabled:cursor-not-allowed","size-large:gap-xs size-large:px-m size-large:py-s size-large:text-button-l","size-medium:gap-xs size-medium:px-m size-medium:py-s size-medium:text-button-m","size-small:gap-xxs size-small:px-s size-small:py-xs size-small:text-button-s","size-xsmall:gap-xxs size-xsmall:px-s size-xsmall:py-xs size-xsmall:text-button-xs"],variants:{color:{info:"",serious:"",critical:""},variant:{filled:"disabled:fg-disabled disabled:bg-interactive-disabled",outline:"disabled:fg-disabled disabled:outline-interactive-disabled",flat:"disabled:fg-disabled disabled:bg-transparent",icon:["size-small:rounded-small size-xsmall:rounded-small size-large:p-xs size-medium:p-xs size-small:p-xxs size-xsmall:p-xxs","disabled:fg-disabled disabled:bg-transparent"],floating:["rounded-full","size-large:p-xs size-medium:p-xs size-small:p-xxs size-xsmall:p-xxs","disabled:fg-disabled disabled:bg-interactive-disabled disabled:outline-interactive-disabled"]}},compoundVariants:[{color:"info",variant:"filled",className:["enabled:bg-interactive-default","enabled:hover:bg-interactive-hover-light","enabled:focus:bg-interactive-hover-light"]},{color:"info",variant:"outline",className:["enabled:fg-default-light enabled:outline-interactive","enabled:hover:outline-interactive-hover","enabled:focus:outline-interactive-hover"]},{color:"info",variant:["flat","icon"],className:["enabled:fg-default-light","enabled:hover:bg-interactive-hover-dark","enabled:focus:bg-interactive-hover-dark"]},{color:"info",variant:"floating",className:["enabled:fg-interactive enabled:bg-surface-default enabled:outline-interactive","enabled:hover:fg-interactive-hover enabled:hover:outline-interactive-hover","enabled:focus:fg-interactive-hover enabled:focus:outline-interactive-hover"]},{color:"serious",variant:"filled",className:["enabled:bg-serious","enabled:hover:bg-serious-hover","enabled:focus:bg-serious-hover"]},{color:"serious",variant:"outline",className:["enabled:fg-default-light enabled:outline-serious","enabled:hover:outline-interactive-hover","enabled:focus:outline-interactive-hover"]},{color:"serious",variant:["flat","icon"],className:["enabled:fg-default-light","enabled:hover:bg-serious-hover","enabled:focus:bg-serious-hover"]},{color:"serious",variant:"floating",className:["enabled:fg-serious enabled:bg-serious-subtle enabled:outline-serious","enabled:hover:fg-interactive-hover enabled:hover:outline-interactive-hover","enabled:focus:fg-interactive-hover enabled:focus:outline-interactive-hover"]},{color:"critical",variant:"filled",className:["enabled:bg-critical","enabled:hover:bg-critical-hover","enabled:focus:bg-critical-hover"]},{color:"critical",variant:"outline",className:["enabled:fg-default-light enabled:outline-critical","enabled:hover:outline-interactive-hover","enabled:focus:outline-interactive-hover"]},{color:"critical",variant:["flat","icon"],className:["enabled:fg-default-light","enabled:hover:bg-critical-hover","enabled:focus:bg-critical-hover"]},{color:"critical",variant:"floating",className:["enabled:fg-critical enabled:bg-critical-subtle enabled:outline-critical","enabled:hover:fg-interactive-hover enabled:hover:outline-interactive-hover","enabled:focus:fg-interactive-hover enabled:focus:outline-interactive-hover"]}],defaultVariants:i}),t=tv({extend:l}),o=tv({extend:l}),s=tv({extend:l,compoundVariants:[{color:"info",variant:"filled",className:["enabled:selected:bg-info-subtle","enabled:selected:hover:bg-interactive-hover-light","enabled:selected:focus:bg-interactive-hover-light"]},{color:"info",variant:"floating",className:["enabled:selected:outline-highlight","enabled:selected:hover:outline-interactive-hover","enabled:selected:focus:outline-interactive-hover"]},{color:"serious",variant:"filled",className:["enabled:selected:bg-serious-subtle","enabled:selected:hover:bg-serious-hover","enabled:selected:focus:bg-serious-hover"]},{color:"serious",variant:"floating",className:["enabled:selected:outline-highlight","enabled:selected:hover:outline-interactive-hover","enabled:selected:focus:outline-interactive-hover"]},{color:"critical",variant:"filled",className:["enabled:selected:bg-critical-subtle","enabled:selected:hover:bg-critical-hover","enabled:selected:focus:bg-critical-hover"]},{color:"critical",variant:"floating",className:["enabled:selected:outline-highlight","enabled:selected:hover:outline-interactive-hover","enabled:selected:focus:outline-interactive-hover"]},{className:["enabled:selected:fg-highlight","enabled:selected:hover:fg-highlight","enabled:selected:focus:fg-highlight"]}]});export{t as ButtonStyles,i as ButtonStylesDefaults,o as LinkButtonStyles,s as ToggleButtonStyles};//# sourceMappingURL=styles.js.map
|
2
2
|
//# sourceMappingURL=styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/button/styles.ts"],"names":["e","tv","BaseButtonStyles"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/button/styles.ts"],"names":["e","tv","BaseButtonStyles"],"mappings":"sCAeE,IAAA,CAAA,CAAO,CAAA,KAAA,CACP,MAAA,CAAA,OAAS,CAAA,QAIT,CAAA,CAAA,CAAA,CAAAA,EAAM,CACJ,CAAA,IAAA,CAAA,CAAA,mHACA,CAAA,6BACA,CAAA,4EACA,CAAA,+JAEA,CAAA,mFAEF,CAAA,CAAA,SACS,CACL,KAAM,CAAA,CAAA,IACN,CAAA,EAAA,CAAA,OACA,CAAA,EAAA,CAAA,QAEF,CAAA,EAAA,CAAA,CAAA,OACE,CAAA,CAAQ,MAAA,CAAA,uDACR,CAAA,OAAS,CAAA,4DACH,CAAA,IAAA,CAAA,8CAEJ,CAAA,IAAA,CAAA,CAAA,uKAGF,CAAA,CAAA,QACE,CA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,CAAA,4EACA,CAAA,4EAIN,CAAA,CAAA,CAAA,CAAA,eAG0BC,CAAAA,CAAG,CAC7B,CAAA,CAAA,CAAA,CAAAD,EAAA,CAAA,CAAQE,MAGsBD,CAAAA,CAAG,CACjC,QAAQC,MAGwBD,EAAG,CACnC,CAAA,CAAA,CAAA,CAAAD,EAAA,CAAA,CAAQE,MACR,CAAA,CAAA,CAAA,gBAEI,CAAA,CAAO,CAAA,KAAA,CACP,MAAA,CAAA,gBACA,CAAA,SACE,CAAA,CAAA,iCACA,CAAA,uGAKF,CAAA,CAAA,CAAO,OACP,MAAA,CAAA,OAAS,CAAA,UACT,CAAA,+CAEE,CAAA,kDACA,CAAA,kDAIF,CAAA,CAAA,CAAO,CAAA,KAAA,CAAA,SACP,CAAA,OAAS,CAAA,kBAEP,CAAA,CAAA,oCACA,CAAA,yCACA,CAAA,yCAIF,CAAA,CAAA,CAAO,CAAA,KAAA,CAAA,iBACE,CAAA,UACT,CAAA,SACE,CAAA,CAAA,uFAEA,CAAA,qDAIK,CAAA,KAAA,CAAA,UACP,CAAA,OAAS,CAAA,QACT,CAAA,SACE,CAAA,CAAA,qCACA,CAAA,0CACA,CAAA,0CAIF,CAAA,CAAA,CAAO,CAAA,KAAA,CAAA,UACP,CAAA,kBACA,CAAA,SACE,CAAA,CAAA,oCACA,CAAA,qGAMF,CAAA,CAAA,CAAA,CAAA,SACE,CAAA,CAAA,+BACA,CAAA,2EAKP,CAAA,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const ButtonStylesDefaults = {\n color: 'info',\n variant: 'filled',\n} as const;\n\nconst BaseButtonStyles = tv({\n base: [\n 'group/button flex w-content cursor-pointer items-center justify-center rounded-medium outline outline-transparent',\n 'disabled:cursor-not-allowed',\n 'size-large:gap-xs size-large:px-m size-large:py-s size-large:text-button-l',\n 'size-medium:gap-xs size-medium:px-m size-medium:py-s size-medium:text-button-m',\n 'size-small:gap-xxs size-small:px-s size-small:py-xs size-small:text-button-s',\n 'size-xsmall:gap-xxs size-xsmall:px-s size-xsmall:py-xs size-xsmall:text-button-xs',\n ],\n variants: {\n color: {\n info: '',\n serious: '',\n critical: '',\n },\n variant: {\n filled: 'disabled:fg-disabled disabled:bg-interactive-disabled',\n outline: 'disabled:fg-disabled disabled:outline-interactive-disabled',\n flat: 'disabled:fg-disabled disabled:bg-transparent',\n icon: [\n 'size-small:rounded-small size-xsmall:rounded-small size-large:p-xs size-medium:p-xs size-small:p-xxs size-xsmall:p-xxs',\n 'disabled:fg-disabled disabled:bg-transparent',\n ],\n floating: [\n 'rounded-full',\n 'size-large:p-xs size-medium:p-xs size-small:p-xxs size-xsmall:p-xxs',\n 'disabled:fg-disabled disabled:bg-interactive-disabled disabled:outline-interactive-disabled',\n ],\n },\n },\n compoundVariants: [\n /** Colors **/\n // Info\n {\n color: 'info',\n variant: 'filled',\n className: [\n 'enabled:bg-interactive-default',\n 'enabled:hover:bg-interactive-hover-light',\n 'enabled:focus:bg-interactive-hover-light',\n ],\n },\n {\n color: 'info',\n variant: 'outline',\n className: [\n 'enabled:fg-default-light enabled:outline-interactive',\n 'enabled:hover:outline-interactive-hover',\n 'enabled:focus:outline-interactive-hover',\n ],\n },\n {\n color: 'info',\n variant: ['flat', 'icon'],\n className: [\n 'enabled:fg-default-light',\n 'enabled:hover:bg-interactive-hover-dark',\n 'enabled:focus:bg-interactive-hover-dark',\n ],\n },\n {\n color: 'info',\n variant: 'floating',\n className: [\n 'enabled:fg-interactive enabled:bg-surface-default enabled:outline-interactive',\n 'enabled:hover:fg-interactive-hover enabled:hover:outline-interactive-hover',\n 'enabled:focus:fg-interactive-hover enabled:focus:outline-interactive-hover',\n ],\n },\n\n // Serious\n {\n color: 'serious',\n variant: 'filled',\n className: [\n 'enabled:bg-serious',\n 'enabled:hover:bg-serious-hover',\n 'enabled:focus:bg-serious-hover',\n ],\n },\n {\n color: 'serious',\n variant: 'outline',\n className: [\n 'enabled:fg-default-light enabled:outline-serious',\n 'enabled:hover:outline-interactive-hover',\n 'enabled:focus:outline-interactive-hover',\n ],\n },\n {\n color: 'serious',\n variant: ['flat', 'icon'],\n className: [\n 'enabled:fg-default-light',\n 'enabled:hover:bg-serious-hover',\n 'enabled:focus:bg-serious-hover',\n ],\n },\n {\n color: 'serious',\n variant: 'floating',\n className: [\n 'enabled:fg-serious enabled:bg-serious-subtle enabled:outline-serious',\n 'enabled:hover:fg-interactive-hover enabled:hover:outline-interactive-hover',\n 'enabled:focus:fg-interactive-hover enabled:focus:outline-interactive-hover',\n ],\n },\n\n // Critical\n {\n color: 'critical',\n variant: 'filled',\n className: [\n 'enabled:bg-critical',\n 'enabled:hover:bg-critical-hover',\n 'enabled:focus:bg-critical-hover',\n ],\n },\n {\n color: 'critical',\n variant: 'outline',\n className: [\n 'enabled:fg-default-light enabled:outline-critical',\n 'enabled:hover:outline-interactive-hover',\n 'enabled:focus:outline-interactive-hover',\n ],\n },\n {\n color: 'critical',\n variant: ['flat', 'icon'],\n className: [\n 'enabled:fg-default-light',\n 'enabled:hover:bg-critical-hover',\n 'enabled:focus:bg-critical-hover',\n ],\n },\n {\n color: 'critical',\n variant: 'floating',\n className: [\n 'enabled:fg-critical enabled:bg-critical-subtle enabled:outline-critical',\n 'enabled:hover:fg-interactive-hover enabled:hover:outline-interactive-hover',\n 'enabled:focus:fg-interactive-hover enabled:focus:outline-interactive-hover',\n ],\n },\n ],\n defaultVariants: ButtonStylesDefaults,\n});\n\nexport const ButtonStyles = tv({\n extend: BaseButtonStyles,\n});\n\nexport const LinkButtonStyles = tv({\n extend: BaseButtonStyles,\n});\n\nexport const ToggleButtonStyles = tv({\n extend: BaseButtonStyles,\n compoundVariants: [\n {\n color: 'info',\n variant: 'filled',\n className: [\n 'enabled:selected:bg-info-subtle',\n 'enabled:selected:hover:bg-interactive-hover-light',\n 'enabled:selected:focus:bg-interactive-hover-light',\n ],\n },\n {\n color: 'info',\n variant: 'floating',\n className: [\n 'enabled:selected:outline-highlight',\n 'enabled:selected:hover:outline-interactive-hover',\n 'enabled:selected:focus:outline-interactive-hover',\n ],\n },\n {\n color: 'serious',\n variant: 'filled',\n className: [\n 'enabled:selected:bg-serious-subtle',\n 'enabled:selected:hover:bg-serious-hover',\n 'enabled:selected:focus:bg-serious-hover',\n ],\n },\n {\n color: 'serious',\n variant: 'floating',\n className: [\n 'enabled:selected:outline-highlight',\n 'enabled:selected:hover:outline-interactive-hover',\n 'enabled:selected:focus:outline-interactive-hover',\n ],\n },\n {\n color: 'critical',\n variant: 'filled',\n className: [\n 'enabled:selected:bg-critical-subtle',\n 'enabled:selected:hover:bg-critical-hover',\n 'enabled:selected:focus:bg-critical-hover',\n ],\n },\n {\n color: 'critical',\n variant: 'floating',\n className: [\n 'enabled:selected:outline-highlight',\n 'enabled:selected:hover:outline-interactive-hover',\n 'enabled:selected:focus:outline-interactive-hover',\n ],\n },\n // Must be last to override color values\n {\n className: [\n 'enabled:selected:fg-highlight',\n 'enabled:selected:hover:fg-highlight',\n 'enabled:selected:focus:fg-highlight',\n ],\n },\n ],\n});\n"]}
|
@@ -3,7 +3,9 @@ import { ButtonProps as ButtonProps$1, LinkProps, ToggleButtonProps as ToggleBut
|
|
3
3
|
import { VariantProps } from 'tailwind-variants';
|
4
4
|
import { ButtonStyles } from './styles.js';
|
5
5
|
|
6
|
-
type ButtonStyleVariants = VariantProps<typeof ButtonStyles
|
6
|
+
type ButtonStyleVariants = VariantProps<typeof ButtonStyles> & {
|
7
|
+
size?: 'large' | 'medium' | 'small' | 'xsmall';
|
8
|
+
};
|
7
9
|
type ButtonProps = ButtonProps$1 & ButtonStyleVariants & RefAttributes<HTMLButtonElement>;
|
8
10
|
type LinkButtonProps = LinkProps & ButtonStyleVariants & RefAttributes<HTMLAnchorElement>;
|
9
11
|
type ToggleButtonProps = ToggleButtonProps$1 & ButtonStyleVariants & RefAttributes<HTMLButtonElement>;
|
@@ -1,19 +1,20 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import
|
3
|
-
import {
|
2
|
+
import * as react from 'react';
|
3
|
+
import { ContextValue } from 'react-aria-components';
|
4
|
+
import { CheckboxProps, CheckboxGroupProps } from './types.js';
|
5
|
+
import '@react-types/shared';
|
6
|
+
import '../label/types.js';
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
8
|
+
declare const CheckboxGroupContext: react.Context<ContextValue<CheckboxGroupProps, HTMLDivElement>>;
|
9
|
+
declare function CheckboxGroup({ ref, ...props }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
10
|
+
declare namespace CheckboxGroup {
|
11
|
+
var displayName: string;
|
9
12
|
}
|
10
|
-
declare
|
13
|
+
declare const CheckboxContext: react.Context<ContextValue<CheckboxProps, HTMLLabelElement>>;
|
14
|
+
declare function Checkbox({ ref, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
11
15
|
declare namespace Checkbox {
|
16
|
+
var displayName: string;
|
12
17
|
var Group: typeof CheckboxGroup;
|
13
18
|
}
|
14
|
-
interface CheckboxGroupProps extends CheckboxGroupProps$1 {
|
15
|
-
label?: string | react__default.JSX.Element;
|
16
|
-
}
|
17
|
-
declare function CheckboxGroup({ children, className, label, ...props }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
18
19
|
|
19
|
-
export { Checkbox,
|
20
|
+
export { Checkbox, CheckboxContext, CheckboxGroupContext };
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import
|
1
|
+
import'client-only';import {Remove,Check}from'@accelint/icons';import {createContext}from'react';import {useContextProps,Checkbox,composeRenderProps,CheckboxGroup}from'react-aria-components';import {Icon}from'../icon/index.js';import {Label}from'../label/index.js';import {CheckboxStyles}from'./styles.js';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var {group:A,groupLabel:g,checkbox:v,control:R,label:V}=CheckboxStyles(),D=createContext(null);function i({ref:o,...e}){[e,o]=useContextProps(e,o??null,D);let{children:t,classNames:c,label:l,orientation:r="vertical",...p}=e;return jsx(CheckboxGroup,{...p,ref:o,className:composeRenderProps(c?.group,s=>A({className:s})),"data-orientation":r,children:composeRenderProps(t,(s,{isDisabled:h,isRequired:k})=>jsxs(Fragment,{children:[l&&jsx(Label,{className:g({className:c?.label}),isDisabled:h,isRequired:k,children:l}),s]}))})}i.displayName="Checkbox.Group";var E=createContext(null);function C({ref:o,...e}){[e,o]=useContextProps(e,o??null,E);let{classNames:t,children:c,...l}=e;return jsx(Checkbox,{...l,ref:o,className:composeRenderProps(t?.checkbox,r=>v({className:r})),children:composeRenderProps(c,(r,{isIndeterminate:p,isSelected:s})=>jsxs(Fragment,{children:[jsx("span",{className:R({className:t?.control}),children:jsxs(Icon,{size:"small",children:[p&&!s&&jsx(Remove,{}),s&&jsx(Check,{})]})}),r&&jsx("span",{className:V({className:t?.label}),children:r})]}))})}C.displayName="Checkbox";C.Group=i;export{C as Checkbox,E as CheckboxContext,D as CheckboxGroupContext};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/checkbox/index.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["../../../src/components/checkbox/index.tsx"],"names":["CheckboxStyles","L","CheckboxGroupContext","createContext","b","props","ref","useContextProps","rest","AriaCheckboxGroup","f","classNames","className","group","children","jsxs","u","label","jsx","Label","y","CheckboxGroup","AriaCheckbox","P","checkbox","Fragment","a","Icon","d","isIndeterminate","isSelected","Remove","G","Check","N","Check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CAAAA,CAAS,CAAA,CAAA,CAAA,WAAc,CAAA,UACd,CAAA,CAAA,CAAA,KAAQd,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Check, Remove } from '@accelint/icons';\nimport { createContext } from 'react';\nimport {\n Checkbox as AriaCheckbox,\n CheckboxGroup as AriaCheckboxGroup,\n type ContextValue,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport { CheckboxStyles } from './styles';\nimport type { CheckboxGroupProps, CheckboxProps } from './types';\n\nconst { group, groupLabel, checkbox, control, label } = CheckboxStyles();\n\nexport const CheckboxGroupContext =\n createContext<ContextValue<CheckboxGroupProps, HTMLDivElement>>(null);\n\nfunction CheckboxGroup({ ref, ...props }: CheckboxGroupProps) {\n [props, ref] = useContextProps(props, ref ?? null, CheckboxGroupContext);\n\n const {\n children,\n classNames,\n label,\n orientation = 'vertical',\n ...rest\n } = props;\n\n return (\n <AriaCheckboxGroup\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.group, (className) =>\n group({ className }),\n )}\n data-orientation={orientation}\n >\n {composeRenderProps(children, (children, { isDisabled, isRequired }) => (\n <>\n {label && (\n <Label\n className={groupLabel({ className: classNames?.label })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {label}\n </Label>\n )}\n {children}\n </>\n ))}\n </AriaCheckboxGroup>\n );\n}\nCheckboxGroup.displayName = 'Checkbox.Group';\n\nexport const CheckboxContext =\n createContext<ContextValue<CheckboxProps, HTMLLabelElement>>(null);\n\nexport function Checkbox({ ref, ...props }: CheckboxProps) {\n [props, ref] = useContextProps(props, ref ?? null, CheckboxContext);\n\n const { classNames, children, ...rest } = props;\n\n return (\n <AriaCheckbox\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.checkbox, (className) =>\n checkbox({ className }),\n )}\n >\n {composeRenderProps(\n children,\n (children, { isIndeterminate, isSelected }) => (\n <>\n <span className={control({ className: classNames?.control })}>\n <Icon size='small'>\n {isIndeterminate && !isSelected && <Remove />}\n {isSelected && <Check />}\n </Icon>\n </span>\n {children && (\n <span className={label({ className: classNames?.label })}>\n {children}\n </span>\n )}\n </>\n ),\n )}\n </AriaCheckbox>\n );\n}\nCheckbox.displayName = 'Checkbox';\nCheckbox.Group = CheckboxGroup;\n"]}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
2
|
+
|
3
|
+
declare const CheckboxStyles: tailwind_variants.TVReturnType<{
|
4
|
+
[key: string]: {
|
5
|
+
[key: string]: tailwind_variants.ClassValue | {
|
6
|
+
checkbox?: tailwind_variants.ClassValue;
|
7
|
+
group?: tailwind_variants.ClassValue;
|
8
|
+
label?: tailwind_variants.ClassValue;
|
9
|
+
groupLabel?: tailwind_variants.ClassValue;
|
10
|
+
control?: tailwind_variants.ClassValue;
|
11
|
+
};
|
12
|
+
};
|
13
|
+
} | {
|
14
|
+
[x: string]: {
|
15
|
+
[x: string]: tailwind_variants.ClassValue | {
|
16
|
+
checkbox?: tailwind_variants.ClassValue;
|
17
|
+
group?: tailwind_variants.ClassValue;
|
18
|
+
label?: tailwind_variants.ClassValue;
|
19
|
+
groupLabel?: tailwind_variants.ClassValue;
|
20
|
+
control?: tailwind_variants.ClassValue;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
} | {}, {
|
24
|
+
group: string[];
|
25
|
+
groupLabel: string;
|
26
|
+
checkbox: string[];
|
27
|
+
control: string[];
|
28
|
+
label: string[];
|
29
|
+
}, undefined, {
|
30
|
+
[key: string]: {
|
31
|
+
[key: string]: tailwind_variants.ClassValue | {
|
32
|
+
checkbox?: tailwind_variants.ClassValue;
|
33
|
+
group?: tailwind_variants.ClassValue;
|
34
|
+
label?: tailwind_variants.ClassValue;
|
35
|
+
groupLabel?: tailwind_variants.ClassValue;
|
36
|
+
control?: tailwind_variants.ClassValue;
|
37
|
+
};
|
38
|
+
};
|
39
|
+
} | {}, {
|
40
|
+
group: string[];
|
41
|
+
groupLabel: string;
|
42
|
+
checkbox: string[];
|
43
|
+
control: string[];
|
44
|
+
label: string[];
|
45
|
+
}, tailwind_variants.TVReturnType<unknown, {
|
46
|
+
group: string[];
|
47
|
+
groupLabel: string;
|
48
|
+
checkbox: string[];
|
49
|
+
control: string[];
|
50
|
+
label: string[];
|
51
|
+
}, undefined, unknown, unknown, undefined>>;
|
52
|
+
|
53
|
+
export { CheckboxStyles };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {tv}from'./../../lib/utils.js';var c=tv({slots:{group:["group/checkbox-group flex gap-xs","orientation-horizontal:flex-wrap","orientation-vertical:flex-col"],groupLabel:"w-full",checkbox:["group/checkbox flex cursor-pointer items-center gap-m group-orientation-horizontal/checkbox-group:grow group-orientation-horizontal/checkbox-group:basis-1/3","disabled:cursor-not-allowed"],control:["my-xxs flex size-l items-center justify-center rounded-small outline outline-interactive","group-enabled/checkbox:fg-info-subtle","group-enabled/checkbox:group-focus/checkbox:outline-interactive-hover","group-enabled/checkbox:group-hover/checkbox:outline-interactive-hover","group-enabled/checkbox:group-indeterminate/checkbox:bg-highlight group-enabled/checkbox:group-indeterminate/checkbox:outline-highlight","group-enabled/checkbox:group-indeterminate/checkbox:group-focus/checkbox:outline-interactive-hover","group-enabled/checkbox:group-indeterminate/checkbox:group-hover/checkbox:outline-interactive-hover","group-enabled/checkbox:group-selected/checkbox:bg-highlight group-enabled/checkbox:group-selected/checkbox:outline-highlight","group-enabled/checkbox:group-selected/checkbox:group-focus/checkbox:outline-interactive-hover","group-enabled/checkbox:group-selected/checkbox:group-hover/checkbox:outline-interactive-hover","group-disabled/checkbox:outline-interactive-disabled","group-disabled/checkbox:group-selected/checkbox:fg-inverse-light group-disabled/checkbox:group-selected/checkbox:bg-interactive-disabled"],label:["text-body-s text-interactive-default","group-disabled/checkbox:text-interactive-disabled"]}});export{c as CheckboxStyles};//# sourceMappingURL=styles.js.map
|
2
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/checkbox/styles.ts"],"names":["e"],"mappings":"sCAeE,IAAA,CAAA,CAAAA,EAAA,CAAO,CACL,MAAO,CACL,KAAA,CAAA,CAAA,qEAEA,CAAA,2CAEU,CAAA,QACZ,CAAA,QACE,CAAA,CAAA,8JACA,CAAA,6BAEF,CAAA,CAAA,mGAEE,CAAA,uCACA,CAAA,+IAEA,CAAA,wIACA,CAAA,yMAEA,CAAA,8HACA,CAAA,+LAEA,CAAA,sDACA,CAAA,0IAEF,CAAO,CACL,6CACA,CAAA,mDAGL,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const CheckboxStyles = tv({\n slots: {\n group: [\n 'group/checkbox-group flex gap-xs',\n 'orientation-horizontal:flex-wrap',\n 'orientation-vertical:flex-col',\n ],\n groupLabel: 'w-full',\n checkbox: [\n 'group/checkbox flex cursor-pointer items-center gap-m group-orientation-horizontal/checkbox-group:grow group-orientation-horizontal/checkbox-group:basis-1/3',\n 'disabled:cursor-not-allowed',\n ],\n control: [\n 'my-xxs flex size-l items-center justify-center rounded-small outline outline-interactive',\n 'group-enabled/checkbox:fg-info-subtle',\n 'group-enabled/checkbox:group-focus/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-hover/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-indeterminate/checkbox:bg-highlight group-enabled/checkbox:group-indeterminate/checkbox:outline-highlight',\n 'group-enabled/checkbox:group-indeterminate/checkbox:group-focus/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-indeterminate/checkbox:group-hover/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-selected/checkbox:bg-highlight group-enabled/checkbox:group-selected/checkbox:outline-highlight',\n 'group-enabled/checkbox:group-selected/checkbox:group-focus/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-selected/checkbox:group-hover/checkbox:outline-interactive-hover',\n 'group-disabled/checkbox:outline-interactive-disabled',\n 'group-disabled/checkbox:group-selected/checkbox:fg-inverse-light group-disabled/checkbox:group-selected/checkbox:bg-interactive-disabled',\n ],\n label: [\n 'text-body-s text-interactive-default',\n 'group-disabled/checkbox:text-interactive-disabled',\n ],\n },\n});\n"]}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Orientation } from '@react-types/shared';
|
2
|
+
import { RefAttributes } from 'react';
|
3
|
+
import { CheckboxProps as CheckboxProps$1, CheckboxGroupProps as CheckboxGroupProps$1 } from 'react-aria-components';
|
4
|
+
import { LabelProps } from '../label/types.js';
|
5
|
+
|
6
|
+
type CheckboxGroupProps = Omit<CheckboxGroupProps$1, 'className'> & RefAttributes<HTMLDivElement> & {
|
7
|
+
classNames?: {
|
8
|
+
group?: CheckboxGroupProps$1['className'];
|
9
|
+
label?: LabelProps['className'];
|
10
|
+
};
|
11
|
+
label?: string;
|
12
|
+
orientation?: Orientation;
|
13
|
+
};
|
14
|
+
type CheckboxProps = Omit<CheckboxProps$1, 'className'> & RefAttributes<HTMLLabelElement> & {
|
15
|
+
classNames?: {
|
16
|
+
checkbox?: CheckboxProps$1['className'];
|
17
|
+
control?: string;
|
18
|
+
label?: string;
|
19
|
+
};
|
20
|
+
};
|
21
|
+
|
22
|
+
export type { CheckboxGroupProps, CheckboxProps };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import'client-only';import {CancelFill}from'@accelint/icons';import {createContext,useContext}from'react';import {useContextProps,Tag,TagGroup,TagList,composeRenderProps,Button}from'react-aria-components';import {Icon}from'../icon/index.js';import {SelectableChipStyles,DeletableChipStyles,ChipStyles,ChipStylesDefaults}from'./styles.js';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var c=createContext(null);function
|
1
|
+
import'client-only';import {CancelFill}from'@accelint/icons';import {createContext,useContext}from'react';import {useContextProps,Tag,TagGroup,TagList,composeRenderProps,Button}from'react-aria-components';import {Icon}from'../icon/index.js';import {SelectableChipStyles,DeletableChipStyles,ChipStyles,ChipStylesDefaults}from'./styles.js';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var c=createContext(null);function P({children:e,...t}){return jsx(c.Provider,{value:t,children:e})}P.displayName="Chip.Provider";var x=createContext(false);function y({ref:e,...t}){[t,e]=useContextProps(t,e??null,c);let{children:o,className:s,dependencies:r,items:a,renderEmptyState:n,size:l="medium",...h}=t;return jsx(x.Provider,{value:true,children:jsx(P,{size:l,children:jsx(TagGroup,{...h,children:jsx(TagList,{ref:e,className:composeRenderProps(s,d=>I({className:d})),dependencies:r,items:a,renderEmptyState:n,children:o})})})})}y.displayName="Chip.List";var{chip:R}=SelectableChipStyles();function N({ref:e,...t}){[t,e]=useContextProps(t,e??null,c);let{className:o,size:s="medium",...r}=t;return jsx(Tag,{...r,ref:e,className:composeRenderProps(o,a=>R({className:a,size:s})),"data-size":s})}N.displayName="Chip.Selectable";var{chip:V,remove:G}=DeletableChipStyles();function f({ref:e,...t}){[t,e]=useContextProps(t,e??null,c);let{children:o,classNames:s,size:r="medium",textValue:a=typeof o=="string"?o:void 0,...n}=t;return jsx(Tag,{...n,ref:e,className:composeRenderProps(s?.chip,l=>V({className:l,size:r})),textValue:a,"data-size":r,children:composeRenderProps(o,(l,{allowsRemoving:h})=>{if(!h)throw new Error("You have a <Chip.Deletable> in a <Chip.List> that does not specify an onRemove handler.");return jsxs(Fragment,{children:[l,jsx(Button,{slot:"remove",className:composeRenderProps(s?.remove,d=>G({className:d})),children:jsx(Icon,{size:"small",children:jsx(CancelFill,{})})})]})})})}f.displayName="Chip.Deletable";var{list:I,chip:w}=ChipStyles();function m({ref:e,...t}){[t,e]=useContextProps(t,e??null,c);let s=useContext(x)?Tag:"div",{className:r,size:a="medium",variant:n=ChipStylesDefaults.variant,...l}=t;return jsx(Icon.Provider,{size:a==="medium"?"small":"xsmall",children:jsx(s,{...l,ref:e,className:w({size:a,variant:n,className:r}),"data-size":a})})}m.displayName="Chip";m.Provider=P;m.List=y;m.Deletable=f;m.Selectable=N;export{m as Chip,c as ChipContext};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|