@base-framework/ui 0.0.11 → 0.0.13
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.
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { a as w } from "./veil-DSQdR6CM.js";
|
|
10
|
-
import { Timer as re, List as ae, DynamicTime as ie } from "@base-framework/organisms";
|
|
11
|
-
const z = {
|
|
1
|
+
import { Div as n, I as h, H5 as _, P as p, Li as O, Span as a, Ul as V, Button as m, OnState as y, Label as R, Form as W, H2 as B, Footer as $, Header as M, A as Y, H3 as G, Checkbox as J, Nav as K, Input as v, Time as Q, Dialog as X } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as c, Component as b, Html as L, Dom as Z, base as ee, Data as C, Builder as q, Jot as k, DateTime as A } from "@base-framework/base";
|
|
3
|
+
import { P as S, b as te } from "./calendar-B5TK6tLi.js";
|
|
4
|
+
import { B as u, I as D } from "./icon-B9QUT2NY.js";
|
|
5
|
+
import { Icons as d } from "./icons.es.js";
|
|
6
|
+
import { a as x } from "./veil-DSQdR6CM.js";
|
|
7
|
+
import { Timer as se, List as oe, DynamicTime as ne } from "@base-framework/organisms";
|
|
8
|
+
const P = {
|
|
12
9
|
info: {
|
|
13
10
|
borderColor: "border-blue-500",
|
|
14
11
|
bgColor: "bg-muted/10",
|
|
@@ -34,27 +31,27 @@ const z = {
|
|
|
34
31
|
bgColor: "bg-muted/10",
|
|
35
32
|
iconColor: "text-muted-foreground"
|
|
36
33
|
}
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
]),
|
|
40
|
-
const { borderColor:
|
|
41
|
-
return n({ class: `flex items-start p-4 border rounded-lg ${l} ${
|
|
34
|
+
}, le = (e, t) => n({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
|
|
35
|
+
h({ html: e })
|
|
36
|
+
]), re = (e) => _({ class: "font-semibold" }, e), ie = (e) => p({ class: "text-sm text-muted-foreground" }, e), ht = c(({ title: e, description: t, icon: s, type: o = "default" }) => {
|
|
37
|
+
const { borderColor: r, bgColor: l, iconColor: i } = P[o] || P.default;
|
|
38
|
+
return n({ class: `flex items-start p-4 border rounded-lg ${l} ${r}` }, [
|
|
42
39
|
// Icon and content
|
|
43
|
-
|
|
40
|
+
s && le(s, i),
|
|
44
41
|
n({ class: "flex flex-col" }, [
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
re(e),
|
|
43
|
+
ie(t)
|
|
47
44
|
])
|
|
48
45
|
]);
|
|
49
46
|
});
|
|
50
|
-
class
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
class ae extends b {
|
|
48
|
+
/**
|
|
49
|
+
* This will declare the props for the compiler.
|
|
50
|
+
*
|
|
51
|
+
* @returns {void}
|
|
52
|
+
*/
|
|
53
|
+
declareProps() {
|
|
54
|
+
this.removingClass = "";
|
|
58
55
|
}
|
|
59
56
|
/**
|
|
60
57
|
* This will remove the component from the DOM after a delay.
|
|
@@ -63,69 +60,57 @@ class me extends x {
|
|
|
63
60
|
*/
|
|
64
61
|
remove() {
|
|
65
62
|
this.prepareDestroy(), this.removeContext();
|
|
66
|
-
const
|
|
63
|
+
const t = this.panel, s = this.removingClass;
|
|
67
64
|
if (!s) {
|
|
68
|
-
|
|
65
|
+
L.removeElement(t);
|
|
69
66
|
return;
|
|
70
67
|
}
|
|
71
|
-
|
|
68
|
+
Z.addClass(t, s), ee.on("animationend", t, (o) => L.removeElement(t));
|
|
72
69
|
}
|
|
73
70
|
}
|
|
74
|
-
const
|
|
71
|
+
const ce = (e) => a({ class: "ml-auto text-xs tracking-widest opacity-60" }, e), de = (e) => a({ class: "flex w-4 h-4", html: e }), ue = (e) => a({ class: "flex-auto" }, e), he = (e, t) => O({
|
|
75
72
|
class: "relative flex cursor-pointer hover:bg-muted/50 select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
76
73
|
click: () => t(e)
|
|
77
74
|
}, [
|
|
78
|
-
e.icon &&
|
|
79
|
-
|
|
80
|
-
e.shortcut &&
|
|
81
|
-
]),
|
|
82
|
-
e.map((
|
|
83
|
-
]),
|
|
75
|
+
e.icon && de(e.icon),
|
|
76
|
+
ue(e.label),
|
|
77
|
+
e.shortcut && ce(e.shortcut)
|
|
78
|
+
]), me = (e, t) => V({ class: "grid gap-2" }, [
|
|
79
|
+
e.map((s) => he(s, t))
|
|
80
|
+
]), fe = (e) => n({ class: "w-full z-10" }, [
|
|
84
81
|
n({
|
|
85
82
|
class: "max-h-60 border rounded-md overflow-y-auto p-1 grid gap-2 divide-y divide-border",
|
|
86
|
-
for: ["groups", (t) =>
|
|
83
|
+
for: ["groups", (t) => me(t, e)]
|
|
87
84
|
})
|
|
88
|
-
]),
|
|
85
|
+
]), ge = ({ label: e, icon: t, toggleDropdown: s }) => m({
|
|
89
86
|
cache: "button",
|
|
90
87
|
class: `inline-flex items-center justify-between rounded-md border border-input
|
|
91
88
|
bg-background px-2 py-2 text-sm font-medium hover:bg-muted
|
|
92
89
|
focus:outline-none transition duration-150 ease-in-out`,
|
|
93
|
-
click:
|
|
90
|
+
click: s
|
|
94
91
|
}, [
|
|
95
|
-
e &&
|
|
96
|
-
t &&
|
|
97
|
-
]),
|
|
98
|
-
|
|
92
|
+
e && a(e),
|
|
93
|
+
t && h({ html: t })
|
|
94
|
+
]), pe = ({ onSelect: e }) => n([
|
|
95
|
+
y(
|
|
99
96
|
"open",
|
|
100
|
-
(t,
|
|
97
|
+
(t, s, o) => t ? new S({
|
|
101
98
|
cache: "dropdown",
|
|
102
|
-
parent:
|
|
103
|
-
button:
|
|
99
|
+
parent: o,
|
|
100
|
+
button: o.button
|
|
104
101
|
}, [
|
|
105
|
-
|
|
102
|
+
fe(e)
|
|
106
103
|
]) : null
|
|
107
104
|
)
|
|
108
105
|
]);
|
|
109
|
-
class
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
* @member {string} icon
|
|
118
|
-
* @default null
|
|
119
|
-
*/
|
|
120
|
-
i(this, "icon", null);
|
|
121
|
-
/**
|
|
122
|
-
* @member {function} onSelect
|
|
123
|
-
*/
|
|
124
|
-
i(this, "onSelect", null);
|
|
125
|
-
/**
|
|
126
|
-
* @member {array} groups
|
|
127
|
-
*/
|
|
128
|
-
i(this, "groups", []);
|
|
106
|
+
class mt extends b {
|
|
107
|
+
/**
|
|
108
|
+
* This will declare the props for the compiler.
|
|
109
|
+
*
|
|
110
|
+
* @returns {void}
|
|
111
|
+
*/
|
|
112
|
+
declareProps() {
|
|
113
|
+
this.label = null, this.icon = null, this.onSelect = null, this.groups = [];
|
|
129
114
|
}
|
|
130
115
|
/**
|
|
131
116
|
* Initializes component data.
|
|
@@ -133,7 +118,7 @@ class xt extends x {
|
|
|
133
118
|
* @returns {Data}
|
|
134
119
|
*/
|
|
135
120
|
setData() {
|
|
136
|
-
return new
|
|
121
|
+
return new C({
|
|
137
122
|
groups: this.groups || []
|
|
138
123
|
});
|
|
139
124
|
}
|
|
@@ -162,8 +147,8 @@ class xt extends x {
|
|
|
162
147
|
* @param {object} item - The selected item object
|
|
163
148
|
* @returns {void}
|
|
164
149
|
*/
|
|
165
|
-
handleSelect(
|
|
166
|
-
this.state.selectedItem =
|
|
150
|
+
handleSelect(t) {
|
|
151
|
+
this.state.selectedItem = t, this.state.open = !1, typeof this.onSelect == "function" && this.onSelect(t);
|
|
167
152
|
}
|
|
168
153
|
/**
|
|
169
154
|
* Renders the Dropdown component.
|
|
@@ -172,24 +157,24 @@ class xt extends x {
|
|
|
172
157
|
*/
|
|
173
158
|
render() {
|
|
174
159
|
return n({ class: "relative" }, [
|
|
175
|
-
|
|
160
|
+
ge({
|
|
176
161
|
label: this.label,
|
|
177
162
|
icon: this.icon,
|
|
178
163
|
toggleDropdown: this.toggleDropdown.bind(this)
|
|
179
164
|
}),
|
|
180
|
-
|
|
165
|
+
pe({ onSelect: this.handleSelect.bind(this) })
|
|
181
166
|
]);
|
|
182
167
|
}
|
|
183
168
|
}
|
|
184
|
-
const
|
|
185
|
-
...
|
|
169
|
+
const be = c((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t)), xe = c((e, t) => R({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), we = c((e, t) => p({ ...e, class: "text-sm text-muted-foreground italic" }, t)), ye = c((e, t) => p({ ...e, class: "text-sm text-destructive" }, t)), ve = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", H = (e, t, s) => e.map((o) => (o.children && o.children.length > 0 && (o.children = H(o.children, t, s)), o.required && ve(o) ? {
|
|
170
|
+
...o,
|
|
186
171
|
aria: {
|
|
187
172
|
invalid: ["hasError"]
|
|
188
173
|
},
|
|
189
|
-
invalid:
|
|
174
|
+
invalid: s,
|
|
190
175
|
input: t
|
|
191
|
-
} :
|
|
192
|
-
const
|
|
176
|
+
} : o)), Ce = c((e, t) => {
|
|
177
|
+
const r = H(t, (l) => {
|
|
193
178
|
l.target.checkValidity() && e.setError(null);
|
|
194
179
|
}, (l) => {
|
|
195
180
|
e.setError(l.target.validationMessage);
|
|
@@ -197,8 +182,8 @@ const ve = d((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
197
182
|
return n({
|
|
198
183
|
...e,
|
|
199
184
|
class: "w-full"
|
|
200
|
-
},
|
|
201
|
-
}),
|
|
185
|
+
}, r);
|
|
186
|
+
}), ft = x(
|
|
202
187
|
{
|
|
203
188
|
/**
|
|
204
189
|
* The initial state of the FormField.
|
|
@@ -219,113 +204,74 @@ const ve = d((e, t) => n({ ...e, class: "flex flex-auto flex-col space-y-2" }, t
|
|
|
219
204
|
* @returns {object}
|
|
220
205
|
*/
|
|
221
206
|
render() {
|
|
222
|
-
const e = this.name, t = this.getId(`${e}`), { label:
|
|
207
|
+
const e = this.name, t = this.getId(`${e}`), { label: s, description: o } = this, r = (l) => {
|
|
223
208
|
this.state.error = l, this.state.hasError = !!l;
|
|
224
209
|
};
|
|
225
210
|
return n({ class: "flex flex-auto space-y-4" }, [
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
211
|
+
be([
|
|
212
|
+
xe({ htmlFor: t }, s),
|
|
213
|
+
Ce({
|
|
229
214
|
id: t,
|
|
230
215
|
name: e,
|
|
231
216
|
value: this.state.value,
|
|
232
|
-
setError:
|
|
217
|
+
setError: r
|
|
233
218
|
}, this.children),
|
|
234
|
-
|
|
235
|
-
n({ onState: ["error", (l) => l &&
|
|
219
|
+
o && we({ id: this.getId("description") }, o),
|
|
220
|
+
n({ onState: ["error", (l) => l && ye(l)] })
|
|
236
221
|
])
|
|
237
222
|
]);
|
|
238
223
|
}
|
|
239
224
|
}
|
|
240
|
-
),
|
|
225
|
+
), ke = (e, t = null) => {
|
|
241
226
|
e.target.checkValidity() && (e.preventDefault(), t && t(e));
|
|
242
|
-
},
|
|
243
|
-
(e, t) =>
|
|
244
|
-
),
|
|
245
|
-
e.title &&
|
|
227
|
+
}, Se = c(
|
|
228
|
+
(e, t) => W({ ...e, submit: (s) => ke(s, e.submit), class: `w-full ${e.class ?? ""}` }, t)
|
|
229
|
+
), gt = c((e, t) => n({ ...e, class: `space-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)), pt = c((e, t = []) => n({ class: "space-y-3 py-4" }, [
|
|
230
|
+
e.title && B({ class: "font-semibold" }, e.title),
|
|
246
231
|
...t
|
|
247
|
-
])),
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
]),
|
|
232
|
+
])), bt = (e, t) => n({ class: "flex justify-between" }, [
|
|
233
|
+
a({ class: "text-muted-foreground" }, e),
|
|
234
|
+
a(t)
|
|
235
|
+
]), De = ({ title: e, description: t, back: s, icon: o, options: r = [] }) => M({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10" }, [
|
|
251
236
|
/**
|
|
252
237
|
* Back Button
|
|
253
238
|
*/
|
|
254
|
-
|
|
239
|
+
s && u({ variant: "icon", icon: d.arrows.left, class: "mr-2 p-0 flex sm:hidden", click: (l, i) => i.close() }),
|
|
255
240
|
/**
|
|
256
241
|
* Icon
|
|
257
242
|
*/
|
|
258
|
-
|
|
243
|
+
o && n({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [D(o)]),
|
|
259
244
|
/**
|
|
260
245
|
* Title and Description
|
|
261
246
|
*/
|
|
262
247
|
n({ class: "flex flex-auto flex-row justify-between w-full ml-2 gap-2" }, [
|
|
263
248
|
n({ class: "flex flex-auto flex-col" }, [
|
|
264
|
-
|
|
249
|
+
B({ class: "text-lg font-semibold m-0" }, e),
|
|
265
250
|
t && n({ class: "text-sm text-muted-foreground" }, t)
|
|
266
251
|
]),
|
|
267
|
-
...
|
|
252
|
+
...r
|
|
268
253
|
])
|
|
269
|
-
]),
|
|
254
|
+
]), Ie = c((e, t) => n({
|
|
270
255
|
popover: "manual",
|
|
271
256
|
class: `modal m-auto top-0 right-0 bottom-0 left-0 fixed z-20 grid w-full h-full max-h-screen gap-2 lg:border bg-background text-foreground shadow-xl break-words p-0 ${e.class}`,
|
|
272
|
-
click: (
|
|
273
|
-
|
|
257
|
+
click: (s, o) => {
|
|
258
|
+
s.target === o.panel && (s.preventDefault(), s.stopPropagation(), o.state.open = !1);
|
|
274
259
|
}
|
|
275
260
|
}, [
|
|
276
|
-
|
|
277
|
-
|
|
261
|
+
Se({ class: "modal-content relative bg-background z-[1] flex flex-auto flex-col space-y-4", submit: (s) => e.onSubmit && e.onSubmit() }, [
|
|
262
|
+
De(e),
|
|
278
263
|
n({ class: "modal-body flex flex-grow flex-col overflow-y-auto py-0 px-6 z-0" }, t),
|
|
279
|
-
|
|
264
|
+
$({ class: "modal-footer sticky bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
|
|
280
265
|
])
|
|
281
|
-
])),
|
|
282
|
-
class
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
* @member {string} description
|
|
291
|
-
*/
|
|
292
|
-
i(this, "description", null);
|
|
293
|
-
/**
|
|
294
|
-
* @member {string} size
|
|
295
|
-
* @default 'md'
|
|
296
|
-
* @values 'sm', 'md', 'lg', 'xl'
|
|
297
|
-
*/
|
|
298
|
-
i(this, "size", "md");
|
|
299
|
-
/**
|
|
300
|
-
* @member {string} type
|
|
301
|
-
* @default ''
|
|
302
|
-
* @values 'right', 'left'
|
|
303
|
-
* @description This will set the type of modal.
|
|
304
|
-
*/
|
|
305
|
-
i(this, "type", "");
|
|
306
|
-
/**
|
|
307
|
-
* @member {boolean} hidePrimaryButton
|
|
308
|
-
* @default false
|
|
309
|
-
* @description This will hide the primary button.
|
|
310
|
-
* @values true, false
|
|
311
|
-
*/
|
|
312
|
-
i(this, "hidePrimaryButton", !1);
|
|
313
|
-
/**
|
|
314
|
-
* @member {string} icon
|
|
315
|
-
*/
|
|
316
|
-
i(this, "icon", null);
|
|
317
|
-
/**
|
|
318
|
-
* @member {function|nll} onSubmit
|
|
319
|
-
*/
|
|
320
|
-
i(this, "onSubmit", null);
|
|
321
|
-
/**
|
|
322
|
-
* @member {function|null} onClose
|
|
323
|
-
*/
|
|
324
|
-
i(this, "onClose", null);
|
|
325
|
-
/**
|
|
326
|
-
* @member {boolean} back
|
|
327
|
-
*/
|
|
328
|
-
i(this, "back", !1);
|
|
266
|
+
])), Te = (e) => q.render(e, app.root);
|
|
267
|
+
class xt extends b {
|
|
268
|
+
/**
|
|
269
|
+
* This will declare the props for the compiler.
|
|
270
|
+
*
|
|
271
|
+
* @returns {void}
|
|
272
|
+
*/
|
|
273
|
+
declareProps() {
|
|
274
|
+
this.title = null, this.description = null, this.size = null, this.type = null, this.hidePrimaryButton = !1, this.icon = null, this.onSubmit = null, this.onClose = null, this.back = !1;
|
|
329
275
|
}
|
|
330
276
|
/**
|
|
331
277
|
* This will render the modal component.
|
|
@@ -333,12 +279,12 @@ class kt extends x {
|
|
|
333
279
|
* @returns {object}
|
|
334
280
|
*/
|
|
335
281
|
render() {
|
|
336
|
-
const
|
|
337
|
-
return
|
|
282
|
+
const t = this.getMainClass(), s = this.title || "", o = this.description || null;
|
|
283
|
+
return Ie(
|
|
338
284
|
{
|
|
339
|
-
class:
|
|
285
|
+
class: t,
|
|
340
286
|
title: s,
|
|
341
|
-
description:
|
|
287
|
+
description: o,
|
|
342
288
|
options: this.headerOptions(),
|
|
343
289
|
buttons: this.getButtons(),
|
|
344
290
|
onSubmit: () => {
|
|
@@ -360,8 +306,8 @@ class kt extends x {
|
|
|
360
306
|
return {
|
|
361
307
|
open: {
|
|
362
308
|
state: !1,
|
|
363
|
-
callBack: (
|
|
364
|
-
|
|
309
|
+
callBack: (t) => {
|
|
310
|
+
t || this.destroy();
|
|
365
311
|
}
|
|
366
312
|
}
|
|
367
313
|
};
|
|
@@ -381,8 +327,8 @@ class kt extends x {
|
|
|
381
327
|
*/
|
|
382
328
|
getButtons() {
|
|
383
329
|
return [
|
|
384
|
-
|
|
385
|
-
this.hidePrimaryButton !== !0 &&
|
|
330
|
+
u({ variant: "outline", click: () => this.destroy() }, "Cancel"),
|
|
331
|
+
this.hidePrimaryButton !== !0 && u({ variant: "primary", type: "submit" }, "Save")
|
|
386
332
|
];
|
|
387
333
|
}
|
|
388
334
|
/**
|
|
@@ -391,8 +337,8 @@ class kt extends x {
|
|
|
391
337
|
* @param {object} element
|
|
392
338
|
* @returns {boolean}
|
|
393
339
|
*/
|
|
394
|
-
isOutsideClick(
|
|
395
|
-
return !this.panel.contains(
|
|
340
|
+
isOutsideClick(t) {
|
|
341
|
+
return !this.panel.contains(t);
|
|
396
342
|
}
|
|
397
343
|
/**
|
|
398
344
|
* This will get the size class.
|
|
@@ -437,7 +383,7 @@ class kt extends x {
|
|
|
437
383
|
*
|
|
438
384
|
* @param {object} container
|
|
439
385
|
*/
|
|
440
|
-
setContainer(
|
|
386
|
+
setContainer(t) {
|
|
441
387
|
this.container = app.root;
|
|
442
388
|
}
|
|
443
389
|
/**
|
|
@@ -446,7 +392,7 @@ class kt extends x {
|
|
|
446
392
|
* @returns {void}
|
|
447
393
|
*/
|
|
448
394
|
open() {
|
|
449
|
-
|
|
395
|
+
Te(this), this.showModal();
|
|
450
396
|
}
|
|
451
397
|
/**
|
|
452
398
|
* This will show the modal.
|
|
@@ -467,7 +413,7 @@ class kt extends x {
|
|
|
467
413
|
this.panel.hidePopover(), this.state.open = !1, typeof this.onClose == "function" && this.onClose(), document.documentElement.style.overflowY = "auto";
|
|
468
414
|
}
|
|
469
415
|
}
|
|
470
|
-
const
|
|
416
|
+
const N = {
|
|
471
417
|
info: {
|
|
472
418
|
bgColor: "bg-muted/10",
|
|
473
419
|
borderColor: "border-blue-500",
|
|
@@ -493,56 +439,25 @@ const F = {
|
|
|
493
439
|
borderColor: "border",
|
|
494
440
|
iconColor: "text-muted-foreground"
|
|
495
441
|
}
|
|
496
|
-
},
|
|
497
|
-
|
|
498
|
-
]),
|
|
442
|
+
}, Ae = (e) => M({ class: "flex justify-center" }, [
|
|
443
|
+
G({ class: "text-lg font-bold mb-0" }, e)
|
|
444
|
+
]), Be = c(({ href: e, class: t }, s) => Y({
|
|
499
445
|
class: `pullRightIn bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
|
|
500
446
|
href: e,
|
|
501
447
|
role: "alert"
|
|
502
|
-
},
|
|
448
|
+
}, s)), $e = c(({ close: e, class: t }, s) => n({
|
|
503
449
|
class: `pullRightIn bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
|
|
504
450
|
click: () => e(),
|
|
505
451
|
role: "alert"
|
|
506
|
-
},
|
|
507
|
-
class
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
* @member {function|null} secondaryAction
|
|
516
|
-
*/
|
|
517
|
-
i(this, "secondaryAction", null);
|
|
518
|
-
/**
|
|
519
|
-
* @member {function|null} primaryAction
|
|
520
|
-
*/
|
|
521
|
-
i(this, "primaryAction", null);
|
|
522
|
-
/**
|
|
523
|
-
* @member {boolean} primary
|
|
524
|
-
*/
|
|
525
|
-
i(this, "primary", !1);
|
|
526
|
-
/**
|
|
527
|
-
* @member {boolean} secondary
|
|
528
|
-
*/
|
|
529
|
-
i(this, "secondary", !1);
|
|
530
|
-
/**
|
|
531
|
-
* @member {string} title
|
|
532
|
-
*/
|
|
533
|
-
i(this, "title", null);
|
|
534
|
-
/**
|
|
535
|
-
* @member {string} description
|
|
536
|
-
*/
|
|
537
|
-
i(this, "description", null);
|
|
538
|
-
/**
|
|
539
|
-
* @member {string} icon
|
|
540
|
-
*/
|
|
541
|
-
i(this, "icon", null);
|
|
542
|
-
/**
|
|
543
|
-
* @member {function} onClick
|
|
544
|
-
*/
|
|
545
|
-
i(this, "onClick", null);
|
|
452
|
+
}, s));
|
|
453
|
+
class Me extends ae {
|
|
454
|
+
/**
|
|
455
|
+
* This will declare the props for the compiler.
|
|
456
|
+
*
|
|
457
|
+
* @returns {void}
|
|
458
|
+
*/
|
|
459
|
+
declareProps() {
|
|
460
|
+
this.removingClass = "pullRight", this.secondaryAction = null, this.primaryAction = null, this.primary = !1, this.secondary = !1, this.title = null, this.description = null, this.icon = null, this.onClick = null;
|
|
546
461
|
}
|
|
547
462
|
/**
|
|
548
463
|
* This will be called when the component is created.
|
|
@@ -558,14 +473,14 @@ class Fe extends me {
|
|
|
558
473
|
* @returns {object}
|
|
559
474
|
*/
|
|
560
475
|
render() {
|
|
561
|
-
const { bgColor:
|
|
562
|
-
return
|
|
563
|
-
href:
|
|
564
|
-
class: `${
|
|
565
|
-
},
|
|
476
|
+
const { bgColor: t, borderColor: s, iconColor: o } = this.getTypeStyles(), r = this.href || null, l = this.getChildren(o);
|
|
477
|
+
return r ? Be({
|
|
478
|
+
href: r,
|
|
479
|
+
class: `${t} ${s}`
|
|
480
|
+
}, l) : $e({
|
|
566
481
|
close: this.close.bind(this),
|
|
567
|
-
class: `${
|
|
568
|
-
},
|
|
482
|
+
class: `${t} ${s}`
|
|
483
|
+
}, l);
|
|
569
484
|
}
|
|
570
485
|
/**
|
|
571
486
|
* This will be called after the component is set up.
|
|
@@ -573,8 +488,8 @@ class Fe extends me {
|
|
|
573
488
|
* @returns {void}
|
|
574
489
|
*/
|
|
575
490
|
afterSetup() {
|
|
576
|
-
const
|
|
577
|
-
|
|
491
|
+
const t = this.duration;
|
|
492
|
+
t !== "infinite" && (this.timer = new se(t, this.close.bind(this)), this.timer.start());
|
|
578
493
|
}
|
|
579
494
|
/**
|
|
580
495
|
* This will get the style properties based on the notification type.
|
|
@@ -582,8 +497,8 @@ class Fe extends me {
|
|
|
582
497
|
* @returns {object}
|
|
583
498
|
*/
|
|
584
499
|
getTypeStyles() {
|
|
585
|
-
const
|
|
586
|
-
return
|
|
500
|
+
const t = this.type || "default";
|
|
501
|
+
return N[t] || N.default;
|
|
587
502
|
}
|
|
588
503
|
/**
|
|
589
504
|
* This will get the buttons for the notification.
|
|
@@ -593,8 +508,8 @@ class Fe extends me {
|
|
|
593
508
|
getButtons() {
|
|
594
509
|
return [
|
|
595
510
|
n({ class: "flex flex-row mt-6 gap-2" }, [
|
|
596
|
-
this.secondary &&
|
|
597
|
-
this.primary &&
|
|
511
|
+
this.secondary && u({ variant: "outline", click: () => this.secondaryAction && this.secondaryAction() }, this.secondary),
|
|
512
|
+
this.primary && u({ click: () => this.primaryAction && this.primaryAction() }, this.primary)
|
|
598
513
|
])
|
|
599
514
|
];
|
|
600
515
|
}
|
|
@@ -604,22 +519,22 @@ class Fe extends me {
|
|
|
604
519
|
* @param {string} iconColor
|
|
605
520
|
* @returns {array}
|
|
606
521
|
*/
|
|
607
|
-
getChildren(
|
|
522
|
+
getChildren(t) {
|
|
608
523
|
return [
|
|
609
524
|
n({ class: "flex items-start" }, [
|
|
610
|
-
this.icon &&
|
|
525
|
+
this.icon && h({ class: `mr-4 ${t}`, html: this.icon }),
|
|
611
526
|
n({ class: "flex flex-auto flex-col" }, [
|
|
612
527
|
n({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
|
|
613
|
-
this.title &&
|
|
528
|
+
this.title && Ae(this.title)
|
|
614
529
|
]),
|
|
615
530
|
p({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
|
|
616
|
-
(this.primary || this.secondary) &&
|
|
531
|
+
(this.primary || this.secondary) && $({ class: "margin-top-24 flex align-center" }, this.getButtons())
|
|
617
532
|
])
|
|
618
533
|
]),
|
|
619
|
-
|
|
534
|
+
u({
|
|
620
535
|
class: "absolute top-[12px] right-[12px]",
|
|
621
536
|
variant: "icon",
|
|
622
|
-
icon:
|
|
537
|
+
icon: d.x,
|
|
623
538
|
click: this.close.bind(this)
|
|
624
539
|
})
|
|
625
540
|
];
|
|
@@ -630,12 +545,12 @@ class Fe extends me {
|
|
|
630
545
|
* @param {object} e The event object.
|
|
631
546
|
* @returns {void}
|
|
632
547
|
*/
|
|
633
|
-
close(
|
|
634
|
-
|
|
548
|
+
close(t) {
|
|
549
|
+
t && t.stopPropagation(), this.duration !== "infinite" && this.timer.stop(), this.onClick && this.onClick(), this.destroy();
|
|
635
550
|
}
|
|
636
551
|
}
|
|
637
|
-
let
|
|
638
|
-
class
|
|
552
|
+
let Le = 0;
|
|
553
|
+
class wt extends b {
|
|
639
554
|
/**
|
|
640
555
|
* This will render the component.
|
|
641
556
|
*
|
|
@@ -643,11 +558,11 @@ class St extends x {
|
|
|
643
558
|
*/
|
|
644
559
|
render() {
|
|
645
560
|
return n({ class: "notification-container pointer-events-none inset-auto bg-transparent backdrop:bg-transparent overflow-visible fixed bottom-[80px] right-0 z-50 p-5", popover: "manual" }, [
|
|
646
|
-
new
|
|
561
|
+
new oe({
|
|
647
562
|
cache: "list",
|
|
648
563
|
key: "id",
|
|
649
564
|
role: "list",
|
|
650
|
-
rowItem: (t) => new
|
|
565
|
+
rowItem: (t) => new Me(t)
|
|
651
566
|
})
|
|
652
567
|
]);
|
|
653
568
|
}
|
|
@@ -658,7 +573,7 @@ class St extends x {
|
|
|
658
573
|
* @returns {void}
|
|
659
574
|
*/
|
|
660
575
|
addNotice(t = {}) {
|
|
661
|
-
t.id =
|
|
576
|
+
t.id = Le++, t.callBack = () => this.removeNotice(t), this.list.append([t]), this.panel.hidePopover(), this.panel.showPopover();
|
|
662
577
|
}
|
|
663
578
|
/**
|
|
664
579
|
* This will remove a notification.
|
|
@@ -670,26 +585,26 @@ class St extends x {
|
|
|
670
585
|
this.list.delete(t.id);
|
|
671
586
|
}
|
|
672
587
|
}
|
|
673
|
-
const
|
|
588
|
+
const z = window.matchMedia, I = c(({ value: e, label: t, icon: s }) => m({
|
|
674
589
|
class: 'text-sm gap-1 font-medium leading-none disabled:cursor-not-allowed disabled:opacity-70 flex flex-col items-center justify-between rounded-md border-2 bg-popover p-4 hover:bg-accent hover:text-accent-foreground data-[state="active"]:border-primary [&:has([data-state="active"])]:border-primary',
|
|
675
590
|
onState: ["method", { active: e }],
|
|
676
591
|
dataSet: ["method", ["state", e, "active"]],
|
|
677
|
-
click: (
|
|
678
|
-
|
|
592
|
+
click: (o, { state: r }) => {
|
|
593
|
+
r.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), Pe(e);
|
|
679
594
|
}
|
|
680
595
|
}, [
|
|
681
|
-
|
|
682
|
-
|
|
596
|
+
D(s),
|
|
597
|
+
a(t)
|
|
683
598
|
])), Pe = (e) => {
|
|
684
|
-
var
|
|
599
|
+
var o;
|
|
685
600
|
const t = document.documentElement;
|
|
686
|
-
if (e === "system" && (e = (
|
|
601
|
+
if (e === "system" && (e = (o = window.matchMedia) != null && o.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light"), z && !z("(prefers-color-scheme: " + e + ")").matches) {
|
|
687
602
|
t.classList.add(e);
|
|
688
603
|
return;
|
|
689
604
|
}
|
|
690
|
-
const
|
|
691
|
-
t.classList.remove(
|
|
692
|
-
},
|
|
605
|
+
const s = e === "light" ? "dark" : "light";
|
|
606
|
+
t.classList.remove(s);
|
|
607
|
+
}, yt = k(
|
|
693
608
|
{
|
|
694
609
|
/**
|
|
695
610
|
* This will render the component.
|
|
@@ -699,9 +614,9 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
699
614
|
render() {
|
|
700
615
|
return n({ class: "flex flex-auto flex-col" }, [
|
|
701
616
|
n({ class: "grid grid-cols-3 gap-4" }, [
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
617
|
+
I({ label: "System", value: "system", icon: d.adjustments.horizontal }),
|
|
618
|
+
I({ label: "Light", value: "light", icon: d.sun }),
|
|
619
|
+
I({ label: "Dark", value: "dark", icon: d.moon })
|
|
705
620
|
])
|
|
706
621
|
]);
|
|
707
622
|
},
|
|
@@ -716,7 +631,7 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
716
631
|
};
|
|
717
632
|
}
|
|
718
633
|
}
|
|
719
|
-
),
|
|
634
|
+
), vt = x(
|
|
720
635
|
{
|
|
721
636
|
/**
|
|
722
637
|
* The initial state of the Toggle.
|
|
@@ -743,14 +658,14 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
743
658
|
* @returns {object}
|
|
744
659
|
*/
|
|
745
660
|
render() {
|
|
746
|
-
return
|
|
661
|
+
return m({
|
|
747
662
|
class: "relative inline-flex h-6 w-11 min-w-11 items-center rounded-full bg-muted transition-colors focus:outline-none",
|
|
748
663
|
onState: ["active", { "bg-primary": !0, "bg-muted": !1 }],
|
|
749
|
-
click: (t, { state:
|
|
750
|
-
|
|
664
|
+
click: (t, { state: s }) => {
|
|
665
|
+
s.toggle("active"), this.checkbox.checked = s.active;
|
|
751
666
|
}
|
|
752
667
|
}, [
|
|
753
|
-
|
|
668
|
+
J({
|
|
754
669
|
cache: "checkbox",
|
|
755
670
|
class: "opacity-0 absolute top-0 left-0 bottom-0 right-0 w-full h-full",
|
|
756
671
|
/**
|
|
@@ -761,49 +676,49 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
761
676
|
bind: this.bind,
|
|
762
677
|
required: this.required
|
|
763
678
|
}),
|
|
764
|
-
|
|
679
|
+
a({
|
|
765
680
|
class: "absolute h-5 w-5 bg-background rounded-full shadow-md transform transition-transform",
|
|
766
681
|
onState: ["active", { "translate-x-[22px]": !0, "translate-x-[2px]": !1 }]
|
|
767
682
|
})
|
|
768
683
|
]);
|
|
769
684
|
}
|
|
770
685
|
}
|
|
771
|
-
),
|
|
686
|
+
), w = {
|
|
772
687
|
ONLINE: "online",
|
|
773
688
|
OFFLINE: "offline",
|
|
774
689
|
BUSY: "busy",
|
|
775
690
|
AWAY: "away"
|
|
776
|
-
},
|
|
691
|
+
}, f = {
|
|
777
692
|
ONLINE: "bg-green-500",
|
|
778
693
|
OFFLINE: "bg-gray-500",
|
|
779
694
|
BUSY: "bg-red-500",
|
|
780
695
|
AWAY: "bg-yellow-500"
|
|
781
|
-
},
|
|
782
|
-
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${
|
|
783
|
-
}),
|
|
696
|
+
}, Ne = (e = "") => (e = e.toUpperCase(), f[e] || f.OFFLINE), Ct = (e) => n({
|
|
697
|
+
class: `absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full ${Ne(e)}`
|
|
698
|
+
}), kt = ({ propName: e = "status" } = {}) => n({
|
|
784
699
|
class: "absolute bottom-0 right-0 w-3 h-3 border-2 rounded-full",
|
|
785
700
|
onSet: [e, {
|
|
786
|
-
[
|
|
787
|
-
[
|
|
788
|
-
[
|
|
789
|
-
[
|
|
701
|
+
[f.ONLINE]: w.ONLINE,
|
|
702
|
+
[f.OFFLINE]: w.OFFLINE,
|
|
703
|
+
[f.BUSY]: w.BUSY,
|
|
704
|
+
[f.AWAY]: w.AWAY
|
|
790
705
|
}]
|
|
791
|
-
}),
|
|
706
|
+
}), ze = (e, t) => Y(
|
|
792
707
|
{
|
|
793
708
|
href: e,
|
|
794
709
|
"aria-current": t === "Breadcrumb" && "page",
|
|
795
710
|
// Only set aria-current on the last item
|
|
796
711
|
class: "text-muted-foreground font-medium hover:text-foreground"
|
|
797
712
|
},
|
|
798
|
-
[
|
|
799
|
-
),
|
|
713
|
+
[a(t)]
|
|
714
|
+
), Fe = () => D({
|
|
800
715
|
class: "mx-3 text-muted-foreground",
|
|
801
716
|
"aria-hidden": !0,
|
|
802
717
|
size: "xs"
|
|
803
|
-
},
|
|
804
|
-
e.href ?
|
|
805
|
-
e.separator &&
|
|
806
|
-
]),
|
|
718
|
+
}, d.chevron.single.right), Ee = (e) => n({ class: "flex items-center" }, [
|
|
719
|
+
e.href ? ze(e.href, e.label) : a(e.label),
|
|
720
|
+
e.separator && Fe()
|
|
721
|
+
]), St = k(
|
|
807
722
|
{
|
|
808
723
|
/**
|
|
809
724
|
* Set initial data
|
|
@@ -811,7 +726,7 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
811
726
|
* @returns {Data}
|
|
812
727
|
*/
|
|
813
728
|
setData() {
|
|
814
|
-
return new
|
|
729
|
+
return new C({
|
|
815
730
|
// @ts-ignore
|
|
816
731
|
items: this.items || []
|
|
817
732
|
});
|
|
@@ -823,7 +738,7 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
823
738
|
*/
|
|
824
739
|
render() {
|
|
825
740
|
const e = this.data.items.length - 1;
|
|
826
|
-
return
|
|
741
|
+
return K(
|
|
827
742
|
{
|
|
828
743
|
"aria-label": "Breadcrumb",
|
|
829
744
|
class: "flex items-center space-x-1 text-sm"
|
|
@@ -832,17 +747,17 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
832
747
|
n({
|
|
833
748
|
role: "list",
|
|
834
749
|
class: "flex items-center",
|
|
835
|
-
for: ["items", (t,
|
|
750
|
+
for: ["items", (t, s) => Ee({
|
|
836
751
|
href: t.href,
|
|
837
752
|
label: t.label,
|
|
838
|
-
separator:
|
|
753
|
+
separator: s < e
|
|
839
754
|
})]
|
|
840
755
|
})
|
|
841
756
|
]
|
|
842
757
|
);
|
|
843
758
|
}
|
|
844
759
|
}
|
|
845
|
-
),
|
|
760
|
+
), F = {
|
|
846
761
|
xs: "h-1 w-1",
|
|
847
762
|
sm: "h-2 w-2",
|
|
848
763
|
md: "h-4 w-4",
|
|
@@ -851,21 +766,21 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
851
766
|
"2xl": "h-16 w-16",
|
|
852
767
|
"3xl": "h-24 w-24",
|
|
853
768
|
default: "h-4 w-4"
|
|
854
|
-
},
|
|
855
|
-
|
|
769
|
+
}, je = (e) => F[e] || F.default, Oe = ({ index: e, size: t }) => n({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
|
|
770
|
+
a({
|
|
856
771
|
class: "block w-full h-full rounded-full transition-colors",
|
|
857
772
|
onSet: ["activeIndex", {
|
|
858
773
|
"bg-primary": e,
|
|
859
774
|
"shadow-md": e
|
|
860
775
|
}],
|
|
861
|
-
click: (
|
|
862
|
-
|
|
776
|
+
click: (s, { data: o, onClick: r }) => {
|
|
777
|
+
o.activeIndex = e, r && r(e);
|
|
863
778
|
}
|
|
864
779
|
})
|
|
865
|
-
]),
|
|
866
|
-
index:
|
|
780
|
+
]), Ve = (e, t) => Array.from({ length: e }, (s, o) => Oe({
|
|
781
|
+
index: o,
|
|
867
782
|
size: t
|
|
868
|
-
})),
|
|
783
|
+
})), Dt = k(
|
|
869
784
|
{
|
|
870
785
|
/**
|
|
871
786
|
* Defines component data (props).
|
|
@@ -873,7 +788,7 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
873
788
|
* @returns {Data}
|
|
874
789
|
*/
|
|
875
790
|
setData() {
|
|
876
|
-
return new
|
|
791
|
+
return new C({
|
|
877
792
|
// @ts-ignore
|
|
878
793
|
count: this.count || 4,
|
|
879
794
|
// total dots
|
|
@@ -887,46 +802,46 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
887
802
|
* @returns {object}
|
|
888
803
|
*/
|
|
889
804
|
render() {
|
|
890
|
-
const e = this.gap || "gap-2", t =
|
|
805
|
+
const e = this.gap || "gap-2", t = je(this.size || "sm"), s = Ve(this.data.count, t);
|
|
891
806
|
return n(
|
|
892
807
|
{ class: "flex justify-center items-center py-2" },
|
|
893
808
|
[
|
|
894
|
-
n({ class: `flex ${e}` },
|
|
809
|
+
n({ class: `flex ${e}` }, s)
|
|
895
810
|
]
|
|
896
811
|
);
|
|
897
812
|
}
|
|
898
813
|
}
|
|
899
|
-
),
|
|
814
|
+
), Ye = ({ toggleDropdown: e }) => m(
|
|
900
815
|
{
|
|
901
816
|
cache: "button",
|
|
902
817
|
class: "relative z-[2] inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-muted h-10 px-4 py-2 justify-between",
|
|
903
818
|
click: e
|
|
904
819
|
},
|
|
905
820
|
[
|
|
906
|
-
|
|
907
|
-
|
|
821
|
+
a({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
|
|
822
|
+
h({ html: d.chevron.upDown })
|
|
908
823
|
]
|
|
909
|
-
),
|
|
824
|
+
), qe = (e, t) => O({
|
|
910
825
|
class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
|
|
911
826
|
click: () => t(e),
|
|
912
827
|
onState: ["selectedValue", { "bg-secondary": e.value }]
|
|
913
828
|
}, [
|
|
914
|
-
e.icon &&
|
|
915
|
-
|
|
916
|
-
]),
|
|
917
|
-
|
|
918
|
-
]),
|
|
919
|
-
|
|
829
|
+
e.icon && a({ class: "mr-2 flex items-baseline" }, [h({ class: "flex w-4 h-4", html: e.icon })]),
|
|
830
|
+
a(e.label)
|
|
831
|
+
]), He = (e) => n({ class: "w-full border rounded-md" }, [
|
|
832
|
+
V({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (t) => qe(t, e)] })
|
|
833
|
+
]), Ue = ({ onSelect: e }) => n({ class: "flex flex-auto flex-col" }, [
|
|
834
|
+
y(
|
|
920
835
|
"open",
|
|
921
|
-
(t,
|
|
836
|
+
(t, s, o) => t ? new S({
|
|
922
837
|
cache: "dropdown",
|
|
923
|
-
parent:
|
|
924
|
-
button:
|
|
838
|
+
parent: o,
|
|
839
|
+
button: o.button
|
|
925
840
|
}, [
|
|
926
|
-
|
|
841
|
+
He(e)
|
|
927
842
|
]) : null
|
|
928
843
|
)
|
|
929
|
-
]),
|
|
844
|
+
]), It = k(
|
|
930
845
|
{
|
|
931
846
|
/**
|
|
932
847
|
* This will set up the data.
|
|
@@ -934,7 +849,7 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
934
849
|
* @returns {Data}
|
|
935
850
|
*/
|
|
936
851
|
setData() {
|
|
937
|
-
return new
|
|
852
|
+
return new C({
|
|
938
853
|
// @ts-ignore
|
|
939
854
|
items: this.items || []
|
|
940
855
|
});
|
|
@@ -974,16 +889,16 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
974
889
|
*/
|
|
975
890
|
render() {
|
|
976
891
|
const e = (t) => {
|
|
977
|
-
const
|
|
978
|
-
|
|
892
|
+
const s = this.state;
|
|
893
|
+
s.selectedValue = t.value, s.selectedLabel = t.label, s.open = !1;
|
|
979
894
|
};
|
|
980
895
|
return n({ class: "relative w-full flex flex-auto flex-col max-w-[250px]" }, [
|
|
981
896
|
// @ts-ignore
|
|
982
|
-
|
|
983
|
-
|
|
897
|
+
Ye({ toggleDropdown: this.toggleDropdown.bind(this) }),
|
|
898
|
+
Ue({ onSelect: e }),
|
|
984
899
|
// Hidden required input for form validation
|
|
985
900
|
// @ts-ignore
|
|
986
|
-
this.required &&
|
|
901
|
+
this.required && v({
|
|
987
902
|
class: "opacity-0 absolute top-0 left-0 z-[1]",
|
|
988
903
|
type: "text",
|
|
989
904
|
// @ts-ignore
|
|
@@ -995,34 +910,34 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
995
910
|
]);
|
|
996
911
|
}
|
|
997
912
|
}
|
|
998
|
-
),
|
|
913
|
+
), U = ({ icon: e, click: t, ariaLabel: s }) => u({
|
|
999
914
|
variant: "icon",
|
|
1000
915
|
class: "flex flex-none",
|
|
1001
916
|
click: t,
|
|
1002
917
|
icon: e,
|
|
1003
|
-
"aria-label":
|
|
1004
|
-
}),
|
|
1005
|
-
icon:
|
|
918
|
+
"aria-label": s
|
|
919
|
+
}), _e = ({ click: e }) => U({
|
|
920
|
+
icon: d.circleMinus,
|
|
1006
921
|
click: e,
|
|
1007
922
|
ariaLabel: "Decrement"
|
|
1008
|
-
}),
|
|
1009
|
-
icon:
|
|
923
|
+
}), Re = ({ click: e }) => U({
|
|
924
|
+
icon: d.circlePlus,
|
|
1010
925
|
click: e,
|
|
1011
926
|
ariaLabel: "Increment"
|
|
1012
|
-
}),
|
|
927
|
+
}), We = ({ bind: e, min: t, max: s, readonly: o = !1 }) => v({
|
|
1013
928
|
value: "[[count]]",
|
|
1014
929
|
bind: e,
|
|
1015
|
-
blur: (
|
|
1016
|
-
let
|
|
1017
|
-
isNaN(
|
|
930
|
+
blur: (r, { state: l }) => {
|
|
931
|
+
let i = parseInt(r.target.value, 10);
|
|
932
|
+
isNaN(i) && (i = t ?? 0), t !== void 0 && (i = Math.max(i, t)), s !== void 0 && (i = Math.min(i, s)), l.count = i;
|
|
1018
933
|
},
|
|
1019
934
|
class: "flex flex-auto text-lg font-medium bg-transparent text-center border min-w-0",
|
|
1020
|
-
readonly:
|
|
935
|
+
readonly: o,
|
|
1021
936
|
min: t,
|
|
1022
|
-
max:
|
|
937
|
+
max: s,
|
|
1023
938
|
type: "number",
|
|
1024
939
|
"aria-label": "Counter"
|
|
1025
|
-
}),
|
|
940
|
+
}), Tt = x(
|
|
1026
941
|
{
|
|
1027
942
|
/**
|
|
1028
943
|
* Initial state for the counter component.
|
|
@@ -1045,47 +960,47 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
1045
960
|
render() {
|
|
1046
961
|
const e = this.class ?? "";
|
|
1047
962
|
return n({ class: `flex flex-auto items-center justify-between space-x-4 p-4 ${e}` }, [
|
|
1048
|
-
|
|
1049
|
-
|
|
963
|
+
_e({ click: () => this.state.decrement("count") }),
|
|
964
|
+
We({
|
|
1050
965
|
bind: this.bind,
|
|
1051
966
|
readonly: this.readonly,
|
|
1052
967
|
min: this.min,
|
|
1053
968
|
max: this.max
|
|
1054
969
|
}),
|
|
1055
|
-
|
|
970
|
+
Re({ click: () => this.state.increment("count") })
|
|
1056
971
|
]);
|
|
1057
972
|
}
|
|
1058
973
|
}
|
|
1059
|
-
),
|
|
974
|
+
), Ge = ({ bind: e, required: t }) => v({
|
|
1060
975
|
cache: "input",
|
|
1061
976
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
1062
977
|
bind: e,
|
|
1063
978
|
required: t
|
|
1064
|
-
}),
|
|
979
|
+
}), Je = ({ bind: e, required: t, toggleOpen: s }) => m({
|
|
1065
980
|
class: "relative flex items-center gap-2 w-full justify-between border border-input bg-background hover:bg-muted rounded-md h-10 px-4 py-2",
|
|
1066
|
-
click:
|
|
981
|
+
click: s
|
|
1067
982
|
}, [
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
onState: ["selectedDate", (
|
|
983
|
+
Ge({ bind: e, required: t }),
|
|
984
|
+
a({
|
|
985
|
+
onState: ["selectedDate", (o) => o ? A.format("standard", o) : "Pick a date"]
|
|
1071
986
|
}),
|
|
1072
|
-
|
|
1073
|
-
]),
|
|
1074
|
-
|
|
987
|
+
h({ html: d.calendar.days })
|
|
988
|
+
]), Ke = ({ handleDateSelect: e }) => n({ class: "absolute mt-1 z-10 bg-background rounded-md shadow-lg" }, [
|
|
989
|
+
y(
|
|
1075
990
|
"open",
|
|
1076
|
-
(t,
|
|
991
|
+
(t, s, o) => t ? new S({
|
|
1077
992
|
cache: "dropdown",
|
|
1078
|
-
parent:
|
|
1079
|
-
button:
|
|
993
|
+
parent: o,
|
|
994
|
+
button: o.panel,
|
|
1080
995
|
size: "fit"
|
|
1081
996
|
}, [
|
|
1082
|
-
new
|
|
1083
|
-
selectedDate:
|
|
997
|
+
new te({
|
|
998
|
+
selectedDate: o.state.selectedDate,
|
|
1084
999
|
selectedCallBack: e
|
|
1085
1000
|
})
|
|
1086
1001
|
]) : null
|
|
1087
1002
|
)
|
|
1088
|
-
]),
|
|
1003
|
+
]), At = x(
|
|
1089
1004
|
{
|
|
1090
1005
|
/**
|
|
1091
1006
|
* The initial state of the DatePicker.
|
|
@@ -1113,78 +1028,78 @@ const E = window.matchMedia, T = d(({ value: e, label: t, icon: o }) => h({
|
|
|
1113
1028
|
* @returns {object}
|
|
1114
1029
|
*/
|
|
1115
1030
|
render() {
|
|
1116
|
-
const e = (
|
|
1117
|
-
this.state.selectedDate =
|
|
1031
|
+
const e = (s, { state: o }) => o.toggle("open"), t = (s) => {
|
|
1032
|
+
this.state.selectedDate = s, this.state.open = !1, this.input.value = s, typeof this.onChange == "function" && this.onChange(s);
|
|
1118
1033
|
};
|
|
1119
1034
|
return n({ class: "relative w-full max-w-[320px]" }, [
|
|
1120
|
-
|
|
1035
|
+
Je({
|
|
1121
1036
|
toggleOpen: e,
|
|
1122
1037
|
bind: this.bind,
|
|
1123
1038
|
required: this.required
|
|
1124
1039
|
}),
|
|
1125
|
-
|
|
1040
|
+
Ke({
|
|
1126
1041
|
handleDateSelect: t
|
|
1127
1042
|
})
|
|
1128
1043
|
]);
|
|
1129
1044
|
}
|
|
1130
1045
|
}
|
|
1131
|
-
),
|
|
1132
|
-
new
|
|
1046
|
+
), Bt = ({ dateTime: e = "", remoteTimeZone: t = "America/Denver", filter: s = null }) => Q([
|
|
1047
|
+
new ne({
|
|
1133
1048
|
dateTime: e,
|
|
1134
|
-
filter:
|
|
1135
|
-
const
|
|
1136
|
-
return
|
|
1049
|
+
filter: s || ((o) => {
|
|
1050
|
+
const r = A.getLocalTime(o, !0, !1, t);
|
|
1051
|
+
return A.getTimeFrame(r);
|
|
1137
1052
|
})
|
|
1138
1053
|
})
|
|
1139
1054
|
]);
|
|
1140
|
-
function
|
|
1141
|
-
return
|
|
1055
|
+
function Qe({ bind: e, required: t }) {
|
|
1056
|
+
return v({
|
|
1142
1057
|
cache: "input",
|
|
1143
1058
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
1144
1059
|
bind: e,
|
|
1145
1060
|
required: t
|
|
1146
1061
|
});
|
|
1147
1062
|
}
|
|
1148
|
-
function
|
|
1149
|
-
return
|
|
1063
|
+
function Xe({ bind: e, required: t, toggleOpen: s }) {
|
|
1064
|
+
return m(
|
|
1150
1065
|
{
|
|
1151
1066
|
class: "relative flex items-center gap-2 w-full justify-between border border-input bg-background hover:bg-muted rounded-md h-10 px-4 py-2",
|
|
1152
|
-
click:
|
|
1067
|
+
click: s
|
|
1153
1068
|
},
|
|
1154
1069
|
[
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
onState: ["selectedTime", (
|
|
1070
|
+
Qe({ bind: e, required: t }),
|
|
1071
|
+
a({
|
|
1072
|
+
onState: ["selectedTime", (o) => o || "Pick a time"]
|
|
1158
1073
|
}),
|
|
1159
|
-
|
|
1074
|
+
h({ html: d.clock })
|
|
1160
1075
|
]
|
|
1161
1076
|
);
|
|
1162
1077
|
}
|
|
1163
|
-
function
|
|
1078
|
+
function T({ items: e, handleTimeSelect: t, state: s, stateValue: o, pad: r = !1 }) {
|
|
1164
1079
|
return n(
|
|
1165
1080
|
{ class: "flex flex-col max-h-[200px] overflow-y-auto" },
|
|
1166
1081
|
e.map((l) => {
|
|
1167
|
-
let
|
|
1168
|
-
return
|
|
1169
|
-
text:
|
|
1082
|
+
let i = r ? l.toString().padStart(2, "0") : l.toString();
|
|
1083
|
+
return m({
|
|
1084
|
+
text: i,
|
|
1170
1085
|
class: "hover:bg-muted/50 rounded-md px-2 py-1",
|
|
1171
|
-
click: () => t({ [
|
|
1172
|
-
onState: [
|
|
1086
|
+
click: () => t({ [o]: i }),
|
|
1087
|
+
onState: [s, o, { "bg-muted": i }]
|
|
1173
1088
|
});
|
|
1174
1089
|
})
|
|
1175
1090
|
);
|
|
1176
1091
|
}
|
|
1177
|
-
function
|
|
1092
|
+
function Ze({ handleTimeSelect: e }) {
|
|
1178
1093
|
return n(
|
|
1179
1094
|
{ class: "absolute mt-1 z-10 bg-background rounded-md shadow-lg" },
|
|
1180
1095
|
[
|
|
1181
|
-
|
|
1096
|
+
y(
|
|
1182
1097
|
"open",
|
|
1183
|
-
(t,
|
|
1098
|
+
(t, s, o) => t ? new S(
|
|
1184
1099
|
{
|
|
1185
1100
|
cache: "dropdown",
|
|
1186
|
-
parent:
|
|
1187
|
-
button:
|
|
1101
|
+
parent: o,
|
|
1102
|
+
button: o.panel,
|
|
1188
1103
|
size: "fit"
|
|
1189
1104
|
},
|
|
1190
1105
|
[
|
|
@@ -1195,26 +1110,26 @@ function st({ handleTimeSelect: e }) {
|
|
|
1195
1110
|
{ class: "grid grid-cols-3 gap-2 p-4 text-center max-h-[220px] min-w-[240px]" },
|
|
1196
1111
|
[
|
|
1197
1112
|
// Hours column
|
|
1198
|
-
|
|
1199
|
-
items: Array.from({ length: 12 }, (
|
|
1113
|
+
T({
|
|
1114
|
+
items: Array.from({ length: 12 }, (r, l) => l + 1),
|
|
1200
1115
|
handleTimeSelect: e,
|
|
1201
|
-
state:
|
|
1116
|
+
state: o.state,
|
|
1202
1117
|
stateValue: "hour",
|
|
1203
1118
|
pad: !0
|
|
1204
1119
|
}),
|
|
1205
1120
|
// Minutes column
|
|
1206
|
-
|
|
1207
|
-
items: Array.from({ length: 60 }, (
|
|
1121
|
+
T({
|
|
1122
|
+
items: Array.from({ length: 60 }, (r, l) => l),
|
|
1208
1123
|
handleTimeSelect: e,
|
|
1209
|
-
state:
|
|
1124
|
+
state: o.state,
|
|
1210
1125
|
stateValue: "minute",
|
|
1211
1126
|
pad: !0
|
|
1212
1127
|
}),
|
|
1213
1128
|
// AM/PM column
|
|
1214
|
-
|
|
1129
|
+
T({
|
|
1215
1130
|
items: ["AM", "PM"],
|
|
1216
1131
|
handleTimeSelect: e,
|
|
1217
|
-
state:
|
|
1132
|
+
state: o.state,
|
|
1218
1133
|
stateValue: "meridian"
|
|
1219
1134
|
})
|
|
1220
1135
|
]
|
|
@@ -1227,20 +1142,20 @@ function st({ handleTimeSelect: e }) {
|
|
|
1227
1142
|
]
|
|
1228
1143
|
);
|
|
1229
1144
|
}
|
|
1230
|
-
function
|
|
1145
|
+
function E(e) {
|
|
1231
1146
|
if (!e)
|
|
1232
1147
|
return { hour: null, minute: null, meridian: null };
|
|
1233
|
-
const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i,
|
|
1234
|
-
if (!
|
|
1148
|
+
const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = e.match(t);
|
|
1149
|
+
if (!s)
|
|
1235
1150
|
return { hour: null, minute: null, meridian: null };
|
|
1236
|
-
let [,
|
|
1237
|
-
return
|
|
1238
|
-
hour:
|
|
1239
|
-
minute:
|
|
1151
|
+
let [, o, r, , l] = s, i = parseInt(o, 10), g = parseInt(r, 10);
|
|
1152
|
+
return i < 0 || i > 23 || g < 0 || g > 59 ? { hour: null, minute: null, meridian: null } : (l ? (l = l.toUpperCase(), l === "PM" && i < 12 ? i += 12 : l === "AM" && i === 12 && (i = 12)) : i === 0 ? (l = "AM", i = 12) : i < 12 ? l = "AM" : i === 12 ? l = "PM" : (l = "PM", i -= 12), {
|
|
1153
|
+
hour: i.toString().padStart(2, "0"),
|
|
1154
|
+
minute: g.toString().padStart(2, "0"),
|
|
1240
1155
|
meridian: l
|
|
1241
1156
|
});
|
|
1242
1157
|
}
|
|
1243
|
-
const
|
|
1158
|
+
const $t = x(
|
|
1244
1159
|
{
|
|
1245
1160
|
/**
|
|
1246
1161
|
* The initial shallow state of the TimePicker.
|
|
@@ -1248,13 +1163,13 @@ const Ft = w(
|
|
|
1248
1163
|
* @member {object} state
|
|
1249
1164
|
*/
|
|
1250
1165
|
state() {
|
|
1251
|
-
const e = this.selectedTime ?? null, { hour: t, minute:
|
|
1166
|
+
const e = this.selectedTime ?? null, { hour: t, minute: s, meridian: o } = E(e);
|
|
1252
1167
|
return {
|
|
1253
1168
|
selectedTime: e,
|
|
1254
1169
|
open: !1,
|
|
1255
1170
|
hour: t,
|
|
1256
|
-
minute:
|
|
1257
|
-
meridian:
|
|
1171
|
+
minute: s,
|
|
1172
|
+
meridian: o
|
|
1258
1173
|
};
|
|
1259
1174
|
},
|
|
1260
1175
|
/**
|
|
@@ -1264,11 +1179,11 @@ const Ft = w(
|
|
|
1264
1179
|
*/
|
|
1265
1180
|
after() {
|
|
1266
1181
|
if (this.input.value) {
|
|
1267
|
-
const { hour: e, minute: t, meridian:
|
|
1182
|
+
const { hour: e, minute: t, meridian: s } = E(this.input.value);
|
|
1268
1183
|
this.state.set({
|
|
1269
1184
|
hour: e,
|
|
1270
1185
|
minute: t,
|
|
1271
|
-
meridian:
|
|
1186
|
+
meridian: s,
|
|
1272
1187
|
selectedTime: this.input.value
|
|
1273
1188
|
});
|
|
1274
1189
|
}
|
|
@@ -1279,8 +1194,8 @@ const Ft = w(
|
|
|
1279
1194
|
* @returns {object}
|
|
1280
1195
|
*/
|
|
1281
1196
|
render() {
|
|
1282
|
-
const e = (
|
|
1283
|
-
if (
|
|
1197
|
+
const e = (s, { state: o }) => o.toggle("open"), t = ({ hour: s, minute: o, meridian: r }) => {
|
|
1198
|
+
if (s && (this.state.hour = s), o && (this.state.minute = o), r && (this.state.meridian = r), this.state.hour && this.state.minute && this.state.meridian) {
|
|
1284
1199
|
const l = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
|
|
1285
1200
|
this.state.selectedTime = l, this.state.open = !1, this.input.value = l, typeof this.change == "function" && this.change(l);
|
|
1286
1201
|
}
|
|
@@ -1288,23 +1203,23 @@ const Ft = w(
|
|
|
1288
1203
|
return n(
|
|
1289
1204
|
{ class: "relative w-full max-w-[320px]" },
|
|
1290
1205
|
[
|
|
1291
|
-
|
|
1206
|
+
Xe({
|
|
1292
1207
|
toggleOpen: e,
|
|
1293
1208
|
bind: this.bind,
|
|
1294
1209
|
required: this.required
|
|
1295
1210
|
}),
|
|
1296
|
-
|
|
1211
|
+
Ze({
|
|
1297
1212
|
handleTimeSelect: t
|
|
1298
1213
|
})
|
|
1299
1214
|
]
|
|
1300
1215
|
);
|
|
1301
1216
|
}
|
|
1302
1217
|
}
|
|
1303
|
-
),
|
|
1304
|
-
|
|
1305
|
-
]),
|
|
1306
|
-
|
|
1307
|
-
]),
|
|
1218
|
+
), et = (e, t) => n({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
|
|
1219
|
+
D({ size: "lg" }, e)
|
|
1220
|
+
]), tt = ({ title: e }) => M({ class: "flex flex-auto items-center" }, [
|
|
1221
|
+
B({ class: "text-lg font-semibold" }, e)
|
|
1222
|
+
]), st = c((e, t) => X(
|
|
1308
1223
|
{
|
|
1309
1224
|
class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
|
|
1310
1225
|
rounded-lg flex flex-auto flex-col
|
|
@@ -1315,18 +1230,18 @@ const Ft = w(
|
|
|
1315
1230
|
[
|
|
1316
1231
|
n({ class: "flex flex-auto p-6 pb-12 md:pb-6" }, [
|
|
1317
1232
|
// Icon and content
|
|
1318
|
-
e.icon &&
|
|
1233
|
+
e.icon && et(e.icon, e.iconColor),
|
|
1319
1234
|
n({ class: "flex flex-auto flex-col gap-4" }, [
|
|
1320
1235
|
n({ class: "flex flex-auto flex-col space-y-2" }, [
|
|
1321
|
-
|
|
1236
|
+
tt(e),
|
|
1322
1237
|
e.description && p({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
|
|
1323
1238
|
n({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
|
|
1324
1239
|
]),
|
|
1325
|
-
e.buttons &&
|
|
1240
|
+
e.buttons && $({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:space-x-2" }, e.buttons)
|
|
1326
1241
|
])
|
|
1327
1242
|
])
|
|
1328
1243
|
]
|
|
1329
|
-
)),
|
|
1244
|
+
)), ot = (e) => q.render(e, app.root), j = {
|
|
1330
1245
|
info: {
|
|
1331
1246
|
borderColor: "border-blue-500",
|
|
1332
1247
|
bgColor: "bg-muted/10",
|
|
@@ -1353,39 +1268,14 @@ const Ft = w(
|
|
|
1353
1268
|
iconColor: "text-muted-foreground"
|
|
1354
1269
|
}
|
|
1355
1270
|
};
|
|
1356
|
-
class
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
* @member {string} description
|
|
1365
|
-
*/
|
|
1366
|
-
i(this, "description", null);
|
|
1367
|
-
/**
|
|
1368
|
-
* @member {string} Type
|
|
1369
|
-
* @default ''
|
|
1370
|
-
* @values 'info', 'warning', 'destructive', 'success', 'default'
|
|
1371
|
-
*/
|
|
1372
|
-
i(this, "type", "");
|
|
1373
|
-
/**
|
|
1374
|
-
* @member {string} icon
|
|
1375
|
-
*/
|
|
1376
|
-
i(this, "icon", null);
|
|
1377
|
-
/**
|
|
1378
|
-
* @member {function|null} onClose
|
|
1379
|
-
*/
|
|
1380
|
-
i(this, "onClose", null);
|
|
1381
|
-
/**
|
|
1382
|
-
* @member {boolean} hideFooter
|
|
1383
|
-
*/
|
|
1384
|
-
i(this, "hideFooter", !1);
|
|
1385
|
-
/**
|
|
1386
|
-
* @member {Array|null} buttons
|
|
1387
|
-
*/
|
|
1388
|
-
i(this, "buttons", null);
|
|
1271
|
+
class nt extends b {
|
|
1272
|
+
/**
|
|
1273
|
+
* This will declare the props for the compiler.
|
|
1274
|
+
*
|
|
1275
|
+
* @returns {void}
|
|
1276
|
+
*/
|
|
1277
|
+
declareProps() {
|
|
1278
|
+
this.title = null, this.description = null, this.type = "", this.icon = null, this.onClose = null, this.hideFooter = !1, this.buttons = null;
|
|
1389
1279
|
}
|
|
1390
1280
|
/**
|
|
1391
1281
|
* This will render the modal component.
|
|
@@ -1393,15 +1283,15 @@ class it extends x {
|
|
|
1393
1283
|
* @returns {object}
|
|
1394
1284
|
*/
|
|
1395
1285
|
render() {
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1398
|
-
}, { borderColor: s, bgColor:
|
|
1399
|
-
return
|
|
1400
|
-
class:
|
|
1401
|
-
title:
|
|
1402
|
-
click:
|
|
1286
|
+
const t = (g) => {
|
|
1287
|
+
g.target === this.panel && this.close();
|
|
1288
|
+
}, { borderColor: s, bgColor: o, iconColor: r } = j[this.type] || j.default, l = `${this.getMainClass()} ${o} ${s}`, i = this.title || "Dialog Title";
|
|
1289
|
+
return st({
|
|
1290
|
+
class: l,
|
|
1291
|
+
title: i,
|
|
1292
|
+
click: t,
|
|
1403
1293
|
icon: this.icon,
|
|
1404
|
-
iconColor:
|
|
1294
|
+
iconColor: r,
|
|
1405
1295
|
description: this.description,
|
|
1406
1296
|
buttons: this.getButtons()
|
|
1407
1297
|
}, this.children);
|
|
@@ -1413,7 +1303,7 @@ class it extends x {
|
|
|
1413
1303
|
*/
|
|
1414
1304
|
getButtons() {
|
|
1415
1305
|
return this.hideFooter ? null : this.buttons ? this.buttons : [
|
|
1416
|
-
|
|
1306
|
+
u({ variant: "outline", click: () => this.close() }, "Close")
|
|
1417
1307
|
];
|
|
1418
1308
|
}
|
|
1419
1309
|
/**
|
|
@@ -1440,7 +1330,7 @@ class it extends x {
|
|
|
1440
1330
|
* @returns {void}
|
|
1441
1331
|
*/
|
|
1442
1332
|
open() {
|
|
1443
|
-
|
|
1333
|
+
ot(this), this.panel.showModal(), this.state.open = !0;
|
|
1444
1334
|
}
|
|
1445
1335
|
/**
|
|
1446
1336
|
* This will close the modal.
|
|
@@ -1451,17 +1341,14 @@ class it extends x {
|
|
|
1451
1341
|
this.state.open = !1, this.panel.close(), typeof this.onClose == "function" && this.onClose(), this.destroy();
|
|
1452
1342
|
}
|
|
1453
1343
|
}
|
|
1454
|
-
class
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
* @member {function} confirmed
|
|
1463
|
-
*/
|
|
1464
|
-
i(this, "confirmed", null);
|
|
1344
|
+
class Mt extends nt {
|
|
1345
|
+
/**
|
|
1346
|
+
* This will declare the props for the compiler.
|
|
1347
|
+
*
|
|
1348
|
+
* @returns {void}
|
|
1349
|
+
*/
|
|
1350
|
+
declareProps() {
|
|
1351
|
+
this.confirmTextLabel = null, this.confirmed = null;
|
|
1465
1352
|
}
|
|
1466
1353
|
/**
|
|
1467
1354
|
* This will get the buttons for the modal.
|
|
@@ -1469,10 +1356,10 @@ class Et extends it {
|
|
|
1469
1356
|
* @returns {array}
|
|
1470
1357
|
*/
|
|
1471
1358
|
getButtons() {
|
|
1472
|
-
const
|
|
1359
|
+
const t = this.confirmTextLabel || "Confirm";
|
|
1473
1360
|
return [
|
|
1474
|
-
|
|
1475
|
-
|
|
1361
|
+
u({ variant: "outline", click: () => this.close() }, "Cancel"),
|
|
1362
|
+
u({ variant: "primary", click: () => this.confirm() }, t)
|
|
1476
1363
|
];
|
|
1477
1364
|
}
|
|
1478
1365
|
/**
|
|
@@ -1485,42 +1372,42 @@ class Et extends it {
|
|
|
1485
1372
|
}
|
|
1486
1373
|
}
|
|
1487
1374
|
export {
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1375
|
+
ht as A,
|
|
1376
|
+
St as B,
|
|
1377
|
+
It as C,
|
|
1378
|
+
ae as D,
|
|
1379
|
+
st as E,
|
|
1380
|
+
be as F,
|
|
1381
|
+
nt as G,
|
|
1382
|
+
xt as M,
|
|
1383
|
+
wt as N,
|
|
1384
|
+
Re as P,
|
|
1385
|
+
bt as S,
|
|
1386
|
+
yt as T,
|
|
1387
|
+
he as a,
|
|
1388
|
+
mt as b,
|
|
1389
|
+
fe as c,
|
|
1390
|
+
xe as d,
|
|
1391
|
+
we as e,
|
|
1392
|
+
ye as f,
|
|
1393
|
+
Ce as g,
|
|
1394
|
+
ft as h,
|
|
1395
|
+
Se as i,
|
|
1396
|
+
gt as j,
|
|
1397
|
+
pt as k,
|
|
1398
|
+
Me as l,
|
|
1399
|
+
vt as m,
|
|
1400
|
+
Ct as n,
|
|
1401
|
+
kt as o,
|
|
1402
|
+
w as p,
|
|
1403
|
+
f as q,
|
|
1404
|
+
Ne as r,
|
|
1405
|
+
Dt as s,
|
|
1406
|
+
_e as t,
|
|
1407
|
+
We as u,
|
|
1408
|
+
Tt as v,
|
|
1409
|
+
At as w,
|
|
1410
|
+
Bt as x,
|
|
1411
|
+
$t as y,
|
|
1412
|
+
Mt as z
|
|
1526
1413
|
};
|