@devslab/dds-solid 0.21.2 → 0.22.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 +6 -0
- package/README.md +6 -0
- package/dist/assets/calendar-view-1RO2mtf1.js +456 -0
- package/dist/assets/calendar-view-1RO2mtf1.js.map +1 -0
- package/dist/assets/choice-DoXiK8nc.js +443 -0
- package/dist/assets/choice-DoXiK8nc.js.map +1 -0
- package/dist/assets/utils-Ou0UJRlO.js +11 -0
- package/dist/assets/utils-Ou0UJRlO.js.map +1 -0
- package/dist/calendar-view-CTBTPB4T.js +444 -0
- package/dist/calendar-view-CTBTPB4T.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 +95 -0
- package/dist/calendar.js.map +1 -0
- package/dist/calendar.server.js +95 -0
- package/dist/calendar.server.js.map +1 -0
- package/dist/choice-BPMiJlPJ.js +395 -0
- package/dist/choice-BPMiJlPJ.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 +10 -0
- package/dist/combobox.js.map +1 -0
- package/dist/combobox.server.js +10 -0
- package/dist/combobox.server.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 +10 -1
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +258 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/date-picker.server.js +260 -0
- package/dist/date-picker.server.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 +101 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/dropdown-menu.server.js +111 -0
- package/dist/dropdown-menu.server.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +232 -647
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts +26 -0
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +130 -0
- package/dist/input.js.map +1 -0
- package/dist/input.server.js +120 -0
- package/dist/input.server.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 +22 -0
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +76 -0
- package/dist/popover.js.map +1 -0
- package/dist/popover.server.js +79 -0
- package/dist/popover.server.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 +10 -0
- package/dist/select-picker.js.map +1 -0
- package/dist/select-picker.server.js +10 -0
- package/dist/select-picker.server.js.map +1 -0
- package/dist/server.js +28 -445
- package/dist/server.js.map +1 -1
- package/dist/utils-oKxhg9RG.js +11 -0
- package/dist/utils-oKxhg9RG.js.map +1 -0
- package/package.json +63 -6
- package/styles.css +10 -1
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
import { n as e, t } from "./utils-oKxhg9RG.js";
|
|
2
|
+
import { For as n, Show as r, createSignal as i, createUniqueId as a, splitProps as o } from "solid-js";
|
|
3
|
+
import { className as s, createComponent as c, effect as l, getNextElement as u, getNextMarker as d, insert as f, memo as p, mergeProps as m, runHydrationEvents as h, setAttribute as g, spread as _, template as v, use as y } from "solid-js/web";
|
|
4
|
+
import { useCheckbox as b } from "@ark-ui/solid/checkbox";
|
|
5
|
+
import { useSwitch as x } from "@ark-ui/solid/switch";
|
|
6
|
+
import { Field as S } from "@ark-ui/solid/field";
|
|
7
|
+
import { DatePicker as C } from "@ark-ui/solid/date-picker";
|
|
8
|
+
//#region src/controllable.ts
|
|
9
|
+
function w(e) {
|
|
10
|
+
let [t, n] = i(e.defaultValue), r = () => e.value() ?? t(), a = n;
|
|
11
|
+
return [r, (t) => {
|
|
12
|
+
let n = typeof t == "function" ? t(r()) : t;
|
|
13
|
+
return e.value() === void 0 && a(() => n), e.onChange?.(n), n;
|
|
14
|
+
}];
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/controls.tsx
|
|
18
|
+
var T = /*#__PURE__*/ v("<button><!$><!/><!$><!/>"), E = /*#__PURE__*/ v("<span class=dds-spinner aria-hidden=true>"), D = /*#__PURE__*/ v("<button>"), O = /*#__PURE__*/ v("<span aria-hidden=true> *"), k = /*#__PURE__*/ v("<span><select>"), A = /*#__PURE__*/ v("<label><input><span>");
|
|
19
|
+
function j(e) {
|
|
20
|
+
let [n, r] = o(e, [
|
|
21
|
+
"class",
|
|
22
|
+
"tone",
|
|
23
|
+
"size",
|
|
24
|
+
"loading",
|
|
25
|
+
"disabled",
|
|
26
|
+
"type",
|
|
27
|
+
"children"
|
|
28
|
+
]);
|
|
29
|
+
return (() => {
|
|
30
|
+
var e = u(T), i = e.firstChild, [a, o] = d(i.nextSibling), s = a.nextSibling, [c, l] = d(s.nextSibling);
|
|
31
|
+
return _(e, m(r, {
|
|
32
|
+
get type() {
|
|
33
|
+
return n.type ?? "button";
|
|
34
|
+
},
|
|
35
|
+
get class() {
|
|
36
|
+
return t("dds-btn", `dds-btn--${n.tone ?? "primary"}`, n.size !== "md" && n.size ? `dds-btn--${n.size}` : void 0, n.class);
|
|
37
|
+
},
|
|
38
|
+
get disabled() {
|
|
39
|
+
return n.disabled || n.loading;
|
|
40
|
+
},
|
|
41
|
+
get "aria-busy"() {
|
|
42
|
+
return n.loading ? "true" : void 0;
|
|
43
|
+
}
|
|
44
|
+
}), !1, !0), f(e, (() => {
|
|
45
|
+
var e = p(() => !!n.loading);
|
|
46
|
+
return () => e() && u(E);
|
|
47
|
+
})(), a, o), f(e, () => n.children, c, l), h(), e;
|
|
48
|
+
})();
|
|
49
|
+
}
|
|
50
|
+
function M(e) {
|
|
51
|
+
let [n, r] = o(e, [
|
|
52
|
+
"class",
|
|
53
|
+
"tone",
|
|
54
|
+
"size",
|
|
55
|
+
"loading",
|
|
56
|
+
"disabled",
|
|
57
|
+
"type",
|
|
58
|
+
"children"
|
|
59
|
+
]);
|
|
60
|
+
return (() => {
|
|
61
|
+
var e = u(D);
|
|
62
|
+
return _(e, m(r, {
|
|
63
|
+
get type() {
|
|
64
|
+
return n.type ?? "button";
|
|
65
|
+
},
|
|
66
|
+
get class() {
|
|
67
|
+
return t("dds-iconbtn", n.tone && n.tone !== "ghost" ? `dds-iconbtn--${n.tone}` : void 0, n.size !== "md" && n.size ? `dds-iconbtn--${n.size}` : void 0, n.class);
|
|
68
|
+
},
|
|
69
|
+
get disabled() {
|
|
70
|
+
return n.disabled || n.loading;
|
|
71
|
+
},
|
|
72
|
+
get "aria-busy"() {
|
|
73
|
+
return n.loading ? "true" : void 0;
|
|
74
|
+
}
|
|
75
|
+
}), !1, !0), f(e, (() => {
|
|
76
|
+
var e = p(() => !!n.loading);
|
|
77
|
+
return () => e() ? u(E) : n.children;
|
|
78
|
+
})()), h(), e;
|
|
79
|
+
})();
|
|
80
|
+
}
|
|
81
|
+
function N(n) {
|
|
82
|
+
let r = a(), i = () => n.id ?? `dds-field-${r}`, o = () => n.helpText ? `${i()}-help` : void 0, s = () => n.error ? `${i()}-error` : void 0, l = () => ({
|
|
83
|
+
id: i(),
|
|
84
|
+
"aria-describedby": e(o(), s()),
|
|
85
|
+
"aria-invalid": n.error ? "true" : void 0,
|
|
86
|
+
"aria-required": n.required ? "true" : void 0
|
|
87
|
+
});
|
|
88
|
+
return c(S.Root, {
|
|
89
|
+
get id() {
|
|
90
|
+
return i();
|
|
91
|
+
},
|
|
92
|
+
get required() {
|
|
93
|
+
return n.required ?? !1;
|
|
94
|
+
},
|
|
95
|
+
get invalid() {
|
|
96
|
+
return !!n.error;
|
|
97
|
+
},
|
|
98
|
+
get ids() {
|
|
99
|
+
return {
|
|
100
|
+
control: `${i()}-root`,
|
|
101
|
+
helperText: `${i()}-help`,
|
|
102
|
+
errorText: `${i()}-error`
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
get class() {
|
|
106
|
+
return t("dds-field", n.error ? "dds-field--error" : void 0, n.class);
|
|
107
|
+
},
|
|
108
|
+
get children() {
|
|
109
|
+
return [
|
|
110
|
+
c(S.Label, {
|
|
111
|
+
class: "dds-field__label",
|
|
112
|
+
get for() {
|
|
113
|
+
return i();
|
|
114
|
+
},
|
|
115
|
+
get children() {
|
|
116
|
+
return [p(() => n.label), p(() => p(() => !!n.required)() && u(O))];
|
|
117
|
+
}
|
|
118
|
+
}),
|
|
119
|
+
p(() => p(() => typeof n.children == "function")() ? n.children(l()) : n.children),
|
|
120
|
+
p(() => p(() => !!n.helpText)() && c(S.HelperText, {
|
|
121
|
+
class: "dds-field__help",
|
|
122
|
+
get children() {
|
|
123
|
+
return n.helpText;
|
|
124
|
+
}
|
|
125
|
+
})),
|
|
126
|
+
p(() => p(() => !!n.error)() && c(S.ErrorText, {
|
|
127
|
+
class: "dds-field__error",
|
|
128
|
+
role: "alert",
|
|
129
|
+
get children() {
|
|
130
|
+
return n.error;
|
|
131
|
+
}
|
|
132
|
+
}))
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function P(e) {
|
|
138
|
+
let [n, r] = o(e, [
|
|
139
|
+
"class",
|
|
140
|
+
"invalid",
|
|
141
|
+
"children"
|
|
142
|
+
]);
|
|
143
|
+
return (() => {
|
|
144
|
+
var e = u(k), i = e.firstChild;
|
|
145
|
+
return _(i, m(r, {
|
|
146
|
+
class: "dds-select__input",
|
|
147
|
+
get "aria-invalid"() {
|
|
148
|
+
return n.invalid ? "true" : void 0;
|
|
149
|
+
}
|
|
150
|
+
}), !1, !0), f(i, () => n.children), l(() => s(e, t("dds-select", n.class))), h(), e;
|
|
151
|
+
})();
|
|
152
|
+
}
|
|
153
|
+
function F(e) {
|
|
154
|
+
let [n, r] = o(e, [
|
|
155
|
+
"checked",
|
|
156
|
+
"defaultChecked",
|
|
157
|
+
"onCheckedChange",
|
|
158
|
+
"label",
|
|
159
|
+
"class",
|
|
160
|
+
"inputClass",
|
|
161
|
+
"type",
|
|
162
|
+
"role"
|
|
163
|
+
]), [i, a] = w({
|
|
164
|
+
value: () => n.checked,
|
|
165
|
+
defaultValue: n.defaultChecked ?? !1,
|
|
166
|
+
onChange: n.onCheckedChange
|
|
167
|
+
});
|
|
168
|
+
return (() => {
|
|
169
|
+
var e = u(A), o = e.firstChild, c = o.nextSibling;
|
|
170
|
+
return _(o, m(r, {
|
|
171
|
+
get type() {
|
|
172
|
+
return n.type;
|
|
173
|
+
},
|
|
174
|
+
get role() {
|
|
175
|
+
return n.role;
|
|
176
|
+
},
|
|
177
|
+
get class() {
|
|
178
|
+
return t(n.role === "switch" ? "dds-switch__input" : "dds-check__input", n.inputClass);
|
|
179
|
+
},
|
|
180
|
+
get checked() {
|
|
181
|
+
return i();
|
|
182
|
+
},
|
|
183
|
+
onChange: (e) => a(e.currentTarget.checked)
|
|
184
|
+
}), !1, !1), f(c, () => n.label), l(() => s(e, t(n.role === "switch" ? "dds-switch" : "dds-check", n.class))), h(), e;
|
|
185
|
+
})();
|
|
186
|
+
}
|
|
187
|
+
var I = (e) => c(z, m(e, { kind: "checkbox" })), L = (e) => c(F, m(e, { type: "radio" })), R = (e) => c(z, m(e, { kind: "switch" }));
|
|
188
|
+
function z(e) {
|
|
189
|
+
let n = a(), [r, i] = o(e, [
|
|
190
|
+
"checked",
|
|
191
|
+
"defaultChecked",
|
|
192
|
+
"onCheckedChange",
|
|
193
|
+
"label",
|
|
194
|
+
"class",
|
|
195
|
+
"inputClass",
|
|
196
|
+
"kind",
|
|
197
|
+
"id",
|
|
198
|
+
"onClick",
|
|
199
|
+
"onFocusIn",
|
|
200
|
+
"onFocusOut",
|
|
201
|
+
"style"
|
|
202
|
+
]), s = () => ({
|
|
203
|
+
id: `dds-check-${n}`,
|
|
204
|
+
ids: { hiddenInput: r.id ?? `dds-check-${n}-input` },
|
|
205
|
+
checked: r.checked,
|
|
206
|
+
defaultChecked: r.defaultChecked,
|
|
207
|
+
onCheckedChange: (e) => r.onCheckedChange?.(e.checked === !0),
|
|
208
|
+
disabled: i.disabled,
|
|
209
|
+
required: i.required,
|
|
210
|
+
readOnly: i.readonly,
|
|
211
|
+
name: i.name,
|
|
212
|
+
form: i.form,
|
|
213
|
+
value: String(i.value ?? "on")
|
|
214
|
+
}), c = r.kind === "switch" ? x(s) : b(s), l = () => r.kind === "switch" ? "dds-switch__input" : "dds-check__input", d = () => {
|
|
215
|
+
let [, e] = o(c().getRootProps(), ["onClick"]);
|
|
216
|
+
return e;
|
|
217
|
+
};
|
|
218
|
+
return (() => {
|
|
219
|
+
var e = u(A), n = e.firstChild, a = n.nextSibling;
|
|
220
|
+
return _(e, m(d, { get class() {
|
|
221
|
+
return t(r.kind === "switch" ? "dds-switch" : "dds-check", r.class);
|
|
222
|
+
} }), !1, !0), y((e) => {
|
|
223
|
+
e.defaultChecked = r.checked ?? r.defaultChecked ?? !1, typeof i.ref == "function" && i.ref(e);
|
|
224
|
+
}, n), _(n, m(() => c().getHiddenInputProps(), i, {
|
|
225
|
+
type: "checkbox",
|
|
226
|
+
get role() {
|
|
227
|
+
return r.kind === "switch" ? "switch" : void 0;
|
|
228
|
+
},
|
|
229
|
+
get class() {
|
|
230
|
+
return t(l(), r.inputClass);
|
|
231
|
+
},
|
|
232
|
+
get style() {
|
|
233
|
+
return r.style ?? {};
|
|
234
|
+
},
|
|
235
|
+
get checked() {
|
|
236
|
+
return c().checked;
|
|
237
|
+
},
|
|
238
|
+
onFocusIn: (e) => {
|
|
239
|
+
B(c().getHiddenInputProps().onFocusIn, e), B(r.onFocusIn, e);
|
|
240
|
+
},
|
|
241
|
+
onFocusOut: (e) => {
|
|
242
|
+
B(c().getHiddenInputProps().onFocusOut, e), B(r.onFocusOut, e);
|
|
243
|
+
},
|
|
244
|
+
onClick: (e) => {
|
|
245
|
+
if (typeof r.onClick == "function" ? r.onClick(e) : r.onClick && r.onClick[0](r.onClick[1], e), !e.defaultPrevented) {
|
|
246
|
+
let t = c().getHiddenInputProps().onClick;
|
|
247
|
+
typeof t == "function" ? t(e) : t && t[0](t[1], e);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}), !1, !1), _(a, m(() => c().getLabelProps()), !1, !0), f(a, () => r.label), h(), e;
|
|
251
|
+
})();
|
|
252
|
+
}
|
|
253
|
+
function B(e, t) {
|
|
254
|
+
typeof e == "function" ? e(t) : e && e[0](e[1], t);
|
|
255
|
+
}
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/date-only.ts
|
|
258
|
+
function V(e) {
|
|
259
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(e)) return !1;
|
|
260
|
+
let t = Number(e.slice(0, 4)), n = Number(e.slice(5, 7)), r = Number(e.slice(8, 10));
|
|
261
|
+
return t < 1 || n < 1 || n > 12 || r < 1 ? !1 : r <= [
|
|
262
|
+
31,
|
|
263
|
+
t % 4 == 0 && (t % 100 != 0 || t % 400 == 0) ? 29 : 28,
|
|
264
|
+
31,
|
|
265
|
+
30,
|
|
266
|
+
31,
|
|
267
|
+
30,
|
|
268
|
+
31,
|
|
269
|
+
31,
|
|
270
|
+
30,
|
|
271
|
+
31,
|
|
272
|
+
30,
|
|
273
|
+
31
|
|
274
|
+
][n - 1];
|
|
275
|
+
}
|
|
276
|
+
function H(e) {
|
|
277
|
+
return /^ko(?:-|$)/i.test(e);
|
|
278
|
+
}
|
|
279
|
+
function U(e, t) {
|
|
280
|
+
return H(t) && V(e) ? e.replaceAll("-", "/") : e;
|
|
281
|
+
}
|
|
282
|
+
function W(e, t) {
|
|
283
|
+
return H(t) && /^\d{4}\/\d{2}\/\d{2}$/.test(e) ? e.replaceAll("/", "-") : e;
|
|
284
|
+
}
|
|
285
|
+
function G(e, t, n, r, i = "en-US") {
|
|
286
|
+
let a = W(e, i), o = e.length < 10 && (/^\d{0,4}(?:-\d{0,2}(?:-\d{0,2})?)?$/.test(e) || H(i) && /^\d{0,4}(?:\/\d{0,2}(?:\/\d{0,2})?)?$/.test(e)), s = "valid";
|
|
287
|
+
return e === "" ? s = t ? "required" : "valid" : V(a) ? n && !V(n) || r && !V(r) || n && r && n > r ? s = "invalid" : n && a < n ? s = "rangeUnderflow" : r && a > r && (s = "rangeOverflow") : s = o ? "incomplete" : "invalid", {
|
|
288
|
+
inputValue: e,
|
|
289
|
+
value: s === "valid" ? a : null,
|
|
290
|
+
valid: s === "valid",
|
|
291
|
+
reason: s
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
function K(e, t = {}) {
|
|
295
|
+
let n = H(e);
|
|
296
|
+
return {
|
|
297
|
+
previousMonth: n ? "이전 달" : "Previous month",
|
|
298
|
+
nextMonth: n ? "다음 달" : "Next month",
|
|
299
|
+
today: n ? "오늘" : "Today",
|
|
300
|
+
clear: n ? "선택 날짜 지우기" : "Clear selected date",
|
|
301
|
+
openCalendar: n ? "달력 열기" : "Open calendar",
|
|
302
|
+
selectDate: (e) => n ? `${e} 선택` : `Choose ${e}`,
|
|
303
|
+
required: n ? "날짜를 입력해 주세요." : "Enter a date.",
|
|
304
|
+
invalid: n ? "YYYY/MM/DD 형식의 유효한 범위 내 날짜를 입력해 주세요." : "Enter a valid date within the allowed range (YYYY-MM-DD).",
|
|
305
|
+
...t
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
function q(e) {
|
|
309
|
+
let t = new Intl.DateTimeFormat("en-US-u-ca-gregory-nu-latn", {
|
|
310
|
+
timeZone: e,
|
|
311
|
+
year: "numeric",
|
|
312
|
+
month: "2-digit",
|
|
313
|
+
day: "2-digit"
|
|
314
|
+
}).formatToParts(/* @__PURE__ */ new Date()), n = (e) => t.find((t) => t.type === e).value;
|
|
315
|
+
return `${n("year").padStart(4, "0")}-${n("month")}-${n("day")}`;
|
|
316
|
+
}
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region src/calendar-view.tsx
|
|
319
|
+
var J = /*#__PURE__*/ v("<svg width=18 height=18 viewBox=\"0 0 24 24\"fill=none stroke=currentColor stroke-width=1.5 aria-hidden=true><path>"), Y = /*#__PURE__*/ v("<div class=dds-date-picker-footer><!$><!/><!$><!/>");
|
|
320
|
+
function X(e) {
|
|
321
|
+
return (() => {
|
|
322
|
+
var t = u(J), n = t.firstChild;
|
|
323
|
+
return l(() => g(n, "d", e.next ? "m9 5 7 7-7 7" : "m15 5-7 7 7 7")), t;
|
|
324
|
+
})();
|
|
325
|
+
}
|
|
326
|
+
function Z(e) {
|
|
327
|
+
let t = () => K(e.locale ?? "ko-KR", e.messages), i = () => e.disabled || e.readOnly;
|
|
328
|
+
return c(C.View, {
|
|
329
|
+
view: "day",
|
|
330
|
+
get children() {
|
|
331
|
+
return c(C.Context, { children: (a) => [
|
|
332
|
+
c(C.ViewControl, {
|
|
333
|
+
class: "dds-date-picker-header",
|
|
334
|
+
get children() {
|
|
335
|
+
return [
|
|
336
|
+
c(C.PrevTrigger, {
|
|
337
|
+
class: "dds-btn dds-btn--secondary",
|
|
338
|
+
get "aria-label"() {
|
|
339
|
+
return t().previousMonth;
|
|
340
|
+
},
|
|
341
|
+
get children() {
|
|
342
|
+
return c(X, {});
|
|
343
|
+
}
|
|
344
|
+
}),
|
|
345
|
+
c(C.RangeText, {}),
|
|
346
|
+
c(C.NextTrigger, {
|
|
347
|
+
class: "dds-btn dds-btn--secondary",
|
|
348
|
+
get "aria-label"() {
|
|
349
|
+
return t().nextMonth;
|
|
350
|
+
},
|
|
351
|
+
get children() {
|
|
352
|
+
return c(X, { next: !0 });
|
|
353
|
+
}
|
|
354
|
+
})
|
|
355
|
+
];
|
|
356
|
+
}
|
|
357
|
+
}),
|
|
358
|
+
c(C.Table, {
|
|
359
|
+
class: "dds-date-picker-table",
|
|
360
|
+
get children() {
|
|
361
|
+
return [c(C.TableHead, { get children() {
|
|
362
|
+
return c(C.TableRow, { get children() {
|
|
363
|
+
return c(n, {
|
|
364
|
+
get each() {
|
|
365
|
+
return a().weekDays;
|
|
366
|
+
},
|
|
367
|
+
children: (e) => c(C.TableHeader, { get children() {
|
|
368
|
+
return e.short;
|
|
369
|
+
} })
|
|
370
|
+
});
|
|
371
|
+
} });
|
|
372
|
+
} }), c(C.TableBody, { get children() {
|
|
373
|
+
return c(n, {
|
|
374
|
+
get each() {
|
|
375
|
+
return a().weeks;
|
|
376
|
+
},
|
|
377
|
+
children: (e) => c(C.TableRow, { get children() {
|
|
378
|
+
return c(n, {
|
|
379
|
+
each: e,
|
|
380
|
+
children: (e) => c(C.TableCell, {
|
|
381
|
+
value: e,
|
|
382
|
+
get children() {
|
|
383
|
+
return c(C.TableCellTrigger, { get children() {
|
|
384
|
+
return e.day;
|
|
385
|
+
} });
|
|
386
|
+
}
|
|
387
|
+
})
|
|
388
|
+
});
|
|
389
|
+
} })
|
|
390
|
+
});
|
|
391
|
+
} })];
|
|
392
|
+
}
|
|
393
|
+
}),
|
|
394
|
+
(() => {
|
|
395
|
+
var n = u(Y), o = n.firstChild, [s, l] = d(o.nextSibling), p = s.nextSibling, [m, h] = d(p.nextSibling);
|
|
396
|
+
return f(n, c(r, {
|
|
397
|
+
get when() {
|
|
398
|
+
return e.showToday !== !1;
|
|
399
|
+
},
|
|
400
|
+
get children() {
|
|
401
|
+
return c(j, {
|
|
402
|
+
type: "button",
|
|
403
|
+
tone: "secondary",
|
|
404
|
+
get disabled() {
|
|
405
|
+
return i() || !G(q(e.timeZone ?? "Asia/Seoul"), !1, e.min, e.max, e.locale).valid;
|
|
406
|
+
},
|
|
407
|
+
onClick: () => {
|
|
408
|
+
!i() && G(q(e.timeZone ?? "Asia/Seoul"), !1, e.min, e.max, e.locale).valid && a().selectToday();
|
|
409
|
+
},
|
|
410
|
+
get children() {
|
|
411
|
+
return t().today;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}), s, l), f(n, c(r, {
|
|
416
|
+
get when() {
|
|
417
|
+
return e.showClear !== !1;
|
|
418
|
+
},
|
|
419
|
+
get children() {
|
|
420
|
+
return c(C.ClearTrigger, {
|
|
421
|
+
hidden: !1,
|
|
422
|
+
class: "dds-btn dds-btn--secondary",
|
|
423
|
+
get disabled() {
|
|
424
|
+
return i();
|
|
425
|
+
},
|
|
426
|
+
onPointerDown: (e) => e.preventDefault(),
|
|
427
|
+
onClick: () => {
|
|
428
|
+
i() || e.onClear?.();
|
|
429
|
+
},
|
|
430
|
+
get children() {
|
|
431
|
+
return t().clear;
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
}), m, h), n;
|
|
436
|
+
})()
|
|
437
|
+
] });
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
//#endregion
|
|
442
|
+
export { V as a, j as c, M as d, L as f, w as h, U as i, I as l, R as m, W as n, H as o, P as p, K as r, G as s, Z as t, N as u };
|
|
443
|
+
|
|
444
|
+
//# sourceMappingURL=calendar-view-CTBTPB4T.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-view-CTBTPB4T.js","names":["createUniqueId","splitProps","JSX","ParentProps","createControllableSignal","useCheckbox","useSwitch","Field","ArkField","classes","describedBy","ButtonTone","ControlSize","ButtonProps","Omit","ButtonHTMLAttributes","HTMLButtonElement","class","tone","size","loading","Button","props","local","rest","_el$","_$getNextElement","_tmpl$","_el$2","firstChild","_el$3","_co$","_$getNextMarker","nextSibling","_el$4","_el$5","_co$2","_$spread","_$mergeProps","type","undefined","disabled","aria-busy","_$insert","_c$","_$memo","_tmpl$2","children","_$runHydrationEvents","IconButtonProps","Element","IconButton","_el$7","_tmpl$3","_c$2","FieldControlProps","id","FieldProps","label","helpText","error","required","generated","helpId","errorId","control","_$createComponent","Root","invalid","Boolean","ids","helperText","errorText","Label","for","_tmpl$4","HelperText","ErrorText","role","SelectProps","SelectHTMLAttributes","HTMLSelectElement","Select","_el$0","_tmpl$5","_el$1","aria-invalid","_$effect","_$className","CheckableProps","InputHTMLAttributes","HTMLInputElement","checked","defaultChecked","onCheckedChange","inputClass","Checkable","setChecked","value","defaultValue","onChange","_el$10","_tmpl$6","_el$11","_el$12","event","currentTarget","CheckboxProps","Checkbox","ArkCheckable","kind","RadioProps","Radio","SwitchProps","Switch","options","hiddenInput","details","readOnly","readonly","name","form","String","api","rootProps","attributes","getRootProps","_el$13","_el$14","_el$15","_$use","input","ref","getHiddenInputProps","style","callInputHandler","onFocusIn","onFocusOut","onClick","defaultPrevented","handler","getLabelProps","FocusEventHandlerUnion","FocusEvent","target","DatePicker","ArkDatePicker","For","Show","Button","dateMessages","todayDate","validateInput","CalendarMessages","Chevron","props","next","_el$","_$getNextElement","_tmpl$","_el$2","firstChild","_$effect","_$setAttribute","CalendarViewProps","timeZone","min","max","locale","messages","disabled","readOnly","showToday","showClear","onClear","CalendarView","text","locked","_$createComponent","View","view","children","Context","picker","ViewControl","PrevTrigger","aria-label","previousMonth","RangeText","NextTrigger","nextMonth","Table","TableHead","TableRow","each","weekDays","day","TableHeader","short","TableBody","weeks","week","TableCell","value","TableCellTrigger","_el$3","_tmpl$2","_el$4","_el$5","_co$","_$getNextMarker","nextSibling","_el$6","_el$7","_co$2","_$insert","when","type","tone","valid","onClick","selectToday","today","ClearTrigger","hidden","onPointerDown","event","preventDefault","clear"],"sources":["../src/controllable.ts","../src/controls.tsx","../src/date-only.ts","../src/calendar-view.tsx"],"sourcesContent":["import { createSignal, type Accessor } from \"solid-js\";\n\nexport interface ControllableOptions<T> {\n value: Accessor<T | undefined>;\n defaultValue: T;\n onChange: ((value: T) => void) | undefined;\n}\n\nexport type ControllableSetter<T> = (next: T | ((previous: T) => T)) => T;\n\nexport function createControllableSignal<T>(options: ControllableOptions<T>): [Accessor<T>, ControllableSetter<T>] {\n const [internal, setInternal] = createSignal(options.defaultValue);\n const value: Accessor<T> = () => options.value() ?? internal();\n const setInternalValue = setInternal as unknown as ControllableSetter<T>;\n const setValue: ControllableSetter<T> = (next) => {\n const resolved = typeof next === \"function\"\n ? (next as (previous: T) => T)(value())\n : next;\n if (options.value() === undefined) setInternalValue(() => resolved);\n options.onChange?.(resolved);\n return resolved;\n };\n return [value, setValue];\n}\n","import {\n createUniqueId,\n splitProps,\n type JSX,\n type ParentProps,\n} from \"solid-js\";\n\nimport { createControllableSignal } from \"./controllable\";\nimport { useCheckbox } from \"@ark-ui/solid/checkbox\";\nimport { useSwitch } from \"@ark-ui/solid/switch\";\nimport { Field as ArkField } from \"@ark-ui/solid/field\";\nimport { classes, describedBy } from \"./utils\";\n\nexport type ButtonTone = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\nexport type ControlSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, \"class\"> {\n class?: string;\n tone?: ButtonTone;\n size?: ControlSize;\n loading?: boolean;\n}\n\nexport function Button(props: ParentProps<ButtonProps>) {\n const [local, rest] = splitProps(props, [\"class\", \"tone\", \"size\", \"loading\", \"disabled\", \"type\", \"children\"]);\n return (\n <button\n {...rest}\n type={local.type ?? \"button\"}\n class={classes(\"dds-btn\", `dds-btn--${local.tone ?? \"primary\"}`, local.size !== \"md\" && local.size ? `dds-btn--${local.size}` : undefined, local.class)}\n disabled={local.disabled || local.loading}\n aria-busy={local.loading ? \"true\" : undefined}\n >\n {local.loading && <span class=\"dds-spinner\" aria-hidden=\"true\" />}\n {local.children}\n </button>\n );\n}\n\nexport interface IconButtonProps extends Omit<ButtonProps, \"tone\" | \"children\"> {\n \"aria-label\": string;\n tone?: \"ghost\" | \"secondary\" | \"danger\";\n children: JSX.Element;\n}\n\nexport function IconButton(props: IconButtonProps) {\n const [local, rest] = splitProps(props, [\"class\", \"tone\", \"size\", \"loading\", \"disabled\", \"type\", \"children\"]);\n return (\n <button\n {...rest}\n type={local.type ?? \"button\"}\n class={classes(\"dds-iconbtn\", local.tone && local.tone !== \"ghost\" ? `dds-iconbtn--${local.tone}` : undefined, local.size !== \"md\" && local.size ? `dds-iconbtn--${local.size}` : undefined, local.class)}\n disabled={local.disabled || local.loading}\n aria-busy={local.loading ? \"true\" : undefined}\n >\n {local.loading ? <span class=\"dds-spinner\" aria-hidden=\"true\" /> : local.children}\n </button>\n );\n}\n\nexport interface FieldControlProps {\n id: string;\n \"aria-describedby\": string | undefined;\n \"aria-invalid\": \"true\" | undefined;\n \"aria-required\": \"true\" | undefined;\n}\n\nexport interface FieldProps {\n id?: string;\n label: JSX.Element;\n helpText?: JSX.Element;\n error?: JSX.Element;\n required?: boolean;\n class?: string;\n children: JSX.Element | ((props: FieldControlProps) => JSX.Element);\n}\n\nexport function Field(props: FieldProps) {\n const generated = createUniqueId();\n const id = () => props.id ?? `dds-field-${generated}`;\n const helpId = () => props.helpText ? `${id()}-help` : undefined;\n const errorId = () => props.error ? `${id()}-error` : undefined;\n const control = (): FieldControlProps => ({\n id: id(),\n \"aria-describedby\": describedBy(helpId(), errorId()),\n \"aria-invalid\": props.error ? \"true\" : undefined,\n \"aria-required\": props.required ? \"true\" : undefined,\n });\n return (\n <ArkField.Root id={id()} required={props.required ?? false} invalid={Boolean(props.error)} ids={{ control: `${id()}-root`, helperText: `${id()}-help`, errorText: `${id()}-error` }} class={classes(\"dds-field\", props.error ? \"dds-field--error\" : undefined, props.class)}>\n <ArkField.Label class=\"dds-field__label\" for={id()}>{props.label}{props.required && <span aria-hidden=\"true\"> *</span>}</ArkField.Label>\n {typeof props.children === \"function\" ? props.children(control()) : props.children}\n {props.helpText && <ArkField.HelperText class=\"dds-field__help\">{props.helpText}</ArkField.HelperText>}\n {props.error && <ArkField.ErrorText class=\"dds-field__error\" role=\"alert\">{props.error}</ArkField.ErrorText>}\n </ArkField.Root>\n );\n}\n\nexport interface SelectProps extends Omit<JSX.SelectHTMLAttributes<HTMLSelectElement>, \"class\"> {\n class?: string;\n invalid?: boolean;\n}\n\nexport function Select(props: ParentProps<SelectProps>) {\n const [local, rest] = splitProps(props, [\"class\", \"invalid\", \"children\"]);\n return (\n <span class={classes(\"dds-select\", local.class)}>\n <select {...rest} class=\"dds-select__input\" aria-invalid={local.invalid ? \"true\" : undefined}>\n {local.children}\n </select>\n </span>\n );\n}\n\ninterface CheckableProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, \"checked\" | \"class\" | \"onChange\" | \"role\" | \"type\"> {\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n label: JSX.Element;\n class?: string;\n inputClass?: string;\n}\n\nfunction Checkable(props: CheckableProps & { type: \"checkbox\" | \"radio\"; role?: \"switch\" }) {\n const [local, rest] = splitProps(props, [\"checked\", \"defaultChecked\", \"onCheckedChange\", \"label\", \"class\", \"inputClass\", \"type\", \"role\"]);\n const [checked, setChecked] = createControllableSignal({\n value: () => local.checked,\n defaultValue: local.defaultChecked ?? false,\n onChange: local.onCheckedChange,\n });\n return (\n <label class={classes(local.role === \"switch\" ? \"dds-switch\" : \"dds-check\", local.class)}>\n <input\n {...rest}\n type={local.type}\n role={local.role}\n class={classes(local.role === \"switch\" ? \"dds-switch__input\" : \"dds-check__input\", local.inputClass)}\n checked={checked()}\n onChange={(event) => setChecked(event.currentTarget.checked)}\n />\n <span>{local.label}</span>\n </label>\n );\n}\n\nexport type CheckboxProps = CheckableProps;\nexport const Checkbox = (props: CheckboxProps) => <ArkCheckable {...props} kind=\"checkbox\" />;\n\nexport type RadioProps = CheckableProps;\nexport const Radio = (props: RadioProps) => <Checkable {...props} type=\"radio\" />;\n\nexport type SwitchProps = CheckableProps;\nexport const Switch = (props: SwitchProps) => <ArkCheckable {...props} kind=\"switch\" />;\n\nfunction ArkCheckable(props: CheckableProps & { kind: \"checkbox\" | \"switch\" }) {\n const generated = createUniqueId();\n const [local, rest] = splitProps(props, [\"checked\", \"defaultChecked\", \"onCheckedChange\", \"label\", \"class\", \"inputClass\", \"kind\", \"id\", \"onClick\", \"onFocusIn\", \"onFocusOut\", \"style\"]);\n const options = () => ({\n id: `dds-check-${generated}`,\n ids: { hiddenInput: local.id ?? `dds-check-${generated}-input` },\n checked: local.checked, defaultChecked: local.defaultChecked,\n onCheckedChange: (details: { checked: boolean | \"indeterminate\" }) => local.onCheckedChange?.(details.checked === true),\n disabled: rest.disabled, required: rest.required, readOnly: rest.readonly,\n name: rest.name, form: rest.form, value: String(rest.value ?? \"on\"),\n });\n const api = local.kind === \"switch\" ? useSwitch(options) : useCheckbox(options);\n const inputClass = () => local.kind === \"switch\" ? \"dds-switch__input\" : \"dds-check__input\";\n const rootProps = () => {\n const [, attributes] = splitProps(api().getRootProps(), [\"onClick\"]);\n return attributes;\n };\n return <label {...rootProps()} class={classes(local.kind === \"switch\" ? \"dds-switch\" : \"dds-check\", local.class)}>\n <input {...api().getHiddenInputProps()} {...rest}\n ref={(input) => {\n // Ark normalizes defaultChecked to checked. Preserve the native reset\n // baseline as well when rendering its input visibly with DDS CSS.\n input.defaultChecked = local.checked ?? local.defaultChecked ?? false;\n if (typeof rest.ref === \"function\") rest.ref(input);\n }}\n type=\"checkbox\" role={local.kind === \"switch\" ? \"switch\" : undefined}\n class={classes(inputClass(), local.inputClass)}\n style={local.style ?? {}} checked={api().checked}\n onFocusIn={(event) => {\n callInputHandler(api().getHiddenInputProps().onFocusIn, event);\n callInputHandler(local.onFocusIn, event);\n }}\n onFocusOut={(event) => {\n callInputHandler(api().getHiddenInputProps().onFocusOut, event);\n callInputHandler(local.onFocusOut, event);\n }}\n onClick={(event) => {\n if (typeof local.onClick === \"function\") local.onClick(event);\n else if (local.onClick) local.onClick[0](local.onClick[1], event);\n if (!event.defaultPrevented) {\n const handler = api().getHiddenInputProps().onClick;\n if (typeof handler === \"function\") handler(event);\n else if (handler) handler[0](handler[1], event);\n }\n }}\n />\n <span {...api().getLabelProps()}>{local.label}</span>\n </label>;\n}\n\nfunction callInputHandler(handler: JSX.FocusEventHandlerUnion<HTMLInputElement, FocusEvent> | undefined, event: FocusEvent & { currentTarget: HTMLInputElement; target: HTMLInputElement }) {\n if (typeof handler === \"function\") handler(event);\n else if (handler) handler[0](handler[1], event);\n}\n","export interface DatePickerValidity {\n /** Exact displayed draft; never persist this display text as an API date. */\n inputValue: string;\n /** Valid ISO date, optional empty string, or null when invalid/incomplete. */\n value: string | null;\n valid: boolean;\n reason:\n | \"valid\"\n | \"required\"\n | \"incomplete\"\n | \"invalid\"\n | \"rangeUnderflow\"\n | \"rangeOverflow\";\n}\n// Date-only Gregorian validation: never let a permissive parser repair user text.\nexport function isCalendarDate(value: string) {\n if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) return false;\n const year = Number(value.slice(0, 4)),\n month = Number(value.slice(5, 7)),\n day = Number(value.slice(8, 10));\n if (year < 1 || month < 1 || month > 12 || day < 1) return false;\n const leap = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n return (\n day <=\n [31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1]!\n );\n}\nexport function isKorean(locale: string) {\n return /^ko(?:-|$)/i.test(locale);\n}\nexport function displayDate(value: string, locale: string) {\n return isKorean(locale) && isCalendarDate(value)\n ? value.replaceAll(\"-\", \"/\")\n : value;\n}\nexport function canonicalInput(inputValue: string, locale: string) {\n return isKorean(locale) && /^\\d{4}\\/\\d{2}\\/\\d{2}$/.test(inputValue)\n ? inputValue.replaceAll(\"/\", \"-\")\n : inputValue;\n}\nexport function validateInput(\n inputValue: string,\n required: boolean,\n min?: string,\n max?: string,\n locale = \"en-US\",\n): DatePickerValidity {\n const canonical = canonicalInput(inputValue, locale);\n const incomplete =\n inputValue.length < 10 &&\n (/^\\d{0,4}(?:-\\d{0,2}(?:-\\d{0,2})?)?$/.test(inputValue) ||\n (isKorean(locale) &&\n /^\\d{0,4}(?:\\/\\d{0,2}(?:\\/\\d{0,2})?)?$/.test(inputValue)));\n let reason: DatePickerValidity[\"reason\"] = \"valid\";\n if (inputValue === \"\") reason = required ? \"required\" : \"valid\";\n else if (!isCalendarDate(canonical))\n reason = incomplete ? \"incomplete\" : \"invalid\";\n else if (\n (min && !isCalendarDate(min)) ||\n (max && !isCalendarDate(max)) ||\n (min && max && min > max)\n )\n reason = \"invalid\";\n else if (min && canonical < min) reason = \"rangeUnderflow\";\n else if (max && canonical > max) reason = \"rangeOverflow\";\n return {\n inputValue,\n value: reason === \"valid\" ? canonical : null,\n valid: reason === \"valid\",\n reason,\n };\n}\n\nexport interface CalendarMessages {\n previousMonth?: string;\n nextMonth?: string;\n today?: string;\n clear?: string;\n openCalendar?: string;\n selectDate?: (dateText: string) => string;\n required?: string;\n invalid?: string;\n}\nexport function dateMessages(locale: string, messages: CalendarMessages = {}) {\n const ko = isKorean(locale);\n return {\n previousMonth: ko ? \"이전 달\" : \"Previous month\",\n nextMonth: ko ? \"다음 달\" : \"Next month\",\n today: ko ? \"오늘\" : \"Today\",\n clear: ko ? \"선택 날짜 지우기\" : \"Clear selected date\",\n openCalendar: ko ? \"달력 열기\" : \"Open calendar\",\n selectDate: (text: string) => (ko ? `${text} 선택` : `Choose ${text}`),\n required: ko ? \"날짜를 입력해 주세요.\" : \"Enter a date.\",\n invalid: ko\n ? \"YYYY/MM/DD 형식의 유효한 범위 내 날짜를 입력해 주세요.\"\n : \"Enter a valid date within the allowed range (YYYY-MM-DD).\",\n ...messages,\n };\n}\n\n/** Today is the sole timestamp boundary; stored dates remain Gregorian date-only strings. */\nexport function todayDate(timeZone: string) {\n const parts = new Intl.DateTimeFormat(\"en-US-u-ca-gregory-nu-latn\", {\n timeZone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n }).formatToParts(new Date());\n const part = (type: string) =>\n parts.find((item) => item.type === type)!.value;\n return `${part(\"year\").padStart(4, \"0\")}-${part(\"month\")}-${part(\"day\")}`;\n}\n","import { DatePicker as ArkDatePicker } from \"@ark-ui/solid/date-picker\";\nimport { For, Show } from \"solid-js\";\nimport { Button } from \"./controls\";\nimport {\n dateMessages,\n todayDate,\n validateInput,\n type CalendarMessages,\n} from \"./date-only\";\nfunction Chevron(props: { next?: boolean }) {\n return (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n aria-hidden=\"true\"\n >\n <path d={props.next ? \"m9 5 7 7-7 7\" : \"m15 5-7 7 7 7\"} />\n </svg>\n );\n}\nexport interface CalendarViewProps {\n timeZone?: string | undefined;\n min?: string | undefined;\n max?: string | undefined;\n locale?: string | undefined;\n messages?: CalendarMessages | undefined;\n disabled?: boolean | undefined;\n readOnly?: boolean | undefined;\n showToday?: boolean | undefined;\n showClear?: boolean | undefined;\n onClear?: (() => void) | undefined;\n}\n/** Internal view: the caller owns the single Ark root and its selection. */\nexport function CalendarView(props: CalendarViewProps) {\n const text = () => dateMessages(props.locale ?? \"ko-KR\", props.messages),\n locked = () => props.disabled || props.readOnly;\n return (\n <ArkDatePicker.View view=\"day\">\n <ArkDatePicker.Context>\n {(picker) => (\n <>\n <ArkDatePicker.ViewControl class=\"dds-date-picker-header\">\n <ArkDatePicker.PrevTrigger\n class=\"dds-btn dds-btn--secondary\"\n aria-label={text().previousMonth}\n >\n <Chevron />\n </ArkDatePicker.PrevTrigger>\n <ArkDatePicker.RangeText />\n <ArkDatePicker.NextTrigger\n class=\"dds-btn dds-btn--secondary\"\n aria-label={text().nextMonth}\n >\n <Chevron next />\n </ArkDatePicker.NextTrigger>\n </ArkDatePicker.ViewControl>\n <ArkDatePicker.Table class=\"dds-date-picker-table\">\n <ArkDatePicker.TableHead>\n <ArkDatePicker.TableRow>\n <For each={picker().weekDays}>\n {(day) => (\n <ArkDatePicker.TableHeader>\n {day.short}\n </ArkDatePicker.TableHeader>\n )}\n </For>\n </ArkDatePicker.TableRow>\n </ArkDatePicker.TableHead>\n <ArkDatePicker.TableBody>\n <For each={picker().weeks}>\n {(week) => (\n <ArkDatePicker.TableRow>\n <For each={week}>\n {(day) => (\n <ArkDatePicker.TableCell value={day}>\n <ArkDatePicker.TableCellTrigger>\n {day.day}\n </ArkDatePicker.TableCellTrigger>\n </ArkDatePicker.TableCell>\n )}\n </For>\n </ArkDatePicker.TableRow>\n )}\n </For>\n </ArkDatePicker.TableBody>\n </ArkDatePicker.Table>\n <div class=\"dds-date-picker-footer\">\n <Show when={props.showToday !== false}>\n <Button\n type=\"button\"\n tone=\"secondary\"\n disabled={\n locked() ||\n !validateInput(\n todayDate(props.timeZone ?? \"Asia/Seoul\"),\n false,\n props.min,\n props.max,\n props.locale,\n ).valid\n }\n onClick={() => {\n if (\n !locked() &&\n validateInput(\n todayDate(props.timeZone ?? \"Asia/Seoul\"),\n false,\n props.min,\n props.max,\n props.locale,\n ).valid\n )\n picker().selectToday();\n }}\n >\n {text().today}\n </Button>\n </Show>\n <Show when={props.showClear !== false}>\n <ArkDatePicker.ClearTrigger\n hidden={false}\n class=\"dds-btn dds-btn--secondary\"\n disabled={locked()}\n onPointerDown={(event) => event.preventDefault()}\n onClick={() => {\n if (!locked()) props.onClear?.();\n }}\n >\n {text().clear}\n </ArkDatePicker.ClearTrigger>\n </Show>\n </div>\n </>\n )}\n </ArkDatePicker.Context>\n </ArkDatePicker.View>\n );\n}\n"],"mappings":";;;;;;;;AAUA,SAAgB,EAA4B,GAAuE;CACjH,IAAM,CAAC,GAAU,KAAe,EAAa,EAAQ,YAAY,GAC3D,UAA2B,EAAQ,MAAM,KAAK,EAAS,GACvD,IAAmB;CASzB,OAAO,CAAC,IARiC,MAAS;EAChD,IAAM,IAAW,OAAO,KAAS,aAC5B,EAA4B,EAAM,CAAC,IACpC;EAGJ,OAFI,EAAQ,MAAM,MAAM,KAAA,KAAW,QAAuB,CAAQ,GAClE,EAAQ,WAAW,CAAQ,GACpB;CACT,CACuB;AACzB;;;;ACAA,SAAgBqB,EAAOC,GAAiC;CACtD,IAAM,CAACC,GAAOC,KAAQvB,EAAWqB,GAAO;EAAC;EAAS;EAAQ;EAAQ;EAAW;EAAY;EAAQ;CAAU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zB;QAAC,IAAAxC,WAAA;SAAA,OAEAL,EAAK,CAAC,CAAC8C;QAAK;OAAA,CAAA;MAAA;KAAA,CAAA,GAAAd,GAAAC,CAAA,GAAAM,EAAAV,GAAA3B,EAGhB9B,GAAI;MAAA,IAACoE,OAAI;OAAA,OAAE7D,EAAMkB,cAAc;MAAK;MAAA,IAAAQ,WAAA;OAAA,OAAAH,EAClChC,EAAc6E,cAAY;QACzBC,QAAQ;QAAK,OAAA;QAAA,IAEbtD,WAAQ;SAAA,OAAEO,EAAO;QAAC;QAClBgD,gBAAgBC,MAAUA,EAAMC,eAAe;QAC/CP,eAAe;SACb,AAAK3C,EAAO,KAAGtB,EAAMmB,UAAU;QACjC;QAAC,IAAAO,WAAA;SAAA,OAEAL,EAAK,CAAC,CAACoD;QAAK;OAAA,CAAA;MAAA;KAAA,CAAA,GAAAf,GAAAC,CAAA,GAAAT;IAAA,EAAA,CAAA;GAAA,EAKtB,CAAA;EAAA;CAAA,CAAA;AAIT"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CalendarMessages } from "./date-only";
|
|
2
|
+
export interface CalendarViewProps {
|
|
3
|
+
timeZone?: string | undefined;
|
|
4
|
+
min?: string | undefined;
|
|
5
|
+
max?: string | undefined;
|
|
6
|
+
locale?: string | undefined;
|
|
7
|
+
messages?: CalendarMessages | undefined;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
readOnly?: boolean | undefined;
|
|
10
|
+
showToday?: boolean | undefined;
|
|
11
|
+
showClear?: boolean | undefined;
|
|
12
|
+
onClear?: (() => void) | undefined;
|
|
13
|
+
}
|
|
14
|
+
/** Internal view: the caller owns the single Ark root and its selection. */
|
|
15
|
+
export declare function CalendarView(props: CalendarViewProps): import("solid-js").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=calendar-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-view.d.ts","sourceRoot":"","sources":["../src/calendar-view.tsx"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAgBrB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACpC;AACD,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,kCAwGpD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CalendarMessages } from "./date-only";
|
|
2
|
+
export interface CalendarProps {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
locale?: string;
|
|
7
|
+
timeZone?: string;
|
|
8
|
+
min?: string;
|
|
9
|
+
max?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
startOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
13
|
+
messages?: CalendarMessages;
|
|
14
|
+
showToday?: boolean;
|
|
15
|
+
clearable?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export type { CalendarMessages } from "./date-only";
|
|
18
|
+
export declare function Calendar(props: CalendarProps): import("solid-js").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../src/calendar.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kCA4D5C"}
|
package/dist/calendar.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { a as e, r as t, s as n, t as r } from "./calendar-view-CTBTPB4T.js";
|
|
2
|
+
import { createComponent as i, memo as a } from "solid-js/web";
|
|
3
|
+
import { DatePicker as o, parseDate as s } from "@ark-ui/solid/date-picker";
|
|
4
|
+
//#region src/calendar.tsx
|
|
5
|
+
function c(c) {
|
|
6
|
+
let l = () => c.locale ?? "ko-KR", u = () => t(l(), c.messages);
|
|
7
|
+
return i(o.Root, {
|
|
8
|
+
class: "dds-calendar",
|
|
9
|
+
get "aria-label"() {
|
|
10
|
+
return c.label;
|
|
11
|
+
},
|
|
12
|
+
role: "group",
|
|
13
|
+
inline: !0,
|
|
14
|
+
get locale() {
|
|
15
|
+
return l();
|
|
16
|
+
},
|
|
17
|
+
get timeZone() {
|
|
18
|
+
return c.timeZone ?? "Asia/Seoul";
|
|
19
|
+
},
|
|
20
|
+
get disabled() {
|
|
21
|
+
return c.disabled;
|
|
22
|
+
},
|
|
23
|
+
get readOnly() {
|
|
24
|
+
return c.readOnly;
|
|
25
|
+
},
|
|
26
|
+
get min() {
|
|
27
|
+
return a(() => !!(c.min && e(c.min)))() ? s(c.min) : void 0;
|
|
28
|
+
},
|
|
29
|
+
get max() {
|
|
30
|
+
return a(() => !!(c.max && e(c.max)))() ? s(c.max) : void 0;
|
|
31
|
+
},
|
|
32
|
+
get startOfWeek() {
|
|
33
|
+
return c.startOfWeek ?? 0;
|
|
34
|
+
},
|
|
35
|
+
minView: "day",
|
|
36
|
+
maxView: "day",
|
|
37
|
+
fixedWeeks: !0,
|
|
38
|
+
get value() {
|
|
39
|
+
return a(() => !!e(c.value))() ? [s(c.value)] : [];
|
|
40
|
+
},
|
|
41
|
+
get translations() {
|
|
42
|
+
return {
|
|
43
|
+
dayCell: (e) => u().selectDate(e.valueText),
|
|
44
|
+
clearTrigger: u().clear
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
onValueChange: (e) => {
|
|
48
|
+
let t = e.value[0]?.toString() ?? "";
|
|
49
|
+
!c.disabled && !c.readOnly && n(t, !1, c.min, c.max, l()).valid && c.onChange(t);
|
|
50
|
+
},
|
|
51
|
+
get children() {
|
|
52
|
+
return i(o.Content, {
|
|
53
|
+
class: "dds-date-picker-content",
|
|
54
|
+
get "aria-label"() {
|
|
55
|
+
return c.label;
|
|
56
|
+
},
|
|
57
|
+
get children() {
|
|
58
|
+
return i(r, {
|
|
59
|
+
get timeZone() {
|
|
60
|
+
return c.timeZone;
|
|
61
|
+
},
|
|
62
|
+
get min() {
|
|
63
|
+
return c.min;
|
|
64
|
+
},
|
|
65
|
+
get max() {
|
|
66
|
+
return c.max;
|
|
67
|
+
},
|
|
68
|
+
get locale() {
|
|
69
|
+
return l();
|
|
70
|
+
},
|
|
71
|
+
get messages() {
|
|
72
|
+
return c.messages;
|
|
73
|
+
},
|
|
74
|
+
get disabled() {
|
|
75
|
+
return c.disabled;
|
|
76
|
+
},
|
|
77
|
+
get readOnly() {
|
|
78
|
+
return c.readOnly;
|
|
79
|
+
},
|
|
80
|
+
get showToday() {
|
|
81
|
+
return c.showToday;
|
|
82
|
+
},
|
|
83
|
+
get showClear() {
|
|
84
|
+
return c.clearable;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { c as Calendar };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=calendar.js.map
|