@devslab/dds-react 0.21.2 → 0.22.1
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 +6 -1
- package/README.md +6 -1
- package/dist/calendar-view-I_sNlioP.js +145 -0
- package/dist/calendar-view-I_sNlioP.js.map +1 -0
- package/dist/calendar-view.d.ts +16 -0
- package/dist/calendar-view.d.ts.map +1 -0
- package/dist/calendar.d.ts +19 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +51 -0
- package/dist/calendar.js.map +1 -0
- package/dist/choice-B3vNMfKK.js +300 -0
- package/dist/choice-B3vNMfKK.js.map +1 -0
- package/dist/choice-types.d.ts +56 -0
- package/dist/choice-types.d.ts.map +1 -0
- package/dist/combobox.d.ts +4 -0
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.js +13 -0
- package/dist/combobox.js.map +1 -0
- package/dist/controls-BajigKUv.js +139 -0
- package/dist/controls-BajigKUv.js.map +1 -0
- package/dist/date-only.d.ts +36 -0
- package/dist/date-only.d.ts.map +1 -0
- package/dist/date-picker.d.ts +8 -9
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +198 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/dropdown-menu.d.ts +31 -0
- package/dist/dropdown-menu.d.ts.map +1 -0
- package/dist/dropdown-menu.js +73 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +203 -578
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts +22 -0
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +92 -0
- package/dist/input.js.map +1 -0
- package/dist/internal/choice.d.ts +5 -0
- package/dist/internal/choice.d.ts.map +1 -0
- package/dist/popover.d.ts +21 -0
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +49 -0
- package/dist/popover.js.map +1 -0
- package/dist/select-picker.d.ts +4 -0
- package/dist/select-picker.d.ts.map +1 -0
- package/dist/select-picker.js +13 -0
- package/dist/select-picker.js.map +1 -0
- package/package.json +46 -10
- package/styles.css +10 -1
package/dist/index.js
CHANGED
|
@@ -1,167 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return /* @__PURE__ */ h("button", {
|
|
30
|
-
...s,
|
|
31
|
-
ref: c,
|
|
32
|
-
type: i,
|
|
33
|
-
disabled: r || n,
|
|
34
|
-
"aria-busy": n || void 0,
|
|
35
|
-
className: L("dds-iconbtn", e !== "ghost" && `dds-iconbtn--${e}`, t !== "md" && `dds-iconbtn--${t}`, a),
|
|
36
|
-
children: n ? /* @__PURE__ */ h("span", {
|
|
37
|
-
className: "dds-spinner",
|
|
38
|
-
"aria-hidden": !0
|
|
39
|
-
}) : o
|
|
40
|
-
});
|
|
41
|
-
}), B = t(function({ id: e, label: t, helpText: n, error: r, required: a, className: o, children: s, ...c }, u) {
|
|
42
|
-
let d = i(), f = e ?? `dds-field-${d}`, p = {
|
|
43
|
-
id: f,
|
|
44
|
-
"aria-describedby": [n && `${f}-help`, r && `${f}-error`].filter(Boolean).join(" ") || void 0,
|
|
45
|
-
"aria-invalid": r ? !0 : void 0,
|
|
46
|
-
"aria-required": a ? !0 : void 0
|
|
47
|
-
};
|
|
48
|
-
return /* @__PURE__ */ g(l.Root, {
|
|
49
|
-
...c,
|
|
50
|
-
ref: u,
|
|
51
|
-
invalid: !!r,
|
|
52
|
-
required: a,
|
|
53
|
-
id: f,
|
|
54
|
-
ids: {
|
|
55
|
-
control: `${f}-root`,
|
|
56
|
-
helperText: `${f}-help`,
|
|
57
|
-
errorText: `${f}-error`
|
|
58
|
-
},
|
|
59
|
-
className: L("dds-field", !!r && "dds-field--error", o),
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ g(l.Label, {
|
|
62
|
-
htmlFor: f,
|
|
63
|
-
className: "dds-field__label",
|
|
64
|
-
children: [t, a && /* @__PURE__ */ h("span", {
|
|
65
|
-
"aria-hidden": !0,
|
|
66
|
-
children: " *"
|
|
67
|
-
})]
|
|
68
|
-
}),
|
|
69
|
-
typeof s == "function" ? s(p) : s,
|
|
70
|
-
n && /* @__PURE__ */ h(l.HelperText, {
|
|
71
|
-
className: "dds-field__help",
|
|
72
|
-
children: n
|
|
73
|
-
}),
|
|
74
|
-
r && /* @__PURE__ */ h(l.ErrorText, {
|
|
75
|
-
className: "dds-field__error",
|
|
76
|
-
role: "alert",
|
|
77
|
-
children: r
|
|
78
|
-
})
|
|
79
|
-
]
|
|
80
|
-
});
|
|
81
|
-
}), V = t(function({ invalid: e, wrapperClassName: t, className: n, children: r, ...i }, a) {
|
|
82
|
-
return /* @__PURE__ */ h("span", {
|
|
83
|
-
className: L("dds-select", t),
|
|
84
|
-
children: /* @__PURE__ */ h("select", {
|
|
85
|
-
...i,
|
|
86
|
-
ref: a,
|
|
87
|
-
className: L("dds-select__input", n),
|
|
88
|
-
"aria-invalid": e || i["aria-invalid"],
|
|
89
|
-
children: r
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
}), H = t(function({ kind: e, label: t, checked: n, defaultChecked: r, onCheckedChange: i, id: a, name: o, value: s, disabled: c, required: l, readOnly: u, form: f, className: m, inputClassName: _, onChange: v, ...y }, b) {
|
|
93
|
-
let x = e === "switch" ? p.Root : d.Root, S = e === "switch" ? p.Label : d.Label, C = e === "switch" ? p.Context : d.Context, w = e === "switch" ? "dds-switch" : "dds-check";
|
|
94
|
-
return /* @__PURE__ */ g(x, {
|
|
95
|
-
checked: n,
|
|
96
|
-
defaultChecked: r,
|
|
97
|
-
onCheckedChange: (e) => i?.(e.checked === !0),
|
|
98
|
-
ids: a ? { hiddenInput: a } : void 0,
|
|
99
|
-
name: o,
|
|
100
|
-
value: String(s ?? "on"),
|
|
101
|
-
disabled: c,
|
|
102
|
-
required: l,
|
|
103
|
-
readOnly: u,
|
|
104
|
-
form: f,
|
|
105
|
-
className: L(w, m),
|
|
106
|
-
children: [/* @__PURE__ */ h(C, { children: (t) => {
|
|
107
|
-
let { style: n, defaultChecked: r, ...i } = t.getHiddenInputProps();
|
|
108
|
-
return /* @__PURE__ */ h("input", {
|
|
109
|
-
...i,
|
|
110
|
-
...y,
|
|
111
|
-
ref: b,
|
|
112
|
-
checked: t.checked,
|
|
113
|
-
role: e === "switch" ? "switch" : void 0,
|
|
114
|
-
onChange: v ?? (() => {}),
|
|
115
|
-
onClick: (e) => {
|
|
116
|
-
y.onClick?.(e), e.defaultPrevented || i.onClick?.(e);
|
|
117
|
-
},
|
|
118
|
-
className: L(`${w}__input`, _)
|
|
119
|
-
});
|
|
120
|
-
} }), /* @__PURE__ */ h(S, { children: t })]
|
|
121
|
-
});
|
|
122
|
-
}), U = t((e, t) => /* @__PURE__ */ h(H, {
|
|
123
|
-
...e,
|
|
124
|
-
kind: "checkbox",
|
|
125
|
-
ref: t
|
|
126
|
-
})), W = t((e, t) => /* @__PURE__ */ h(H, {
|
|
127
|
-
...e,
|
|
128
|
-
kind: "switch",
|
|
129
|
-
ref: t
|
|
130
|
-
})), G = t(function({ label: e, className: t, inputClassName: n, onCheckedChange: r, onChange: i, ...a }, o) {
|
|
131
|
-
return /* @__PURE__ */ g("label", {
|
|
132
|
-
className: L("dds-check", t),
|
|
133
|
-
children: [/* @__PURE__ */ h("input", {
|
|
134
|
-
...a,
|
|
135
|
-
ref: o,
|
|
136
|
-
type: "radio",
|
|
137
|
-
className: L("dds-check__input", n),
|
|
138
|
-
onChange: (e) => {
|
|
139
|
-
i?.(e), e.defaultPrevented || r?.(e.currentTarget.checked);
|
|
140
|
-
}
|
|
141
|
-
}), /* @__PURE__ */ h("span", { children: e })]
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./controls-BajigKUv.js";
|
|
2
|
+
import { DatePicker as c } from "./date-picker.js";
|
|
3
|
+
import { Input as l, InputGroup as u } from "./input.js";
|
|
4
|
+
import { Combobox as d } from "./combobox.js";
|
|
5
|
+
import { SelectPicker as f } from "./select-picker.js";
|
|
6
|
+
import { DropdownMenu as p } from "./dropdown-menu.js";
|
|
7
|
+
import { Popover as m } from "./popover.js";
|
|
8
|
+
import { Calendar as h } from "./calendar.js";
|
|
9
|
+
import { createContext as g, forwardRef as _, useContext as v, useEffect as y, useId as b, useMemo as x, useRef as S, useState as C } from "react";
|
|
10
|
+
import { Field as w } from "@ark-ui/react/field";
|
|
11
|
+
import { Checkbox as T } from "@ark-ui/react/checkbox";
|
|
12
|
+
import { Switch as E } from "@ark-ui/react/switch";
|
|
13
|
+
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
14
|
+
import { Tabs as A, Tabs as j, useTabsContext as ee } from "@ark-ui/react/tabs";
|
|
15
|
+
import { RadioGroup as te, RadioGroup as M, useRadioGroupContext as N } from "@ark-ui/react/radio-group";
|
|
16
|
+
import { Dialog as P, Dialog as F } from "@ark-ui/react/dialog";
|
|
17
|
+
import { Tooltip as I, Tooltip as L } from "@ark-ui/react/tooltip";
|
|
18
|
+
import { Portal as R } from "@ark-ui/react/portal";
|
|
19
|
+
import { directionPolicy as z, icons as B } from "@devslab/dds-icons";
|
|
20
|
+
import { Toast as V, Toast as H, Toaster as U, createToaster as W } from "@ark-ui/react/toast";
|
|
21
|
+
import { DatePicker as G } from "@ark-ui/react/date-picker";
|
|
22
|
+
//#region src/selection.tsx
|
|
23
|
+
var K = _(function({ onValueChange: e, unstyled: n, className: r, ...i }, a) {
|
|
24
|
+
return /* @__PURE__ */ O(j.Root, {
|
|
25
|
+
...i,
|
|
26
|
+
ref: a,
|
|
27
|
+
onValueChange: (t) => e?.(t.value),
|
|
28
|
+
className: t(!n && "dds-tabs-root", r)
|
|
142
29
|
});
|
|
143
|
-
}),
|
|
144
|
-
return /* @__PURE__ */
|
|
30
|
+
}), q = _(function({ unstyled: e, className: n, ...r }, i) {
|
|
31
|
+
return /* @__PURE__ */ O(j.List, {
|
|
145
32
|
...r,
|
|
146
33
|
ref: i,
|
|
147
|
-
|
|
148
|
-
className: L(!t && "dds-tabs-root", n)
|
|
34
|
+
className: t(!e && "dds-tabs", n)
|
|
149
35
|
});
|
|
150
|
-
}),
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
...
|
|
153
|
-
ref:
|
|
154
|
-
className:
|
|
155
|
-
});
|
|
156
|
-
}), ne = t(function({ unstyled: e, className: t, ...n }, r) {
|
|
157
|
-
return /* @__PURE__ */ h(v.Trigger, {
|
|
158
|
-
...n,
|
|
159
|
-
ref: r,
|
|
160
|
-
className: L(!e && "dds-tab", t)
|
|
36
|
+
}), J = _(function({ unstyled: e, className: n, ...r }, i) {
|
|
37
|
+
return /* @__PURE__ */ O(j.Trigger, {
|
|
38
|
+
...r,
|
|
39
|
+
ref: i,
|
|
40
|
+
className: t(!e && "dds-tab", n)
|
|
161
41
|
});
|
|
162
|
-
}),
|
|
163
|
-
let i =
|
|
164
|
-
return /* @__PURE__ */
|
|
42
|
+
}), Y = _(function({ value: e, style: t, ...n }, r) {
|
|
43
|
+
let i = ee().value !== e;
|
|
44
|
+
return /* @__PURE__ */ O(j.Content, {
|
|
165
45
|
...n,
|
|
166
46
|
value: e,
|
|
167
47
|
ref: r,
|
|
@@ -172,92 +52,92 @@ var L = (...e) => e.filter(Boolean).join(" "), R = t(function({ tone: e = "prima
|
|
|
172
52
|
} : t
|
|
173
53
|
});
|
|
174
54
|
});
|
|
175
|
-
function
|
|
176
|
-
let t =
|
|
177
|
-
return /* @__PURE__ */
|
|
55
|
+
function X({ option: e }) {
|
|
56
|
+
let t = N(), { style: n, defaultChecked: r, ...i } = t.getItemHiddenInputProps(e);
|
|
57
|
+
return /* @__PURE__ */ O("input", {
|
|
178
58
|
...i,
|
|
179
59
|
checked: t.value === e.value,
|
|
180
60
|
onChange: () => {},
|
|
181
61
|
className: "dds-check__input"
|
|
182
62
|
});
|
|
183
63
|
}
|
|
184
|
-
var
|
|
185
|
-
return /* @__PURE__ */
|
|
186
|
-
...
|
|
187
|
-
ref:
|
|
64
|
+
var Z = _(function({ options: e, label: n, onValueChange: r, className: i, children: a, ...o }, s) {
|
|
65
|
+
return /* @__PURE__ */ k(M.Root, {
|
|
66
|
+
...o,
|
|
67
|
+
ref: s,
|
|
188
68
|
onValueChange: (e) => {
|
|
189
|
-
e.value !== null &&
|
|
69
|
+
e.value !== null && r?.(e.value);
|
|
190
70
|
},
|
|
191
|
-
className:
|
|
71
|
+
className: t("dds-radio-group", i),
|
|
192
72
|
children: [
|
|
193
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ O(M.Label, {
|
|
194
74
|
className: "dds-field__label",
|
|
195
|
-
children:
|
|
75
|
+
children: n
|
|
196
76
|
}),
|
|
197
|
-
e.map((e) => /* @__PURE__ */
|
|
77
|
+
e.map((e) => /* @__PURE__ */ k(M.Item, {
|
|
198
78
|
value: e.value,
|
|
199
79
|
disabled: e.disabled,
|
|
200
80
|
className: "dds-check",
|
|
201
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ O(X, { option: e }), /* @__PURE__ */ O(M.ItemText, { children: e.label })]
|
|
202
82
|
}, e.value)),
|
|
203
|
-
|
|
83
|
+
a
|
|
204
84
|
]
|
|
205
85
|
});
|
|
206
|
-
}),
|
|
207
|
-
let
|
|
208
|
-
title: /* @__PURE__ */
|
|
209
|
-
className:
|
|
86
|
+
}), ne = _(function({ title: e, description: n, children: r, actions: i, onOpenChange: a, closeOnOutside: o, portal: s = !0, className: c, overlayClassName: l, contentProps: u, initialFocus: d, finalFocus: f, frame: p, unstyled: m, ...h }, g) {
|
|
87
|
+
let _ = {
|
|
88
|
+
title: /* @__PURE__ */ O(F.Title, {
|
|
89
|
+
className: m ? void 0 : "dds-dialog__title",
|
|
210
90
|
children: e
|
|
211
91
|
}),
|
|
212
|
-
description:
|
|
213
|
-
className:
|
|
214
|
-
children:
|
|
92
|
+
description: n && /* @__PURE__ */ O(F.Description, {
|
|
93
|
+
className: m ? void 0 : "dds-dialog__body",
|
|
94
|
+
children: n
|
|
215
95
|
}),
|
|
216
|
-
children:
|
|
217
|
-
actions:
|
|
218
|
-
className:
|
|
219
|
-
children:
|
|
96
|
+
children: r,
|
|
97
|
+
actions: i && /* @__PURE__ */ O("div", {
|
|
98
|
+
className: m ? void 0 : "dds-dialog__actions",
|
|
99
|
+
children: i
|
|
220
100
|
})
|
|
221
|
-
},
|
|
222
|
-
className:
|
|
223
|
-
children: /* @__PURE__ */
|
|
224
|
-
...
|
|
225
|
-
ref:
|
|
226
|
-
"aria-describedby":
|
|
227
|
-
className:
|
|
228
|
-
children:
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
101
|
+
}, v = /* @__PURE__ */ O(F.Positioner, {
|
|
102
|
+
className: t(!m && "dds-dialog-overlay", l),
|
|
103
|
+
children: /* @__PURE__ */ O(F.Content, {
|
|
104
|
+
...u,
|
|
105
|
+
ref: g,
|
|
106
|
+
"aria-describedby": n ? u?.["aria-describedby"] : void 0,
|
|
107
|
+
className: t(!m && "dds-dialog", c, u?.className),
|
|
108
|
+
children: p ? p(_) : /* @__PURE__ */ k(D, { children: [
|
|
109
|
+
_.title,
|
|
110
|
+
_.description,
|
|
111
|
+
r,
|
|
112
|
+
_.actions
|
|
233
113
|
] })
|
|
234
114
|
})
|
|
235
115
|
});
|
|
236
|
-
return /* @__PURE__ */
|
|
237
|
-
...
|
|
238
|
-
onOpenChange: (e) =>
|
|
239
|
-
closeOnInteractOutside:
|
|
240
|
-
initialFocusEl:
|
|
241
|
-
finalFocusEl:
|
|
116
|
+
return /* @__PURE__ */ O(F.Root, {
|
|
117
|
+
...h,
|
|
118
|
+
onOpenChange: (e) => a?.(e.open),
|
|
119
|
+
closeOnInteractOutside: o ?? h.closeOnInteractOutside,
|
|
120
|
+
initialFocusEl: d ? () => d() ?? null : h.initialFocusEl,
|
|
121
|
+
finalFocusEl: f ? () => f() ?? null : h.finalFocusEl,
|
|
242
122
|
lazyMount: !0,
|
|
243
123
|
unmountOnExit: !0,
|
|
244
|
-
children:
|
|
124
|
+
children: s ? /* @__PURE__ */ O(R, { children: v }) : v
|
|
245
125
|
});
|
|
246
126
|
});
|
|
247
|
-
function
|
|
248
|
-
return /* @__PURE__ */
|
|
127
|
+
function re({ content: e, children: n, onOpenChange: r, className: i, contentProps: a, ...o }) {
|
|
128
|
+
return /* @__PURE__ */ O(L.Root, {
|
|
249
129
|
openDelay: 0,
|
|
250
130
|
closeDelay: 0,
|
|
251
|
-
...
|
|
252
|
-
onOpenChange: (e) =>
|
|
253
|
-
children: /* @__PURE__ */
|
|
254
|
-
className:
|
|
255
|
-
children: [typeof
|
|
131
|
+
...o,
|
|
132
|
+
onOpenChange: (e) => r?.(e.open),
|
|
133
|
+
children: /* @__PURE__ */ k("span", {
|
|
134
|
+
className: t("dds-tooltip", i),
|
|
135
|
+
children: [typeof n == "function" ? /* @__PURE__ */ O(L.Context, { children: (e) => n(e.getTriggerProps()) }) : /* @__PURE__ */ O(L.Trigger, {
|
|
256
136
|
asChild: !0,
|
|
257
|
-
children:
|
|
258
|
-
}), /* @__PURE__ */
|
|
259
|
-
...
|
|
260
|
-
className:
|
|
137
|
+
children: n
|
|
138
|
+
}), /* @__PURE__ */ O(R, { children: /* @__PURE__ */ O(L.Positioner, { children: /* @__PURE__ */ O(L.Content, {
|
|
139
|
+
...a,
|
|
140
|
+
className: t("dds-tooltip__bubble", a?.className),
|
|
261
141
|
children: e
|
|
262
142
|
}) }) })]
|
|
263
143
|
})
|
|
@@ -265,71 +145,71 @@ function se({ content: e, children: t, onOpenChange: n, className: r, contentPro
|
|
|
265
145
|
}
|
|
266
146
|
//#endregion
|
|
267
147
|
//#region src/icon.tsx
|
|
268
|
-
var
|
|
269
|
-
let
|
|
270
|
-
return /* @__PURE__ */
|
|
271
|
-
...
|
|
272
|
-
ref:
|
|
273
|
-
viewBox:
|
|
274
|
-
width:
|
|
275
|
-
height:
|
|
148
|
+
var Q = _(function({ name: e, label: n, size: r = 24, directional: i, className: a, ...o }, s) {
|
|
149
|
+
let c = B[e];
|
|
150
|
+
return /* @__PURE__ */ k("svg", {
|
|
151
|
+
...o,
|
|
152
|
+
ref: s,
|
|
153
|
+
viewBox: c.viewBox,
|
|
154
|
+
width: r,
|
|
155
|
+
height: r,
|
|
276
156
|
fill: "none",
|
|
277
157
|
stroke: "currentColor",
|
|
278
|
-
strokeWidth:
|
|
158
|
+
strokeWidth: c.strokeWidth,
|
|
279
159
|
strokeLinecap: "round",
|
|
280
160
|
strokeLinejoin: "round",
|
|
281
|
-
role:
|
|
282
|
-
"aria-label":
|
|
283
|
-
"aria-hidden": !
|
|
284
|
-
className:
|
|
285
|
-
children: [
|
|
161
|
+
role: n ? "img" : void 0,
|
|
162
|
+
"aria-label": n,
|
|
163
|
+
"aria-hidden": !n || void 0,
|
|
164
|
+
className: t((i ?? z.mirrorInRtl.includes(e)) && z.cssClass, a),
|
|
165
|
+
children: [n && /* @__PURE__ */ O("title", { children: n }), /* @__PURE__ */ O("g", { dangerouslySetInnerHTML: { __html: c.body } })]
|
|
286
166
|
});
|
|
287
|
-
}),
|
|
288
|
-
function
|
|
289
|
-
let
|
|
167
|
+
}), $ = g(null);
|
|
168
|
+
function ie({ children: e, defaultDuration: n = 5e3, dismissLabel: r, regionLabel: i, className: a }) {
|
|
169
|
+
let o = b(), s = S(0), c = x(() => W({
|
|
290
170
|
placement: "bottom-end",
|
|
291
171
|
overlap: !1,
|
|
292
172
|
gap: 8,
|
|
293
173
|
offsets: "var(--dds-space-16)",
|
|
294
174
|
removeDelay: 0,
|
|
295
175
|
hotkey: ["DDS_NO_HOTKEY"]
|
|
296
|
-
}), []),
|
|
176
|
+
}), []), l = x(() => ({
|
|
297
177
|
show(e) {
|
|
298
|
-
let
|
|
299
|
-
return
|
|
300
|
-
id:
|
|
178
|
+
let t = `dds-toast-${o}-${++s.current}`, r = e.duration ?? n;
|
|
179
|
+
return c.create({
|
|
180
|
+
id: t,
|
|
301
181
|
description: e.message,
|
|
302
182
|
type: e.tone === "danger" ? "error" : e.tone ?? "info",
|
|
303
183
|
duration: r > 0 ? r : Infinity,
|
|
304
184
|
meta: { dds: {
|
|
305
185
|
...e,
|
|
306
|
-
id:
|
|
186
|
+
id: t
|
|
307
187
|
} }
|
|
308
|
-
}),
|
|
188
|
+
}), t;
|
|
309
189
|
},
|
|
310
|
-
dismiss: (e) =>
|
|
311
|
-
clear: () =>
|
|
190
|
+
dismiss: (e) => c.remove(e),
|
|
191
|
+
clear: () => c.remove()
|
|
312
192
|
}), [
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
193
|
+
c,
|
|
194
|
+
o,
|
|
195
|
+
n
|
|
316
196
|
]);
|
|
317
|
-
return
|
|
318
|
-
value:
|
|
319
|
-
children: [e, /* @__PURE__ */
|
|
320
|
-
toaster:
|
|
321
|
-
label:
|
|
322
|
-
"aria-label":
|
|
323
|
-
role:
|
|
324
|
-
className:
|
|
197
|
+
return y(() => () => c.remove(), [c]), /* @__PURE__ */ k($.Provider, {
|
|
198
|
+
value: l,
|
|
199
|
+
children: [e, /* @__PURE__ */ O(U, {
|
|
200
|
+
toaster: c,
|
|
201
|
+
label: i ?? "",
|
|
202
|
+
"aria-label": i ?? "",
|
|
203
|
+
role: i ? "region" : "presentation",
|
|
204
|
+
className: t("dds-toast-region", a),
|
|
325
205
|
children: (e) => {
|
|
326
|
-
let
|
|
327
|
-
return /* @__PURE__ */
|
|
328
|
-
className:
|
|
329
|
-
role:
|
|
330
|
-
children: [/* @__PURE__ */
|
|
206
|
+
let n = e.meta?.dds;
|
|
207
|
+
return /* @__PURE__ */ k(V.Root, {
|
|
208
|
+
className: t("dds-toast", `dds-toast--${n.tone ?? "info"}`),
|
|
209
|
+
role: n.tone === "danger" ? "alert" : "status",
|
|
210
|
+
children: [/* @__PURE__ */ O(V.Description, { children: e.description }), r && /* @__PURE__ */ O(V.CloseTrigger, {
|
|
331
211
|
className: "dds-iconbtn dds-iconbtn--sm",
|
|
332
|
-
"aria-label": typeof
|
|
212
|
+
"aria-label": typeof r == "function" ? r(n) : r,
|
|
333
213
|
children: "×"
|
|
334
214
|
})]
|
|
335
215
|
});
|
|
@@ -337,392 +217,137 @@ function le({ children: e, defaultDuration: t = 5e3, dismissLabel: n, regionLabe
|
|
|
337
217
|
})]
|
|
338
218
|
});
|
|
339
219
|
}
|
|
340
|
-
function
|
|
341
|
-
let e =
|
|
220
|
+
function ae() {
|
|
221
|
+
let e = v($);
|
|
342
222
|
if (!e) throw Error("useToast must be called inside <ToastProvider>");
|
|
343
223
|
return e;
|
|
344
224
|
}
|
|
345
225
|
//#endregion
|
|
346
226
|
//#region src/console-shell.tsx
|
|
347
|
-
function
|
|
227
|
+
function oe(e, t) {
|
|
348
228
|
return t.active ?? (t.href.split("/").filter(Boolean).length <= 1 ? e === t.href : e === t.href || e.startsWith(`${t.href}/`));
|
|
349
229
|
}
|
|
350
|
-
var
|
|
351
|
-
let [
|
|
352
|
-
return
|
|
353
|
-
|
|
230
|
+
var se = _(function({ surface: e, activePath: n, brand: r, context: i, nav: a, labels: o, header: s, foot: c, children: l, className: u, ...d }, f) {
|
|
231
|
+
let [p, m] = C(!1), [h, g] = C(!1), _ = b(), v = `dds-console-rail-${_}`, x = `dds-console-main-${_}`;
|
|
232
|
+
return y(() => {
|
|
233
|
+
g(!0);
|
|
354
234
|
let e = (e) => {
|
|
355
|
-
e.key === "Escape" &&
|
|
235
|
+
e.key === "Escape" && m(!1);
|
|
356
236
|
};
|
|
357
237
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
358
|
-
}, []), /* @__PURE__ */
|
|
359
|
-
...
|
|
360
|
-
ref:
|
|
361
|
-
className:
|
|
238
|
+
}, []), /* @__PURE__ */ k("div", {
|
|
239
|
+
...d,
|
|
240
|
+
ref: f,
|
|
241
|
+
className: t("dds-console-shell", u),
|
|
362
242
|
"data-surface": e,
|
|
363
|
-
"data-hydrated":
|
|
243
|
+
"data-hydrated": h ? "true" : void 0,
|
|
364
244
|
children: [
|
|
365
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ O("a", {
|
|
366
246
|
className: "dds-console-skip dds-visually-hidden",
|
|
367
|
-
href: `#${
|
|
368
|
-
children:
|
|
247
|
+
href: `#${x}`,
|
|
248
|
+
children: o.skip
|
|
369
249
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ k("button", {
|
|
371
251
|
className: "dds-console-rail__toggle",
|
|
372
252
|
type: "button",
|
|
373
253
|
"data-action": "toggle-rail",
|
|
374
|
-
"aria-controls":
|
|
375
|
-
"aria-expanded":
|
|
376
|
-
onClick: () =>
|
|
377
|
-
children: [/* @__PURE__ */
|
|
254
|
+
"aria-controls": v,
|
|
255
|
+
"aria-expanded": p,
|
|
256
|
+
onClick: () => m(!p),
|
|
257
|
+
children: [/* @__PURE__ */ O("span", { "aria-hidden": !0 }), /* @__PURE__ */ O("span", {
|
|
378
258
|
className: "dds-visually-hidden",
|
|
379
|
-
children:
|
|
259
|
+
children: p ? o.menuClose : o.menuOpen
|
|
380
260
|
})]
|
|
381
261
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ O("div", {
|
|
383
263
|
className: "dds-console-rail__scrim",
|
|
384
|
-
"data-open": String(
|
|
385
|
-
onClick: () =>
|
|
264
|
+
"data-open": String(p),
|
|
265
|
+
onClick: () => m(!1)
|
|
386
266
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
id:
|
|
267
|
+
/* @__PURE__ */ k("aside", {
|
|
268
|
+
id: v,
|
|
389
269
|
className: "dds-console-rail",
|
|
390
|
-
"data-open": String(
|
|
270
|
+
"data-open": String(p),
|
|
391
271
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ k("a", {
|
|
393
273
|
className: "dds-console-rail__brand",
|
|
394
|
-
href:
|
|
395
|
-
children: [/* @__PURE__ */
|
|
396
|
-
src:
|
|
274
|
+
href: r.href,
|
|
275
|
+
children: [/* @__PURE__ */ O("img", {
|
|
276
|
+
src: r.mark,
|
|
397
277
|
alt: "",
|
|
398
278
|
width: 20,
|
|
399
279
|
height: 20
|
|
400
|
-
}), /* @__PURE__ */
|
|
280
|
+
}), /* @__PURE__ */ O("strong", { children: r.name })]
|
|
401
281
|
}),
|
|
402
|
-
|
|
282
|
+
i && i.length > 0 && /* @__PURE__ */ O("dl", {
|
|
403
283
|
className: "dds-console-rail__context",
|
|
404
|
-
children:
|
|
284
|
+
children: i.map((e, t) => /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", { children: e.label }), /* @__PURE__ */ O("dd", { children: e.value })] }, t))
|
|
405
285
|
}),
|
|
406
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ O("nav", {
|
|
407
287
|
className: "dds-console-rail__nav",
|
|
408
|
-
"aria-label":
|
|
409
|
-
children:
|
|
288
|
+
"aria-label": o.nav,
|
|
289
|
+
children: a.map((t, r) => /* @__PURE__ */ k("section", {
|
|
410
290
|
className: "dds-console-rail__group",
|
|
411
|
-
"aria-labelledby": `${
|
|
412
|
-
children: [/* @__PURE__ */
|
|
413
|
-
id: `${
|
|
291
|
+
"aria-labelledby": `${_}-group-${r}`,
|
|
292
|
+
children: [/* @__PURE__ */ O("h2", {
|
|
293
|
+
id: `${_}-group-${r}`,
|
|
414
294
|
className: "dds-console-rail__group-label",
|
|
415
|
-
children:
|
|
416
|
-
}), /* @__PURE__ */
|
|
295
|
+
children: t.label
|
|
296
|
+
}), /* @__PURE__ */ O("ul", { children: t.items.map((t) => /* @__PURE__ */ O("li", { children: /* @__PURE__ */ k("a", {
|
|
417
297
|
className: "dds-console-rail__item",
|
|
418
|
-
"data-nav": `${e}.${
|
|
419
|
-
href:
|
|
420
|
-
"aria-current":
|
|
421
|
-
onClick: () =>
|
|
422
|
-
children: [/* @__PURE__ */
|
|
298
|
+
"data-nav": `${e}.${t.id}`,
|
|
299
|
+
href: t.href,
|
|
300
|
+
"aria-current": oe(n, t) ? "page" : void 0,
|
|
301
|
+
onClick: () => m(!1),
|
|
302
|
+
children: [/* @__PURE__ */ O("span", { children: t.label }), t.badge !== void 0 && t.badge > 0 && /* @__PURE__ */ O("span", {
|
|
423
303
|
className: "dds-console-rail__badge",
|
|
424
|
-
"aria-label":
|
|
425
|
-
children:
|
|
304
|
+
"aria-label": o.badge.replace("{count}", () => String(t.badge)),
|
|
305
|
+
children: t.badge
|
|
426
306
|
})]
|
|
427
|
-
}) },
|
|
307
|
+
}) }, t.id)) })]
|
|
428
308
|
}, r))
|
|
429
309
|
}),
|
|
430
|
-
|
|
310
|
+
c && /* @__PURE__ */ O("div", {
|
|
431
311
|
className: "dds-console-rail__foot",
|
|
432
|
-
children:
|
|
312
|
+
children: c
|
|
433
313
|
})
|
|
434
314
|
]
|
|
435
315
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
id:
|
|
316
|
+
/* @__PURE__ */ k("main", {
|
|
317
|
+
id: x,
|
|
438
318
|
className: "dds-console-main",
|
|
439
319
|
tabIndex: -1,
|
|
440
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ k("header", {
|
|
441
321
|
className: "dds-console-page-header",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ k("div", {
|
|
443
323
|
className: "dds-console-page-header__text",
|
|
444
|
-
children: [
|
|
324
|
+
children: [s.eyebrow && /* @__PURE__ */ O("p", {
|
|
445
325
|
className: "dds-console-page-eyebrow",
|
|
446
|
-
children:
|
|
447
|
-
}), /* @__PURE__ */
|
|
448
|
-
}),
|
|
326
|
+
children: s.eyebrow
|
|
327
|
+
}), /* @__PURE__ */ O("h1", { children: s.title })]
|
|
328
|
+
}), s.actions && /* @__PURE__ */ O("div", {
|
|
449
329
|
className: "dds-console-page-header__actions",
|
|
450
|
-
children:
|
|
330
|
+
children: s.actions
|
|
451
331
|
})]
|
|
452
|
-
}),
|
|
332
|
+
}), l]
|
|
453
333
|
})
|
|
454
334
|
]
|
|
455
335
|
});
|
|
456
336
|
});
|
|
457
337
|
//#endregion
|
|
458
|
-
//#region src/date-picker.tsx
|
|
459
|
-
function pe() {
|
|
460
|
-
return /* @__PURE__ */ g("svg", {
|
|
461
|
-
width: "20",
|
|
462
|
-
height: "20",
|
|
463
|
-
viewBox: "0 0 24 24",
|
|
464
|
-
fill: "none",
|
|
465
|
-
stroke: "currentColor",
|
|
466
|
-
strokeWidth: "1.5",
|
|
467
|
-
"aria-hidden": "true",
|
|
468
|
-
children: [/* @__PURE__ */ h("rect", {
|
|
469
|
-
x: "3.5",
|
|
470
|
-
y: "5.5",
|
|
471
|
-
width: "17",
|
|
472
|
-
height: "15",
|
|
473
|
-
rx: "2"
|
|
474
|
-
}), /* @__PURE__ */ h("path", { d: "M7.5 3v5M16.5 3v5M3.5 10.5h17" })]
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
function q({ next: e = !1 }) {
|
|
478
|
-
return /* @__PURE__ */ h("svg", {
|
|
479
|
-
width: "18",
|
|
480
|
-
height: "18",
|
|
481
|
-
viewBox: "0 0 24 24",
|
|
482
|
-
fill: "none",
|
|
483
|
-
stroke: "currentColor",
|
|
484
|
-
strokeWidth: "1.5",
|
|
485
|
-
"aria-hidden": "true",
|
|
486
|
-
children: /* @__PURE__ */ h("path", { d: e ? "m9 5 7 7-7 7" : "m15 5-7 7 7 7" })
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
function J(e) {
|
|
490
|
-
if (!/^\d{4}-\d{2}-\d{2}$/.test(e)) return !1;
|
|
491
|
-
let t = Number(e.slice(0, 4)), n = Number(e.slice(5, 7)), r = Number(e.slice(8, 10));
|
|
492
|
-
return t < 1 || n < 1 || n > 12 || r < 1 ? !1 : r <= [
|
|
493
|
-
31,
|
|
494
|
-
t % 4 == 0 && (t % 100 != 0 || t % 400 == 0) ? 29 : 28,
|
|
495
|
-
31,
|
|
496
|
-
30,
|
|
497
|
-
31,
|
|
498
|
-
30,
|
|
499
|
-
31,
|
|
500
|
-
31,
|
|
501
|
-
30,
|
|
502
|
-
31,
|
|
503
|
-
30,
|
|
504
|
-
31
|
|
505
|
-
][n - 1];
|
|
506
|
-
}
|
|
507
|
-
function Y(e) {
|
|
508
|
-
return /^ko(?:-|$)/i.test(e);
|
|
509
|
-
}
|
|
510
|
-
function X(e, t) {
|
|
511
|
-
return Y(t) && J(e) ? e.replaceAll("-", "/") : e;
|
|
512
|
-
}
|
|
513
|
-
function Z(e, t) {
|
|
514
|
-
return Y(t) && /^\d{4}\/\d{2}\/\d{2}$/.test(e) ? e.replaceAll("/", "-") : e;
|
|
515
|
-
}
|
|
516
|
-
function Q(e, t, n, r, i = "en-US") {
|
|
517
|
-
let a = Z(e, i), o = e.length < 10 && (/^\d{0,4}(?:-\d{0,2}(?:-\d{0,2})?)?$/.test(e) || Y(i) && /^\d{0,4}(?:\/\d{0,2}(?:\/\d{0,2})?)?$/.test(e)), s = "valid";
|
|
518
|
-
return e === "" ? s = t ? "required" : "valid" : J(a) ? n && !J(n) || r && !J(r) || n && r && n > r ? s = "invalid" : n && a < n ? s = "rangeUnderflow" : r && a > r && (s = "rangeOverflow") : s = o ? "incomplete" : "invalid", {
|
|
519
|
-
inputValue: e,
|
|
520
|
-
value: s === "valid" ? a : null,
|
|
521
|
-
valid: s === "valid",
|
|
522
|
-
reason: s
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
function $(e) {
|
|
526
|
-
return J(e) ? [I(e)] : [];
|
|
527
|
-
}
|
|
528
|
-
function me({ label: e, value: t, onChange: n, locale: i = "ko-KR", timeZone: a = "Asia/Seoul", disabled: c = !1, readOnly: l = !1, required: u = !1, onValidityChange: d, min: f, max: p }) {
|
|
529
|
-
let [_, v] = s(() => X(t, i)), [y, b] = s(() => $(t)), [x, S] = s(!1), C = o(null), w = o(!1), T = o(t), E = o(i), O = o([]), k = o(t), A = o(""), j = Z(_, E.current), M = E.current !== i && J(j) ? X(j, i) : _, N = Q(M, u, f, p, i), P = N.valid ? void 0 : i.toLowerCase().startsWith("ko") ? N.reason === "required" ? "날짜를 입력해 주세요." : "YYYY/MM/DD 형식의 유효한 범위 내 날짜를 입력해 주세요." : N.reason === "required" ? "Enter a date." : "Enter a valid date within the allowed range (YYYY-MM-DD).";
|
|
530
|
-
r(() => {
|
|
531
|
-
let e = E.current;
|
|
532
|
-
if (E.current = i, T.current === t) {
|
|
533
|
-
e !== i && v(M);
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
T.current = t;
|
|
537
|
-
let n = O.current.indexOf(t);
|
|
538
|
-
if (n !== -1) {
|
|
539
|
-
O.current.splice(n, 1);
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
O.current = [], k.current = t, v(X(t, i)), (t === "" || J(t)) && b($(t));
|
|
543
|
-
}, [t, i]), r(() => {
|
|
544
|
-
C.current?.setCustomValidity(P ?? "");
|
|
545
|
-
let e = JSON.stringify(N);
|
|
546
|
-
d && A.current !== e && (A.current = e, d(N));
|
|
547
|
-
}, [
|
|
548
|
-
_,
|
|
549
|
-
u,
|
|
550
|
-
f,
|
|
551
|
-
p,
|
|
552
|
-
i,
|
|
553
|
-
P,
|
|
554
|
-
d
|
|
555
|
-
]), r(() => {
|
|
556
|
-
(c || l) && (w.current = !1, S(!1));
|
|
557
|
-
}, [c, l]), r(() => {
|
|
558
|
-
if (!w.current || c || l) return;
|
|
559
|
-
let e = requestAnimationFrame(() => {
|
|
560
|
-
w.current = !1, C.current?.focus({ preventScroll: !0 });
|
|
561
|
-
});
|
|
562
|
-
return () => cancelAnimationFrame(e);
|
|
563
|
-
}, [
|
|
564
|
-
x,
|
|
565
|
-
y,
|
|
566
|
-
c,
|
|
567
|
-
l
|
|
568
|
-
]);
|
|
569
|
-
function L(e) {
|
|
570
|
-
let t = Q(e, u, f, p, i);
|
|
571
|
-
if (e !== "" && !t.valid) return;
|
|
572
|
-
let r = e === "" ? "" : t.value;
|
|
573
|
-
b($(r)), r !== k.current && (k.current = r, O.current.push(r), n(r));
|
|
574
|
-
}
|
|
575
|
-
function z(e) {
|
|
576
|
-
v(e);
|
|
577
|
-
let t = Q(e, u, f, p, i);
|
|
578
|
-
C.current?.setCustomValidity(t.valid ? "" : P ?? "Enter a valid date (YYYY-MM-DD)."), (e === "" || t.valid) && (v(X(t.value ?? "", i)), L(e));
|
|
579
|
-
}
|
|
580
|
-
return /* @__PURE__ */ h(B, {
|
|
581
|
-
label: e,
|
|
582
|
-
required: u,
|
|
583
|
-
error: P,
|
|
584
|
-
children: (t) => /* @__PURE__ */ g(F.Root, {
|
|
585
|
-
locale: i,
|
|
586
|
-
timeZone: a,
|
|
587
|
-
disabled: c,
|
|
588
|
-
readOnly: l,
|
|
589
|
-
required: u,
|
|
590
|
-
invalid: !N.valid,
|
|
591
|
-
open: x && !c && !l,
|
|
592
|
-
onOpenChange: (e) => S(e.open && !c && !l),
|
|
593
|
-
min: f && J(f) ? I(f) : void 0,
|
|
594
|
-
max: p && J(p) ? I(p) : void 0,
|
|
595
|
-
startOfWeek: 0,
|
|
596
|
-
minView: "day",
|
|
597
|
-
maxView: "day",
|
|
598
|
-
fixedWeeks: !0,
|
|
599
|
-
translations: {
|
|
600
|
-
dayCell: (e) => `${e.valueText} 선택`,
|
|
601
|
-
clearTrigger: "선택 날짜 지우기"
|
|
602
|
-
},
|
|
603
|
-
value: y,
|
|
604
|
-
format: (e) => X(e.toString(), i),
|
|
605
|
-
onValueChange: (e) => {
|
|
606
|
-
let t = e.value[0]?.toString() || "";
|
|
607
|
-
t !== "" && !Q(t, u, f, p, i).valid || (w.current = !0, v(X(t, i)), L(t));
|
|
608
|
-
},
|
|
609
|
-
positioning: {
|
|
610
|
-
placement: "bottom-start",
|
|
611
|
-
gutter: 8
|
|
612
|
-
},
|
|
613
|
-
children: [/* @__PURE__ */ g(F.Control, {
|
|
614
|
-
className: "dds-date-picker-control",
|
|
615
|
-
children: [/* @__PURE__ */ h("input", {
|
|
616
|
-
...t,
|
|
617
|
-
ref: C,
|
|
618
|
-
type: "text",
|
|
619
|
-
value: M,
|
|
620
|
-
onChange: () => {},
|
|
621
|
-
required: u,
|
|
622
|
-
readOnly: l,
|
|
623
|
-
disabled: c,
|
|
624
|
-
placeholder: Y(i) ? "YYYY/MM/DD" : "YYYY-MM-DD",
|
|
625
|
-
autoComplete: "off",
|
|
626
|
-
autoCorrect: "off",
|
|
627
|
-
spellCheck: !1,
|
|
628
|
-
onInputCapture: (e) => {
|
|
629
|
-
c || l || (e.stopPropagation(), z(e.currentTarget.value));
|
|
630
|
-
},
|
|
631
|
-
onBlur: () => {
|
|
632
|
-
!c && !l && L(M);
|
|
633
|
-
},
|
|
634
|
-
onKeyDownCapture: (e) => {
|
|
635
|
-
e.key === "Enter" && !e.nativeEvent.isComposing && (e.preventDefault(), e.stopPropagation(), !c && !l && L(M));
|
|
636
|
-
}
|
|
637
|
-
}), /* @__PURE__ */ h(F.Trigger, {
|
|
638
|
-
asChild: !0,
|
|
639
|
-
children: /* @__PURE__ */ h(R, {
|
|
640
|
-
type: "button",
|
|
641
|
-
tone: "secondary",
|
|
642
|
-
"aria-label": `${e} 달력 열기`,
|
|
643
|
-
children: /* @__PURE__ */ h(pe, {})
|
|
644
|
-
})
|
|
645
|
-
})]
|
|
646
|
-
}), /* @__PURE__ */ h(D, { children: /* @__PURE__ */ h(F.Positioner, {
|
|
647
|
-
className: "dds-date-picker-positioner",
|
|
648
|
-
children: /* @__PURE__ */ h(F.Content, {
|
|
649
|
-
className: "dds-date-picker-content",
|
|
650
|
-
"aria-label": `${e} 날짜 선택`,
|
|
651
|
-
children: /* @__PURE__ */ h(F.View, {
|
|
652
|
-
view: "day",
|
|
653
|
-
children: /* @__PURE__ */ h(F.Context, { children: (e) => /* @__PURE__ */ g(m, { children: [
|
|
654
|
-
/* @__PURE__ */ g(F.ViewControl, {
|
|
655
|
-
className: "dds-date-picker-header",
|
|
656
|
-
children: [
|
|
657
|
-
/* @__PURE__ */ h(F.PrevTrigger, {
|
|
658
|
-
asChild: !0,
|
|
659
|
-
children: /* @__PURE__ */ h(R, {
|
|
660
|
-
type: "button",
|
|
661
|
-
tone: "secondary",
|
|
662
|
-
"aria-label": "이전 달",
|
|
663
|
-
children: /* @__PURE__ */ h(q, {})
|
|
664
|
-
})
|
|
665
|
-
}),
|
|
666
|
-
/* @__PURE__ */ h(F.RangeText, {}),
|
|
667
|
-
/* @__PURE__ */ h(F.NextTrigger, {
|
|
668
|
-
asChild: !0,
|
|
669
|
-
children: /* @__PURE__ */ h(R, {
|
|
670
|
-
type: "button",
|
|
671
|
-
tone: "secondary",
|
|
672
|
-
"aria-label": "다음 달",
|
|
673
|
-
children: /* @__PURE__ */ h(q, { next: !0 })
|
|
674
|
-
})
|
|
675
|
-
})
|
|
676
|
-
]
|
|
677
|
-
}),
|
|
678
|
-
/* @__PURE__ */ g(F.Table, {
|
|
679
|
-
className: "dds-date-picker-table",
|
|
680
|
-
children: [/* @__PURE__ */ h(F.TableHead, { children: /* @__PURE__ */ h(F.TableRow, { children: e.weekDays.map((e, t) => /* @__PURE__ */ h(F.TableHeader, { children: e.short }, t)) }) }), /* @__PURE__ */ h(F.TableBody, { children: e.weeks.map((e, t) => /* @__PURE__ */ h(F.TableRow, { children: e.map((e) => /* @__PURE__ */ h(F.TableCell, {
|
|
681
|
-
value: e,
|
|
682
|
-
children: /* @__PURE__ */ h(F.TableCellTrigger, { children: e.day })
|
|
683
|
-
}, e.toString())) }, t)) })]
|
|
684
|
-
}),
|
|
685
|
-
/* @__PURE__ */ g("div", {
|
|
686
|
-
className: "dds-date-picker-footer",
|
|
687
|
-
children: [/* @__PURE__ */ h(R, {
|
|
688
|
-
type: "button",
|
|
689
|
-
tone: "secondary",
|
|
690
|
-
onClick: () => e.selectToday(),
|
|
691
|
-
children: "오늘"
|
|
692
|
-
}), /* @__PURE__ */ h(F.ClearTrigger, {
|
|
693
|
-
hidden: !1,
|
|
694
|
-
asChild: !0,
|
|
695
|
-
children: /* @__PURE__ */ h(R, {
|
|
696
|
-
type: "button",
|
|
697
|
-
tone: "secondary",
|
|
698
|
-
onClick: () => {
|
|
699
|
-
!c && !l && (v(""), L(""));
|
|
700
|
-
},
|
|
701
|
-
children: "지우기"
|
|
702
|
-
})
|
|
703
|
-
})]
|
|
704
|
-
})
|
|
705
|
-
] }) })
|
|
706
|
-
})
|
|
707
|
-
})
|
|
708
|
-
}) })]
|
|
709
|
-
})
|
|
710
|
-
});
|
|
711
|
-
}
|
|
712
|
-
//#endregion
|
|
713
338
|
//#region src/status-pill.tsx
|
|
714
|
-
function
|
|
339
|
+
function ce(e) {
|
|
715
340
|
let t = new Set(e.openDomains ?? []);
|
|
716
341
|
return function(n) {
|
|
717
342
|
let r = e.tones[n.domain]?.[n.value], i = e.label(n.domain, n.value, n.locale);
|
|
718
343
|
if (!r || !i) {
|
|
719
|
-
if (t.has(n.domain)) return /* @__PURE__ */
|
|
344
|
+
if (t.has(n.domain)) return /* @__PURE__ */ O("code", {
|
|
720
345
|
"data-status": `${n.domain}.${n.value}`,
|
|
721
346
|
children: n.value
|
|
722
347
|
});
|
|
723
348
|
throw Error(r ? `StatusPill: no label for ${n.domain}.${n.value}` : `StatusPill: no tone for ${n.domain}.${n.value}`);
|
|
724
349
|
}
|
|
725
|
-
return /* @__PURE__ */
|
|
350
|
+
return /* @__PURE__ */ O("span", {
|
|
726
351
|
className: r === "neutral" ? "dds-badge" : `dds-badge dds-badge--${r}`,
|
|
727
352
|
"data-status": `${n.domain}.${n.value}`,
|
|
728
353
|
"data-tone": r,
|
|
@@ -731,6 +356,6 @@ function he(e) {
|
|
|
731
356
|
};
|
|
732
357
|
}
|
|
733
358
|
//#endregion
|
|
734
|
-
export {
|
|
359
|
+
export { T as ArkCheckbox, G as ArkDatePicker, P as ArkDialog, w as ArkField, te as ArkRadioGroup, E as ArkSwitch, A as ArkTabs, H as ArkToast, I as ArkTooltip, s as Button, h as Calendar, r as Checkbox, d as Combobox, se as ConsoleShell, c as DatePicker, ne as Dialog, p as DropdownMenu, a as Field, Q as Icon, n as IconButton, l as Input, u as InputGroup, m as Popover, e as Radio, Z as RadioGroup, i as Select, f as SelectPicker, o as Switch, J as Tab, q as TabList, Y as TabPanel, K as Tabs, ie as ToastProvider, re as Tooltip, t as classes, ce as createStatusPill, ae as useToast };
|
|
735
360
|
|
|
736
361
|
//# sourceMappingURL=index.js.map
|