@base-framework/ui 1.0.300 → 1.0.302
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 +3 -3
- package/dist/{empty-state-KJX3HcJo.js → empty-state-BunnaSN9.js} +130 -130
- package/dist/index.es.js +6 -6
- package/dist/{inputs-DJhlHvWE.js → inputs-9udyzkHR.js} +26 -26
- package/dist/molecules.es.js +2 -2
- package/dist/organisms.es.js +2 -2
- package/dist/{range-calendar-CcFEHyEp.js → range-calendar-CnBylqhu.js} +49 -49
- package/dist/{signature-panel-C2lrBRBh.js → signature-panel-CEqzd6Sa.js} +39 -39
- package/dist/{tooltip-DD5l7kTI.js → tooltip-EO3J6QFR.js} +4 -4
- package/dist/{veil-B1pwIy-D.js → veil-fLMV40Wv.js} +14 -14
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
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 d, Component as u, Data as L, DateTime as G, router as
|
|
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
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
|
-
import { C as ae, I as ie, H as ne } from "./inputs-
|
|
7
|
-
import { A as oe, P as le } from "./range-calendar-
|
|
6
|
+
import { C as ae, I as ie, H as ne } from "./inputs-9udyzkHR.js";
|
|
7
|
+
import { A as oe, P as le } from "./range-calendar-CnBylqhu.js";
|
|
8
8
|
d((t, e) => ({
|
|
9
9
|
class: "flex items-center px-4 py-2",
|
|
10
10
|
...t,
|
|
@@ -88,23 +88,23 @@ const re = (t) => {
|
|
|
88
88
|
class: `
|
|
89
89
|
px-2 py-1 text-center rounded-md
|
|
90
90
|
${n ? "bg-accent text-accent-foreground" : ""}
|
|
91
|
-
hover:bg-primary hover:text-foreground
|
|
91
|
+
hover:bg-primary hover:text-primary-foreground
|
|
92
92
|
`,
|
|
93
93
|
click: () => i(a, s)
|
|
94
94
|
});
|
|
95
|
-
},
|
|
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,
|
|
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 }, (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
97
|
for (let h = 0; h < f.length; h += 7) {
|
|
98
|
-
const
|
|
99
|
-
|
|
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
|
+
m.push({
|
|
100
100
|
weekNumber: A,
|
|
101
101
|
year: U,
|
|
102
|
-
days:
|
|
102
|
+
days: g
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
return
|
|
106
|
-
},
|
|
107
|
-
const { year: i, month: n, currentDate: l } = a, c =
|
|
105
|
+
return m;
|
|
106
|
+
}, ge = ({ selectWeek: t }) => v("month", (e, s, { data: a }) => {
|
|
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
|
[
|
|
@@ -120,7 +120,7 @@ const re = (t) => {
|
|
|
120
120
|
),
|
|
121
121
|
// Render each "week" row
|
|
122
122
|
...c.map(
|
|
123
|
-
({ weekNumber: r, days: f, year:
|
|
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
126
|
ring: r
|
|
@@ -129,10 +129,10 @@ const re = (t) => {
|
|
|
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(r,
|
|
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-foreground": r,
|
|
135
|
+
"text-primary-foreground": r,
|
|
136
136
|
"bg-primary": r
|
|
137
137
|
}],
|
|
138
138
|
text: r ? `W${r}` : ""
|
|
@@ -290,7 +290,7 @@ class ot extends u {
|
|
|
290
290
|
next: () => this.goToNextMonth(),
|
|
291
291
|
previous: () => this.goToPreviousMonth()
|
|
292
292
|
}),
|
|
293
|
-
|
|
293
|
+
ge({
|
|
294
294
|
selectWeek: (e, s) => this.selectWeek(e, s)
|
|
295
295
|
})
|
|
296
296
|
]);
|
|
@@ -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
|
-
},
|
|
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
|
-
]),
|
|
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" ?
|
|
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,
|
|
@@ -705,7 +705,7 @@ const rt = d((t) => new Se(
|
|
|
705
705
|
href: e,
|
|
706
706
|
exact: s,
|
|
707
707
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
708
|
-
class: `${a ? "hidden" : "inline-flex"} items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-background hover:bg-primary hover:text-foreground disabled:opacity-50 disabled:pointer-events-none data-[state=active]:bg-primary data-[state=active]:text-foreground data-[state=active]:shadow-sm`
|
|
708
|
+
class: `${a ? "hidden" : "inline-flex"} items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-background hover:bg-primary hover:text-primary-foreground disabled:opacity-50 disabled:pointer-events-none data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm`
|
|
709
709
|
});
|
|
710
710
|
class dt extends u {
|
|
711
711
|
/**
|
|
@@ -732,10 +732,10 @@ class dt extends u {
|
|
|
732
732
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
733
733
|
[
|
|
734
734
|
w({
|
|
735
|
-
class: "flex
|
|
735
|
+
class: "flex gap-x-4",
|
|
736
736
|
map: [this.options, (e) => this.addLink(e)],
|
|
737
737
|
watch: {
|
|
738
|
-
value: ["[[path]]",
|
|
738
|
+
value: ["[[path]]", b.data],
|
|
739
739
|
callBack: this.updateLinks.bind(this)
|
|
740
740
|
}
|
|
741
741
|
})
|
|
@@ -748,7 +748,7 @@ class dt extends u {
|
|
|
748
748
|
* @returns {void}
|
|
749
749
|
*/
|
|
750
750
|
afterSetup() {
|
|
751
|
-
const e =
|
|
751
|
+
const e = b.data.path;
|
|
752
752
|
this.updateLinks(e);
|
|
753
753
|
}
|
|
754
754
|
/**
|
|
@@ -1076,7 +1076,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1076
1076
|
$e(t)
|
|
1077
1077
|
]);
|
|
1078
1078
|
}]
|
|
1079
|
-
}),
|
|
1079
|
+
}), mt = V(
|
|
1080
1080
|
{
|
|
1081
1081
|
/**
|
|
1082
1082
|
* This will set up the data object.
|
|
@@ -1198,7 +1198,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1198
1198
|
}
|
|
1199
1199
|
), je = (t) => S(
|
|
1200
1200
|
{
|
|
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-foreground data-[state=active]:shadow-sm",
|
|
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",
|
|
1202
1202
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1203
1203
|
},
|
|
1204
1204
|
[
|
|
@@ -1211,7 +1211,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1211
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
1212
|
w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ae(e, t.callBack)] })
|
|
1213
1213
|
]);
|
|
1214
|
-
class
|
|
1214
|
+
class gt extends u {
|
|
1215
1215
|
/**
|
|
1216
1216
|
* This will declare the props for the compiler.
|
|
1217
1217
|
*
|
|
@@ -1300,7 +1300,7 @@ class mt extends u {
|
|
|
1300
1300
|
}
|
|
1301
1301
|
const Ye = (t) => S(
|
|
1302
1302
|
{
|
|
1303
|
-
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-foreground data-[state=active]:shadow-sm",
|
|
1303
|
+
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",
|
|
1304
1304
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1305
1305
|
},
|
|
1306
1306
|
[
|
|
@@ -1364,7 +1364,7 @@ const Qe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Xe = (t, e) => {
|
|
|
1364
1364
|
href: e,
|
|
1365
1365
|
exact: s,
|
|
1366
1366
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
1367
|
-
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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-foreground data-[state=active]:shadow-sm"
|
|
1367
|
+
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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"
|
|
1368
1368
|
});
|
|
1369
1369
|
class Ke extends u {
|
|
1370
1370
|
/**
|
|
@@ -1392,7 +1392,7 @@ class Ke extends u {
|
|
|
1392
1392
|
class: "flex flex-auto flex-row",
|
|
1393
1393
|
map: [this.options, (e) => this.addLink(e)],
|
|
1394
1394
|
watch: {
|
|
1395
|
-
value: ["[[path]]",
|
|
1395
|
+
value: ["[[path]]", b.data],
|
|
1396
1396
|
callBack: this.updateLinks.bind(this)
|
|
1397
1397
|
}
|
|
1398
1398
|
})
|
|
@@ -1404,7 +1404,7 @@ class Ke extends u {
|
|
|
1404
1404
|
* @returns {void}
|
|
1405
1405
|
*/
|
|
1406
1406
|
afterSetup() {
|
|
1407
|
-
const e =
|
|
1407
|
+
const e = b.data.path;
|
|
1408
1408
|
this.updateLinks(e);
|
|
1409
1409
|
}
|
|
1410
1410
|
/**
|
|
@@ -1656,8 +1656,8 @@ class Ge extends u {
|
|
|
1656
1656
|
const e = this.canvas, s = this.container, a = R.getSize(s), i = this.targetSize, n = i.width, l = i.height;
|
|
1657
1657
|
let c = n + "px", r = l + "px";
|
|
1658
1658
|
if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
|
|
1659
|
-
const f = a.width,
|
|
1660
|
-
c = n *
|
|
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";
|
|
1661
1661
|
}
|
|
1662
1662
|
e.style.width = c, e.style.height = r;
|
|
1663
1663
|
}
|
|
@@ -1733,7 +1733,7 @@ class Ge extends u {
|
|
|
1733
1733
|
this.timer.stop(), this.status = "stopped";
|
|
1734
1734
|
}
|
|
1735
1735
|
}
|
|
1736
|
-
class
|
|
1736
|
+
class yt extends u {
|
|
1737
1737
|
/**
|
|
1738
1738
|
* Sets up default properties for the signature panel.
|
|
1739
1739
|
*
|
|
@@ -1813,9 +1813,9 @@ class bt extends u {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
export {
|
|
1815
1815
|
ht as B,
|
|
1816
|
-
|
|
1816
|
+
ye as C,
|
|
1817
1817
|
ke as D,
|
|
1818
|
-
|
|
1818
|
+
be as H,
|
|
1819
1819
|
ft as I,
|
|
1820
1820
|
dt as N,
|
|
1821
1821
|
j as O,
|
|
@@ -1831,17 +1831,17 @@ export {
|
|
|
1831
1831
|
nt as e,
|
|
1832
1832
|
fe as f,
|
|
1833
1833
|
de as g,
|
|
1834
|
-
|
|
1834
|
+
ge as h,
|
|
1835
1835
|
pe as i,
|
|
1836
1836
|
H as j,
|
|
1837
1837
|
lt as k,
|
|
1838
1838
|
ct as l,
|
|
1839
1839
|
ut as m,
|
|
1840
|
-
|
|
1840
|
+
mt as n,
|
|
1841
1841
|
Ne as o,
|
|
1842
|
-
|
|
1842
|
+
gt as p,
|
|
1843
1843
|
pt as q,
|
|
1844
1844
|
Ke as r,
|
|
1845
1845
|
wt as s,
|
|
1846
|
-
|
|
1846
|
+
yt as t
|
|
1847
1847
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
2
|
import { Atom as s, Html as x } from "@base-framework/base";
|
|
3
|
-
import { a as d } from "./veil-
|
|
4
|
-
import { f as h, e as y, g as k } from "./inputs-
|
|
3
|
+
import { a as d } from "./veil-fLMV40Wv.js";
|
|
4
|
+
import { f as h, e as y, g as k } from "./inputs-9udyzkHR.js";
|
|
5
5
|
const a = {
|
|
6
6
|
gray: {
|
|
7
7
|
backgroundColor: "bg-gray-50",
|
|
@@ -45,7 +45,7 @@ const a = {
|
|
|
45
45
|
},
|
|
46
46
|
primary: {
|
|
47
47
|
backgroundColor: "bg-primary",
|
|
48
|
-
textColor: "text-foreground",
|
|
48
|
+
textColor: "text-primary-foreground",
|
|
49
49
|
ringColor: "ring-primary/10"
|
|
50
50
|
},
|
|
51
51
|
secondary: {
|
|
@@ -94,7 +94,7 @@ const a = {
|
|
|
94
94
|
class: `p-6 ${r} ${t.class || ""}`
|
|
95
95
|
}, [
|
|
96
96
|
t.legend && v(t.legend),
|
|
97
|
-
l({ class: "flex flex-auto flex-col
|
|
97
|
+
l({ class: "flex flex-auto flex-col gap-y-6" }, e)
|
|
98
98
|
]);
|
|
99
99
|
}), I = d(
|
|
100
100
|
{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Div as s, H4 as
|
|
2
|
-
import { Atom as
|
|
3
|
-
const
|
|
4
|
-
const e = t.margin ?? "my-5 mx-5",
|
|
1
|
+
import { Div as s, H4 as n, P as o } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as l, Jot as d, Component as c } from "@base-framework/base";
|
|
3
|
+
const g = l((t, a) => {
|
|
4
|
+
const e = t.margin ?? "my-5 mx-5", r = t.padding ?? "p-4";
|
|
5
5
|
return t.hover && (t.class += " hover:shadow-lg hover:bg-muted/50"), s({
|
|
6
6
|
...t,
|
|
7
|
-
class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${e} ${
|
|
7
|
+
class: `rounded-lg border bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${e} ${r} ${t.class || ""}`
|
|
8
8
|
}, a);
|
|
9
|
-
}),
|
|
9
|
+
}), u = l((t, a) => {
|
|
10
10
|
const e = t.border === !0 ? "border-t" : "";
|
|
11
11
|
return s({
|
|
12
12
|
...t,
|
|
@@ -14,13 +14,13 @@ const u = r((t, a) => {
|
|
|
14
14
|
}, [
|
|
15
15
|
t.label && s({
|
|
16
16
|
...t.labelProps,
|
|
17
|
-
class: `
|
|
17
|
+
class: `flex flex-auto flex-col gap-y-1 ${t.labelProps?.class || ""}`
|
|
18
18
|
}, [
|
|
19
|
-
|
|
20
|
-
t.description &&
|
|
19
|
+
n({ class: "text-base" }, t.label),
|
|
20
|
+
t.description && o({ class: "text-sm text-muted-foreground" }, t.description)
|
|
21
21
|
]),
|
|
22
22
|
// Controls container: grows to fill remaining space, spacing between items
|
|
23
|
-
s({ class: "flex flex-col
|
|
23
|
+
s({ class: "flex flex-col gap-y-4" }, a)
|
|
24
24
|
]);
|
|
25
25
|
});
|
|
26
26
|
class i extends c {
|
|
@@ -37,10 +37,10 @@ class i extends c {
|
|
|
37
37
|
return e ? { data: e } : null;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const f = (t) => d(t, i);
|
|
41
41
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
g as C,
|
|
43
|
+
u as F,
|
|
44
44
|
i as V,
|
|
45
|
-
|
|
45
|
+
f as a
|
|
46
46
|
};
|
package/package.json
CHANGED