@cronocode/react-box 2.0.7 → 3.0.0-alpha.2

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.
Files changed (53) hide show
  1. package/box.cjs +1 -1
  2. package/box.d.ts +13 -7
  3. package/box.mjs +15 -9
  4. package/components/baseSvg.d.ts +3 -4
  5. package/components/button.cjs +1 -1
  6. package/components/button.d.ts +0 -1
  7. package/components/button.mjs +1 -1
  8. package/components/checkbox.cjs +1 -1
  9. package/components/checkbox.d.ts +2 -5
  10. package/components/checkbox.mjs +10 -10
  11. package/components/dataGrid/dataGridContract.d.ts +19 -11
  12. package/components/dataGrid/useGridData.d.ts +7 -0
  13. package/components/dataGrid.cjs +1 -1
  14. package/components/dataGrid.d.ts +5 -3
  15. package/components/dataGrid.mjs +17 -28
  16. package/components/flex.d.ts +3 -5
  17. package/components/form.cjs +1 -1
  18. package/components/form.d.ts +0 -1
  19. package/components/form.mjs +1 -1
  20. package/components/grid.d.ts +3 -5
  21. package/components/label.d.ts +0 -1
  22. package/components/radioButton.cjs +1 -1
  23. package/components/radioButton.d.ts +1 -3
  24. package/components/radioButton.mjs +9 -9
  25. package/components/textarea.cjs +1 -1
  26. package/components/textarea.d.ts +1 -2
  27. package/components/textarea.mjs +8 -9
  28. package/components/textbox.cjs +1 -1
  29. package/components/textbox.d.ts +0 -2
  30. package/components/textbox.mjs +1 -1
  31. package/components/tooltip.cjs +1 -1
  32. package/components/tooltip.d.ts +1 -2
  33. package/components/tooltip.mjs +34 -40
  34. package/core/boxExtends.d.ts +6 -0
  35. package/core/boxStyles.d.ts +701 -1217
  36. package/core/boxStylesFormatters.d.ts +2 -2
  37. package/core/coreTypes.d.ts +31 -0
  38. package/core/theme.d.ts +13 -32
  39. package/core/useStyles.d.ts +12 -3
  40. package/core/useTheme.d.ts +7 -10
  41. package/core.cjs +4 -34
  42. package/core.mjs +1397 -1158
  43. package/package.json +20 -25
  44. package/ssg.d.ts +0 -1
  45. package/types.d.ts +26 -0
  46. package/utils/object/objectUtils.d.ts +2 -0
  47. package/components/dataGrid/useGrid.d.ts +0 -3
  48. package/core/stylesContext.d.ts +0 -13
  49. package/core/theme.cjs +0 -1
  50. package/core/theme.mjs +0 -4
  51. package/core/types.d.ts +0 -60
  52. package/utils.cjs +0 -1
  53. package/utils.mjs +0 -63
package/core.mjs CHANGED
@@ -1,524 +1,275 @@
1
- import { useMemo as U, useLayoutEffect as ee, useEffect as se } from "react";
2
- import { O as X } from "./utils.mjs";
3
- var s;
1
+ import { useMemo as U, useLayoutEffect as le, useEffect as ne } from "react";
2
+ function ie(...e) {
3
+ return e.reduce((t, a) => a ? typeof a == "string" ? (t.push(a), t) : Array.isArray(a) ? (t.push(...ie(...a)), t) : (Object.entries(a).forEach(([u, m]) => {
4
+ m && t.push(u);
5
+ }), t) : t, []);
6
+ }
7
+ var c;
4
8
  ((e) => {
5
- ((l) => {
6
- function u(t, d) {
7
- return `${t}${d.replace("/", "-")}`;
8
- }
9
- l.fraction = u;
10
- function n(t) {
11
- return [`${t} path`, `${t} circle`, `${t} rect`, `${t} line`];
12
- }
13
- l.svg = n;
14
- })(e.ClassName || (e.ClassName = {})), ((l) => {
15
- function u(r, a) {
16
- return `${a / 4}rem`;
17
- }
18
- l.rem = u;
19
- function n(r, a) {
20
- return `${a}px`;
21
- }
22
- l.px = n;
23
- function t(r, a) {
24
- const [o, v] = a.split("/");
25
- return `${+o / +v * 100}%`;
26
- }
27
- l.fraction = t;
28
- function d(r, a) {
29
- switch (a) {
9
+ ((t) => {
10
+ function a(m, n) {
11
+ return `${m}${n.replace("/", "-")}`;
12
+ }
13
+ t.fraction = a;
14
+ function u(m) {
15
+ return [`${m} path`, `${m} circle`, `${m} rect`, `${m} line`];
16
+ }
17
+ t.svg = u;
18
+ })(e.ClassName || (e.ClassName = {})), ((t) => {
19
+ function a(h) {
20
+ return `${h / 4}rem`;
21
+ }
22
+ t.rem = a;
23
+ function u(h) {
24
+ return `${h}px`;
25
+ }
26
+ t.px = u;
27
+ function m(h, r) {
28
+ const [i, l] = r.split("/");
29
+ return `${+i / +l * 100}%`;
30
+ }
31
+ t.fraction = m;
32
+ function n(h, r) {
33
+ switch (r) {
30
34
  case "fit":
31
35
  return "100%";
32
36
  case "fit-screen":
33
- return r.toLocaleLowerCase().includes("height") ? "100vh" : "100vw";
37
+ return h.toLocaleLowerCase().includes("height") ? "100vh" : "100vw";
34
38
  default:
35
- return a;
39
+ return r;
36
40
  }
37
41
  }
38
- l.widthHeight = d;
39
- function p(r) {
40
- return (a, o) => `var(--${r}${o});`;
42
+ t.widthHeight = n;
43
+ function d(h) {
44
+ return (r, i) => `var(--${h}${i});`;
41
45
  }
42
- l.variables = p;
43
- function k(r) {
44
- return (a, o) => `var(--${r}${o});`;
46
+ t.variables = d;
47
+ function o(h) {
48
+ return (r, i) => `var(--${h}${i});`;
45
49
  }
46
- l.svgVariables = k;
47
- function E(r, a) {
48
- return `repeat(${a},minmax(0,1fr))`;
50
+ t.svgVariables = o;
51
+ function v(h, r) {
52
+ return `repeat(${r},minmax(0,1fr))`;
49
53
  }
50
- l.gridColumns = E;
51
- function C(r, a) {
52
- return a === "full-row" ? "1/-1" : `span ${a}/span ${a}`;
54
+ t.gridColumns = v;
55
+ function y(h, r) {
56
+ return r === "full-row" ? "1/-1" : `span ${r}/span ${r}`;
53
57
  }
54
- l.gridColumn = C;
55
- function i(r, a) {
56
- return `${a}ms`;
58
+ t.gridColumn = y;
59
+ function s(h, r) {
60
+ return `${r}ms`;
57
61
  }
58
- l.ms = i;
59
- function m(r, a) {
60
- return `${a}deg`;
62
+ t.ms = s;
63
+ function f(h, r) {
64
+ return `${r}deg`;
61
65
  }
62
- l.rotate = m;
63
- function f(r, a) {
64
- return a === "xAxis" ? "-1 1" : "1 -1";
66
+ t.rotate = f;
67
+ function p(h, r) {
68
+ return r === "xAxis" ? "-1 1" : "1 -1";
65
69
  }
66
- l.flip = f;
70
+ t.flip = p;
67
71
  })(e.Value || (e.Value = {}));
68
- })(s || (s = {}));
69
- const c = [
70
- 0,
71
- 1,
72
- 2,
73
- 3,
74
- 4,
75
- 5,
76
- 6,
77
- 7,
78
- 8,
79
- 9,
80
- 10,
81
- 11,
82
- 12,
83
- 13,
84
- 14,
85
- 15,
86
- 16,
87
- 17,
88
- 18,
89
- 19,
90
- 20,
91
- 22,
92
- 24,
93
- 26,
94
- 28,
95
- 30,
96
- 32,
97
- 34,
98
- 36,
99
- 38,
100
- 40,
101
- 42,
102
- 44,
103
- 46,
104
- 48,
105
- 50,
106
- 52,
107
- 54,
108
- 56,
109
- 58,
110
- 60,
111
- 64,
112
- 68,
113
- 72,
114
- 76,
115
- 80,
116
- 84,
117
- 88,
118
- 92,
119
- 96,
120
- 100,
121
- 110,
122
- 120,
123
- 128,
124
- 130,
125
- 140,
126
- 150,
127
- 160,
128
- 170,
129
- 180,
130
- 190,
131
- 192,
132
- 200,
133
- 225,
134
- 250,
135
- 256,
136
- 275,
137
- 300,
138
- 320,
139
- 350,
140
- 384,
141
- 400
142
- ], ae = [
143
- -1,
144
- -2,
145
- -3,
146
- -4,
147
- -5,
148
- -6,
149
- -7,
150
- -8,
151
- -9,
152
- -10,
153
- -11,
154
- -12,
155
- -13,
156
- -14,
157
- -15,
158
- -16,
159
- -17,
160
- -18,
161
- -19,
162
- -20,
163
- -22,
164
- -24,
165
- -26,
166
- -28,
167
- -30,
168
- -32,
169
- -34,
170
- -36,
171
- -38,
172
- -40,
173
- -44,
174
- -48,
175
- -52,
176
- -56,
177
- -60,
178
- -64,
179
- -68,
180
- -72,
181
- -76,
182
- -80,
183
- -84,
184
- -88,
185
- -92,
186
- -96,
187
- -100
188
- ], h = [...c, ...ae], W = ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"], R = ["auto", "hidden", "scroll", "visible"], T = [
189
- "1/2",
190
- "1/3",
191
- "2/3",
192
- "1/4",
193
- "2/4",
194
- "3/4",
195
- "1/5",
196
- "2/5",
197
- "3/5",
198
- "4/5",
199
- "1/6",
200
- "2/6",
201
- "3/6",
202
- "4/6",
203
- "5/6",
204
- "1/12",
205
- "2/12",
206
- "3/12",
207
- "4/12",
208
- "5/12",
209
- "6/12",
210
- "7/12",
211
- "8/12",
212
- "9/12",
213
- "10/12",
214
- "11/12"
215
- ], O = ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"], F = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"], le = {
216
- /** The `display` CSS property sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. */
217
- display: {
218
- cssNames: ["display"],
219
- values1: { values: ["none", "block", "inline-block", "flex", "inline-flex", "grid", "inline-grid", "contents"] },
220
- values2: { values: [] },
221
- values3: { values: [] }
222
- },
223
- /** The `inline` property is a shortcut to transform `block`, `flex` and `grid` value to `inline-block`, `inline-flex` and `inline-grid` respectively. */
224
- inline: {
225
- cssNames: ["display"],
226
- values1: { values: [!0], formatValue: () => "inline-block" },
227
- values2: { values: [] },
228
- values3: { values: [] }
229
- },
230
- /** The `box-sizing` CSS property sets how the total width and height of an element is calculated. */
231
- boxSizing: {
232
- cssNames: ["box-sizing"],
233
- values1: { values: ["border-box", "content-box"] },
234
- values2: { values: [] },
235
- values3: { values: [] }
236
- },
237
- width: {
238
- cssNames: ["width"],
239
- values1: { values: O, formatValue: s.Value.widthHeight },
240
- values2: { values: c, formatValue: s.Value.rem },
241
- values3: {
242
- values: T,
243
- formatValue: s.Value.fraction
244
- // formatClassName: BoxStylesFormatters.ClassName.fraction,
72
+ })(c || (c = {}));
73
+ const S = {
74
+ /** The appearance CSS property is used to display UI elements with platform-specific styling, based on the operating system's theme. */
75
+ appearance: [
76
+ {
77
+ values: ["none", "auto", "menulist-button", "textfield", "button", "checkbox"]
245
78
  }
246
- },
247
- minWidth: {
248
- cssNames: ["min-width"],
249
- values1: { values: O, formatValue: s.Value.widthHeight },
250
- values2: { values: c, formatValue: s.Value.rem },
251
- values3: {
252
- values: T,
253
- formatValue: s.Value.fraction
254
- // formatClassName: BoxStylesFormatters.ClassName.fraction,
79
+ ],
80
+ /** The border-width shorthand CSS property sets the width of an element's border. */
81
+ b: [
82
+ {
83
+ values: 0,
84
+ styleName: "border-width",
85
+ valueFormat: c.Value.px
255
86
  }
256
- },
257
- maxWidth: {
258
- cssNames: ["max-width"],
259
- values1: { values: O, formatValue: s.Value.widthHeight },
260
- values2: { values: c, formatValue: s.Value.rem },
261
- values3: {
262
- values: T,
263
- formatValue: s.Value.fraction
264
- // formatClassName: BoxStylesFormatters.ClassName.fraction,
87
+ ],
88
+ /** The border-width shorthand CSS property sets the width of an element's left and right border. */
89
+ bx: [
90
+ {
91
+ values: 0,
92
+ styleName: "border-inline-width",
93
+ valueFormat: c.Value.px
265
94
  }
266
- },
267
- height: {
268
- cssNames: ["height"],
269
- values1: { values: O, formatValue: s.Value.widthHeight },
270
- values2: { values: c, formatValue: s.Value.rem },
271
- values3: {
272
- values: T,
273
- formatValue: s.Value.fraction
274
- // formatClassName: BoxStylesFormatters.ClassName.fraction,
95
+ ],
96
+ /** The border-width shorthand CSS property sets the width of an element's top and bottom border. */
97
+ by: [
98
+ {
99
+ values: 0,
100
+ styleName: "border-block-width",
101
+ valueFormat: c.Value.px
275
102
  }
276
- },
277
- minHeight: {
278
- cssNames: ["min-height"],
279
- values1: { values: O, formatValue: s.Value.widthHeight },
280
- values2: { values: c, formatValue: s.Value.rem },
281
- values3: {
282
- values: T,
283
- formatValue: s.Value.fraction
284
- // formatClassName: BoxStylesFormatters.ClassName.fraction,
103
+ ],
104
+ /** The border-top-width CSS property sets the width of the top border of an element. */
105
+ bt: [
106
+ {
107
+ values: 0,
108
+ styleName: "border-top-width",
109
+ valueFormat: c.Value.px
285
110
  }
286
- },
287
- maxHeight: {
288
- cssNames: ["max-height"],
289
- values1: { values: O, formatValue: s.Value.widthHeight },
290
- values2: { values: c, formatValue: s.Value.rem },
291
- values3: {
292
- values: T,
293
- formatValue: s.Value.fraction
294
- // formatClassName: BoxStylesFormatters.ClassName.fraction,
111
+ ],
112
+ /** The border-right-width CSS property sets the width of the right border of an element. */
113
+ br: [
114
+ {
115
+ values: 0,
116
+ styleName: "border-right-width",
117
+ valueFormat: c.Value.px
295
118
  }
296
- },
297
- position: {
298
- cssNames: ["position"],
299
- values1: { values: ["static", "relative", "absolute", "fixed", "sticky"] },
300
- values2: { values: [] },
301
- values3: { values: [] }
302
- },
303
- top: {
304
- cssNames: ["top"],
305
- values1: { values: h, formatValue: s.Value.rem },
306
- values2: { values: [] },
307
- values3: { values: [] }
308
- },
309
- right: {
310
- cssNames: ["right"],
311
- values1: { values: h, formatValue: s.Value.rem },
312
- values2: { values: [] },
313
- values3: { values: [] }
314
- },
315
- bottom: {
316
- cssNames: ["bottom"],
317
- values1: { values: h, formatValue: s.Value.rem },
318
- values2: { values: [] },
319
- values3: { values: [] }
320
- },
321
- left: {
322
- cssNames: ["left"],
323
- values1: { values: h, formatValue: s.Value.rem },
324
- values2: { values: [] },
325
- values3: { values: [] }
326
- },
327
- inset: {
328
- cssNames: ["inset"],
329
- values1: { values: h, formatValue: s.Value.rem },
330
- values2: { values: [] },
331
- values3: { values: [] }
332
- },
333
- m: {
334
- cssNames: ["margin"],
335
- values1: { values: h, formatValue: s.Value.rem },
336
- values2: { values: ["auto"] },
337
- values3: { values: [] }
338
- },
339
- mx: {
340
- cssNames: ["margin-inline"],
341
- values1: { values: h, formatValue: s.Value.rem },
342
- values2: { values: ["auto"] },
343
- values3: { values: [] }
344
- },
345
- my: {
346
- cssNames: ["margin-block"],
347
- values1: { values: h, formatValue: s.Value.rem },
348
- values2: { values: ["auto"] },
349
- values3: { values: [] }
350
- },
351
- mt: {
352
- cssNames: ["margin-top"],
353
- values1: { values: h, formatValue: s.Value.rem },
354
- values2: { values: ["auto"] },
355
- values3: { values: [] }
356
- },
357
- mr: {
358
- cssNames: ["margin-right"],
359
- values1: { values: h, formatValue: s.Value.rem },
360
- values2: { values: ["auto"] },
361
- values3: { values: [] }
362
- },
363
- mb: {
364
- cssNames: ["margin-bottom"],
365
- values1: { values: h, formatValue: s.Value.rem },
366
- values2: { values: ["auto"] },
367
- values3: { values: [] }
368
- },
369
- ml: {
370
- cssNames: ["margin-left"],
371
- values1: { values: h, formatValue: s.Value.rem },
372
- values2: { values: ["auto"] },
373
- values3: { values: [] }
374
- },
375
- p: {
376
- cssNames: ["padding"],
377
- values1: { values: h, formatValue: s.Value.rem },
378
- values2: { values: [] },
379
- values3: { values: [] }
380
- },
381
- px: {
382
- cssNames: ["padding-inline"],
383
- values1: { values: h, formatValue: s.Value.rem },
384
- values2: { values: [] },
385
- values3: { values: [] }
386
- },
387
- py: {
388
- cssNames: ["padding-block"],
389
- values1: { values: h, formatValue: s.Value.rem },
390
- values2: { values: [] },
391
- values3: { values: [] }
392
- },
393
- pt: {
394
- cssNames: ["padding-top"],
395
- values1: { values: h, formatValue: s.Value.rem },
396
- values2: { values: [] },
397
- values3: { values: [] }
398
- },
399
- pr: {
400
- cssNames: ["padding-right"],
401
- values1: { values: h, formatValue: s.Value.rem },
402
- values2: { values: [] },
403
- values3: { values: [] }
404
- },
405
- pb: {
406
- cssNames: ["padding-bottom"],
407
- values1: { values: h, formatValue: s.Value.rem },
408
- values2: { values: [] },
409
- values3: { values: [] }
410
- },
411
- pl: {
412
- cssNames: ["padding-left"],
413
- values1: { values: h, formatValue: s.Value.rem },
414
- values2: { values: [] },
415
- values3: { values: [] }
416
- },
417
- b: {
418
- cssNames: ["border-width"],
419
- values1: { values: c, formatValue: s.Value.px },
420
- values2: { values: [] },
421
- values3: { values: [] }
422
- },
423
- bx: {
424
- cssNames: ["border-inline-width"],
425
- values1: { values: h, formatValue: s.Value.px },
426
- values2: { values: [] },
427
- values3: { values: [] }
428
- },
429
- by: {
430
- cssNames: ["border-block-width"],
431
- values1: { values: h, formatValue: s.Value.px },
432
- values2: { values: [] },
433
- values3: { values: [] }
434
- },
435
- bt: {
436
- cssNames: ["border-top-width"],
437
- values1: { values: h, formatValue: s.Value.px },
438
- values2: { values: [] },
439
- values3: { values: [] }
440
- },
441
- br: {
442
- cssNames: ["border-right-width"],
443
- values1: { values: h, formatValue: s.Value.px },
444
- values2: { values: [] },
445
- values3: { values: [] }
446
- },
447
- bb: {
448
- cssNames: ["border-bottom-width"],
449
- values1: { values: h, formatValue: s.Value.px },
450
- values2: { values: [] },
451
- values3: { values: [] }
452
- },
453
- bl: {
454
- cssNames: ["border-left-width"],
455
- values1: { values: h, formatValue: s.Value.px },
456
- values2: { values: [] },
457
- values3: { values: [] }
458
- },
459
- borderStyle: {
460
- cssNames: ["border-style"],
461
- values1: { values: W },
462
- values2: { values: [] },
463
- values3: { values: [] }
464
- },
465
- borderRadius: {
466
- cssNames: ["border-radius"],
467
- values1: { values: c, formatValue: s.Value.rem },
468
- values2: { values: [] },
469
- values3: { values: [] }
470
- },
471
- borderRadiusTop: {
472
- cssNames: ["border-top-left-radius", "border-top-right-radius"],
473
- values1: { values: c, formatValue: s.Value.rem },
474
- values2: { values: [] },
475
- values3: { values: [] }
476
- },
477
- borderRadiusRight: {
478
- cssNames: ["border-top-right-radius", "border-bottom-right-radius"],
479
- values1: { values: c, formatValue: s.Value.rem },
480
- values2: { values: [] },
481
- values3: { values: [] }
482
- },
483
- borderRadiusBottom: {
484
- cssNames: ["border-bottom-left-radius", "border-bottom-right-radius"],
485
- values1: { values: c, formatValue: s.Value.rem },
486
- values2: { values: [] },
487
- values3: { values: [] }
488
- },
489
- borderRadiusLeft: {
490
- cssNames: ["border-top-left-radius", "border-bottom-left-radius"],
491
- values1: { values: c, formatValue: s.Value.rem },
492
- values2: { values: [] },
493
- values3: { values: [] }
494
- },
495
- borderRadiusTopLeft: {
496
- cssNames: ["border-top-left-radius"],
497
- values1: { values: c, formatValue: s.Value.rem },
498
- values2: { values: [] },
499
- values3: { values: [] }
500
- },
501
- borderRadiusTopRight: {
502
- cssNames: ["border-top-right-radius"],
503
- values1: { values: c, formatValue: s.Value.rem },
504
- values2: { values: [] },
505
- values3: { values: [] }
506
- },
507
- borderRadiusBottomLeft: {
508
- cssNames: ["border-bottom-left-radius"],
509
- values1: { values: c, formatValue: s.Value.rem },
510
- values2: { values: [] },
511
- values3: { values: [] }
512
- },
513
- borderRadiusBottomRight: {
514
- cssNames: ["border-bottom-right-radius"],
515
- values1: { values: c, formatValue: s.Value.rem },
516
- values2: { values: [] },
517
- values3: { values: [] }
518
- },
519
- cursor: {
520
- cssNames: ["cursor"],
521
- values1: {
119
+ ],
120
+ /** The border-bottom-width CSS property sets the width of the bottom border of an element. */
121
+ bb: [
122
+ {
123
+ values: 0,
124
+ styleName: "border-bottom-width",
125
+ valueFormat: c.Value.px
126
+ }
127
+ ],
128
+ /** The border-left-width CSS property sets the width of the left border of an element. */
129
+ bl: [
130
+ {
131
+ values: 0,
132
+ styleName: "border-left-width",
133
+ valueFormat: c.Value.px
134
+ }
135
+ ],
136
+ /** The border-style shorthand CSS property sets the line style for all four sides of an element's border. */
137
+ borderStyle: [
138
+ {
139
+ styleName: "border-style",
140
+ values: ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"]
141
+ }
142
+ ],
143
+ /** The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. */
144
+ borderRadius: [
145
+ {
146
+ styleName: "border-radius",
147
+ values: 0,
148
+ valueFormat: c.Value.rem
149
+ }
150
+ ],
151
+ /** The border-top-radius CSS property rounds the top corners of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
152
+ borderRadiusTop: [
153
+ {
154
+ values: 0,
155
+ styleName: "border-radius",
156
+ valueFormat: (e) => `${e / 4}rem ${e / 4}rem 0 0`
157
+ }
158
+ ],
159
+ /** The border-right-radius CSS property rounds the right corners of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
160
+ borderRadiusRight: [
161
+ {
162
+ values: 0,
163
+ styleName: "border-radius",
164
+ valueFormat: (e) => `0 ${e / 4}rem ${e / 4}rem 0`
165
+ }
166
+ ],
167
+ /** The border-bottom-radius CSS property rounds the bottom corners of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
168
+ borderRadiusBottom: [
169
+ {
170
+ values: 0,
171
+ styleName: "border-radius",
172
+ valueFormat: (e) => `0 0 ${e / 4}rem ${e / 4}rem`
173
+ }
174
+ ],
175
+ /** The border-left-radius CSS property rounds the left corners of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
176
+ borderRadiusLeft: [
177
+ {
178
+ values: 0,
179
+ styleName: "border-radius",
180
+ valueFormat: (e) => `${e / 4}rem 0 0 ${e / 4}rem`
181
+ }
182
+ ],
183
+ /** The border-top-left-radius CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
184
+ borderRadiusTopLeft: [
185
+ {
186
+ values: 0,
187
+ styleName: "border-radius",
188
+ valueFormat: (e) => `${e / 4}rem 0 0 0`
189
+ }
190
+ ],
191
+ /** The border-top-right-radius CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
192
+ borderRadiusTopRight: [
193
+ {
194
+ values: 0,
195
+ styleName: "border-radius",
196
+ valueFormat: (e) => `0 ${e / 4}rem 0 0`
197
+ }
198
+ ],
199
+ /** The border-bottom-right-radius CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
200
+ borderRadiusBottomRight: [
201
+ {
202
+ values: 0,
203
+ styleName: "border-radius",
204
+ valueFormat: (e) => `0 0 ${e / 4}rem 0`
205
+ }
206
+ ],
207
+ /** The border-bottom-left-radius CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
208
+ borderRadiusBottomLeft: [
209
+ {
210
+ values: 0,
211
+ styleName: "border-radius",
212
+ valueFormat: (e) => `0 0 0 ${e / 4}rem`
213
+ }
214
+ ],
215
+ /** The position CSS property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements. */
216
+ position: [
217
+ {
218
+ values: ["static", "relative", "absolute", "fixed", "sticky"]
219
+ }
220
+ ],
221
+ /** The top CSS property sets the vertical position of a positioned element. This inset property has no effect on non-positioned elements. */
222
+ top: [
223
+ {
224
+ values: 0,
225
+ valueFormat: c.Value.rem
226
+ }
227
+ ],
228
+ /** The right CSS property participates in specifying the horizontal position of a positioned element. This inset property has no effect on non-positioned elements. */
229
+ right: [
230
+ {
231
+ values: 0,
232
+ valueFormat: c.Value.rem
233
+ }
234
+ ],
235
+ /** The bottom CSS property participates in setting the vertical position of a positioned element. This inset property has no effect on non-positioned elements. */
236
+ bottom: [
237
+ {
238
+ values: 0,
239
+ valueFormat: c.Value.rem
240
+ }
241
+ ],
242
+ /** The left CSS property participates in specifying the horizontal position of a positioned element. This inset property has no effect on non-positioned elements. */
243
+ left: [
244
+ {
245
+ values: 0,
246
+ valueFormat: c.Value.rem
247
+ }
248
+ ],
249
+ /** The inset CSS property is a shorthand that corresponds to the top, right, bottom, and/or left properties. It has the same multi-value syntax of the margin shorthand. */
250
+ inset: [
251
+ {
252
+ values: 0,
253
+ valueFormat: c.Value.rem
254
+ }
255
+ ],
256
+ /** The `box-sizing` CSS property sets how the total width and height of an element is calculated. */
257
+ boxSizing: [
258
+ {
259
+ values: ["border-box", "content-box"],
260
+ styleName: "box-sizing"
261
+ }
262
+ ],
263
+ /** The content-visibility CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. It enables the user agent to skip an element's rendering work (including layout and painting) until it is needed — which makes the initial page load much faster. */
264
+ contentVisibility: [
265
+ {
266
+ values: ["visible", "hidden"],
267
+ styleName: "content-visibility"
268
+ }
269
+ ],
270
+ /** The cursor CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element. */
271
+ cursor: [
272
+ {
522
273
  values: [
523
274
  "auto",
524
275
  "default",
@@ -557,99 +308,26 @@ const c = [
557
308
  "grab",
558
309
  "grabbing"
559
310
  ]
560
- },
561
- values2: { values: [] },
562
- values3: { values: [] }
563
- },
564
- zIndex: {
565
- cssNames: ["z-index"],
566
- values1: {
567
- values: [1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105, 1e3, 1001, 1002, 1003, 1004, 1005]
568
- },
569
- values2: { values: [] },
570
- values3: { values: [] }
571
- },
572
- overflow: {
573
- cssNames: ["overflow"],
574
- values1: { values: R },
575
- values2: { values: [] },
576
- values3: { values: [] }
577
- },
578
- overflowX: {
579
- cssNames: ["overflow-x"],
580
- values1: { values: R },
581
- values2: { values: [] },
582
- values3: { values: [] }
583
- },
584
- overflowY: {
585
- cssNames: ["overflow-y"],
586
- values1: { values: R },
587
- values2: { values: [] },
588
- values3: { values: [] }
589
- },
590
- opacity: {
591
- cssNames: ["opacity"],
592
- values1: { values: [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1] },
593
- values2: { values: [] },
594
- values3: { values: [] }
595
- },
596
- fontSize: {
597
- cssNames: ["font-size"],
598
- values1: { values: c, formatValue: s.Value.px },
599
- values2: { values: ["inherit"] },
600
- values3: { values: [] }
601
- },
602
- fontStyle: {
603
- cssNames: ["font-style"],
604
- values1: { values: ["italic", "normal", "oblique"] },
605
- values2: { values: [] },
606
- values3: { values: [] }
607
- },
608
- fontWeight: {
609
- cssNames: ["font-weight"],
610
- values1: { values: [100, 200, 300, 400, 500, 600, 700, 800, 900] },
611
- values2: { values: [] },
612
- values3: { values: [] }
613
- },
614
- letterSpacing: {
615
- cssNames: ["letter-spacing"],
616
- values1: { values: c, formatValue: s.Value.px },
617
- values2: { values: [] },
618
- values3: { values: [] }
619
- },
620
- lineHeight: {
621
- cssNames: ["line-height"],
622
- values1: { values: c, formatValue: s.Value.px },
623
- values2: { values: ["font-size"], formatValue: () => "1" },
624
- values3: { values: [] }
625
- },
626
- textDecoration: {
627
- cssNames: ["text-decoration"],
628
- values1: { values: ["none", "underline", "overline", "line-through"] },
629
- values2: { values: [] },
630
- values3: { values: [] }
631
- },
632
- textTransform: {
633
- cssNames: ["text-transform"],
634
- values1: { values: ["none", "capitalize", "lowercase", "uppercase"] },
635
- values2: { values: [] },
636
- values3: { values: [] }
637
- },
638
- textAlign: {
639
- cssNames: ["text-align"],
640
- values1: { values: ["left", "right", "center", "justify"] },
641
- values2: { values: [] },
642
- values3: { values: [] }
643
- },
644
- flexWrap: {
645
- cssNames: ["flex-wrap"],
646
- values1: { values: ["nowrap", "wrap", "wrap-reverse"] },
647
- values2: { values: [] },
648
- values3: { values: [] }
649
- },
650
- jc: {
651
- cssNames: ["justify-content"],
652
- values1: {
311
+ }
312
+ ],
313
+ /** The `display` CSS property sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. */
314
+ display: [
315
+ {
316
+ values: ["none", "block", "inline-block", "flex", "inline-flex", "grid", "inline-grid", "contents"]
317
+ }
318
+ ],
319
+ /** The `inline` property is a shortcut to transform `block`, `flex` and `grid` value to `inline-block`, `inline-flex` and `inline-grid` respectively. */
320
+ inline: [
321
+ {
322
+ values: [!0],
323
+ styleName: "display",
324
+ valueFormat: () => "inline-block"
325
+ }
326
+ ],
327
+ /** The CSS justify-content property defines how the browser distributes space between and around content items along the main axis of a flex container and the inline axis of grid and multicol containers. */
328
+ jc: [
329
+ {
330
+ styleName: "justify-content",
653
331
  values: [
654
332
  "start",
655
333
  "end",
@@ -663,21 +341,19 @@ const c = [
663
341
  "space-evenly",
664
342
  "stretch"
665
343
  ]
666
- },
667
- values2: { values: [] },
668
- values3: { values: [] }
669
- },
670
- ai: {
671
- cssNames: ["align-items"],
672
- values1: {
344
+ }
345
+ ],
346
+ /** The CSS align-items property sets the align-self value on all direct children as a group. In flexbox, it controls the alignment of items on the cross axis. In grid layout, it controls the alignment of items on the block axis within their grid areas. */
347
+ ai: [
348
+ {
349
+ styleName: "align-items",
673
350
  values: ["stretch", "flex-start", "flex-end", "center", "baseline", "start", "end", "self-start", "self-end"]
674
- },
675
- values2: { values: [] },
676
- values3: { values: [] }
677
- },
678
- alignContent: {
679
- cssNames: ["align-content"],
680
- values1: {
351
+ }
352
+ ],
353
+ /** The CSS align-content property sets the distribution of space between and around content items along a flexbox's cross axis, or a grid or block-level element's block axis. */
354
+ alignContent: [
355
+ {
356
+ styleName: "align-content",
681
357
  values: [
682
358
  "flex-start",
683
359
  "flex-end",
@@ -690,595 +366,1158 @@ const c = [
690
366
  "end",
691
367
  "baseline"
692
368
  ]
369
+ }
370
+ ],
371
+ /** The flex CSS shorthand property sets flex to fit the space available in its flex container. */
372
+ flex1: [
373
+ {
374
+ styleName: "flex",
375
+ values: [!0],
376
+ valueFormat: () => "1"
377
+ }
378
+ ],
379
+ /** The flex-direction CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). */
380
+ d: [
381
+ {
382
+ styleName: "flex-direction",
383
+ values: ["row", "row-reverse", "column", "column-reverse"]
384
+ }
385
+ ],
386
+ /** The flex-wrap CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. */
387
+ flexWrap: [
388
+ {
389
+ styleName: "flex-wrap",
390
+ values: ["nowrap", "wrap", "wrap-reverse"]
391
+ }
392
+ ],
393
+ /** The flex-grow CSS property sets the flex grow factor, which specifies how much of the flex container's positive free space, if any, should be assigned to the flex item's main size. */
394
+ flexGrow: [
395
+ {
396
+ styleName: "flex-grow",
397
+ values: 0
398
+ }
399
+ ],
400
+ /** The flex-shrink CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, the flex items can shrink to fit according to their flex-shrink value. Each flex line's negative free space is distributed between the line's flex items that have a flex-shrink value greater than 0. */
401
+ flexShrink: [
402
+ {
403
+ styleName: "flex-shrink",
404
+ values: 0
405
+ }
406
+ ],
407
+ /** The align-self CSS property overrides a grid or flex item's align-items value. In grid, it aligns the item inside the grid area. In flexbox, it aligns the item on the cross axis. */
408
+ alignSelf: [
409
+ {
410
+ styleName: "align-self",
411
+ values: ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"]
412
+ }
413
+ ],
414
+ /** The CSS justify-self property sets the way a box is justified inside its alignment container along the appropriate axis. */
415
+ justifySelf: [
416
+ {
417
+ styleName: "justify-self",
418
+ values: ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"]
419
+ }
420
+ ],
421
+ /** The font-size CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative <length> units, such as em, ex, and so forth. */
422
+ fontSize: [
423
+ {
424
+ styleName: "font-size",
425
+ values: 0,
426
+ valueFormat: c.Value.px
693
427
  },
694
- values2: { values: [] },
695
- values3: { values: [] }
696
- },
697
- flex1: {
698
- cssNames: ["flex"],
699
- values1: { values: [!0], formatValue: () => "1" },
700
- values2: { values: [] },
701
- values3: { values: [] }
702
- },
703
- d: {
704
- cssNames: ["flex-direction"],
705
- values1: { values: ["row", "row-reverse", "column", "column-reverse"] },
706
- values2: { values: [] },
707
- values3: { values: [] }
708
- },
709
- gap: {
710
- cssNames: ["gap"],
711
- values1: { values: c, formatValue: s.Value.rem },
712
- values2: { values: [] },
713
- values3: { values: [] }
714
- },
715
- rowGap: {
716
- cssNames: ["row-gap"],
717
- values1: { values: c, formatValue: s.Value.rem },
718
- values2: { values: [] },
719
- values3: { values: [] }
720
- },
721
- columnGap: {
722
- cssNames: ["column-gap"],
723
- values1: { values: c, formatValue: s.Value.rem },
724
- values2: { values: [] },
725
- values3: { values: [] }
726
- },
727
- order: {
728
- cssNames: ["order"],
729
- values1: { values: c },
730
- values2: { values: [] },
731
- values3: { values: [] }
732
- },
733
- flexGrow: {
734
- cssNames: ["flex-grow"],
735
- values1: { values: c },
736
- values2: { values: [] },
737
- values3: { values: [] }
738
- },
739
- flexShrink: {
740
- cssNames: ["flex-shrink"],
741
- values1: { values: c },
742
- values2: { values: [] },
743
- values3: { values: [] }
744
- },
745
- alignSelf: {
746
- cssNames: ["align-self"],
747
- values1: { values: F },
748
- values2: { values: [] },
749
- values3: { values: [] }
750
- },
751
- justifySelf: {
752
- cssNames: ["justify-self"],
753
- values1: { values: F },
754
- values2: { values: [] },
755
- values3: { values: [] }
756
- },
757
- gridColumns: {
758
- cssNames: ["grid-template-columns"],
759
- values1: { values: c, formatValue: s.Value.gridColumns },
760
- values2: { values: [] },
761
- values3: { values: [] }
762
- },
763
- colSpan: {
764
- cssNames: ["grid-column"],
765
- values1: { values: c, formatValue: s.Value.gridColumn },
766
- values2: { values: ["full-row"], formatValue: s.Value.gridColumn },
767
- values3: { values: [] }
768
- },
769
- colStart: {
770
- cssNames: ["grid-column-start"],
771
- values1: { values: c },
772
- values2: { values: [] },
773
- values3: { values: [] }
774
- },
775
- colEnd: {
776
- cssNames: ["grid-column-end"],
777
- values1: { values: c },
778
- values2: { values: [] },
779
- values3: { values: [] }
780
- },
781
- outline: {
782
- cssNames: ["outline-width"],
783
- values1: { values: c, formatValue: s.Value.px },
784
- values2: { values: [] },
785
- values3: { values: [] }
786
- },
787
- outlineStyle: {
788
- cssNames: ["outline-style"],
789
- values1: { values: W },
790
- values2: { values: [] },
791
- values3: { values: [] }
792
- },
793
- outlineOffset: {
794
- cssNames: ["outline-offset"],
795
- values1: { values: c, formatValue: s.Value.px },
796
- values2: { values: [] },
797
- values3: { values: [] }
798
- },
799
- transition: {
800
- cssNames: ["transition-property"],
801
- values1: { values: ["none", "all"] },
802
- values2: { values: [] },
803
- values3: { values: [] }
804
- },
805
- transitionDuration: {
806
- cssNames: ["transition-duration"],
807
- values1: {
428
+ {
429
+ styleName: "font-size",
430
+ values: ["inherit"]
431
+ }
432
+ ],
433
+ /** The font-style CSS property sets whether a font should be styled with a normal, italic, or oblique face from its font-family. */
434
+ fontStyle: [
435
+ {
436
+ styleName: "font-style",
437
+ values: ["italic", "normal", "oblique"]
438
+ }
439
+ ],
440
+ /** The font-weight CSS property sets the weight (or boldness) of the font. The weights available depend on the font-family that is currently set. */
441
+ fontWeight: [
442
+ {
443
+ styleName: "font-weight",
444
+ values: [100, 200, 300, 400, 500, 600, 700, 800, 900]
445
+ }
446
+ ],
447
+ /** The gap CSS shorthand property sets the gaps (also called gutters) between rows and columns. This property applies to multi-column, flex, and grid containers. */
448
+ gap: [
449
+ {
450
+ values: 0,
451
+ valueFormat: c.Value.rem
452
+ }
453
+ ],
454
+ /** The row-gap CSS property sets the size of the gap (gutter) between an element's rows. */
455
+ rowGap: [
456
+ {
457
+ styleName: "row-gap",
458
+ values: 0,
459
+ valueFormat: c.Value.rem
460
+ }
461
+ ],
462
+ /** The column-gap CSS property sets the size of the gap (gutter) between an element's columns. */
463
+ columnGap: [
464
+ {
465
+ styleName: "column-gap",
466
+ values: 0,
467
+ valueFormat: c.Value.rem
468
+ }
469
+ ],
470
+ /** The order CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending order value and then by their source code order. Items not given an explicit order value are assigned the default value of 0. */
471
+ order: [
472
+ {
473
+ styleName: "order",
474
+ values: 0
475
+ }
476
+ ],
477
+ /** The height CSS property specifies the height of an element. By default, the property defines the height of the content area. If box-sizing is set to border-box, however, it instead determines the height of the border area. */
478
+ height: [
479
+ { values: 0, valueFormat: (e) => `${e / 4}rem` },
480
+ {
481
+ values: ["fit"],
482
+ valueFormat: () => "100%"
483
+ },
484
+ {
485
+ values: ["fit-screen"],
486
+ valueFormat: () => "100vh"
487
+ },
488
+ {
489
+ values: [
490
+ "1/2",
491
+ "1/3",
492
+ "2/3",
493
+ "1/4",
494
+ "2/4",
495
+ "3/4",
496
+ "1/5",
497
+ "2/5",
498
+ "3/5",
499
+ "4/5",
500
+ "1/6",
501
+ "2/6",
502
+ "3/6",
503
+ "4/6",
504
+ "5/6",
505
+ "1/12",
506
+ "2/12",
507
+ "3/12",
508
+ "4/12",
509
+ "5/12",
510
+ "6/12",
511
+ "7/12",
512
+ "8/12",
513
+ "9/12",
514
+ "10/12",
515
+ "11/12"
516
+ ],
517
+ valueFormat: (e) => {
518
+ const [t, a] = e.split("/");
519
+ return `${+t / +a * 100}%`;
520
+ }
521
+ },
522
+ {
523
+ values: ["auto", "fit-content", "max-content", "min-content"]
524
+ }
525
+ ],
526
+ /** The min-height CSS property sets the minimum height of an element. It prevents the used value of the height property from becoming smaller than the value specified for min-height. */
527
+ minHeight: [
528
+ { styleName: "min-height", values: 0, valueFormat: (e) => `${e / 4}rem` },
529
+ {
530
+ styleName: "min-height",
531
+ values: ["fit"],
532
+ valueFormat: () => "100%"
533
+ },
534
+ {
535
+ styleName: "min-height",
536
+ values: ["fit-screen"],
537
+ valueFormat: () => "100vh"
538
+ },
539
+ {
540
+ styleName: "min-height",
541
+ values: [
542
+ "1/2",
543
+ "1/3",
544
+ "2/3",
545
+ "1/4",
546
+ "2/4",
547
+ "3/4",
548
+ "1/5",
549
+ "2/5",
550
+ "3/5",
551
+ "4/5",
552
+ "1/6",
553
+ "2/6",
554
+ "3/6",
555
+ "4/6",
556
+ "5/6",
557
+ "1/12",
558
+ "2/12",
559
+ "3/12",
560
+ "4/12",
561
+ "5/12",
562
+ "6/12",
563
+ "7/12",
564
+ "8/12",
565
+ "9/12",
566
+ "10/12",
567
+ "11/12"
568
+ ],
569
+ valueFormat: (e) => {
570
+ const [t, a] = e.split("/");
571
+ return `${+t / +a * 100}%`;
572
+ }
573
+ },
574
+ {
575
+ styleName: "min-height",
576
+ values: ["auto", "fit-content", "max-content", "min-content"]
577
+ }
578
+ ],
579
+ /** The max-height CSS property sets the maximum height of an element. It prevents the used value of the height property from becoming larger than the value specified for max-height. */
580
+ maxHeight: [
581
+ { styleName: "max-height", values: 0, valueFormat: (e) => `${e / 4}rem` },
582
+ {
583
+ styleName: "max-height",
584
+ values: ["fit"],
585
+ valueFormat: () => "100%"
586
+ },
587
+ {
588
+ styleName: "max-height",
589
+ values: ["fit-screen"],
590
+ valueFormat: () => "100vh"
591
+ },
592
+ {
593
+ styleName: "max-height",
594
+ values: [
595
+ "1/2",
596
+ "1/3",
597
+ "2/3",
598
+ "1/4",
599
+ "2/4",
600
+ "3/4",
601
+ "1/5",
602
+ "2/5",
603
+ "3/5",
604
+ "4/5",
605
+ "1/6",
606
+ "2/6",
607
+ "3/6",
608
+ "4/6",
609
+ "5/6",
610
+ "1/12",
611
+ "2/12",
612
+ "3/12",
613
+ "4/12",
614
+ "5/12",
615
+ "6/12",
616
+ "7/12",
617
+ "8/12",
618
+ "9/12",
619
+ "10/12",
620
+ "11/12"
621
+ ],
622
+ valueFormat: (e) => {
623
+ const [t, a] = e.split("/");
624
+ return `${+t / +a * 100}%`;
625
+ }
626
+ },
627
+ {
628
+ styleName: "max-height",
629
+ values: ["auto", "fit-content", "max-content", "min-content"]
630
+ }
631
+ ],
632
+ /** The width CSS property sets an element's width. By default, it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area. */
633
+ width: [
634
+ { values: 0, valueFormat: (e) => `${e / 4}rem` },
635
+ {
636
+ values: ["fit"],
637
+ valueFormat: () => "100%"
638
+ },
639
+ {
640
+ values: ["fit-screen"],
641
+ valueFormat: () => "100vw"
642
+ },
643
+ {
644
+ values: [
645
+ "1/2",
646
+ "1/3",
647
+ "2/3",
648
+ "1/4",
649
+ "2/4",
650
+ "3/4",
651
+ "1/5",
652
+ "2/5",
653
+ "3/5",
654
+ "4/5",
655
+ "1/6",
656
+ "2/6",
657
+ "3/6",
658
+ "4/6",
659
+ "5/6",
660
+ "1/12",
661
+ "2/12",
662
+ "3/12",
663
+ "4/12",
664
+ "5/12",
665
+ "6/12",
666
+ "7/12",
667
+ "8/12",
668
+ "9/12",
669
+ "10/12",
670
+ "11/12"
671
+ ],
672
+ valueFormat: (e) => {
673
+ const [t, a] = e.split("/");
674
+ return `${+t / +a * 100}%`;
675
+ }
676
+ },
677
+ {
678
+ values: ["auto", "fit-content", "max-content", "min-content"]
679
+ }
680
+ ],
681
+ /** The min-width CSS property sets the minimum width of an element. It prevents the used value of the width property from becoming smaller than the value specified for min-width. */
682
+ minWidth: [
683
+ { styleName: "min-width", values: 0, valueFormat: (e) => `${e / 4}rem` },
684
+ {
685
+ styleName: "min-width",
686
+ values: ["fit"],
687
+ valueFormat: () => "100%"
688
+ },
689
+ {
690
+ styleName: "min-width",
691
+ values: ["fit-screen"],
692
+ valueFormat: () => "100vw"
693
+ },
694
+ {
695
+ styleName: "min-width",
696
+ values: [
697
+ "1/2",
698
+ "1/3",
699
+ "2/3",
700
+ "1/4",
701
+ "2/4",
702
+ "3/4",
703
+ "1/5",
704
+ "2/5",
705
+ "3/5",
706
+ "4/5",
707
+ "1/6",
708
+ "2/6",
709
+ "3/6",
710
+ "4/6",
711
+ "5/6",
712
+ "1/12",
713
+ "2/12",
714
+ "3/12",
715
+ "4/12",
716
+ "5/12",
717
+ "6/12",
718
+ "7/12",
719
+ "8/12",
720
+ "9/12",
721
+ "10/12",
722
+ "11/12"
723
+ ],
724
+ valueFormat: (e) => {
725
+ const [t, a] = e.split("/");
726
+ return `${+t / +a * 100}%`;
727
+ }
728
+ },
729
+ {
730
+ styleName: "min-width",
731
+ values: ["auto", "fit-content", "max-content", "min-content"]
732
+ }
733
+ ],
734
+ /** The max-width CSS property sets the maximum width of an element. It prevents the used value of the width property from becoming larger than the value specified by max-width. */
735
+ maxWidth: [
736
+ { styleName: "max-width", values: 0, valueFormat: (e) => `${e / 4}rem` },
737
+ {
738
+ styleName: "max-width",
739
+ values: ["fit"],
740
+ valueFormat: () => "100%"
741
+ },
742
+ {
743
+ styleName: "max-width",
744
+ values: ["fit-screen"],
745
+ valueFormat: () => "100vw"
746
+ },
747
+ {
748
+ styleName: "max-width",
749
+ values: [
750
+ "1/2",
751
+ "1/3",
752
+ "2/3",
753
+ "1/4",
754
+ "2/4",
755
+ "3/4",
756
+ "1/5",
757
+ "2/5",
758
+ "3/5",
759
+ "4/5",
760
+ "1/6",
761
+ "2/6",
762
+ "3/6",
763
+ "4/6",
764
+ "5/6",
765
+ "1/12",
766
+ "2/12",
767
+ "3/12",
768
+ "4/12",
769
+ "5/12",
770
+ "6/12",
771
+ "7/12",
772
+ "8/12",
773
+ "9/12",
774
+ "10/12",
775
+ "11/12"
776
+ ],
777
+ valueFormat: (e) => {
778
+ const [t, a] = e.split("/");
779
+ return `${+t / +a * 100}%`;
780
+ }
781
+ },
782
+ {
783
+ styleName: "max-width",
784
+ values: ["auto", "fit-content", "max-content", "min-content"]
785
+ }
786
+ ],
787
+ /** The letter-spacing CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of letter-spacing causes characters to spread farther apart, while negative values of letter-spacing bring characters closer together. */
788
+ letterSpacing: [
789
+ {
790
+ styleName: "letter-spacing",
791
+ values: 0,
792
+ valueFormat: c.Value.px
793
+ }
794
+ ],
795
+ /** The line-height CSS property sets the height of a line box in horizontal writing modes. In vertical writing modes, it sets the width of a line box. It's commonly used to set the distance between lines of text. On block-level elements in horizontal writing modes, it specifies the preferred height of line boxes within the element, and on non-replaced inline elements, it specifies the height that is used to calculate line box height. */
796
+ lineHeight: [
797
+ {
798
+ styleName: "line-height",
799
+ values: 0,
800
+ valueFormat: c.Value.px
801
+ },
802
+ {
803
+ styleName: "line-height",
804
+ values: ["font-size"],
805
+ valueFormat: (e) => "1"
806
+ }
807
+ ],
808
+ /** The list-style CSS shorthand property allows you to set all the list style properties at once. */
809
+ listStyle: [
810
+ {
811
+ styleName: "list-style",
812
+ values: ["square", "inside", "outside", "none"]
813
+ }
814
+ ],
815
+ /** The margin CSS shorthand property sets the margin area on all four sides of an element. */
816
+ m: [
817
+ {
818
+ values: 0,
819
+ styleName: "margin",
820
+ valueFormat: c.Value.rem
821
+ },
822
+ {
823
+ values: ["auto"],
824
+ styleName: "margin"
825
+ }
826
+ ],
827
+ /** The margin-inline CSS shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. */
828
+ mx: [
829
+ {
830
+ values: 0,
831
+ styleName: "margin-inline",
832
+ valueFormat: c.Value.rem
833
+ },
834
+ {
835
+ values: ["auto"],
836
+ styleName: "margin-inline"
837
+ }
838
+ ],
839
+ /** The margin-block CSS shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. */
840
+ my: [
841
+ {
842
+ values: 0,
843
+ styleName: "margin-block",
844
+ valueFormat: c.Value.rem
845
+ },
846
+ {
847
+ values: ["auto"],
848
+ styleName: "margin-block"
849
+ }
850
+ ],
851
+ /** The margin-top CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. */
852
+ mt: [
853
+ {
854
+ values: 0,
855
+ styleName: "margin-top",
856
+ valueFormat: c.Value.rem
857
+ },
858
+ {
859
+ values: ["auto"],
860
+ styleName: "margin-top"
861
+ }
862
+ ],
863
+ /** The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. */
864
+ mr: [
865
+ {
866
+ values: 0,
867
+ styleName: "margin-right",
868
+ valueFormat: c.Value.rem
869
+ },
870
+ {
871
+ values: ["auto"],
872
+ styleName: "margin-right"
873
+ }
874
+ ],
875
+ /** The margin-bottom CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. */
876
+ mb: [
877
+ {
878
+ values: 0,
879
+ styleName: "margin-bottom",
880
+ valueFormat: c.Value.rem
881
+ },
882
+ {
883
+ values: ["auto"],
884
+ styleName: "margin-bottom"
885
+ }
886
+ ],
887
+ /** The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. */
888
+ ml: [
889
+ {
890
+ values: 0,
891
+ styleName: "margin-left",
892
+ valueFormat: c.Value.rem
893
+ },
894
+ {
895
+ values: ["auto"],
896
+ styleName: "margin-left"
897
+ }
898
+ ],
899
+ /** The padding CSS shorthand property sets the padding area on all four sides of an element at once. */
900
+ p: [
901
+ {
902
+ values: 0,
903
+ styleName: "padding",
904
+ valueFormat: c.Value.rem
905
+ }
906
+ ],
907
+ /** The padding-inline CSS shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. */
908
+ px: [
909
+ {
910
+ values: 0,
911
+ styleName: "padding-inline",
912
+ valueFormat: c.Value.rem
913
+ }
914
+ ],
915
+ /** The padding-block CSS shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. */
916
+ py: [
917
+ {
918
+ values: 0,
919
+ styleName: "padding-block",
920
+ valueFormat: c.Value.rem
921
+ }
922
+ ],
923
+ /** The padding-top CSS property sets the height of the padding area on the top of an element. */
924
+ pt: [
925
+ {
926
+ values: 0,
927
+ styleName: "padding-top",
928
+ valueFormat: c.Value.rem
929
+ }
930
+ ],
931
+ /** The padding-right CSS property sets the width of the padding area on the right of an element. */
932
+ pr: [
933
+ {
934
+ values: 0,
935
+ styleName: "padding-right",
936
+ valueFormat: c.Value.rem
937
+ }
938
+ ],
939
+ /** The padding-bottom CSS property sets the height of the padding area on the bottom of an element. */
940
+ pb: [
941
+ {
942
+ values: 0,
943
+ styleName: "padding-bottom",
944
+ valueFormat: c.Value.rem
945
+ }
946
+ ],
947
+ /** The padding-left CSS property sets the width of the padding area to the left of an element. */
948
+ pl: [
949
+ {
950
+ values: 0,
951
+ styleName: "padding-left",
952
+ valueFormat: c.Value.rem
953
+ }
954
+ ],
955
+ /** The object-fit CSS property sets how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container. */
956
+ objectFit: [
957
+ {
958
+ styleName: "object-fit",
959
+ values: ["fill", "contain", "cover", "scale-down", "none"]
960
+ }
961
+ ],
962
+ /** The opacity CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. */
963
+ opacity: [
964
+ {
965
+ values: [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]
966
+ }
967
+ ],
968
+ /** The CSS outline-width property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the border. */
969
+ outline: [
970
+ {
971
+ styleName: "outline-width",
972
+ values: 0,
973
+ valueFormat: c.Value.px
974
+ }
975
+ ],
976
+ /** The outline-style CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the border. */
977
+ outlineStyle: [
978
+ {
979
+ styleName: "outline-style",
980
+ values: ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"]
981
+ }
982
+ ],
983
+ /** The outline-offset CSS property sets the amount of space between an outline and the edge or border of an element. */
984
+ outlineOffset: [
985
+ {
986
+ styleName: "outline-offset",
987
+ values: 0,
988
+ valueFormat: c.Value.px
989
+ }
990
+ ],
991
+ /** The overflow CSS shorthand property sets the desired behavior when content does not fit in the element's padding box (overflows) in the horizontal and/or vertical direction. */
992
+ overflow: [
993
+ {
994
+ values: ["auto", "hidden", "scroll", "visible"]
995
+ }
996
+ ],
997
+ /** The overflow-x CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. This property may also be set by using the overflow shorthand property. */
998
+ overflowX: [
999
+ {
1000
+ styleName: "overflow-x",
1001
+ values: ["auto", "hidden", "scroll", "visible"]
1002
+ }
1003
+ ],
1004
+ /** The overflow-y CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. This property may also be set by using the overflow shorthand property. */
1005
+ overflowY: [
1006
+ {
1007
+ styleName: "overflow-y",
1008
+ values: ["auto", "hidden", "scroll", "visible"]
1009
+ }
1010
+ ],
1011
+ /** The pointer-events CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. */
1012
+ pointerEvents: [
1013
+ {
1014
+ styleName: "pointer-events",
1015
+ values: ["none", "auto", "all"]
1016
+ }
1017
+ ],
1018
+ /** The resize CSS property sets whether an element is resizable, and if so, in which directions. */
1019
+ resize: [
1020
+ {
1021
+ values: ["none", "both", "horizontal", "vertical", "block", "inline"]
1022
+ }
1023
+ ],
1024
+ /** The rotate CSS property allows you to specify rotation transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform property. */
1025
+ rotate: [
1026
+ {
1027
+ values: [0, 90, 180, 270, -90, -180, -270],
1028
+ valueFormat: (e) => `${e}deg`
1029
+ }
1030
+ ],
1031
+ flip: [
1032
+ {
1033
+ styleName: "scale",
1034
+ values: ["xAxis", "yAxis"],
1035
+ valueFormat: (e) => e === "xAxis" ? "-1 1" : "1 -1"
1036
+ }
1037
+ ],
1038
+ /** The text-align CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box. This means it works like vertical-align but in the horizontal direction. */
1039
+ textAlign: [
1040
+ {
1041
+ styleName: "text-align",
1042
+ values: ["left", "right", "center", "justify"]
1043
+ }
1044
+ ],
1045
+ /** The text-decoration shorthand CSS property sets the appearance of decorative lines on text. It is a shorthand for text-decoration-line, text-decoration-color, text-decoration-style, and the newer text-decoration-thickness property. */
1046
+ textDecoration: [
1047
+ {
1048
+ styleName: "text-decoration",
1049
+ values: ["none", "underline", "overline", "line-through"]
1050
+ }
1051
+ ],
1052
+ /** The text-overflow CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('…'), or display a custom string. */
1053
+ textOverflow: [
1054
+ {
1055
+ styleName: "text-overflow",
1056
+ values: ["clip", "ellipsis"]
1057
+ }
1058
+ ],
1059
+ /** The text-transform CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby. */
1060
+ textTransform: [
1061
+ {
1062
+ styleName: "text-transform",
1063
+ values: ["none", "capitalize", "lowercase", "uppercase"]
1064
+ }
1065
+ ],
1066
+ /** The text-wrap CSS shorthand property controls how text inside an element is wrapped. The different values provide: */
1067
+ textWrap: [
1068
+ {
1069
+ styleName: "text-wrap",
1070
+ values: ["wrap", "nowrap", "balance", "pretty"]
1071
+ }
1072
+ ],
1073
+ /** The transition-property CSS property sets the CSS properties to which a transition effect should be applied. */
1074
+ transition: [
1075
+ {
1076
+ styleName: "transition-property",
1077
+ values: ["none", "all"]
1078
+ }
1079
+ ],
1080
+ /** The transition-duration CSS property sets the length of time a transition animation should take to complete. By default, the value is 0s, meaning that no animation will occur. */
1081
+ transitionDuration: [
1082
+ {
1083
+ styleName: "transition-duration",
808
1084
  values: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1e3],
809
- formatValue: s.Value.ms
1085
+ valueFormat: (e) => `${e}ms`
1086
+ }
1087
+ ],
1088
+ /** The user-select CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. */
1089
+ userSelect: [
1090
+ {
1091
+ styleName: "user-select",
1092
+ values: ["none", "auto", "text", "all"]
1093
+ }
1094
+ ],
1095
+ /** The visibility CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a <table>. */
1096
+ visibility: [
1097
+ {
1098
+ styleName: "visibility",
1099
+ values: ["visible", "hidden", "collapse"]
1100
+ }
1101
+ ],
1102
+ /** The white-space CSS property sets how white space inside an element is handled. */
1103
+ whiteSpace: [
1104
+ {
1105
+ styleName: "white-space",
1106
+ values: ["break-spaces", "normal", "nowrap", "pre", "pre-line", "pre-wrap"]
1107
+ }
1108
+ ],
1109
+ /** The z-index CSS property sets the z-order of a positioned element and its descendants or flex and grid items. Overlapping elements with a larger z-index cover those with a smaller one. */
1110
+ zIndex: [
1111
+ {
1112
+ styleName: "z-index",
1113
+ values: [1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105, 1e3, 1001, 1002, 1003, 1004, 1005]
1114
+ }
1115
+ ],
1116
+ /** The grid-template-columns CSS property defines the line names and track sizing functions of the grid columns. */
1117
+ gridTemplateColumns: [
1118
+ {
1119
+ styleName: "grid-template-columns",
1120
+ values: 0,
1121
+ valueFormat: (e) => `repeat(${e},minmax(0,1fr))`
810
1122
  },
811
- values2: { values: [] },
812
- values3: { values: [] }
813
- },
814
- userSelect: {
815
- cssNames: ["user-select"],
816
- values1: { values: ["none", "auto", "text", "all"] },
817
- values2: { values: [] },
818
- values3: { values: [] }
819
- },
820
- appearance: {
821
- cssNames: ["appearance"],
822
- values1: { values: ["none", "auto", "menulist-button", "textfield", "button", "checkbox"] },
823
- values2: { values: [] },
824
- values3: { values: [] }
825
- },
826
- pointerEvents: {
827
- cssNames: ["pointer-events"],
828
- values1: { values: ["none", "auto", "all"] },
829
- values2: { values: [] },
830
- values3: { values: [] }
831
- },
832
- whiteSpace: {
833
- cssNames: ["white-space"],
834
- values1: { values: ["break-spaces", "normal", "nowrap", "pre", "pre-line", "pre-wrap"] },
835
- values2: { values: [] },
836
- values3: { values: [] }
837
- },
838
- textOverflow: {
839
- cssNames: ["text-overflow"],
840
- values1: { values: ["clip", "ellipsis"] },
841
- values2: { values: [] },
842
- values3: { values: [] }
843
- },
844
- rotate: {
845
- cssNames: ["rotate"],
846
- values1: { values: [0, 90, 180, 270, -90, -180, -270], formatValue: s.Value.rotate },
847
- values2: { values: [] },
848
- values3: { values: [] }
849
- },
850
- flip: {
851
- cssNames: ["scale"],
852
- values1: { values: ["xAxis", "yAxis"], formatValue: s.Value.flip },
853
- values2: { values: [] },
854
- values3: { values: [] }
855
- },
856
- visibility: {
857
- cssNames: ["visibility"],
858
- values1: { values: ["visible", "hidden", "collapse"] },
859
- values2: { values: [] },
860
- values3: { values: [] }
861
- },
862
- resize: {
863
- cssNames: ["resize"],
864
- values1: { values: ["none", "both", "horizontal", "vertical", "block", "inline"] },
865
- values2: { values: [] },
866
- values3: { values: [] }
867
- }
868
- }, q = {
869
- shadow: { cssNames: ["box-shadow"], formatValue: s.Value.variables("shadow") },
870
- background: { cssNames: ["background"], formatValue: s.Value.variables("background") },
871
- backgroundImage: { cssNames: ["background-image"], formatValue: s.Value.variables("backgroundImage") },
872
- color: { cssNames: ["color"], formatValue: s.Value.variables("color") },
873
- bgColor: { cssNames: ["background-color"], formatValue: s.Value.variables("color") },
874
- borderColor: { cssNames: ["border-color"], formatValue: s.Value.variables("color") },
875
- outlineColor: { cssNames: ["outline-color"], formatValue: s.Value.variables("color") }
876
- }, K = {
877
- fill: {
878
- cssNames: ["fill"],
879
- formatValue: s.Value.svgVariables("color"),
880
- formatSelector: s.ClassName.svg
881
- },
882
- stroke: {
883
- cssNames: ["stroke"],
884
- formatValue: s.Value.svgVariables("color"),
885
- formatSelector: s.ClassName.svg
886
- }
887
- }, ue = ["disabledGroup", "hoverGroup", "focusGroup", "activeGroup"], H = [
888
- "hover",
889
- "focus",
890
- "hasFocus",
891
- "active",
892
- "checked",
893
- "hasChecked",
894
- "indeterminate",
895
- "valid",
896
- "hasValid",
897
- "invalid",
898
- "hasInvalid",
899
- "required",
900
- "optional",
901
- "disabled",
902
- "hasDisabled"
903
- ], B = ["sm", "md", "lg", "xl", "xxl"], te = {
1123
+ {
1124
+ styleName: "grid-template-columns",
1125
+ values: ["subgrid"]
1126
+ }
1127
+ ],
1128
+ /** The grid-template-rows CSS property defines the line names and track sizing functions of the grid rows. */
1129
+ gridTemplateRows: [
1130
+ {
1131
+ styleName: "grid-template-rows",
1132
+ values: 0,
1133
+ valueFormat: (e) => `repeat(${e},minmax(0,1fr))`
1134
+ },
1135
+ {
1136
+ styleName: "grid-template-rows",
1137
+ values: ["subgrid"]
1138
+ }
1139
+ ],
1140
+ /** The grid-column CSS shorthand property specifies a grid item's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. */
1141
+ gridColumn: [
1142
+ {
1143
+ styleName: "grid-column",
1144
+ values: 0,
1145
+ valueFormat: (e) => `span ${e}/span ${e}`
1146
+ },
1147
+ {
1148
+ styleName: "grid-column",
1149
+ values: ["full-row"],
1150
+ valueFormat: () => "1/-1"
1151
+ }
1152
+ ],
1153
+ /** The grid-column-start CSS property specifies a grid item's start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. */
1154
+ gridColumnStart: [
1155
+ {
1156
+ styleName: "grid-column-start",
1157
+ values: 0
1158
+ }
1159
+ ],
1160
+ /** The grid-column-end CSS property specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. */
1161
+ gridColumnEnd: [
1162
+ {
1163
+ styleName: "grid-column-end",
1164
+ values: 0
1165
+ }
1166
+ ],
1167
+ /** The grid-row CSS shorthand property specifies a grid item's size and location within a grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. */
1168
+ gridRow: [
1169
+ {
1170
+ styleName: "grid-row",
1171
+ values: 0,
1172
+ valueFormat: (e) => `span ${e}/span ${e}`
1173
+ },
1174
+ {
1175
+ styleName: "grid-row",
1176
+ values: ["full-column"],
1177
+ valueFormat: () => "1/-1"
1178
+ }
1179
+ ],
1180
+ /** The grid-row-start CSS property specifies a grid item's start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. */
1181
+ gridRowStart: [
1182
+ {
1183
+ styleName: "grid-row-start",
1184
+ values: 0
1185
+ }
1186
+ ],
1187
+ /** The grid-row-end CSS property specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. */
1188
+ gridRowEnd: [
1189
+ {
1190
+ styleName: "grid-row-end",
1191
+ values: 0
1192
+ }
1193
+ ]
1194
+ }, ee = {
1195
+ hover: ":hover",
1196
+ focus: ":focus-within",
1197
+ hasFocus: ":has(:focus)",
1198
+ active: ":active",
1199
+ valid: ":user-valid",
1200
+ hasValid: ":has(:valid)",
1201
+ invalid: ":user-invalid",
1202
+ hasInvalid: ":has(:user-invalid)",
1203
+ optional: ":optional",
1204
+ hasChecked: ":has(:checked)",
1205
+ hasRequired: ":has(:required)",
1206
+ hasDisabled: ":has([disabled])"
1207
+ }, C = {
1208
+ indeterminate: ":indeterminate",
1209
+ checked: ":checked",
1210
+ required: ":required",
1211
+ disabled: "[disabled]"
1212
+ }, M = { ...ee, ...C }, te = Object.entries(M).reduce(
1213
+ (e, [t], a) => (e[t] = Math.pow(2, a), e),
1214
+ {}
1215
+ ), D = Object.entries(M).reduce(
1216
+ (e, [t]) => {
1217
+ const a = te[t];
1218
+ return Object.entries(e).forEach(([u, m]) => {
1219
+ e[+u + a] = [...m, t];
1220
+ }), e;
1221
+ },
1222
+ { 0: [] }
1223
+ ), H = {
1224
+ hoverGroup: "hover",
1225
+ focusGroup: "focus",
1226
+ activeGroup: "active"
1227
+ }, A = {
904
1228
  sm: 640,
905
1229
  md: 768,
906
1230
  lg: 1024,
907
1231
  xl: 1280,
908
1232
  xxl: 1536
909
1233
  };
910
- function Y() {
911
- const e = { ...le };
912
- Object.keys(q).forEach((u) => {
913
- e[u] = q[u], e[u].isThemeStyle = !0;
914
- }), Object.keys(K).forEach((u) => {
915
- e[u] = K[u], e[u].isThemeStyle = !0;
916
- });
917
- let l = Object.keys(e);
918
- return H.forEach((u) => {
919
- l.forEach((n) => {
920
- e[`${n}${u}`] = { ...e[n], pseudoSuffix: u };
921
- });
922
- }), l = Object.keys(e), B.forEach((u) => {
923
- l.forEach((n) => {
924
- e[`${u}${n}`] = { ...e[n], breakpoint: u };
925
- });
926
- }), e;
927
- }
928
- let $ = Y();
929
- function oe() {
930
- $ = Y();
931
- }
932
- function re(e, l, u) {
933
- const n = Object.entries($).filter(
934
- ([t, d]) => d.pseudoSuffix === e && !d.customPseudoSuffix && !(`${t}${l}` in $)
935
- ).map(([t]) => t);
936
- return n.forEach((t) => {
937
- $[`${t}${l}`] = {
938
- ...$[t],
939
- customPseudoSuffix: u + l
940
- };
941
- }), n.map((t) => `${t}${l}`);
942
- }
943
- class ne {
1234
+ var q;
1235
+ ((e) => {
1236
+ function t(n, d, o) {
1237
+ const v = { ...n }, y = v.props || {};
1238
+ return d.forEach((s) => {
1239
+ s in v && (y[s] = v[s], delete v[s]);
1240
+ }), o && Object.entries(o).forEach(([s, f]) => {
1241
+ y[s] = f;
1242
+ }), v.props = y, v;
1243
+ }
1244
+ e.buildProps = t;
1245
+ function a(n) {
1246
+ return !!n && typeof n == "object";
1247
+ }
1248
+ e.isObject = a;
1249
+ function u(...n) {
1250
+ return n.reduce((d, o) => (Object.keys(o).forEach((v) => {
1251
+ const y = d[v], s = o[v];
1252
+ v in C && typeof s == "boolean" || (v in C && Array.isArray(s) ? d[v] = u(y, s[1] ?? {}) : Array.isArray(y) && Array.isArray(s) ? d[v] = y.concat(...s) : a(y) && a(s) ? d[v] = u(y, s) : d[v] = s);
1253
+ }), d), {});
1254
+ }
1255
+ e.mergeDeep = u;
1256
+ function m(n, d) {
1257
+ return n in d;
1258
+ }
1259
+ e.isKeyOf = m;
1260
+ })(q || (q = {}));
1261
+ const N = q;
1262
+ class oe {
944
1263
  constructor() {
945
1264
  this._index = 0, this._cache = {};
946
1265
  }
947
- getIdentity(l) {
948
- return this._cache[l] || (this._cache[l] = this.getByIndex(this._index++)), this._cache[l];
1266
+ getIdentity(t) {
1267
+ return this._cache[t] || (this._cache[t] = this.getByIndex(this._index++)), this._cache[t];
949
1268
  }
950
- getByIndex(l) {
951
- const { first: u, next: n } = ve, t = l - u.length;
952
- if (t < 0)
953
- return u[l];
954
- const d = Math.floor(t / n.length), p = t - d * n.length;
955
- return this.getByIndex(d) + n[p];
1269
+ getByIndex(t) {
1270
+ const { first: a, next: u } = ue, m = t - a.length;
1271
+ if (m < 0)
1272
+ return a[t];
1273
+ const n = Math.floor(m / u.length), d = m - n * u.length;
1274
+ return this.getByIndex(n) + u[d];
956
1275
  }
957
1276
  }
958
- const ve = {
1277
+ const ue = {
959
1278
  first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
960
1279
  next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
961
1280
  };
962
- var _;
1281
+ var K;
1282
+ ((e) => {
1283
+ let t = "";
1284
+ function a(m, n) {
1285
+ return t = Object.entries(m).map(([d, o]) => `--${d}: ${o};`).join(""), Object.entries(n).forEach(([d, o]) => {
1286
+ S[d] = o;
1287
+ }), n;
1288
+ }
1289
+ e.extend = a;
1290
+ function u() {
1291
+ return t;
1292
+ }
1293
+ e.getVariables = u;
1294
+ })(K || (K = {}));
1295
+ const me = K;
1296
+ var I;
1297
+ ((e) => {
1298
+ e.components = {};
1299
+ })(I || (I = {}));
1300
+ function ce(e) {
1301
+ const { clean: t, theme: a, component: u } = e;
1302
+ return U(() => {
1303
+ var n, d;
1304
+ if (t) return;
1305
+ let m = (n = I.components) == null ? void 0 : n[u];
1306
+ if (m)
1307
+ return a ? N.mergeDeep(m.styles, ((d = m.themes) == null ? void 0 : d[a]) ?? {}) : m.styles;
1308
+ }, [u, t, a]);
1309
+ }
1310
+ const de = new oe(), ve = typeof window < "u" && typeof window.document < "u";
1311
+ var k;
1312
+ const ae = typeof process == "object" && ((k = process.env) == null ? void 0 : k.NODE_ENV) === "test", fe = ve && !ae ? le : ne, se = "_b", O = "_s";
1313
+ function ye(e, t) {
1314
+ fe(j.flush, [e]);
1315
+ const a = ce(e);
1316
+ return U(() => {
1317
+ var n;
1318
+ const u = [t ? O : se];
1319
+ (n = e.props) == null || n.name;
1320
+ const m = a ? N.mergeDeep(a, e) : e;
1321
+ return j.addClassNames(m, u, []), u;
1322
+ }, [e, t, a]);
1323
+ }
1324
+ var j;
963
1325
  ((e) => {
964
- e.boxClassName = "_box", e.svgClassName = "_svg", e.cronoStylesElementId = "crono-styles";
965
- const l = `:root{--borderColor: black;--outlineColor: black;--lineHeight: 1.2;--fontSize: 14px;--transitionTime: 0.25s;--svgTransitionTime: 0.3s;#crono-box {position: absolute;top: 0;left: 0;height: 0;}}
1326
+ let t = !0, a = {};
1327
+ function u(s, f, p, h, r) {
1328
+ Object.entries(s).forEach(([i, l]) => {
1329
+ if (N.isKeyOf(i, S))
1330
+ d(i, l, f, p, h, r);
1331
+ else if (N.isKeyOf(i, ee))
1332
+ u(l, f, [...p, i], h, r);
1333
+ else if (N.isKeyOf(i, C)) {
1334
+ if (Array.isArray(l)) {
1335
+ const [g, b] = l;
1336
+ u(b, f, [...p, i], h, r);
1337
+ }
1338
+ N.isObject(l) && u(l, f, [...p, i], h, r);
1339
+ } else N.isKeyOf(i, A) ? u(l, f, p, i, r) : N.isKeyOf(i, H) && (typeof l == "string" ? f.push(`${H[i]}-${l}`) : Object.entries(l).forEach(([g, b]) => {
1340
+ u(b, f, [...p, H[i]], h, g);
1341
+ }));
1342
+ });
1343
+ }
1344
+ e.addClassNames = u;
1345
+ function m() {
1346
+ if (!t) return;
1347
+ console.debug("\x1B[36m%s\x1B[0m", "[react-box]: flush");
1348
+ const s = Object.entries(S).reduce((i, [l], g) => (i[l] = g, i), {}), f = `:root{${me.getVariables()}--borderColor: black;--outlineColor: black;--lineHeight: 1.2;--fontSize: 14px;--transitionTime: 0.25s;--svgTransitionTime: 0.3s;}#crono-box {position: absolute;top: 0;left: 0;height: 0;}
966
1349
  html{font-size: 16px;font-family: Arial, sans-serif;}
967
1350
  body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
968
1351
  a,ul{all: unset;}
969
- .${e.boxClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;background-color: initial;transition: all var(--transitionTime);box-sizing: border-box;font-family: inherit;font-size: inherit;}
970
- .${e.svgClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${e.svgClassName} path,.${e.svgClassName} circle,.${e.svgClassName} rect,.${e.svgClassName} line {transition: all var(--svgTransitionTime);}
971
- `, u = new ne();
972
- let n = !0, t = {};
973
- k();
974
- function d(a, o, v) {
975
- if (a in $)
976
- return C(a, o, v);
977
- if (ue.includes(a))
978
- return a + o;
979
- }
980
- e.get = d;
981
- function p() {
982
- if (n) {
983
- let a = m([l]);
984
- H.forEach((v) => {
985
- a = m(a, v);
986
- }), B.forEach((v) => {
987
- a.push(`@media(min-width: ${te[v]}px){`), a = m(a, void 0, v), H.forEach((V) => {
988
- a = m(a, V, v);
989
- }), a.push("}");
990
- });
991
- const o = r();
992
- o.innerHTML = a.join(""), n = !1;
993
- }
994
- }
995
- e.flush = p;
996
- function k() {
997
- oe(), t = Object.keys($).reduce(
998
- (o, v) => (o[v] = /* @__PURE__ */ new Set(), o),
999
- {}
1352
+ .${se}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;background-color: initial;transition: all var(--transitionTime);box-sizing: border-box;font-family: inherit;font-size: inherit;}
1353
+ .${O}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${O} path,.${O} circle,.${O} rect,.${O} line {transition: all var(--svgTransitionTime);}
1354
+ `, p = Object.entries(a);
1355
+ p.sort(
1356
+ ([i], [l]) => (A[i] ?? 0) - (A[l] ?? 0)
1000
1357
  );
1358
+ const h = p.reduce(
1359
+ (i, [l, g]) => (l !== "normal" && i.push(`@media(min-width: ${A[l]}px){`), Object.entries(g).forEach(([b, B]) => {
1360
+ const { __parents: X, ...re } = B, Y = Object.entries(re);
1361
+ Y.sort(([w], [_]) => s[w] - s[_]), Y.forEach(([w, _]) => {
1362
+ _.forEach((F) => {
1363
+ var T;
1364
+ const x = S[w].find((E) => Array.isArray(E.values) ? E.values.includes(F) : typeof F == typeof E.values);
1365
+ if (!x) return;
1366
+ const $ = o(w, F, +b, l), J = x.styleName ?? w, V = ((T = x.valueFormat) == null ? void 0 : T.call(x, F)) ?? F, R = D[+b];
1367
+ i.push(`.${$}${R.map((E) => M[E]).join("")}{${J}:${V}}`);
1368
+ });
1369
+ }), X && Object.entries(X).forEach(([w, _]) => {
1370
+ const F = Object.entries(_);
1371
+ F.sort(([z], [x]) => s[z] - s[x]), F.forEach(([z, x]) => {
1372
+ x.forEach(($) => {
1373
+ var Z;
1374
+ const V = S[z].find((G) => Array.isArray(G.values) ? G.values.includes($) : typeof $ == typeof G.values);
1375
+ if (!V) return;
1376
+ const R = o(z, $, +b, l, w), T = V.styleName ?? z, E = ((Z = V.valueFormat) == null ? void 0 : Z.call(V, $)) ?? $, [Q] = D[+b];
1377
+ i.push(`.${Q}-${w}:${Q} .${R}{${T}:${E}}`);
1378
+ });
1379
+ });
1380
+ });
1381
+ }), l !== "normal" && i.push("}"), i),
1382
+ [f]
1383
+ ), r = y();
1384
+ r.innerHTML = h.join(""), t = !1;
1001
1385
  }
1002
- e.clear = k;
1003
- function E(a, o, v) {
1004
- re(a, o, v).forEach((b) => {
1005
- t[b] = /* @__PURE__ */ new Set();
1006
- });
1007
- }
1008
- e.addCustomPseudoClass = E;
1009
- function C(a, o, v) {
1010
- const V = (v ?? "") + a;
1011
- t[V].has(o) || (n = !0, t[V].add(o));
1012
- const b = `${V}${o}`;
1013
- return process.env.NODE_ENV === "test" ? b : u.getIdentity(b);
1386
+ e.flush = m;
1387
+ function n() {
1388
+ a = {};
1014
1389
  }
1015
- const i = {
1016
- hover: "hover",
1017
- focus: "focus-within",
1018
- hasFocus: "has(:focus-within)",
1019
- active: "active",
1020
- checked: "checked",
1021
- hasChecked: "has(:checked)",
1022
- indeterminate: "indeterminate",
1023
- valid: "user-valid",
1024
- hasValid: "has(:valid)",
1025
- invalid: "user-invalid",
1026
- hasInvalid: "has(:user-invalid)",
1027
- required: "required",
1028
- optional: "optional",
1029
- disabled: "disabled",
1030
- hasDisabled: "has(:disabled)"
1031
- };
1032
- function m(a, o, v) {
1033
- return Object.entries(t).filter(
1034
- ([b, y]) => {
1035
- var N, x;
1036
- return ((N = $[b]) == null ? void 0 : N.pseudoSuffix) === o && ((x = $[b]) == null ? void 0 : x.breakpoint) === v && y.size > 0;
1037
- }
1038
- ).reduce((b, [y, N]) => (N.forEach((x) => {
1039
- var L;
1040
- const S = $[y], z = f(S, x), P = `.${C(y, x)}`, G = V(
1041
- P,
1042
- S,
1043
- z,
1044
- o ? i[o] : void 0
1045
- ), g = ((L = z.formatValue) == null ? void 0 : L.call(z, y, x)) ?? x, Q = $[y].cssNames.map((Z) => `${Z}:${g};`).join("");
1046
- b.push(`${G.join(",")}{${Q}}`);
1047
- }), b), a);
1048
- function V(b, y, N, x) {
1049
- let S = b;
1050
- return x && (S = y.customPseudoSuffix ? `.${y.customPseudoSuffix}:${x} ${b}` : `${b}:${x}`), N.formatSelector ? N.formatSelector(S) : [S];
1051
- }
1390
+ e.clear = n;
1391
+ function d(s, f, p, h, r = "normal", i) {
1392
+ if (f == null) return;
1393
+ const l = h.reduce((b, B) => b + te[B], 0);
1394
+ a[r] ? a[r][l] ? a[r][l][s] || (a[r][l][s] = /* @__PURE__ */ new Set()) : a[r][l] = { [s]: /* @__PURE__ */ new Set() } : a[r] = { [l]: { [s]: /* @__PURE__ */ new Set() } }, i ? (a[r][l].__parents ? a[r][l].__parents[i] ? a[r][l].__parents[i][s] || (a[r][l].__parents[i][s] = /* @__PURE__ */ new Set()) : a[r][l].__parents[i] = { [s]: /* @__PURE__ */ new Set() } : a[r][l].__parents = { [i]: { [s]: /* @__PURE__ */ new Set() } }, a[r][l].__parents[i][s].has(f) || (a[r][l].__parents[i][s].add(f), t = !0)) : a[r][l][s].has(f) || (a[r][l][s].add(f), t = !0);
1395
+ const g = o(s, f, l, r, i);
1396
+ p.push(g);
1052
1397
  }
1053
- function f(a, o) {
1054
- return a.isThemeStyle ? a : a.values1.values.includes(o) ? a.values1 : a.values2.values.includes(o) ? a.values2 : a.values3;
1398
+ function o(s, f, p, h, r) {
1399
+ const i = D[p], l = `${h === "normal" ? "" : `${h}-`}${i.map((g) => `${g}-`).join("")}${r ? `${r}-` : ""}${s}-${f}`;
1400
+ return ae ? l : de.getIdentity(l);
1055
1401
  }
1056
- function r() {
1057
- const o = typeof window < "u" && typeof window.document < "u" ? window.document : global.document;
1058
- let v = o.getElementById(e.cronoStylesElementId);
1059
- return v || (v = o.createElement("style"), v.setAttribute("id", e.cronoStylesElementId), v.setAttribute("type", "text/css"), o.head.insertBefore(v, o.head.firstChild)), v;
1402
+ const v = "crono-styles";
1403
+ function y() {
1404
+ let s = document.getElementById(v);
1405
+ return s || (s = document.createElement("style"), s.setAttribute("id", v), s.setAttribute("type", "text/css"), document.head.insertBefore(s, document.head.firstChild)), s;
1060
1406
  }
1061
- e.getElement = r;
1062
- })(_ || (_ = {}));
1063
- const I = _, ie = {
1064
- button: {
1065
- styles: {
1066
- display: "inline-block",
1067
- p: 3,
1068
- cursor: "pointer",
1069
- b: 1,
1070
- borderRadius: 1,
1071
- userSelect: "none",
1072
- disabled: {
1073
- cursor: "default"
1074
- }
1075
- }
1076
- },
1077
- checkbox: {
1078
- styles: {
1079
- display: "inline-block"
1080
- }
1081
- },
1082
- radioButton: {
1083
- styles: {
1084
- display: "inline-block",
1085
- b: 1,
1086
- p: 2
1087
- }
1088
- },
1089
- textbox: {
1090
- styles: {
1091
- display: "inline-block",
1092
- b: 1,
1093
- borderRadius: 1,
1094
- p: 3
1095
- }
1096
- },
1097
- textarea: {
1098
- styles: {
1099
- display: "inline-block",
1100
- b: 1,
1101
- borderRadius: 1
1102
- }
1103
- }
1104
- };
1105
- var D;
1407
+ })(j || (j = {}));
1408
+ var P;
1106
1409
  ((e) => {
1107
- e.Styles = {};
1108
- function l(i) {
1109
- e.Styles = t(ie), n(i);
1110
- }
1111
- e.setup = l;
1112
- function u(i, m) {
1113
- const { colors: f = {}, shadows: r = {}, backgrounds: a = {}, backgroundImages: o = {} } = i;
1114
- f.none = "none", r.none = "none", a.none = "none", o.none = "none";
1115
- const v = Object.entries(f).map(([g, j]) => `--color${g}: ${j};`).join(`
1116
- `), V = Object.entries(r).map(([g, j]) => `--shadow${g}: ${j};`).join(`
1117
- `), b = Object.entries(a).map(([g, j]) => `--background${g}: ${j};`).join(`
1118
- `), y = Object.entries(o).map(([g, j]) => `--backgroundImage${g}: ${j};`).join(`
1119
- `), N = [":root {"];
1120
- v && N.push(` ${v}`), V && N.push(` ${V}`), b && N.push(` ${b}`), y && N.push(` ${y}`), N.push("}");
1121
- const x = Object.keys(f).map((g) => `'${g}'`).join(" | "), S = Object.keys(a).map((g) => `'${g}'`).join(" | "), z = Object.keys(o).map((g) => `'${g}'`).join(" | "), P = Object.keys(r).map((g) => `'${g}'`).join(" | "), G = `import '@cronocode/react-box';
1122
-
1123
- declare module '${(m == null ? void 0 : m.namespacePath) ?? "@cronocode/react-box/core/types"}' {
1124
- type ColorType = ${x};
1125
- type BackgroundType = ${S};
1126
- type BackgroundImageType = ${z};
1127
- type ShadowType = ${P};
1128
-
1129
- namespace Augmented {
1130
- interface BoxProps {
1131
- color?: ColorType;
1132
- bgColor?: ColorType;
1133
- borderColor?: ColorType;
1134
- outlineColor?: ColorType;
1135
- background?: BackgroundType;
1136
- backgroundImage?: BackgroundImageType;
1137
- shadow?: ShadowType;
1410
+ e.flush = j.flush, e.clear = j.clear;
1411
+ })(P || (P = {}));
1412
+ var L;
1413
+ ((e) => {
1414
+ const t = {
1415
+ button: {
1416
+ styles: {
1417
+ display: "inline-block",
1418
+ p: 3,
1419
+ cursor: "pointer",
1420
+ b: 1,
1421
+ borderRadius: 1,
1422
+ userSelect: "none",
1423
+ disabled: {
1424
+ cursor: "default"
1425
+ }
1426
+ }
1427
+ },
1428
+ checkbox: {
1429
+ styles: {
1430
+ display: "inline-block"
1138
1431
  }
1139
-
1140
- interface SvgProps {
1141
- fill?: ColorType;
1142
- stroke?: ColorType;
1432
+ },
1433
+ radioButton: {
1434
+ styles: {
1435
+ display: "inline-block",
1436
+ b: 1,
1437
+ p: 2
1143
1438
  }
1144
- }
1145
- }
1146
- `;
1147
- return {
1148
- variables: N.join(`
1149
- `),
1150
- boxDts: G
1151
- };
1152
- }
1153
- e.setupAugmentedProps = u;
1154
- function n(i) {
1155
- const m = t(i);
1156
- if (m.components)
1157
- return Object.entries(m.components).forEach(([f, r]) => {
1158
- var o;
1159
- const a = (o = e.Styles.components) == null ? void 0 : o[f];
1160
- a ? (e.Styles.components[f].styles = { ...a.styles, ...r.styles }, e.Styles.components[f].themes = r.themes) : e.Styles.components[f] = r;
1161
- }), m;
1162
- }
1163
- function t(i) {
1164
- return d(i), p(i), E(i), i;
1165
- }
1166
- function d(i) {
1167
- const { components: m, ...f } = i, r = Object.entries(f);
1168
- r.length && !i.components && (i.components = {});
1169
- for (const a of r) {
1170
- const [o, v] = a;
1171
- i.components[o] = v, delete i[o];
1172
- }
1173
- }
1174
- function p(i) {
1175
- if (!i.components)
1176
- return;
1177
- const m = Object.keys(i.components);
1178
- for (const f of m) {
1179
- const r = i.components[f], a = k(f, r);
1180
- delete r.children;
1181
- for (const o of a) {
1182
- const [v, V] = o;
1183
- i.components[v] = V;
1439
+ },
1440
+ textbox: {
1441
+ styles: {
1442
+ display: "inline-block",
1443
+ b: 1,
1444
+ borderRadius: 1,
1445
+ p: 3
1446
+ }
1447
+ },
1448
+ textarea: {
1449
+ styles: {
1450
+ display: "inline-block",
1451
+ b: 1,
1452
+ borderRadius: 1
1184
1453
  }
1185
1454
  }
1455
+ };
1456
+ function a(u) {
1457
+ const { components: m, ...n } = u, d = m ?? {};
1458
+ Object.entries(n).forEach(([o, v]) => {
1459
+ d[o] = v;
1460
+ }), I.components = N.mergeDeep(t, d);
1186
1461
  }
1187
- function k(i, m) {
1188
- if (!m.children)
1189
- return [];
1190
- const f = Object.keys(m.children), r = [];
1191
- for (const a of f) {
1192
- const o = `${i}.${a}`, v = m.children[a], V = k(o, v);
1193
- r.push(...V), delete v.children, r.push([o, v]);
1194
- }
1195
- return r;
1462
+ e.setup = a;
1463
+ })(L || (L = {}));
1464
+ const pe = L;
1465
+ var W;
1466
+ ((e) => {
1467
+ function t(u) {
1468
+ const m = Array.from(u.elements).reduce(
1469
+ (n, d) => {
1470
+ const o = d.name;
1471
+ return o && (n[o] || (n[o] = []), n[o].push(d)), n;
1472
+ },
1473
+ {}
1474
+ );
1475
+ return Object.entries(m).reduce((n, [d, o]) => {
1476
+ if (o.length === 1) {
1477
+ const v = o[0];
1478
+ a(n, d, v.type === "checkbox" || v.type === "radio" ? v.checked : v.value);
1479
+ } else {
1480
+ const v = o.reduce((y, s) => (s.type === "checkbox" || s.type === "radio" ? s.checked && y.push(s.value) : y.push(s.value), y), []);
1481
+ a(n, d, v);
1482
+ }
1483
+ return n;
1484
+ }, {});
1196
1485
  }
1197
- function E(i) {
1198
- if (!i.components)
1199
- return;
1200
- const m = Object.values(i.components);
1201
- for (const f of m)
1202
- C(f.styles), B.forEach((r) => {
1203
- if (r in f.styles) {
1204
- const a = f.styles[r];
1205
- C(a);
1206
- }
1207
- }), f.themes && Object.values(f.themes).forEach((r) => {
1208
- C(r), B.forEach((a) => {
1209
- if (a in r) {
1210
- const o = r[a];
1211
- C(o);
1212
- }
1213
- });
1486
+ e.getFormEntries = t;
1487
+ function a(u, m, n) {
1488
+ if (m.includes(".")) {
1489
+ const d = m.split(".");
1490
+ let o = u;
1491
+ d.forEach((v, y) => {
1492
+ if (d.length > y + 1) {
1493
+ const s = v.match(/^(.+)\[(\d)\]$/);
1494
+ if (s) {
1495
+ const [, f, p] = s;
1496
+ o[f] = o[f] || [], o[f][p] = o[f][p] || {}, o = o[f][p];
1497
+ } else
1498
+ o[v] = o[v] || {}, o = o[v];
1499
+ } else
1500
+ o[v] = n;
1214
1501
  });
1502
+ } else
1503
+ u[m] = n;
1215
1504
  }
1216
- function C(i) {
1217
- H.forEach((m) => {
1218
- if (m in i) {
1219
- const f = i[m];
1220
- Object.entries(f).map(([r, a]) => {
1221
- i[`${r}${m}`] = a;
1222
- }), delete i[m];
1223
- }
1224
- });
1225
- }
1226
- })(D || (D = {}));
1227
- const ce = D;
1228
- function me(e) {
1229
- const { clean: l, theme: u, component: n } = e;
1505
+ })(W || (W = {}));
1506
+ const ge = W;
1507
+ function be() {
1230
1508
  return U(() => {
1231
- var d, p;
1232
- if (l)
1233
- return;
1234
- let t = (d = ce.Styles.components) == null ? void 0 : d[n];
1235
- if (t)
1236
- return u ? { ...t.styles, ...(p = t.themes) == null ? void 0 : p[u] } : t.styles;
1237
- }, [n, l, u]);
1238
- }
1239
- const de = typeof window < "u" && typeof window.document < "u", fe = de ? ee : se;
1240
- function pe(e, l) {
1241
- const u = me(e);
1242
- return fe(I.flush, [e]), U(() => {
1243
- const n = [l ? I.svgClassName : I.boxClassName], t = u ? { ...u, ...e } : { ...e };
1244
- return M(t), Object.entries(t).forEach(([d, p]) => {
1245
- n.push(I.get(d, p));
1246
- }), B.forEach((d) => {
1247
- if (d in t) {
1248
- const p = t[d];
1249
- M(p), Object.entries(p).forEach(([k, E]) => {
1250
- n.push(I.get(k, E, d));
1251
- }), delete t[d];
1252
- }
1253
- }), n;
1254
- }, [e, u]);
1255
- }
1256
- function M(e) {
1257
- w(e, "hover", "hover"), w(e, "focus", "focus"), w(e, "hasFocus", "hasFocus"), w(e, "active", "active"), w(e, "disabled", "disabled"), w(e, "hasDisabled", "hasDisabled"), w(e, "checked", "checked"), w(e, "hasChecked", "hasChecked"), w(e, "valid", "valid"), w(e, "hasValid", "hasValid"), w(e, "invalid", "invalid"), w(e, "hasInvalid", "hasInvalid"), A(e, "hoverGroup", "hover"), A(e, "focusGroup", "focus"), A(e, "activeGroup", "active"), A(e, "disabledGroup", "disabled");
1258
- }
1259
- function w(e, l, u) {
1260
- l in e && J(e, l, u, e[l]);
1261
- }
1262
- function A(e, l, u) {
1263
- l in e && X.isObject(e[l]) && Object.entries(e[l]).forEach(([n, t]) => {
1264
- I.addCustomPseudoClass(u, n, l), J(e, l, u + n, t);
1265
- });
1266
- }
1267
- function J(e, l, u, n) {
1268
- Array.isArray(n) ? (Object.entries(n[1]).forEach(([t, d]) => {
1269
- e[`${t}${u}`] = d;
1270
- }), e[l] = n[0]) : X.isObject(n) && (Object.entries(n).forEach(([t, d]) => {
1271
- e[`${t}${u}`] = d;
1272
- }), delete e[l]);
1273
- }
1274
- function he(...e) {
1275
- return e.reduce((l, u) => u ? typeof u == "string" ? (l.push(u), l) : Array.isArray(u) ? (l.push(...he(...u)), l) : (Object.entries(u).forEach(([n, t]) => {
1276
- t && l.push(n);
1277
- }), l) : l, []);
1509
+ const e = "crono-box";
1510
+ let t = document.getElementById(e);
1511
+ return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
1512
+ }, []);
1278
1513
  }
1279
1514
  export {
1280
- I as S,
1281
- ce as T,
1282
- he as c,
1283
- pe as u
1515
+ me as B,
1516
+ ge as F,
1517
+ N as O,
1518
+ P as S,
1519
+ pe as T,
1520
+ be as a,
1521
+ ie as c,
1522
+ ye as u
1284
1523
  };