@devslab/dds-solid 0.28.0 → 0.29.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 +25 -0
- package/README.md +25 -0
- package/dist/console-shell.d.ts +12 -1
- package/dist/console-shell.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +391 -197
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +19 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/left-nav.d.ts +14 -0
- package/dist/left-nav.d.ts.map +1 -0
- package/dist/server.js +310 -110
- package/dist/server.js.map +1 -1
- package/dist/top-nav.d.ts +5 -0
- package/dist/top-nav.d.ts.map +1 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4,126 +4,165 @@ 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
|
|
10
|
-
import { SelectPicker as
|
|
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
|
|
18
|
-
import { Dialog as Y, useDialog as
|
|
19
|
-
import { usePresenceContext as
|
|
20
|
-
import { FocusTrap as
|
|
21
|
-
import { ariaHidden as
|
|
7
|
+
import { MonthPicker as ee } from "./month-picker.js";
|
|
8
|
+
import { Input as p, InputGroup as m } from "./input.js";
|
|
9
|
+
import { Combobox as h } from "./combobox.js";
|
|
10
|
+
import { SelectPicker as g } from "./select-picker.js";
|
|
11
|
+
import { DropdownMenu as _ } from "./dropdown-menu.js";
|
|
12
|
+
import { Popover as v } from "./popover.js";
|
|
13
|
+
import { Calendar as y } from "./calendar.js";
|
|
14
|
+
import { SegmentedControl as b, validateSegmentedItems as x } from "./segmented-control.js";
|
|
15
|
+
import { NumberInput as S, normalizeNumberText as C, numberInputMessages as w } from "./number-input.js";
|
|
16
|
+
import { For as T, Show as E, createContext as D, createEffect as O, createMemo as te, createSignal as k, createUniqueId as A, getOwner as j, mergeProps as M, onCleanup as N, onMount as P, splitProps as F, useContext as ne } from "solid-js";
|
|
17
|
+
import { Dynamic as re, Portal as ie, className as I, createComponent as L, delegateEvents as R, effect as z, getNextElement as B, getNextMarker as V, insert as H, isServer as ae, memo as U, mergeProps as W, runHydrationEvents as G, setAttribute as K, setProperty as oe, spread as se, template as q, use as J } from "solid-js/web";
|
|
18
|
+
import { Dialog as Y, useDialog as ce } from "@ark-ui/solid/dialog";
|
|
19
|
+
import { usePresenceContext as le } from "@ark-ui/solid/presence";
|
|
20
|
+
import { FocusTrap as ue } from "@zag-js/focus-trap";
|
|
21
|
+
import { ariaHidden as de } from "@zag-js/aria-hidden";
|
|
22
22
|
import { RadioGroup as X } from "@ark-ui/solid/radio-group";
|
|
23
|
-
import { directionPolicy as
|
|
24
|
-
import { Tabs as Z, useTabsContext as
|
|
25
|
-
import { LocaleProvider as
|
|
26
|
-
import { Toast as Q, Toaster as
|
|
27
|
-
import { space as
|
|
28
|
-
import { Tooltip as $, useTooltip as
|
|
29
|
-
//#region src/
|
|
30
|
-
var
|
|
31
|
-
function
|
|
23
|
+
import { directionPolicy as fe, icons as pe } from "@devslab/dds-icons";
|
|
24
|
+
import { Tabs as Z, useTabsContext as me } from "@ark-ui/solid/tabs";
|
|
25
|
+
import { LocaleProvider as he } from "@ark-ui/solid/locale";
|
|
26
|
+
import { Toast as Q, Toaster as ge, createToaster as _e } from "@ark-ui/solid/toast";
|
|
27
|
+
import { space as ve } from "@devslab/dds-tokens";
|
|
28
|
+
import { Tooltip as $, useTooltip as ye } from "@ark-ui/solid/tooltip";
|
|
29
|
+
//#region src/left-nav.tsx
|
|
30
|
+
var be = /*#__PURE__*/ q("<nav class=\"dds-console-rail__nav dds-left-nav\">"), xe = /*#__PURE__*/ q("<button type=button class=dds-console-rail__group-toggle><span></span><span class=dds-console-rail__chevron aria-hidden=true>"), Se = /*#__PURE__*/ q("<section class=dds-console-rail__group><h2 class=dds-console-rail__group-label></h2><ul>"), Ce = /*#__PURE__*/ q("<span class=dds-console-rail__item-content><span class=dds-console-rail__item-icon aria-hidden=true></span><span>"), we = /*#__PURE__*/ q("<span class=dds-console-rail__badge>"), Te = /*#__PURE__*/ q("<li><a class=dds-console-rail__item><!$><!/><!$><!/>"), Ee = /*#__PURE__*/ q("<span>");
|
|
31
|
+
function De(e, t, n) {
|
|
32
32
|
return n === void 0 ? t.split("/").filter(Boolean).length <= 1 ? e === t : e === t || e.startsWith(`${t}/`) : n;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Oe(e, t) {
|
|
35
35
|
return e.replace("{count}", () => String(t));
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
let [t, n] =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}), (() => {
|
|
46
|
-
var a = V(Ce), o = a.firstChild, s = o.nextSibling, c = s.firstChild.nextSibling, l = s.nextSibling, u = l.nextSibling, d = u.firstChild, f = d.firstChild, p = f.nextSibling, m = d.nextSibling, [h, g] = H(m.nextSibling), _ = h.nextSibling, v = _.nextSibling, [y, b] = H(v.nextSibling), x = u.nextSibling, S = x.firstChild, C = S.firstChild, w = C.firstChild, [T, O] = H(w.nextSibling), k = T.nextSibling, A = C.nextSibling, [j, N] = H(A.nextSibling), P = S.nextSibling, [F, I] = H(P.nextSibling);
|
|
47
|
-
return U(o, () => e.labels.skip), s.$$click = () => n(!t()), U(c, (() => {
|
|
48
|
-
var n = W(() => !!t());
|
|
49
|
-
return () => n() ? e.labels.menuClose : e.labels.menuOpen;
|
|
50
|
-
})()), l.$$click = r, U(p, () => e.brand.name), U(u, z(D, {
|
|
51
|
-
get when() {
|
|
52
|
-
return W(() => !!e.context)() && e.context.length > 0;
|
|
53
|
-
},
|
|
54
|
-
get children() {
|
|
55
|
-
var t = V(ye);
|
|
56
|
-
return U(t, z(E, {
|
|
57
|
-
get each() {
|
|
58
|
-
return e.context;
|
|
59
|
-
},
|
|
60
|
-
children: (e) => (() => {
|
|
61
|
-
var t = V(we), n = t.firstChild, r = n.nextSibling;
|
|
62
|
-
return U(n, () => e.label), U(r, () => e.value), t;
|
|
63
|
-
})()
|
|
64
|
-
})), t;
|
|
65
|
-
}
|
|
66
|
-
}), h, g), U(_, z(E, {
|
|
37
|
+
function ke(e) {
|
|
38
|
+
let [t, n] = k(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
|
+
let i = r().includes(t) ? r().filter((e) => e !== t) : [...r(), t];
|
|
40
|
+
e.expandedGroups === void 0 && n(i), e.onExpandedGroupsChange?.(i);
|
|
41
|
+
};
|
|
42
|
+
return (() => {
|
|
43
|
+
var t = B(be);
|
|
44
|
+
return H(t, L(T, {
|
|
67
45
|
get each() {
|
|
68
46
|
return e.nav;
|
|
69
47
|
},
|
|
70
|
-
children: (t) => {
|
|
71
|
-
let
|
|
48
|
+
children: (t, n) => {
|
|
49
|
+
let a = `dds-console-group-${A()}`, o = `${a}-items`, s = () => t.id ?? `group-${n()}`, c = () => !t.collapsible || r().includes(s());
|
|
72
50
|
return (() => {
|
|
73
|
-
var
|
|
74
|
-
return
|
|
51
|
+
var n = B(Se), r = n.firstChild, l = r.nextSibling;
|
|
52
|
+
return K(n, "aria-labelledby", a), K(r, "id", a), H(r, L(E, {
|
|
53
|
+
get when() {
|
|
54
|
+
return t.collapsible;
|
|
55
|
+
},
|
|
56
|
+
get fallback() {
|
|
57
|
+
return t.label;
|
|
58
|
+
},
|
|
59
|
+
get children() {
|
|
60
|
+
var e = B(xe), n = e.firstChild;
|
|
61
|
+
return e.$$click = () => i(s()), K(e, "aria-controls", o), H(n, () => t.label), z(() => K(e, "aria-expanded", c())), G(), e;
|
|
62
|
+
}
|
|
63
|
+
})), K(l, "id", o), H(l, L(T, {
|
|
75
64
|
get each() {
|
|
76
65
|
return t.items;
|
|
77
66
|
},
|
|
78
67
|
children: (t) => (() => {
|
|
79
|
-
var n =
|
|
80
|
-
return
|
|
68
|
+
var n = B(Te), r = n.firstChild, i = r.firstChild, [a, o] = V(i.nextSibling), s = a.nextSibling, [c, l] = V(s.nextSibling);
|
|
69
|
+
return r.$$click = () => e.onNavigate?.(), H(r, L(E, {
|
|
81
70
|
get when() {
|
|
82
|
-
return
|
|
71
|
+
return t.icon != null;
|
|
72
|
+
},
|
|
73
|
+
get fallback() {
|
|
74
|
+
return (() => {
|
|
75
|
+
var e = B(Ee);
|
|
76
|
+
return H(e, () => t.label), e;
|
|
77
|
+
})();
|
|
83
78
|
},
|
|
84
79
|
get children() {
|
|
85
|
-
var
|
|
86
|
-
return
|
|
80
|
+
var e = B(Ce), n = e.firstChild, r = n.nextSibling;
|
|
81
|
+
return H(n, () => t.icon), H(r, () => t.label), e;
|
|
87
82
|
}
|
|
88
|
-
}),
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
}), a, o), H(r, L(E, {
|
|
84
|
+
get when() {
|
|
85
|
+
return U(() => t.badge !== void 0)() && t.badge > 0;
|
|
86
|
+
},
|
|
87
|
+
get children() {
|
|
88
|
+
var n = B(we);
|
|
89
|
+
return H(n, () => t.badge), z(() => K(n, "aria-label", Oe(e.labels.badge, t.badge))), n;
|
|
90
|
+
}
|
|
91
|
+
}), c, l), z((n) => {
|
|
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 && K(r, "data-nav", n.e = i), a !== n.t && K(r, "href", n.t = a), o !== n.a && K(r, "aria-current", n.a = o), n;
|
|
91
94
|
}, {
|
|
92
95
|
e: void 0,
|
|
93
96
|
t: void 0,
|
|
94
97
|
a: void 0
|
|
95
|
-
}),
|
|
98
|
+
}), G(), n;
|
|
96
99
|
})()
|
|
97
|
-
})),
|
|
100
|
+
})), z((e) => {
|
|
101
|
+
var r = t.collapsible ? "true" : void 0, i = !c();
|
|
102
|
+
return r !== e.e && K(n, "data-collapsible", e.e = r), i !== e.t && oe(l, "hidden", e.t = i), e;
|
|
103
|
+
}, {
|
|
104
|
+
e: void 0,
|
|
105
|
+
t: void 0
|
|
106
|
+
}), n;
|
|
98
107
|
})();
|
|
99
108
|
}
|
|
100
|
-
})),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
109
|
+
})), z(() => K(t, "aria-label", e.labels.nav)), t;
|
|
110
|
+
})();
|
|
111
|
+
}
|
|
112
|
+
R(["click"]);
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/layout.tsx
|
|
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
|
+
function Ne(e) {
|
|
117
|
+
let t = A(), n = `dds-console-rail-${t}`, r = `dds-console-main-${t}`, [i, a] = k(!1), [o, s] = k(!1), c, l;
|
|
118
|
+
function u() {
|
|
119
|
+
a(!1), c?.focus();
|
|
120
|
+
}
|
|
121
|
+
function d() {
|
|
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
|
+
}
|
|
124
|
+
return P(() => {
|
|
125
|
+
if (s(!0), typeof window.matchMedia == "function") {
|
|
126
|
+
let e = window.matchMedia("(max-width: 56.25rem)"), t = () => {
|
|
127
|
+
e.matches || a(!1);
|
|
128
|
+
};
|
|
129
|
+
e.addEventListener("change", t), N(() => e.removeEventListener("change", t));
|
|
130
|
+
}
|
|
131
|
+
function e(e) {
|
|
132
|
+
if (i() && (e.key === "Escape" && (e.preventDefault(), u()), e.key === "Tab")) {
|
|
133
|
+
let t = d(), n = t[0], r = t.at(-1);
|
|
134
|
+
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
123
135
|
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
136
|
+
}
|
|
137
|
+
document.addEventListener("keydown", e), N(() => document.removeEventListener("keydown", e));
|
|
138
|
+
}), (() => {
|
|
139
|
+
var t = B(Ae), s = t.firstChild, f = s.nextSibling, ee = f.firstChild.nextSibling, p = f.nextSibling, m = p.nextSibling, h = m.firstChild, [g, _] = V(h.nextSibling), v = g.nextSibling, [y, b] = V(v.nextSibling), x = y.nextSibling, [S, C] = V(x.nextSibling), w = m.nextSibling, T = w.firstChild, E = T.firstChild, [D, O] = V(E.nextSibling), te = D.nextSibling, [k, A] = V(te.nextSibling), j = k.nextSibling, [M, N] = V(j.nextSibling);
|
|
140
|
+
K(s, "href", `#${r}`), H(s, () => e.labels.skip), f.$$click = () => {
|
|
141
|
+
i() ? u() : (a(!0), queueMicrotask(() => d()[1]?.focus()));
|
|
142
|
+
};
|
|
143
|
+
var P = c;
|
|
144
|
+
typeof P == "function" ? J(P, f) : c = f, K(f, "aria-controls", n), H(ee, (() => {
|
|
145
|
+
var t = U(() => !!i());
|
|
146
|
+
return () => t() ? e.labels.menuClose : e.labels.menuOpen;
|
|
147
|
+
})()), p.$$click = u, m.$$click = (e) => {
|
|
148
|
+
i() && e.target instanceof Element && e.target.closest("a[href]") && u();
|
|
149
|
+
};
|
|
150
|
+
var F = l;
|
|
151
|
+
return typeof F == "function" ? J(F, m) : l = m, K(m, "id", n), H(m, () => e.railStart, g, _), H(m, () => e.navigation, y, b), H(m, () => e.railEnd, S, C), K(w, "id", r), H(T, (() => {
|
|
152
|
+
var t = U(() => !!e.header);
|
|
153
|
+
return () => t() && (() => {
|
|
154
|
+
var t = B(je);
|
|
155
|
+
return H(t, () => e.header), t;
|
|
156
|
+
})();
|
|
157
|
+
})(), D, O), H(T, () => e.children, k, A), H(T, (() => {
|
|
158
|
+
var t = U(() => !!e.footer);
|
|
159
|
+
return () => t() && (() => {
|
|
160
|
+
var t = B(Me);
|
|
161
|
+
return H(t, () => e.footer), t;
|
|
162
|
+
})();
|
|
163
|
+
})(), M, N), z((n) => {
|
|
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 && K(t, "data-navigation-position", n.e = r), a !== n.t && K(t, "data-surface", n.t = a), s !== n.a && K(t, "data-hydrated", n.a = s), c !== n.o && K(f, "aria-expanded", n.o = c), l !== n.i && K(p, "data-open", n.i = l), u !== n.n && K(m, "data-open", n.n = u), d !== n.s && K(T, "data-width", n.s = d), n;
|
|
127
166
|
}, {
|
|
128
167
|
e: void 0,
|
|
129
168
|
t: void 0,
|
|
@@ -131,15 +170,111 @@ function Ae(e) {
|
|
|
131
170
|
o: void 0,
|
|
132
171
|
i: void 0,
|
|
133
172
|
n: void 0,
|
|
134
|
-
s: void 0
|
|
135
|
-
|
|
136
|
-
}), K(), a;
|
|
173
|
+
s: void 0
|
|
174
|
+
}), G(), t;
|
|
137
175
|
})();
|
|
138
176
|
}
|
|
139
|
-
|
|
177
|
+
R(["click"]);
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region src/console-shell.tsx
|
|
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
|
+
function Ve(e) {
|
|
182
|
+
return L(Ne, {
|
|
183
|
+
get labels() {
|
|
184
|
+
return e.labels;
|
|
185
|
+
},
|
|
186
|
+
get surface() {
|
|
187
|
+
return e.surface;
|
|
188
|
+
},
|
|
189
|
+
get railStart() {
|
|
190
|
+
return [(() => {
|
|
191
|
+
var t = B(Pe), n = t.firstChild, r = n.nextSibling;
|
|
192
|
+
return H(r, () => e.brand.name), z((r) => {
|
|
193
|
+
var i = e.brand.href, a = e.brand.mark;
|
|
194
|
+
return i !== r.e && K(t, "href", r.e = i), a !== r.t && K(n, "src", r.t = a), r;
|
|
195
|
+
}, {
|
|
196
|
+
e: void 0,
|
|
197
|
+
t: void 0
|
|
198
|
+
}), t;
|
|
199
|
+
})(), L(E, {
|
|
200
|
+
get when() {
|
|
201
|
+
return U(() => !!e.context)() && e.context.length > 0;
|
|
202
|
+
},
|
|
203
|
+
get children() {
|
|
204
|
+
var t = B(Fe);
|
|
205
|
+
return H(t, L(T, {
|
|
206
|
+
get each() {
|
|
207
|
+
return e.context;
|
|
208
|
+
},
|
|
209
|
+
children: (e) => (() => {
|
|
210
|
+
var t = B(Ie), n = t.firstChild, r = n.nextSibling;
|
|
211
|
+
return H(n, () => e.label), H(r, () => e.value), t;
|
|
212
|
+
})()
|
|
213
|
+
})), t;
|
|
214
|
+
}
|
|
215
|
+
})];
|
|
216
|
+
},
|
|
217
|
+
get navigation() {
|
|
218
|
+
return e.navigation ?? L(ke, {
|
|
219
|
+
get surface() {
|
|
220
|
+
return e.surface;
|
|
221
|
+
},
|
|
222
|
+
get activePath() {
|
|
223
|
+
return e.activePath;
|
|
224
|
+
},
|
|
225
|
+
get nav() {
|
|
226
|
+
return e.nav ?? [];
|
|
227
|
+
},
|
|
228
|
+
get labels() {
|
|
229
|
+
return e.labels;
|
|
230
|
+
},
|
|
231
|
+
get expandedGroups() {
|
|
232
|
+
return e.expandedGroups;
|
|
233
|
+
},
|
|
234
|
+
get defaultExpandedGroups() {
|
|
235
|
+
return e.defaultExpandedGroups;
|
|
236
|
+
},
|
|
237
|
+
get onExpandedGroupsChange() {
|
|
238
|
+
return e.onExpandedGroupsChange;
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
get railEnd() {
|
|
243
|
+
return U(() => !!e.foot)() && (() => {
|
|
244
|
+
var t = B(Le);
|
|
245
|
+
return H(t, () => e.foot), t;
|
|
246
|
+
})();
|
|
247
|
+
},
|
|
248
|
+
get header() {
|
|
249
|
+
return (() => {
|
|
250
|
+
var t = B(Be), n = t.firstChild, r = n.firstChild, [i, a] = V(r.nextSibling), o = i.nextSibling, s = n.nextSibling, [c, l] = V(s.nextSibling);
|
|
251
|
+
return H(n, L(E, {
|
|
252
|
+
get when() {
|
|
253
|
+
return e.header.eyebrow;
|
|
254
|
+
},
|
|
255
|
+
get children() {
|
|
256
|
+
var t = B(Re);
|
|
257
|
+
return H(t, () => e.header.eyebrow), t;
|
|
258
|
+
}
|
|
259
|
+
}), i, a), H(o, () => e.header.title), H(t, L(E, {
|
|
260
|
+
get when() {
|
|
261
|
+
return e.header.actions;
|
|
262
|
+
},
|
|
263
|
+
get children() {
|
|
264
|
+
var t = B(ze);
|
|
265
|
+
return H(t, () => e.header.actions), t;
|
|
266
|
+
}
|
|
267
|
+
}), c, l), t;
|
|
268
|
+
})();
|
|
269
|
+
},
|
|
270
|
+
get children() {
|
|
271
|
+
return e.children;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
}
|
|
140
275
|
//#endregion
|
|
141
276
|
//#region src/dialog.tsx
|
|
142
|
-
var
|
|
277
|
+
var He = /*#__PURE__*/ q("<div>");
|
|
143
278
|
[
|
|
144
279
|
"a[href]",
|
|
145
280
|
"button:not([disabled])",
|
|
@@ -148,8 +283,8 @@ var je = /*#__PURE__*/ J("<div>");
|
|
|
148
283
|
"textarea:not([disabled])",
|
|
149
284
|
"[tabindex]:not([tabindex='-1'])"
|
|
150
285
|
].join(",");
|
|
151
|
-
function
|
|
152
|
-
let t =
|
|
286
|
+
function Ue(e) {
|
|
287
|
+
let t = A(), n = () => e.id ?? `dds-dialog-${t}`, [r, i] = k(), a = ce(() => ({
|
|
153
288
|
id: n(),
|
|
154
289
|
open: e.open,
|
|
155
290
|
defaultOpen: e.defaultOpen,
|
|
@@ -164,18 +299,18 @@ function Me(e) {
|
|
|
164
299
|
trapFocus: !e.additionalFocusContainers,
|
|
165
300
|
preventScroll: !0,
|
|
166
301
|
role: e.role ?? "dialog",
|
|
167
|
-
persistentElements:
|
|
302
|
+
persistentElements: ae ? [] : e.additionalFocusContainers?.().filter((e) => !!e).map((e) => () => e),
|
|
168
303
|
ids: {
|
|
169
304
|
content: n(),
|
|
170
305
|
title: `${n()}-title`,
|
|
171
306
|
description: `${n()}-description`
|
|
172
307
|
}
|
|
173
|
-
})), o =
|
|
174
|
-
|
|
308
|
+
})), o = te(() => a().open);
|
|
309
|
+
O(() => {
|
|
175
310
|
let t = r();
|
|
176
311
|
if (!o() || !e.additionalFocusContainers || !t) return;
|
|
177
|
-
let n = t.ownerDocument.activeElement, i, a, [s, c] =
|
|
178
|
-
i = new
|
|
312
|
+
let n = t.ownerDocument.activeElement, i, a, [s, c] = k(!1), l = () => [t, ...e.additionalFocusContainers().filter((e) => !!(e?.isConnected && e.ownerDocument === t.ownerDocument))], u = t.ownerDocument.defaultView.requestAnimationFrame(() => {
|
|
313
|
+
i = new ue(l(), {
|
|
179
314
|
document: t.ownerDocument,
|
|
180
315
|
escapeDeactivates: !1,
|
|
181
316
|
allowOutsideClick: !0,
|
|
@@ -187,26 +322,26 @@ function Me(e) {
|
|
|
187
322
|
setReturnFocus: () => e.finalFocus?.() ?? (n instanceof HTMLElement && n.isConnected ? n : !1)
|
|
188
323
|
}), c(!0), i.activate();
|
|
189
324
|
});
|
|
190
|
-
|
|
325
|
+
O(() => {
|
|
191
326
|
if (!s()) return;
|
|
192
327
|
let e = l();
|
|
193
|
-
i.updateContainerElements(e), a?.(), a =
|
|
194
|
-
}),
|
|
328
|
+
i.updateContainerElements(e), a?.(), a = de(e, { defer: !1 });
|
|
329
|
+
}), N(() => {
|
|
195
330
|
t.ownerDocument.defaultView.cancelAnimationFrame(u), a?.(), i?.deactivate({ returnFocus: e.restoreFocus !== !1 });
|
|
196
331
|
});
|
|
197
332
|
});
|
|
198
333
|
let s = (t, n) => c(e.unstyled ? void 0 : t, n), l = () => {
|
|
199
|
-
let t =
|
|
334
|
+
let t = le(), r = (n) => L(re, W({ get component() {
|
|
200
335
|
return e.contentAs ?? "div";
|
|
201
336
|
} }, () => n({}), { ref: (e) => {
|
|
202
337
|
t().ref(e), i(e);
|
|
203
338
|
} }));
|
|
204
|
-
return
|
|
339
|
+
return L(Y.Positioner, {
|
|
205
340
|
get class() {
|
|
206
341
|
return s("dds-dialog-overlay", e.overlayClass);
|
|
207
342
|
},
|
|
208
343
|
get children() {
|
|
209
|
-
return
|
|
344
|
+
return L(Y.Content, W(() => e.contentProps, {
|
|
210
345
|
ref: i,
|
|
211
346
|
get class() {
|
|
212
347
|
return s("dds-dialog", e.class);
|
|
@@ -217,13 +352,13 @@ function Me(e) {
|
|
|
217
352
|
},
|
|
218
353
|
"aria-modal": "true",
|
|
219
354
|
get "aria-describedby"() {
|
|
220
|
-
return
|
|
355
|
+
return U(() => !!e.description)() ? `${n()}-description` : void 0;
|
|
221
356
|
},
|
|
222
357
|
get children() {
|
|
223
358
|
return (() => {
|
|
224
359
|
let t = {
|
|
225
360
|
get title() {
|
|
226
|
-
return
|
|
361
|
+
return L(Y.Title, {
|
|
227
362
|
get class() {
|
|
228
363
|
return s("dds-dialog__title", e.titleClass);
|
|
229
364
|
},
|
|
@@ -233,7 +368,7 @@ function Me(e) {
|
|
|
233
368
|
});
|
|
234
369
|
},
|
|
235
370
|
get description() {
|
|
236
|
-
return e.description &&
|
|
371
|
+
return e.description && L(Y.Description, {
|
|
237
372
|
get class() {
|
|
238
373
|
return s("dds-dialog__body", e.descriptionClass);
|
|
239
374
|
},
|
|
@@ -247,16 +382,16 @@ function Me(e) {
|
|
|
247
382
|
},
|
|
248
383
|
get actions() {
|
|
249
384
|
return e.actions && (() => {
|
|
250
|
-
var t =
|
|
251
|
-
return
|
|
385
|
+
var t = B(He);
|
|
386
|
+
return H(t, () => e.actions), z(() => I(t, s("dds-dialog__actions", e.actionsClass))), t;
|
|
252
387
|
})();
|
|
253
388
|
}
|
|
254
389
|
};
|
|
255
390
|
return e.frame ? e.frame(t) : [
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
391
|
+
U(() => t.title),
|
|
392
|
+
U(() => t.description),
|
|
393
|
+
U(() => t.children),
|
|
394
|
+
U(() => t.actions)
|
|
260
395
|
];
|
|
261
396
|
})();
|
|
262
397
|
}
|
|
@@ -264,21 +399,21 @@ function Me(e) {
|
|
|
264
399
|
}
|
|
265
400
|
});
|
|
266
401
|
};
|
|
267
|
-
return
|
|
402
|
+
return L(Y.RootProvider, {
|
|
268
403
|
value: a,
|
|
269
404
|
lazyMount: !0,
|
|
270
405
|
unmountOnExit: !0,
|
|
271
406
|
get children() {
|
|
272
|
-
return
|
|
407
|
+
return L(E, {
|
|
273
408
|
get when() {
|
|
274
409
|
return e.portal;
|
|
275
410
|
},
|
|
276
411
|
get fallback() {
|
|
277
|
-
return
|
|
412
|
+
return L(l, {});
|
|
278
413
|
},
|
|
279
414
|
get children() {
|
|
280
|
-
return
|
|
281
|
-
return
|
|
415
|
+
return L(ie, W(() => e.portalMount ? { mount: e.portalMount } : {}, { get children() {
|
|
416
|
+
return L(l, {});
|
|
282
417
|
} }));
|
|
283
418
|
}
|
|
284
419
|
});
|
|
@@ -287,9 +422,9 @@ function Me(e) {
|
|
|
287
422
|
}
|
|
288
423
|
//#endregion
|
|
289
424
|
//#region src/radio-group.tsx
|
|
290
|
-
function
|
|
425
|
+
function We(e) {
|
|
291
426
|
let t = e.value ?? e.defaultValue;
|
|
292
|
-
return
|
|
427
|
+
return L(X.Root, {
|
|
293
428
|
get value() {
|
|
294
429
|
return e.value;
|
|
295
430
|
},
|
|
@@ -315,16 +450,16 @@ function Ne(e) {
|
|
|
315
450
|
return c("dds-radio-group", e.class);
|
|
316
451
|
},
|
|
317
452
|
get children() {
|
|
318
|
-
return [
|
|
453
|
+
return [L(X.Label, {
|
|
319
454
|
class: "dds-field__label",
|
|
320
455
|
get children() {
|
|
321
456
|
return e.label;
|
|
322
457
|
}
|
|
323
|
-
}),
|
|
458
|
+
}), L(T, {
|
|
324
459
|
get each() {
|
|
325
460
|
return e.options;
|
|
326
461
|
},
|
|
327
|
-
children: (e) =>
|
|
462
|
+
children: (e) => L(X.Item, {
|
|
328
463
|
get value() {
|
|
329
464
|
return e.value;
|
|
330
465
|
},
|
|
@@ -333,13 +468,13 @@ function Ne(e) {
|
|
|
333
468
|
},
|
|
334
469
|
class: "dds-check",
|
|
335
470
|
get children() {
|
|
336
|
-
return [
|
|
471
|
+
return [L(X.ItemHiddenInput, {
|
|
337
472
|
class: "dds-check__input",
|
|
338
473
|
style: {},
|
|
339
474
|
ref: (n) => {
|
|
340
475
|
n.defaultChecked = t === e.value;
|
|
341
476
|
}
|
|
342
|
-
}),
|
|
477
|
+
}), L(X.ItemText, { get children() {
|
|
343
478
|
return e.label;
|
|
344
479
|
} })];
|
|
345
480
|
}
|
|
@@ -350,20 +485,20 @@ function Ne(e) {
|
|
|
350
485
|
}
|
|
351
486
|
//#endregion
|
|
352
487
|
//#region src/icon.tsx
|
|
353
|
-
var
|
|
354
|
-
function
|
|
355
|
-
let [t, n] =
|
|
488
|
+
var Ge = /*#__PURE__*/ q("<svg><!$><!/><g>"), Ke = /*#__PURE__*/ q("<title>");
|
|
489
|
+
function qe(e) {
|
|
490
|
+
let [t, n] = F(e, [
|
|
356
491
|
"name",
|
|
357
492
|
"label",
|
|
358
493
|
"size",
|
|
359
494
|
"directional",
|
|
360
495
|
"class"
|
|
361
|
-
]), r = () =>
|
|
496
|
+
]), r = () => pe[t.name], i = () => t.directional ?? fe.mirrorInRtl.includes(t.name);
|
|
362
497
|
return (() => {
|
|
363
|
-
var e =
|
|
364
|
-
return
|
|
498
|
+
var e = B(Ge), a = e.firstChild, [o, s] = V(a.nextSibling), l = o.nextSibling;
|
|
499
|
+
return se(e, W(n, {
|
|
365
500
|
get class() {
|
|
366
|
-
return c(i() &&
|
|
501
|
+
return c(i() && fe.cssClass, t.class);
|
|
367
502
|
},
|
|
368
503
|
get viewBox() {
|
|
369
504
|
return r().viewBox;
|
|
@@ -390,22 +525,22 @@ function Ie(e) {
|
|
|
390
525
|
get "aria-hidden"() {
|
|
391
526
|
return t.label ? void 0 : "true";
|
|
392
527
|
}
|
|
393
|
-
}), !0, !0),
|
|
394
|
-
var e =
|
|
528
|
+
}), !0, !0), H(e, (() => {
|
|
529
|
+
var e = U(() => !!t.label);
|
|
395
530
|
return () => e() && (() => {
|
|
396
|
-
var e =
|
|
397
|
-
return
|
|
531
|
+
var e = B(Ke);
|
|
532
|
+
return H(e, () => t.label), e;
|
|
398
533
|
})();
|
|
399
|
-
})(), o, s),
|
|
534
|
+
})(), o, s), z(() => oe(l, "innerHTML", r().body)), G(), e;
|
|
400
535
|
})();
|
|
401
536
|
}
|
|
402
537
|
//#endregion
|
|
403
538
|
//#region src/pending-action.ts
|
|
404
|
-
function
|
|
405
|
-
let [e, t] =
|
|
539
|
+
function Je() {
|
|
540
|
+
let [e, t] = k(null), n = null, r = !1, i = () => {
|
|
406
541
|
n?.abort(), n = null;
|
|
407
542
|
};
|
|
408
|
-
return
|
|
543
|
+
return j() && N(() => {
|
|
409
544
|
r = !0, i();
|
|
410
545
|
}), {
|
|
411
546
|
current: e,
|
|
@@ -429,8 +564,8 @@ function Le() {
|
|
|
429
564
|
}
|
|
430
565
|
//#endregion
|
|
431
566
|
//#region src/status-pill.tsx
|
|
432
|
-
var
|
|
433
|
-
function
|
|
567
|
+
var Ye = /*#__PURE__*/ q("<code>"), Xe = /*#__PURE__*/ q("<span>");
|
|
568
|
+
function Ze(e) {
|
|
434
569
|
let t = new Set(e.openDomains ?? []);
|
|
435
570
|
return function(n) {
|
|
436
571
|
let r = () => e.tones[n.domain]?.[n.value], i = () => e.label(n.domain, n.value, n.locale), a = () => !!(r() && i()), o = () => {
|
|
@@ -443,24 +578,24 @@ function Be(e) {
|
|
|
443
578
|
text: t
|
|
444
579
|
};
|
|
445
580
|
};
|
|
446
|
-
return
|
|
581
|
+
return L(E, {
|
|
447
582
|
get when() {
|
|
448
583
|
return a() || !t.has(n.domain);
|
|
449
584
|
},
|
|
450
585
|
get fallback() {
|
|
451
586
|
return (() => {
|
|
452
|
-
var e =
|
|
453
|
-
return
|
|
587
|
+
var e = B(Ye);
|
|
588
|
+
return H(e, () => n.value), z(() => K(e, "data-status", `${n.domain}.${n.value}`)), e;
|
|
454
589
|
})();
|
|
455
590
|
},
|
|
456
591
|
get children() {
|
|
457
592
|
return (() => {
|
|
458
593
|
let e = o();
|
|
459
594
|
return (() => {
|
|
460
|
-
var t =
|
|
461
|
-
return
|
|
595
|
+
var t = B(Xe);
|
|
596
|
+
return H(t, () => e.text), z((r) => {
|
|
462
597
|
var i = e.tone === "neutral" ? "dds-badge" : `dds-badge dds-badge--${e.tone}`, a = `${n.domain}.${n.value}`, o = e.tone;
|
|
463
|
-
return i !== r.e &&
|
|
598
|
+
return i !== r.e && I(t, r.e = i), a !== r.t && K(t, "data-status", r.t = a), o !== r.a && K(t, "data-tone", r.a = o), r;
|
|
464
599
|
}, {
|
|
465
600
|
e: void 0,
|
|
466
601
|
t: void 0,
|
|
@@ -474,16 +609,16 @@ function Be(e) {
|
|
|
474
609
|
}
|
|
475
610
|
//#endregion
|
|
476
611
|
//#region src/tabs.tsx
|
|
477
|
-
function
|
|
478
|
-
let t =
|
|
612
|
+
function Qe(e) {
|
|
613
|
+
let t = A(), n = () => e.id ?? `dds-tabs-${t}`, r, i = l(() => r, () => e.dir), a = e.asChild ? (t) => e.asChild(M(t({}), { ref: (e) => {
|
|
479
614
|
r = e;
|
|
480
615
|
} })) : void 0;
|
|
481
|
-
return
|
|
616
|
+
return L(he, {
|
|
482
617
|
get locale() {
|
|
483
618
|
return i() === "rtl" ? "ar" : "en";
|
|
484
619
|
},
|
|
485
620
|
get children() {
|
|
486
|
-
return
|
|
621
|
+
return L(Z.Root, W({
|
|
487
622
|
ref(e) {
|
|
488
623
|
var t = r;
|
|
489
624
|
typeof t == "function" ? t(e) : r = e;
|
|
@@ -521,13 +656,13 @@ function Ve(e) {
|
|
|
521
656
|
}
|
|
522
657
|
});
|
|
523
658
|
}
|
|
524
|
-
function
|
|
525
|
-
let [t, n] =
|
|
659
|
+
function $e(e) {
|
|
660
|
+
let [t, n] = F(e, [
|
|
526
661
|
"class",
|
|
527
662
|
"children",
|
|
528
663
|
"unstyled"
|
|
529
664
|
]);
|
|
530
|
-
return
|
|
665
|
+
return L(Z.List, W(n, {
|
|
531
666
|
get class() {
|
|
532
667
|
return c(!t.unstyled && "dds-tabs", t.class);
|
|
533
668
|
},
|
|
@@ -536,15 +671,15 @@ function He(e) {
|
|
|
536
671
|
}
|
|
537
672
|
}));
|
|
538
673
|
}
|
|
539
|
-
function
|
|
540
|
-
let [t, n] =
|
|
674
|
+
function et(e) {
|
|
675
|
+
let [t, n] = F(e, [
|
|
541
676
|
"class",
|
|
542
677
|
"children",
|
|
543
678
|
"value",
|
|
544
679
|
"unstyled",
|
|
545
680
|
"asChild"
|
|
546
|
-
]), r = t.asChild ? (n) => t.asChild(
|
|
547
|
-
return
|
|
681
|
+
]), r = t.asChild ? (n) => t.asChild(M(n({}), { ref: e.ref })) : void 0;
|
|
682
|
+
return L(Z.Trigger, W(n, {
|
|
548
683
|
get value() {
|
|
549
684
|
return t.value;
|
|
550
685
|
},
|
|
@@ -555,16 +690,16 @@ function Ue(e) {
|
|
|
555
690
|
return t.children;
|
|
556
691
|
} }));
|
|
557
692
|
}
|
|
558
|
-
function
|
|
559
|
-
let [t, n] =
|
|
693
|
+
function tt(e) {
|
|
694
|
+
let [t, n] = F(e, [
|
|
560
695
|
"value",
|
|
561
696
|
"children",
|
|
562
697
|
"style"
|
|
563
|
-
]), r =
|
|
698
|
+
]), r = me(), i = () => r().value !== t.value, a = () => i() ? typeof t.style == "string" ? `${t.style.replace(/;+\s*$/, "")};display:none;` : {
|
|
564
699
|
...t.style,
|
|
565
700
|
display: "none"
|
|
566
701
|
} : t.style;
|
|
567
|
-
return
|
|
702
|
+
return L(Z.Content, W(n, {
|
|
568
703
|
get value() {
|
|
569
704
|
return t.value;
|
|
570
705
|
},
|
|
@@ -584,16 +719,16 @@ function We(e) {
|
|
|
584
719
|
}
|
|
585
720
|
//#endregion
|
|
586
721
|
//#region src/toast.tsx
|
|
587
|
-
var
|
|
588
|
-
function
|
|
589
|
-
let t =
|
|
722
|
+
var nt = D();
|
|
723
|
+
function rt(e) {
|
|
724
|
+
let t = A(), n, r, i = () => r ??= new Proxy(n?.ownerDocument ?? document, { get(e, t) {
|
|
590
725
|
if (t === "getElementById") return (t) => t === "toast-group:bottom-end" ? n ?? null : e.getElementById(t);
|
|
591
726
|
let r = Reflect.get(e, t, e);
|
|
592
727
|
return typeof r == "function" ? r.bind(e) : r;
|
|
593
|
-
} }), a =
|
|
728
|
+
} }), a = _e({
|
|
594
729
|
placement: "bottom-end",
|
|
595
730
|
overlap: !1,
|
|
596
|
-
gap:
|
|
731
|
+
gap: ve[8],
|
|
597
732
|
offsets: "var(--dds-space-16)",
|
|
598
733
|
removeDelay: 0,
|
|
599
734
|
hotkey: ["DDS_NO_HOTKEY"],
|
|
@@ -616,10 +751,10 @@ function Ke(e) {
|
|
|
616
751
|
dismiss: (e) => a.remove(e),
|
|
617
752
|
clear: () => a.remove()
|
|
618
753
|
};
|
|
619
|
-
return
|
|
754
|
+
return N(s.clear), L(nt.Provider, {
|
|
620
755
|
value: s,
|
|
621
756
|
get children() {
|
|
622
|
-
return [
|
|
757
|
+
return [U(() => e.children), L(ge, {
|
|
623
758
|
toaster: a,
|
|
624
759
|
ref(e) {
|
|
625
760
|
var t = n;
|
|
@@ -638,7 +773,7 @@ function Ke(e) {
|
|
|
638
773
|
},
|
|
639
774
|
children: (t) => {
|
|
640
775
|
let n = () => t().meta?.dds;
|
|
641
|
-
return
|
|
776
|
+
return L(Q.Root, {
|
|
642
777
|
get class() {
|
|
643
778
|
return c("dds-toast", `dds-toast--${n().tone ?? "info"}`);
|
|
644
779
|
},
|
|
@@ -646,12 +781,12 @@ function Ke(e) {
|
|
|
646
781
|
return n().tone === "danger" ? "alert" : "status";
|
|
647
782
|
},
|
|
648
783
|
get children() {
|
|
649
|
-
return [
|
|
784
|
+
return [L(Q.Description, { get children() {
|
|
650
785
|
return t().description;
|
|
651
|
-
} }),
|
|
786
|
+
} }), U(() => U(() => !!e.dismissLabel)() && L(Q.CloseTrigger, {
|
|
652
787
|
class: "dds-iconbtn dds-iconbtn--sm",
|
|
653
788
|
get "aria-label"() {
|
|
654
|
-
return
|
|
789
|
+
return U(() => typeof e.dismissLabel == "function")() ? e.dismissLabel(n()) : e.dismissLabel;
|
|
655
790
|
},
|
|
656
791
|
children: "×"
|
|
657
792
|
}))];
|
|
@@ -662,20 +797,20 @@ function Ke(e) {
|
|
|
662
797
|
}
|
|
663
798
|
});
|
|
664
799
|
}
|
|
665
|
-
function
|
|
666
|
-
let e =
|
|
800
|
+
function it() {
|
|
801
|
+
let e = ne(nt);
|
|
667
802
|
if (!e) throw Error("useToast must be called inside <ToastProvider>");
|
|
668
803
|
return e;
|
|
669
804
|
}
|
|
670
805
|
//#endregion
|
|
671
806
|
//#region src/tooltip.tsx
|
|
672
|
-
var
|
|
673
|
-
function
|
|
674
|
-
let t =
|
|
807
|
+
var at = /*#__PURE__*/ q("<span><!$><!/><!$><!/>");
|
|
808
|
+
function ot(e) {
|
|
809
|
+
let t = A(), n = () => e.id ?? `dds-tooltip-${t}`, [i, a] = r({
|
|
675
810
|
value: () => e.open,
|
|
676
811
|
defaultValue: e.defaultOpen ?? !1,
|
|
677
812
|
onChange: (t) => e.onOpenChange?.(t)
|
|
678
|
-
}), o =
|
|
813
|
+
}), o = ye(() => ({
|
|
679
814
|
id: n(),
|
|
680
815
|
ids: { content: n() },
|
|
681
816
|
open: i(),
|
|
@@ -683,14 +818,14 @@ function Ye(e) {
|
|
|
683
818
|
openDelay: 0,
|
|
684
819
|
closeDelay: 0
|
|
685
820
|
}));
|
|
686
|
-
return
|
|
821
|
+
return L($.RootProvider, {
|
|
687
822
|
value: o,
|
|
688
823
|
lazyMount: !1,
|
|
689
824
|
unmountOnExit: !1,
|
|
690
825
|
get children() {
|
|
691
|
-
var t =
|
|
692
|
-
return
|
|
693
|
-
let [, r] =
|
|
826
|
+
var t = B(at), r = t.firstChild, [i, a] = V(r.nextSibling), s = i.nextSibling, [l, u] = V(s.nextSibling);
|
|
827
|
+
return H(t, L($.Trigger, { asChild: (t) => {
|
|
828
|
+
let [, r] = F(t(), ["onFocusIn", "onFocusOut"]);
|
|
694
829
|
return e.children({
|
|
695
830
|
...r,
|
|
696
831
|
"aria-describedby": n(),
|
|
@@ -699,18 +834,77 @@ function Ye(e) {
|
|
|
699
834
|
onPointerEnter: () => o().setOpen(!0),
|
|
700
835
|
onPointerLeave: () => o().setOpen(!1)
|
|
701
836
|
});
|
|
702
|
-
} }), i, a),
|
|
703
|
-
return
|
|
837
|
+
} }), i, a), H(t, L($.Positioner, { get children() {
|
|
838
|
+
return L($.Content, {
|
|
704
839
|
class: "dds-tooltip__bubble",
|
|
705
840
|
get children() {
|
|
706
841
|
return e.content;
|
|
707
842
|
}
|
|
708
843
|
});
|
|
709
|
-
} }), l, u),
|
|
844
|
+
} }), l, u), z(() => I(t, c("dds-tooltip", e.class))), t;
|
|
710
845
|
}
|
|
711
846
|
});
|
|
712
847
|
}
|
|
713
848
|
//#endregion
|
|
714
|
-
|
|
849
|
+
//#region src/top-nav.tsx
|
|
850
|
+
var st = /*#__PURE__*/ q("<nav class=dds-top-nav>"), ct = /*#__PURE__*/ q("<details class=dds-top-nav__group><summary class=dds-top-nav__trigger></summary><ul class=dds-top-nav__items>"), lt = /*#__PURE__*/ q("<li><a class=dds-top-nav__item><!$><!/><span></span><!$><!/>"), ut = /*#__PURE__*/ q("<span class=dds-top-nav__item-icon aria-hidden=true>"), dt = /*#__PURE__*/ q("<span class=dds-console-rail__badge>");
|
|
851
|
+
function ft(e) {
|
|
852
|
+
let t;
|
|
853
|
+
return P(() => {
|
|
854
|
+
let e = (e) => {
|
|
855
|
+
t?.contains(e.target) || t?.querySelectorAll("details[open]").forEach((e) => e.removeAttribute("open"));
|
|
856
|
+
};
|
|
857
|
+
document.addEventListener("pointerdown", e), N(() => document.removeEventListener("pointerdown", e));
|
|
858
|
+
}), (() => {
|
|
859
|
+
var n = B(st);
|
|
860
|
+
n.$$keydown = (e) => {
|
|
861
|
+
if (e.key !== "Escape") return;
|
|
862
|
+
let t = e.target.closest("details");
|
|
863
|
+
t?.open && (e.preventDefault(), e.stopPropagation(), t.open = !1, t.querySelector("summary")?.focus());
|
|
864
|
+
};
|
|
865
|
+
var r = t;
|
|
866
|
+
return typeof r == "function" ? J(r, n) : t = n, H(n, L(T, {
|
|
867
|
+
get each() {
|
|
868
|
+
return e.nav;
|
|
869
|
+
},
|
|
870
|
+
children: (t) => (() => {
|
|
871
|
+
var n = B(ct), r = n.firstChild, i = r.nextSibling;
|
|
872
|
+
return H(r, () => t.label), H(i, L(T, {
|
|
873
|
+
get each() {
|
|
874
|
+
return t.items;
|
|
875
|
+
},
|
|
876
|
+
children: (t) => (() => {
|
|
877
|
+
var n = B(lt), r = n.firstChild, i = r.firstChild, [a, o] = V(i.nextSibling), s = a.nextSibling, c = s.nextSibling, [l, u] = V(c.nextSibling);
|
|
878
|
+
return r.$$click = (t) => {
|
|
879
|
+
t.currentTarget.closest("details")?.removeAttribute("open"), e.onNavigate?.();
|
|
880
|
+
}, H(r, (() => {
|
|
881
|
+
var e = U(() => t.icon != null);
|
|
882
|
+
return () => e() && (() => {
|
|
883
|
+
var e = B(ut);
|
|
884
|
+
return H(e, () => t.icon), e;
|
|
885
|
+
})();
|
|
886
|
+
})(), a, o), H(s, () => t.label), H(r, (() => {
|
|
887
|
+
var n = U(() => t.badge != null && t.badge > 0);
|
|
888
|
+
return () => n() && (() => {
|
|
889
|
+
var n = B(dt);
|
|
890
|
+
return H(n, () => t.badge), z(() => K(n, "aria-label", e.labels.badge.replace("{count}", () => String(t.badge)))), n;
|
|
891
|
+
})();
|
|
892
|
+
})(), l, u), z((n) => {
|
|
893
|
+
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 && K(r, "data-nav", n.e = i), a !== n.t && K(r, "href", n.t = a), o !== n.a && K(r, "aria-current", n.a = o), n;
|
|
895
|
+
}, {
|
|
896
|
+
e: void 0,
|
|
897
|
+
t: void 0,
|
|
898
|
+
a: void 0
|
|
899
|
+
}), G(), n;
|
|
900
|
+
})()
|
|
901
|
+
})), n;
|
|
902
|
+
})()
|
|
903
|
+
})), z(() => K(n, "aria-label", e.labels.nav)), G(), n;
|
|
904
|
+
})();
|
|
905
|
+
}
|
|
906
|
+
R(["keydown", "click"]);
|
|
907
|
+
//#endregion
|
|
908
|
+
export { i as Button, y as Calendar, o as Checkbox, h as Combobox, Ve as ConsoleShell, u as DatePicker, f as DateRangePicker, Ue as Dialog, _ as DropdownMenu, n as Field, qe as Icon, e as IconButton, p as Input, m as InputGroup, Ne as Layout, ke as LeftNav, ee as MonthPicker, S as NumberInput, v as Popover, a as Radio, We as RadioGroup, b 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, rt as ToastProvider, ot as Tooltip, ft as TopNav, r as createControllableSignal, Je as createPendingAction, Ze as createStatusPill, C as normalizeNumberText, w as numberInputMessages, it as useToast, x as validateSegmentedItems };
|
|
715
909
|
|
|
716
910
|
//# sourceMappingURL=index.js.map
|