@base-framework/ui 1.0.222 → 1.0.223
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
|
@@ -5,7 +5,7 @@ import { V as w, a as R } from "./veil-D4dRxILB.js";
|
|
|
5
5
|
import { Icons as E } from "./icons.es.js";
|
|
6
6
|
import { A as O, B as V, C as j, t as q, E as z, v as J, w as _, x as K, D as Q, j as X, k as Y, H as Z, G as $, s as aa, c as ea, a as sa, b as oa, I as ta, i as ra, g as na, e as la, h as ia, F as pa, d as ua, f as ma, u as da, M as ca, l as ga, N as Ca, P as Ta, p as ba, q as Da, S as Ia, n as Sa, o as Ba, T as Pa, y as Fa, z as Ma, m as ka, r as Na } from "./empty-state-2O1fITpG.js";
|
|
7
7
|
import { A as va, b as xa, C as ya, D as ha, a as Wa, F as Ha, M as La, P as Aa, c as wa, g as Ra, p as Ua } from "./calendar-Bn55oWBo.js";
|
|
8
|
-
import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, R as Za, S as $a, n as ae, o as ee, t as se, s as oe, q as te, r as re, T as ne, l as le, U as ie, W as pe, f as ue, h as me, i as de, c as ce, d as ge, b as Ce, e as Te, a as be, g as De } from "./signature-panel-
|
|
8
|
+
import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, R as Za, S as $a, n as ae, o as ee, t as se, s as oe, q as te, r as re, T as ne, l as le, U as ie, W as pe, f as ue, h as me, i as de, c as ce, d as ge, b as Ce, e as Te, a as be, g as De } from "./signature-panel-Casw0xrl.js";
|
|
9
9
|
import { B as Se, I as Be, M as Pe, d as Fe, e as Me, g as ke, N as Ne, b as fe, a as ve, f as xe, P as ye, c as he, S as We, T as He } from "./mobile-nav-wrapper-Dj67Pb8l.js";
|
|
10
10
|
import { B as Ae, a as we, C as Re, F as Ue, b as Ee, c as Ge, M as Oe, P as Ve, S as je } from "./sidebar-menu-page-BVryQj2Z.js";
|
|
11
11
|
import { A as ze, F as Je, M as _e, a as Ke, T as Qe } from "./aside-template-McEj_Gxc.js";
|
package/dist/organisms.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as g, O as p, P as u, R as v, S as D, n as N, o as k, t as C, s as c, q as T, r as M, T as m, l as y, U as B, W, f as h, h as S, i as H, c as P, d as I, b as f, e as x, a as L, g as O } from "./signature-panel-
|
|
1
|
+
import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as g, O as p, P as u, R as v, S as D, n as N, o as k, t as C, s as c, q as T, r as M, T as m, l as y, U as B, W, f as h, h as S, i as H, c as P, d as I, b as f, e as x, a as L, g as O } from "./signature-panel-Casw0xrl.js";
|
|
2
2
|
import { b as U, C as G, D as R, a as j, F as q, M as w, c as z, p as A } from "./calendar-Bn55oWBo.js";
|
|
3
3
|
import { B as J, I as K, M as Q, d as V, e as X, g as Y, N as Z, b as _, a as $, f as aa, P as ea, c as sa, S as ta, T as oa } from "./mobile-nav-wrapper-Dj67Pb8l.js";
|
|
4
4
|
export {
|
|
@@ -325,7 +325,7 @@ const j = ({ label: e, click: t }) => g(
|
|
|
325
325
|
variant: u,
|
|
326
326
|
disabled: s,
|
|
327
327
|
click: () => {
|
|
328
|
-
|
|
328
|
+
s || l();
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
e.toString()
|
|
@@ -372,9 +372,7 @@ const j = ({ label: e, click: t }) => g(
|
|
|
372
372
|
)
|
|
373
373
|
), Tt = ({ start: e, end: t, selecting: s, onSelectStart: a, onSelectEnd: n }) => o({ class: "flex space-x-2 mb-4" }, [
|
|
374
374
|
g({
|
|
375
|
-
click:
|
|
376
|
-
console.log("Start button clicked"), a();
|
|
377
|
-
},
|
|
375
|
+
click: a,
|
|
378
376
|
variant: s === "start" ? "default" : "outline",
|
|
379
377
|
class: "flex-1 text-left justify-start px-3 py-2 text-sm font-medium rounded-md border min-h-[2.5rem] flex flex-col items-start"
|
|
380
378
|
}, [
|
|
@@ -382,9 +380,7 @@ const j = ({ label: e, click: t }) => g(
|
|
|
382
380
|
o({ class: "font-medium" }, e ? Y(e) : "Select start")
|
|
383
381
|
]),
|
|
384
382
|
g({
|
|
385
|
-
click:
|
|
386
|
-
console.log("End button clicked"), n();
|
|
387
|
-
},
|
|
383
|
+
click: n,
|
|
388
384
|
variant: s === "end" ? "default" : "outline",
|
|
389
385
|
class: "flex-1 text-left justify-start px-3 py-2 text-sm font-medium rounded-md border min-h-[2.5rem] flex flex-col items-start"
|
|
390
386
|
}, [
|
|
@@ -438,8 +434,11 @@ class ke extends m {
|
|
|
438
434
|
current: {
|
|
439
435
|
date: t.getDate(),
|
|
440
436
|
month: a,
|
|
441
|
-
year: n
|
|
442
|
-
|
|
437
|
+
year: n,
|
|
438
|
+
start: this.startDate,
|
|
439
|
+
end: this.endDate
|
|
440
|
+
},
|
|
441
|
+
selecting: "start"
|
|
443
442
|
});
|
|
444
443
|
}
|
|
445
444
|
/**
|
|
@@ -454,15 +453,12 @@ class ke extends m {
|
|
|
454
453
|
/**
|
|
455
454
|
* Initialize component state.
|
|
456
455
|
*
|
|
457
|
-
* @returns {{view:string
|
|
456
|
+
* @returns {{view:string}}
|
|
458
457
|
*/
|
|
459
458
|
setupStates() {
|
|
460
459
|
return {
|
|
461
|
-
view: "calendar"
|
|
460
|
+
view: "calendar"
|
|
462
461
|
// 'calendar', 'months', or 'years'
|
|
463
|
-
selecting: "start",
|
|
464
|
-
start: this.startDate,
|
|
465
|
-
end: this.endDate
|
|
466
462
|
};
|
|
467
463
|
}
|
|
468
464
|
/**
|
|
@@ -472,7 +468,7 @@ class ke extends m {
|
|
|
472
468
|
* @returns {void}
|
|
473
469
|
*/
|
|
474
470
|
handleClick(t) {
|
|
475
|
-
|
|
471
|
+
this.data.selecting === "start" ? (this.data.current.start = t, this.data.current.end = null, this.data.selecting = "end") : (this.data.current.start && t < this.data.current.start ? (this.data.current.end = this.data.current.start, this.data.current.start = t) : this.data.current.end = t, this.data.selecting = "start", typeof this.onRangeSelect == "function" && this.onRangeSelect(this.data.current.start, this.data.current.end));
|
|
476
472
|
}
|
|
477
473
|
/**
|
|
478
474
|
* Update current month/year in data.
|
|
@@ -490,11 +486,11 @@ class ke extends m {
|
|
|
490
486
|
* @returns {object}
|
|
491
487
|
*/
|
|
492
488
|
render() {
|
|
493
|
-
const { today: t, current: s } = this.data, { start:
|
|
489
|
+
const { today: t, current: s, selecting: a } = this.data, { start: n, end: i } = s, l = new Date(s.year, s.month, 1).getDay(), u = new Date(s.year, s.month + 1, 0).getDate(), c = [];
|
|
494
490
|
for (let h = 0; h < l; h++)
|
|
495
491
|
c.push(null);
|
|
496
492
|
for (let h = 1; h <= u; h++) {
|
|
497
|
-
const r = st(s.year, s.month, h), d = new Date(s.year, s.month, h), p = new Date(t.year, t.month, t.date), y = d < p, L = this.blockPriorDates && y, T =
|
|
493
|
+
const r = st(s.year, s.month, h), d = new Date(s.year, s.month, h), p = new Date(t.year, t.month, t.date), y = d < p, L = this.blockPriorDates && y, T = n === r, B = i === r, X = n && i && r > n && r < i;
|
|
498
494
|
c.push({
|
|
499
495
|
day: h,
|
|
500
496
|
iso: r,
|
|
@@ -507,11 +503,11 @@ class ke extends m {
|
|
|
507
503
|
}
|
|
508
504
|
return o({ class: "range-calendar bg-background border border-border rounded-lg shadow-md p-4 w-full max-w-sm" }, [
|
|
509
505
|
Tt({
|
|
510
|
-
start:
|
|
511
|
-
end:
|
|
512
|
-
selecting:
|
|
513
|
-
onSelectStart: () => this.
|
|
514
|
-
onSelectEnd: () => this.
|
|
506
|
+
start: n,
|
|
507
|
+
end: i,
|
|
508
|
+
selecting: a,
|
|
509
|
+
onSelectStart: () => this.data.selecting = "start",
|
|
510
|
+
onSelectEnd: () => this.data.selecting = "end"
|
|
515
511
|
}),
|
|
516
512
|
q("view", (h) => {
|
|
517
513
|
switch (h) {
|
|
@@ -42,13 +42,10 @@ export class RangeCalendar extends Component {
|
|
|
42
42
|
/**
|
|
43
43
|
* Initialize component state.
|
|
44
44
|
*
|
|
45
|
-
* @returns {{view:string
|
|
45
|
+
* @returns {{view:string}}
|
|
46
46
|
*/
|
|
47
47
|
setupStates(): {
|
|
48
48
|
view: string;
|
|
49
|
-
selecting: string;
|
|
50
|
-
start: string | null;
|
|
51
|
-
end: string | null;
|
|
52
49
|
};
|
|
53
50
|
/**
|
|
54
51
|
* Handle a date cell click.
|
package/package.json
CHANGED