@base-framework/ui 1.0.149 → 1.0.150

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
1
  import { Div as i, Img as F, Span as M, Button as j } from "@base-framework/atoms";
2
- import { Component as N, Data as k, Atom as z, DateTime as I } from "@base-framework/base";
2
+ import { Component as N, Data as z, Atom as k, DateTime as I } from "@base-framework/base";
3
3
  import { B as Y } from "./buttons-Cm9etaEG.js";
4
4
  import { Icons as T } from "./icons.es.js";
5
5
  const W = (e, t) => {
@@ -15,7 +15,7 @@ class lt extends N {
15
15
  * @returns {object}
16
16
  */
17
17
  setData() {
18
- const t = this.parent.data || new k();
18
+ const t = this.parent.data || new z();
19
19
  return t.set({
20
20
  position: { x: 0, y: 0 }
21
21
  }), t;
@@ -55,6 +55,7 @@ class lt extends N {
55
55
  * @returns {object}
56
56
  */
57
57
  render() {
58
+ console.log("render", this);
58
59
  const t = this.getSize();
59
60
  return i({
60
61
  class: `absolute inset-auto fadeIn mt-2 rounded-md p-0 shadow-lg bg-popover min-h-12 backdrop:bg-transparent text-inherit r z-30 ${t}`,
@@ -103,8 +104,7 @@ class lt extends N {
103
104
  * @returns {boolean}
104
105
  */
105
106
  isOutsideClick(t) {
106
- var s;
107
- return console.log("Checking outside click", t, this.panel, this.panel.contains(t), this.button, (s = this.button) == null ? void 0 : s.contains(t)), !this.panel.contains(t) && this.button && !this.button.contains(t);
107
+ return !this.panel.contains(t) && this.button && !this.button.contains(t);
108
108
  }
109
109
  /**
110
110
  * This will set up the events.
@@ -134,10 +134,10 @@ class lt extends N {
134
134
  * @returns {void}
135
135
  */
136
136
  beforeDestroy() {
137
- this.panel.hidePopover();
137
+ console.log("destroy", this), this.panel.hidePopover();
138
138
  }
139
139
  }
140
- const H = z(({ src: e, alt: t }) => e ? F({
140
+ const H = k(({ src: e, alt: t }) => e ? F({
141
141
  class: "absolute w-full h-full rounded-full object-cover fadeIn",
142
142
  src: e,
143
143
  alt: t,
@@ -181,7 +181,7 @@ const H = z(({ src: e, alt: t }) => e ? F({
181
181
  t ? X(t) : M({ class: "uppercase" }, n)
182
182
  ]
183
183
  );
184
- }, ct = z(({ src: e, alt: t, fallbackText: s, watcherFallback: n, size: o }) => {
184
+ }, ct = k(({ src: e, alt: t, fallbackText: s, watcherFallback: n, size: o }) => {
185
185
  const r = E(o);
186
186
  return i(
187
187
  {
@@ -195,7 +195,7 @@ const H = z(({ src: e, alt: t }) => e ? F({
195
195
  }), x = (e) => (e *= 1, e < 10 ? `0${e}` : String(e)), U = (e) => (e.indexOf("T") === -1 && e.indexOf(" ") === -1 && (e += "T00:00:01"), e.replace(" ", "T"), e), m = (e, t, s) => `${e}-${x(t + 1)}-${x(s)}`, q = (e) => e ? "bg-accent text-primary" : "", J = (e) => e ? "text-muted-foreground opacity-50" : "", K = (e, t) => e === t, Q = (e, t) => K(e, t) ? "bg-primary text-primary-foreground" : "", V = (e, t, s, n) => {
196
196
  const o = Q(t, n);
197
197
  return o || (e ? q(e) : s ? J(s) : "text-foreground");
198
- }, C = (e) => {
198
+ }, v = (e) => {
199
199
  const {
200
200
  day: t,
201
201
  currentDate: s,
@@ -220,12 +220,12 @@ const H = z(({ src: e, alt: t }) => e ? F({
220
220
  },
221
221
  t.toString()
222
222
  );
223
- }, v = (e, t, s, n) => e === n.date && t === n.month && s === n.year, Z = (e, t, s, n = !1) => {
223
+ }, C = (e, t, s, n) => e === n.date && t === n.month && s === n.year, Z = (e, t, s, n = !1) => {
224
224
  const { year: o, month: r } = e, l = m(o, r, e.date), c = new Date(o, r, 1).getDay(), f = new Date(o, r + 1, 0).getDate(), h = new Date(o, r, 0).getDate(), d = [], D = r === 0 ? 11 : r - 1, y = r === 0 ? o - 1 : o;
225
225
  for (let a = c - 1; a >= 0; a--) {
226
- const u = h - a, g = v(u, D, y, t), p = new Date(y, D, u) < new Date(t.year, t.month, t.date), A = n && p;
226
+ const u = h - a, g = C(u, D, y, t), p = new Date(y, D, u) < new Date(t.year, t.month, t.date), A = n && p;
227
227
  d.push(
228
- C({
228
+ v({
229
229
  day: u,
230
230
  currentDate: l,
231
231
  date: m(y, D, u),
@@ -237,9 +237,9 @@ const H = z(({ src: e, alt: t }) => e ? F({
237
237
  );
238
238
  }
239
239
  for (let a = 1; a <= f; a++) {
240
- const u = v(a, r, o, t), g = new Date(o, r, a) < new Date(t.year, t.month, t.date), p = n && g;
240
+ const u = C(a, r, o, t), g = new Date(o, r, a) < new Date(t.year, t.month, t.date), p = n && g;
241
241
  d.push(
242
- C({
242
+ v({
243
243
  day: a,
244
244
  currentDate: l,
245
245
  date: m(o, r, a),
@@ -252,9 +252,9 @@ const H = z(({ src: e, alt: t }) => e ? F({
252
252
  }
253
253
  const w = r === 11 ? 0 : r + 1, b = r === 11 ? o + 1 : o, O = (7 - d.length % 7) % 7;
254
254
  for (let a = 1; a <= O; a++) {
255
- const u = v(a, w, b, t), g = new Date(b, w, a) < new Date(t.year, t.month, t.date), p = n && g;
255
+ const u = C(a, w, b, t), g = new Date(b, w, a) < new Date(t.year, t.month, t.date), p = n && g;
256
256
  d.push(
257
- C({
257
+ v({
258
258
  day: a,
259
259
  currentDate: l,
260
260
  date: m(b, w, a),
@@ -342,7 +342,7 @@ class ut extends N {
342
342
  */
343
343
  setData() {
344
344
  const t = /* @__PURE__ */ new Date(), s = this.getSelectedDate(t), n = s.getMonth();
345
- return new k({
345
+ return new z({
346
346
  monthName: this.getMonthName(n),
347
347
  currentDate: `${s.getFullYear()}-${n + 1}-${s.getDate()}`,
348
348
  current: {
@@ -429,7 +429,7 @@ class ut extends N {
429
429
  export {
430
430
  ct as A,
431
431
  Z as C,
432
- C as D,
432
+ v as D,
433
433
  m as F,
434
434
  st as M,
435
435
  lt as P,
@@ -1,6 +1,6 @@
1
1
  import { Div as n, H5 as _, P as b, I as g, Li as O, Span as a, Ul as V, Button as m, OnState as v, Label as R, Form as W, H2 as A, Header as B, Footer as M, A as Y, H3 as G, Checkbox as J, Nav as K, Input as C, UseParent as Q, Time as X, Dialog as Z } from "@base-framework/atoms";
2
2
  import { Atom as c, Component as p, Html as L, Dom as ee, base as te, Data as k, Builder as H, Jot as S, DateTime as $ } from "@base-framework/base";
3
- import { P as D, b as se } from "./calendar-yp7wLMMW.js";
3
+ import { P as D, b as se } from "./calendar-CflR0wpq.js";
4
4
  import { B as h, I as x } from "./buttons-Cm9etaEG.js";
5
5
  import { Icons as u } from "./icons.es.js";
6
6
  import { a as w } from "./veil-D4dRxILB.js";
@@ -1023,23 +1023,21 @@ const N = globalThis.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
1023
1023
  onState: ["selectedDate", (o) => o ? $.format("standard", o) : "Pick a date"]
1024
1024
  }),
1025
1025
  g({ html: u.calendar.days })
1026
- ]), Qe = ({ handleDateSelect: e, blockPriorDates: t }) => n({ class: "absolute mt-1 z-10 bg-background rounded-md shadow-lg" }, [
1027
- v(
1028
- "open",
1029
- (s, o, r) => s ? new D({
1030
- cache: "dropdown",
1031
- parent: r,
1032
- button: r.panel,
1033
- size: "fit"
1034
- }, [
1035
- new se({
1036
- selectedDate: r.state.selectedDate,
1037
- selectedCallBack: e,
1038
- blockPriorDates: t
1039
- })
1040
- ]) : null
1041
- )
1042
- ]), Bt = w(
1026
+ ]), Qe = ({ handleDateSelect: e, blockPriorDates: t }) => v(
1027
+ "open",
1028
+ (s, o, r) => s ? new D({
1029
+ cache: "dropdown",
1030
+ parent: r,
1031
+ button: r.panel,
1032
+ size: "fit"
1033
+ }, [
1034
+ new se({
1035
+ selectedDate: r.state.selectedDate,
1036
+ selectedCallBack: e,
1037
+ blockPriorDates: t
1038
+ })
1039
+ ]) : null
1040
+ ), Bt = w(
1043
1041
  {
1044
1042
  /**
1045
1043
  * The initial state of the DatePicker.
@@ -1081,6 +1079,15 @@ const N = globalThis.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
1081
1079
  blockPriorDates: this.blockPriorDates || !1
1082
1080
  })
1083
1081
  ]);
1082
+ },
1083
+ /**
1084
+ * This will run before the component is destroyed.
1085
+ *
1086
+ * @returns {void}
1087
+ */
1088
+ beforeDestroy() {
1089
+ var e;
1090
+ (e = this.dropdown) == null || e.destroy();
1084
1091
  }
1085
1092
  }
1086
1093
  ), Mt = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => X([
package/dist/index.es.js CHANGED
@@ -3,9 +3,9 @@ import { B as g, I as C, L as T } from "./buttons-Cm9etaEG.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 H, W as L } from "./inputs-Dmu4Z-7-.js";
4
4
  import { V as w, a as U } from "./veil-D4dRxILB.js";
5
5
  import { Icons as O } from "./icons.es.js";
6
- import { A as G, B as V, C as j, t as q, E as z, v as J, w as _, x as K, D as Q, j as X, k as Y, H as Z, G as $, s as aa, c as sa, a as ea, b as oa, i as ta, g as ra, e as na, h as ia, F as la, d as pa, f as ua, u as ma, M as da, l as ga, N as Ca, P as Ta, p as ca, q as ba, S as Da, n as Sa, o as Ia, T as Ba, y as Pa, z as Fa, m as Ma, r as ka } from "./confirmation-CTvbiPxJ.js";
7
- import { A as va, b as fa, C as xa, D as ha, a as ya, F as Wa, M as Ha, P as La, c as Aa, g as wa, p as Ua } from "./calendar-yp7wLMMW.js";
8
- import { B as Oa, n as Ea, C as Ga, j as Va, D as ja, l as qa, H as za, I as Ja, N as _a, O as Ka, P as Qa, S as Xa, m as Ya, r as Za, q as $a, o as as, p as ss, T as es, k as os, U as ts, W as rs, f as ns, h as is, i as ls, c as ps, d as us, b as ms, e as ds, a as gs, g as Cs } from "./signature-panel-CueMzzst.js";
6
+ import { A as G, B as V, C as j, t as q, E as z, v as J, w as _, x as K, D as Q, j as X, k as Y, H as Z, G as $, s as aa, c as sa, a as ea, b as oa, i as ta, g as ra, e as na, h as ia, F as la, d as pa, f as ua, u as ma, M as da, l as ga, N as Ca, P as Ta, p as ca, q as ba, S as Da, n as Sa, o as Ia, T as Ba, y as Pa, z as Fa, m as Ma, r as ka } from "./confirmation-BsFhX-NW.js";
7
+ import { A as va, b as fa, C as xa, D as ha, a as ya, F as Wa, M as Ha, P as La, c as Aa, g as wa, p as Ua } from "./calendar-CflR0wpq.js";
8
+ import { B as Oa, n as Ea, C as Ga, j as Va, D as ja, l as qa, H as za, I as Ja, N as _a, O as Ka, P as Qa, S as Xa, m as Ya, r as Za, q as $a, o as as, p as ss, T as es, k as os, U as ts, W as rs, f as ns, h as is, i as ls, c as ps, d as us, b as ms, e as ds, a as gs, g as Cs } from "./signature-panel-BDSk3pg5.js";
9
9
  import { B as cs, I as bs, M as Ds, d as Ss, e as Is, g as Bs, N as Ps, b as Fs, a as Ms, f as ks, P as Ns, c as vs, S as fs, T as xs } from "./mobile-nav-wrapper-Dj67Pb8l.js";
10
10
  import { B as ys, a as Ws, C as Hs, F as Ls, b as As, c as ws, M as Us, P as Rs, S as Os } from "./sidebar-menu-page-BVryQj2Z.js";
11
11
  import { A as Gs, F as Vs, M as js, a as qs, T as zs } from "./aside-template-McEj_Gxc.js";
@@ -1,5 +1,5 @@
1
- import { A as o, B as t, C as e, t as i, E as r, v as n, w as m, x as l, D as S, j as u, k as D, H as c, G as C, s as d, c as g, a as p, b as F, i as T, g as A, e as P, h as f, F as w, d as b, f as B, u as I, M, l as x, N as y, P as k, p as v, q as N, S as h, n as E, o as L, T as R, y as U, z as j, m as q, r as z } from "./confirmation-CTvbiPxJ.js";
2
- import { A as H, P as O, g as _ } from "./calendar-yp7wLMMW.js";
1
+ import { A as o, B as t, C as e, t as i, E as r, v as n, w as m, x as l, D as S, j as u, k as D, H as c, G as C, s as d, c as g, a as p, b as F, i as T, g as A, e as P, h as f, F as w, d as b, f as B, u as I, M, l as x, N as y, P as k, p as v, q as N, S as h, n as E, o as L, T as R, y as U, z as j, m as q, r as z } from "./confirmation-BsFhX-NW.js";
2
+ import { A as H, P as O, g as _ } from "./calendar-CflR0wpq.js";
3
3
  export {
4
4
  o as Alert,
5
5
  H as Avatar,
@@ -1,5 +1,5 @@
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-CueMzzst.js";
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-yp7wLMMW.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-BDSk3pg5.js";
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-CflR0wpq.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-Dj67Pb8l.js";
4
4
  export {
5
5
  s as BackButton,
@@ -4,7 +4,7 @@ import { B as C, I as V } from "./buttons-Cm9etaEG.js";
4
4
  import { Icons as k } from "./icons.es.js";
5
5
  import { TableBody as _, ScrollableTableBody as J, List as Z, IntervalTimer as ee } from "@base-framework/organisms";
6
6
  import { C as te, I as se, H as ae } from "./inputs-Dmu4Z-7-.js";
7
- import { A as ie, P as ne } from "./calendar-yp7wLMMW.js";
7
+ import { A as ie, P as ne } from "./calendar-CflR0wpq.js";
8
8
  d((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.149",
3
+ "version": "1.0.150",
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": {