@base-framework/ui 1.0.85 → 1.0.87
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 f, Li as O, Span as a, Ul as V, Button as h, OnState as v, Label as
|
|
2
|
-
import { Atom as c, Component as p, Html as L, Dom as Z, base as ee, Data as k, Builder as q, Jot as S, DateTime as
|
|
1
|
+
import { Div as n, H5 as _, P as b, I as f, Li as O, Span as a, Ul as V, Button as h, OnState as v, Label as W, Form as R, H2 as A, Header as B, Footer as M, A as Y, H3 as G, Checkbox as J, Nav as K, Input as C, Time as Q, Dialog as X } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as c, Component as p, Html as L, Dom as Z, base as ee, Data as k, Builder as q, Jot as S, DateTime as $ } from "@base-framework/base";
|
|
3
3
|
import { P as D, b as te } from "./calendar-BDqm833e.js";
|
|
4
4
|
import { B as u, I as x } from "./buttons-CVEwmPAi.js";
|
|
5
5
|
import { Icons as d } from "./icons.es.js";
|
|
@@ -166,7 +166,7 @@ class mt extends p {
|
|
|
166
166
|
]);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
const pe = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), xe = c((e, t) =>
|
|
169
|
+
const pe = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), xe = c((e, t) => W({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), we = c((e, t) => b({ ...e, class: "text-sm text-muted-foreground italic" }, t)), ye = c((e, t) => b({ ...e, class: "text-sm text-destructive" }, t)), ve = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", H = (e, t, s) => e.map((o) => (o.children && o.children.length > 0 && (o.children = H(o.children, t, s)), o.required && ve(o) ? {
|
|
170
170
|
...o,
|
|
171
171
|
aria: {
|
|
172
172
|
invalid: ["hasError"]
|
|
@@ -225,14 +225,14 @@ const pe = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
225
225
|
), ke = (e, t, s = null) => {
|
|
226
226
|
e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
|
|
227
227
|
}, Se = c(
|
|
228
|
-
(e, t) =>
|
|
228
|
+
(e, t) => R({ ...e, submit: (s, o) => ke(s, o, e.submit), class: `w-full ${e.class ?? ""}` }, t)
|
|
229
229
|
), gt = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), bt = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
|
|
230
|
-
e.title &&
|
|
230
|
+
e.title && A({ class: "font-semibold" }, e.title),
|
|
231
231
|
...t
|
|
232
232
|
])), pt = (e, t) => n({ class: "flex justify-between" }, [
|
|
233
233
|
a({ class: "text-muted-foreground" }, e),
|
|
234
234
|
a(t)
|
|
235
|
-
]), De = ({ title: e, description: t, back: s, icon: o, options: r = [] }) =>
|
|
235
|
+
]), De = ({ title: e, description: t, back: s, icon: o, options: r = [] }) => B({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
|
|
236
236
|
/**
|
|
237
237
|
* Back Button
|
|
238
238
|
*/
|
|
@@ -246,7 +246,7 @@ const pe = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
246
246
|
*/
|
|
247
247
|
n({ class: "flex flex-auto flex-row justify-between w-full ml-2 gap-2" }, [
|
|
248
248
|
n({ class: "flex flex-auto flex-col" }, [
|
|
249
|
-
|
|
249
|
+
A({ class: "text-lg font-semibold m-0" }, e),
|
|
250
250
|
t && n({ class: "text-sm text-muted-foreground" }, t)
|
|
251
251
|
]),
|
|
252
252
|
...r
|
|
@@ -415,7 +415,7 @@ class xt extends p {
|
|
|
415
415
|
this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(), document.documentElement.style.overflowY = "auto";
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
const
|
|
418
|
+
const N = {
|
|
419
419
|
info: {
|
|
420
420
|
bgColor: "bg-muted/10",
|
|
421
421
|
borderColor: "border-blue-500",
|
|
@@ -441,13 +441,13 @@ const z = {
|
|
|
441
441
|
borderColor: "border",
|
|
442
442
|
iconColor: "text-muted-foreground"
|
|
443
443
|
}
|
|
444
|
-
},
|
|
444
|
+
}, $e = (e) => B({ class: "flex justify-center" }, [
|
|
445
445
|
G({ class: "text-lg font-bold mb-0" }, e)
|
|
446
|
-
]),
|
|
446
|
+
]), Ae = c(({ href: e, class: t }, s) => Y({
|
|
447
447
|
class: `pullRightIn bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
|
|
448
448
|
href: e,
|
|
449
449
|
role: "alert"
|
|
450
|
-
}, s)),
|
|
450
|
+
}, s)), Be = c(({ close: e, class: t }, s) => n({
|
|
451
451
|
class: `pullRightIn bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
|
|
452
452
|
click: () => e(),
|
|
453
453
|
role: "alert"
|
|
@@ -476,10 +476,10 @@ class Me extends ae {
|
|
|
476
476
|
*/
|
|
477
477
|
render() {
|
|
478
478
|
const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), r = this.href || null, l = this.getChildren(o);
|
|
479
|
-
return r ?
|
|
479
|
+
return r ? Ae({
|
|
480
480
|
href: r,
|
|
481
481
|
class: `${t} ${s}`
|
|
482
|
-
}, l) :
|
|
482
|
+
}, l) : Be({
|
|
483
483
|
close: this.close.bind(this),
|
|
484
484
|
class: `${t} ${s}`
|
|
485
485
|
}, l);
|
|
@@ -500,7 +500,7 @@ class Me extends ae {
|
|
|
500
500
|
*/
|
|
501
501
|
getTypeStyles() {
|
|
502
502
|
const t = this.type || "default";
|
|
503
|
-
return
|
|
503
|
+
return N[t] || N.default;
|
|
504
504
|
}
|
|
505
505
|
/**
|
|
506
506
|
* This will get the buttons for the notification.
|
|
@@ -527,7 +527,7 @@ class Me extends ae {
|
|
|
527
527
|
this.icon && f({ class: `mr-4 ${t}`, html: this.icon }),
|
|
528
528
|
n({ class: "flex flex-auto flex-col" }, [
|
|
529
529
|
n({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
|
|
530
|
-
this.title &&
|
|
530
|
+
this.title && $e(this.title)
|
|
531
531
|
]),
|
|
532
532
|
b({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
|
|
533
533
|
(this.primary || this.secondary) && M({ class: "margin-top-24 flex align-center" }, this.getButtons())
|
|
@@ -587,7 +587,7 @@ class wt extends p {
|
|
|
587
587
|
this.list.delete(t.id);
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
const
|
|
590
|
+
const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
591
591
|
class: 'text-sm gap-1 font-medium leading-none disabled:cursor-not-allowed disabled:opacity-70 flex flex-col items-center justify-between rounded-md border-2 bg-popover p-4 hover:bg-accent hover:text-accent-foreground data-[state="active"]:border-primary [&:has([data-state="active"])]:border-primary',
|
|
592
592
|
onState: ["method", { active: e }],
|
|
593
593
|
dataSet: ["method", ["state", e, "active"]],
|
|
@@ -600,7 +600,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
600
600
|
])), Pe = (e) => {
|
|
601
601
|
var o;
|
|
602
602
|
const t = document.documentElement;
|
|
603
|
-
if (e === "system" && (e = (o = window.matchMedia) != null && o.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light"),
|
|
603
|
+
if (e === "system" && (e = (o = window.matchMedia) != null && o.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), z && !z("(prefers-color-scheme: " + e + ")").matches) {
|
|
604
604
|
t.classList.add(e);
|
|
605
605
|
return;
|
|
606
606
|
}
|
|
@@ -695,8 +695,8 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
695
695
|
OFFLINE: "bg-gray-500",
|
|
696
696
|
BUSY: "bg-red-500",
|
|
697
697
|
AWAY: "bg-yellow-500"
|
|
698
|
-
},
|
|
699
|
-
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${
|
|
698
|
+
}, Ne = (e = "") => (e = e.toUpperCase(), m[e] || m.OFFLINE), Ct = (e) => n({
|
|
699
|
+
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${Ne(e)}`
|
|
700
700
|
}), kt = ({ propName: e = "status" } = {}) => n({
|
|
701
701
|
class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
|
|
702
702
|
onSet: [e, {
|
|
@@ -705,7 +705,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
705
705
|
[m.BUSY]: y.BUSY,
|
|
706
706
|
[m.AWAY]: y.AWAY
|
|
707
707
|
}]
|
|
708
|
-
}),
|
|
708
|
+
}), ze = (e, t) => Y(
|
|
709
709
|
{
|
|
710
710
|
href: e,
|
|
711
711
|
"aria-current": t === "Breadcrumb" && "page",
|
|
@@ -718,7 +718,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
718
718
|
"aria-hidden": !0,
|
|
719
719
|
size: "xs"
|
|
720
720
|
}, d.chevron.single.right), Ee = (e) => n({ class: "flex items-center" }, [
|
|
721
|
-
e.href ?
|
|
721
|
+
e.href ? ze(e.href, e.label) : a(e.label),
|
|
722
722
|
e.separator && Fe()
|
|
723
723
|
]), St = S(
|
|
724
724
|
{
|
|
@@ -874,9 +874,18 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
874
874
|
* @param {object} item
|
|
875
875
|
* @returns {void}
|
|
876
876
|
*/
|
|
877
|
-
|
|
877
|
+
select(e) {
|
|
878
878
|
const t = this.state;
|
|
879
|
-
t.selectedValue = e.value, t.selectedLabel = e.label, t.open = !1, typeof this.onSelect == "function" && this.onSelect(e);
|
|
879
|
+
t.selectedValue = e.value, t.selectedLabel = e.label, t.open = !1, typeof this.onSelect == "function" && this.onSelect(e, parent);
|
|
880
|
+
},
|
|
881
|
+
/**
|
|
882
|
+
* Selects the first item in the list.
|
|
883
|
+
*
|
|
884
|
+
* @returns {void}
|
|
885
|
+
*/
|
|
886
|
+
selectFirstItem() {
|
|
887
|
+
const e = this.data.items[0];
|
|
888
|
+
this.select(e);
|
|
880
889
|
},
|
|
881
890
|
/**
|
|
882
891
|
* Toggles the dropdown open state.
|
|
@@ -892,14 +901,15 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
892
901
|
* @returns {object}
|
|
893
902
|
*/
|
|
894
903
|
render() {
|
|
895
|
-
|
|
904
|
+
const e = this.class || "", t = this.maxWidth || "max-w-[250px]", s = this.width || "w-full";
|
|
905
|
+
return n({ class: `relative ${s} flex flex-auto flex-col ${t} ${e}` }, [
|
|
896
906
|
// @ts-ignore
|
|
897
907
|
Ye({ toggleDropdown: this.toggleDropdown.bind(this) }),
|
|
898
908
|
Ue({
|
|
899
909
|
// @ts-ignore
|
|
900
910
|
state: this.state,
|
|
901
911
|
// @ts-ignore
|
|
902
|
-
onSelect: this.
|
|
912
|
+
onSelect: this.select.bind(this)
|
|
903
913
|
}),
|
|
904
914
|
// Hidden required input for form validation
|
|
905
915
|
// @ts-ignore
|
|
@@ -925,11 +935,11 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
925
935
|
icon: d.circleMinus,
|
|
926
936
|
click: e,
|
|
927
937
|
ariaLabel: "Decrement"
|
|
928
|
-
}),
|
|
938
|
+
}), We = ({ click: e }) => U({
|
|
929
939
|
icon: d.circlePlus,
|
|
930
940
|
click: e,
|
|
931
941
|
ariaLabel: "Increment"
|
|
932
|
-
}),
|
|
942
|
+
}), Re = ({ bind: e, min: t, max: s, readonly: o = !1 }) => C({
|
|
933
943
|
value: "[[count]]",
|
|
934
944
|
bind: e,
|
|
935
945
|
blur: (r, { state: l }) => {
|
|
@@ -966,13 +976,13 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
966
976
|
const e = this.class ?? "";
|
|
967
977
|
return n({ class: `flex flex-auto items-center justify-between space-x-4 p-4 ${e}` }, [
|
|
968
978
|
_e({ click: () => this.state.decrement("count") }),
|
|
969
|
-
|
|
979
|
+
Re({
|
|
970
980
|
bind: this.bind,
|
|
971
981
|
readonly: this.readonly,
|
|
972
982
|
min: this.min,
|
|
973
983
|
max: this.max
|
|
974
984
|
}),
|
|
975
|
-
|
|
985
|
+
We({ click: () => this.state.increment("count") })
|
|
976
986
|
]);
|
|
977
987
|
}
|
|
978
988
|
}
|
|
@@ -987,7 +997,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
987
997
|
}, [
|
|
988
998
|
Ge({ bind: e, required: t }),
|
|
989
999
|
a({
|
|
990
|
-
onState: ["selectedDate", (o) => o ?
|
|
1000
|
+
onState: ["selectedDate", (o) => o ? $.format("standard", o) : "Pick a date"]
|
|
991
1001
|
}),
|
|
992
1002
|
f({ html: d.calendar.days })
|
|
993
1003
|
]), Ke = ({ handleDateSelect: e, blockPriorDates: t }) => n({ class: "absolute mt-1 z-10 bg-background rounded-md shadow-lg" }, [
|
|
@@ -1006,7 +1016,7 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
1006
1016
|
})
|
|
1007
1017
|
]) : null
|
|
1008
1018
|
)
|
|
1009
|
-
]),
|
|
1019
|
+
]), $t = w(
|
|
1010
1020
|
{
|
|
1011
1021
|
/**
|
|
1012
1022
|
* The initial state of the DatePicker.
|
|
@@ -1050,12 +1060,12 @@ const N = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => h({
|
|
|
1050
1060
|
]);
|
|
1051
1061
|
}
|
|
1052
1062
|
}
|
|
1053
|
-
),
|
|
1063
|
+
), At = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => Q([
|
|
1054
1064
|
new ne({
|
|
1055
1065
|
dateTime: e,
|
|
1056
1066
|
filter: s || ((o) => {
|
|
1057
|
-
const r =
|
|
1058
|
-
return
|
|
1067
|
+
const r = $.getLocalTime(o, !0, !1, t);
|
|
1068
|
+
return $.getTimeFrame(r);
|
|
1059
1069
|
})
|
|
1060
1070
|
})
|
|
1061
1071
|
]);
|
|
@@ -1162,7 +1172,7 @@ function E(e) {
|
|
|
1162
1172
|
meridian: l
|
|
1163
1173
|
});
|
|
1164
1174
|
}
|
|
1165
|
-
const
|
|
1175
|
+
const Bt = w(
|
|
1166
1176
|
{
|
|
1167
1177
|
/**
|
|
1168
1178
|
* The initial shallow state of the TimePicker.
|
|
@@ -1224,8 +1234,8 @@ const $t = w(
|
|
|
1224
1234
|
}
|
|
1225
1235
|
), et = (e, t) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
|
|
1226
1236
|
x({ size: "lg" }, e)
|
|
1227
|
-
]), tt = ({ title: e }) =>
|
|
1228
|
-
|
|
1237
|
+
]), tt = ({ title: e }) => B({ class: "flex flex-auto items-center" }, [
|
|
1238
|
+
A({ class: "text-lg font-semibold" }, e)
|
|
1229
1239
|
]), st = c((e, t) => X(
|
|
1230
1240
|
{
|
|
1231
1241
|
class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
|
|
@@ -1388,7 +1398,7 @@ export {
|
|
|
1388
1398
|
nt as G,
|
|
1389
1399
|
xt as M,
|
|
1390
1400
|
wt as N,
|
|
1391
|
-
|
|
1401
|
+
We as P,
|
|
1392
1402
|
pt as S,
|
|
1393
1403
|
yt as T,
|
|
1394
1404
|
he as a,
|
|
@@ -1408,13 +1418,13 @@ export {
|
|
|
1408
1418
|
kt as o,
|
|
1409
1419
|
y as p,
|
|
1410
1420
|
m as q,
|
|
1411
|
-
|
|
1421
|
+
Ne as r,
|
|
1412
1422
|
Dt as s,
|
|
1413
1423
|
_e as t,
|
|
1414
|
-
|
|
1424
|
+
Re as u,
|
|
1415
1425
|
Tt as v,
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1426
|
+
$t as w,
|
|
1427
|
+
At as x,
|
|
1428
|
+
Bt as y,
|
|
1419
1429
|
Mt as z
|
|
1420
1430
|
};
|
package/dist/index.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { B as g, I as T, L as c } from "./buttons-CVEwmPAi.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 L, W as A } from "./inputs-DmJuUwS9.js";
|
|
4
4
|
import { V as w, a as U } from "./veil-D4dRxILB.js";
|
|
5
5
|
import { Icons as R } from "./icons.es.js";
|
|
6
|
-
import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ta, p as ca, q as Ca, S as ba, n as Da, o as Sa, T as Ia, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-
|
|
6
|
+
import { A as G, B as V, C as j, z as q, u as z, v as J, w as _, D as K, j as Q, k as X, G as Y, E as Z, s as $, c as aa, a as sa, b as ea, i as oa, g as ta, e as ra, h as na, F as ia, d as la, f as pa, t as ua, M as ma, l as da, N as ga, P as Ta, p as ca, q as Ca, S as ba, n as Da, o as Sa, T as Ia, x as Ba, y as Pa, m as Fa, r as Ma } from "./confirmation-D29rC-Ec.js";
|
|
7
7
|
import { A as Na, b as va, C as fa, D as xa, a as ha, F as ya, M as Wa, P as La, c as Aa, g as Ha, p as wa } from "./calendar-BDqm833e.js";
|
|
8
8
|
import { B as Oa, n as Ra, C as Ea, j as Ga, D as Va, l as ja, H as qa, I as za, N as Ja, O as _a, P as Ka, S as Qa, m as Xa, r as Ya, q as Za, o as $a, p as as, T as ss, k as es, U as os, W as ts, f as rs, h as ns, i as is, c as ls, d as ps, b as us, e as ms, a as ds, g as gs } from "./signature-panel-CrKk8upb.js";
|
|
9
9
|
import { B as cs, I as Cs, M as bs, d as Ds, e as Ss, g as Is, N as Bs, b as Ps, a as Fs, f as Ms, P as ks, c as Ns, S as vs, T as fs } from "./mobile-nav-wrapper-BE_hr65B.js";
|
package/dist/molecules.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as o, B as t, C as e, z as i, u as r, v as n, w as m, D as l, j as S, k as D, G as c, E as u, s as d, c as g, a as p, b as C, i as F, g as T, e as A, h as P, F as f, d as b, f as w, t as B, M as I, l as M, N as x, P as y, p as k, q as v, S as N, n as h, o as E, T as L, x as U, y as j, m as q, r as z } from "./confirmation-
|
|
1
|
+
import { A as o, B as t, C as e, z as i, u as r, v as n, w as m, D as l, j as S, k as D, G as c, E as u, s as d, c as g, a as p, b as C, i as F, g as T, e as A, h as P, F as f, d as b, f as w, t as B, M as I, l as M, N as x, P as y, p as k, q as v, S as N, n as h, o as E, T as L, x as U, y as j, m as q, r as z } from "./confirmation-D29rC-Ec.js";
|
|
2
2
|
import { A as O, P as R, g as _ } from "./calendar-BDqm833e.js";
|
|
3
3
|
export {
|
|
4
4
|
o as Alert,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export function DropdownButton({ toggleDropdown }: object): object;
|
|
2
|
+
export function ComboboxItem(item: object, onSelect: Function, state: any): object;
|
|
3
|
+
export function ComboboxDropdown(handleSelect: Function, state: object): object;
|
|
4
|
+
export function DropdownContainer({ onSelect, state }: object): object;
|
package/package.json
CHANGED