@attebyte/react-tree-select 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,2688 +1,548 @@
1
- import { jsxs as se, jsx as R } from "react/jsx-runtime";
2
- import H, { useState as ie, useRef as ge, useEffect as he } from "react";
3
- class _ {
4
- static initializeTree(r, t, n, a) {
5
- this.setParentID(r, t, n, a);
6
- }
7
- static setParentID(r, t, n, a, o) {
8
- r.forEach((s) => {
9
- s[t] = o ? o[a] : void 0, s[n] && Array.isArray(s[n]) && this.setParentID(s[n], t, n, a, s);
10
- });
11
- }
12
- static omitParentID(r, t) {
13
- return r.map((n) => {
14
- const { _parentID: a, ...o } = n;
15
- return n[t] && Array.isArray(n[t]) && (o[t] = this.omitParentID(n[t], t)), o;
16
- });
17
- }
18
- // Perform a breadth-first search to find a node in the tree
19
- static getNode(r, t, n, a) {
20
- const o = [...r];
21
- for (; o.length > 0; ) {
22
- const s = o.shift();
23
- if (s[n] === a)
24
- return s;
25
- const i = s[t] || [];
26
- i.length > 0 && o.push(...i);
27
- }
28
- }
29
- static chainUpdate(r, t, n, a, o, s, i, c) {
30
- const d = (f, b) => {
31
- if (c && f[c] === !0)
32
- return;
33
- f[o] = b;
34
- const y = f[a];
35
- y && y.forEach((x) => d(x, b));
36
- }, u = (f) => {
37
- if (f[n] === void 0)
38
- return;
39
- const b = this.getNode(r, a, s, f[n]);
40
- if (!b || !b[a])
41
- return;
42
- const y = b[a], x = new Set(y.map((p) => p[o] === void 0 ? !1 : p[o]));
43
- x.size > 1 || x.size === 1 && x.has(null) ? (b[o] = null, u(b)) : x.size === 1 && !x.has(void 0) && (b[o] = y[0][o], u(b));
44
- };
45
- t && (d(t, i), u(t));
46
- }
47
- }
48
- function le(e) {
49
- var r, t, n = "";
50
- if (typeof e == "string" || typeof e == "number")
51
- n += e;
52
- else if (typeof e == "object")
53
- if (Array.isArray(e))
54
- for (r = 0; r < e.length; r++)
55
- e[r] && (t = le(e[r])) && (n && (n += " "), n += t);
56
- else
57
- for (r in e)
58
- e[r] && (n && (n += " "), n += r);
59
- return n;
60
- }
61
- function ye() {
62
- for (var e, r, t = 0, n = ""; t < arguments.length; )
63
- (e = arguments[t++]) && (r = le(e)) && (n && (n += " "), n += r);
64
- return n;
65
- }
66
- const re = (e) => typeof e == "boolean" ? "".concat(e) : e === 0 ? "0" : e, ne = ye, Q = (e, r) => (t) => {
67
- var n;
68
- if ((r == null ? void 0 : r.variants) == null)
69
- return ne(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
70
- const { variants: a, defaultVariants: o } = r, s = Object.keys(a).map((d) => {
71
- const u = t == null ? void 0 : t[d], f = o == null ? void 0 : o[d];
72
- if (u === null)
73
- return null;
74
- const b = re(u) || re(f);
75
- return a[d][b];
76
- }), i = t && Object.entries(t).reduce((d, u) => {
77
- let [f, b] = u;
78
- return b === void 0 || (d[f] = b), d;
79
- }, {}), c = r == null || (n = r.compoundVariants) === null || n === void 0 ? void 0 : n.reduce((d, u) => {
80
- let { class: f, className: b, ...y } = u;
81
- return Object.entries(y).every((x) => {
82
- let [p, h] = x;
83
- return Array.isArray(h) ? h.includes({
84
- ...o,
85
- ...i
86
- }[p]) : {
87
- ...o,
88
- ...i
89
- }[p] === h;
90
- }) ? [
91
- ...d,
92
- f,
93
- b
94
- ] : d;
95
- }, []);
96
- return ne(e, s, c, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
97
- };
98
- function de(e) {
99
- var r, t, n = "";
100
- if (typeof e == "string" || typeof e == "number")
101
- n += e;
102
- else if (typeof e == "object")
103
- if (Array.isArray(e)) {
104
- var a = e.length;
105
- for (r = 0; r < a; r++)
106
- e[r] && (t = de(e[r])) && (n && (n += " "), n += t);
107
- } else
108
- for (t in e)
109
- e[t] && (n && (n += " "), n += t);
110
- return n;
111
- }
112
- function xe() {
113
- for (var e, r, t = 0, n = "", a = arguments.length; t < a; t++)
114
- (e = arguments[t]) && (r = de(e)) && (n && (n += " "), n += r);
115
- return n;
116
- }
117
- const te = "-";
118
- function ve(e) {
119
- const r = Ce(e), {
120
- conflictingClassGroups: t,
121
- conflictingClassGroupModifiers: n
122
- } = e;
123
- function a(s) {
124
- const i = s.split(te);
125
- return i[0] === "" && i.length !== 1 && i.shift(), ce(i, r) || we(s);
126
- }
127
- function o(s, i) {
128
- const c = t[s] || [];
129
- return i && n[s] ? [...c, ...n[s]] : c;
130
- }
131
- return {
132
- getClassGroupId: a,
133
- getConflictingClassGroupIds: o
134
- };
135
- }
136
- function ce(e, r) {
137
- var s;
138
- if (e.length === 0)
139
- return r.classGroupId;
140
- const t = e[0], n = r.nextPart.get(t), a = n ? ce(e.slice(1), n) : void 0;
141
- if (a)
142
- return a;
143
- if (r.validators.length === 0)
144
- return;
145
- const o = e.join(te);
146
- return (s = r.validators.find(({
147
- validator: i
148
- }) => i(o))) == null ? void 0 : s.classGroupId;
149
- }
150
- const oe = /^\[(.+)\]$/;
151
- function we(e) {
152
- if (oe.test(e)) {
153
- const r = oe.exec(e)[1], t = r == null ? void 0 : r.substring(0, r.indexOf(":"));
154
- if (t)
155
- return "arbitrary.." + t;
156
- }
157
- }
158
- function Ce(e) {
159
- const {
160
- theme: r,
161
- prefix: t
162
- } = e, n = {
163
- nextPart: /* @__PURE__ */ new Map(),
164
- validators: []
165
- };
166
- return Ne(Object.entries(e.classGroups), t).forEach(([o, s]) => {
167
- ee(s, n, o, r);
168
- }), n;
169
- }
170
- function ee(e, r, t, n) {
171
- e.forEach((a) => {
172
- if (typeof a == "string") {
173
- const o = a === "" ? r : ae(r, a);
174
- o.classGroupId = t;
175
- return;
176
- }
177
- if (typeof a == "function") {
178
- if (ke(a)) {
179
- ee(a(n), r, t, n);
180
- return;
181
- }
182
- r.validators.push({
183
- validator: a,
184
- classGroupId: t
185
- });
186
- return;
187
- }
188
- Object.entries(a).forEach(([o, s]) => {
189
- ee(s, ae(r, o), t, n);
190
- });
191
- });
192
- }
193
- function ae(e, r) {
194
- let t = e;
195
- return r.split(te).forEach((n) => {
196
- t.nextPart.has(n) || t.nextPart.set(n, {
197
- nextPart: /* @__PURE__ */ new Map(),
198
- validators: []
199
- }), t = t.nextPart.get(n);
200
- }), t;
201
- }
202
- function ke(e) {
203
- return e.isThemeGetter;
204
- }
205
- function Ne(e, r) {
206
- return r ? e.map(([t, n]) => {
207
- const a = n.map((o) => typeof o == "string" ? r + o : typeof o == "object" ? Object.fromEntries(Object.entries(o).map(([s, i]) => [r + s, i])) : o);
208
- return [t, a];
209
- }) : e;
210
- }
211
- function Se(e) {
212
- if (e < 1)
213
- return {
214
- get: () => {
215
- },
216
- set: () => {
217
- }
218
- };
219
- let r = 0, t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
220
- function a(o, s) {
221
- t.set(o, s), r++, r > e && (r = 0, n = t, t = /* @__PURE__ */ new Map());
222
- }
223
- return {
224
- get(o) {
225
- let s = t.get(o);
226
- if (s !== void 0)
227
- return s;
228
- if ((s = n.get(o)) !== void 0)
229
- return a(o, s), s;
230
- },
231
- set(o, s) {
232
- t.has(o) ? t.set(o, s) : a(o, s);
233
- }
234
- };
235
- }
236
- const ue = "!";
237
- function Pe(e) {
238
- const r = e.separator, t = r.length === 1, n = r[0], a = r.length;
239
- return function(s) {
240
- const i = [];
241
- let c = 0, d = 0, u;
242
- for (let p = 0; p < s.length; p++) {
243
- let h = s[p];
244
- if (c === 0) {
245
- if (h === n && (t || s.slice(p, p + a) === r)) {
246
- i.push(s.slice(d, p)), d = p + a;
247
- continue;
248
- }
249
- if (h === "/") {
250
- u = p;
251
- continue;
252
- }
253
- }
254
- h === "[" ? c++ : h === "]" && c--;
255
- }
256
- const f = i.length === 0 ? s : s.substring(d), b = f.startsWith(ue), y = b ? f.substring(1) : f, x = u && u > d ? u - d : void 0;
257
- return {
258
- modifiers: i,
259
- hasImportantModifier: b,
260
- baseClassName: y,
261
- maybePostfixModifierPosition: x
262
- };
263
- };
264
- }
265
- function ze(e) {
266
- if (e.length <= 1)
267
- return e;
268
- const r = [];
269
- let t = [];
270
- return e.forEach((n) => {
271
- n[0] === "[" ? (r.push(...t.sort(), n), t = []) : t.push(n);
272
- }), r.push(...t.sort()), r;
273
- }
274
- function Ie(e) {
275
- return {
276
- cache: Se(e.cacheSize),
277
- splitModifiers: Pe(e),
278
- ...ve(e)
279
- };
280
- }
281
- const Ae = /\s+/;
282
- function Ee(e, r) {
283
- const {
284
- splitModifiers: t,
285
- getClassGroupId: n,
286
- getConflictingClassGroupIds: a
287
- } = r, o = /* @__PURE__ */ new Set();
288
- return e.trim().split(Ae).map((s) => {
289
- const {
290
- modifiers: i,
291
- hasImportantModifier: c,
292
- baseClassName: d,
293
- maybePostfixModifierPosition: u
294
- } = t(s);
295
- let f = n(u ? d.substring(0, u) : d), b = !!u;
296
- if (!f) {
297
- if (!u)
298
- return {
299
- isTailwindClass: !1,
300
- originalClassName: s
301
- };
302
- if (f = n(d), !f)
303
- return {
304
- isTailwindClass: !1,
305
- originalClassName: s
306
- };
307
- b = !1;
308
- }
309
- const y = ze(i).join(":");
310
- return {
311
- isTailwindClass: !0,
312
- modifierId: c ? y + ue : y,
313
- classGroupId: f,
314
- originalClassName: s,
315
- hasPostfixModifier: b
316
- };
317
- }).reverse().filter((s) => {
318
- if (!s.isTailwindClass)
319
- return !0;
320
- const {
321
- modifierId: i,
322
- classGroupId: c,
323
- hasPostfixModifier: d
324
- } = s, u = i + c;
325
- return o.has(u) ? !1 : (o.add(u), a(c, d).forEach((f) => o.add(i + f)), !0);
326
- }).reverse().map((s) => s.originalClassName).join(" ");
327
- }
328
- function Me() {
329
- let e = 0, r, t, n = "";
330
- for (; e < arguments.length; )
331
- (r = arguments[e++]) && (t = fe(r)) && (n && (n += " "), n += t);
332
- return n;
333
- }
334
- function fe(e) {
335
- if (typeof e == "string")
336
- return e;
337
- let r, t = "";
338
- for (let n = 0; n < e.length; n++)
339
- e[n] && (r = fe(e[n])) && (t && (t += " "), t += r);
340
- return t;
341
- }
342
- function Te(e, ...r) {
343
- let t, n, a, o = s;
344
- function s(c) {
345
- const d = r.reduce((u, f) => f(u), e());
346
- return t = Ie(d), n = t.cache.get, a = t.cache.set, o = i, i(c);
347
- }
348
- function i(c) {
349
- const d = n(c);
350
- if (d)
351
- return d;
352
- const u = Ee(c, t);
353
- return a(c, u), u;
354
- }
355
- return function() {
356
- return o(Me.apply(null, arguments));
357
- };
358
- }
359
- function g(e) {
360
- const r = (t) => t[e] || [];
361
- return r.isThemeGetter = !0, r;
362
- }
363
- const be = /^\[(?:([a-z-]+):)?(.+)\]$/i, Re = /^\d+\/\d+$/, je = /* @__PURE__ */ new Set(["px", "full", "screen"]), Ge = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, De = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Le = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Ve = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, $e = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
364
- function A(e) {
365
- return D(e) || je.has(e) || Re.test(e);
366
- }
367
- function M(e) {
368
- return q(e, "length", Je);
369
- }
370
- function D(e) {
371
- return !!e && !Number.isNaN(Number(e));
372
- }
373
- function Z(e) {
374
- return q(e, "number", D);
375
- }
376
- function U(e) {
377
- return !!e && Number.isInteger(Number(e));
378
- }
379
- function qe(e) {
380
- return e.endsWith("%") && D(e.slice(0, -1));
381
- }
382
- function l(e) {
383
- return be.test(e);
384
- }
385
- function T(e) {
386
- return Ge.test(e);
387
- }
388
- const Oe = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
389
- function We(e) {
390
- return q(e, Oe, me);
391
- }
392
- function _e(e) {
393
- return q(e, "position", me);
394
- }
395
- const Ue = /* @__PURE__ */ new Set(["image", "url"]);
396
- function Be(e) {
397
- return q(e, Ue, Xe);
398
- }
399
- function Fe(e) {
400
- return q(e, "", Ke);
401
- }
402
- function B() {
403
- return !0;
404
- }
405
- function q(e, r, t) {
406
- const n = be.exec(e);
407
- return n ? n[1] ? typeof r == "string" ? n[1] === r : r.has(n[1]) : t(n[2]) : !1;
408
- }
409
- function Je(e) {
410
- return De.test(e) && !Le.test(e);
411
- }
412
- function me() {
413
- return !1;
414
- }
415
- function Ke(e) {
416
- return Ve.test(e);
417
- }
418
- function Xe(e) {
419
- return $e.test(e);
420
- }
421
- function Ze() {
422
- const e = g("colors"), r = g("spacing"), t = g("blur"), n = g("brightness"), a = g("borderColor"), o = g("borderRadius"), s = g("borderSpacing"), i = g("borderWidth"), c = g("contrast"), d = g("grayscale"), u = g("hueRotate"), f = g("invert"), b = g("gap"), y = g("gradientColorStops"), x = g("gradientColorStopPositions"), p = g("inset"), h = g("margin"), S = g("opacity"), C = g("padding"), F = g("saturate"), L = g("scale"), j = g("sepia"), V = g("skew"), P = g("space"), O = g("translate"), k = () => ["auto", "contain", "none"], N = () => ["auto", "hidden", "clip", "visible", "scroll"], w = () => ["auto", l, r], m = () => [l, r], z = () => ["", A, M], E = () => ["auto", D, l], J = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], $ = () => ["solid", "dashed", "dotted", "double", "none"], K = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity", "plus-lighter"], W = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], v = () => ["", "0", l], G = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], I = () => [D, Z], X = () => [D, l];
423
- return {
424
- cacheSize: 500,
425
- separator: ":",
426
- theme: {
427
- colors: [B],
428
- spacing: [A, M],
429
- blur: ["none", "", T, l],
430
- brightness: I(),
431
- borderColor: [e],
432
- borderRadius: ["none", "", "full", T, l],
433
- borderSpacing: m(),
434
- borderWidth: z(),
435
- contrast: I(),
436
- grayscale: v(),
437
- hueRotate: X(),
438
- invert: v(),
439
- gap: m(),
440
- gradientColorStops: [e],
441
- gradientColorStopPositions: [qe, M],
442
- inset: w(),
443
- margin: w(),
444
- opacity: I(),
445
- padding: m(),
446
- saturate: I(),
447
- scale: I(),
448
- sepia: v(),
449
- skew: X(),
450
- space: m(),
451
- translate: m()
452
- },
453
- classGroups: {
454
- // Layout
455
- /**
456
- * Aspect Ratio
457
- * @see https://tailwindcss.com/docs/aspect-ratio
458
- */
459
- aspect: [{
460
- aspect: ["auto", "square", "video", l]
461
- }],
462
- /**
463
- * Container
464
- * @see https://tailwindcss.com/docs/container
465
- */
466
- container: ["container"],
467
- /**
468
- * Columns
469
- * @see https://tailwindcss.com/docs/columns
470
- */
471
- columns: [{
472
- columns: [T]
473
- }],
474
- /**
475
- * Break After
476
- * @see https://tailwindcss.com/docs/break-after
477
- */
478
- "break-after": [{
479
- "break-after": G()
480
- }],
481
- /**
482
- * Break Before
483
- * @see https://tailwindcss.com/docs/break-before
484
- */
485
- "break-before": [{
486
- "break-before": G()
487
- }],
488
- /**
489
- * Break Inside
490
- * @see https://tailwindcss.com/docs/break-inside
491
- */
492
- "break-inside": [{
493
- "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
494
- }],
495
- /**
496
- * Box Decoration Break
497
- * @see https://tailwindcss.com/docs/box-decoration-break
498
- */
499
- "box-decoration": [{
500
- "box-decoration": ["slice", "clone"]
501
- }],
502
- /**
503
- * Box Sizing
504
- * @see https://tailwindcss.com/docs/box-sizing
505
- */
506
- box: [{
507
- box: ["border", "content"]
508
- }],
509
- /**
510
- * Display
511
- * @see https://tailwindcss.com/docs/display
512
- */
513
- display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
514
- /**
515
- * Floats
516
- * @see https://tailwindcss.com/docs/float
517
- */
518
- float: [{
519
- float: ["right", "left", "none", "start", "end"]
520
- }],
521
- /**
522
- * Clear
523
- * @see https://tailwindcss.com/docs/clear
524
- */
525
- clear: [{
526
- clear: ["left", "right", "both", "none", "start", "end"]
527
- }],
528
- /**
529
- * Isolation
530
- * @see https://tailwindcss.com/docs/isolation
531
- */
532
- isolation: ["isolate", "isolation-auto"],
533
- /**
534
- * Object Fit
535
- * @see https://tailwindcss.com/docs/object-fit
536
- */
537
- "object-fit": [{
538
- object: ["contain", "cover", "fill", "none", "scale-down"]
539
- }],
540
- /**
541
- * Object Position
542
- * @see https://tailwindcss.com/docs/object-position
543
- */
544
- "object-position": [{
545
- object: [...J(), l]
546
- }],
547
- /**
548
- * Overflow
549
- * @see https://tailwindcss.com/docs/overflow
550
- */
551
- overflow: [{
552
- overflow: N()
553
- }],
554
- /**
555
- * Overflow X
556
- * @see https://tailwindcss.com/docs/overflow
557
- */
558
- "overflow-x": [{
559
- "overflow-x": N()
560
- }],
561
- /**
562
- * Overflow Y
563
- * @see https://tailwindcss.com/docs/overflow
564
- */
565
- "overflow-y": [{
566
- "overflow-y": N()
567
- }],
568
- /**
569
- * Overscroll Behavior
570
- * @see https://tailwindcss.com/docs/overscroll-behavior
571
- */
572
- overscroll: [{
573
- overscroll: k()
574
- }],
575
- /**
576
- * Overscroll Behavior X
577
- * @see https://tailwindcss.com/docs/overscroll-behavior
578
- */
579
- "overscroll-x": [{
580
- "overscroll-x": k()
581
- }],
582
- /**
583
- * Overscroll Behavior Y
584
- * @see https://tailwindcss.com/docs/overscroll-behavior
585
- */
586
- "overscroll-y": [{
587
- "overscroll-y": k()
588
- }],
589
- /**
590
- * Position
591
- * @see https://tailwindcss.com/docs/position
592
- */
593
- position: ["static", "fixed", "absolute", "relative", "sticky"],
594
- /**
595
- * Top / Right / Bottom / Left
596
- * @see https://tailwindcss.com/docs/top-right-bottom-left
597
- */
598
- inset: [{
599
- inset: [p]
600
- }],
601
- /**
602
- * Right / Left
603
- * @see https://tailwindcss.com/docs/top-right-bottom-left
604
- */
605
- "inset-x": [{
606
- "inset-x": [p]
607
- }],
608
- /**
609
- * Top / Bottom
610
- * @see https://tailwindcss.com/docs/top-right-bottom-left
611
- */
612
- "inset-y": [{
613
- "inset-y": [p]
614
- }],
615
- /**
616
- * Start
617
- * @see https://tailwindcss.com/docs/top-right-bottom-left
618
- */
619
- start: [{
620
- start: [p]
621
- }],
622
- /**
623
- * End
624
- * @see https://tailwindcss.com/docs/top-right-bottom-left
625
- */
626
- end: [{
627
- end: [p]
628
- }],
629
- /**
630
- * Top
631
- * @see https://tailwindcss.com/docs/top-right-bottom-left
632
- */
633
- top: [{
634
- top: [p]
635
- }],
636
- /**
637
- * Right
638
- * @see https://tailwindcss.com/docs/top-right-bottom-left
639
- */
640
- right: [{
641
- right: [p]
642
- }],
643
- /**
644
- * Bottom
645
- * @see https://tailwindcss.com/docs/top-right-bottom-left
646
- */
647
- bottom: [{
648
- bottom: [p]
649
- }],
650
- /**
651
- * Left
652
- * @see https://tailwindcss.com/docs/top-right-bottom-left
653
- */
654
- left: [{
655
- left: [p]
656
- }],
657
- /**
658
- * Visibility
659
- * @see https://tailwindcss.com/docs/visibility
660
- */
661
- visibility: ["visible", "invisible", "collapse"],
662
- /**
663
- * Z-Index
664
- * @see https://tailwindcss.com/docs/z-index
665
- */
666
- z: [{
667
- z: ["auto", U, l]
668
- }],
669
- // Flexbox and Grid
670
- /**
671
- * Flex Basis
672
- * @see https://tailwindcss.com/docs/flex-basis
673
- */
674
- basis: [{
675
- basis: w()
676
- }],
677
- /**
678
- * Flex Direction
679
- * @see https://tailwindcss.com/docs/flex-direction
680
- */
681
- "flex-direction": [{
682
- flex: ["row", "row-reverse", "col", "col-reverse"]
683
- }],
684
- /**
685
- * Flex Wrap
686
- * @see https://tailwindcss.com/docs/flex-wrap
687
- */
688
- "flex-wrap": [{
689
- flex: ["wrap", "wrap-reverse", "nowrap"]
690
- }],
691
- /**
692
- * Flex
693
- * @see https://tailwindcss.com/docs/flex
694
- */
695
- flex: [{
696
- flex: ["1", "auto", "initial", "none", l]
697
- }],
698
- /**
699
- * Flex Grow
700
- * @see https://tailwindcss.com/docs/flex-grow
701
- */
702
- grow: [{
703
- grow: v()
704
- }],
705
- /**
706
- * Flex Shrink
707
- * @see https://tailwindcss.com/docs/flex-shrink
708
- */
709
- shrink: [{
710
- shrink: v()
711
- }],
712
- /**
713
- * Order
714
- * @see https://tailwindcss.com/docs/order
715
- */
716
- order: [{
717
- order: ["first", "last", "none", U, l]
718
- }],
719
- /**
720
- * Grid Template Columns
721
- * @see https://tailwindcss.com/docs/grid-template-columns
722
- */
723
- "grid-cols": [{
724
- "grid-cols": [B]
725
- }],
726
- /**
727
- * Grid Column Start / End
728
- * @see https://tailwindcss.com/docs/grid-column
729
- */
730
- "col-start-end": [{
731
- col: ["auto", {
732
- span: ["full", U, l]
733
- }, l]
734
- }],
735
- /**
736
- * Grid Column Start
737
- * @see https://tailwindcss.com/docs/grid-column
738
- */
739
- "col-start": [{
740
- "col-start": E()
741
- }],
742
- /**
743
- * Grid Column End
744
- * @see https://tailwindcss.com/docs/grid-column
745
- */
746
- "col-end": [{
747
- "col-end": E()
748
- }],
749
- /**
750
- * Grid Template Rows
751
- * @see https://tailwindcss.com/docs/grid-template-rows
752
- */
753
- "grid-rows": [{
754
- "grid-rows": [B]
755
- }],
756
- /**
757
- * Grid Row Start / End
758
- * @see https://tailwindcss.com/docs/grid-row
759
- */
760
- "row-start-end": [{
761
- row: ["auto", {
762
- span: [U, l]
763
- }, l]
764
- }],
765
- /**
766
- * Grid Row Start
767
- * @see https://tailwindcss.com/docs/grid-row
768
- */
769
- "row-start": [{
770
- "row-start": E()
771
- }],
772
- /**
773
- * Grid Row End
774
- * @see https://tailwindcss.com/docs/grid-row
775
- */
776
- "row-end": [{
777
- "row-end": E()
778
- }],
779
- /**
780
- * Grid Auto Flow
781
- * @see https://tailwindcss.com/docs/grid-auto-flow
782
- */
783
- "grid-flow": [{
784
- "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
785
- }],
786
- /**
787
- * Grid Auto Columns
788
- * @see https://tailwindcss.com/docs/grid-auto-columns
789
- */
790
- "auto-cols": [{
791
- "auto-cols": ["auto", "min", "max", "fr", l]
792
- }],
793
- /**
794
- * Grid Auto Rows
795
- * @see https://tailwindcss.com/docs/grid-auto-rows
796
- */
797
- "auto-rows": [{
798
- "auto-rows": ["auto", "min", "max", "fr", l]
799
- }],
800
- /**
801
- * Gap
802
- * @see https://tailwindcss.com/docs/gap
803
- */
804
- gap: [{
805
- gap: [b]
806
- }],
807
- /**
808
- * Gap X
809
- * @see https://tailwindcss.com/docs/gap
810
- */
811
- "gap-x": [{
812
- "gap-x": [b]
813
- }],
814
- /**
815
- * Gap Y
816
- * @see https://tailwindcss.com/docs/gap
817
- */
818
- "gap-y": [{
819
- "gap-y": [b]
820
- }],
821
- /**
822
- * Justify Content
823
- * @see https://tailwindcss.com/docs/justify-content
824
- */
825
- "justify-content": [{
826
- justify: ["normal", ...W()]
827
- }],
828
- /**
829
- * Justify Items
830
- * @see https://tailwindcss.com/docs/justify-items
831
- */
832
- "justify-items": [{
833
- "justify-items": ["start", "end", "center", "stretch"]
834
- }],
835
- /**
836
- * Justify Self
837
- * @see https://tailwindcss.com/docs/justify-self
838
- */
839
- "justify-self": [{
840
- "justify-self": ["auto", "start", "end", "center", "stretch"]
841
- }],
842
- /**
843
- * Align Content
844
- * @see https://tailwindcss.com/docs/align-content
845
- */
846
- "align-content": [{
847
- content: ["normal", ...W(), "baseline"]
848
- }],
849
- /**
850
- * Align Items
851
- * @see https://tailwindcss.com/docs/align-items
852
- */
853
- "align-items": [{
854
- items: ["start", "end", "center", "baseline", "stretch"]
855
- }],
856
- /**
857
- * Align Self
858
- * @see https://tailwindcss.com/docs/align-self
859
- */
860
- "align-self": [{
861
- self: ["auto", "start", "end", "center", "stretch", "baseline"]
862
- }],
863
- /**
864
- * Place Content
865
- * @see https://tailwindcss.com/docs/place-content
866
- */
867
- "place-content": [{
868
- "place-content": [...W(), "baseline"]
869
- }],
870
- /**
871
- * Place Items
872
- * @see https://tailwindcss.com/docs/place-items
873
- */
874
- "place-items": [{
875
- "place-items": ["start", "end", "center", "baseline", "stretch"]
876
- }],
877
- /**
878
- * Place Self
879
- * @see https://tailwindcss.com/docs/place-self
880
- */
881
- "place-self": [{
882
- "place-self": ["auto", "start", "end", "center", "stretch"]
883
- }],
884
- // Spacing
885
- /**
886
- * Padding
887
- * @see https://tailwindcss.com/docs/padding
888
- */
889
- p: [{
890
- p: [C]
891
- }],
892
- /**
893
- * Padding X
894
- * @see https://tailwindcss.com/docs/padding
895
- */
896
- px: [{
897
- px: [C]
898
- }],
899
- /**
900
- * Padding Y
901
- * @see https://tailwindcss.com/docs/padding
902
- */
903
- py: [{
904
- py: [C]
905
- }],
906
- /**
907
- * Padding Start
908
- * @see https://tailwindcss.com/docs/padding
909
- */
910
- ps: [{
911
- ps: [C]
912
- }],
913
- /**
914
- * Padding End
915
- * @see https://tailwindcss.com/docs/padding
916
- */
917
- pe: [{
918
- pe: [C]
919
- }],
920
- /**
921
- * Padding Top
922
- * @see https://tailwindcss.com/docs/padding
923
- */
924
- pt: [{
925
- pt: [C]
926
- }],
927
- /**
928
- * Padding Right
929
- * @see https://tailwindcss.com/docs/padding
930
- */
931
- pr: [{
932
- pr: [C]
933
- }],
934
- /**
935
- * Padding Bottom
936
- * @see https://tailwindcss.com/docs/padding
937
- */
938
- pb: [{
939
- pb: [C]
940
- }],
941
- /**
942
- * Padding Left
943
- * @see https://tailwindcss.com/docs/padding
944
- */
945
- pl: [{
946
- pl: [C]
947
- }],
948
- /**
949
- * Margin
950
- * @see https://tailwindcss.com/docs/margin
951
- */
952
- m: [{
953
- m: [h]
954
- }],
955
- /**
956
- * Margin X
957
- * @see https://tailwindcss.com/docs/margin
958
- */
959
- mx: [{
960
- mx: [h]
961
- }],
962
- /**
963
- * Margin Y
964
- * @see https://tailwindcss.com/docs/margin
965
- */
966
- my: [{
967
- my: [h]
968
- }],
969
- /**
970
- * Margin Start
971
- * @see https://tailwindcss.com/docs/margin
972
- */
973
- ms: [{
974
- ms: [h]
975
- }],
976
- /**
977
- * Margin End
978
- * @see https://tailwindcss.com/docs/margin
979
- */
980
- me: [{
981
- me: [h]
982
- }],
983
- /**
984
- * Margin Top
985
- * @see https://tailwindcss.com/docs/margin
986
- */
987
- mt: [{
988
- mt: [h]
989
- }],
990
- /**
991
- * Margin Right
992
- * @see https://tailwindcss.com/docs/margin
993
- */
994
- mr: [{
995
- mr: [h]
996
- }],
997
- /**
998
- * Margin Bottom
999
- * @see https://tailwindcss.com/docs/margin
1000
- */
1001
- mb: [{
1002
- mb: [h]
1003
- }],
1004
- /**
1005
- * Margin Left
1006
- * @see https://tailwindcss.com/docs/margin
1007
- */
1008
- ml: [{
1009
- ml: [h]
1010
- }],
1011
- /**
1012
- * Space Between X
1013
- * @see https://tailwindcss.com/docs/space
1014
- */
1015
- "space-x": [{
1016
- "space-x": [P]
1017
- }],
1018
- /**
1019
- * Space Between X Reverse
1020
- * @see https://tailwindcss.com/docs/space
1021
- */
1022
- "space-x-reverse": ["space-x-reverse"],
1023
- /**
1024
- * Space Between Y
1025
- * @see https://tailwindcss.com/docs/space
1026
- */
1027
- "space-y": [{
1028
- "space-y": [P]
1029
- }],
1030
- /**
1031
- * Space Between Y Reverse
1032
- * @see https://tailwindcss.com/docs/space
1033
- */
1034
- "space-y-reverse": ["space-y-reverse"],
1035
- // Sizing
1036
- /**
1037
- * Width
1038
- * @see https://tailwindcss.com/docs/width
1039
- */
1040
- w: [{
1041
- w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", l, r]
1042
- }],
1043
- /**
1044
- * Min-Width
1045
- * @see https://tailwindcss.com/docs/min-width
1046
- */
1047
- "min-w": [{
1048
- "min-w": [l, r, "min", "max", "fit"]
1049
- }],
1050
- /**
1051
- * Max-Width
1052
- * @see https://tailwindcss.com/docs/max-width
1053
- */
1054
- "max-w": [{
1055
- "max-w": [l, r, "none", "full", "min", "max", "fit", "prose", {
1056
- screen: [T]
1057
- }, T]
1058
- }],
1059
- /**
1060
- * Height
1061
- * @see https://tailwindcss.com/docs/height
1062
- */
1063
- h: [{
1064
- h: [l, r, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
1065
- }],
1066
- /**
1067
- * Min-Height
1068
- * @see https://tailwindcss.com/docs/min-height
1069
- */
1070
- "min-h": [{
1071
- "min-h": [l, r, "min", "max", "fit", "svh", "lvh", "dvh"]
1072
- }],
1073
- /**
1074
- * Max-Height
1075
- * @see https://tailwindcss.com/docs/max-height
1076
- */
1077
- "max-h": [{
1078
- "max-h": [l, r, "min", "max", "fit", "svh", "lvh", "dvh"]
1079
- }],
1080
- /**
1081
- * Size
1082
- * @see https://tailwindcss.com/docs/size
1083
- */
1084
- size: [{
1085
- size: [l, r, "auto", "min", "max", "fit"]
1086
- }],
1087
- // Typography
1088
- /**
1089
- * Font Size
1090
- * @see https://tailwindcss.com/docs/font-size
1091
- */
1092
- "font-size": [{
1093
- text: ["base", T, M]
1094
- }],
1095
- /**
1096
- * Font Smoothing
1097
- * @see https://tailwindcss.com/docs/font-smoothing
1098
- */
1099
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
1100
- /**
1101
- * Font Style
1102
- * @see https://tailwindcss.com/docs/font-style
1103
- */
1104
- "font-style": ["italic", "not-italic"],
1105
- /**
1106
- * Font Weight
1107
- * @see https://tailwindcss.com/docs/font-weight
1108
- */
1109
- "font-weight": [{
1110
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Z]
1111
- }],
1112
- /**
1113
- * Font Family
1114
- * @see https://tailwindcss.com/docs/font-family
1115
- */
1116
- "font-family": [{
1117
- font: [B]
1118
- }],
1119
- /**
1120
- * Font Variant Numeric
1121
- * @see https://tailwindcss.com/docs/font-variant-numeric
1122
- */
1123
- "fvn-normal": ["normal-nums"],
1124
- /**
1125
- * Font Variant Numeric
1126
- * @see https://tailwindcss.com/docs/font-variant-numeric
1127
- */
1128
- "fvn-ordinal": ["ordinal"],
1129
- /**
1130
- * Font Variant Numeric
1131
- * @see https://tailwindcss.com/docs/font-variant-numeric
1132
- */
1133
- "fvn-slashed-zero": ["slashed-zero"],
1134
- /**
1135
- * Font Variant Numeric
1136
- * @see https://tailwindcss.com/docs/font-variant-numeric
1137
- */
1138
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
1139
- /**
1140
- * Font Variant Numeric
1141
- * @see https://tailwindcss.com/docs/font-variant-numeric
1142
- */
1143
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
1144
- /**
1145
- * Font Variant Numeric
1146
- * @see https://tailwindcss.com/docs/font-variant-numeric
1147
- */
1148
- "fvn-fraction": ["diagonal-fractions", "stacked-fractons"],
1149
- /**
1150
- * Letter Spacing
1151
- * @see https://tailwindcss.com/docs/letter-spacing
1152
- */
1153
- tracking: [{
1154
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", l]
1155
- }],
1156
- /**
1157
- * Line Clamp
1158
- * @see https://tailwindcss.com/docs/line-clamp
1159
- */
1160
- "line-clamp": [{
1161
- "line-clamp": ["none", D, Z]
1162
- }],
1163
- /**
1164
- * Line Height
1165
- * @see https://tailwindcss.com/docs/line-height
1166
- */
1167
- leading: [{
1168
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", A, l]
1169
- }],
1170
- /**
1171
- * List Style Image
1172
- * @see https://tailwindcss.com/docs/list-style-image
1173
- */
1174
- "list-image": [{
1175
- "list-image": ["none", l]
1176
- }],
1177
- /**
1178
- * List Style Type
1179
- * @see https://tailwindcss.com/docs/list-style-type
1180
- */
1181
- "list-style-type": [{
1182
- list: ["none", "disc", "decimal", l]
1183
- }],
1184
- /**
1185
- * List Style Position
1186
- * @see https://tailwindcss.com/docs/list-style-position
1187
- */
1188
- "list-style-position": [{
1189
- list: ["inside", "outside"]
1190
- }],
1191
- /**
1192
- * Placeholder Color
1193
- * @deprecated since Tailwind CSS v3.0.0
1194
- * @see https://tailwindcss.com/docs/placeholder-color
1195
- */
1196
- "placeholder-color": [{
1197
- placeholder: [e]
1198
- }],
1199
- /**
1200
- * Placeholder Opacity
1201
- * @see https://tailwindcss.com/docs/placeholder-opacity
1202
- */
1203
- "placeholder-opacity": [{
1204
- "placeholder-opacity": [S]
1205
- }],
1206
- /**
1207
- * Text Alignment
1208
- * @see https://tailwindcss.com/docs/text-align
1209
- */
1210
- "text-alignment": [{
1211
- text: ["left", "center", "right", "justify", "start", "end"]
1212
- }],
1213
- /**
1214
- * Text Color
1215
- * @see https://tailwindcss.com/docs/text-color
1216
- */
1217
- "text-color": [{
1218
- text: [e]
1219
- }],
1220
- /**
1221
- * Text Opacity
1222
- * @see https://tailwindcss.com/docs/text-opacity
1223
- */
1224
- "text-opacity": [{
1225
- "text-opacity": [S]
1226
- }],
1227
- /**
1228
- * Text Decoration
1229
- * @see https://tailwindcss.com/docs/text-decoration
1230
- */
1231
- "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1232
- /**
1233
- * Text Decoration Style
1234
- * @see https://tailwindcss.com/docs/text-decoration-style
1235
- */
1236
- "text-decoration-style": [{
1237
- decoration: [...$(), "wavy"]
1238
- }],
1239
- /**
1240
- * Text Decoration Thickness
1241
- * @see https://tailwindcss.com/docs/text-decoration-thickness
1242
- */
1243
- "text-decoration-thickness": [{
1244
- decoration: ["auto", "from-font", A, M]
1245
- }],
1246
- /**
1247
- * Text Underline Offset
1248
- * @see https://tailwindcss.com/docs/text-underline-offset
1249
- */
1250
- "underline-offset": [{
1251
- "underline-offset": ["auto", A, l]
1252
- }],
1253
- /**
1254
- * Text Decoration Color
1255
- * @see https://tailwindcss.com/docs/text-decoration-color
1256
- */
1257
- "text-decoration-color": [{
1258
- decoration: [e]
1259
- }],
1260
- /**
1261
- * Text Transform
1262
- * @see https://tailwindcss.com/docs/text-transform
1263
- */
1264
- "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1265
- /**
1266
- * Text Overflow
1267
- * @see https://tailwindcss.com/docs/text-overflow
1268
- */
1269
- "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1270
- /**
1271
- * Text Wrap
1272
- * @see https://tailwindcss.com/docs/text-wrap
1273
- */
1274
- "text-wrap": [{
1275
- text: ["wrap", "nowrap", "balance", "pretty"]
1276
- }],
1277
- /**
1278
- * Text Indent
1279
- * @see https://tailwindcss.com/docs/text-indent
1280
- */
1281
- indent: [{
1282
- indent: m()
1283
- }],
1284
- /**
1285
- * Vertical Alignment
1286
- * @see https://tailwindcss.com/docs/vertical-align
1287
- */
1288
- "vertical-align": [{
1289
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", l]
1290
- }],
1291
- /**
1292
- * Whitespace
1293
- * @see https://tailwindcss.com/docs/whitespace
1294
- */
1295
- whitespace: [{
1296
- whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1297
- }],
1298
- /**
1299
- * Word Break
1300
- * @see https://tailwindcss.com/docs/word-break
1301
- */
1302
- break: [{
1303
- break: ["normal", "words", "all", "keep"]
1304
- }],
1305
- /**
1306
- * Hyphens
1307
- * @see https://tailwindcss.com/docs/hyphens
1308
- */
1309
- hyphens: [{
1310
- hyphens: ["none", "manual", "auto"]
1311
- }],
1312
- /**
1313
- * Content
1314
- * @see https://tailwindcss.com/docs/content
1315
- */
1316
- content: [{
1317
- content: ["none", l]
1318
- }],
1319
- // Backgrounds
1320
- /**
1321
- * Background Attachment
1322
- * @see https://tailwindcss.com/docs/background-attachment
1323
- */
1324
- "bg-attachment": [{
1325
- bg: ["fixed", "local", "scroll"]
1326
- }],
1327
- /**
1328
- * Background Clip
1329
- * @see https://tailwindcss.com/docs/background-clip
1330
- */
1331
- "bg-clip": [{
1332
- "bg-clip": ["border", "padding", "content", "text"]
1333
- }],
1334
- /**
1335
- * Background Opacity
1336
- * @deprecated since Tailwind CSS v3.0.0
1337
- * @see https://tailwindcss.com/docs/background-opacity
1338
- */
1339
- "bg-opacity": [{
1340
- "bg-opacity": [S]
1341
- }],
1342
- /**
1343
- * Background Origin
1344
- * @see https://tailwindcss.com/docs/background-origin
1345
- */
1346
- "bg-origin": [{
1347
- "bg-origin": ["border", "padding", "content"]
1348
- }],
1349
- /**
1350
- * Background Position
1351
- * @see https://tailwindcss.com/docs/background-position
1352
- */
1353
- "bg-position": [{
1354
- bg: [...J(), _e]
1355
- }],
1356
- /**
1357
- * Background Repeat
1358
- * @see https://tailwindcss.com/docs/background-repeat
1359
- */
1360
- "bg-repeat": [{
1361
- bg: ["no-repeat", {
1362
- repeat: ["", "x", "y", "round", "space"]
1363
- }]
1364
- }],
1365
- /**
1366
- * Background Size
1367
- * @see https://tailwindcss.com/docs/background-size
1368
- */
1369
- "bg-size": [{
1370
- bg: ["auto", "cover", "contain", We]
1371
- }],
1372
- /**
1373
- * Background Image
1374
- * @see https://tailwindcss.com/docs/background-image
1375
- */
1376
- "bg-image": [{
1377
- bg: ["none", {
1378
- "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1379
- }, Be]
1380
- }],
1381
- /**
1382
- * Background Color
1383
- * @see https://tailwindcss.com/docs/background-color
1384
- */
1385
- "bg-color": [{
1386
- bg: [e]
1387
- }],
1388
- /**
1389
- * Gradient Color Stops From Position
1390
- * @see https://tailwindcss.com/docs/gradient-color-stops
1391
- */
1392
- "gradient-from-pos": [{
1393
- from: [x]
1394
- }],
1395
- /**
1396
- * Gradient Color Stops Via Position
1397
- * @see https://tailwindcss.com/docs/gradient-color-stops
1398
- */
1399
- "gradient-via-pos": [{
1400
- via: [x]
1401
- }],
1402
- /**
1403
- * Gradient Color Stops To Position
1404
- * @see https://tailwindcss.com/docs/gradient-color-stops
1405
- */
1406
- "gradient-to-pos": [{
1407
- to: [x]
1408
- }],
1409
- /**
1410
- * Gradient Color Stops From
1411
- * @see https://tailwindcss.com/docs/gradient-color-stops
1412
- */
1413
- "gradient-from": [{
1414
- from: [y]
1415
- }],
1416
- /**
1417
- * Gradient Color Stops Via
1418
- * @see https://tailwindcss.com/docs/gradient-color-stops
1419
- */
1420
- "gradient-via": [{
1421
- via: [y]
1422
- }],
1423
- /**
1424
- * Gradient Color Stops To
1425
- * @see https://tailwindcss.com/docs/gradient-color-stops
1426
- */
1427
- "gradient-to": [{
1428
- to: [y]
1429
- }],
1430
- // Borders
1431
- /**
1432
- * Border Radius
1433
- * @see https://tailwindcss.com/docs/border-radius
1434
- */
1435
- rounded: [{
1436
- rounded: [o]
1437
- }],
1438
- /**
1439
- * Border Radius Start
1440
- * @see https://tailwindcss.com/docs/border-radius
1441
- */
1442
- "rounded-s": [{
1443
- "rounded-s": [o]
1444
- }],
1445
- /**
1446
- * Border Radius End
1447
- * @see https://tailwindcss.com/docs/border-radius
1448
- */
1449
- "rounded-e": [{
1450
- "rounded-e": [o]
1451
- }],
1452
- /**
1453
- * Border Radius Top
1454
- * @see https://tailwindcss.com/docs/border-radius
1455
- */
1456
- "rounded-t": [{
1457
- "rounded-t": [o]
1458
- }],
1459
- /**
1460
- * Border Radius Right
1461
- * @see https://tailwindcss.com/docs/border-radius
1462
- */
1463
- "rounded-r": [{
1464
- "rounded-r": [o]
1465
- }],
1466
- /**
1467
- * Border Radius Bottom
1468
- * @see https://tailwindcss.com/docs/border-radius
1469
- */
1470
- "rounded-b": [{
1471
- "rounded-b": [o]
1472
- }],
1473
- /**
1474
- * Border Radius Left
1475
- * @see https://tailwindcss.com/docs/border-radius
1476
- */
1477
- "rounded-l": [{
1478
- "rounded-l": [o]
1479
- }],
1480
- /**
1481
- * Border Radius Start Start
1482
- * @see https://tailwindcss.com/docs/border-radius
1483
- */
1484
- "rounded-ss": [{
1485
- "rounded-ss": [o]
1486
- }],
1487
- /**
1488
- * Border Radius Start End
1489
- * @see https://tailwindcss.com/docs/border-radius
1490
- */
1491
- "rounded-se": [{
1492
- "rounded-se": [o]
1493
- }],
1494
- /**
1495
- * Border Radius End End
1496
- * @see https://tailwindcss.com/docs/border-radius
1497
- */
1498
- "rounded-ee": [{
1499
- "rounded-ee": [o]
1500
- }],
1501
- /**
1502
- * Border Radius End Start
1503
- * @see https://tailwindcss.com/docs/border-radius
1504
- */
1505
- "rounded-es": [{
1506
- "rounded-es": [o]
1507
- }],
1508
- /**
1509
- * Border Radius Top Left
1510
- * @see https://tailwindcss.com/docs/border-radius
1511
- */
1512
- "rounded-tl": [{
1513
- "rounded-tl": [o]
1514
- }],
1515
- /**
1516
- * Border Radius Top Right
1517
- * @see https://tailwindcss.com/docs/border-radius
1518
- */
1519
- "rounded-tr": [{
1520
- "rounded-tr": [o]
1521
- }],
1522
- /**
1523
- * Border Radius Bottom Right
1524
- * @see https://tailwindcss.com/docs/border-radius
1525
- */
1526
- "rounded-br": [{
1527
- "rounded-br": [o]
1528
- }],
1529
- /**
1530
- * Border Radius Bottom Left
1531
- * @see https://tailwindcss.com/docs/border-radius
1532
- */
1533
- "rounded-bl": [{
1534
- "rounded-bl": [o]
1535
- }],
1536
- /**
1537
- * Border Width
1538
- * @see https://tailwindcss.com/docs/border-width
1539
- */
1540
- "border-w": [{
1541
- border: [i]
1542
- }],
1543
- /**
1544
- * Border Width X
1545
- * @see https://tailwindcss.com/docs/border-width
1546
- */
1547
- "border-w-x": [{
1548
- "border-x": [i]
1549
- }],
1550
- /**
1551
- * Border Width Y
1552
- * @see https://tailwindcss.com/docs/border-width
1553
- */
1554
- "border-w-y": [{
1555
- "border-y": [i]
1556
- }],
1557
- /**
1558
- * Border Width Start
1559
- * @see https://tailwindcss.com/docs/border-width
1560
- */
1561
- "border-w-s": [{
1562
- "border-s": [i]
1563
- }],
1564
- /**
1565
- * Border Width End
1566
- * @see https://tailwindcss.com/docs/border-width
1567
- */
1568
- "border-w-e": [{
1569
- "border-e": [i]
1570
- }],
1571
- /**
1572
- * Border Width Top
1573
- * @see https://tailwindcss.com/docs/border-width
1574
- */
1575
- "border-w-t": [{
1576
- "border-t": [i]
1577
- }],
1578
- /**
1579
- * Border Width Right
1580
- * @see https://tailwindcss.com/docs/border-width
1581
- */
1582
- "border-w-r": [{
1583
- "border-r": [i]
1584
- }],
1585
- /**
1586
- * Border Width Bottom
1587
- * @see https://tailwindcss.com/docs/border-width
1588
- */
1589
- "border-w-b": [{
1590
- "border-b": [i]
1591
- }],
1592
- /**
1593
- * Border Width Left
1594
- * @see https://tailwindcss.com/docs/border-width
1595
- */
1596
- "border-w-l": [{
1597
- "border-l": [i]
1598
- }],
1599
- /**
1600
- * Border Opacity
1601
- * @see https://tailwindcss.com/docs/border-opacity
1602
- */
1603
- "border-opacity": [{
1604
- "border-opacity": [S]
1605
- }],
1606
- /**
1607
- * Border Style
1608
- * @see https://tailwindcss.com/docs/border-style
1609
- */
1610
- "border-style": [{
1611
- border: [...$(), "hidden"]
1612
- }],
1613
- /**
1614
- * Divide Width X
1615
- * @see https://tailwindcss.com/docs/divide-width
1616
- */
1617
- "divide-x": [{
1618
- "divide-x": [i]
1619
- }],
1620
- /**
1621
- * Divide Width X Reverse
1622
- * @see https://tailwindcss.com/docs/divide-width
1623
- */
1624
- "divide-x-reverse": ["divide-x-reverse"],
1625
- /**
1626
- * Divide Width Y
1627
- * @see https://tailwindcss.com/docs/divide-width
1628
- */
1629
- "divide-y": [{
1630
- "divide-y": [i]
1631
- }],
1632
- /**
1633
- * Divide Width Y Reverse
1634
- * @see https://tailwindcss.com/docs/divide-width
1635
- */
1636
- "divide-y-reverse": ["divide-y-reverse"],
1637
- /**
1638
- * Divide Opacity
1639
- * @see https://tailwindcss.com/docs/divide-opacity
1640
- */
1641
- "divide-opacity": [{
1642
- "divide-opacity": [S]
1643
- }],
1644
- /**
1645
- * Divide Style
1646
- * @see https://tailwindcss.com/docs/divide-style
1647
- */
1648
- "divide-style": [{
1649
- divide: $()
1650
- }],
1651
- /**
1652
- * Border Color
1653
- * @see https://tailwindcss.com/docs/border-color
1654
- */
1655
- "border-color": [{
1656
- border: [a]
1657
- }],
1658
- /**
1659
- * Border Color X
1660
- * @see https://tailwindcss.com/docs/border-color
1661
- */
1662
- "border-color-x": [{
1663
- "border-x": [a]
1664
- }],
1665
- /**
1666
- * Border Color Y
1667
- * @see https://tailwindcss.com/docs/border-color
1668
- */
1669
- "border-color-y": [{
1670
- "border-y": [a]
1671
- }],
1672
- /**
1673
- * Border Color Top
1674
- * @see https://tailwindcss.com/docs/border-color
1675
- */
1676
- "border-color-t": [{
1677
- "border-t": [a]
1678
- }],
1679
- /**
1680
- * Border Color Right
1681
- * @see https://tailwindcss.com/docs/border-color
1682
- */
1683
- "border-color-r": [{
1684
- "border-r": [a]
1685
- }],
1686
- /**
1687
- * Border Color Bottom
1688
- * @see https://tailwindcss.com/docs/border-color
1689
- */
1690
- "border-color-b": [{
1691
- "border-b": [a]
1692
- }],
1693
- /**
1694
- * Border Color Left
1695
- * @see https://tailwindcss.com/docs/border-color
1696
- */
1697
- "border-color-l": [{
1698
- "border-l": [a]
1699
- }],
1700
- /**
1701
- * Divide Color
1702
- * @see https://tailwindcss.com/docs/divide-color
1703
- */
1704
- "divide-color": [{
1705
- divide: [a]
1706
- }],
1707
- /**
1708
- * Outline Style
1709
- * @see https://tailwindcss.com/docs/outline-style
1710
- */
1711
- "outline-style": [{
1712
- outline: ["", ...$()]
1713
- }],
1714
- /**
1715
- * Outline Offset
1716
- * @see https://tailwindcss.com/docs/outline-offset
1717
- */
1718
- "outline-offset": [{
1719
- "outline-offset": [A, l]
1720
- }],
1721
- /**
1722
- * Outline Width
1723
- * @see https://tailwindcss.com/docs/outline-width
1724
- */
1725
- "outline-w": [{
1726
- outline: [A, M]
1727
- }],
1728
- /**
1729
- * Outline Color
1730
- * @see https://tailwindcss.com/docs/outline-color
1731
- */
1732
- "outline-color": [{
1733
- outline: [e]
1734
- }],
1735
- /**
1736
- * Ring Width
1737
- * @see https://tailwindcss.com/docs/ring-width
1738
- */
1739
- "ring-w": [{
1740
- ring: z()
1741
- }],
1742
- /**
1743
- * Ring Width Inset
1744
- * @see https://tailwindcss.com/docs/ring-width
1745
- */
1746
- "ring-w-inset": ["ring-inset"],
1747
- /**
1748
- * Ring Color
1749
- * @see https://tailwindcss.com/docs/ring-color
1750
- */
1751
- "ring-color": [{
1752
- ring: [e]
1753
- }],
1754
- /**
1755
- * Ring Opacity
1756
- * @see https://tailwindcss.com/docs/ring-opacity
1757
- */
1758
- "ring-opacity": [{
1759
- "ring-opacity": [S]
1760
- }],
1761
- /**
1762
- * Ring Offset Width
1763
- * @see https://tailwindcss.com/docs/ring-offset-width
1764
- */
1765
- "ring-offset-w": [{
1766
- "ring-offset": [A, M]
1767
- }],
1768
- /**
1769
- * Ring Offset Color
1770
- * @see https://tailwindcss.com/docs/ring-offset-color
1771
- */
1772
- "ring-offset-color": [{
1773
- "ring-offset": [e]
1774
- }],
1775
- // Effects
1776
- /**
1777
- * Box Shadow
1778
- * @see https://tailwindcss.com/docs/box-shadow
1779
- */
1780
- shadow: [{
1781
- shadow: ["", "inner", "none", T, Fe]
1782
- }],
1783
- /**
1784
- * Box Shadow Color
1785
- * @see https://tailwindcss.com/docs/box-shadow-color
1786
- */
1787
- "shadow-color": [{
1788
- shadow: [B]
1789
- }],
1790
- /**
1791
- * Opacity
1792
- * @see https://tailwindcss.com/docs/opacity
1793
- */
1794
- opacity: [{
1795
- opacity: [S]
1796
- }],
1797
- /**
1798
- * Mix Blend Mode
1799
- * @see https://tailwindcss.com/docs/mix-blend-mode
1800
- */
1801
- "mix-blend": [{
1802
- "mix-blend": K()
1803
- }],
1804
- /**
1805
- * Background Blend Mode
1806
- * @see https://tailwindcss.com/docs/background-blend-mode
1807
- */
1808
- "bg-blend": [{
1809
- "bg-blend": K()
1810
- }],
1811
- // Filters
1812
- /**
1813
- * Filter
1814
- * @deprecated since Tailwind CSS v3.0.0
1815
- * @see https://tailwindcss.com/docs/filter
1816
- */
1817
- filter: [{
1818
- filter: ["", "none"]
1819
- }],
1820
- /**
1821
- * Blur
1822
- * @see https://tailwindcss.com/docs/blur
1823
- */
1824
- blur: [{
1825
- blur: [t]
1826
- }],
1827
- /**
1828
- * Brightness
1829
- * @see https://tailwindcss.com/docs/brightness
1830
- */
1831
- brightness: [{
1832
- brightness: [n]
1833
- }],
1834
- /**
1835
- * Contrast
1836
- * @see https://tailwindcss.com/docs/contrast
1837
- */
1838
- contrast: [{
1839
- contrast: [c]
1840
- }],
1841
- /**
1842
- * Drop Shadow
1843
- * @see https://tailwindcss.com/docs/drop-shadow
1844
- */
1845
- "drop-shadow": [{
1846
- "drop-shadow": ["", "none", T, l]
1847
- }],
1848
- /**
1849
- * Grayscale
1850
- * @see https://tailwindcss.com/docs/grayscale
1851
- */
1852
- grayscale: [{
1853
- grayscale: [d]
1854
- }],
1855
- /**
1856
- * Hue Rotate
1857
- * @see https://tailwindcss.com/docs/hue-rotate
1858
- */
1859
- "hue-rotate": [{
1860
- "hue-rotate": [u]
1861
- }],
1862
- /**
1863
- * Invert
1864
- * @see https://tailwindcss.com/docs/invert
1865
- */
1866
- invert: [{
1867
- invert: [f]
1868
- }],
1869
- /**
1870
- * Saturate
1871
- * @see https://tailwindcss.com/docs/saturate
1872
- */
1873
- saturate: [{
1874
- saturate: [F]
1875
- }],
1876
- /**
1877
- * Sepia
1878
- * @see https://tailwindcss.com/docs/sepia
1879
- */
1880
- sepia: [{
1881
- sepia: [j]
1882
- }],
1883
- /**
1884
- * Backdrop Filter
1885
- * @deprecated since Tailwind CSS v3.0.0
1886
- * @see https://tailwindcss.com/docs/backdrop-filter
1887
- */
1888
- "backdrop-filter": [{
1889
- "backdrop-filter": ["", "none"]
1890
- }],
1891
- /**
1892
- * Backdrop Blur
1893
- * @see https://tailwindcss.com/docs/backdrop-blur
1894
- */
1895
- "backdrop-blur": [{
1896
- "backdrop-blur": [t]
1897
- }],
1898
- /**
1899
- * Backdrop Brightness
1900
- * @see https://tailwindcss.com/docs/backdrop-brightness
1901
- */
1902
- "backdrop-brightness": [{
1903
- "backdrop-brightness": [n]
1904
- }],
1905
- /**
1906
- * Backdrop Contrast
1907
- * @see https://tailwindcss.com/docs/backdrop-contrast
1908
- */
1909
- "backdrop-contrast": [{
1910
- "backdrop-contrast": [c]
1911
- }],
1912
- /**
1913
- * Backdrop Grayscale
1914
- * @see https://tailwindcss.com/docs/backdrop-grayscale
1915
- */
1916
- "backdrop-grayscale": [{
1917
- "backdrop-grayscale": [d]
1918
- }],
1919
- /**
1920
- * Backdrop Hue Rotate
1921
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1922
- */
1923
- "backdrop-hue-rotate": [{
1924
- "backdrop-hue-rotate": [u]
1925
- }],
1926
- /**
1927
- * Backdrop Invert
1928
- * @see https://tailwindcss.com/docs/backdrop-invert
1929
- */
1930
- "backdrop-invert": [{
1931
- "backdrop-invert": [f]
1932
- }],
1933
- /**
1934
- * Backdrop Opacity
1935
- * @see https://tailwindcss.com/docs/backdrop-opacity
1936
- */
1937
- "backdrop-opacity": [{
1938
- "backdrop-opacity": [S]
1939
- }],
1940
- /**
1941
- * Backdrop Saturate
1942
- * @see https://tailwindcss.com/docs/backdrop-saturate
1943
- */
1944
- "backdrop-saturate": [{
1945
- "backdrop-saturate": [F]
1946
- }],
1947
- /**
1948
- * Backdrop Sepia
1949
- * @see https://tailwindcss.com/docs/backdrop-sepia
1950
- */
1951
- "backdrop-sepia": [{
1952
- "backdrop-sepia": [j]
1953
- }],
1954
- // Tables
1955
- /**
1956
- * Border Collapse
1957
- * @see https://tailwindcss.com/docs/border-collapse
1958
- */
1959
- "border-collapse": [{
1960
- border: ["collapse", "separate"]
1961
- }],
1962
- /**
1963
- * Border Spacing
1964
- * @see https://tailwindcss.com/docs/border-spacing
1965
- */
1966
- "border-spacing": [{
1967
- "border-spacing": [s]
1968
- }],
1969
- /**
1970
- * Border Spacing X
1971
- * @see https://tailwindcss.com/docs/border-spacing
1972
- */
1973
- "border-spacing-x": [{
1974
- "border-spacing-x": [s]
1975
- }],
1976
- /**
1977
- * Border Spacing Y
1978
- * @see https://tailwindcss.com/docs/border-spacing
1979
- */
1980
- "border-spacing-y": [{
1981
- "border-spacing-y": [s]
1982
- }],
1983
- /**
1984
- * Table Layout
1985
- * @see https://tailwindcss.com/docs/table-layout
1986
- */
1987
- "table-layout": [{
1988
- table: ["auto", "fixed"]
1989
- }],
1990
- /**
1991
- * Caption Side
1992
- * @see https://tailwindcss.com/docs/caption-side
1993
- */
1994
- caption: [{
1995
- caption: ["top", "bottom"]
1996
- }],
1997
- // Transitions and Animation
1998
- /**
1999
- * Tranisition Property
2000
- * @see https://tailwindcss.com/docs/transition-property
2001
- */
2002
- transition: [{
2003
- transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", l]
2004
- }],
2005
- /**
2006
- * Transition Duration
2007
- * @see https://tailwindcss.com/docs/transition-duration
2008
- */
2009
- duration: [{
2010
- duration: X()
2011
- }],
2012
- /**
2013
- * Transition Timing Function
2014
- * @see https://tailwindcss.com/docs/transition-timing-function
2015
- */
2016
- ease: [{
2017
- ease: ["linear", "in", "out", "in-out", l]
2018
- }],
2019
- /**
2020
- * Transition Delay
2021
- * @see https://tailwindcss.com/docs/transition-delay
2022
- */
2023
- delay: [{
2024
- delay: X()
2025
- }],
2026
- /**
2027
- * Animation
2028
- * @see https://tailwindcss.com/docs/animation
2029
- */
2030
- animate: [{
2031
- animate: ["none", "spin", "ping", "pulse", "bounce", l]
2032
- }],
2033
- // Transforms
2034
- /**
2035
- * Transform
2036
- * @see https://tailwindcss.com/docs/transform
2037
- */
2038
- transform: [{
2039
- transform: ["", "gpu", "none"]
2040
- }],
2041
- /**
2042
- * Scale
2043
- * @see https://tailwindcss.com/docs/scale
2044
- */
2045
- scale: [{
2046
- scale: [L]
2047
- }],
2048
- /**
2049
- * Scale X
2050
- * @see https://tailwindcss.com/docs/scale
2051
- */
2052
- "scale-x": [{
2053
- "scale-x": [L]
2054
- }],
2055
- /**
2056
- * Scale Y
2057
- * @see https://tailwindcss.com/docs/scale
2058
- */
2059
- "scale-y": [{
2060
- "scale-y": [L]
2061
- }],
2062
- /**
2063
- * Rotate
2064
- * @see https://tailwindcss.com/docs/rotate
2065
- */
2066
- rotate: [{
2067
- rotate: [U, l]
2068
- }],
2069
- /**
2070
- * Translate X
2071
- * @see https://tailwindcss.com/docs/translate
2072
- */
2073
- "translate-x": [{
2074
- "translate-x": [O]
2075
- }],
2076
- /**
2077
- * Translate Y
2078
- * @see https://tailwindcss.com/docs/translate
2079
- */
2080
- "translate-y": [{
2081
- "translate-y": [O]
2082
- }],
2083
- /**
2084
- * Skew X
2085
- * @see https://tailwindcss.com/docs/skew
2086
- */
2087
- "skew-x": [{
2088
- "skew-x": [V]
2089
- }],
2090
- /**
2091
- * Skew Y
2092
- * @see https://tailwindcss.com/docs/skew
2093
- */
2094
- "skew-y": [{
2095
- "skew-y": [V]
2096
- }],
2097
- /**
2098
- * Transform Origin
2099
- * @see https://tailwindcss.com/docs/transform-origin
2100
- */
2101
- "transform-origin": [{
2102
- origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", l]
2103
- }],
2104
- // Interactivity
2105
- /**
2106
- * Accent Color
2107
- * @see https://tailwindcss.com/docs/accent-color
2108
- */
2109
- accent: [{
2110
- accent: ["auto", e]
2111
- }],
2112
- /**
2113
- * Appearance
2114
- * @see https://tailwindcss.com/docs/appearance
2115
- */
2116
- appearance: [{
2117
- appearance: ["none", "auto"]
2118
- }],
2119
- /**
2120
- * Cursor
2121
- * @see https://tailwindcss.com/docs/cursor
2122
- */
2123
- cursor: [{
2124
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", l]
2125
- }],
2126
- /**
2127
- * Caret Color
2128
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2129
- */
2130
- "caret-color": [{
2131
- caret: [e]
2132
- }],
2133
- /**
2134
- * Pointer Events
2135
- * @see https://tailwindcss.com/docs/pointer-events
2136
- */
2137
- "pointer-events": [{
2138
- "pointer-events": ["none", "auto"]
2139
- }],
2140
- /**
2141
- * Resize
2142
- * @see https://tailwindcss.com/docs/resize
2143
- */
2144
- resize: [{
2145
- resize: ["none", "y", "x", ""]
2146
- }],
2147
- /**
2148
- * Scroll Behavior
2149
- * @see https://tailwindcss.com/docs/scroll-behavior
2150
- */
2151
- "scroll-behavior": [{
2152
- scroll: ["auto", "smooth"]
2153
- }],
2154
- /**
2155
- * Scroll Margin
2156
- * @see https://tailwindcss.com/docs/scroll-margin
2157
- */
2158
- "scroll-m": [{
2159
- "scroll-m": m()
2160
- }],
2161
- /**
2162
- * Scroll Margin X
2163
- * @see https://tailwindcss.com/docs/scroll-margin
2164
- */
2165
- "scroll-mx": [{
2166
- "scroll-mx": m()
2167
- }],
2168
- /**
2169
- * Scroll Margin Y
2170
- * @see https://tailwindcss.com/docs/scroll-margin
2171
- */
2172
- "scroll-my": [{
2173
- "scroll-my": m()
2174
- }],
2175
- /**
2176
- * Scroll Margin Start
2177
- * @see https://tailwindcss.com/docs/scroll-margin
2178
- */
2179
- "scroll-ms": [{
2180
- "scroll-ms": m()
2181
- }],
2182
- /**
2183
- * Scroll Margin End
2184
- * @see https://tailwindcss.com/docs/scroll-margin
2185
- */
2186
- "scroll-me": [{
2187
- "scroll-me": m()
2188
- }],
2189
- /**
2190
- * Scroll Margin Top
2191
- * @see https://tailwindcss.com/docs/scroll-margin
2192
- */
2193
- "scroll-mt": [{
2194
- "scroll-mt": m()
2195
- }],
2196
- /**
2197
- * Scroll Margin Right
2198
- * @see https://tailwindcss.com/docs/scroll-margin
2199
- */
2200
- "scroll-mr": [{
2201
- "scroll-mr": m()
2202
- }],
2203
- /**
2204
- * Scroll Margin Bottom
2205
- * @see https://tailwindcss.com/docs/scroll-margin
2206
- */
2207
- "scroll-mb": [{
2208
- "scroll-mb": m()
2209
- }],
2210
- /**
2211
- * Scroll Margin Left
2212
- * @see https://tailwindcss.com/docs/scroll-margin
2213
- */
2214
- "scroll-ml": [{
2215
- "scroll-ml": m()
2216
- }],
2217
- /**
2218
- * Scroll Padding
2219
- * @see https://tailwindcss.com/docs/scroll-padding
2220
- */
2221
- "scroll-p": [{
2222
- "scroll-p": m()
2223
- }],
2224
- /**
2225
- * Scroll Padding X
2226
- * @see https://tailwindcss.com/docs/scroll-padding
2227
- */
2228
- "scroll-px": [{
2229
- "scroll-px": m()
2230
- }],
2231
- /**
2232
- * Scroll Padding Y
2233
- * @see https://tailwindcss.com/docs/scroll-padding
2234
- */
2235
- "scroll-py": [{
2236
- "scroll-py": m()
2237
- }],
2238
- /**
2239
- * Scroll Padding Start
2240
- * @see https://tailwindcss.com/docs/scroll-padding
2241
- */
2242
- "scroll-ps": [{
2243
- "scroll-ps": m()
2244
- }],
2245
- /**
2246
- * Scroll Padding End
2247
- * @see https://tailwindcss.com/docs/scroll-padding
2248
- */
2249
- "scroll-pe": [{
2250
- "scroll-pe": m()
2251
- }],
2252
- /**
2253
- * Scroll Padding Top
2254
- * @see https://tailwindcss.com/docs/scroll-padding
2255
- */
2256
- "scroll-pt": [{
2257
- "scroll-pt": m()
2258
- }],
2259
- /**
2260
- * Scroll Padding Right
2261
- * @see https://tailwindcss.com/docs/scroll-padding
2262
- */
2263
- "scroll-pr": [{
2264
- "scroll-pr": m()
2265
- }],
2266
- /**
2267
- * Scroll Padding Bottom
2268
- * @see https://tailwindcss.com/docs/scroll-padding
2269
- */
2270
- "scroll-pb": [{
2271
- "scroll-pb": m()
2272
- }],
2273
- /**
2274
- * Scroll Padding Left
2275
- * @see https://tailwindcss.com/docs/scroll-padding
2276
- */
2277
- "scroll-pl": [{
2278
- "scroll-pl": m()
2279
- }],
2280
- /**
2281
- * Scroll Snap Align
2282
- * @see https://tailwindcss.com/docs/scroll-snap-align
2283
- */
2284
- "snap-align": [{
2285
- snap: ["start", "end", "center", "align-none"]
2286
- }],
2287
- /**
2288
- * Scroll Snap Stop
2289
- * @see https://tailwindcss.com/docs/scroll-snap-stop
2290
- */
2291
- "snap-stop": [{
2292
- snap: ["normal", "always"]
2293
- }],
2294
- /**
2295
- * Scroll Snap Type
2296
- * @see https://tailwindcss.com/docs/scroll-snap-type
2297
- */
2298
- "snap-type": [{
2299
- snap: ["none", "x", "y", "both"]
2300
- }],
2301
- /**
2302
- * Scroll Snap Type Strictness
2303
- * @see https://tailwindcss.com/docs/scroll-snap-type
2304
- */
2305
- "snap-strictness": [{
2306
- snap: ["mandatory", "proximity"]
2307
- }],
2308
- /**
2309
- * Touch Action
2310
- * @see https://tailwindcss.com/docs/touch-action
2311
- */
2312
- touch: [{
2313
- touch: ["auto", "none", "manipulation"]
2314
- }],
2315
- /**
2316
- * Touch Action X
2317
- * @see https://tailwindcss.com/docs/touch-action
2318
- */
2319
- "touch-x": [{
2320
- "touch-pan": ["x", "left", "right"]
2321
- }],
2322
- /**
2323
- * Touch Action Y
2324
- * @see https://tailwindcss.com/docs/touch-action
2325
- */
2326
- "touch-y": [{
2327
- "touch-pan": ["y", "up", "down"]
2328
- }],
2329
- /**
2330
- * Touch Action Pinch Zoom
2331
- * @see https://tailwindcss.com/docs/touch-action
2332
- */
2333
- "touch-pz": ["touch-pinch-zoom"],
2334
- /**
2335
- * User Select
2336
- * @see https://tailwindcss.com/docs/user-select
2337
- */
2338
- select: [{
2339
- select: ["none", "text", "all", "auto"]
2340
- }],
2341
- /**
2342
- * Will Change
2343
- * @see https://tailwindcss.com/docs/will-change
2344
- */
2345
- "will-change": [{
2346
- "will-change": ["auto", "scroll", "contents", "transform", l]
2347
- }],
2348
- // SVG
2349
- /**
2350
- * Fill
2351
- * @see https://tailwindcss.com/docs/fill
2352
- */
2353
- fill: [{
2354
- fill: [e, "none"]
2355
- }],
2356
- /**
2357
- * Stroke Width
2358
- * @see https://tailwindcss.com/docs/stroke-width
2359
- */
2360
- "stroke-w": [{
2361
- stroke: [A, M, Z]
2362
- }],
2363
- /**
2364
- * Stroke
2365
- * @see https://tailwindcss.com/docs/stroke
2366
- */
2367
- stroke: [{
2368
- stroke: [e, "none"]
2369
- }],
2370
- // Accessibility
2371
- /**
2372
- * Screen Readers
2373
- * @see https://tailwindcss.com/docs/screen-readers
2374
- */
2375
- sr: ["sr-only", "not-sr-only"],
2376
- /**
2377
- * Forced Color Adjust
2378
- * @see https://tailwindcss.com/docs/forced-color-adjust
2379
- */
2380
- "forced-color-adjust": [{
2381
- "forced-color-adjust": ["auto", "none"]
2382
- }]
2383
- },
2384
- conflictingClassGroups: {
2385
- overflow: ["overflow-x", "overflow-y"],
2386
- overscroll: ["overscroll-x", "overscroll-y"],
2387
- inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2388
- "inset-x": ["right", "left"],
2389
- "inset-y": ["top", "bottom"],
2390
- flex: ["basis", "grow", "shrink"],
2391
- gap: ["gap-x", "gap-y"],
2392
- p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2393
- px: ["pr", "pl"],
2394
- py: ["pt", "pb"],
2395
- m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2396
- mx: ["mr", "ml"],
2397
- my: ["mt", "mb"],
2398
- size: ["w", "h"],
2399
- "font-size": ["leading"],
2400
- "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2401
- "fvn-ordinal": ["fvn-normal"],
2402
- "fvn-slashed-zero": ["fvn-normal"],
2403
- "fvn-figure": ["fvn-normal"],
2404
- "fvn-spacing": ["fvn-normal"],
2405
- "fvn-fraction": ["fvn-normal"],
2406
- "line-clamp": ["display", "overflow"],
2407
- rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
2408
- "rounded-s": ["rounded-ss", "rounded-es"],
2409
- "rounded-e": ["rounded-se", "rounded-ee"],
2410
- "rounded-t": ["rounded-tl", "rounded-tr"],
2411
- "rounded-r": ["rounded-tr", "rounded-br"],
2412
- "rounded-b": ["rounded-br", "rounded-bl"],
2413
- "rounded-l": ["rounded-tl", "rounded-bl"],
2414
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
2415
- "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2416
- "border-w-x": ["border-w-r", "border-w-l"],
2417
- "border-w-y": ["border-w-t", "border-w-b"],
2418
- "border-color": ["border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2419
- "border-color-x": ["border-color-r", "border-color-l"],
2420
- "border-color-y": ["border-color-t", "border-color-b"],
2421
- "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2422
- "scroll-mx": ["scroll-mr", "scroll-ml"],
2423
- "scroll-my": ["scroll-mt", "scroll-mb"],
2424
- "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
2425
- "scroll-px": ["scroll-pr", "scroll-pl"],
2426
- "scroll-py": ["scroll-pt", "scroll-pb"],
2427
- touch: ["touch-x", "touch-y", "touch-pz"],
2428
- "touch-x": ["touch"],
2429
- "touch-y": ["touch"],
2430
- "touch-pz": ["touch"]
2431
- },
2432
- conflictingClassGroupModifiers: {
2433
- "font-size": ["leading"]
2434
- }
2435
- };
2436
- }
2437
- const He = /* @__PURE__ */ Te(Ze);
2438
- function Y(...e) {
2439
- return He(xe(e));
2440
- }
2441
- const Qe = Q("", {
2442
- variants: {
2443
- nested: {
2444
- true: "ps-3"
2445
- }
2446
- }
2447
- }), pe = (e) => {
2448
- const {
2449
- CheckComponent: r,
2450
- LabelComponent: t,
2451
- ExpandIconComponent: n,
2452
- standardComponentProps: {
2453
- node: a,
2454
- uniqueIDProperty: o,
2455
- labelProperty: s,
2456
- valueProperty: i,
2457
- childrenProperty: c,
2458
- disabledProperty: d
2459
- },
2460
- disabled: u,
2461
- level: f,
2462
- defaultExpanded: b,
2463
- expandDisabledNodes: y,
2464
- chainedSelect: x,
2465
- labelClassName: p,
2466
- labelStyle: h,
2467
- iconClassName: S,
2468
- iconStyle: C,
2469
- inputClassName: F,
2470
- inputStyle: L,
2471
- onChange: j,
2472
- ...V
2473
- } = e, [P, O] = ie(e.defaultExpanded ?? !1), k = e.disabled || d && a[d] === !0, N = a[c] && Array.isArray(a[c]) && a[c].length > 0, w = (z) => {
2474
- j(a, z.target.checked);
2475
- }, m = () => {
2476
- (e.expandDisabledNodes || !k) && a[c] && Array.isArray(a[c]) && a[c].length > 0 ? O(!P) : k || j(a, !a[i]);
2477
- };
2478
- return /* @__PURE__ */ se(
2479
- "div",
2480
- {
2481
- ...V,
2482
- className: Y(Qe({ nested: (e.level && e.level > 0) === !0 }), e.className),
2483
- children: [
2484
- /* @__PURE__ */ R(
2485
- r,
2486
- {
2487
- standardComponentProps: e.standardComponentProps,
2488
- className: e.inputClassName,
2489
- style: e.inputStyle,
2490
- disabled: k,
2491
- expanded: P,
2492
- checked: a[i],
2493
- onChange: w
2494
- }
2495
- ),
2496
- /* @__PURE__ */ R(
2497
- t,
2498
- {
2499
- standardComponentProps: e.standardComponentProps,
2500
- label: a[s],
2501
- expandDisabledNodes: e.expandDisabledNodes,
2502
- disabled: k,
2503
- hasChildren: N,
2504
- expanded: P,
2505
- className: e.labelClassName,
2506
- style: e.labelStyle,
2507
- iconClassName: e.iconClassName,
2508
- iconStyle: e.iconStyle,
2509
- ExpandIconComponent: n,
2510
- onClick: m
2511
- }
2512
- ),
2513
- N && P && a[c].map((z, E) => /* @__PURE__ */ R(
2514
- pe,
2515
- {
2516
- ...e,
2517
- standardComponentProps: { ...e.standardComponentProps, node: z },
2518
- disabled: e.disabled || e.chainedSelect && k,
2519
- level: (e.level ?? 0) + 1
2520
- },
2521
- `${a[o]}-${E}`
2522
- ))
2523
- ]
2524
- }
2525
- );
2526
- }, Ye = H.memo(pe), et = Q(`
2527
- appearance-none inline-block align-text-bottom text-current relative cursor-pointer
2528
- w-[1em] h-[1em] border border-current rounded-sm
2529
- checked:after:content-["✓"] after:text-sm after:font-bold after:flex after:justify-center after:align-middle after:-m-[.2rem]
2530
- disabled:cursor-default disabled:bg-gray-300 disabled:border-gray-300 disabled:text-gray-500
2531
- `, {
2532
- variants: {
2533
- mixed: {
2534
- true: "after:content-['■']"
2535
- }
2536
- }
2537
- }), tt = (e) => {
2538
- const {
2539
- myRef: r,
2540
- standardComponentProps: t,
2541
- checked: n,
2542
- expanded: a,
2543
- ...o
2544
- } = e;
2545
- return /* @__PURE__ */ R(
2546
- "input",
2547
- {
2548
- ref: r,
2549
- ...o,
2550
- checked: e.checked === !0,
2551
- className: Y(et({ mixed: e.checked === null }), e.className),
2552
- type: "checkbox"
2553
- }
2554
- );
2555
- }, rt = H.memo(tt), nt = Q("ps-3 hover:cursor-pointer hover:opacity-75", {
2556
- variants: {
2557
- disabled: {
2558
- true: "opacity-60 hover:cursor-default hover:opacity-60"
2559
- },
2560
- expandEnabled: {
2561
- true: "hover:opacity-100 hover:cursor-pointer"
2562
- }
2563
- }
2564
- }), ot = (e) => {
2565
- const {
2566
- standardComponentProps: r,
2567
- expandDisabledNodes: t,
2568
- hasChildren: n,
2569
- expanded: a,
2570
- iconClassName: o,
2571
- iconStyle: s,
2572
- ExpandIconComponent: i,
2573
- ...c
2574
- } = e;
2575
- return /* @__PURE__ */ se(
2576
- "span",
2577
- {
2578
- role: "button",
2579
- ...c,
2580
- className: Y(nt({ disabled: e.disabled, expandEnabled: e.expandDisabledNodes && e.hasChildren }), e.className),
2581
- children: [
2582
- e.label,
2583
- /* @__PURE__ */ R(i, { standardComponentProps: e.standardComponentProps, show: e.hasChildren, expanded: e.expanded === !0, className: o, style: s })
2584
- ]
2585
- }
2586
- );
2587
- }, at = H.memo(ot), st = Q("inline-block text-[.8em] ms-3 transition-transform duration-200", {
2588
- variants: {
2589
- rotated: {
2590
- true: "rotate-180"
2591
- }
2592
- }
2593
- }), it = (e) => {
2594
- const {
2595
- standardComponentProps: r,
2596
- expanded: t,
2597
- show: n,
2598
- ...a
2599
- } = e;
2600
- return e.show ? /* @__PURE__ */ R(
2601
- "span",
2602
- {
2603
- ...a,
2604
- className: Y(st({ rotated: e.expanded === !0 }), e.className),
2605
- children: "▲"
2606
- }
2607
- ) : null;
2608
- }, lt = H.memo(it), ut = (e) => {
2609
- const {
2610
- data: r,
2611
- defaultData: t,
2612
- uniqueIDProperty: n,
2613
- labelProperty: a,
2614
- valueProperty: o,
2615
- childrenProperty: s,
2616
- disabledProperty: i,
2617
- disabled: c,
2618
- expandDisabledNodes: d = !0,
2619
- defaultExpanded: u,
2620
- chainedSelect: f = !0,
2621
- nodeClassName: b,
2622
- nodeStyle: y,
2623
- labelClassName: x,
2624
- labelStyle: p,
2625
- iconClassName: h,
2626
- iconStyle: S,
2627
- inputClassName: C,
2628
- inputStyle: F,
2629
- CustomNodeComponent: L,
2630
- CustomCheckComponent: j,
2631
- CustomLabelComponent: V,
2632
- CustomExpandIconComponent: P,
2633
- onChange: O,
2634
- ...k
2635
- } = e;
2636
- let N = null;
2637
- e.defaultData && !e.data && (N = structuredClone(e.defaultData), _.initializeTree(N, "_parentID", e.childrenProperty, e.uniqueIDProperty));
2638
- const w = ge(N), [m, z] = ie(N);
2639
- he(() => {
2640
- if (!e.data)
2641
- return;
2642
- let v = structuredClone(e.data);
2643
- _.initializeTree(v, "_parentID", e.childrenProperty, e.uniqueIDProperty), w.current = v, z(v);
2644
- }, [e.data, e.childrenProperty, e.uniqueIDProperty, "_parentID"]);
2645
- const E = (v, G) => {
2646
- if (!w.current || !e.valueProperty)
2647
- return;
2648
- let I = _.getNode(w.current, e.childrenProperty, e.uniqueIDProperty, v[e.uniqueIDProperty]);
2649
- I && (I[e.valueProperty] = G, f && _.chainUpdate(w.current, I, "_parentID", e.childrenProperty, e.valueProperty, e.uniqueIDProperty, G, e.disabledProperty), z(structuredClone(w.current)), e.onChange && e.onChange(_.omitParentID(w.current, s)));
2650
- }, J = L || Ye, $ = V || at, K = j || rt, W = P || lt;
2651
- return /* @__PURE__ */ R("div", { ...k, children: m && m.map((v, G) => /* @__PURE__ */ R(
2652
- J,
2653
- {
2654
- standardComponentProps: {
2655
- node: v,
2656
- uniqueIDProperty: e.uniqueIDProperty,
2657
- labelProperty: e.labelProperty,
2658
- valueProperty: e.valueProperty,
2659
- childrenProperty: e.childrenProperty,
2660
- disabledProperty: e.disabledProperty
2661
- },
2662
- defaultExpanded: e.defaultExpanded,
2663
- disabled: e.disabled,
2664
- expandDisabledNodes: d,
2665
- chainedSelect: f,
2666
- className: e.nodeClassName,
2667
- style: e.nodeStyle,
2668
- inputClassName: e.inputClassName,
2669
- inputStyle: e.inputStyle,
2670
- labelClassName: e.labelClassName,
2671
- labelStyle: e.labelStyle,
2672
- iconClassName: e.iconClassName,
2673
- iconStyle: e.iconStyle,
2674
- CheckComponent: K,
2675
- LabelComponent: $,
2676
- ExpandIconComponent: W,
2677
- onChange: E
2678
- },
2679
- `${v[e.uniqueIDProperty]}-${G}`
2680
- )) });
2681
- };
2682
- export {
2683
- lt as ExpandIcon,
2684
- rt as NodeCheck,
2685
- at as NodeLabel,
2686
- Ye as TreeNode,
2687
- ut as default
1
+ import e, { useCallback as t, useContext as n, useEffect as r, useLayoutEffect as i, useMemo as a, useRef as o, useState as s, useSyncExternalStore as c } from "react";
2
+ import { cva as l } from "class-variance-authority";
3
+ import { clsx as u } from "clsx";
4
+ import { twMerge as d } from "tailwind-merge";
5
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
6
+ var m = class {
7
+ listeners = /* @__PURE__ */ new Set();
8
+ expandedOverrides = /* @__PURE__ */ new Map();
9
+ elements = /* @__PURE__ */ new Map();
10
+ elementIDs = /* @__PURE__ */ new Map();
11
+ activeID;
12
+ defaultExpanded;
13
+ parentResolver = () => void 0;
14
+ setParentResolver(e) {
15
+ this.parentResolver = e;
16
+ }
17
+ getParentID(e) {
18
+ return this.parentResolver(e);
19
+ }
20
+ constructor(e, t) {
21
+ this.defaultExpanded = e, this.activeID = t;
22
+ }
23
+ subscribe = (e) => (this.listeners.add(e), () => {
24
+ this.listeners.delete(e);
25
+ });
26
+ emit() {
27
+ this.listeners.forEach((e) => e());
28
+ }
29
+ getNodeState(e) {
30
+ return +!!this.isExpanded(e) | (this.activeID === e ? 2 : 0);
31
+ }
32
+ isExpanded(e) {
33
+ return this.expandedOverrides.get(e) ?? this.defaultExpanded;
34
+ }
35
+ setDefaultExpanded(e) {
36
+ e !== this.defaultExpanded && (this.defaultExpanded = e, this.expandedOverrides.clear(), this.emit());
37
+ }
38
+ setExpanded(e, t) {
39
+ if (this.isExpanded(e) !== t) {
40
+ if (this.expandedOverrides.set(e, t), !t && this.activeID !== void 0 && this.isAncestor(e, this.activeID)) {
41
+ let t = typeof document < "u" && this.elements.get(this.activeID)?.contains(document.activeElement);
42
+ this.activeID = e, t && this.elements.get(e)?.focus();
43
+ }
44
+ this.emit();
45
+ }
46
+ }
47
+ getActiveID() {
48
+ return this.activeID;
49
+ }
50
+ setActive(e) {
51
+ e !== this.activeID && (this.activeID = e, this.emit());
52
+ }
53
+ focus(e) {
54
+ this.setActive(e), this.elements.get(e)?.focus();
55
+ }
56
+ isAncestor(e, t) {
57
+ let n = this.getParentID(t);
58
+ for (; n !== void 0;) {
59
+ if (n === e) return !0;
60
+ n = this.getParentID(n);
61
+ }
62
+ return !1;
63
+ }
64
+ registerElement(e, t) {
65
+ let n = this.elements.get(e);
66
+ n && this.elementIDs.delete(n), t ? (this.elements.set(e, t), this.elementIDs.set(t, e)) : this.elements.delete(e);
67
+ }
68
+ getIDForElement(e) {
69
+ return e instanceof HTMLElement ? this.elementIDs.get(e) : void 0;
70
+ }
71
+ }, h = [];
72
+ function g(e, t) {
73
+ let n = e[t];
74
+ return Array.isArray(n) ? n : h;
75
+ }
76
+ function _(e, t) {
77
+ let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), a = (e, o) => e.forEach((e) => {
78
+ r.set(e, o);
79
+ let s = e[t.uniqueIDProperty];
80
+ n.has(s) ? i.add(s) : n.set(s, e), a(g(e, t.childrenProperty), e);
81
+ });
82
+ return a(e, null), {
83
+ byID: n,
84
+ parentOf: r,
85
+ duplicateIDs: i
86
+ };
87
+ }
88
+ function v(e, t) {
89
+ return t !== void 0 && e[t] === !0;
90
+ }
91
+ var y = (e) => e !== void 0 && e;
92
+ function b(e) {
93
+ let t = /* @__PURE__ */ new WeakMap(), n = (r) => {
94
+ let i = g(r, e.childrenProperty);
95
+ if (i.length === 0) return !1;
96
+ let a = r, o = t.get(a);
97
+ if (o !== void 0) return o;
98
+ let s = i.every((t) => v(t, e.disabledProperty) || n(t));
99
+ return t.set(a, s), s;
100
+ };
101
+ return n;
102
+ }
103
+ function x(e, t, n, r, i, a) {
104
+ if (r || v(t, n.disabledProperty)) return !0;
105
+ if (!i) return !1;
106
+ if (a?.(t)) return !0;
107
+ let o = e.parentOf.get(t);
108
+ for (; o;) {
109
+ if (v(o, n.disabledProperty)) return !0;
110
+ o = e.parentOf.get(o);
111
+ }
112
+ return !1;
113
+ }
114
+ function S(e, t, n, r, i, a = !1) {
115
+ let o = /* @__PURE__ */ new Map(), s = r.valueProperty;
116
+ if (s === void 0) return o;
117
+ if (!i) return o.set(t, n), o;
118
+ let c = (e) => e[s], l = (e) => o.has(e) ? o.get(e) : c(e), u = (e) => {
119
+ let t = new Set(e.map((e) => y(l(e))));
120
+ return t.size > 1 ? null : [...t][0];
121
+ }, d = (e, t) => {
122
+ if (v(e, r.disabledProperty)) return;
123
+ let n = g(e, r.childrenProperty);
124
+ n.forEach((e) => d(e, t)), o.set(e, n.length > 0 ? u(n) : t);
125
+ }, f = (e) => {
126
+ o.clear(), v(t, r.disabledProperty) ? o.set(t, e) : d(t, e);
127
+ };
128
+ f(n);
129
+ let p = c(t) === null && g(t, r.childrenProperty).length > 0, m = [...o].every(([e, t]) => y(c(e)) === y(t));
130
+ a && n === !0 && p && m && f(!1);
131
+ let h = e.parentOf.get(t);
132
+ for (; h;) o.set(h, u(g(h, r.childrenProperty))), h = e.parentOf.get(h);
133
+ return o;
134
+ }
135
+ function C(e, t) {
136
+ let { childrenProperty: n, valueProperty: r, mode: i = "all" } = t, a = [], o = (e) => e.forEach((e) => {
137
+ let t = g(e, n), s = e[r] === !0;
138
+ s && i === "topmost" ? a.push(e) : (s && (i === "all" || t.length === 0) && a.push(e), o(t));
139
+ });
140
+ return o(e), a;
141
+ }
142
+ function w(e, t) {
143
+ return C(e, t).map((e) => e[t.uniqueIDProperty]);
144
+ }
145
+ function T(e, t, n, r) {
146
+ let i = r.valueProperty;
147
+ if (i === void 0 || n.size === 0) return e;
148
+ let a = /* @__PURE__ */ new Set();
149
+ n.forEach((e, n) => {
150
+ let r = n;
151
+ for (; r && !a.has(r);) a.add(r), r = t.parentOf.get(r);
152
+ });
153
+ let o = (e) => {
154
+ let t = !1, s = e.map((e) => {
155
+ if (!a.has(e)) return e;
156
+ let s = e;
157
+ n.has(e) && y(e[i]) !== y(n.get(e)) && (s = {
158
+ ...e,
159
+ [i]: n.get(e)
160
+ });
161
+ let c = e[r.childrenProperty];
162
+ if (Array.isArray(c)) {
163
+ let e = o(c);
164
+ e !== c && (s = {
165
+ ...s,
166
+ [r.childrenProperty]: e
167
+ });
168
+ }
169
+ return s !== e && (t = !0), s;
170
+ });
171
+ return t ? s : e;
172
+ };
173
+ return o(e);
174
+ }
175
+ function E(e, t, n) {
176
+ let r = [], i = (e) => e.forEach((e) => {
177
+ r.push(e), n(e[t.uniqueIDProperty]) && i(g(e, t.childrenProperty));
178
+ });
179
+ return i(e), r;
180
+ }
181
+ //#endregion
182
+ //#region lib/utils/ClassUtility.ts
183
+ function D(...e) {
184
+ return d(u(e));
185
+ }
186
+ //#endregion
187
+ //#region lib/components/TreeNode.tsx
188
+ var O = l("outline-hidden", { variants: { nested: { true: "ps-3" } } }), k = e.memo((e) => {
189
+ let { CheckComponent: t, LabelComponent: n, ExpandIconComponent: r, standardComponentProps: i, treeItemProps: a, disabled: o, level: s, expanded: c = !1, defaultExpanded: l, expandDisabledNodes: u, chainedSelect: d, nested: m, labelClassName: h, labelStyle: _, iconClassName: v, iconStyle: y, inputClassName: b, inputStyle: x, onChange: S, onExpandedChange: C, children: w, className: T, ...E } = e, { node: k, labelProperty: A, valueProperty: j, childrenProperty: M, disabledProperty: N } = i, P = o || N !== void 0 && k[N] === !0, F = g(k, M).length > 0, I = (e) => {
190
+ S(k, e.target.checked, { toggle: !0 });
191
+ }, L = () => {
192
+ (u || !P) && F ? C?.(!c) : !P && j !== void 0 && S(k, k[j] !== !0, { toggle: !0 });
193
+ };
194
+ return /* @__PURE__ */ p("div", {
195
+ ...a,
196
+ ...E,
197
+ className: D(O({ nested: m ?? (s ?? 0) > 0 }), T),
198
+ children: [
199
+ /* @__PURE__ */ f(t, {
200
+ standardComponentProps: i,
201
+ className: b,
202
+ style: x,
203
+ disabled: P,
204
+ expanded: c,
205
+ checked: j === void 0 ? void 0 : k[j],
206
+ onChange: I
207
+ }),
208
+ /* @__PURE__ */ f(n, {
209
+ standardComponentProps: i,
210
+ label: k[A],
211
+ expandDisabledNodes: u,
212
+ disabled: P,
213
+ hasChildren: F,
214
+ expanded: c,
215
+ className: h,
216
+ style: _,
217
+ iconClassName: v,
218
+ iconStyle: y,
219
+ ExpandIconComponent: r,
220
+ onClick: L
221
+ }),
222
+ w && /* @__PURE__ */ f("div", {
223
+ role: "group",
224
+ className: "basis-full",
225
+ children: w
226
+ })
227
+ ]
228
+ });
229
+ });
230
+ //#endregion
231
+ //#region lib/utils/assignRef.ts
232
+ function A(e, t) {
233
+ typeof e == "function" ? e(t) : e && (e.current = t);
234
+ }
235
+ //#endregion
236
+ //#region lib/utils/useIsomorphicLayoutEffect.ts
237
+ var j = typeof window < "u" ? i : r, M = l("\n appearance-none box-border m-0 [font:inherit] inline-block align-text-bottom text-current relative cursor-pointer\n w-[1em] h-[1em] border border-solid border-current rounded-xs\n checked:after:content-[\"✓\"] after:text-sm after:font-bold after:flex after:justify-center after:align-middle after:-m-[.2rem]\n disabled:cursor-default disabled:bg-gray-300 disabled:border-gray-300 disabled:text-gray-500\n", { variants: { mixed: { true: "after:content-['■']" } } }), N = e.memo((e) => {
238
+ let { myRef: n, standardComponentProps: r, checked: i, expanded: a, mixed: c, onMouseDown: l, ...u } = e, d = o(null), [p, m] = s(!0), h = t((e) => {
239
+ d.current = e, A(n, e);
240
+ }, [n]);
241
+ j(() => {
242
+ m(d.current?.closest("[role=\"treeitem\"]") != null);
243
+ }, []), j(() => {
244
+ d.current && (d.current.indeterminate = i === null);
245
+ }, [i]);
246
+ let g = (e) => {
247
+ l?.(e);
248
+ let t = e.currentTarget.closest("[role=\"treeitem\"]");
249
+ !e.defaultPrevented && t && (e.preventDefault(), t.focus());
250
+ }, { node: _, labelProperty: v } = r, y = _[v];
251
+ return /* @__PURE__ */ f("input", {
252
+ ref: h,
253
+ tabIndex: p ? -1 : void 0,
254
+ "aria-hidden": p || void 0,
255
+ "aria-label": !p && y != null ? String(y) : void 0,
256
+ ...u,
257
+ checked: i === !0,
258
+ className: D(M({ mixed: c ?? i === null }), e.className),
259
+ type: "checkbox",
260
+ onMouseDown: g
261
+ });
262
+ }), P = l("\n ps-3 rounded-xs hover:cursor-pointer hover:opacity-75\n [:focus-visible>&]:outline [:focus-visible>&]:outline-2 [:focus-visible>&]:outline-offset-2\n", { variants: {
263
+ disabled: { true: "opacity-60 hover:cursor-default hover:opacity-60" },
264
+ expandEnabled: { true: "hover:opacity-100 hover:cursor-pointer" }
265
+ } }), F = e.memo((e) => {
266
+ let { standardComponentProps: t, label: n, disabled: r, expandEnabled: i, expandDisabledNodes: a, hasChildren: o, expanded: s, iconClassName: c, iconStyle: l, ExpandIconComponent: u, ...d } = e;
267
+ return /* @__PURE__ */ p("span", {
268
+ ...d,
269
+ className: D(P({
270
+ disabled: r,
271
+ expandEnabled: i ?? (a && o)
272
+ }), e.className),
273
+ children: [n, /* @__PURE__ */ f(u, {
274
+ standardComponentProps: t,
275
+ show: o,
276
+ expanded: s === !0,
277
+ className: c,
278
+ style: l
279
+ })]
280
+ });
281
+ }), I = l("inline-block text-[.8em] ms-3 transition-transform duration-200", { variants: { rotated: { true: "rotate-180" } } }), L = e.memo((e) => {
282
+ let { standardComponentProps: t, expanded: n, show: r, rotated: i, ...a } = e;
283
+ return r ? /* @__PURE__ */ f("span", {
284
+ "aria-hidden": !0,
285
+ ...a,
286
+ className: D(I({ rotated: i ?? n === !0 }), e.className),
287
+ children: "▲"
288
+ }) : null;
289
+ }), R = e.createContext(null);
290
+ function z() {
291
+ let e = n(R);
292
+ if (!e) throw Error("Tree nodes must be rendered inside TreeSelect");
293
+ return e;
294
+ }
295
+ var B = e.memo((e) => {
296
+ let { node: n, level: r, disabled: i, posInSet: o, setSize: s } = e, l = z(), { store: u, uniqueIDProperty: d, labelProperty: p, valueProperty: m, childrenProperty: h, disabledProperty: _, chainedSelect: y, NodeComponent: b } = l, x = n[d], S = t(() => u.getNodeState(x), [u, x]), C = c(u.subscribe, S, S), w = !!(C & 1), T = !!(C & 2), E = g(n, h), D = E.length > 0, O = y && _ !== void 0 && l.isLocked(n), k = i || O, A = k || v(n, _), j = m === void 0 ? void 0 : n[m], M = n[p], N = typeof M == "string" || typeof M == "number" ? String(M) : void 0, P = t((e) => u.registerElement(x, e), [u, x]), F = t((e) => u.setExpanded(x, e), [u, x]), I = a(() => ({
297
+ ref: P,
298
+ role: "treeitem",
299
+ tabIndex: T ? 0 : -1,
300
+ "aria-label": N,
301
+ "aria-level": r + 1,
302
+ "aria-setsize": s,
303
+ "aria-posinset": o,
304
+ "aria-expanded": D ? w : void 0,
305
+ "aria-checked": m === void 0 ? void 0 : j === null ? "mixed" : j === !0,
306
+ "aria-disabled": A || void 0
307
+ }), [
308
+ P,
309
+ T,
310
+ N,
311
+ r,
312
+ s,
313
+ o,
314
+ D,
315
+ w,
316
+ m,
317
+ j,
318
+ A
319
+ ]), L = a(() => ({
320
+ node: n,
321
+ expanded: w,
322
+ uniqueIDProperty: d,
323
+ labelProperty: p,
324
+ valueProperty: m,
325
+ childrenProperty: h,
326
+ disabledProperty: _
327
+ }), [
328
+ n,
329
+ w,
330
+ d,
331
+ p,
332
+ m,
333
+ h,
334
+ _
335
+ ]), R = i || y && A;
336
+ return /* @__PURE__ */ f(b, {
337
+ standardComponentProps: L,
338
+ treeItemProps: I,
339
+ disabled: k,
340
+ level: r,
341
+ expanded: w,
342
+ defaultExpanded: l.defaultExpanded,
343
+ expandDisabledNodes: l.expandDisabledNodes,
344
+ chainedSelect: y,
345
+ className: l.nodeClassName,
346
+ style: l.nodeStyle,
347
+ inputClassName: l.inputClassName,
348
+ inputStyle: l.inputStyle,
349
+ labelClassName: l.labelClassName,
350
+ labelStyle: l.labelStyle,
351
+ iconClassName: l.iconClassName,
352
+ iconStyle: l.iconStyle,
353
+ CheckComponent: l.CheckComponent,
354
+ LabelComponent: l.LabelComponent,
355
+ ExpandIconComponent: l.ExpandIconComponent,
356
+ onChange: l.onNodeChange,
357
+ onExpandedChange: F,
358
+ children: D && w ? E.map((e, t) => /* @__PURE__ */ f(B, {
359
+ node: e,
360
+ level: r + 1,
361
+ disabled: R,
362
+ posInSet: t + 1,
363
+ setSize: E.length
364
+ }, `${String(e[d])}-${t}`)) : void 0
365
+ });
366
+ }), ee = [], V = (e) => {
367
+ let { data: n, defaultData: r, uniqueIDProperty: i, labelProperty: c, valueProperty: l, childrenProperty: u, disabledProperty: d, disabled: p = !1, expandDisabledNodes: h = !0, defaultExpanded: v = !1, chainedSelect: y = !0, nodeClassName: C, nodeStyle: w, labelClassName: D, labelStyle: O, iconClassName: A, iconStyle: M, inputClassName: P, inputStyle: I, CustomNodeComponent: z, CustomCheckComponent: V, CustomLabelComponent: H, CustomExpandIconComponent: U, onChange: W, onKeyDown: ne, onFocus: re, ...ie } = e, G = n != null, [ae, oe] = s(r), K = (G ? n : ae) ?? ee, q = a(() => ({
368
+ uniqueIDProperty: i,
369
+ childrenProperty: u,
370
+ valueProperty: l,
371
+ disabledProperty: d
372
+ }), [
373
+ i,
374
+ u,
375
+ l,
376
+ d
377
+ ]), J = a(() => _(K, q), [K, q]), Y = a(() => b(q), [q]), [X] = s(() => new m(v, K.length > 0 ? K[0][i] : void 0)), Z = o(null), Q = o({
378
+ tree: K,
379
+ index: J,
380
+ keys: q,
381
+ isControlled: G,
382
+ chainedSelect: y,
383
+ onChange: W
384
+ });
385
+ j(() => {
386
+ Q.current = {
387
+ tree: K,
388
+ index: J,
389
+ keys: q,
390
+ isControlled: G,
391
+ chainedSelect: y,
392
+ onChange: W
393
+ }, Z.current === K && (Z.current = null);
394
+ });
395
+ let se = o(!1);
396
+ j(() => {
397
+ if (J.duplicateIDs.size === 0 || se.current) return;
398
+ se.current = !0;
399
+ let e = [...J.duplicateIDs].slice(0, 5).map(String).join(", ");
400
+ console.warn(`TreeSelect: several nodes share the same ${String(q.uniqueIDProperty)} (${e}). Each node needs a unique ID for selection, expansion and keyboard navigation to work correctly.`);
401
+ }, [J, q]), j(() => {
402
+ X.setParentResolver((e) => {
403
+ let t = J.byID.get(e), n = t ? J.parentOf.get(t) : null;
404
+ return n ? n[q.uniqueIDProperty] : void 0;
405
+ }), X.setDefaultExpanded(v);
406
+ let e = X.getActiveID();
407
+ (e === void 0 || !J.byID.has(e) || te(X, e)) && X.setActive(K.length > 0 ? K[0][q.uniqueIDProperty] : void 0);
408
+ }, [
409
+ X,
410
+ K,
411
+ J,
412
+ q,
413
+ v
414
+ ]);
415
+ let $ = t((e, t, n) => {
416
+ let { keys: r, isControlled: i, chainedSelect: a, onChange: o } = Q.current;
417
+ if (r.valueProperty === void 0) return;
418
+ let s = Z.current ?? Q.current.tree, c = Z.current ? _(s, r) : Q.current.index, l = c.parentOf.has(e) ? e : c.byID.get(e[r.uniqueIDProperty]);
419
+ if (l === void 0) return;
420
+ let u = T(s, c, S(c, l, t, r, a, n?.toggle), r);
421
+ u !== s && (i && Z.current === null && queueMicrotask(() => {
422
+ Z.current = null;
423
+ }), Z.current = u, i || oe(u), o?.(u));
424
+ }, []), ce = (e) => {
425
+ if (ne?.(e), e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey) return;
426
+ let t = X.getIDForElement(e.target), n = t === void 0 ? void 0 : J.byID.get(t);
427
+ if (t === void 0 || n == null) return;
428
+ let r = g(n, u), a = r.length > 0, o = X.isExpanded(t), s = x(J, n, q, p, y, Y), c = a && (h || !s), d = (e) => {
429
+ e && X.focus(e[i]);
430
+ }, f = () => E(K, q, (e) => X.isExpanded(e));
431
+ switch (e.key) {
432
+ case "ArrowDown": {
433
+ let e = f();
434
+ d(e[e.indexOf(n) + 1]);
435
+ break;
436
+ }
437
+ case "ArrowUp": {
438
+ let e = f();
439
+ d(e[e.indexOf(n) - 1]);
440
+ break;
441
+ }
442
+ case "Home":
443
+ d(K[0]);
444
+ break;
445
+ case "End": {
446
+ let e = f();
447
+ d(e[e.length - 1]);
448
+ break;
449
+ }
450
+ case "ArrowRight":
451
+ a && !o && c ? X.setExpanded(t, !0) : a && o && d(r[0]);
452
+ break;
453
+ case "ArrowLeft":
454
+ a && o && c ? X.setExpanded(t, !1) : d(J.parentOf.get(n));
455
+ break;
456
+ case "Enter":
457
+ c ? X.setExpanded(t, !o) : !s && l !== void 0 && $(n, n[l] !== !0, { toggle: !0 });
458
+ break;
459
+ case " ":
460
+ !s && l !== void 0 && $(n, n[l] !== !0, { toggle: !0 });
461
+ break;
462
+ default: return;
463
+ }
464
+ e.preventDefault();
465
+ }, le = (e) => {
466
+ re?.(e);
467
+ let t = X.getIDForElement(e.target);
468
+ t !== void 0 && X.setActive(t);
469
+ }, ue = a(() => ({
470
+ store: X,
471
+ uniqueIDProperty: i,
472
+ labelProperty: c,
473
+ valueProperty: l,
474
+ childrenProperty: u,
475
+ disabledProperty: d,
476
+ defaultExpanded: v,
477
+ expandDisabledNodes: h,
478
+ chainedSelect: y,
479
+ nodeClassName: C,
480
+ nodeStyle: w,
481
+ labelClassName: D,
482
+ labelStyle: O,
483
+ iconClassName: A,
484
+ iconStyle: M,
485
+ inputClassName: P,
486
+ inputStyle: I,
487
+ NodeComponent: z || k,
488
+ CheckComponent: V || N,
489
+ LabelComponent: H || F,
490
+ ExpandIconComponent: U || L,
491
+ onNodeChange: $,
492
+ isLocked: Y
493
+ }), [
494
+ X,
495
+ i,
496
+ c,
497
+ l,
498
+ u,
499
+ d,
500
+ v,
501
+ h,
502
+ y,
503
+ C,
504
+ w,
505
+ D,
506
+ O,
507
+ A,
508
+ M,
509
+ P,
510
+ I,
511
+ z,
512
+ V,
513
+ H,
514
+ U,
515
+ $,
516
+ Y
517
+ ]);
518
+ return /* @__PURE__ */ f("div", {
519
+ role: "tree",
520
+ "aria-multiselectable": l !== void 0 || void 0,
521
+ ...ie,
522
+ onKeyDown: ce,
523
+ onFocus: le,
524
+ children: /* @__PURE__ */ f(R.Provider, {
525
+ value: ue,
526
+ children: K.map((e, t) => /* @__PURE__ */ f(B, {
527
+ node: e,
528
+ level: 0,
529
+ disabled: p,
530
+ posInSet: t + 1,
531
+ setSize: K.length
532
+ }, `${String(e[i])}-${t}`))
533
+ })
534
+ });
2688
535
  };
536
+ function te(e, t) {
537
+ let n = e.getParentID(t);
538
+ for (; n !== void 0;) {
539
+ if (!e.isExpanded(n)) return !0;
540
+ n = e.getParentID(n);
541
+ }
542
+ return !1;
543
+ }
544
+ //#endregion
545
+ //#region lib/main.ts
546
+ var H = V;
547
+ //#endregion
548
+ export { L as ExpandIcon, N as NodeCheck, F as NodeLabel, k as TreeNode, H as default, w as getSelectedIDs, C as getSelectedNodes };