@devslab/dds-solid 0.22.1 → 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 +49 -3
- package/README.md +47 -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 +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +193 -176
- 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/pending-action.d.ts +36 -0
- package/dist/pending-action.d.ts.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 +49 -23
- 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 Se(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 Ce = /*#__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 we(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 we(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 we(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 we(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 we(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 we(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 we(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 Te(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 Te(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 Te(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,19 +390,47 @@ function Oe(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
|
|
403
|
+
//#region src/pending-action.ts
|
|
404
|
+
function Le() {
|
|
405
|
+
let [e, t] = j(null), n = null, r = !1, i = () => {
|
|
406
|
+
n?.abort(), n = null;
|
|
407
|
+
};
|
|
408
|
+
return N() && F(() => {
|
|
409
|
+
r = !0, i();
|
|
410
|
+
}), {
|
|
411
|
+
current: e,
|
|
412
|
+
busy: () => e() !== null,
|
|
413
|
+
is: (t) => e() === t,
|
|
414
|
+
async run(e, a, o) {
|
|
415
|
+
if (r || n && !o?.replace) return;
|
|
416
|
+
i();
|
|
417
|
+
let s = new AbortController();
|
|
418
|
+
n = s, t(() => e);
|
|
419
|
+
try {
|
|
420
|
+
return await a(s.signal);
|
|
421
|
+
} finally {
|
|
422
|
+
n === s && (n = null, t(null));
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
reset() {
|
|
426
|
+
i(), t(null);
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
//#endregion
|
|
397
431
|
//#region src/status-pill.tsx
|
|
398
|
-
var
|
|
399
|
-
function
|
|
432
|
+
var Re = /*#__PURE__*/ J("<code>"), ze = /*#__PURE__*/ J("<span>");
|
|
433
|
+
function Be(e) {
|
|
400
434
|
let t = new Set(e.openDomains ?? []);
|
|
401
435
|
return function(n) {
|
|
402
436
|
let r = () => e.tones[n.domain]?.[n.value], i = () => e.label(n.domain, n.value, n.locale), a = () => !!(r() && i()), o = () => {
|
|
@@ -409,24 +443,24 @@ function je(e) {
|
|
|
409
443
|
text: t
|
|
410
444
|
};
|
|
411
445
|
};
|
|
412
|
-
return
|
|
446
|
+
return z(D, {
|
|
413
447
|
get when() {
|
|
414
448
|
return a() || !t.has(n.domain);
|
|
415
449
|
},
|
|
416
450
|
get fallback() {
|
|
417
451
|
return (() => {
|
|
418
|
-
var e =
|
|
419
|
-
return
|
|
452
|
+
var e = V(Re);
|
|
453
|
+
return U(e, () => n.value), B(() => q(e, "data-status", `${n.domain}.${n.value}`)), e;
|
|
420
454
|
})();
|
|
421
455
|
},
|
|
422
456
|
get children() {
|
|
423
457
|
return (() => {
|
|
424
458
|
let e = o();
|
|
425
459
|
return (() => {
|
|
426
|
-
var t =
|
|
427
|
-
return
|
|
460
|
+
var t = V(ze);
|
|
461
|
+
return U(t, () => e.text), B((r) => {
|
|
428
462
|
var i = e.tone === "neutral" ? "dds-badge" : `dds-badge dds-badge--${e.tone}`, a = `${n.domain}.${n.value}`, o = e.tone;
|
|
429
|
-
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;
|
|
430
464
|
}, {
|
|
431
465
|
e: void 0,
|
|
432
466
|
t: void 0,
|
|
@@ -439,34 +473,17 @@ function je(e) {
|
|
|
439
473
|
};
|
|
440
474
|
}
|
|
441
475
|
//#endregion
|
|
442
|
-
//#region src/direction.ts
|
|
443
|
-
function Me(e, t) {
|
|
444
|
-
let [n, r] = S("ltr");
|
|
445
|
-
return E(() => {
|
|
446
|
-
let t = e()?.parentElement;
|
|
447
|
-
if (!t) return;
|
|
448
|
-
let n = () => r(getComputedStyle(t).direction === "rtl" ? "rtl" : "ltr");
|
|
449
|
-
n();
|
|
450
|
-
let i = new MutationObserver(n);
|
|
451
|
-
i.observe(t.ownerDocument.documentElement, {
|
|
452
|
-
attributes: !0,
|
|
453
|
-
subtree: !0,
|
|
454
|
-
attributeFilter: ["dir"]
|
|
455
|
-
}), T(() => i.disconnect());
|
|
456
|
-
}), () => t() ?? n();
|
|
457
|
-
}
|
|
458
|
-
//#endregion
|
|
459
476
|
//#region src/tabs.tsx
|
|
460
|
-
function
|
|
461
|
-
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) => {
|
|
462
479
|
r = e;
|
|
463
480
|
} })) : void 0;
|
|
464
|
-
return
|
|
481
|
+
return z(me, {
|
|
465
482
|
get locale() {
|
|
466
483
|
return i() === "rtl" ? "ar" : "en";
|
|
467
484
|
},
|
|
468
485
|
get children() {
|
|
469
|
-
return
|
|
486
|
+
return z(Z.Root, G({
|
|
470
487
|
ref(e) {
|
|
471
488
|
var t = r;
|
|
472
489
|
typeof t == "function" ? t(e) : r = e;
|
|
@@ -504,13 +521,13 @@ function Ne(e) {
|
|
|
504
521
|
}
|
|
505
522
|
});
|
|
506
523
|
}
|
|
507
|
-
function
|
|
508
|
-
let [t, n] =
|
|
524
|
+
function He(e) {
|
|
525
|
+
let [t, n] = L(e, [
|
|
509
526
|
"class",
|
|
510
527
|
"children",
|
|
511
528
|
"unstyled"
|
|
512
529
|
]);
|
|
513
|
-
return
|
|
530
|
+
return z(Z.List, G(n, {
|
|
514
531
|
get class() {
|
|
515
532
|
return c(!t.unstyled && "dds-tabs", t.class);
|
|
516
533
|
},
|
|
@@ -519,15 +536,15 @@ function Pe(e) {
|
|
|
519
536
|
}
|
|
520
537
|
}));
|
|
521
538
|
}
|
|
522
|
-
function
|
|
523
|
-
let [t, n] =
|
|
539
|
+
function Ue(e) {
|
|
540
|
+
let [t, n] = L(e, [
|
|
524
541
|
"class",
|
|
525
542
|
"children",
|
|
526
543
|
"value",
|
|
527
544
|
"unstyled",
|
|
528
545
|
"asChild"
|
|
529
|
-
]), r = t.asChild ? (n) => t.asChild(
|
|
530
|
-
return
|
|
546
|
+
]), r = t.asChild ? (n) => t.asChild(P(n({}), { ref: e.ref })) : void 0;
|
|
547
|
+
return z(Z.Trigger, G(n, {
|
|
531
548
|
get value() {
|
|
532
549
|
return t.value;
|
|
533
550
|
},
|
|
@@ -538,16 +555,16 @@ function Q(e) {
|
|
|
538
555
|
return t.children;
|
|
539
556
|
} }));
|
|
540
557
|
}
|
|
541
|
-
function
|
|
542
|
-
let [t, n] =
|
|
558
|
+
function We(e) {
|
|
559
|
+
let [t, n] = L(e, [
|
|
543
560
|
"value",
|
|
544
561
|
"children",
|
|
545
562
|
"style"
|
|
546
|
-
]), r =
|
|
563
|
+
]), r = pe(), i = () => r().value !== t.value, a = () => i() ? typeof t.style == "string" ? `${t.style.replace(/;+\s*$/, "")};display:none;` : {
|
|
547
564
|
...t.style,
|
|
548
565
|
display: "none"
|
|
549
566
|
} : t.style;
|
|
550
|
-
return
|
|
567
|
+
return z(Z.Content, G(n, {
|
|
551
568
|
get value() {
|
|
552
569
|
return t.value;
|
|
553
570
|
},
|
|
@@ -567,16 +584,16 @@ function Fe(e) {
|
|
|
567
584
|
}
|
|
568
585
|
//#endregion
|
|
569
586
|
//#region src/toast.tsx
|
|
570
|
-
var
|
|
571
|
-
function
|
|
572
|
-
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) {
|
|
573
590
|
if (t === "getElementById") return (t) => t === "toast-group:bottom-end" ? n ?? null : e.getElementById(t);
|
|
574
591
|
let r = Reflect.get(e, t, e);
|
|
575
592
|
return typeof r == "function" ? r.bind(e) : r;
|
|
576
|
-
} }), a =
|
|
593
|
+
} }), a = ge({
|
|
577
594
|
placement: "bottom-end",
|
|
578
595
|
overlap: !1,
|
|
579
|
-
gap:
|
|
596
|
+
gap: _e[8],
|
|
580
597
|
offsets: "var(--dds-space-16)",
|
|
581
598
|
removeDelay: 0,
|
|
582
599
|
hotkey: ["DDS_NO_HOTKEY"],
|
|
@@ -599,10 +616,10 @@ function Ie(e) {
|
|
|
599
616
|
dismiss: (e) => a.remove(e),
|
|
600
617
|
clear: () => a.remove()
|
|
601
618
|
};
|
|
602
|
-
return
|
|
619
|
+
return F(s.clear), z(Ge.Provider, {
|
|
603
620
|
value: s,
|
|
604
621
|
get children() {
|
|
605
|
-
return [
|
|
622
|
+
return [W(() => e.children), z(he, {
|
|
606
623
|
toaster: a,
|
|
607
624
|
ref(e) {
|
|
608
625
|
var t = n;
|
|
@@ -621,7 +638,7 @@ function Ie(e) {
|
|
|
621
638
|
},
|
|
622
639
|
children: (t) => {
|
|
623
640
|
let n = () => t().meta?.dds;
|
|
624
|
-
return
|
|
641
|
+
return z(Q.Root, {
|
|
625
642
|
get class() {
|
|
626
643
|
return c("dds-toast", `dds-toast--${n().tone ?? "info"}`);
|
|
627
644
|
},
|
|
@@ -629,12 +646,12 @@ function Ie(e) {
|
|
|
629
646
|
return n().tone === "danger" ? "alert" : "status";
|
|
630
647
|
},
|
|
631
648
|
get children() {
|
|
632
|
-
return [
|
|
649
|
+
return [z(Q.Description, { get children() {
|
|
633
650
|
return t().description;
|
|
634
|
-
} }),
|
|
651
|
+
} }), W(() => W(() => !!e.dismissLabel)() && z(Q.CloseTrigger, {
|
|
635
652
|
class: "dds-iconbtn dds-iconbtn--sm",
|
|
636
653
|
get "aria-label"() {
|
|
637
|
-
return
|
|
654
|
+
return W(() => typeof e.dismissLabel == "function")() ? e.dismissLabel(n()) : e.dismissLabel;
|
|
638
655
|
},
|
|
639
656
|
children: "×"
|
|
640
657
|
}))];
|
|
@@ -645,20 +662,20 @@ function Ie(e) {
|
|
|
645
662
|
}
|
|
646
663
|
});
|
|
647
664
|
}
|
|
648
|
-
function
|
|
649
|
-
let e =
|
|
665
|
+
function qe() {
|
|
666
|
+
let e = ee(Ge);
|
|
650
667
|
if (!e) throw Error("useToast must be called inside <ToastProvider>");
|
|
651
668
|
return e;
|
|
652
669
|
}
|
|
653
670
|
//#endregion
|
|
654
671
|
//#region src/tooltip.tsx
|
|
655
|
-
var
|
|
656
|
-
function
|
|
657
|
-
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({
|
|
658
675
|
value: () => e.open,
|
|
659
676
|
defaultValue: e.defaultOpen ?? !1,
|
|
660
677
|
onChange: (t) => e.onOpenChange?.(t)
|
|
661
|
-
}), o =
|
|
678
|
+
}), o = ve(() => ({
|
|
662
679
|
id: n(),
|
|
663
680
|
ids: { content: n() },
|
|
664
681
|
open: i(),
|
|
@@ -666,14 +683,14 @@ function ze(e) {
|
|
|
666
683
|
openDelay: 0,
|
|
667
684
|
closeDelay: 0
|
|
668
685
|
}));
|
|
669
|
-
return
|
|
686
|
+
return z($.RootProvider, {
|
|
670
687
|
value: o,
|
|
671
688
|
lazyMount: !1,
|
|
672
689
|
unmountOnExit: !1,
|
|
673
690
|
get children() {
|
|
674
|
-
var t =
|
|
675
|
-
return
|
|
676
|
-
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"]);
|
|
677
694
|
return e.children({
|
|
678
695
|
...r,
|
|
679
696
|
"aria-describedby": n(),
|
|
@@ -682,18 +699,18 @@ function ze(e) {
|
|
|
682
699
|
onPointerEnter: () => o().setOpen(!0),
|
|
683
700
|
onPointerLeave: () => o().setOpen(!1)
|
|
684
701
|
});
|
|
685
|
-
} }), i, a),
|
|
686
|
-
return
|
|
702
|
+
} }), i, a), U(t, z($.Positioner, { get children() {
|
|
703
|
+
return z($.Content, {
|
|
687
704
|
class: "dds-tooltip__bubble",
|
|
688
705
|
get children() {
|
|
689
706
|
return e.content;
|
|
690
707
|
}
|
|
691
708
|
});
|
|
692
|
-
} }), l, u),
|
|
709
|
+
} }), l, u), B(() => R(t, c("dds-tooltip", e.class))), t;
|
|
693
710
|
}
|
|
694
711
|
});
|
|
695
712
|
}
|
|
696
713
|
//#endregion
|
|
697
|
-
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 };
|
|
698
715
|
|
|
699
716
|
//# sourceMappingURL=index.js.map
|