@bamboocss/preset-base 1.11.1 → 1.11.3

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/index.cjs ADDED
@@ -0,0 +1,3293 @@
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ //#region src/conditions.ts
6
+ const conditions = {
7
+ hover: "&:is(:hover, [data-hover])",
8
+ focus: "&:is(:focus, [data-focus])",
9
+ focusWithin: "&:focus-within",
10
+ focusVisible: "&:is(:focus-visible, [data-focus-visible])",
11
+ disabled: "&:is(:disabled, [disabled], [data-disabled], [aria-disabled=true])",
12
+ active: "&:is(:active, [data-active])",
13
+ visited: "&:visited",
14
+ target: "&:target",
15
+ readOnly: "&:is(:read-only, [data-read-only], [aria-readonly=true])",
16
+ readWrite: "&:read-write",
17
+ empty: "&:is(:empty, [data-empty])",
18
+ checked: "&:is(:checked, [data-checked], [aria-checked=true], [data-state=\"checked\"])",
19
+ enabled: "&:enabled",
20
+ expanded: "&:is([aria-expanded=true], [data-expanded], [data-state=\"expanded\"])",
21
+ highlighted: "&[data-highlighted]",
22
+ complete: "&[data-complete]",
23
+ incomplete: "&[data-incomplete]",
24
+ dragging: "&[data-dragging]",
25
+ before: "&::before",
26
+ after: "&::after",
27
+ firstLetter: "&::first-letter",
28
+ firstLine: "&::first-line",
29
+ marker: "&::marker, &::-webkit-details-marker",
30
+ selection: "&::selection",
31
+ file: "&::file-selector-button",
32
+ backdrop: "&::backdrop",
33
+ first: "&:first-child",
34
+ last: "&:last-child",
35
+ only: "&:only-child",
36
+ even: "&:nth-child(even)",
37
+ odd: "&:nth-child(odd)",
38
+ firstOfType: "&:first-of-type",
39
+ lastOfType: "&:last-of-type",
40
+ onlyOfType: "&:only-of-type",
41
+ peerFocus: ".peer:is(:focus, [data-focus]) ~ &",
42
+ peerHover: ".peer:is(:hover, [data-hover]) ~ &",
43
+ peerActive: ".peer:is(:active, [data-active]) ~ &",
44
+ peerFocusWithin: ".peer:focus-within ~ &",
45
+ peerFocusVisible: ".peer:is(:focus-visible, [data-focus-visible]) ~ &",
46
+ peerDisabled: ".peer:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) ~ &",
47
+ peerChecked: ".peer:is(:checked, [data-checked], [aria-checked=true], [data-state=\"checked\"]) ~ &",
48
+ peerInvalid: ".peer:is(:invalid, [data-invalid], [aria-invalid=true]) ~ &",
49
+ peerExpanded: ".peer:is([aria-expanded=true], [data-expanded], [data-state=\"expanded\"]) ~ &",
50
+ peerPlaceholderShown: ".peer:placeholder-shown ~ &",
51
+ groupFocus: ".group:is(:focus, [data-focus]) &",
52
+ groupHover: ".group:is(:hover, [data-hover]) &",
53
+ groupActive: ".group:is(:active, [data-active]) &",
54
+ groupFocusWithin: ".group:focus-within &",
55
+ groupFocusVisible: ".group:is(:focus-visible, [data-focus-visible]) &",
56
+ groupDisabled: ".group:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) &",
57
+ groupChecked: ".group:is(:checked, [data-checked], [aria-checked=true], [data-state=\"checked\"]) &",
58
+ groupExpanded: ".group:is([aria-expanded=true], [data-expanded], [data-state=\"expanded\"]) &",
59
+ groupInvalid: ".group:is(:invalid, [data-invalid], [aria-invalid=true]) &",
60
+ indeterminate: "&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=\"indeterminate\"])",
61
+ required: "&:is(:required, [data-required], [aria-required=true])",
62
+ valid: "&:is(:valid, [data-valid])",
63
+ invalid: "&:is(:invalid, [data-invalid], [aria-invalid=true])",
64
+ autofill: "&:autofill",
65
+ inRange: "&:is(:in-range, [data-in-range])",
66
+ outOfRange: "&:is(:out-of-range, [data-outside-range])",
67
+ placeholder: "&::placeholder, &[data-placeholder]",
68
+ placeholderShown: "&:is(:placeholder-shown, [data-placeholder-shown])",
69
+ pressed: "&:is([aria-pressed=true], [data-pressed])",
70
+ selected: "&:is([aria-selected=true], [data-selected])",
71
+ grabbed: "&:is([aria-grabbed=true], [data-grabbed])",
72
+ underValue: "&[data-state=under-value]",
73
+ overValue: "&[data-state=over-value]",
74
+ atValue: "&[data-state=at-value]",
75
+ default: "&:default",
76
+ optional: "&:optional",
77
+ open: "&:is([open], [data-open], [data-state=\"open\"], :popover-open)",
78
+ closed: "&:is([closed], [data-closed], [data-state=\"closed\"])",
79
+ fullscreen: "&:is(:fullscreen, [data-fullscreen])",
80
+ loading: "&:is([data-loading], [aria-busy=true])",
81
+ hidden: "&:is([hidden], [data-hidden])",
82
+ current: "&:is([aria-current=true], [data-current])",
83
+ currentPage: "&[aria-current=page]",
84
+ currentStep: "&[aria-current=step]",
85
+ today: "&[data-today]",
86
+ unavailable: "&[data-unavailable]",
87
+ rangeStart: "&[data-range-start]",
88
+ rangeEnd: "&[data-range-end]",
89
+ now: "&[data-now]",
90
+ topmost: "&[data-topmost]",
91
+ motionReduce: "@media (prefers-reduced-motion: reduce)",
92
+ motionSafe: "@media (prefers-reduced-motion: no-preference)",
93
+ print: "@media print",
94
+ landscape: "@media (orientation: landscape)",
95
+ portrait: "@media (orientation: portrait)",
96
+ dark: ".dark &",
97
+ light: ".light &",
98
+ osDark: "@media (prefers-color-scheme: dark)",
99
+ osLight: "@media (prefers-color-scheme: light)",
100
+ highContrast: "@media (forced-colors: active)",
101
+ lessContrast: "@media (prefers-contrast: less)",
102
+ moreContrast: "@media (prefers-contrast: more)",
103
+ ltr: ":where([dir=ltr], :dir(ltr)) &",
104
+ rtl: ":where([dir=rtl], :dir(rtl)) &",
105
+ scrollbar: "&::-webkit-scrollbar",
106
+ scrollbarThumb: "&::-webkit-scrollbar-thumb",
107
+ scrollbarTrack: "&::-webkit-scrollbar-track",
108
+ horizontal: "&[data-orientation=horizontal]",
109
+ vertical: "&[data-orientation=vertical]",
110
+ icon: "& :where(svg)",
111
+ starting: "@starting-style",
112
+ noscript: "@media (scripting: none)",
113
+ invertedColors: "@media (inverted-colors: inverted)"
114
+ };
115
+ //#endregion
116
+ //#region src/global-css.ts
117
+ const EMPTY = "/*-*/ /*-*/";
118
+ const globalCss = { "*, ::before, ::after, ::backdrop": {
119
+ "--blur": EMPTY,
120
+ "--brightness": EMPTY,
121
+ "--contrast": EMPTY,
122
+ "--grayscale": EMPTY,
123
+ "--hue-rotate": EMPTY,
124
+ "--invert": EMPTY,
125
+ "--saturate": EMPTY,
126
+ "--sepia": EMPTY,
127
+ "--drop-shadow": EMPTY,
128
+ "--backdrop-blur": EMPTY,
129
+ "--backdrop-brightness": EMPTY,
130
+ "--backdrop-contrast": EMPTY,
131
+ "--backdrop-grayscale": EMPTY,
132
+ "--backdrop-hue-rotate": EMPTY,
133
+ "--backdrop-invert": EMPTY,
134
+ "--backdrop-opacity": EMPTY,
135
+ "--backdrop-saturate": EMPTY,
136
+ "--backdrop-sepia": EMPTY,
137
+ "--gradient-from-position": EMPTY,
138
+ "--gradient-to-position": EMPTY,
139
+ "--gradient-via-position": EMPTY,
140
+ "--scroll-snap-strictness": "proximity",
141
+ "--border-spacing-x": 0,
142
+ "--border-spacing-y": 0,
143
+ "--translate-x": 0,
144
+ "--translate-y": 0,
145
+ "--rotate": 0,
146
+ "--rotate-x": 0,
147
+ "--rotate-y": 0,
148
+ "--skew-x": 0,
149
+ "--skew-y": 0,
150
+ "--scale-x": 1,
151
+ "--scale-y": 1
152
+ } };
153
+ //#endregion
154
+ //#region src/patterns.ts
155
+ function definePattern(config) {
156
+ return config;
157
+ }
158
+ const box = definePattern({ transform(props) {
159
+ return props;
160
+ } });
161
+ const flex = definePattern({
162
+ properties: {
163
+ align: {
164
+ type: "property",
165
+ value: "alignItems"
166
+ },
167
+ justify: {
168
+ type: "property",
169
+ value: "justifyContent"
170
+ },
171
+ direction: {
172
+ type: "property",
173
+ value: "flexDirection"
174
+ },
175
+ wrap: {
176
+ type: "property",
177
+ value: "flexWrap"
178
+ },
179
+ basis: {
180
+ type: "property",
181
+ value: "flexBasis"
182
+ },
183
+ grow: {
184
+ type: "property",
185
+ value: "flexGrow"
186
+ },
187
+ shrink: {
188
+ type: "property",
189
+ value: "flexShrink"
190
+ }
191
+ },
192
+ transform(props) {
193
+ const { direction, align, justify, wrap, basis, grow, shrink, ...rest } = props;
194
+ return {
195
+ display: "flex",
196
+ flexDirection: direction,
197
+ alignItems: align,
198
+ justifyContent: justify,
199
+ flexWrap: wrap,
200
+ flexBasis: basis,
201
+ flexGrow: grow,
202
+ flexShrink: shrink,
203
+ ...rest
204
+ };
205
+ }
206
+ });
207
+ const stack = definePattern({
208
+ properties: {
209
+ align: {
210
+ type: "property",
211
+ value: "alignItems"
212
+ },
213
+ justify: {
214
+ type: "property",
215
+ value: "justifyContent"
216
+ },
217
+ direction: {
218
+ type: "property",
219
+ value: "flexDirection"
220
+ },
221
+ gap: {
222
+ type: "property",
223
+ value: "gap"
224
+ }
225
+ },
226
+ defaultValues: {
227
+ direction: "column",
228
+ gap: "8px"
229
+ },
230
+ transform(props) {
231
+ const { align, justify, direction, gap, ...rest } = props;
232
+ return {
233
+ display: "flex",
234
+ flexDirection: direction,
235
+ alignItems: align,
236
+ justifyContent: justify,
237
+ gap,
238
+ ...rest
239
+ };
240
+ }
241
+ });
242
+ const vstack = definePattern({
243
+ jsxName: "VStack",
244
+ properties: {
245
+ justify: {
246
+ type: "property",
247
+ value: "justifyContent"
248
+ },
249
+ gap: {
250
+ type: "property",
251
+ value: "gap"
252
+ }
253
+ },
254
+ defaultValues: { gap: "8px" },
255
+ transform(props) {
256
+ const { justify, gap, ...rest } = props;
257
+ return {
258
+ display: "flex",
259
+ alignItems: "center",
260
+ justifyContent: justify,
261
+ gap,
262
+ flexDirection: "column",
263
+ ...rest
264
+ };
265
+ }
266
+ });
267
+ const hstack = definePattern({
268
+ jsxName: "HStack",
269
+ properties: {
270
+ justify: {
271
+ type: "property",
272
+ value: "justifyContent"
273
+ },
274
+ gap: {
275
+ type: "property",
276
+ value: "gap"
277
+ }
278
+ },
279
+ defaultValues: { gap: "8px" },
280
+ transform(props) {
281
+ const { justify, gap, ...rest } = props;
282
+ return {
283
+ display: "flex",
284
+ alignItems: "center",
285
+ justifyContent: justify,
286
+ gap,
287
+ flexDirection: "row",
288
+ ...rest
289
+ };
290
+ }
291
+ });
292
+ const spacer = definePattern({
293
+ properties: { size: {
294
+ type: "token",
295
+ value: "spacing"
296
+ } },
297
+ transform(props, { map, isCssUnit, isCssVar }) {
298
+ const { size, ...rest } = props;
299
+ return {
300
+ alignSelf: "stretch",
301
+ justifySelf: "stretch",
302
+ flex: map(size, (v) => {
303
+ if (v == null) return "1";
304
+ return `0 0 ${isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`}`;
305
+ }),
306
+ ...rest
307
+ };
308
+ }
309
+ });
310
+ const circle = definePattern({
311
+ properties: { size: {
312
+ type: "property",
313
+ value: "width"
314
+ } },
315
+ transform(props) {
316
+ const { size, ...rest } = props;
317
+ return {
318
+ display: "flex",
319
+ alignItems: "center",
320
+ justifyContent: "center",
321
+ flex: "0 0 auto",
322
+ width: size,
323
+ height: size,
324
+ borderRadius: "9999px",
325
+ ...rest
326
+ };
327
+ }
328
+ });
329
+ const square = definePattern({
330
+ properties: { size: {
331
+ type: "property",
332
+ value: "width"
333
+ } },
334
+ transform(props) {
335
+ const { size, ...rest } = props;
336
+ return {
337
+ display: "flex",
338
+ alignItems: "center",
339
+ justifyContent: "center",
340
+ flex: "0 0 auto",
341
+ width: size,
342
+ height: size,
343
+ ...rest
344
+ };
345
+ }
346
+ });
347
+ const grid = definePattern({
348
+ properties: {
349
+ gap: {
350
+ type: "property",
351
+ value: "gap"
352
+ },
353
+ columnGap: {
354
+ type: "property",
355
+ value: "gap"
356
+ },
357
+ rowGap: {
358
+ type: "property",
359
+ value: "gap"
360
+ },
361
+ columns: { type: "number" },
362
+ minChildWidth: {
363
+ type: "token",
364
+ value: "sizes",
365
+ property: "width"
366
+ }
367
+ },
368
+ defaultValues(props) {
369
+ return { gap: props.columnGap || props.rowGap ? void 0 : "8px" };
370
+ },
371
+ transform(props, { map, isCssUnit }) {
372
+ const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
373
+ const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
374
+ return {
375
+ display: "grid",
376
+ gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
377
+ gap,
378
+ columnGap,
379
+ rowGap,
380
+ ...rest
381
+ };
382
+ }
383
+ });
384
+ const gridItem = definePattern({
385
+ properties: {
386
+ colSpan: { type: "number" },
387
+ rowSpan: { type: "number" },
388
+ colStart: { type: "number" },
389
+ rowStart: { type: "number" },
390
+ colEnd: { type: "number" },
391
+ rowEnd: { type: "number" }
392
+ },
393
+ transform(props, { map }) {
394
+ const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props;
395
+ const spanFn = (v) => v === "auto" ? v : `span ${v}`;
396
+ return {
397
+ gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
398
+ gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
399
+ gridColumnStart: colStart,
400
+ gridColumnEnd: colEnd,
401
+ gridRowStart: rowStart,
402
+ gridRowEnd: rowEnd,
403
+ ...rest
404
+ };
405
+ }
406
+ });
407
+ const wrap = definePattern({
408
+ properties: {
409
+ gap: {
410
+ type: "property",
411
+ value: "gap"
412
+ },
413
+ rowGap: {
414
+ type: "property",
415
+ value: "gap"
416
+ },
417
+ columnGap: {
418
+ type: "property",
419
+ value: "gap"
420
+ },
421
+ align: {
422
+ type: "property",
423
+ value: "alignItems"
424
+ },
425
+ justify: {
426
+ type: "property",
427
+ value: "justifyContent"
428
+ }
429
+ },
430
+ transform(props) {
431
+ const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "8px", align, justify, ...rest } = props;
432
+ return {
433
+ display: "flex",
434
+ flexWrap: "wrap",
435
+ alignItems: align,
436
+ justifyContent: justify,
437
+ gap,
438
+ columnGap,
439
+ rowGap,
440
+ ...rest
441
+ };
442
+ }
443
+ });
444
+ const container$1 = definePattern({ transform(props) {
445
+ return {
446
+ position: "relative",
447
+ maxWidth: "8xl",
448
+ mx: "auto",
449
+ px: {
450
+ base: "4",
451
+ md: "6",
452
+ lg: "8"
453
+ },
454
+ ...props
455
+ };
456
+ } });
457
+ const center = definePattern({
458
+ properties: { inline: { type: "boolean" } },
459
+ transform(props) {
460
+ const { inline, ...rest } = props;
461
+ return {
462
+ display: inline ? "inline-flex" : "flex",
463
+ alignItems: "center",
464
+ justifyContent: "center",
465
+ ...rest
466
+ };
467
+ }
468
+ });
469
+ const aspectRatio = definePattern({
470
+ properties: { ratio: { type: "number" } },
471
+ blocklist: ["aspectRatio"],
472
+ transform(props, { map }) {
473
+ const { ratio = 4 / 3, ...rest } = props;
474
+ return {
475
+ position: "relative",
476
+ _before: {
477
+ content: `""`,
478
+ display: "block",
479
+ height: "0",
480
+ paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
481
+ },
482
+ "&>*": {
483
+ display: "flex",
484
+ justifyContent: "center",
485
+ alignItems: "center",
486
+ overflow: "hidden",
487
+ position: "absolute",
488
+ inset: "0",
489
+ width: "100%",
490
+ height: "100%"
491
+ },
492
+ "&>img, &>video": { objectFit: "cover" },
493
+ ...rest
494
+ };
495
+ }
496
+ });
497
+ const divider = definePattern({
498
+ properties: {
499
+ orientation: {
500
+ type: "enum",
501
+ value: ["horizontal", "vertical"]
502
+ },
503
+ thickness: {
504
+ type: "token",
505
+ value: "sizes",
506
+ property: "borderWidth"
507
+ },
508
+ color: {
509
+ type: "token",
510
+ value: "colors",
511
+ property: "borderColor"
512
+ }
513
+ },
514
+ defaultValues: {
515
+ orientation: "horizontal",
516
+ thickness: "1px"
517
+ },
518
+ transform(props, { map }) {
519
+ const { orientation, thickness, color, ...rest } = props;
520
+ return {
521
+ "--thickness": thickness,
522
+ width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
523
+ height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
524
+ borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
525
+ borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
526
+ borderColor: color,
527
+ ...rest
528
+ };
529
+ }
530
+ });
531
+ const patterns = {
532
+ box,
533
+ flex,
534
+ stack,
535
+ vstack,
536
+ hstack,
537
+ spacer,
538
+ square,
539
+ circle,
540
+ center,
541
+ linkOverlay: definePattern({
542
+ jsxElement: "a",
543
+ transform(props) {
544
+ return {
545
+ _before: {
546
+ content: "\"\"",
547
+ position: "absolute",
548
+ inset: "0",
549
+ zIndex: "0",
550
+ ...props["_before"]
551
+ },
552
+ ...props
553
+ };
554
+ }
555
+ }),
556
+ aspectRatio,
557
+ grid,
558
+ gridItem,
559
+ wrap,
560
+ container: container$1,
561
+ divider,
562
+ float: definePattern({
563
+ properties: {
564
+ offsetX: {
565
+ type: "token",
566
+ value: "spacing",
567
+ property: "left"
568
+ },
569
+ offsetY: {
570
+ type: "token",
571
+ value: "spacing",
572
+ property: "top"
573
+ },
574
+ offset: {
575
+ type: "token",
576
+ value: "spacing",
577
+ property: "top"
578
+ },
579
+ placement: {
580
+ type: "enum",
581
+ value: [
582
+ "bottom-end",
583
+ "bottom-start",
584
+ "top-end",
585
+ "top-start",
586
+ "bottom-center",
587
+ "top-center",
588
+ "middle-center",
589
+ "middle-end",
590
+ "middle-start"
591
+ ]
592
+ }
593
+ },
594
+ defaultValues(props) {
595
+ const offset = props.offset || "0";
596
+ return {
597
+ offset,
598
+ offsetX: offset,
599
+ offsetY: offset,
600
+ placement: "top-end"
601
+ };
602
+ },
603
+ transform(props, { map }) {
604
+ const { offset, offsetX, offsetY, placement, ...rest } = props;
605
+ return {
606
+ display: "inline-flex",
607
+ justifyContent: "center",
608
+ alignItems: "center",
609
+ position: "absolute",
610
+ insetBlockStart: map(placement, (v) => {
611
+ const [side] = v.split("-");
612
+ return {
613
+ top: offsetY,
614
+ middle: "50%",
615
+ bottom: "auto"
616
+ }[side];
617
+ }),
618
+ insetBlockEnd: map(placement, (v) => {
619
+ const [side] = v.split("-");
620
+ return {
621
+ top: "auto",
622
+ middle: "50%",
623
+ bottom: offsetY
624
+ }[side];
625
+ }),
626
+ insetInlineStart: map(placement, (v) => {
627
+ const [, align] = v.split("-");
628
+ return {
629
+ start: offsetX,
630
+ center: "50%",
631
+ end: "auto"
632
+ }[align];
633
+ }),
634
+ insetInlineEnd: map(placement, (v) => {
635
+ const [, align] = v.split("-");
636
+ return {
637
+ start: "auto",
638
+ center: "50%",
639
+ end: offsetX
640
+ }[align];
641
+ }),
642
+ translate: map(placement, (v) => {
643
+ const [side, align] = v.split("-");
644
+ return `${{
645
+ start: "-50%",
646
+ center: "-50%",
647
+ end: "50%"
648
+ }[align]} ${{
649
+ top: "-50%",
650
+ middle: "-50%",
651
+ bottom: "50%"
652
+ }[side]}`;
653
+ }),
654
+ ...rest
655
+ };
656
+ }
657
+ }),
658
+ bleed: definePattern({
659
+ properties: {
660
+ inline: {
661
+ type: "property",
662
+ value: "marginInline"
663
+ },
664
+ block: {
665
+ type: "property",
666
+ value: "marginBlock"
667
+ }
668
+ },
669
+ defaultValues: {
670
+ inline: "0",
671
+ block: "0"
672
+ },
673
+ transform(props, { map, isCssUnit, isCssVar }) {
674
+ const { inline, block, ...rest } = props;
675
+ const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
676
+ return {
677
+ "--bleed-x": map(inline, valueFn),
678
+ "--bleed-y": map(block, valueFn),
679
+ marginInline: "calc(var(--bleed-x, 0) * -1)",
680
+ marginBlock: "calc(var(--bleed-y, 0) * -1)",
681
+ ...rest
682
+ };
683
+ }
684
+ }),
685
+ visuallyHidden: definePattern({ transform(props) {
686
+ return {
687
+ srOnly: true,
688
+ ...props
689
+ };
690
+ } }),
691
+ cq: definePattern({
692
+ properties: {
693
+ name: {
694
+ type: "token",
695
+ value: "containerNames",
696
+ property: "containerName"
697
+ },
698
+ type: {
699
+ type: "property",
700
+ value: "containerType"
701
+ }
702
+ },
703
+ defaultValues: { type: "inline-size" },
704
+ transform(props) {
705
+ const { name, type, ...rest } = props;
706
+ return {
707
+ containerType: type,
708
+ containerName: name,
709
+ ...rest
710
+ };
711
+ }
712
+ })
713
+ };
714
+ //#endregion
715
+ //#region src/color-mix-transform.ts
716
+ const createColorMixTransform = (prop) => (value, args) => {
717
+ const mix = args.utils.colorMix(value);
718
+ if (mix.invalid) return { [prop]: value };
719
+ const cssVar = "--mix-" + prop;
720
+ return {
721
+ [cssVar]: mix.value,
722
+ [prop]: `var(${cssVar}, ${mix.color})`
723
+ };
724
+ };
725
+ //#endregion
726
+ //#region src/utilities/background.ts
727
+ const background = {
728
+ backgroundPosition: {
729
+ shorthand: "bgPosition",
730
+ className: "bg-p",
731
+ group: "Background"
732
+ },
733
+ backgroundPositionX: {
734
+ shorthand: "bgPositionX",
735
+ className: "bg-p-x",
736
+ group: "Background"
737
+ },
738
+ backgroundPositionY: {
739
+ shorthand: "bgPositionY",
740
+ className: "bg-p-y",
741
+ group: "Background"
742
+ },
743
+ backgroundAttachment: {
744
+ shorthand: "bgAttachment",
745
+ className: "bg-a",
746
+ group: "Background"
747
+ },
748
+ backgroundClip: {
749
+ shorthand: "bgClip",
750
+ className: "bg-cp",
751
+ group: "Background",
752
+ transform(value) {
753
+ return {
754
+ backgroundClip: value,
755
+ WebkitBackgroundClip: value
756
+ };
757
+ }
758
+ },
759
+ background: {
760
+ shorthand: "bg",
761
+ className: "bg",
762
+ values: "colors",
763
+ group: "Background",
764
+ transform: createColorMixTransform("background")
765
+ },
766
+ backgroundColor: {
767
+ shorthand: "bgColor",
768
+ className: "bg-c",
769
+ values: "colors",
770
+ group: "Background",
771
+ transform: createColorMixTransform("backgroundColor")
772
+ },
773
+ backgroundOrigin: {
774
+ shorthand: "bgOrigin",
775
+ className: "bg-o",
776
+ group: "Background"
777
+ },
778
+ backgroundImage: {
779
+ shorthand: "bgImage",
780
+ className: "bg-i",
781
+ values: "assets",
782
+ group: "Background"
783
+ },
784
+ backgroundRepeat: {
785
+ shorthand: "bgRepeat",
786
+ className: "bg-r",
787
+ group: "Background"
788
+ },
789
+ backgroundBlendMode: {
790
+ shorthand: "bgBlendMode",
791
+ className: "bg-bm",
792
+ group: "Background"
793
+ },
794
+ backgroundSize: {
795
+ shorthand: "bgSize",
796
+ className: "bg-s",
797
+ group: "Background"
798
+ }
799
+ };
800
+ //#endregion
801
+ //#region src/utilities/border.ts
802
+ const border = {
803
+ borderRadius: {
804
+ className: "bdr",
805
+ shorthand: "rounded",
806
+ values: "radii",
807
+ group: "Border Radius"
808
+ },
809
+ borderTopLeftRadius: {
810
+ className: "bdr-tl",
811
+ shorthand: "roundedTopLeft",
812
+ values: "radii",
813
+ group: "Border Radius"
814
+ },
815
+ borderTopRightRadius: {
816
+ className: "bdr-tr",
817
+ shorthand: "roundedTopRight",
818
+ values: "radii",
819
+ group: "Border Radius"
820
+ },
821
+ borderBottomRightRadius: {
822
+ className: "bdr-br",
823
+ shorthand: "roundedBottomRight",
824
+ values: "radii",
825
+ group: "Border Radius"
826
+ },
827
+ borderBottomLeftRadius: {
828
+ className: "bdr-bl",
829
+ shorthand: "roundedBottomLeft",
830
+ values: "radii",
831
+ group: "Border Radius"
832
+ },
833
+ borderTopRadius: {
834
+ className: "bdr-t",
835
+ shorthand: "roundedTop",
836
+ property: "borderRadius",
837
+ values: "radii",
838
+ group: "Border Radius",
839
+ transform(value) {
840
+ return {
841
+ borderTopLeftRadius: value,
842
+ borderTopRightRadius: value
843
+ };
844
+ }
845
+ },
846
+ borderRightRadius: {
847
+ className: "bdr-r",
848
+ shorthand: "roundedRight",
849
+ property: "borderRadius",
850
+ values: "radii",
851
+ group: "Border Radius",
852
+ transform(value) {
853
+ return {
854
+ borderTopRightRadius: value,
855
+ borderBottomRightRadius: value
856
+ };
857
+ }
858
+ },
859
+ borderBottomRadius: {
860
+ className: "bdr-b",
861
+ shorthand: "roundedBottom",
862
+ property: "borderRadius",
863
+ values: "radii",
864
+ group: "Border Radius",
865
+ transform(value) {
866
+ return {
867
+ borderBottomLeftRadius: value,
868
+ borderBottomRightRadius: value
869
+ };
870
+ }
871
+ },
872
+ borderLeftRadius: {
873
+ className: "bdr-l",
874
+ shorthand: "roundedLeft",
875
+ values: "radii",
876
+ property: "borderRadius",
877
+ group: "Border Radius",
878
+ transform(value) {
879
+ return {
880
+ borderTopLeftRadius: value,
881
+ borderBottomLeftRadius: value
882
+ };
883
+ }
884
+ },
885
+ borderStartStartRadius: {
886
+ className: "bdr-ss",
887
+ shorthand: "roundedStartStart",
888
+ values: "radii",
889
+ group: "Border Radius"
890
+ },
891
+ borderStartEndRadius: {
892
+ className: "bdr-se",
893
+ shorthand: "roundedStartEnd",
894
+ values: "radii",
895
+ group: "Border Radius"
896
+ },
897
+ borderStartRadius: {
898
+ className: "bdr-s",
899
+ values: "radii",
900
+ property: "borderRadius",
901
+ shorthand: "roundedStart",
902
+ group: "Border Radius",
903
+ transform(value) {
904
+ return {
905
+ borderStartStartRadius: value,
906
+ borderEndStartRadius: value
907
+ };
908
+ }
909
+ },
910
+ borderEndStartRadius: {
911
+ className: "bdr-es",
912
+ shorthand: "roundedEndStart",
913
+ values: "radii",
914
+ group: "Border Radius"
915
+ },
916
+ borderEndEndRadius: {
917
+ className: "bdr-ee",
918
+ shorthand: "roundedEndEnd",
919
+ values: "radii",
920
+ group: "Border Radius"
921
+ },
922
+ borderEndRadius: {
923
+ className: "bdr-e",
924
+ shorthand: "roundedEnd",
925
+ property: "borderRadius",
926
+ values: "radii",
927
+ group: "Border Radius",
928
+ transform(value) {
929
+ return {
930
+ borderStartEndRadius: value,
931
+ borderEndEndRadius: value
932
+ };
933
+ }
934
+ },
935
+ border: {
936
+ className: "bd",
937
+ values: "borders",
938
+ group: "Border"
939
+ },
940
+ borderWidth: {
941
+ className: "bd-w",
942
+ values: "borderWidths",
943
+ group: "Border Radius"
944
+ },
945
+ borderTopWidth: {
946
+ className: "bd-t-w",
947
+ values: "borderWidths",
948
+ group: "Border"
949
+ },
950
+ borderLeftWidth: {
951
+ className: "bd-l-w",
952
+ values: "borderWidths",
953
+ group: "Border"
954
+ },
955
+ borderRightWidth: {
956
+ className: "bd-r-w",
957
+ values: "borderWidths",
958
+ group: "Border"
959
+ },
960
+ borderBottomWidth: {
961
+ className: "bd-b-w",
962
+ values: "borderWidths",
963
+ group: "Border"
964
+ },
965
+ borderBlockStartWidth: {
966
+ className: "bd-bs-w",
967
+ values: "borderWidths",
968
+ group: "Border Radius"
969
+ },
970
+ borderBlockEndWidth: {
971
+ className: "bd-be-w",
972
+ values: "borderWidths",
973
+ group: "Border Radius"
974
+ },
975
+ borderColor: {
976
+ className: "bd-c",
977
+ values: "colors",
978
+ group: "Border",
979
+ transform: createColorMixTransform("borderColor")
980
+ },
981
+ borderInline: {
982
+ className: "bd-x",
983
+ values: "borders",
984
+ group: "Border",
985
+ shorthand: "borderX"
986
+ },
987
+ borderInlineWidth: {
988
+ className: "bd-x-w",
989
+ values: "borderWidths",
990
+ group: "Border",
991
+ shorthand: "borderXWidth"
992
+ },
993
+ borderInlineColor: {
994
+ className: "bd-x-c",
995
+ values: "colors",
996
+ group: "Border",
997
+ shorthand: "borderXColor",
998
+ transform: createColorMixTransform("borderInlineColor")
999
+ },
1000
+ borderBlock: {
1001
+ className: "bd-y",
1002
+ values: "borders",
1003
+ group: "Border",
1004
+ shorthand: "borderY"
1005
+ },
1006
+ borderBlockWidth: {
1007
+ className: "bd-y-w",
1008
+ values: "borderWidths",
1009
+ group: "Border",
1010
+ shorthand: "borderYWidth"
1011
+ },
1012
+ borderBlockColor: {
1013
+ className: "bd-y-c",
1014
+ values: "colors",
1015
+ group: "Border",
1016
+ shorthand: "borderYColor",
1017
+ transform: createColorMixTransform("borderBlockColor")
1018
+ },
1019
+ borderLeft: {
1020
+ className: "bd-l",
1021
+ values: "borders",
1022
+ group: "Border"
1023
+ },
1024
+ borderLeftColor: {
1025
+ className: "bd-l-c",
1026
+ values: "colors",
1027
+ group: "Border",
1028
+ transform: createColorMixTransform("borderLeftColor")
1029
+ },
1030
+ borderInlineStart: {
1031
+ className: "bd-s",
1032
+ values: "borders",
1033
+ group: "Border",
1034
+ shorthand: "borderStart"
1035
+ },
1036
+ borderInlineStartWidth: {
1037
+ className: "bd-s-w",
1038
+ values: "borderWidths",
1039
+ group: "Border",
1040
+ shorthand: "borderStartWidth"
1041
+ },
1042
+ borderInlineStartColor: {
1043
+ className: "bd-s-c",
1044
+ values: "colors",
1045
+ group: "Border",
1046
+ shorthand: "borderStartColor",
1047
+ transform: createColorMixTransform("borderInlineStartColor")
1048
+ },
1049
+ borderRight: {
1050
+ className: "bd-r",
1051
+ values: "borders",
1052
+ group: "Border"
1053
+ },
1054
+ borderRightColor: {
1055
+ className: "bd-r-c",
1056
+ values: "colors",
1057
+ group: "Border",
1058
+ transform: createColorMixTransform("borderRightColor")
1059
+ },
1060
+ borderInlineEnd: {
1061
+ className: "bd-e",
1062
+ values: "borders",
1063
+ group: "Border",
1064
+ shorthand: "borderEnd"
1065
+ },
1066
+ borderInlineEndWidth: {
1067
+ className: "bd-e-w",
1068
+ values: "borderWidths",
1069
+ group: "Border",
1070
+ shorthand: "borderEndWidth"
1071
+ },
1072
+ borderInlineEndColor: {
1073
+ className: "bd-e-c",
1074
+ values: "colors",
1075
+ group: "Border",
1076
+ shorthand: "borderEndColor",
1077
+ transform: createColorMixTransform("borderInlineEndColor")
1078
+ },
1079
+ borderTop: {
1080
+ className: "bd-t",
1081
+ values: "borders",
1082
+ group: "Border"
1083
+ },
1084
+ borderTopColor: {
1085
+ className: "bd-t-c",
1086
+ values: "colors",
1087
+ group: "Border",
1088
+ transform: createColorMixTransform("borderTopColor")
1089
+ },
1090
+ borderBottom: {
1091
+ className: "bd-b",
1092
+ values: "borders",
1093
+ group: "Border"
1094
+ },
1095
+ borderBottomColor: {
1096
+ className: "bd-b-c",
1097
+ values: "colors",
1098
+ group: "Border",
1099
+ transform: createColorMixTransform("borderBottomColor")
1100
+ },
1101
+ borderBlockEnd: {
1102
+ className: "bd-be",
1103
+ values: "borders",
1104
+ group: "Border"
1105
+ },
1106
+ borderBlockEndColor: {
1107
+ className: "bd-be-c",
1108
+ values: "colors",
1109
+ group: "Border",
1110
+ transform: createColorMixTransform("borderBlockEndColor")
1111
+ },
1112
+ borderBlockStart: {
1113
+ className: "bd-bs",
1114
+ values: "borders",
1115
+ group: "Border"
1116
+ },
1117
+ borderBlockStartColor: {
1118
+ className: "bd-bs-c",
1119
+ values: "colors",
1120
+ group: "Border",
1121
+ transform: createColorMixTransform("borderBlockStartColor")
1122
+ }
1123
+ };
1124
+ //#endregion
1125
+ //#region src/utilities/container.ts
1126
+ const container = {
1127
+ container: {
1128
+ className: "cq",
1129
+ group: "Container"
1130
+ },
1131
+ containerName: {
1132
+ className: "cq-n",
1133
+ property: "containerName",
1134
+ values: "containerNames",
1135
+ group: "Container"
1136
+ },
1137
+ containerType: {
1138
+ className: "cq-t",
1139
+ group: "Container"
1140
+ }
1141
+ };
1142
+ //#endregion
1143
+ //#region src/utilities/cursor.ts
1144
+ const cursor = { cursor: {
1145
+ className: "cursor",
1146
+ values: "cursor",
1147
+ group: "System"
1148
+ } };
1149
+ //#endregion
1150
+ //#region src/utilities/display.ts
1151
+ const display = {
1152
+ display: {
1153
+ className: "d",
1154
+ group: "Display"
1155
+ },
1156
+ hideFrom: {
1157
+ className: "hide",
1158
+ values: "breakpoints",
1159
+ group: "Display",
1160
+ transform(value, { raw, token }) {
1161
+ return { [token.raw(`breakpoints.${raw}`) ? `@breakpoint ${raw}` : `@media screen and (min-width: ${value})`]: { display: "none" } };
1162
+ }
1163
+ },
1164
+ hideBelow: {
1165
+ className: "show",
1166
+ values: "breakpoints",
1167
+ group: "Display",
1168
+ transform(value, { raw, token }) {
1169
+ return { [token.raw(`breakpoints.${raw}`) ? `@breakpoint ${raw}Down` : `@media screen and (max-width: ${value})`]: { display: "none" } };
1170
+ }
1171
+ }
1172
+ };
1173
+ //#endregion
1174
+ //#region src/utilities/divide.ts
1175
+ const divideColor = createColorMixTransform("borderColor");
1176
+ const divide = {
1177
+ divideX: {
1178
+ className: "dvd-x",
1179
+ values: "borderWidths",
1180
+ group: "Border",
1181
+ transform(value) {
1182
+ return { "& > :not([hidden]) ~ :not([hidden])": {
1183
+ borderInlineStartWidth: value,
1184
+ borderInlineEndWidth: "0px"
1185
+ } };
1186
+ }
1187
+ },
1188
+ divideY: {
1189
+ className: "dvd-y",
1190
+ values: "borderWidths",
1191
+ group: "Border",
1192
+ transform(value) {
1193
+ return { "& > :not([hidden]) ~ :not([hidden])": {
1194
+ borderTopWidth: value,
1195
+ borderBottomWidth: "0px"
1196
+ } };
1197
+ }
1198
+ },
1199
+ divideColor: {
1200
+ className: "dvd-c",
1201
+ values: "colors",
1202
+ group: "Border",
1203
+ transform(value, args) {
1204
+ return { "& > :not([hidden]) ~ :not([hidden])": divideColor(value, args) };
1205
+ }
1206
+ },
1207
+ divideStyle: {
1208
+ className: "dvd-s",
1209
+ property: "borderStyle",
1210
+ group: "Border",
1211
+ transform(value) {
1212
+ return { "& > :not([hidden]) ~ :not([hidden])": { borderStyle: value } };
1213
+ }
1214
+ }
1215
+ };
1216
+ //#endregion
1217
+ //#region src/utilities/effects.ts
1218
+ const effects = {
1219
+ opacity: {
1220
+ className: "op",
1221
+ values: "opacity",
1222
+ group: "Background"
1223
+ },
1224
+ boxShadow: {
1225
+ shorthand: "shadow",
1226
+ className: "bx-sh",
1227
+ values: "shadows",
1228
+ group: "Shadow"
1229
+ },
1230
+ boxShadowColor: {
1231
+ shorthand: "shadowColor",
1232
+ className: "bx-sh-c",
1233
+ values: "colors",
1234
+ transform: createColorMixTransform("--shadow-color"),
1235
+ group: "Color"
1236
+ },
1237
+ mixBlendMode: {
1238
+ className: "mix-bm",
1239
+ group: "Effect"
1240
+ },
1241
+ filter: {
1242
+ className: "filter",
1243
+ group: "Effect",
1244
+ values: { auto: "var(--blur, ) var(--brightness, ) var(--contrast, ) var(--grayscale, ) var(--hue-rotate, ) var(--invert, ) var(--saturate, ) var(--sepia, ) var(--drop-shadow, )" }
1245
+ },
1246
+ brightness: {
1247
+ className: "brightness",
1248
+ group: "Effect",
1249
+ transform(value) {
1250
+ return { "--brightness": `brightness(${value})` };
1251
+ }
1252
+ },
1253
+ contrast: {
1254
+ className: "contrast",
1255
+ group: "Effect",
1256
+ transform(value) {
1257
+ return { "--contrast": `contrast(${value})` };
1258
+ }
1259
+ },
1260
+ grayscale: {
1261
+ className: "grayscale",
1262
+ group: "Effect",
1263
+ transform(value) {
1264
+ return { "--grayscale": `grayscale(${value})` };
1265
+ }
1266
+ },
1267
+ hueRotate: {
1268
+ className: "hue-rotate",
1269
+ group: "Effect",
1270
+ transform(value) {
1271
+ return { "--hue-rotate": `hue-rotate(${value})` };
1272
+ }
1273
+ },
1274
+ invert: {
1275
+ className: "invert",
1276
+ group: "Effect",
1277
+ transform(value) {
1278
+ return { "--invert": `invert(${value})` };
1279
+ }
1280
+ },
1281
+ saturate: {
1282
+ className: "saturate",
1283
+ group: "Effect",
1284
+ transform(value) {
1285
+ return { "--saturate": `saturate(${value})` };
1286
+ }
1287
+ },
1288
+ sepia: {
1289
+ className: "sepia",
1290
+ group: "Effect",
1291
+ transform(value) {
1292
+ return { "--sepia": `sepia(${value})` };
1293
+ }
1294
+ },
1295
+ dropShadow: {
1296
+ className: "drop-shadow",
1297
+ group: "Effect",
1298
+ values: "dropShadows",
1299
+ transform(value) {
1300
+ return { "--drop-shadow": value };
1301
+ }
1302
+ },
1303
+ blur: {
1304
+ className: "blur",
1305
+ group: "Effect",
1306
+ values: "blurs",
1307
+ transform(value) {
1308
+ return { "--blur": `blur(${value})` };
1309
+ }
1310
+ },
1311
+ backdropFilter: {
1312
+ className: "bkdp",
1313
+ group: "Effect",
1314
+ values: { auto: "var(--backdrop-blur, ) var(--backdrop-brightness, ) var(--backdrop-contrast, ) var(--backdrop-grayscale, ) var(--backdrop-hue-rotate, ) var(--backdrop-invert, ) var(--backdrop-opacity, ) var(--backdrop-saturate, ) var(--backdrop-sepia, )" },
1315
+ transform(value) {
1316
+ return {
1317
+ backdropFilter: value,
1318
+ WebkitBackdropFilter: value
1319
+ };
1320
+ }
1321
+ },
1322
+ backdropBlur: {
1323
+ className: "bkdp-blur",
1324
+ group: "Effect",
1325
+ values: "blurs",
1326
+ transform(value) {
1327
+ return { "--backdrop-blur": `blur(${value})` };
1328
+ }
1329
+ },
1330
+ backdropBrightness: {
1331
+ className: "bkdp-brightness",
1332
+ group: "Effect",
1333
+ transform(value) {
1334
+ return { "--backdrop-brightness": `brightness(${value})` };
1335
+ }
1336
+ },
1337
+ backdropContrast: {
1338
+ className: "bkdp-contrast",
1339
+ group: "Effect",
1340
+ transform(value) {
1341
+ return { "--backdrop-contrast": `contrast(${value})` };
1342
+ }
1343
+ },
1344
+ backdropGrayscale: {
1345
+ className: "bkdp-grayscale",
1346
+ group: "Effect",
1347
+ transform(value) {
1348
+ return { "--backdrop-grayscale": `grayscale(${value})` };
1349
+ }
1350
+ },
1351
+ backdropHueRotate: {
1352
+ className: "bkdp-hue-rotate",
1353
+ group: "Effect",
1354
+ transform(value) {
1355
+ return { "--backdrop-hue-rotate": `hue-rotate(${value})` };
1356
+ }
1357
+ },
1358
+ backdropInvert: {
1359
+ className: "bkdp-invert",
1360
+ group: "Effect",
1361
+ transform(value) {
1362
+ return { "--backdrop-invert": `invert(${value})` };
1363
+ }
1364
+ },
1365
+ backdropOpacity: {
1366
+ className: "bkdp-opacity",
1367
+ group: "Effect",
1368
+ transform(value) {
1369
+ return { "--backdrop-opacity": value };
1370
+ }
1371
+ },
1372
+ backdropSaturate: {
1373
+ className: "bkdp-saturate",
1374
+ group: "Effect",
1375
+ transform(value) {
1376
+ return { "--backdrop-saturate": `saturate(${value})` };
1377
+ }
1378
+ },
1379
+ backdropSepia: {
1380
+ className: "bkdp-sepia",
1381
+ group: "Effect",
1382
+ transform(value) {
1383
+ return { "--backdrop-sepia": `sepia(${value})` };
1384
+ }
1385
+ }
1386
+ };
1387
+ //#endregion
1388
+ //#region src/utilities/flex-and-grid.ts
1389
+ const flexGrid = {
1390
+ flexBasis: {
1391
+ className: "flex-b",
1392
+ group: "Flex Layout",
1393
+ values(theme) {
1394
+ return {
1395
+ ...theme("sizes"),
1396
+ "1/2": "50%",
1397
+ "1/3": "33.333333%",
1398
+ "2/3": "66.666667%",
1399
+ "1/4": "25%",
1400
+ "2/4": "50%",
1401
+ "3/4": "75%",
1402
+ "1/5": "20%",
1403
+ "2/5": "40%",
1404
+ "3/5": "60%",
1405
+ "4/5": "80%",
1406
+ "1/6": "16.666667%",
1407
+ "2/6": "33.333333%",
1408
+ "3/6": "50%",
1409
+ "4/6": "66.666667%",
1410
+ "5/6": "83.333333%",
1411
+ "1/12": "8.333333%",
1412
+ "2/12": "16.666667%",
1413
+ "3/12": "25%",
1414
+ "4/12": "33.333333%",
1415
+ "5/12": "41.666667%",
1416
+ "6/12": "50%",
1417
+ "7/12": "58.333333%",
1418
+ "8/12": "66.666667%",
1419
+ "9/12": "75%",
1420
+ "10/12": "83.333333%",
1421
+ "11/12": "91.666667%",
1422
+ full: "100%"
1423
+ };
1424
+ }
1425
+ },
1426
+ flex: {
1427
+ className: "flex",
1428
+ group: "Flex Layout",
1429
+ values: {
1430
+ "1": "1 1 0%",
1431
+ auto: "1 1 auto",
1432
+ initial: "0 1 auto",
1433
+ none: "none"
1434
+ }
1435
+ },
1436
+ flexDirection: {
1437
+ className: "flex-d",
1438
+ group: "Flex Layout",
1439
+ shorthand: "flexDir"
1440
+ },
1441
+ flexGrow: {
1442
+ className: "flex-g",
1443
+ group: "Flex Layout"
1444
+ },
1445
+ flexShrink: {
1446
+ className: "flex-sh",
1447
+ group: "Flex Layout"
1448
+ },
1449
+ gridTemplateColumns: {
1450
+ className: "grid-tc",
1451
+ group: "Grid Layout"
1452
+ },
1453
+ gridTemplateRows: {
1454
+ className: "grid-tr",
1455
+ group: "Grid Layout"
1456
+ },
1457
+ gridColumn: {
1458
+ className: "grid-c",
1459
+ group: "Grid Layout"
1460
+ },
1461
+ gridRow: {
1462
+ className: "grid-r",
1463
+ group: "Grid Layout"
1464
+ },
1465
+ gridColumnStart: {
1466
+ className: "grid-cs",
1467
+ group: "Grid Layout"
1468
+ },
1469
+ gridColumnEnd: {
1470
+ className: "grid-ce",
1471
+ group: "Grid Layout"
1472
+ },
1473
+ gridAutoFlow: {
1474
+ className: "grid-af",
1475
+ group: "Grid Layout"
1476
+ },
1477
+ gridAutoColumns: {
1478
+ className: "grid-ac",
1479
+ group: "Grid Layout",
1480
+ values: {
1481
+ min: "min-content",
1482
+ max: "max-content",
1483
+ fr: "minmax(0, 1fr)"
1484
+ }
1485
+ },
1486
+ gridAutoRows: {
1487
+ className: "grid-ar",
1488
+ group: "Grid Layout",
1489
+ values: {
1490
+ min: "min-content",
1491
+ max: "max-content",
1492
+ fr: "minmax(0, 1fr)"
1493
+ }
1494
+ },
1495
+ gap: {
1496
+ className: "gap",
1497
+ group: "Flex Layout",
1498
+ values: "spacing"
1499
+ },
1500
+ gridGap: {
1501
+ className: "grid-g",
1502
+ group: "Grid Layout",
1503
+ values: "spacing"
1504
+ },
1505
+ gridRowGap: {
1506
+ className: "grid-rg",
1507
+ group: "Grid Layout",
1508
+ values: "spacing"
1509
+ },
1510
+ gridColumnGap: {
1511
+ className: "grid-cg",
1512
+ group: "Grid Layout",
1513
+ values: "spacing"
1514
+ },
1515
+ rowGap: {
1516
+ className: "rg",
1517
+ group: "Grid Layout",
1518
+ values: "spacing"
1519
+ },
1520
+ columnGap: {
1521
+ className: "cg",
1522
+ group: "Grid Layout",
1523
+ values: "spacing"
1524
+ },
1525
+ justifyContent: {
1526
+ className: "jc",
1527
+ group: "Flex Layout"
1528
+ },
1529
+ alignContent: {
1530
+ className: "ac",
1531
+ group: "Flex Layout"
1532
+ },
1533
+ alignItems: {
1534
+ className: "ai",
1535
+ group: "Flex Layout"
1536
+ },
1537
+ alignSelf: {
1538
+ className: "as",
1539
+ group: "Flex Layout"
1540
+ }
1541
+ };
1542
+ //#endregion
1543
+ //#region src/utilities/focus-ring.ts
1544
+ function createFocusRing(selector, className) {
1545
+ return {
1546
+ className,
1547
+ group: "Focus Ring",
1548
+ values: [
1549
+ "outside",
1550
+ "inside",
1551
+ "mixed",
1552
+ "none"
1553
+ ],
1554
+ transform(value) {
1555
+ const focusRingColor = `var(--focus-ring-color-prop, var(--global-color-focus-ring, #005FCC))`;
1556
+ switch (value) {
1557
+ case "inside": return {
1558
+ "--focus-ring-color": focusRingColor,
1559
+ [selector]: {
1560
+ outlineOffset: "0px",
1561
+ outlineWidth: "var(--focus-ring-width, 1px)",
1562
+ outlineColor: "var(--focus-ring-color)",
1563
+ outlineStyle: "var(--focus-ring-style, solid)",
1564
+ borderColor: "var(--focus-ring-color)"
1565
+ }
1566
+ };
1567
+ case "outside": return {
1568
+ "--focus-ring-color": focusRingColor,
1569
+ [selector]: {
1570
+ outlineWidth: "var(--focus-ring-width, 2px)",
1571
+ outlineOffset: "var(--focus-ring-offset, 2px)",
1572
+ outlineStyle: "var(--focus-ring-style, solid)",
1573
+ outlineColor: "var(--focus-ring-color)"
1574
+ }
1575
+ };
1576
+ case "mixed": return {
1577
+ "--focus-ring-color": focusRingColor,
1578
+ [selector]: {
1579
+ outlineOffset: "0px",
1580
+ outlineWidth: "var(--focus-ring-width, 3px)",
1581
+ outlineStyle: "var(--focus-ring-style, solid)",
1582
+ outlineColor: "color-mix(in srgb, var(--focus-ring-color), transparent 60%)",
1583
+ borderColor: "var(--focus-ring-color)"
1584
+ }
1585
+ };
1586
+ case "none": return {
1587
+ "--focus-ring-color": focusRingColor,
1588
+ [selector]: { outline: "none" }
1589
+ };
1590
+ default: return {};
1591
+ }
1592
+ }
1593
+ };
1594
+ }
1595
+ const focusRing = {
1596
+ focusRing: createFocusRing("&:is(:focus, [data-focus])", "focus-ring"),
1597
+ focusVisibleRing: createFocusRing("&:is(:focus-visible, [data-focus-visible])", "focus-v-ring"),
1598
+ focusRingColor: {
1599
+ className: "focus-ring-c",
1600
+ values: "colors",
1601
+ group: "Focus Ring",
1602
+ transform(value, { utils }) {
1603
+ const prop = "--focus-ring-color-prop";
1604
+ const mix = utils.colorMix(value);
1605
+ if (mix.invalid) return { [prop]: value };
1606
+ const cssVar = "--mix-" + prop;
1607
+ return {
1608
+ [cssVar]: mix.value,
1609
+ [prop]: `var(${cssVar}, ${mix.color})`
1610
+ };
1611
+ }
1612
+ },
1613
+ focusRingOffset: {
1614
+ className: "focus-ring-o",
1615
+ values: "spacing",
1616
+ group: "Focus Ring",
1617
+ transform: (v) => ({ "--focus-ring-offset": v })
1618
+ },
1619
+ focusRingWidth: {
1620
+ className: "focus-ring-w",
1621
+ values: "borderWidths",
1622
+ property: "outlineWidth",
1623
+ group: "Focus Ring",
1624
+ transform: (v) => ({ "--focus-ring-width": v })
1625
+ },
1626
+ focusRingStyle: {
1627
+ className: "focus-ring-s",
1628
+ values: "borderStyles",
1629
+ property: "outlineStyle",
1630
+ group: "Focus Ring",
1631
+ transform: (v) => ({ "--focus-ring-style": v })
1632
+ }
1633
+ };
1634
+ //#endregion
1635
+ //#region src/utilities/gradient.ts
1636
+ const gradientVia = createColorMixTransform("--gradient-via");
1637
+ const linearGradientDirectionMap = new Map([
1638
+ ["to-t", "to top"],
1639
+ ["to-tr", "to top right"],
1640
+ ["to-r", "to right"],
1641
+ ["to-br", "to bottom right"],
1642
+ ["to-b", "to bottom"],
1643
+ ["to-bl", "to bottom left"],
1644
+ ["to-l", "to left"],
1645
+ ["to-tl", "to top left"]
1646
+ ]);
1647
+ const isGradientShortcut = (value) => linearGradientDirectionMap.has(value);
1648
+ const linearGradientValues = (theme) => {
1649
+ return {
1650
+ ...theme("gradients"),
1651
+ ...Object.fromEntries(linearGradientDirectionMap.entries())
1652
+ };
1653
+ };
1654
+ const gradientStops = "var(--gradient-via-stops, var(--gradient-position), var(--gradient-from) var(--gradient-from-position), var(--gradient-to) var(--gradient-to-position))";
1655
+ const gradientViaStops = "var(--gradient-position), var(--gradient-from) var(--gradient-from-position), var(--gradient-via) var(--gradient-via-position), var(--gradient-to) var(--gradient-to-position)";
1656
+ const backgroundGradients = {
1657
+ backgroundGradient: {
1658
+ shorthand: "bgGradient",
1659
+ className: "bg-grad",
1660
+ group: "Background Gradient",
1661
+ values: linearGradientValues,
1662
+ transform(value, { raw, token }) {
1663
+ const tokenValue = token(`gradients.${raw}`);
1664
+ if (tokenValue) return { backgroundImage: tokenValue };
1665
+ if (!isGradientShortcut(raw)) return { backgroundImage: value };
1666
+ return {
1667
+ "--gradient-stops": gradientStops,
1668
+ "--gradient-position": linearGradientDirectionMap.get(raw),
1669
+ backgroundImage: `linear-gradient(var(--gradient-stops))`
1670
+ };
1671
+ }
1672
+ },
1673
+ backgroundLinear: {
1674
+ shorthand: "bgLinear",
1675
+ className: "bg-linear",
1676
+ group: "Background Gradient",
1677
+ values: linearGradientValues,
1678
+ transform(value, { raw, token }) {
1679
+ const tokenValue = token(`gradients.${raw}`);
1680
+ if (tokenValue) return { backgroundImage: tokenValue };
1681
+ if (!isGradientShortcut(raw)) return { backgroundImage: value };
1682
+ return {
1683
+ "--gradient-stops": gradientStops,
1684
+ "--gradient-position": linearGradientDirectionMap.get(raw),
1685
+ backgroundImage: `linear-gradient(var(--gradient-stops))`
1686
+ };
1687
+ }
1688
+ },
1689
+ backgroundRadial: {
1690
+ shorthand: "bgRadial",
1691
+ className: "bg-radial",
1692
+ group: "Background Gradient",
1693
+ values: "gradients",
1694
+ transform(value, { raw, token }) {
1695
+ const tokenValue = token(`gradients.${raw}`);
1696
+ if (tokenValue) return { backgroundImage: tokenValue };
1697
+ return {
1698
+ "--gradient-stops": gradientStops,
1699
+ "--gradient-position": value,
1700
+ backgroundImage: `radial-gradient(var(--gradient-stops,${value}))`
1701
+ };
1702
+ }
1703
+ },
1704
+ backgroundConic: {
1705
+ shorthand: "bgConic",
1706
+ className: "bg-conic",
1707
+ group: "Background Gradient",
1708
+ transform(value) {
1709
+ return {
1710
+ "--gradient-stops": gradientStops,
1711
+ "--gradient-position": value,
1712
+ backgroundImage: `conic-gradient(var(--gradient-stops))`
1713
+ };
1714
+ }
1715
+ },
1716
+ textGradient: {
1717
+ className: "txt-grad",
1718
+ group: "Background Gradient",
1719
+ values: linearGradientValues,
1720
+ transform(value, { raw, token }) {
1721
+ const tokenValue = token(`gradients.${raw}`);
1722
+ if (tokenValue) return {
1723
+ backgroundImage: tokenValue,
1724
+ WebkitBackgroundClip: "text",
1725
+ color: "transparent"
1726
+ };
1727
+ if (!isGradientShortcut(raw)) return {
1728
+ backgroundImage: value,
1729
+ WebkitBackgroundClip: "text",
1730
+ color: "transparent"
1731
+ };
1732
+ return {
1733
+ "--gradient-stops": gradientStops,
1734
+ "--gradient-position": linearGradientDirectionMap.get(raw),
1735
+ backgroundImage: `linear-gradient(var(--gradient-stops))`,
1736
+ WebkitBackgroundClip: "text",
1737
+ color: "transparent"
1738
+ };
1739
+ }
1740
+ },
1741
+ gradientFromPosition: {
1742
+ className: "grad-from-pos",
1743
+ group: "Background Gradient",
1744
+ transform(value) {
1745
+ return { "--gradient-from-position": value };
1746
+ }
1747
+ },
1748
+ gradientToPosition: {
1749
+ className: "grad-to-pos",
1750
+ group: "Background Gradient",
1751
+ transform(value) {
1752
+ return { "--gradient-to-position": value };
1753
+ }
1754
+ },
1755
+ gradientFrom: {
1756
+ className: "grad-from",
1757
+ values: "colors",
1758
+ group: "Background Gradient",
1759
+ transform: createColorMixTransform("--gradient-from")
1760
+ },
1761
+ gradientTo: {
1762
+ className: "grad-to",
1763
+ values: "colors",
1764
+ group: "Background Gradient",
1765
+ transform: createColorMixTransform("--gradient-to")
1766
+ },
1767
+ gradientVia: {
1768
+ className: "grad-via",
1769
+ values: "colors",
1770
+ group: "Background Gradient",
1771
+ transform(value, args) {
1772
+ return {
1773
+ ...gradientVia(value, args),
1774
+ "--gradient-stops": "var(--gradient-via-stops)",
1775
+ "--gradient-via-stops": gradientViaStops
1776
+ };
1777
+ }
1778
+ },
1779
+ gradientViaPosition: {
1780
+ className: "grad-via-pos",
1781
+ group: "Background Gradient",
1782
+ transform(value) {
1783
+ return { "--gradient-via-position": value };
1784
+ }
1785
+ }
1786
+ };
1787
+ //#endregion
1788
+ //#region src/utilities/helpers.ts
1789
+ const srMapping = {
1790
+ true: {
1791
+ position: "absolute",
1792
+ width: "1px",
1793
+ height: "1px",
1794
+ padding: "0",
1795
+ margin: "-1px",
1796
+ overflow: "hidden",
1797
+ clip: "rect(0, 0, 0, 0)",
1798
+ whiteSpace: "nowrap",
1799
+ borderWidth: "0"
1800
+ },
1801
+ false: {
1802
+ position: "static",
1803
+ width: "auto",
1804
+ height: "auto",
1805
+ padding: "0",
1806
+ margin: "0",
1807
+ overflow: "visible",
1808
+ clip: "auto",
1809
+ whiteSpace: "normal"
1810
+ }
1811
+ };
1812
+ const helpers = {
1813
+ srOnly: {
1814
+ className: "sr",
1815
+ values: { type: "boolean" },
1816
+ group: "Other",
1817
+ transform(value) {
1818
+ return srMapping[value] || {};
1819
+ }
1820
+ },
1821
+ debug: {
1822
+ className: "debug",
1823
+ values: { type: "boolean" },
1824
+ group: "Other",
1825
+ transform(value) {
1826
+ if (!value) return {};
1827
+ return {
1828
+ outline: "1px solid blue !important",
1829
+ "&>*": { outline: "1px solid red !important" }
1830
+ };
1831
+ }
1832
+ }
1833
+ };
1834
+ //#endregion
1835
+ //#region src/utilities/interactivity.ts
1836
+ const interactivity = {
1837
+ accentColor: {
1838
+ className: "ac-c",
1839
+ values: "colors",
1840
+ transform: createColorMixTransform("accentColor"),
1841
+ group: "Color"
1842
+ },
1843
+ caretColor: {
1844
+ className: "ca-c",
1845
+ values: "colors",
1846
+ group: "Color",
1847
+ transform: createColorMixTransform("caretColor")
1848
+ },
1849
+ scrollBehavior: {
1850
+ className: "scr-bhv",
1851
+ group: "Scroll"
1852
+ },
1853
+ scrollbar: {
1854
+ className: "scr-bar",
1855
+ values: ["visible", "hidden"],
1856
+ group: "Scroll",
1857
+ transform(value) {
1858
+ if (value === "visible") return {
1859
+ msOverflowStyle: "auto",
1860
+ scrollbarWidth: "auto",
1861
+ "&::-webkit-scrollbar": { display: "block" }
1862
+ };
1863
+ if (value === "hidden") return {
1864
+ msOverflowStyle: "none",
1865
+ scrollbarWidth: "none",
1866
+ "&::-webkit-scrollbar": { display: "none" }
1867
+ };
1868
+ }
1869
+ },
1870
+ scrollbarColor: {
1871
+ className: "scr-bar-c",
1872
+ values: "colors",
1873
+ group: "Scroll",
1874
+ transform: createColorMixTransform("scrollbarColor")
1875
+ },
1876
+ scrollbarGutter: {
1877
+ className: "scr-bar-g",
1878
+ group: "Scroll"
1879
+ },
1880
+ scrollbarWidth: {
1881
+ className: "scr-bar-w",
1882
+ values: "sizes",
1883
+ group: "Scroll"
1884
+ },
1885
+ scrollMargin: {
1886
+ className: "scr-m",
1887
+ values: "spacing",
1888
+ group: "Scroll"
1889
+ },
1890
+ scrollMarginLeft: {
1891
+ className: "scr-ml",
1892
+ values: "spacing",
1893
+ group: "Scroll"
1894
+ },
1895
+ scrollMarginRight: {
1896
+ className: "scr-mr",
1897
+ values: "spacing",
1898
+ group: "Scroll"
1899
+ },
1900
+ scrollMarginTop: {
1901
+ className: "scr-mt",
1902
+ values: "spacing",
1903
+ group: "Scroll"
1904
+ },
1905
+ scrollMarginBottom: {
1906
+ className: "scr-mb",
1907
+ values: "spacing",
1908
+ group: "Scroll"
1909
+ },
1910
+ scrollMarginBlock: {
1911
+ className: "scr-my",
1912
+ values: "spacing",
1913
+ group: "Scroll",
1914
+ shorthand: ["scrollMarginY"]
1915
+ },
1916
+ scrollMarginBlockEnd: {
1917
+ className: "scr-mbe",
1918
+ values: "spacing",
1919
+ group: "Scroll"
1920
+ },
1921
+ scrollMarginBlockStart: {
1922
+ className: "scr-mbt",
1923
+ values: "spacing",
1924
+ group: "Scroll"
1925
+ },
1926
+ scrollMarginInline: {
1927
+ className: "scr-mx",
1928
+ values: "spacing",
1929
+ group: "Scroll",
1930
+ shorthand: ["scrollMarginX"]
1931
+ },
1932
+ scrollMarginInlineEnd: {
1933
+ className: "scr-me",
1934
+ values: "spacing",
1935
+ group: "Scroll"
1936
+ },
1937
+ scrollMarginInlineStart: {
1938
+ className: "scr-ms",
1939
+ values: "spacing",
1940
+ group: "Scroll"
1941
+ },
1942
+ scrollPadding: {
1943
+ className: "scr-p",
1944
+ values: "spacing",
1945
+ group: "Scroll"
1946
+ },
1947
+ scrollPaddingBlock: {
1948
+ className: "scr-py",
1949
+ values: "spacing",
1950
+ group: "Scroll",
1951
+ shorthand: ["scrollPaddingY"]
1952
+ },
1953
+ scrollPaddingBlockStart: {
1954
+ className: "scr-pbs",
1955
+ values: "spacing",
1956
+ group: "Scroll"
1957
+ },
1958
+ scrollPaddingBlockEnd: {
1959
+ className: "scr-pbe",
1960
+ values: "spacing",
1961
+ group: "Scroll"
1962
+ },
1963
+ scrollPaddingInline: {
1964
+ className: "scr-px",
1965
+ values: "spacing",
1966
+ group: "Scroll",
1967
+ shorthand: ["scrollPaddingX"]
1968
+ },
1969
+ scrollPaddingInlineEnd: {
1970
+ className: "scr-pe",
1971
+ values: "spacing",
1972
+ group: "Scroll"
1973
+ },
1974
+ scrollPaddingInlineStart: {
1975
+ className: "scr-ps",
1976
+ values: "spacing",
1977
+ group: "Scroll"
1978
+ },
1979
+ scrollPaddingLeft: {
1980
+ className: "scr-pl",
1981
+ values: "spacing",
1982
+ group: "Scroll"
1983
+ },
1984
+ scrollPaddingRight: {
1985
+ className: "scr-pr",
1986
+ values: "spacing",
1987
+ group: "Scroll"
1988
+ },
1989
+ scrollPaddingTop: {
1990
+ className: "scr-pt",
1991
+ values: "spacing",
1992
+ group: "Scroll"
1993
+ },
1994
+ scrollPaddingBottom: {
1995
+ className: "scr-pb",
1996
+ values: "spacing",
1997
+ group: "Scroll"
1998
+ },
1999
+ scrollSnapAlign: {
2000
+ className: "scr-sa",
2001
+ group: "Scroll"
2002
+ },
2003
+ scrollSnapStop: {
2004
+ className: "scrs-s",
2005
+ group: "Scroll"
2006
+ },
2007
+ scrollSnapType: {
2008
+ className: "scrs-t",
2009
+ group: "Scroll",
2010
+ values: {
2011
+ none: "none",
2012
+ x: "x var(--scroll-snap-strictness)",
2013
+ y: "y var(--scroll-snap-strictness)",
2014
+ both: "both var(--scroll-snap-strictness)"
2015
+ }
2016
+ },
2017
+ scrollSnapStrictness: {
2018
+ className: "scrs-strt",
2019
+ values: ["mandatory", "proximity"],
2020
+ group: "Scroll",
2021
+ transform(value) {
2022
+ return { "--scroll-snap-strictness": value };
2023
+ }
2024
+ },
2025
+ scrollSnapMargin: {
2026
+ className: "scrs-m",
2027
+ values: "spacing",
2028
+ group: "Scroll"
2029
+ },
2030
+ scrollSnapMarginTop: {
2031
+ className: "scrs-mt",
2032
+ values: "spacing",
2033
+ group: "Scroll"
2034
+ },
2035
+ scrollSnapMarginBottom: {
2036
+ className: "scrs-mb",
2037
+ values: "spacing",
2038
+ group: "Scroll"
2039
+ },
2040
+ scrollSnapMarginLeft: {
2041
+ className: "scrs-ml",
2042
+ values: "spacing",
2043
+ group: "Scroll"
2044
+ },
2045
+ scrollSnapMarginRight: {
2046
+ className: "scrs-mr",
2047
+ values: "spacing",
2048
+ group: "Scroll"
2049
+ },
2050
+ scrollSnapCoordinate: {
2051
+ className: "scrs-c",
2052
+ group: "Scroll"
2053
+ },
2054
+ scrollSnapDestination: {
2055
+ className: "scrs-d",
2056
+ group: "Scroll"
2057
+ },
2058
+ scrollSnapPointsX: {
2059
+ className: "scrs-px",
2060
+ group: "Scroll"
2061
+ },
2062
+ scrollSnapPointsY: {
2063
+ className: "scrs-py",
2064
+ group: "Scroll"
2065
+ },
2066
+ scrollSnapTypeX: {
2067
+ className: "scrs-tx",
2068
+ group: "Scroll"
2069
+ },
2070
+ scrollSnapTypeY: {
2071
+ className: "scrs-ty",
2072
+ group: "Scroll"
2073
+ },
2074
+ scrollTimeline: {
2075
+ className: "scrtl",
2076
+ group: "Scroll"
2077
+ },
2078
+ scrollTimelineAxis: {
2079
+ className: "scrtl-a",
2080
+ group: "Scroll"
2081
+ },
2082
+ scrollTimelineName: {
2083
+ className: "scrtl-n",
2084
+ group: "Scroll"
2085
+ },
2086
+ touchAction: {
2087
+ className: "tch-a",
2088
+ group: "Interactivity"
2089
+ },
2090
+ userSelect: {
2091
+ className: "us",
2092
+ group: "Interactivity",
2093
+ transform(value) {
2094
+ return {
2095
+ WebkitUserSelect: value,
2096
+ userSelect: value
2097
+ };
2098
+ }
2099
+ },
2100
+ overflow: {
2101
+ className: "ov",
2102
+ group: "Scroll"
2103
+ },
2104
+ overflowWrap: {
2105
+ className: "ov-wrap",
2106
+ group: "Scroll"
2107
+ },
2108
+ overflowX: {
2109
+ className: "ov-x",
2110
+ group: "Scroll"
2111
+ },
2112
+ overflowY: {
2113
+ className: "ov-y",
2114
+ group: "Scroll"
2115
+ },
2116
+ overflowAnchor: {
2117
+ className: "ov-a",
2118
+ group: "Scroll"
2119
+ },
2120
+ overflowBlock: {
2121
+ className: "ov-b",
2122
+ group: "Scroll"
2123
+ },
2124
+ overflowInline: {
2125
+ className: "ov-i",
2126
+ group: "Scroll"
2127
+ },
2128
+ overflowClipBox: {
2129
+ className: "ovcp-bx",
2130
+ group: "Scroll"
2131
+ },
2132
+ overflowClipMargin: {
2133
+ className: "ovcp-m",
2134
+ group: "Scroll"
2135
+ },
2136
+ overscrollBehavior: {
2137
+ className: "ovs-b",
2138
+ group: "Scroll"
2139
+ },
2140
+ overscrollBehaviorX: {
2141
+ className: "ovs-bx",
2142
+ group: "Scroll"
2143
+ },
2144
+ overscrollBehaviorY: {
2145
+ className: "ovs-by",
2146
+ group: "Scroll"
2147
+ },
2148
+ overscrollBehaviorBlock: {
2149
+ className: "ovs-bb",
2150
+ group: "Scroll"
2151
+ },
2152
+ overscrollBehaviorInline: {
2153
+ className: "ovs-bi",
2154
+ group: "Scroll"
2155
+ }
2156
+ };
2157
+ //#endregion
2158
+ //#region src/utilities/layout.ts
2159
+ const layout = {
2160
+ aspectRatio: {
2161
+ className: "asp",
2162
+ values: "aspectRatios",
2163
+ group: "Layout"
2164
+ },
2165
+ boxDecorationBreak: {
2166
+ className: "bx-db",
2167
+ group: "Layout",
2168
+ transform(value) {
2169
+ return {
2170
+ boxDecorationBreak: value,
2171
+ WebkitBoxDecorationBreak: value
2172
+ };
2173
+ }
2174
+ },
2175
+ zIndex: {
2176
+ className: "z",
2177
+ values: "zIndex",
2178
+ group: "Visibility"
2179
+ },
2180
+ boxSizing: {
2181
+ className: "bx-s",
2182
+ group: "System"
2183
+ },
2184
+ objectPosition: {
2185
+ className: "obj-p",
2186
+ group: "Layout"
2187
+ },
2188
+ objectFit: {
2189
+ className: "obj-f",
2190
+ group: "Layout"
2191
+ },
2192
+ overscrollBehavior: {
2193
+ className: "ovscl",
2194
+ group: "Scroll"
2195
+ },
2196
+ overscrollBehaviorX: {
2197
+ className: "ovscl-x",
2198
+ group: "Scroll"
2199
+ },
2200
+ overscrollBehaviorY: {
2201
+ className: "ovscl-y",
2202
+ group: "Scroll"
2203
+ },
2204
+ position: {
2205
+ className: "pos",
2206
+ shorthand: "pos",
2207
+ group: "Position"
2208
+ },
2209
+ top: {
2210
+ className: "top",
2211
+ values: "spacing",
2212
+ group: "Position"
2213
+ },
2214
+ left: {
2215
+ className: "left",
2216
+ values: "spacing",
2217
+ group: "Position"
2218
+ },
2219
+ inset: {
2220
+ className: "inset",
2221
+ group: "Position",
2222
+ values: (theme) => ({
2223
+ auto: "auto",
2224
+ ...theme("spacing")
2225
+ })
2226
+ },
2227
+ insetInline: {
2228
+ className: "inset-x",
2229
+ values: "spacing",
2230
+ group: "Position",
2231
+ shorthand: ["insetX"]
2232
+ },
2233
+ insetBlock: {
2234
+ className: "inset-y",
2235
+ values: "spacing",
2236
+ group: "Position",
2237
+ shorthand: ["insetY"]
2238
+ },
2239
+ insetBlockEnd: {
2240
+ className: "inset-be",
2241
+ values: "spacing",
2242
+ group: "Position"
2243
+ },
2244
+ insetBlockStart: {
2245
+ className: "inset-bs",
2246
+ values: "spacing",
2247
+ group: "Position"
2248
+ },
2249
+ insetInlineEnd: {
2250
+ className: "inset-e",
2251
+ values: "spacing",
2252
+ group: "Position",
2253
+ shorthand: ["insetEnd", "end"]
2254
+ },
2255
+ insetInlineStart: {
2256
+ className: "inset-s",
2257
+ values: "spacing",
2258
+ group: "Position",
2259
+ shorthand: ["insetStart", "start"]
2260
+ },
2261
+ right: {
2262
+ className: "right",
2263
+ values: "spacing",
2264
+ group: "Position"
2265
+ },
2266
+ bottom: {
2267
+ className: "bottom",
2268
+ values: "spacing",
2269
+ group: "Position"
2270
+ },
2271
+ float: {
2272
+ className: "float",
2273
+ values: ["start", "end"],
2274
+ property: "float",
2275
+ group: "Position",
2276
+ transform(value) {
2277
+ if (value === "start") return {
2278
+ float: "left",
2279
+ "[dir=\"rtl\"] &": { float: "right" }
2280
+ };
2281
+ if (value === "end") return {
2282
+ float: "right",
2283
+ "[dir=\"rtl\"] &": { float: "left" }
2284
+ };
2285
+ return { float: value };
2286
+ }
2287
+ },
2288
+ visibility: {
2289
+ className: "vis",
2290
+ group: "Visibility"
2291
+ }
2292
+ };
2293
+ //#endregion
2294
+ //#region src/utilities/list.ts
2295
+ const list = {
2296
+ listStyleType: {
2297
+ className: "li-t",
2298
+ group: "List"
2299
+ },
2300
+ listStylePosition: {
2301
+ className: "li-pos",
2302
+ group: "List"
2303
+ },
2304
+ listStyleImage: {
2305
+ className: "li-img",
2306
+ group: "List",
2307
+ values: "assets"
2308
+ },
2309
+ listStyle: {
2310
+ className: "li-s",
2311
+ group: "List"
2312
+ }
2313
+ };
2314
+ //#endregion
2315
+ //#region src/utilities/outline.ts
2316
+ const outline = {
2317
+ outlineWidth: {
2318
+ className: "ring-w",
2319
+ shorthand: "ringWidth",
2320
+ values: "borderWidths",
2321
+ group: "Border"
2322
+ },
2323
+ outlineColor: {
2324
+ className: "ring-c",
2325
+ values: "colors",
2326
+ group: "Color",
2327
+ shorthand: "ringColor",
2328
+ transform: createColorMixTransform("outlineColor")
2329
+ },
2330
+ outline: {
2331
+ className: "ring",
2332
+ shorthand: "ring",
2333
+ values: "borders",
2334
+ group: "Border",
2335
+ transform(value) {
2336
+ if (value === "none") return {
2337
+ outline: "2px solid transparent",
2338
+ outlineOffset: "2px"
2339
+ };
2340
+ return { outline: value };
2341
+ }
2342
+ },
2343
+ outlineOffset: {
2344
+ className: "ring-o",
2345
+ shorthand: "ringOffset",
2346
+ values: "spacing",
2347
+ group: "Border"
2348
+ }
2349
+ };
2350
+ //#endregion
2351
+ //#region src/utilities/polyfill.ts
2352
+ const polyfill = {
2353
+ appearance: {
2354
+ className: "ap",
2355
+ group: "Visibility",
2356
+ transform(value) {
2357
+ return {
2358
+ appearance: value,
2359
+ WebkitAppearance: value
2360
+ };
2361
+ }
2362
+ },
2363
+ backfaceVisibility: {
2364
+ className: "bfv",
2365
+ group: "Visibility",
2366
+ transform(value) {
2367
+ return {
2368
+ backfaceVisibility: value,
2369
+ WebkitBackfaceVisibility: value
2370
+ };
2371
+ }
2372
+ },
2373
+ clipPath: {
2374
+ className: "cp-path",
2375
+ group: "Other",
2376
+ transform(value) {
2377
+ return {
2378
+ clipPath: value,
2379
+ WebkitClipPath: value
2380
+ };
2381
+ }
2382
+ },
2383
+ hyphens: {
2384
+ className: "hy",
2385
+ group: "Other",
2386
+ transform(value) {
2387
+ return {
2388
+ hyphens: value,
2389
+ WebkitHyphens: value
2390
+ };
2391
+ }
2392
+ },
2393
+ mask: {
2394
+ className: "msk",
2395
+ group: "Other",
2396
+ transform(value) {
2397
+ return {
2398
+ mask: value,
2399
+ WebkitMask: value
2400
+ };
2401
+ }
2402
+ },
2403
+ maskImage: {
2404
+ className: "msk-i",
2405
+ group: "Other",
2406
+ transform(value) {
2407
+ return {
2408
+ maskImage: value,
2409
+ WebkitMaskImage: value
2410
+ };
2411
+ }
2412
+ },
2413
+ maskSize: {
2414
+ className: "msk-s",
2415
+ group: "Other",
2416
+ transform(value) {
2417
+ return {
2418
+ maskSize: value,
2419
+ WebkitMaskSize: value
2420
+ };
2421
+ }
2422
+ },
2423
+ textSizeAdjust: {
2424
+ className: "txt-adj",
2425
+ group: "Typography",
2426
+ transform(value) {
2427
+ return {
2428
+ textSizeAdjust: value,
2429
+ WebkitTextSizeAdjust: value
2430
+ };
2431
+ }
2432
+ }
2433
+ };
2434
+ //#endregion
2435
+ //#region src/utilities/sizing.ts
2436
+ const widthValues = (theme) => ({
2437
+ auto: "auto",
2438
+ ...theme("sizes"),
2439
+ "1/2": "50%",
2440
+ "1/3": "33.333333%",
2441
+ "2/3": "66.666667%",
2442
+ "1/4": "25%",
2443
+ "2/4": "50%",
2444
+ "3/4": "75%",
2445
+ "1/5": "20%",
2446
+ "2/5": "40%",
2447
+ "3/5": "60%",
2448
+ "4/5": "80%",
2449
+ "1/6": "16.666667%",
2450
+ "2/6": "33.333333%",
2451
+ "3/6": "50%",
2452
+ "4/6": "66.666667%",
2453
+ "5/6": "83.333333%",
2454
+ "1/12": "8.333333%",
2455
+ "2/12": "16.666667%",
2456
+ "3/12": "25%",
2457
+ "4/12": "33.333333%",
2458
+ "5/12": "41.666667%",
2459
+ "6/12": "50%",
2460
+ "7/12": "58.333333%",
2461
+ "8/12": "66.666667%",
2462
+ "9/12": "75%",
2463
+ "10/12": "83.333333%",
2464
+ "11/12": "91.666667%",
2465
+ screen: "100vw"
2466
+ });
2467
+ const heightValues = (theme) => ({
2468
+ auto: "auto",
2469
+ ...theme("sizes"),
2470
+ svh: "100svh",
2471
+ lvh: "100lvh",
2472
+ dvh: "100dvh",
2473
+ screen: "100vh",
2474
+ "1/2": "50%",
2475
+ "1/3": "33.333333%",
2476
+ "2/3": "66.666667%",
2477
+ "1/4": "25%",
2478
+ "2/4": "50%",
2479
+ "3/4": "75%",
2480
+ "1/5": "20%",
2481
+ "2/5": "40%",
2482
+ "3/5": "60%",
2483
+ "4/5": "80%",
2484
+ "1/6": "16.666667%",
2485
+ "2/6": "33.333333%",
2486
+ "3/6": "50%",
2487
+ "4/6": "66.666667%",
2488
+ "5/6": "83.333333%"
2489
+ });
2490
+ const sizing = {
2491
+ width: {
2492
+ shorthand: "w",
2493
+ className: "w",
2494
+ group: "Width",
2495
+ values: widthValues
2496
+ },
2497
+ inlineSize: {
2498
+ className: "w-is",
2499
+ group: "Width",
2500
+ values: widthValues
2501
+ },
2502
+ minWidth: {
2503
+ shorthand: "minW",
2504
+ className: "min-w",
2505
+ group: "Width",
2506
+ values: widthValues
2507
+ },
2508
+ minInlineSize: {
2509
+ className: "min-w-is",
2510
+ group: "Width",
2511
+ values: widthValues
2512
+ },
2513
+ maxWidth: {
2514
+ shorthand: "maxW",
2515
+ className: "max-w",
2516
+ group: "Width",
2517
+ values: widthValues
2518
+ },
2519
+ maxInlineSize: {
2520
+ className: "max-w-is",
2521
+ group: "Width",
2522
+ values: widthValues
2523
+ },
2524
+ height: {
2525
+ shorthand: "h",
2526
+ className: "h",
2527
+ group: "Height",
2528
+ values: heightValues
2529
+ },
2530
+ blockSize: {
2531
+ className: "h-bs",
2532
+ group: "Height",
2533
+ values: heightValues
2534
+ },
2535
+ minHeight: {
2536
+ shorthand: "minH",
2537
+ className: "min-h",
2538
+ group: "Height",
2539
+ values: heightValues
2540
+ },
2541
+ minBlockSize: {
2542
+ className: "min-h-bs",
2543
+ group: "Height",
2544
+ values: heightValues
2545
+ },
2546
+ maxHeight: {
2547
+ shorthand: "maxH",
2548
+ className: "max-h",
2549
+ group: "Height",
2550
+ values: heightValues
2551
+ },
2552
+ maxBlockSize: {
2553
+ className: "max-b",
2554
+ group: "Height",
2555
+ values: heightValues
2556
+ },
2557
+ boxSize: {
2558
+ className: "size",
2559
+ group: "Width",
2560
+ values: widthValues,
2561
+ transform(value) {
2562
+ return {
2563
+ width: value,
2564
+ height: value
2565
+ };
2566
+ }
2567
+ }
2568
+ };
2569
+ //#endregion
2570
+ //#region src/utilities/spacing.ts
2571
+ const marginValues = (theme) => ({
2572
+ auto: "auto",
2573
+ ...theme("spacing")
2574
+ });
2575
+ const spacing = {
2576
+ padding: {
2577
+ className: "p",
2578
+ shorthand: "p",
2579
+ values: "spacing",
2580
+ group: "Padding"
2581
+ },
2582
+ paddingLeft: {
2583
+ className: "pl",
2584
+ shorthand: "pl",
2585
+ values: "spacing",
2586
+ group: "Padding"
2587
+ },
2588
+ paddingRight: {
2589
+ className: "pr",
2590
+ shorthand: "pr",
2591
+ values: "spacing",
2592
+ group: "Padding"
2593
+ },
2594
+ paddingTop: {
2595
+ className: "pt",
2596
+ shorthand: "pt",
2597
+ values: "spacing",
2598
+ group: "Padding"
2599
+ },
2600
+ paddingBottom: {
2601
+ className: "pb",
2602
+ shorthand: "pb",
2603
+ values: "spacing",
2604
+ group: "Padding"
2605
+ },
2606
+ paddingBlock: {
2607
+ className: "py",
2608
+ values: "spacing",
2609
+ group: "Padding",
2610
+ shorthand: ["py", "paddingY"]
2611
+ },
2612
+ paddingBlockEnd: {
2613
+ className: "pbe",
2614
+ values: "spacing",
2615
+ group: "Padding"
2616
+ },
2617
+ paddingBlockStart: {
2618
+ className: "pbs",
2619
+ values: "spacing",
2620
+ group: "Padding"
2621
+ },
2622
+ paddingInline: {
2623
+ className: "px",
2624
+ values: "spacing",
2625
+ group: "Padding",
2626
+ shorthand: ["paddingX", "px"]
2627
+ },
2628
+ paddingInlineEnd: {
2629
+ className: "pe",
2630
+ shorthand: ["pe", "paddingEnd"],
2631
+ values: "spacing",
2632
+ group: "Padding"
2633
+ },
2634
+ paddingInlineStart: {
2635
+ className: "ps",
2636
+ shorthand: ["ps", "paddingStart"],
2637
+ values: "spacing",
2638
+ group: "Padding"
2639
+ },
2640
+ marginLeft: {
2641
+ className: "ml",
2642
+ shorthand: "ml",
2643
+ values: marginValues,
2644
+ group: "Margin"
2645
+ },
2646
+ marginRight: {
2647
+ className: "mr",
2648
+ shorthand: "mr",
2649
+ values: marginValues,
2650
+ group: "Margin"
2651
+ },
2652
+ marginTop: {
2653
+ className: "mt",
2654
+ shorthand: "mt",
2655
+ values: marginValues,
2656
+ group: "Margin"
2657
+ },
2658
+ marginBottom: {
2659
+ className: "mb",
2660
+ shorthand: "mb",
2661
+ values: marginValues,
2662
+ group: "Margin"
2663
+ },
2664
+ margin: {
2665
+ className: "m",
2666
+ shorthand: "m",
2667
+ values: marginValues,
2668
+ group: "Margin"
2669
+ },
2670
+ marginBlock: {
2671
+ className: "my",
2672
+ values: marginValues,
2673
+ group: "Margin",
2674
+ shorthand: ["my", "marginY"]
2675
+ },
2676
+ marginBlockEnd: {
2677
+ className: "mbe",
2678
+ values: marginValues,
2679
+ group: "Margin"
2680
+ },
2681
+ marginBlockStart: {
2682
+ className: "mbs",
2683
+ values: marginValues,
2684
+ group: "Margin"
2685
+ },
2686
+ marginInline: {
2687
+ className: "mx",
2688
+ values: marginValues,
2689
+ group: "Margin",
2690
+ shorthand: ["mx", "marginX"]
2691
+ },
2692
+ marginInlineEnd: {
2693
+ className: "me",
2694
+ shorthand: ["me", "marginEnd"],
2695
+ values: marginValues,
2696
+ group: "Margin"
2697
+ },
2698
+ marginInlineStart: {
2699
+ className: "ms",
2700
+ shorthand: ["ms", "marginStart"],
2701
+ values: marginValues,
2702
+ group: "Margin"
2703
+ },
2704
+ spaceX: {
2705
+ className: "sx",
2706
+ values: marginValues,
2707
+ property: "marginInlineStart",
2708
+ group: "Margin",
2709
+ transform(value) {
2710
+ return { "& > :not([hidden]) ~ :not([hidden])": {
2711
+ marginInlineStart: value,
2712
+ marginInlineEnd: "0px"
2713
+ } };
2714
+ }
2715
+ },
2716
+ spaceY: {
2717
+ className: "sy",
2718
+ values: marginValues,
2719
+ property: "marginBlockStart",
2720
+ group: "Margin",
2721
+ transform(value) {
2722
+ return { "& > :not([hidden]) ~ :not([hidden])": {
2723
+ marginTop: value,
2724
+ marginBottom: "0px"
2725
+ } };
2726
+ }
2727
+ }
2728
+ };
2729
+ //#endregion
2730
+ //#region src/utilities/svg.ts
2731
+ const svg = {
2732
+ fill: {
2733
+ className: "fill",
2734
+ values: "colors",
2735
+ group: "Color",
2736
+ transform: createColorMixTransform("fill")
2737
+ },
2738
+ stroke: {
2739
+ className: "stk",
2740
+ values: "colors",
2741
+ group: "Color",
2742
+ transform: createColorMixTransform("stroke")
2743
+ },
2744
+ strokeWidth: {
2745
+ className: "stk-w",
2746
+ values: "borderWidths",
2747
+ group: "Border"
2748
+ },
2749
+ strokeDasharray: {
2750
+ className: "stk-dsh",
2751
+ group: "Border"
2752
+ },
2753
+ strokeDashoffset: {
2754
+ className: "stk-do",
2755
+ group: "Border"
2756
+ },
2757
+ strokeLinecap: {
2758
+ className: "stk-lc",
2759
+ group: "Border"
2760
+ },
2761
+ strokeLinejoin: {
2762
+ className: "stk-lj",
2763
+ group: "Border"
2764
+ },
2765
+ strokeMiterlimit: {
2766
+ className: "stk-ml",
2767
+ group: "Border"
2768
+ },
2769
+ strokeOpacity: {
2770
+ className: "stk-op",
2771
+ group: "Border"
2772
+ }
2773
+ };
2774
+ //#endregion
2775
+ //#region src/utilities/tables.ts
2776
+ const tables = {
2777
+ borderCollapse: {
2778
+ className: "bd-cl",
2779
+ group: "Table"
2780
+ },
2781
+ borderSpacing: {
2782
+ className: "bd-sp",
2783
+ group: "Table",
2784
+ values(theme) {
2785
+ return {
2786
+ ...theme("spacing"),
2787
+ auto: "var(--border-spacing-x) var(--border-spacing-y)"
2788
+ };
2789
+ }
2790
+ },
2791
+ borderSpacingX: {
2792
+ className: "bd-sx",
2793
+ values: "spacing",
2794
+ group: "Table",
2795
+ transform(value) {
2796
+ return { "--border-spacing-x": value };
2797
+ }
2798
+ },
2799
+ borderSpacingY: {
2800
+ className: "bd-sy",
2801
+ values: "spacing",
2802
+ group: "Table",
2803
+ transform(value) {
2804
+ return { "--border-spacing-y": value };
2805
+ }
2806
+ },
2807
+ tableLayout: {
2808
+ className: "tbl",
2809
+ group: "Table"
2810
+ }
2811
+ };
2812
+ //#endregion
2813
+ //#region src/utilities/transforms.ts
2814
+ const positiveFractions = {
2815
+ "1/2": "50%",
2816
+ "1/3": "33.333333%",
2817
+ "2/3": "66.666667%",
2818
+ "1/4": "25%",
2819
+ "2/4": "50%",
2820
+ "3/4": "75%",
2821
+ full: "100%"
2822
+ };
2823
+ const negativeFractions = Object.fromEntries(Object.entries(positiveFractions).map(([key, value]) => [`-${key}`, `-${value}`]));
2824
+ const fractions = {
2825
+ ...positiveFractions,
2826
+ ...negativeFractions
2827
+ };
2828
+ const transforms = {
2829
+ transformOrigin: {
2830
+ className: "trf-o",
2831
+ group: "Transform"
2832
+ },
2833
+ transformBox: {
2834
+ className: "trf-b",
2835
+ group: "Transform"
2836
+ },
2837
+ transformStyle: {
2838
+ className: "trf-s",
2839
+ group: "Transform"
2840
+ },
2841
+ transform: {
2842
+ className: "trf",
2843
+ group: "Transform"
2844
+ },
2845
+ rotate: {
2846
+ className: "rotate",
2847
+ group: "Transform",
2848
+ property: "rotate",
2849
+ values: {
2850
+ auto: "var(--rotate-x) var(--rotate-y)",
2851
+ "auto-3d": "var(--rotate-x) var(--rotate-y) var(--rotate-z)"
2852
+ }
2853
+ },
2854
+ rotateX: {
2855
+ className: "rotate-x",
2856
+ group: "Transform",
2857
+ property: "rotate",
2858
+ transform(value) {
2859
+ return { "--rotate-x": value };
2860
+ }
2861
+ },
2862
+ rotateY: {
2863
+ className: "rotate-y",
2864
+ group: "Transform",
2865
+ property: "rotate",
2866
+ transform(value) {
2867
+ return { "--rotate-y": value };
2868
+ }
2869
+ },
2870
+ rotateZ: {
2871
+ className: "rotate-z",
2872
+ group: "Transform",
2873
+ property: "rotate",
2874
+ transform(value) {
2875
+ return { "--rotate-z": value };
2876
+ }
2877
+ },
2878
+ scale: {
2879
+ className: "scale",
2880
+ group: "Transform",
2881
+ property: "scale",
2882
+ values: { auto: "var(--scale-x) var(--scale-y)" }
2883
+ },
2884
+ scaleX: {
2885
+ className: "scale-x",
2886
+ group: "Transform",
2887
+ transform(value) {
2888
+ return { "--scale-x": value };
2889
+ }
2890
+ },
2891
+ scaleY: {
2892
+ className: "scale-y",
2893
+ group: "Transform",
2894
+ transform(value) {
2895
+ return { "--scale-y": value };
2896
+ }
2897
+ },
2898
+ translate: {
2899
+ className: "translate",
2900
+ group: "Transform",
2901
+ property: "translate",
2902
+ values: {
2903
+ auto: "var(--translate-x) var(--translate-y)",
2904
+ "auto-3d": "var(--translate-x) var(--translate-y) var(--translate-z)"
2905
+ }
2906
+ },
2907
+ translateX: {
2908
+ shorthand: "x",
2909
+ className: "translate-x",
2910
+ group: "Transform",
2911
+ values(theme) {
2912
+ return {
2913
+ ...theme("spacing"),
2914
+ ...fractions
2915
+ };
2916
+ },
2917
+ transform(value) {
2918
+ return { "--translate-x": value };
2919
+ }
2920
+ },
2921
+ translateY: {
2922
+ shorthand: "y",
2923
+ className: "translate-y",
2924
+ group: "Transform",
2925
+ values(theme) {
2926
+ return {
2927
+ ...theme("spacing"),
2928
+ ...fractions
2929
+ };
2930
+ },
2931
+ transform(value) {
2932
+ return { "--translate-y": value };
2933
+ }
2934
+ },
2935
+ translateZ: {
2936
+ shorthand: "z",
2937
+ className: "translate-z",
2938
+ group: "Transform",
2939
+ values(theme) {
2940
+ return {
2941
+ ...theme("spacing"),
2942
+ ...fractions
2943
+ };
2944
+ },
2945
+ transform(value) {
2946
+ return { "--translate-z": value };
2947
+ }
2948
+ }
2949
+ };
2950
+ //#endregion
2951
+ //#region src/utilities/transitions.ts
2952
+ const createTransition = (value) => ({
2953
+ transitionProperty: `var(--transition-prop, ${value})`,
2954
+ transitionTimingFunction: "var(--transition-easing, cubic-bezier(0.4, 0, 0.2, 1))",
2955
+ transitionDuration: "var(--transition-duration, 150ms)"
2956
+ });
2957
+ const transitionMap = {
2958
+ all: createTransition("all"),
2959
+ common: createTransition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter"),
2960
+ size: createTransition("width, height, min-width, max-width, min-height, max-height"),
2961
+ position: createTransition("left, right, top, bottom, inset, inset-inline, inset-block"),
2962
+ background: createTransition("background, background-color, background-image, background-position"),
2963
+ colors: createTransition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"),
2964
+ opacity: createTransition("opacity"),
2965
+ shadow: createTransition("box-shadow"),
2966
+ transform: createTransition("transform")
2967
+ };
2968
+ const transitions = {
2969
+ transitionTimingFunction: {
2970
+ className: "trs-tmf",
2971
+ values: "easings",
2972
+ group: "Transition",
2973
+ transform(value) {
2974
+ return {
2975
+ "--transition-easing": value,
2976
+ transitionTimingFunction: value
2977
+ };
2978
+ }
2979
+ },
2980
+ transitionDelay: {
2981
+ className: "trs-dly",
2982
+ values: "durations",
2983
+ group: "Transition"
2984
+ },
2985
+ transitionDuration: {
2986
+ className: "trs-dur",
2987
+ values: "durations",
2988
+ group: "Transition",
2989
+ transform(value) {
2990
+ return {
2991
+ "--transition-duration": value,
2992
+ transitionDuration: value
2993
+ };
2994
+ }
2995
+ },
2996
+ transitionProperty: {
2997
+ className: "trs-prop",
2998
+ group: "Transition",
2999
+ values: {
3000
+ common: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
3001
+ colors: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",
3002
+ size: "width, height, min-width, max-width, min-height, max-height",
3003
+ position: "left, right, top, bottom, inset, inset-inline, inset-block",
3004
+ background: "background, background-color, background-image, background-position"
3005
+ },
3006
+ transform(value) {
3007
+ return {
3008
+ "--transition-prop": value,
3009
+ transitionProperty: value
3010
+ };
3011
+ }
3012
+ },
3013
+ transition: {
3014
+ className: "trs",
3015
+ values: Object.keys(transitionMap),
3016
+ group: "Transition",
3017
+ transform(value) {
3018
+ return transitionMap[value] ?? { transition: value };
3019
+ }
3020
+ },
3021
+ animation: {
3022
+ className: "anim",
3023
+ values: "animations",
3024
+ group: "Animation"
3025
+ },
3026
+ animationName: {
3027
+ className: "anim-n",
3028
+ values: "keyframes",
3029
+ group: "Animation"
3030
+ },
3031
+ animationTimingFunction: {
3032
+ className: "anim-tmf",
3033
+ values: "easings",
3034
+ group: "Animation"
3035
+ },
3036
+ animationDuration: {
3037
+ className: "anim-dur",
3038
+ values: "durations",
3039
+ group: "Animation"
3040
+ },
3041
+ animationDelay: {
3042
+ className: "anim-dly",
3043
+ values: "durations",
3044
+ group: "Animation"
3045
+ },
3046
+ animationPlayState: {
3047
+ className: "anim-ps",
3048
+ group: "Animation"
3049
+ },
3050
+ animationComposition: {
3051
+ className: "anim-comp",
3052
+ group: "Animation"
3053
+ },
3054
+ animationFillMode: {
3055
+ className: "anim-fm",
3056
+ group: "Animation"
3057
+ },
3058
+ animationDirection: {
3059
+ className: "anim-dir",
3060
+ group: "Animation"
3061
+ },
3062
+ animationIterationCount: {
3063
+ className: "anim-ic",
3064
+ group: "Animation"
3065
+ },
3066
+ animationRange: {
3067
+ className: "anim-r",
3068
+ group: "Animation"
3069
+ },
3070
+ animationState: {
3071
+ className: "anim-s",
3072
+ group: "Animation"
3073
+ },
3074
+ animationRangeStart: {
3075
+ className: "anim-rs",
3076
+ group: "Animation"
3077
+ },
3078
+ animationRangeEnd: {
3079
+ className: "anim-re",
3080
+ group: "Animation"
3081
+ },
3082
+ animationTimeline: {
3083
+ className: "anim-tl",
3084
+ group: "Animation"
3085
+ }
3086
+ };
3087
+ //#endregion
3088
+ //#region src/utilities/typography.ts
3089
+ const typography = {
3090
+ color: {
3091
+ className: "c",
3092
+ values: "colors",
3093
+ group: "Color",
3094
+ transform: createColorMixTransform("color")
3095
+ },
3096
+ fontFamily: {
3097
+ className: "ff",
3098
+ values: "fonts",
3099
+ group: "Typography"
3100
+ },
3101
+ fontSize: {
3102
+ className: "fs",
3103
+ values: "fontSizes",
3104
+ group: "Typography"
3105
+ },
3106
+ fontSizeAdjust: {
3107
+ className: "fs-a",
3108
+ group: "Typography"
3109
+ },
3110
+ fontPalette: {
3111
+ className: "fp",
3112
+ group: "Typography"
3113
+ },
3114
+ fontKerning: {
3115
+ className: "fk",
3116
+ group: "Typography"
3117
+ },
3118
+ fontFeatureSettings: {
3119
+ className: "ff-s",
3120
+ group: "Typography"
3121
+ },
3122
+ fontWeight: {
3123
+ className: "fw",
3124
+ values: "fontWeights",
3125
+ group: "Typography"
3126
+ },
3127
+ fontSmoothing: {
3128
+ className: "fsmt",
3129
+ group: "Typography",
3130
+ values: {
3131
+ antialiased: "antialiased",
3132
+ "subpixel-antialiased": "auto"
3133
+ },
3134
+ transform(value) {
3135
+ return { WebkitFontSmoothing: value };
3136
+ }
3137
+ },
3138
+ fontVariant: {
3139
+ className: "fv",
3140
+ group: "Typography"
3141
+ },
3142
+ fontVariantAlternates: {
3143
+ className: "fv-alt",
3144
+ group: "Typography"
3145
+ },
3146
+ fontVariantCaps: {
3147
+ className: "fv-caps",
3148
+ group: "Typography"
3149
+ },
3150
+ fontVariationSettings: {
3151
+ className: "fv-s",
3152
+ group: "Typography"
3153
+ },
3154
+ fontVariantNumeric: {
3155
+ className: "fv-num",
3156
+ group: "Typography"
3157
+ },
3158
+ letterSpacing: {
3159
+ className: "ls",
3160
+ values: "letterSpacings",
3161
+ group: "Typography"
3162
+ },
3163
+ lineHeight: {
3164
+ className: "lh",
3165
+ values: "lineHeights",
3166
+ group: "Typography"
3167
+ },
3168
+ textAlign: {
3169
+ className: "ta",
3170
+ group: "Typography"
3171
+ },
3172
+ textDecoration: {
3173
+ className: "td",
3174
+ group: "Typography"
3175
+ },
3176
+ textDecorationColor: {
3177
+ className: "td-c",
3178
+ values: "colors",
3179
+ transform: createColorMixTransform("textDecorationColor"),
3180
+ group: "Typography"
3181
+ },
3182
+ textEmphasisColor: {
3183
+ className: "te-c",
3184
+ values: "colors",
3185
+ transform: createColorMixTransform("textEmphasisColor"),
3186
+ group: "Typography"
3187
+ },
3188
+ textDecorationStyle: {
3189
+ className: "td-s",
3190
+ group: "Typography"
3191
+ },
3192
+ textDecorationThickness: {
3193
+ className: "td-t",
3194
+ group: "Typography"
3195
+ },
3196
+ textUnderlineOffset: {
3197
+ className: "tu-o",
3198
+ group: "Typography"
3199
+ },
3200
+ textTransform: {
3201
+ className: "tt",
3202
+ group: "Typography"
3203
+ },
3204
+ textIndent: {
3205
+ className: "ti",
3206
+ group: "Typography",
3207
+ values: "spacing"
3208
+ },
3209
+ textShadow: {
3210
+ className: "tsh",
3211
+ values: "shadows",
3212
+ group: "Typography"
3213
+ },
3214
+ textShadowColor: {
3215
+ shorthand: "textShadowColor",
3216
+ className: "tsh-c",
3217
+ values: "colors",
3218
+ transform: createColorMixTransform("--text-shadow-color"),
3219
+ group: "Typography"
3220
+ },
3221
+ WebkitTextFillColor: {
3222
+ className: "wktf-c",
3223
+ values: "colors",
3224
+ transform: createColorMixTransform("WebkitTextFillColor"),
3225
+ group: "Typography"
3226
+ },
3227
+ textOverflow: {
3228
+ className: "tov",
3229
+ group: "Typography"
3230
+ },
3231
+ verticalAlign: {
3232
+ className: "va",
3233
+ group: "Typography"
3234
+ },
3235
+ wordBreak: {
3236
+ className: "wb",
3237
+ group: "Typography"
3238
+ },
3239
+ textWrap: {
3240
+ className: "tw",
3241
+ values: [
3242
+ "wrap",
3243
+ "balance",
3244
+ "nowrap"
3245
+ ],
3246
+ group: "Typography",
3247
+ transform(value) {
3248
+ return { textWrap: value };
3249
+ }
3250
+ },
3251
+ truncate: {
3252
+ className: "trunc",
3253
+ values: { type: "boolean" },
3254
+ group: "Typography",
3255
+ transform(value) {
3256
+ if (!value) return {};
3257
+ return {
3258
+ overflow: "hidden",
3259
+ textOverflow: "ellipsis",
3260
+ whiteSpace: "nowrap"
3261
+ };
3262
+ }
3263
+ },
3264
+ lineClamp: {
3265
+ className: "lc",
3266
+ group: "Typography",
3267
+ transform(value) {
3268
+ if (value === "none") return { WebkitLineClamp: "unset" };
3269
+ return {
3270
+ overflow: "hidden",
3271
+ display: "-webkit-box",
3272
+ WebkitLineClamp: value,
3273
+ WebkitBoxOrient: "vertical"
3274
+ };
3275
+ }
3276
+ }
3277
+ };
3278
+ //#endregion
3279
+ //#region src/utilities/index.ts
3280
+ const utilities = Object.assign({}, layout, display, flexGrid, spacing, outline, focusRing, divide, sizing, typography, list, background, backgroundGradients, border, effects, tables, transitions, transforms, interactivity, svg, helpers, polyfill, container, cursor);
3281
+ //#endregion
3282
+ //#region src/index.ts
3283
+ const definePreset = (preset) => preset;
3284
+ const preset = definePreset({
3285
+ name: "@bamboocss/preset-base",
3286
+ conditions,
3287
+ utilities,
3288
+ patterns,
3289
+ globalCss
3290
+ });
3291
+ //#endregion
3292
+ exports.default = preset;
3293
+ exports.preset = preset;