extended-dynamic-forms 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/extended-dynamic-forms-vanilla.js +38 -0
  2. package/package.json +32 -25
  3. package/dist/ExtendedForm.d.ts +0 -4
  4. package/dist/components/fields/AddressField.d.ts +0 -4
  5. package/dist/components/fields/CurrencyField.d.ts +0 -4
  6. package/dist/components/fields/PhoneField.d.ts +0 -4
  7. package/dist/components/index.d.ts +0 -10
  8. package/dist/components/ui/badge.d.ts +0 -9
  9. package/dist/components/ui/button.d.ts +0 -11
  10. package/dist/components/ui/card.d.ts +0 -8
  11. package/dist/components/ui/input.d.ts +0 -5
  12. package/dist/components/ui/label.d.ts +0 -5
  13. package/dist/components/ui/slider.d.ts +0 -4
  14. package/dist/events/FormEventContext.d.ts +0 -20
  15. package/dist/events/FormEventHub.d.ts +0 -27
  16. package/dist/events/FormEventManager.d.ts +0 -10
  17. package/dist/events/index.d.ts +0 -4
  18. package/dist/index.d.ts +0 -13
  19. package/dist/index.es.js +0 -4124
  20. package/dist/index.umd.js +0 -21
  21. package/dist/layouts/grid/GridLayout.d.ts +0 -11
  22. package/dist/layouts/horizontal/HorizontalLayout.d.ts +0 -10
  23. package/dist/layouts/index.d.ts +0 -3
  24. package/dist/layouts/vertical/VerticalLayout.d.ts +0 -9
  25. package/dist/lib/utils.d.ts +0 -3
  26. package/dist/style.css +0 -1
  27. package/dist/types/index.d.ts +0 -47
  28. package/dist/utils/formDataUtils.d.ts +0 -22
  29. package/dist/utils/index.d.ts +0 -3
  30. package/dist/utils/schemaUtils.d.ts +0 -24
  31. package/dist/utils/validationUtils.d.ts +0 -26
  32. package/dist/widgets/date/DateWidget.d.ts +0 -4
  33. package/dist/widgets/file/FileWidget.d.ts +0 -4
  34. package/dist/widgets/index.d.ts +0 -14
  35. package/dist/widgets/input/ColorWidget.d.ts +0 -4
  36. package/dist/widgets/input/RangeWidget.d.ts +0 -4
  37. package/dist/widgets/input/RatingWidget.d.ts +0 -4
package/dist/index.es.js DELETED
@@ -1,4124 +0,0 @@
1
- var at = Object.defineProperty;
2
- var lt = (e, t, r) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var W = (e, t, r) => lt(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { jsx as p, jsxs as k } from "react/jsx-runtime";
5
- import * as b from "react";
6
- import G, { createContext as ct, useContext as dt, forwardRef as ut, createElement as be, useRef as ke, useMemo as ft, useEffect as pt } from "react";
7
- import "react-dom";
8
- import mt from "@rjsf/validator-ajv8";
9
- import { default as vo } from "@rjsf/validator-ajv8";
10
- import ht from "@rjsf/shadcn";
11
- import { generateTheme as wo } from "@rjsf/shadcn";
12
- function Re(e) {
13
- var t, r, o = "";
14
- if (typeof e == "string" || typeof e == "number") o += e;
15
- else if (typeof e == "object") if (Array.isArray(e)) {
16
- var n = e.length;
17
- for (t = 0; t < n; t++) e[t] && (r = Re(e[t])) && (o && (o += " "), o += r);
18
- } else for (r in e) e[r] && (o && (o += " "), o += r);
19
- return o;
20
- }
21
- function Pe() {
22
- for (var e, t, r = 0, o = "", n = arguments.length; r < n; r++) (e = arguments[r]) && (t = Re(e)) && (o && (o += " "), o += t);
23
- return o;
24
- }
25
- const pe = "-", gt = (e) => {
26
- const t = yt(e), {
27
- conflictingClassGroups: r,
28
- conflictingClassGroupModifiers: o
29
- } = e;
30
- return {
31
- getClassGroupId: (a) => {
32
- const i = a.split(pe);
33
- return i[0] === "" && i.length !== 1 && i.shift(), Ee(i, t) || bt(a);
34
- },
35
- getConflictingClassGroupIds: (a, i) => {
36
- const l = r[a] || [];
37
- return i && o[a] ? [...l, ...o[a]] : l;
38
- }
39
- };
40
- }, Ee = (e, t) => {
41
- var a;
42
- if (e.length === 0)
43
- return t.classGroupId;
44
- const r = e[0], o = t.nextPart.get(r), n = o ? Ee(e.slice(1), o) : void 0;
45
- if (n)
46
- return n;
47
- if (t.validators.length === 0)
48
- return;
49
- const s = e.join(pe);
50
- return (a = t.validators.find(({
51
- validator: i
52
- }) => i(s))) == null ? void 0 : a.classGroupId;
53
- }, ye = /^\[(.+)\]$/, bt = (e) => {
54
- if (ye.test(e)) {
55
- const t = ye.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
56
- if (r)
57
- return "arbitrary.." + r;
58
- }
59
- }, yt = (e) => {
60
- const {
61
- theme: t,
62
- prefix: r
63
- } = e, o = {
64
- nextPart: /* @__PURE__ */ new Map(),
65
- validators: []
66
- };
67
- return xt(Object.entries(e.classGroups), r).forEach(([s, a]) => {
68
- ce(a, o, s, t);
69
- }), o;
70
- }, ce = (e, t, r, o) => {
71
- e.forEach((n) => {
72
- if (typeof n == "string") {
73
- const s = n === "" ? t : ve(t, n);
74
- s.classGroupId = r;
75
- return;
76
- }
77
- if (typeof n == "function") {
78
- if (vt(n)) {
79
- ce(n(o), t, r, o);
80
- return;
81
- }
82
- t.validators.push({
83
- validator: n,
84
- classGroupId: r
85
- });
86
- return;
87
- }
88
- Object.entries(n).forEach(([s, a]) => {
89
- ce(a, ve(t, s), r, o);
90
- });
91
- });
92
- }, ve = (e, t) => {
93
- let r = e;
94
- return t.split(pe).forEach((o) => {
95
- r.nextPart.has(o) || r.nextPart.set(o, {
96
- nextPart: /* @__PURE__ */ new Map(),
97
- validators: []
98
- }), r = r.nextPart.get(o);
99
- }), r;
100
- }, vt = (e) => e.isThemeGetter, xt = (e, t) => t ? e.map(([r, o]) => {
101
- const n = o.map((s) => typeof s == "string" ? t + s : typeof s == "object" ? Object.fromEntries(Object.entries(s).map(([a, i]) => [t + a, i])) : s);
102
- return [r, n];
103
- }) : e, wt = (e) => {
104
- if (e < 1)
105
- return {
106
- get: () => {
107
- },
108
- set: () => {
109
- }
110
- };
111
- let t = 0, r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
112
- const n = (s, a) => {
113
- r.set(s, a), t++, t > e && (t = 0, o = r, r = /* @__PURE__ */ new Map());
114
- };
115
- return {
116
- get(s) {
117
- let a = r.get(s);
118
- if (a !== void 0)
119
- return a;
120
- if ((a = o.get(s)) !== void 0)
121
- return n(s, a), a;
122
- },
123
- set(s, a) {
124
- r.has(s) ? r.set(s, a) : n(s, a);
125
- }
126
- };
127
- }, Ae = "!", Ct = (e) => {
128
- const {
129
- separator: t,
130
- experimentalParseClassName: r
131
- } = e, o = t.length === 1, n = t[0], s = t.length, a = (i) => {
132
- const l = [];
133
- let d = 0, u = 0, c;
134
- for (let f = 0; f < i.length; f++) {
135
- let g = i[f];
136
- if (d === 0) {
137
- if (g === n && (o || i.slice(f, f + s) === t)) {
138
- l.push(i.slice(u, f)), u = f + s;
139
- continue;
140
- }
141
- if (g === "/") {
142
- c = f;
143
- continue;
144
- }
145
- }
146
- g === "[" ? d++ : g === "]" && d--;
147
- }
148
- const m = l.length === 0 ? i : i.substring(u), y = m.startsWith(Ae), v = y ? m.substring(1) : m, h = c && c > u ? c - u : void 0;
149
- return {
150
- modifiers: l,
151
- hasImportantModifier: y,
152
- baseClassName: v,
153
- maybePostfixModifierPosition: h
154
- };
155
- };
156
- return r ? (i) => r({
157
- className: i,
158
- parseClassName: a
159
- }) : a;
160
- }, St = (e) => {
161
- if (e.length <= 1)
162
- return e;
163
- const t = [];
164
- let r = [];
165
- return e.forEach((o) => {
166
- o[0] === "[" ? (t.push(...r.sort(), o), r = []) : r.push(o);
167
- }), t.push(...r.sort()), t;
168
- }, Nt = (e) => ({
169
- cache: wt(e.cacheSize),
170
- parseClassName: Ct(e),
171
- ...gt(e)
172
- }), kt = /\s+/, Rt = (e, t) => {
173
- const {
174
- parseClassName: r,
175
- getClassGroupId: o,
176
- getConflictingClassGroupIds: n
177
- } = t, s = [], a = e.trim().split(kt);
178
- let i = "";
179
- for (let l = a.length - 1; l >= 0; l -= 1) {
180
- const d = a[l], {
181
- modifiers: u,
182
- hasImportantModifier: c,
183
- baseClassName: m,
184
- maybePostfixModifierPosition: y
185
- } = r(d);
186
- let v = !!y, h = o(v ? m.substring(0, y) : m);
187
- if (!h) {
188
- if (!v) {
189
- i = d + (i.length > 0 ? " " + i : i);
190
- continue;
191
- }
192
- if (h = o(m), !h) {
193
- i = d + (i.length > 0 ? " " + i : i);
194
- continue;
195
- }
196
- v = !1;
197
- }
198
- const f = St(u).join(":"), g = c ? f + Ae : f, x = g + h;
199
- if (s.includes(x))
200
- continue;
201
- s.push(x);
202
- const S = n(h, v);
203
- for (let w = 0; w < S.length; ++w) {
204
- const E = S[w];
205
- s.push(g + E);
206
- }
207
- i = d + (i.length > 0 ? " " + i : i);
208
- }
209
- return i;
210
- };
211
- function Pt() {
212
- let e = 0, t, r, o = "";
213
- for (; e < arguments.length; )
214
- (t = arguments[e++]) && (r = Me(t)) && (o && (o += " "), o += r);
215
- return o;
216
- }
217
- const Me = (e) => {
218
- if (typeof e == "string")
219
- return e;
220
- let t, r = "";
221
- for (let o = 0; o < e.length; o++)
222
- e[o] && (t = Me(e[o])) && (r && (r += " "), r += t);
223
- return r;
224
- };
225
- function Et(e, ...t) {
226
- let r, o, n, s = a;
227
- function a(l) {
228
- const d = t.reduce((u, c) => c(u), e());
229
- return r = Nt(d), o = r.cache.get, n = r.cache.set, s = i, i(l);
230
- }
231
- function i(l) {
232
- const d = o(l);
233
- if (d)
234
- return d;
235
- const u = Rt(l, r);
236
- return n(l, u), u;
237
- }
238
- return function() {
239
- return s(Pt.apply(null, arguments));
240
- };
241
- }
242
- const R = (e) => {
243
- const t = (r) => r[e] || [];
244
- return t.isThemeGetter = !0, t;
245
- }, $e = /^\[(?:([a-z-]+):)?(.+)\]$/i, At = /^\d+\/\d+$/, Mt = /* @__PURE__ */ new Set(["px", "full", "screen"]), $t = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, zt = /\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$/, Vt = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Ft = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, _t = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, H = (e) => Z(e) || Mt.has(e) || At.test(e), j = (e) => ee(e, "length", jt), Z = (e) => !!e && !Number.isNaN(Number(e)), le = (e) => ee(e, "number", Z), oe = (e) => !!e && Number.isInteger(Number(e)), Tt = (e) => e.endsWith("%") && Z(e.slice(0, -1)), C = (e) => $e.test(e), D = (e) => $t.test(e), It = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Bt = (e) => ee(e, It, ze), Lt = (e) => ee(e, "position", ze), Ht = /* @__PURE__ */ new Set(["image", "url"]), Ot = (e) => ee(e, Ht, Gt), Wt = (e) => ee(e, "", Dt), ne = () => !0, ee = (e, t, r) => {
246
- const o = $e.exec(e);
247
- return o ? o[1] ? typeof t == "string" ? o[1] === t : t.has(o[1]) : r(o[2]) : !1;
248
- }, jt = (e) => (
249
- // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
250
- // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
251
- // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
252
- zt.test(e) && !Vt.test(e)
253
- ), ze = () => !1, Dt = (e) => Ft.test(e), Gt = (e) => _t.test(e), Ut = () => {
254
- const e = R("colors"), t = R("spacing"), r = R("blur"), o = R("brightness"), n = R("borderColor"), s = R("borderRadius"), a = R("borderSpacing"), i = R("borderWidth"), l = R("contrast"), d = R("grayscale"), u = R("hueRotate"), c = R("invert"), m = R("gap"), y = R("gradientColorStops"), v = R("gradientColorStopPositions"), h = R("inset"), f = R("margin"), g = R("opacity"), x = R("padding"), S = R("saturate"), w = R("scale"), E = R("sepia"), $ = R("skew"), _ = R("space"), Y = R("translate"), K = () => ["auto", "contain", "none"], A = () => ["auto", "hidden", "clip", "visible", "scroll"], P = () => ["auto", C, t], N = () => [C, t], I = () => ["", H, j], Q = () => ["auto", Z, C], X = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], T = () => ["solid", "dashed", "dotted", "double", "none"], B = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], V = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], O = () => ["", "0", C], ge = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], L = () => [Z, C];
255
- return {
256
- cacheSize: 500,
257
- separator: ":",
258
- theme: {
259
- colors: [ne],
260
- spacing: [H, j],
261
- blur: ["none", "", D, C],
262
- brightness: L(),
263
- borderColor: [e],
264
- borderRadius: ["none", "", "full", D, C],
265
- borderSpacing: N(),
266
- borderWidth: I(),
267
- contrast: L(),
268
- grayscale: O(),
269
- hueRotate: L(),
270
- invert: O(),
271
- gap: N(),
272
- gradientColorStops: [e],
273
- gradientColorStopPositions: [Tt, j],
274
- inset: P(),
275
- margin: P(),
276
- opacity: L(),
277
- padding: N(),
278
- saturate: L(),
279
- scale: L(),
280
- sepia: O(),
281
- skew: L(),
282
- space: N(),
283
- translate: N()
284
- },
285
- classGroups: {
286
- // Layout
287
- /**
288
- * Aspect Ratio
289
- * @see https://tailwindcss.com/docs/aspect-ratio
290
- */
291
- aspect: [{
292
- aspect: ["auto", "square", "video", C]
293
- }],
294
- /**
295
- * Container
296
- * @see https://tailwindcss.com/docs/container
297
- */
298
- container: ["container"],
299
- /**
300
- * Columns
301
- * @see https://tailwindcss.com/docs/columns
302
- */
303
- columns: [{
304
- columns: [D]
305
- }],
306
- /**
307
- * Break After
308
- * @see https://tailwindcss.com/docs/break-after
309
- */
310
- "break-after": [{
311
- "break-after": ge()
312
- }],
313
- /**
314
- * Break Before
315
- * @see https://tailwindcss.com/docs/break-before
316
- */
317
- "break-before": [{
318
- "break-before": ge()
319
- }],
320
- /**
321
- * Break Inside
322
- * @see https://tailwindcss.com/docs/break-inside
323
- */
324
- "break-inside": [{
325
- "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
326
- }],
327
- /**
328
- * Box Decoration Break
329
- * @see https://tailwindcss.com/docs/box-decoration-break
330
- */
331
- "box-decoration": [{
332
- "box-decoration": ["slice", "clone"]
333
- }],
334
- /**
335
- * Box Sizing
336
- * @see https://tailwindcss.com/docs/box-sizing
337
- */
338
- box: [{
339
- box: ["border", "content"]
340
- }],
341
- /**
342
- * Display
343
- * @see https://tailwindcss.com/docs/display
344
- */
345
- 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"],
346
- /**
347
- * Floats
348
- * @see https://tailwindcss.com/docs/float
349
- */
350
- float: [{
351
- float: ["right", "left", "none", "start", "end"]
352
- }],
353
- /**
354
- * Clear
355
- * @see https://tailwindcss.com/docs/clear
356
- */
357
- clear: [{
358
- clear: ["left", "right", "both", "none", "start", "end"]
359
- }],
360
- /**
361
- * Isolation
362
- * @see https://tailwindcss.com/docs/isolation
363
- */
364
- isolation: ["isolate", "isolation-auto"],
365
- /**
366
- * Object Fit
367
- * @see https://tailwindcss.com/docs/object-fit
368
- */
369
- "object-fit": [{
370
- object: ["contain", "cover", "fill", "none", "scale-down"]
371
- }],
372
- /**
373
- * Object Position
374
- * @see https://tailwindcss.com/docs/object-position
375
- */
376
- "object-position": [{
377
- object: [...X(), C]
378
- }],
379
- /**
380
- * Overflow
381
- * @see https://tailwindcss.com/docs/overflow
382
- */
383
- overflow: [{
384
- overflow: A()
385
- }],
386
- /**
387
- * Overflow X
388
- * @see https://tailwindcss.com/docs/overflow
389
- */
390
- "overflow-x": [{
391
- "overflow-x": A()
392
- }],
393
- /**
394
- * Overflow Y
395
- * @see https://tailwindcss.com/docs/overflow
396
- */
397
- "overflow-y": [{
398
- "overflow-y": A()
399
- }],
400
- /**
401
- * Overscroll Behavior
402
- * @see https://tailwindcss.com/docs/overscroll-behavior
403
- */
404
- overscroll: [{
405
- overscroll: K()
406
- }],
407
- /**
408
- * Overscroll Behavior X
409
- * @see https://tailwindcss.com/docs/overscroll-behavior
410
- */
411
- "overscroll-x": [{
412
- "overscroll-x": K()
413
- }],
414
- /**
415
- * Overscroll Behavior Y
416
- * @see https://tailwindcss.com/docs/overscroll-behavior
417
- */
418
- "overscroll-y": [{
419
- "overscroll-y": K()
420
- }],
421
- /**
422
- * Position
423
- * @see https://tailwindcss.com/docs/position
424
- */
425
- position: ["static", "fixed", "absolute", "relative", "sticky"],
426
- /**
427
- * Top / Right / Bottom / Left
428
- * @see https://tailwindcss.com/docs/top-right-bottom-left
429
- */
430
- inset: [{
431
- inset: [h]
432
- }],
433
- /**
434
- * Right / Left
435
- * @see https://tailwindcss.com/docs/top-right-bottom-left
436
- */
437
- "inset-x": [{
438
- "inset-x": [h]
439
- }],
440
- /**
441
- * Top / Bottom
442
- * @see https://tailwindcss.com/docs/top-right-bottom-left
443
- */
444
- "inset-y": [{
445
- "inset-y": [h]
446
- }],
447
- /**
448
- * Start
449
- * @see https://tailwindcss.com/docs/top-right-bottom-left
450
- */
451
- start: [{
452
- start: [h]
453
- }],
454
- /**
455
- * End
456
- * @see https://tailwindcss.com/docs/top-right-bottom-left
457
- */
458
- end: [{
459
- end: [h]
460
- }],
461
- /**
462
- * Top
463
- * @see https://tailwindcss.com/docs/top-right-bottom-left
464
- */
465
- top: [{
466
- top: [h]
467
- }],
468
- /**
469
- * Right
470
- * @see https://tailwindcss.com/docs/top-right-bottom-left
471
- */
472
- right: [{
473
- right: [h]
474
- }],
475
- /**
476
- * Bottom
477
- * @see https://tailwindcss.com/docs/top-right-bottom-left
478
- */
479
- bottom: [{
480
- bottom: [h]
481
- }],
482
- /**
483
- * Left
484
- * @see https://tailwindcss.com/docs/top-right-bottom-left
485
- */
486
- left: [{
487
- left: [h]
488
- }],
489
- /**
490
- * Visibility
491
- * @see https://tailwindcss.com/docs/visibility
492
- */
493
- visibility: ["visible", "invisible", "collapse"],
494
- /**
495
- * Z-Index
496
- * @see https://tailwindcss.com/docs/z-index
497
- */
498
- z: [{
499
- z: ["auto", oe, C]
500
- }],
501
- // Flexbox and Grid
502
- /**
503
- * Flex Basis
504
- * @see https://tailwindcss.com/docs/flex-basis
505
- */
506
- basis: [{
507
- basis: P()
508
- }],
509
- /**
510
- * Flex Direction
511
- * @see https://tailwindcss.com/docs/flex-direction
512
- */
513
- "flex-direction": [{
514
- flex: ["row", "row-reverse", "col", "col-reverse"]
515
- }],
516
- /**
517
- * Flex Wrap
518
- * @see https://tailwindcss.com/docs/flex-wrap
519
- */
520
- "flex-wrap": [{
521
- flex: ["wrap", "wrap-reverse", "nowrap"]
522
- }],
523
- /**
524
- * Flex
525
- * @see https://tailwindcss.com/docs/flex
526
- */
527
- flex: [{
528
- flex: ["1", "auto", "initial", "none", C]
529
- }],
530
- /**
531
- * Flex Grow
532
- * @see https://tailwindcss.com/docs/flex-grow
533
- */
534
- grow: [{
535
- grow: O()
536
- }],
537
- /**
538
- * Flex Shrink
539
- * @see https://tailwindcss.com/docs/flex-shrink
540
- */
541
- shrink: [{
542
- shrink: O()
543
- }],
544
- /**
545
- * Order
546
- * @see https://tailwindcss.com/docs/order
547
- */
548
- order: [{
549
- order: ["first", "last", "none", oe, C]
550
- }],
551
- /**
552
- * Grid Template Columns
553
- * @see https://tailwindcss.com/docs/grid-template-columns
554
- */
555
- "grid-cols": [{
556
- "grid-cols": [ne]
557
- }],
558
- /**
559
- * Grid Column Start / End
560
- * @see https://tailwindcss.com/docs/grid-column
561
- */
562
- "col-start-end": [{
563
- col: ["auto", {
564
- span: ["full", oe, C]
565
- }, C]
566
- }],
567
- /**
568
- * Grid Column Start
569
- * @see https://tailwindcss.com/docs/grid-column
570
- */
571
- "col-start": [{
572
- "col-start": Q()
573
- }],
574
- /**
575
- * Grid Column End
576
- * @see https://tailwindcss.com/docs/grid-column
577
- */
578
- "col-end": [{
579
- "col-end": Q()
580
- }],
581
- /**
582
- * Grid Template Rows
583
- * @see https://tailwindcss.com/docs/grid-template-rows
584
- */
585
- "grid-rows": [{
586
- "grid-rows": [ne]
587
- }],
588
- /**
589
- * Grid Row Start / End
590
- * @see https://tailwindcss.com/docs/grid-row
591
- */
592
- "row-start-end": [{
593
- row: ["auto", {
594
- span: [oe, C]
595
- }, C]
596
- }],
597
- /**
598
- * Grid Row Start
599
- * @see https://tailwindcss.com/docs/grid-row
600
- */
601
- "row-start": [{
602
- "row-start": Q()
603
- }],
604
- /**
605
- * Grid Row End
606
- * @see https://tailwindcss.com/docs/grid-row
607
- */
608
- "row-end": [{
609
- "row-end": Q()
610
- }],
611
- /**
612
- * Grid Auto Flow
613
- * @see https://tailwindcss.com/docs/grid-auto-flow
614
- */
615
- "grid-flow": [{
616
- "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
617
- }],
618
- /**
619
- * Grid Auto Columns
620
- * @see https://tailwindcss.com/docs/grid-auto-columns
621
- */
622
- "auto-cols": [{
623
- "auto-cols": ["auto", "min", "max", "fr", C]
624
- }],
625
- /**
626
- * Grid Auto Rows
627
- * @see https://tailwindcss.com/docs/grid-auto-rows
628
- */
629
- "auto-rows": [{
630
- "auto-rows": ["auto", "min", "max", "fr", C]
631
- }],
632
- /**
633
- * Gap
634
- * @see https://tailwindcss.com/docs/gap
635
- */
636
- gap: [{
637
- gap: [m]
638
- }],
639
- /**
640
- * Gap X
641
- * @see https://tailwindcss.com/docs/gap
642
- */
643
- "gap-x": [{
644
- "gap-x": [m]
645
- }],
646
- /**
647
- * Gap Y
648
- * @see https://tailwindcss.com/docs/gap
649
- */
650
- "gap-y": [{
651
- "gap-y": [m]
652
- }],
653
- /**
654
- * Justify Content
655
- * @see https://tailwindcss.com/docs/justify-content
656
- */
657
- "justify-content": [{
658
- justify: ["normal", ...V()]
659
- }],
660
- /**
661
- * Justify Items
662
- * @see https://tailwindcss.com/docs/justify-items
663
- */
664
- "justify-items": [{
665
- "justify-items": ["start", "end", "center", "stretch"]
666
- }],
667
- /**
668
- * Justify Self
669
- * @see https://tailwindcss.com/docs/justify-self
670
- */
671
- "justify-self": [{
672
- "justify-self": ["auto", "start", "end", "center", "stretch"]
673
- }],
674
- /**
675
- * Align Content
676
- * @see https://tailwindcss.com/docs/align-content
677
- */
678
- "align-content": [{
679
- content: ["normal", ...V(), "baseline"]
680
- }],
681
- /**
682
- * Align Items
683
- * @see https://tailwindcss.com/docs/align-items
684
- */
685
- "align-items": [{
686
- items: ["start", "end", "center", "baseline", "stretch"]
687
- }],
688
- /**
689
- * Align Self
690
- * @see https://tailwindcss.com/docs/align-self
691
- */
692
- "align-self": [{
693
- self: ["auto", "start", "end", "center", "stretch", "baseline"]
694
- }],
695
- /**
696
- * Place Content
697
- * @see https://tailwindcss.com/docs/place-content
698
- */
699
- "place-content": [{
700
- "place-content": [...V(), "baseline"]
701
- }],
702
- /**
703
- * Place Items
704
- * @see https://tailwindcss.com/docs/place-items
705
- */
706
- "place-items": [{
707
- "place-items": ["start", "end", "center", "baseline", "stretch"]
708
- }],
709
- /**
710
- * Place Self
711
- * @see https://tailwindcss.com/docs/place-self
712
- */
713
- "place-self": [{
714
- "place-self": ["auto", "start", "end", "center", "stretch"]
715
- }],
716
- // Spacing
717
- /**
718
- * Padding
719
- * @see https://tailwindcss.com/docs/padding
720
- */
721
- p: [{
722
- p: [x]
723
- }],
724
- /**
725
- * Padding X
726
- * @see https://tailwindcss.com/docs/padding
727
- */
728
- px: [{
729
- px: [x]
730
- }],
731
- /**
732
- * Padding Y
733
- * @see https://tailwindcss.com/docs/padding
734
- */
735
- py: [{
736
- py: [x]
737
- }],
738
- /**
739
- * Padding Start
740
- * @see https://tailwindcss.com/docs/padding
741
- */
742
- ps: [{
743
- ps: [x]
744
- }],
745
- /**
746
- * Padding End
747
- * @see https://tailwindcss.com/docs/padding
748
- */
749
- pe: [{
750
- pe: [x]
751
- }],
752
- /**
753
- * Padding Top
754
- * @see https://tailwindcss.com/docs/padding
755
- */
756
- pt: [{
757
- pt: [x]
758
- }],
759
- /**
760
- * Padding Right
761
- * @see https://tailwindcss.com/docs/padding
762
- */
763
- pr: [{
764
- pr: [x]
765
- }],
766
- /**
767
- * Padding Bottom
768
- * @see https://tailwindcss.com/docs/padding
769
- */
770
- pb: [{
771
- pb: [x]
772
- }],
773
- /**
774
- * Padding Left
775
- * @see https://tailwindcss.com/docs/padding
776
- */
777
- pl: [{
778
- pl: [x]
779
- }],
780
- /**
781
- * Margin
782
- * @see https://tailwindcss.com/docs/margin
783
- */
784
- m: [{
785
- m: [f]
786
- }],
787
- /**
788
- * Margin X
789
- * @see https://tailwindcss.com/docs/margin
790
- */
791
- mx: [{
792
- mx: [f]
793
- }],
794
- /**
795
- * Margin Y
796
- * @see https://tailwindcss.com/docs/margin
797
- */
798
- my: [{
799
- my: [f]
800
- }],
801
- /**
802
- * Margin Start
803
- * @see https://tailwindcss.com/docs/margin
804
- */
805
- ms: [{
806
- ms: [f]
807
- }],
808
- /**
809
- * Margin End
810
- * @see https://tailwindcss.com/docs/margin
811
- */
812
- me: [{
813
- me: [f]
814
- }],
815
- /**
816
- * Margin Top
817
- * @see https://tailwindcss.com/docs/margin
818
- */
819
- mt: [{
820
- mt: [f]
821
- }],
822
- /**
823
- * Margin Right
824
- * @see https://tailwindcss.com/docs/margin
825
- */
826
- mr: [{
827
- mr: [f]
828
- }],
829
- /**
830
- * Margin Bottom
831
- * @see https://tailwindcss.com/docs/margin
832
- */
833
- mb: [{
834
- mb: [f]
835
- }],
836
- /**
837
- * Margin Left
838
- * @see https://tailwindcss.com/docs/margin
839
- */
840
- ml: [{
841
- ml: [f]
842
- }],
843
- /**
844
- * Space Between X
845
- * @see https://tailwindcss.com/docs/space
846
- */
847
- "space-x": [{
848
- "space-x": [_]
849
- }],
850
- /**
851
- * Space Between X Reverse
852
- * @see https://tailwindcss.com/docs/space
853
- */
854
- "space-x-reverse": ["space-x-reverse"],
855
- /**
856
- * Space Between Y
857
- * @see https://tailwindcss.com/docs/space
858
- */
859
- "space-y": [{
860
- "space-y": [_]
861
- }],
862
- /**
863
- * Space Between Y Reverse
864
- * @see https://tailwindcss.com/docs/space
865
- */
866
- "space-y-reverse": ["space-y-reverse"],
867
- // Sizing
868
- /**
869
- * Width
870
- * @see https://tailwindcss.com/docs/width
871
- */
872
- w: [{
873
- w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", C, t]
874
- }],
875
- /**
876
- * Min-Width
877
- * @see https://tailwindcss.com/docs/min-width
878
- */
879
- "min-w": [{
880
- "min-w": [C, t, "min", "max", "fit"]
881
- }],
882
- /**
883
- * Max-Width
884
- * @see https://tailwindcss.com/docs/max-width
885
- */
886
- "max-w": [{
887
- "max-w": [C, t, "none", "full", "min", "max", "fit", "prose", {
888
- screen: [D]
889
- }, D]
890
- }],
891
- /**
892
- * Height
893
- * @see https://tailwindcss.com/docs/height
894
- */
895
- h: [{
896
- h: [C, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
897
- }],
898
- /**
899
- * Min-Height
900
- * @see https://tailwindcss.com/docs/min-height
901
- */
902
- "min-h": [{
903
- "min-h": [C, t, "min", "max", "fit", "svh", "lvh", "dvh"]
904
- }],
905
- /**
906
- * Max-Height
907
- * @see https://tailwindcss.com/docs/max-height
908
- */
909
- "max-h": [{
910
- "max-h": [C, t, "min", "max", "fit", "svh", "lvh", "dvh"]
911
- }],
912
- /**
913
- * Size
914
- * @see https://tailwindcss.com/docs/size
915
- */
916
- size: [{
917
- size: [C, t, "auto", "min", "max", "fit"]
918
- }],
919
- // Typography
920
- /**
921
- * Font Size
922
- * @see https://tailwindcss.com/docs/font-size
923
- */
924
- "font-size": [{
925
- text: ["base", D, j]
926
- }],
927
- /**
928
- * Font Smoothing
929
- * @see https://tailwindcss.com/docs/font-smoothing
930
- */
931
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
932
- /**
933
- * Font Style
934
- * @see https://tailwindcss.com/docs/font-style
935
- */
936
- "font-style": ["italic", "not-italic"],
937
- /**
938
- * Font Weight
939
- * @see https://tailwindcss.com/docs/font-weight
940
- */
941
- "font-weight": [{
942
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", le]
943
- }],
944
- /**
945
- * Font Family
946
- * @see https://tailwindcss.com/docs/font-family
947
- */
948
- "font-family": [{
949
- font: [ne]
950
- }],
951
- /**
952
- * Font Variant Numeric
953
- * @see https://tailwindcss.com/docs/font-variant-numeric
954
- */
955
- "fvn-normal": ["normal-nums"],
956
- /**
957
- * Font Variant Numeric
958
- * @see https://tailwindcss.com/docs/font-variant-numeric
959
- */
960
- "fvn-ordinal": ["ordinal"],
961
- /**
962
- * Font Variant Numeric
963
- * @see https://tailwindcss.com/docs/font-variant-numeric
964
- */
965
- "fvn-slashed-zero": ["slashed-zero"],
966
- /**
967
- * Font Variant Numeric
968
- * @see https://tailwindcss.com/docs/font-variant-numeric
969
- */
970
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
971
- /**
972
- * Font Variant Numeric
973
- * @see https://tailwindcss.com/docs/font-variant-numeric
974
- */
975
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
976
- /**
977
- * Font Variant Numeric
978
- * @see https://tailwindcss.com/docs/font-variant-numeric
979
- */
980
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
981
- /**
982
- * Letter Spacing
983
- * @see https://tailwindcss.com/docs/letter-spacing
984
- */
985
- tracking: [{
986
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", C]
987
- }],
988
- /**
989
- * Line Clamp
990
- * @see https://tailwindcss.com/docs/line-clamp
991
- */
992
- "line-clamp": [{
993
- "line-clamp": ["none", Z, le]
994
- }],
995
- /**
996
- * Line Height
997
- * @see https://tailwindcss.com/docs/line-height
998
- */
999
- leading: [{
1000
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", H, C]
1001
- }],
1002
- /**
1003
- * List Style Image
1004
- * @see https://tailwindcss.com/docs/list-style-image
1005
- */
1006
- "list-image": [{
1007
- "list-image": ["none", C]
1008
- }],
1009
- /**
1010
- * List Style Type
1011
- * @see https://tailwindcss.com/docs/list-style-type
1012
- */
1013
- "list-style-type": [{
1014
- list: ["none", "disc", "decimal", C]
1015
- }],
1016
- /**
1017
- * List Style Position
1018
- * @see https://tailwindcss.com/docs/list-style-position
1019
- */
1020
- "list-style-position": [{
1021
- list: ["inside", "outside"]
1022
- }],
1023
- /**
1024
- * Placeholder Color
1025
- * @deprecated since Tailwind CSS v3.0.0
1026
- * @see https://tailwindcss.com/docs/placeholder-color
1027
- */
1028
- "placeholder-color": [{
1029
- placeholder: [e]
1030
- }],
1031
- /**
1032
- * Placeholder Opacity
1033
- * @see https://tailwindcss.com/docs/placeholder-opacity
1034
- */
1035
- "placeholder-opacity": [{
1036
- "placeholder-opacity": [g]
1037
- }],
1038
- /**
1039
- * Text Alignment
1040
- * @see https://tailwindcss.com/docs/text-align
1041
- */
1042
- "text-alignment": [{
1043
- text: ["left", "center", "right", "justify", "start", "end"]
1044
- }],
1045
- /**
1046
- * Text Color
1047
- * @see https://tailwindcss.com/docs/text-color
1048
- */
1049
- "text-color": [{
1050
- text: [e]
1051
- }],
1052
- /**
1053
- * Text Opacity
1054
- * @see https://tailwindcss.com/docs/text-opacity
1055
- */
1056
- "text-opacity": [{
1057
- "text-opacity": [g]
1058
- }],
1059
- /**
1060
- * Text Decoration
1061
- * @see https://tailwindcss.com/docs/text-decoration
1062
- */
1063
- "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1064
- /**
1065
- * Text Decoration Style
1066
- * @see https://tailwindcss.com/docs/text-decoration-style
1067
- */
1068
- "text-decoration-style": [{
1069
- decoration: [...T(), "wavy"]
1070
- }],
1071
- /**
1072
- * Text Decoration Thickness
1073
- * @see https://tailwindcss.com/docs/text-decoration-thickness
1074
- */
1075
- "text-decoration-thickness": [{
1076
- decoration: ["auto", "from-font", H, j]
1077
- }],
1078
- /**
1079
- * Text Underline Offset
1080
- * @see https://tailwindcss.com/docs/text-underline-offset
1081
- */
1082
- "underline-offset": [{
1083
- "underline-offset": ["auto", H, C]
1084
- }],
1085
- /**
1086
- * Text Decoration Color
1087
- * @see https://tailwindcss.com/docs/text-decoration-color
1088
- */
1089
- "text-decoration-color": [{
1090
- decoration: [e]
1091
- }],
1092
- /**
1093
- * Text Transform
1094
- * @see https://tailwindcss.com/docs/text-transform
1095
- */
1096
- "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1097
- /**
1098
- * Text Overflow
1099
- * @see https://tailwindcss.com/docs/text-overflow
1100
- */
1101
- "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1102
- /**
1103
- * Text Wrap
1104
- * @see https://tailwindcss.com/docs/text-wrap
1105
- */
1106
- "text-wrap": [{
1107
- text: ["wrap", "nowrap", "balance", "pretty"]
1108
- }],
1109
- /**
1110
- * Text Indent
1111
- * @see https://tailwindcss.com/docs/text-indent
1112
- */
1113
- indent: [{
1114
- indent: N()
1115
- }],
1116
- /**
1117
- * Vertical Alignment
1118
- * @see https://tailwindcss.com/docs/vertical-align
1119
- */
1120
- "vertical-align": [{
1121
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", C]
1122
- }],
1123
- /**
1124
- * Whitespace
1125
- * @see https://tailwindcss.com/docs/whitespace
1126
- */
1127
- whitespace: [{
1128
- whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1129
- }],
1130
- /**
1131
- * Word Break
1132
- * @see https://tailwindcss.com/docs/word-break
1133
- */
1134
- break: [{
1135
- break: ["normal", "words", "all", "keep"]
1136
- }],
1137
- /**
1138
- * Hyphens
1139
- * @see https://tailwindcss.com/docs/hyphens
1140
- */
1141
- hyphens: [{
1142
- hyphens: ["none", "manual", "auto"]
1143
- }],
1144
- /**
1145
- * Content
1146
- * @see https://tailwindcss.com/docs/content
1147
- */
1148
- content: [{
1149
- content: ["none", C]
1150
- }],
1151
- // Backgrounds
1152
- /**
1153
- * Background Attachment
1154
- * @see https://tailwindcss.com/docs/background-attachment
1155
- */
1156
- "bg-attachment": [{
1157
- bg: ["fixed", "local", "scroll"]
1158
- }],
1159
- /**
1160
- * Background Clip
1161
- * @see https://tailwindcss.com/docs/background-clip
1162
- */
1163
- "bg-clip": [{
1164
- "bg-clip": ["border", "padding", "content", "text"]
1165
- }],
1166
- /**
1167
- * Background Opacity
1168
- * @deprecated since Tailwind CSS v3.0.0
1169
- * @see https://tailwindcss.com/docs/background-opacity
1170
- */
1171
- "bg-opacity": [{
1172
- "bg-opacity": [g]
1173
- }],
1174
- /**
1175
- * Background Origin
1176
- * @see https://tailwindcss.com/docs/background-origin
1177
- */
1178
- "bg-origin": [{
1179
- "bg-origin": ["border", "padding", "content"]
1180
- }],
1181
- /**
1182
- * Background Position
1183
- * @see https://tailwindcss.com/docs/background-position
1184
- */
1185
- "bg-position": [{
1186
- bg: [...X(), Lt]
1187
- }],
1188
- /**
1189
- * Background Repeat
1190
- * @see https://tailwindcss.com/docs/background-repeat
1191
- */
1192
- "bg-repeat": [{
1193
- bg: ["no-repeat", {
1194
- repeat: ["", "x", "y", "round", "space"]
1195
- }]
1196
- }],
1197
- /**
1198
- * Background Size
1199
- * @see https://tailwindcss.com/docs/background-size
1200
- */
1201
- "bg-size": [{
1202
- bg: ["auto", "cover", "contain", Bt]
1203
- }],
1204
- /**
1205
- * Background Image
1206
- * @see https://tailwindcss.com/docs/background-image
1207
- */
1208
- "bg-image": [{
1209
- bg: ["none", {
1210
- "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1211
- }, Ot]
1212
- }],
1213
- /**
1214
- * Background Color
1215
- * @see https://tailwindcss.com/docs/background-color
1216
- */
1217
- "bg-color": [{
1218
- bg: [e]
1219
- }],
1220
- /**
1221
- * Gradient Color Stops From Position
1222
- * @see https://tailwindcss.com/docs/gradient-color-stops
1223
- */
1224
- "gradient-from-pos": [{
1225
- from: [v]
1226
- }],
1227
- /**
1228
- * Gradient Color Stops Via Position
1229
- * @see https://tailwindcss.com/docs/gradient-color-stops
1230
- */
1231
- "gradient-via-pos": [{
1232
- via: [v]
1233
- }],
1234
- /**
1235
- * Gradient Color Stops To Position
1236
- * @see https://tailwindcss.com/docs/gradient-color-stops
1237
- */
1238
- "gradient-to-pos": [{
1239
- to: [v]
1240
- }],
1241
- /**
1242
- * Gradient Color Stops From
1243
- * @see https://tailwindcss.com/docs/gradient-color-stops
1244
- */
1245
- "gradient-from": [{
1246
- from: [y]
1247
- }],
1248
- /**
1249
- * Gradient Color Stops Via
1250
- * @see https://tailwindcss.com/docs/gradient-color-stops
1251
- */
1252
- "gradient-via": [{
1253
- via: [y]
1254
- }],
1255
- /**
1256
- * Gradient Color Stops To
1257
- * @see https://tailwindcss.com/docs/gradient-color-stops
1258
- */
1259
- "gradient-to": [{
1260
- to: [y]
1261
- }],
1262
- // Borders
1263
- /**
1264
- * Border Radius
1265
- * @see https://tailwindcss.com/docs/border-radius
1266
- */
1267
- rounded: [{
1268
- rounded: [s]
1269
- }],
1270
- /**
1271
- * Border Radius Start
1272
- * @see https://tailwindcss.com/docs/border-radius
1273
- */
1274
- "rounded-s": [{
1275
- "rounded-s": [s]
1276
- }],
1277
- /**
1278
- * Border Radius End
1279
- * @see https://tailwindcss.com/docs/border-radius
1280
- */
1281
- "rounded-e": [{
1282
- "rounded-e": [s]
1283
- }],
1284
- /**
1285
- * Border Radius Top
1286
- * @see https://tailwindcss.com/docs/border-radius
1287
- */
1288
- "rounded-t": [{
1289
- "rounded-t": [s]
1290
- }],
1291
- /**
1292
- * Border Radius Right
1293
- * @see https://tailwindcss.com/docs/border-radius
1294
- */
1295
- "rounded-r": [{
1296
- "rounded-r": [s]
1297
- }],
1298
- /**
1299
- * Border Radius Bottom
1300
- * @see https://tailwindcss.com/docs/border-radius
1301
- */
1302
- "rounded-b": [{
1303
- "rounded-b": [s]
1304
- }],
1305
- /**
1306
- * Border Radius Left
1307
- * @see https://tailwindcss.com/docs/border-radius
1308
- */
1309
- "rounded-l": [{
1310
- "rounded-l": [s]
1311
- }],
1312
- /**
1313
- * Border Radius Start Start
1314
- * @see https://tailwindcss.com/docs/border-radius
1315
- */
1316
- "rounded-ss": [{
1317
- "rounded-ss": [s]
1318
- }],
1319
- /**
1320
- * Border Radius Start End
1321
- * @see https://tailwindcss.com/docs/border-radius
1322
- */
1323
- "rounded-se": [{
1324
- "rounded-se": [s]
1325
- }],
1326
- /**
1327
- * Border Radius End End
1328
- * @see https://tailwindcss.com/docs/border-radius
1329
- */
1330
- "rounded-ee": [{
1331
- "rounded-ee": [s]
1332
- }],
1333
- /**
1334
- * Border Radius End Start
1335
- * @see https://tailwindcss.com/docs/border-radius
1336
- */
1337
- "rounded-es": [{
1338
- "rounded-es": [s]
1339
- }],
1340
- /**
1341
- * Border Radius Top Left
1342
- * @see https://tailwindcss.com/docs/border-radius
1343
- */
1344
- "rounded-tl": [{
1345
- "rounded-tl": [s]
1346
- }],
1347
- /**
1348
- * Border Radius Top Right
1349
- * @see https://tailwindcss.com/docs/border-radius
1350
- */
1351
- "rounded-tr": [{
1352
- "rounded-tr": [s]
1353
- }],
1354
- /**
1355
- * Border Radius Bottom Right
1356
- * @see https://tailwindcss.com/docs/border-radius
1357
- */
1358
- "rounded-br": [{
1359
- "rounded-br": [s]
1360
- }],
1361
- /**
1362
- * Border Radius Bottom Left
1363
- * @see https://tailwindcss.com/docs/border-radius
1364
- */
1365
- "rounded-bl": [{
1366
- "rounded-bl": [s]
1367
- }],
1368
- /**
1369
- * Border Width
1370
- * @see https://tailwindcss.com/docs/border-width
1371
- */
1372
- "border-w": [{
1373
- border: [i]
1374
- }],
1375
- /**
1376
- * Border Width X
1377
- * @see https://tailwindcss.com/docs/border-width
1378
- */
1379
- "border-w-x": [{
1380
- "border-x": [i]
1381
- }],
1382
- /**
1383
- * Border Width Y
1384
- * @see https://tailwindcss.com/docs/border-width
1385
- */
1386
- "border-w-y": [{
1387
- "border-y": [i]
1388
- }],
1389
- /**
1390
- * Border Width Start
1391
- * @see https://tailwindcss.com/docs/border-width
1392
- */
1393
- "border-w-s": [{
1394
- "border-s": [i]
1395
- }],
1396
- /**
1397
- * Border Width End
1398
- * @see https://tailwindcss.com/docs/border-width
1399
- */
1400
- "border-w-e": [{
1401
- "border-e": [i]
1402
- }],
1403
- /**
1404
- * Border Width Top
1405
- * @see https://tailwindcss.com/docs/border-width
1406
- */
1407
- "border-w-t": [{
1408
- "border-t": [i]
1409
- }],
1410
- /**
1411
- * Border Width Right
1412
- * @see https://tailwindcss.com/docs/border-width
1413
- */
1414
- "border-w-r": [{
1415
- "border-r": [i]
1416
- }],
1417
- /**
1418
- * Border Width Bottom
1419
- * @see https://tailwindcss.com/docs/border-width
1420
- */
1421
- "border-w-b": [{
1422
- "border-b": [i]
1423
- }],
1424
- /**
1425
- * Border Width Left
1426
- * @see https://tailwindcss.com/docs/border-width
1427
- */
1428
- "border-w-l": [{
1429
- "border-l": [i]
1430
- }],
1431
- /**
1432
- * Border Opacity
1433
- * @see https://tailwindcss.com/docs/border-opacity
1434
- */
1435
- "border-opacity": [{
1436
- "border-opacity": [g]
1437
- }],
1438
- /**
1439
- * Border Style
1440
- * @see https://tailwindcss.com/docs/border-style
1441
- */
1442
- "border-style": [{
1443
- border: [...T(), "hidden"]
1444
- }],
1445
- /**
1446
- * Divide Width X
1447
- * @see https://tailwindcss.com/docs/divide-width
1448
- */
1449
- "divide-x": [{
1450
- "divide-x": [i]
1451
- }],
1452
- /**
1453
- * Divide Width X Reverse
1454
- * @see https://tailwindcss.com/docs/divide-width
1455
- */
1456
- "divide-x-reverse": ["divide-x-reverse"],
1457
- /**
1458
- * Divide Width Y
1459
- * @see https://tailwindcss.com/docs/divide-width
1460
- */
1461
- "divide-y": [{
1462
- "divide-y": [i]
1463
- }],
1464
- /**
1465
- * Divide Width Y Reverse
1466
- * @see https://tailwindcss.com/docs/divide-width
1467
- */
1468
- "divide-y-reverse": ["divide-y-reverse"],
1469
- /**
1470
- * Divide Opacity
1471
- * @see https://tailwindcss.com/docs/divide-opacity
1472
- */
1473
- "divide-opacity": [{
1474
- "divide-opacity": [g]
1475
- }],
1476
- /**
1477
- * Divide Style
1478
- * @see https://tailwindcss.com/docs/divide-style
1479
- */
1480
- "divide-style": [{
1481
- divide: T()
1482
- }],
1483
- /**
1484
- * Border Color
1485
- * @see https://tailwindcss.com/docs/border-color
1486
- */
1487
- "border-color": [{
1488
- border: [n]
1489
- }],
1490
- /**
1491
- * Border Color X
1492
- * @see https://tailwindcss.com/docs/border-color
1493
- */
1494
- "border-color-x": [{
1495
- "border-x": [n]
1496
- }],
1497
- /**
1498
- * Border Color Y
1499
- * @see https://tailwindcss.com/docs/border-color
1500
- */
1501
- "border-color-y": [{
1502
- "border-y": [n]
1503
- }],
1504
- /**
1505
- * Border Color S
1506
- * @see https://tailwindcss.com/docs/border-color
1507
- */
1508
- "border-color-s": [{
1509
- "border-s": [n]
1510
- }],
1511
- /**
1512
- * Border Color E
1513
- * @see https://tailwindcss.com/docs/border-color
1514
- */
1515
- "border-color-e": [{
1516
- "border-e": [n]
1517
- }],
1518
- /**
1519
- * Border Color Top
1520
- * @see https://tailwindcss.com/docs/border-color
1521
- */
1522
- "border-color-t": [{
1523
- "border-t": [n]
1524
- }],
1525
- /**
1526
- * Border Color Right
1527
- * @see https://tailwindcss.com/docs/border-color
1528
- */
1529
- "border-color-r": [{
1530
- "border-r": [n]
1531
- }],
1532
- /**
1533
- * Border Color Bottom
1534
- * @see https://tailwindcss.com/docs/border-color
1535
- */
1536
- "border-color-b": [{
1537
- "border-b": [n]
1538
- }],
1539
- /**
1540
- * Border Color Left
1541
- * @see https://tailwindcss.com/docs/border-color
1542
- */
1543
- "border-color-l": [{
1544
- "border-l": [n]
1545
- }],
1546
- /**
1547
- * Divide Color
1548
- * @see https://tailwindcss.com/docs/divide-color
1549
- */
1550
- "divide-color": [{
1551
- divide: [n]
1552
- }],
1553
- /**
1554
- * Outline Style
1555
- * @see https://tailwindcss.com/docs/outline-style
1556
- */
1557
- "outline-style": [{
1558
- outline: ["", ...T()]
1559
- }],
1560
- /**
1561
- * Outline Offset
1562
- * @see https://tailwindcss.com/docs/outline-offset
1563
- */
1564
- "outline-offset": [{
1565
- "outline-offset": [H, C]
1566
- }],
1567
- /**
1568
- * Outline Width
1569
- * @see https://tailwindcss.com/docs/outline-width
1570
- */
1571
- "outline-w": [{
1572
- outline: [H, j]
1573
- }],
1574
- /**
1575
- * Outline Color
1576
- * @see https://tailwindcss.com/docs/outline-color
1577
- */
1578
- "outline-color": [{
1579
- outline: [e]
1580
- }],
1581
- /**
1582
- * Ring Width
1583
- * @see https://tailwindcss.com/docs/ring-width
1584
- */
1585
- "ring-w": [{
1586
- ring: I()
1587
- }],
1588
- /**
1589
- * Ring Width Inset
1590
- * @see https://tailwindcss.com/docs/ring-width
1591
- */
1592
- "ring-w-inset": ["ring-inset"],
1593
- /**
1594
- * Ring Color
1595
- * @see https://tailwindcss.com/docs/ring-color
1596
- */
1597
- "ring-color": [{
1598
- ring: [e]
1599
- }],
1600
- /**
1601
- * Ring Opacity
1602
- * @see https://tailwindcss.com/docs/ring-opacity
1603
- */
1604
- "ring-opacity": [{
1605
- "ring-opacity": [g]
1606
- }],
1607
- /**
1608
- * Ring Offset Width
1609
- * @see https://tailwindcss.com/docs/ring-offset-width
1610
- */
1611
- "ring-offset-w": [{
1612
- "ring-offset": [H, j]
1613
- }],
1614
- /**
1615
- * Ring Offset Color
1616
- * @see https://tailwindcss.com/docs/ring-offset-color
1617
- */
1618
- "ring-offset-color": [{
1619
- "ring-offset": [e]
1620
- }],
1621
- // Effects
1622
- /**
1623
- * Box Shadow
1624
- * @see https://tailwindcss.com/docs/box-shadow
1625
- */
1626
- shadow: [{
1627
- shadow: ["", "inner", "none", D, Wt]
1628
- }],
1629
- /**
1630
- * Box Shadow Color
1631
- * @see https://tailwindcss.com/docs/box-shadow-color
1632
- */
1633
- "shadow-color": [{
1634
- shadow: [ne]
1635
- }],
1636
- /**
1637
- * Opacity
1638
- * @see https://tailwindcss.com/docs/opacity
1639
- */
1640
- opacity: [{
1641
- opacity: [g]
1642
- }],
1643
- /**
1644
- * Mix Blend Mode
1645
- * @see https://tailwindcss.com/docs/mix-blend-mode
1646
- */
1647
- "mix-blend": [{
1648
- "mix-blend": [...B(), "plus-lighter", "plus-darker"]
1649
- }],
1650
- /**
1651
- * Background Blend Mode
1652
- * @see https://tailwindcss.com/docs/background-blend-mode
1653
- */
1654
- "bg-blend": [{
1655
- "bg-blend": B()
1656
- }],
1657
- // Filters
1658
- /**
1659
- * Filter
1660
- * @deprecated since Tailwind CSS v3.0.0
1661
- * @see https://tailwindcss.com/docs/filter
1662
- */
1663
- filter: [{
1664
- filter: ["", "none"]
1665
- }],
1666
- /**
1667
- * Blur
1668
- * @see https://tailwindcss.com/docs/blur
1669
- */
1670
- blur: [{
1671
- blur: [r]
1672
- }],
1673
- /**
1674
- * Brightness
1675
- * @see https://tailwindcss.com/docs/brightness
1676
- */
1677
- brightness: [{
1678
- brightness: [o]
1679
- }],
1680
- /**
1681
- * Contrast
1682
- * @see https://tailwindcss.com/docs/contrast
1683
- */
1684
- contrast: [{
1685
- contrast: [l]
1686
- }],
1687
- /**
1688
- * Drop Shadow
1689
- * @see https://tailwindcss.com/docs/drop-shadow
1690
- */
1691
- "drop-shadow": [{
1692
- "drop-shadow": ["", "none", D, C]
1693
- }],
1694
- /**
1695
- * Grayscale
1696
- * @see https://tailwindcss.com/docs/grayscale
1697
- */
1698
- grayscale: [{
1699
- grayscale: [d]
1700
- }],
1701
- /**
1702
- * Hue Rotate
1703
- * @see https://tailwindcss.com/docs/hue-rotate
1704
- */
1705
- "hue-rotate": [{
1706
- "hue-rotate": [u]
1707
- }],
1708
- /**
1709
- * Invert
1710
- * @see https://tailwindcss.com/docs/invert
1711
- */
1712
- invert: [{
1713
- invert: [c]
1714
- }],
1715
- /**
1716
- * Saturate
1717
- * @see https://tailwindcss.com/docs/saturate
1718
- */
1719
- saturate: [{
1720
- saturate: [S]
1721
- }],
1722
- /**
1723
- * Sepia
1724
- * @see https://tailwindcss.com/docs/sepia
1725
- */
1726
- sepia: [{
1727
- sepia: [E]
1728
- }],
1729
- /**
1730
- * Backdrop Filter
1731
- * @deprecated since Tailwind CSS v3.0.0
1732
- * @see https://tailwindcss.com/docs/backdrop-filter
1733
- */
1734
- "backdrop-filter": [{
1735
- "backdrop-filter": ["", "none"]
1736
- }],
1737
- /**
1738
- * Backdrop Blur
1739
- * @see https://tailwindcss.com/docs/backdrop-blur
1740
- */
1741
- "backdrop-blur": [{
1742
- "backdrop-blur": [r]
1743
- }],
1744
- /**
1745
- * Backdrop Brightness
1746
- * @see https://tailwindcss.com/docs/backdrop-brightness
1747
- */
1748
- "backdrop-brightness": [{
1749
- "backdrop-brightness": [o]
1750
- }],
1751
- /**
1752
- * Backdrop Contrast
1753
- * @see https://tailwindcss.com/docs/backdrop-contrast
1754
- */
1755
- "backdrop-contrast": [{
1756
- "backdrop-contrast": [l]
1757
- }],
1758
- /**
1759
- * Backdrop Grayscale
1760
- * @see https://tailwindcss.com/docs/backdrop-grayscale
1761
- */
1762
- "backdrop-grayscale": [{
1763
- "backdrop-grayscale": [d]
1764
- }],
1765
- /**
1766
- * Backdrop Hue Rotate
1767
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1768
- */
1769
- "backdrop-hue-rotate": [{
1770
- "backdrop-hue-rotate": [u]
1771
- }],
1772
- /**
1773
- * Backdrop Invert
1774
- * @see https://tailwindcss.com/docs/backdrop-invert
1775
- */
1776
- "backdrop-invert": [{
1777
- "backdrop-invert": [c]
1778
- }],
1779
- /**
1780
- * Backdrop Opacity
1781
- * @see https://tailwindcss.com/docs/backdrop-opacity
1782
- */
1783
- "backdrop-opacity": [{
1784
- "backdrop-opacity": [g]
1785
- }],
1786
- /**
1787
- * Backdrop Saturate
1788
- * @see https://tailwindcss.com/docs/backdrop-saturate
1789
- */
1790
- "backdrop-saturate": [{
1791
- "backdrop-saturate": [S]
1792
- }],
1793
- /**
1794
- * Backdrop Sepia
1795
- * @see https://tailwindcss.com/docs/backdrop-sepia
1796
- */
1797
- "backdrop-sepia": [{
1798
- "backdrop-sepia": [E]
1799
- }],
1800
- // Tables
1801
- /**
1802
- * Border Collapse
1803
- * @see https://tailwindcss.com/docs/border-collapse
1804
- */
1805
- "border-collapse": [{
1806
- border: ["collapse", "separate"]
1807
- }],
1808
- /**
1809
- * Border Spacing
1810
- * @see https://tailwindcss.com/docs/border-spacing
1811
- */
1812
- "border-spacing": [{
1813
- "border-spacing": [a]
1814
- }],
1815
- /**
1816
- * Border Spacing X
1817
- * @see https://tailwindcss.com/docs/border-spacing
1818
- */
1819
- "border-spacing-x": [{
1820
- "border-spacing-x": [a]
1821
- }],
1822
- /**
1823
- * Border Spacing Y
1824
- * @see https://tailwindcss.com/docs/border-spacing
1825
- */
1826
- "border-spacing-y": [{
1827
- "border-spacing-y": [a]
1828
- }],
1829
- /**
1830
- * Table Layout
1831
- * @see https://tailwindcss.com/docs/table-layout
1832
- */
1833
- "table-layout": [{
1834
- table: ["auto", "fixed"]
1835
- }],
1836
- /**
1837
- * Caption Side
1838
- * @see https://tailwindcss.com/docs/caption-side
1839
- */
1840
- caption: [{
1841
- caption: ["top", "bottom"]
1842
- }],
1843
- // Transitions and Animation
1844
- /**
1845
- * Tranisition Property
1846
- * @see https://tailwindcss.com/docs/transition-property
1847
- */
1848
- transition: [{
1849
- transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", C]
1850
- }],
1851
- /**
1852
- * Transition Duration
1853
- * @see https://tailwindcss.com/docs/transition-duration
1854
- */
1855
- duration: [{
1856
- duration: L()
1857
- }],
1858
- /**
1859
- * Transition Timing Function
1860
- * @see https://tailwindcss.com/docs/transition-timing-function
1861
- */
1862
- ease: [{
1863
- ease: ["linear", "in", "out", "in-out", C]
1864
- }],
1865
- /**
1866
- * Transition Delay
1867
- * @see https://tailwindcss.com/docs/transition-delay
1868
- */
1869
- delay: [{
1870
- delay: L()
1871
- }],
1872
- /**
1873
- * Animation
1874
- * @see https://tailwindcss.com/docs/animation
1875
- */
1876
- animate: [{
1877
- animate: ["none", "spin", "ping", "pulse", "bounce", C]
1878
- }],
1879
- // Transforms
1880
- /**
1881
- * Transform
1882
- * @see https://tailwindcss.com/docs/transform
1883
- */
1884
- transform: [{
1885
- transform: ["", "gpu", "none"]
1886
- }],
1887
- /**
1888
- * Scale
1889
- * @see https://tailwindcss.com/docs/scale
1890
- */
1891
- scale: [{
1892
- scale: [w]
1893
- }],
1894
- /**
1895
- * Scale X
1896
- * @see https://tailwindcss.com/docs/scale
1897
- */
1898
- "scale-x": [{
1899
- "scale-x": [w]
1900
- }],
1901
- /**
1902
- * Scale Y
1903
- * @see https://tailwindcss.com/docs/scale
1904
- */
1905
- "scale-y": [{
1906
- "scale-y": [w]
1907
- }],
1908
- /**
1909
- * Rotate
1910
- * @see https://tailwindcss.com/docs/rotate
1911
- */
1912
- rotate: [{
1913
- rotate: [oe, C]
1914
- }],
1915
- /**
1916
- * Translate X
1917
- * @see https://tailwindcss.com/docs/translate
1918
- */
1919
- "translate-x": [{
1920
- "translate-x": [Y]
1921
- }],
1922
- /**
1923
- * Translate Y
1924
- * @see https://tailwindcss.com/docs/translate
1925
- */
1926
- "translate-y": [{
1927
- "translate-y": [Y]
1928
- }],
1929
- /**
1930
- * Skew X
1931
- * @see https://tailwindcss.com/docs/skew
1932
- */
1933
- "skew-x": [{
1934
- "skew-x": [$]
1935
- }],
1936
- /**
1937
- * Skew Y
1938
- * @see https://tailwindcss.com/docs/skew
1939
- */
1940
- "skew-y": [{
1941
- "skew-y": [$]
1942
- }],
1943
- /**
1944
- * Transform Origin
1945
- * @see https://tailwindcss.com/docs/transform-origin
1946
- */
1947
- "transform-origin": [{
1948
- origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", C]
1949
- }],
1950
- // Interactivity
1951
- /**
1952
- * Accent Color
1953
- * @see https://tailwindcss.com/docs/accent-color
1954
- */
1955
- accent: [{
1956
- accent: ["auto", e]
1957
- }],
1958
- /**
1959
- * Appearance
1960
- * @see https://tailwindcss.com/docs/appearance
1961
- */
1962
- appearance: [{
1963
- appearance: ["none", "auto"]
1964
- }],
1965
- /**
1966
- * Cursor
1967
- * @see https://tailwindcss.com/docs/cursor
1968
- */
1969
- cursor: [{
1970
- 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", C]
1971
- }],
1972
- /**
1973
- * Caret Color
1974
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
1975
- */
1976
- "caret-color": [{
1977
- caret: [e]
1978
- }],
1979
- /**
1980
- * Pointer Events
1981
- * @see https://tailwindcss.com/docs/pointer-events
1982
- */
1983
- "pointer-events": [{
1984
- "pointer-events": ["none", "auto"]
1985
- }],
1986
- /**
1987
- * Resize
1988
- * @see https://tailwindcss.com/docs/resize
1989
- */
1990
- resize: [{
1991
- resize: ["none", "y", "x", ""]
1992
- }],
1993
- /**
1994
- * Scroll Behavior
1995
- * @see https://tailwindcss.com/docs/scroll-behavior
1996
- */
1997
- "scroll-behavior": [{
1998
- scroll: ["auto", "smooth"]
1999
- }],
2000
- /**
2001
- * Scroll Margin
2002
- * @see https://tailwindcss.com/docs/scroll-margin
2003
- */
2004
- "scroll-m": [{
2005
- "scroll-m": N()
2006
- }],
2007
- /**
2008
- * Scroll Margin X
2009
- * @see https://tailwindcss.com/docs/scroll-margin
2010
- */
2011
- "scroll-mx": [{
2012
- "scroll-mx": N()
2013
- }],
2014
- /**
2015
- * Scroll Margin Y
2016
- * @see https://tailwindcss.com/docs/scroll-margin
2017
- */
2018
- "scroll-my": [{
2019
- "scroll-my": N()
2020
- }],
2021
- /**
2022
- * Scroll Margin Start
2023
- * @see https://tailwindcss.com/docs/scroll-margin
2024
- */
2025
- "scroll-ms": [{
2026
- "scroll-ms": N()
2027
- }],
2028
- /**
2029
- * Scroll Margin End
2030
- * @see https://tailwindcss.com/docs/scroll-margin
2031
- */
2032
- "scroll-me": [{
2033
- "scroll-me": N()
2034
- }],
2035
- /**
2036
- * Scroll Margin Top
2037
- * @see https://tailwindcss.com/docs/scroll-margin
2038
- */
2039
- "scroll-mt": [{
2040
- "scroll-mt": N()
2041
- }],
2042
- /**
2043
- * Scroll Margin Right
2044
- * @see https://tailwindcss.com/docs/scroll-margin
2045
- */
2046
- "scroll-mr": [{
2047
- "scroll-mr": N()
2048
- }],
2049
- /**
2050
- * Scroll Margin Bottom
2051
- * @see https://tailwindcss.com/docs/scroll-margin
2052
- */
2053
- "scroll-mb": [{
2054
- "scroll-mb": N()
2055
- }],
2056
- /**
2057
- * Scroll Margin Left
2058
- * @see https://tailwindcss.com/docs/scroll-margin
2059
- */
2060
- "scroll-ml": [{
2061
- "scroll-ml": N()
2062
- }],
2063
- /**
2064
- * Scroll Padding
2065
- * @see https://tailwindcss.com/docs/scroll-padding
2066
- */
2067
- "scroll-p": [{
2068
- "scroll-p": N()
2069
- }],
2070
- /**
2071
- * Scroll Padding X
2072
- * @see https://tailwindcss.com/docs/scroll-padding
2073
- */
2074
- "scroll-px": [{
2075
- "scroll-px": N()
2076
- }],
2077
- /**
2078
- * Scroll Padding Y
2079
- * @see https://tailwindcss.com/docs/scroll-padding
2080
- */
2081
- "scroll-py": [{
2082
- "scroll-py": N()
2083
- }],
2084
- /**
2085
- * Scroll Padding Start
2086
- * @see https://tailwindcss.com/docs/scroll-padding
2087
- */
2088
- "scroll-ps": [{
2089
- "scroll-ps": N()
2090
- }],
2091
- /**
2092
- * Scroll Padding End
2093
- * @see https://tailwindcss.com/docs/scroll-padding
2094
- */
2095
- "scroll-pe": [{
2096
- "scroll-pe": N()
2097
- }],
2098
- /**
2099
- * Scroll Padding Top
2100
- * @see https://tailwindcss.com/docs/scroll-padding
2101
- */
2102
- "scroll-pt": [{
2103
- "scroll-pt": N()
2104
- }],
2105
- /**
2106
- * Scroll Padding Right
2107
- * @see https://tailwindcss.com/docs/scroll-padding
2108
- */
2109
- "scroll-pr": [{
2110
- "scroll-pr": N()
2111
- }],
2112
- /**
2113
- * Scroll Padding Bottom
2114
- * @see https://tailwindcss.com/docs/scroll-padding
2115
- */
2116
- "scroll-pb": [{
2117
- "scroll-pb": N()
2118
- }],
2119
- /**
2120
- * Scroll Padding Left
2121
- * @see https://tailwindcss.com/docs/scroll-padding
2122
- */
2123
- "scroll-pl": [{
2124
- "scroll-pl": N()
2125
- }],
2126
- /**
2127
- * Scroll Snap Align
2128
- * @see https://tailwindcss.com/docs/scroll-snap-align
2129
- */
2130
- "snap-align": [{
2131
- snap: ["start", "end", "center", "align-none"]
2132
- }],
2133
- /**
2134
- * Scroll Snap Stop
2135
- * @see https://tailwindcss.com/docs/scroll-snap-stop
2136
- */
2137
- "snap-stop": [{
2138
- snap: ["normal", "always"]
2139
- }],
2140
- /**
2141
- * Scroll Snap Type
2142
- * @see https://tailwindcss.com/docs/scroll-snap-type
2143
- */
2144
- "snap-type": [{
2145
- snap: ["none", "x", "y", "both"]
2146
- }],
2147
- /**
2148
- * Scroll Snap Type Strictness
2149
- * @see https://tailwindcss.com/docs/scroll-snap-type
2150
- */
2151
- "snap-strictness": [{
2152
- snap: ["mandatory", "proximity"]
2153
- }],
2154
- /**
2155
- * Touch Action
2156
- * @see https://tailwindcss.com/docs/touch-action
2157
- */
2158
- touch: [{
2159
- touch: ["auto", "none", "manipulation"]
2160
- }],
2161
- /**
2162
- * Touch Action X
2163
- * @see https://tailwindcss.com/docs/touch-action
2164
- */
2165
- "touch-x": [{
2166
- "touch-pan": ["x", "left", "right"]
2167
- }],
2168
- /**
2169
- * Touch Action Y
2170
- * @see https://tailwindcss.com/docs/touch-action
2171
- */
2172
- "touch-y": [{
2173
- "touch-pan": ["y", "up", "down"]
2174
- }],
2175
- /**
2176
- * Touch Action Pinch Zoom
2177
- * @see https://tailwindcss.com/docs/touch-action
2178
- */
2179
- "touch-pz": ["touch-pinch-zoom"],
2180
- /**
2181
- * User Select
2182
- * @see https://tailwindcss.com/docs/user-select
2183
- */
2184
- select: [{
2185
- select: ["none", "text", "all", "auto"]
2186
- }],
2187
- /**
2188
- * Will Change
2189
- * @see https://tailwindcss.com/docs/will-change
2190
- */
2191
- "will-change": [{
2192
- "will-change": ["auto", "scroll", "contents", "transform", C]
2193
- }],
2194
- // SVG
2195
- /**
2196
- * Fill
2197
- * @see https://tailwindcss.com/docs/fill
2198
- */
2199
- fill: [{
2200
- fill: [e, "none"]
2201
- }],
2202
- /**
2203
- * Stroke Width
2204
- * @see https://tailwindcss.com/docs/stroke-width
2205
- */
2206
- "stroke-w": [{
2207
- stroke: [H, j, le]
2208
- }],
2209
- /**
2210
- * Stroke
2211
- * @see https://tailwindcss.com/docs/stroke
2212
- */
2213
- stroke: [{
2214
- stroke: [e, "none"]
2215
- }],
2216
- // Accessibility
2217
- /**
2218
- * Screen Readers
2219
- * @see https://tailwindcss.com/docs/screen-readers
2220
- */
2221
- sr: ["sr-only", "not-sr-only"],
2222
- /**
2223
- * Forced Color Adjust
2224
- * @see https://tailwindcss.com/docs/forced-color-adjust
2225
- */
2226
- "forced-color-adjust": [{
2227
- "forced-color-adjust": ["auto", "none"]
2228
- }]
2229
- },
2230
- conflictingClassGroups: {
2231
- overflow: ["overflow-x", "overflow-y"],
2232
- overscroll: ["overscroll-x", "overscroll-y"],
2233
- inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2234
- "inset-x": ["right", "left"],
2235
- "inset-y": ["top", "bottom"],
2236
- flex: ["basis", "grow", "shrink"],
2237
- gap: ["gap-x", "gap-y"],
2238
- p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2239
- px: ["pr", "pl"],
2240
- py: ["pt", "pb"],
2241
- m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2242
- mx: ["mr", "ml"],
2243
- my: ["mt", "mb"],
2244
- size: ["w", "h"],
2245
- "font-size": ["leading"],
2246
- "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2247
- "fvn-ordinal": ["fvn-normal"],
2248
- "fvn-slashed-zero": ["fvn-normal"],
2249
- "fvn-figure": ["fvn-normal"],
2250
- "fvn-spacing": ["fvn-normal"],
2251
- "fvn-fraction": ["fvn-normal"],
2252
- "line-clamp": ["display", "overflow"],
2253
- 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"],
2254
- "rounded-s": ["rounded-ss", "rounded-es"],
2255
- "rounded-e": ["rounded-se", "rounded-ee"],
2256
- "rounded-t": ["rounded-tl", "rounded-tr"],
2257
- "rounded-r": ["rounded-tr", "rounded-br"],
2258
- "rounded-b": ["rounded-br", "rounded-bl"],
2259
- "rounded-l": ["rounded-tl", "rounded-bl"],
2260
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
2261
- "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2262
- "border-w-x": ["border-w-r", "border-w-l"],
2263
- "border-w-y": ["border-w-t", "border-w-b"],
2264
- "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2265
- "border-color-x": ["border-color-r", "border-color-l"],
2266
- "border-color-y": ["border-color-t", "border-color-b"],
2267
- "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2268
- "scroll-mx": ["scroll-mr", "scroll-ml"],
2269
- "scroll-my": ["scroll-mt", "scroll-mb"],
2270
- "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
2271
- "scroll-px": ["scroll-pr", "scroll-pl"],
2272
- "scroll-py": ["scroll-pt", "scroll-pb"],
2273
- touch: ["touch-x", "touch-y", "touch-pz"],
2274
- "touch-x": ["touch"],
2275
- "touch-y": ["touch"],
2276
- "touch-pz": ["touch"]
2277
- },
2278
- conflictingClassGroupModifiers: {
2279
- "font-size": ["leading"]
2280
- }
2281
- };
2282
- }, Kt = /* @__PURE__ */ Et(Ut);
2283
- function M(...e) {
2284
- return Kt(Pe(e));
2285
- }
2286
- const F = b.forwardRef(
2287
- ({ className: e, type: t, ...r }, o) => /* @__PURE__ */ p(
2288
- "input",
2289
- {
2290
- type: t,
2291
- className: M(
2292
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
2293
- e
2294
- ),
2295
- ref: o,
2296
- ...r
2297
- }
2298
- )
2299
- );
2300
- F.displayName = "Input";
2301
- function xe(e, t) {
2302
- if (typeof e == "function")
2303
- return e(t);
2304
- e != null && (e.current = t);
2305
- }
2306
- function Ve(...e) {
2307
- return (t) => {
2308
- let r = !1;
2309
- const o = e.map((n) => {
2310
- const s = xe(n, t);
2311
- return !r && typeof s == "function" && (r = !0), s;
2312
- });
2313
- if (r)
2314
- return () => {
2315
- for (let n = 0; n < o.length; n++) {
2316
- const s = o[n];
2317
- typeof s == "function" ? s() : xe(e[n], null);
2318
- }
2319
- };
2320
- };
2321
- }
2322
- function U(...e) {
2323
- return b.useCallback(Ve(...e), e);
2324
- }
2325
- // @__NO_SIDE_EFFECTS__
2326
- function se(e) {
2327
- const t = /* @__PURE__ */ qt(e), r = b.forwardRef((o, n) => {
2328
- const { children: s, ...a } = o, i = b.Children.toArray(s), l = i.find(Xt);
2329
- if (l) {
2330
- const d = l.props.children, u = i.map((c) => c === l ? b.Children.count(d) > 1 ? b.Children.only(null) : b.isValidElement(d) ? d.props.children : null : c);
2331
- return /* @__PURE__ */ p(t, { ...a, ref: n, children: b.isValidElement(d) ? b.cloneElement(d, void 0, u) : null });
2332
- }
2333
- return /* @__PURE__ */ p(t, { ...a, ref: n, children: s });
2334
- });
2335
- return r.displayName = `${e}.Slot`, r;
2336
- }
2337
- var Qt = /* @__PURE__ */ se("Slot");
2338
- // @__NO_SIDE_EFFECTS__
2339
- function qt(e) {
2340
- const t = b.forwardRef((r, o) => {
2341
- const { children: n, ...s } = r;
2342
- if (b.isValidElement(n)) {
2343
- const a = Zt(n), i = Jt(s, n.props);
2344
- return n.type !== b.Fragment && (i.ref = o ? Ve(o, a) : a), b.cloneElement(n, i);
2345
- }
2346
- return b.Children.count(n) > 1 ? b.Children.only(null) : null;
2347
- });
2348
- return t.displayName = `${e}.SlotClone`, t;
2349
- }
2350
- var Yt = Symbol("radix.slottable");
2351
- function Xt(e) {
2352
- return b.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Yt;
2353
- }
2354
- function Jt(e, t) {
2355
- const r = { ...t };
2356
- for (const o in t) {
2357
- const n = e[o], s = t[o];
2358
- /^on[A-Z]/.test(o) ? n && s ? r[o] = (...i) => {
2359
- const l = s(...i);
2360
- return n(...i), l;
2361
- } : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...s } : o === "className" && (r[o] = [n, s].filter(Boolean).join(" "));
2362
- }
2363
- return { ...e, ...r };
2364
- }
2365
- function Zt(e) {
2366
- var o, n;
2367
- let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
2368
- return r ? e.ref : (t = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
2369
- }
2370
- var er = [
2371
- "a",
2372
- "button",
2373
- "div",
2374
- "form",
2375
- "h2",
2376
- "h3",
2377
- "img",
2378
- "input",
2379
- "label",
2380
- "li",
2381
- "nav",
2382
- "ol",
2383
- "p",
2384
- "select",
2385
- "span",
2386
- "svg",
2387
- "ul"
2388
- ], te = er.reduce((e, t) => {
2389
- const r = /* @__PURE__ */ se(`Primitive.${t}`), o = b.forwardRef((n, s) => {
2390
- const { asChild: a, ...i } = n, l = a ? r : t;
2391
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(l, { ...i, ref: s });
2392
- });
2393
- return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
2394
- }, {}), tr = "Label", Fe = b.forwardRef((e, t) => /* @__PURE__ */ p(
2395
- te.label,
2396
- {
2397
- ...e,
2398
- ref: t,
2399
- onMouseDown: (r) => {
2400
- var n;
2401
- r.target.closest("button, input, select, textarea") || ((n = e.onMouseDown) == null || n.call(e, r), !r.defaultPrevented && r.detail > 1 && r.preventDefault());
2402
- }
2403
- }
2404
- ));
2405
- Fe.displayName = tr;
2406
- var _e = Fe;
2407
- const we = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ce = Pe, me = (e, t) => (r) => {
2408
- var o;
2409
- if ((t == null ? void 0 : t.variants) == null) return Ce(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2410
- const { variants: n, defaultVariants: s } = t, a = Object.keys(n).map((d) => {
2411
- const u = r == null ? void 0 : r[d], c = s == null ? void 0 : s[d];
2412
- if (u === null) return null;
2413
- const m = we(u) || we(c);
2414
- return n[d][m];
2415
- }), i = r && Object.entries(r).reduce((d, u) => {
2416
- let [c, m] = u;
2417
- return m === void 0 || (d[c] = m), d;
2418
- }, {}), l = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((d, u) => {
2419
- let { class: c, className: m, ...y } = u;
2420
- return Object.entries(y).every((v) => {
2421
- let [h, f] = v;
2422
- return Array.isArray(f) ? f.includes({
2423
- ...s,
2424
- ...i
2425
- }[h]) : {
2426
- ...s,
2427
- ...i
2428
- }[h] === f;
2429
- }) ? [
2430
- ...d,
2431
- c,
2432
- m
2433
- ] : d;
2434
- }, []);
2435
- return Ce(e, a, l, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2436
- }, rr = me(
2437
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
2438
- ), z = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ p(
2439
- _e,
2440
- {
2441
- ref: r,
2442
- className: M(rr(), e),
2443
- ...t
2444
- }
2445
- ));
2446
- z.displayName = _e.displayName;
2447
- const Te = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ p(
2448
- "div",
2449
- {
2450
- ref: r,
2451
- className: M(
2452
- "rounded-lg border bg-card text-card-foreground shadow-sm",
2453
- e
2454
- ),
2455
- ...t
2456
- }
2457
- ));
2458
- Te.displayName = "Card";
2459
- const Ie = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ p(
2460
- "div",
2461
- {
2462
- ref: r,
2463
- className: M("flex flex-col space-y-1.5 p-6", e),
2464
- ...t
2465
- }
2466
- ));
2467
- Ie.displayName = "CardHeader";
2468
- const Be = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ p(
2469
- "h3",
2470
- {
2471
- ref: r,
2472
- className: M(
2473
- "text-2xl font-semibold leading-none tracking-tight",
2474
- e
2475
- ),
2476
- ...t
2477
- }
2478
- ));
2479
- Be.displayName = "CardTitle";
2480
- const or = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ p(
2481
- "p",
2482
- {
2483
- ref: r,
2484
- className: M("text-sm text-muted-foreground", e),
2485
- ...t
2486
- }
2487
- ));
2488
- or.displayName = "CardDescription";
2489
- const Le = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ p("div", { ref: r, className: M("p-6 pt-0", e), ...t }));
2490
- Le.displayName = "CardContent";
2491
- const nr = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ p(
2492
- "div",
2493
- {
2494
- ref: r,
2495
- className: M("flex items-center p-6 pt-0", e),
2496
- ...t
2497
- }
2498
- ));
2499
- nr.displayName = "CardFooter";
2500
- const sr = ({
2501
- formData: e,
2502
- onChange: t,
2503
- required: r,
2504
- disabled: o,
2505
- readonly: n,
2506
- schema: s,
2507
- idSchema: a
2508
- }) => {
2509
- const i = (l) => (d) => {
2510
- t({
2511
- ...e,
2512
- [l]: d.target.value
2513
- });
2514
- };
2515
- return /* @__PURE__ */ k(Te, { children: [
2516
- /* @__PURE__ */ p(Ie, { className: "pb-4", children: /* @__PURE__ */ p(Be, { className: "text-lg", children: s.title || "Address" }) }),
2517
- /* @__PURE__ */ k(Le, { className: "space-y-4", children: [
2518
- /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2519
- /* @__PURE__ */ k(z, { htmlFor: `${a.$id}_street`, children: [
2520
- "Street Address",
2521
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
2522
- ] }),
2523
- /* @__PURE__ */ p(
2524
- F,
2525
- {
2526
- id: `${a.$id}_street`,
2527
- type: "text",
2528
- value: (e == null ? void 0 : e.street) || "",
2529
- onChange: i("street"),
2530
- disabled: o || n,
2531
- placeholder: "123 Main St"
2532
- }
2533
- )
2534
- ] }),
2535
- /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2536
- /* @__PURE__ */ k(z, { htmlFor: `${a.$id}_city`, children: [
2537
- "City",
2538
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
2539
- ] }),
2540
- /* @__PURE__ */ p(
2541
- F,
2542
- {
2543
- id: `${a.$id}_city`,
2544
- type: "text",
2545
- value: (e == null ? void 0 : e.city) || "",
2546
- onChange: i("city"),
2547
- disabled: o || n,
2548
- placeholder: "New York"
2549
- }
2550
- )
2551
- ] }),
2552
- /* @__PURE__ */ k("div", { className: "grid grid-cols-2 gap-4", children: [
2553
- /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2554
- /* @__PURE__ */ k(z, { htmlFor: `${a.$id}_state`, children: [
2555
- "State/Province",
2556
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
2557
- ] }),
2558
- /* @__PURE__ */ p(
2559
- F,
2560
- {
2561
- id: `${a.$id}_state`,
2562
- type: "text",
2563
- value: (e == null ? void 0 : e.state) || "",
2564
- onChange: i("state"),
2565
- disabled: o || n,
2566
- placeholder: "NY"
2567
- }
2568
- )
2569
- ] }),
2570
- /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2571
- /* @__PURE__ */ k(z, { htmlFor: `${a.$id}_zip`, children: [
2572
- "ZIP/Postal Code",
2573
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
2574
- ] }),
2575
- /* @__PURE__ */ p(
2576
- F,
2577
- {
2578
- id: `${a.$id}_zip`,
2579
- type: "text",
2580
- value: (e == null ? void 0 : e.zip) || "",
2581
- onChange: i("zip"),
2582
- disabled: o || n,
2583
- placeholder: "10001"
2584
- }
2585
- )
2586
- ] })
2587
- ] }),
2588
- /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2589
- /* @__PURE__ */ p(z, { htmlFor: `${a.$id}_country`, children: "Country" }),
2590
- /* @__PURE__ */ p(
2591
- F,
2592
- {
2593
- id: `${a.$id}_country`,
2594
- type: "text",
2595
- value: (e == null ? void 0 : e.country) || "",
2596
- onChange: i("country"),
2597
- disabled: o || n,
2598
- placeholder: "United States"
2599
- }
2600
- )
2601
- ] })
2602
- ] })
2603
- ] });
2604
- }, He = ct(null), ir = ({
2605
- eventHub: e,
2606
- formData: t,
2607
- children: r
2608
- }) => /* @__PURE__ */ p(He.Provider, { value: { eventHub: e, formData: t }, children: r }), ar = () => {
2609
- const e = dt(He);
2610
- if (!e)
2611
- throw new Error("useFormEventHub must be used within a FormEventProvider");
2612
- return e;
2613
- }, q = (e, t, r) => {
2614
- const { eventHub: o, formData: n } = ar();
2615
- return G.useMemo(
2616
- () => o.createFieldEventHandlers(e, t, n, r),
2617
- [o, e, t, n, r]
2618
- );
2619
- }, lr = ({
2620
- formData: e,
2621
- onChange: t,
2622
- required: r,
2623
- disabled: o,
2624
- readonly: n,
2625
- schema: s,
2626
- idSchema: a
2627
- }) => {
2628
- const i = q(a.$id, s), l = (u) => {
2629
- const c = u.replace(/\D/g, ""), m = c.length;
2630
- return m < 4 ? c : m < 7 ? `(${c.slice(0, 3)}) ${c.slice(3)}` : `(${c.slice(0, 3)}) ${c.slice(3, 6)}-${c.slice(6, 10)}`;
2631
- }, d = async (u) => {
2632
- const c = l(u.target.value);
2633
- t(c), await i.onChange(c);
2634
- };
2635
- return /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2636
- /* @__PURE__ */ k(z, { htmlFor: a.$id, children: [
2637
- s.title || "Phone Number",
2638
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
2639
- ] }),
2640
- /* @__PURE__ */ p(
2641
- F,
2642
- {
2643
- id: a.$id,
2644
- type: "tel",
2645
- value: e || "",
2646
- onChange: d,
2647
- disabled: o || n,
2648
- placeholder: "(555) 123-4567",
2649
- maxLength: 14
2650
- }
2651
- )
2652
- ] });
2653
- }, cr = ({
2654
- formData: e,
2655
- onChange: t,
2656
- required: r,
2657
- disabled: o,
2658
- readonly: n,
2659
- schema: s,
2660
- uiSchema: a,
2661
- idSchema: i
2662
- }) => {
2663
- var v, h;
2664
- const l = ((v = a == null ? void 0 : a["ui:options"]) == null ? void 0 : v.currency) || "USD", d = ((h = a == null ? void 0 : a["ui:options"]) == null ? void 0 : h.symbol) || "$", u = q(i.$id, s), c = (f) => {
2665
- const g = parseFloat(f.replace(/[^0-9.-]+/g, ""));
2666
- return isNaN(g) ? "" : g.toFixed(2);
2667
- }, m = async (f) => {
2668
- const g = f.target.value.replace(/[^0-9.-]+/g, ""), x = g ? parseFloat(g) : void 0;
2669
- t(x), await u.onChange(x);
2670
- }, y = async (f) => {
2671
- const g = c(f.target.value), x = g ? parseFloat(g) : void 0;
2672
- t(x), await u.onBlur(x);
2673
- };
2674
- return /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2675
- /* @__PURE__ */ k(z, { htmlFor: i.$id, children: [
2676
- s.title || "Amount",
2677
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
2678
- ] }),
2679
- /* @__PURE__ */ k("div", { className: "relative", children: [
2680
- /* @__PURE__ */ p("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground", children: String(d) }),
2681
- /* @__PURE__ */ p(
2682
- F,
2683
- {
2684
- id: i.$id,
2685
- type: "text",
2686
- inputMode: "decimal",
2687
- value: e || "",
2688
- onChange: m,
2689
- onBlur: y,
2690
- disabled: o || n,
2691
- placeholder: "0.00",
2692
- className: "pl-8 pr-12"
2693
- }
2694
- ),
2695
- /* @__PURE__ */ p("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground", children: String(l) })
2696
- ] })
2697
- ] });
2698
- }, dr = {
2699
- address: sr,
2700
- phone: lr,
2701
- currency: cr
2702
- }, ur = ({
2703
- id: e,
2704
- value: t,
2705
- required: r,
2706
- disabled: o,
2707
- readonly: n,
2708
- label: s,
2709
- onChange: a,
2710
- onBlur: i,
2711
- onFocus: l,
2712
- schema: d
2713
- }) => {
2714
- const u = q(e, d), c = async (v) => {
2715
- const h = v.target.value;
2716
- a(h), await u.onChange(h);
2717
- }, m = async (v) => {
2718
- const h = v.target.value;
2719
- i && i(e, h), await u.onBlur(h);
2720
- }, y = async (v) => {
2721
- const h = v.target.value;
2722
- l && l(e, h), await u.onFocus(h);
2723
- };
2724
- return /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2725
- /* @__PURE__ */ k(z, { htmlFor: e, children: [
2726
- s || d.title,
2727
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
2728
- ] }),
2729
- /* @__PURE__ */ p(
2730
- F,
2731
- {
2732
- id: e,
2733
- type: "color",
2734
- value: t || "#000000",
2735
- required: r,
2736
- disabled: o || n,
2737
- onChange: c,
2738
- onBlur: m,
2739
- onFocus: y,
2740
- className: "h-10 w-full cursor-pointer"
2741
- }
2742
- )
2743
- ] });
2744
- }, fr = ({
2745
- id: e,
2746
- value: t,
2747
- required: r,
2748
- disabled: o,
2749
- readonly: n,
2750
- label: s,
2751
- onChange: a,
2752
- onBlur: i,
2753
- onFocus: l,
2754
- options: d,
2755
- schema: u
2756
- }) => {
2757
- const c = d.inputType || "date", m = q(e, u), y = async (f) => {
2758
- const g = f.target.value;
2759
- a(g), await m.onChange(g);
2760
- }, v = async (f) => {
2761
- const g = f.target.value;
2762
- i && i(e, g), await m.onBlur(g);
2763
- }, h = async (f) => {
2764
- const g = f.target.value;
2765
- l && l(e, g), await m.onFocus(g);
2766
- };
2767
- return /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2768
- /* @__PURE__ */ k(z, { htmlFor: e, children: [
2769
- s || u.title,
2770
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
2771
- ] }),
2772
- /* @__PURE__ */ p(
2773
- F,
2774
- {
2775
- id: e,
2776
- type: c,
2777
- value: t || "",
2778
- required: r,
2779
- disabled: o || n,
2780
- onChange: y,
2781
- onBlur: v,
2782
- onFocus: h,
2783
- min: typeof d.minDate == "string" || typeof d.minDate == "number" ? d.minDate : void 0,
2784
- max: typeof d.maxDate == "string" || typeof d.maxDate == "number" ? d.maxDate : void 0,
2785
- className: "w-full"
2786
- }
2787
- )
2788
- ] });
2789
- }, pr = me(
2790
- "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
2791
- {
2792
- variants: {
2793
- variant: {
2794
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
2795
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
2796
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
2797
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
2798
- ghost: "hover:bg-accent hover:text-accent-foreground",
2799
- link: "text-primary underline-offset-4 hover:underline"
2800
- },
2801
- size: {
2802
- default: "h-10 px-4 py-2",
2803
- sm: "h-9 rounded-md px-3",
2804
- lg: "h-11 rounded-md px-8",
2805
- icon: "h-10 w-10"
2806
- }
2807
- },
2808
- defaultVariants: {
2809
- variant: "default",
2810
- size: "default"
2811
- }
2812
- }
2813
- ), ie = b.forwardRef(
2814
- ({ className: e, variant: t, size: r, asChild: o = !1, ...n }, s) => /* @__PURE__ */ p(
2815
- o ? Qt : "button",
2816
- {
2817
- className: M(pr({ variant: t, size: r, className: e })),
2818
- ref: s,
2819
- ...n
2820
- }
2821
- )
2822
- );
2823
- ie.displayName = "Button";
2824
- const mr = me(
2825
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
2826
- {
2827
- variants: {
2828
- variant: {
2829
- default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
2830
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
2831
- destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
2832
- outline: "text-foreground"
2833
- }
2834
- },
2835
- defaultVariants: {
2836
- variant: "default"
2837
- }
2838
- }
2839
- );
2840
- function Se({ className: e, variant: t, ...r }) {
2841
- return /* @__PURE__ */ p("div", { className: M(mr({ variant: t }), e), ...r });
2842
- }
2843
- /**
2844
- * @license lucide-react v0.303.0 - ISC
2845
- *
2846
- * This source code is licensed under the ISC license.
2847
- * See the LICENSE file in the root directory of this source tree.
2848
- */
2849
- var hr = {
2850
- xmlns: "http://www.w3.org/2000/svg",
2851
- width: 24,
2852
- height: 24,
2853
- viewBox: "0 0 24 24",
2854
- fill: "none",
2855
- stroke: "currentColor",
2856
- strokeWidth: 2,
2857
- strokeLinecap: "round",
2858
- strokeLinejoin: "round"
2859
- };
2860
- /**
2861
- * @license lucide-react v0.303.0 - ISC
2862
- *
2863
- * This source code is licensed under the ISC license.
2864
- * See the LICENSE file in the root directory of this source tree.
2865
- */
2866
- const gr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim(), Oe = (e, t) => {
2867
- const r = ut(
2868
- ({ color: o = "currentColor", size: n = 24, strokeWidth: s = 2, absoluteStrokeWidth: a, className: i = "", children: l, ...d }, u) => be(
2869
- "svg",
2870
- {
2871
- ref: u,
2872
- ...hr,
2873
- width: n,
2874
- height: n,
2875
- stroke: o,
2876
- strokeWidth: a ? Number(s) * 24 / Number(n) : s,
2877
- className: ["lucide", `lucide-${gr(e)}`, i].join(" "),
2878
- ...d
2879
- },
2880
- [
2881
- ...t.map(([c, m]) => be(c, m)),
2882
- ...Array.isArray(l) ? l : [l]
2883
- ]
2884
- )
2885
- );
2886
- return r.displayName = `${e}`, r;
2887
- };
2888
- /**
2889
- * @license lucide-react v0.303.0 - ISC
2890
- *
2891
- * This source code is licensed under the ISC license.
2892
- * See the LICENSE file in the root directory of this source tree.
2893
- */
2894
- const br = Oe("Star", [
2895
- [
2896
- "polygon",
2897
- {
2898
- points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",
2899
- key: "8f66p6"
2900
- }
2901
- ]
2902
- ]);
2903
- /**
2904
- * @license lucide-react v0.303.0 - ISC
2905
- *
2906
- * This source code is licensed under the ISC license.
2907
- * See the LICENSE file in the root directory of this source tree.
2908
- */
2909
- const Ne = Oe("X", [
2910
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
2911
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
2912
- ]), yr = ({
2913
- id: e,
2914
- value: t,
2915
- required: r,
2916
- disabled: o,
2917
- readonly: n,
2918
- label: s,
2919
- onChange: a,
2920
- options: i,
2921
- schema: l
2922
- }) => {
2923
- const d = ke(null), u = i.accept || "*/*", c = i.multiple || !1, m = q(e, l), y = async (f) => {
2924
- const g = f.target.files;
2925
- if (!g) return;
2926
- let x;
2927
- if (c) {
2928
- const S = Array.from(g).map((w) => ({
2929
- name: w.name,
2930
- size: w.size,
2931
- type: w.type,
2932
- lastModified: w.lastModified
2933
- }));
2934
- x = S, a(S);
2935
- } else {
2936
- const S = g[0];
2937
- S && (x = {
2938
- name: S.name,
2939
- size: S.size,
2940
- type: S.type,
2941
- lastModified: S.lastModified
2942
- }, a(x));
2943
- }
2944
- x && await m.onChange(x);
2945
- }, v = async () => {
2946
- d.current && (d.current.value = ""), a(null), await m.onChange(null);
2947
- }, h = (f) => f < 1024 ? f + " B" : f < 1024 * 1024 ? (f / 1024).toFixed(1) + " KB" : (f / (1024 * 1024)).toFixed(1) + " MB";
2948
- return /* @__PURE__ */ k("div", { className: "space-y-2", children: [
2949
- /* @__PURE__ */ k(z, { htmlFor: e, children: [
2950
- s || l.title,
2951
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
2952
- ] }),
2953
- /* @__PURE__ */ p(
2954
- F,
2955
- {
2956
- ref: d,
2957
- id: e,
2958
- type: "file",
2959
- accept: u,
2960
- multiple: c,
2961
- required: r,
2962
- disabled: o || n,
2963
- onChange: y,
2964
- className: "cursor-pointer"
2965
- }
2966
- ),
2967
- t && /* @__PURE__ */ p("div", { className: "space-y-2", children: c && Array.isArray(t) ? /* @__PURE__ */ p("div", { className: "flex flex-wrap gap-2", children: t.map((f, g) => /* @__PURE__ */ k(Se, { variant: "secondary", className: "flex items-center gap-1 pr-1", children: [
2968
- /* @__PURE__ */ k("span", { className: "text-xs", children: [
2969
- f.name,
2970
- " (",
2971
- h(f.size),
2972
- ")"
2973
- ] }),
2974
- !o && !n && /* @__PURE__ */ p(
2975
- ie,
2976
- {
2977
- type: "button",
2978
- variant: "ghost",
2979
- size: "icon",
2980
- className: "h-4 w-4 p-0 hover:bg-transparent",
2981
- onClick: v,
2982
- children: /* @__PURE__ */ p(Ne, { className: "h-3 w-3" })
2983
- }
2984
- )
2985
- ] }, g)) }) : t && typeof t == "object" && "name" in t ? /* @__PURE__ */ k(Se, { variant: "secondary", className: "inline-flex items-center gap-1 pr-1", children: [
2986
- /* @__PURE__ */ k("span", { className: "text-xs", children: [
2987
- t.name,
2988
- " (",
2989
- h(t.size),
2990
- ")"
2991
- ] }),
2992
- !o && !n && /* @__PURE__ */ p(
2993
- ie,
2994
- {
2995
- type: "button",
2996
- variant: "ghost",
2997
- size: "icon",
2998
- className: "h-4 w-4 p-0 hover:bg-transparent",
2999
- onClick: v,
3000
- children: /* @__PURE__ */ p(Ne, { className: "h-3 w-3" })
3001
- }
3002
- )
3003
- ] }) : null })
3004
- ] });
3005
- };
3006
- function We(e, [t, r]) {
3007
- return Math.min(r, Math.max(t, e));
3008
- }
3009
- function J(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
3010
- return function(n) {
3011
- if (e == null || e(n), r === !1 || !n.defaultPrevented)
3012
- return t == null ? void 0 : t(n);
3013
- };
3014
- }
3015
- function je(e, t = []) {
3016
- let r = [];
3017
- function o(s, a) {
3018
- const i = b.createContext(a), l = r.length;
3019
- r = [...r, a];
3020
- const d = (c) => {
3021
- var g;
3022
- const { scope: m, children: y, ...v } = c, h = ((g = m == null ? void 0 : m[e]) == null ? void 0 : g[l]) || i, f = b.useMemo(() => v, Object.values(v));
3023
- return /* @__PURE__ */ p(h.Provider, { value: f, children: y });
3024
- };
3025
- d.displayName = s + "Provider";
3026
- function u(c, m) {
3027
- var h;
3028
- const y = ((h = m == null ? void 0 : m[e]) == null ? void 0 : h[l]) || i, v = b.useContext(y);
3029
- if (v) return v;
3030
- if (a !== void 0) return a;
3031
- throw new Error(`\`${c}\` must be used within \`${s}\``);
3032
- }
3033
- return [d, u];
3034
- }
3035
- const n = () => {
3036
- const s = r.map((a) => b.createContext(a));
3037
- return function(i) {
3038
- const l = (i == null ? void 0 : i[e]) || s;
3039
- return b.useMemo(
3040
- () => ({ [`__scope${e}`]: { ...i, [e]: l } }),
3041
- [i, l]
3042
- );
3043
- };
3044
- };
3045
- return n.scopeName = e, [o, vr(n, ...t)];
3046
- }
3047
- function vr(...e) {
3048
- const t = e[0];
3049
- if (e.length === 1) return t;
3050
- const r = () => {
3051
- const o = e.map((n) => ({
3052
- useScope: n(),
3053
- scopeName: n.scopeName
3054
- }));
3055
- return function(s) {
3056
- const a = o.reduce((i, { useScope: l, scopeName: d }) => {
3057
- const c = l(s)[`__scope${d}`];
3058
- return { ...i, ...c };
3059
- }, {});
3060
- return b.useMemo(() => ({ [`__scope${t.scopeName}`]: a }), [a]);
3061
- };
3062
- };
3063
- return r.scopeName = t.scopeName, r;
3064
- }
3065
- var De = globalThis != null && globalThis.document ? b.useLayoutEffect : () => {
3066
- }, xr = b[" useInsertionEffect ".trim().toString()] || De;
3067
- function wr({
3068
- prop: e,
3069
- defaultProp: t,
3070
- onChange: r = () => {
3071
- },
3072
- caller: o
3073
- }) {
3074
- const [n, s, a] = Cr({
3075
- defaultProp: t,
3076
- onChange: r
3077
- }), i = e !== void 0, l = i ? e : n;
3078
- {
3079
- const u = b.useRef(e !== void 0);
3080
- b.useEffect(() => {
3081
- const c = u.current;
3082
- c !== i && console.warn(
3083
- `${o} is changing from ${c ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
3084
- ), u.current = i;
3085
- }, [i, o]);
3086
- }
3087
- const d = b.useCallback(
3088
- (u) => {
3089
- var c;
3090
- if (i) {
3091
- const m = Sr(u) ? u(e) : u;
3092
- m !== e && ((c = a.current) == null || c.call(a, m));
3093
- } else
3094
- s(u);
3095
- },
3096
- [i, e, s, a]
3097
- );
3098
- return [l, d];
3099
- }
3100
- function Cr({
3101
- defaultProp: e,
3102
- onChange: t
3103
- }) {
3104
- const [r, o] = b.useState(e), n = b.useRef(r), s = b.useRef(t);
3105
- return xr(() => {
3106
- s.current = t;
3107
- }, [t]), b.useEffect(() => {
3108
- var a;
3109
- n.current !== r && ((a = s.current) == null || a.call(s, r), n.current = r);
3110
- }, [r, n]), [r, o, s];
3111
- }
3112
- function Sr(e) {
3113
- return typeof e == "function";
3114
- }
3115
- var Nr = b.createContext(void 0);
3116
- function kr(e) {
3117
- const t = b.useContext(Nr);
3118
- return e || t || "ltr";
3119
- }
3120
- function Rr(e) {
3121
- const t = b.useRef({ value: e, previous: e });
3122
- return b.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
3123
- }
3124
- function Pr(e) {
3125
- const [t, r] = b.useState(void 0);
3126
- return De(() => {
3127
- if (e) {
3128
- r({ width: e.offsetWidth, height: e.offsetHeight });
3129
- const o = new ResizeObserver((n) => {
3130
- if (!Array.isArray(n) || !n.length)
3131
- return;
3132
- const s = n[0];
3133
- let a, i;
3134
- if ("borderBoxSize" in s) {
3135
- const l = s.borderBoxSize, d = Array.isArray(l) ? l[0] : l;
3136
- a = d.inlineSize, i = d.blockSize;
3137
- } else
3138
- a = e.offsetWidth, i = e.offsetHeight;
3139
- r({ width: a, height: i });
3140
- });
3141
- return o.observe(e, { box: "border-box" }), () => o.unobserve(e);
3142
- } else
3143
- r(void 0);
3144
- }, [e]), t;
3145
- }
3146
- function Er(e) {
3147
- const t = e + "CollectionProvider", [r, o] = je(t), [n, s] = r(
3148
- t,
3149
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
3150
- ), a = (h) => {
3151
- const { scope: f, children: g } = h, x = G.useRef(null), S = G.useRef(/* @__PURE__ */ new Map()).current;
3152
- return /* @__PURE__ */ p(n, { scope: f, itemMap: S, collectionRef: x, children: g });
3153
- };
3154
- a.displayName = t;
3155
- const i = e + "CollectionSlot", l = /* @__PURE__ */ se(i), d = G.forwardRef(
3156
- (h, f) => {
3157
- const { scope: g, children: x } = h, S = s(i, g), w = U(f, S.collectionRef);
3158
- return /* @__PURE__ */ p(l, { ref: w, children: x });
3159
- }
3160
- );
3161
- d.displayName = i;
3162
- const u = e + "CollectionItemSlot", c = "data-radix-collection-item", m = /* @__PURE__ */ se(u), y = G.forwardRef(
3163
- (h, f) => {
3164
- const { scope: g, children: x, ...S } = h, w = G.useRef(null), E = U(f, w), $ = s(u, g);
3165
- return G.useEffect(() => ($.itemMap.set(w, { ref: w, ...S }), () => void $.itemMap.delete(w))), /* @__PURE__ */ p(m, { [c]: "", ref: E, children: x });
3166
- }
3167
- );
3168
- y.displayName = u;
3169
- function v(h) {
3170
- const f = s(e + "CollectionConsumer", h);
3171
- return G.useCallback(() => {
3172
- const x = f.collectionRef.current;
3173
- if (!x) return [];
3174
- const S = Array.from(x.querySelectorAll(`[${c}]`));
3175
- return Array.from(f.itemMap.values()).sort(
3176
- ($, _) => S.indexOf($.ref.current) - S.indexOf(_.ref.current)
3177
- );
3178
- }, [f.collectionRef, f.itemMap]);
3179
- }
3180
- return [
3181
- { Provider: a, Slot: d, ItemSlot: y },
3182
- v,
3183
- o
3184
- ];
3185
- }
3186
- var Ge = ["PageUp", "PageDown"], Ue = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Ke = {
3187
- "from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
3188
- "from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
3189
- "from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
3190
- "from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
3191
- }, re = "Slider", [de, Ar, Mr] = Er(re), [Qe, co] = je(re, [
3192
- Mr
3193
- ]), [$r, ae] = Qe(re), qe = b.forwardRef(
3194
- (e, t) => {
3195
- const {
3196
- name: r,
3197
- min: o = 0,
3198
- max: n = 100,
3199
- step: s = 1,
3200
- orientation: a = "horizontal",
3201
- disabled: i = !1,
3202
- minStepsBetweenThumbs: l = 0,
3203
- defaultValue: d = [o],
3204
- value: u,
3205
- onValueChange: c = () => {
3206
- },
3207
- onValueCommit: m = () => {
3208
- },
3209
- inverted: y = !1,
3210
- form: v,
3211
- ...h
3212
- } = e, f = b.useRef(/* @__PURE__ */ new Set()), g = b.useRef(0), S = a === "horizontal" ? zr : Vr, [w = [], E] = wr({
3213
- prop: u,
3214
- defaultProp: d,
3215
- onChange: (P) => {
3216
- var I;
3217
- (I = [...f.current][g.current]) == null || I.focus(), c(P);
3218
- }
3219
- }), $ = b.useRef(w);
3220
- function _(P) {
3221
- const N = Br(w, P);
3222
- A(P, N);
3223
- }
3224
- function Y(P) {
3225
- A(P, g.current);
3226
- }
3227
- function K() {
3228
- const P = $.current[g.current];
3229
- w[g.current] !== P && m(w);
3230
- }
3231
- function A(P, N, { commit: I } = { commit: !1 }) {
3232
- const Q = Wr(s), X = jr(Math.round((P - o) / s) * s + o, Q), T = We(X, [o, n]);
3233
- E((B = []) => {
3234
- const V = Tr(B, T, N);
3235
- if (Or(V, l * s)) {
3236
- g.current = V.indexOf(T);
3237
- const O = String(V) !== String(B);
3238
- return O && I && m(V), O ? V : B;
3239
- } else
3240
- return B;
3241
- });
3242
- }
3243
- return /* @__PURE__ */ p(
3244
- $r,
3245
- {
3246
- scope: e.__scopeSlider,
3247
- name: r,
3248
- disabled: i,
3249
- min: o,
3250
- max: n,
3251
- valueIndexToChangeRef: g,
3252
- thumbs: f.current,
3253
- values: w,
3254
- orientation: a,
3255
- form: v,
3256
- children: /* @__PURE__ */ p(de.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ p(de.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ p(
3257
- S,
3258
- {
3259
- "aria-disabled": i,
3260
- "data-disabled": i ? "" : void 0,
3261
- ...h,
3262
- ref: t,
3263
- onPointerDown: J(h.onPointerDown, () => {
3264
- i || ($.current = w);
3265
- }),
3266
- min: o,
3267
- max: n,
3268
- inverted: y,
3269
- onSlideStart: i ? void 0 : _,
3270
- onSlideMove: i ? void 0 : Y,
3271
- onSlideEnd: i ? void 0 : K,
3272
- onHomeKeyDown: () => !i && A(o, 0, { commit: !0 }),
3273
- onEndKeyDown: () => !i && A(n, w.length - 1, { commit: !0 }),
3274
- onStepKeyDown: ({ event: P, direction: N }) => {
3275
- if (!i) {
3276
- const X = Ge.includes(P.key) || P.shiftKey && Ue.includes(P.key) ? 10 : 1, T = g.current, B = w[T], V = s * X * N;
3277
- A(B + V, T, { commit: !0 });
3278
- }
3279
- }
3280
- }
3281
- ) }) })
3282
- }
3283
- );
3284
- }
3285
- );
3286
- qe.displayName = re;
3287
- var [Ye, Xe] = Qe(re, {
3288
- startEdge: "left",
3289
- endEdge: "right",
3290
- size: "width",
3291
- direction: 1
3292
- }), zr = b.forwardRef(
3293
- (e, t) => {
3294
- const {
3295
- min: r,
3296
- max: o,
3297
- dir: n,
3298
- inverted: s,
3299
- onSlideStart: a,
3300
- onSlideMove: i,
3301
- onSlideEnd: l,
3302
- onStepKeyDown: d,
3303
- ...u
3304
- } = e, [c, m] = b.useState(null), y = U(t, (S) => m(S)), v = b.useRef(void 0), h = kr(n), f = h === "ltr", g = f && !s || !f && s;
3305
- function x(S) {
3306
- const w = v.current || c.getBoundingClientRect(), E = [0, w.width], _ = he(E, g ? [r, o] : [o, r]);
3307
- return v.current = w, _(S - w.left);
3308
- }
3309
- return /* @__PURE__ */ p(
3310
- Ye,
3311
- {
3312
- scope: e.__scopeSlider,
3313
- startEdge: g ? "left" : "right",
3314
- endEdge: g ? "right" : "left",
3315
- direction: g ? 1 : -1,
3316
- size: "width",
3317
- children: /* @__PURE__ */ p(
3318
- Je,
3319
- {
3320
- dir: h,
3321
- "data-orientation": "horizontal",
3322
- ...u,
3323
- ref: y,
3324
- style: {
3325
- ...u.style,
3326
- "--radix-slider-thumb-transform": "translateX(-50%)"
3327
- },
3328
- onSlideStart: (S) => {
3329
- const w = x(S.clientX);
3330
- a == null || a(w);
3331
- },
3332
- onSlideMove: (S) => {
3333
- const w = x(S.clientX);
3334
- i == null || i(w);
3335
- },
3336
- onSlideEnd: () => {
3337
- v.current = void 0, l == null || l();
3338
- },
3339
- onStepKeyDown: (S) => {
3340
- const E = Ke[g ? "from-left" : "from-right"].includes(S.key);
3341
- d == null || d({ event: S, direction: E ? -1 : 1 });
3342
- }
3343
- }
3344
- )
3345
- }
3346
- );
3347
- }
3348
- ), Vr = b.forwardRef(
3349
- (e, t) => {
3350
- const {
3351
- min: r,
3352
- max: o,
3353
- inverted: n,
3354
- onSlideStart: s,
3355
- onSlideMove: a,
3356
- onSlideEnd: i,
3357
- onStepKeyDown: l,
3358
- ...d
3359
- } = e, u = b.useRef(null), c = U(t, u), m = b.useRef(void 0), y = !n;
3360
- function v(h) {
3361
- const f = m.current || u.current.getBoundingClientRect(), g = [0, f.height], S = he(g, y ? [o, r] : [r, o]);
3362
- return m.current = f, S(h - f.top);
3363
- }
3364
- return /* @__PURE__ */ p(
3365
- Ye,
3366
- {
3367
- scope: e.__scopeSlider,
3368
- startEdge: y ? "bottom" : "top",
3369
- endEdge: y ? "top" : "bottom",
3370
- size: "height",
3371
- direction: y ? 1 : -1,
3372
- children: /* @__PURE__ */ p(
3373
- Je,
3374
- {
3375
- "data-orientation": "vertical",
3376
- ...d,
3377
- ref: c,
3378
- style: {
3379
- ...d.style,
3380
- "--radix-slider-thumb-transform": "translateY(50%)"
3381
- },
3382
- onSlideStart: (h) => {
3383
- const f = v(h.clientY);
3384
- s == null || s(f);
3385
- },
3386
- onSlideMove: (h) => {
3387
- const f = v(h.clientY);
3388
- a == null || a(f);
3389
- },
3390
- onSlideEnd: () => {
3391
- m.current = void 0, i == null || i();
3392
- },
3393
- onStepKeyDown: (h) => {
3394
- const g = Ke[y ? "from-bottom" : "from-top"].includes(h.key);
3395
- l == null || l({ event: h, direction: g ? -1 : 1 });
3396
- }
3397
- }
3398
- )
3399
- }
3400
- );
3401
- }
3402
- ), Je = b.forwardRef(
3403
- (e, t) => {
3404
- const {
3405
- __scopeSlider: r,
3406
- onSlideStart: o,
3407
- onSlideMove: n,
3408
- onSlideEnd: s,
3409
- onHomeKeyDown: a,
3410
- onEndKeyDown: i,
3411
- onStepKeyDown: l,
3412
- ...d
3413
- } = e, u = ae(re, r);
3414
- return /* @__PURE__ */ p(
3415
- te.span,
3416
- {
3417
- ...d,
3418
- ref: t,
3419
- onKeyDown: J(e.onKeyDown, (c) => {
3420
- c.key === "Home" ? (a(c), c.preventDefault()) : c.key === "End" ? (i(c), c.preventDefault()) : Ge.concat(Ue).includes(c.key) && (l(c), c.preventDefault());
3421
- }),
3422
- onPointerDown: J(e.onPointerDown, (c) => {
3423
- const m = c.target;
3424
- m.setPointerCapture(c.pointerId), c.preventDefault(), u.thumbs.has(m) ? m.focus() : o(c);
3425
- }),
3426
- onPointerMove: J(e.onPointerMove, (c) => {
3427
- c.target.hasPointerCapture(c.pointerId) && n(c);
3428
- }),
3429
- onPointerUp: J(e.onPointerUp, (c) => {
3430
- const m = c.target;
3431
- m.hasPointerCapture(c.pointerId) && (m.releasePointerCapture(c.pointerId), s(c));
3432
- })
3433
- }
3434
- );
3435
- }
3436
- ), Ze = "SliderTrack", et = b.forwardRef(
3437
- (e, t) => {
3438
- const { __scopeSlider: r, ...o } = e, n = ae(Ze, r);
3439
- return /* @__PURE__ */ p(
3440
- te.span,
3441
- {
3442
- "data-disabled": n.disabled ? "" : void 0,
3443
- "data-orientation": n.orientation,
3444
- ...o,
3445
- ref: t
3446
- }
3447
- );
3448
- }
3449
- );
3450
- et.displayName = Ze;
3451
- var ue = "SliderRange", tt = b.forwardRef(
3452
- (e, t) => {
3453
- const { __scopeSlider: r, ...o } = e, n = ae(ue, r), s = Xe(ue, r), a = b.useRef(null), i = U(t, a), l = n.values.length, d = n.values.map(
3454
- (m) => nt(m, n.min, n.max)
3455
- ), u = l > 1 ? Math.min(...d) : 0, c = 100 - Math.max(...d);
3456
- return /* @__PURE__ */ p(
3457
- te.span,
3458
- {
3459
- "data-orientation": n.orientation,
3460
- "data-disabled": n.disabled ? "" : void 0,
3461
- ...o,
3462
- ref: i,
3463
- style: {
3464
- ...e.style,
3465
- [s.startEdge]: u + "%",
3466
- [s.endEdge]: c + "%"
3467
- }
3468
- }
3469
- );
3470
- }
3471
- );
3472
- tt.displayName = ue;
3473
- var fe = "SliderThumb", rt = b.forwardRef(
3474
- (e, t) => {
3475
- const r = Ar(e.__scopeSlider), [o, n] = b.useState(null), s = U(t, (i) => n(i)), a = b.useMemo(
3476
- () => o ? r().findIndex((i) => i.ref.current === o) : -1,
3477
- [r, o]
3478
- );
3479
- return /* @__PURE__ */ p(Fr, { ...e, ref: s, index: a });
3480
- }
3481
- ), Fr = b.forwardRef(
3482
- (e, t) => {
3483
- const { __scopeSlider: r, index: o, name: n, ...s } = e, a = ae(fe, r), i = Xe(fe, r), [l, d] = b.useState(null), u = U(t, (x) => d(x)), c = l ? a.form || !!l.closest("form") : !0, m = Pr(l), y = a.values[o], v = y === void 0 ? 0 : nt(y, a.min, a.max), h = Ir(o, a.values.length), f = m == null ? void 0 : m[i.size], g = f ? Lr(f, v, i.direction) : 0;
3484
- return b.useEffect(() => {
3485
- if (l)
3486
- return a.thumbs.add(l), () => {
3487
- a.thumbs.delete(l);
3488
- };
3489
- }, [l, a.thumbs]), /* @__PURE__ */ k(
3490
- "span",
3491
- {
3492
- style: {
3493
- transform: "var(--radix-slider-thumb-transform)",
3494
- position: "absolute",
3495
- [i.startEdge]: `calc(${v}% + ${g}px)`
3496
- },
3497
- children: [
3498
- /* @__PURE__ */ p(de.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ p(
3499
- te.span,
3500
- {
3501
- role: "slider",
3502
- "aria-label": e["aria-label"] || h,
3503
- "aria-valuemin": a.min,
3504
- "aria-valuenow": y,
3505
- "aria-valuemax": a.max,
3506
- "aria-orientation": a.orientation,
3507
- "data-orientation": a.orientation,
3508
- "data-disabled": a.disabled ? "" : void 0,
3509
- tabIndex: a.disabled ? void 0 : 0,
3510
- ...s,
3511
- ref: u,
3512
- style: y === void 0 ? { display: "none" } : e.style,
3513
- onFocus: J(e.onFocus, () => {
3514
- a.valueIndexToChangeRef.current = o;
3515
- })
3516
- }
3517
- ) }),
3518
- c && /* @__PURE__ */ p(
3519
- ot,
3520
- {
3521
- name: n ?? (a.name ? a.name + (a.values.length > 1 ? "[]" : "") : void 0),
3522
- form: a.form,
3523
- value: y
3524
- },
3525
- o
3526
- )
3527
- ]
3528
- }
3529
- );
3530
- }
3531
- );
3532
- rt.displayName = fe;
3533
- var _r = "RadioBubbleInput", ot = b.forwardRef(
3534
- ({ __scopeSlider: e, value: t, ...r }, o) => {
3535
- const n = b.useRef(null), s = U(n, o), a = Rr(t);
3536
- return b.useEffect(() => {
3537
- const i = n.current;
3538
- if (!i) return;
3539
- const l = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(l, "value").set;
3540
- if (a !== t && u) {
3541
- const c = new Event("input", { bubbles: !0 });
3542
- u.call(i, t), i.dispatchEvent(c);
3543
- }
3544
- }, [a, t]), /* @__PURE__ */ p(
3545
- te.input,
3546
- {
3547
- style: { display: "none" },
3548
- ...r,
3549
- ref: s,
3550
- defaultValue: t
3551
- }
3552
- );
3553
- }
3554
- );
3555
- ot.displayName = _r;
3556
- function Tr(e = [], t, r) {
3557
- const o = [...e];
3558
- return o[r] = t, o.sort((n, s) => n - s);
3559
- }
3560
- function nt(e, t, r) {
3561
- const s = 100 / (r - t) * (e - t);
3562
- return We(s, [0, 100]);
3563
- }
3564
- function Ir(e, t) {
3565
- return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
3566
- }
3567
- function Br(e, t) {
3568
- if (e.length === 1) return 0;
3569
- const r = e.map((n) => Math.abs(n - t)), o = Math.min(...r);
3570
- return r.indexOf(o);
3571
- }
3572
- function Lr(e, t, r) {
3573
- const o = e / 2, s = he([0, 50], [0, o]);
3574
- return (o - s(t) * r) * r;
3575
- }
3576
- function Hr(e) {
3577
- return e.slice(0, -1).map((t, r) => e[r + 1] - t);
3578
- }
3579
- function Or(e, t) {
3580
- if (t > 0) {
3581
- const r = Hr(e);
3582
- return Math.min(...r) >= t;
3583
- }
3584
- return !0;
3585
- }
3586
- function he(e, t) {
3587
- return (r) => {
3588
- if (e[0] === e[1] || t[0] === t[1]) return t[0];
3589
- const o = (t[1] - t[0]) / (e[1] - e[0]);
3590
- return t[0] + o * (r - e[0]);
3591
- };
3592
- }
3593
- function Wr(e) {
3594
- return (String(e).split(".")[1] || "").length;
3595
- }
3596
- function jr(e, t) {
3597
- const r = Math.pow(10, t);
3598
- return Math.round(e * r) / r;
3599
- }
3600
- var st = qe, Dr = et, Gr = tt, Ur = rt;
3601
- const it = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ k(
3602
- st,
3603
- {
3604
- ref: r,
3605
- className: M(
3606
- "relative flex w-full touch-none select-none items-center",
3607
- e
3608
- ),
3609
- ...t,
3610
- children: [
3611
- /* @__PURE__ */ p(Dr, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ p(Gr, { className: "absolute h-full bg-primary" }) }),
3612
- /* @__PURE__ */ p(Ur, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
3613
- ]
3614
- }
3615
- ));
3616
- it.displayName = st.displayName;
3617
- const Kr = ({
3618
- id: e,
3619
- value: t,
3620
- required: r,
3621
- disabled: o,
3622
- readonly: n,
3623
- label: s,
3624
- onChange: a,
3625
- onBlur: i,
3626
- schema: l
3627
- }) => {
3628
- const d = l.minimum || 0, u = l.maximum || 100, c = l.multipleOf || 1, m = q(e, l), y = async (v) => {
3629
- const h = v[0];
3630
- a(h), i && i(e, h), await m.onChange(h);
3631
- };
3632
- return /* @__PURE__ */ k("div", { className: "space-y-2", children: [
3633
- /* @__PURE__ */ k("div", { className: "flex items-center justify-between", children: [
3634
- /* @__PURE__ */ k(z, { htmlFor: e, children: [
3635
- s || l.title,
3636
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
3637
- ] }),
3638
- /* @__PURE__ */ p("span", { className: "text-sm font-medium tabular-nums", children: t || d })
3639
- ] }),
3640
- /* @__PURE__ */ p(
3641
- it,
3642
- {
3643
- id: e,
3644
- min: d,
3645
- max: u,
3646
- step: c,
3647
- value: [t || d],
3648
- onValueChange: y,
3649
- disabled: o || n,
3650
- className: "w-full"
3651
- }
3652
- )
3653
- ] });
3654
- }, Qr = ({
3655
- id: e,
3656
- value: t,
3657
- required: r,
3658
- disabled: o,
3659
- readonly: n,
3660
- label: s,
3661
- onChange: a,
3662
- options: i,
3663
- schema: l
3664
- }) => {
3665
- const d = Number(i.max || l.maximum || 5), u = Array.from({ length: d }, (y, v) => v + 1), c = q(e, l), m = async (y) => {
3666
- !o && !n && (a(y), await c.onChange(y));
3667
- };
3668
- return /* @__PURE__ */ k("div", { className: "space-y-2", children: [
3669
- /* @__PURE__ */ k(z, { htmlFor: e, children: [
3670
- s || l.title,
3671
- r && /* @__PURE__ */ p("span", { className: "text-destructive ml-1", children: "*" })
3672
- ] }),
3673
- /* @__PURE__ */ p("div", { className: "flex items-center gap-1", role: "radiogroup", "aria-labelledby": e, children: u.map((y) => /* @__PURE__ */ p(
3674
- ie,
3675
- {
3676
- type: "button",
3677
- variant: "ghost",
3678
- size: "icon",
3679
- className: M(
3680
- "h-8 w-8 p-0 hover:bg-transparent",
3681
- o || n ? "cursor-not-allowed opacity-50" : "cursor-pointer"
3682
- ),
3683
- onClick: () => m(y),
3684
- disabled: o || n,
3685
- "aria-label": `Rate ${y} out of ${d}`,
3686
- role: "radio",
3687
- "aria-checked": y === t,
3688
- children: /* @__PURE__ */ p(
3689
- br,
3690
- {
3691
- className: M(
3692
- "h-5 w-5 transition-colors",
3693
- y <= (t || 0) ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground"
3694
- )
3695
- }
3696
- )
3697
- },
3698
- y
3699
- )) })
3700
- ] });
3701
- }, qr = {
3702
- color: ur,
3703
- date: fr,
3704
- file: yr,
3705
- range: Kr,
3706
- rating: Qr
3707
- }, Yr = {
3708
- small: "space-y-2",
3709
- medium: "space-y-4",
3710
- large: "space-y-6"
3711
- }, uo = ({
3712
- children: e,
3713
- spacing: t = "medium",
3714
- className: r = ""
3715
- }) => /* @__PURE__ */ p("div", { className: M("flex flex-col", Yr[t], r), children: e }), Xr = {
3716
- small: "space-x-2",
3717
- medium: "space-x-4",
3718
- large: "space-x-6"
3719
- }, Jr = {
3720
- start: "items-start",
3721
- center: "items-center",
3722
- end: "items-end",
3723
- stretch: "items-stretch"
3724
- }, fo = ({
3725
- children: e,
3726
- spacing: t = "medium",
3727
- align: r = "center",
3728
- className: o = ""
3729
- }) => /* @__PURE__ */ p("div", { className: M("flex flex-row", Xr[t], Jr[r], o), children: e }), Zr = {
3730
- small: "gap-2",
3731
- medium: "gap-4",
3732
- large: "gap-6"
3733
- }, po = ({
3734
- children: e,
3735
- columns: t = "auto-fit",
3736
- gap: r = "medium",
3737
- minItemWidth: o = "250px",
3738
- className: n = ""
3739
- }) => {
3740
- const s = {
3741
- display: "grid"
3742
- };
3743
- return typeof t == "number" ? s.gridTemplateColumns = `repeat(${t}, 1fr)` : s.gridTemplateColumns = `repeat(${t}, minmax(${o}, 1fr))`, /* @__PURE__ */ p("div", { className: M("grid", Zr[r], n), style: s, children: e });
3744
- };
3745
- class mo {
3746
- constructor(t) {
3747
- W(this, "handlers");
3748
- this.handlers = t;
3749
- }
3750
- async handleBeforeSubmit(t) {
3751
- return this.handlers.beforeSubmit ? await this.handlers.beforeSubmit(t) : t;
3752
- }
3753
- async handleAfterSubmit(t) {
3754
- this.handlers.afterSubmit && await this.handlers.afterSubmit(t);
3755
- }
3756
- async handleBeforeValidation(t) {
3757
- return this.handlers.beforeValidation ? await this.handlers.beforeValidation(t) : t;
3758
- }
3759
- async handleAfterValidation(t, r) {
3760
- this.handlers.afterValidation && await this.handlers.afterValidation(t, r);
3761
- }
3762
- }
3763
- class eo {
3764
- constructor(t, r = {}, o = []) {
3765
- W(this, "formHandlers");
3766
- W(this, "fieldHandlers");
3767
- W(this, "webhooks");
3768
- W(this, "debounceTimers", /* @__PURE__ */ new Map());
3769
- W(this, "webhookQueue", []);
3770
- W(this, "isProcessingQueue", !1);
3771
- this.formHandlers = t, this.fieldHandlers = r, this.webhooks = o;
3772
- }
3773
- // Existing form-level event handlers
3774
- async handleBeforeSubmit(t) {
3775
- return this.formHandlers.beforeSubmit ? await this.formHandlers.beforeSubmit(t) : t;
3776
- }
3777
- async handleAfterSubmit(t) {
3778
- this.formHandlers.afterSubmit && await this.formHandlers.afterSubmit(t);
3779
- }
3780
- async handleBeforeValidation(t) {
3781
- return this.formHandlers.beforeValidation ? await this.formHandlers.beforeValidation(t) : t;
3782
- }
3783
- async handleAfterValidation(t, r) {
3784
- this.formHandlers.afterValidation && await this.formHandlers.afterValidation(t, r);
3785
- }
3786
- // New field-level event handlers
3787
- async handleFieldEvent(t, r, o, n, s, a) {
3788
- const i = {
3789
- eventType: t,
3790
- fieldId: r,
3791
- fieldValue: o,
3792
- schema: n,
3793
- formData: s,
3794
- timestamp: Date.now(),
3795
- fieldPath: a
3796
- };
3797
- try {
3798
- switch (t) {
3799
- case "focus":
3800
- this.fieldHandlers.onFieldFocus && await this.fieldHandlers.onFieldFocus(i);
3801
- break;
3802
- case "blur":
3803
- this.fieldHandlers.onFieldBlur && await this.fieldHandlers.onFieldBlur(i);
3804
- break;
3805
- case "change":
3806
- this.fieldHandlers.onFieldChange && await this.fieldHandlers.onFieldChange(i);
3807
- break;
3808
- }
3809
- } catch (l) {
3810
- console.error(`Error in field event handler (${t}):`, l);
3811
- }
3812
- this.processWebhooks(i);
3813
- }
3814
- processWebhooks(t) {
3815
- const r = this.webhooks.filter(
3816
- (o) => !o.events || o.events.includes(t.eventType)
3817
- );
3818
- for (const o of r)
3819
- o.debounceMs && o.debounceMs > 0 ? this.debounceWebhook(o, t) : this.queueWebhook(o, t);
3820
- }
3821
- debounceWebhook(t, r) {
3822
- const o = `${t.url}-${r.fieldId}-${r.eventType}`;
3823
- this.debounceTimers.has(o) && clearTimeout(this.debounceTimers.get(o));
3824
- const n = setTimeout(() => {
3825
- this.queueWebhook(t, r), this.debounceTimers.delete(o);
3826
- }, t.debounceMs);
3827
- this.debounceTimers.set(o, n);
3828
- }
3829
- queueWebhook(t, r) {
3830
- this.webhookQueue.push({
3831
- config: t,
3832
- event: r,
3833
- retryCount: 0
3834
- }), this.isProcessingQueue || this.processWebhookQueue();
3835
- }
3836
- async processWebhookQueue() {
3837
- if (!(this.isProcessingQueue || this.webhookQueue.length === 0)) {
3838
- for (this.isProcessingQueue = !0; this.webhookQueue.length > 0; ) {
3839
- const t = this.webhookQueue.shift();
3840
- try {
3841
- await this.callWebhook(t.config, t.event);
3842
- } catch (r) {
3843
- const o = t.config.retries || 3;
3844
- t.retryCount < o ? (t.retryCount++, setTimeout(() => {
3845
- this.webhookQueue.push(t);
3846
- }, Math.pow(2, t.retryCount) * 1e3)) : console.error(`Webhook failed after ${o} retries:`, r);
3847
- }
3848
- }
3849
- this.isProcessingQueue = !1;
3850
- }
3851
- }
3852
- async callWebhook(t, r) {
3853
- const o = {
3854
- event: r,
3855
- timestamp: Date.now(),
3856
- source: "extended-dynamic-forms"
3857
- }, n = {
3858
- method: t.method || "POST",
3859
- headers: {
3860
- "Content-Type": "application/json",
3861
- ...t.headers
3862
- },
3863
- body: JSON.stringify(o)
3864
- };
3865
- t.timeout && (n.signal = AbortSignal.timeout(t.timeout));
3866
- const s = await fetch(t.url, n);
3867
- if (!s.ok)
3868
- throw new Error(`Webhook request failed: ${s.status} ${s.statusText}`);
3869
- }
3870
- // Helper method to create bound event handlers for widgets
3871
- createFieldEventHandlers(t, r, o, n) {
3872
- return {
3873
- onFocus: (s) => this.handleFieldEvent("focus", t, s, r, o, n),
3874
- onBlur: (s) => this.handleFieldEvent("blur", t, s, r, o, n),
3875
- onChange: (s) => this.handleFieldEvent("change", t, s, r, o, n)
3876
- };
3877
- }
3878
- // Cleanup method to clear timers
3879
- cleanup() {
3880
- for (const t of this.debounceTimers.values())
3881
- clearTimeout(t);
3882
- this.debounceTimers.clear();
3883
- }
3884
- }
3885
- const to = {
3886
- /**
3887
- * Deep clone form data to avoid mutations
3888
- */
3889
- cloneFormData: (e) => JSON.parse(JSON.stringify(e)),
3890
- /**
3891
- * Merge two form data objects
3892
- */
3893
- mergeFormData: (e, t) => ({ ...e, ...t }),
3894
- /**
3895
- * Get nested value from form data using dot notation
3896
- */
3897
- getNestedValue: (e, t) => {
3898
- const r = t.split(".");
3899
- let o = e;
3900
- for (const n of r)
3901
- if (o && typeof o == "object" && n in o)
3902
- o = o[n];
3903
- else
3904
- return;
3905
- return o;
3906
- },
3907
- /**
3908
- * Set nested value in form data using dot notation
3909
- */
3910
- setNestedValue: (e, t, r) => {
3911
- const o = t.split("."), n = { ...e };
3912
- let s = n;
3913
- for (let a = 0; a < o.length - 1; a++) {
3914
- const i = o[a];
3915
- (!(i in s) || typeof s[i] != "object") && (s[i] = {}), s = s[i];
3916
- }
3917
- return s[o[o.length - 1]] = r, n;
3918
- },
3919
- /**
3920
- * Remove empty values from form data
3921
- */
3922
- removeEmptyValues: (e) => {
3923
- if (Array.isArray(e))
3924
- return e.filter((t) => t != null && t !== "");
3925
- if (e !== null && typeof e == "object") {
3926
- const t = {};
3927
- for (const [r, o] of Object.entries(e))
3928
- o != null && o !== "" && (t[r] = to.removeEmptyValues(o));
3929
- return t;
3930
- }
3931
- return e;
3932
- }
3933
- }, ro = {
3934
- /**
3935
- * Get required fields from schema
3936
- */
3937
- getRequiredFields: (e) => e.required || [],
3938
- /**
3939
- * Check if a field is required
3940
- */
3941
- isFieldRequired: (e, t) => (e.required || []).includes(t),
3942
- /**
3943
- * Get field schema by path
3944
- */
3945
- getFieldSchema: (e, t) => {
3946
- const r = t.split(".");
3947
- let o = e;
3948
- for (const n of r)
3949
- if (o.type === "object" && o.properties)
3950
- o = o.properties[n];
3951
- else if (o.type === "array" && o.items)
3952
- o = o.items;
3953
- else
3954
- return;
3955
- return o;
3956
- },
3957
- /**
3958
- * Merge two schemas
3959
- */
3960
- mergeSchemas: (e, t) => ({
3961
- ...e,
3962
- ...t,
3963
- properties: {
3964
- ...e.properties,
3965
- ...t.properties
3966
- },
3967
- required: [.../* @__PURE__ */ new Set([...e.required || [], ...t.required || []])]
3968
- }),
3969
- /**
3970
- * Get all field paths from schema
3971
- */
3972
- getAllFieldPaths: (e, t = "") => {
3973
- const r = [];
3974
- if (e.type === "object" && e.properties)
3975
- for (const [o, n] of Object.entries(e.properties)) {
3976
- const s = t ? `${t}.${o}` : o;
3977
- r.push(s), r.push(...ro.getAllFieldPaths(n, s));
3978
- }
3979
- return r;
3980
- }
3981
- }, ho = {
3982
- /**
3983
- * Validate email format
3984
- */
3985
- isValidEmail: (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),
3986
- /**
3987
- * Validate phone number format
3988
- */
3989
- isValidPhone: (e) => /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(e),
3990
- /**
3991
- * Validate URL format
3992
- */
3993
- isValidUrl: (e) => {
3994
- try {
3995
- return new URL(e), !0;
3996
- } catch {
3997
- return !1;
3998
- }
3999
- },
4000
- /**
4001
- * Validate date format
4002
- */
4003
- isValidDate: (e) => {
4004
- const t = new Date(e);
4005
- return t instanceof Date && !isNaN(t.getTime());
4006
- },
4007
- /**
4008
- * Validate number in range
4009
- */
4010
- isInRange: (e, t, r) => !(t !== void 0 && e < t || r !== void 0 && e > r),
4011
- /**
4012
- * Custom validation messages
4013
- */
4014
- getValidationMessage: (e, t) => ({
4015
- required: "This field is required",
4016
- email: "Please enter a valid email address",
4017
- phone: "Please enter a valid phone number",
4018
- url: "Please enter a valid URL",
4019
- date: "Please enter a valid date",
4020
- min: `Value must be at least ${t == null ? void 0 : t.min}`,
4021
- max: `Value must be at most ${t == null ? void 0 : t.max}`,
4022
- minLength: `Must be at least ${t == null ? void 0 : t.minLength} characters`,
4023
- maxLength: `Must be at most ${t == null ? void 0 : t.maxLength} characters`
4024
- })[e] || "Invalid value"
4025
- }, go = ({
4026
- schema: e,
4027
- uiSchema: t,
4028
- formData: r,
4029
- onSubmit: o,
4030
- onChange: n,
4031
- onError: s,
4032
- onBlur: a,
4033
- onFocus: i,
4034
- beforeSubmit: l,
4035
- afterSubmit: d,
4036
- beforeValidation: u,
4037
- afterValidation: c,
4038
- onFieldFocus: m,
4039
- onFieldBlur: y,
4040
- onFieldChange: v,
4041
- webhooks: h = [],
4042
- widgets: f = {},
4043
- fields: g = {},
4044
- templates: x = {},
4045
- ...S
4046
- }) => {
4047
- const w = ke(null), E = ft(() => {
4048
- const A = new eo(
4049
- {
4050
- beforeSubmit: l,
4051
- afterSubmit: d,
4052
- beforeValidation: u,
4053
- afterValidation: c
4054
- },
4055
- {
4056
- onFieldFocus: m,
4057
- onFieldBlur: y,
4058
- onFieldChange: v
4059
- },
4060
- h
4061
- );
4062
- return w.current = A, A;
4063
- }, [l, d, u, c, m, y, v, h]);
4064
- pt(() => () => {
4065
- w.current && w.current.cleanup();
4066
- }, []);
4067
- const $ = async (A, P) => {
4068
- const N = await E.handleBeforeSubmit(A);
4069
- o && await o(N, P), await E.handleAfterSubmit(N);
4070
- }, _ = (A) => {
4071
- n && n(A);
4072
- }, Y = {
4073
- ...qr,
4074
- ...f
4075
- }, K = {
4076
- ...dr,
4077
- ...g
4078
- };
4079
- return /* @__PURE__ */ p(ir, { eventHub: E, formData: r, children: /* @__PURE__ */ p(
4080
- ht,
4081
- {
4082
- schema: e,
4083
- uiSchema: t,
4084
- formData: r,
4085
- validator: mt,
4086
- onSubmit: $,
4087
- onChange: _,
4088
- onError: s,
4089
- onBlur: a,
4090
- onFocus: i,
4091
- widgets: Y,
4092
- fields: K,
4093
- templates: x,
4094
- ...S
4095
- }
4096
- ) });
4097
- };
4098
- export {
4099
- sr as AddressField,
4100
- ur as ColorWidget,
4101
- cr as CurrencyField,
4102
- fr as DateWidget,
4103
- go as ExtendedForm,
4104
- yr as FileWidget,
4105
- eo as FormEventHub,
4106
- mo as FormEventManager,
4107
- ir as FormEventProvider,
4108
- po as GridLayout,
4109
- fo as HorizontalLayout,
4110
- lr as PhoneField,
4111
- Kr as RangeWidget,
4112
- Qr as RatingWidget,
4113
- uo as VerticalLayout,
4114
- M as cn,
4115
- dr as customFields,
4116
- qr as customWidgets,
4117
- to as formDataUtils,
4118
- wo as generateTheme,
4119
- ro as schemaUtils,
4120
- q as useFieldEventHandlers,
4121
- ar as useFormEventHub,
4122
- ho as validationUtils,
4123
- vo as validator
4124
- };