@base-framework/ui 1.0.2015 → 1.0.2017
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 +13 -12
- package/dist/{empty-state-CkoAZpy0.js → empty-state-E4ZW72TQ.js} +2 -2
- package/dist/image-DGInMcvV.js +31 -0
- package/dist/index.es.js +140 -139
- package/dist/molecules.es.js +2 -2
- package/dist/organisms.es.js +2 -2
- package/dist/{range-calendar-CCVC3e9d.js → range-calendar-KNBY64Zx.js} +158 -163
- package/dist/{signature-panel-DIFmtS0f.js → signature-panel-BrbTbt2g.js} +2 -2
- package/dist/{tooltip-PupzYM1r.js → tooltip-BP1ZmWxs.js} +1 -1
- package/dist/types/components/atoms/atoms.d.ts +1 -0
- package/dist/types/components/atoms/image.d.ts +9 -0
- package/package.json +1 -1
- package/dist/veil-CqnAmj-D.js +0 -20
package/dist/atoms.es.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { B as e, C as t, F as o, L as r, P as n, R as p, S as
|
|
1
|
+
import { B as e, C as t, F as o, L as r, P as n, R as p, S as I, a as u, T as i } from "./tooltip-BP1ZmWxs.js";
|
|
2
2
|
import { B as d, I as m, L as x } from "./buttons-CHEs54Wl.js";
|
|
3
|
-
import { C as T, F as
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
3
|
+
import { C as T, F as g } from "./form-group-CJzpq9Us.js";
|
|
4
|
+
import { C as F, d as c, D as f, c as L, E as P, F as R, H as S, I as b, M as h, N as k, P as D, R as V, T as E, a as G, b as H, U as M, W as N } from "./inputs-9udyzkHR.js";
|
|
5
|
+
import { I as W, V as w, a as J } from "./image-DGInMcvV.js";
|
|
6
6
|
export {
|
|
7
7
|
e as Badge,
|
|
8
8
|
d as Button,
|
|
9
9
|
T as Card,
|
|
10
|
-
|
|
10
|
+
F as Checkbox,
|
|
11
11
|
t as CircleGraph,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
c as ColorInput,
|
|
13
|
+
f as DateInput,
|
|
14
14
|
L as DateTimeInput,
|
|
15
15
|
P as EmailInput,
|
|
16
16
|
o as Fieldset,
|
|
17
17
|
R as FileInput,
|
|
18
|
-
|
|
18
|
+
g as FormGroup,
|
|
19
19
|
S as HiddenInput,
|
|
20
20
|
m as Icon,
|
|
21
|
+
W as Image,
|
|
21
22
|
b as Input,
|
|
22
23
|
r as Legend,
|
|
23
24
|
x as LoadingButton,
|
|
@@ -27,14 +28,14 @@ export {
|
|
|
27
28
|
n as ProgressBar,
|
|
28
29
|
V as Radio,
|
|
29
30
|
p as RangeSlider,
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
I as Select,
|
|
32
|
+
u as Skeleton,
|
|
32
33
|
E as TelInput,
|
|
33
34
|
G as Textarea,
|
|
34
35
|
H as TimeInput,
|
|
35
36
|
i as Tooltip,
|
|
36
37
|
M as UrlInput,
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
w as Veil,
|
|
39
|
+
J as VeilJot,
|
|
39
40
|
N as WeekInput
|
|
40
41
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Div as n, H5 as X, P as b, I as x, Li as q, Span as a, Ul as Y, Button as m, OnState as D, Label as A, H2 as S, Form as Z, Header as F, Footer as M, A as V, H3 as ee, Checkbox as te, Input as f, Img as _, Nav as se, UseParent as W, OnStateOpen as P, Time as oe, Dialog as ne } from "@base-framework/atoms";
|
|
2
2
|
import { Atom as c, Component as y, Html as O, Dom as re, base as le, Data as T, Builder as G, Jot as w, Events as p, DateTime as L } from "@base-framework/base";
|
|
3
|
-
import { P as I, b as ie, R as ae } from "./range-calendar-
|
|
3
|
+
import { P as I, b as ie, R as ae } from "./range-calendar-KNBY64Zx.js";
|
|
4
4
|
import { C as ce, F as ue } from "./form-group-CJzpq9Us.js";
|
|
5
5
|
import { B as h, I as g } from "./buttons-CHEs54Wl.js";
|
|
6
6
|
import { Icons as u } from "./icons.es.js";
|
|
7
7
|
import { Timer as de, List as he, DynamicTime as fe } from "@base-framework/organisms";
|
|
8
|
-
import { a as C } from "./
|
|
8
|
+
import { a as C } from "./image-DGInMcvV.js";
|
|
9
9
|
import { F as j } from "./format-BmrNQptv.js";
|
|
10
10
|
const z = {
|
|
11
11
|
info: {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Jot as i, Component as r, Atom as o } from "@base-framework/base";
|
|
2
|
+
import { Img as a } from "@base-framework/atoms";
|
|
3
|
+
class s extends r {
|
|
4
|
+
/**
|
|
5
|
+
* This will set the component context.
|
|
6
|
+
*
|
|
7
|
+
* @param {object|null} context
|
|
8
|
+
* @returns {object|null}
|
|
9
|
+
*/
|
|
10
|
+
setContext(l) {
|
|
11
|
+
if (this.data)
|
|
12
|
+
return null;
|
|
13
|
+
const e = this?.parent?.data ?? this?.parent?.context?.data ?? this?.parent?.state ?? null;
|
|
14
|
+
return e ? { data: e } : null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const f = (t) => i(t, s), p = o(({ src: t, alt: l, class: e }) => !t || (e = e || "", t.indexOf(".") === -1 && t.indexOf("[[") === -1) ? null : a({
|
|
18
|
+
class: `absolute w-full h-full rounded-full object-cover fadeIn ${e}`,
|
|
19
|
+
src: t,
|
|
20
|
+
alt: l,
|
|
21
|
+
load: (n) => n.target.style.visibility = "visible",
|
|
22
|
+
/**
|
|
23
|
+
* If there's an error loading the image, hide it.
|
|
24
|
+
*/
|
|
25
|
+
error: (n) => n.target.style.visibility = "hidden"
|
|
26
|
+
}));
|
|
27
|
+
export {
|
|
28
|
+
p as I,
|
|
29
|
+
s as V,
|
|
30
|
+
f as a
|
|
31
|
+
};
|
package/dist/index.es.js
CHANGED
|
@@ -1,177 +1,178 @@
|
|
|
1
|
-
import { B as s, C as o, F as t, L as r, P as n, R as l, S as i, a as p, T as
|
|
1
|
+
import { B as s, C as o, F as t, L as r, P as n, R as l, S as i, a as p, T as m } from "./tooltip-BP1ZmWxs.js";
|
|
2
2
|
import { B as u, I as g, L as C } from "./buttons-CHEs54Wl.js";
|
|
3
3
|
import { C as T, F as b } from "./form-group-CJzpq9Us.js";
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
import { Icons as
|
|
7
|
-
import { A as
|
|
8
|
-
import { A as
|
|
9
|
-
import { B as
|
|
10
|
-
import { B as
|
|
11
|
-
import { B as
|
|
12
|
-
import { A as
|
|
13
|
-
import { B as
|
|
14
|
-
import { F as ds, c as
|
|
15
|
-
import { I as
|
|
4
|
+
import { C as D, d as S, D as F, c as B, E as P, F as k, H as M, I as x, M as f, N as v, P as N, R as y, T as h, a as U, b as L, U as W, W as H } from "./inputs-9udyzkHR.js";
|
|
5
|
+
import { I as w, V as A, a as G } from "./image-DGInMcvV.js";
|
|
6
|
+
import { Icons as E } from "./icons.es.js";
|
|
7
|
+
import { A as j, B as q, C as J, w as z, K, y as Q, z as _, E as X, G as Y, D as Z, m as $, n as aa, Q as ea, O as sa, v as oa, c as ta, a as ra, b as na, R as la, l as ia, g as pa, i as ma, h as da, j as ua, e as ga, k as Ca, F as ca, d as Ta, f as ba, I as Ia, L as Da, x as Sa, M as Fa, o as Ba, N as Pa, P as ka, s as Ma, t as xa, S as fa, q as va, r as Na, T as ya, H as ha, J as Ua, p as La, u as Wa } from "./empty-state-E4ZW72TQ.js";
|
|
8
|
+
import { A as Ra, b as wa, C as Aa, D as Ga, a as Oa, F as Ea, M as Va, P as ja, R as qa, c as Ja, g as za, p as Ka } from "./range-calendar-KNBY64Zx.js";
|
|
9
|
+
import { B as _a, p as Xa, C as Ya, j as Za, D as $a, m as ae, k as ee, H as se, I as oe, N as te, O as re, P as ne, S as le, n as ie, o as pe, x as me, s as de, q as ue, r as ge, T as Ce, t as ce, w as Te, u as be, v as Ie, l as De, U as Se, W as Fe, f as Be, h as Pe, i as ke, c as Me, d as xe, b as fe, e as ve, a as Ne, g as ye } from "./signature-panel-BrbTbt2g.js";
|
|
10
|
+
import { B as Ue, I as Le, M as We, d as He, e as Re, g as we, N as Ae, b as Ge, a as Oe, f as Ee, P as Ve, c as je, S as qe, T as Je } from "./mobile-nav-wrapper-Dm9DinRD.js";
|
|
11
|
+
import { B as Ke, a as Qe, C as _e, F as Xe, b as Ye, c as Ze, M as $e, P as as, S as es } from "./sidebar-menu-page-D4WMgz5U.js";
|
|
12
|
+
import { A as os, F as ts, M as rs, a as ns, T as ls } from "./aside-template-sUm-F2f0.js";
|
|
13
|
+
import { B as ps } from "./bside-template-do_hXebn.js";
|
|
14
|
+
import { F as ds, c as us } from "./format-BmrNQptv.js";
|
|
15
|
+
import { I as Cs } from "./image-scaler-1G-JzJVG.js";
|
|
16
16
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
j as Alert,
|
|
18
|
+
os as AsideTemplate,
|
|
19
|
+
Ra as Avatar,
|
|
20
|
+
_a as BackButton,
|
|
21
|
+
Ue as Backdrop,
|
|
22
22
|
s as Badge,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
Ke as BasicPage,
|
|
24
|
+
Qe as BlankPage,
|
|
25
|
+
q as Breadcrumb,
|
|
26
|
+
ps as BsideTemplate,
|
|
27
27
|
u as Button,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
Xa as ButtonTab,
|
|
29
|
+
wa as Calendar,
|
|
30
|
+
Aa as CalendarCells,
|
|
31
31
|
T as Card,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
_e as CenterPage,
|
|
33
|
+
D as Checkbox,
|
|
34
|
+
Ya as CheckboxCol,
|
|
35
35
|
o as CircleGraph,
|
|
36
36
|
S as ColorInput,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
J as ColumnRow,
|
|
38
|
+
z as Combobox,
|
|
39
|
+
K as Confirmation,
|
|
40
|
+
Q as CountDisplay,
|
|
41
|
+
_ as Counter,
|
|
42
|
+
Za as DataTable,
|
|
43
|
+
$a as DataTableBody,
|
|
44
44
|
F as DateInput,
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
X as DatePicker,
|
|
46
|
+
Y as DateRangePicker,
|
|
47
47
|
B as DateTimeInput,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
Ga as DayCell,
|
|
49
|
+
Oa as DayHeader,
|
|
50
|
+
Z as DelayComponent,
|
|
51
|
+
$ as DetailBody,
|
|
52
|
+
aa as DetailSection,
|
|
53
|
+
ea as Dialog,
|
|
54
|
+
sa as DialogContainer,
|
|
55
|
+
ae as DockableOverlay,
|
|
56
|
+
oa as DotsIndicator,
|
|
57
|
+
ta as Dropdown,
|
|
58
|
+
ra as DropdownItem,
|
|
59
|
+
na as DropdownMenu,
|
|
60
|
+
ee as DynamicDataTable,
|
|
61
61
|
P as EmailInput,
|
|
62
|
-
|
|
62
|
+
la as EmptyState,
|
|
63
63
|
t as Fieldset,
|
|
64
64
|
k as FileInput,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
ia as Form,
|
|
66
|
+
pa as FormCard,
|
|
67
|
+
ma as FormCardContent,
|
|
68
68
|
da as FormCardGroup,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
ua as FormControl,
|
|
70
|
+
ga as FormDescription,
|
|
71
|
+
Ca as FormField,
|
|
72
72
|
b as FormGroup,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
ca as FormItem,
|
|
74
|
+
Ta as FormLabel,
|
|
75
|
+
ba as FormMessage,
|
|
76
76
|
ds as Format,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
Ea as FormatDate,
|
|
78
|
+
Xe as FullContainPage,
|
|
79
|
+
Ye as FullPage,
|
|
80
|
+
ts as FullTemplate,
|
|
81
|
+
Ze as FullscreenPage,
|
|
82
|
+
se as HeaderCol,
|
|
83
83
|
M as HiddenInput,
|
|
84
84
|
g as Icon,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
E as Icons,
|
|
86
|
+
w as Image,
|
|
87
|
+
Cs as ImageScaler,
|
|
88
|
+
Ia as ImageUploader,
|
|
89
|
+
Le as InlineNavigation,
|
|
90
|
+
oe as InlineOverlay,
|
|
90
91
|
x as Input,
|
|
91
92
|
r as Legend,
|
|
92
93
|
C as LoadingButton,
|
|
93
94
|
Da as LogoUploader,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
rs as MainColumn,
|
|
96
|
+
We as MainLink,
|
|
97
|
+
$e as MainSection,
|
|
98
|
+
Sa as MinusButton,
|
|
99
|
+
He as MobileNavButton,
|
|
100
|
+
Re as MobileNavWrapper,
|
|
101
|
+
Fa as Modal,
|
|
102
|
+
Va as MonthCalendar,
|
|
102
103
|
f as MonthInput,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
we as NavButton,
|
|
105
|
+
Ae as NavButtonLink,
|
|
106
|
+
Ge as Navigation,
|
|
107
|
+
Oe as NavigationGroup,
|
|
108
|
+
te as NavigationMenu,
|
|
109
|
+
Ee as NavigationPopover,
|
|
110
|
+
Ba as Notification,
|
|
111
|
+
Pa as NotificationContainer,
|
|
111
112
|
v as NumberInput,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
re as Overlay,
|
|
114
|
+
as as Page,
|
|
115
|
+
ne as Panel,
|
|
115
116
|
N as PasswordInput,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
ka as PlusButton,
|
|
118
|
+
ja as PopOver,
|
|
119
|
+
Ve as PopupHeader,
|
|
119
120
|
n as ProgressBar,
|
|
120
121
|
y as Radio,
|
|
121
|
-
|
|
122
|
+
qa as RangeCalendar,
|
|
122
123
|
l as RangeSlider,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
Ma as STATUSES,
|
|
125
|
+
xa as STATUS_CLASS,
|
|
126
|
+
le as ScrollableDataTable,
|
|
127
|
+
ie as SearchDropdown,
|
|
128
|
+
pe as SearchInput,
|
|
128
129
|
i as Select,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
je as SidebarMenu,
|
|
131
|
+
es as SidebarMenuPage,
|
|
132
|
+
me as SignaturePanel,
|
|
132
133
|
p as Skeleton,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
fa as SplitRow,
|
|
135
|
+
va as StaticStatusIndicator,
|
|
136
|
+
Na as StatusIndicator,
|
|
137
|
+
qe as SubNavigation,
|
|
137
138
|
de as Tab,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
ue as TabGroup,
|
|
140
|
+
ge as TabNavigation,
|
|
141
|
+
Ce as TableHeader,
|
|
141
142
|
h as TelInput,
|
|
142
|
-
|
|
143
|
+
ns as Template,
|
|
143
144
|
U as Textarea,
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
ya as ThemeToggle,
|
|
146
|
+
ha as TimeFrame,
|
|
146
147
|
L as TimeInput,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
148
|
+
Ua as TimePicker,
|
|
149
|
+
Je as TitleHeader,
|
|
150
|
+
La as Toggle,
|
|
151
|
+
m as Tooltip,
|
|
152
|
+
ls as TopBar,
|
|
153
|
+
ce as UnderlinedButtonTab,
|
|
154
|
+
Te as UnderlinedTab,
|
|
155
|
+
be as UnderlinedTabGroup,
|
|
156
|
+
Ie as UnderlinedTabNavigation,
|
|
156
157
|
W as UrlInput,
|
|
157
158
|
De as UserList,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
159
|
+
Se as UserListItem,
|
|
160
|
+
A as Veil,
|
|
161
|
+
G as VeilJot,
|
|
162
|
+
Fe as WeekCalendar,
|
|
163
|
+
Be as WeekCell,
|
|
164
|
+
Pe as WeekCells,
|
|
165
|
+
ke as WeekHeader,
|
|
165
166
|
H as WeekInput,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
167
|
+
Ja as addTime,
|
|
168
|
+
Me as calculateWeekNumber,
|
|
169
|
+
us as createWatcherCallback,
|
|
170
|
+
xe as generateWeeks,
|
|
171
|
+
fe as getDateFromWeek,
|
|
172
|
+
ve as getMonthDays,
|
|
173
|
+
Ne as getNextMonthDays,
|
|
174
|
+
za as getPosition,
|
|
175
|
+
ye as getPreviousMonthDays,
|
|
176
|
+
Wa as getStatusClass,
|
|
177
|
+
Ka as pad
|
|
177
178
|
};
|
package/dist/molecules.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as s, B as t, C as e, w as r, K as i, y as n, z as m, E as l, G as d, D as C, m as p, n as S, Q as g, O as u, v as D, c, a as F, b as T, R as P, l as A, g as I, i as f, h as w, j as b, e as y, k as B, F as M, d as k, f as x, I as L, L as R, x as U, M as v, o as E, N, P as h, s as G, t as O, S as j, q, r as z, T as H, H as J, J as K, p as Q, u as _ } from "./empty-state-
|
|
2
|
-
import { A as W, P as X, g as Y } from "./range-calendar-
|
|
1
|
+
import { A as s, B as t, C as e, w as r, K as i, y as n, z as m, E as l, G as d, D as C, m as p, n as S, Q as g, O as u, v as D, c, a as F, b as T, R as P, l as A, g as I, i as f, h as w, j as b, e as y, k as B, F as M, d as k, f as x, I as L, L as R, x as U, M as v, o as E, N, P as h, s as G, t as O, S as j, q, r as z, T as H, H as J, J as K, p as Q, u as _ } from "./empty-state-E4ZW72TQ.js";
|
|
2
|
+
import { A as W, P as X, g as Y } from "./range-calendar-KNBY64Zx.js";
|
|
3
3
|
export {
|
|
4
4
|
s as Alert,
|
|
5
5
|
W as Avatar,
|
package/dist/organisms.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as s, p as n, C as t, j as o, D as r, m as l, k as i, H as d, I as b, N as u, O as v, P as g, S as p, n as T, o as D, x as N, s as k, q as C, r as c, T as B, t as M, w as m, u as y, v as W, l as h, U as S, W as H, f as P, h as U, i as x, c as I, d as f, b as L, e as O, a as F, g as G } from "./signature-panel-
|
|
2
|
-
import { b as R, C as j, D as q, a as z, F as A, M as E, R as J, c as K, p as Q } from "./range-calendar-
|
|
1
|
+
import { B as s, p as n, C as t, j as o, D as r, m as l, k as i, H as d, I as b, N as u, O as v, P as g, S as p, n as T, o as D, x as N, s as k, q as C, r as c, T as B, t as M, w as m, u as y, v as W, l as h, U as S, W as H, f as P, h as U, i as x, c as I, d as f, b as L, e as O, a as F, g as G } from "./signature-panel-BrbTbt2g.js";
|
|
2
|
+
import { b as R, C as j, D as q, a as z, F as A, M as E, R as J, c as K, p as Q } from "./range-calendar-KNBY64Zx.js";
|
|
3
3
|
import { B as X, I as Y, M as Z, d as _, e as $, g as aa, N as ea, b as sa, a as na, f as ta, P as oa, c as ra, S as la, T as ia } from "./mobile-nav-wrapper-Dm9DinRD.js";
|
|
4
4
|
export {
|
|
5
5
|
s as BackButton,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Div as h,
|
|
1
|
+
import { Div as h, Span as H, Button as _, OnState as J, On as z } from "@base-framework/atoms";
|
|
2
2
|
import { Component as Y, Data as B, Atom as j, DateTime as T } from "@base-framework/base";
|
|
3
|
-
import {
|
|
3
|
+
import { I as L } from "./image-DGInMcvV.js";
|
|
4
|
+
import { B as f } from "./buttons-CHEs54Wl.js";
|
|
4
5
|
import { Icons as P } from "./icons.es.js";
|
|
5
|
-
const U = (
|
|
6
|
-
const
|
|
7
|
-
let i =
|
|
8
|
-
const g = globalThis.innerHeight -
|
|
9
|
-
return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height &&
|
|
6
|
+
const U = (e, t) => {
|
|
7
|
+
const n = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, l = globalThis.scrollY;
|
|
8
|
+
let i = n.left + r, d = n.bottom + l;
|
|
9
|
+
const g = globalThis.innerHeight - n.bottom, m = n.top;
|
|
10
|
+
return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height && m > g ? d = n.top + l - a.height - s : g < a.height && (d = n.bottom + l - (a.height - g) - s), { x: i, y: d };
|
|
10
11
|
};
|
|
11
|
-
class
|
|
12
|
+
class Tt extends Y {
|
|
12
13
|
/**
|
|
13
14
|
* This will set up the data.
|
|
14
15
|
*
|
|
@@ -59,7 +60,7 @@ class Pt extends Y {
|
|
|
59
60
|
return h({
|
|
60
61
|
class: `absolute inset-auto fadeIn mt-2 rounded-md p-0 shadow-lg bg-popover min-h-12 backdrop:bg-transparent text-inherit r z-30 ${t}`,
|
|
61
62
|
popover: "manual",
|
|
62
|
-
toggle: (
|
|
63
|
+
toggle: (n, { state: a }) => n.newState === "closed" ? a.open = !1 : null,
|
|
63
64
|
style: "top: [[position.y]]px; left: [[position.x]]px"
|
|
64
65
|
}, this.children);
|
|
65
66
|
}
|
|
@@ -84,7 +85,7 @@ class Pt extends Y {
|
|
|
84
85
|
* @returns {void}
|
|
85
86
|
*/
|
|
86
87
|
updatePosition() {
|
|
87
|
-
const t = this.button ?? null,
|
|
88
|
+
const t = this.button ?? null, n = this.panel, a = U(t, n);
|
|
88
89
|
this.data.position = a;
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
@@ -136,17 +137,11 @@ class Pt extends Y {
|
|
|
136
137
|
this.panel.hidePopover();
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
|
-
const q = j(({ src:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* If there's an error loading the image, hide it.
|
|
146
|
-
*/
|
|
147
|
-
error: (e) => e.target.style.visibility = "hidden"
|
|
148
|
-
})), K = (n) => n && (Array.isArray(n) && (n = n.join(" ")), typeof n != "string" && (n = String(n)), n.split(" ").map((t) => t.charAt(0)).join("").toUpperCase()), G = (n) => !n || n.length < 2 ? n : K(n), Q = (n) => H([n, (t, e) => {
|
|
149
|
-
e.textContent = G(t);
|
|
140
|
+
const q = j(({ src: e, alt: t }) => !e || e.indexOf(".") === -1 && e.indexOf("[[") === -1 ? null : L({
|
|
141
|
+
src: e,
|
|
142
|
+
alt: t
|
|
143
|
+
})), K = (e) => e && (Array.isArray(e) && (e = e.join(" ")), typeof e != "string" && (e = String(e)), e.split(" ").map((t) => t.charAt(0)).join("").toUpperCase()), G = (e) => !e || e.length < 2 ? e : K(e), Q = (e) => H([e, (t, n) => {
|
|
144
|
+
n.textContent = G(t);
|
|
150
145
|
}]), A = {
|
|
151
146
|
xs: "h-6 w-6",
|
|
152
147
|
sm: "h-8 w-8",
|
|
@@ -167,8 +162,8 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
|
|
|
167
162
|
"3xl": "text-4xl",
|
|
168
163
|
"4xl": "text-5xl",
|
|
169
164
|
default: "text-base"
|
|
170
|
-
}, V = (
|
|
171
|
-
const a = G(
|
|
165
|
+
}, V = (e) => A[e] || A.default, Z = (e) => I[e] || I.default, tt = (e, t = null, n = "md") => {
|
|
166
|
+
const a = G(e), s = Z(n);
|
|
172
167
|
return h(
|
|
173
168
|
{
|
|
174
169
|
class: `
|
|
@@ -181,49 +176,49 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
|
|
|
181
176
|
t ? Q(t) : H({ class: "uppercase" }, a)
|
|
182
177
|
]
|
|
183
178
|
);
|
|
184
|
-
},
|
|
179
|
+
}, Nt = j(({ src: e, alt: t, fallbackText: n, watcherFallback: a, size: s }) => {
|
|
185
180
|
const r = V(s);
|
|
186
181
|
return h(
|
|
187
182
|
{
|
|
188
183
|
class: `relative flex items-center justify-center ${r}`
|
|
189
184
|
},
|
|
190
185
|
[
|
|
191
|
-
q({ src:
|
|
192
|
-
tt(
|
|
186
|
+
q({ src: e, alt: t }),
|
|
187
|
+
tt(n, a, s)
|
|
193
188
|
]
|
|
194
189
|
);
|
|
195
|
-
}), et = ({ currentMonth:
|
|
190
|
+
}), et = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
|
|
196
191
|
{ class: "grid grid-cols-3 gap-2" },
|
|
197
192
|
T.monthNames.map(
|
|
198
|
-
(a, s) =>
|
|
193
|
+
(a, s) => f(
|
|
199
194
|
{
|
|
200
195
|
click: (r) => {
|
|
201
|
-
r.preventDefault(), r.stopPropagation(),
|
|
196
|
+
r.preventDefault(), r.stopPropagation(), n(s);
|
|
202
197
|
},
|
|
203
|
-
variant:
|
|
198
|
+
variant: e === s ? "primary" : "ghost",
|
|
204
199
|
"aria-label": `Select ${a} ${t}`
|
|
205
200
|
},
|
|
206
201
|
a.substring(0, 3)
|
|
207
202
|
)
|
|
208
203
|
)
|
|
209
|
-
), D = (
|
|
204
|
+
), D = (e) => (e *= 1, e < 10 ? `0${e}` : String(e)), nt = (e) => (e.indexOf("T") === -1 && e.indexOf(" ") === -1 && (e += "T00:00:01"), e.replace(" ", "T"), e), w = (e, t, n) => `${e}-${D(t + 1)}-${D(n)}`, at = (e) => e ? "bg-accent text-primary" : "", st = (e) => e ? "text-muted-foreground opacity-50" : "", rt = (e, t) => e === t, ot = (e, t) => rt(e, t) ? "bg-primary text-primary-foreground" : "", it = (e, t, n, a) => {
|
|
210
205
|
const s = ot(t, a);
|
|
211
|
-
return s || (
|
|
212
|
-
}, N = (
|
|
206
|
+
return s || (e ? at(e) : n ? st(n) : "text-foreground");
|
|
207
|
+
}, N = (e) => {
|
|
213
208
|
const {
|
|
214
209
|
day: t,
|
|
215
|
-
currentDate:
|
|
210
|
+
currentDate: n,
|
|
216
211
|
date: a,
|
|
217
212
|
isToday: s,
|
|
218
213
|
isOutsideMonth: r,
|
|
219
214
|
select: l,
|
|
220
215
|
disabled: i
|
|
221
|
-
} =
|
|
222
|
-
return
|
|
216
|
+
} = e;
|
|
217
|
+
return _(
|
|
223
218
|
{
|
|
224
219
|
class: `
|
|
225
220
|
flex items-center justify-center h-9 w-auto p-0 font-normal text-sm rounded-md
|
|
226
|
-
${it(s,
|
|
221
|
+
${it(s, n, r, a)}
|
|
227
222
|
hover:bg-muted/50 hover:text-muted-foreground focus:z-10
|
|
228
223
|
disabled:pointer-events-none disabled:opacity-50
|
|
229
224
|
`,
|
|
@@ -234,79 +229,79 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
|
|
|
234
229
|
},
|
|
235
230
|
t.toString()
|
|
236
231
|
);
|
|
237
|
-
}, O = (
|
|
238
|
-
const { year: s, month: r } =
|
|
232
|
+
}, O = (e, t, n, a) => e === a.date && t === a.month && n === a.year, lt = (e, t, n, a = !1) => {
|
|
233
|
+
const { year: s, month: r } = e, l = w(s, r, e.date), i = new Date(s, r, 1).getDay(), d = new Date(s, r + 1, 0).getDate(), g = new Date(s, r, 0).getDate(), m = [], C = r === 0 ? 11 : r - 1, v = r === 0 ? s - 1 : s;
|
|
239
234
|
for (let o = i - 1; o >= 0; o--) {
|
|
240
235
|
const u = g - o, p = O(u, C, v, t), y = new Date(v, C, u) < new Date(t.year, t.month, t.date), x = a && y;
|
|
241
|
-
|
|
236
|
+
m.push(
|
|
242
237
|
N({
|
|
243
238
|
day: u,
|
|
244
239
|
currentDate: l,
|
|
245
240
|
date: w(v, C, u),
|
|
246
241
|
isToday: p,
|
|
247
242
|
isOutsideMonth: !0,
|
|
248
|
-
select:
|
|
243
|
+
select: n,
|
|
249
244
|
disabled: x
|
|
250
245
|
})
|
|
251
246
|
);
|
|
252
247
|
}
|
|
253
248
|
for (let o = 1; o <= d; o++) {
|
|
254
249
|
const u = O(o, r, s, t), p = new Date(s, r, o) < new Date(t.year, t.month, t.date), y = a && p;
|
|
255
|
-
|
|
250
|
+
m.push(
|
|
256
251
|
N({
|
|
257
252
|
day: o,
|
|
258
253
|
currentDate: l,
|
|
259
254
|
date: w(s, r, o),
|
|
260
255
|
isToday: u,
|
|
261
256
|
isOutsideMonth: !1,
|
|
262
|
-
select:
|
|
257
|
+
select: n,
|
|
263
258
|
disabled: y
|
|
264
259
|
})
|
|
265
260
|
);
|
|
266
261
|
}
|
|
267
|
-
const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s, c = (7 -
|
|
262
|
+
const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s, c = (7 - m.length % 7) % 7;
|
|
268
263
|
for (let o = 1; o <= c; o++) {
|
|
269
264
|
const u = O(o, b, $, t), p = new Date($, b, o) < new Date(t.year, t.month, t.date), y = a && p;
|
|
270
|
-
|
|
265
|
+
m.push(
|
|
271
266
|
N({
|
|
272
267
|
day: o,
|
|
273
268
|
currentDate: l,
|
|
274
269
|
date: w($, b, o),
|
|
275
270
|
isToday: u,
|
|
276
271
|
isOutsideMonth: !0,
|
|
277
|
-
select:
|
|
272
|
+
select: n,
|
|
278
273
|
disabled: y
|
|
279
274
|
})
|
|
280
275
|
);
|
|
281
276
|
}
|
|
282
|
-
return
|
|
283
|
-
}, R = ({ label:
|
|
277
|
+
return m;
|
|
278
|
+
}, R = ({ label: e, click: t }) => f(
|
|
284
279
|
{
|
|
285
280
|
class: `
|
|
286
281
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
287
282
|
opacity-50 hover:opacity-100 text-muted-foreground absolute
|
|
288
|
-
${
|
|
283
|
+
${e === "Previous" ? "left-1" : "right-1"}
|
|
289
284
|
focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
|
|
290
285
|
`,
|
|
291
286
|
click: t,
|
|
292
|
-
"aria-label": `${
|
|
287
|
+
"aria-label": `${e} month`,
|
|
293
288
|
variant: "icon",
|
|
294
|
-
icon:
|
|
289
|
+
icon: e === "Previous" ? P.chevron.single.left : P.chevron.single.right
|
|
295
290
|
}
|
|
296
|
-
), ct = ({ onMonthClick:
|
|
297
|
-
|
|
298
|
-
|
|
291
|
+
), ct = ({ onMonthClick: e, onYearClick: t, next: n, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
292
|
+
f({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
|
|
293
|
+
f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
|
|
299
294
|
R({ label: "Previous", click: a }),
|
|
300
|
-
R({ label: "Next", click:
|
|
301
|
-
]), ht = (
|
|
295
|
+
R({ label: "Next", click: n })
|
|
296
|
+
]), ht = (e) => h(
|
|
302
297
|
{ class: "flex items-center justify-center h-9 w-auto text-[0.8rem] font-normal text-muted-foreground" },
|
|
303
|
-
|
|
304
|
-
), ut = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ht), dt = (
|
|
298
|
+
e
|
|
299
|
+
), ut = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ht), dt = (e) => h({ class: "rdp flex flex-auto flex-col w-full gap-y-1" }, [
|
|
305
300
|
ct({
|
|
306
|
-
onMonthClick:
|
|
307
|
-
onYearClick:
|
|
308
|
-
next:
|
|
309
|
-
previous:
|
|
301
|
+
onMonthClick: e.onMonthClick,
|
|
302
|
+
onYearClick: e.onYearClick,
|
|
303
|
+
next: e.next,
|
|
304
|
+
previous: e.previous
|
|
310
305
|
}),
|
|
311
306
|
h({
|
|
312
307
|
class: "flex flex-auto flex-col w-full",
|
|
@@ -317,24 +312,24 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
|
|
|
317
312
|
h(
|
|
318
313
|
{ class: "grid grid-cols-7" },
|
|
319
314
|
lt(
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
315
|
+
e.current,
|
|
316
|
+
e.today,
|
|
317
|
+
e.select,
|
|
318
|
+
e.blockPriorDates
|
|
324
319
|
)
|
|
325
320
|
)
|
|
326
321
|
]
|
|
327
322
|
]
|
|
328
323
|
})
|
|
329
|
-
]), gt = ({ currentMonth:
|
|
324
|
+
]), gt = ({ currentMonth: e, currentYear: t, onSelect: n }) => {
|
|
330
325
|
const a = t - 50, s = Array.from({ length: 101 }, (r, l) => a + l);
|
|
331
326
|
return h(
|
|
332
327
|
{ class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
|
|
333
328
|
s.map(
|
|
334
|
-
(r) =>
|
|
329
|
+
(r) => f(
|
|
335
330
|
{
|
|
336
331
|
click: (l) => {
|
|
337
|
-
l.preventDefault(), l.stopPropagation(),
|
|
332
|
+
l.preventDefault(), l.stopPropagation(), n(r);
|
|
338
333
|
},
|
|
339
334
|
variant: r === t ? "primary" : "ghost",
|
|
340
335
|
"aria-label": `Select ${r}`
|
|
@@ -344,7 +339,7 @@ const q = j(({ src: n, alt: t }) => !n || n.indexOf(".") === -1 && n.indexOf("[[
|
|
|
344
339
|
)
|
|
345
340
|
);
|
|
346
341
|
};
|
|
347
|
-
class
|
|
342
|
+
class Ot extends Y {
|
|
348
343
|
/**
|
|
349
344
|
* This will declare the props for the compiler.
|
|
350
345
|
*
|
|
@@ -360,8 +355,8 @@ class Nt extends Y {
|
|
|
360
355
|
* @returns {Date}
|
|
361
356
|
*/
|
|
362
357
|
getSelectedDate(t) {
|
|
363
|
-
const
|
|
364
|
-
return new Date(
|
|
358
|
+
const n = this.selectedDate ? new Date(nt(this.selectedDate)) : t;
|
|
359
|
+
return new Date(n.getFullYear(), n.getMonth(), n.getDate());
|
|
365
360
|
}
|
|
366
361
|
/**
|
|
367
362
|
* This will set up the data for the calendar.
|
|
@@ -369,13 +364,13 @@ class Nt extends Y {
|
|
|
369
364
|
* @returns {Data}
|
|
370
365
|
*/
|
|
371
366
|
setData() {
|
|
372
|
-
const t = /* @__PURE__ */ new Date(),
|
|
367
|
+
const t = /* @__PURE__ */ new Date(), n = this.getSelectedDate(t), a = n.getMonth();
|
|
373
368
|
return new B({
|
|
374
369
|
monthName: this.getMonthName(a),
|
|
375
|
-
currentDate: `${
|
|
370
|
+
currentDate: `${n.getFullYear()}-${a + 1}-${n.getDate()}`,
|
|
376
371
|
current: {
|
|
377
|
-
date:
|
|
378
|
-
year:
|
|
372
|
+
date: n.getDate(),
|
|
373
|
+
year: n.getFullYear(),
|
|
379
374
|
month: a
|
|
380
375
|
},
|
|
381
376
|
today: {
|
|
@@ -412,8 +407,8 @@ class Nt extends Y {
|
|
|
412
407
|
*/
|
|
413
408
|
goToPreviousMonth() {
|
|
414
409
|
const t = this.data;
|
|
415
|
-
let
|
|
416
|
-
|
|
410
|
+
let n = t.current.month, a = t.current.year;
|
|
411
|
+
n === 0 ? (n = 11, a--) : n--, this.setCurrentDate(n, a);
|
|
417
412
|
}
|
|
418
413
|
/**
|
|
419
414
|
* This will go to the next month.
|
|
@@ -422,8 +417,8 @@ class Nt extends Y {
|
|
|
422
417
|
*/
|
|
423
418
|
goToNextMonth() {
|
|
424
419
|
const t = this.data;
|
|
425
|
-
let
|
|
426
|
-
|
|
420
|
+
let n = t.current.month, a = t.current.year;
|
|
421
|
+
n === 11 ? (n = 0, a++) : n++, this.setCurrentDate(n, a);
|
|
427
422
|
}
|
|
428
423
|
/**
|
|
429
424
|
* This will set the current month and year.
|
|
@@ -433,9 +428,9 @@ class Nt extends Y {
|
|
|
433
428
|
* @param {number} [date=null]
|
|
434
429
|
* @returns {void}
|
|
435
430
|
*/
|
|
436
|
-
setCurrentDate(t,
|
|
431
|
+
setCurrentDate(t, n, a = null) {
|
|
437
432
|
const s = this.data;
|
|
438
|
-
s.current.month = t, s.current.year =
|
|
433
|
+
s.current.month = t, s.current.year = n, typeof a == "number" && (s.current.date = D(a)), s.currentDate = `${n}-${D(t + 1)}-${s.current.date}`, s.monthName = this.getMonthName(t);
|
|
439
434
|
}
|
|
440
435
|
/**
|
|
441
436
|
* This will select a date.
|
|
@@ -444,8 +439,8 @@ class Nt extends Y {
|
|
|
444
439
|
* @returns {void}
|
|
445
440
|
*/
|
|
446
441
|
selectDate(t) {
|
|
447
|
-
const
|
|
448
|
-
this.setCurrentDate(
|
|
442
|
+
const n = /* @__PURE__ */ new Date(t + "T00:00:00");
|
|
443
|
+
this.setCurrentDate(n.getMonth(), n.getFullYear(), n.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(this.data.currentDate);
|
|
449
444
|
}
|
|
450
445
|
/**
|
|
451
446
|
* This will render the calendar.
|
|
@@ -461,8 +456,8 @@ class Nt extends Y {
|
|
|
461
456
|
{
|
|
462
457
|
currentMonth: this.data.current.month,
|
|
463
458
|
currentYear: this.data.current.year,
|
|
464
|
-
onSelect: (
|
|
465
|
-
this.setCurrentDate(
|
|
459
|
+
onSelect: (n) => {
|
|
460
|
+
this.setCurrentDate(n, this.data.current.year), this.state.view = "calendar";
|
|
466
461
|
}
|
|
467
462
|
}
|
|
468
463
|
);
|
|
@@ -471,8 +466,8 @@ class Nt extends Y {
|
|
|
471
466
|
{
|
|
472
467
|
currentMonth: this.data.current.month,
|
|
473
468
|
currentYear: this.data.current.year,
|
|
474
|
-
onSelect: (
|
|
475
|
-
this.setCurrentDate(this.data.current.month,
|
|
469
|
+
onSelect: (n) => {
|
|
470
|
+
this.setCurrentDate(this.data.current.month, n), this.state.view = "calendar";
|
|
476
471
|
}
|
|
477
472
|
}
|
|
478
473
|
);
|
|
@@ -480,15 +475,15 @@ class Nt extends Y {
|
|
|
480
475
|
return dt({
|
|
481
476
|
current: this.data.current,
|
|
482
477
|
today: this.data.today,
|
|
483
|
-
select: (
|
|
478
|
+
select: (n) => this.selectDate(n),
|
|
484
479
|
next: () => this.goToNextMonth(),
|
|
485
480
|
previous: () => this.goToPreviousMonth(),
|
|
486
481
|
blockPriorDates: this.blockPriorDates || !1,
|
|
487
|
-
onMonthClick: (
|
|
488
|
-
|
|
482
|
+
onMonthClick: (n) => {
|
|
483
|
+
n.preventDefault(), n.stopPropagation(), this.state.view = "months";
|
|
489
484
|
},
|
|
490
|
-
onYearClick: (
|
|
491
|
-
|
|
485
|
+
onYearClick: (n) => {
|
|
486
|
+
n.preventDefault(), n.stopPropagation(), this.state.view = "years";
|
|
492
487
|
}
|
|
493
488
|
});
|
|
494
489
|
}
|
|
@@ -496,44 +491,44 @@ class Nt extends Y {
|
|
|
496
491
|
]);
|
|
497
492
|
}
|
|
498
493
|
}
|
|
499
|
-
const W = ({ label:
|
|
494
|
+
const W = ({ label: e, click: t }) => f(
|
|
500
495
|
{
|
|
501
496
|
class: `
|
|
502
497
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
503
498
|
opacity-50 hover:opacity-100 text-muted-foreground absolute
|
|
504
|
-
${
|
|
499
|
+
${e === "Previous" ? "left-1" : "right-1"}
|
|
505
500
|
focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
|
|
506
501
|
`,
|
|
507
502
|
click: t,
|
|
508
|
-
"aria-label": `${
|
|
503
|
+
"aria-label": `${e} month`,
|
|
509
504
|
variant: "icon",
|
|
510
|
-
icon:
|
|
505
|
+
icon: e === "Previous" ? P.chevron.single.left : P.chevron.single.right
|
|
511
506
|
}
|
|
512
|
-
),
|
|
513
|
-
|
|
514
|
-
|
|
507
|
+
), mt = ({ onMonthClick: e, onYearClick: t, next: n, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
508
|
+
f({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
|
|
509
|
+
f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
|
|
515
510
|
W({ label: "Previous", click: a }),
|
|
516
|
-
W({ label: "Next", click:
|
|
517
|
-
]),
|
|
511
|
+
W({ label: "Next", click: n })
|
|
512
|
+
]), ft = (e) => h({ class: "h-9 flex items-center justify-center font-medium" }, e), pt = () => h(
|
|
518
513
|
{ class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
|
|
519
|
-
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
520
|
-
), yt = ({ day:
|
|
514
|
+
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ft)
|
|
515
|
+
), yt = ({ day: e, iso: t, disabled: n, isStart: a, isEnd: s, isBetween: r, isOtherMonth: l, click: i }) => {
|
|
521
516
|
let d = "ghost", g = "";
|
|
522
|
-
return a || s ? (d = "default", g = "bg-primary text-primary-foreground hover:bg-primary/90") : r && (g = "bg-accent text-accent-foreground hover:bg-accent/80"),
|
|
517
|
+
return a || s ? (d = "default", g = "bg-primary text-primary-foreground hover:bg-primary/90") : r && (g = "bg-accent text-accent-foreground hover:bg-accent/80"), n && (g += " opacity-50 cursor-not-allowed"), l && (g += " text-muted-foreground opacity-50"), f(
|
|
523
518
|
{
|
|
524
519
|
class: `flex items-center justify-center p-0 text-sm font-medium rounded-md transition-colors ${g}`,
|
|
525
520
|
variant: d,
|
|
526
|
-
disabled:
|
|
527
|
-
click: (
|
|
528
|
-
|
|
521
|
+
disabled: n,
|
|
522
|
+
click: (m) => {
|
|
523
|
+
m.preventDefault(), m.stopPropagation(), n || i();
|
|
529
524
|
}
|
|
530
525
|
},
|
|
531
|
-
|
|
526
|
+
e.toString()
|
|
532
527
|
);
|
|
533
|
-
}, Dt = ({ today:
|
|
534
|
-
const { start: s, end: r } = t, l = new Date(t.year, t.month, 1).getDay(), i = new Date(t.year, t.month + 1, 0).getDate(), d = [], g = t.month === 0 ? 11 : t.month - 1,
|
|
528
|
+
}, Dt = ({ today: e, current: t, blockPriorDates: n, onDateClick: a }) => {
|
|
529
|
+
const { start: s, end: r } = t, l = new Date(t.year, t.month, 1).getDay(), i = new Date(t.year, t.month + 1, 0).getDate(), d = [], g = t.month === 0 ? 11 : t.month - 1, m = t.month === 0 ? t.year - 1 : t.year, C = new Date(m, g + 1, 0).getDate(), v = t.month === 11 ? 0 : t.month + 1, b = t.month === 11 ? t.year + 1 : t.year;
|
|
535
530
|
for (let c = l - 1; c >= 0; c--) {
|
|
536
|
-
const o = C - c, u = w(
|
|
531
|
+
const o = C - c, u = w(m, g, o), p = new Date(m, g, o), y = new Date(e.year, e.month, e.date), x = p < y, M = n && x, S = s === u, k = r === u, X = s && r && u > s && u < r;
|
|
537
532
|
d.push({
|
|
538
533
|
day: o,
|
|
539
534
|
iso: u,
|
|
@@ -546,7 +541,7 @@ const W = ({ label: n, click: t }) => m(
|
|
|
546
541
|
});
|
|
547
542
|
}
|
|
548
543
|
for (let c = 1; c <= i; c++) {
|
|
549
|
-
const o = w(t.year, t.month, c), u = new Date(t.year, t.month, c), p = new Date(
|
|
544
|
+
const o = w(t.year, t.month, c), u = new Date(t.year, t.month, c), p = new Date(e.year, e.month, e.date), y = u < p, x = n && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
|
|
550
545
|
d.push({
|
|
551
546
|
day: c,
|
|
552
547
|
iso: o,
|
|
@@ -562,7 +557,7 @@ const W = ({ label: n, click: t }) => m(
|
|
|
562
557
|
}
|
|
563
558
|
const F = (7 - d.length % 7) % 7;
|
|
564
559
|
for (let c = 1; c <= F; c++) {
|
|
565
|
-
const o = w(b, v, c), u = new Date(b, v, c), p = new Date(
|
|
560
|
+
const o = w(b, v, c), u = new Date(b, v, c), p = new Date(e.year, e.month, e.date), y = u < p, x = n && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
|
|
566
561
|
d.push({
|
|
567
562
|
day: c,
|
|
568
563
|
iso: o,
|
|
@@ -589,12 +584,12 @@ const W = ({ label: n, click: t }) => m(
|
|
|
589
584
|
})
|
|
590
585
|
)
|
|
591
586
|
);
|
|
592
|
-
}, xt = j((
|
|
593
|
-
|
|
594
|
-
onMonthClick:
|
|
595
|
-
onYearClick:
|
|
596
|
-
next:
|
|
597
|
-
previous:
|
|
587
|
+
}, xt = j((e, t) => h({ class: "flex flex-auto flex-col" }, [
|
|
588
|
+
mt({
|
|
589
|
+
onMonthClick: e.onMonthClick,
|
|
590
|
+
onYearClick: e.onYearClick,
|
|
591
|
+
next: e.next,
|
|
592
|
+
previous: e.previous
|
|
598
593
|
}),
|
|
599
594
|
h({
|
|
600
595
|
class: "flex flex-auto flex-col w-full",
|
|
@@ -603,57 +598,57 @@ const W = ({ label: n, click: t }) => m(
|
|
|
603
598
|
() => [
|
|
604
599
|
pt(),
|
|
605
600
|
Dt({
|
|
606
|
-
today:
|
|
607
|
-
current:
|
|
608
|
-
blockPriorDates:
|
|
609
|
-
onDateClick:
|
|
601
|
+
today: e.today,
|
|
602
|
+
current: e.current,
|
|
603
|
+
blockPriorDates: e.blockPriorDates,
|
|
604
|
+
onDateClick: e.onDateClick
|
|
610
605
|
})
|
|
611
606
|
]
|
|
612
607
|
]
|
|
613
608
|
})
|
|
614
|
-
])), wt = ({ currentMonth:
|
|
609
|
+
])), wt = ({ currentMonth: e, currentYear: t, onSelect: n }) => h(
|
|
615
610
|
{ class: "grid grid-cols-3 gap-2" },
|
|
616
611
|
T.monthNames.map(
|
|
617
|
-
(a, s) =>
|
|
612
|
+
(a, s) => f(
|
|
618
613
|
{
|
|
619
614
|
click: (r) => {
|
|
620
|
-
r.preventDefault(), r.stopPropagation(),
|
|
615
|
+
r.preventDefault(), r.stopPropagation(), n(s);
|
|
621
616
|
},
|
|
622
|
-
variant:
|
|
617
|
+
variant: e === s ? "primary" : "ghost",
|
|
623
618
|
"aria-label": `Select ${a} ${t}`
|
|
624
619
|
},
|
|
625
620
|
a.substring(0, 3)
|
|
626
621
|
)
|
|
627
622
|
)
|
|
628
|
-
), vt = ({ start:
|
|
629
|
-
z("selecting", (r) =>
|
|
623
|
+
), vt = ({ start: e, end: t, selecting: n, onSelectStart: a, onSelectEnd: s }) => h({ class: "flex gap-x-2 mb-4" }, [
|
|
624
|
+
z("selecting", (r) => f({
|
|
630
625
|
click: a,
|
|
631
626
|
variant: r === "start" ? "primary" : "outline",
|
|
632
627
|
class: "flex-1"
|
|
633
628
|
}, [
|
|
634
629
|
h({ class: "font-medium" }, E("current.start", "Start Date"))
|
|
635
630
|
])),
|
|
636
|
-
z("selecting", (r) =>
|
|
631
|
+
z("selecting", (r) => f({
|
|
637
632
|
click: s,
|
|
638
633
|
variant: r === "end" ? "primary" : "outline",
|
|
639
634
|
class: "flex-1"
|
|
640
635
|
}, [
|
|
641
636
|
h({ class: "font-medium" }, E("current.end", "End Date"))
|
|
642
637
|
]))
|
|
643
|
-
]), E = (
|
|
644
|
-
const t = /* @__PURE__ */ new Date(
|
|
645
|
-
return `${
|
|
646
|
-
}, Ct = ({ currentYear:
|
|
647
|
-
const
|
|
638
|
+
]), E = (e, t) => [`[[${e}]]`, (n) => n == null ? t : bt(n)], bt = (e) => {
|
|
639
|
+
const t = /* @__PURE__ */ new Date(e + "T00:00:00"), n = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
640
|
+
return `${n[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
|
|
641
|
+
}, Ct = ({ currentYear: e, onSelect: t }) => {
|
|
642
|
+
const n = e - 50, a = Array.from({ length: 101 }, (s, r) => n + r);
|
|
648
643
|
return h(
|
|
649
644
|
{ class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
|
|
650
645
|
a.map(
|
|
651
|
-
(s) =>
|
|
646
|
+
(s) => f(
|
|
652
647
|
{
|
|
653
648
|
click: (r) => {
|
|
654
649
|
r.preventDefault(), r.stopPropagation(), t(s);
|
|
655
650
|
},
|
|
656
|
-
variant: s ===
|
|
651
|
+
variant: s === e ? "primary" : "ghost",
|
|
657
652
|
"aria-label": `Select ${s}`
|
|
658
653
|
},
|
|
659
654
|
s.toString()
|
|
@@ -661,7 +656,7 @@ const W = ({ label: n, click: t }) => m(
|
|
|
661
656
|
)
|
|
662
657
|
);
|
|
663
658
|
};
|
|
664
|
-
class
|
|
659
|
+
class Yt extends Y {
|
|
665
660
|
/**
|
|
666
661
|
* Declare compiler props.
|
|
667
662
|
*
|
|
@@ -676,7 +671,7 @@ class Ot extends Y {
|
|
|
676
671
|
* @returns {Data}
|
|
677
672
|
*/
|
|
678
673
|
setData() {
|
|
679
|
-
const t = /* @__PURE__ */ new Date(),
|
|
674
|
+
const t = /* @__PURE__ */ new Date(), n = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, a = n.getMonth(), s = n.getFullYear();
|
|
680
675
|
return new B({
|
|
681
676
|
today: {
|
|
682
677
|
date: t.getDate(),
|
|
@@ -684,7 +679,7 @@ class Ot extends Y {
|
|
|
684
679
|
year: t.getFullYear()
|
|
685
680
|
},
|
|
686
681
|
monthName: this.getMonthName(a),
|
|
687
|
-
currentData: `${
|
|
682
|
+
currentData: `${n.getFullYear()}-${D(n.getMonth() + 1)}-${D(n.getDate())}`,
|
|
688
683
|
current: {
|
|
689
684
|
date: t.getDate(),
|
|
690
685
|
month: a,
|
|
@@ -724,19 +719,19 @@ class Ot extends Y {
|
|
|
724
719
|
handleClick(t) {
|
|
725
720
|
if (this.data.selecting === "start") {
|
|
726
721
|
this.data.current.start = t, this.data.current.end = null, this.data.selecting = "end";
|
|
727
|
-
const
|
|
722
|
+
const n = /* @__PURE__ */ new Date(t + "T00:00:00");
|
|
728
723
|
this.setCurrent({
|
|
729
|
-
month:
|
|
730
|
-
year:
|
|
731
|
-
date:
|
|
724
|
+
month: n.getMonth(),
|
|
725
|
+
year: n.getFullYear(),
|
|
726
|
+
date: n.getDate()
|
|
732
727
|
});
|
|
733
728
|
} else {
|
|
734
729
|
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";
|
|
735
|
-
const
|
|
730
|
+
const n = /* @__PURE__ */ new Date(t + "T00:00:00");
|
|
736
731
|
this.setCurrent({
|
|
737
|
-
month:
|
|
738
|
-
year:
|
|
739
|
-
date:
|
|
732
|
+
month: n.getMonth(),
|
|
733
|
+
year: n.getFullYear(),
|
|
734
|
+
date: n.getDate()
|
|
740
735
|
}), typeof this.onRangeSelect == "function" && this.onRangeSelect(this.data.current.start, this.data.current.end);
|
|
741
736
|
}
|
|
742
737
|
}
|
|
@@ -746,9 +741,9 @@ class Ot extends Y {
|
|
|
746
741
|
* @param {object} obj
|
|
747
742
|
* @returns {void}
|
|
748
743
|
*/
|
|
749
|
-
setCurrent({ month: t, year:
|
|
744
|
+
setCurrent({ month: t, year: n, date: a = null }) {
|
|
750
745
|
const s = this.data.current;
|
|
751
|
-
s.month = (t + 12) % 12, s.year =
|
|
746
|
+
s.month = (t + 12) % 12, s.year = n + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (s.date = a), this.data.monthName = this.getMonthName(s.month), this.data.currentDate = `${n}-${D(t + 1)}-${D(s.date)}`;
|
|
752
747
|
}
|
|
753
748
|
/**
|
|
754
749
|
* Render the range calendar.
|
|
@@ -756,7 +751,7 @@ class Ot extends Y {
|
|
|
756
751
|
* @returns {object}
|
|
757
752
|
*/
|
|
758
753
|
render() {
|
|
759
|
-
const { today: t, current:
|
|
754
|
+
const { today: t, current: n, selecting: a } = this.data, { start: s, end: r } = n;
|
|
760
755
|
return h({ class: "range-calendar border border-border rounded-lg shadow-md p-4 w-full max-w-sm min-w-80" }, [
|
|
761
756
|
vt({
|
|
762
757
|
start: s,
|
|
@@ -774,28 +769,28 @@ class Ot extends Y {
|
|
|
774
769
|
case "months":
|
|
775
770
|
return wt(
|
|
776
771
|
{
|
|
777
|
-
currentMonth:
|
|
778
|
-
currentYear:
|
|
772
|
+
currentMonth: n.month,
|
|
773
|
+
currentYear: n.year,
|
|
779
774
|
onSelect: (i) => {
|
|
780
|
-
this.setCurrent({ month: i, year:
|
|
775
|
+
this.setCurrent({ month: i, year: n.year }), this.state.view = "calendar";
|
|
781
776
|
}
|
|
782
777
|
}
|
|
783
778
|
);
|
|
784
779
|
case "years":
|
|
785
780
|
return Ct(
|
|
786
781
|
{
|
|
787
|
-
currentYear:
|
|
782
|
+
currentYear: n.year,
|
|
788
783
|
onSelect: (i) => {
|
|
789
|
-
this.setCurrent({ month:
|
|
784
|
+
this.setCurrent({ month: n.month, year: i }), this.state.view = "calendar";
|
|
790
785
|
}
|
|
791
786
|
}
|
|
792
787
|
);
|
|
793
788
|
default:
|
|
794
789
|
return xt({
|
|
795
790
|
monthName: this.data.monthName,
|
|
796
|
-
year:
|
|
791
|
+
year: n.year,
|
|
797
792
|
today: t,
|
|
798
|
-
current:
|
|
793
|
+
current: n,
|
|
799
794
|
blockPriorDates: this.blockPriorDates,
|
|
800
795
|
onDateClick: (i) => this.handleClick(i),
|
|
801
796
|
onMonthClick: (i) => {
|
|
@@ -819,15 +814,15 @@ class Ot extends Y {
|
|
|
819
814
|
}
|
|
820
815
|
}
|
|
821
816
|
export {
|
|
822
|
-
|
|
817
|
+
Nt as A,
|
|
823
818
|
lt as C,
|
|
824
819
|
N as D,
|
|
825
820
|
w as F,
|
|
826
821
|
dt as M,
|
|
827
|
-
|
|
828
|
-
|
|
822
|
+
Tt as P,
|
|
823
|
+
Yt as R,
|
|
829
824
|
ht as a,
|
|
830
|
-
|
|
825
|
+
Ot as b,
|
|
831
826
|
nt as c,
|
|
832
827
|
U as g,
|
|
833
828
|
D as p
|
|
@@ -4,8 +4,8 @@ import { B as P, I as J } from "./buttons-CHEs54Wl.js";
|
|
|
4
4
|
import { Icons as S } from "./icons.es.js";
|
|
5
5
|
import { TableBody as Z, DataTableBody as ee, ScrollableTableBody as te, List as se, IntervalTimer as ae } from "@base-framework/organisms";
|
|
6
6
|
import { C as ie, I as ne, H as oe } from "./inputs-9udyzkHR.js";
|
|
7
|
-
import { A as le, P as re } from "./range-calendar-
|
|
8
|
-
import { V as g } from "./
|
|
7
|
+
import { A as le, P as re } from "./range-calendar-KNBY64Zx.js";
|
|
8
|
+
import { V as g } from "./image-DGInMcvV.js";
|
|
9
9
|
d((t, e) => ({
|
|
10
10
|
class: "flex items-center px-4 py-2",
|
|
11
11
|
...t,
|
|
@@ -1,6 +1,6 @@
|
|
|
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 "./
|
|
3
|
+
import { a as d } from "./image-DGInMcvV.js";
|
|
4
4
|
import { f as h, e as y, g as k } from "./inputs-9udyzkHR.js";
|
|
5
5
|
const a = {
|
|
6
6
|
gray: {
|
|
@@ -9,6 +9,7 @@ export * from "./form/inputs/range-slider.js";
|
|
|
9
9
|
export * from "./form/legend.js";
|
|
10
10
|
export * from "./form/select.js";
|
|
11
11
|
export * from "./icon.js";
|
|
12
|
+
export * from "./image.js";
|
|
12
13
|
export * from "./progress/circle-graph.js";
|
|
13
14
|
export * from "./progress/progress-bar.js";
|
|
14
15
|
export * from "./skeleton.js";
|
package/package.json
CHANGED
package/dist/veil-CqnAmj-D.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Jot as n, Component as a } from "@base-framework/base";
|
|
2
|
-
class s extends a {
|
|
3
|
-
/**
|
|
4
|
-
* This will set the component context.
|
|
5
|
-
*
|
|
6
|
-
* @param {object|null} context
|
|
7
|
-
* @returns {object|null}
|
|
8
|
-
*/
|
|
9
|
-
setContext(o) {
|
|
10
|
-
if (this.data)
|
|
11
|
-
return null;
|
|
12
|
-
const e = this?.parent?.data ?? this?.parent?.context?.data ?? this?.parent?.state ?? null;
|
|
13
|
-
return e ? { data: e } : null;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
const i = (t) => n(t, s);
|
|
17
|
-
export {
|
|
18
|
-
s as V,
|
|
19
|
-
i as a
|
|
20
|
-
};
|