@devslab/dds-solid 0.23.0 → 0.24.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 +15 -3
- package/README.md +15 -3
- package/dist/assets/{calendar-view-1RO2mtf1.js → calendar-view-BBQGmkJ7.js} +181 -145
- package/dist/assets/calendar-view-BBQGmkJ7.js.map +1 -0
- package/dist/assets/{choice-DoXiK8nc.js → choice-DPmk9AHn.js} +41 -29
- package/dist/assets/choice-DPmk9AHn.js.map +1 -0
- package/dist/assets/choice-types-h4YVL8xH.js +24 -0
- package/dist/assets/choice-types-h4YVL8xH.js.map +1 -0
- package/dist/assets/date-only-0Ldsjp43.js +174 -0
- package/dist/assets/date-only-0Ldsjp43.js.map +1 -0
- package/dist/assets/direction-BpTqmXs-.js +24 -0
- package/dist/assets/direction-BpTqmXs-.js.map +1 -0
- package/dist/calendar-view-CZLsC57_.js +481 -0
- package/dist/calendar-view-CZLsC57_.js.map +1 -0
- package/dist/calendar-view.d.ts +10 -0
- package/dist/calendar-view.d.ts.map +1 -1
- package/dist/calendar.js +7 -6
- package/dist/calendar.js.map +1 -1
- package/dist/calendar.server.js +2 -1
- package/dist/calendar.server.js.map +1 -1
- package/dist/choice-CTNeFOVo.js +403 -0
- package/dist/choice-CTNeFOVo.js.map +1 -0
- package/dist/choice-types-kSaEnZPr.js +23 -0
- package/dist/choice-types-kSaEnZPr.js.map +1 -0
- package/dist/combobox.js +1 -1
- package/dist/combobox.server.js +1 -1
- package/dist/date-only-Bu4UmsTP.js +151 -0
- package/dist/date-only-Bu4UmsTP.js.map +1 -0
- package/dist/date-only.d.ts +92 -0
- package/dist/date-only.d.ts.map +1 -1
- package/dist/date-picker.js +51 -50
- package/dist/date-picker.js.map +1 -1
- package/dist/date-picker.server.js +2 -1
- package/dist/date-picker.server.js.map +1 -1
- package/dist/date-range-picker.d.ts +41 -0
- package/dist/date-range-picker.d.ts.map +1 -0
- package/dist/date-range-picker.js +368 -0
- package/dist/date-range-picker.js.map +1 -0
- package/dist/date-range-picker.server.js +347 -0
- package/dist/date-range-picker.server.js.map +1 -0
- package/dist/direction-CS85IDNU.js +21 -0
- package/dist/direction-CS85IDNU.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +168 -179
- package/dist/index.js.map +1 -1
- package/dist/internal/choice.d.ts +25 -3
- package/dist/internal/choice.d.ts.map +1 -1
- package/dist/month-picker.d.ts +33 -0
- package/dist/month-picker.d.ts.map +1 -0
- package/dist/month-picker.js +287 -0
- package/dist/month-picker.js.map +1 -0
- package/dist/month-picker.server.js +282 -0
- package/dist/month-picker.server.js.map +1 -0
- package/dist/number-input.d.ts +53 -0
- package/dist/number-input.d.ts.map +1 -0
- package/dist/number-input.js +267 -0
- package/dist/number-input.js.map +1 -0
- package/dist/number-input.server.js +237 -0
- package/dist/number-input.server.js.map +1 -0
- package/dist/segmented-control.d.ts +40 -0
- package/dist/segmented-control.d.ts.map +1 -0
- package/dist/segmented-control.js +133 -0
- package/dist/segmented-control.js.map +1 -0
- package/dist/segmented-control.server.js +138 -0
- package/dist/segmented-control.server.js.map +1 -0
- package/dist/select-picker.js +1 -1
- package/dist/select-picker.server.js +1 -1
- package/dist/server.js +8 -22
- package/dist/server.js.map +1 -1
- package/dist/time-only.d.ts +32 -0
- package/dist/time-only.d.ts.map +1 -0
- package/dist/time-picker-BlMWCQwk.js +113 -0
- package/dist/time-picker-BlMWCQwk.js.map +1 -0
- package/dist/time-picker.d.ts +34 -0
- package/dist/time-picker.d.ts.map +1 -0
- package/dist/time-picker.js +2 -0
- package/dist/time-picker.server.js +152 -0
- package/dist/time-picker.server.js.map +1 -0
- package/package.json +44 -4
- package/styles.css +31 -1
- package/dist/assets/calendar-view-1RO2mtf1.js.map +0 -1
- package/dist/assets/choice-DoXiK8nc.js.map +0 -1
- package/dist/calendar-view-CTBTPB4T.js +0 -444
- package/dist/calendar-view-CTBTPB4T.js.map +0 -1
- package/dist/choice-BPMiJlPJ.js +0 -395
- package/dist/choice-BPMiJlPJ.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,123 +1,129 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s } from "./calendar-view-CZLsC57_.js";
|
|
2
2
|
import { t as c } from "./utils-oKxhg9RG.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
3
|
+
import { t as l } from "./direction-CS85IDNU.js";
|
|
4
|
+
import { DatePicker as u } from "./date-picker.js";
|
|
5
|
+
import { t as d } from "./time-picker-BlMWCQwk.js";
|
|
6
|
+
import { DateRangePicker as f } from "./date-range-picker.js";
|
|
7
|
+
import { MonthPicker as p } from "./month-picker.js";
|
|
8
|
+
import { Input as m, InputGroup as h } from "./input.js";
|
|
9
|
+
import { Combobox as g } from "./combobox.js";
|
|
10
|
+
import { SelectPicker as _ } from "./select-picker.js";
|
|
11
|
+
import { DropdownMenu as v } from "./dropdown-menu.js";
|
|
12
|
+
import { Popover as y } from "./popover.js";
|
|
13
|
+
import { Calendar as b } from "./calendar.js";
|
|
14
|
+
import { SegmentedControl as x, validateSegmentedItems as S } from "./segmented-control.js";
|
|
15
|
+
import { NumberInput as C, normalizeNumberText as w, numberInputMessages as T } from "./number-input.js";
|
|
16
|
+
import { For as E, Show as D, createContext as O, createEffect as k, createMemo as A, createSignal as j, createUniqueId as M, getOwner as N, mergeProps as P, onCleanup as F, onMount as I, splitProps as L, useContext as ee } from "solid-js";
|
|
17
|
+
import { Dynamic as te, Portal as ne, className as R, createComponent as z, delegateEvents as re, effect as B, getNextElement as V, getNextMarker as H, insert as U, isServer as ie, memo as W, mergeProps as G, runHydrationEvents as K, setAttribute as q, setProperty as ae, spread as oe, template as J } from "solid-js/web";
|
|
18
|
+
import { Dialog as Y, useDialog as se } from "@ark-ui/solid/dialog";
|
|
19
|
+
import { usePresenceContext as ce } from "@ark-ui/solid/presence";
|
|
20
|
+
import { FocusTrap as le } from "@zag-js/focus-trap";
|
|
21
|
+
import { ariaHidden as ue } from "@zag-js/aria-hidden";
|
|
22
|
+
import { RadioGroup as X } from "@ark-ui/solid/radio-group";
|
|
23
|
+
import { directionPolicy as de, icons as fe } from "@devslab/dds-icons";
|
|
24
|
+
import { Tabs as Z, useTabsContext as pe } from "@ark-ui/solid/tabs";
|
|
25
|
+
import { LocaleProvider as me } from "@ark-ui/solid/locale";
|
|
26
|
+
import { Toast as Q, Toaster as he, createToaster as ge } from "@ark-ui/solid/toast";
|
|
27
|
+
import { space as _e } from "@devslab/dds-tokens";
|
|
28
|
+
import { Tooltip as $, useTooltip as ve } from "@ark-ui/solid/tooltip";
|
|
23
29
|
//#region src/console-shell.tsx
|
|
24
|
-
var
|
|
25
|
-
function
|
|
30
|
+
var ye = /*#__PURE__*/ J("<dl class=dds-console-rail__context>"), be = /*#__PURE__*/ J("<div class=dds-console-rail__foot>"), xe = /*#__PURE__*/ J("<p class=dds-console-page-eyebrow>"), Se = /*#__PURE__*/ J("<div class=dds-console-page-header__actions>"), Ce = /*#__PURE__*/ J("<div class=dds-console-shell><a class=\"dds-console-skip dds-visually-hidden\"href=#dds-console-main></a><button class=dds-console-rail__toggle type=button data-action=toggle-rail aria-controls=dds-console-rail><span aria-hidden=true></span><span class=dds-visually-hidden></span></button><div class=dds-console-rail__scrim></div><aside id=dds-console-rail class=dds-console-rail><a class=dds-console-rail__brand><img alt width=20 height=20><strong></strong></a><!$><!/><nav class=dds-console-rail__nav></nav><!$><!/></aside><main id=dds-console-main class=dds-console-main tabindex=-1><header class=dds-console-page-header><div class=dds-console-page-header__text><!$><!/><h1></h1></div><!$><!/></header><!$><!/>"), we = /*#__PURE__*/ J("<div><dt></dt><dd>"), Te = /*#__PURE__*/ J("<section class=dds-console-rail__group><h2 class=dds-console-rail__group-label></h2><ul>"), Ee = /*#__PURE__*/ J("<span class=dds-console-rail__badge>"), De = /*#__PURE__*/ J("<li><a class=dds-console-rail__item><span></span><!$><!/>");
|
|
31
|
+
function Oe(e, t, n) {
|
|
26
32
|
return n === void 0 ? t.split("/").filter(Boolean).length <= 1 ? e === t : e === t || e.startsWith(`${t}/`) : n;
|
|
27
33
|
}
|
|
28
|
-
function
|
|
34
|
+
function ke(e, t) {
|
|
29
35
|
return e.replace("{count}", () => String(t));
|
|
30
36
|
}
|
|
31
|
-
function
|
|
32
|
-
let [t, n] =
|
|
33
|
-
return
|
|
37
|
+
function Ae(e) {
|
|
38
|
+
let [t, n] = j(!1), r = () => n(!1), [i, a] = j(!1);
|
|
39
|
+
return I(() => {
|
|
34
40
|
a(!0);
|
|
35
41
|
let e = (e) => {
|
|
36
42
|
e.key === "Escape" && r();
|
|
37
43
|
};
|
|
38
|
-
document.addEventListener("keydown", e),
|
|
44
|
+
document.addEventListener("keydown", e), F(() => document.removeEventListener("keydown", e));
|
|
39
45
|
}), (() => {
|
|
40
|
-
var a =
|
|
41
|
-
return
|
|
42
|
-
var n =
|
|
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());
|
|
43
49
|
return () => n() ? e.labels.menuClose : e.labels.menuOpen;
|
|
44
|
-
})()), l.$$click = r,
|
|
50
|
+
})()), l.$$click = r, U(p, () => e.brand.name), U(u, z(D, {
|
|
45
51
|
get when() {
|
|
46
|
-
return
|
|
52
|
+
return W(() => !!e.context)() && e.context.length > 0;
|
|
47
53
|
},
|
|
48
54
|
get children() {
|
|
49
|
-
var t =
|
|
50
|
-
return
|
|
55
|
+
var t = V(ye);
|
|
56
|
+
return U(t, z(E, {
|
|
51
57
|
get each() {
|
|
52
58
|
return e.context;
|
|
53
59
|
},
|
|
54
60
|
children: (e) => (() => {
|
|
55
|
-
var t =
|
|
56
|
-
return
|
|
61
|
+
var t = V(we), n = t.firstChild, r = n.nextSibling;
|
|
62
|
+
return U(n, () => e.label), U(r, () => e.value), t;
|
|
57
63
|
})()
|
|
58
64
|
})), t;
|
|
59
65
|
}
|
|
60
|
-
}), h, g),
|
|
66
|
+
}), h, g), U(_, z(E, {
|
|
61
67
|
get each() {
|
|
62
68
|
return e.nav;
|
|
63
69
|
},
|
|
64
70
|
children: (t) => {
|
|
65
|
-
let n = `dds-console-group-${
|
|
71
|
+
let n = `dds-console-group-${M()}`;
|
|
66
72
|
return (() => {
|
|
67
|
-
var i =
|
|
68
|
-
return
|
|
73
|
+
var i = V(Te), a = i.firstChild, o = a.nextSibling;
|
|
74
|
+
return q(i, "aria-labelledby", n), q(a, "id", n), U(a, () => t.label), U(o, z(E, {
|
|
69
75
|
get each() {
|
|
70
76
|
return t.items;
|
|
71
77
|
},
|
|
72
78
|
children: (t) => (() => {
|
|
73
|
-
var n =
|
|
74
|
-
return i.$$click = r,
|
|
79
|
+
var n = V(De), i = n.firstChild, a = i.firstChild, o = a.nextSibling, [s, c] = H(o.nextSibling);
|
|
80
|
+
return i.$$click = r, U(a, () => t.label), U(i, z(D, {
|
|
75
81
|
get when() {
|
|
76
|
-
return
|
|
82
|
+
return W(() => t.badge !== void 0)() && t.badge > 0;
|
|
77
83
|
},
|
|
78
84
|
get children() {
|
|
79
|
-
var n =
|
|
80
|
-
return
|
|
85
|
+
var n = V(Ee);
|
|
86
|
+
return U(n, () => t.badge), B(() => q(n, "aria-label", ke(e.labels.badge, t.badge))), n;
|
|
81
87
|
}
|
|
82
|
-
}), s, c),
|
|
83
|
-
var r = `${e.surface}.${t.id}`, a = t.href, o =
|
|
84
|
-
return r !== n.e &&
|
|
88
|
+
}), s, c), B((n) => {
|
|
89
|
+
var r = `${e.surface}.${t.id}`, a = t.href, o = Oe(e.activePath, t.href, t.active) ? "page" : void 0;
|
|
90
|
+
return r !== n.e && q(i, "data-nav", n.e = r), a !== n.t && q(i, "href", n.t = a), o !== n.a && q(i, "aria-current", n.a = o), n;
|
|
85
91
|
}, {
|
|
86
92
|
e: void 0,
|
|
87
93
|
t: void 0,
|
|
88
94
|
a: void 0
|
|
89
|
-
}),
|
|
95
|
+
}), K(), n;
|
|
90
96
|
})()
|
|
91
97
|
})), i;
|
|
92
98
|
})();
|
|
93
99
|
}
|
|
94
|
-
})),
|
|
100
|
+
})), U(u, z(D, {
|
|
95
101
|
get when() {
|
|
96
102
|
return e.foot;
|
|
97
103
|
},
|
|
98
104
|
get children() {
|
|
99
|
-
var t =
|
|
100
|
-
return
|
|
105
|
+
var t = V(be);
|
|
106
|
+
return U(t, () => e.foot), t;
|
|
101
107
|
}
|
|
102
|
-
}),
|
|
108
|
+
}), y, b), U(C, z(D, {
|
|
103
109
|
get when() {
|
|
104
110
|
return e.header.eyebrow;
|
|
105
111
|
},
|
|
106
112
|
get children() {
|
|
107
|
-
var t =
|
|
108
|
-
return
|
|
113
|
+
var t = V(xe);
|
|
114
|
+
return U(t, () => e.header.eyebrow), t;
|
|
109
115
|
}
|
|
110
|
-
}),
|
|
116
|
+
}), T, O), U(k, () => e.header.title), U(S, z(D, {
|
|
111
117
|
get when() {
|
|
112
118
|
return e.header.actions;
|
|
113
119
|
},
|
|
114
120
|
get children() {
|
|
115
|
-
var t =
|
|
116
|
-
return
|
|
121
|
+
var t = V(Se);
|
|
122
|
+
return U(t, () => e.header.actions), t;
|
|
117
123
|
}
|
|
118
|
-
}),
|
|
119
|
-
var r = e.surface, o = i() ? "true" : void 0, c = t(), p = t() ? "true" : "false", m = t() ? "true" : "false", h = e.brand.href, g = e.brand.mark,
|
|
120
|
-
return r !== n.e &&
|
|
124
|
+
}), j, N), U(x, () => e.children, F, I), B((n) => {
|
|
125
|
+
var r = e.surface, o = i() ? "true" : void 0, c = t(), p = t() ? "true" : "false", m = t() ? "true" : "false", h = e.brand.href, g = e.brand.mark, v = e.labels.nav;
|
|
126
|
+
return r !== n.e && q(a, "data-surface", n.e = r), o !== n.t && q(a, "data-hydrated", n.t = o), c !== n.a && q(s, "aria-expanded", n.a = c), p !== n.o && q(l, "data-open", n.o = p), m !== n.i && q(u, "data-open", n.i = m), h !== n.n && q(d, "href", n.n = h), g !== n.s && q(f, "src", n.s = g), v !== n.h && q(_, "aria-label", n.h = v), n;
|
|
121
127
|
}, {
|
|
122
128
|
e: void 0,
|
|
123
129
|
t: void 0,
|
|
@@ -127,13 +133,13 @@ function Ce(e) {
|
|
|
127
133
|
n: void 0,
|
|
128
134
|
s: void 0,
|
|
129
135
|
h: void 0
|
|
130
|
-
}),
|
|
136
|
+
}), K(), a;
|
|
131
137
|
})();
|
|
132
138
|
}
|
|
133
|
-
|
|
139
|
+
re(["click"]);
|
|
134
140
|
//#endregion
|
|
135
141
|
//#region src/dialog.tsx
|
|
136
|
-
var
|
|
142
|
+
var je = /*#__PURE__*/ J("<div>");
|
|
137
143
|
[
|
|
138
144
|
"a[href]",
|
|
139
145
|
"button:not([disabled])",
|
|
@@ -142,8 +148,8 @@ var we = /*#__PURE__*/ G("<div>");
|
|
|
142
148
|
"textarea:not([disabled])",
|
|
143
149
|
"[tabindex]:not([tabindex='-1'])"
|
|
144
150
|
].join(",");
|
|
145
|
-
function
|
|
146
|
-
let t =
|
|
151
|
+
function Me(e) {
|
|
152
|
+
let t = M(), n = () => e.id ?? `dds-dialog-${t}`, [r, i] = j(), a = se(() => ({
|
|
147
153
|
id: n(),
|
|
148
154
|
open: e.open,
|
|
149
155
|
defaultOpen: e.defaultOpen,
|
|
@@ -158,18 +164,18 @@ function Te(e) {
|
|
|
158
164
|
trapFocus: !e.additionalFocusContainers,
|
|
159
165
|
preventScroll: !0,
|
|
160
166
|
role: e.role ?? "dialog",
|
|
161
|
-
persistentElements:
|
|
167
|
+
persistentElements: ie ? [] : e.additionalFocusContainers?.().filter((e) => !!e).map((e) => () => e),
|
|
162
168
|
ids: {
|
|
163
169
|
content: n(),
|
|
164
170
|
title: `${n()}-title`,
|
|
165
171
|
description: `${n()}-description`
|
|
166
172
|
}
|
|
167
|
-
})), o =
|
|
168
|
-
|
|
173
|
+
})), o = A(() => a().open);
|
|
174
|
+
k(() => {
|
|
169
175
|
let t = r();
|
|
170
176
|
if (!o() || !e.additionalFocusContainers || !t) return;
|
|
171
|
-
let n = t.ownerDocument.activeElement, i, a, [s, c] =
|
|
172
|
-
i = new
|
|
177
|
+
let n = t.ownerDocument.activeElement, i, a, [s, c] = j(!1), l = () => [t, ...e.additionalFocusContainers().filter((e) => !!(e?.isConnected && e.ownerDocument === t.ownerDocument))], u = t.ownerDocument.defaultView.requestAnimationFrame(() => {
|
|
178
|
+
i = new le(l(), {
|
|
173
179
|
document: t.ownerDocument,
|
|
174
180
|
escapeDeactivates: !1,
|
|
175
181
|
allowOutsideClick: !0,
|
|
@@ -181,26 +187,26 @@ function Te(e) {
|
|
|
181
187
|
setReturnFocus: () => e.finalFocus?.() ?? (n instanceof HTMLElement && n.isConnected ? n : !1)
|
|
182
188
|
}), c(!0), i.activate();
|
|
183
189
|
});
|
|
184
|
-
|
|
190
|
+
k(() => {
|
|
185
191
|
if (!s()) return;
|
|
186
192
|
let e = l();
|
|
187
|
-
i.updateContainerElements(e), a?.(), a =
|
|
188
|
-
}),
|
|
193
|
+
i.updateContainerElements(e), a?.(), a = ue(e, { defer: !1 });
|
|
194
|
+
}), F(() => {
|
|
189
195
|
t.ownerDocument.defaultView.cancelAnimationFrame(u), a?.(), i?.deactivate({ returnFocus: e.restoreFocus !== !1 });
|
|
190
196
|
});
|
|
191
197
|
});
|
|
192
198
|
let s = (t, n) => c(e.unstyled ? void 0 : t, n), l = () => {
|
|
193
|
-
let t =
|
|
199
|
+
let t = ce(), r = (n) => z(te, G({ get component() {
|
|
194
200
|
return e.contentAs ?? "div";
|
|
195
201
|
} }, () => n({}), { ref: (e) => {
|
|
196
202
|
t().ref(e), i(e);
|
|
197
203
|
} }));
|
|
198
|
-
return
|
|
204
|
+
return z(Y.Positioner, {
|
|
199
205
|
get class() {
|
|
200
206
|
return s("dds-dialog-overlay", e.overlayClass);
|
|
201
207
|
},
|
|
202
208
|
get children() {
|
|
203
|
-
return
|
|
209
|
+
return z(Y.Content, G(() => e.contentProps, {
|
|
204
210
|
ref: i,
|
|
205
211
|
get class() {
|
|
206
212
|
return s("dds-dialog", e.class);
|
|
@@ -211,13 +217,13 @@ function Te(e) {
|
|
|
211
217
|
},
|
|
212
218
|
"aria-modal": "true",
|
|
213
219
|
get "aria-describedby"() {
|
|
214
|
-
return
|
|
220
|
+
return W(() => !!e.description)() ? `${n()}-description` : void 0;
|
|
215
221
|
},
|
|
216
222
|
get children() {
|
|
217
223
|
return (() => {
|
|
218
224
|
let t = {
|
|
219
225
|
get title() {
|
|
220
|
-
return
|
|
226
|
+
return z(Y.Title, {
|
|
221
227
|
get class() {
|
|
222
228
|
return s("dds-dialog__title", e.titleClass);
|
|
223
229
|
},
|
|
@@ -227,7 +233,7 @@ function Te(e) {
|
|
|
227
233
|
});
|
|
228
234
|
},
|
|
229
235
|
get description() {
|
|
230
|
-
return e.description &&
|
|
236
|
+
return e.description && z(Y.Description, {
|
|
231
237
|
get class() {
|
|
232
238
|
return s("dds-dialog__body", e.descriptionClass);
|
|
233
239
|
},
|
|
@@ -241,16 +247,16 @@ function Te(e) {
|
|
|
241
247
|
},
|
|
242
248
|
get actions() {
|
|
243
249
|
return e.actions && (() => {
|
|
244
|
-
var t =
|
|
245
|
-
return
|
|
250
|
+
var t = V(je);
|
|
251
|
+
return U(t, () => e.actions), B(() => R(t, s("dds-dialog__actions", e.actionsClass))), t;
|
|
246
252
|
})();
|
|
247
253
|
}
|
|
248
254
|
};
|
|
249
255
|
return e.frame ? e.frame(t) : [
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
256
|
+
W(() => t.title),
|
|
257
|
+
W(() => t.description),
|
|
258
|
+
W(() => t.children),
|
|
259
|
+
W(() => t.actions)
|
|
254
260
|
];
|
|
255
261
|
})();
|
|
256
262
|
}
|
|
@@ -258,21 +264,21 @@ function Te(e) {
|
|
|
258
264
|
}
|
|
259
265
|
});
|
|
260
266
|
};
|
|
261
|
-
return
|
|
267
|
+
return z(Y.RootProvider, {
|
|
262
268
|
value: a,
|
|
263
269
|
lazyMount: !0,
|
|
264
270
|
unmountOnExit: !0,
|
|
265
271
|
get children() {
|
|
266
|
-
return
|
|
272
|
+
return z(D, {
|
|
267
273
|
get when() {
|
|
268
274
|
return e.portal;
|
|
269
275
|
},
|
|
270
276
|
get fallback() {
|
|
271
|
-
return
|
|
277
|
+
return z(l, {});
|
|
272
278
|
},
|
|
273
279
|
get children() {
|
|
274
|
-
return
|
|
275
|
-
return
|
|
280
|
+
return z(ne, G(() => e.portalMount ? { mount: e.portalMount } : {}, { get children() {
|
|
281
|
+
return z(l, {});
|
|
276
282
|
} }));
|
|
277
283
|
}
|
|
278
284
|
});
|
|
@@ -281,9 +287,9 @@ function Te(e) {
|
|
|
281
287
|
}
|
|
282
288
|
//#endregion
|
|
283
289
|
//#region src/radio-group.tsx
|
|
284
|
-
function
|
|
290
|
+
function Ne(e) {
|
|
285
291
|
let t = e.value ?? e.defaultValue;
|
|
286
|
-
return
|
|
292
|
+
return z(X.Root, {
|
|
287
293
|
get value() {
|
|
288
294
|
return e.value;
|
|
289
295
|
},
|
|
@@ -309,16 +315,16 @@ function Ee(e) {
|
|
|
309
315
|
return c("dds-radio-group", e.class);
|
|
310
316
|
},
|
|
311
317
|
get children() {
|
|
312
|
-
return [
|
|
318
|
+
return [z(X.Label, {
|
|
313
319
|
class: "dds-field__label",
|
|
314
320
|
get children() {
|
|
315
321
|
return e.label;
|
|
316
322
|
}
|
|
317
|
-
}),
|
|
323
|
+
}), z(E, {
|
|
318
324
|
get each() {
|
|
319
325
|
return e.options;
|
|
320
326
|
},
|
|
321
|
-
children: (e) =>
|
|
327
|
+
children: (e) => z(X.Item, {
|
|
322
328
|
get value() {
|
|
323
329
|
return e.value;
|
|
324
330
|
},
|
|
@@ -327,13 +333,13 @@ function Ee(e) {
|
|
|
327
333
|
},
|
|
328
334
|
class: "dds-check",
|
|
329
335
|
get children() {
|
|
330
|
-
return [
|
|
336
|
+
return [z(X.ItemHiddenInput, {
|
|
331
337
|
class: "dds-check__input",
|
|
332
338
|
style: {},
|
|
333
339
|
ref: (n) => {
|
|
334
340
|
n.defaultChecked = t === e.value;
|
|
335
341
|
}
|
|
336
|
-
}),
|
|
342
|
+
}), z(X.ItemText, { get children() {
|
|
337
343
|
return e.label;
|
|
338
344
|
} })];
|
|
339
345
|
}
|
|
@@ -344,20 +350,20 @@ function Ee(e) {
|
|
|
344
350
|
}
|
|
345
351
|
//#endregion
|
|
346
352
|
//#region src/icon.tsx
|
|
347
|
-
var
|
|
348
|
-
function
|
|
349
|
-
let [t, n] =
|
|
353
|
+
var Pe = /*#__PURE__*/ J("<svg><!$><!/><g>"), Fe = /*#__PURE__*/ J("<title>");
|
|
354
|
+
function Ie(e) {
|
|
355
|
+
let [t, n] = L(e, [
|
|
350
356
|
"name",
|
|
351
357
|
"label",
|
|
352
358
|
"size",
|
|
353
359
|
"directional",
|
|
354
360
|
"class"
|
|
355
|
-
]), r = () =>
|
|
361
|
+
]), r = () => fe[t.name], i = () => t.directional ?? de.mirrorInRtl.includes(t.name);
|
|
356
362
|
return (() => {
|
|
357
|
-
var e =
|
|
358
|
-
return
|
|
363
|
+
var e = V(Pe), a = e.firstChild, [o, s] = H(a.nextSibling), l = o.nextSibling;
|
|
364
|
+
return oe(e, G(n, {
|
|
359
365
|
get class() {
|
|
360
|
-
return c(i() &&
|
|
366
|
+
return c(i() && de.cssClass, t.class);
|
|
361
367
|
},
|
|
362
368
|
get viewBox() {
|
|
363
369
|
return r().viewBox;
|
|
@@ -384,22 +390,22 @@ function ke(e) {
|
|
|
384
390
|
get "aria-hidden"() {
|
|
385
391
|
return t.label ? void 0 : "true";
|
|
386
392
|
}
|
|
387
|
-
}), !0, !0),
|
|
388
|
-
var e =
|
|
393
|
+
}), !0, !0), U(e, (() => {
|
|
394
|
+
var e = W(() => !!t.label);
|
|
389
395
|
return () => e() && (() => {
|
|
390
|
-
var e =
|
|
391
|
-
return
|
|
396
|
+
var e = V(Fe);
|
|
397
|
+
return U(e, () => t.label), e;
|
|
392
398
|
})();
|
|
393
|
-
})(), o, s),
|
|
399
|
+
})(), o, s), B(() => ae(l, "innerHTML", r().body)), K(), e;
|
|
394
400
|
})();
|
|
395
401
|
}
|
|
396
402
|
//#endregion
|
|
397
403
|
//#region src/pending-action.ts
|
|
398
|
-
function
|
|
399
|
-
let [e, t] =
|
|
404
|
+
function Le() {
|
|
405
|
+
let [e, t] = j(null), n = null, r = !1, i = () => {
|
|
400
406
|
n?.abort(), n = null;
|
|
401
407
|
};
|
|
402
|
-
return
|
|
408
|
+
return N() && F(() => {
|
|
403
409
|
r = !0, i();
|
|
404
410
|
}), {
|
|
405
411
|
current: e,
|
|
@@ -423,8 +429,8 @@ function Ae() {
|
|
|
423
429
|
}
|
|
424
430
|
//#endregion
|
|
425
431
|
//#region src/status-pill.tsx
|
|
426
|
-
var
|
|
427
|
-
function
|
|
432
|
+
var Re = /*#__PURE__*/ J("<code>"), ze = /*#__PURE__*/ J("<span>");
|
|
433
|
+
function Be(e) {
|
|
428
434
|
let t = new Set(e.openDomains ?? []);
|
|
429
435
|
return function(n) {
|
|
430
436
|
let r = () => e.tones[n.domain]?.[n.value], i = () => e.label(n.domain, n.value, n.locale), a = () => !!(r() && i()), o = () => {
|
|
@@ -437,24 +443,24 @@ function Ne(e) {
|
|
|
437
443
|
text: t
|
|
438
444
|
};
|
|
439
445
|
};
|
|
440
|
-
return
|
|
446
|
+
return z(D, {
|
|
441
447
|
get when() {
|
|
442
448
|
return a() || !t.has(n.domain);
|
|
443
449
|
},
|
|
444
450
|
get fallback() {
|
|
445
451
|
return (() => {
|
|
446
|
-
var e =
|
|
447
|
-
return
|
|
452
|
+
var e = V(Re);
|
|
453
|
+
return U(e, () => n.value), B(() => q(e, "data-status", `${n.domain}.${n.value}`)), e;
|
|
448
454
|
})();
|
|
449
455
|
},
|
|
450
456
|
get children() {
|
|
451
457
|
return (() => {
|
|
452
458
|
let e = o();
|
|
453
459
|
return (() => {
|
|
454
|
-
var t =
|
|
455
|
-
return
|
|
460
|
+
var t = V(ze);
|
|
461
|
+
return U(t, () => e.text), B((r) => {
|
|
456
462
|
var i = e.tone === "neutral" ? "dds-badge" : `dds-badge dds-badge--${e.tone}`, a = `${n.domain}.${n.value}`, o = e.tone;
|
|
457
|
-
return i !== r.e &&
|
|
463
|
+
return i !== r.e && R(t, r.e = i), a !== r.t && q(t, "data-status", r.t = a), o !== r.a && q(t, "data-tone", r.a = o), r;
|
|
458
464
|
}, {
|
|
459
465
|
e: void 0,
|
|
460
466
|
t: void 0,
|
|
@@ -467,34 +473,17 @@ function Ne(e) {
|
|
|
467
473
|
};
|
|
468
474
|
}
|
|
469
475
|
//#endregion
|
|
470
|
-
//#region src/direction.ts
|
|
471
|
-
function Pe(e, t) {
|
|
472
|
-
let [n, r] = S("ltr");
|
|
473
|
-
return D(() => {
|
|
474
|
-
let t = e()?.parentElement;
|
|
475
|
-
if (!t) return;
|
|
476
|
-
let n = () => r(getComputedStyle(t).direction === "rtl" ? "rtl" : "ltr");
|
|
477
|
-
n();
|
|
478
|
-
let i = new MutationObserver(n);
|
|
479
|
-
i.observe(t.ownerDocument.documentElement, {
|
|
480
|
-
attributes: !0,
|
|
481
|
-
subtree: !0,
|
|
482
|
-
attributeFilter: ["dir"]
|
|
483
|
-
}), E(() => i.disconnect());
|
|
484
|
-
}), () => t() ?? n();
|
|
485
|
-
}
|
|
486
|
-
//#endregion
|
|
487
476
|
//#region src/tabs.tsx
|
|
488
|
-
function
|
|
489
|
-
let t =
|
|
477
|
+
function Ve(e) {
|
|
478
|
+
let t = M(), n = () => e.id ?? `dds-tabs-${t}`, r, i = l(() => r, () => e.dir), a = e.asChild ? (t) => e.asChild(P(t({}), { ref: (e) => {
|
|
490
479
|
r = e;
|
|
491
480
|
} })) : void 0;
|
|
492
|
-
return
|
|
481
|
+
return z(me, {
|
|
493
482
|
get locale() {
|
|
494
483
|
return i() === "rtl" ? "ar" : "en";
|
|
495
484
|
},
|
|
496
485
|
get children() {
|
|
497
|
-
return
|
|
486
|
+
return z(Z.Root, G({
|
|
498
487
|
ref(e) {
|
|
499
488
|
var t = r;
|
|
500
489
|
typeof t == "function" ? t(e) : r = e;
|
|
@@ -532,13 +521,13 @@ function Fe(e) {
|
|
|
532
521
|
}
|
|
533
522
|
});
|
|
534
523
|
}
|
|
535
|
-
function
|
|
536
|
-
let [t, n] =
|
|
524
|
+
function He(e) {
|
|
525
|
+
let [t, n] = L(e, [
|
|
537
526
|
"class",
|
|
538
527
|
"children",
|
|
539
528
|
"unstyled"
|
|
540
529
|
]);
|
|
541
|
-
return
|
|
530
|
+
return z(Z.List, G(n, {
|
|
542
531
|
get class() {
|
|
543
532
|
return c(!t.unstyled && "dds-tabs", t.class);
|
|
544
533
|
},
|
|
@@ -547,15 +536,15 @@ function Ie(e) {
|
|
|
547
536
|
}
|
|
548
537
|
}));
|
|
549
538
|
}
|
|
550
|
-
function
|
|
551
|
-
let [t, n] =
|
|
539
|
+
function Ue(e) {
|
|
540
|
+
let [t, n] = L(e, [
|
|
552
541
|
"class",
|
|
553
542
|
"children",
|
|
554
543
|
"value",
|
|
555
544
|
"unstyled",
|
|
556
545
|
"asChild"
|
|
557
|
-
]), r = t.asChild ? (n) => t.asChild(
|
|
558
|
-
return
|
|
546
|
+
]), r = t.asChild ? (n) => t.asChild(P(n({}), { ref: e.ref })) : void 0;
|
|
547
|
+
return z(Z.Trigger, G(n, {
|
|
559
548
|
get value() {
|
|
560
549
|
return t.value;
|
|
561
550
|
},
|
|
@@ -566,16 +555,16 @@ function Le(e) {
|
|
|
566
555
|
return t.children;
|
|
567
556
|
} }));
|
|
568
557
|
}
|
|
569
|
-
function
|
|
570
|
-
let [t, n] =
|
|
558
|
+
function We(e) {
|
|
559
|
+
let [t, n] = L(e, [
|
|
571
560
|
"value",
|
|
572
561
|
"children",
|
|
573
562
|
"style"
|
|
574
|
-
]), r =
|
|
563
|
+
]), r = pe(), i = () => r().value !== t.value, a = () => i() ? typeof t.style == "string" ? `${t.style.replace(/;+\s*$/, "")};display:none;` : {
|
|
575
564
|
...t.style,
|
|
576
565
|
display: "none"
|
|
577
566
|
} : t.style;
|
|
578
|
-
return
|
|
567
|
+
return z(Z.Content, G(n, {
|
|
579
568
|
get value() {
|
|
580
569
|
return t.value;
|
|
581
570
|
},
|
|
@@ -595,16 +584,16 @@ function Re(e) {
|
|
|
595
584
|
}
|
|
596
585
|
//#endregion
|
|
597
586
|
//#region src/toast.tsx
|
|
598
|
-
var
|
|
599
|
-
function
|
|
600
|
-
let t =
|
|
587
|
+
var Ge = O();
|
|
588
|
+
function Ke(e) {
|
|
589
|
+
let t = M(), n, r, i = () => r ??= new Proxy(n?.ownerDocument ?? document, { get(e, t) {
|
|
601
590
|
if (t === "getElementById") return (t) => t === "toast-group:bottom-end" ? n ?? null : e.getElementById(t);
|
|
602
591
|
let r = Reflect.get(e, t, e);
|
|
603
592
|
return typeof r == "function" ? r.bind(e) : r;
|
|
604
|
-
} }), a =
|
|
593
|
+
} }), a = ge({
|
|
605
594
|
placement: "bottom-end",
|
|
606
595
|
overlap: !1,
|
|
607
|
-
gap:
|
|
596
|
+
gap: _e[8],
|
|
608
597
|
offsets: "var(--dds-space-16)",
|
|
609
598
|
removeDelay: 0,
|
|
610
599
|
hotkey: ["DDS_NO_HOTKEY"],
|
|
@@ -627,10 +616,10 @@ function ze(e) {
|
|
|
627
616
|
dismiss: (e) => a.remove(e),
|
|
628
617
|
clear: () => a.remove()
|
|
629
618
|
};
|
|
630
|
-
return
|
|
619
|
+
return F(s.clear), z(Ge.Provider, {
|
|
631
620
|
value: s,
|
|
632
621
|
get children() {
|
|
633
|
-
return [
|
|
622
|
+
return [W(() => e.children), z(he, {
|
|
634
623
|
toaster: a,
|
|
635
624
|
ref(e) {
|
|
636
625
|
var t = n;
|
|
@@ -649,7 +638,7 @@ function ze(e) {
|
|
|
649
638
|
},
|
|
650
639
|
children: (t) => {
|
|
651
640
|
let n = () => t().meta?.dds;
|
|
652
|
-
return
|
|
641
|
+
return z(Q.Root, {
|
|
653
642
|
get class() {
|
|
654
643
|
return c("dds-toast", `dds-toast--${n().tone ?? "info"}`);
|
|
655
644
|
},
|
|
@@ -657,12 +646,12 @@ function ze(e) {
|
|
|
657
646
|
return n().tone === "danger" ? "alert" : "status";
|
|
658
647
|
},
|
|
659
648
|
get children() {
|
|
660
|
-
return [
|
|
649
|
+
return [z(Q.Description, { get children() {
|
|
661
650
|
return t().description;
|
|
662
|
-
} }),
|
|
651
|
+
} }), W(() => W(() => !!e.dismissLabel)() && z(Q.CloseTrigger, {
|
|
663
652
|
class: "dds-iconbtn dds-iconbtn--sm",
|
|
664
653
|
get "aria-label"() {
|
|
665
|
-
return
|
|
654
|
+
return W(() => typeof e.dismissLabel == "function")() ? e.dismissLabel(n()) : e.dismissLabel;
|
|
666
655
|
},
|
|
667
656
|
children: "×"
|
|
668
657
|
}))];
|
|
@@ -673,20 +662,20 @@ function ze(e) {
|
|
|
673
662
|
}
|
|
674
663
|
});
|
|
675
664
|
}
|
|
676
|
-
function
|
|
677
|
-
let e =
|
|
665
|
+
function qe() {
|
|
666
|
+
let e = ee(Ge);
|
|
678
667
|
if (!e) throw Error("useToast must be called inside <ToastProvider>");
|
|
679
668
|
return e;
|
|
680
669
|
}
|
|
681
670
|
//#endregion
|
|
682
671
|
//#region src/tooltip.tsx
|
|
683
|
-
var
|
|
684
|
-
function
|
|
685
|
-
let t =
|
|
672
|
+
var Je = /*#__PURE__*/ J("<span><!$><!/><!$><!/>");
|
|
673
|
+
function Ye(e) {
|
|
674
|
+
let t = M(), n = () => e.id ?? `dds-tooltip-${t}`, [i, a] = r({
|
|
686
675
|
value: () => e.open,
|
|
687
676
|
defaultValue: e.defaultOpen ?? !1,
|
|
688
677
|
onChange: (t) => e.onOpenChange?.(t)
|
|
689
|
-
}), o =
|
|
678
|
+
}), o = ve(() => ({
|
|
690
679
|
id: n(),
|
|
691
680
|
ids: { content: n() },
|
|
692
681
|
open: i(),
|
|
@@ -694,14 +683,14 @@ function Ve(e) {
|
|
|
694
683
|
openDelay: 0,
|
|
695
684
|
closeDelay: 0
|
|
696
685
|
}));
|
|
697
|
-
return
|
|
686
|
+
return z($.RootProvider, {
|
|
698
687
|
value: o,
|
|
699
688
|
lazyMount: !1,
|
|
700
689
|
unmountOnExit: !1,
|
|
701
690
|
get children() {
|
|
702
|
-
var t =
|
|
703
|
-
return
|
|
704
|
-
let [, r] =
|
|
691
|
+
var t = V(Je), r = t.firstChild, [i, a] = H(r.nextSibling), s = i.nextSibling, [l, u] = H(s.nextSibling);
|
|
692
|
+
return U(t, z($.Trigger, { asChild: (t) => {
|
|
693
|
+
let [, r] = L(t(), ["onFocusIn", "onFocusOut"]);
|
|
705
694
|
return e.children({
|
|
706
695
|
...r,
|
|
707
696
|
"aria-describedby": n(),
|
|
@@ -710,18 +699,18 @@ function Ve(e) {
|
|
|
710
699
|
onPointerEnter: () => o().setOpen(!0),
|
|
711
700
|
onPointerLeave: () => o().setOpen(!1)
|
|
712
701
|
});
|
|
713
|
-
} }), i, a),
|
|
714
|
-
return
|
|
702
|
+
} }), i, a), U(t, z($.Positioner, { get children() {
|
|
703
|
+
return z($.Content, {
|
|
715
704
|
class: "dds-tooltip__bubble",
|
|
716
705
|
get children() {
|
|
717
706
|
return e.content;
|
|
718
707
|
}
|
|
719
708
|
});
|
|
720
|
-
} }), l, u),
|
|
709
|
+
} }), l, u), B(() => R(t, c("dds-tooltip", e.class))), t;
|
|
721
710
|
}
|
|
722
711
|
});
|
|
723
712
|
}
|
|
724
713
|
//#endregion
|
|
725
|
-
export {
|
|
714
|
+
export { i as Button, b as Calendar, o as Checkbox, g as Combobox, Ae as ConsoleShell, u as DatePicker, f as DateRangePicker, Me as Dialog, v as DropdownMenu, n as Field, Ie as Icon, e as IconButton, m as Input, h as InputGroup, p as MonthPicker, C as NumberInput, y as Popover, a as Radio, Ne as RadioGroup, x as SegmentedControl, s as Select, _ as SelectPicker, t as Switch, Ue as Tab, He as TabList, We as TabPanel, Ve as Tabs, d as TimePicker, Ke as ToastProvider, Ye as Tooltip, r as createControllableSignal, Le as createPendingAction, Be as createStatusPill, w as normalizeNumberText, T as numberInputMessages, qe as useToast, S as validateSegmentedItems };
|
|
726
715
|
|
|
727
716
|
//# sourceMappingURL=index.js.map
|