@base-framework/ui 1.0.165 → 1.0.166

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { Div as n, H5 as _, P as b, I as g, Li as O, Span as a, Ul as V, Button as m, OnState as y, 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 v, UseParent as Q, Time as X, Dialog as Z } from "@base-framework/atoms";
2
- import { Atom as c, Component as p, Html as L, Dom as ee, base as te, Data as C, Builder as H, Jot as k, DateTime as $ } from "@base-framework/base";
1
+ import { Div as n, H5 as _, P as p, I as g, Li as O, Span as a, Ul as V, Button as m, OnState as y, 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 v, UseParent as Q, Time as X, Dialog as Z } from "@base-framework/atoms";
2
+ import { Atom as c, Component as b, Html as L, Dom as ee, base as te, Data as C, Builder as H, Jot as k, DateTime as $ } from "@base-framework/base";
3
3
  import { P as S, b as se } from "./calendar-DQXME-2u.js";
4
4
  import { B as h, I as x } from "./buttons-Cm9etaEG.js";
5
5
  import { Icons as u } from "./icons.es.js";
@@ -33,7 +33,7 @@ const P = {
33
33
  }
34
34
  }, ie = (e, t) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
35
35
  g({ html: e })
36
- ]), ae = (e) => _({ class: "font-semibold" }, e), ce = (e) => b({ class: "text-sm text-muted-foreground" }, e), ft = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
36
+ ]), ae = (e) => _({ class: "font-semibold" }, e), ce = (e) => p({ class: "text-sm text-muted-foreground" }, e), ft = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
37
37
  const { borderColor: r, bgColor: l, iconColor: i } = P[o] || P.default;
38
38
  return n({ class: `flex items-start p-4 border rounded-lg ${l} ${r}` }, [
39
39
  // Icon and content
@@ -44,7 +44,7 @@ const P = {
44
44
  ])
45
45
  ]);
46
46
  });
47
- class de extends p {
47
+ class de extends b {
48
48
  /**
49
49
  * This will declare the props for the compiler.
50
50
  *
@@ -77,12 +77,12 @@ const ue = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
77
77
  e.shortcut && ue(e.shortcut)
78
78
  ]), ge = (e, t) => V({ class: "grid gap-2" }, [
79
79
  e.map((s) => fe(s, t))
80
- ]), be = (e) => n({ class: "w-full z-10" }, [
80
+ ]), pe = (e) => n({ class: "w-full z-10" }, [
81
81
  n({
82
82
  class: "max-h-60 border rounded-md overflow-y-auto p-1 grid gap-2 divide-y divide-border",
83
83
  for: ["groups", (t) => ge(t, e)]
84
84
  })
85
- ]), pe = ({ label: e, icon: t, toggleDropdown: s }) => m({
85
+ ]), be = ({ label: e, icon: t, toggleDropdown: s }) => m({
86
86
  cache: "button",
87
87
  class: `inline-flex items-center justify-between rounded-md border border-input
88
88
  bg-background px-2 py-2 text-sm font-medium hover:bg-muted
@@ -99,11 +99,11 @@ const ue = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e),
99
99
  parent: o,
100
100
  button: o.button
101
101
  }, [
102
- be(e)
102
+ pe(e)
103
103
  ]) : null
104
104
  )
105
105
  ]);
106
- class gt extends p {
106
+ class gt extends b {
107
107
  /**
108
108
  * This will declare the props for the compiler.
109
109
  *
@@ -157,7 +157,7 @@ class gt extends p {
157
157
  */
158
158
  render() {
159
159
  return n({ class: "relative" }, [
160
- pe({
160
+ be({
161
161
  label: this.label,
162
162
  icon: this.icon,
163
163
  toggleDropdown: this.toggleDropdown.bind(this)
@@ -166,7 +166,7 @@ class gt extends p {
166
166
  ]);
167
167
  }
168
168
  }
169
- const we = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), ye = c((e, t) => R({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), ve = c((e, t) => b({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Ce = c((e, t) => b({ ...e, class: "text-sm text-destructive" }, t)), ke = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", U = (e, t, s) => e.map((o) => (o.children && o.children.length > 0 && (o.children = U(o.children, t, s)), o.required && ke(o) ? {
169
+ const we = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), ye = c((e, t) => R({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), ve = c((e, t) => p({ ...e, class: "text-sm text-muted-foreground italic" }, t)), Ce = c((e, t) => p({ ...e, class: "text-sm text-destructive" }, t)), ke = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", U = (e, t, s) => e.map((o) => (o.children && o.children.length > 0 && (o.children = U(o.children, t, s)), o.required && ke(o) ? {
170
170
  ...o,
171
171
  aria: {
172
172
  invalid: ["hasError"]
@@ -183,7 +183,7 @@ const we = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
183
183
  ...e,
184
184
  class: "w-full"
185
185
  }, r);
186
- }), bt = D(
186
+ }), pt = D(
187
187
  {
188
188
  /**
189
189
  * The initial state of the FormField.
@@ -226,7 +226,7 @@ const we = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
226
226
  e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
227
227
  }, Ie = c(
228
228
  (e, t) => W({ ...e, submit: (s, o) => De(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
229
- ), pt = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), xt = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
229
+ ), bt = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), xt = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
230
230
  e.title && A({ class: "font-semibold" }, e.title),
231
231
  ...t
232
232
  ])), wt = (e, t) => n({ class: "flex justify-between" }, [
@@ -267,7 +267,7 @@ const we = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
267
267
  M({ class: "modal-footer sticky bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
268
268
  ])
269
269
  ])), Ae = (e) => H.render(e, app.root);
270
- class vt extends p {
270
+ class vt extends b {
271
271
  /**
272
272
  * This will declare the props for the compiler.
273
273
  *
@@ -532,7 +532,7 @@ class Pe extends de {
532
532
  n({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
533
533
  this.title && Be(this.title)
534
534
  ]),
535
- b({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
535
+ p({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
536
536
  (this.primary || this.secondary) && M({ class: "margin-top-24 flex align-center" }, this.getButtons())
537
537
  ])
538
538
  ]),
@@ -555,7 +555,7 @@ class Pe extends de {
555
555
  }
556
556
  }
557
557
  let Fe = 0;
558
- class Ct extends p {
558
+ class Ct extends b {
559
559
  /**
560
560
  * This will render the component.
561
561
  *
@@ -1058,7 +1058,7 @@ class Mt extends oe {
1058
1058
  * @returns {void}
1059
1059
  */
1060
1060
  afterSetup() {
1061
- this.state.selectedDate = this.input.value;
1061
+ this.input.value && (this.state.selectedDate = this.input.value);
1062
1062
  }
1063
1063
  /**
1064
1064
  * Renders the DatePicker component.
@@ -1276,7 +1276,7 @@ const Pt = D(
1276
1276
  n({ class: "flex flex-auto flex-col gap-4" }, [
1277
1277
  n({ class: "flex flex-auto flex-col space-y-2" }, [
1278
1278
  ot(e),
1279
- e.description && b({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
1279
+ e.description && p({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
1280
1280
  n({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
1281
1281
  ]),
1282
1282
  e.buttons && M({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:space-x-2" }, e.buttons)
@@ -1310,7 +1310,7 @@ const Pt = D(
1310
1310
  iconColor: "text-muted-foreground"
1311
1311
  }
1312
1312
  };
1313
- class lt extends p {
1313
+ class lt extends b {
1314
1314
  /**
1315
1315
  * This will declare the props for the compiler.
1316
1316
  *
@@ -1429,14 +1429,14 @@ export {
1429
1429
  kt as T,
1430
1430
  fe as a,
1431
1431
  gt as b,
1432
- be as c,
1432
+ pe as c,
1433
1433
  ye as d,
1434
1434
  ve as e,
1435
1435
  Ce as f,
1436
1436
  Se as g,
1437
- bt as h,
1437
+ pt as h,
1438
1438
  Ie as i,
1439
- pt as j,
1439
+ bt as j,
1440
1440
  xt as k,
1441
1441
  Pe as l,
1442
1442
  St as m,
package/dist/index.es.js CHANGED
@@ -3,7 +3,7 @@ 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-Bs4hp7Bj.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-BO_EbQkm.js";
7
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-DQXME-2u.js";
8
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-C8UM0F7Y.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";
@@ -1,4 +1,4 @@
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-Bs4hp7Bj.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-BO_EbQkm.js";
2
2
  import { A as H, P as O, g as _ } from "./calendar-DQXME-2u.js";
3
3
  export {
4
4
  o as Alert,
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * This will create a date picker component.
5
5
  *
6
- * @type {typeof Veil}
6
+ * @class
7
7
  */
8
8
  export class DatePicker extends Veil {
9
9
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.165",
3
+ "version": "1.0.166",
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": {