@base-framework/ui 1.0.292 → 1.0.294

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/atoms.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import { B as e, C as t, F as o, L as n, P as r, R as p, S as u, a as I, T as i } from "./tooltip-Cok_NM7z.js";
2
- import { B as d, I as m, L as C } from "./buttons-BKLL4I6r.js";
3
- import { C as x, F as B, V as F, a as c } from "./veil-tVDPinrr.js";
1
+ import { B as e, C as t, F as o, L as n, P as r, R as p, S as u, a as I, T as i } from "./tooltip-fLU0qdFi.js";
2
+ import { B as d, I as m, L as C } from "./buttons-CHEs54Wl.js";
3
+ import { C as x, F as B, V as F, a as c } from "./veil-B1pwIy-D.js";
4
4
  import { C as f, d as L, D as P, c as R, E as S, F as b, H as h, I as k, M as D, N as V, P as E, R as G, T as H, a as M, b as N, U, W } from "./inputs-DYxmO1rQ.js";
5
5
  export {
6
6
  e as Badge,
@@ -1,7 +1,7 @@
1
- import { I as m, Button as r } from "@base-framework/atoms";
1
+ import { I as u, Button as e } from "@base-framework/atoms";
2
2
  import { Atom as c } from "@base-framework/base";
3
- import { Icons as h } from "./icons.es.js";
4
- const g = {
3
+ import { Icons as r } from "./icons.es.js";
4
+ const m = {
5
5
  xs: "w-4 h-4",
6
6
  sm: "w-6 h-6",
7
7
  md: "w-8 h-8",
@@ -9,41 +9,40 @@ const g = {
9
9
  xl: "w-12 h-12",
10
10
  "2xl": "w-14 h-14",
11
11
  "3xl": "w-16 h-16"
12
- }, l = c((n, t) => {
13
- var s;
14
- const a = g[n.size || "sm"];
15
- return m({
12
+ }, s = c((n, t) => {
13
+ const a = m[n.size || "sm"];
14
+ return u({
16
15
  ...n,
17
16
  class: `stroke-current icon-size ${a} ${n.class || ""}`,
18
- html: (s = t[0]) == null ? void 0 : s.textContent
17
+ html: t[0]?.textContent
19
18
  });
20
- }), i = (n) => c((t, a) => r({
19
+ }), i = (n) => c((t, a) => e({
21
20
  ...n,
22
21
  ...t,
23
22
  class: `bttn ${n.class} ${t.class || ""}`
24
- }, a)), u = c(
25
- (n, t) => r({
23
+ }, a)), h = c(
24
+ (n, t) => e({
26
25
  ...n,
27
26
  class: n.class
28
27
  }, [
29
- n.icon && n.position !== "right" ? l({ size: "sm", class: n.animation ?? null }, n.icon) : null,
28
+ n.icon && n.position !== "right" ? s({ size: "sm", class: n.animation ?? null }, n.icon) : null,
30
29
  ...t || [],
31
- n.icon && n.position === "right" ? l({ size: "sm", class: n.animation ?? null }, n.icon) : null
30
+ n.icon && n.position === "right" ? s({ size: "sm", class: n.animation ?? null }, n.icon) : null
32
31
  ])
33
- ), o = (n) => c((t, a) => u({
32
+ ), l = (n) => c((t, a) => h({
34
33
  ...n,
35
34
  ...t,
36
35
  class: `bttn ${n.class} ${t.class || ""}`
37
- }, a)), w = (n) => () => {
36
+ }, a)), g = (n) => () => {
38
37
  if (n.allowHistory === !0 && globalThis.history.length > 2) {
39
38
  globalThis.history.back();
40
39
  return;
41
40
  }
42
41
  n.backUrl && app.navigate(n.backUrl);
43
- }, k = (n) => c((t, a) => (t.icon = t.icon || h.chevron.single.left, t.click = t.click || w(t), u({
42
+ }, w = (n) => c((t, a) => (t.icon = t.icon || r.chevron.single.left, t.click = t.click || g(t), h({
44
43
  ...n,
45
44
  ...t
46
- }, a))), e = {
45
+ }, a))), o = {
47
46
  primary: i({ class: "primary" }),
48
47
  secondary: i({ class: "secondary" }),
49
48
  destructive: i({ class: "destructive" }),
@@ -51,12 +50,12 @@ const g = {
51
50
  outline: i({ class: "outline" }),
52
51
  ghost: i({ class: "ghost" }),
53
52
  link: i({ class: "link" }),
54
- icon: o({ class: "icon" }),
55
- withIcon: o({ class: "with-icon" }),
56
- back: k({ class: "with-icon back-button" })
57
- }, b = c((n, t) => (e[n.variant] || e.primary)(n, t)), $ = c((n, t) => b({ ...n, variant: "withIcon", icon: h.loading, animation: "animate-spin" }, t));
53
+ icon: l({ class: "icon" }),
54
+ withIcon: l({ class: "with-icon" }),
55
+ back: w({ class: "with-icon back-button" })
56
+ }, k = c((n, t) => (o[n.variant] || o.primary)(n, t)), y = c((n, t) => k({ ...n, variant: "withIcon", icon: r.loading, animation: "animate-spin" }, t));
58
57
  export {
59
- b as B,
60
- l as I,
61
- $ as L
58
+ k as B,
59
+ s as I,
60
+ y as L
62
61
  };
@@ -1,8 +1,8 @@
1
1
  import { Div as n, H5 as Q, P as m, I as p, Li as V, Span as a, Ul as q, Button as f, OnState as A, Label as H, H2 as v, Form as X, Header as D, Footer as L, A as Y, H3 as Z, Checkbox as ee, Input as x, Img as te, Nav as se, UseParent as _, OnStateOpen as P, Time as oe, Dialog as ne } from "@base-framework/atoms";
2
2
  import { Atom as c, Component as w, Html as M, Dom as le, base as re, Data as I, Builder as W, Jot as C, Events as $, DateTime as F } from "@base-framework/base";
3
- import { P as k, b as ie, R as ae } from "./range-calendar-DW0cMOJy.js";
4
- import { C as ce, F as ue, a as y } from "./veil-tVDPinrr.js";
5
- import { B as h, I as g } from "./buttons-BKLL4I6r.js";
3
+ import { P as k, b as ie, R as ae } from "./range-calendar-UXMh98a5.js";
4
+ import { C as ce, F as ue, a as y } from "./veil-B1pwIy-D.js";
5
+ import { B as h, I as g } from "./buttons-CHEs54Wl.js";
6
6
  import { Icons as d } from "./icons.es.js";
7
7
  import { Timer as de, List as he, DynamicTime as fe } from "@base-framework/organisms";
8
8
  import { F as N } from "./format-DnofNaaz.js";
@@ -624,9 +624,8 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
624
624
  g(s),
625
625
  a(t)
626
626
  ])), Ue = (e) => {
627
- var o;
628
627
  const t = document.documentElement;
629
- if (e === "system" && (e = (o = globalThis.matchMedia) != null && o.call(globalThis, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), j && !j("(prefers-color-scheme: " + e + ")").matches) {
628
+ if (e === "system" && (e = globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"), j && !j("(prefers-color-scheme: " + e + ")").matches) {
630
629
  t.classList.add(e);
631
630
  return;
632
631
  }
@@ -777,8 +776,7 @@ const j = globalThis.matchMedia, T = c(({ value: e, label: t, icon: s }) => f({
777
776
  accept: "image/*",
778
777
  class: "hidden",
779
778
  change: (s) => {
780
- var l;
781
- const o = (l = s.target.files) == null ? void 0 : l[0];
779
+ const o = s.target.files?.[0];
782
780
  o && t && (this.state.loaded = !1, t(o, this.parent), this.src = this.getFileUrl(o), this.state.loaded = !0);
783
781
  }
784
782
  }),
@@ -1,8 +1,5 @@
1
- var m = Object.defineProperty;
2
- var x = (l, t, e) => t in l ? m(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
- var f = (l, t, e) => x(l, typeof t != "symbol" ? t + "" : t, e);
4
1
  import { base as r } from "@base-framework/base";
5
- class v {
2
+ class g {
6
3
  /**
7
4
  * Creates an instance of ElementScaler.
8
5
  *
@@ -73,7 +70,7 @@ class v {
73
70
  this.setBoundingBox(), this.containerSize = this.container.getBoundingClientRect();
74
71
  }
75
72
  }
76
- class y {
73
+ class m {
77
74
  /**
78
75
  * Creates an EventController instance.
79
76
  *
@@ -82,77 +79,6 @@ class y {
82
79
  * @param {HTMLElement} container - The DOM element to attach events to.
83
80
  */
84
81
  constructor(t, e) {
85
- /**
86
- * Tracks and measures distances between touches for pinch gestures.
87
- */
88
- f(this, "pinchTracker", {
89
- /** @type {number|null} */
90
- previousDistance: null,
91
- /** @type {number|null} */
92
- currentDistance: null,
93
- /**
94
- * Calculates Euclidean distance between two points.
95
- *
96
- * @param {number} x1
97
- * @param {number} y1
98
- * @param {number} x2
99
- * @param {number} y2
100
- * @returns {number}
101
- */
102
- distance(t, e, s, n) {
103
- return Math.sqrt(
104
- (t - s) * (t - s) + (e - n) * (e - n)
105
- );
106
- },
107
- /**
108
- * If currentDistance is set, store it as previousDistance.
109
- *
110
- * @returns {void}
111
- */
112
- setPreviousDistance() {
113
- this.currentDistance !== null && (this.previousDistance = this.currentDistance);
114
- },
115
- /**
116
- * Sets the current distance between two touch points.
117
- *
118
- * @param {object} touch1
119
- * @param {object} touch2
120
- * @returns {void}
121
- */
122
- setCurrentDistance(t, e) {
123
- this.currentDistance = this.distance(t.x, t.y, e.x, e.y);
124
- },
125
- /**
126
- * Updates currentDistance and keeps track of the previous distance.
127
- *
128
- * @param {object} touch1
129
- * @param {object} touch2
130
- * @returns {number} The updated current distance.
131
- */
132
- updateCurrentDistance(t, e) {
133
- return this.setPreviousDistance(), this.setCurrentDistance(t, e), this.currentDistance;
134
- },
135
- /**
136
- * Determines the scale direction (zoom in/out) based on distance changes.
137
- *
138
- * @param {object} touch1
139
- * @param {object} touch2
140
- * @returns {number} 1 for zoom in, -1 for zoom out, 0 if below threshold.
141
- */
142
- getScale(t, e) {
143
- let s = 0;
144
- const n = this.updateCurrentDistance(t, e), i = this.previousDistance;
145
- return i === null || Math.abs(n - i) < 2 || (n > i ? s = 1 : n < i && (s = -1)), s;
146
- },
147
- /**
148
- * Resets the distance measurements.
149
- *
150
- * @returns {void}
151
- */
152
- reset() {
153
- this.previousDistance = null, this.currentDistance = null;
154
- }
155
- });
156
82
  this.parent = t, this.container = e, this.pointer = { x: 0, y: 0, status: "up" }, this.setup();
157
83
  }
158
84
  /**
@@ -236,6 +162,77 @@ class y {
236
162
  resize() {
237
163
  this.parent.resize();
238
164
  }
165
+ /**
166
+ * Tracks and measures distances between touches for pinch gestures.
167
+ */
168
+ pinchTracker = {
169
+ /** @type {number|null} */
170
+ previousDistance: null,
171
+ /** @type {number|null} */
172
+ currentDistance: null,
173
+ /**
174
+ * Calculates Euclidean distance between two points.
175
+ *
176
+ * @param {number} x1
177
+ * @param {number} y1
178
+ * @param {number} x2
179
+ * @param {number} y2
180
+ * @returns {number}
181
+ */
182
+ distance(t, e, s, n) {
183
+ return Math.sqrt(
184
+ (t - s) * (t - s) + (e - n) * (e - n)
185
+ );
186
+ },
187
+ /**
188
+ * If currentDistance is set, store it as previousDistance.
189
+ *
190
+ * @returns {void}
191
+ */
192
+ setPreviousDistance() {
193
+ this.currentDistance !== null && (this.previousDistance = this.currentDistance);
194
+ },
195
+ /**
196
+ * Sets the current distance between two touch points.
197
+ *
198
+ * @param {object} touch1
199
+ * @param {object} touch2
200
+ * @returns {void}
201
+ */
202
+ setCurrentDistance(t, e) {
203
+ this.currentDistance = this.distance(t.x, t.y, e.x, e.y);
204
+ },
205
+ /**
206
+ * Updates currentDistance and keeps track of the previous distance.
207
+ *
208
+ * @param {object} touch1
209
+ * @param {object} touch2
210
+ * @returns {number} The updated current distance.
211
+ */
212
+ updateCurrentDistance(t, e) {
213
+ return this.setPreviousDistance(), this.setCurrentDistance(t, e), this.currentDistance;
214
+ },
215
+ /**
216
+ * Determines the scale direction (zoom in/out) based on distance changes.
217
+ *
218
+ * @param {object} touch1
219
+ * @param {object} touch2
220
+ * @returns {number} 1 for zoom in, -1 for zoom out, 0 if below threshold.
221
+ */
222
+ getScale(t, e) {
223
+ let s = 0;
224
+ const n = this.updateCurrentDistance(t, e), i = this.previousDistance;
225
+ return i === null || Math.abs(n - i) < 2 || (n > i ? s = 1 : n < i && (s = -1)), s;
226
+ },
227
+ /**
228
+ * Resets the distance measurements.
229
+ *
230
+ * @returns {void}
231
+ */
232
+ reset() {
233
+ this.previousDistance = null, this.currentDistance = null;
234
+ }
235
+ };
239
236
  /**
240
237
  * Extracts all touches from the event object.
241
238
  *
@@ -339,7 +336,7 @@ class y {
339
336
  this.getEventPosition(t), this.isGesture(t) === !1 && this.parent.callAction("pointerMove", t);
340
337
  }
341
338
  }
342
- class B {
339
+ class v {
343
340
  /**
344
341
  * Creates an instance of ImageScaler.
345
342
  *
@@ -347,9 +344,7 @@ class B {
347
344
  * @param {HTMLImageElement} element - The image element to scale.
348
345
  */
349
346
  constructor(t) {
350
- /** @type {number} Minimum allowed scale factor. */
351
- f(this, "minScale", 0.2);
352
- this.elementScaler = new v(t), this.scale = this.getImageScale(t), this.panning = !1, this.events = null, this.start = { x: 0, y: 0 }, this.delta = { x: 0, y: 0 }, this.setup();
347
+ this.elementScaler = new g(t), this.scale = this.getImageScale(t), this.panning = !1, this.events = null, this.start = { x: 0, y: 0 }, this.delta = { x: 0, y: 0 }, this.setup();
353
348
  }
354
349
  /**
355
350
  * Initializes event handling and centers the image.
@@ -384,7 +379,7 @@ class B {
384
379
  * @returns {void}
385
380
  */
386
381
  setupEvents() {
387
- this.events = new y(this, this.elementScaler.element);
382
+ this.events = new m(this, this.elementScaler.element);
388
383
  }
389
384
  /**
390
385
  * Calculates an initial scale based on the element's offsetWidth vs. naturalWidth.
@@ -431,25 +426,27 @@ class B {
431
426
  const s = this.elementScaler, n = s.containerSize, i = s.elementBoundingBox, o = this.delta;
432
427
  t = t || i.width, e = e || i.height;
433
428
  let c, h;
434
- const u = n.width;
435
- if (t < u)
436
- c = u / 2 - t / 2, c = c > 0 ? c : 0;
429
+ const a = n.width;
430
+ if (t < a)
431
+ c = a / 2 - t / 2, c = c > 0 ? c : 0;
437
432
  else {
438
433
  c = o.x;
439
- const a = t + o.x;
440
- a < u && (c = a + (u - a) - t), o.x > 0 && (c = 0);
434
+ const l = t + o.x;
435
+ l < a && (c = l + (a - l) - t), o.x > 0 && (c = 0);
441
436
  }
442
- const p = n.height;
443
- if (e < p)
444
- h = p / 2 - e / 2, h = h > 0 ? h : 0;
437
+ const u = n.height;
438
+ if (e < u)
439
+ h = u / 2 - e / 2, h = h > 0 ? h : 0;
445
440
  else {
446
441
  h = o.y;
447
- const a = e + o.y;
448
- a < p && (h = a + (p - a) - e), o.y > 0 && (h = 0);
442
+ const l = e + o.y;
443
+ l < u && (h = l + (u - l) - e), o.y > 0 && (h = 0);
449
444
  }
450
- const d = s.element.style;
451
- d.left = c + "px", d.top = h + "px", this.delta = { x: c, y: h };
445
+ const f = s.element.style;
446
+ f.left = c + "px", f.top = h + "px", this.delta = { x: c, y: h };
452
447
  }
448
+ /** @type {number} Minimum allowed scale factor. */
449
+ minScale = 0.2;
453
450
  /**
454
451
  * Updates the current scale (zoom) value based on scroll delta.
455
452
  *
@@ -529,5 +526,5 @@ class B {
529
526
  }
530
527
  }
531
528
  export {
532
- B as I
529
+ v as I
533
530
  };
package/dist/index.es.js CHANGED
@@ -1,17 +1,17 @@
1
- import { B as s, C as o, F as t, L as r, P as n, R as l, S as i, a as p, T as m } from "./tooltip-Cok_NM7z.js";
2
- import { B as d, I as g, L as C } from "./buttons-BKLL4I6r.js";
3
- import { C as T, F as D, V as I, a as b } from "./veil-tVDPinrr.js";
1
+ import { B as s, C as o, F as t, L as r, P as n, R as l, S as i, a as p, T as m } from "./tooltip-fLU0qdFi.js";
2
+ import { B as d, I as g, L as C } from "./buttons-CHEs54Wl.js";
3
+ import { C as T, F as D, V as I, a as b } from "./veil-B1pwIy-D.js";
4
4
  import { C as F, d as P, D as B, c as k, E as M, F as f, H as x, I as N, M as v, N as y, P as h, R as L, T as W, a as H, b as A, U as R, W as w } from "./inputs-DYxmO1rQ.js";
5
5
  import { Icons as G } from "./icons.es.js";
6
- import { A as E, B as V, C as j, w as q, J, y as z, z as K, E as Q, G as _, D as X, m as Y, n as Z, O as $, K as aa, v as ea, c as sa, a as oa, b as ta, Q as ra, l as na, g as la, i as ia, h as pa, j as ma, e as ua, k as da, F as ga, d as Ca, f as ca, L as Ta, x as Da, M as Ia, o as ba, N as Sa, P as Fa, s as Pa, t as Ba, S as ka, q as Ma, r as fa, T as xa, H as Na, I as va, p as ya, u as ha } from "./empty-state-D09aUoDA.js";
7
- import { A as Wa, b as Ha, C as Aa, D as Ra, a as wa, F as Ua, M as Ga, P as Oa, R as Ea, c as Va, g as ja, p as qa } from "./range-calendar-DW0cMOJy.js";
8
- import { B as za, p as Ka, C as Qa, j as _a, D as Xa, m as Ya, k as Za, H as $a, I as ae, N as ee, O as se, P as oe, S as te, n as re, o as ne, t as le, s as ie, q as pe, r as me, T as ue, l as de, U as ge, W as Ce, f as ce, h as Te, i as De, c as Ie, d as be, b as Se, e as Fe, a as Pe, g as Be } from "./signature-panel-BEO99NlI.js";
9
- import { B as Me, I as fe, M as xe, d as Ne, e as ve, g as ye, N as he, b as Le, a as We, f as He, P as Ae, c as Re, S as we, T as Ue } from "./mobile-nav-wrapper-C7RyGC5a.js";
10
- import { B as Oe, a as Ee, C as Ve, F as je, b as qe, c as Je, M as ze, P as Ke, S as Qe } from "./sidebar-menu-page-BtUJdw-T.js";
6
+ import { A as E, B as V, C as j, w as q, J, y as z, z as K, E as Q, G as _, D as X, m as Y, n as Z, O as $, K as aa, v as ea, c as sa, a as oa, b as ta, Q as ra, l as na, g as la, i as ia, h as pa, j as ma, e as ua, k as da, F as ga, d as Ca, f as ca, L as Ta, x as Da, M as Ia, o as ba, N as Sa, P as Fa, s as Pa, t as Ba, S as ka, q as Ma, r as fa, T as xa, H as Na, I as va, p as ya, u as ha } from "./empty-state-CJGDcHyo.js";
7
+ import { A as Wa, b as Ha, C as Aa, D as Ra, a as wa, F as Ua, M as Ga, P as Oa, R as Ea, c as Va, g as ja, p as qa } from "./range-calendar-UXMh98a5.js";
8
+ import { B as za, p as Ka, C as Qa, j as _a, D as Xa, m as Ya, k as Za, H as $a, I as ae, N as ee, O as se, P as oe, S as te, n as re, o as ne, t as le, s as ie, q as pe, r as me, T as ue, l as de, U as ge, W as Ce, f as ce, h as Te, i as De, c as Ie, d as be, b as Se, e as Fe, a as Pe, g as Be } from "./signature-panel-vkcc6Dnu.js";
9
+ import { B as Me, I as fe, M as xe, d as Ne, e as ve, g as ye, N as he, b as Le, a as We, f as He, P as Ae, c as Re, S as we, T as Ue } from "./mobile-nav-wrapper-CWqhZ0qz.js";
10
+ import { B as Oe, a as Ee, C as Ve, F as je, b as qe, c as Je, M as ze, P as Ke, S as Qe } from "./sidebar-menu-page-Ddz2TltV.js";
11
11
  import { A as Xe, F as Ye, M as Ze, a as $e, T as as } from "./aside-template-McEj_Gxc.js";
12
12
  import { B as ss } from "./bside-template-Du2m3rsE.js";
13
13
  import { F as ts, c as rs } from "./format-DnofNaaz.js";
14
- import { I as ls } from "./image-scaler-DNyRgMye.js";
14
+ import { I as ls } from "./image-scaler-1G-JzJVG.js";
15
15
  export {
16
16
  E as Alert,
17
17
  Xe as AsideTemplate,
@@ -1,6 +1,6 @@
1
1
  import { Button as S, I as B, Label as N, Span as L, Ul as o, H4 as C, Nav as p, Div as l, Header as y, H1 as P, H3 as h, OnState as I, UseParent as $ } from "@base-framework/atoms";
2
2
  import { Component as n, Atom as i, NavLink as H, router as d } from "@base-framework/base";
3
- import { I as f, B as x } from "./buttons-BKLL4I6r.js";
3
+ import { I as f, B as x } from "./buttons-CHEs54Wl.js";
4
4
  import { Icons as r } from "./icons.es.js";
5
5
  class M extends n {
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { A as s, B as t, C as r, w as e, J as i, y as n, z as m, E as l, G as C, D as d, m as S, n as p, O as u, K as D, v as c, c as g, a as F, b as T, Q as P, l as A, g as f, i as w, h as I, j as b, e as y, k as B, F as M, d as k, f as x, L, x as v, M as E, o as N, N as R, P as U, s as h, t as G, S as O, q as j, r as q, T as z, H, I as J, p as K, u as Q } from "./empty-state-D09aUoDA.js";
2
- import { A as V, P as W, g as X } from "./range-calendar-DW0cMOJy.js";
1
+ import { A as s, B as t, C as r, w as e, J as i, y as n, z as m, E as l, G as C, D as d, m as S, n as p, O as u, K as D, v as c, c as g, a as F, b as T, Q as P, l as A, g as f, i as w, h as I, j as b, e as y, k as B, F as M, d as k, f as x, L, x as v, M as E, o as N, N as R, P as U, s as h, t as G, S as O, q as j, r as q, T as z, H, I as J, p as K, u as Q } from "./empty-state-CJGDcHyo.js";
2
+ import { A as V, P as W, g as X } from "./range-calendar-UXMh98a5.js";
3
3
  export {
4
4
  s as Alert,
5
5
  V as Avatar,
@@ -1,6 +1,6 @@
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 g, O as p, P as u, S as v, n as D, 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-BEO99NlI.js";
2
- import { b as F, C as U, D as G, a as R, F as j, M as q, R as w, c as z, p as A } from "./range-calendar-DW0cMOJy.js";
3
- import { B as J, I as K, M as Q, d as V, e as X, g as Y, N as Z, b as _, a as $, f as aa, P as ea, c as sa, S as ta, T as oa } from "./mobile-nav-wrapper-C7RyGC5a.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 g, O as p, P as u, S as v, n as D, 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-vkcc6Dnu.js";
2
+ import { b as F, C as U, D as G, a as R, F as j, M as q, R as w, c as z, p as A } from "./range-calendar-UXMh98a5.js";
3
+ import { B as J, I as K, M as Q, d as V, e as X, g as Y, N as Z, b as _, a as $, f as aa, P as ea, c as sa, S as ta, T as oa } from "./mobile-nav-wrapper-CWqhZ0qz.js";
4
4
  export {
5
5
  s as BackButton,
6
6
  J as Backdrop,
package/dist/pages.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as s, a as P, C as g, F as n, b as l, c as i, M as r, P as c, S as o } from "./sidebar-menu-page-BtUJdw-T.js";
1
+ import { B as s, a as P, C as g, F as n, b as l, c as i, M as r, P as c, S as o } from "./sidebar-menu-page-Ddz2TltV.js";
2
2
  export {
3
3
  s as BasicPage,
4
4
  P as BlankPage,
@@ -1,6 +1,6 @@
1
1
  import { Div as h, Img as _, Span as H, Button as L, OnState as J, On as z } from "@base-framework/atoms";
2
2
  import { Component as O, Data as B, Atom as j, DateTime as T } from "@base-framework/base";
3
- import { B as f } from "./buttons-BKLL4I6r.js";
3
+ import { B as f } from "./buttons-CHEs54Wl.js";
4
4
  import { Icons as P } from "./icons.es.js";
5
5
  const U = (n, t) => {
6
6
  const e = n ? n.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, c = globalThis.scrollY;
@@ -1,7 +1,7 @@
1
1
  import { Div as t, Header as n, H1 as d, P as o } from "@base-framework/atoms";
2
2
  import { F as l, A as h } from "./aside-template-McEj_Gxc.js";
3
3
  import { Component as x, Atom as i } from "@base-framework/base";
4
- import { c as u, e as p } from "./mobile-nav-wrapper-C7RyGC5a.js";
4
+ import { c as u, e as p } from "./mobile-nav-wrapper-CWqhZ0qz.js";
5
5
  class c extends x {
6
6
  /**
7
7
  * This will declare the props for the compiler.
@@ -1,16 +1,16 @@
1
1
  import { Button as x, Div as o, On as v, Span as D, Th as O, UseParent as F, I as E, Thead as Q, Tr as X, Table as I, P as p, Li as S, Time as q, Nav as C, Ul as w, Section as z, Canvas as K } from "@base-framework/atoms";
2
- import { Atom as h, Component as u, Data as L, DateTime as G, router as y, NavLink as $, DataTracker as N, Jot as V, base as M, Dom as R } from "@base-framework/base";
3
- import { B as T, I as _ } from "./buttons-BKLL4I6r.js";
2
+ import { Atom as d, Component as u, Data as L, DateTime as G, router as b, NavLink as $, DataTracker as N, Jot as V, base as M, Dom as R } from "@base-framework/base";
3
+ import { B as T, I as _ } from "./buttons-CHEs54Wl.js";
4
4
  import { Icons as k } 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-DYxmO1rQ.js";
7
- import { A as oe, P as le } from "./range-calendar-DW0cMOJy.js";
8
- h((t, e) => ({
7
+ import { A as oe, P as le } from "./range-calendar-UXMh98a5.js";
8
+ d((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
11
11
  children: e
12
12
  }));
13
- h(({ value: t, label: e }) => x({
13
+ d(({ value: t, label: e }) => x({
14
14
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-md px-8 py-1 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-background data-[state=active]:text-foreground data-[state=active]:shadow",
15
15
  onState: ["performance", { active: t }],
16
16
  dataSet: ["performance", ["state", t, "active"]],
@@ -67,8 +67,8 @@ const re = (t) => {
67
67
  const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = [];
68
68
  let n = [];
69
69
  for (let l = 1 - s; l <= a; l++) {
70
- const d = new Date(t, e, l);
71
- n.push(l > 0 ? d : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
70
+ const c = new Date(t, e, l);
71
+ n.push(l > 0 ? c : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
72
72
  }
73
73
  return i;
74
74
  }, nt = (t, e) => {
@@ -93,18 +93,18 @@ const re = (t) => {
93
93
  click: () => i(a, s)
94
94
  });
95
95
  }, me = (t, e) => {
96
- const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = de(t, e, s), n = Array.from({ length: a }, (r, g) => new Date(t, e, g + 1)), l = (i.length + n.length) % 7, d = l === 0 ? 0 : 7 - l, c = he(t, e, d), f = [...i, ...n, ...c], m = [];
97
- for (let r = 0; r < f.length; r += 7) {
98
- const g = f.slice(r, r + 7), b = g.find((Y) => Y) || new Date(t, e, 1), { weekNumber: H, year: U } = ce(b);
96
+ const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = de(t, e, s), n = Array.from({ length: a }, (h, g) => new Date(t, e, g + 1)), l = (i.length + n.length) % 7, c = l === 0 ? 0 : 7 - l, r = he(t, e, c), f = [...i, ...n, ...r], m = [];
97
+ for (let h = 0; h < f.length; h += 7) {
98
+ const g = f.slice(h, h + 7), y = g.find((Y) => Y) || new Date(t, e, 1), { weekNumber: A, year: U } = ce(y);
99
99
  m.push({
100
- weekNumber: H,
100
+ weekNumber: A,
101
101
  year: U,
102
102
  days: g
103
103
  });
104
104
  }
105
105
  return m;
106
106
  }, ge = ({ selectWeek: t }) => v("month", (e, s, { data: a }) => {
107
- const { year: i, month: n, currentDate: l } = a, d = me(i, n);
107
+ const { year: i, month: n, currentDate: l } = a, c = me(i, n);
108
108
  return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
110
110
  [
@@ -115,37 +115,37 @@ const re = (t) => {
115
115
  class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
116
116
  },
117
117
  ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
118
- (c) => D({ class: "px-1 py-1", text: c })
118
+ (r) => D({ class: "px-1 py-1", text: r })
119
119
  )
120
120
  ),
121
121
  // Render each "week" row
122
- ...d.map(
123
- ({ weekNumber: c, days: f, year: m }) => o({
122
+ ...c.map(
123
+ ({ weekNumber: r, days: f, year: m }) => o({
124
124
  class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
125
125
  onSet: ["currentWeek", {
126
- ring: c
126
+ ring: r
127
127
  }]
128
128
  }, [
129
129
  // Left column: ISO week number
130
130
  o({
131
131
  class: "font-medium text-center col-span-1 rounded-sm cursor-pointer",
132
- click: () => t(c, m),
132
+ click: () => t(r, m),
133
133
  // If you have a 'currentWeek' state, you can highlight it with 'onSet'
134
134
  onSet: ["currentWeek", {
135
- "text-primary-foreground": c,
136
- "bg-primary": c
135
+ "text-primary-foreground": r,
136
+ "bg-primary": r
137
137
  }],
138
- text: c ? `W${c}` : ""
138
+ text: r ? `W${r}` : ""
139
139
  }),
140
140
  // The 7 cells for each day in the row
141
141
  o(
142
142
  { class: "grid grid-cols-7 col-span-7 text-center" },
143
143
  f.map(
144
- (r) => fe({
145
- year: (r == null ? void 0 : r.getFullYear()) || null,
146
- month: (r == null ? void 0 : r.getMonth()) || null,
147
- day: (r == null ? void 0 : r.getDate()) || null,
148
- weekNumber: c,
144
+ (h) => fe({
145
+ year: h?.getFullYear() || null,
146
+ month: h?.getMonth() || null,
147
+ day: h?.getDate() || null,
148
+ weekNumber: r,
149
149
  selectWeek: t
150
150
  })
151
151
  )
@@ -299,9 +299,9 @@ class ot extends u {
299
299
  const we = (t, e) => {
300
300
  const s = t.toggleAllSelectedRows();
301
301
  e.state.checked = !s;
302
- }, be = (t) => O({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
302
+ }, ye = (t) => O({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
303
  F((e) => new ae({ class: "mr-2", onChange: (s, a) => we(e, a) }))
304
- ]), ye = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
304
+ ]), be = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
305
305
  const l = t || "justify-start";
306
306
  return O({
307
307
  class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
@@ -317,7 +317,7 @@ const we = (t, e) => {
317
317
  class: "text-muted-foreground border-b",
318
318
  map: [
319
319
  t.headers,
320
- (e) => e.label === "checkbox" ? be({ toggle: t.toggle }) : ye({
320
+ (e) => e.label === "checkbox" ? ye({ toggle: t.toggle }) : be({
321
321
  align: e.align,
322
322
  sortable: e.sortable,
323
323
  key: e.key,
@@ -330,13 +330,13 @@ const we = (t, e) => {
330
330
  cache: "list",
331
331
  key: t,
332
332
  items: e,
333
- rowItem: (d) => a(d, s),
333
+ rowItem: (c) => a(c, s),
334
334
  class: "divide-y divide-border",
335
335
  emptyState: i,
336
336
  skeleton: n,
337
337
  columnCount: l
338
338
  });
339
- class j extends u {
339
+ class H extends u {
340
340
  /**
341
341
  * Initializes component data.
342
342
  *
@@ -405,12 +405,7 @@ class j extends u {
405
405
  * @returns {number}
406
406
  */
407
407
  getHeaderColCount() {
408
- var e;
409
- if (this.customHeader) {
410
- const s = this.customHeader, a = s == null ? void 0 : s.children[0];
411
- return (e = a == null ? void 0 : a.children) == null ? void 0 : e.length;
412
- }
413
- return this.headers ? this.headers.length : 3;
408
+ return this.customHeader ? this.customHeader?.children[0]?.children?.length : this.headers ? this.headers.length : 3;
414
409
  }
415
410
  /**
416
411
  * Renders the DataTable component.
@@ -519,7 +514,7 @@ const xe = (t) => new Z({
519
514
  skeleton: t.skeleton,
520
515
  columnCount: t.columnCount
521
516
  });
522
- class ve extends j {
517
+ class ve extends H {
523
518
  /**
524
519
  * Renders the DataTable component.
525
520
  *
@@ -571,7 +566,7 @@ class ve extends j {
571
566
  this.list.refresh();
572
567
  }
573
568
  }
574
- const lt = h((t) => new ve(
569
+ const lt = d((t) => new ve(
575
570
  {
576
571
  cache: t.cache ?? "list",
577
572
  tableData: t.data,
@@ -602,7 +597,7 @@ const lt = h((t) => new ve(
602
597
  skeleton: t.skeleton,
603
598
  columnCount: t.columnCount
604
599
  });
605
- class Se extends j {
600
+ class Se extends H {
606
601
  /**
607
602
  * Renders the DataTable component.
608
603
  *
@@ -656,7 +651,7 @@ class Se extends j {
656
651
  this.list.refresh();
657
652
  }
658
653
  }
659
- const rt = h((t) => new Se(
654
+ const rt = d((t) => new Se(
660
655
  {
661
656
  cache: t.cache ?? "list",
662
657
  tableData: t.data,
@@ -674,7 +669,7 @@ const rt = h((t) => new Se(
674
669
  emptyState: t.emptyState,
675
670
  skeleton: t.skeleton
676
671
  }
677
- )), Ce = h(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
672
+ )), Ce = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
678
673
  p({ class: "text-base font-semibold leading-6 m-0" }, t),
679
674
  p({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
680
675
  ])), Ie = () => o({ class: "flex items-center gap-x-1.5" }, [
@@ -685,10 +680,10 @@ const rt = h((t) => new Se(
685
680
  ]), Le = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
686
681
  D("Last seen "),
687
682
  q({ datetime: t }, "3h ago")
688
- ]), Te = (t, e) => t === "online" ? Ie() : Le(e), Be = h(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
683
+ ]), Te = (t, e) => t === "online" ? Ie() : Le(e), Be = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
689
684
  p({ class: "text-sm leading-6 m-0" }, t),
690
685
  Te(s, e)
691
- ])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Re = h((t) => S({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
686
+ ])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Re = d((t) => S({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
692
687
  o({ class: "flex min-w-0 gap-x-4" }, [
693
688
  oe({ src: t.image, alt: t.name, fallbackText: Me(t.name) }),
694
689
  Ce({ name: t.name, email: t.email })
@@ -698,7 +693,7 @@ const rt = h((t) => new Se(
698
693
  lastSeen: t.lastSeen,
699
694
  status: t.status
700
695
  })
701
- ])), ct = h((t) => new te({
696
+ ])), ct = d((t) => new te({
702
697
  cache: "list",
703
698
  key: "name",
704
699
  items: t.users,
@@ -740,7 +735,7 @@ class dt extends u {
740
735
  class: "flex space-x-4",
741
736
  map: [this.options, (e) => this.addLink(e)],
742
737
  watch: {
743
- value: ["[[path]]", y.data],
738
+ value: ["[[path]]", b.data],
744
739
  callBack: this.updateLinks.bind(this)
745
740
  }
746
741
  })
@@ -753,7 +748,7 @@ class dt extends u {
753
748
  * @returns {void}
754
749
  */
755
750
  afterSetup() {
756
- const e = y.data.path;
751
+ const e = b.data.path;
757
752
  this.updateLinks(e);
758
753
  }
759
754
  /**
@@ -810,13 +805,13 @@ class dt extends u {
810
805
  this.links = [];
811
806
  }
812
807
  }
813
- const ht = h((t) => {
808
+ const ht = d((t) => {
814
809
  const e = t.margin || "m-4 ml-0";
815
810
  return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
816
811
  T({ variant: "back", class: "ghost", ...t })
817
812
  ]);
818
813
  });
819
- class A extends u {
814
+ class j extends u {
820
815
  /**
821
816
  * This will declare the props for the compiler.
822
817
  *
@@ -909,7 +904,7 @@ N.addType("dockableOverlay", (t) => {
909
904
  const e = t.component;
910
905
  e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
911
906
  });
912
- class ut extends A {
907
+ class ut extends j {
913
908
  /**
914
909
  * This will stop presistence.
915
910
  *
@@ -1018,7 +1013,7 @@ class ut extends A {
1018
1013
  document.documentElement.style.overflowY = "auto";
1019
1014
  }
1020
1015
  }
1021
- class ft extends A {
1016
+ class ft extends j {
1022
1017
  /**
1023
1018
  * This will get the overlay type.
1024
1019
  *
@@ -1037,7 +1032,7 @@ class ft extends A {
1037
1032
  this.container = e, this.initialize();
1038
1033
  }
1039
1034
  }
1040
- const ze = h(({ index: t, click: e, state: s }, a) => S({
1035
+ const ze = d(({ index: t, click: e, state: s }, a) => S({
1041
1036
  class: "p-2 cursor-pointer hover:bg-muted/50",
1042
1037
  onState: [
1043
1038
  [s, "selectedIndex", {
@@ -1046,10 +1041,10 @@ const ze = h(({ index: t, click: e, state: s }, a) => S({
1046
1041
  }]
1047
1042
  ],
1048
1043
  click: () => e(t)
1049
- }, a)), $e = h(({ selectOption: t, state: e }) => w({
1044
+ }, a)), $e = d(({ selectOption: t, state: e }) => w({
1050
1045
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
1051
1046
  for: ["filteredOptions", (s, a) => ze({ index: a, click: t, state: e }, s.label)]
1052
- })), Ne = h((t) => o({ class: "relative flex items-center" }, [
1047
+ })), Ne = d((t) => o({ class: "relative flex items-center" }, [
1053
1048
  ie({
1054
1049
  cache: "input",
1055
1050
  class: t.class ?? "",
@@ -1068,7 +1063,7 @@ const ze = h(({ index: t, click: e, state: s }, a) => S({
1068
1063
  t.icon && o({ class: "absolute flex right-0 mr-2" }, [
1069
1064
  _(t.icon)
1070
1065
  ])
1071
- ])), je = (t) => o({
1066
+ ])), He = (t) => o({
1072
1067
  class: "relative flex fle-auto flex-col",
1073
1068
  onState: ["open", (e, s, a) => {
1074
1069
  if (e)
@@ -1190,7 +1185,7 @@ const ze = h(({ index: t, click: e, state: s }, a) => S({
1190
1185
  // @ts-ignore
1191
1186
  handleKeyDown: this.handleKeyDown.bind(this)
1192
1187
  }),
1193
- je({
1188
+ He({
1194
1189
  // @ts-ignore
1195
1190
  state: this.state,
1196
1191
  // @ts-ignore
@@ -1201,7 +1196,7 @@ const ze = h(({ index: t, click: e, state: s }, a) => S({
1201
1196
  ]);
1202
1197
  }
1203
1198
  }
1204
- ), Ae = (t) => S(
1199
+ ), je = (t) => S(
1205
1200
  {
1206
1201
  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",
1207
1202
  dataSet: ["selected", ["state", t.value, "active"]]
@@ -1213,8 +1208,8 @@ const ze = h(({ index: t, click: e, state: s }, a) => S({
1213
1208
  click: (e) => t.callBack(t.value)
1214
1209
  }, t.label)
1215
1210
  ]
1216
- ), He = (t, e) => (t.callBack = e, Ae(t)), Ue = (t) => C({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1217
- w({ class: "flex flex-auto flex-row", map: [t.options, (e) => He(e, t.callBack)] })
1211
+ ), Ae = (t, e) => (t.callBack = e, je(t)), Ue = (t) => C({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1212
+ w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ae(e, t.callBack)] })
1218
1213
  ]);
1219
1214
  class gt extends u {
1220
1215
  /**
@@ -1250,8 +1245,7 @@ class gt extends u {
1250
1245
  * @returns {*}
1251
1246
  */
1252
1247
  getFirstValue() {
1253
- var e;
1254
- return (e = this.options[0]) == null ? void 0 : e.value;
1248
+ return this.options[0]?.value;
1255
1249
  }
1256
1250
  /**
1257
1251
  * This will update the component.
@@ -1357,9 +1351,8 @@ class pt extends u {
1357
1351
  * @returns {object}
1358
1352
  */
1359
1353
  setupStates() {
1360
- var e;
1361
1354
  return {
1362
- selected: ((e = this.options[0]) == null ? void 0 : e.value) || null
1355
+ selected: this.options[0]?.value || null
1363
1356
  };
1364
1357
  }
1365
1358
  }
@@ -1399,7 +1392,7 @@ class Ke extends u {
1399
1392
  class: "flex flex-auto flex-row",
1400
1393
  map: [this.options, (e) => this.addLink(e)],
1401
1394
  watch: {
1402
- value: ["[[path]]", y.data],
1395
+ value: ["[[path]]", b.data],
1403
1396
  callBack: this.updateLinks.bind(this)
1404
1397
  }
1405
1398
  })
@@ -1411,7 +1404,7 @@ class Ke extends u {
1411
1404
  * @returns {void}
1412
1405
  */
1413
1406
  afterSetup() {
1414
- const e = y.data.path;
1407
+ const e = b.data.path;
1415
1408
  this.updateLinks(e);
1416
1409
  }
1417
1410
  /**
@@ -1585,8 +1578,8 @@ class Ge extends u {
1585
1578
  s = f.clientX, a = f.clientY;
1586
1579
  } else
1587
1580
  s = e.x || e.clientX, a = e.y || e.clientY;
1588
- const d = parseInt((s - l.left) * n), c = parseInt((a - l.top) * n);
1589
- this.mouse.x = d, this.mouse.y = c;
1581
+ const c = parseInt((s - l.left) * n), r = parseInt((a - l.top) * n);
1582
+ this.mouse.x = c, this.mouse.y = r;
1590
1583
  }
1591
1584
  /**
1592
1585
  * Called when the pointer goes down on the canvas.
@@ -1661,12 +1654,12 @@ class Ge extends u {
1661
1654
  */
1662
1655
  scale() {
1663
1656
  const e = this.canvas, s = this.container, a = R.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1664
- let d = n + "px", c = l + "px";
1657
+ let c = n + "px", r = l + "px";
1665
1658
  if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
1666
- const f = a.width, m = a.height, r = f / n, g = m / l, b = Math.min(r, g);
1667
- d = n * b + "px", c = l * b + "px";
1659
+ const f = a.width, m = a.height, h = f / n, g = m / l, y = Math.min(h, g);
1660
+ c = n * y + "px", r = l * y + "px";
1668
1661
  }
1669
- e.style.width = d, e.style.height = c;
1662
+ e.style.width = c, e.style.height = r;
1670
1663
  }
1671
1664
  /**
1672
1665
  * Main drawing loop. If the mouse is down, adds a line
@@ -1740,7 +1733,7 @@ class Ge extends u {
1740
1733
  this.timer.stop(), this.status = "stopped";
1741
1734
  }
1742
1735
  }
1743
- class bt extends u {
1736
+ class yt extends u {
1744
1737
  /**
1745
1738
  * Sets up default properties for the signature panel.
1746
1739
  *
@@ -1820,12 +1813,12 @@ class bt extends u {
1820
1813
  }
1821
1814
  export {
1822
1815
  ht as B,
1823
- be as C,
1816
+ ye as C,
1824
1817
  ke as D,
1825
- ye as H,
1818
+ be as H,
1826
1819
  ft as I,
1827
1820
  dt as N,
1828
- A as O,
1821
+ j as O,
1829
1822
  at as P,
1830
1823
  rt as S,
1831
1824
  B as T,
@@ -1840,7 +1833,7 @@ export {
1840
1833
  de as g,
1841
1834
  ge as h,
1842
1835
  pe as i,
1843
- j,
1836
+ H as j,
1844
1837
  lt as k,
1845
1838
  ct as l,
1846
1839
  ut as m,
@@ -1850,5 +1843,5 @@ export {
1850
1843
  pt as q,
1851
1844
  Ke as r,
1852
1845
  wt as s,
1853
- bt as t
1846
+ yt as t
1854
1847
  };
@@ -1,6 +1,6 @@
1
- import { Span as c, Legend as b, Fieldset as C, Div as l, UseParent as u, Input as x } from "@base-framework/atoms";
2
- import { Atom as s, Html as p } from "@base-framework/base";
3
- import { a as d } from "./veil-tVDPinrr.js";
1
+ import { Span as c, Legend as b, Fieldset as p, Div as l, UseParent as u, Input as C } from "@base-framework/atoms";
2
+ import { Atom as s, Html as x } from "@base-framework/base";
3
+ import { a as d } from "./veil-B1pwIy-D.js";
4
4
  import { f as h, e as y, g as k } from "./inputs-DYxmO1rQ.js";
5
5
  const a = {
6
6
  gray: {
@@ -82,14 +82,14 @@ const a = {
82
82
  const { backgroundColor: e, textColor: r, ringColor: o } = w(t);
83
83
  return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${e} ${r} ${o}`;
84
84
  }, T = s((t, e) => {
85
- const r = $(t == null ? void 0 : t.type);
85
+ const r = $(t?.type);
86
86
  return c({ ...t, class: r }, e);
87
87
  }), v = s((t, e) => b({
88
88
  ...t,
89
89
  class: ` font-medium -mt-4 -mx-1 px-2 py-2 ${t.class || ""}`
90
90
  }, e)), L = s((t, e) => {
91
91
  const r = t.border === "full" ? "border rounded-md" : "border-t";
92
- return C({
92
+ return p({
93
93
  ...t,
94
94
  class: `p-6 ${r} ${t.class || ""}`
95
95
  }, [
@@ -146,7 +146,7 @@ const a = {
146
146
  style: ["left: [[filledPercentage]]%", t]
147
147
  }),
148
148
  // Hidden Range Input
149
- x({
149
+ C({
150
150
  type: "range",
151
151
  min: ["[[min]]", t],
152
152
  max: ["[[max]]", t],
@@ -171,7 +171,7 @@ const a = {
171
171
  ), G = s((t) => ({
172
172
  tag: "select",
173
173
  onCreated(e) {
174
- t.options && p.setupSelectOptions(e, t.options);
174
+ t.options && x.setupSelectOptions(e, t.options);
175
175
  },
176
176
  ...t,
177
177
  class: `${k} ${t.class || ""}`.trim()
package/dist/utils.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { F as e, c } from "./format-DnofNaaz.js";
2
- import { I as t } from "./image-scaler-DNyRgMye.js";
2
+ import { I as t } from "./image-scaler-1G-JzJVG.js";
3
3
  export {
4
4
  e as Format,
5
5
  t as ImageScaler,
@@ -0,0 +1,46 @@
1
+ import { Div as s, H4 as l, P as d } from "@base-framework/atoms";
2
+ import { Atom as r, Jot as o, Component as c } from "@base-framework/base";
3
+ const u = r((t, a) => {
4
+ const e = t.margin ?? "my-5 mx-5", n = t.padding ?? "p-4";
5
+ return t.hover && (t.class += " hover:shadow-lg hover:bg-muted/50"), s({
6
+ ...t,
7
+ class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${e} ${n} ${t.class || ""}`
8
+ }, a);
9
+ }), x = r((t, a) => {
10
+ const e = t.border === !0 ? "border-t" : "";
11
+ return s({
12
+ ...t,
13
+ class: `grid grid-cols-1 gap-y-4 sm:grid-cols-[1fr,2fr] sm:gap-x-6 pt-8 ${e} ${t.class || ""}`
14
+ }, [
15
+ t.label && s({
16
+ ...t.labelProps,
17
+ class: `space-y-1 ${t.labelProps?.class || ""}`
18
+ }, [
19
+ l({ class: "text-base" }, t.label),
20
+ t.description && d({ class: "text-sm text-muted-foreground" }, t.description)
21
+ ]),
22
+ // Controls container: grows to fill remaining space, spacing between items
23
+ s({ class: "flex flex-col space-y-4" }, a)
24
+ ]);
25
+ });
26
+ class i extends c {
27
+ /**
28
+ * This will set the component context.
29
+ *
30
+ * @param {object|null} context
31
+ * @returns {object|null}
32
+ */
33
+ setContext(a) {
34
+ if (this.data)
35
+ return null;
36
+ const e = this?.parent?.data ?? this?.parent?.context?.data ?? this?.parent?.state ?? null;
37
+ return e ? { data: e } : null;
38
+ }
39
+ }
40
+ const b = (t) => o(t, i);
41
+ export {
42
+ u as C,
43
+ x as F,
44
+ i as V,
45
+ b as a
46
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.292",
3
+ "version": "1.0.294",
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": {
@@ -26,19 +26,17 @@
26
26
  "url": "https://github.com/chrisdurfee/ui/issues"
27
27
  },
28
28
  "devDependencies": {
29
- "autoprefixer": "^10.4.20",
30
29
  "esbuild": "^0.25.0",
31
- "postcss": "^8.4.47",
32
- "tailwindcss": "^3.4.13"
30
+ "tailwindcss": "^4.0.0"
33
31
  },
34
32
  "dependencies": {
35
33
  "@base-framework/atoms": "^1.0.41",
36
34
  "@base-framework/base": "^3.0.295",
37
35
  "@base-framework/organisms": "^1.0.69",
36
+ "@tailwindcss/vite": "^4.0.0",
38
37
  "d3": "^7.9.0",
39
- "tailwindcss-animate": "^1.0.7",
40
38
  "typescript": "^5.7.3",
41
- "vite": "^6.1.1"
39
+ "vite": "^7.1.3"
42
40
  },
43
41
  "types": "./dist/types/**/*.d.ts",
44
42
  "files": [
@@ -1,48 +0,0 @@
1
- import { Div as r, H4 as c, P as i } from "@base-framework/atoms";
2
- import { Atom as o, Jot as m, Component as g } from "@base-framework/base";
3
- const f = o((t, s) => {
4
- const a = t.margin ?? "my-5 mx-5", e = t.padding ?? "p-4";
5
- return t.hover && (t.class += " hover:shadow-lg hover:bg-muted/50"), r({
6
- ...t,
7
- class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${a} ${e} ${t.class || ""}`
8
- }, s);
9
- }), h = o((t, s) => {
10
- var e;
11
- const a = t.border === !0 ? "border-t" : "";
12
- return r({
13
- ...t,
14
- class: `grid grid-cols-1 gap-y-4 sm:grid-cols-[1fr,2fr] sm:gap-x-6 pt-8 ${a} ${t.class || ""}`
15
- }, [
16
- t.label && r({
17
- ...t.labelProps,
18
- class: `space-y-1 ${((e = t.labelProps) == null ? void 0 : e.class) || ""}`
19
- }, [
20
- c({ class: "text-base" }, t.label),
21
- t.description && i({ class: "text-sm text-muted-foreground" }, t.description)
22
- ]),
23
- // Controls container: grows to fill remaining space, spacing between items
24
- r({ class: "flex flex-col space-y-4" }, s)
25
- ]);
26
- });
27
- class u extends g {
28
- /**
29
- * This will set the component context.
30
- *
31
- * @param {object|null} context
32
- * @returns {object|null}
33
- */
34
- setContext(s) {
35
- var e, n, l, d;
36
- if (this.data)
37
- return null;
38
- const a = ((e = this == null ? void 0 : this.parent) == null ? void 0 : e.data) ?? ((l = (n = this == null ? void 0 : this.parent) == null ? void 0 : n.context) == null ? void 0 : l.data) ?? ((d = this == null ? void 0 : this.parent) == null ? void 0 : d.state) ?? null;
39
- return a ? { data: a } : null;
40
- }
41
- }
42
- const $ = (t) => m(t, u);
43
- export {
44
- f as C,
45
- h as F,
46
- u as V,
47
- $ as a
48
- };