@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.
Files changed (89) hide show
  1. package/README.ko.md +49 -3
  2. package/README.md +47 -3
  3. package/dist/assets/{calendar-view-1RO2mtf1.js → calendar-view-BBQGmkJ7.js} +181 -145
  4. package/dist/assets/calendar-view-BBQGmkJ7.js.map +1 -0
  5. package/dist/assets/{choice-DoXiK8nc.js → choice-DPmk9AHn.js} +41 -29
  6. package/dist/assets/choice-DPmk9AHn.js.map +1 -0
  7. package/dist/assets/choice-types-h4YVL8xH.js +24 -0
  8. package/dist/assets/choice-types-h4YVL8xH.js.map +1 -0
  9. package/dist/assets/date-only-0Ldsjp43.js +174 -0
  10. package/dist/assets/date-only-0Ldsjp43.js.map +1 -0
  11. package/dist/assets/direction-BpTqmXs-.js +24 -0
  12. package/dist/assets/direction-BpTqmXs-.js.map +1 -0
  13. package/dist/calendar-view-CZLsC57_.js +481 -0
  14. package/dist/calendar-view-CZLsC57_.js.map +1 -0
  15. package/dist/calendar-view.d.ts +10 -0
  16. package/dist/calendar-view.d.ts.map +1 -1
  17. package/dist/calendar.js +7 -6
  18. package/dist/calendar.js.map +1 -1
  19. package/dist/calendar.server.js +2 -1
  20. package/dist/calendar.server.js.map +1 -1
  21. package/dist/choice-CTNeFOVo.js +403 -0
  22. package/dist/choice-CTNeFOVo.js.map +1 -0
  23. package/dist/choice-types-kSaEnZPr.js +23 -0
  24. package/dist/choice-types-kSaEnZPr.js.map +1 -0
  25. package/dist/combobox.js +1 -1
  26. package/dist/combobox.server.js +1 -1
  27. package/dist/date-only-Bu4UmsTP.js +151 -0
  28. package/dist/date-only-Bu4UmsTP.js.map +1 -0
  29. package/dist/date-only.d.ts +92 -0
  30. package/dist/date-only.d.ts.map +1 -1
  31. package/dist/date-picker.js +51 -50
  32. package/dist/date-picker.js.map +1 -1
  33. package/dist/date-picker.server.js +2 -1
  34. package/dist/date-picker.server.js.map +1 -1
  35. package/dist/date-range-picker.d.ts +41 -0
  36. package/dist/date-range-picker.d.ts.map +1 -0
  37. package/dist/date-range-picker.js +368 -0
  38. package/dist/date-range-picker.js.map +1 -0
  39. package/dist/date-range-picker.server.js +347 -0
  40. package/dist/date-range-picker.server.js.map +1 -0
  41. package/dist/direction-CS85IDNU.js +21 -0
  42. package/dist/direction-CS85IDNU.js.map +1 -0
  43. package/dist/index.d.ts +6 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +193 -176
  46. package/dist/index.js.map +1 -1
  47. package/dist/internal/choice.d.ts +25 -3
  48. package/dist/internal/choice.d.ts.map +1 -1
  49. package/dist/month-picker.d.ts +33 -0
  50. package/dist/month-picker.d.ts.map +1 -0
  51. package/dist/month-picker.js +287 -0
  52. package/dist/month-picker.js.map +1 -0
  53. package/dist/month-picker.server.js +282 -0
  54. package/dist/month-picker.server.js.map +1 -0
  55. package/dist/number-input.d.ts +53 -0
  56. package/dist/number-input.d.ts.map +1 -0
  57. package/dist/number-input.js +267 -0
  58. package/dist/number-input.js.map +1 -0
  59. package/dist/number-input.server.js +237 -0
  60. package/dist/number-input.server.js.map +1 -0
  61. package/dist/pending-action.d.ts +36 -0
  62. package/dist/pending-action.d.ts.map +1 -0
  63. package/dist/segmented-control.d.ts +40 -0
  64. package/dist/segmented-control.d.ts.map +1 -0
  65. package/dist/segmented-control.js +133 -0
  66. package/dist/segmented-control.js.map +1 -0
  67. package/dist/segmented-control.server.js +138 -0
  68. package/dist/segmented-control.server.js.map +1 -0
  69. package/dist/select-picker.js +1 -1
  70. package/dist/select-picker.server.js +1 -1
  71. package/dist/server.js +49 -23
  72. package/dist/server.js.map +1 -1
  73. package/dist/time-only.d.ts +32 -0
  74. package/dist/time-only.d.ts.map +1 -0
  75. package/dist/time-picker-BlMWCQwk.js +113 -0
  76. package/dist/time-picker-BlMWCQwk.js.map +1 -0
  77. package/dist/time-picker.d.ts +34 -0
  78. package/dist/time-picker.d.ts.map +1 -0
  79. package/dist/time-picker.js +2 -0
  80. package/dist/time-picker.server.js +152 -0
  81. package/dist/time-picker.server.js.map +1 -0
  82. package/package.json +44 -4
  83. package/styles.css +31 -1
  84. package/dist/assets/calendar-view-1RO2mtf1.js.map +0 -1
  85. package/dist/assets/choice-DoXiK8nc.js.map +0 -1
  86. package/dist/calendar-view-CTBTPB4T.js +0 -444
  87. package/dist/calendar-view-CTBTPB4T.js.map +0 -1
  88. package/dist/choice-BPMiJlPJ.js +0 -395
  89. package/dist/choice-BPMiJlPJ.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,123 +1,129 @@
1
- import { c as e, d as t, f as n, h as r, l as i, m as a, p as o, u as s } from "./calendar-view-CTBTPB4T.js";
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 { DatePicker as l } from "./date-picker.js";
4
- import { Input as u, InputGroup as d } from "./input.js";
5
- import { Combobox as f } from "./combobox.js";
6
- import { SelectPicker as p } from "./select-picker.js";
7
- import { DropdownMenu as m } from "./dropdown-menu.js";
8
- import { Popover as h } from "./popover.js";
9
- import { Calendar as g } from "./calendar.js";
10
- import { For as _, Show as v, createContext as y, createEffect as b, createMemo as x, createSignal as S, createUniqueId as C, mergeProps as w, onCleanup as T, onMount as E, splitProps as D, useContext as O } from "solid-js";
11
- import { Dynamic as k, Portal as A, className as j, createComponent as M, delegateEvents as N, effect as P, getNextElement as F, getNextMarker as I, insert as L, isServer as R, memo as z, mergeProps as B, runHydrationEvents as V, setAttribute as H, setProperty as U, spread as W, template as G } from "solid-js/web";
12
- import { Dialog as K, useDialog as ee } from "@ark-ui/solid/dialog";
13
- import { usePresenceContext as te } from "@ark-ui/solid/presence";
14
- import { FocusTrap as ne } from "@zag-js/focus-trap";
15
- import { ariaHidden as re } from "@zag-js/aria-hidden";
16
- import { RadioGroup as q } from "@ark-ui/solid/radio-group";
17
- import { directionPolicy as J, icons as ie } from "@devslab/dds-icons";
18
- import { Tabs as Y, useTabsContext as ae } from "@ark-ui/solid/tabs";
19
- import { LocaleProvider as oe } from "@ark-ui/solid/locale";
20
- import { Toast as X, Toaster as se, createToaster as ce } from "@ark-ui/solid/toast";
21
- import { space as le } from "@devslab/dds-tokens";
22
- import { Tooltip as Z, useTooltip as ue } from "@ark-ui/solid/tooltip";
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 de = /*#__PURE__*/ G("<dl class=dds-console-rail__context>"), fe = /*#__PURE__*/ G("<div class=dds-console-rail__foot>"), pe = /*#__PURE__*/ G("<p class=dds-console-page-eyebrow>"), me = /*#__PURE__*/ G("<div class=dds-console-page-header__actions>"), he = /*#__PURE__*/ G("<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><!$><!/>"), ge = /*#__PURE__*/ G("<div><dt></dt><dd>"), _e = /*#__PURE__*/ G("<section class=dds-console-rail__group><h2 class=dds-console-rail__group-label></h2><ul>"), ve = /*#__PURE__*/ G("<span class=dds-console-rail__badge>"), ye = /*#__PURE__*/ G("<li><a class=dds-console-rail__item><span></span><!$><!/>");
25
- function be(e, t, n) {
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 xe(e, t) {
34
+ function ke(e, t) {
29
35
  return e.replace("{count}", () => String(t));
30
36
  }
31
- function Se(e) {
32
- let [t, n] = S(!1), r = () => n(!1), [i, a] = S(!1);
33
- return E(() => {
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), T(() => document.removeEventListener("keydown", e));
44
+ document.addEventListener("keydown", e), F(() => document.removeEventListener("keydown", e));
39
45
  }), (() => {
40
- var a = F(he), 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] = I(m.nextSibling), y = h.nextSibling, b = y.nextSibling, [x, S] = I(b.nextSibling), w = u.nextSibling, T = w.firstChild, E = T.firstChild, D = E.firstChild, [O, k] = I(D.nextSibling), A = O.nextSibling, j = E.nextSibling, [N, R] = I(j.nextSibling), B = T.nextSibling, [U, W] = I(B.nextSibling);
41
- return L(o, () => e.labels.skip), s.$$click = () => n(!t()), L(c, (() => {
42
- var n = z(() => !!t());
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, L(p, () => e.brand.name), L(u, M(v, {
50
+ })()), l.$$click = r, U(p, () => e.brand.name), U(u, z(D, {
45
51
  get when() {
46
- return z(() => !!e.context)() && e.context.length > 0;
52
+ return W(() => !!e.context)() && e.context.length > 0;
47
53
  },
48
54
  get children() {
49
- var t = F(de);
50
- return L(t, M(_, {
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 = F(ge), n = t.firstChild, r = n.nextSibling;
56
- return L(n, () => e.label), L(r, () => e.value), t;
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), L(y, M(_, {
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-${C()}`;
71
+ let n = `dds-console-group-${M()}`;
66
72
  return (() => {
67
- var i = F(_e), a = i.firstChild, o = a.nextSibling;
68
- return H(i, "aria-labelledby", n), H(a, "id", n), L(a, () => t.label), L(o, M(_, {
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 = F(ye), i = n.firstChild, a = i.firstChild, o = a.nextSibling, [s, c] = I(o.nextSibling);
74
- return i.$$click = r, L(a, () => t.label), L(i, M(v, {
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 z(() => t.badge !== void 0)() && t.badge > 0;
82
+ return W(() => t.badge !== void 0)() && t.badge > 0;
77
83
  },
78
84
  get children() {
79
- var n = F(ve);
80
- return L(n, () => t.badge), P(() => H(n, "aria-label", xe(e.labels.badge, t.badge))), n;
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), P((n) => {
83
- var r = `${e.surface}.${t.id}`, a = t.href, o = be(e.activePath, t.href, t.active) ? "page" : void 0;
84
- return r !== n.e && H(i, "data-nav", n.e = r), a !== n.t && H(i, "href", n.t = a), o !== n.a && H(i, "aria-current", n.a = o), n;
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
- }), V(), n;
95
+ }), K(), n;
90
96
  })()
91
97
  })), i;
92
98
  })();
93
99
  }
94
- })), L(u, M(v, {
100
+ })), U(u, z(D, {
95
101
  get when() {
96
102
  return e.foot;
97
103
  },
98
104
  get children() {
99
- var t = F(fe);
100
- return L(t, () => e.foot), t;
105
+ var t = V(be);
106
+ return U(t, () => e.foot), t;
101
107
  }
102
- }), x, S), L(E, M(v, {
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 = F(pe);
108
- return L(t, () => e.header.eyebrow), t;
113
+ var t = V(xe);
114
+ return U(t, () => e.header.eyebrow), t;
109
115
  }
110
- }), O, k), L(A, () => e.header.title), L(T, M(v, {
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 = F(me);
116
- return L(t, () => e.header.actions), t;
121
+ var t = V(Se);
122
+ return U(t, () => e.header.actions), t;
117
123
  }
118
- }), N, R), L(w, () => e.children, U, W), P((n) => {
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, _ = e.labels.nav;
120
- return r !== n.e && H(a, "data-surface", n.e = r), o !== n.t && H(a, "data-hydrated", n.t = o), c !== n.a && H(s, "aria-expanded", n.a = c), p !== n.o && H(l, "data-open", n.o = p), m !== n.i && H(u, "data-open", n.i = m), h !== n.n && H(d, "href", n.n = h), g !== n.s && H(f, "src", n.s = g), _ !== n.h && H(y, "aria-label", n.h = _), n;
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
- }), V(), a;
136
+ }), K(), a;
131
137
  })();
132
138
  }
133
- N(["click"]);
139
+ re(["click"]);
134
140
  //#endregion
135
141
  //#region src/dialog.tsx
136
- var Ce = /*#__PURE__*/ G("<div>");
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 we(e) {
146
- let t = C(), n = () => e.id ?? `dds-dialog-${t}`, [r, i] = S(), a = ee(() => ({
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: R ? [] : e.additionalFocusContainers?.().filter((e) => !!e).map((e) => () => e),
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 = x(() => a().open);
168
- b(() => {
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] = S(!1), l = () => [t, ...e.additionalFocusContainers().filter((e) => !!(e?.isConnected && e.ownerDocument === t.ownerDocument))], u = t.ownerDocument.defaultView.requestAnimationFrame(() => {
172
- i = new ne(l(), {
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
- b(() => {
190
+ k(() => {
185
191
  if (!s()) return;
186
192
  let e = l();
187
- i.updateContainerElements(e), a?.(), a = re(e, { defer: !1 });
188
- }), T(() => {
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 = te(), r = (n) => M(k, B({ get component() {
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 M(K.Positioner, {
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 M(K.Content, B(() => e.contentProps, {
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 z(() => !!e.description)() ? `${n()}-description` : void 0;
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 M(K.Title, {
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 && M(K.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 = F(Ce);
245
- return L(t, () => e.actions), P(() => j(t, s("dds-dialog__actions", e.actionsClass))), t;
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
- z(() => t.title),
251
- z(() => t.description),
252
- z(() => t.children),
253
- z(() => t.actions)
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 M(K.RootProvider, {
267
+ return z(Y.RootProvider, {
262
268
  value: a,
263
269
  lazyMount: !0,
264
270
  unmountOnExit: !0,
265
271
  get children() {
266
- return M(v, {
272
+ return z(D, {
267
273
  get when() {
268
274
  return e.portal;
269
275
  },
270
276
  get fallback() {
271
- return M(l, {});
277
+ return z(l, {});
272
278
  },
273
279
  get children() {
274
- return M(A, B(() => e.portalMount ? { mount: e.portalMount } : {}, { get children() {
275
- return M(l, {});
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 Te(e) {
290
+ function Ne(e) {
285
291
  let t = e.value ?? e.defaultValue;
286
- return M(q.Root, {
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 [M(q.Label, {
318
+ return [z(X.Label, {
313
319
  class: "dds-field__label",
314
320
  get children() {
315
321
  return e.label;
316
322
  }
317
- }), M(_, {
323
+ }), z(E, {
318
324
  get each() {
319
325
  return e.options;
320
326
  },
321
- children: (e) => M(q.Item, {
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 [M(q.ItemHiddenInput, {
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
- }), M(q.ItemText, { get children() {
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 Ee = /*#__PURE__*/ G("<svg><!$><!/><g>"), De = /*#__PURE__*/ G("<title>");
348
- function Oe(e) {
349
- let [t, n] = D(e, [
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 = () => ie[t.name], i = () => t.directional ?? J.mirrorInRtl.includes(t.name);
361
+ ]), r = () => fe[t.name], i = () => t.directional ?? de.mirrorInRtl.includes(t.name);
356
362
  return (() => {
357
- var e = F(Ee), a = e.firstChild, [o, s] = I(a.nextSibling), l = o.nextSibling;
358
- return W(e, B(n, {
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() && J.cssClass, t.class);
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), L(e, (() => {
388
- var e = z(() => !!t.label);
393
+ }), !0, !0), U(e, (() => {
394
+ var e = W(() => !!t.label);
389
395
  return () => e() && (() => {
390
- var e = F(De);
391
- return L(e, () => t.label), e;
396
+ var e = V(Fe);
397
+ return U(e, () => t.label), e;
392
398
  })();
393
- })(), o, s), P(() => U(l, "innerHTML", r().body)), V(), e;
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 ke = /*#__PURE__*/ G("<code>"), Ae = /*#__PURE__*/ G("<span>");
399
- function je(e) {
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 M(v, {
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 = F(ke);
419
- return L(e, () => n.value), P(() => H(e, "data-status", `${n.domain}.${n.value}`)), e;
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 = F(Ae);
427
- return L(t, () => e.text), P((r) => {
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 && j(t, r.e = i), a !== r.t && H(t, "data-status", r.t = a), o !== r.a && H(t, "data-tone", r.a = o), r;
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 Ne(e) {
461
- let t = C(), n = () => e.id ?? `dds-tabs-${t}`, r, i = Me(() => r, () => e.dir), a = e.asChild ? (t) => e.asChild(w(t({}), { ref: (e) => {
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 M(oe, {
481
+ return z(me, {
465
482
  get locale() {
466
483
  return i() === "rtl" ? "ar" : "en";
467
484
  },
468
485
  get children() {
469
- return M(Y.Root, B({
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 Pe(e) {
508
- let [t, n] = D(e, [
524
+ function He(e) {
525
+ let [t, n] = L(e, [
509
526
  "class",
510
527
  "children",
511
528
  "unstyled"
512
529
  ]);
513
- return M(Y.List, B(n, {
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 Q(e) {
523
- let [t, n] = D(e, [
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(w(n({}), { ref: e.ref })) : void 0;
530
- return M(Y.Trigger, B(n, {
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 Fe(e) {
542
- let [t, n] = D(e, [
558
+ function We(e) {
559
+ let [t, n] = L(e, [
543
560
  "value",
544
561
  "children",
545
562
  "style"
546
- ]), r = ae(), i = () => r().value !== t.value, a = () => i() ? typeof t.style == "string" ? `${t.style.replace(/;+\s*$/, "")};display:none;` : {
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 M(Y.Content, B(n, {
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 $ = y();
571
- function Ie(e) {
572
- let t = C(), n, r, i = () => r ??= new Proxy(n?.ownerDocument ?? document, { get(e, 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 = ce({
593
+ } }), a = ge({
577
594
  placement: "bottom-end",
578
595
  overlap: !1,
579
- gap: le[8],
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 T(s.clear), M($.Provider, {
619
+ return F(s.clear), z(Ge.Provider, {
603
620
  value: s,
604
621
  get children() {
605
- return [z(() => e.children), M(se, {
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 M(X.Root, {
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 [M(X.Description, { get children() {
649
+ return [z(Q.Description, { get children() {
633
650
  return t().description;
634
- } }), z(() => z(() => !!e.dismissLabel)() && M(X.CloseTrigger, {
651
+ } }), W(() => W(() => !!e.dismissLabel)() && z(Q.CloseTrigger, {
635
652
  class: "dds-iconbtn dds-iconbtn--sm",
636
653
  get "aria-label"() {
637
- return z(() => typeof e.dismissLabel == "function")() ? e.dismissLabel(n()) : e.dismissLabel;
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 Le() {
649
- let e = O($);
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 Re = /*#__PURE__*/ G("<span><!$><!/><!$><!/>");
656
- function ze(e) {
657
- let t = C(), n = () => e.id ?? `dds-tooltip-${t}`, [i, a] = r({
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 = ue(() => ({
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 M(Z.RootProvider, {
686
+ return z($.RootProvider, {
670
687
  value: o,
671
688
  lazyMount: !1,
672
689
  unmountOnExit: !1,
673
690
  get children() {
674
- var t = F(Re), r = t.firstChild, [i, a] = I(r.nextSibling), s = i.nextSibling, [l, u] = I(s.nextSibling);
675
- return L(t, M(Z.Trigger, { asChild: (t) => {
676
- let [, r] = D(t(), ["onFocusIn", "onFocusOut"]);
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), L(t, M(Z.Positioner, { get children() {
686
- return M(Z.Content, {
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), P(() => j(t, c("dds-tooltip", e.class))), t;
709
+ } }), l, u), B(() => R(t, c("dds-tooltip", e.class))), t;
693
710
  }
694
711
  });
695
712
  }
696
713
  //#endregion
697
- export { e as Button, g as Calendar, i as Checkbox, f as Combobox, Se as ConsoleShell, l as DatePicker, we as Dialog, m as DropdownMenu, s as Field, Oe as Icon, t as IconButton, u as Input, d as InputGroup, h as Popover, n as Radio, Te as RadioGroup, o as Select, p as SelectPicker, a as Switch, Q as Tab, Pe as TabList, Fe as TabPanel, Ne as Tabs, Ie as ToastProvider, ze as Tooltip, r as createControllableSignal, je as createStatusPill, Le as useToast };
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