@base-framework/ui 1.0.106 → 1.0.107
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/index.es.js
CHANGED
|
@@ -6,8 +6,8 @@ import { Icons as R } from "./icons.es.js";
|
|
|
6
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-BgNcRIp-.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-B_jcSUF6.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-DPYBoBP2.js";
|
|
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-
|
|
10
|
-
import { B as hs, a as ys, C as Ws, F as Ls, b as As, c as Hs, M as ws, P as Us, S as Os } from "./sidebar-menu-page-
|
|
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-CzfSCjzN.js";
|
|
10
|
+
import { B as hs, a as ys, C as Ws, F as Ls, b as As, c as Hs, M as ws, P as Us, S as Os } from "./sidebar-menu-page-2UbHpAV7.js";
|
|
11
11
|
import { A as Es, F as Gs, M as Vs, a as js, T as qs } from "./aside-template-McEj_Gxc.js";
|
|
12
12
|
import { B as Js } from "./bside-template-Du2m3rsE.js";
|
|
13
13
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as b, Label as w, Span as S, Ul as o, H4 as N, Nav as
|
|
2
|
-
import { Component as n, Atom as i, NavLink as y, router as
|
|
1
|
+
import { I as b, Label as w, Span as S, Ul as o, H4 as N, Nav as u, Div as l, Header as B, H1 as L, H3 as p, OnState as C } from "@base-framework/atoms";
|
|
2
|
+
import { Component as n, Atom as i, NavLink as y, router as d } from "@base-framework/base";
|
|
3
3
|
import { I as h, B as f } from "./buttons-CVEwmPAi.js";
|
|
4
4
|
import { Icons as r } from "./icons.es.js";
|
|
5
5
|
class I extends n {
|
|
@@ -18,7 +18,7 @@ class I extends n {
|
|
|
18
18
|
* @returns {object}
|
|
19
19
|
*/
|
|
20
20
|
render() {
|
|
21
|
-
const
|
|
21
|
+
const e = this.state;
|
|
22
22
|
return {
|
|
23
23
|
class: this.class || "",
|
|
24
24
|
onState: [
|
|
@@ -30,10 +30,10 @@ class I extends n {
|
|
|
30
30
|
}]
|
|
31
31
|
],
|
|
32
32
|
click: () => {
|
|
33
|
-
if (
|
|
33
|
+
if (e.toggle("active"), !this.checkCallBack)
|
|
34
34
|
return;
|
|
35
|
-
const
|
|
36
|
-
this.checkCallBack(
|
|
35
|
+
const t = e.active ? this : null;
|
|
36
|
+
this.checkCallBack(t);
|
|
37
37
|
},
|
|
38
38
|
children: this.children
|
|
39
39
|
};
|
|
@@ -57,30 +57,30 @@ class I extends n {
|
|
|
57
57
|
* @param {object} selected
|
|
58
58
|
* @returns {void}
|
|
59
59
|
*/
|
|
60
|
-
update(
|
|
60
|
+
update(e) {
|
|
61
61
|
this.state.set({
|
|
62
|
-
selected:
|
|
63
|
-
active:
|
|
62
|
+
selected: e,
|
|
63
|
+
active: e
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
const P = i(({ options: s, click:
|
|
67
|
+
const P = i(({ options: s, click: e }, t) => ({
|
|
68
68
|
tag: "li",
|
|
69
69
|
...{
|
|
70
70
|
class: `relative flex flex-row w-auto text-left p-0 overflow-hidden transition-all cursor-pointer min-w-[48px] rounded-md option${s ? " sub" : ""}`,
|
|
71
|
-
click:
|
|
71
|
+
click: e
|
|
72
72
|
},
|
|
73
|
-
children:
|
|
74
|
-
})), $ = (s,
|
|
75
|
-
|
|
73
|
+
children: t
|
|
74
|
+
})), $ = (s, e = null, t = !1) => [
|
|
75
|
+
e && b({
|
|
76
76
|
class: "icon w-12 rounded-md flex items-center justify-center",
|
|
77
77
|
onState: ["selected", {
|
|
78
78
|
selected: !0
|
|
79
79
|
}],
|
|
80
|
-
html:
|
|
80
|
+
html: e
|
|
81
81
|
}),
|
|
82
82
|
w({ class: "label flex flex-auto text-sm items-center cursor-pointer whitespace-nowrap" }, s),
|
|
83
|
-
|
|
83
|
+
t && S(
|
|
84
84
|
{
|
|
85
85
|
class: "flex justify-center items-center px-1 transition-all text-muted-foreground mr-2",
|
|
86
86
|
onState: [
|
|
@@ -113,9 +113,9 @@ class x extends n {
|
|
|
113
113
|
* @returns {object}
|
|
114
114
|
*/
|
|
115
115
|
render() {
|
|
116
|
-
const
|
|
116
|
+
const e = !this.options && this.callBack;
|
|
117
117
|
return P(
|
|
118
|
-
{ options: this.options, click:
|
|
118
|
+
{ options: this.options, click: e },
|
|
119
119
|
[
|
|
120
120
|
this.addLink()
|
|
121
121
|
]
|
|
@@ -128,21 +128,21 @@ class x extends n {
|
|
|
128
128
|
* @protected
|
|
129
129
|
*/
|
|
130
130
|
addLink() {
|
|
131
|
-
const
|
|
131
|
+
const e = this.options && this.options.length > 0, t = this.content || $(this.label, this.icon, e);
|
|
132
132
|
return this.href ? new y(
|
|
133
133
|
{
|
|
134
|
-
class: "flex flex-auto flex-row
|
|
134
|
+
class: "flex flex-auto flex-row rounded-md",
|
|
135
135
|
cache: "link",
|
|
136
136
|
href: this.href,
|
|
137
137
|
activeClass: "selected",
|
|
138
138
|
exact: this.exact || !1
|
|
139
139
|
},
|
|
140
|
-
|
|
140
|
+
t
|
|
141
141
|
) : new I({
|
|
142
|
-
class: "flex flex-auto flex-row
|
|
142
|
+
class: "flex flex-auto flex-row rounded-md",
|
|
143
143
|
cache: "link",
|
|
144
144
|
checkCallBack: this.checkCallBack
|
|
145
|
-
},
|
|
145
|
+
}, t);
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
148
|
* This will check if the link is selected.
|
|
@@ -152,12 +152,12 @@ class x extends n {
|
|
|
152
152
|
isSelected() {
|
|
153
153
|
return this.link.state.get("selected");
|
|
154
154
|
}
|
|
155
|
-
update(
|
|
156
|
-
this.link.update(
|
|
155
|
+
update(e) {
|
|
156
|
+
this.link.update(e);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
const H = i(({ map: s },
|
|
160
|
-
N({ class: "text-muted-foreground text-sm py-0 px-4 whitespace-nowrap" },
|
|
159
|
+
const H = i(({ map: s }, e) => o({ class: "navigation-group flex flex-col gap-2 list-none m-0 py-2 px-0", map: s }, [
|
|
160
|
+
N({ class: "text-muted-foreground text-sm py-0 px-4 whitespace-nowrap" }, e)
|
|
161
161
|
]));
|
|
162
162
|
class M extends n {
|
|
163
163
|
/**
|
|
@@ -174,11 +174,11 @@ class M extends n {
|
|
|
174
174
|
* @returns {object}
|
|
175
175
|
*/
|
|
176
176
|
render() {
|
|
177
|
-
const
|
|
178
|
-
return
|
|
177
|
+
const e = this.mapOptions(this.options), t = this.class || "", a = this.mobileBorder ? "border md:border-0 rounded-md" : "";
|
|
178
|
+
return u({ class: `navigation flex flex-auto flex-col ${t}` }, [
|
|
179
179
|
o({
|
|
180
180
|
class: `relative group flex flex-col gap-2 py-2 px-2 list-none m-0 ${a}`,
|
|
181
|
-
map:
|
|
181
|
+
map: e
|
|
182
182
|
}),
|
|
183
183
|
...this.addSubs()
|
|
184
184
|
]);
|
|
@@ -189,8 +189,8 @@ class M extends n {
|
|
|
189
189
|
* @param {array} options
|
|
190
190
|
* @returns {array}
|
|
191
191
|
*/
|
|
192
|
-
mapOptions(
|
|
193
|
-
return [
|
|
192
|
+
mapOptions(e = []) {
|
|
193
|
+
return [e.map((a) => a.group ? this.addGroup(a) : this.addLink(a)), (a) => a];
|
|
194
194
|
}
|
|
195
195
|
/**
|
|
196
196
|
* This will get the subs.
|
|
@@ -206,9 +206,9 @@ class M extends n {
|
|
|
206
206
|
* @param {object} option
|
|
207
207
|
* @returns {object}
|
|
208
208
|
*/
|
|
209
|
-
addGroup(
|
|
210
|
-
const
|
|
211
|
-
return H({ map:
|
|
209
|
+
addGroup(e) {
|
|
210
|
+
const t = this.mapOptions(e.options);
|
|
211
|
+
return H({ map: t }, e.group);
|
|
212
212
|
}
|
|
213
213
|
/**
|
|
214
214
|
* This will add a link.
|
|
@@ -216,8 +216,8 @@ class M extends n {
|
|
|
216
216
|
* @param {object} option
|
|
217
217
|
* @returns {object}
|
|
218
218
|
*/
|
|
219
|
-
addLink(
|
|
220
|
-
return new x(
|
|
219
|
+
addLink(e) {
|
|
220
|
+
return new x(e);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
class c extends M {
|
|
@@ -230,11 +230,11 @@ class c extends M {
|
|
|
230
230
|
* @param {object} link
|
|
231
231
|
* @returns {object}
|
|
232
232
|
*/
|
|
233
|
-
setupSubNav(
|
|
233
|
+
setupSubNav(e) {
|
|
234
234
|
return new E(
|
|
235
235
|
{
|
|
236
|
-
parentLink:
|
|
237
|
-
options:
|
|
236
|
+
parentLink: e,
|
|
237
|
+
options: e.options
|
|
238
238
|
}
|
|
239
239
|
);
|
|
240
240
|
}
|
|
@@ -244,9 +244,9 @@ class c extends M {
|
|
|
244
244
|
* @param {object} link
|
|
245
245
|
* @returns {object}
|
|
246
246
|
*/
|
|
247
|
-
addSubNav(
|
|
248
|
-
const
|
|
249
|
-
return
|
|
247
|
+
addSubNav(e) {
|
|
248
|
+
const t = this.setupSubNav(e);
|
|
249
|
+
return e.sub = t, t;
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* This will add a link.
|
|
@@ -254,21 +254,21 @@ class c extends M {
|
|
|
254
254
|
* @param {object} option
|
|
255
255
|
* @returns {object}
|
|
256
256
|
*/
|
|
257
|
-
addLink(
|
|
258
|
-
const
|
|
259
|
-
if (this.links.push(
|
|
260
|
-
return
|
|
261
|
-
const a = this.addSubNav(
|
|
257
|
+
addLink(e) {
|
|
258
|
+
const t = new x(e);
|
|
259
|
+
if (this.links.push(t), !t.options)
|
|
260
|
+
return t;
|
|
261
|
+
const a = this.addSubNav(t);
|
|
262
262
|
return {
|
|
263
263
|
class: "child-group",
|
|
264
|
-
link:
|
|
264
|
+
link: t,
|
|
265
265
|
sub: a
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
const O = (s,
|
|
270
|
-
const
|
|
271
|
-
return !
|
|
269
|
+
const O = (s, e) => new RegExp(`${s}($|/|\\.).*`).test(e), z = (s, e) => {
|
|
270
|
+
const t = s.link.panel.pathname;
|
|
271
|
+
return !t && s.isSelected() ? !0 : s.exact ? e === t : O(t, e);
|
|
272
272
|
};
|
|
273
273
|
class E extends c {
|
|
274
274
|
/**
|
|
@@ -285,9 +285,9 @@ class E extends c {
|
|
|
285
285
|
* @returns {object}
|
|
286
286
|
*/
|
|
287
287
|
render() {
|
|
288
|
-
const
|
|
289
|
-
return
|
|
290
|
-
o({ class: "relative group flex flex-col gap-2 py-2 px-0 list-none m-0" }, [...
|
|
288
|
+
const e = `navigation flex flex-auto flex-col sub ${this.mainClassName || ""}`, t = this.mapOptions(this.options);
|
|
289
|
+
return u({ class: e, onState: this.onState() }, [
|
|
290
|
+
o({ class: "relative group flex flex-col gap-2 py-2 px-0 list-none m-0" }, [...t, ...this.addSubs(), this.addWatcher()])
|
|
291
291
|
]);
|
|
292
292
|
}
|
|
293
293
|
/**
|
|
@@ -299,7 +299,7 @@ class E extends c {
|
|
|
299
299
|
addWatcher() {
|
|
300
300
|
return {
|
|
301
301
|
watch: {
|
|
302
|
-
value: ["[[path]]",
|
|
302
|
+
value: ["[[path]]", d.data],
|
|
303
303
|
callBack: this.updateLinks.bind(this)
|
|
304
304
|
}
|
|
305
305
|
};
|
|
@@ -340,8 +340,8 @@ class E extends c {
|
|
|
340
340
|
* @returns {void}
|
|
341
341
|
*/
|
|
342
342
|
afterSetup() {
|
|
343
|
-
const
|
|
344
|
-
this.updateLinks(
|
|
343
|
+
const e = d.data.get("path");
|
|
344
|
+
this.updateLinks(e);
|
|
345
345
|
}
|
|
346
346
|
/**
|
|
347
347
|
* This will update the links.
|
|
@@ -349,24 +349,24 @@ class E extends c {
|
|
|
349
349
|
* @param {string} value
|
|
350
350
|
* @returns {void}
|
|
351
351
|
*/
|
|
352
|
-
updateLinks(
|
|
353
|
-
let
|
|
352
|
+
updateLinks(e) {
|
|
353
|
+
let t = !1;
|
|
354
354
|
for (const a of this.links)
|
|
355
|
-
if (a.rendered && (
|
|
355
|
+
if (a.rendered && (t = z(a, e), t === !0))
|
|
356
356
|
break;
|
|
357
|
-
this.parentLink.update(
|
|
357
|
+
this.parentLink.update(t);
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
const F = ({ title: s, options:
|
|
360
|
+
const F = ({ title: s, options: e, class: t = "", mobileBorder: a = !1, sticky: v = !1 }) => l({ class: `pb-12 p-4 pt-0 lg:p-6 lg:border-r w-full lg:max-w-[300px] h-full ${t}` }, [
|
|
361
361
|
s && B({ class: "pb-4 md:pb-2 px-6 flex flex-col" }, [
|
|
362
362
|
L({ class: "scroll-m-20 text-3xl lg:text-2xl font-bold tracking-tight" }, s)
|
|
363
363
|
]),
|
|
364
|
-
new c({ options:
|
|
364
|
+
new c({ options: e, mobileBorder: a, class: v ? "sticky top-0" : "" })
|
|
365
365
|
]), T = (s) => p({ class: "text-lg ml-2" }, s), A = (s) => l({ class: "sticky flex flex-row items-center bg-popover lg:hidden top-0 z-10 border-0 border-b" }, [
|
|
366
366
|
f({
|
|
367
367
|
variant: "icon",
|
|
368
368
|
class: "m-2",
|
|
369
|
-
click: (
|
|
369
|
+
click: (e, { state: t }) => t.toggle("open"),
|
|
370
370
|
icon: r.arrows.left
|
|
371
371
|
}),
|
|
372
372
|
s.title && T(s.title)
|
|
@@ -375,7 +375,7 @@ const F = ({ title: s, options: t, class: e = "", mobileBorder: a = !1, sticky:
|
|
|
375
375
|
absolute inset-0 bg-black/40 z-[-1] fadeIn
|
|
376
376
|
transition-opacity duration-200
|
|
377
377
|
`,
|
|
378
|
-
click: (s, { state:
|
|
378
|
+
click: (s, { state: e }) => e.open = !1
|
|
379
379
|
});
|
|
380
380
|
class W extends n {
|
|
381
381
|
/**
|
|
@@ -439,7 +439,7 @@ class W extends n {
|
|
|
439
439
|
*
|
|
440
440
|
* @param {object} container
|
|
441
441
|
*/
|
|
442
|
-
setContainer(
|
|
442
|
+
setContainer(e) {
|
|
443
443
|
this.container = app.root;
|
|
444
444
|
}
|
|
445
445
|
}
|
|
@@ -447,25 +447,25 @@ const m = (s) => f({ class: "m-2", variant: "ghost", addState() {
|
|
|
447
447
|
return {
|
|
448
448
|
open: !1
|
|
449
449
|
};
|
|
450
|
-
}, click: (
|
|
450
|
+
}, click: (e, { state: t }) => t.toggle("open") }, [
|
|
451
451
|
h(r.bar.three)
|
|
452
452
|
]), j = (s) => p({ class: "text-lg ml-2" }, s), Y = (s) => l({ class: "flex flex-auto flex-row items-center lg:hidden" }, [
|
|
453
453
|
m(),
|
|
454
454
|
s.title && j(s.title)
|
|
455
|
-
]), g = (s,
|
|
456
|
-
s.forEach((
|
|
457
|
-
if (
|
|
458
|
-
g(
|
|
455
|
+
]), g = (s, e) => {
|
|
456
|
+
s.forEach((t) => {
|
|
457
|
+
if (t.options) {
|
|
458
|
+
g(t.options, e);
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
|
-
|
|
461
|
+
t.callBack = e;
|
|
462
462
|
});
|
|
463
463
|
}, k = (s) => {
|
|
464
|
-
const
|
|
465
|
-
return g(s.options,
|
|
464
|
+
const e = (t, { parent: a }) => a.parent.state.open = !1;
|
|
465
|
+
return g(s.options, e), l({ class: "bg-background flex flex-auto flex-col w-full relative" }, [
|
|
466
466
|
C(
|
|
467
467
|
"open",
|
|
468
|
-
(
|
|
468
|
+
(t) => t ? [
|
|
469
469
|
new W({ title: s.title }, [
|
|
470
470
|
new c(
|
|
471
471
|
{
|
package/dist/organisms.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as s, n as o, C as t, j as r, D as l, l as n, H as i, I as b, N as d, O as v, P as g, S as p, m as u, r as N, q as k, o as D, p as C, T, k as c, U as M, W as B, f as m, h as y, i as W, c as h, d as H, b as P, e as S, a as f, g as x } from "./signature-panel-DPYBoBP2.js";
|
|
2
2
|
import { b as L, C as O, D as F, a as U, F as G, M as j, c as q, p as w } from "./calendar-B_jcSUF6.js";
|
|
3
|
-
import { B as A, I as E, M as J, d as K, e as Q, g as R, N as V, b as X, a as Y, f as Z, P as _, c as $, S as aa, T as ea } from "./mobile-nav-wrapper-
|
|
3
|
+
import { B as A, I as E, M as J, d as K, e as Q, g as R, N as V, b as X, a as Y, f as Z, P as _, c as $, S as aa, T as ea } from "./mobile-nav-wrapper-CzfSCjzN.js";
|
|
4
4
|
export {
|
|
5
5
|
s as BackButton,
|
|
6
6
|
A as Backdrop,
|
package/dist/pages.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, a as P, C as g, F as n, b as l, c as i, M as r, P as c, S as o } from "./sidebar-menu-page-
|
|
1
|
+
import { B as s, a as P, C as g, F as n, b as l, c as i, M as r, P as c, S as o } from "./sidebar-menu-page-2UbHpAV7.js";
|
|
2
2
|
export {
|
|
3
3
|
s as BasicPage,
|
|
4
4
|
P as BlankPage,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Div as t, Header as n, H1 as d, P as o } from "@base-framework/atoms";
|
|
2
2
|
import { F as l, A as h } from "./aside-template-McEj_Gxc.js";
|
|
3
3
|
import { Component as x, Atom as i } from "@base-framework/base";
|
|
4
|
-
import { c as u, e as p } from "./mobile-nav-wrapper-
|
|
4
|
+
import { c as u, e as p } from "./mobile-nav-wrapper-CzfSCjzN.js";
|
|
5
5
|
class c extends x {
|
|
6
6
|
/**
|
|
7
7
|
* This will declare the props for the compiler.
|
package/package.json
CHANGED