@versini/sassysaint 5.3.5 → 5.3.6

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.
@@ -12,7 +12,7 @@ const re = (e, r) => {
12
12
  }, Ie = (e) => {
13
13
  window.localStorage.removeItem(e), le(e, null);
14
14
  }, ae = (e) => window.localStorage.getItem(e), Re = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
15
- function St({
15
+ function Ct({
16
16
  key: e,
17
17
  initialValue: r
18
18
  }) {
@@ -112,7 +112,7 @@ const _ = {
112
112
  location: $location,
113
113
  engine: $engine)
114
114
  }`
115
- }, Ct = {
115
+ }, At = {
116
116
  GET_LOCATION: {
117
117
  schema: _.GET_LOCATION,
118
118
  method: "location"
@@ -161,7 +161,7 @@ const _ = {
161
161
  query: e,
162
162
  variables: r
163
163
  })
164
- }), At = async ({
164
+ }), It = async ({
165
165
  accessToken: e,
166
166
  type: r,
167
167
  params: t = {}
@@ -186,7 +186,7 @@ const _ = {
186
186
  } catch (o) {
187
187
  return console.error(o), { status: 500, data: [] };
188
188
  }
189
- }, It = async ({
189
+ }, Rt = async ({
190
190
  accessToken: e,
191
191
  name: r,
192
192
  data: t,
@@ -204,13 +204,13 @@ const _ = {
204
204
  });
205
205
  };
206
206
  /*!
207
- @versini/ui-table v1.0.13
207
+ @versini/ui-table v1.1.0
208
208
  © 2024 gizmette.com
209
209
  */
210
210
  try {
211
211
  window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
212
- version: "1.0.13",
213
- buildTime: "10/06/2024 10:49 AM EDT",
212
+ version: "1.1.0",
213
+ buildTime: "11/19/2024 10:59 AM EST",
214
214
  homepage: "https://github.com/aversini/ui-components",
215
215
  license: "MIT"
216
216
  });
@@ -225,7 +225,7 @@ const Be = (e) => {
225
225
  (e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), r = t.join(" ");
226
226
  }
227
227
  return r;
228
- }, D = "thead", Y = "tfoot", T = "tbody", M = {
228
+ }, P = "thead", Y = "tfoot", T = "tbody", M = {
229
229
  ASC: "asc",
230
230
  DESC: "desc"
231
231
  }, He = ({
@@ -285,7 +285,7 @@ const Be = (e) => {
285
285
  mode: e,
286
286
  className: r,
287
287
  cellWrapper: t
288
- }) => t === D || t === Y ? l({
288
+ }) => t === P || t === Y ? l({
289
289
  "bg-table-head-dark": e === "dark",
290
290
  "bg-table-head-light": e === "light",
291
291
  "bg-table-head-dark dark:bg-table-head-light": e === "system",
@@ -309,10 +309,12 @@ const Be = (e) => {
309
309
  "text-copy-dark": a === "light",
310
310
  "text-copy-light dark:text-copy-dark": a === "system",
311
311
  "text-copy-dark dark:text-copy-light": a === "alt-system",
312
- "px-4 py-3": !t && (e === D || e === Y),
312
+ "px-4 py-3": !t && (e === P || e === Y),
313
313
  "p-4": !t && e === T,
314
314
  "px-4 py-1": t
315
- }), oe = "av-button", Oe = (e) => {
315
+ }), Oe = ({
316
+ buttonClassName: e
317
+ }) => l("rounded-none text-sm", e), oe = "av-button", ze = (e) => {
316
318
  let r = "";
317
319
  if (typeof e == "number" || typeof e == "string")
318
320
  r = "m-" + e;
@@ -321,7 +323,7 @@ const Be = (e) => {
321
323
  (e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), r = t.join(" ");
322
324
  }
323
325
  return r;
324
- }, ce = "icon", ze = "button", De = "link", Pe = ({
326
+ }, ce = "icon", Pe = "button", Fe = "link", Ge = ({
325
327
  type: e,
326
328
  size: r,
327
329
  labelRight: t,
@@ -330,13 +332,13 @@ const Be = (e) => {
330
332
  }) => {
331
333
  const n = "text-sm font-medium max-h-8 py-0", i = "text-base font-medium max-h-9 py-1", s = "text-lg font-medium max-h-12 py-2";
332
334
  switch (e) {
333
- case ze:
335
+ case Pe:
334
336
  return l("px-4", {
335
337
  [n]: r === "small",
336
338
  [i]: r === "medium",
337
339
  [s]: r === "large"
338
340
  });
339
- case De:
341
+ case Fe:
340
342
  return l("px-4 text-center", {
341
343
  [n]: r === "small",
342
344
  [i]: r === "medium",
@@ -355,7 +357,7 @@ const Be = (e) => {
355
357
  "h-12 px-4 text-lg font-medium": r === "large" && (t || a)
356
358
  });
357
359
  }
358
- }, Fe = ({
360
+ }, De = ({
359
361
  mode: e,
360
362
  noBackground: r,
361
363
  noTruncate: t,
@@ -387,7 +389,7 @@ const Be = (e) => {
387
389
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
388
390
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
389
391
  });
390
- }, Ge = ({
392
+ }, je = ({
391
393
  mode: e,
392
394
  disabled: r,
393
395
  variant: t
@@ -415,7 +417,7 @@ const Be = (e) => {
415
417
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
416
418
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
417
419
  });
418
- }, je = ({
420
+ }, We = ({
419
421
  mode: e,
420
422
  disabled: r,
421
423
  variant: t
@@ -443,7 +445,7 @@ const Be = (e) => {
443
445
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
444
446
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
445
447
  });
446
- }, We = ({
448
+ }, qe = ({
447
449
  mode: e,
448
450
  noBorder: r,
449
451
  variant: t
@@ -471,12 +473,12 @@ const Be = (e) => {
471
473
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
472
474
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
473
475
  });
474
- }, qe = ({ focusMode: e }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
476
+ }, Je = ({ focusMode: e }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
475
477
  "focus:outline-focus-dark": e === "dark",
476
478
  "focus:outline-focus-light": e === "light",
477
479
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
478
480
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
479
- }), Je = ({
481
+ }), Qe = ({
480
482
  type: e,
481
483
  className: r,
482
484
  raw: t,
@@ -486,28 +488,28 @@ const Be = (e) => {
486
488
  fullWidth: i,
487
489
  size: s,
488
490
  noBorder: d,
489
- labelRight: u,
490
- labelLeft: m,
491
- spacing: b,
491
+ labelRight: m,
492
+ labelLeft: u,
493
+ spacing: p,
492
494
  noBackground: g,
493
495
  variant: h,
494
- noTruncate: p,
496
+ noTruncate: b,
495
497
  align: x
496
498
  }) => (h || (h = "primary"), t ? l(oe, r) : l(
497
499
  oe,
498
500
  r,
499
- Oe(b),
500
- Fe({ mode: a, variant: h, noBackground: g, noTruncate: p }),
501
- Pe({ type: e, size: s, labelRight: u, labelLeft: m, align: x }),
502
- We({ mode: a, variant: h, noBorder: d }),
503
- qe({ focusMode: o }),
504
- Ge({ mode: a, variant: h, disabled: n }),
501
+ ze(p),
502
+ De({ mode: a, variant: h, noBackground: g, noTruncate: b }),
503
+ Ge({ type: e, size: s, labelRight: m, labelLeft: u, align: x }),
504
+ qe({ mode: a, variant: h, noBorder: d }),
505
+ Je({ focusMode: o }),
505
506
  je({ mode: a, variant: h, disabled: n }),
507
+ We({ mode: a, variant: h, disabled: n }),
506
508
  {
507
509
  "w-full": i,
508
510
  "disabled:cursor-not-allowed disabled:opacity-50": n
509
511
  }
510
- )), Qe = (e, r, t) => {
512
+ )), Ye = (e, r, t) => {
511
513
  var a;
512
514
  !r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
513
515
  }, de = z.forwardRef((e, r) => {
@@ -517,7 +519,7 @@ const Be = (e) => {
517
519
  {
518
520
  ref: r,
519
521
  onClick: (n) => {
520
- Qe(n, a, t);
522
+ Ye(n, a, t);
521
523
  },
522
524
  ...o
523
525
  }
@@ -525,13 +527,13 @@ const Be = (e) => {
525
527
  });
526
528
  de.displayName = "BaseButton";
527
529
  /*!
528
- @versini/ui-button v1.1.10
530
+ @versini/ui-button v1.1.11
529
531
  © 2024 gizmette.com
530
532
  */
531
533
  try {
532
534
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
533
- version: "1.1.10",
534
- buildTime: "10/06/2024 10:49 AM EDT",
535
+ version: "1.1.11",
536
+ buildTime: "11/19/2024 10:59 AM EST",
535
537
  homepage: "https://github.com/aversini/ui-components",
536
538
  license: "MIT"
537
539
  });
@@ -548,18 +550,18 @@ const ue = z.forwardRef(
548
550
  type: i = "button",
549
551
  raw: s = !1,
550
552
  noBorder: d = !1,
551
- "aria-label": u,
552
- label: m,
553
- size: b = "medium",
553
+ "aria-label": m,
554
+ label: u,
555
+ size: p = "medium",
554
556
  labelRight: g,
555
557
  labelLeft: h,
556
- spacing: p,
558
+ spacing: b,
557
559
  noBackground: x = !1,
558
560
  align: S = "center",
559
561
  active: B = !1,
560
562
  ...H
561
563
  }, L) => {
562
- const P = Je({
564
+ const F = Qe({
563
565
  type: ce,
564
566
  mode: t,
565
567
  focusMode: a,
@@ -568,18 +570,18 @@ const ue = z.forwardRef(
568
570
  raw: s,
569
571
  className: n,
570
572
  noBorder: d,
571
- size: b,
573
+ size: p,
572
574
  labelRight: g,
573
575
  labelLeft: h,
574
- spacing: p,
576
+ spacing: b,
575
577
  noBackground: x,
576
578
  align: S
577
- }), F = l({
579
+ }), G = l({
578
580
  "text-copy-accent-dark": t === "light" && !s,
579
581
  "text-copy-light": t === "dark" && !s,
580
582
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !s,
581
583
  "text-copy-light dark:text-copy-accent-dark": t === "system" && !s
582
- }), G = B ? l(
584
+ }), D = B ? l(
583
585
  "relative",
584
586
  "focus-within:static",
585
587
  "focus-within:after:border-transparent",
@@ -596,18 +598,18 @@ const ue = z.forwardRef(
596
598
  "after:border-table-light dark:after:border-table-dark": t === "alt-system"
597
599
  }
598
600
  ) : "";
599
- return /* @__PURE__ */ c("div", { className: G, children: /* @__PURE__ */ w(
601
+ return /* @__PURE__ */ c("div", { className: D, children: /* @__PURE__ */ w(
600
602
  de,
601
603
  {
602
604
  ref: L,
603
- className: P,
605
+ className: F,
604
606
  disabled: r,
605
607
  type: i,
606
- "aria-label": u || m,
608
+ "aria-label": m || u,
607
609
  ...H,
608
610
  children: [
609
611
  h && /* @__PURE__ */ c("span", { className: "pr-2", children: h }),
610
- /* @__PURE__ */ c("div", { className: F, children: e }),
612
+ /* @__PURE__ */ c("div", { className: G, children: e }),
611
613
  g && /* @__PURE__ */ c("span", { className: "pl-2", children: g })
612
614
  ]
613
615
  }
@@ -615,7 +617,7 @@ const ue = z.forwardRef(
615
617
  }
616
618
  );
617
619
  ue.displayName = "ButtonSort";
618
- const Ye = (e) => {
620
+ const Xe = (e) => {
619
621
  let r = "";
620
622
  if (typeof e == "number" || typeof e == "string")
621
623
  r = "m-" + e;
@@ -634,10 +636,10 @@ const Ye = (e) => {
634
636
  spacing: i,
635
637
  title: s,
636
638
  semantic: d = !1,
637
- ...u
639
+ ...m
638
640
  }) => {
639
- const m = Ye(i), b = l(
640
- m,
641
+ const u = Xe(i), p = l(
642
+ u,
641
643
  a || n
642
644
  );
643
645
  return /* @__PURE__ */ w(Ae, { children: [
@@ -645,13 +647,13 @@ const Ye = (e) => {
645
647
  "svg",
646
648
  {
647
649
  xmlns: "http://www.w3.org/2000/svg",
648
- className: b,
650
+ className: p,
649
651
  viewBox: t || o,
650
652
  fill: r || "currentColor",
651
653
  role: "img",
652
654
  "aria-hidden": !d,
653
655
  focusable: !1,
654
- ...u,
656
+ ...m,
655
657
  children: e
656
658
  }
657
659
  ),
@@ -659,19 +661,19 @@ const Ye = (e) => {
659
661
  ] });
660
662
  };
661
663
  /*!
662
- @versini/ui-private v1.4.17
664
+ @versini/ui-private v1.4.18
663
665
  © 2024 gizmette.com
664
666
  */
665
667
  try {
666
668
  window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
667
- version: "1.4.17",
668
- buildTime: "10/06/2024 10:48 AM EDT",
669
+ version: "1.4.18",
670
+ buildTime: "11/19/2024 10:59 AM EST",
669
671
  homepage: "https://github.com/aversini/ui-components",
670
672
  license: "MIT"
671
673
  });
672
674
  } catch {
673
675
  }
674
- const Xe = ({
676
+ const Ke = ({
675
677
  className: e,
676
678
  viewBox: r,
677
679
  spacing: t,
@@ -699,7 +701,7 @@ const Xe = ({
699
701
  /* @__PURE__ */ c("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
700
702
  ]
701
703
  }
702
- ), Ke = ({
704
+ ), Ze = ({
703
705
  className: e,
704
706
  viewBox: r,
705
707
  spacing: t,
@@ -727,7 +729,7 @@ const Xe = ({
727
729
  /* @__PURE__ */ c("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
728
730
  ]
729
731
  }
730
- ), Ze = ({
732
+ ), et = ({
731
733
  className: e,
732
734
  viewBox: r,
733
735
  spacing: t,
@@ -757,13 +759,13 @@ const Xe = ({
757
759
  }
758
760
  );
759
761
  /*!
760
- @versini/ui-icons v1.15.1
762
+ @versini/ui-icons v1.15.2
761
763
  © 2024 gizmette.com
762
764
  */
763
765
  try {
764
766
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
765
- version: "1.15.1",
766
- buildTime: "10/06/2024 10:49 AM EDT",
767
+ version: "1.15.2",
768
+ buildTime: "11/19/2024 10:59 AM EST",
767
769
  homepage: "https://github.com/aversini/ui-components",
768
770
  license: "MIT"
769
771
  });
@@ -775,7 +777,7 @@ const N = z.createContext({
775
777
  stickyHeader: !1,
776
778
  stickyFooter: !1,
777
779
  compact: !1
778
- }), Rt = ({
780
+ }), $t = ({
779
781
  children: e,
780
782
  mode: r = "system",
781
783
  caption: t,
@@ -785,22 +787,22 @@ const N = z.createContext({
785
787
  wrapperClassName: i,
786
788
  maxHeight: s,
787
789
  stickyHeader: d,
788
- stickyFooter: u,
789
- spacing: m,
790
- ...b
790
+ stickyFooter: m,
791
+ spacing: u,
792
+ ...p
791
793
  }) => {
792
794
  const g = He({
793
795
  mode: r,
794
796
  className: n,
795
797
  wrapperClassName: i,
796
798
  stickyHeader: d,
797
- stickyFooter: u,
798
- spacing: m
799
+ stickyFooter: m,
800
+ spacing: u
799
801
  });
800
802
  return /* @__PURE__ */ c(
801
803
  N.Provider,
802
804
  {
803
- value: { mode: r, stickyHeader: d, stickyFooter: u, compact: a },
805
+ value: { mode: r, stickyHeader: d, stickyFooter: m, compact: a },
804
806
  children: /* @__PURE__ */ c(
805
807
  "div",
806
808
  {
@@ -808,7 +810,7 @@ const N = z.createContext({
808
810
  ...s && {
809
811
  style: { maxHeight: s }
810
812
  },
811
- children: /* @__PURE__ */ w("table", { className: g.table, summary: o, ...b, children: [
813
+ children: /* @__PURE__ */ w("table", { className: g.table, summary: o, ...p, children: [
812
814
  t && /* @__PURE__ */ c("caption", { className: g.caption, children: t }),
813
815
  e
814
816
  ] })
@@ -816,20 +818,20 @@ const N = z.createContext({
816
818
  )
817
819
  }
818
820
  );
819
- }, $t = ({
821
+ }, Bt = ({
820
822
  children: e,
821
823
  className: r,
822
824
  ...t
823
825
  }) => {
824
826
  const a = $(N);
825
- a.cellWrapper = D;
827
+ a.cellWrapper = P;
826
828
  const o = Le({
827
829
  className: r,
828
830
  mode: a.mode,
829
831
  stickyHeader: a.stickyHeader
830
832
  });
831
833
  return /* @__PURE__ */ c("thead", { className: o, ...t, children: e });
832
- }, Bt = ({
834
+ }, Ht = ({
833
835
  children: e,
834
836
  className: r,
835
837
  ...t
@@ -842,10 +844,10 @@ const N = z.createContext({
842
844
  stickyFooter: a.stickyFooter
843
845
  });
844
846
  return /* @__PURE__ */ c("tfoot", { className: o, ...t, children: e });
845
- }, Ht = ({ children: e, ...r }) => {
847
+ }, Lt = ({ children: e, ...r }) => {
846
848
  const t = $(N);
847
849
  return t.cellWrapper = T, /* @__PURE__ */ c("tbody", { ...r, children: e });
848
- }, Lt = ({
850
+ }, Ut = ({
849
851
  children: e,
850
852
  className: r,
851
853
  ...t
@@ -856,77 +858,81 @@ const N = z.createContext({
856
858
  className: r
857
859
  });
858
860
  return /* @__PURE__ */ c("tr", { className: o, ...t, children: e });
859
- }, et = ({
861
+ }, tt = ({
860
862
  children: e,
861
863
  component: r,
862
864
  className: t,
863
865
  ...a
864
866
  }) => {
865
- const o = $(N), n = r || (o.cellWrapper === D ? "th" : "td"), i = Me({
867
+ const o = $(N), n = r || (o.cellWrapper === P ? "th" : "td"), i = Me({
866
868
  cellWrapper: o.cellWrapper,
867
869
  className: t,
868
870
  mode: o.mode,
869
871
  compact: o.compact
870
872
  });
871
873
  return /* @__PURE__ */ c(n, { className: i, ...a, children: e });
872
- }, Ut = ({
874
+ }, Vt = ({
873
875
  align: e,
874
876
  children: r,
875
- className: t,
876
- component: a,
877
- focusMode: o = "alt-system",
878
- mode: n = "alt-system",
879
- onClick: i,
880
- sortDirection: s,
881
- sortedCell: d,
877
+ buttonClassName: t,
878
+ className: a,
879
+ component: o,
880
+ focusMode: n = "alt-system",
881
+ mode: i = "alt-system",
882
+ onClick: s,
883
+ sortDirection: d,
884
+ sortedCell: m,
882
885
  cellId: u,
883
- ...m
884
- }) => /* @__PURE__ */ c(
885
- et,
886
- {
887
- component: a,
888
- className: t,
889
- role: "columnheader",
890
- "aria-sort": s === M.ASC && d === u ? "ascending" : s === M.DESC && d === u ? "descending" : "other",
891
- ...m,
892
- children: /* @__PURE__ */ c(
893
- ue,
894
- {
895
- active: d === u,
896
- className: "rounded-none text-sm",
897
- onClick: i,
898
- align: e,
899
- noBorder: !0,
900
- focusMode: o,
901
- mode: n,
902
- fullWidth: !0,
903
- labelRight: r,
904
- children: s === M.ASC && d === u ? /* @__PURE__ */ c(Ze, { className: "size-4", monotone: !0 }) : s === M.DESC && d === u ? /* @__PURE__ */ c(Ke, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ c(Xe, { className: "size-4", monotone: !0 })
905
- }
906
- )
907
- }
908
- );
886
+ ...p
887
+ }) => {
888
+ const g = Oe({ buttonClassName: t });
889
+ return /* @__PURE__ */ c(
890
+ tt,
891
+ {
892
+ component: o,
893
+ className: a,
894
+ role: "columnheader",
895
+ "aria-sort": d === M.ASC && m === u ? "ascending" : d === M.DESC && m === u ? "descending" : "other",
896
+ ...p,
897
+ children: /* @__PURE__ */ c(
898
+ ue,
899
+ {
900
+ active: m === u,
901
+ className: g,
902
+ onClick: s,
903
+ align: e,
904
+ noBorder: !0,
905
+ focusMode: n,
906
+ mode: i,
907
+ fullWidth: !0,
908
+ labelRight: r,
909
+ children: d === M.ASC && m === u ? /* @__PURE__ */ c(et, { className: "size-4", monotone: !0 }) : d === M.DESC && m === u ? /* @__PURE__ */ c(Ze, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ c(Ke, { className: "size-4", monotone: !0 })
910
+ }
911
+ )
912
+ }
913
+ );
914
+ };
909
915
  /*!
910
- @versini/ui-textarea v1.0.8
916
+ @versini/ui-textarea v1.0.9
911
917
  © 2024 gizmette.com
912
918
  */
913
919
  try {
914
920
  window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
915
- version: "1.0.8",
916
- buildTime: "10/05/2024 07:22 PM EDT",
921
+ version: "1.0.9",
922
+ buildTime: "11/19/2024 10:59 AM EST",
917
923
  homepage: "https://github.com/aversini/ui-components",
918
924
  license: "MIT"
919
925
  });
920
926
  } catch {
921
927
  }
922
- const me = "av-text-area", tt = "av-text-area-wrapper", Q = "av-text-area-helper-text", rt = "av-text-area__control--right";
923
- function at() {
928
+ const me = "av-text-area", rt = "av-text-area-wrapper", Q = "av-text-area-helper-text", at = "av-text-area__control--right";
929
+ function ot() {
924
930
  const e = f(!1);
925
931
  return R(() => (e.current = !0, () => {
926
932
  e.current = !1;
927
933
  }), []), O(() => e.current, []);
928
934
  }
929
- function ot(e) {
935
+ function nt(e) {
930
936
  return ie(() => e.every((r) => r == null) ? () => {
931
937
  } : (r) => {
932
938
  e.forEach((t) => {
@@ -934,7 +940,7 @@ function ot(e) {
934
940
  });
935
941
  }, e);
936
942
  }
937
- const nt = {
943
+ const it = {
938
944
  x: 0,
939
945
  y: 0,
940
946
  width: 0,
@@ -944,8 +950,8 @@ const nt = {
944
950
  bottom: 0,
945
951
  right: 0
946
952
  };
947
- function it(e) {
948
- const r = at(), t = f(0), a = f(null), [o, n] = I(nt), i = ie(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
953
+ function lt(e) {
954
+ const r = ot(), t = f(0), a = f(null), [o, n] = I(it), i = ie(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
949
955
  const d = s[0];
950
956
  d && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
951
957
  a.current && r() && n(d.contentRect);
@@ -955,7 +961,7 @@ function it(e) {
955
961
  i == null || i.disconnect(), t.current && cancelAnimationFrame(t.current);
956
962
  }), [i, e]), [a, o];
957
963
  }
958
- function lt({
964
+ function st({
959
965
  value: e,
960
966
  defaultValue: r,
961
967
  finalValue: t,
@@ -965,16 +971,16 @@ function lt({
965
971
  }) {
966
972
  const [n, i] = I(!1), [s, d] = I(
967
973
  r !== void 0 ? r : t
968
- ), u = (m) => {
969
- d(m), a == null || a(m);
974
+ ), m = (u) => {
975
+ d(u), a == null || a(u);
970
976
  };
971
977
  return R(() => {
972
978
  (async () => e !== void 0 && !n && o > 0 && (await new Promise(
973
- (m) => setTimeout(m, o)
979
+ (u) => setTimeout(u, o)
974
980
  ), i(!0)))();
975
- }, [e, o, n]), e !== void 0 ? !n && o > 0 ? ["", a, !0] : [e, a, !0] : [s, u, !1];
981
+ }, [e, o, n]), e !== void 0 ? !n && o > 0 ? ["", a, !0] : [e, a, !0] : [s, m, !1];
976
982
  }
977
- function st(e) {
983
+ function ct(e) {
978
984
  const r = Se();
979
985
  if (!e)
980
986
  return r;
@@ -985,7 +991,7 @@ function st(e) {
985
991
  return typeof t == "number" || typeof t == "string" ? `${a}${t}` : `${a}${r}`;
986
992
  }
987
993
  }
988
- const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", ct = {
994
+ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", dt = {
989
995
  alert: null,
990
996
  alertdialog: null,
991
997
  log: "polite",
@@ -993,7 +999,7 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", ct = {
993
999
  progressbar: null,
994
1000
  status: "polite",
995
1001
  timer: "assertive"
996
- }, dt = (e, r) => {
1002
+ }, ut = (e, r) => {
997
1003
  switch (r == null ? void 0 : r.type) {
998
1004
  case he:
999
1005
  return {
@@ -1008,7 +1014,7 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", ct = {
1008
1014
  default:
1009
1015
  return e;
1010
1016
  }
1011
- }, ut = ({
1017
+ }, mt = ({
1012
1018
  onAnnouncementClear: e,
1013
1019
  dispatch: r
1014
1020
  }) => {
@@ -1026,13 +1032,13 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", ct = {
1026
1032
  type: he,
1027
1033
  payload: e
1028
1034
  }), r && (t.current = setTimeout(
1029
- () => ut({
1035
+ () => mt({
1030
1036
  onAnnouncementClear: a,
1031
1037
  dispatch: o
1032
1038
  }),
1033
1039
  r
1034
1040
  ));
1035
- }, mt = ({
1041
+ }, ht = ({
1036
1042
  children: e,
1037
1043
  announcementTimeoutRef: r,
1038
1044
  announcementDelay: t,
@@ -1055,7 +1061,7 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", ct = {
1055
1061
  dispatch: i
1056
1062
  });
1057
1063
  };
1058
- function ht({
1064
+ function gt({
1059
1065
  children: e,
1060
1066
  className: r,
1061
1067
  politeness: t,
@@ -1066,17 +1072,17 @@ function ht({
1066
1072
  visible: s,
1067
1073
  ...d
1068
1074
  }) {
1069
- const u = f(), m = f(), [b, g] = Ce(dt, {
1075
+ const m = f(), u = f(), [p, g] = Ce(ut, {
1070
1076
  announcement: null
1071
1077
  });
1072
1078
  let h = t;
1073
- typeof h > "u" && (h = a ? ct[a] : "assertive"), R(() => {
1074
- mt({
1075
- announcementTimeoutRef: u,
1079
+ typeof h > "u" && (h = a ? dt[a] : "assertive"), R(() => {
1080
+ ht({
1081
+ announcementTimeoutRef: m,
1076
1082
  announcementDelay: o,
1077
1083
  children: e,
1078
1084
  clearAnnouncementDelay: n,
1079
- clearAnnouncementTimeoutRef: m,
1085
+ clearAnnouncementTimeoutRef: u,
1080
1086
  onAnnouncementClear: i,
1081
1087
  dispatch: g
1082
1088
  });
@@ -1086,7 +1092,7 @@ function ht({
1086
1092
  n,
1087
1093
  i
1088
1094
  ]);
1089
- const p = l(r, {
1095
+ const b = l(r, {
1090
1096
  "sr-only": !s
1091
1097
  });
1092
1098
  return /* @__PURE__ */ c(
@@ -1094,13 +1100,13 @@ function ht({
1094
1100
  {
1095
1101
  "aria-live": h,
1096
1102
  ...a && { role: a },
1097
- className: p,
1103
+ className: b,
1098
1104
  ...d,
1099
- children: b.announcement
1105
+ children: p.announcement
1100
1106
  }
1101
1107
  );
1102
1108
  }
1103
- const gt = (e) => {
1109
+ const pt = (e) => {
1104
1110
  let r = "";
1105
1111
  if (typeof e == "number" || typeof e == "string")
1106
1112
  r = "m-" + e;
@@ -1111,33 +1117,33 @@ const gt = (e) => {
1111
1117
  return r;
1112
1118
  };
1113
1119
  /*!
1114
- @versini/ui-private v1.4.17
1120
+ @versini/ui-private v1.4.18
1115
1121
  © 2024 gizmette.com
1116
1122
  */
1117
1123
  try {
1118
1124
  window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
1119
- version: "1.4.17",
1120
- buildTime: "10/05/2024 07:22 PM EDT",
1125
+ version: "1.4.18",
1126
+ buildTime: "11/19/2024 10:59 AM EST",
1121
1127
  homepage: "https://github.com/aversini/ui-components",
1122
1128
  license: "MIT"
1123
1129
  });
1124
1130
  } catch {
1125
1131
  }
1126
- const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", bt = ({
1132
+ const bt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", yt = ({
1127
1133
  mode: e
1128
1134
  }) => l({
1129
1135
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
1130
1136
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
1131
1137
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
1132
1138
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
1133
- }), yt = ({
1139
+ }), ft = ({
1134
1140
  focusMode: e
1135
1141
  }) => l("focus:outline focus:outline-2 focus:outline-offset-2", {
1136
1142
  "focus:outline-focus-dark": e === "dark",
1137
1143
  "focus:outline-focus-light": e === "light",
1138
1144
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1139
1145
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1140
- }), ft = ({
1146
+ }), kt = ({
1141
1147
  noBorder: e,
1142
1148
  error: r
1143
1149
  }) => l("border-2", {
@@ -1145,7 +1151,7 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1145
1151
  "focus:border-border-dark": !e && r,
1146
1152
  "border-border-error-dark": !e && r,
1147
1153
  "border-transparent": e
1148
- }), kt = ({
1154
+ }), vt = ({
1149
1155
  disabled: e,
1150
1156
  raw: r,
1151
1157
  error: t,
@@ -1169,7 +1175,7 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1169
1175
  "text-copy-error-dark dark:text-copy-error-light": a === "system",
1170
1176
  "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
1171
1177
  });
1172
- }, vt = ({
1178
+ }, _t = ({
1173
1179
  error: e,
1174
1180
  raw: r,
1175
1181
  mode: t,
@@ -1196,7 +1202,7 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1196
1202
  "text-copy-error-dark dark:text-copy-error-light": t === "system",
1197
1203
  "dark:text-copy-error-dark text-copy-error-light": t === "alt-system"
1198
1204
  });
1199
- }, _t = ({
1205
+ }, xt = ({
1200
1206
  className: e,
1201
1207
  textAreaClassName: r,
1202
1208
  raw: t,
@@ -1207,44 +1213,44 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1207
1213
  spacing: s,
1208
1214
  mode: d
1209
1215
  }) => {
1210
- const u = t ? e : l(
1216
+ const m = t ? e : l(
1211
1217
  "relative flex w-full flex-col justify-center",
1212
- tt,
1218
+ rt,
1213
1219
  e,
1214
- gt(s)
1215
- ), m = t ? l(r) : l(
1220
+ pt(s)
1221
+ ), u = t ? l(r) : l(
1216
1222
  me,
1217
1223
  r,
1218
- pt(),
1219
- bt({ mode: d }),
1220
- yt({ focusMode: a }),
1221
- ft({
1224
+ bt(),
1225
+ yt({ mode: d }),
1226
+ ft({ focusMode: a }),
1227
+ kt({
1222
1228
  noBorder: n,
1223
1229
  error: i
1224
1230
  }),
1225
1231
  {
1226
1232
  "disabled:cursor-not-allowed disabled:opacity-50": o
1227
1233
  }
1228
- ), b = t ? void 0 : "sr-only", g = kt({
1234
+ ), p = t ? void 0 : "sr-only", g = vt({
1229
1235
  disabled: o,
1230
1236
  raw: t,
1231
1237
  error: i,
1232
1238
  mode: d
1233
- }), h = vt({
1239
+ }), h = _t({
1234
1240
  error: i,
1235
1241
  raw: t,
1236
1242
  mode: d,
1237
1243
  disabled: o
1238
- }), p = t ? void 0 : l(rt, "absolute");
1244
+ }), b = t ? void 0 : l(at, "absolute");
1239
1245
  return {
1240
- wrapper: u,
1241
- textArea: m,
1242
- accessibleLabel: b,
1246
+ wrapper: m,
1247
+ textArea: u,
1248
+ accessibleLabel: p,
1243
1249
  visibleLabel: g,
1244
1250
  helperText: h,
1245
- rightElement: p
1251
+ rightElement: b
1246
1252
  };
1247
- }, xt = ({
1253
+ }, wt = ({
1248
1254
  scrollHeight: e,
1249
1255
  currentHeight: r,
1250
1256
  currentLabelOffset: t = 0,
@@ -1260,7 +1266,7 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1260
1266
  helperTextOffset: n,
1261
1267
  scrollHeight: e
1262
1268
  };
1263
- }, wt = z.forwardRef(
1269
+ }, Et = z.forwardRef(
1264
1270
  ({
1265
1271
  id: e,
1266
1272
  name: r,
@@ -1271,36 +1277,36 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1271
1277
  textAreaClassName: i,
1272
1278
  mode: s = "system",
1273
1279
  focusMode: d = "system",
1274
- value: u,
1275
- defaultValue: m,
1276
- disabled: b = !1,
1280
+ value: m,
1281
+ defaultValue: u,
1282
+ disabled: p = !1,
1277
1283
  noBorder: g = !1,
1278
1284
  labelId: h,
1279
- helperText: p = "",
1285
+ helperText: b = "",
1280
1286
  helperTextOnFocus: x = !1,
1281
1287
  rightElement: S,
1282
1288
  onChange: B,
1283
1289
  onFocus: H,
1284
1290
  onBlur: L,
1285
- spacing: P,
1286
- ...F
1287
- }, G) => {
1288
- const k = f(null), pe = ot([G, k]), [be, U] = it(), j = f(80), K = f(-25), C = f(null), Z = f(30), W = f(null), A = st({ id: e, prefix: `${me}-` }), [ye, fe] = I(0), [ke, ee] = I(
1289
- !!(!x && p)
1290
- ), ve = `${r} error, ${p}`, E = _t({
1291
+ spacing: F,
1292
+ ...G
1293
+ }, D) => {
1294
+ const k = f(null), pe = nt([D, k]), [be, U] = lt(), j = f(80), K = f(-25), C = f(null), Z = f(30), W = f(null), A = ct({ id: e, prefix: `${me}-` }), [ye, fe] = I(0), [ke, ee] = I(
1295
+ !!(!x && b)
1296
+ ), ve = `${r} error, ${b}`, E = xt({
1291
1297
  className: n,
1292
1298
  textAreaClassName: i,
1293
1299
  error: a,
1294
1300
  raw: o,
1295
1301
  focusMode: d,
1296
- disabled: b,
1302
+ disabled: p,
1297
1303
  noBorder: g,
1298
- spacing: P,
1304
+ spacing: F,
1299
1305
  mode: s
1300
- }), [v, _e] = lt({
1301
- value: u,
1306
+ }), [v, _e] = st({
1307
+ value: m,
1302
1308
  initialControlledDelay: 20,
1303
- defaultValue: m,
1309
+ defaultValue: u,
1304
1310
  onChange: (y) => {
1305
1311
  B && B({
1306
1312
  target: {
@@ -1311,9 +1317,9 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1311
1317
  }), xe = (y) => {
1312
1318
  _e(y.target.value);
1313
1319
  }, we = (y) => {
1314
- x && p && ee(!0), H && H(y);
1320
+ x && b && ee(!0), H && H(y);
1315
1321
  }, Ee = (y) => {
1316
- x && p && !v && ee(!1), L && L(y);
1322
+ x && b && !v && ee(!1), L && L(y);
1317
1323
  };
1318
1324
  return V(() => {
1319
1325
  U && U.width && fe(U.width + 18 + 10);
@@ -1330,7 +1336,7 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1330
1336
  }, [v, o]), V(() => {
1331
1337
  var y, te;
1332
1338
  if (!o && k && k.current && v !== void 0) {
1333
- const { labelOffset: q, helperTextOffset: J, scrollHeight: Te } = xt({
1339
+ const { labelOffset: q, helperTextOffset: J, scrollHeight: Te } = wt({
1334
1340
  scrollHeight: k.current.scrollHeight,
1335
1341
  currentHeight: j.current,
1336
1342
  currentLabelOffset: K.current,
@@ -1360,18 +1366,18 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1360
1366
  ref: pe,
1361
1367
  id: A,
1362
1368
  name: r,
1363
- disabled: b,
1369
+ disabled: p,
1364
1370
  placeholder: o ? void 0 : " ",
1365
1371
  className: E.textArea,
1366
1372
  rows: 1,
1367
- ...p && { "aria-describedby": `${A}-helper` },
1373
+ ...b && { "aria-describedby": `${A}-helper` },
1368
1374
  ...a && { "aria-invalid": "true" },
1369
1375
  ...S && !o && { style: { paddingRight: ye } },
1370
1376
  value: v,
1371
1377
  onChange: xe,
1372
1378
  onFocus: we,
1373
1379
  onBlur: Ee,
1374
- ...F
1380
+ ...G
1375
1381
  }
1376
1382
  ),
1377
1383
  !o && /* @__PURE__ */ c(
@@ -1390,7 +1396,7 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1390
1396
  ref: W,
1391
1397
  id: `${A}-helper`,
1392
1398
  className: E.helperText,
1393
- children: p
1399
+ children: b
1394
1400
  }
1395
1401
  ),
1396
1402
  S && /* @__PURE__ */ c(
@@ -1401,23 +1407,23 @@ const pt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1401
1407
  children: S
1402
1408
  }
1403
1409
  ),
1404
- a && p && /* @__PURE__ */ c(ht, { politeness: "polite", clearAnnouncementDelay: 500, children: ve })
1410
+ a && b && /* @__PURE__ */ c(gt, { politeness: "polite", clearAnnouncementDelay: 500, children: ve })
1405
1411
  ] });
1406
1412
  }
1407
1413
  );
1408
- wt.displayName = "TextArea";
1414
+ Et.displayName = "TextArea";
1409
1415
  export {
1410
- St as E,
1411
- Ct as SERVICE_TYPES,
1416
+ Ct as E,
1417
+ At as SERVICE_TYPES,
1412
1418
  Ht as be,
1413
- Rt as ce,
1419
+ tt as de,
1414
1420
  M as f,
1415
1421
  $t as ge,
1416
1422
  Bt as he,
1417
- et as ie,
1418
1423
  Lt as me,
1419
- It as restCall,
1420
- At as serviceCall,
1424
+ Vt as pe,
1425
+ Rt as restCall,
1426
+ It as serviceCall,
1421
1427
  Ut as ue,
1422
- wt as we
1428
+ Et as we
1423
1429
  };