@base-framework/ui 1.0.45 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -5,7 +5,7 @@ import { V as w, a as U } from "./veil-gN57SpXV.js";
5
5
  import { Icons as R } from "./icons.es.js";
6
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 Ca, p as Ta, q as ca, S as Da, n as Ia, o as Sa, T as ba, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-BrFWql_V.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-CYExSMEO.js";
8
- import { B as Oa, m 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, q as Xa, p as Ya, n as Za, o as $a, T as as, k as ss, U as es, W as os, f as ts, h as rs, i as ns, c as is, d as ls, b as ps, e as us, a as ms, g as ds } from "./signature-panel-dqDinVVp.js";
8
+ import { B as Oa, m 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, q as Xa, p as Ya, n as Za, o as $a, T as as, k as ss, U as es, W as os, f as ts, h as rs, i as ns, c as is, d as ls, b as ps, e as us, a as ms, g as ds } from "./signature-panel-B9FALIJK.js";
9
9
  import { B as Cs, I as Ts, M as cs, d as Ds, e as Is, g as Ss, N as bs, b as Bs, a as Ps, f as Fs, P as Ms, c as ks, S as Ns, T as vs } from "./mobile-nav-wrapper-BE_hr65B.js";
10
10
  import { B as xs, a as hs, C as ys, F as Ws, b as Ls, c as As, M as Hs, P as ws, S as Us } from "./sidebar-menu-page-nCAVFk3R.js";
11
11
  import { A as Rs, F as Es, M as Gs, a as Vs, T as js } from "./aside-template-McEj_Gxc.js";
@@ -1,4 +1,4 @@
1
- import { B as s, m as o, C as t, j as r, D as n, l, H as i, I as d, N as b, O as v, P as g, S as p, q as u, p as N, n as k, o as C, T as D, k as M, U as T, W as c, f as B, h as m, i as y, c as W, d as h, b as H, e as P, a as S, g as f } from "./signature-panel-dqDinVVp.js";
1
+ import { B as s, m as o, C as t, j as r, D as n, l, H as i, I as d, N as b, O as v, P as g, S as p, q as u, p as N, n as k, o as C, T as D, k as M, U as T, W as c, f as B, h as m, i as y, c as W, d as h, b as H, e as P, a as S, g as f } from "./signature-panel-B9FALIJK.js";
2
2
  import { b as I, C as L, D as O, a as F, F as U, M as G, c as j, p as q } from "./calendar-CYExSMEO.js";
3
3
  import { B as z, I as A, M as E, d as J, e as K, g as Q, N as R, b as V, a as X, f as Y, P as Z, c as _, S as $, T as aa } from "./mobile-nav-wrapper-BE_hr65B.js";
4
4
  export {
@@ -1,8 +1,8 @@
1
- import { Button as v, Div as o, On as U, Span as y, Th as P, UseParent as Y, I as E, Thead as F, Tr as H, Table as Q, P as m, Li as D, Time as X, Nav as S, Ul as b, Section as O, Canvas as q } from "@base-framework/atoms";
1
+ import { Button as v, Div as o, On as U, Span as y, Th as W, UseParent as Y, I as F, Thead as E, Tr as H, Table as Q, P as m, Li as D, Time as X, Nav as S, Ul as b, Section as O, Canvas as q } from "@base-framework/atoms";
2
2
  import { Atom as u, Component as g, Data as L, DateTime as K, Jot as R, router as k, NavLink as M, base as B, Dom as I } from "@base-framework/base";
3
3
  import { B as C, I as z } from "./buttons-CVEwmPAi.js";
4
4
  import { Icons as w } from "./icons.es.js";
5
- import { TableBody as _, List as G, IntervalTimer as V } from "@base-framework/organisms";
5
+ import { TableBody as G, List as V, IntervalTimer as _ } from "@base-framework/organisms";
6
6
  import { C as J, I as Z, H as ee } from "./inputs-CzHSmZKP.js";
7
7
  import { A as te, P as se } from "./calendar-CYExSMEO.js";
8
8
  u((t, e) => ({
@@ -71,7 +71,7 @@ const ne = (t) => {
71
71
  i.push(l > 0 ? d : null), (i.length === 7 || l === n) && (a.push([...i]), i = []);
72
72
  }
73
73
  return a;
74
- }, Je = (t, e) => {
74
+ }, _e = (t, e) => {
75
75
  const s = new Date(t, e + 1, 0).getDate(), n = [];
76
76
  let a = [];
77
77
  for (let i = 1; i <= s; i++)
@@ -95,10 +95,10 @@ const ne = (t) => {
95
95
  }, ce = (t, e) => {
96
96
  const s = new Date(t, e, 1).getDay(), n = new Date(t, e + 1, 0).getDate(), a = ie(t, e, s), i = Array.from({ length: n }, (r, p) => new Date(t, e, p + 1)), l = (a.length + i.length) % 7, d = l === 0 ? 0 : 7 - l, c = oe(t, e, d), h = [...a, ...i, ...c], f = [];
97
97
  for (let r = 0; r < h.length; r += 7) {
98
- const p = h.slice(r, r + 7), x = p.find((j) => j) || new Date(t, e, 1), { weekNumber: $, year: A } = ae(x);
98
+ const p = h.slice(r, r + 7), x = p.find((A) => A) || new Date(t, e, 1), { weekNumber: $, year: j } = ae(x);
99
99
  f.push({
100
100
  weekNumber: $,
101
- year: A,
101
+ year: j,
102
102
  days: p
103
103
  });
104
104
  }
@@ -156,7 +156,7 @@ const ne = (t) => {
156
156
  )
157
157
  ]
158
158
  );
159
- }), W = ({ label: t, click: e }) => C(
159
+ }), P = ({ label: t, click: e }) => C(
160
160
  {
161
161
  class: `
162
162
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -171,16 +171,16 @@ const ne = (t) => {
171
171
  }
172
172
  ), he = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
173
173
  y("[[monthName]] [[year]]"),
174
- W({
174
+ P({
175
175
  label: "Previous",
176
176
  click: e
177
177
  }),
178
- W({
178
+ P({
179
179
  label: "Next",
180
180
  click: t
181
181
  })
182
182
  ]);
183
- class Ze extends g {
183
+ class Je extends g {
184
184
  /**
185
185
  * This will declare the props for the compiler.
186
186
  *
@@ -301,20 +301,20 @@ class Ze extends g {
301
301
  const ue = (t, e) => {
302
302
  const s = t.toggleAllSelectedRows();
303
303
  e.state.checked = !s;
304
- }, ge = (t) => P({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
304
+ }, ge = (t) => W({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
305
305
  Y((e) => new J({ class: "mr-2", onChange: (s, n) => ue(e, n) }))
306
306
  ]), fe = ({ align: t, sortable: e, key: s, label: n, sort: a, class: i }) => {
307
307
  const l = t || "justify-start";
308
- return P({
308
+ return W({
309
309
  class: `cursor-pointer py-3 px-4 text-base ${i || ""}`,
310
310
  click: e && (() => a(s))
311
311
  }, [
312
312
  o({ class: `flex flex-auto w-full items-center ${l}` }, [
313
313
  y(n),
314
- e && E({ class: "ml-2", html: w.arrows.upDown })
314
+ e && F({ class: "ml-2", html: w.arrows.upDown })
315
315
  ])
316
316
  ]);
317
- }, pe = (t) => F([
317
+ }, pe = (t) => E([
318
318
  H({
319
319
  class: "text-muted-foreground border-b",
320
320
  map: [t.headers, (e) => e.label === "checkbox" ? ge({ toggle: t.toggle }) : fe({
@@ -325,13 +325,13 @@ const ue = (t, e) => {
325
325
  sort: t.sort
326
326
  })]
327
327
  })
328
- ]), me = ({ key: t, rows: e, selectRow: s, rowItem: n }) => new _({
328
+ ]), me = ({ key: t, rows: e, selectRow: s, rowItem: n }) => new G({
329
329
  cache: "table",
330
330
  key: t,
331
331
  items: e,
332
332
  rowItem: (a) => n(a, s),
333
333
  class: "divide-y divide-border"
334
- }), et = R(
334
+ }), Ze = R(
335
335
  {
336
336
  /**
337
337
  * Initializes component data.
@@ -503,7 +503,7 @@ const ue = (t, e) => {
503
503
  lastSeen: t.lastSeen,
504
504
  status: t.status
505
505
  })
506
- ])), tt = u((t) => new G({
506
+ ])), et = u((t) => new V({
507
507
  cache: "list",
508
508
  key: "name",
509
509
  items: t.users,
@@ -517,7 +517,7 @@ const ue = (t, e) => {
517
517
  dataSet: ["selected", ["state", !0, "active"]],
518
518
  class: `${n ? "hidden" : "inline-flex"} items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-background hover:bg-primary hover:text-primary-foreground disabled:opacity-50 disabled:pointer-events-none data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm`
519
519
  });
520
- class st extends g {
520
+ class tt extends g {
521
521
  /**
522
522
  * This will declare the props for the compiler.
523
523
  *
@@ -615,7 +615,7 @@ class st extends g {
615
615
  this.links = [];
616
616
  }
617
617
  }
618
- const nt = u((t) => {
618
+ const st = u((t) => {
619
619
  const e = t.margin || "m-4 ml-0";
620
620
  return o({ class: `flex-none ${e}` }, [
621
621
  C({
@@ -720,7 +720,7 @@ class N extends g {
720
720
  return this.children;
721
721
  }
722
722
  }
723
- class at extends N {
723
+ class nt extends N {
724
724
  /**
725
725
  * This will stop presistence.
726
726
  *
@@ -823,7 +823,7 @@ class at extends N {
823
823
  document.documentElement.style.overflowY = "auto";
824
824
  }
825
825
  }
826
- class it extends N {
826
+ class at extends N {
827
827
  /**
828
828
  * This will get the overlay type.
829
829
  *
@@ -854,7 +854,7 @@ const Be = u(({ index: t, click: e, state: s }, n) => D({
854
854
  }, n)), Ie = u(({ selectOption: t, state: e }) => b({
855
855
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
856
856
  for: ["filteredOptions", (s, n) => Be({ index: n, click: t, state: e }, s.label)]
857
- })), Te = 100, We = u((t) => o({ class: "relative flex items-center" }, [
857
+ })), Te = u((t) => o({ class: "relative flex items-center" }, [
858
858
  Z({
859
859
  cache: "input",
860
860
  placeholder: t.placeholder ?? "Search...",
@@ -863,7 +863,6 @@ const Be = u(({ index: t, click: e, state: s }, n) => D({
863
863
  s.state.open = !0, typeof t.filterOptions == "function" && t.filterOptions(), s.dropdown.updatePosition();
864
864
  },
865
865
  pointerup: (e, s) => s.toggleDropdown(),
866
- blur: (e, { state: s }) => setTimeout(() => s.open = !1, Te),
867
866
  keydown: (e) => typeof t.handleKeyDown == "function" && t.handleKeyDown(e)
868
867
  }),
869
868
  t.icon && o({ class: "absolute right-0 mr-2" }, [
@@ -882,7 +881,7 @@ const Be = u(({ index: t, click: e, state: s }, n) => D({
882
881
  Ie(t)
883
882
  ]);
884
883
  }]
885
- }), ot = R(
884
+ }), it = R(
886
885
  {
887
886
  /**
888
887
  * This will set up the data object.
@@ -978,8 +977,13 @@ const Be = u(({ index: t, click: e, state: s }, n) => D({
978
977
  * @returns {object} - The rendered component.
979
978
  */
980
979
  render() {
981
- return o({ class: "relative w-full max-w-md" }, [
982
- We({
980
+ return o({
981
+ class: "relative w-full max-w-md",
982
+ click: (t, e) => {
983
+ t.target === e.panel && (t.preventDefault(), t.stopPropagation(), e.state.open = !1);
984
+ }
985
+ }, [
986
+ Te({
983
987
  // @ts-ignore
984
988
  state: this.state,
985
989
  // @ts-ignore
@@ -1002,7 +1006,7 @@ const Be = u(({ index: t, click: e, state: s }, n) => D({
1002
1006
  ]);
1003
1007
  }
1004
1008
  }
1005
- ), Oe = (t) => D(
1009
+ ), We = (t) => D(
1006
1010
  {
1007
1011
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
1008
1012
  dataSet: ["selected", ["state", t.value, "active"]]
@@ -1014,10 +1018,10 @@ const Be = u(({ index: t, click: e, state: s }, n) => D({
1014
1018
  click: (e) => t.callBack(t.value)
1015
1019
  }, t.label)
1016
1020
  ]
1017
- ), Re = (t, e) => (t.callBack = e, Oe(t)), Me = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1018
- b({ class: "flex flex-auto flex-row", map: [t.options, (e) => Re(e, t.callBack)] })
1021
+ ), Oe = (t, e) => (t.callBack = e, We(t)), Re = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1022
+ b({ class: "flex flex-auto flex-row", map: [t.options, (e) => Oe(e, t.callBack)] })
1019
1023
  ]);
1020
- class lt extends g {
1024
+ class ot extends g {
1021
1025
  /**
1022
1026
  * This will declare the props for the compiler.
1023
1027
  *
@@ -1034,7 +1038,7 @@ class lt extends g {
1034
1038
  render() {
1035
1039
  const e = this.select.bind(this);
1036
1040
  return o({ class: "" }, [
1037
- Me({
1041
+ Re({
1038
1042
  class: this.class,
1039
1043
  options: this.options,
1040
1044
  callBack: e
@@ -1105,7 +1109,7 @@ class lt extends g {
1105
1109
  };
1106
1110
  }
1107
1111
  }
1108
- const ze = (t) => D(
1112
+ const Me = (t) => D(
1109
1113
  {
1110
1114
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
1111
1115
  dataSet: ["selected", ["state", t.value, "active"]]
@@ -1118,10 +1122,10 @@ const ze = (t) => D(
1118
1122
  disabled: t.disabled
1119
1123
  }, t.label)
1120
1124
  ]
1121
- ), Ne = (t, e) => (t.callBack = e, ze(t)), $e = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1122
- b({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ne(e, t.callBack)] })
1125
+ ), ze = (t, e) => (t.callBack = e, Me(t)), Ne = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1126
+ b({ class: "flex flex-auto flex-row", map: [t.options, (e) => ze(e, t.callBack)] })
1123
1127
  ]);
1124
- class rt extends g {
1128
+ class lt extends g {
1125
1129
  /**
1126
1130
  * This will declare the props for the compiler.
1127
1131
  *
@@ -1137,7 +1141,7 @@ class rt extends g {
1137
1141
  */
1138
1142
  render() {
1139
1143
  const e = this.select.bind(this);
1140
- return $e({
1144
+ return Ne({
1141
1145
  class: this.class,
1142
1146
  options: this.options,
1143
1147
  callBack: e
@@ -1164,17 +1168,17 @@ class rt extends g {
1164
1168
  };
1165
1169
  }
1166
1170
  }
1167
- const Ae = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), je = (t, e) => {
1171
+ const $e = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), je = (t, e) => {
1168
1172
  const s = t.getLinkPath();
1169
- return t.exact ? e === s : Ae(s, e);
1170
- }, Ue = ({ text: t, href: e, exact: s }) => new M({
1173
+ return t.exact ? e === s : $e(s, e);
1174
+ }, Ae = ({ text: t, href: e, exact: s }) => new M({
1171
1175
  text: t,
1172
1176
  href: e,
1173
1177
  exact: s,
1174
1178
  dataSet: ["selected", ["state", !0, "active"]],
1175
1179
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm"
1176
1180
  });
1177
- class Ye extends g {
1181
+ class Ue extends g {
1178
1182
  /**
1179
1183
  * This will declare the props for the compiler.
1180
1184
  *
@@ -1257,7 +1261,7 @@ class Ye extends g {
1257
1261
  * @returns {object}
1258
1262
  */
1259
1263
  addLink({ label: e, href: s, exact: n }) {
1260
- const a = Ue({ text: e, href: s, exact: n });
1264
+ const a = Ae({ text: e, href: s, exact: n });
1261
1265
  return this.links.push(a), a;
1262
1266
  }
1263
1267
  /**
@@ -1269,7 +1273,7 @@ class Ye extends g {
1269
1273
  this.links = [];
1270
1274
  }
1271
1275
  }
1272
- class ct extends g {
1276
+ class rt extends g {
1273
1277
  /**
1274
1278
  * This will declare the props for the compiler.
1275
1279
  *
@@ -1285,7 +1289,7 @@ class ct extends g {
1285
1289
  */
1286
1290
  render() {
1287
1291
  return o({ class: "tab-panel" }, [
1288
- new Ye({
1292
+ new Ue({
1289
1293
  class: this.class,
1290
1294
  options: this.options
1291
1295
  }),
@@ -1315,7 +1319,7 @@ class ct extends g {
1315
1319
  return s;
1316
1320
  }
1317
1321
  }
1318
- class Ee extends g {
1322
+ class Ye extends g {
1319
1323
  /**
1320
1324
  * Runs before rendering, sets up defaults, a timer for drawing,
1321
1325
  * and basic canvas properties.
@@ -1325,7 +1329,7 @@ class Ee extends g {
1325
1329
  onCreated() {
1326
1330
  this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
1327
1331
  const e = 1e3 / 60;
1328
- this.timer = new V(e, this.draw.bind(this)), this.width = 0, this.height = 0, this.signed = !1, this.mouse = { x: 0, y: 0, status: "up" }, this.margin = this.margin || { x: 40, y: 60 }, this.targetSize = this.targetSize || { width: 740, height: 345 }, this.baseLineWidth = this.baseLineWidth || 2, this.baseStrokeColor = this.baseStrokeColor || "#000000";
1332
+ this.timer = new _(e, this.draw.bind(this)), this.width = 0, this.height = 0, this.signed = !1, this.mouse = { x: 0, y: 0, status: "up" }, this.margin = this.margin || { x: 40, y: 60 }, this.targetSize = this.targetSize || { width: 740, height: 345 }, this.baseLineWidth = this.baseLineWidth || 2, this.baseStrokeColor = this.baseStrokeColor || "#000000";
1329
1333
  }
1330
1334
  /**
1331
1335
  * Renders a <canvas> element.
@@ -1541,7 +1545,7 @@ class Ee extends g {
1541
1545
  this.timer.stop(), this.status = "stopped";
1542
1546
  }
1543
1547
  }
1544
- class dt extends g {
1548
+ class ct extends g {
1545
1549
  /**
1546
1550
  * Sets up default properties for the signature panel.
1547
1551
  *
@@ -1570,7 +1574,7 @@ class dt extends g {
1570
1574
  click: this.reset.bind(this)
1571
1575
  })
1572
1576
  ]),
1573
- new Ee({
1577
+ new Ye({
1574
1578
  cache: "canvasLayer",
1575
1579
  margin: this.margin,
1576
1580
  targetSize: this.targetSize,
@@ -1620,33 +1624,33 @@ class dt extends g {
1620
1624
  }
1621
1625
  }
1622
1626
  export {
1623
- nt as B,
1627
+ st as B,
1624
1628
  ge as C,
1625
1629
  me as D,
1626
1630
  fe as H,
1627
- it as I,
1628
- st as N,
1631
+ at as I,
1632
+ tt as N,
1629
1633
  N as O,
1630
1634
  Ge as P,
1631
- ot as S,
1635
+ it as S,
1632
1636
  pe as T,
1633
1637
  De as U,
1634
- Ze as W,
1638
+ Je as W,
1635
1639
  oe as a,
1636
1640
  T as b,
1637
1641
  ae as c,
1638
1642
  Ve as d,
1639
- Je as e,
1643
+ _e as e,
1640
1644
  re as f,
1641
1645
  ie as g,
1642
1646
  de as h,
1643
1647
  he as i,
1644
- et as j,
1645
- tt as k,
1646
- at as l,
1647
- lt as m,
1648
- rt as n,
1649
- Ye as o,
1650
- ct as p,
1651
- dt as q
1648
+ Ze as j,
1649
+ et as k,
1650
+ nt as l,
1651
+ ot as m,
1652
+ lt as n,
1653
+ Ue as o,
1654
+ rt as p,
1655
+ ct as q
1652
1656
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
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": {