@devslab/dds-solid 0.3.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/server.js ADDED
@@ -0,0 +1,535 @@
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";
3
+ import { directionPolicy, icons } from "@devslab/dds-icons";
4
+ //#region src/controllable.ts
5
+ function createControllableSignal(options) {
6
+ const [internal, setInternal] = createSignal(options.defaultValue);
7
+ const value = () => options.value() ?? internal();
8
+ const setInternalValue = setInternal;
9
+ const setValue = (next) => {
10
+ const resolved = typeof next === "function" ? next(value()) : next;
11
+ if (options.value() === void 0) setInternalValue(() => resolved);
12
+ options.onChange?.(resolved);
13
+ return resolved;
14
+ };
15
+ return [value, setValue];
16
+ }
17
+ //#endregion
18
+ //#region src/utils.ts
19
+ function classes(...values) {
20
+ return values.filter(Boolean).join(" ");
21
+ }
22
+ function describedBy(...ids) {
23
+ return ids.filter(Boolean).join(" ") || void 0;
24
+ }
25
+ //#endregion
26
+ //#region src/controls.tsx
27
+ var _tmpl$$4 = ["<span", " class=\"dds-spinner\" aria-hidden=\"true\"></span>"];
28
+ var _tmpl$2$3 = [
29
+ "<div",
30
+ "><label class=\"dds-field__label\"",
31
+ "><!--$-->",
32
+ "<!--/--><!--$-->",
33
+ "<!--/--></label><!--$-->",
34
+ "<!--/--><!--$-->",
35
+ "<!--/--><!--$-->",
36
+ "<!--/--></div>"
37
+ ];
38
+ var _tmpl$3$2 = ["<span", " aria-hidden=\"true\"> *</span>"];
39
+ var _tmpl$4 = [
40
+ "<div",
41
+ " class=\"dds-field__help\">",
42
+ "</div>"
43
+ ];
44
+ var _tmpl$5 = [
45
+ "<div",
46
+ " class=\"dds-field__error\" role=\"alert\">",
47
+ "</div>"
48
+ ];
49
+ var _tmpl$6 = [
50
+ "<span",
51
+ ">",
52
+ "</span>"
53
+ ];
54
+ var _tmpl$7 = [
55
+ "<label",
56
+ ">",
57
+ "<span>",
58
+ "</span></label>"
59
+ ];
60
+ function Button(props) {
61
+ const [local, rest] = splitProps(props, [
62
+ "class",
63
+ "tone",
64
+ "size",
65
+ "loading",
66
+ "disabled",
67
+ "type",
68
+ "children"
69
+ ]);
70
+ return ssrElement("button", mergeProps(rest, {
71
+ get type() {
72
+ return local.type ?? "button";
73
+ },
74
+ get ["class"]() {
75
+ return classes("dds-btn", `dds-btn--${local.tone ?? "primary"}`, local.size !== "md" && local.size ? `dds-btn--${local.size}` : void 0, local.class);
76
+ },
77
+ get disabled() {
78
+ return local.disabled || local.loading;
79
+ },
80
+ get ["aria-busy"]() {
81
+ return local.loading ? "true" : void 0;
82
+ }
83
+ }), () => [
84
+ "<!--$-->",
85
+ local.loading && _tmpl$$4[0] + ssrHydrationKey() + _tmpl$$4[1],
86
+ "<!--/-->",
87
+ "<!--$-->",
88
+ escape(local.children),
89
+ "<!--/-->"
90
+ ], true);
91
+ }
92
+ function IconButton(props) {
93
+ const [local, rest] = splitProps(props, [
94
+ "class",
95
+ "tone",
96
+ "size",
97
+ "loading",
98
+ "disabled",
99
+ "type",
100
+ "children"
101
+ ]);
102
+ return ssrElement("button", mergeProps(rest, {
103
+ get type() {
104
+ return local.type ?? "button";
105
+ },
106
+ get ["class"]() {
107
+ 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);
108
+ },
109
+ get disabled() {
110
+ return local.disabled || local.loading;
111
+ },
112
+ get ["aria-busy"]() {
113
+ return local.loading ? "true" : void 0;
114
+ }
115
+ }), () => local.loading ? _tmpl$$4[0] + ssrHydrationKey() + _tmpl$$4[1] : escape(local.children), true);
116
+ }
117
+ function Field(props) {
118
+ const generated = createUniqueId();
119
+ const id = () => props.id ?? `dds-field-${generated}`;
120
+ const helpId = () => props.helpText ? `${id()}-help` : void 0;
121
+ const errorId = () => props.error ? `${id()}-error` : void 0;
122
+ const control = () => ({
123
+ id: id(),
124
+ "aria-describedby": describedBy(helpId(), errorId()),
125
+ "aria-invalid": props.error ? "true" : void 0,
126
+ "aria-required": props.required ? "true" : void 0
127
+ });
128
+ return ssr(_tmpl$2$3, 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$2[0] + ssrHydrationKey() + _tmpl$3$2[1], typeof props.children === "function" ? escape(props.children(control())) : escape(props.children), props.helpText && ssr(_tmpl$4, ssrHydrationKey() + ssrAttribute("id", escape(helpId(), true), false), escape(props.helpText)), props.error && ssr(_tmpl$5, ssrHydrationKey() + ssrAttribute("id", escape(errorId(), true), false), escape(props.error)));
129
+ }
130
+ function Select(props) {
131
+ const [local, rest] = splitProps(props, [
132
+ "class",
133
+ "invalid",
134
+ "children"
135
+ ]);
136
+ return ssr(_tmpl$6, ssrHydrationKey() + ssrAttribute("class", escape(classes("dds-select", local.class), true), false), ssrElement("select", mergeProps(rest, {
137
+ "class": "dds-select__input",
138
+ get ["aria-invalid"]() {
139
+ return local.invalid ? "true" : void 0;
140
+ }
141
+ }), () => escape(local.children), false));
142
+ }
143
+ function Checkable(props) {
144
+ const [local, rest] = splitProps(props, [
145
+ "checked",
146
+ "defaultChecked",
147
+ "onCheckedChange",
148
+ "label",
149
+ "class",
150
+ "inputClass",
151
+ "type",
152
+ "role"
153
+ ]);
154
+ const [checked, setChecked] = createControllableSignal({
155
+ value: () => local.checked,
156
+ defaultValue: local.defaultChecked ?? false,
157
+ onChange: local.onCheckedChange
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, {
160
+ get type() {
161
+ return local.type;
162
+ },
163
+ get role() {
164
+ return local.role;
165
+ },
166
+ get ["class"]() {
167
+ return classes(local.role === "switch" ? "dds-switch__input" : "dds-check__input", local.inputClass);
168
+ },
169
+ get checked() {
170
+ return checked();
171
+ }
172
+ }), void 0, false), escape(local.label));
173
+ }
174
+ var Checkbox = (props) => createComponent(Checkable, mergeProps(props, { type: "checkbox" }));
175
+ var Radio = (props) => createComponent(Checkable, mergeProps(props, { type: "radio" }));
176
+ var Switch = (props) => createComponent(Checkable, mergeProps(props, {
177
+ type: "checkbox",
178
+ role: "switch"
179
+ }));
180
+ //#endregion
181
+ //#region src/dialog.tsx
182
+ var _tmpl$$3 = [
183
+ "<div",
184
+ " class=\"dds-dialog-overlay\"><div",
185
+ " role=\"dialog\" aria-modal=\"true\"",
186
+ " tabindex=\"-1\"><h2",
187
+ " class=\"dds-dialog__title\">",
188
+ "</h2><!--$-->",
189
+ "<!--/--><!--$-->",
190
+ "<!--/--><!--$-->",
191
+ "<!--/--></div></div>"
192
+ ];
193
+ var _tmpl$2$2 = [
194
+ "<div",
195
+ " class=\"dds-dialog__body\">",
196
+ "</div>"
197
+ ];
198
+ var _tmpl$3$1 = [
199
+ "<div",
200
+ " class=\"dds-dialog__actions\">",
201
+ "</div>"
202
+ ];
203
+ var focusable = [
204
+ "a[href]",
205
+ "button:not([disabled])",
206
+ "input:not([disabled])",
207
+ "select:not([disabled])",
208
+ "textarea:not([disabled])",
209
+ "[tabindex]:not([tabindex='-1'])"
210
+ ].join(",");
211
+ function Dialog(props) {
212
+ const generated = createUniqueId();
213
+ const id = () => props.id ?? `dds-dialog-${generated}`;
214
+ const titleId = () => `${id()}-title`;
215
+ const descriptionId = () => props.description ? `${id()}-description` : void 0;
216
+ const [open, setOpen] = createControllableSignal({
217
+ value: () => props.open,
218
+ defaultValue: props.defaultOpen ?? false,
219
+ onChange: props.onOpenChange
220
+ });
221
+ let panel;
222
+ let previouslyFocused = null;
223
+ createEffect(() => {
224
+ if (!open()) return;
225
+ previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null;
226
+ queueMicrotask(() => {});
227
+ const onKeyDown = (event) => {
228
+ if (event.key === "Escape" && props.closeOnEscape !== false) {
229
+ event.preventDefault();
230
+ setOpen(false);
231
+ return;
232
+ }
233
+ if (event.key !== "Tab" || true) return;
234
+ const candidates = [...panel.querySelectorAll(focusable)].filter((element) => !element.hidden && element.getAttribute("aria-hidden") !== "true");
235
+ if (candidates.length === 0) {
236
+ event.preventDefault();
237
+ panel.focus();
238
+ return;
239
+ }
240
+ const first = candidates[0];
241
+ const last = candidates[candidates.length - 1];
242
+ if (event.shiftKey && document.activeElement === first) {
243
+ event.preventDefault();
244
+ last.focus();
245
+ } else if (!event.shiftKey && document.activeElement === last) {
246
+ event.preventDefault();
247
+ first.focus();
248
+ }
249
+ };
250
+ document.addEventListener("keydown", onKeyDown);
251
+ onCleanup(() => {
252
+ document.removeEventListener("keydown", onKeyDown);
253
+ queueMicrotask(() => previouslyFocused?.focus());
254
+ });
255
+ });
256
+ return createComponent(Show, {
257
+ get when() {
258
+ return open();
259
+ },
260
+ get children() {
261
+ return ssr(_tmpl$$3, 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$2, ssrHydrationKey() + ssrAttribute("id", escape(descriptionId(), true), false), escape(props.description)), escape(props.children), props.actions && ssr(_tmpl$3$1, ssrHydrationKey(), escape(props.actions)));
262
+ }
263
+ });
264
+ }
265
+ //#endregion
266
+ //#region src/icon.tsx
267
+ var _tmpl$$2 = ["<g>", "</g>"];
268
+ var _tmpl$2$1 = [
269
+ "<title",
270
+ ">",
271
+ "</title>"
272
+ ];
273
+ function Icon(props) {
274
+ const [local, rest] = splitProps(props, [
275
+ "name",
276
+ "label",
277
+ "size",
278
+ "directional",
279
+ "class"
280
+ ]);
281
+ const icon = () => icons[local.name];
282
+ const directional = () => local.directional ?? directionPolicy.mirrorInRtl.includes(local.name);
283
+ return ssrElement("svg", mergeProps(rest, {
284
+ get ["class"]() {
285
+ return classes(directional() && directionPolicy.cssClass, local.class);
286
+ },
287
+ get viewBox() {
288
+ return icon().viewBox;
289
+ },
290
+ get width() {
291
+ return local.size ?? 24;
292
+ },
293
+ get height() {
294
+ return local.size ?? 24;
295
+ },
296
+ fill: "none",
297
+ stroke: "currentColor",
298
+ get ["stroke-width"]() {
299
+ return icon().strokeWidth;
300
+ },
301
+ "stroke-linecap": "round",
302
+ "stroke-linejoin": "round",
303
+ get role() {
304
+ return local.label ? "img" : void 0;
305
+ },
306
+ get ["aria-label"]() {
307
+ return local.label;
308
+ },
309
+ get ["aria-hidden"]() {
310
+ return local.label ? void 0 : "true";
311
+ }
312
+ }), () => [
313
+ "<!--$-->",
314
+ local.label && ssr(_tmpl$2$1, ssrHydrationKey(), escape(local.label)),
315
+ "<!--/-->",
316
+ ssr(_tmpl$$2, icon().body)
317
+ ], true);
318
+ }
319
+ //#endregion
320
+ //#region src/tabs.tsx
321
+ var TabsContext = createContext();
322
+ var useTabs = () => {
323
+ const context = useContext(TabsContext);
324
+ if (!context) throw new Error("Tab components must be rendered inside <Tabs>");
325
+ return context;
326
+ };
327
+ function Tabs(props) {
328
+ const generated = createUniqueId();
329
+ const id = () => props.id ?? `dds-tabs-${generated}`;
330
+ const [value, setValue] = createControllableSignal({
331
+ value: () => props.value,
332
+ defaultValue: props.defaultValue,
333
+ onChange: props.onValueChange
334
+ });
335
+ const registered = [];
336
+ const context = {
337
+ value,
338
+ setValue,
339
+ orientation: props.orientation ?? "horizontal",
340
+ register(tab) {
341
+ registered.push(tab);
342
+ return () => {
343
+ const index = registered.indexOf(tab);
344
+ if (index >= 0) registered.splice(index, 1);
345
+ };
346
+ },
347
+ tabs: () => registered,
348
+ tabId: (tabValue) => `${id()}-tab-${tabValue}`,
349
+ panelId: (tabValue) => `${id()}-panel-${tabValue}`
350
+ };
351
+ return createComponent(TabsContext.Provider, {
352
+ value: context,
353
+ get children() {
354
+ return props.children;
355
+ }
356
+ });
357
+ }
358
+ function TabList(props) {
359
+ const context = useTabs();
360
+ const [local, rest] = splitProps(props, [
361
+ "class",
362
+ "children",
363
+ "onKeyDown"
364
+ ]);
365
+ return ssrElement("div", mergeProps(rest, {
366
+ get ["class"]() {
367
+ return classes("dds-tabs", local.class);
368
+ },
369
+ role: "tablist",
370
+ get ["aria-orientation"]() {
371
+ return context.orientation;
372
+ }
373
+ }), () => escape(local.children), true);
374
+ }
375
+ function Tab(props) {
376
+ const context = useTabs();
377
+ const [local, rest] = splitProps(props, [
378
+ "value",
379
+ "class",
380
+ "children",
381
+ "disabled",
382
+ "onClick"
383
+ ]);
384
+ let element;
385
+ onMount(() => {
386
+ const unregister = context.register({
387
+ value: local.value,
388
+ element,
389
+ disabled: Boolean(local.disabled)
390
+ });
391
+ onCleanup(unregister);
392
+ });
393
+ return ssrElement("button", mergeProps(rest, {
394
+ get id() {
395
+ return context.tabId(local.value);
396
+ },
397
+ type: "button",
398
+ role: "tab",
399
+ get ["class"]() {
400
+ return classes("dds-tab", local.class);
401
+ },
402
+ get ["aria-selected"]() {
403
+ return context.value() === local.value;
404
+ },
405
+ get ["aria-controls"]() {
406
+ return context.panelId(local.value);
407
+ },
408
+ get tabindex() {
409
+ return context.value() === local.value ? 0 : -1;
410
+ },
411
+ get disabled() {
412
+ return local.disabled;
413
+ }
414
+ }), () => escape(local.children), true);
415
+ }
416
+ function TabPanel(props) {
417
+ const context = useTabs();
418
+ const [local, rest] = splitProps(props, [
419
+ "value",
420
+ "class",
421
+ "children"
422
+ ]);
423
+ return ssrElement("div", mergeProps(rest, {
424
+ get id() {
425
+ return context.panelId(local.value);
426
+ },
427
+ role: "tabpanel",
428
+ get ["class"]() {
429
+ return local.class;
430
+ },
431
+ get ["aria-labelledby"]() {
432
+ return context.tabId(local.value);
433
+ },
434
+ get hidden() {
435
+ return context.value() !== local.value;
436
+ },
437
+ tabindex: "0"
438
+ }), () => escape(local.children), true);
439
+ }
440
+ //#endregion
441
+ //#region src/toast.tsx
442
+ var _tmpl$$1 = [
443
+ "<div",
444
+ " aria-live=\"polite\" aria-relevant=\"additions removals\">",
445
+ "</div>"
446
+ ];
447
+ var _tmpl$2 = [
448
+ "<div",
449
+ "><span>",
450
+ "</span><!--$-->",
451
+ "<!--/--></div>"
452
+ ];
453
+ var _tmpl$3 = [
454
+ "<button",
455
+ " type=\"button\" class=\"dds-iconbtn dds-iconbtn--sm\"",
456
+ ">×</button>"
457
+ ];
458
+ var ToastContext = createContext();
459
+ function ToastProvider(props) {
460
+ const [toasts, setToasts] = createSignal([]);
461
+ const timers = /* @__PURE__ */ new Map();
462
+ let sequence = 0;
463
+ const dismiss = (id) => {
464
+ const timer = timers.get(id);
465
+ if (timer) clearTimeout(timer);
466
+ timers.delete(id);
467
+ setToasts((current) => current.filter((toast) => toast.id !== id));
468
+ };
469
+ const api = {
470
+ show(input) {
471
+ const id = `dds-toast-${++sequence}`;
472
+ setToasts((current) => [...current, {
473
+ ...input,
474
+ id
475
+ }]);
476
+ const duration = input.duration ?? props.defaultDuration ?? 5e3;
477
+ if (duration > 0) timers.set(id, setTimeout(() => dismiss(id), duration));
478
+ return id;
479
+ },
480
+ dismiss,
481
+ clear() {
482
+ for (const timer of timers.values()) clearTimeout(timer);
483
+ timers.clear();
484
+ setToasts([]);
485
+ }
486
+ };
487
+ onCleanup(api.clear);
488
+ return createComponent(ToastContext.Provider, {
489
+ value: api,
490
+ get children() {
491
+ return [props.children, ssr(_tmpl$$1, ssrHydrationKey() + ssrAttribute("class", escape(classes("dds-toast-region", props.class), true), false), escape(createComponent(For, {
492
+ get each() {
493
+ return toasts();
494
+ },
495
+ children: (toast) => ssr(_tmpl$2, ssrHydrationKey() + ssrAttribute("class", escape(classes("dds-toast", `dds-toast--${toast.tone ?? "info"}`), true), false) + ssrAttribute("role", toast.tone === "danger" ? "alert" : "status", false), escape(toast.message), props.dismissLabel ? ssr(_tmpl$3, ssrHydrationKey(), ssrAttribute("aria-label", typeof props.dismissLabel === "function" ? escape(props.dismissLabel(toast), true) : escape(props.dismissLabel, true), false)) : escape(null))
496
+ })))];
497
+ }
498
+ });
499
+ }
500
+ function useToast() {
501
+ const context = useContext(ToastContext);
502
+ if (!context) throw new Error("useToast must be called inside <ToastProvider>");
503
+ return context;
504
+ }
505
+ //#endregion
506
+ //#region src/tooltip.tsx
507
+ var _tmpl$ = [
508
+ "<span",
509
+ "><!--$-->",
510
+ "<!--/--><span",
511
+ " class=\"dds-tooltip__bubble\" role=\"tooltip\"",
512
+ ">",
513
+ "</span></span>"
514
+ ];
515
+ function Tooltip(props) {
516
+ const generated = createUniqueId();
517
+ const id = () => props.id ?? `dds-tooltip-${generated}`;
518
+ const [open, setOpen] = createControllableSignal({
519
+ value: () => props.open,
520
+ defaultValue: props.defaultOpen ?? false,
521
+ onChange: props.onOpenChange
522
+ });
523
+ const trigger = {
524
+ "aria-describedby": id(),
525
+ onFocus: () => setOpen(true),
526
+ onBlur: () => setOpen(false),
527
+ onPointerEnter: () => setOpen(true),
528
+ onPointerLeave: () => setOpen(false)
529
+ };
530
+ 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
+ }
532
+ //#endregion
533
+ export { Button, Checkbox, Dialog, Field, Icon, IconButton, Radio, Select, Switch, Tab, TabList, TabPanel, Tabs, ToastProvider, Tooltip, createControllableSignal, useToast };
534
+
535
+ //# sourceMappingURL=server.js.map
@@ -0,0 +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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AQ,IAAI;EAC3Bf,cAAce,QAAQ,KAAK;EAC3Bd,sBAAsBc,QAAQ,IAAI;EAClCb,sBAAsBa,QAAQ,KAAK;CACrC;CACA,OAAAK,IAAAC,QAAAC,gBAAA,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"}
package/dist/tabs.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { type JSX, type ParentProps } from "solid-js";
2
+ export interface TabsProps {
3
+ value?: string;
4
+ defaultValue: string;
5
+ onValueChange?: (value: string) => void;
6
+ orientation?: "horizontal" | "vertical";
7
+ children: JSX.Element;
8
+ id?: string;
9
+ }
10
+ export declare function Tabs(props: TabsProps): JSX.Element;
11
+ export declare function TabList(props: ParentProps<JSX.HTMLAttributes<HTMLDivElement>>): JSX.Element;
12
+ export interface TabProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "value" | "class"> {
13
+ value: string;
14
+ class?: string;
15
+ }
16
+ export declare function Tab(props: ParentProps<TabProps>): JSX.Element;
17
+ export interface TabPanelProps extends JSX.HTMLAttributes<HTMLDivElement> {
18
+ value: string;
19
+ }
20
+ export declare function TabPanel(props: ParentProps<TabPanelProps>): JSX.Element;
21
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../src/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,GAAG,EACR,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAuBlB,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,eAyBpC;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,eA0B7E;AAED,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACpG,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,eA0B/C;AAED,MAAM,WAAW,aAAc,SAAQ,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC;IAAG,KAAK,EAAE,MAAM,CAAA;CAAE;AAE3F,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,aAAa,CAAC,eAczD"}