@devslab/dds-solid 0.29.1 → 0.30.0
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/README.ko.md +42 -0
- package/README.md +45 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +276 -203
- package/dist/index.js.map +1 -1
- package/dist/server.js +132 -38
- package/dist/server.js.map +1 -1
- package/dist/toast.d.ts +21 -3
- package/dist/toast.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4,17 +4,17 @@ import { t as l } from "./direction-CS85IDNU.js";
|
|
|
4
4
|
import { DatePicker as u } from "./date-picker.js";
|
|
5
5
|
import { t as d } from "./time-picker-BWz2wQUk.js";
|
|
6
6
|
import { DateRangePicker as f } from "./date-range-picker.js";
|
|
7
|
-
import { MonthPicker as
|
|
8
|
-
import { Input as
|
|
9
|
-
import { Combobox as
|
|
7
|
+
import { MonthPicker as p } from "./month-picker.js";
|
|
8
|
+
import { Input as m, InputGroup as h } from "./input.js";
|
|
9
|
+
import { Combobox as ee } from "./combobox.js";
|
|
10
10
|
import { SelectPicker as g } from "./select-picker.js";
|
|
11
|
-
import { DropdownMenu as
|
|
12
|
-
import { Popover as
|
|
13
|
-
import { Calendar as
|
|
14
|
-
import { SegmentedControl as
|
|
15
|
-
import { NumberInput as
|
|
16
|
-
import { For as
|
|
17
|
-
import { Dynamic as
|
|
11
|
+
import { DropdownMenu as te } from "./dropdown-menu.js";
|
|
12
|
+
import { Popover as _ } from "./popover.js";
|
|
13
|
+
import { Calendar as v } from "./calendar.js";
|
|
14
|
+
import { SegmentedControl as y, validateSegmentedItems as b } from "./segmented-control.js";
|
|
15
|
+
import { NumberInput as x, normalizeNumberText as S, numberInputMessages as C } from "./number-input.js";
|
|
16
|
+
import { For as w, Show as T, createContext as E, createEffect as D, createMemo as ne, createSignal as O, createUniqueId as k, getOwner as A, mergeProps as j, onCleanup as M, onMount as N, splitProps as P, useContext as re } from "solid-js";
|
|
17
|
+
import { Dynamic as ie, Portal as ae, className as F, createComponent as I, delegateEvents as L, effect as R, getNextElement as z, getNextMarker as B, insert as V, isServer as oe, memo as H, mergeProps as U, runHydrationEvents as W, setAttribute as G, setProperty as K, spread as se, template as q, use as J } from "solid-js/web";
|
|
18
18
|
import { Dialog as Y, useDialog as ce } from "@ark-ui/solid/dialog";
|
|
19
19
|
import { usePresenceContext as le } from "@ark-ui/solid/presence";
|
|
20
20
|
import { FocusTrap as ue } from "@zag-js/focus-trap";
|
|
@@ -35,21 +35,21 @@ function Oe(e, t) {
|
|
|
35
35
|
return e.replace("{count}", () => String(t));
|
|
36
36
|
}
|
|
37
37
|
function ke(e) {
|
|
38
|
-
let [t, n] =
|
|
38
|
+
let [t, n] = O(e.defaultExpandedGroups ?? e.nav.flatMap((t, n) => t.collapsible && t.items.some((t) => De(e.activePath, t.href, t.active)) ? [t.id ?? `group-${n}`] : [])), r = () => e.expandedGroups ?? t(), i = (t) => {
|
|
39
39
|
let i = r().includes(t) ? r().filter((e) => e !== t) : [...r(), t];
|
|
40
40
|
e.expandedGroups === void 0 && n(i), e.onExpandedGroupsChange?.(i);
|
|
41
41
|
};
|
|
42
42
|
return (() => {
|
|
43
|
-
var t =
|
|
44
|
-
return
|
|
43
|
+
var t = z(be);
|
|
44
|
+
return V(t, I(w, {
|
|
45
45
|
get each() {
|
|
46
46
|
return e.nav;
|
|
47
47
|
},
|
|
48
48
|
children: (t, n) => {
|
|
49
|
-
let a = `dds-console-group-${
|
|
49
|
+
let a = `dds-console-group-${k()}`, o = `${a}-items`, s = () => t.id ?? `group-${n()}`, c = () => !t.collapsible || r().includes(s());
|
|
50
50
|
return (() => {
|
|
51
|
-
var n =
|
|
52
|
-
return
|
|
51
|
+
var n = z(Se), r = n.firstChild, l = r.nextSibling;
|
|
52
|
+
return G(n, "aria-labelledby", a), G(r, "id", a), V(r, I(T, {
|
|
53
53
|
get when() {
|
|
54
54
|
return t.collapsible;
|
|
55
55
|
},
|
|
@@ -57,76 +57,76 @@ function ke(e) {
|
|
|
57
57
|
return t.label;
|
|
58
58
|
},
|
|
59
59
|
get children() {
|
|
60
|
-
var e =
|
|
61
|
-
return e.$$click = () => i(s()),
|
|
60
|
+
var e = z(xe), n = e.firstChild;
|
|
61
|
+
return e.$$click = () => i(s()), G(e, "aria-controls", o), V(n, () => t.label), R(() => G(e, "aria-expanded", c())), W(), e;
|
|
62
62
|
}
|
|
63
|
-
})),
|
|
63
|
+
})), G(l, "id", o), V(l, I(w, {
|
|
64
64
|
get each() {
|
|
65
65
|
return t.items;
|
|
66
66
|
},
|
|
67
67
|
children: (t) => (() => {
|
|
68
|
-
var n =
|
|
69
|
-
return r.$$click = () => e.onNavigate?.(),
|
|
68
|
+
var n = z(Te), r = n.firstChild, i = r.firstChild, [a, o] = B(i.nextSibling), s = a.nextSibling, [c, l] = B(s.nextSibling);
|
|
69
|
+
return r.$$click = () => e.onNavigate?.(), V(r, I(T, {
|
|
70
70
|
get when() {
|
|
71
71
|
return t.icon != null;
|
|
72
72
|
},
|
|
73
73
|
get fallback() {
|
|
74
74
|
return (() => {
|
|
75
|
-
var e =
|
|
76
|
-
return
|
|
75
|
+
var e = z(Ee);
|
|
76
|
+
return V(e, () => t.label), e;
|
|
77
77
|
})();
|
|
78
78
|
},
|
|
79
79
|
get children() {
|
|
80
|
-
var e =
|
|
81
|
-
return
|
|
80
|
+
var e = z(Ce), n = e.firstChild, r = n.nextSibling;
|
|
81
|
+
return V(n, () => t.icon), V(r, () => t.label), e;
|
|
82
82
|
}
|
|
83
|
-
}), a, o),
|
|
83
|
+
}), a, o), V(r, I(T, {
|
|
84
84
|
get when() {
|
|
85
|
-
return
|
|
85
|
+
return H(() => t.badge !== void 0)() && t.badge > 0;
|
|
86
86
|
},
|
|
87
87
|
get children() {
|
|
88
|
-
var n =
|
|
89
|
-
return
|
|
88
|
+
var n = z(we);
|
|
89
|
+
return V(n, () => t.badge), R(() => G(n, "aria-label", Oe(e.labels.badge, t.badge))), n;
|
|
90
90
|
}
|
|
91
|
-
}), c, l),
|
|
91
|
+
}), c, l), R((n) => {
|
|
92
92
|
var i = `${e.surface}.${t.id}`, a = t.href, o = De(e.activePath, t.href, t.active) ? "page" : void 0;
|
|
93
|
-
return i !== n.e &&
|
|
93
|
+
return i !== n.e && G(r, "data-nav", n.e = i), a !== n.t && G(r, "href", n.t = a), o !== n.a && G(r, "aria-current", n.a = o), n;
|
|
94
94
|
}, {
|
|
95
95
|
e: void 0,
|
|
96
96
|
t: void 0,
|
|
97
97
|
a: void 0
|
|
98
|
-
}),
|
|
98
|
+
}), W(), n;
|
|
99
99
|
})()
|
|
100
|
-
})),
|
|
100
|
+
})), R((e) => {
|
|
101
101
|
var r = t.collapsible ? "true" : void 0, i = !c();
|
|
102
|
-
return r !== e.e &&
|
|
102
|
+
return r !== e.e && G(n, "data-collapsible", e.e = r), i !== e.t && K(l, "hidden", e.t = i), e;
|
|
103
103
|
}, {
|
|
104
104
|
e: void 0,
|
|
105
105
|
t: void 0
|
|
106
106
|
}), n;
|
|
107
107
|
})();
|
|
108
108
|
}
|
|
109
|
-
})),
|
|
109
|
+
})), R(() => G(t, "aria-label", e.labels.nav)), t;
|
|
110
110
|
})();
|
|
111
111
|
}
|
|
112
|
-
|
|
112
|
+
L(["click"]);
|
|
113
113
|
//#endregion
|
|
114
114
|
//#region src/layout.tsx
|
|
115
115
|
var Ae = /*#__PURE__*/ q("<div class=\"dds-console-shell dds-layout\"><a class=\"dds-console-skip dds-visually-hidden\"></a><button class=dds-console-rail__toggle type=button data-action=toggle-rail><span aria-hidden=true></span><span class=dds-visually-hidden></span></button><div class=dds-console-rail__scrim></div><aside class=\"dds-console-rail dds-layout__navigation\"><!$><!/><!$><!/><!$><!/></aside><main class=\"dds-console-main dds-layout__main\"tabindex=-1><div class=dds-layout__content><!$><!/><!$><!/><!$><!/>"), je = /*#__PURE__*/ q("<header class=dds-layout__header>"), Me = /*#__PURE__*/ q("<footer class=dds-layout__footer>");
|
|
116
116
|
function Ne(e) {
|
|
117
|
-
let t =
|
|
117
|
+
let t = k(), n = `dds-console-rail-${t}`, r = `dds-console-main-${t}`, [i, a] = O(!1), [o, s] = O(!1), c, l;
|
|
118
118
|
function u() {
|
|
119
119
|
a(!1), c?.focus();
|
|
120
120
|
}
|
|
121
121
|
function d() {
|
|
122
122
|
return [c, ...Array.from(l?.querySelectorAll("a[href],button,summary,input,select,textarea,[tabindex=\"0\"]") ?? [])].filter((e) => !!e && !e.closest("[hidden]") && e.getClientRects().length > 0 && getComputedStyle(e).visibility !== "hidden" && !Array.from(l?.querySelectorAll("details:not([open])") ?? []).some((t) => t.contains(e) && !t.querySelector("summary")?.contains(e)) && !e.hasAttribute("disabled"));
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return N(() => {
|
|
125
125
|
if (s(!0), typeof window.matchMedia == "function") {
|
|
126
126
|
let e = window.matchMedia("(max-width: 56.25rem)"), t = () => {
|
|
127
127
|
e.matches || a(!1);
|
|
128
128
|
};
|
|
129
|
-
e.addEventListener("change", t),
|
|
129
|
+
e.addEventListener("change", t), M(() => e.removeEventListener("change", t));
|
|
130
130
|
}
|
|
131
131
|
function e(e) {
|
|
132
132
|
if (i() && (e.key === "Escape" && (e.preventDefault(), u()), e.key === "Tab")) {
|
|
@@ -134,35 +134,35 @@ function Ne(e) {
|
|
|
134
134
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
document.addEventListener("keydown", e),
|
|
137
|
+
document.addEventListener("keydown", e), M(() => document.removeEventListener("keydown", e));
|
|
138
138
|
}), (() => {
|
|
139
|
-
var t =
|
|
140
|
-
|
|
139
|
+
var t = z(Ae), s = t.firstChild, f = s.nextSibling, p = f.firstChild.nextSibling, m = f.nextSibling, h = m.nextSibling, ee = h.firstChild, [g, te] = B(ee.nextSibling), _ = g.nextSibling, [v, y] = B(_.nextSibling), b = v.nextSibling, [x, S] = B(b.nextSibling), C = h.nextSibling, w = C.firstChild, T = w.firstChild, [E, D] = B(T.nextSibling), ne = E.nextSibling, [O, k] = B(ne.nextSibling), A = O.nextSibling, [j, M] = B(A.nextSibling);
|
|
140
|
+
G(s, "href", `#${r}`), V(s, () => e.labels.skip), f.$$click = () => {
|
|
141
141
|
i() ? u() : (a(!0), queueMicrotask(() => d()[1]?.focus()));
|
|
142
142
|
};
|
|
143
|
-
var
|
|
144
|
-
typeof
|
|
145
|
-
var t =
|
|
143
|
+
var N = c;
|
|
144
|
+
typeof N == "function" ? J(N, f) : c = f, G(f, "aria-controls", n), V(p, (() => {
|
|
145
|
+
var t = H(() => !!i());
|
|
146
146
|
return () => t() ? e.labels.menuClose : e.labels.menuOpen;
|
|
147
|
-
})()),
|
|
147
|
+
})()), m.$$click = u, h.$$click = (e) => {
|
|
148
148
|
i() && e.target instanceof Element && e.target.closest("a[href]") && u();
|
|
149
149
|
};
|
|
150
|
-
var
|
|
151
|
-
return typeof
|
|
152
|
-
var t =
|
|
150
|
+
var P = l;
|
|
151
|
+
return typeof P == "function" ? J(P, h) : l = h, G(h, "id", n), V(h, () => e.railStart, g, te), V(h, () => e.navigation, v, y), V(h, () => e.railEnd, x, S), G(C, "id", r), V(w, (() => {
|
|
152
|
+
var t = H(() => !!e.header);
|
|
153
153
|
return () => t() && (() => {
|
|
154
|
-
var t =
|
|
155
|
-
return
|
|
154
|
+
var t = z(je);
|
|
155
|
+
return V(t, () => e.header), t;
|
|
156
156
|
})();
|
|
157
|
-
})(),
|
|
158
|
-
var t =
|
|
157
|
+
})(), E, D), V(w, () => e.children, O, k), V(w, (() => {
|
|
158
|
+
var t = H(() => !!e.footer);
|
|
159
159
|
return () => t() && (() => {
|
|
160
|
-
var t =
|
|
161
|
-
return
|
|
160
|
+
var t = z(Me);
|
|
161
|
+
return V(t, () => e.footer), t;
|
|
162
162
|
})();
|
|
163
|
-
})(),
|
|
163
|
+
})(), j, M), R((n) => {
|
|
164
164
|
var r = e.navigationPosition ?? "left", a = e.surface, s = o() ? "true" : void 0, c = i(), l = String(i()), u = String(i()), d = e.contentWidth ?? "workspace";
|
|
165
|
-
return r !== n.e &&
|
|
165
|
+
return r !== n.e && G(t, "data-navigation-position", n.e = r), a !== n.t && G(t, "data-surface", n.t = a), s !== n.a && G(t, "data-hydrated", n.a = s), c !== n.o && G(f, "aria-expanded", n.o = c), l !== n.i && G(m, "data-open", n.i = l), u !== n.n && G(h, "data-open", n.n = u), d !== n.s && G(w, "data-width", n.s = d), n;
|
|
166
166
|
}, {
|
|
167
167
|
e: void 0,
|
|
168
168
|
t: void 0,
|
|
@@ -171,15 +171,15 @@ function Ne(e) {
|
|
|
171
171
|
i: void 0,
|
|
172
172
|
n: void 0,
|
|
173
173
|
s: void 0
|
|
174
|
-
}),
|
|
174
|
+
}), W(), t;
|
|
175
175
|
})();
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
L(["click"]);
|
|
178
178
|
//#endregion
|
|
179
179
|
//#region src/console-shell.tsx
|
|
180
180
|
var Pe = /*#__PURE__*/ q("<a class=dds-console-rail__brand><img alt width=20 height=20><strong>"), Fe = /*#__PURE__*/ q("<dl class=dds-console-rail__context>"), Ie = /*#__PURE__*/ q("<div><dt></dt><dd>"), Le = /*#__PURE__*/ q("<div class=dds-console-rail__foot>"), Re = /*#__PURE__*/ q("<p class=dds-console-page-eyebrow>"), ze = /*#__PURE__*/ q("<div class=dds-console-page-header__actions>"), Be = /*#__PURE__*/ q("<div class=dds-console-page-header><div class=dds-console-page-header__text><!$><!/><h1></h1></div><!$><!/>");
|
|
181
181
|
function Ve(e) {
|
|
182
|
-
return
|
|
182
|
+
return I(Ne, {
|
|
183
183
|
get labels() {
|
|
184
184
|
return e.labels;
|
|
185
185
|
},
|
|
@@ -188,34 +188,34 @@ function Ve(e) {
|
|
|
188
188
|
},
|
|
189
189
|
get railStart() {
|
|
190
190
|
return [(() => {
|
|
191
|
-
var t =
|
|
192
|
-
return
|
|
191
|
+
var t = z(Pe), n = t.firstChild, r = n.nextSibling;
|
|
192
|
+
return V(r, () => e.brand.name), R((r) => {
|
|
193
193
|
var i = e.brand.href, a = e.brand.mark;
|
|
194
|
-
return i !== r.e &&
|
|
194
|
+
return i !== r.e && G(t, "href", r.e = i), a !== r.t && G(n, "src", r.t = a), r;
|
|
195
195
|
}, {
|
|
196
196
|
e: void 0,
|
|
197
197
|
t: void 0
|
|
198
198
|
}), t;
|
|
199
|
-
})(),
|
|
199
|
+
})(), I(T, {
|
|
200
200
|
get when() {
|
|
201
|
-
return
|
|
201
|
+
return H(() => !!e.context)() && e.context.length > 0;
|
|
202
202
|
},
|
|
203
203
|
get children() {
|
|
204
|
-
var t =
|
|
205
|
-
return
|
|
204
|
+
var t = z(Fe);
|
|
205
|
+
return V(t, I(w, {
|
|
206
206
|
get each() {
|
|
207
207
|
return e.context;
|
|
208
208
|
},
|
|
209
209
|
children: (e) => (() => {
|
|
210
|
-
var t =
|
|
211
|
-
return
|
|
210
|
+
var t = z(Ie), n = t.firstChild, r = n.nextSibling;
|
|
211
|
+
return V(n, () => e.label), V(r, () => e.value), t;
|
|
212
212
|
})()
|
|
213
213
|
})), t;
|
|
214
214
|
}
|
|
215
215
|
})];
|
|
216
216
|
},
|
|
217
217
|
get navigation() {
|
|
218
|
-
return e.navigation ??
|
|
218
|
+
return e.navigation ?? I(ke, {
|
|
219
219
|
get surface() {
|
|
220
220
|
return e.surface;
|
|
221
221
|
},
|
|
@@ -240,29 +240,29 @@ function Ve(e) {
|
|
|
240
240
|
});
|
|
241
241
|
},
|
|
242
242
|
get railEnd() {
|
|
243
|
-
return
|
|
244
|
-
var t =
|
|
245
|
-
return
|
|
243
|
+
return H(() => !!e.foot)() && (() => {
|
|
244
|
+
var t = z(Le);
|
|
245
|
+
return V(t, () => e.foot), t;
|
|
246
246
|
})();
|
|
247
247
|
},
|
|
248
248
|
get header() {
|
|
249
249
|
return (() => {
|
|
250
|
-
var t =
|
|
251
|
-
return
|
|
250
|
+
var t = z(Be), n = t.firstChild, r = n.firstChild, [i, a] = B(r.nextSibling), o = i.nextSibling, s = n.nextSibling, [c, l] = B(s.nextSibling);
|
|
251
|
+
return V(n, I(T, {
|
|
252
252
|
get when() {
|
|
253
253
|
return e.header.eyebrow;
|
|
254
254
|
},
|
|
255
255
|
get children() {
|
|
256
|
-
var t =
|
|
257
|
-
return
|
|
256
|
+
var t = z(Re);
|
|
257
|
+
return V(t, () => e.header.eyebrow), t;
|
|
258
258
|
}
|
|
259
|
-
}), i, a),
|
|
259
|
+
}), i, a), V(o, () => e.header.title), V(t, I(T, {
|
|
260
260
|
get when() {
|
|
261
261
|
return e.header.actions;
|
|
262
262
|
},
|
|
263
263
|
get children() {
|
|
264
|
-
var t =
|
|
265
|
-
return
|
|
264
|
+
var t = z(ze);
|
|
265
|
+
return V(t, () => e.header.actions), t;
|
|
266
266
|
}
|
|
267
267
|
}), c, l), t;
|
|
268
268
|
})();
|
|
@@ -284,7 +284,7 @@ var He = /*#__PURE__*/ q("<div>");
|
|
|
284
284
|
"[tabindex]:not([tabindex='-1'])"
|
|
285
285
|
].join(",");
|
|
286
286
|
function Ue(e) {
|
|
287
|
-
let t =
|
|
287
|
+
let t = k(), n = () => e.id ?? `dds-dialog-${t}`, [r, i] = O(), a = ce(() => ({
|
|
288
288
|
id: n(),
|
|
289
289
|
open: e.open,
|
|
290
290
|
defaultOpen: e.defaultOpen,
|
|
@@ -299,17 +299,17 @@ function Ue(e) {
|
|
|
299
299
|
trapFocus: !e.additionalFocusContainers,
|
|
300
300
|
preventScroll: !0,
|
|
301
301
|
role: e.role ?? "dialog",
|
|
302
|
-
persistentElements:
|
|
302
|
+
persistentElements: oe ? [] : e.additionalFocusContainers?.().filter((e) => !!e).map((e) => () => e),
|
|
303
303
|
ids: {
|
|
304
304
|
content: n(),
|
|
305
305
|
title: `${n()}-title`,
|
|
306
306
|
description: `${n()}-description`
|
|
307
307
|
}
|
|
308
|
-
})), o =
|
|
309
|
-
|
|
308
|
+
})), o = ne(() => a().open);
|
|
309
|
+
D(() => {
|
|
310
310
|
let t = r();
|
|
311
311
|
if (!o() || !e.additionalFocusContainers || !t) return;
|
|
312
|
-
let n = t.ownerDocument.activeElement, i, a, [s, c] =
|
|
312
|
+
let n = t.ownerDocument.activeElement, i, a, [s, c] = O(!1), l = () => [t, ...e.additionalFocusContainers().filter((e) => !!(e?.isConnected && e.ownerDocument === t.ownerDocument))], u = t.ownerDocument.defaultView.requestAnimationFrame(() => {
|
|
313
313
|
i = new ue(l(), {
|
|
314
314
|
document: t.ownerDocument,
|
|
315
315
|
escapeDeactivates: !1,
|
|
@@ -322,26 +322,26 @@ function Ue(e) {
|
|
|
322
322
|
setReturnFocus: () => e.finalFocus?.() ?? (n instanceof HTMLElement && n.isConnected ? n : !1)
|
|
323
323
|
}), c(!0), i.activate();
|
|
324
324
|
});
|
|
325
|
-
|
|
325
|
+
D(() => {
|
|
326
326
|
if (!s()) return;
|
|
327
327
|
let e = l();
|
|
328
328
|
i.updateContainerElements(e), a?.(), a = de(e, { defer: !1 });
|
|
329
|
-
}),
|
|
329
|
+
}), M(() => {
|
|
330
330
|
t.ownerDocument.defaultView.cancelAnimationFrame(u), a?.(), i?.deactivate({ returnFocus: e.restoreFocus !== !1 });
|
|
331
331
|
});
|
|
332
332
|
});
|
|
333
333
|
let s = (t, n) => c(e.unstyled ? void 0 : t, n), l = () => {
|
|
334
|
-
let t = le(), r = (n) =>
|
|
334
|
+
let t = le(), r = (n) => I(ie, U({ get component() {
|
|
335
335
|
return e.contentAs ?? "div";
|
|
336
336
|
} }, () => n({}), { ref: (e) => {
|
|
337
337
|
t().ref(e), i(e);
|
|
338
338
|
} }));
|
|
339
|
-
return
|
|
339
|
+
return I(Y.Positioner, {
|
|
340
340
|
get class() {
|
|
341
341
|
return s("dds-dialog-overlay", e.overlayClass);
|
|
342
342
|
},
|
|
343
343
|
get children() {
|
|
344
|
-
return
|
|
344
|
+
return I(Y.Content, U(() => e.contentProps, {
|
|
345
345
|
ref: i,
|
|
346
346
|
get class() {
|
|
347
347
|
return s("dds-dialog", e.class);
|
|
@@ -352,13 +352,13 @@ function Ue(e) {
|
|
|
352
352
|
},
|
|
353
353
|
"aria-modal": "true",
|
|
354
354
|
get "aria-describedby"() {
|
|
355
|
-
return
|
|
355
|
+
return H(() => !!e.description)() ? `${n()}-description` : void 0;
|
|
356
356
|
},
|
|
357
357
|
get children() {
|
|
358
358
|
return (() => {
|
|
359
359
|
let t = {
|
|
360
360
|
get title() {
|
|
361
|
-
return
|
|
361
|
+
return I(Y.Title, {
|
|
362
362
|
get class() {
|
|
363
363
|
return s("dds-dialog__title", e.titleClass);
|
|
364
364
|
},
|
|
@@ -368,7 +368,7 @@ function Ue(e) {
|
|
|
368
368
|
});
|
|
369
369
|
},
|
|
370
370
|
get description() {
|
|
371
|
-
return e.description &&
|
|
371
|
+
return e.description && I(Y.Description, {
|
|
372
372
|
get class() {
|
|
373
373
|
return s("dds-dialog__body", e.descriptionClass);
|
|
374
374
|
},
|
|
@@ -382,16 +382,16 @@ function Ue(e) {
|
|
|
382
382
|
},
|
|
383
383
|
get actions() {
|
|
384
384
|
return e.actions && (() => {
|
|
385
|
-
var t =
|
|
386
|
-
return
|
|
385
|
+
var t = z(He);
|
|
386
|
+
return V(t, () => e.actions), R(() => F(t, s("dds-dialog__actions", e.actionsClass))), t;
|
|
387
387
|
})();
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
return e.frame ? e.frame(t) : [
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
391
|
+
H(() => t.title),
|
|
392
|
+
H(() => t.description),
|
|
393
|
+
H(() => t.children),
|
|
394
|
+
H(() => t.actions)
|
|
395
395
|
];
|
|
396
396
|
})();
|
|
397
397
|
}
|
|
@@ -399,21 +399,21 @@ function Ue(e) {
|
|
|
399
399
|
}
|
|
400
400
|
});
|
|
401
401
|
};
|
|
402
|
-
return
|
|
402
|
+
return I(Y.RootProvider, {
|
|
403
403
|
value: a,
|
|
404
404
|
lazyMount: !0,
|
|
405
405
|
unmountOnExit: !0,
|
|
406
406
|
get children() {
|
|
407
|
-
return
|
|
407
|
+
return I(T, {
|
|
408
408
|
get when() {
|
|
409
409
|
return e.portal;
|
|
410
410
|
},
|
|
411
411
|
get fallback() {
|
|
412
|
-
return
|
|
412
|
+
return I(l, {});
|
|
413
413
|
},
|
|
414
414
|
get children() {
|
|
415
|
-
return
|
|
416
|
-
return
|
|
415
|
+
return I(ae, U(() => e.portalMount ? { mount: e.portalMount } : {}, { get children() {
|
|
416
|
+
return I(l, {});
|
|
417
417
|
} }));
|
|
418
418
|
}
|
|
419
419
|
});
|
|
@@ -424,7 +424,7 @@ function Ue(e) {
|
|
|
424
424
|
//#region src/radio-group.tsx
|
|
425
425
|
function We(e) {
|
|
426
426
|
let t = e.value ?? e.defaultValue;
|
|
427
|
-
return
|
|
427
|
+
return I(X.Root, {
|
|
428
428
|
get value() {
|
|
429
429
|
return e.value;
|
|
430
430
|
},
|
|
@@ -450,16 +450,16 @@ function We(e) {
|
|
|
450
450
|
return c("dds-radio-group", e.class);
|
|
451
451
|
},
|
|
452
452
|
get children() {
|
|
453
|
-
return [
|
|
453
|
+
return [I(X.Label, {
|
|
454
454
|
class: "dds-field__label",
|
|
455
455
|
get children() {
|
|
456
456
|
return e.label;
|
|
457
457
|
}
|
|
458
|
-
}),
|
|
458
|
+
}), I(w, {
|
|
459
459
|
get each() {
|
|
460
460
|
return e.options;
|
|
461
461
|
},
|
|
462
|
-
children: (e) =>
|
|
462
|
+
children: (e) => I(X.Item, {
|
|
463
463
|
get value() {
|
|
464
464
|
return e.value;
|
|
465
465
|
},
|
|
@@ -468,13 +468,13 @@ function We(e) {
|
|
|
468
468
|
},
|
|
469
469
|
class: "dds-check",
|
|
470
470
|
get children() {
|
|
471
|
-
return [
|
|
471
|
+
return [I(X.ItemHiddenInput, {
|
|
472
472
|
class: "dds-check__input",
|
|
473
473
|
style: {},
|
|
474
474
|
ref: (n) => {
|
|
475
475
|
n.defaultChecked = t === e.value;
|
|
476
476
|
}
|
|
477
|
-
}),
|
|
477
|
+
}), I(X.ItemText, { get children() {
|
|
478
478
|
return e.label;
|
|
479
479
|
} })];
|
|
480
480
|
}
|
|
@@ -487,7 +487,7 @@ function We(e) {
|
|
|
487
487
|
//#region src/icon.tsx
|
|
488
488
|
var Ge = /*#__PURE__*/ q("<svg><!$><!/><g>"), Ke = /*#__PURE__*/ q("<title>");
|
|
489
489
|
function qe(e) {
|
|
490
|
-
let [t, n] =
|
|
490
|
+
let [t, n] = P(e, [
|
|
491
491
|
"name",
|
|
492
492
|
"label",
|
|
493
493
|
"size",
|
|
@@ -495,8 +495,8 @@ function qe(e) {
|
|
|
495
495
|
"class"
|
|
496
496
|
]), r = () => pe[t.name], i = () => t.directional ?? fe.mirrorInRtl.includes(t.name);
|
|
497
497
|
return (() => {
|
|
498
|
-
var e =
|
|
499
|
-
return se(e,
|
|
498
|
+
var e = z(Ge), a = e.firstChild, [o, s] = B(a.nextSibling), l = o.nextSibling;
|
|
499
|
+
return se(e, U(n, {
|
|
500
500
|
get class() {
|
|
501
501
|
return c(i() && fe.cssClass, t.class);
|
|
502
502
|
},
|
|
@@ -525,22 +525,22 @@ function qe(e) {
|
|
|
525
525
|
get "aria-hidden"() {
|
|
526
526
|
return t.label ? void 0 : "true";
|
|
527
527
|
}
|
|
528
|
-
}), !0, !0),
|
|
529
|
-
var e =
|
|
528
|
+
}), !0, !0), V(e, (() => {
|
|
529
|
+
var e = H(() => !!t.label);
|
|
530
530
|
return () => e() && (() => {
|
|
531
|
-
var e =
|
|
532
|
-
return
|
|
531
|
+
var e = z(Ke);
|
|
532
|
+
return V(e, () => t.label), e;
|
|
533
533
|
})();
|
|
534
|
-
})(), o, s),
|
|
534
|
+
})(), o, s), R(() => K(l, "innerHTML", r().body)), W(), e;
|
|
535
535
|
})();
|
|
536
536
|
}
|
|
537
537
|
//#endregion
|
|
538
538
|
//#region src/pending-action.ts
|
|
539
539
|
function Je() {
|
|
540
|
-
let [e, t] =
|
|
540
|
+
let [e, t] = O(null), n = null, r = !1, i = () => {
|
|
541
541
|
n?.abort(), n = null;
|
|
542
542
|
};
|
|
543
|
-
return
|
|
543
|
+
return A() && M(() => {
|
|
544
544
|
r = !0, i();
|
|
545
545
|
}), {
|
|
546
546
|
current: e,
|
|
@@ -578,24 +578,24 @@ function Ze(e) {
|
|
|
578
578
|
text: t
|
|
579
579
|
};
|
|
580
580
|
};
|
|
581
|
-
return
|
|
581
|
+
return I(T, {
|
|
582
582
|
get when() {
|
|
583
583
|
return a() || !t.has(n.domain);
|
|
584
584
|
},
|
|
585
585
|
get fallback() {
|
|
586
586
|
return (() => {
|
|
587
|
-
var e =
|
|
588
|
-
return
|
|
587
|
+
var e = z(Ye);
|
|
588
|
+
return V(e, () => n.value), R(() => G(e, "data-status", `${n.domain}.${n.value}`)), e;
|
|
589
589
|
})();
|
|
590
590
|
},
|
|
591
591
|
get children() {
|
|
592
592
|
return (() => {
|
|
593
593
|
let e = o();
|
|
594
594
|
return (() => {
|
|
595
|
-
var t =
|
|
596
|
-
return
|
|
595
|
+
var t = z(Xe);
|
|
596
|
+
return V(t, () => e.text), R((r) => {
|
|
597
597
|
var i = e.tone === "neutral" ? "dds-badge" : `dds-badge dds-badge--${e.tone}`, a = `${n.domain}.${n.value}`, o = e.tone;
|
|
598
|
-
return i !== r.e &&
|
|
598
|
+
return i !== r.e && F(t, r.e = i), a !== r.t && G(t, "data-status", r.t = a), o !== r.a && G(t, "data-tone", r.a = o), r;
|
|
599
599
|
}, {
|
|
600
600
|
e: void 0,
|
|
601
601
|
t: void 0,
|
|
@@ -610,15 +610,15 @@ function Ze(e) {
|
|
|
610
610
|
//#endregion
|
|
611
611
|
//#region src/tabs.tsx
|
|
612
612
|
function Qe(e) {
|
|
613
|
-
let t =
|
|
613
|
+
let t = k(), n = () => e.id ?? `dds-tabs-${t}`, r, i = l(() => r, () => e.dir), a = e.asChild ? (t) => e.asChild(j(t({}), { ref: (e) => {
|
|
614
614
|
r = e;
|
|
615
615
|
} })) : void 0;
|
|
616
|
-
return
|
|
616
|
+
return I(he, {
|
|
617
617
|
get locale() {
|
|
618
618
|
return i() === "rtl" ? "ar" : "en";
|
|
619
619
|
},
|
|
620
620
|
get children() {
|
|
621
|
-
return
|
|
621
|
+
return I(Z.Root, U({
|
|
622
622
|
ref(e) {
|
|
623
623
|
var t = r;
|
|
624
624
|
typeof t == "function" ? t(e) : r = e;
|
|
@@ -657,12 +657,12 @@ function Qe(e) {
|
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
659
|
function $e(e) {
|
|
660
|
-
let [t, n] =
|
|
660
|
+
let [t, n] = P(e, [
|
|
661
661
|
"class",
|
|
662
662
|
"children",
|
|
663
663
|
"unstyled"
|
|
664
664
|
]);
|
|
665
|
-
return
|
|
665
|
+
return I(Z.List, U(n, {
|
|
666
666
|
get class() {
|
|
667
667
|
return c(!t.unstyled && "dds-tabs", t.class);
|
|
668
668
|
},
|
|
@@ -672,14 +672,14 @@ function $e(e) {
|
|
|
672
672
|
}));
|
|
673
673
|
}
|
|
674
674
|
function et(e) {
|
|
675
|
-
let [t, n] =
|
|
675
|
+
let [t, n] = P(e, [
|
|
676
676
|
"class",
|
|
677
677
|
"children",
|
|
678
678
|
"value",
|
|
679
679
|
"unstyled",
|
|
680
680
|
"asChild"
|
|
681
|
-
]), r = t.asChild ? (n) => t.asChild(
|
|
682
|
-
return
|
|
681
|
+
]), r = t.asChild ? (n) => t.asChild(j(n({}), { ref: e.ref })) : void 0;
|
|
682
|
+
return I(Z.Trigger, U(n, {
|
|
683
683
|
get value() {
|
|
684
684
|
return t.value;
|
|
685
685
|
},
|
|
@@ -691,7 +691,7 @@ function et(e) {
|
|
|
691
691
|
} }));
|
|
692
692
|
}
|
|
693
693
|
function tt(e) {
|
|
694
|
-
let [t, n] =
|
|
694
|
+
let [t, n] = P(e, [
|
|
695
695
|
"value",
|
|
696
696
|
"children",
|
|
697
697
|
"style"
|
|
@@ -699,7 +699,7 @@ function tt(e) {
|
|
|
699
699
|
...t.style,
|
|
700
700
|
display: "none"
|
|
701
701
|
} : t.style;
|
|
702
|
-
return
|
|
702
|
+
return I(Z.Content, U(n, {
|
|
703
703
|
get value() {
|
|
704
704
|
return t.value;
|
|
705
705
|
},
|
|
@@ -719,9 +719,9 @@ function tt(e) {
|
|
|
719
719
|
}
|
|
720
720
|
//#endregion
|
|
721
721
|
//#region src/toast.tsx
|
|
722
|
-
var nt =
|
|
723
|
-
function
|
|
724
|
-
let t =
|
|
722
|
+
var nt = /*#__PURE__*/ q("<span class=dds-spinner aria-hidden=true>"), rt = E();
|
|
723
|
+
function it(e) {
|
|
724
|
+
let t = k(), n, r, i = () => r ??= new Proxy(n?.ownerDocument ?? document, { get(e, t) {
|
|
725
725
|
if (t === "getElementById") return (t) => t === "toast-group:bottom-end" ? n ?? null : e.getElementById(t);
|
|
726
726
|
let r = Reflect.get(e, t, e);
|
|
727
727
|
return typeof r == "function" ? r.bind(e) : r;
|
|
@@ -734,27 +734,89 @@ function rt(e) {
|
|
|
734
734
|
hotkey: ["DDS_NO_HOTKEY"],
|
|
735
735
|
max: 2 ** 53 - 1,
|
|
736
736
|
pauseOnPageIdle: !0
|
|
737
|
-
}), o = 0, s = {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
737
|
+
}), o = 0, s = !1, l = /* @__PURE__ */ new Map(), u = (e) => !s && l.get(e.id) === e && a.isVisible(e.id), d = (e) => {
|
|
738
|
+
l.delete(e), a.remove(e);
|
|
739
|
+
}, f = (t) => {
|
|
740
|
+
let n = t.duration ?? e.defaultDuration ?? 5e3;
|
|
741
|
+
return {
|
|
742
|
+
id: t.id,
|
|
743
|
+
description: t.message,
|
|
744
|
+
type: t.tone === "danger" ? "error" : t.tone ?? "info",
|
|
745
|
+
duration: t.tone === "loading" || n <= 0 ? Infinity : n,
|
|
746
|
+
meta: { dds: t },
|
|
747
|
+
action: t.action ? {
|
|
748
|
+
label: t.action.label,
|
|
749
|
+
onClick: () => {
|
|
750
|
+
u(t) && (d(t.id), t.action?.onClick());
|
|
751
|
+
}
|
|
752
|
+
} : void 0,
|
|
753
|
+
onStatusChange: ({ status: e }) => {
|
|
754
|
+
e !== "visible" && l.get(t.id) === t && l.delete(t.id);
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
}, p = (e, t) => {
|
|
758
|
+
if (!u(e)) return;
|
|
759
|
+
let n = {
|
|
760
|
+
...t,
|
|
761
|
+
id: e.id
|
|
762
|
+
};
|
|
763
|
+
l.set(e.id, n), a.update(e.id, f(n));
|
|
764
|
+
}, m = (e) => {
|
|
765
|
+
let n = `dds-toast-${t}-${++o}`;
|
|
766
|
+
if (!s) {
|
|
767
|
+
let t = {
|
|
768
|
+
...e,
|
|
769
|
+
id: n
|
|
770
|
+
};
|
|
771
|
+
l.set(n, t), a.create(f(t));
|
|
772
|
+
}
|
|
773
|
+
return n;
|
|
774
|
+
}, h = {
|
|
775
|
+
show: m,
|
|
776
|
+
loading: (e) => m({
|
|
777
|
+
...e,
|
|
778
|
+
tone: "loading"
|
|
779
|
+
}),
|
|
780
|
+
update(e, t) {
|
|
781
|
+
let n = l.get(e);
|
|
782
|
+
n && p(n, {
|
|
783
|
+
...n,
|
|
784
|
+
...t
|
|
785
|
+
});
|
|
786
|
+
},
|
|
787
|
+
promise(e, t) {
|
|
788
|
+
let n = h.loading(t.loading), r = l.get(n), i = (e, t, i) => {
|
|
789
|
+
if (!(!r || !u(r))) try {
|
|
790
|
+
let n = typeof e == "function" ? e(t) : e;
|
|
791
|
+
p(r, {
|
|
792
|
+
...r,
|
|
793
|
+
...n,
|
|
794
|
+
tone: n.tone ?? i
|
|
795
|
+
});
|
|
796
|
+
} catch {
|
|
797
|
+
u(r) && d(n);
|
|
798
|
+
}
|
|
799
|
+
}, a = Promise.resolve().then(() => typeof e == "function" ? e() : e).then((e) => (i(t.success, e, "success"), e), (e) => {
|
|
800
|
+
throw i(t.error, e, "danger"), e;
|
|
801
|
+
});
|
|
802
|
+
return Object.defineProperty(a, "id", {
|
|
803
|
+
value: n,
|
|
804
|
+
enumerable: !0
|
|
805
|
+
});
|
|
750
806
|
},
|
|
751
|
-
dismiss: (e) =>
|
|
752
|
-
|
|
807
|
+
dismiss: (e) => {
|
|
808
|
+
s || d(e);
|
|
809
|
+
},
|
|
810
|
+
clear: () => {
|
|
811
|
+
l.clear(), a.remove();
|
|
812
|
+
}
|
|
753
813
|
};
|
|
754
|
-
return
|
|
755
|
-
|
|
814
|
+
return M(() => {
|
|
815
|
+
s = !0, h.clear();
|
|
816
|
+
}), I(rt.Provider, {
|
|
817
|
+
value: h,
|
|
756
818
|
get children() {
|
|
757
|
-
return [
|
|
819
|
+
return [H(() => e.children), I(ge, {
|
|
758
820
|
toaster: a,
|
|
759
821
|
ref(e) {
|
|
760
822
|
var t = n;
|
|
@@ -773,23 +835,34 @@ function rt(e) {
|
|
|
773
835
|
},
|
|
774
836
|
children: (t) => {
|
|
775
837
|
let n = () => t().meta?.dds;
|
|
776
|
-
return
|
|
838
|
+
return I(Q.Root, {
|
|
777
839
|
get class() {
|
|
778
|
-
return c("dds-toast", `dds-toast--${n().tone ?? "info"}
|
|
840
|
+
return c("dds-toast", `dds-toast--${n().tone ?? "info"}`, n().action && "dds-toast--action");
|
|
779
841
|
},
|
|
780
842
|
get role() {
|
|
781
843
|
return n().tone === "danger" ? "alert" : "status";
|
|
782
844
|
},
|
|
783
845
|
get children() {
|
|
784
|
-
return [
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
846
|
+
return [
|
|
847
|
+
H(() => H(() => n().tone === "loading")() && z(nt)),
|
|
848
|
+
I(Q.Description, { get children() {
|
|
849
|
+
return t().description;
|
|
850
|
+
} }),
|
|
851
|
+
H(() => H(() => !!n().action)() && I(Q.ActionTrigger, {
|
|
852
|
+
class: "dds-btn dds-btn--secondary dds-btn--sm dds-toast__action",
|
|
853
|
+
type: "button",
|
|
854
|
+
get children() {
|
|
855
|
+
return n().action?.label;
|
|
856
|
+
}
|
|
857
|
+
})),
|
|
858
|
+
H(() => H(() => !!e.dismissLabel)() && I(Q.CloseTrigger, {
|
|
859
|
+
class: "dds-iconbtn dds-iconbtn--sm",
|
|
860
|
+
get "aria-label"() {
|
|
861
|
+
return H(() => typeof e.dismissLabel == "function")() ? e.dismissLabel(n()) : e.dismissLabel;
|
|
862
|
+
},
|
|
863
|
+
children: "×"
|
|
864
|
+
}))
|
|
865
|
+
];
|
|
793
866
|
}
|
|
794
867
|
});
|
|
795
868
|
}
|
|
@@ -797,16 +870,16 @@ function rt(e) {
|
|
|
797
870
|
}
|
|
798
871
|
});
|
|
799
872
|
}
|
|
800
|
-
function
|
|
801
|
-
let e =
|
|
873
|
+
function at() {
|
|
874
|
+
let e = re(rt);
|
|
802
875
|
if (!e) throw Error("useToast must be called inside <ToastProvider>");
|
|
803
876
|
return e;
|
|
804
877
|
}
|
|
805
878
|
//#endregion
|
|
806
879
|
//#region src/tooltip.tsx
|
|
807
|
-
var
|
|
808
|
-
function
|
|
809
|
-
let t =
|
|
880
|
+
var ot = /*#__PURE__*/ q("<span><!$><!/><!$><!/>");
|
|
881
|
+
function st(e) {
|
|
882
|
+
let t = k(), n = () => e.id ?? `dds-tooltip-${t}`, [i, a] = r({
|
|
810
883
|
value: () => e.open,
|
|
811
884
|
defaultValue: e.defaultOpen ?? !1,
|
|
812
885
|
onChange: (t) => e.onOpenChange?.(t)
|
|
@@ -818,14 +891,14 @@ function ot(e) {
|
|
|
818
891
|
openDelay: 0,
|
|
819
892
|
closeDelay: 0
|
|
820
893
|
}));
|
|
821
|
-
return
|
|
894
|
+
return I($.RootProvider, {
|
|
822
895
|
value: o,
|
|
823
896
|
lazyMount: !1,
|
|
824
897
|
unmountOnExit: !1,
|
|
825
898
|
get children() {
|
|
826
|
-
var t =
|
|
827
|
-
return
|
|
828
|
-
let [, r] =
|
|
899
|
+
var t = z(ot), r = t.firstChild, [i, a] = B(r.nextSibling), s = i.nextSibling, [l, u] = B(s.nextSibling);
|
|
900
|
+
return V(t, I($.Trigger, { asChild: (t) => {
|
|
901
|
+
let [, r] = P(t(), ["onFocusIn", "onFocusOut"]);
|
|
829
902
|
return e.children({
|
|
830
903
|
...r,
|
|
831
904
|
"aria-describedby": n(),
|
|
@@ -834,77 +907,77 @@ function ot(e) {
|
|
|
834
907
|
onPointerEnter: () => o().setOpen(!0),
|
|
835
908
|
onPointerLeave: () => o().setOpen(!1)
|
|
836
909
|
});
|
|
837
|
-
} }), i, a),
|
|
838
|
-
return
|
|
910
|
+
} }), i, a), V(t, I($.Positioner, { get children() {
|
|
911
|
+
return I($.Content, {
|
|
839
912
|
class: "dds-tooltip__bubble",
|
|
840
913
|
get children() {
|
|
841
914
|
return e.content;
|
|
842
915
|
}
|
|
843
916
|
});
|
|
844
|
-
} }), l, u),
|
|
917
|
+
} }), l, u), R(() => F(t, c("dds-tooltip", e.class))), t;
|
|
845
918
|
}
|
|
846
919
|
});
|
|
847
920
|
}
|
|
848
921
|
//#endregion
|
|
849
922
|
//#region src/top-nav.tsx
|
|
850
|
-
var
|
|
851
|
-
function
|
|
923
|
+
var ct = /*#__PURE__*/ q("<nav class=dds-top-nav>"), lt = /*#__PURE__*/ q("<details class=dds-top-nav__group><summary class=dds-top-nav__trigger></summary><ul class=dds-top-nav__items>"), ut = /*#__PURE__*/ q("<li><a class=dds-top-nav__item><!$><!/><span></span><!$><!/>"), dt = /*#__PURE__*/ q("<span class=dds-top-nav__item-icon aria-hidden=true>"), ft = /*#__PURE__*/ q("<span class=dds-console-rail__badge>");
|
|
924
|
+
function pt(e) {
|
|
852
925
|
let t;
|
|
853
|
-
return
|
|
926
|
+
return N(() => {
|
|
854
927
|
let e = (e) => {
|
|
855
928
|
t?.contains(e.target) || t?.querySelectorAll("details[open]").forEach((e) => e.removeAttribute("open"));
|
|
856
929
|
};
|
|
857
|
-
document.addEventListener("pointerdown", e),
|
|
930
|
+
document.addEventListener("pointerdown", e), M(() => document.removeEventListener("pointerdown", e));
|
|
858
931
|
}), (() => {
|
|
859
|
-
var n =
|
|
932
|
+
var n = z(ct);
|
|
860
933
|
n.$$keydown = (e) => {
|
|
861
934
|
if (e.key !== "Escape") return;
|
|
862
935
|
let t = e.target.closest("details");
|
|
863
936
|
t?.open && (e.preventDefault(), e.stopPropagation(), t.open = !1, t.querySelector("summary")?.focus());
|
|
864
937
|
};
|
|
865
938
|
var r = t;
|
|
866
|
-
return typeof r == "function" ? J(r, n) : t = n,
|
|
939
|
+
return typeof r == "function" ? J(r, n) : t = n, V(n, I(w, {
|
|
867
940
|
get each() {
|
|
868
941
|
return e.nav;
|
|
869
942
|
},
|
|
870
943
|
children: (t) => (() => {
|
|
871
|
-
var n =
|
|
872
|
-
return
|
|
944
|
+
var n = z(lt), r = n.firstChild, i = r.nextSibling;
|
|
945
|
+
return V(r, () => t.label), V(i, I(w, {
|
|
873
946
|
get each() {
|
|
874
947
|
return t.items;
|
|
875
948
|
},
|
|
876
949
|
children: (t) => (() => {
|
|
877
|
-
var n =
|
|
950
|
+
var n = z(ut), r = n.firstChild, i = r.firstChild, [a, o] = B(i.nextSibling), s = a.nextSibling, c = s.nextSibling, [l, u] = B(c.nextSibling);
|
|
878
951
|
return r.$$click = (t) => {
|
|
879
952
|
t.currentTarget.closest("details")?.removeAttribute("open"), e.onNavigate?.();
|
|
880
|
-
},
|
|
881
|
-
var e =
|
|
953
|
+
}, V(r, (() => {
|
|
954
|
+
var e = H(() => t.icon != null);
|
|
882
955
|
return () => e() && (() => {
|
|
883
|
-
var e =
|
|
884
|
-
return
|
|
956
|
+
var e = z(dt);
|
|
957
|
+
return V(e, () => t.icon), e;
|
|
885
958
|
})();
|
|
886
|
-
})(), a, o),
|
|
887
|
-
var n =
|
|
959
|
+
})(), a, o), V(s, () => t.label), V(r, (() => {
|
|
960
|
+
var n = H(() => t.badge != null && t.badge > 0);
|
|
888
961
|
return () => n() && (() => {
|
|
889
|
-
var n =
|
|
890
|
-
return
|
|
962
|
+
var n = z(ft);
|
|
963
|
+
return V(n, () => t.badge), R(() => G(n, "aria-label", e.labels.badge.replace("{count}", () => String(t.badge)))), n;
|
|
891
964
|
})();
|
|
892
|
-
})(), l, u),
|
|
965
|
+
})(), l, u), R((n) => {
|
|
893
966
|
var i = `${e.surface}.${t.id}`, a = t.href, o = t.active ?? (e.activePath === t.href || t.href.split("/").filter(Boolean).length > 1 && e.activePath.startsWith(`${t.href}/`)) ? "page" : void 0;
|
|
894
|
-
return i !== n.e &&
|
|
967
|
+
return i !== n.e && G(r, "data-nav", n.e = i), a !== n.t && G(r, "href", n.t = a), o !== n.a && G(r, "aria-current", n.a = o), n;
|
|
895
968
|
}, {
|
|
896
969
|
e: void 0,
|
|
897
970
|
t: void 0,
|
|
898
971
|
a: void 0
|
|
899
|
-
}),
|
|
972
|
+
}), W(), n;
|
|
900
973
|
})()
|
|
901
974
|
})), n;
|
|
902
975
|
})()
|
|
903
|
-
})),
|
|
976
|
+
})), R(() => G(n, "aria-label", e.labels.nav)), W(), n;
|
|
904
977
|
})();
|
|
905
978
|
}
|
|
906
|
-
|
|
979
|
+
L(["keydown", "click"]);
|
|
907
980
|
//#endregion
|
|
908
|
-
export { i as Button,
|
|
981
|
+
export { i as Button, v as Calendar, o as Checkbox, ee as Combobox, Ve as ConsoleShell, u as DatePicker, f as DateRangePicker, Ue as Dialog, te as DropdownMenu, n as Field, qe as Icon, e as IconButton, m as Input, h as InputGroup, Ne as Layout, ke as LeftNav, p as MonthPicker, x as NumberInput, _ as Popover, a as Radio, We as RadioGroup, y as SegmentedControl, s as Select, g as SelectPicker, t as Switch, et as Tab, $e as TabList, tt as TabPanel, Qe as Tabs, d as TimePicker, it as ToastProvider, st as Tooltip, pt as TopNav, r as createControllableSignal, Je as createPendingAction, Ze as createStatusPill, S as normalizeNumberText, C as numberInputMessages, at as useToast, b as validateSegmentedItems };
|
|
909
982
|
|
|
910
983
|
//# sourceMappingURL=index.js.map
|