@base-framework/ui 1.0.310 → 1.0.311
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/{empty-state-vu_Mhyk4.js → empty-state-KpaoE_8g.js} +260 -185
- package/dist/index.es.js +111 -110
- package/dist/molecules.es.js +35 -34
- package/dist/organisms.es.js +1 -1
- package/dist/{signature-panel-DWBWqY8V.js → signature-panel-CIjDPXqA.js} +45 -45
- package/dist/types/components/molecules/image/image-uploader.d.ts +9 -0
- package/dist/types/components/molecules/molecules.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Atom as h, Component as c, Data as B, DateTime as K, router as
|
|
1
|
+
import { Button as k, Div as o, On as S, Span as C, Th as z, UseParent as F, I as E, Thead as Q, Tr as G, Table as I, P as y, Li as w, Time as X, Nav as m, Ul as g, Section as L, Canvas as q } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as h, Component as c, Data as B, DateTime as K, router as x, NavLink as T, DataTracker as N, Jot as V, base as R, Dom as O } from "@base-framework/base";
|
|
3
3
|
import { B as M, I as _ } from "./buttons-CHEs54Wl.js";
|
|
4
4
|
import { Icons as D } 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";
|
|
@@ -10,7 +10,7 @@ h((t, e) => ({
|
|
|
10
10
|
...t,
|
|
11
11
|
children: e
|
|
12
12
|
}));
|
|
13
|
-
h(({ value: t, label: e }) =>
|
|
13
|
+
h(({ value: t, label: e }) => k({
|
|
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"]],
|
|
@@ -82,7 +82,7 @@ const re = (t) => {
|
|
|
82
82
|
return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
|
|
83
83
|
}, fe = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
|
|
84
84
|
const n = ue(t, e, s);
|
|
85
|
-
return
|
|
85
|
+
return k({
|
|
86
86
|
text: t || "",
|
|
87
87
|
disabled: !t,
|
|
88
88
|
class: `
|
|
@@ -299,9 +299,9 @@ class pt extends c {
|
|
|
299
299
|
const be = (t, e) => {
|
|
300
300
|
const s = t.toggleAllSelectedRows();
|
|
301
301
|
e.state.checked = !s;
|
|
302
|
-
},
|
|
302
|
+
}, xe = (t) => z({ 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) => be(e, a) }))
|
|
304
|
-
]),
|
|
304
|
+
]), ke = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
|
|
305
305
|
const l = t || "justify-start";
|
|
306
306
|
return z({
|
|
307
307
|
class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
|
|
@@ -317,7 +317,7 @@ const be = (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" ? xe({ toggle: t.toggle }) : ke({
|
|
321
321
|
align: e.align,
|
|
322
322
|
sortable: e.sortable,
|
|
323
323
|
key: e.key,
|
|
@@ -326,7 +326,7 @@ const be = (t, e) => {
|
|
|
326
326
|
})
|
|
327
327
|
]
|
|
328
328
|
})
|
|
329
|
-
]),
|
|
329
|
+
]), we = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i, skeleton: n, columnCount: l }) => new J({
|
|
330
330
|
cache: "list",
|
|
331
331
|
key: t,
|
|
332
332
|
items: e,
|
|
@@ -422,7 +422,7 @@ class U extends c {
|
|
|
422
422
|
this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
423
423
|
// @ts-ignore
|
|
424
424
|
this.customHeader ?? null,
|
|
425
|
-
|
|
425
|
+
we({
|
|
426
426
|
// @ts-ignore
|
|
427
427
|
key: this.key,
|
|
428
428
|
// @ts-ignore
|
|
@@ -501,7 +501,7 @@ class U extends c {
|
|
|
501
501
|
this.data.selectedRows = [];
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const ye = (t) => new Z({
|
|
505
505
|
cache: "list",
|
|
506
506
|
loadMoreItems: t.loadMoreItems,
|
|
507
507
|
offset: t.offset,
|
|
@@ -530,7 +530,7 @@ class ve extends U {
|
|
|
530
530
|
this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
531
531
|
// @ts-ignore
|
|
532
532
|
this.customHeader ?? null,
|
|
533
|
-
|
|
533
|
+
ye({
|
|
534
534
|
// @ts-ignore
|
|
535
535
|
loadMoreItems: this.loadMoreItems,
|
|
536
536
|
// @ts-ignore
|
|
@@ -651,7 +651,7 @@ class Se extends U {
|
|
|
651
651
|
this.list.refresh();
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
const
|
|
654
|
+
const xt = h((t) => new Se(
|
|
655
655
|
{
|
|
656
656
|
cache: t.cache ?? "list",
|
|
657
657
|
tableData: t.data,
|
|
@@ -670,20 +670,20 @@ const kt = h((t) => new Se(
|
|
|
670
670
|
skeleton: t.skeleton
|
|
671
671
|
}
|
|
672
672
|
)), Ce = h(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
|
|
673
|
-
|
|
674
|
-
|
|
673
|
+
y({ class: "text-base font-semibold leading-6 m-0" }, t),
|
|
674
|
+
y({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
|
|
675
675
|
])), Le = () => o({ class: "flex items-center gap-x-1.5" }, [
|
|
676
676
|
o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
677
677
|
o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
678
678
|
]),
|
|
679
|
-
|
|
680
|
-
]), Ie = (t) =>
|
|
679
|
+
y({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
680
|
+
]), Ie = (t) => y({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
681
681
|
C("Last seen "),
|
|
682
682
|
X({ datetime: t }, "3h ago")
|
|
683
683
|
]), Be = (t, e) => t === "online" ? Le() : Ie(e), Te = h(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
684
|
-
|
|
684
|
+
y({ class: "text-sm leading-6 m-0" }, t),
|
|
685
685
|
Be(s, e)
|
|
686
|
-
])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Pe = h((t) =>
|
|
686
|
+
])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Pe = h((t) => w({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
687
687
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
688
688
|
oe({ src: t.image, alt: t.name, fallbackText: Me(t.name) }),
|
|
689
689
|
Ce({ name: t.name, email: t.email })
|
|
@@ -693,7 +693,7 @@ const kt = h((t) => new Se(
|
|
|
693
693
|
lastSeen: t.lastSeen,
|
|
694
694
|
status: t.status
|
|
695
695
|
})
|
|
696
|
-
])),
|
|
696
|
+
])), kt = h((t) => new te({
|
|
697
697
|
cache: "list",
|
|
698
698
|
key: "name",
|
|
699
699
|
items: t.users,
|
|
@@ -707,7 +707,7 @@ const kt = h((t) => new Se(
|
|
|
707
707
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
708
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
|
-
class
|
|
710
|
+
class wt extends c {
|
|
711
711
|
/**
|
|
712
712
|
* This will declare the props for the compiler.
|
|
713
713
|
*
|
|
@@ -735,7 +735,7 @@ class yt extends c {
|
|
|
735
735
|
class: "flex gap-x-4",
|
|
736
736
|
map: [this.options, (e) => this.addLink(e)],
|
|
737
737
|
watch: {
|
|
738
|
-
value: ["[[path]]",
|
|
738
|
+
value: ["[[path]]", x.data],
|
|
739
739
|
callBack: this.updateLinks.bind(this)
|
|
740
740
|
}
|
|
741
741
|
})
|
|
@@ -748,7 +748,7 @@ class yt extends c {
|
|
|
748
748
|
* @returns {void}
|
|
749
749
|
*/
|
|
750
750
|
afterSetup() {
|
|
751
|
-
const e =
|
|
751
|
+
const e = x.data.path;
|
|
752
752
|
this.updateLinks(e);
|
|
753
753
|
}
|
|
754
754
|
/**
|
|
@@ -805,7 +805,7 @@ class yt extends c {
|
|
|
805
805
|
this.links = [];
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const yt = h((t) => {
|
|
809
809
|
const e = t.margin || "m-4 ml-0";
|
|
810
810
|
return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
|
|
811
811
|
M({ variant: "back", class: "ghost", ...t })
|
|
@@ -1032,7 +1032,7 @@ class Dt extends j {
|
|
|
1032
1032
|
this.container = e, this.initialize();
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
const $e = h(({ index: t, click: e, state: s }, a) =>
|
|
1035
|
+
const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
1036
1036
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
1037
1037
|
onState: [
|
|
1038
1038
|
[s, "selectedIndex", {
|
|
@@ -1196,13 +1196,13 @@ const $e = h(({ index: t, click: e, state: s }, a) => y({
|
|
|
1196
1196
|
]);
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
|
-
), je = (t) =>
|
|
1199
|
+
), je = (t) => w(
|
|
1200
1200
|
{
|
|
1201
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
|
[
|
|
1205
|
-
|
|
1205
|
+
k({
|
|
1206
1206
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
|
|
1207
1207
|
onSet: ["selected", { selected: t.value }],
|
|
1208
1208
|
click: (e) => t.callBack(t.value)
|
|
@@ -1298,13 +1298,13 @@ class Ct extends c {
|
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
|
-
const Ye = (t) =>
|
|
1301
|
+
const Ye = (t) => w(
|
|
1302
1302
|
{
|
|
1303
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
|
[
|
|
1307
|
-
|
|
1307
|
+
k({
|
|
1308
1308
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1309
1309
|
onSet: ["selected", { selected: t.value }],
|
|
1310
1310
|
click: (e) => t.callBack(t.value),
|
|
@@ -1392,7 +1392,7 @@ class qe extends c {
|
|
|
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]]", x.data],
|
|
1396
1396
|
callBack: this.updateLinks.bind(this)
|
|
1397
1397
|
}
|
|
1398
1398
|
})
|
|
@@ -1404,7 +1404,7 @@ class qe extends c {
|
|
|
1404
1404
|
* @returns {void}
|
|
1405
1405
|
*/
|
|
1406
1406
|
afterSetup() {
|
|
1407
|
-
const e =
|
|
1407
|
+
const e = x.data.path;
|
|
1408
1408
|
this.updateLinks(e);
|
|
1409
1409
|
}
|
|
1410
1410
|
/**
|
|
@@ -1507,13 +1507,13 @@ class It extends c {
|
|
|
1507
1507
|
return s;
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
const Ke = (t) =>
|
|
1510
|
+
const Ke = (t) => w(
|
|
1511
1511
|
{
|
|
1512
1512
|
class: "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium text-muted-foreground transition-colors hover:text-foreground 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]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100",
|
|
1513
1513
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1514
1514
|
},
|
|
1515
1515
|
[
|
|
1516
|
-
|
|
1516
|
+
k({
|
|
1517
1517
|
class: "flex flex-auto justify-center items-center px-4 py-3",
|
|
1518
1518
|
onSet: ["selected", { selected: t.value }],
|
|
1519
1519
|
click: (e) => t.callBack(t.value)
|
|
@@ -1600,13 +1600,13 @@ class Bt extends c {
|
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
1602
|
}
|
|
1603
|
-
const Je = (t) =>
|
|
1603
|
+
const Je = (t) => w(
|
|
1604
1604
|
{
|
|
1605
1605
|
class: "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium text-muted-foreground transition-colors hover:text-foreground 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]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100",
|
|
1606
1606
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1607
1607
|
},
|
|
1608
1608
|
[
|
|
1609
|
-
|
|
1609
|
+
k({
|
|
1610
1610
|
class: "flex flex-auto justify-center items-center px-4 py-3 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1611
1611
|
onSet: ["selected", { selected: t.value }],
|
|
1612
1612
|
click: (e) => t.callBack(t.value),
|
|
@@ -1694,7 +1694,7 @@ class it extends c {
|
|
|
1694
1694
|
class: "flex flex-row items-center",
|
|
1695
1695
|
map: [this.options, (e) => this.addLink(e)],
|
|
1696
1696
|
watch: {
|
|
1697
|
-
value: ["[[path]]",
|
|
1697
|
+
value: ["[[path]]", x.data],
|
|
1698
1698
|
callBack: this.updateLinks.bind(this)
|
|
1699
1699
|
}
|
|
1700
1700
|
})
|
|
@@ -1706,7 +1706,7 @@ class it extends c {
|
|
|
1706
1706
|
* @returns {void}
|
|
1707
1707
|
*/
|
|
1708
1708
|
afterSetup() {
|
|
1709
|
-
const e =
|
|
1709
|
+
const e = x.data.path;
|
|
1710
1710
|
this.updateLinks(e);
|
|
1711
1711
|
}
|
|
1712
1712
|
/**
|
|
@@ -1778,13 +1778,13 @@ class Mt extends c {
|
|
|
1778
1778
|
* @returns {object}
|
|
1779
1779
|
*/
|
|
1780
1780
|
render() {
|
|
1781
|
-
return o({ class: "underlined-tab-panel" }, [
|
|
1781
|
+
return o({ class: "underlined-tab-panel flex flex-auto flex-col" }, [
|
|
1782
1782
|
new it({
|
|
1783
1783
|
class: this.class,
|
|
1784
1784
|
options: this.options
|
|
1785
1785
|
}),
|
|
1786
1786
|
L({
|
|
1787
|
-
class: "tab-content pt-6",
|
|
1787
|
+
class: "tab-content pt-6 flex flex-auto flex-col",
|
|
1788
1788
|
switch: this.addGroup()
|
|
1789
1789
|
})
|
|
1790
1790
|
]);
|
|
@@ -2114,15 +2114,15 @@ class Pt extends c {
|
|
|
2114
2114
|
}
|
|
2115
2115
|
}
|
|
2116
2116
|
export {
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2117
|
+
yt as B,
|
|
2118
|
+
xe as C,
|
|
2119
|
+
we as D,
|
|
2120
|
+
ke as H,
|
|
2121
2121
|
Dt as I,
|
|
2122
|
-
|
|
2122
|
+
wt as N,
|
|
2123
2123
|
j as O,
|
|
2124
2124
|
ft as P,
|
|
2125
|
-
|
|
2125
|
+
xt as S,
|
|
2126
2126
|
P as T,
|
|
2127
2127
|
Pe as U,
|
|
2128
2128
|
pt as W,
|
|
@@ -2137,7 +2137,7 @@ export {
|
|
|
2137
2137
|
pe as i,
|
|
2138
2138
|
U as j,
|
|
2139
2139
|
bt as k,
|
|
2140
|
-
|
|
2140
|
+
kt as l,
|
|
2141
2141
|
vt as m,
|
|
2142
2142
|
St as n,
|
|
2143
2143
|
Ne as o,
|
|
@@ -19,6 +19,7 @@ export * from "./avatars/avatar.js";
|
|
|
19
19
|
export * from "./avatars/static-status-indicator.js";
|
|
20
20
|
export * from "./avatars/status-indicator.js";
|
|
21
21
|
export * from "./avatars/statuses.js";
|
|
22
|
+
export * from "./image/image-uploader.js";
|
|
22
23
|
export * from "./image/logo-uploader.js";
|
|
23
24
|
export * from "./breadcrumb/breadcrumb.js";
|
|
24
25
|
export * from "./breadcrumb/dots-indicator.js";
|
package/package.json
CHANGED