@base-framework/ui 1.0.192 → 1.0.193
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.
|
@@ -2,7 +2,7 @@ import { Div as n, H5 as R, P as g, I as b, Li as O, Span as a, Ul as V, Button
|
|
|
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
3
|
import { P as T, b as oe } from "./calendar-DQXME-2u.js";
|
|
4
4
|
import { B as h, I as p } from "./buttons-Cm9etaEG.js";
|
|
5
|
-
import { Icons as
|
|
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";
|
|
7
7
|
import { a as w } from "./veil-D4dRxILB.js";
|
|
8
8
|
const P = {
|
|
@@ -44,7 +44,7 @@ const P = {
|
|
|
44
44
|
])
|
|
45
45
|
]);
|
|
46
46
|
});
|
|
47
|
-
class
|
|
47
|
+
class de extends x {
|
|
48
48
|
/**
|
|
49
49
|
* This will declare the props for the compiler.
|
|
50
50
|
*
|
|
@@ -68,13 +68,13 @@ class ue extends x {
|
|
|
68
68
|
te.addClass(t, s), se.on("animationend", t, (o) => L.removeElement(t));
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const ue = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e), he = (e) => a({ class: "flex w-4 h-4", html: e }), me = (e) => a({ class: "flex-auto" }, e), fe = (e, t) => O({
|
|
72
72
|
class: "relative flex cursor-pointer hover:bg-muted/50 select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
73
73
|
click: () => t(e)
|
|
74
74
|
}, [
|
|
75
75
|
e.icon && he(e.icon),
|
|
76
76
|
me(e.label),
|
|
77
|
-
e.shortcut &&
|
|
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
80
|
]), be = (e) => n({ class: "w-full z-10" }, [
|
|
@@ -239,7 +239,7 @@ const we = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
239
239
|
/**
|
|
240
240
|
* Back Button
|
|
241
241
|
*/
|
|
242
|
-
s && h({ variant: "icon", icon:
|
|
242
|
+
s && h({ variant: "icon", icon: u.arrows.left, class: "mr-2 p-0 flex sm:hidden", click: (l, i) => i.close() }),
|
|
243
243
|
/**
|
|
244
244
|
* Icon
|
|
245
245
|
*/
|
|
@@ -464,7 +464,7 @@ const F = {
|
|
|
464
464
|
click: () => e(),
|
|
465
465
|
role: "alert"
|
|
466
466
|
}, s));
|
|
467
|
-
class Le extends
|
|
467
|
+
class Le extends de {
|
|
468
468
|
/**
|
|
469
469
|
* This will declare the props for the compiler.
|
|
470
470
|
*
|
|
@@ -548,7 +548,7 @@ class Le extends ue {
|
|
|
548
548
|
h({
|
|
549
549
|
class: "absolute top-[12px] right-[12px]",
|
|
550
550
|
variant: "icon",
|
|
551
|
-
icon:
|
|
551
|
+
icon: u.x,
|
|
552
552
|
click: this.close.bind(this)
|
|
553
553
|
})
|
|
554
554
|
];
|
|
@@ -628,9 +628,9 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
|
|
|
628
628
|
render() {
|
|
629
629
|
return n({ class: "flex flex-auto flex-col" }, [
|
|
630
630
|
n({ class: "grid grid-cols-3 gap-4" }, [
|
|
631
|
-
$({ label: "System", value: "system", icon:
|
|
632
|
-
$({ label: "Light", value: "light", icon:
|
|
633
|
-
$({ label: "Dark", value: "dark", icon:
|
|
631
|
+
$({ label: "System", value: "system", icon: u.adjustments.horizontal }),
|
|
632
|
+
$({ label: "Light", value: "light", icon: u.sun }),
|
|
633
|
+
$({ label: "Dark", value: "dark", icon: u.moon })
|
|
634
634
|
])
|
|
635
635
|
]);
|
|
636
636
|
},
|
|
@@ -729,7 +729,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
|
|
|
729
729
|
class: "mx-3 text-muted-foreground",
|
|
730
730
|
"aria-hidden": !0,
|
|
731
731
|
size: "xs"
|
|
732
|
-
},
|
|
732
|
+
}, u.chevron.single.right), je = (e) => n({ class: "flex items-center" }, [
|
|
733
733
|
e.href ? ze(e.href, e.label) : a(e.label),
|
|
734
734
|
e.separator && Ee()
|
|
735
735
|
]), It = I(
|
|
@@ -833,7 +833,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
|
|
|
833
833
|
},
|
|
834
834
|
[
|
|
835
835
|
a({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
|
|
836
|
-
b({ html:
|
|
836
|
+
b({ html: u.chevron.upDown })
|
|
837
837
|
]
|
|
838
838
|
), Ue = (e, t, s) => O({
|
|
839
839
|
class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
|
|
@@ -964,19 +964,19 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
|
|
|
964
964
|
icon: e,
|
|
965
965
|
"aria-label": s
|
|
966
966
|
}), Re = ({ click: e }) => _({
|
|
967
|
-
icon:
|
|
967
|
+
icon: u.circleMinus,
|
|
968
968
|
click: e,
|
|
969
969
|
ariaLabel: "Decrement"
|
|
970
970
|
}), We = ({ click: e }) => _({
|
|
971
|
-
icon:
|
|
971
|
+
icon: u.circlePlus,
|
|
972
972
|
click: e,
|
|
973
973
|
ariaLabel: "Increment"
|
|
974
974
|
}), Ge = ({ bind: e, min: t, max: s, readonly: o = !1 }) => X(({ state: r }) => S({
|
|
975
975
|
value: ["[[count]]", r],
|
|
976
976
|
bind: e,
|
|
977
977
|
blur: (l, { state: i }) => {
|
|
978
|
-
let
|
|
979
|
-
isNaN(
|
|
978
|
+
let d = parseInt(l.target.value, 10);
|
|
979
|
+
isNaN(d) && (d = t ?? 0), t !== void 0 && (d = Math.max(d, t)), s !== void 0 && (d = Math.min(d, s)), i.count = d;
|
|
980
980
|
},
|
|
981
981
|
class: "flex flex-auto text-lg font-medium bg-transparent text-center border min-w-0",
|
|
982
982
|
readonly: o,
|
|
@@ -1031,7 +1031,7 @@ const N = globalThis.matchMedia, $ = c(({ value: e, label: t, icon: s }) => m({
|
|
|
1031
1031
|
a({
|
|
1032
1032
|
onState: ["selectedDate", (o) => o ? B.format("standard", o) : "Pick a date"]
|
|
1033
1033
|
}),
|
|
1034
|
-
b({ html:
|
|
1034
|
+
b({ html: u.calendar.days })
|
|
1035
1035
|
]), Qe = ({ handleDateSelect: e, blockPriorDates: t }) => v(
|
|
1036
1036
|
"open",
|
|
1037
1037
|
(s, o, r) => s ? new T({
|
|
@@ -1118,7 +1118,7 @@ function Ze({ bind: e, required: t, toggleOpen: s }) {
|
|
|
1118
1118
|
a({
|
|
1119
1119
|
onState: ["selectedTime", (o) => o || "Pick a time"]
|
|
1120
1120
|
}),
|
|
1121
|
-
b({ html:
|
|
1121
|
+
b({ html: u.clock })
|
|
1122
1122
|
]
|
|
1123
1123
|
);
|
|
1124
1124
|
}
|
|
@@ -1195,10 +1195,10 @@ function E(e) {
|
|
|
1195
1195
|
const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = e.match(t);
|
|
1196
1196
|
if (!s)
|
|
1197
1197
|
return { hour: null, minute: null, meridian: null };
|
|
1198
|
-
let [, o, r, , l] = s, i = parseInt(o, 10),
|
|
1199
|
-
return i < 0 || i > 23 ||
|
|
1198
|
+
let [, o, r, , l] = s, i = parseInt(o, 10), d = parseInt(r, 10);
|
|
1199
|
+
return i < 0 || i > 23 || d < 0 || d > 59 ? { hour: null, minute: null, meridian: null } : (l ? (l = l.toUpperCase(), l === "PM" && i < 12 ? i += 12 : l === "AM" && i === 12 && (i = 12)) : i === 0 ? (l = "AM", i = 12) : i < 12 ? l = "AM" : i === 12 ? l = "PM" : (l = "PM", i -= 12), {
|
|
1200
1200
|
hour: i.toString().padStart(2, "0"),
|
|
1201
|
-
minute:
|
|
1201
|
+
minute: d.toString().padStart(2, "0"),
|
|
1202
1202
|
meridian: l
|
|
1203
1203
|
});
|
|
1204
1204
|
}
|
|
@@ -1330,8 +1330,8 @@ class lt extends x {
|
|
|
1330
1330
|
* @returns {object}
|
|
1331
1331
|
*/
|
|
1332
1332
|
render() {
|
|
1333
|
-
const t = (
|
|
1334
|
-
|
|
1333
|
+
const t = (d) => {
|
|
1334
|
+
d.target === this.panel && this.close();
|
|
1335
1335
|
}, { borderColor: s, bgColor: o, iconColor: r } = j[this.type] || j.default, l = `${this.getMainClass()} ${o} ${s}`, i = this.title || "Dialog Title";
|
|
1336
1336
|
return ot({
|
|
1337
1337
|
class: l,
|
|
@@ -1418,7 +1418,7 @@ class Pt extends lt {
|
|
|
1418
1418
|
this.confirmed && this.confirmed(), this.close();
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
|
-
const Ft = c((e, t = []) => n({ class: "w-full max-w-
|
|
1421
|
+
const Ft = c((e, t = []) => n({ class: "w-full max-w-md p-6 m-auto" }, [
|
|
1422
1422
|
q({ class: "flex flex-auto flex-col" }, [
|
|
1423
1423
|
n({ class: "flex flex-auto flex-col space-y-4" }, [
|
|
1424
1424
|
n({ class: "flex flex-auto items-center justify-center" }, [
|
|
@@ -1438,7 +1438,7 @@ export {
|
|
|
1438
1438
|
mt as A,
|
|
1439
1439
|
It as B,
|
|
1440
1440
|
wt as C,
|
|
1441
|
-
|
|
1441
|
+
de as D,
|
|
1442
1442
|
Pt as E,
|
|
1443
1443
|
we as F,
|
|
1444
1444
|
ot as G,
|
package/dist/index.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { B as g, I as T, L as c } from "./buttons-Cm9etaEG.js";
|
|
|
3
3
|
import { C as D, d as b, D as I, c as S, E as B, F as P, H as F, I as M, M as k, N, P as v, R as f, T as x, a as y, b as h, U as W, W as H } from "./inputs-CMjx5-IX.js";
|
|
4
4
|
import { V as A, a as w } from "./veil-D4dRxILB.js";
|
|
5
5
|
import { Icons as R } from "./icons.es.js";
|
|
6
|
-
import { A as O, B as G, C as V, t as j, E as q, v as z, w as J, x as _, D as K, j as Q, k as X, H as Y, G as Z, s as $, c as aa, a as sa, b as ea, I as ta, i as oa, 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 Ta, P as ca, p as Ca, q as Da, S as ba, n as Ia, o as Sa, T as Ba, y as Pa, z as Fa, m as Ma, r as ka } from "./empty-state-
|
|
6
|
+
import { A as O, B as G, C as V, t as j, E as q, v as z, w as J, x as _, D as K, j as Q, k as X, H as Y, G as Z, s as $, c as aa, a as sa, b as ea, I as ta, i as oa, 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 Ta, P as ca, p as Ca, q as Da, S as ba, n as Ia, o as Sa, T as Ba, y as Pa, z as Fa, m as Ma, r as ka } from "./empty-state-CWXZVNA5.js";
|
|
7
7
|
import { A as va, b as fa, C as xa, D as ya, a as ha, 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 Ea, p as Oa, C as Ga, j as Va, D as ja, m as qa, k as za, H as Ja, I as _a, N as Ka, O as Qa, P as Xa, S as Ya, n as Za, o as $a, t as as, s as ss, q as es, r as ts, T as os, l as rs, U as ns, W as is, f as ls, h as ps, i as us, c as ms, d as ds, b as gs, e as Ts, a as cs, g as Cs } from "./signature-panel-BFO2icpZ.js";
|
|
9
9
|
import { B as bs, I as Is, M as Ss, d as Bs, e as Ps, g as Fs, N as Ms, b as ks, a as Ns, f as vs, P as fs, c as xs, S as ys, T as hs } from "./mobile-nav-wrapper-Dj67Pb8l.js";
|
package/dist/molecules.es.js
CHANGED
|
@@ -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 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-
|
|
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-CWXZVNA5.js";
|
|
2
2
|
import { A as O, P as _, g as J } from "./calendar-DQXME-2u.js";
|
|
3
3
|
export {
|
|
4
4
|
o as Alert,
|
package/package.json
CHANGED