@devslab/dds-solid 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 -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
package/dist/server.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { c as Button, d as IconButton, f as Radio, h as createControllableSignal, l as Checkbox, m as Switch, p as Select, u as Field } from "./assets/calendar-view-1RO2mtf1.js";
|
|
2
|
+
import { t as classes } from "./assets/utils-Ou0UJRlO.js";
|
|
3
|
+
import { DatePicker } from "./date-picker.server.js";
|
|
4
|
+
import { Input, InputGroup } from "./input.server.js";
|
|
5
|
+
import { Combobox } from "./combobox.server.js";
|
|
6
|
+
import { SelectPicker } from "./select-picker.server.js";
|
|
7
|
+
import { DropdownMenu } from "./dropdown-menu.server.js";
|
|
8
|
+
import { Popover } from "./popover.server.js";
|
|
9
|
+
import { Calendar } from "./calendar.server.js";
|
|
1
10
|
import { For, Show, createContext, createEffect, createMemo, createSignal, createUniqueId, mergeProps, onCleanup, onMount, splitProps, useContext } from "solid-js";
|
|
2
11
|
import { Dynamic, Portal, createComponent, escape, isServer, memo, mergeProps as mergeProps$1, ssr, ssrAttribute, ssrElement, ssrHydrationKey } from "solid-js/web";
|
|
3
|
-
import { useCheckbox } from "@ark-ui/solid/checkbox";
|
|
4
|
-
import { useSwitch } from "@ark-ui/solid/switch";
|
|
5
|
-
import { Field as Field$1 } from "@ark-ui/solid/field";
|
|
6
12
|
import { Dialog as Dialog$1, useDialog } from "@ark-ui/solid/dialog";
|
|
7
13
|
import { usePresenceContext } from "@ark-ui/solid/presence";
|
|
8
14
|
import { FocusTrap } from "@zag-js/focus-trap";
|
|
@@ -14,273 +20,18 @@ import { LocaleProvider } from "@ark-ui/solid/locale";
|
|
|
14
20
|
import { Toast, Toaster, createToaster } from "@ark-ui/solid/toast";
|
|
15
21
|
import { space } from "@devslab/dds-tokens";
|
|
16
22
|
import { Tooltip as Tooltip$1, useTooltip } from "@ark-ui/solid/tooltip";
|
|
17
|
-
import { DatePicker as DatePicker$1, parseDate } from "@ark-ui/solid/date-picker";
|
|
18
|
-
//#region src/controllable.ts
|
|
19
|
-
function createControllableSignal(options) {
|
|
20
|
-
const [internal, setInternal] = createSignal(options.defaultValue);
|
|
21
|
-
const value = () => options.value() ?? internal();
|
|
22
|
-
const setInternalValue = setInternal;
|
|
23
|
-
const setValue = (next) => {
|
|
24
|
-
const resolved = typeof next === "function" ? next(value()) : next;
|
|
25
|
-
if (options.value() === void 0) setInternalValue(() => resolved);
|
|
26
|
-
options.onChange?.(resolved);
|
|
27
|
-
return resolved;
|
|
28
|
-
};
|
|
29
|
-
return [value, setValue];
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/utils.ts
|
|
33
|
-
function classes(...values) {
|
|
34
|
-
return values.filter(Boolean).join(" ");
|
|
35
|
-
}
|
|
36
|
-
function describedBy(...ids) {
|
|
37
|
-
return ids.filter(Boolean).join(" ") || void 0;
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/controls.tsx
|
|
41
|
-
var _tmpl$$6 = ["<span", " class=\"dds-spinner\" aria-hidden=\"true\"></span>"];
|
|
42
|
-
var _tmpl$2$4 = ["<span", " aria-hidden=\"true\"> *</span>"];
|
|
43
|
-
var _tmpl$3$2 = [
|
|
44
|
-
"<span",
|
|
45
|
-
">",
|
|
46
|
-
"</span>"
|
|
47
|
-
];
|
|
48
|
-
var _tmpl$4$1 = [
|
|
49
|
-
"<label",
|
|
50
|
-
">",
|
|
51
|
-
"<span>",
|
|
52
|
-
"</span></label>"
|
|
53
|
-
];
|
|
54
|
-
function Button(props) {
|
|
55
|
-
const [local, rest] = splitProps(props, [
|
|
56
|
-
"class",
|
|
57
|
-
"tone",
|
|
58
|
-
"size",
|
|
59
|
-
"loading",
|
|
60
|
-
"disabled",
|
|
61
|
-
"type",
|
|
62
|
-
"children"
|
|
63
|
-
]);
|
|
64
|
-
return ssrElement("button", mergeProps$1(rest, {
|
|
65
|
-
get type() {
|
|
66
|
-
return local.type ?? "button";
|
|
67
|
-
},
|
|
68
|
-
get ["class"]() {
|
|
69
|
-
return classes("dds-btn", `dds-btn--${local.tone ?? "primary"}`, local.size !== "md" && local.size ? `dds-btn--${local.size}` : void 0, local.class);
|
|
70
|
-
},
|
|
71
|
-
get disabled() {
|
|
72
|
-
return local.disabled || local.loading;
|
|
73
|
-
},
|
|
74
|
-
get ["aria-busy"]() {
|
|
75
|
-
return local.loading ? "true" : void 0;
|
|
76
|
-
}
|
|
77
|
-
}), () => [
|
|
78
|
-
"<!--$-->",
|
|
79
|
-
local.loading && _tmpl$$6[0] + ssrHydrationKey() + _tmpl$$6[1],
|
|
80
|
-
"<!--/-->",
|
|
81
|
-
"<!--$-->",
|
|
82
|
-
escape(local.children),
|
|
83
|
-
"<!--/-->"
|
|
84
|
-
], true);
|
|
85
|
-
}
|
|
86
|
-
function IconButton(props) {
|
|
87
|
-
const [local, rest] = splitProps(props, [
|
|
88
|
-
"class",
|
|
89
|
-
"tone",
|
|
90
|
-
"size",
|
|
91
|
-
"loading",
|
|
92
|
-
"disabled",
|
|
93
|
-
"type",
|
|
94
|
-
"children"
|
|
95
|
-
]);
|
|
96
|
-
return ssrElement("button", mergeProps$1(rest, {
|
|
97
|
-
get type() {
|
|
98
|
-
return local.type ?? "button";
|
|
99
|
-
},
|
|
100
|
-
get ["class"]() {
|
|
101
|
-
return classes("dds-iconbtn", local.tone && local.tone !== "ghost" ? `dds-iconbtn--${local.tone}` : void 0, local.size !== "md" && local.size ? `dds-iconbtn--${local.size}` : void 0, local.class);
|
|
102
|
-
},
|
|
103
|
-
get disabled() {
|
|
104
|
-
return local.disabled || local.loading;
|
|
105
|
-
},
|
|
106
|
-
get ["aria-busy"]() {
|
|
107
|
-
return local.loading ? "true" : void 0;
|
|
108
|
-
}
|
|
109
|
-
}), () => local.loading ? _tmpl$$6[0] + ssrHydrationKey() + _tmpl$$6[1] : escape(local.children), true);
|
|
110
|
-
}
|
|
111
|
-
function Field(props) {
|
|
112
|
-
const generated = createUniqueId();
|
|
113
|
-
const id = () => props.id ?? `dds-field-${generated}`;
|
|
114
|
-
const helpId = () => props.helpText ? `${id()}-help` : void 0;
|
|
115
|
-
const errorId = () => props.error ? `${id()}-error` : void 0;
|
|
116
|
-
const control = () => ({
|
|
117
|
-
id: id(),
|
|
118
|
-
"aria-describedby": describedBy(helpId(), errorId()),
|
|
119
|
-
"aria-invalid": props.error ? "true" : void 0,
|
|
120
|
-
"aria-required": props.required ? "true" : void 0
|
|
121
|
-
});
|
|
122
|
-
return createComponent(Field$1.Root, {
|
|
123
|
-
get id() {
|
|
124
|
-
return id();
|
|
125
|
-
},
|
|
126
|
-
get required() {
|
|
127
|
-
return props.required ?? false;
|
|
128
|
-
},
|
|
129
|
-
get invalid() {
|
|
130
|
-
return Boolean(props.error);
|
|
131
|
-
},
|
|
132
|
-
get ids() {
|
|
133
|
-
return {
|
|
134
|
-
control: `${id()}-root`,
|
|
135
|
-
helperText: `${id()}-help`,
|
|
136
|
-
errorText: `${id()}-error`
|
|
137
|
-
};
|
|
138
|
-
},
|
|
139
|
-
get ["class"]() {
|
|
140
|
-
return classes("dds-field", props.error ? "dds-field--error" : void 0, props.class);
|
|
141
|
-
},
|
|
142
|
-
get children() {
|
|
143
|
-
return [
|
|
144
|
-
createComponent(Field$1.Label, {
|
|
145
|
-
"class": "dds-field__label",
|
|
146
|
-
get ["for"]() {
|
|
147
|
-
return id();
|
|
148
|
-
},
|
|
149
|
-
get children() {
|
|
150
|
-
return [props.label, props.required && ssr(_tmpl$2$4, ssrHydrationKey())];
|
|
151
|
-
}
|
|
152
|
-
}),
|
|
153
|
-
typeof props.children === "function" ? props.children(control()) : props.children,
|
|
154
|
-
props.helpText && createComponent(Field$1.HelperText, {
|
|
155
|
-
"class": "dds-field__help",
|
|
156
|
-
get children() {
|
|
157
|
-
return props.helpText;
|
|
158
|
-
}
|
|
159
|
-
}),
|
|
160
|
-
props.error && createComponent(Field$1.ErrorText, {
|
|
161
|
-
"class": "dds-field__error",
|
|
162
|
-
role: "alert",
|
|
163
|
-
get children() {
|
|
164
|
-
return props.error;
|
|
165
|
-
}
|
|
166
|
-
})
|
|
167
|
-
];
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
function Select(props) {
|
|
172
|
-
const [local, rest] = splitProps(props, [
|
|
173
|
-
"class",
|
|
174
|
-
"invalid",
|
|
175
|
-
"children"
|
|
176
|
-
]);
|
|
177
|
-
return ssr(_tmpl$3$2, ssrHydrationKey() + ssrAttribute("class", escape(classes("dds-select", local.class), true), false), ssrElement("select", mergeProps$1(rest, {
|
|
178
|
-
"class": "dds-select__input",
|
|
179
|
-
get ["aria-invalid"]() {
|
|
180
|
-
return local.invalid ? "true" : void 0;
|
|
181
|
-
}
|
|
182
|
-
}), () => escape(local.children), false));
|
|
183
|
-
}
|
|
184
|
-
function Checkable(props) {
|
|
185
|
-
const [local, rest] = splitProps(props, [
|
|
186
|
-
"checked",
|
|
187
|
-
"defaultChecked",
|
|
188
|
-
"onCheckedChange",
|
|
189
|
-
"label",
|
|
190
|
-
"class",
|
|
191
|
-
"inputClass",
|
|
192
|
-
"type",
|
|
193
|
-
"role"
|
|
194
|
-
]);
|
|
195
|
-
const [checked, setChecked] = createControllableSignal({
|
|
196
|
-
value: () => local.checked,
|
|
197
|
-
defaultValue: local.defaultChecked ?? false,
|
|
198
|
-
onChange: local.onCheckedChange
|
|
199
|
-
});
|
|
200
|
-
return ssr(_tmpl$4$1, ssrHydrationKey() + ssrAttribute("class", escape(classes(local.role === "switch" ? "dds-switch" : "dds-check", local.class), true), false), ssrElement("input", mergeProps$1(rest, {
|
|
201
|
-
get type() {
|
|
202
|
-
return local.type;
|
|
203
|
-
},
|
|
204
|
-
get role() {
|
|
205
|
-
return local.role;
|
|
206
|
-
},
|
|
207
|
-
get ["class"]() {
|
|
208
|
-
return classes(local.role === "switch" ? "dds-switch__input" : "dds-check__input", local.inputClass);
|
|
209
|
-
},
|
|
210
|
-
get checked() {
|
|
211
|
-
return checked();
|
|
212
|
-
}
|
|
213
|
-
}), void 0, false), escape(local.label));
|
|
214
|
-
}
|
|
215
|
-
var Checkbox = (props) => createComponent(ArkCheckable, mergeProps$1(props, { kind: "checkbox" }));
|
|
216
|
-
var Radio = (props) => createComponent(Checkable, mergeProps$1(props, { type: "radio" }));
|
|
217
|
-
var Switch = (props) => createComponent(ArkCheckable, mergeProps$1(props, { kind: "switch" }));
|
|
218
|
-
function ArkCheckable(props) {
|
|
219
|
-
const generated = createUniqueId();
|
|
220
|
-
const [local, rest] = splitProps(props, [
|
|
221
|
-
"checked",
|
|
222
|
-
"defaultChecked",
|
|
223
|
-
"onCheckedChange",
|
|
224
|
-
"label",
|
|
225
|
-
"class",
|
|
226
|
-
"inputClass",
|
|
227
|
-
"kind",
|
|
228
|
-
"id",
|
|
229
|
-
"onClick",
|
|
230
|
-
"onFocusIn",
|
|
231
|
-
"onFocusOut",
|
|
232
|
-
"style"
|
|
233
|
-
]);
|
|
234
|
-
const options = () => ({
|
|
235
|
-
id: `dds-check-${generated}`,
|
|
236
|
-
ids: { hiddenInput: local.id ?? `dds-check-${generated}-input` },
|
|
237
|
-
checked: local.checked,
|
|
238
|
-
defaultChecked: local.defaultChecked,
|
|
239
|
-
onCheckedChange: (details) => local.onCheckedChange?.(details.checked === true),
|
|
240
|
-
disabled: rest.disabled,
|
|
241
|
-
required: rest.required,
|
|
242
|
-
readOnly: rest.readonly,
|
|
243
|
-
name: rest.name,
|
|
244
|
-
form: rest.form,
|
|
245
|
-
value: String(rest.value ?? "on")
|
|
246
|
-
});
|
|
247
|
-
const api = local.kind === "switch" ? useSwitch(options) : useCheckbox(options);
|
|
248
|
-
const inputClass = () => local.kind === "switch" ? "dds-switch__input" : "dds-check__input";
|
|
249
|
-
const rootProps = () => {
|
|
250
|
-
const [, attributes] = splitProps(api().getRootProps(), ["onClick"]);
|
|
251
|
-
return attributes;
|
|
252
|
-
};
|
|
253
|
-
return ssrElement("label", mergeProps$1(rootProps, { get ["class"]() {
|
|
254
|
-
return classes(local.kind === "switch" ? "dds-switch" : "dds-check", local.class);
|
|
255
|
-
} }), () => [ssrElement("input", mergeProps$1(() => api().getHiddenInputProps(), rest, {
|
|
256
|
-
type: "checkbox",
|
|
257
|
-
get role() {
|
|
258
|
-
return local.kind === "switch" ? "switch" : void 0;
|
|
259
|
-
},
|
|
260
|
-
get ["class"]() {
|
|
261
|
-
return classes(inputClass(), local.inputClass);
|
|
262
|
-
},
|
|
263
|
-
get style() {
|
|
264
|
-
return local.style ?? {};
|
|
265
|
-
},
|
|
266
|
-
get checked() {
|
|
267
|
-
return api().checked;
|
|
268
|
-
}
|
|
269
|
-
}), void 0, false), ssrElement("span", api().getLabelProps(), () => escape(local.label), false)], true);
|
|
270
|
-
}
|
|
271
|
-
//#endregion
|
|
272
23
|
//#region src/console-shell.tsx
|
|
273
|
-
var _tmpl$$
|
|
24
|
+
var _tmpl$$4 = [
|
|
274
25
|
"<dl",
|
|
275
26
|
" class=\"dds-console-rail__context\">",
|
|
276
27
|
"</dl>"
|
|
277
28
|
];
|
|
278
|
-
var _tmpl$2$
|
|
29
|
+
var _tmpl$2$2 = [
|
|
279
30
|
"<div",
|
|
280
31
|
" class=\"dds-console-rail__foot\">",
|
|
281
32
|
"</div>"
|
|
282
33
|
];
|
|
283
|
-
var _tmpl$3
|
|
34
|
+
var _tmpl$3 = [
|
|
284
35
|
"<p",
|
|
285
36
|
" class=\"dds-console-page-eyebrow\">",
|
|
286
37
|
"</p>"
|
|
@@ -371,7 +122,7 @@ function ConsoleShell(props) {
|
|
|
371
122
|
return memo(() => !!props.context)() && props.context.length > 0;
|
|
372
123
|
},
|
|
373
124
|
get children() {
|
|
374
|
-
return ssr(_tmpl$$
|
|
125
|
+
return ssr(_tmpl$$4, ssrHydrationKey(), escape(createComponent(For, {
|
|
375
126
|
get each() {
|
|
376
127
|
return props.context;
|
|
377
128
|
},
|
|
@@ -403,14 +154,14 @@ function ConsoleShell(props) {
|
|
|
403
154
|
return props.foot;
|
|
404
155
|
},
|
|
405
156
|
get children() {
|
|
406
|
-
return ssr(_tmpl$2$
|
|
157
|
+
return ssr(_tmpl$2$2, ssrHydrationKey(), escape(props.foot));
|
|
407
158
|
}
|
|
408
159
|
})), escape(createComponent(Show, {
|
|
409
160
|
get when() {
|
|
410
161
|
return props.header.eyebrow;
|
|
411
162
|
},
|
|
412
163
|
get children() {
|
|
413
|
-
return ssr(_tmpl$3
|
|
164
|
+
return ssr(_tmpl$3, ssrHydrationKey(), escape(props.header.eyebrow));
|
|
414
165
|
}
|
|
415
166
|
})), escape(props.header.title), escape(createComponent(Show, {
|
|
416
167
|
get when() {
|
|
@@ -423,7 +174,7 @@ function ConsoleShell(props) {
|
|
|
423
174
|
}
|
|
424
175
|
//#endregion
|
|
425
176
|
//#region src/dialog.tsx
|
|
426
|
-
var _tmpl$$
|
|
177
|
+
var _tmpl$$3 = [
|
|
427
178
|
"<div",
|
|
428
179
|
">",
|
|
429
180
|
"</div>"
|
|
@@ -547,7 +298,7 @@ function Dialog(props) {
|
|
|
547
298
|
return props.children;
|
|
548
299
|
},
|
|
549
300
|
get actions() {
|
|
550
|
-
return props.actions && ssr(_tmpl$$
|
|
301
|
+
return props.actions && ssr(_tmpl$$3, ssrHydrationKey() + ssrAttribute("class", escape(cls("dds-dialog__actions", props.actionsClass), true), false), escape(props.actions));
|
|
551
302
|
}
|
|
552
303
|
};
|
|
553
304
|
return props.frame ? props.frame(parts) : [
|
|
@@ -646,8 +397,8 @@ function RadioGroup(props) {
|
|
|
646
397
|
}
|
|
647
398
|
//#endregion
|
|
648
399
|
//#region src/icon.tsx
|
|
649
|
-
var _tmpl$$
|
|
650
|
-
var _tmpl$2$
|
|
400
|
+
var _tmpl$$2 = ["<g>", "</g>"];
|
|
401
|
+
var _tmpl$2$1 = [
|
|
651
402
|
"<title",
|
|
652
403
|
">",
|
|
653
404
|
"</title>"
|
|
@@ -693,20 +444,20 @@ function Icon(props) {
|
|
|
693
444
|
}
|
|
694
445
|
}), () => [
|
|
695
446
|
"<!--$-->",
|
|
696
|
-
local.label && ssr(_tmpl$2$
|
|
447
|
+
local.label && ssr(_tmpl$2$1, ssrHydrationKey(), escape(local.label)),
|
|
697
448
|
"<!--/-->",
|
|
698
|
-
ssr(_tmpl$$
|
|
449
|
+
ssr(_tmpl$$2, icon().body)
|
|
699
450
|
], true);
|
|
700
451
|
}
|
|
701
452
|
//#endregion
|
|
702
453
|
//#region src/status-pill.tsx
|
|
703
|
-
var _tmpl$$
|
|
454
|
+
var _tmpl$$1 = [
|
|
704
455
|
"<code",
|
|
705
456
|
" data-status=\"",
|
|
706
457
|
"\">",
|
|
707
458
|
"</code>"
|
|
708
459
|
];
|
|
709
|
-
var _tmpl$2
|
|
460
|
+
var _tmpl$2 = [
|
|
710
461
|
"<span",
|
|
711
462
|
" data-status=\"",
|
|
712
463
|
"\"",
|
|
@@ -734,12 +485,12 @@ function createStatusPill(config) {
|
|
|
734
485
|
return known() || !open.has(props.domain);
|
|
735
486
|
},
|
|
736
487
|
get fallback() {
|
|
737
|
-
return ssr(_tmpl$$
|
|
488
|
+
return ssr(_tmpl$$1, ssrHydrationKey(), `${escape(props.domain, true)}.${escape(props.value, true)}`, escape(props.value));
|
|
738
489
|
},
|
|
739
490
|
get children() {
|
|
740
491
|
return (() => {
|
|
741
492
|
const value = resolved();
|
|
742
|
-
return ssr(_tmpl$2
|
|
493
|
+
return ssr(_tmpl$2, ssrHydrationKey() + ssrAttribute("class", value.tone === "neutral" ? "dds-badge" : `dds-badge dds-badge--${escape(value.tone, true)}`, false), `${escape(props.domain, true)}.${escape(props.value, true)}`, ssrAttribute("data-tone", escape(value.tone, true), false), escape(value.text));
|
|
743
494
|
})();
|
|
744
495
|
}
|
|
745
496
|
});
|
|
@@ -970,7 +721,7 @@ function useToast() {
|
|
|
970
721
|
}
|
|
971
722
|
//#endregion
|
|
972
723
|
//#region src/tooltip.tsx
|
|
973
|
-
var _tmpl
|
|
724
|
+
var _tmpl$ = [
|
|
974
725
|
"<span",
|
|
975
726
|
"><!--$-->",
|
|
976
727
|
"<!--/--><!--$-->",
|
|
@@ -997,7 +748,7 @@ function Tooltip(props) {
|
|
|
997
748
|
lazyMount: false,
|
|
998
749
|
unmountOnExit: false,
|
|
999
750
|
get children() {
|
|
1000
|
-
return ssr(_tmpl
|
|
751
|
+
return ssr(_tmpl$, ssrHydrationKey() + ssrAttribute("class", escape(classes("dds-tooltip", props.class), true), false), escape(createComponent(Tooltip$1.Trigger, { asChild: (merge) => {
|
|
1001
752
|
const [, attributes] = splitProps(merge(), ["onFocusIn", "onFocusOut"]);
|
|
1002
753
|
return props.children({
|
|
1003
754
|
...attributes,
|
|
@@ -1019,174 +770,6 @@ function Tooltip(props) {
|
|
|
1019
770
|
});
|
|
1020
771
|
}
|
|
1021
772
|
//#endregion
|
|
1022
|
-
|
|
1023
|
-
var _tmpl$ = ["<svg", " width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\"><rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"15\" rx=\"2\"></rect><path d=\"M7.5 3v5M16.5 3v5M3.5 10.5h17\"></path></svg>"];
|
|
1024
|
-
var _tmpl$2 = [
|
|
1025
|
-
"<svg",
|
|
1026
|
-
" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\"><path",
|
|
1027
|
-
"></path></svg>"
|
|
1028
|
-
];
|
|
1029
|
-
var _tmpl$3 = [
|
|
1030
|
-
"<div",
|
|
1031
|
-
" class=\"dds-date-picker-footer\"><!--$-->",
|
|
1032
|
-
"<!--/--><!--$-->",
|
|
1033
|
-
"<!--/--></div>"
|
|
1034
|
-
];
|
|
1035
|
-
function CalendarIcon() {
|
|
1036
|
-
return ssr(_tmpl$, ssrHydrationKey());
|
|
1037
|
-
}
|
|
1038
|
-
function Chevron(props) {
|
|
1039
|
-
return ssr(_tmpl$2, ssrHydrationKey(), ssrAttribute("d", props.next ? "m9 5 7 7-7 7" : "m15 5-7 7 7 7", false));
|
|
1040
|
-
}
|
|
1041
|
-
function DatePicker(props) {
|
|
1042
|
-
return createComponent(Field, {
|
|
1043
|
-
get label() {
|
|
1044
|
-
return props.label;
|
|
1045
|
-
},
|
|
1046
|
-
children: (control) => createComponent(DatePicker$1.Root, {
|
|
1047
|
-
get locale() {
|
|
1048
|
-
return props.locale ?? "ko-KR";
|
|
1049
|
-
},
|
|
1050
|
-
get timeZone() {
|
|
1051
|
-
return props.timeZone ?? "Asia/Seoul";
|
|
1052
|
-
},
|
|
1053
|
-
get disabled() {
|
|
1054
|
-
return props.disabled;
|
|
1055
|
-
},
|
|
1056
|
-
get min() {
|
|
1057
|
-
return memo(() => !!props.min)() ? parseDate(props.min) : void 0;
|
|
1058
|
-
},
|
|
1059
|
-
get max() {
|
|
1060
|
-
return memo(() => !!props.max)() ? parseDate(props.max) : void 0;
|
|
1061
|
-
},
|
|
1062
|
-
startOfWeek: 0,
|
|
1063
|
-
minView: "day",
|
|
1064
|
-
maxView: "day",
|
|
1065
|
-
fixedWeeks: true,
|
|
1066
|
-
translations: {
|
|
1067
|
-
dayCell: (state) => `${state.valueText} 선택`,
|
|
1068
|
-
clearTrigger: "선택 날짜 지우기"
|
|
1069
|
-
},
|
|
1070
|
-
get value() {
|
|
1071
|
-
return memo(() => !!props.value)() ? [parseDate(props.value)] : [];
|
|
1072
|
-
},
|
|
1073
|
-
format: (v) => v.toString(),
|
|
1074
|
-
onValueChange: (details) => props.onChange(details.valueAsString[0] || ""),
|
|
1075
|
-
positioning: {
|
|
1076
|
-
placement: "bottom-start",
|
|
1077
|
-
gutter: 8
|
|
1078
|
-
},
|
|
1079
|
-
get children() {
|
|
1080
|
-
return [createComponent(DatePicker$1.Control, {
|
|
1081
|
-
"class": "dds-date-picker-control",
|
|
1082
|
-
get children() {
|
|
1083
|
-
return [createComponent(DatePicker$1.Input, mergeProps$1(control, {
|
|
1084
|
-
placeholder: "YYYY-MM-DD",
|
|
1085
|
-
autocomplete: "off"
|
|
1086
|
-
})), createComponent(DatePicker$1.Trigger, {
|
|
1087
|
-
"class": "dds-btn dds-btn--secondary",
|
|
1088
|
-
get ["aria-label"]() {
|
|
1089
|
-
return `${props.label} 달력 열기`;
|
|
1090
|
-
},
|
|
1091
|
-
get children() {
|
|
1092
|
-
return createComponent(CalendarIcon, {});
|
|
1093
|
-
}
|
|
1094
|
-
})];
|
|
1095
|
-
}
|
|
1096
|
-
}), createComponent(Portal, { get children() {
|
|
1097
|
-
return createComponent(DatePicker$1.Positioner, {
|
|
1098
|
-
"class": "dds-date-picker-positioner",
|
|
1099
|
-
get children() {
|
|
1100
|
-
return createComponent(DatePicker$1.Content, {
|
|
1101
|
-
"class": "dds-date-picker-content",
|
|
1102
|
-
get ["aria-label"]() {
|
|
1103
|
-
return `${props.label} 날짜 선택`;
|
|
1104
|
-
},
|
|
1105
|
-
get children() {
|
|
1106
|
-
return createComponent(DatePicker$1.View, {
|
|
1107
|
-
view: "day",
|
|
1108
|
-
get children() {
|
|
1109
|
-
return createComponent(DatePicker$1.Context, { children: (picker) => [
|
|
1110
|
-
createComponent(DatePicker$1.ViewControl, {
|
|
1111
|
-
"class": "dds-date-picker-header",
|
|
1112
|
-
get children() {
|
|
1113
|
-
return [
|
|
1114
|
-
createComponent(DatePicker$1.PrevTrigger, {
|
|
1115
|
-
"class": "dds-btn dds-btn--secondary",
|
|
1116
|
-
"aria-label": "이전 달",
|
|
1117
|
-
get children() {
|
|
1118
|
-
return createComponent(Chevron, {});
|
|
1119
|
-
}
|
|
1120
|
-
}),
|
|
1121
|
-
createComponent(DatePicker$1.RangeText, {}),
|
|
1122
|
-
createComponent(DatePicker$1.NextTrigger, {
|
|
1123
|
-
"class": "dds-btn dds-btn--secondary",
|
|
1124
|
-
"aria-label": "다음 달",
|
|
1125
|
-
get children() {
|
|
1126
|
-
return createComponent(Chevron, { next: true });
|
|
1127
|
-
}
|
|
1128
|
-
})
|
|
1129
|
-
];
|
|
1130
|
-
}
|
|
1131
|
-
}),
|
|
1132
|
-
createComponent(DatePicker$1.Table, {
|
|
1133
|
-
"class": "dds-date-picker-table",
|
|
1134
|
-
get children() {
|
|
1135
|
-
return [createComponent(DatePicker$1.TableHead, { get children() {
|
|
1136
|
-
return createComponent(DatePicker$1.TableRow, { get children() {
|
|
1137
|
-
return createComponent(For, {
|
|
1138
|
-
get each() {
|
|
1139
|
-
return picker().weekDays;
|
|
1140
|
-
},
|
|
1141
|
-
children: (day) => createComponent(DatePicker$1.TableHeader, { get children() {
|
|
1142
|
-
return day.short;
|
|
1143
|
-
} })
|
|
1144
|
-
});
|
|
1145
|
-
} });
|
|
1146
|
-
} }), createComponent(DatePicker$1.TableBody, { get children() {
|
|
1147
|
-
return createComponent(For, {
|
|
1148
|
-
get each() {
|
|
1149
|
-
return picker().weeks;
|
|
1150
|
-
},
|
|
1151
|
-
children: (week) => createComponent(DatePicker$1.TableRow, { get children() {
|
|
1152
|
-
return createComponent(For, {
|
|
1153
|
-
each: week,
|
|
1154
|
-
children: (day) => createComponent(DatePicker$1.TableCell, {
|
|
1155
|
-
value: day,
|
|
1156
|
-
get children() {
|
|
1157
|
-
return createComponent(DatePicker$1.TableCellTrigger, { get children() {
|
|
1158
|
-
return day.day;
|
|
1159
|
-
} });
|
|
1160
|
-
}
|
|
1161
|
-
})
|
|
1162
|
-
});
|
|
1163
|
-
} })
|
|
1164
|
-
});
|
|
1165
|
-
} })];
|
|
1166
|
-
}
|
|
1167
|
-
}),
|
|
1168
|
-
ssr(_tmpl$3, ssrHydrationKey(), escape(createComponent(Button, {
|
|
1169
|
-
type: "button",
|
|
1170
|
-
tone: "secondary",
|
|
1171
|
-
onClick: () => picker().selectToday(),
|
|
1172
|
-
children: "오늘"
|
|
1173
|
-
})), escape(createComponent(DatePicker$1.ClearTrigger, {
|
|
1174
|
-
"class": "dds-btn dds-btn--secondary",
|
|
1175
|
-
children: "지우기"
|
|
1176
|
-
})))
|
|
1177
|
-
] });
|
|
1178
|
-
}
|
|
1179
|
-
});
|
|
1180
|
-
}
|
|
1181
|
-
});
|
|
1182
|
-
}
|
|
1183
|
-
});
|
|
1184
|
-
} })];
|
|
1185
|
-
}
|
|
1186
|
-
})
|
|
1187
|
-
});
|
|
1188
|
-
}
|
|
1189
|
-
//#endregion
|
|
1190
|
-
export { Button, Checkbox, ConsoleShell, DatePicker, Dialog, Field, Icon, IconButton, Radio, RadioGroup, Select, Switch, Tab, TabList, TabPanel, Tabs, ToastProvider, Tooltip, createControllableSignal, createStatusPill, useToast };
|
|
773
|
+
export { Button, Calendar, Checkbox, Combobox, ConsoleShell, DatePicker, Dialog, DropdownMenu, Field, Icon, IconButton, Input, InputGroup, Popover, Radio, RadioGroup, Select, SelectPicker, Switch, Tab, TabList, TabPanel, Tabs, ToastProvider, Tooltip, createControllableSignal, createStatusPill, useToast };
|
|
1191
774
|
|
|
1192
775
|
//# sourceMappingURL=server.js.map
|