@base-framework/ui 1.0.84 → 1.0.86

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.
@@ -1,5 +1,5 @@
1
- import { Div as n, H5 as _, P as b, I as f, Li as O, Span as a, Ul as V, Button as h, OnState as v, Label as R, Form as W, H2 as B, Header as $, Footer as M, A as Y, H3 as G, Checkbox as J, Nav as K, Input as C, Time as Q, Dialog as X } from "@base-framework/atoms";
2
- import { Atom as c, Component as p, Html as L, Dom as Z, base as ee, Data as k, Builder as q, Jot as S, DateTime as A } from "@base-framework/base";
1
+ import { Div as n, H5 as _, P as b, I as f, Li as O, Span as a, Ul as V, Button as h, OnState as v, Label as W, Form as R, H2 as A, Header as B, Footer as M, A as Y, H3 as G, Checkbox as J, Nav as K, Input as C, Time as Q, Dialog as X } from "@base-framework/atoms";
2
+ import { Atom as c, Component as p, Html as L, Dom as Z, base as ee, Data as k, Builder as q, Jot as S, DateTime as $ } from "@base-framework/base";
3
3
  import { P as D, b as te } from "./calendar-BDqm833e.js";
4
4
  import { B as u, I as x } from "./buttons-CVEwmPAi.js";
5
5
  import { Icons as d } from "./icons.es.js";
@@ -166,7 +166,7 @@ class mt extends p {
166
166
  ]);
167
167
  }
168
168
  }
169
- const pe = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), xe = c((e, t) => R({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), we = c((e, t) => b({ ...e, class: "text-sm text-muted-foreground italic" }, t)), ye = c((e, t) => b({ ...e, class: "text-sm text-destructive" }, t)), ve = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", H = (e, t, s) => e.map((o) => (o.children && o.children.length > 0 && (o.children = H(o.children, t, s)), o.required && ve(o) ? {
169
+ const pe = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), xe = c((e, t) => W({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), we = c((e, t) => b({ ...e, class: "text-sm text-muted-foreground italic" }, t)), ye = c((e, t) => b({ ...e, class: "text-sm text-destructive" }, t)), ve = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", H = (e, t, s) => e.map((o) => (o.children && o.children.length > 0 && (o.children = H(o.children, t, s)), o.required && ve(o) ? {
170
170
  ...o,
171
171
  aria: {
172
172
  invalid: ["hasError"]
@@ -225,14 +225,14 @@ const pe = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
225
225
  ), ke = (e, t, s = null) => {
226
226
  e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
227
227
  }, Se = c(
228
- (e, t) => W({ ...e, submit: (s, o) => ke(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
228
+ (e, t) => R({ ...e, submit: (s, o) => ke(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
229
229
  ), gt = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), bt = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
230
- e.title && B({ class: "font-semibold" }, e.title),
230
+ e.title && A({ class: "font-semibold" }, e.title),
231
231
  ...t
232
232
  ])), pt = (e, t) => n({ class: "flex justify-between" }, [
233
233
  a({ class: "text-muted-foreground" }, e),
234
234
  a(t)
235
- ]), De = ({ title: e, description: t, back: s, icon: o, options: r = [] }) => $({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
235
+ ]), De = ({ title: e, description: t, back: s, icon: o, options: r = [] }) => B({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
236
236
  /**
237
237
  * Back Button
238
238
  */
@@ -246,7 +246,7 @@ const pe = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
246
246
  */
247
247
  n({ class: "flex flex-auto flex-row justify-between w-full ml-2 gap-2" }, [
248
248
  n({ class: "flex flex-auto flex-col" }, [
249
- B({ class: "text-lg font-semibold m-0" }, e),
249
+ A({ class: "text-lg font-semibold m-0" }, e),
250
250
  t && n({ class: "text-sm text-muted-foreground" }, t)
251
251
  ]),
252
252
  ...r
@@ -415,7 +415,7 @@ class xt extends p {
415
415
  this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(), document.documentElement.style.overflowY = "auto";
416
416
  }
417
417
  }
418
- const z = {
418
+ const N = {
419
419
  info: {
420
420
  bgColor: "bg-muted/10",
421
421
  borderColor: "border-blue-500",
@@ -441,13 +441,13 @@ const z = {
441
441
  borderColor: "border",
442
442
  iconColor: "text-muted-foreground"
443
443
  }
444
- }, Ae = (e) => $({ class: "flex justify-center" }, [
444
+ }, $e = (e) => B({ class: "flex justify-center" }, [
445
445
  G({ class: "text-lg font-bold mb-0" }, e)
446
- ]), Be = c(({ href: e, class: t }, s) => Y({
446
+ ]), Ae = c(({ href: e, class: t }, s) => Y({
447
447
  class: `pullRightIn bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
448
448
  href: e,
449
449
  role: "alert"
450
- }, s)), $e = c(({ close: e, class: t }, s) => n({
450
+ }, s)), Be = c(({ close: e, class: t }, s) => n({
451
451
  class: `pullRightIn bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
452
452
  click: () => e(),
453
453
  role: "alert"
@@ -476,10 +476,10 @@ class Me extends ae {
476
476
  */
477
477
  render() {
478
478
  const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), r = this.href || null, l = this.getChildren(o);
479
- return r ? Be({
479
+ return r ? Ae({
480
480
  href: r,
481
481
  class: `${t} ${s}`
482
- }, l) : $e({
482
+ }, l) : Be({
483
483
  close: this.close.bind(this),
484
484
  class: `${t} ${s}`
485
485
  }, l);
@@ -500,7 +500,7 @@ class Me extends ae {
500
500
  */
501
501
  getTypeStyles() {
502
502
  const t = this.type || "default";
503
- return z[t] || z.default;
503
+ return N[t] || N.default;
504
504
  }
505
505
  /**
506
506
  * This will get the buttons for the notification.
@@ -527,7 +527,7 @@ class Me extends ae {
527
527
  this.icon && f({ class: `mr-4 ${t}`, html: this.icon }),
528
528
  n({ class: "flex flex-auto flex-col" }, [
529
529
  n({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
530
- this.title && Ae(this.title)
530
+ this.title && $e(this.title)
531
531
  ]),
532
532
  b({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
533
533
  (this.primary || this.secondary) && M({ class: "margin-top-24 flex align-center" }, this.getButtons())
@@ -587,7 +587,7 @@ class wt extends p {
587
587
  this.list.delete(t.id);
588
588
  }
589
589
  }
590
- const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
590
+ const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
591
591
  class: 'text-sm gap-1 font-medium leading-none disabled:cursor-not-allowed disabled:opacity-70 flex flex-col items-center justify-between rounded-md border-2 bg-popover p-4 hover:bg-accent hover:text-accent-foreground data-[state="active"]:border-primary [&:has([data-state="active"])]:border-primary',
592
592
  onState: ["method", { active: e }],
593
593
  dataSet: ["method", ["state", e, "active"]],
@@ -600,7 +600,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
600
600
  ])), Pe = (e) => {
601
601
  var o;
602
602
  const t = document.documentElement;
603
- if (e === "system" && (e = (o = window.matchMedia) != null && o.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), N && !N("(prefers-color-scheme: " + e + ")").matches) {
603
+ if (e === "system" && (e = (o = window.matchMedia) != null && o.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), z && !z("(prefers-color-scheme: " + e + ")").matches) {
604
604
  t.classList.add(e);
605
605
  return;
606
606
  }
@@ -695,8 +695,8 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
695
695
  OFFLINE: "bg-gray-500",
696
696
  BUSY: "bg-red-500",
697
697
  AWAY: "bg-yellow-500"
698
- }, ze = (e = "") => (e = e.toUpperCase(), m[e] || m.OFFLINE), Ct = (e) => n({
699
- class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${ze(e)}`
698
+ }, Ne = (e = "") => (e = e.toUpperCase(), m[e] || m.OFFLINE), Ct = (e) => n({
699
+ class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${Ne(e)}`
700
700
  }), kt = ({ propName: e = "status" } = {}) => n({
701
701
  class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
702
702
  onSet: [e, {
@@ -705,7 +705,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
705
705
  [m.BUSY]: y.BUSY,
706
706
  [m.AWAY]: y.AWAY
707
707
  }]
708
- }), Ne = (e, t) => Y(
708
+ }), ze = (e, t) => Y(
709
709
  {
710
710
  href: e,
711
711
  "aria-current": t === "Breadcrumb" && "page",
@@ -718,7 +718,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
718
718
  "aria-hidden": !0,
719
719
  size: "xs"
720
720
  }, d.chevron.single.right), Ee = (e) => n({ class: "flex items-center" }, [
721
- e.href ? Ne(e.href, e.label) : a(e.label),
721
+ e.href ? ze(e.href, e.label) : a(e.label),
722
722
  e.separator && Fe()
723
723
  ]), St = S(
724
724
  {
@@ -892,7 +892,8 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
892
892
  * @returns {object}
893
893
  */
894
894
  render() {
895
- return n({ class: "relative w-full flex flex-auto flex-col max-w-[250px]" }, [
895
+ const e = this.class || "", t = this.maxWidth || "max-w-[250px]", s = this.width || "w-full";
896
+ return n({ class: `relative ${s} flex flex-auto flex-col ${t} ${e}` }, [
896
897
  // @ts-ignore
897
898
  Ye({ toggleDropdown: this.toggleDropdown.bind(this) }),
898
899
  Ue({
@@ -925,11 +926,11 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
925
926
  icon: d.circleMinus,
926
927
  click: e,
927
928
  ariaLabel: "Decrement"
928
- }), Re = ({ click: e }) => U({
929
+ }), We = ({ click: e }) => U({
929
930
  icon: d.circlePlus,
930
931
  click: e,
931
932
  ariaLabel: "Increment"
932
- }), We = ({ bind: e, min: t, max: s, readonly: o = !1 }) => C({
933
+ }), Re = ({ bind: e, min: t, max: s, readonly: o = !1 }) => C({
933
934
  value: "[[count]]",
934
935
  bind: e,
935
936
  blur: (r, { state: l }) => {
@@ -966,13 +967,13 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
966
967
  const e = this.class ?? "";
967
968
  return n({ class: `flex flex-auto items-center justify-between space-x-4 p-4 ${e}` }, [
968
969
  _e({ click: () => this.state.decrement("count") }),
969
- We({
970
+ Re({
970
971
  bind: this.bind,
971
972
  readonly: this.readonly,
972
973
  min: this.min,
973
974
  max: this.max
974
975
  }),
975
- Re({ click: () => this.state.increment("count") })
976
+ We({ click: () => this.state.increment("count") })
976
977
  ]);
977
978
  }
978
979
  }
@@ -987,7 +988,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
987
988
  }, [
988
989
  Ge({ bind: e, required: t }),
989
990
  a({
990
- onState: ["selectedDate", (o) => o ? A.format("standard", o) : "Pick a date"]
991
+ onState: ["selectedDate", (o) => o ? $.format("standard", o) : "Pick a date"]
991
992
  }),
992
993
  f({ html: d.calendar.days })
993
994
  ]), Ke = ({ handleDateSelect: e, blockPriorDates: t }) => n({ class: "absolute mt-1 z-10 bg-background rounded-md shadow-lg" }, [
@@ -1006,7 +1007,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
1006
1007
  })
1007
1008
  ]) : null
1008
1009
  )
1009
- ]), At = w(
1010
+ ]), $t = w(
1010
1011
  {
1011
1012
  /**
1012
1013
  * The initial state of the DatePicker.
@@ -1050,12 +1051,12 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
1050
1051
  ]);
1051
1052
  }
1052
1053
  }
1053
- ), Bt = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => Q([
1054
+ ), At = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => Q([
1054
1055
  new ne({
1055
1056
  dateTime: e,
1056
1057
  filter: s || ((o) => {
1057
- const r = A.getLocalTime(o, !0, !1, t);
1058
- return A.getTimeFrame(r);
1058
+ const r = $.getLocalTime(o, !0, !1, t);
1059
+ return $.getTimeFrame(r);
1059
1060
  })
1060
1061
  })
1061
1062
  ]);
@@ -1162,7 +1163,7 @@ function E(e) {
1162
1163
  meridian: l
1163
1164
  });
1164
1165
  }
1165
- const $t = w(
1166
+ const Bt = w(
1166
1167
  {
1167
1168
  /**
1168
1169
  * The initial shallow state of the TimePicker.
@@ -1224,8 +1225,8 @@ const $t = w(
1224
1225
  }
1225
1226
  ), et = (e, t) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
1226
1227
  x({ size: "lg" }, e)
1227
- ]), tt = ({ title: e }) => $({ class: "flex flex-auto items-center" }, [
1228
- B({ class: "text-lg font-semibold" }, e)
1228
+ ]), tt = ({ title: e }) => B({ class: "flex flex-auto items-center" }, [
1229
+ A({ class: "text-lg font-semibold" }, e)
1229
1230
  ]), st = c((e, t) => X(
1230
1231
  {
1231
1232
  class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
@@ -1388,7 +1389,7 @@ export {
1388
1389
  nt as G,
1389
1390
  xt as M,
1390
1391
  wt as N,
1391
- Re as P,
1392
+ We as P,
1392
1393
  pt as S,
1393
1394
  yt as T,
1394
1395
  he as a,
@@ -1408,13 +1409,13 @@ export {
1408
1409
  kt as o,
1409
1410
  y as p,
1410
1411
  m as q,
1411
- ze as r,
1412
+ Ne as r,
1412
1413
  Dt as s,
1413
1414
  _e as t,
1414
- We as u,
1415
+ Re as u,
1415
1416
  Tt as v,
1416
- At as w,
1417
- Bt as x,
1418
- $t as y,
1417
+ $t as w,
1418
+ At as x,
1419
+ Bt as y,
1419
1420
  Mt as z
1420
1421
  };
package/dist/index.es.js CHANGED
@@ -3,9 +3,9 @@ import { B as g, I as T, L as c } from "./buttons-CVEwmPAi.js";
3
3
  import { C as b, d as D, D as S, c as I, E as B, F as P, H as F, I as M, M as k, N, P as v, R as f, S as x, T as h, a as y, b as W, U as L, W as A } from "./inputs-DmJuUwS9.js";
4
4
  import { V as w, a as U } from "./veil-D4dRxILB.js";
5
5
  import { Icons as R } from "./icons.es.js";
6
- import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ta, p as ca, q as Ca, S as ba, n as Da, o as Sa, T as Ia, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-DgARq0AK.js";
6
+ import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ta, p as ca, q as Ca, S as ba, n as Da, o as Sa, T as Ia, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-B4JXnz0O.js";
7
7
  import { A as Na, b as va, C as fa, D as xa, a as ha, F as ya, M as Wa, P as La, c as Aa, g as Ha, p as wa } from "./calendar-BDqm833e.js";
8
- import { B as Oa, n as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, m as Xa, r as Ya, q as Za, o as $a, p as as, T as ss, k as es, U as os, W as ts, f as rs, h as ns, i as is, c as ls, d as ps, b as us, e as ms, a as ds, g as gs } from "./signature-panel-D1odUef9.js";
8
+ import { B as Oa, n as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, m as Xa, r as Ya, q as Za, o as $a, p as as, T as ss, k as es, U as os, W as ts, f as rs, h as ns, i as is, c as ls, d as ps, b as us, e as ms, a as ds, g as gs } from "./signature-panel-CrKk8upb.js";
9
9
  import { B as cs, I as Cs, M as bs, d as Ds, e as Ss, g as Is, N as Bs, b as Ps, a as Fs, f as Ms, P as ks, c as Ns, S as vs, T as fs } from "./mobile-nav-wrapper-BE_hr65B.js";
10
10
  import { B as hs, a as ys, C as Ws, F as Ls, b as As, c as Hs, M as ws, P as Us, S as Os } from "./sidebar-menu-page-nCAVFk3R.js";
11
11
  import { A as Es, F as Gs, M as Vs, a as js, T as qs } from "./aside-template-McEj_Gxc.js";
@@ -1,4 +1,4 @@
1
- import { A as o, B as t, C as e, z as i, u as r, v as n, w as m, D as l, j as S, k as D, G as c, E as u, s as d, c as g, a as p, b as C, i as F, g as T, e as A, h as P, F as f, d as b, f as w, t as B, M as I, l as M, N as x, P as y, p as k, q as v, S as N, n as h, o as E, T as L, x as U, y as j, m as q, r as z } from "./confirmation-DgARq0AK.js";
1
+ import { A as o, B as t, C as e, z as i, u as r, v as n, w as m, D as l, j as S, k as D, G as c, E as u, s as d, c as g, a as p, b as C, i as F, g as T, e as A, h as P, F as f, d as b, f as w, t as B, M as I, l as M, N as x, P as y, p as k, q as v, S as N, n as h, o as E, T as L, x as U, y as j, m as q, r as z } from "./confirmation-B4JXnz0O.js";
2
2
  import { A as O, P as R, g as _ } from "./calendar-BDqm833e.js";
3
3
  export {
4
4
  o as Alert,
@@ -1,4 +1,4 @@
1
- import { B as s, n as o, C as t, j as r, D as l, l as n, H as i, I as b, N as d, O as v, P as g, S as p, m as u, r as N, q as k, o as D, p as C, T, k as c, U as M, W as B, f as m, h as y, i as W, c as h, d as H, b as P, e as S, a as f, g as x } from "./signature-panel-D1odUef9.js";
1
+ import { B as s, n as o, C as t, j as r, D as l, l as n, H as i, I as b, N as d, O as v, P as g, S as p, m as u, r as N, q as k, o as D, p as C, T, k as c, U as M, W as B, f as m, h as y, i as W, c as h, d as H, b as P, e as S, a as f, g as x } from "./signature-panel-CrKk8upb.js";
2
2
  import { b as L, C as O, D as F, a as U, F as G, M as j, c as q, p as w } from "./calendar-BDqm833e.js";
3
3
  import { B as A, I as E, M as J, d as K, e as Q, g as R, N as V, b as X, a as Y, f as Z, P as _, c as $, S as aa, T as ea } from "./mobile-nav-wrapper-BE_hr65B.js";
4
4
  export {
@@ -540,6 +540,7 @@ class ye extends ke {
540
540
  }
541
541
  const it = d((t) => new ye(
542
542
  {
543
+ cache: t.cache ?? "list",
543
544
  tableData: t.data,
544
545
  scrollContainer: t.scrollContainer,
545
546
  loadMoreItems: t.loadMoreItems,
@@ -0,0 +1,4 @@
1
+ export function DropdownButton({ toggleDropdown }: object): object;
2
+ export function ComboboxItem(item: object, onSelect: Function, state: any): object;
3
+ export function ComboboxDropdown(handleSelect: Function, state: object): object;
4
+ export function DropdownContainer({ onSelect, state }: object): object;
@@ -17,6 +17,7 @@
17
17
  * @property {function} [props.selectRow] - The function to select a row.
18
18
  * @property {string} [props.border] - The border to add to the table.
19
19
  * @property {object} [props.data] - The table data.
20
+ * @property {string} [props.cache] - The table cache identifier.
20
21
  * @returns {object}
21
22
  */
22
23
  export const ScrollableDataTable: Function;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.84",
3
+ "version": "1.0.86",
4
4
  "description": "This is a UI package that adds components and atoms that use Tailwind CSS and a theme based on Shadcn.",
5
5
  "main": "./dist/index.es.js",
6
6
  "scripts": {