@base-framework/ui 1.0.210 → 1.0.211

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,12 +1,12 @@
1
1
  import { Div as i, Img as j, Span as P, Button as I, OnState as W } from "@base-framework/atoms";
2
2
  import { Component as N, Data as Y, Atom as z, DateTime as B } from "@base-framework/base";
3
- import { B as m } from "./buttons-Cm9etaEG.js";
3
+ import { B as p } from "./buttons-Cm9etaEG.js";
4
4
  import { Icons as S } from "./icons.es.js";
5
5
  const H = (e, t) => {
6
- const n = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, s = t.getBoundingClientRect(), r = 10, a = globalThis.scrollX, l = globalThis.scrollY;
7
- let c = n.left + a, g = n.bottom + l;
6
+ const n = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, s = t.getBoundingClientRect(), a = 10, r = globalThis.scrollX, l = globalThis.scrollY;
7
+ let c = n.left + r, g = n.bottom + l;
8
8
  const d = globalThis.innerHeight - n.bottom, h = n.top;
9
- return c + s.width > globalThis.innerWidth && (c = globalThis.innerWidth - s.width - r), d < s.height && h > d ? g = n.top + l - s.height - r : d < s.height && (g = n.bottom + l - (s.height - d) - r), { x: c, y: g };
9
+ return c + s.width > globalThis.innerWidth && (c = globalThis.innerWidth - s.width - a), d < s.height && h > d ? g = n.top + l - s.height - a : d < s.height && (g = n.bottom + l - (s.height - d) - a), { x: c, y: g };
10
10
  };
11
11
  class ht extends N {
12
12
  /**
@@ -167,34 +167,34 @@ const R = z(({ src: e, alt: t }) => e ? j({
167
167
  "4xl": "text-5xl",
168
168
  default: "text-base"
169
169
  }, G = (e) => T[e] || T.default, L = (e) => k[e] || k.default, U = (e, t = null, n = "md") => {
170
- const s = O(e), r = L(n);
170
+ const s = O(e), a = L(n);
171
171
  return i(
172
172
  {
173
173
  class: `
174
174
  flex items-center justify-center w-full h-full rounded-full
175
175
  bg-muted text-muted-foreground font-medium
176
- ${r}
176
+ ${a}
177
177
  `
178
178
  },
179
179
  [
180
180
  t ? E(t) : P({ class: "uppercase" }, s)
181
181
  ]
182
182
  );
183
- }, dt = z(({ src: e, alt: t, fallbackText: n, watcherFallback: s, size: r }) => {
184
- const a = G(r);
183
+ }, dt = z(({ src: e, alt: t, fallbackText: n, watcherFallback: s, size: a }) => {
184
+ const r = G(a);
185
185
  return i(
186
186
  {
187
- class: `relative flex items-center justify-center ${a}`
187
+ class: `relative flex items-center justify-center ${r}`
188
188
  },
189
189
  [
190
190
  R({ src: e, alt: t }),
191
- U(n, s, r)
191
+ U(n, s, a)
192
192
  ]
193
193
  );
194
194
  }), _ = ({ currentYear: e, onSelect: t }) => i(
195
195
  { class: "grid grid-cols-3 gap-2" },
196
196
  B.monthNames.map(
197
- (n, s) => m(
197
+ (n, s) => p(
198
198
  {
199
199
  click: () => t(s),
200
200
  variant: "ghost",
@@ -204,15 +204,15 @@ const R = z(({ src: e, alt: t }) => e ? j({
204
204
  )
205
205
  )
206
206
  ), D = (e) => (e *= 1, e < 10 ? `0${e}` : String(e)), q = (e) => (e.indexOf("T") === -1 && e.indexOf(" ") === -1 && (e += "T00:00:01"), e.replace(" ", "T"), e), x = (e, t, n) => `${e}-${D(t + 1)}-${D(n)}`, J = (e) => e ? "bg-accent text-primary" : "", K = (e) => e ? "text-muted-foreground opacity-50" : "", Q = (e, t) => e === t, V = (e, t) => Q(e, t) ? "bg-primary text-primary-foreground" : "", Z = (e, t, n, s) => {
207
- const r = V(t, s);
208
- return r || (e ? J(e) : n ? K(n) : "text-foreground");
207
+ const a = V(t, s);
208
+ return a || (e ? J(e) : n ? K(n) : "text-foreground");
209
209
  }, C = (e) => {
210
210
  const {
211
211
  day: t,
212
212
  currentDate: n,
213
213
  date: s,
214
- isToday: r,
215
- isOutsideMonth: a,
214
+ isToday: a,
215
+ isOutsideMonth: r,
216
216
  select: l,
217
217
  disabled: c
218
218
  } = e;
@@ -220,7 +220,7 @@ const R = z(({ src: e, alt: t }) => e ? j({
220
220
  {
221
221
  class: `
222
222
  flex items-center justify-center h-9 w-auto p-0 font-normal text-sm rounded-md
223
- ${Z(r, n, a, s)}
223
+ ${Z(a, n, r, s)}
224
224
  hover:bg-muted/50 hover:text-muted-foreground focus:z-10
225
225
  disabled:pointer-events-none disabled:opacity-50
226
226
  `,
@@ -232,9 +232,9 @@ const R = z(({ src: e, alt: t }) => e ? j({
232
232
  t.toString()
233
233
  );
234
234
  }, M = (e, t, n, s) => e === s.date && t === s.month && n === s.year, tt = (e, t, n, s = !1) => {
235
- const { year: r, month: a } = e, l = x(r, a, e.date), c = new Date(r, a, 1).getDay(), g = new Date(r, a + 1, 0).getDate(), d = new Date(r, a, 0).getDate(), h = [], y = a === 0 ? 11 : a - 1, w = a === 0 ? r - 1 : r;
235
+ const { year: a, month: r } = e, l = x(a, r, e.date), c = new Date(a, r, 1).getDay(), g = new Date(a, r + 1, 0).getDate(), d = new Date(a, r, 0).getDate(), h = [], y = r === 0 ? 11 : r - 1, w = r === 0 ? a - 1 : a;
236
236
  for (let o = c - 1; o >= 0; o--) {
237
- const u = d - o, f = M(u, y, w, t), p = new Date(w, y, u) < new Date(t.year, t.month, t.date), F = s && p;
237
+ const u = d - o, f = M(u, y, w, t), m = new Date(w, y, u) < new Date(t.year, t.month, t.date), F = s && m;
238
238
  h.push(
239
239
  C({
240
240
  day: u,
@@ -248,22 +248,22 @@ const R = z(({ src: e, alt: t }) => e ? j({
248
248
  );
249
249
  }
250
250
  for (let o = 1; o <= g; o++) {
251
- const u = M(o, a, r, t), f = new Date(r, a, o) < new Date(t.year, t.month, t.date), p = s && f;
251
+ const u = M(o, r, a, t), f = new Date(a, r, o) < new Date(t.year, t.month, t.date), m = s && f;
252
252
  h.push(
253
253
  C({
254
254
  day: o,
255
255
  currentDate: l,
256
- date: x(r, a, o),
256
+ date: x(a, r, o),
257
257
  isToday: u,
258
258
  isOutsideMonth: !1,
259
259
  select: n,
260
- disabled: p
260
+ disabled: m
261
261
  })
262
262
  );
263
263
  }
264
- const v = a === 11 ? 0 : a + 1, b = a === 11 ? r + 1 : r, A = (7 - h.length % 7) % 7;
264
+ const v = r === 11 ? 0 : r + 1, b = r === 11 ? a + 1 : a, A = (7 - h.length % 7) % 7;
265
265
  for (let o = 1; o <= A; o++) {
266
- const u = M(o, v, b, t), f = new Date(b, v, o) < new Date(t.year, t.month, t.date), p = s && f;
266
+ const u = M(o, v, b, t), f = new Date(b, v, o) < new Date(t.year, t.month, t.date), m = s && f;
267
267
  h.push(
268
268
  C({
269
269
  day: o,
@@ -272,12 +272,12 @@ const R = z(({ src: e, alt: t }) => e ? j({
272
272
  isToday: u,
273
273
  isOutsideMonth: !0,
274
274
  select: n,
275
- disabled: p
275
+ disabled: m
276
276
  })
277
277
  );
278
278
  }
279
279
  return h;
280
- }, $ = ({ label: e, click: t }) => m(
280
+ }, $ = ({ label: e, click: t }) => p(
281
281
  {
282
282
  class: `
283
283
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -291,14 +291,14 @@ const R = z(({ src: e, alt: t }) => e ? j({
291
291
  icon: e === "Previous" ? S.chevron.single.left : S.chevron.single.right
292
292
  }
293
293
  ), et = ({ onMonthClick: e, onYearClick: t, next: n, previous: s }) => i({ class: "flex items-center justify-center space-x-2 relative min-h-12 text-sm font-medium" }, [
294
- m({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
295
- m({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
294
+ p({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
295
+ p({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
296
296
  $({ label: "Previous", click: s }),
297
297
  $({ label: "Next", click: n })
298
298
  ]), nt = (e) => i(
299
299
  { class: "flex items-center justify-center h-9 w-auto text-[0.8rem] font-normal text-muted-foreground" },
300
300
  e
301
- ), st = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(nt), rt = (e) => i({ class: "rdp w-full space-y-1" }, [
301
+ ), st = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(nt), at = (e) => i({ class: "rdp w-full space-y-1" }, [
302
302
  et({
303
303
  onMonthClick: e.onMonthClick,
304
304
  onYearClick: e.onYearClick,
@@ -323,18 +323,18 @@ const R = z(({ src: e, alt: t }) => e ? j({
323
323
  ]
324
324
  ]
325
325
  })
326
- ]), at = ({ currentMonth: e, currentYear: t, onSelect: n }) => {
327
- const s = t - 50, r = Array.from({ length: 101 }, (a, l) => s + l);
326
+ ]), rt = ({ currentMonth: e, currentYear: t, onSelect: n }) => {
327
+ const s = t - 50, a = Array.from({ length: 101 }, (r, l) => s + l);
328
328
  return i(
329
- { class: "grid grid-cols-5 gap-2" },
330
- r.map(
331
- (a) => m(
329
+ { class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
330
+ a.map(
331
+ (r) => p(
332
332
  {
333
- click: () => n(a),
333
+ click: () => n(r),
334
334
  variant: "ghost",
335
- "aria-label": `Select ${a}`
335
+ "aria-label": `Select ${r}`
336
336
  },
337
- a.toString()
337
+ r.toString()
338
338
  )
339
339
  )
340
340
  );
@@ -429,8 +429,8 @@ class gt extends N {
429
429
  * @returns {void}
430
430
  */
431
431
  setCurrentDate(t, n, s = null) {
432
- const r = this.data;
433
- r.current.month = t, r.current.year = n, typeof s == "number" && (r.current.date = D(s)), r.currentDate = `${n}-${D(t + 1)}-${r.current.date}`, r.monthName = this.getMonthName(t);
432
+ const a = this.data;
433
+ a.current.month = t, a.current.year = n, typeof s == "number" && (a.current.date = D(s)), a.currentDate = `${n}-${D(t + 1)}-${a.current.date}`, a.monthName = this.getMonthName(t);
434
434
  }
435
435
  /**
436
436
  * This will select a date.
@@ -461,7 +461,7 @@ class gt extends N {
461
461
  }
462
462
  );
463
463
  case "years":
464
- return at(
464
+ return rt(
465
465
  {
466
466
  currentMonth: this.data.current.month,
467
467
  currentYear: this.data.current.year,
@@ -471,7 +471,7 @@ class gt extends N {
471
471
  }
472
472
  );
473
473
  default:
474
- return rt({
474
+ return at({
475
475
  current: this.data.current,
476
476
  today: this.data.today,
477
477
  select: (n) => this.selectDate(n),
@@ -491,7 +491,7 @@ export {
491
491
  tt as C,
492
492
  C as D,
493
493
  x as F,
494
- rt as M,
494
+ at as M,
495
495
  ht as P,
496
496
  nt as a,
497
497
  gt as b,
@@ -1,6 +1,6 @@
1
1
  import { Div as n, H5 as R, P as g, I as b, Li as O, Span as a, Ul as V, Button as m, OnState as v, Label as W, Form as G, H2 as C, Header as k, Footer as M, A as Y, H3 as J, Checkbox as K, Nav as Q, Input as S, UseParent as X, Time as Z, Dialog as ee } from "@base-framework/atoms";
2
2
  import { Atom as c, Component as x, Html as L, Dom as te, base as se, Data as D, Builder as H, Jot as I, DateTime as B } from "@base-framework/base";
3
- import { P as T, b as oe } from "./calendar-Drlwc-pr.js";
3
+ import { P as T, b as oe } from "./calendar-DoabaVau.js";
4
4
  import { B as h, I as p } from "./buttons-Cm9etaEG.js";
5
5
  import { Icons as u } from "./icons.es.js";
6
6
  import { Timer as ne, List as le, DynamicTime as re } from "@base-framework/organisms";
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 D, d as I, D as S, c as B, E as P, F, H as M, I as k, M as N, N as f, P as v, R as x, T as y, a as h, b as W, U as H, W as L } from "./inputs-CMjx5-IX.js";
4
4
  import { V as w, a as U } from "./veil-D4dRxILB.js";
5
5
  import { Icons as E } from "./icons.es.js";
6
- import { A as O, 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, i as ra, g as na, e as la, h as ia, F as pa, d as ua, f as ma, u as da, M as ca, l as ga, N as Ca, P as Ta, p as ba, q as Da, S as Ia, n as Sa, o as Ba, T as Pa, y as Fa, z as Ma, m as ka, r as Na } from "./empty-state-JuhAfRyR.js";
7
- import { A as va, b as xa, C as ya, D as ha, a as Wa, F as Ha, M as La, P as Aa, c as wa, g as Ua, p as Ra } from "./calendar-Drlwc-pr.js";
8
- import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, S as Za, n as $a, o as as, t as ss, s as es, q as os, r as ts, T as rs, l as ns, U as ls, W as is, f as ps, h as us, i as ms, c as ds, d as cs, b as gs, e as Cs, a as Ts, g as bs } from "./signature-panel-DS9pkFpG.js";
6
+ import { A as O, 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, i as ra, g as na, e as la, h as ia, F as pa, d as ua, f as ma, u as da, M as ca, l as ga, N as Ca, P as Ta, p as ba, q as Da, S as Ia, n as Sa, o as Ba, T as Pa, y as Fa, z as Ma, m as ka, r as Na } from "./empty-state-CnYPIYw4.js";
7
+ import { A as va, b as xa, C as ya, D as ha, a as Wa, F as Ha, M as La, P as Aa, c as wa, g as Ua, p as Ra } from "./calendar-DoabaVau.js";
8
+ import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, S as Za, n as $a, o as as, t as ss, s as es, q as os, r as ts, T as rs, l as ns, U as ls, W as is, f as ps, h as us, i as ms, c as ds, d as cs, b as gs, e as Cs, a as Ts, g as bs } from "./signature-panel-gLm-vDNI.js";
9
9
  import { B as Is, I as Ss, M as Bs, d as Ps, e as Fs, g as Ms, N as ks, b as Ns, a as fs, f as vs, P as xs, c as ys, S as hs, T as Ws } from "./mobile-nav-wrapper-Dj67Pb8l.js";
10
10
  import { B as Ls, a as As, C as ws, F as Us, b as Rs, c as Es, M as Gs, P as Os, S as Vs } from "./sidebar-menu-page-BVryQj2Z.js";
11
11
  import { A as qs, F as zs, M as Js, a as _s, T as Ks } 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 p, s as C, c as d, a as g, b as F, I as T, i as A, g as P, e as f, h as w, F as I, d as b, f as y, u as B, M, l as x, N as k, P as v, p as E, q as N, S as h, n as L, o as R, T as U, y as j, z as q, m as z, r as G } from "./empty-state-JuhAfRyR.js";
2
- import { A as O, P as _, g as J } from "./calendar-Drlwc-pr.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 p, s as C, c as d, a as g, b as F, I as T, i as A, g as P, e as f, h as w, F as I, d as b, f as y, u as B, M, l as x, N as k, P as v, p as E, q as N, S as h, n as L, o as R, T as U, y as j, z as q, m as z, r as G } from "./empty-state-CnYPIYw4.js";
2
+ import { A as O, P as _, g as J } from "./calendar-DoabaVau.js";
3
3
  export {
4
4
  o as Alert,
5
5
  O as Avatar,
@@ -1,5 +1,5 @@
1
- import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as p, O as u, P as v, S as D, n as g, o as N, t as k, s as c, q as C, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } from "./signature-panel-DS9pkFpG.js";
2
- import { b as F, C as U, D as G, a as j, F as q, M as w, c as z, p as A } from "./calendar-Drlwc-pr.js";
1
+ import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as p, O as u, P as v, S as D, n as g, o as N, t as k, s as c, q as C, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } from "./signature-panel-gLm-vDNI.js";
2
+ import { b as F, C as U, D as G, a as j, F as q, M as w, c as z, p as A } from "./calendar-DoabaVau.js";
3
3
  import { B as J, I as K, M as Q, d as R, e as V, g as X, N as Y, b as Z, a as _, f as $, P as aa, c as ea, S as sa, T as ta } from "./mobile-nav-wrapper-Dj67Pb8l.js";
4
4
  export {
5
5
  s as BackButton,
@@ -4,7 +4,7 @@ import { B as T, I as _ } from "./buttons-Cm9etaEG.js";
4
4
  import { Icons as x } from "./icons.es.js";
5
5
  import { TableBody as J, DataTableBody as Z, ScrollableTableBody as ee, List as te, IntervalTimer as se } from "@base-framework/organisms";
6
6
  import { C as ae, I as ie, H as ne } from "./inputs-CMjx5-IX.js";
7
- import { A as oe, P as le } from "./calendar-Drlwc-pr.js";
7
+ import { A as oe, P as le } from "./calendar-DoabaVau.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.210",
3
+ "version": "1.0.211",
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": {