@devslab/dds-solid 0.9.0 → 0.11.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/dist/console-shell.d.ts +63 -0
- package/dist/console-shell.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +204 -47
- package/dist/index.js.map +1 -1
- package/dist/server.js +221 -21
- package/dist/server.js.map +1 -1
- package/dist/status-pill.d.ts +12 -0
- package/dist/status-pill.d.ts.map +1 -0
- package/package.json +4 -4
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { For, Show, createContext, createEffect, createSignal, createUniqueId, onCleanup, onMount, splitProps, useContext } from "solid-js";
|
|
2
|
-
import { createComponent, escape, mergeProps, ssr, ssrAttribute, ssrElement, ssrHydrationKey } from "solid-js/web";
|
|
2
|
+
import { createComponent, escape, memo, mergeProps, ssr, ssrAttribute, ssrElement, ssrHydrationKey } from "solid-js/web";
|
|
3
3
|
import { directionPolicy, icons } from "@devslab/dds-icons";
|
|
4
4
|
//#region src/controllable.ts
|
|
5
5
|
function createControllableSignal(options) {
|
|
@@ -24,8 +24,8 @@ function describedBy(...ids) {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/controls.tsx
|
|
27
|
-
var _tmpl$$
|
|
28
|
-
var _tmpl$2$
|
|
27
|
+
var _tmpl$$6 = ["<span", " class=\"dds-spinner\" aria-hidden=\"true\"></span>"];
|
|
28
|
+
var _tmpl$2$5 = [
|
|
29
29
|
"<div",
|
|
30
30
|
"><label class=\"dds-field__label\"",
|
|
31
31
|
"><!--$-->",
|
|
@@ -35,23 +35,23 @@ var _tmpl$2$3 = [
|
|
|
35
35
|
"<!--/--><!--$-->",
|
|
36
36
|
"<!--/--></div>"
|
|
37
37
|
];
|
|
38
|
-
var _tmpl$3$
|
|
39
|
-
var _tmpl$4 = [
|
|
38
|
+
var _tmpl$3$3 = ["<span", " aria-hidden=\"true\"> *</span>"];
|
|
39
|
+
var _tmpl$4$1 = [
|
|
40
40
|
"<div",
|
|
41
41
|
" class=\"dds-field__help\">",
|
|
42
42
|
"</div>"
|
|
43
43
|
];
|
|
44
|
-
var _tmpl$5 = [
|
|
44
|
+
var _tmpl$5$1 = [
|
|
45
45
|
"<div",
|
|
46
46
|
" class=\"dds-field__error\" role=\"alert\">",
|
|
47
47
|
"</div>"
|
|
48
48
|
];
|
|
49
|
-
var _tmpl$6 = [
|
|
49
|
+
var _tmpl$6$1 = [
|
|
50
50
|
"<span",
|
|
51
51
|
">",
|
|
52
52
|
"</span>"
|
|
53
53
|
];
|
|
54
|
-
var _tmpl$7 = [
|
|
54
|
+
var _tmpl$7$1 = [
|
|
55
55
|
"<label",
|
|
56
56
|
">",
|
|
57
57
|
"<span>",
|
|
@@ -82,7 +82,7 @@ function Button(props) {
|
|
|
82
82
|
}
|
|
83
83
|
}), () => [
|
|
84
84
|
"<!--$-->",
|
|
85
|
-
local.loading && _tmpl$$
|
|
85
|
+
local.loading && _tmpl$$6[0] + ssrHydrationKey() + _tmpl$$6[1],
|
|
86
86
|
"<!--/-->",
|
|
87
87
|
"<!--$-->",
|
|
88
88
|
escape(local.children),
|
|
@@ -112,7 +112,7 @@ function IconButton(props) {
|
|
|
112
112
|
get ["aria-busy"]() {
|
|
113
113
|
return local.loading ? "true" : void 0;
|
|
114
114
|
}
|
|
115
|
-
}), () => local.loading ? _tmpl$$
|
|
115
|
+
}), () => local.loading ? _tmpl$$6[0] + ssrHydrationKey() + _tmpl$$6[1] : escape(local.children), true);
|
|
116
116
|
}
|
|
117
117
|
function Field(props) {
|
|
118
118
|
const generated = createUniqueId();
|
|
@@ -125,7 +125,7 @@ function Field(props) {
|
|
|
125
125
|
"aria-invalid": props.error ? "true" : void 0,
|
|
126
126
|
"aria-required": props.required ? "true" : void 0
|
|
127
127
|
});
|
|
128
|
-
return ssr(_tmpl$2$
|
|
128
|
+
return ssr(_tmpl$2$5, ssrHydrationKey() + ssrAttribute("class", escape(classes("dds-field", props.error ? "dds-field--error" : void 0, props.class), true), false), ssrAttribute("for", escape(id(), true), false), escape(props.label), props.required && _tmpl$3$3[0] + ssrHydrationKey() + _tmpl$3$3[1], typeof props.children === "function" ? escape(props.children(control())) : escape(props.children), props.helpText && ssr(_tmpl$4$1, ssrHydrationKey() + ssrAttribute("id", escape(helpId(), true), false), escape(props.helpText)), props.error && ssr(_tmpl$5$1, ssrHydrationKey() + ssrAttribute("id", escape(errorId(), true), false), escape(props.error)));
|
|
129
129
|
}
|
|
130
130
|
function Select(props) {
|
|
131
131
|
const [local, rest] = splitProps(props, [
|
|
@@ -133,7 +133,7 @@ function Select(props) {
|
|
|
133
133
|
"invalid",
|
|
134
134
|
"children"
|
|
135
135
|
]);
|
|
136
|
-
return ssr(_tmpl$6, ssrHydrationKey() + ssrAttribute("class", escape(classes("dds-select", local.class), true), false), ssrElement("select", mergeProps(rest, {
|
|
136
|
+
return ssr(_tmpl$6$1, ssrHydrationKey() + ssrAttribute("class", escape(classes("dds-select", local.class), true), false), ssrElement("select", mergeProps(rest, {
|
|
137
137
|
"class": "dds-select__input",
|
|
138
138
|
get ["aria-invalid"]() {
|
|
139
139
|
return local.invalid ? "true" : void 0;
|
|
@@ -156,7 +156,7 @@ function Checkable(props) {
|
|
|
156
156
|
defaultValue: local.defaultChecked ?? false,
|
|
157
157
|
onChange: local.onCheckedChange
|
|
158
158
|
});
|
|
159
|
-
return ssr(_tmpl$7, ssrHydrationKey() + ssrAttribute("class", escape(classes(local.role === "switch" ? "dds-switch" : "dds-check", local.class), true), false), ssrElement("input", mergeProps(rest, {
|
|
159
|
+
return ssr(_tmpl$7$1, ssrHydrationKey() + ssrAttribute("class", escape(classes(local.role === "switch" ? "dds-switch" : "dds-check", local.class), true), false), ssrElement("input", mergeProps(rest, {
|
|
160
160
|
get type() {
|
|
161
161
|
return local.type;
|
|
162
162
|
},
|
|
@@ -178,8 +178,161 @@ var Switch = (props) => createComponent(Checkable, mergeProps(props, {
|
|
|
178
178
|
role: "switch"
|
|
179
179
|
}));
|
|
180
180
|
//#endregion
|
|
181
|
+
//#region src/console-shell.tsx
|
|
182
|
+
var _tmpl$$5 = [
|
|
183
|
+
"<dl",
|
|
184
|
+
" class=\"dds-console-rail__context\">",
|
|
185
|
+
"</dl>"
|
|
186
|
+
];
|
|
187
|
+
var _tmpl$2$4 = [
|
|
188
|
+
"<div",
|
|
189
|
+
" class=\"dds-console-rail__foot\">",
|
|
190
|
+
"</div>"
|
|
191
|
+
];
|
|
192
|
+
var _tmpl$3$2 = [
|
|
193
|
+
"<p",
|
|
194
|
+
" class=\"dds-console-page-eyebrow\">",
|
|
195
|
+
"</p>"
|
|
196
|
+
];
|
|
197
|
+
var _tmpl$4 = [
|
|
198
|
+
"<div",
|
|
199
|
+
" class=\"dds-console-page-header__actions\">",
|
|
200
|
+
"</div>"
|
|
201
|
+
];
|
|
202
|
+
var _tmpl$5 = [
|
|
203
|
+
"<div",
|
|
204
|
+
" class=\"dds-console-shell\"",
|
|
205
|
+
"><a class=\"dds-console-skip dds-visually-hidden\" href=\"#dds-console-main\">",
|
|
206
|
+
"</a><button class=\"dds-console-rail__toggle\" type=\"button\" data-action=\"toggle-rail\" aria-controls=\"dds-console-rail\"",
|
|
207
|
+
"><span aria-hidden=\"true\"></span><span class=\"dds-visually-hidden\">",
|
|
208
|
+
"</span></button><div class=\"dds-console-rail__scrim\"",
|
|
209
|
+
"></div><aside id=\"dds-console-rail\" class=\"dds-console-rail\"",
|
|
210
|
+
"><a class=\"dds-console-rail__brand\"",
|
|
211
|
+
"><img",
|
|
212
|
+
" alt width=\"20\" height=\"20\"><strong>",
|
|
213
|
+
"</strong></a><!--$-->",
|
|
214
|
+
"<!--/--><nav class=\"dds-console-rail__nav\"",
|
|
215
|
+
">",
|
|
216
|
+
"</nav><!--$-->",
|
|
217
|
+
"<!--/--></aside><main id=\"dds-console-main\" class=\"dds-console-main\" tabindex=\"-1\"><header class=\"dds-console-page-header\"><div class=\"dds-console-page-header__text\"><!--$-->",
|
|
218
|
+
"<!--/--><h1>",
|
|
219
|
+
"</h1></div><!--$-->",
|
|
220
|
+
"<!--/--></header><!--$-->",
|
|
221
|
+
"<!--/--></main></div>"
|
|
222
|
+
];
|
|
223
|
+
var _tmpl$6 = [
|
|
224
|
+
"<div",
|
|
225
|
+
"><dt>",
|
|
226
|
+
"</dt><dd>",
|
|
227
|
+
"</dd></div>"
|
|
228
|
+
];
|
|
229
|
+
var _tmpl$7 = [
|
|
230
|
+
"<section",
|
|
231
|
+
" class=\"dds-console-rail__group\"",
|
|
232
|
+
"><h2",
|
|
233
|
+
" class=\"dds-console-rail__group-label\">",
|
|
234
|
+
"</h2><ul>",
|
|
235
|
+
"</ul></section>"
|
|
236
|
+
];
|
|
237
|
+
var _tmpl$8 = [
|
|
238
|
+
"<span",
|
|
239
|
+
" class=\"dds-console-rail__badge\"",
|
|
240
|
+
">",
|
|
241
|
+
"</span>"
|
|
242
|
+
];
|
|
243
|
+
var _tmpl$9 = [
|
|
244
|
+
"<li",
|
|
245
|
+
"><a class=\"dds-console-rail__item\" data-nav=\"",
|
|
246
|
+
"\"",
|
|
247
|
+
"><span>",
|
|
248
|
+
"</span><!--$-->",
|
|
249
|
+
"<!--/--></a></li>"
|
|
250
|
+
];
|
|
251
|
+
function isActive(activePath, href, explicit) {
|
|
252
|
+
if (explicit !== void 0) return explicit;
|
|
253
|
+
if (href.split("/").filter(Boolean).length <= 1) return activePath === href;
|
|
254
|
+
return activePath === href || activePath.startsWith(`${href}/`);
|
|
255
|
+
}
|
|
256
|
+
/** Fills the `{count}` placeholder in a consumer-supplied badge label
|
|
257
|
+
* template. A function replacer, not `template.replace("{count}", value)`
|
|
258
|
+
* — a string replacement value is subject to special
|
|
259
|
+
* `$&`/`$$`/`` $` ``/`$'` patterns. `count` is always a plain digit string
|
|
260
|
+
* today, so this is defensive rather than a live bug, but it is the same
|
|
261
|
+
* class of mistake as dds-table's analogous `sortBy` label fix — no
|
|
262
|
+
* shared helper between the two packages (see that fix's note). */
|
|
263
|
+
function fillBadgeLabel(template, count) {
|
|
264
|
+
return template.replace("{count}", () => String(count));
|
|
265
|
+
}
|
|
266
|
+
function ConsoleShell(props) {
|
|
267
|
+
const [open, setOpen] = createSignal(false);
|
|
268
|
+
const close = () => setOpen(false);
|
|
269
|
+
const [hydrated, setHydrated] = createSignal(false);
|
|
270
|
+
onMount(() => {
|
|
271
|
+
setHydrated(true);
|
|
272
|
+
const onKey = (event) => {
|
|
273
|
+
if (event.key === "Escape") close();
|
|
274
|
+
};
|
|
275
|
+
document.addEventListener("keydown", onKey);
|
|
276
|
+
onCleanup(() => document.removeEventListener("keydown", onKey));
|
|
277
|
+
});
|
|
278
|
+
return ssr(_tmpl$5, ssrHydrationKey(), ssrAttribute("data-surface", escape(props.surface, true), false) + ssrAttribute("data-hydrated", hydrated() ? "true" : escape(void 0, true), false), escape(props.labels.skip), ssrAttribute("aria-expanded", escape(open(), true), false), open() ? escape(props.labels.menuClose) : escape(props.labels.menuOpen), ssrAttribute("data-open", open() ? "true" : "false", false), ssrAttribute("data-open", open() ? "true" : "false", false), ssrAttribute("href", escape(props.brand.href, true), false), ssrAttribute("src", escape(props.brand.mark, true), false), escape(props.brand.name), escape(createComponent(Show, {
|
|
279
|
+
get when() {
|
|
280
|
+
return memo(() => !!props.context)() && props.context.length > 0;
|
|
281
|
+
},
|
|
282
|
+
get children() {
|
|
283
|
+
return ssr(_tmpl$$5, ssrHydrationKey(), escape(createComponent(For, {
|
|
284
|
+
get each() {
|
|
285
|
+
return props.context;
|
|
286
|
+
},
|
|
287
|
+
children: (row) => ssr(_tmpl$6, ssrHydrationKey(), escape(row.label), escape(row.value))
|
|
288
|
+
})));
|
|
289
|
+
}
|
|
290
|
+
})), ssrAttribute("aria-label", escape(props.labels.nav, true), false), escape(createComponent(For, {
|
|
291
|
+
get each() {
|
|
292
|
+
return props.nav;
|
|
293
|
+
},
|
|
294
|
+
children: (group) => {
|
|
295
|
+
const groupId = `dds-console-group-${createUniqueId()}`;
|
|
296
|
+
return ssr(_tmpl$7, ssrHydrationKey(), ssrAttribute("aria-labelledby", escape(groupId, true), false), ssrAttribute("id", escape(groupId, true), false), escape(group.label), escape(createComponent(For, {
|
|
297
|
+
get each() {
|
|
298
|
+
return group.items;
|
|
299
|
+
},
|
|
300
|
+
children: (item) => ssr(_tmpl$9, ssrHydrationKey(), `${escape(props.surface, true)}.${escape(item.id, true)}`, ssrAttribute("href", escape(item.href, true), false) + ssrAttribute("aria-current", isActive(props.activePath, item.href, item.active) ? "page" : escape(void 0, true), false), escape(item.label), escape(createComponent(Show, {
|
|
301
|
+
get when() {
|
|
302
|
+
return memo(() => item.badge !== void 0)() && item.badge > 0;
|
|
303
|
+
},
|
|
304
|
+
get children() {
|
|
305
|
+
return ssr(_tmpl$8, ssrHydrationKey(), ssrAttribute("aria-label", escape(fillBadgeLabel(props.labels.badge, item.badge), true), false), escape(item.badge));
|
|
306
|
+
}
|
|
307
|
+
})))
|
|
308
|
+
})));
|
|
309
|
+
}
|
|
310
|
+
})), escape(createComponent(Show, {
|
|
311
|
+
get when() {
|
|
312
|
+
return props.foot;
|
|
313
|
+
},
|
|
314
|
+
get children() {
|
|
315
|
+
return ssr(_tmpl$2$4, ssrHydrationKey(), escape(props.foot));
|
|
316
|
+
}
|
|
317
|
+
})), escape(createComponent(Show, {
|
|
318
|
+
get when() {
|
|
319
|
+
return props.header.eyebrow;
|
|
320
|
+
},
|
|
321
|
+
get children() {
|
|
322
|
+
return ssr(_tmpl$3$2, ssrHydrationKey(), escape(props.header.eyebrow));
|
|
323
|
+
}
|
|
324
|
+
})), escape(props.header.title), escape(createComponent(Show, {
|
|
325
|
+
get when() {
|
|
326
|
+
return props.header.actions;
|
|
327
|
+
},
|
|
328
|
+
get children() {
|
|
329
|
+
return ssr(_tmpl$4, ssrHydrationKey(), escape(props.header.actions));
|
|
330
|
+
}
|
|
331
|
+
})), escape(props.children));
|
|
332
|
+
}
|
|
333
|
+
//#endregion
|
|
181
334
|
//#region src/dialog.tsx
|
|
182
|
-
var _tmpl$$
|
|
335
|
+
var _tmpl$$4 = [
|
|
183
336
|
"<div",
|
|
184
337
|
" class=\"dds-dialog-overlay\"><div",
|
|
185
338
|
" role=\"dialog\" aria-modal=\"true\"",
|
|
@@ -190,7 +343,7 @@ var _tmpl$$3 = [
|
|
|
190
343
|
"<!--/--><!--$-->",
|
|
191
344
|
"<!--/--></div></div>"
|
|
192
345
|
];
|
|
193
|
-
var _tmpl$2$
|
|
346
|
+
var _tmpl$2$3 = [
|
|
194
347
|
"<div",
|
|
195
348
|
" class=\"dds-dialog__body\">",
|
|
196
349
|
"</div>"
|
|
@@ -258,14 +411,14 @@ function Dialog(props) {
|
|
|
258
411
|
return open();
|
|
259
412
|
},
|
|
260
413
|
get children() {
|
|
261
|
-
return ssr(_tmpl$$
|
|
414
|
+
return ssr(_tmpl$$4, ssrHydrationKey(), ssrAttribute("id", escape(id(), true), false) + ssrAttribute("class", escape(classes("dds-dialog", props.class), true), false), ssrAttribute("aria-labelledby", escape(titleId(), true), false) + ssrAttribute("aria-describedby", escape(describedBy(descriptionId()), true), false), ssrAttribute("id", escape(titleId(), true), false), escape(props.title), props.description && ssr(_tmpl$2$3, ssrHydrationKey() + ssrAttribute("id", escape(descriptionId(), true), false), escape(props.description)), escape(props.children), props.actions && ssr(_tmpl$3$1, ssrHydrationKey(), escape(props.actions)));
|
|
262
415
|
}
|
|
263
416
|
});
|
|
264
417
|
}
|
|
265
418
|
//#endregion
|
|
266
419
|
//#region src/icon.tsx
|
|
267
|
-
var _tmpl$$
|
|
268
|
-
var _tmpl$2$
|
|
420
|
+
var _tmpl$$3 = ["<g>", "</g>"];
|
|
421
|
+
var _tmpl$2$2 = [
|
|
269
422
|
"<title",
|
|
270
423
|
">",
|
|
271
424
|
"</title>"
|
|
@@ -311,12 +464,59 @@ function Icon(props) {
|
|
|
311
464
|
}
|
|
312
465
|
}), () => [
|
|
313
466
|
"<!--$-->",
|
|
314
|
-
local.label && ssr(_tmpl$2$
|
|
467
|
+
local.label && ssr(_tmpl$2$2, ssrHydrationKey(), escape(local.label)),
|
|
315
468
|
"<!--/-->",
|
|
316
|
-
ssr(_tmpl$$
|
|
469
|
+
ssr(_tmpl$$3, icon().body)
|
|
317
470
|
], true);
|
|
318
471
|
}
|
|
319
472
|
//#endregion
|
|
473
|
+
//#region src/status-pill.tsx
|
|
474
|
+
var _tmpl$$2 = [
|
|
475
|
+
"<code",
|
|
476
|
+
" data-status=\"",
|
|
477
|
+
"\">",
|
|
478
|
+
"</code>"
|
|
479
|
+
];
|
|
480
|
+
var _tmpl$2$1 = [
|
|
481
|
+
"<span",
|
|
482
|
+
" data-status=\"",
|
|
483
|
+
"\"",
|
|
484
|
+
">",
|
|
485
|
+
"</span>"
|
|
486
|
+
];
|
|
487
|
+
function createStatusPill(config) {
|
|
488
|
+
const open = new Set(config.openDomains ?? []);
|
|
489
|
+
return function StatusPill(props) {
|
|
490
|
+
const tone = () => config.tones[props.domain]?.[props.value];
|
|
491
|
+
const label = () => config.label(props.domain, props.value, props.locale);
|
|
492
|
+
const known = () => Boolean(tone() && label());
|
|
493
|
+
const resolved = () => {
|
|
494
|
+
const found = tone();
|
|
495
|
+
if (!found) throw new Error(`StatusPill: no tone for ${props.domain}.${props.value}`);
|
|
496
|
+
const text = label();
|
|
497
|
+
if (!text) throw new Error(`StatusPill: no label for ${props.domain}.${props.value}`);
|
|
498
|
+
return {
|
|
499
|
+
tone: found,
|
|
500
|
+
text
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
return createComponent(Show, {
|
|
504
|
+
get when() {
|
|
505
|
+
return known() || !open.has(props.domain);
|
|
506
|
+
},
|
|
507
|
+
get fallback() {
|
|
508
|
+
return ssr(_tmpl$$2, ssrHydrationKey(), `${escape(props.domain, true)}.${escape(props.value, true)}`, escape(props.value));
|
|
509
|
+
},
|
|
510
|
+
get children() {
|
|
511
|
+
return (() => {
|
|
512
|
+
const value = resolved();
|
|
513
|
+
return ssr(_tmpl$2$1, 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));
|
|
514
|
+
})();
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
//#endregion
|
|
320
520
|
//#region src/tabs.tsx
|
|
321
521
|
var TabsContext = createContext();
|
|
322
522
|
var useTabs = () => {
|
|
@@ -530,6 +730,6 @@ function Tooltip(props) {
|
|
|
530
730
|
return ssr(_tmpl$, ssrHydrationKey() + ssrAttribute("class", escape(classes("dds-tooltip", props.class), true), false), escape(props.children(trigger)), ssrAttribute("id", escape(id(), true), false), ssrAttribute("hidden", !open(), true), escape(props.content));
|
|
531
731
|
}
|
|
532
732
|
//#endregion
|
|
533
|
-
export { Button, Checkbox, Dialog, Field, Icon, IconButton, Radio, Select, Switch, Tab, TabList, TabPanel, Tabs, ToastProvider, Tooltip, createControllableSignal, useToast };
|
|
733
|
+
export { Button, Checkbox, ConsoleShell, Dialog, Field, Icon, IconButton, Radio, Select, Switch, Tab, TabList, TabPanel, Tabs, ToastProvider, Tooltip, createControllableSignal, createStatusPill, useToast };
|
|
534
734
|
|
|
535
735
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","names":["createUniqueId","splitProps","JSX","ParentProps","createControllableSignal","classes","describedBy","ButtonTone","ControlSize","ButtonProps","Omit","ButtonHTMLAttributes","HTMLButtonElement","class","tone","size","loading","Button","props","local","rest","_$ssrElement","_$mergeProps","type","undefined","disabled","aria-busy","_tmpl$","_$ssrHydrationKey","_$escape","children","IconButtonProps","Element","IconButton","FieldControlProps","id","FieldProps","label","helpText","error","required","Field","generated","helpId","errorId","control","_$ssr","_tmpl$2","_$ssrAttribute","_tmpl$3","_tmpl$4","_tmpl$5","SelectProps","SelectHTMLAttributes","HTMLSelectElement","invalid","Select","_tmpl$6","aria-invalid","CheckableProps","InputHTMLAttributes","HTMLInputElement","checked","defaultChecked","onCheckedChange","inputClass","Checkable","role","setChecked","value","defaultValue","onChange","_tmpl$7","CheckboxProps","Checkbox","_$createComponent","RadioProps","Radio","SwitchProps","Switch","Show","createEffect","createUniqueId","onCleanup","JSX","createControllableSignal","classes","describedBy","focusable","join","DialogProps","open","defaultOpen","onOpenChange","title","Element","description","children","actions","closeOnEscape","closeOnOutside","class","id","Dialog","props","generated","titleId","descriptionId","undefined","setOpen","value","defaultValue","onChange","panel","HTMLDivElement","previouslyFocused","HTMLElement","document","activeElement","queueMicrotask","first","querySelector","focus","onKeyDown","event","KeyboardEvent","key","preventDefault","candidates","querySelectorAll","filter","element","hidden","getAttribute","length","last","shiftKey","addEventListener","removeEventListener","_$createComponent","when","_$ssr","_tmpl$","_$ssrHydrationKey","_$ssrAttribute","_$escape","_tmpl$2","_tmpl$3","directionPolicy","icons","DdsIconName","splitProps","JSX","classes","IconProps","Omit","SvgSVGAttributes","SVGSVGElement","name","label","size","directional","Icon","props","local","rest","icon","mirrorInRtl","includes","_$ssrElement","_$mergeProps","class","cssClass","viewBox","width","height","fill","stroke","stroke-width","strokeWidth","role","undefined","aria-label","aria-hidden","_$ssr","_tmpl$2","_$ssrHydrationKey","_$escape","_tmpl$","body","createContext","createUniqueId","onCleanup","onMount","splitProps","useContext","Accessor","JSX","ParentProps","createControllableSignal","classes","RegisteredTab","value","element","HTMLButtonElement","disabled","TabsContextValue","setValue","orientation","register","tab","tabs","tabId","panelId","TabsContext","useTabs","context","Error","TabsProps","defaultValue","onValueChange","children","Element","id","Tabs","props","generated","onChange","registered","push","index","indexOf","splice","tabValue","_$createComponent","Provider","TabList","HTMLAttributes","HTMLDivElement","local","rest","onKeyDown","EventHandler","KeyboardEvent","event","defaultPrevented","filter","length","current","findIndex","document","activeElement","next","rtl","documentElement","dir","key","preventDefault","target","focus","_$ssrElement","_$mergeProps","class","role","aria-orientation","_$escape","TabProps","Omit","ButtonHTMLAttributes","Tab","unregister","Boolean","type","aria-selected","aria-controls","tabindex","TabPanelProps","TabPanel","aria-labelledby","hidden","For","createContext","createSignal","onCleanup","useContext","JSX","classes","ToastTone","ToastInput","message","Element","tone","duration","ToastRecord","id","ToastApi","show","toast","dismiss","clear","ToastContext","ToastProviderProps","children","defaultDuration","dismissLabel","class","ToastProvider","props","toasts","setToasts","timers","Map","ReturnType","setTimeout","sequence","timer","get","clearTimeout","delete","current","filter","api","input","set","values","_$createComponent","Provider","value","_$ssr","_tmpl$","_$ssrHydrationKey","_$ssrAttribute","_$escape","each","_tmpl$2","_tmpl$3","useToast","context","Error","createUniqueId","JSX","createControllableSignal","classes","TooltipTriggerProps","onFocus","onBlur","onPointerEnter","onPointerLeave","TooltipProps","content","Element","children","props","open","defaultOpen","onOpenChange","id","class","Tooltip","generated","setOpen","value","defaultValue","onChange","trigger","_$ssr","_tmpl$","_$ssrHydrationKey","_$ssrAttribute","_$escape"],"sources":["../src/controllable.ts","../src/utils.ts","../src/controls.tsx","../src/dialog.tsx","../src/icon.tsx","../src/tabs.tsx","../src/toast.tsx","../src/tooltip.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","export function classes(...values: Array<string | false | null | undefined>): string {\n return values.filter(Boolean).join(\" \");\n}\n\nexport function describedBy(...ids: Array<string | false | null | undefined>): string | undefined {\n const value = ids.filter(Boolean).join(\" \");\n return value || undefined;\n}\n","import {\n createUniqueId,\n splitProps,\n type JSX,\n type ParentProps,\n} from \"solid-js\";\n\nimport { createControllableSignal } from \"./controllable\";\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 <div class={classes(\"dds-field\", props.error ? \"dds-field--error\" : undefined, props.class)}>\n <label class=\"dds-field__label\" for={id()}>{props.label}{props.required && <span aria-hidden=\"true\"> *</span>}</label>\n {typeof props.children === \"function\" ? props.children(control()) : props.children}\n {props.helpText && <div id={helpId()} class=\"dds-field__help\">{props.helpText}</div>}\n {props.error && <div id={errorId()} class=\"dds-field__error\" role=\"alert\">{props.error}</div>}\n </div>\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) => <Checkable {...props} type=\"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) => <Checkable {...props} type=\"checkbox\" role=\"switch\" />;\n","import {\n Show,\n createEffect,\n createUniqueId,\n onCleanup,\n type JSX,\n} from \"solid-js\";\n\nimport { createControllableSignal } from \"./controllable\";\nimport { classes, describedBy } from \"./utils\";\n\nexport const focusable = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n \"textarea:not([disabled])\",\n \"[tabindex]:not([tabindex='-1'])\",\n].join(\",\");\n\nexport interface DialogProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n title: JSX.Element;\n description?: JSX.Element;\n children: JSX.Element;\n actions?: JSX.Element;\n closeOnEscape?: boolean;\n closeOnOutside?: boolean;\n class?: string;\n id?: string;\n}\n\nexport function Dialog(props: DialogProps) {\n const generated = createUniqueId();\n const id = () => props.id ?? `dds-dialog-${generated}`;\n const titleId = () => `${id()}-title`;\n const descriptionId = () => props.description ? `${id()}-description` : undefined;\n const [open, setOpen] = createControllableSignal({\n value: () => props.open,\n defaultValue: props.defaultOpen ?? false,\n onChange: props.onOpenChange,\n });\n let panel: HTMLDivElement | undefined;\n let previouslyFocused: HTMLElement | null = null;\n\n createEffect(() => {\n if (!open()) return;\n previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n queueMicrotask(() => {\n const first = panel?.querySelector<HTMLElement>(focusable);\n (first ?? panel)?.focus();\n });\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\" && props.closeOnEscape !== false) {\n event.preventDefault();\n setOpen(false);\n return;\n }\n if (event.key !== \"Tab\" || !panel) return;\n const candidates = [...panel.querySelectorAll<HTMLElement>(focusable)]\n .filter((element) => !element.hidden && element.getAttribute(\"aria-hidden\") !== \"true\");\n if (candidates.length === 0) {\n event.preventDefault();\n panel.focus();\n return;\n }\n const first = candidates[0]!;\n const last = candidates[candidates.length - 1]!;\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n };\n document.addEventListener(\"keydown\", onKeyDown);\n onCleanup(() => {\n document.removeEventListener(\"keydown\", onKeyDown);\n queueMicrotask(() => previouslyFocused?.focus());\n });\n });\n\n return (\n <Show when={open()}>\n <div\n class=\"dds-dialog-overlay\"\n onPointerDown={(event) => {\n if (event.target === event.currentTarget && props.closeOnOutside !== false) setOpen(false);\n }}\n >\n <div\n ref={panel}\n id={id()}\n class={classes(\"dds-dialog\", props.class)}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId()}\n aria-describedby={describedBy(descriptionId())}\n tabindex=\"-1\"\n >\n <h2 id={titleId()} class=\"dds-dialog__title\">{props.title}</h2>\n {props.description && <div id={descriptionId()} class=\"dds-dialog__body\">{props.description}</div>}\n {props.children}\n {props.actions && <div class=\"dds-dialog__actions\">{props.actions}</div>}\n </div>\n </div>\n </Show>\n );\n}\n","import { directionPolicy, icons, type DdsIconName } from \"@devslab/dds-icons\";\nimport { splitProps, type JSX } from \"solid-js\";\n\nimport { classes } from \"./utils\";\n\nexport interface IconProps extends Omit<JSX.SvgSVGAttributes<SVGSVGElement>, \"name\" | \"children\"> {\n name: DdsIconName;\n label?: string;\n size?: number | string;\n directional?: boolean;\n}\n\nexport function Icon(props: IconProps) {\n const [local, rest] = splitProps(props, [\"name\", \"label\", \"size\", \"directional\", \"class\"]);\n const icon = () => icons[local.name];\n const directional = () => local.directional ?? directionPolicy.mirrorInRtl.includes(local.name);\n return (\n <svg\n {...rest}\n class={classes(directional() && directionPolicy.cssClass, local.class)}\n viewBox={icon().viewBox}\n width={local.size ?? 24}\n height={local.size ?? 24}\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width={icon().strokeWidth}\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n role={local.label ? \"img\" : undefined}\n aria-label={local.label}\n aria-hidden={local.label ? undefined : \"true\"}\n >\n {local.label && <title>{local.label}</title>}\n <g innerHTML={icon().body} />\n </svg>\n );\n}\n","import {\n createContext,\n createUniqueId,\n onCleanup,\n onMount,\n splitProps,\n useContext,\n type Accessor,\n type JSX,\n type ParentProps,\n} from \"solid-js\";\n\nimport { createControllableSignal } from \"./controllable\";\nimport { classes } from \"./utils\";\n\ninterface RegisteredTab { value: string; element: HTMLButtonElement; disabled: boolean }\ninterface TabsContextValue {\n value: Accessor<string>;\n setValue: (value: string) => void;\n orientation: \"horizontal\" | \"vertical\";\n register: (tab: RegisteredTab) => () => void;\n tabs: () => RegisteredTab[];\n tabId: (value: string) => string;\n panelId: (value: string) => string;\n}\n\nconst TabsContext = createContext<TabsContextValue>();\nconst useTabs = () => {\n const context = useContext(TabsContext);\n if (!context) throw new Error(\"Tab components must be rendered inside <Tabs>\");\n return context;\n};\n\nexport interface TabsProps {\n value?: string;\n defaultValue: string;\n onValueChange?: (value: string) => void;\n orientation?: \"horizontal\" | \"vertical\";\n children: JSX.Element;\n id?: string;\n}\n\nexport function Tabs(props: TabsProps) {\n const generated = createUniqueId();\n const id = () => props.id ?? `dds-tabs-${generated}`;\n const [value, setValue] = createControllableSignal({\n value: () => props.value,\n defaultValue: props.defaultValue,\n onChange: props.onValueChange,\n });\n const registered: RegisteredTab[] = [];\n const context: TabsContextValue = {\n value,\n setValue,\n orientation: props.orientation ?? \"horizontal\",\n register(tab) {\n registered.push(tab);\n return () => {\n const index = registered.indexOf(tab);\n if (index >= 0) registered.splice(index, 1);\n };\n },\n tabs: () => registered,\n tabId: (tabValue) => `${id()}-tab-${tabValue}`,\n panelId: (tabValue) => `${id()}-panel-${tabValue}`,\n };\n return <TabsContext.Provider value={context}>{props.children}</TabsContext.Provider>;\n}\n\nexport function TabList(props: ParentProps<JSX.HTMLAttributes<HTMLDivElement>>) {\n const context = useTabs();\n const [local, rest] = splitProps(props, [\"class\", \"children\", \"onKeyDown\"]);\n const onKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (event) => {\n if (typeof local.onKeyDown === \"function\") local.onKeyDown(event);\n if (event.defaultPrevented) return;\n const tabs = context.tabs().filter((tab) => !tab.disabled);\n if (!tabs.length) return;\n const current = tabs.findIndex((tab) => tab.element === document.activeElement);\n let next = current;\n const rtl = document.documentElement.dir === \"rtl\";\n if (event.key === \"Home\") next = 0;\n else if (event.key === \"End\") next = tabs.length - 1;\n else if (event.key === \"ArrowRight\" && context.orientation === \"horizontal\") next = (current + (rtl ? -1 : 1) + tabs.length) % tabs.length;\n else if (event.key === \"ArrowLeft\" && context.orientation === \"horizontal\") next = (current + (rtl ? 1 : -1) + tabs.length) % tabs.length;\n else if (event.key === \"ArrowDown\" && context.orientation === \"vertical\") next = (current + 1) % tabs.length;\n else if (event.key === \"ArrowUp\" && context.orientation === \"vertical\") next = (current - 1 + tabs.length) % tabs.length;\n else return;\n event.preventDefault();\n const target = tabs[next];\n if (target) {\n target.element.focus();\n context.setValue(target.value);\n }\n };\n return <div {...rest} class={classes(\"dds-tabs\", local.class)} role=\"tablist\" aria-orientation={context.orientation} onKeyDown={onKeyDown}>{local.children}</div>;\n}\n\nexport interface TabProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, \"value\" | \"class\"> {\n value: string;\n class?: string;\n}\n\nexport function Tab(props: ParentProps<TabProps>) {\n const context = useTabs();\n const [local, rest] = splitProps(props, [\"value\", \"class\", \"children\", \"disabled\", \"onClick\"]);\n let element!: HTMLButtonElement;\n onMount(() => {\n const unregister = context.register({ value: local.value, element, disabled: Boolean(local.disabled) });\n onCleanup(unregister);\n });\n return (\n <button\n {...rest}\n ref={element}\n id={context.tabId(local.value)}\n type=\"button\"\n role=\"tab\"\n class={classes(\"dds-tab\", local.class)}\n aria-selected={context.value() === local.value}\n aria-controls={context.panelId(local.value)}\n tabindex={context.value() === local.value ? 0 : -1}\n disabled={local.disabled}\n onClick={(event) => {\n if (typeof local.onClick === \"function\") local.onClick(event);\n if (!event.defaultPrevented) context.setValue(local.value);\n }}\n >{local.children}</button>\n );\n}\n\nexport interface TabPanelProps extends JSX.HTMLAttributes<HTMLDivElement> { value: string }\n\nexport function TabPanel(props: ParentProps<TabPanelProps>) {\n const context = useTabs();\n const [local, rest] = splitProps(props, [\"value\", \"class\", \"children\"]);\n return (\n <div\n {...rest}\n id={context.panelId(local.value)}\n role=\"tabpanel\"\n class={local.class}\n aria-labelledby={context.tabId(local.value)}\n hidden={context.value() !== local.value}\n tabindex=\"0\"\n >{local.children}</div>\n );\n}\n","import {\n For,\n createContext,\n createSignal,\n onCleanup,\n useContext,\n type JSX,\n} from \"solid-js\";\n\nimport { classes } from \"./utils\";\n\nexport type ToastTone = \"success\" | \"warning\" | \"danger\" | \"info\";\nexport interface ToastInput { message: JSX.Element; tone?: ToastTone; duration?: number }\nexport interface ToastRecord extends ToastInput { id: string }\nexport interface ToastApi {\n show: (toast: ToastInput) => string;\n dismiss: (id: string) => void;\n clear: () => void;\n}\n\nconst ToastContext = createContext<ToastApi>();\n\nexport interface ToastProviderProps {\n children: JSX.Element;\n defaultDuration?: number;\n /** Localized accessible name for the optional manual dismiss control. */\n dismissLabel?: string | ((toast: ToastRecord) => string);\n class?: string;\n}\n\nexport function ToastProvider(props: ToastProviderProps) {\n const [toasts, setToasts] = createSignal<ToastRecord[]>([]);\n const timers = new Map<string, ReturnType<typeof setTimeout>>();\n let sequence = 0;\n const dismiss = (id: string) => {\n const timer = timers.get(id);\n if (timer) clearTimeout(timer);\n timers.delete(id);\n setToasts((current) => current.filter((toast) => toast.id !== id));\n };\n const api: ToastApi = {\n show(input) {\n const id = `dds-toast-${++sequence}`;\n setToasts((current) => [...current, { ...input, id }]);\n const duration = input.duration ?? props.defaultDuration ?? 5000;\n if (duration > 0) timers.set(id, setTimeout(() => dismiss(id), duration));\n return id;\n },\n dismiss,\n clear() {\n for (const timer of timers.values()) clearTimeout(timer);\n timers.clear();\n setToasts([]);\n },\n };\n onCleanup(api.clear);\n return (\n <ToastContext.Provider value={api}>\n {props.children}\n <div class={classes(\"dds-toast-region\", props.class)} aria-live=\"polite\" aria-relevant=\"additions removals\">\n <For each={toasts()}>{(toast) => (\n <div class={classes(\"dds-toast\", `dds-toast--${toast.tone ?? \"info\"}`)} role={toast.tone === \"danger\" ? \"alert\" : \"status\"}>\n <span>{toast.message}</span>\n {props.dismissLabel ? (\n <button\n type=\"button\"\n class=\"dds-iconbtn dds-iconbtn--sm\"\n aria-label={typeof props.dismissLabel === \"function\" ? props.dismissLabel(toast) : props.dismissLabel}\n onClick={() => dismiss(toast.id)}\n >×</button>\n ) : null}\n </div>\n )}</For>\n </div>\n </ToastContext.Provider>\n );\n}\n\nexport function useToast(): ToastApi {\n const context = useContext(ToastContext);\n if (!context) throw new Error(\"useToast must be called inside <ToastProvider>\");\n return context;\n}\n","import { createUniqueId, type JSX } from \"solid-js\";\n\nimport { createControllableSignal } from \"./controllable\";\nimport { classes } from \"./utils\";\n\nexport interface TooltipTriggerProps {\n \"aria-describedby\": string;\n onFocus: () => void;\n onBlur: () => void;\n onPointerEnter: () => void;\n onPointerLeave: () => void;\n}\n\nexport interface TooltipProps {\n content: JSX.Element;\n children: (props: TooltipTriggerProps) => JSX.Element;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n id?: string;\n class?: string;\n}\n\nexport function Tooltip(props: TooltipProps) {\n const generated = createUniqueId();\n const id = () => props.id ?? `dds-tooltip-${generated}`;\n const [open, setOpen] = createControllableSignal({\n value: () => props.open,\n defaultValue: props.defaultOpen ?? false,\n onChange: props.onOpenChange,\n });\n const trigger: TooltipTriggerProps = {\n \"aria-describedby\": id(),\n onFocus: () => setOpen(true),\n onBlur: () => setOpen(false),\n onPointerEnter: () => setOpen(true),\n onPointerLeave: () => setOpen(false),\n };\n return (\n <span class={classes(\"dds-tooltip\", props.class)}>\n {props.children(trigger)}\n <span id={id()} class=\"dds-tooltip__bubble\" role=\"tooltip\" hidden={!open()}>{props.content}</span>\n </span>\n );\n}\n"],"mappings":";;;;AAUA,SAAgB,yBAA4B,SAAuE;CACjH,MAAM,CAAC,UAAU,eAAe,aAAa,QAAQ,YAAY;CACjE,MAAM,cAA2B,QAAQ,MAAM,KAAK,SAAS;CAC7D,MAAM,mBAAmB;CACzB,MAAM,YAAmC,SAAS;EAChD,MAAM,WAAW,OAAO,SAAS,aAC5B,KAA4B,MAAM,CAAC,IACpC;EACJ,IAAI,QAAQ,MAAM,MAAM,KAAA,GAAW,uBAAuB,QAAQ;EAClE,QAAQ,WAAW,QAAQ;EAC3B,OAAO;CACT;CACA,OAAO,CAAC,OAAO,QAAQ;AACzB;;;ACvBA,SAAgB,QAAQ,GAAG,QAA0D;CACnF,OAAO,OAAO,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACxC;AAEA,SAA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A,IAAAC,aAAA,SAAAC,OACe3B,QAAQ,eAAeU,MAAMK,KAAK,GAAC,IAAA,GAAA,KAAA,GAAAY,OAC7CjB,MAAMD,SAASa,OAAO,CAAC,GAAAI,aAAA,MAAAC,OACdb,GAAG,GAAC,IAAA,GAAA,KAAA,GAAAY,aAAA,UAAqD,CAACf,KAAK,GAAC,IAAA,GAAAgB,OAAGjB,MAAMH,OAAO,CAAA;AAGhG"}
|
|
1
|
+
{"version":3,"file":"server.js","names":["createUniqueId","splitProps","JSX","ParentProps","createControllableSignal","classes","describedBy","ButtonTone","ControlSize","ButtonProps","Omit","ButtonHTMLAttributes","HTMLButtonElement","class","tone","size","loading","Button","props","local","rest","_$ssrElement","_$mergeProps","type","undefined","disabled","aria-busy","_tmpl$","_$ssrHydrationKey","_$escape","children","IconButtonProps","Element","IconButton","FieldControlProps","id","FieldProps","label","helpText","error","required","Field","generated","helpId","errorId","control","_$ssr","_tmpl$2","_$ssrAttribute","_tmpl$3","_tmpl$4","_tmpl$5","SelectProps","SelectHTMLAttributes","HTMLSelectElement","invalid","Select","_tmpl$6","aria-invalid","CheckableProps","InputHTMLAttributes","HTMLInputElement","checked","defaultChecked","onCheckedChange","inputClass","Checkable","role","setChecked","value","defaultValue","onChange","_tmpl$7","CheckboxProps","Checkbox","_$createComponent","RadioProps","Radio","SwitchProps","Switch","For","Show","createSignal","createUniqueId","onCleanup","onMount","JSX","ConsoleNavItem","id","href","label","badge","active","ConsoleNavGroup","items","ConsoleShellLabels","skip","menuOpen","menuClose","nav","ConsoleHeader","eyebrow","title","actions","Element","ConsoleShellProps","surface","activePath","brand","name","mark","context","value","labels","header","foot","children","isActive","explicit","undefined","segments","split","filter","Boolean","length","startsWith","fillBadgeLabel","template","count","replace","String","ConsoleShell","props","open","setOpen","close","hydrated","setHydrated","onKey","event","KeyboardEvent","key","document","addEventListener","removeEventListener","_$ssr","_tmpl$5","_$ssrHydrationKey","_$ssrAttribute","_$escape","_$createComponent","when","_$memo","_tmpl$","each","row","_tmpl$6","group","groupId","_tmpl$7","item","_tmpl$9","_tmpl$8","_tmpl$2","_tmpl$3","_tmpl$4","Show","createEffect","createUniqueId","onCleanup","JSX","createControllableSignal","classes","describedBy","focusable","join","DialogProps","open","defaultOpen","onOpenChange","title","Element","description","children","actions","closeOnEscape","closeOnOutside","class","id","Dialog","props","generated","titleId","descriptionId","undefined","setOpen","value","defaultValue","onChange","panel","HTMLDivElement","previouslyFocused","HTMLElement","document","activeElement","queueMicrotask","first","querySelector","focus","onKeyDown","event","KeyboardEvent","key","preventDefault","candidates","querySelectorAll","filter","element","hidden","getAttribute","length","last","shiftKey","addEventListener","removeEventListener","_$createComponent","when","_$ssr","_tmpl$","_$ssrHydrationKey","_$ssrAttribute","_$escape","_tmpl$2","_tmpl$3","directionPolicy","icons","DdsIconName","splitProps","JSX","classes","IconProps","Omit","SvgSVGAttributes","SVGSVGElement","name","label","size","directional","Icon","props","local","rest","icon","mirrorInRtl","includes","_$ssrElement","_$mergeProps","class","cssClass","viewBox","width","height","fill","stroke","stroke-width","strokeWidth","role","undefined","aria-label","aria-hidden","_$ssr","_tmpl$2","_$ssrHydrationKey","_$escape","_tmpl$","body","Show","JSX","StatusTone","createStatusPill","config","tones","Record","D","label","domain","value","locale","openDomains","NoInfer","open","Set","StatusPill","props","Element","tone","known","Boolean","resolved","found","Error","text","_$createComponent","when","has","fallback","_$ssr","_tmpl$","_$ssrHydrationKey","_$escape","children","_tmpl$2","_$ssrAttribute","createContext","createUniqueId","onCleanup","onMount","splitProps","useContext","Accessor","JSX","ParentProps","createControllableSignal","classes","RegisteredTab","value","element","HTMLButtonElement","disabled","TabsContextValue","setValue","orientation","register","tab","tabs","tabId","panelId","TabsContext","useTabs","context","Error","TabsProps","defaultValue","onValueChange","children","Element","id","Tabs","props","generated","onChange","registered","push","index","indexOf","splice","tabValue","_$createComponent","Provider","TabList","HTMLAttributes","HTMLDivElement","local","rest","onKeyDown","EventHandler","KeyboardEvent","event","defaultPrevented","filter","length","current","findIndex","document","activeElement","next","rtl","documentElement","dir","key","preventDefault","target","focus","_$ssrElement","_$mergeProps","class","role","aria-orientation","_$escape","TabProps","Omit","ButtonHTMLAttributes","Tab","unregister","Boolean","type","aria-selected","aria-controls","tabindex","TabPanelProps","TabPanel","aria-labelledby","hidden","For","createContext","createSignal","onCleanup","useContext","JSX","classes","ToastTone","ToastInput","message","Element","tone","duration","ToastRecord","id","ToastApi","show","toast","dismiss","clear","ToastContext","ToastProviderProps","children","defaultDuration","dismissLabel","class","ToastProvider","props","toasts","setToasts","timers","Map","ReturnType","setTimeout","sequence","timer","get","clearTimeout","delete","current","filter","api","input","set","values","_$createComponent","Provider","value","_$ssr","_tmpl$","_$ssrHydrationKey","_$ssrAttribute","_$escape","each","_tmpl$2","_tmpl$3","useToast","context","Error","createUniqueId","JSX","createControllableSignal","classes","TooltipTriggerProps","onFocus","onBlur","onPointerEnter","onPointerLeave","TooltipProps","content","Element","children","props","open","defaultOpen","onOpenChange","id","class","Tooltip","generated","setOpen","value","defaultValue","onChange","trigger","_$ssr","_tmpl$","_$ssrHydrationKey","_$ssrAttribute","_$escape"],"sources":["../src/controllable.ts","../src/utils.ts","../src/controls.tsx","../src/console-shell.tsx","../src/dialog.tsx","../src/icon.tsx","../src/status-pill.tsx","../src/tabs.tsx","../src/toast.tsx","../src/tooltip.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","export function classes(...values: Array<string | false | null | undefined>): string {\n return values.filter(Boolean).join(\" \");\n}\n\nexport function describedBy(...ids: Array<string | false | null | undefined>): string | undefined {\n const value = ids.filter(Boolean).join(\" \");\n return value || undefined;\n}\n","import {\n createUniqueId,\n splitProps,\n type JSX,\n type ParentProps,\n} from \"solid-js\";\n\nimport { createControllableSignal } from \"./controllable\";\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 <div class={classes(\"dds-field\", props.error ? \"dds-field--error\" : undefined, props.class)}>\n <label class=\"dds-field__label\" for={id()}>{props.label}{props.required && <span aria-hidden=\"true\"> *</span>}</label>\n {typeof props.children === \"function\" ? props.children(control()) : props.children}\n {props.helpText && <div id={helpId()} class=\"dds-field__help\">{props.helpText}</div>}\n {props.error && <div id={errorId()} class=\"dds-field__error\" role=\"alert\">{props.error}</div>}\n </div>\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) => <Checkable {...props} type=\"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) => <Checkable {...props} type=\"checkbox\" role=\"switch\" />;\n","import { For, Show, createSignal, createUniqueId, onCleanup, onMount, type JSX } from \"solid-js\";\n\n/** One item in a nav group's list. `active` is a caller override — pass it\n * only when the generic prefix rule below gets a route wrong. \"Index route\"\n * in that rule means an `href` exactly one path segment deep (e.g.\n * `/dashboard`); a console mounted under a path prefix (so its own root is\n * two or more segments deep) should pass `active` explicitly on that item\n * rather than rely on the generic rule. */\nexport interface ConsoleNavItem {\n id: string;\n href: string;\n label: string;\n badge?: number;\n active?: boolean;\n}\n\nexport interface ConsoleNavGroup {\n label: string;\n items: readonly ConsoleNavItem[];\n}\n\nexport interface ConsoleShellLabels {\n skip: string;\n menuOpen: string;\n menuClose: string;\n /** Accessible name for the rail's `<nav>` landmark (e.g. \"Dashboard\n * navigation\"). Required, not optional: a console page also has the\n * DataTable's pagination `<nav>` (named via its own `labels.nextPage`),\n * and an unnamed landmark next to a named one is a regression a\n * screen-reader user would notice immediately — the rail is the primary\n * nav, so it must never be the anonymous one. */\n nav: string;\n /** Badge accessible name template. `{count}` is substituted with the\n * item's pending count — DDS supplies no words of its own. */\n badge: string;\n}\n\nexport interface ConsoleHeader {\n eyebrow?: string;\n title: string;\n actions?: JSX.Element;\n}\n\nexport interface ConsoleShellProps {\n surface: string;\n activePath: string;\n brand: { href: string; name: string; mark: string };\n /** Lines pinned under the brand — a product's organization, environment,\n * or role context. */\n context?: readonly { label: string; value: string }[];\n nav: readonly ConsoleNavGroup[];\n labels: ConsoleShellLabels;\n header: ConsoleHeader;\n /** Slot for the rail's bottom — DDS must not depend on site-kit, so a\n * theme toggle, locale picker, or sign-out form all arrive as children\n * the product renders itself. */\n foot?: JSX.Element;\n children: JSX.Element;\n}\n\n/* An index route matches exactly; everything else matches by prefix. A caller\n that knows better passes `active` on the item. */\nfunction isActive(activePath: string, href: string, explicit?: boolean): boolean {\n if (explicit !== undefined) return explicit;\n const segments = href.split(\"/\").filter(Boolean);\n if (segments.length <= 1) return activePath === href;\n return activePath === href || activePath.startsWith(`${href}/`);\n}\n\n/** Fills the `{count}` placeholder in a consumer-supplied badge label\n * template. A function replacer, not `template.replace(\"{count}\", value)`\n * — a string replacement value is subject to special\n * `$&`/`$$`/`` $` ``/`$'` patterns. `count` is always a plain digit string\n * today, so this is defensive rather than a live bug, but it is the same\n * class of mistake as dds-table's analogous `sortBy` label fix — no\n * shared helper between the two packages (see that fix's note). */\nfunction fillBadgeLabel(template: string, count: number): string {\n return template.replace(\"{count}\", () => String(count));\n}\n\nexport function ConsoleShell(props: ConsoleShellProps): JSX.Element {\n const [open, setOpen] = createSignal(false);\n const close = () => setOpen(false);\n // Delegated listeners (the rail toggle's onClick among them) attach once\n // Solid finishes hydrating; this flips only then, so a harness can wait\n // for the same readiness signal a real click depends on instead of\n // guessing with a retry. onMount never runs during SSR, so this listener\n // is never attached — and this attribute never rendered — on the server.\n const [hydrated, setHydrated] = createSignal(false);\n onMount(() => {\n setHydrated(true);\n const onKey = (event: KeyboardEvent) => { if (event.key === \"Escape\") close(); };\n document.addEventListener(\"keydown\", onKey);\n onCleanup(() => document.removeEventListener(\"keydown\", onKey));\n });\n\n return (\n <div class=\"dds-console-shell\" data-surface={props.surface} data-hydrated={hydrated() ? \"true\" : undefined}>\n <a class=\"dds-console-skip dds-visually-hidden\" href=\"#dds-console-main\">{props.labels.skip}</a>\n <button\n class=\"dds-console-rail__toggle\"\n type=\"button\"\n data-action=\"toggle-rail\"\n aria-controls=\"dds-console-rail\"\n aria-expanded={open()}\n onClick={() => setOpen(!open())}\n >\n <span aria-hidden=\"true\" />\n <span class=\"dds-visually-hidden\">{open() ? props.labels.menuClose : props.labels.menuOpen}</span>\n </button>\n <div class=\"dds-console-rail__scrim\" data-open={open() ? \"true\" : \"false\"} onClick={close} />\n <aside id=\"dds-console-rail\" class=\"dds-console-rail\" data-open={open() ? \"true\" : \"false\"}>\n {/* No aria-label here: the decorative img (alt=\"\") contributes\n nothing to the accessible name, so it resolves to the visible\n \"{brand.name}\" text alone — the original concatenated a\n hardcoded English word (\"home\") onto this, which is exactly the\n kind of copy this package must not author itself. */}\n <a class=\"dds-console-rail__brand\" href={props.brand.href}>\n <img src={props.brand.mark} alt=\"\" width=\"20\" height=\"20\" />\n <strong>{props.brand.name}</strong>\n </a>\n <Show when={props.context && props.context.length > 0}>\n <dl class=\"dds-console-rail__context\">\n <For each={props.context}>{(row) => <div><dt>{row.label}</dt><dd>{row.value}</dd></div>}</For>\n </dl>\n </Show>\n <nav class=\"dds-console-rail__nav\" aria-label={props.labels.nav}>\n <For each={props.nav}>{(group) => {\n const groupId = `dds-console-group-${createUniqueId()}`;\n return (\n <section class=\"dds-console-rail__group\" aria-labelledby={groupId}>\n <h2 id={groupId} class=\"dds-console-rail__group-label\">{group.label}</h2>\n <ul>\n <For each={group.items}>{(item) => (\n <li>\n <a\n class=\"dds-console-rail__item\"\n data-nav={`${props.surface}.${item.id}`}\n href={item.href}\n aria-current={isActive(props.activePath, item.href, item.active) ? \"page\" : undefined}\n onClick={close}\n >\n <span>{item.label}</span>\n <Show when={item.badge !== undefined && item.badge > 0}>\n <span class=\"dds-console-rail__badge\" aria-label={fillBadgeLabel(props.labels.badge, item.badge!)}>{item.badge}</span>\n </Show>\n </a>\n </li>\n )}</For>\n </ul>\n </section>\n );\n }}</For>\n </nav>\n <Show when={props.foot}>\n <div class=\"dds-console-rail__foot\">{props.foot}</div>\n </Show>\n </aside>\n <main id=\"dds-console-main\" class=\"dds-console-main\" tabIndex={-1}>\n <header class=\"dds-console-page-header\">\n <div class=\"dds-console-page-header__text\">\n <Show when={props.header.eyebrow}>\n <p class=\"dds-console-page-eyebrow\">{props.header.eyebrow}</p>\n </Show>\n <h1>{props.header.title}</h1>\n </div>\n <Show when={props.header.actions}>\n <div class=\"dds-console-page-header__actions\">{props.header.actions}</div>\n </Show>\n </header>\n {props.children}\n </main>\n </div>\n );\n}\n","import {\n Show,\n createEffect,\n createUniqueId,\n onCleanup,\n type JSX,\n} from \"solid-js\";\n\nimport { createControllableSignal } from \"./controllable\";\nimport { classes, describedBy } from \"./utils\";\n\nexport const focusable = [\n \"a[href]\",\n \"button:not([disabled])\",\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n \"textarea:not([disabled])\",\n \"[tabindex]:not([tabindex='-1'])\",\n].join(\",\");\n\nexport interface DialogProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n title: JSX.Element;\n description?: JSX.Element;\n children: JSX.Element;\n actions?: JSX.Element;\n closeOnEscape?: boolean;\n closeOnOutside?: boolean;\n class?: string;\n id?: string;\n}\n\nexport function Dialog(props: DialogProps) {\n const generated = createUniqueId();\n const id = () => props.id ?? `dds-dialog-${generated}`;\n const titleId = () => `${id()}-title`;\n const descriptionId = () => props.description ? `${id()}-description` : undefined;\n const [open, setOpen] = createControllableSignal({\n value: () => props.open,\n defaultValue: props.defaultOpen ?? false,\n onChange: props.onOpenChange,\n });\n let panel: HTMLDivElement | undefined;\n let previouslyFocused: HTMLElement | null = null;\n\n createEffect(() => {\n if (!open()) return;\n previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n queueMicrotask(() => {\n const first = panel?.querySelector<HTMLElement>(focusable);\n (first ?? panel)?.focus();\n });\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\" && props.closeOnEscape !== false) {\n event.preventDefault();\n setOpen(false);\n return;\n }\n if (event.key !== \"Tab\" || !panel) return;\n const candidates = [...panel.querySelectorAll<HTMLElement>(focusable)]\n .filter((element) => !element.hidden && element.getAttribute(\"aria-hidden\") !== \"true\");\n if (candidates.length === 0) {\n event.preventDefault();\n panel.focus();\n return;\n }\n const first = candidates[0]!;\n const last = candidates[candidates.length - 1]!;\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n };\n document.addEventListener(\"keydown\", onKeyDown);\n onCleanup(() => {\n document.removeEventListener(\"keydown\", onKeyDown);\n queueMicrotask(() => previouslyFocused?.focus());\n });\n });\n\n return (\n <Show when={open()}>\n <div\n class=\"dds-dialog-overlay\"\n onPointerDown={(event) => {\n if (event.target === event.currentTarget && props.closeOnOutside !== false) setOpen(false);\n }}\n >\n <div\n ref={panel}\n id={id()}\n class={classes(\"dds-dialog\", props.class)}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId()}\n aria-describedby={describedBy(descriptionId())}\n tabindex=\"-1\"\n >\n <h2 id={titleId()} class=\"dds-dialog__title\">{props.title}</h2>\n {props.description && <div id={descriptionId()} class=\"dds-dialog__body\">{props.description}</div>}\n {props.children}\n {props.actions && <div class=\"dds-dialog__actions\">{props.actions}</div>}\n </div>\n </div>\n </Show>\n );\n}\n","import { directionPolicy, icons, type DdsIconName } from \"@devslab/dds-icons\";\nimport { splitProps, type JSX } from \"solid-js\";\n\nimport { classes } from \"./utils\";\n\nexport interface IconProps extends Omit<JSX.SvgSVGAttributes<SVGSVGElement>, \"name\" | \"children\"> {\n name: DdsIconName;\n label?: string;\n size?: number | string;\n directional?: boolean;\n}\n\nexport function Icon(props: IconProps) {\n const [local, rest] = splitProps(props, [\"name\", \"label\", \"size\", \"directional\", \"class\"]);\n const icon = () => icons[local.name];\n const directional = () => local.directional ?? directionPolicy.mirrorInRtl.includes(local.name);\n return (\n <svg\n {...rest}\n class={classes(directional() && directionPolicy.cssClass, local.class)}\n viewBox={icon().viewBox}\n width={local.size ?? 24}\n height={local.size ?? 24}\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width={icon().strokeWidth}\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n role={local.label ? \"img\" : undefined}\n aria-label={local.label}\n aria-hidden={local.label ? undefined : \"true\"}\n >\n {local.label && <title>{local.label}</title>}\n <g innerHTML={icon().body} />\n </svg>\n );\n}\n","import { Show, type JSX } from \"solid-js\";\n\nexport type StatusTone = \"success\" | \"warning\" | \"danger\" | \"info\" | \"brand\" | \"neutral\";\n\n/* The rule, not the vocabulary. A value a CLOSED domain does not know throws:\n that can only mean a schema gained a case the catalog forgot. A value an OPEN\n domain does not know renders as raw text: that is customer data, and it must\n not crash the screen.\n\n `tones` declares which domains exist; `openDomains` only selects among the\n domains `tones` already declared, so it must not itself widen or narrow that\n set. */\nexport function createStatusPill<D extends string>(config: {\n tones: Record<D, Record<string, StatusTone>>;\n label: (domain: D, value: string, locale: string) => string | undefined;\n openDomains?: readonly NoInfer<D>[];\n}) {\n const open = new Set<string>(config.openDomains ?? []);\n return function StatusPill(props: { domain: D; value: string; locale: string }): JSX.Element {\n const tone = () => config.tones[props.domain]?.[props.value];\n const label = () => config.label(props.domain, props.value, props.locale);\n const known = () => Boolean(tone() && label());\n const resolved = () => {\n const found = tone();\n if (!found) throw new Error(`StatusPill: no tone for ${props.domain}.${props.value}`);\n const text = label();\n if (!text) throw new Error(`StatusPill: no label for ${props.domain}.${props.value}`);\n return { tone: found, text };\n };\n return (\n <Show when={known() || !open.has(props.domain)} fallback={<code data-status={`${props.domain}.${props.value}`}>{props.value}</code>}>\n {(() => {\n const value = resolved();\n return (\n <span\n class={value.tone === \"neutral\" ? \"dds-badge\" : `dds-badge dds-badge--${value.tone}`}\n data-status={`${props.domain}.${props.value}`}\n data-tone={value.tone}\n >\n {value.text}\n </span>\n );\n })()}\n </Show>\n );\n };\n}\n","import {\n createContext,\n createUniqueId,\n onCleanup,\n onMount,\n splitProps,\n useContext,\n type Accessor,\n type JSX,\n type ParentProps,\n} from \"solid-js\";\n\nimport { createControllableSignal } from \"./controllable\";\nimport { classes } from \"./utils\";\n\ninterface RegisteredTab { value: string; element: HTMLButtonElement; disabled: boolean }\ninterface TabsContextValue {\n value: Accessor<string>;\n setValue: (value: string) => void;\n orientation: \"horizontal\" | \"vertical\";\n register: (tab: RegisteredTab) => () => void;\n tabs: () => RegisteredTab[];\n tabId: (value: string) => string;\n panelId: (value: string) => string;\n}\n\nconst TabsContext = createContext<TabsContextValue>();\nconst useTabs = () => {\n const context = useContext(TabsContext);\n if (!context) throw new Error(\"Tab components must be rendered inside <Tabs>\");\n return context;\n};\n\nexport interface TabsProps {\n value?: string;\n defaultValue: string;\n onValueChange?: (value: string) => void;\n orientation?: \"horizontal\" | \"vertical\";\n children: JSX.Element;\n id?: string;\n}\n\nexport function Tabs(props: TabsProps) {\n const generated = createUniqueId();\n const id = () => props.id ?? `dds-tabs-${generated}`;\n const [value, setValue] = createControllableSignal({\n value: () => props.value,\n defaultValue: props.defaultValue,\n onChange: props.onValueChange,\n });\n const registered: RegisteredTab[] = [];\n const context: TabsContextValue = {\n value,\n setValue,\n orientation: props.orientation ?? \"horizontal\",\n register(tab) {\n registered.push(tab);\n return () => {\n const index = registered.indexOf(tab);\n if (index >= 0) registered.splice(index, 1);\n };\n },\n tabs: () => registered,\n tabId: (tabValue) => `${id()}-tab-${tabValue}`,\n panelId: (tabValue) => `${id()}-panel-${tabValue}`,\n };\n return <TabsContext.Provider value={context}>{props.children}</TabsContext.Provider>;\n}\n\nexport function TabList(props: ParentProps<JSX.HTMLAttributes<HTMLDivElement>>) {\n const context = useTabs();\n const [local, rest] = splitProps(props, [\"class\", \"children\", \"onKeyDown\"]);\n const onKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (event) => {\n if (typeof local.onKeyDown === \"function\") local.onKeyDown(event);\n if (event.defaultPrevented) return;\n const tabs = context.tabs().filter((tab) => !tab.disabled);\n if (!tabs.length) return;\n const current = tabs.findIndex((tab) => tab.element === document.activeElement);\n let next = current;\n const rtl = document.documentElement.dir === \"rtl\";\n if (event.key === \"Home\") next = 0;\n else if (event.key === \"End\") next = tabs.length - 1;\n else if (event.key === \"ArrowRight\" && context.orientation === \"horizontal\") next = (current + (rtl ? -1 : 1) + tabs.length) % tabs.length;\n else if (event.key === \"ArrowLeft\" && context.orientation === \"horizontal\") next = (current + (rtl ? 1 : -1) + tabs.length) % tabs.length;\n else if (event.key === \"ArrowDown\" && context.orientation === \"vertical\") next = (current + 1) % tabs.length;\n else if (event.key === \"ArrowUp\" && context.orientation === \"vertical\") next = (current - 1 + tabs.length) % tabs.length;\n else return;\n event.preventDefault();\n const target = tabs[next];\n if (target) {\n target.element.focus();\n context.setValue(target.value);\n }\n };\n return <div {...rest} class={classes(\"dds-tabs\", local.class)} role=\"tablist\" aria-orientation={context.orientation} onKeyDown={onKeyDown}>{local.children}</div>;\n}\n\nexport interface TabProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, \"value\" | \"class\"> {\n value: string;\n class?: string;\n}\n\nexport function Tab(props: ParentProps<TabProps>) {\n const context = useTabs();\n const [local, rest] = splitProps(props, [\"value\", \"class\", \"children\", \"disabled\", \"onClick\"]);\n let element!: HTMLButtonElement;\n onMount(() => {\n const unregister = context.register({ value: local.value, element, disabled: Boolean(local.disabled) });\n onCleanup(unregister);\n });\n return (\n <button\n {...rest}\n ref={element}\n id={context.tabId(local.value)}\n type=\"button\"\n role=\"tab\"\n class={classes(\"dds-tab\", local.class)}\n aria-selected={context.value() === local.value}\n aria-controls={context.panelId(local.value)}\n tabindex={context.value() === local.value ? 0 : -1}\n disabled={local.disabled}\n onClick={(event) => {\n if (typeof local.onClick === \"function\") local.onClick(event);\n if (!event.defaultPrevented) context.setValue(local.value);\n }}\n >{local.children}</button>\n );\n}\n\nexport interface TabPanelProps extends JSX.HTMLAttributes<HTMLDivElement> { value: string }\n\nexport function TabPanel(props: ParentProps<TabPanelProps>) {\n const context = useTabs();\n const [local, rest] = splitProps(props, [\"value\", \"class\", \"children\"]);\n return (\n <div\n {...rest}\n id={context.panelId(local.value)}\n role=\"tabpanel\"\n class={local.class}\n aria-labelledby={context.tabId(local.value)}\n hidden={context.value() !== local.value}\n tabindex=\"0\"\n >{local.children}</div>\n );\n}\n","import {\n For,\n createContext,\n createSignal,\n onCleanup,\n useContext,\n type JSX,\n} from \"solid-js\";\n\nimport { classes } from \"./utils\";\n\nexport type ToastTone = \"success\" | \"warning\" | \"danger\" | \"info\";\nexport interface ToastInput { message: JSX.Element; tone?: ToastTone; duration?: number }\nexport interface ToastRecord extends ToastInput { id: string }\nexport interface ToastApi {\n show: (toast: ToastInput) => string;\n dismiss: (id: string) => void;\n clear: () => void;\n}\n\nconst ToastContext = createContext<ToastApi>();\n\nexport interface ToastProviderProps {\n children: JSX.Element;\n defaultDuration?: number;\n /** Localized accessible name for the optional manual dismiss control. */\n dismissLabel?: string | ((toast: ToastRecord) => string);\n class?: string;\n}\n\nexport function ToastProvider(props: ToastProviderProps) {\n const [toasts, setToasts] = createSignal<ToastRecord[]>([]);\n const timers = new Map<string, ReturnType<typeof setTimeout>>();\n let sequence = 0;\n const dismiss = (id: string) => {\n const timer = timers.get(id);\n if (timer) clearTimeout(timer);\n timers.delete(id);\n setToasts((current) => current.filter((toast) => toast.id !== id));\n };\n const api: ToastApi = {\n show(input) {\n const id = `dds-toast-${++sequence}`;\n setToasts((current) => [...current, { ...input, id }]);\n const duration = input.duration ?? props.defaultDuration ?? 5000;\n if (duration > 0) timers.set(id, setTimeout(() => dismiss(id), duration));\n return id;\n },\n dismiss,\n clear() {\n for (const timer of timers.values()) clearTimeout(timer);\n timers.clear();\n setToasts([]);\n },\n };\n onCleanup(api.clear);\n return (\n <ToastContext.Provider value={api}>\n {props.children}\n <div class={classes(\"dds-toast-region\", props.class)} aria-live=\"polite\" aria-relevant=\"additions removals\">\n <For each={toasts()}>{(toast) => (\n <div class={classes(\"dds-toast\", `dds-toast--${toast.tone ?? \"info\"}`)} role={toast.tone === \"danger\" ? \"alert\" : \"status\"}>\n <span>{toast.message}</span>\n {props.dismissLabel ? (\n <button\n type=\"button\"\n class=\"dds-iconbtn dds-iconbtn--sm\"\n aria-label={typeof props.dismissLabel === \"function\" ? props.dismissLabel(toast) : props.dismissLabel}\n onClick={() => dismiss(toast.id)}\n >×</button>\n ) : null}\n </div>\n )}</For>\n </div>\n </ToastContext.Provider>\n );\n}\n\nexport function useToast(): ToastApi {\n const context = useContext(ToastContext);\n if (!context) throw new Error(\"useToast must be called inside <ToastProvider>\");\n return context;\n}\n","import { createUniqueId, type JSX } from \"solid-js\";\n\nimport { createControllableSignal } from \"./controllable\";\nimport { classes } from \"./utils\";\n\nexport interface TooltipTriggerProps {\n \"aria-describedby\": string;\n onFocus: () => void;\n onBlur: () => void;\n onPointerEnter: () => void;\n onPointerLeave: () => void;\n}\n\nexport interface TooltipProps {\n content: JSX.Element;\n children: (props: TooltipTriggerProps) => JSX.Element;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n id?: string;\n class?: string;\n}\n\nexport function Tooltip(props: TooltipProps) {\n const generated = createUniqueId();\n const id = () => props.id ?? `dds-tooltip-${generated}`;\n const [open, setOpen] = createControllableSignal({\n value: () => props.open,\n defaultValue: props.defaultOpen ?? false,\n onChange: props.onOpenChange,\n });\n const trigger: TooltipTriggerProps = {\n \"aria-describedby\": id(),\n onFocus: () => setOpen(true),\n onBlur: () => setOpen(false),\n onPointerEnter: () => setOpen(true),\n onPointerLeave: () => setOpen(false),\n };\n return (\n <span class={classes(\"dds-tooltip\", props.class)}>\n {props.children(trigger)}\n <span id={id()} class=\"dds-tooltip__bubble\" role=\"tooltip\" hidden={!open()}>{props.content}</span>\n </span>\n );\n}\n"],"mappings":";;;;AAUA,SAAgB,yBAA4B,SAAuE;CACjH,MAAM,CAAC,UAAU,eAAe,aAAa,QAAQ,YAAY;CACjE,MAAM,cAA2B,QAAQ,MAAM,KAAK,SAAS;CAC7D,MAAM,mBAAmB;CACzB,MAAM,YAAmC,SAAS;EAChD,MAAM,WAAW,OAAO,SAAS,aAC5B,KAA4B,MAAM,CAAC,IACpC;EACJ,IAAI,QAAQ,MAAM,MAAM,KAAA,GAAW,uBAAuB,QAAQ;EAClE,QAAQ,WAAW,QAAQ;EAC3B,OAAO;CACT;CACA,OAAO,CAAC,OAAO,QAAQ;AACzB;;;ACvBA,SAAgB,QAAQ,GAAG,QAA0D;CACnF,OAAO,OAAO,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACxC;AAEA,SAAgB,YAAY,GAAG,KAAmE;CAEhG,OADc,IAAI,OAAO,OAAO,CAAC,CAAC,KAAK,GAChC,KAAS,KAAA;AAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACaA,SAAgBiB,OAAOC,OAAiC;CACtD,MAAM,CAACC,OAAOC,QAAQnB,WAAWiB,OAAO;EAAC;EAAS;EAAQ;EAAQ;EAAW;EAAY;EAAQ;CAAU,CAAC;CAC5G,OAAAG,WAAA,UAAAC,WAEQF,MAAI;EAAA,IACRG,OAAI;GAAA,OAAEJ,MAAMI,QAAQ;EAAQ;EAAA,KAAA,WAAA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B,MAAMD,SAASa,OAAO,CAAC,GAAAI,aAAA,MAAAC,OACdb,GAAG,GAAC,IAAA,GAAA,KAAA,GAAAY,aAAA,UAAqD,CAACf,KAAK,GAAC,IAAA,GAAAgB,OAAGjB,MAAMH,OAAO,CAAA;AAGhG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type StatusTone = "success" | "warning" | "danger" | "info" | "brand" | "neutral";
|
|
3
|
+
export declare function createStatusPill<D extends string>(config: {
|
|
4
|
+
tones: Record<D, Record<string, StatusTone>>;
|
|
5
|
+
label: (domain: D, value: string, locale: string) => string | undefined;
|
|
6
|
+
openDomains?: readonly NoInfer<D>[];
|
|
7
|
+
}): (props: {
|
|
8
|
+
domain: D;
|
|
9
|
+
value: string;
|
|
10
|
+
locale: string;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
//# sourceMappingURL=status-pill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-pill.d.ts","sourceRoot":"","sources":["../src/status-pill.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAUzF,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE;IACzD,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAC7C,KAAK,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACxE,WAAW,CAAC,EAAE,SAAS,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;CACrC,WAEmC;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KAAG,GAAG,CAAC,OAAO,CA4B7F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devslab/dds-solid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Accessible SolidJS primitives for the DevsLab Design System",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"./styles.css": "./styles.css"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@devslab/dds-css": "0.
|
|
41
|
-
"@devslab/dds-icons": "0.
|
|
42
|
-
"@devslab/dds-tokens": "0.
|
|
40
|
+
"@devslab/dds-css": "0.11.0",
|
|
41
|
+
"@devslab/dds-icons": "0.11.0",
|
|
42
|
+
"@devslab/dds-tokens": "0.11.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"solid-js": "1.9.15"
|