@fairfox/polly 0.71.0 → 0.72.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/src/client/index.js +2 -2
- package/dist/src/client/index.js.map +2 -2
- package/dist/src/polly-ui/ActionInput.d.ts +10 -1
- package/dist/src/polly-ui/ActionSelect.d.ts +35 -0
- package/dist/src/polly-ui/Cluster.d.ts +35 -0
- package/dist/src/polly-ui/Code.d.ts +17 -0
- package/dist/src/polly-ui/Text.d.ts +31 -0
- package/dist/src/polly-ui/index.css +278 -185
- package/dist/src/polly-ui/index.d.ts +5 -1
- package/dist/src/polly-ui/index.js +480 -284
- package/dist/src/polly-ui/index.js.map +11 -6
- package/dist/src/polly-ui/internal/dispatch-action.d.ts +13 -0
- package/dist/src/polly-ui/markdown.js +3 -3
- package/dist/src/polly-ui/markdown.js.map +2 -2
- package/dist/src/polly-ui/styles.css +288 -185
- package/dist/tools/quality/src/cli.js +6 -2
- package/dist/tools/quality/src/cli.js.map +3 -3
- package/dist/tools/quality/src/index.js +6 -2
- package/dist/tools/quality/src/index.js.map +3 -3
- package/dist/tools/test/src/browser/run.js +75 -44
- package/dist/tools/test/src/browser/run.js.map +3 -3
- package/dist/tools/test/src/visual/index.js +24 -24
- package/dist/tools/test/src/visual/index.js.map +2 -2
- package/dist/tools/verify/src/cli.js +82 -51
- package/dist/tools/verify/src/cli.js.map +7 -6
- package/package.json +1 -1
|
@@ -103,12 +103,33 @@ var ActionInput_module_default = {
|
|
|
103
103
|
placeholder: "placeholder_-n6UrQ"
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
+
// src/polly-ui/internal/dispatch-action.ts
|
|
107
|
+
function dispatchAction(action, data) {
|
|
108
|
+
const hidden = document.createElement("button");
|
|
109
|
+
hidden.setAttribute("data-action", action);
|
|
110
|
+
for (const [key, value] of Object.entries(data)) {
|
|
111
|
+
const dashKey = key.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
112
|
+
hidden.setAttribute(`data-action-${dashKey}`, value);
|
|
113
|
+
}
|
|
114
|
+
hidden.style.position = "fixed";
|
|
115
|
+
hidden.style.opacity = "0";
|
|
116
|
+
hidden.style.pointerEvents = "none";
|
|
117
|
+
hidden.tabIndex = -1;
|
|
118
|
+
document.body.appendChild(hidden);
|
|
119
|
+
try {
|
|
120
|
+
hidden.click();
|
|
121
|
+
} finally {
|
|
122
|
+
hidden.remove();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
106
126
|
// src/polly-ui/ActionInput.tsx
|
|
107
127
|
import { jsxDEV as jsxDEV2 } from "preact/jsx-dev-runtime";
|
|
108
128
|
function ActionInput(props) {
|
|
109
129
|
const variant = props.variant ?? "single";
|
|
110
130
|
const saveOn = props.saveOn ?? "blur";
|
|
111
|
-
const
|
|
131
|
+
const live = saveOn === "input";
|
|
132
|
+
const [mode, setMode] = useState(live ? "edit" : "view");
|
|
112
133
|
const [draft, setDraft] = useState(props.value);
|
|
113
134
|
const inputRef = useRef(null);
|
|
114
135
|
useEffect(() => {
|
|
@@ -116,11 +137,11 @@ function ActionInput(props) {
|
|
|
116
137
|
setDraft(props.value);
|
|
117
138
|
}, [props.value, mode]);
|
|
118
139
|
useEffect(() => {
|
|
119
|
-
if (mode === "edit" && inputRef.current) {
|
|
140
|
+
if (mode === "edit" && !live && inputRef.current) {
|
|
120
141
|
inputRef.current.focus();
|
|
121
142
|
inputRef.current.select?.();
|
|
122
143
|
}
|
|
123
|
-
}, [mode]);
|
|
144
|
+
}, [mode, live]);
|
|
124
145
|
const enterEdit = useCallback(() => {
|
|
125
146
|
if (props.disabled)
|
|
126
147
|
return;
|
|
@@ -128,36 +149,17 @@ function ActionInput(props) {
|
|
|
128
149
|
setMode("edit");
|
|
129
150
|
}, [props.disabled, props.value]);
|
|
130
151
|
const commit = useCallback((next) => {
|
|
131
|
-
if (next
|
|
132
|
-
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
const dataAttrs = {
|
|
136
|
-
...props.actionData ?? {},
|
|
137
|
-
value: next
|
|
138
|
-
};
|
|
139
|
-
const hidden = document.createElement("button");
|
|
140
|
-
hidden.setAttribute("data-action", props.action);
|
|
141
|
-
for (const [key, value] of Object.entries(dataAttrs)) {
|
|
142
|
-
const dashKey = key.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
143
|
-
hidden.setAttribute(`data-action-${dashKey}`, value);
|
|
144
|
-
}
|
|
145
|
-
hidden.style.position = "fixed";
|
|
146
|
-
hidden.style.opacity = "0";
|
|
147
|
-
hidden.style.pointerEvents = "none";
|
|
148
|
-
hidden.tabIndex = -1;
|
|
149
|
-
document.body.appendChild(hidden);
|
|
150
|
-
try {
|
|
151
|
-
hidden.click();
|
|
152
|
-
} finally {
|
|
153
|
-
hidden.remove();
|
|
152
|
+
if (next !== props.value) {
|
|
153
|
+
dispatchAction(props.action, { ...props.actionData ?? {}, value: next });
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
if (!live)
|
|
156
|
+
setMode("view");
|
|
157
|
+
}, [props.action, props.actionData, props.value, live]);
|
|
157
158
|
const cancel = useCallback(() => {
|
|
158
159
|
setDraft(props.value);
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
if (!live)
|
|
161
|
+
setMode("view");
|
|
162
|
+
}, [props.value, live]);
|
|
161
163
|
const onKeyDown = (event) => {
|
|
162
164
|
if (event.key === "Escape") {
|
|
163
165
|
event.preventDefault();
|
|
@@ -213,11 +215,16 @@ function ActionInput(props) {
|
|
|
213
215
|
"data-variant": variant,
|
|
214
216
|
placeholder: props.placeholder,
|
|
215
217
|
value: draft,
|
|
216
|
-
onInput: (e) =>
|
|
218
|
+
onInput: (e) => {
|
|
219
|
+
const next = e.currentTarget.value;
|
|
220
|
+
setDraft(next);
|
|
221
|
+
if (live)
|
|
222
|
+
commit(next);
|
|
223
|
+
},
|
|
217
224
|
onBlur: () => {
|
|
218
225
|
if (saveOn === "blur")
|
|
219
226
|
commit(draft);
|
|
220
|
-
else
|
|
227
|
+
else if (!live)
|
|
221
228
|
cancel();
|
|
222
229
|
},
|
|
223
230
|
onKeyDown,
|
|
@@ -236,62 +243,23 @@ function ActionInput(props) {
|
|
|
236
243
|
ref: (el) => {
|
|
237
244
|
inputRef.current = el;
|
|
238
245
|
},
|
|
239
|
-
type: "text",
|
|
246
|
+
type: props.inputType ?? "text",
|
|
240
247
|
...common
|
|
241
248
|
}, undefined, false, undefined, this);
|
|
242
249
|
}
|
|
243
|
-
// src/polly-ui/
|
|
244
|
-
|
|
245
|
-
badge: "badge_cZd0Aw",
|
|
246
|
-
info: "info_cZd0Aw",
|
|
247
|
-
success: "success_cZd0Aw",
|
|
248
|
-
warning: "warning_cZd0Aw",
|
|
249
|
-
danger: "danger_cZd0Aw"
|
|
250
|
-
};
|
|
250
|
+
// src/polly-ui/ActionSelect.tsx
|
|
251
|
+
import { useSignal } from "@preact/signals";
|
|
251
252
|
|
|
252
|
-
// src/polly-ui/
|
|
253
|
-
import {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
return Badge_module_default["danger"];
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
function Badge(props) {
|
|
266
|
-
const { children, variant = "default", className, id } = props;
|
|
267
|
-
const parts = [Badge_module_default["badge"]];
|
|
268
|
-
const v = variantClass(variant);
|
|
269
|
-
if (v)
|
|
270
|
-
parts.push(v);
|
|
271
|
-
if (className)
|
|
272
|
-
parts.push(className);
|
|
273
|
-
return /* @__PURE__ */ jsxDEV3("span", {
|
|
274
|
-
id,
|
|
275
|
-
class: parts.join(" "),
|
|
276
|
-
"data-polly-ui": true,
|
|
277
|
-
"data-polly-badge": variant,
|
|
278
|
-
children
|
|
279
|
-
}, undefined, false, undefined, this);
|
|
280
|
-
}
|
|
281
|
-
// src/polly-ui/Button.module.css
|
|
282
|
-
var Button_module_default = {
|
|
283
|
-
btn: "btn_c4HKfA",
|
|
284
|
-
tierPrimary: "tierPrimary_c4HKfA",
|
|
285
|
-
tierSecondary: "tierSecondary_c4HKfA",
|
|
286
|
-
tierTertiary: "tierTertiary_c4HKfA",
|
|
287
|
-
colorInfo: "colorInfo_c4HKfA",
|
|
288
|
-
colorSuccess: "colorSuccess_c4HKfA",
|
|
289
|
-
colorWarning: "colorWarning_c4HKfA",
|
|
290
|
-
colorDanger: "colorDanger_c4HKfA",
|
|
291
|
-
btnSmall: "btnSmall_c4HKfA",
|
|
292
|
-
btnLarge: "btnLarge_c4HKfA",
|
|
293
|
-
btnCircle: "btnCircle_c4HKfA",
|
|
294
|
-
btnFullWidth: "btnFullWidth_c4HKfA"
|
|
253
|
+
// src/polly-ui/Dropdown.tsx
|
|
254
|
+
import { useSignalEffect } from "@preact/signals";
|
|
255
|
+
import { useEffect as useEffect2, useRef as useRef2 } from "preact/hooks";
|
|
256
|
+
|
|
257
|
+
// src/polly-ui/Dropdown.module.css
|
|
258
|
+
var Dropdown_module_default = {
|
|
259
|
+
dropdown: "dropdown_HX48zA",
|
|
260
|
+
trigger: "trigger_HX48zA",
|
|
261
|
+
menu: "menu_HX48zA",
|
|
262
|
+
alignRight: "alignRight_HX48zA"
|
|
295
263
|
};
|
|
296
264
|
|
|
297
265
|
// src/polly-ui/Layout.tsx
|
|
@@ -404,8 +372,238 @@ function Layout(props) {
|
|
|
404
372
|
}, children);
|
|
405
373
|
}
|
|
406
374
|
|
|
407
|
-
// src/polly-ui/
|
|
375
|
+
// src/polly-ui/Dropdown.tsx
|
|
376
|
+
import { jsxDEV as jsxDEV3 } from "preact/jsx-dev-runtime";
|
|
377
|
+
var dropdownCounter = 0;
|
|
378
|
+
function Dropdown(props) {
|
|
379
|
+
const { isOpen, trigger, children, align = "left", multiSelect = false, className, id } = props;
|
|
380
|
+
const menuRef = useRef2(null);
|
|
381
|
+
const triggerRef = useRef2(null);
|
|
382
|
+
const idRef = useRef2(`polly-dropdown-${++dropdownCounter}`);
|
|
383
|
+
const popoverId = idRef.current;
|
|
384
|
+
useEffect2(() => {
|
|
385
|
+
triggerRef.current?.setAttribute("popovertarget", popoverId);
|
|
386
|
+
}, [popoverId]);
|
|
387
|
+
useEffect2(() => {
|
|
388
|
+
const menu = menuRef.current;
|
|
389
|
+
if (!menu)
|
|
390
|
+
return;
|
|
391
|
+
const onOverlayClose = (e) => {
|
|
392
|
+
if (e instanceof CustomEvent && e.detail?.id === popoverId) {
|
|
393
|
+
isOpen.value = false;
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
menu.addEventListener("overlay:close", onOverlayClose);
|
|
397
|
+
return () => {
|
|
398
|
+
menu.removeEventListener("overlay:close", onOverlayClose);
|
|
399
|
+
};
|
|
400
|
+
}, [popoverId, isOpen]);
|
|
401
|
+
useSignalEffect(() => {
|
|
402
|
+
const menu = menuRef.current;
|
|
403
|
+
if (!menu)
|
|
404
|
+
return;
|
|
405
|
+
if (isOpen.value && !menu.matches(":popover-open")) {
|
|
406
|
+
menu.showPopover();
|
|
407
|
+
} else if (!isOpen.value && menu.matches(":popover-open")) {
|
|
408
|
+
menu.hidePopover();
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
const handleToggle = (e) => {
|
|
412
|
+
if ("newState" in e) {
|
|
413
|
+
isOpen.value = e.newState === "open";
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
const handleMenuClick = () => {
|
|
417
|
+
if (!multiSelect) {
|
|
418
|
+
isOpen.value = false;
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
const handleKeyDown = (e) => {
|
|
422
|
+
if (e.key === "Escape") {
|
|
423
|
+
isOpen.value = false;
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
const parts = [Dropdown_module_default["dropdown"] ?? ""];
|
|
427
|
+
if (className)
|
|
428
|
+
parts.push(className);
|
|
429
|
+
const menuParts = [Dropdown_module_default["menu"] ?? ""];
|
|
430
|
+
if (align === "right")
|
|
431
|
+
menuParts.push(Dropdown_module_default["alignRight"] ?? "");
|
|
432
|
+
return /* @__PURE__ */ jsxDEV3("div", {
|
|
433
|
+
id,
|
|
434
|
+
class: parts.filter(Boolean).join(" "),
|
|
435
|
+
"data-polly-ui": true,
|
|
436
|
+
"data-polly-dropdown": true,
|
|
437
|
+
children: [
|
|
438
|
+
/* @__PURE__ */ jsxDEV3("button", {
|
|
439
|
+
ref: triggerRef,
|
|
440
|
+
type: "button",
|
|
441
|
+
class: Dropdown_module_default["trigger"],
|
|
442
|
+
children: trigger
|
|
443
|
+
}, undefined, false, undefined, this),
|
|
444
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
445
|
+
ref: menuRef,
|
|
446
|
+
id: popoverId,
|
|
447
|
+
role: "listbox",
|
|
448
|
+
class: menuParts.filter(Boolean).join(" "),
|
|
449
|
+
popover: "auto",
|
|
450
|
+
"data-overlay-id": popoverId,
|
|
451
|
+
onToggle: handleToggle,
|
|
452
|
+
onClick: handleMenuClick,
|
|
453
|
+
onKeyDown: handleKeyDown,
|
|
454
|
+
children: /* @__PURE__ */ jsxDEV3(Layout, {
|
|
455
|
+
rows: "auto",
|
|
456
|
+
gap: "0",
|
|
457
|
+
children
|
|
458
|
+
}, undefined, false, undefined, this)
|
|
459
|
+
}, undefined, false, undefined, this)
|
|
460
|
+
]
|
|
461
|
+
}, undefined, true, undefined, this);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// src/polly-ui/Select.module.css
|
|
465
|
+
var Select_module_default = {
|
|
466
|
+
select: "select_daofbw",
|
|
467
|
+
label: "label_daofbw",
|
|
468
|
+
trigger: "trigger_daofbw",
|
|
469
|
+
placeholder: "placeholder_daofbw",
|
|
470
|
+
actions: "actions_daofbw",
|
|
471
|
+
actionBtn: "actionBtn_daofbw",
|
|
472
|
+
option: "option_daofbw",
|
|
473
|
+
optionSelected: "optionSelected_daofbw",
|
|
474
|
+
optionCheck: "optionCheck_daofbw"
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
// src/polly-ui/ActionSelect.tsx
|
|
408
478
|
import { jsxDEV as jsxDEV4 } from "preact/jsx-dev-runtime";
|
|
479
|
+
function labelFor(options, value) {
|
|
480
|
+
for (const opt of options) {
|
|
481
|
+
if (opt.value === value)
|
|
482
|
+
return opt.label;
|
|
483
|
+
}
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
function ActionSelect(props) {
|
|
487
|
+
const {
|
|
488
|
+
value,
|
|
489
|
+
options,
|
|
490
|
+
action,
|
|
491
|
+
actionData,
|
|
492
|
+
label,
|
|
493
|
+
placeholder = "Select…",
|
|
494
|
+
disabled = false,
|
|
495
|
+
className,
|
|
496
|
+
id
|
|
497
|
+
} = props;
|
|
498
|
+
const isOpen = useSignal(false);
|
|
499
|
+
const current = labelFor(options, value);
|
|
500
|
+
const isEmpty = current === undefined;
|
|
501
|
+
const displayText = current ?? placeholder;
|
|
502
|
+
const commit = (next) => {
|
|
503
|
+
isOpen.value = false;
|
|
504
|
+
if (next === value)
|
|
505
|
+
return;
|
|
506
|
+
dispatchAction(action, { ...actionData ?? {}, value: next });
|
|
507
|
+
};
|
|
508
|
+
const triggerClass = isEmpty ? `${Select_module_default["trigger"]} ${Select_module_default["placeholder"]}` : Select_module_default["trigger"];
|
|
509
|
+
const parts = [Select_module_default["select"] ?? ""];
|
|
510
|
+
if (className)
|
|
511
|
+
parts.push(className);
|
|
512
|
+
return /* @__PURE__ */ jsxDEV4("div", {
|
|
513
|
+
id,
|
|
514
|
+
class: parts.filter(Boolean).join(" "),
|
|
515
|
+
"data-polly-ui": true,
|
|
516
|
+
"data-polly-action-select": true,
|
|
517
|
+
"data-state": isEmpty ? "empty" : "filled",
|
|
518
|
+
children: [
|
|
519
|
+
label !== undefined && /* @__PURE__ */ jsxDEV4("span", {
|
|
520
|
+
class: Select_module_default["label"],
|
|
521
|
+
children: label
|
|
522
|
+
}, undefined, false, undefined, this),
|
|
523
|
+
disabled ? /* @__PURE__ */ jsxDEV4("span", {
|
|
524
|
+
class: triggerClass,
|
|
525
|
+
"aria-disabled": "true",
|
|
526
|
+
children: displayText
|
|
527
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV4(Dropdown, {
|
|
528
|
+
isOpen,
|
|
529
|
+
trigger: /* @__PURE__ */ jsxDEV4("span", {
|
|
530
|
+
class: triggerClass,
|
|
531
|
+
children: displayText
|
|
532
|
+
}, undefined, false, undefined, this),
|
|
533
|
+
children: options.map((opt) => {
|
|
534
|
+
const isSelected = opt.value === value;
|
|
535
|
+
const optClass = isSelected ? `${Select_module_default["option"]} ${Select_module_default["optionSelected"]}` : Select_module_default["option"];
|
|
536
|
+
return /* @__PURE__ */ jsxDEV4("button", {
|
|
537
|
+
type: "button",
|
|
538
|
+
role: "option",
|
|
539
|
+
class: optClass,
|
|
540
|
+
"aria-selected": isSelected ? "true" : "false",
|
|
541
|
+
onClick: () => commit(opt.value),
|
|
542
|
+
children: /* @__PURE__ */ jsxDEV4("span", {
|
|
543
|
+
children: opt.label
|
|
544
|
+
}, undefined, false, undefined, this)
|
|
545
|
+
}, opt.value, false, undefined, this);
|
|
546
|
+
})
|
|
547
|
+
}, undefined, false, undefined, this)
|
|
548
|
+
]
|
|
549
|
+
}, undefined, true, undefined, this);
|
|
550
|
+
}
|
|
551
|
+
// src/polly-ui/Badge.module.css
|
|
552
|
+
var Badge_module_default = {
|
|
553
|
+
badge: "badge_cZd0Aw",
|
|
554
|
+
info: "info_cZd0Aw",
|
|
555
|
+
success: "success_cZd0Aw",
|
|
556
|
+
warning: "warning_cZd0Aw",
|
|
557
|
+
danger: "danger_cZd0Aw"
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
// src/polly-ui/Badge.tsx
|
|
561
|
+
import { jsxDEV as jsxDEV5 } from "preact/jsx-dev-runtime";
|
|
562
|
+
function variantClass(variant) {
|
|
563
|
+
if (variant === "info")
|
|
564
|
+
return Badge_module_default["info"];
|
|
565
|
+
if (variant === "success")
|
|
566
|
+
return Badge_module_default["success"];
|
|
567
|
+
if (variant === "warning")
|
|
568
|
+
return Badge_module_default["warning"];
|
|
569
|
+
if (variant === "danger")
|
|
570
|
+
return Badge_module_default["danger"];
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
function Badge(props) {
|
|
574
|
+
const { children, variant = "default", className, id } = props;
|
|
575
|
+
const parts = [Badge_module_default["badge"]];
|
|
576
|
+
const v = variantClass(variant);
|
|
577
|
+
if (v)
|
|
578
|
+
parts.push(v);
|
|
579
|
+
if (className)
|
|
580
|
+
parts.push(className);
|
|
581
|
+
return /* @__PURE__ */ jsxDEV5("span", {
|
|
582
|
+
id,
|
|
583
|
+
class: parts.join(" "),
|
|
584
|
+
"data-polly-ui": true,
|
|
585
|
+
"data-polly-badge": variant,
|
|
586
|
+
children
|
|
587
|
+
}, undefined, false, undefined, this);
|
|
588
|
+
}
|
|
589
|
+
// src/polly-ui/Button.module.css
|
|
590
|
+
var Button_module_default = {
|
|
591
|
+
btn: "btn_c4HKfA",
|
|
592
|
+
tierPrimary: "tierPrimary_c4HKfA",
|
|
593
|
+
tierSecondary: "tierSecondary_c4HKfA",
|
|
594
|
+
tierTertiary: "tierTertiary_c4HKfA",
|
|
595
|
+
colorInfo: "colorInfo_c4HKfA",
|
|
596
|
+
colorSuccess: "colorSuccess_c4HKfA",
|
|
597
|
+
colorWarning: "colorWarning_c4HKfA",
|
|
598
|
+
colorDanger: "colorDanger_c4HKfA",
|
|
599
|
+
btnSmall: "btnSmall_c4HKfA",
|
|
600
|
+
btnLarge: "btnLarge_c4HKfA",
|
|
601
|
+
btnCircle: "btnCircle_c4HKfA",
|
|
602
|
+
btnFullWidth: "btnFullWidth_c4HKfA"
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
// src/polly-ui/Button.tsx
|
|
606
|
+
import { jsxDEV as jsxDEV6 } from "preact/jsx-dev-runtime";
|
|
409
607
|
function tierClass(tier) {
|
|
410
608
|
if (tier === "primary")
|
|
411
609
|
return Button_module_default["tierPrimary"];
|
|
@@ -462,14 +660,14 @@ function Button(props) {
|
|
|
462
660
|
if (className)
|
|
463
661
|
parts.push(className);
|
|
464
662
|
const buttonClass = parts.filter(Boolean).join(" ");
|
|
465
|
-
const content = icon ? /* @__PURE__ */
|
|
663
|
+
const content = icon ? /* @__PURE__ */ jsxDEV6(Layout, {
|
|
466
664
|
inline: true,
|
|
467
665
|
columns: "auto auto",
|
|
468
666
|
gap: "0.5em",
|
|
469
667
|
alignItems: "center",
|
|
470
668
|
children: [
|
|
471
669
|
icon,
|
|
472
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ jsxDEV6("span", {
|
|
473
671
|
children: label
|
|
474
672
|
}, undefined, false, undefined, this)
|
|
475
673
|
]
|
|
@@ -486,7 +684,7 @@ function Button(props) {
|
|
|
486
684
|
}
|
|
487
685
|
}
|
|
488
686
|
if ("href" in props && props.href) {
|
|
489
|
-
return /* @__PURE__ */
|
|
687
|
+
return /* @__PURE__ */ jsxDEV6("a", {
|
|
490
688
|
id,
|
|
491
689
|
class: buttonClass,
|
|
492
690
|
title,
|
|
@@ -503,7 +701,7 @@ function Button(props) {
|
|
|
503
701
|
}, undefined, false, undefined, this);
|
|
504
702
|
}
|
|
505
703
|
const resolvedType = "type" in props && props.type ? props.type : "button";
|
|
506
|
-
return /* @__PURE__ */
|
|
704
|
+
return /* @__PURE__ */ jsxDEV6("button", {
|
|
507
705
|
id,
|
|
508
706
|
class: buttonClass,
|
|
509
707
|
title,
|
|
@@ -715,10 +913,10 @@ function Surface(props) {
|
|
|
715
913
|
}
|
|
716
914
|
|
|
717
915
|
// src/polly-ui/Card.tsx
|
|
718
|
-
import { jsxDEV as
|
|
916
|
+
import { jsxDEV as jsxDEV7 } from "preact/jsx-dev-runtime";
|
|
719
917
|
function Root(props) {
|
|
720
918
|
const { variant = "raised", radius = "md", ...rest } = props;
|
|
721
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ jsxDEV7(Surface, {
|
|
722
920
|
variant,
|
|
723
921
|
radius,
|
|
724
922
|
"data-polly-card": true,
|
|
@@ -733,7 +931,7 @@ function Header(props) {
|
|
|
733
931
|
borderSides = "block-end",
|
|
734
932
|
...rest
|
|
735
933
|
} = props;
|
|
736
|
-
return /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ jsxDEV7(Surface, {
|
|
737
935
|
padding,
|
|
738
936
|
border,
|
|
739
937
|
borderSides,
|
|
@@ -744,7 +942,7 @@ function Header(props) {
|
|
|
744
942
|
}
|
|
745
943
|
function Body(props) {
|
|
746
944
|
const { padding = "var(--polly-space-lg)", ...rest } = props;
|
|
747
|
-
return /* @__PURE__ */
|
|
945
|
+
return /* @__PURE__ */ jsxDEV7(Surface, {
|
|
748
946
|
padding,
|
|
749
947
|
"data-polly-card-body": true,
|
|
750
948
|
...rest,
|
|
@@ -758,7 +956,7 @@ function Footer(props) {
|
|
|
758
956
|
borderSides = "block-start",
|
|
759
957
|
...rest
|
|
760
958
|
} = props;
|
|
761
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ jsxDEV7(Surface, {
|
|
762
960
|
padding,
|
|
763
961
|
border,
|
|
764
962
|
borderSides,
|
|
@@ -777,7 +975,7 @@ var Checkbox_module_default = {
|
|
|
777
975
|
};
|
|
778
976
|
|
|
779
977
|
// src/polly-ui/Checkbox.tsx
|
|
780
|
-
import { jsxDEV as
|
|
978
|
+
import { jsxDEV as jsxDEV8 } from "preact/jsx-dev-runtime";
|
|
781
979
|
function isSignal(value) {
|
|
782
980
|
return typeof value === "object" && value !== null && "value" in value && "peek" in value;
|
|
783
981
|
}
|
|
@@ -794,12 +992,12 @@ function Checkbox(props) {
|
|
|
794
992
|
parts.push(Checkbox_module_default["disabled"] ?? "");
|
|
795
993
|
if (className)
|
|
796
994
|
parts.push(className);
|
|
797
|
-
return /* @__PURE__ */
|
|
995
|
+
return /* @__PURE__ */ jsxDEV8("label", {
|
|
798
996
|
class: parts.filter(Boolean).join(" "),
|
|
799
997
|
"data-polly-ui": true,
|
|
800
998
|
"data-polly-checkbox": true,
|
|
801
999
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ jsxDEV8("input", {
|
|
803
1001
|
id,
|
|
804
1002
|
type: "checkbox",
|
|
805
1003
|
class: Checkbox_module_default["input"],
|
|
@@ -809,13 +1007,84 @@ function Checkbox(props) {
|
|
|
809
1007
|
disabled,
|
|
810
1008
|
onChange: handleChange
|
|
811
1009
|
}, undefined, false, undefined, this),
|
|
812
|
-
label !== undefined && /* @__PURE__ */
|
|
1010
|
+
label !== undefined && /* @__PURE__ */ jsxDEV8("span", {
|
|
813
1011
|
class: Checkbox_module_default["label"],
|
|
814
1012
|
children: label
|
|
815
1013
|
}, undefined, false, undefined, this)
|
|
816
1014
|
]
|
|
817
1015
|
}, undefined, true, undefined, this);
|
|
818
1016
|
}
|
|
1017
|
+
// src/polly-ui/Cluster.tsx
|
|
1018
|
+
import { createElement as createElement3 } from "preact";
|
|
1019
|
+
|
|
1020
|
+
// src/polly-ui/Cluster.module.css
|
|
1021
|
+
var Cluster_module_default = {
|
|
1022
|
+
cluster: "cluster_pNLz5g",
|
|
1023
|
+
inline: "inline_pNLz5g"
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
// src/polly-ui/Cluster.tsx
|
|
1027
|
+
function Cluster(props) {
|
|
1028
|
+
const { children, as = "div", gap, padding, justify, align, inline, className, id, role } = props;
|
|
1029
|
+
const style = {};
|
|
1030
|
+
if (gap)
|
|
1031
|
+
style["--c-gap"] = gap;
|
|
1032
|
+
if (padding)
|
|
1033
|
+
style["--c-p"] = padding;
|
|
1034
|
+
if (justify)
|
|
1035
|
+
style["--c-jc"] = justify;
|
|
1036
|
+
if (align)
|
|
1037
|
+
style["--c-ai"] = align;
|
|
1038
|
+
const parts = [Cluster_module_default["cluster"]];
|
|
1039
|
+
if (inline)
|
|
1040
|
+
parts.push(Cluster_module_default["inline"]);
|
|
1041
|
+
if (className)
|
|
1042
|
+
parts.push(className);
|
|
1043
|
+
return createElement3(as, {
|
|
1044
|
+
id,
|
|
1045
|
+
class: parts.filter(Boolean).join(" "),
|
|
1046
|
+
style,
|
|
1047
|
+
role,
|
|
1048
|
+
"aria-label": props["aria-label"],
|
|
1049
|
+
"data-polly-ui": true,
|
|
1050
|
+
"data-polly-cluster": true
|
|
1051
|
+
}, children);
|
|
1052
|
+
}
|
|
1053
|
+
// src/polly-ui/Code.module.css
|
|
1054
|
+
var Code_module_default = {
|
|
1055
|
+
code: "code_Vc8yiw",
|
|
1056
|
+
block: "block_Vc8yiw"
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
// src/polly-ui/Code.tsx
|
|
1060
|
+
import { jsxDEV as jsxDEV9 } from "preact/jsx-dev-runtime";
|
|
1061
|
+
function Code(props) {
|
|
1062
|
+
const { children, block, className, id } = props;
|
|
1063
|
+
if (block) {
|
|
1064
|
+
const parts2 = [Code_module_default["block"]];
|
|
1065
|
+
if (className)
|
|
1066
|
+
parts2.push(className);
|
|
1067
|
+
return /* @__PURE__ */ jsxDEV9("pre", {
|
|
1068
|
+
id,
|
|
1069
|
+
class: parts2.filter(Boolean).join(" "),
|
|
1070
|
+
"data-polly-ui": true,
|
|
1071
|
+
"data-polly-code": "block",
|
|
1072
|
+
children: /* @__PURE__ */ jsxDEV9("code", {
|
|
1073
|
+
children
|
|
1074
|
+
}, undefined, false, undefined, this)
|
|
1075
|
+
}, undefined, false, undefined, this);
|
|
1076
|
+
}
|
|
1077
|
+
const parts = [Code_module_default["code"]];
|
|
1078
|
+
if (className)
|
|
1079
|
+
parts.push(className);
|
|
1080
|
+
return /* @__PURE__ */ jsxDEV9("code", {
|
|
1081
|
+
id,
|
|
1082
|
+
class: parts.filter(Boolean).join(" "),
|
|
1083
|
+
"data-polly-ui": true,
|
|
1084
|
+
"data-polly-code": "inline",
|
|
1085
|
+
children
|
|
1086
|
+
}, undefined, false, undefined, this);
|
|
1087
|
+
}
|
|
819
1088
|
// src/polly-ui/Collapsible.module.css
|
|
820
1089
|
var Collapsible_module_default = {
|
|
821
1090
|
collapsible: "collapsible_sEhnPw",
|
|
@@ -824,24 +1093,24 @@ var Collapsible_module_default = {
|
|
|
824
1093
|
};
|
|
825
1094
|
|
|
826
1095
|
// src/polly-ui/Collapsible.tsx
|
|
827
|
-
import { jsxDEV as
|
|
1096
|
+
import { jsxDEV as jsxDEV10 } from "preact/jsx-dev-runtime";
|
|
828
1097
|
function Collapsible(props) {
|
|
829
1098
|
const { summary, children, defaultOpen = false, className, id } = props;
|
|
830
1099
|
const parts = [Collapsible_module_default["collapsible"]];
|
|
831
1100
|
if (className)
|
|
832
1101
|
parts.push(className);
|
|
833
|
-
return /* @__PURE__ */
|
|
1102
|
+
return /* @__PURE__ */ jsxDEV10("details", {
|
|
834
1103
|
id,
|
|
835
1104
|
class: parts.join(" "),
|
|
836
1105
|
open: defaultOpen,
|
|
837
1106
|
"data-polly-ui": true,
|
|
838
1107
|
"data-polly-collapsible": true,
|
|
839
1108
|
children: [
|
|
840
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ jsxDEV10("summary", {
|
|
841
1110
|
class: Collapsible_module_default["summary"],
|
|
842
1111
|
children: summary
|
|
843
1112
|
}, undefined, false, undefined, this),
|
|
844
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ jsxDEV10("div", {
|
|
845
1114
|
class: Collapsible_module_default["content"],
|
|
846
1115
|
children
|
|
847
1116
|
}, undefined, false, undefined, this)
|
|
@@ -862,7 +1131,7 @@ var ConfirmDialog_module_default = {
|
|
|
862
1131
|
// src/polly-ui/Modal.tsx
|
|
863
1132
|
import { createContext } from "preact";
|
|
864
1133
|
import { createPortal } from "preact/compat";
|
|
865
|
-
import { useContext, useEffect as
|
|
1134
|
+
import { useContext, useEffect as useEffect4, useId, useRef as useRef4, useState as useState2 } from "preact/hooks";
|
|
866
1135
|
|
|
867
1136
|
// src/actions/overlay.ts
|
|
868
1137
|
import { signal } from "@preact/signals";
|
|
@@ -978,7 +1247,7 @@ var Modal_module_default = {
|
|
|
978
1247
|
|
|
979
1248
|
// src/polly-ui/OverlayRoot.tsx
|
|
980
1249
|
import { effect } from "@preact/signals";
|
|
981
|
-
import { useEffect as
|
|
1250
|
+
import { useEffect as useEffect3, useRef as useRef3 } from "preact/hooks";
|
|
982
1251
|
|
|
983
1252
|
// src/polly-ui/internal/scroll-lock.ts
|
|
984
1253
|
var count = 0;
|
|
@@ -1011,10 +1280,10 @@ var OverlayRoot_module_default = {
|
|
|
1011
1280
|
};
|
|
1012
1281
|
|
|
1013
1282
|
// src/polly-ui/OverlayRoot.tsx
|
|
1014
|
-
import { jsxDEV as
|
|
1283
|
+
import { jsxDEV as jsxDEV11 } from "preact/jsx-dev-runtime";
|
|
1015
1284
|
function OverlayRoot() {
|
|
1016
|
-
const ref =
|
|
1017
|
-
|
|
1285
|
+
const ref = useRef3(null);
|
|
1286
|
+
useEffect3(() => {
|
|
1018
1287
|
let release = null;
|
|
1019
1288
|
const dispose = effect(() => {
|
|
1020
1289
|
if (hasOpenOverlay()) {
|
|
@@ -1030,7 +1299,7 @@ function OverlayRoot() {
|
|
|
1030
1299
|
release?.();
|
|
1031
1300
|
};
|
|
1032
1301
|
}, []);
|
|
1033
|
-
return /* @__PURE__ */
|
|
1302
|
+
return /* @__PURE__ */ jsxDEV11("div", {
|
|
1034
1303
|
ref,
|
|
1035
1304
|
class: OverlayRoot_module_default["root"],
|
|
1036
1305
|
"data-polly-ui": true,
|
|
@@ -1042,7 +1311,7 @@ function getOverlayRootNode() {
|
|
|
1042
1311
|
}
|
|
1043
1312
|
|
|
1044
1313
|
// src/polly-ui/Modal.tsx
|
|
1045
|
-
import { jsxDEV as
|
|
1314
|
+
import { jsxDEV as jsxDEV12 } from "preact/jsx-dev-runtime";
|
|
1046
1315
|
var Ctx = createContext(null);
|
|
1047
1316
|
function useModal() {
|
|
1048
1317
|
const ctx = useContext(Ctx);
|
|
@@ -1054,17 +1323,17 @@ function Root2({ when, onClose, children, "aria-label": ariaLabel }) {
|
|
|
1054
1323
|
const id = useId();
|
|
1055
1324
|
const titleId = `${id}-title`;
|
|
1056
1325
|
const descId = `${id}-desc`;
|
|
1057
|
-
const mountRef =
|
|
1326
|
+
const mountRef = useRef4(null);
|
|
1058
1327
|
const [portalNode, setPortalNode] = useState2(null);
|
|
1059
1328
|
const isOpen = typeof when === "boolean" ? when : when.value;
|
|
1060
|
-
|
|
1329
|
+
useEffect4(() => {
|
|
1061
1330
|
if (!isOpen) {
|
|
1062
1331
|
setPortalNode(null);
|
|
1063
1332
|
return;
|
|
1064
1333
|
}
|
|
1065
1334
|
setPortalNode(getOverlayRootNode());
|
|
1066
1335
|
}, [isOpen]);
|
|
1067
|
-
|
|
1336
|
+
useEffect4(() => {
|
|
1068
1337
|
if (!isOpen || !portalNode)
|
|
1069
1338
|
return;
|
|
1070
1339
|
const entry = { id, onClose };
|
|
@@ -1082,9 +1351,9 @@ function Root2({ when, onClose, children, "aria-label": ariaLabel }) {
|
|
|
1082
1351
|
onClose?.();
|
|
1083
1352
|
};
|
|
1084
1353
|
const ctx = { id, titleId, descId, close };
|
|
1085
|
-
const content = /* @__PURE__ */
|
|
1354
|
+
const content = /* @__PURE__ */ jsxDEV12(Ctx.Provider, {
|
|
1086
1355
|
value: ctx,
|
|
1087
|
-
children: /* @__PURE__ */
|
|
1356
|
+
children: /* @__PURE__ */ jsxDEV12("div", {
|
|
1088
1357
|
ref: mountRef,
|
|
1089
1358
|
class: Modal_module_default["container"],
|
|
1090
1359
|
"data-polly-ui": true,
|
|
@@ -1103,7 +1372,7 @@ function Root2({ when, onClose, children, "aria-label": ariaLabel }) {
|
|
|
1103
1372
|
}
|
|
1104
1373
|
function Backdrop() {
|
|
1105
1374
|
const { close } = useModal();
|
|
1106
|
-
return /* @__PURE__ */
|
|
1375
|
+
return /* @__PURE__ */ jsxDEV12("div", {
|
|
1107
1376
|
class: Modal_module_default["backdrop"],
|
|
1108
1377
|
"data-polly-modal-backdrop": true,
|
|
1109
1378
|
onClick: close,
|
|
@@ -1112,7 +1381,7 @@ function Backdrop() {
|
|
|
1112
1381
|
}
|
|
1113
1382
|
function Content({ children, className, style }) {
|
|
1114
1383
|
const cls = className ? `${Modal_module_default["surface"]} ${className}` : Modal_module_default["surface"];
|
|
1115
|
-
return /* @__PURE__ */
|
|
1384
|
+
return /* @__PURE__ */ jsxDEV12(Surface, {
|
|
1116
1385
|
variant: "raised",
|
|
1117
1386
|
radius: "lg",
|
|
1118
1387
|
shadow: "lg",
|
|
@@ -1124,7 +1393,7 @@ function Content({ children, className, style }) {
|
|
|
1124
1393
|
}, undefined, false, undefined, this);
|
|
1125
1394
|
}
|
|
1126
1395
|
function Header2({ children }) {
|
|
1127
|
-
return /* @__PURE__ */
|
|
1396
|
+
return /* @__PURE__ */ jsxDEV12("header", {
|
|
1128
1397
|
class: Modal_module_default["header"],
|
|
1129
1398
|
"data-polly-modal-header": true,
|
|
1130
1399
|
children
|
|
@@ -1132,7 +1401,7 @@ function Header2({ children }) {
|
|
|
1132
1401
|
}
|
|
1133
1402
|
function Title({ children }) {
|
|
1134
1403
|
const { titleId } = useModal();
|
|
1135
|
-
return /* @__PURE__ */
|
|
1404
|
+
return /* @__PURE__ */ jsxDEV12("h2", {
|
|
1136
1405
|
id: titleId,
|
|
1137
1406
|
class: Modal_module_default["title"],
|
|
1138
1407
|
"data-polly-modal-title": true,
|
|
@@ -1141,7 +1410,7 @@ function Title({ children }) {
|
|
|
1141
1410
|
}
|
|
1142
1411
|
function Body2({ children }) {
|
|
1143
1412
|
const { descId } = useModal();
|
|
1144
|
-
return /* @__PURE__ */
|
|
1413
|
+
return /* @__PURE__ */ jsxDEV12("div", {
|
|
1145
1414
|
id: descId,
|
|
1146
1415
|
class: Modal_module_default["body"],
|
|
1147
1416
|
"data-polly-modal-body": true,
|
|
@@ -1149,7 +1418,7 @@ function Body2({ children }) {
|
|
|
1149
1418
|
}, undefined, false, undefined, this);
|
|
1150
1419
|
}
|
|
1151
1420
|
function Footer2({ children }) {
|
|
1152
|
-
return /* @__PURE__ */
|
|
1421
|
+
return /* @__PURE__ */ jsxDEV12("footer", {
|
|
1153
1422
|
class: Modal_module_default["footer"],
|
|
1154
1423
|
"data-polly-modal-footer": true,
|
|
1155
1424
|
children
|
|
@@ -1158,7 +1427,7 @@ function Footer2({ children }) {
|
|
|
1158
1427
|
function Close({ children, action }) {
|
|
1159
1428
|
const { close } = useModal();
|
|
1160
1429
|
if (action) {
|
|
1161
|
-
return /* @__PURE__ */
|
|
1430
|
+
return /* @__PURE__ */ jsxDEV12("button", {
|
|
1162
1431
|
type: "button",
|
|
1163
1432
|
class: Modal_module_default["close"],
|
|
1164
1433
|
"data-polly-ui": true,
|
|
@@ -1168,7 +1437,7 @@ function Close({ children, action }) {
|
|
|
1168
1437
|
children
|
|
1169
1438
|
}, undefined, false, undefined, this);
|
|
1170
1439
|
}
|
|
1171
|
-
return /* @__PURE__ */
|
|
1440
|
+
return /* @__PURE__ */ jsxDEV12("button", {
|
|
1172
1441
|
type: "button",
|
|
1173
1442
|
class: Modal_module_default["close"],
|
|
1174
1443
|
"data-polly-ui": true,
|
|
@@ -1190,7 +1459,7 @@ var Modal = {
|
|
|
1190
1459
|
};
|
|
1191
1460
|
|
|
1192
1461
|
// src/polly-ui/ConfirmDialog.tsx
|
|
1193
|
-
import { jsxDEV as
|
|
1462
|
+
import { jsxDEV as jsxDEV13 } from "preact/jsx-dev-runtime";
|
|
1194
1463
|
var pending = signal2(null);
|
|
1195
1464
|
var isOpen = signal2(false);
|
|
1196
1465
|
var nextId = 0;
|
|
@@ -1221,27 +1490,27 @@ function Host() {
|
|
|
1221
1490
|
const current = pending.value;
|
|
1222
1491
|
if (!current)
|
|
1223
1492
|
return null;
|
|
1224
|
-
return /* @__PURE__ */
|
|
1493
|
+
return /* @__PURE__ */ jsxDEV13(Modal.Root, {
|
|
1225
1494
|
when: isOpen,
|
|
1226
1495
|
onClose: () => close(false),
|
|
1227
1496
|
children: [
|
|
1228
|
-
/* @__PURE__ */
|
|
1229
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ jsxDEV13(Modal.Backdrop, {}, undefined, false, undefined, this),
|
|
1498
|
+
/* @__PURE__ */ jsxDEV13(Modal.Content, {
|
|
1230
1499
|
children: [
|
|
1231
|
-
/* @__PURE__ */
|
|
1232
|
-
children: /* @__PURE__ */
|
|
1500
|
+
/* @__PURE__ */ jsxDEV13(Modal.Header, {
|
|
1501
|
+
children: /* @__PURE__ */ jsxDEV13(Modal.Title, {
|
|
1233
1502
|
children: current.title
|
|
1234
1503
|
}, undefined, false, undefined, this)
|
|
1235
1504
|
}, undefined, false, undefined, this),
|
|
1236
|
-
current.body ? /* @__PURE__ */
|
|
1505
|
+
current.body ? /* @__PURE__ */ jsxDEV13(Modal.Body, {
|
|
1237
1506
|
children: current.body
|
|
1238
1507
|
}, undefined, false, undefined, this) : null,
|
|
1239
|
-
/* @__PURE__ */
|
|
1240
|
-
children: /* @__PURE__ */
|
|
1508
|
+
/* @__PURE__ */ jsxDEV13(Modal.Footer, {
|
|
1509
|
+
children: /* @__PURE__ */ jsxDEV13("div", {
|
|
1241
1510
|
class: ConfirmDialog_module_default["actions"],
|
|
1242
1511
|
"data-polly-confirm-actions": true,
|
|
1243
1512
|
children: [
|
|
1244
|
-
/* @__PURE__ */
|
|
1513
|
+
/* @__PURE__ */ jsxDEV13("button", {
|
|
1245
1514
|
type: "button",
|
|
1246
1515
|
class: ConfirmDialog_module_default["cancel"],
|
|
1247
1516
|
"data-polly-ui": true,
|
|
@@ -1250,7 +1519,7 @@ function Host() {
|
|
|
1250
1519
|
onClick: () => close(false),
|
|
1251
1520
|
children: current.cancelLabel ?? "Cancel"
|
|
1252
1521
|
}, undefined, false, undefined, this),
|
|
1253
|
-
/* @__PURE__ */
|
|
1522
|
+
/* @__PURE__ */ jsxDEV13("button", {
|
|
1254
1523
|
type: "button",
|
|
1255
1524
|
class: current.danger ? ConfirmDialog_module_default["confirmDanger"] : ConfirmDialog_module_default["confirm"],
|
|
1256
1525
|
"data-polly-ui": true,
|
|
@@ -1268,124 +1537,9 @@ function Host() {
|
|
|
1268
1537
|
}, undefined, true, undefined, this);
|
|
1269
1538
|
}
|
|
1270
1539
|
var ConfirmDialog = { Host, confirm };
|
|
1271
|
-
// src/polly-ui/Dropdown.tsx
|
|
1272
|
-
import { useSignalEffect } from "@preact/signals";
|
|
1273
|
-
import { useEffect as useEffect4, useRef as useRef4 } from "preact/hooks";
|
|
1274
|
-
|
|
1275
|
-
// src/polly-ui/Dropdown.module.css
|
|
1276
|
-
var Dropdown_module_default = {
|
|
1277
|
-
dropdown: "dropdown_HX48zA",
|
|
1278
|
-
trigger: "trigger_HX48zA",
|
|
1279
|
-
menu: "menu_HX48zA",
|
|
1280
|
-
alignRight: "alignRight_HX48zA"
|
|
1281
|
-
};
|
|
1282
|
-
|
|
1283
|
-
// src/polly-ui/Dropdown.tsx
|
|
1284
|
-
import { jsxDEV as jsxDEV11 } from "preact/jsx-dev-runtime";
|
|
1285
|
-
var dropdownCounter = 0;
|
|
1286
|
-
function Dropdown(props) {
|
|
1287
|
-
const { isOpen: isOpen2, trigger, children, align = "left", multiSelect = false, className, id } = props;
|
|
1288
|
-
const menuRef = useRef4(null);
|
|
1289
|
-
const triggerRef = useRef4(null);
|
|
1290
|
-
const idRef = useRef4(`polly-dropdown-${++dropdownCounter}`);
|
|
1291
|
-
const popoverId = idRef.current;
|
|
1292
|
-
useEffect4(() => {
|
|
1293
|
-
triggerRef.current?.setAttribute("popovertarget", popoverId);
|
|
1294
|
-
}, [popoverId]);
|
|
1295
|
-
useEffect4(() => {
|
|
1296
|
-
const menu = menuRef.current;
|
|
1297
|
-
if (!menu)
|
|
1298
|
-
return;
|
|
1299
|
-
const onOverlayClose = (e) => {
|
|
1300
|
-
if (e instanceof CustomEvent && e.detail?.id === popoverId) {
|
|
1301
|
-
isOpen2.value = false;
|
|
1302
|
-
}
|
|
1303
|
-
};
|
|
1304
|
-
menu.addEventListener("overlay:close", onOverlayClose);
|
|
1305
|
-
return () => {
|
|
1306
|
-
menu.removeEventListener("overlay:close", onOverlayClose);
|
|
1307
|
-
};
|
|
1308
|
-
}, [popoverId, isOpen2]);
|
|
1309
|
-
useSignalEffect(() => {
|
|
1310
|
-
const menu = menuRef.current;
|
|
1311
|
-
if (!menu)
|
|
1312
|
-
return;
|
|
1313
|
-
if (isOpen2.value && !menu.matches(":popover-open")) {
|
|
1314
|
-
menu.showPopover();
|
|
1315
|
-
} else if (!isOpen2.value && menu.matches(":popover-open")) {
|
|
1316
|
-
menu.hidePopover();
|
|
1317
|
-
}
|
|
1318
|
-
});
|
|
1319
|
-
const handleToggle = (e) => {
|
|
1320
|
-
if ("newState" in e) {
|
|
1321
|
-
isOpen2.value = e.newState === "open";
|
|
1322
|
-
}
|
|
1323
|
-
};
|
|
1324
|
-
const handleMenuClick = () => {
|
|
1325
|
-
if (!multiSelect) {
|
|
1326
|
-
isOpen2.value = false;
|
|
1327
|
-
}
|
|
1328
|
-
};
|
|
1329
|
-
const handleKeyDown = (e) => {
|
|
1330
|
-
if (e.key === "Escape") {
|
|
1331
|
-
isOpen2.value = false;
|
|
1332
|
-
}
|
|
1333
|
-
};
|
|
1334
|
-
const parts = [Dropdown_module_default["dropdown"] ?? ""];
|
|
1335
|
-
if (className)
|
|
1336
|
-
parts.push(className);
|
|
1337
|
-
const menuParts = [Dropdown_module_default["menu"] ?? ""];
|
|
1338
|
-
if (align === "right")
|
|
1339
|
-
menuParts.push(Dropdown_module_default["alignRight"] ?? "");
|
|
1340
|
-
return /* @__PURE__ */ jsxDEV11("div", {
|
|
1341
|
-
id,
|
|
1342
|
-
class: parts.filter(Boolean).join(" "),
|
|
1343
|
-
"data-polly-ui": true,
|
|
1344
|
-
"data-polly-dropdown": true,
|
|
1345
|
-
children: [
|
|
1346
|
-
/* @__PURE__ */ jsxDEV11("button", {
|
|
1347
|
-
ref: triggerRef,
|
|
1348
|
-
type: "button",
|
|
1349
|
-
class: Dropdown_module_default["trigger"],
|
|
1350
|
-
children: trigger
|
|
1351
|
-
}, undefined, false, undefined, this),
|
|
1352
|
-
/* @__PURE__ */ jsxDEV11("div", {
|
|
1353
|
-
ref: menuRef,
|
|
1354
|
-
id: popoverId,
|
|
1355
|
-
role: "listbox",
|
|
1356
|
-
class: menuParts.filter(Boolean).join(" "),
|
|
1357
|
-
popover: "auto",
|
|
1358
|
-
"data-overlay-id": popoverId,
|
|
1359
|
-
onToggle: handleToggle,
|
|
1360
|
-
onClick: handleMenuClick,
|
|
1361
|
-
onKeyDown: handleKeyDown,
|
|
1362
|
-
children: /* @__PURE__ */ jsxDEV11(Layout, {
|
|
1363
|
-
rows: "auto",
|
|
1364
|
-
gap: "0",
|
|
1365
|
-
children
|
|
1366
|
-
}, undefined, false, undefined, this)
|
|
1367
|
-
}, undefined, false, undefined, this)
|
|
1368
|
-
]
|
|
1369
|
-
}, undefined, true, undefined, this);
|
|
1370
|
-
}
|
|
1371
1540
|
// src/polly-ui/Select.tsx
|
|
1372
|
-
import { useComputed, useSignal } from "@preact/signals";
|
|
1373
|
-
|
|
1374
|
-
// src/polly-ui/Select.module.css
|
|
1375
|
-
var Select_module_default = {
|
|
1376
|
-
select: "select_daofbw",
|
|
1377
|
-
label: "label_daofbw",
|
|
1378
|
-
trigger: "trigger_daofbw",
|
|
1379
|
-
placeholder: "placeholder_daofbw",
|
|
1380
|
-
actions: "actions_daofbw",
|
|
1381
|
-
actionBtn: "actionBtn_daofbw",
|
|
1382
|
-
option: "option_daofbw",
|
|
1383
|
-
optionSelected: "optionSelected_daofbw",
|
|
1384
|
-
optionCheck: "optionCheck_daofbw"
|
|
1385
|
-
};
|
|
1386
|
-
|
|
1387
|
-
// src/polly-ui/Select.tsx
|
|
1388
|
-
import { jsxDEV as jsxDEV12 } from "preact/jsx-dev-runtime";
|
|
1541
|
+
import { useComputed, useSignal as useSignal2 } from "@preact/signals";
|
|
1542
|
+
import { jsxDEV as jsxDEV14 } from "preact/jsx-dev-runtime";
|
|
1389
1543
|
function formatSelected(options, selected) {
|
|
1390
1544
|
if (selected.size === 0)
|
|
1391
1545
|
return "";
|
|
@@ -1407,7 +1561,7 @@ function Select(props) {
|
|
|
1407
1561
|
className,
|
|
1408
1562
|
id
|
|
1409
1563
|
} = props;
|
|
1410
|
-
const isOpen2 =
|
|
1564
|
+
const isOpen2 = useSignal2(false);
|
|
1411
1565
|
const displayText = useComputed(() => {
|
|
1412
1566
|
const text = formatSelected(options, selected.value);
|
|
1413
1567
|
return text.length > 0 ? text : placeholder;
|
|
@@ -1433,7 +1587,7 @@ function Select(props) {
|
|
|
1433
1587
|
selected.value = new Set;
|
|
1434
1588
|
};
|
|
1435
1589
|
const triggerClass = isEmpty.value ? `${Select_module_default["trigger"]} ${Select_module_default["placeholder"]}` : Select_module_default["trigger"];
|
|
1436
|
-
const triggerButton = /* @__PURE__ */
|
|
1590
|
+
const triggerButton = /* @__PURE__ */ jsxDEV14("button", {
|
|
1437
1591
|
type: "button",
|
|
1438
1592
|
class: triggerClass,
|
|
1439
1593
|
disabled,
|
|
@@ -1442,34 +1596,34 @@ function Select(props) {
|
|
|
1442
1596
|
const parts = [Select_module_default["select"] ?? ""];
|
|
1443
1597
|
if (className)
|
|
1444
1598
|
parts.push(className);
|
|
1445
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ jsxDEV14("div", {
|
|
1446
1600
|
id,
|
|
1447
1601
|
class: parts.filter(Boolean).join(" "),
|
|
1448
1602
|
"data-polly-ui": true,
|
|
1449
1603
|
"data-polly-select": true,
|
|
1450
1604
|
children: [
|
|
1451
|
-
label !== undefined && /* @__PURE__ */
|
|
1605
|
+
label !== undefined && /* @__PURE__ */ jsxDEV14("span", {
|
|
1452
1606
|
class: Select_module_default["label"],
|
|
1453
1607
|
children: label
|
|
1454
1608
|
}, undefined, false, undefined, this),
|
|
1455
|
-
/* @__PURE__ */
|
|
1609
|
+
/* @__PURE__ */ jsxDEV14(Dropdown, {
|
|
1456
1610
|
isOpen: isOpen2,
|
|
1457
1611
|
trigger: triggerButton,
|
|
1458
1612
|
multiSelect,
|
|
1459
1613
|
children: [
|
|
1460
|
-
multiSelect && /* @__PURE__ */
|
|
1614
|
+
multiSelect && /* @__PURE__ */ jsxDEV14("div", {
|
|
1461
1615
|
class: Select_module_default["actions"],
|
|
1462
|
-
children: /* @__PURE__ */
|
|
1616
|
+
children: /* @__PURE__ */ jsxDEV14(Layout, {
|
|
1463
1617
|
columns: "1fr 1fr",
|
|
1464
1618
|
gap: "var(--polly-space-xs)",
|
|
1465
1619
|
children: [
|
|
1466
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsxDEV14("button", {
|
|
1467
1621
|
type: "button",
|
|
1468
1622
|
class: Select_module_default["actionBtn"],
|
|
1469
1623
|
onClick: handleSelectAll,
|
|
1470
1624
|
children: "Select All"
|
|
1471
1625
|
}, undefined, false, undefined, this),
|
|
1472
|
-
/* @__PURE__ */
|
|
1626
|
+
/* @__PURE__ */ jsxDEV14("button", {
|
|
1473
1627
|
type: "button",
|
|
1474
1628
|
class: Select_module_default["actionBtn"],
|
|
1475
1629
|
onClick: handleClear,
|
|
@@ -1481,19 +1635,19 @@ function Select(props) {
|
|
|
1481
1635
|
options.map((opt) => {
|
|
1482
1636
|
const isSelected = selected.value.has(opt.value);
|
|
1483
1637
|
const optClass = isSelected ? `${Select_module_default["option"]} ${Select_module_default["optionSelected"]}` : Select_module_default["option"];
|
|
1484
|
-
return /* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ jsxDEV14("button", {
|
|
1485
1639
|
type: "button",
|
|
1486
1640
|
class: optClass,
|
|
1487
1641
|
onClick: () => handleOptionClick(opt.value),
|
|
1488
1642
|
children: [
|
|
1489
|
-
multiSelect && /* @__PURE__ */
|
|
1643
|
+
multiSelect && /* @__PURE__ */ jsxDEV14("input", {
|
|
1490
1644
|
type: "checkbox",
|
|
1491
1645
|
class: Select_module_default["optionCheck"],
|
|
1492
1646
|
checked: isSelected,
|
|
1493
1647
|
tabIndex: -1,
|
|
1494
1648
|
readOnly: true
|
|
1495
1649
|
}, undefined, false, undefined, this),
|
|
1496
|
-
/* @__PURE__ */
|
|
1650
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
1497
1651
|
children: opt.label
|
|
1498
1652
|
}, undefined, false, undefined, this)
|
|
1499
1653
|
]
|
|
@@ -1513,7 +1667,7 @@ var Skeleton_module_default = {
|
|
|
1513
1667
|
};
|
|
1514
1668
|
|
|
1515
1669
|
// src/polly-ui/Skeleton.tsx
|
|
1516
|
-
import { jsxDEV as
|
|
1670
|
+
import { jsxDEV as jsxDEV15 } from "preact/jsx-dev-runtime";
|
|
1517
1671
|
function resolveSize(value) {
|
|
1518
1672
|
if (value === undefined)
|
|
1519
1673
|
return;
|
|
@@ -1546,7 +1700,7 @@ function Skeleton(props) {
|
|
|
1546
1700
|
parts.push(vClass);
|
|
1547
1701
|
if (className)
|
|
1548
1702
|
parts.push(className);
|
|
1549
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ jsxDEV15("span", {
|
|
1550
1704
|
class: parts.join(" "),
|
|
1551
1705
|
style,
|
|
1552
1706
|
"data-polly-ui": true,
|
|
@@ -1562,26 +1716,26 @@ var Tabs_module_default = {
|
|
|
1562
1716
|
};
|
|
1563
1717
|
|
|
1564
1718
|
// src/polly-ui/Tabs.tsx
|
|
1565
|
-
import { jsxDEV as
|
|
1719
|
+
import { jsxDEV as jsxDEV16 } from "preact/jsx-dev-runtime";
|
|
1566
1720
|
function Tabs(props) {
|
|
1567
1721
|
const { tabs, activeTab, action, className, id } = props;
|
|
1568
1722
|
const parts = [Tabs_module_default["tabs"] ?? ""];
|
|
1569
1723
|
if (className)
|
|
1570
1724
|
parts.push(className);
|
|
1571
|
-
return /* @__PURE__ */
|
|
1725
|
+
return /* @__PURE__ */ jsxDEV16("nav", {
|
|
1572
1726
|
id,
|
|
1573
1727
|
class: parts.filter(Boolean).join(" "),
|
|
1574
1728
|
"aria-label": props["aria-label"],
|
|
1575
1729
|
"data-polly-ui": true,
|
|
1576
1730
|
"data-polly-tabs": true,
|
|
1577
|
-
children: /* @__PURE__ */
|
|
1731
|
+
children: /* @__PURE__ */ jsxDEV16(Layout, {
|
|
1578
1732
|
columns: `repeat(${tabs.length}, auto)`,
|
|
1579
1733
|
gap: "0",
|
|
1580
1734
|
alignItems: "end",
|
|
1581
1735
|
children: tabs.map((tab) => {
|
|
1582
1736
|
const isActive = activeTab === tab.id;
|
|
1583
1737
|
const tabClass = isActive ? `${Tabs_module_default["tab"]} ${Tabs_module_default["active"]}` : Tabs_module_default["tab"];
|
|
1584
|
-
return /* @__PURE__ */
|
|
1738
|
+
return /* @__PURE__ */ jsxDEV16("button", {
|
|
1585
1739
|
type: "button",
|
|
1586
1740
|
class: tabClass,
|
|
1587
1741
|
disabled: tab.disabled,
|
|
@@ -1594,6 +1748,44 @@ function Tabs(props) {
|
|
|
1594
1748
|
}, undefined, false, undefined, this)
|
|
1595
1749
|
}, undefined, false, undefined, this);
|
|
1596
1750
|
}
|
|
1751
|
+
// src/polly-ui/Text.tsx
|
|
1752
|
+
import { createElement as createElement4 } from "preact";
|
|
1753
|
+
|
|
1754
|
+
// src/polly-ui/Text.module.css
|
|
1755
|
+
var Text_module_default = {
|
|
1756
|
+
text: "text_75HKdQ",
|
|
1757
|
+
muted: "muted_75HKdQ",
|
|
1758
|
+
xs: "xs_75HKdQ",
|
|
1759
|
+
sm: "sm_75HKdQ",
|
|
1760
|
+
md: "md_75HKdQ",
|
|
1761
|
+
lg: "lg_75HKdQ",
|
|
1762
|
+
xl: "xl_75HKdQ",
|
|
1763
|
+
normal: "normal_75HKdQ",
|
|
1764
|
+
medium: "medium_75HKdQ",
|
|
1765
|
+
bold: "bold_75HKdQ"
|
|
1766
|
+
};
|
|
1767
|
+
|
|
1768
|
+
// src/polly-ui/Text.tsx
|
|
1769
|
+
function Text(props) {
|
|
1770
|
+
const { children, as = "span", tone = "default", size, weight, className, id } = props;
|
|
1771
|
+
const parts = [Text_module_default["text"]];
|
|
1772
|
+
if (tone === "muted")
|
|
1773
|
+
parts.push(Text_module_default["muted"]);
|
|
1774
|
+
if (size)
|
|
1775
|
+
parts.push(Text_module_default[size]);
|
|
1776
|
+
if (weight)
|
|
1777
|
+
parts.push(Text_module_default[weight]);
|
|
1778
|
+
if (className)
|
|
1779
|
+
parts.push(className);
|
|
1780
|
+
return createElement4(as, {
|
|
1781
|
+
id,
|
|
1782
|
+
class: parts.filter(Boolean).join(" "),
|
|
1783
|
+
for: props.htmlFor,
|
|
1784
|
+
"data-polly-ui": true,
|
|
1785
|
+
"data-polly-text": tone,
|
|
1786
|
+
"aria-hidden": props["aria-hidden"]
|
|
1787
|
+
}, children);
|
|
1788
|
+
}
|
|
1597
1789
|
// src/polly-ui/internal/input-base.ts
|
|
1598
1790
|
function buildInputA11y(props) {
|
|
1599
1791
|
const attrs = {
|
|
@@ -1619,7 +1811,7 @@ var TextInput_module_default = {
|
|
|
1619
1811
|
};
|
|
1620
1812
|
|
|
1621
1813
|
// src/polly-ui/TextInput.tsx
|
|
1622
|
-
import { jsxDEV as
|
|
1814
|
+
import { jsxDEV as jsxDEV17 } from "preact/jsx-dev-runtime";
|
|
1623
1815
|
function isSignal2(v) {
|
|
1624
1816
|
return typeof v === "object" && v !== null && "value" in v && "peek" in v;
|
|
1625
1817
|
}
|
|
@@ -1640,7 +1832,7 @@ function TextInput(props) {
|
|
|
1640
1832
|
const defaultValue = controlled ? undefined : props.value ?? "";
|
|
1641
1833
|
const className = props.className ? `${TextInput_module_default["input"]} ${props.className}` : TextInput_module_default["input"];
|
|
1642
1834
|
if (variant === "multi") {
|
|
1643
|
-
return /* @__PURE__ */
|
|
1835
|
+
return /* @__PURE__ */ jsxDEV17("textarea", {
|
|
1644
1836
|
...a11y,
|
|
1645
1837
|
class: className,
|
|
1646
1838
|
"data-polly-input-variant": "multi",
|
|
@@ -1655,7 +1847,7 @@ function TextInput(props) {
|
|
|
1655
1847
|
}
|
|
1656
1848
|
}, undefined, false, undefined, this);
|
|
1657
1849
|
}
|
|
1658
|
-
return /* @__PURE__ */
|
|
1850
|
+
return /* @__PURE__ */ jsxDEV17("input", {
|
|
1659
1851
|
...a11y,
|
|
1660
1852
|
type: "text",
|
|
1661
1853
|
class: className,
|
|
@@ -1714,7 +1906,7 @@ var Toast_module_default = {
|
|
|
1714
1906
|
};
|
|
1715
1907
|
|
|
1716
1908
|
// src/polly-ui/Toast.tsx
|
|
1717
|
-
import { jsxDEV as
|
|
1909
|
+
import { jsxDEV as jsxDEV18 } from "preact/jsx-dev-runtime";
|
|
1718
1910
|
function Viewport(props) {
|
|
1719
1911
|
const autoDismissMs = props.autoDismissMs ?? 5000;
|
|
1720
1912
|
const [portalNode, setPortalNode] = useState3(null);
|
|
@@ -1736,13 +1928,13 @@ function Viewport(props) {
|
|
|
1736
1928
|
}, [paused, entries, autoDismissMs]);
|
|
1737
1929
|
if (!portalNode)
|
|
1738
1930
|
return null;
|
|
1739
|
-
const content = /* @__PURE__ */
|
|
1931
|
+
const content = /* @__PURE__ */ jsxDEV18("div", {
|
|
1740
1932
|
class: `${Toast_module_default["viewport"]} ${props.className ?? ""}`.trim(),
|
|
1741
1933
|
"data-polly-ui": true,
|
|
1742
1934
|
"data-polly-toast-viewport": true,
|
|
1743
1935
|
onMouseEnter: () => setPaused(true),
|
|
1744
1936
|
onMouseLeave: () => setPaused(false),
|
|
1745
|
-
children: entries.map((entry) => /* @__PURE__ */
|
|
1937
|
+
children: entries.map((entry) => /* @__PURE__ */ jsxDEV18(ToastItem, {
|
|
1746
1938
|
entry
|
|
1747
1939
|
}, entry.id, false, undefined, this))
|
|
1748
1940
|
}, undefined, false, undefined, this);
|
|
@@ -1750,7 +1942,7 @@ function Viewport(props) {
|
|
|
1750
1942
|
}
|
|
1751
1943
|
function ToastItem({ entry }) {
|
|
1752
1944
|
const liveness = entry.severity === "error" ? "assertive" : "polite";
|
|
1753
|
-
return /* @__PURE__ */
|
|
1945
|
+
return /* @__PURE__ */ jsxDEV18(Surface, {
|
|
1754
1946
|
variant: "raised",
|
|
1755
1947
|
padding: "var(--polly-space-md) var(--polly-space-lg)",
|
|
1756
1948
|
className: Toast_module_default["item"],
|
|
@@ -1760,11 +1952,11 @@ function ToastItem({ entry }) {
|
|
|
1760
1952
|
role: entry.severity === "error" ? "alert" : "status",
|
|
1761
1953
|
"aria-live": liveness,
|
|
1762
1954
|
children: [
|
|
1763
|
-
/* @__PURE__ */
|
|
1955
|
+
/* @__PURE__ */ jsxDEV18("span", {
|
|
1764
1956
|
class: Toast_module_default["message"],
|
|
1765
1957
|
children: entry.message
|
|
1766
1958
|
}, undefined, false, undefined, this),
|
|
1767
|
-
/* @__PURE__ */
|
|
1959
|
+
/* @__PURE__ */ jsxDEV18("button", {
|
|
1768
1960
|
type: "button",
|
|
1769
1961
|
class: Toast_module_default["close"],
|
|
1770
1962
|
"data-polly-ui": true,
|
|
@@ -1791,7 +1983,7 @@ var Toggle_module_default = {
|
|
|
1791
1983
|
};
|
|
1792
1984
|
|
|
1793
1985
|
// src/polly-ui/Toggle.tsx
|
|
1794
|
-
import { jsxDEV as
|
|
1986
|
+
import { jsxDEV as jsxDEV19 } from "preact/jsx-dev-runtime";
|
|
1795
1987
|
function Toggle(props) {
|
|
1796
1988
|
const { checked = false, disabled = false, label, name, className, id } = props;
|
|
1797
1989
|
const parts = [Toggle_module_default["toggle"]];
|
|
@@ -1799,12 +1991,12 @@ function Toggle(props) {
|
|
|
1799
1991
|
parts.push(Toggle_module_default["disabled"]);
|
|
1800
1992
|
if (className)
|
|
1801
1993
|
parts.push(className);
|
|
1802
|
-
return /* @__PURE__ */
|
|
1994
|
+
return /* @__PURE__ */ jsxDEV19("label", {
|
|
1803
1995
|
class: parts.join(" "),
|
|
1804
1996
|
"data-polly-ui": true,
|
|
1805
1997
|
"data-polly-toggle": true,
|
|
1806
1998
|
children: [
|
|
1807
|
-
/* @__PURE__ */
|
|
1999
|
+
/* @__PURE__ */ jsxDEV19("input", {
|
|
1808
2000
|
id,
|
|
1809
2001
|
type: "checkbox",
|
|
1810
2002
|
role: "switch",
|
|
@@ -1814,13 +2006,13 @@ function Toggle(props) {
|
|
|
1814
2006
|
checked,
|
|
1815
2007
|
disabled
|
|
1816
2008
|
}, undefined, false, undefined, this),
|
|
1817
|
-
/* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ jsxDEV19("span", {
|
|
1818
2010
|
class: checked ? `${Toggle_module_default["track"]} ${Toggle_module_default["trackChecked"]}` : Toggle_module_default["track"],
|
|
1819
|
-
children: /* @__PURE__ */
|
|
2011
|
+
children: /* @__PURE__ */ jsxDEV19("span", {
|
|
1820
2012
|
class: checked ? `${Toggle_module_default["thumb"]} ${Toggle_module_default["thumbChecked"]}` : Toggle_module_default["thumb"]
|
|
1821
2013
|
}, undefined, false, undefined, this)
|
|
1822
2014
|
}, undefined, false, undefined, this),
|
|
1823
|
-
label !== undefined && /* @__PURE__ */
|
|
2015
|
+
label !== undefined && /* @__PURE__ */ jsxDEV19("span", {
|
|
1824
2016
|
class: Toggle_module_default["label"],
|
|
1825
2017
|
children: label
|
|
1826
2018
|
}, undefined, false, undefined, this)
|
|
@@ -1833,6 +2025,7 @@ export {
|
|
|
1833
2025
|
Toggle,
|
|
1834
2026
|
Toast,
|
|
1835
2027
|
TextInput,
|
|
2028
|
+
Text,
|
|
1836
2029
|
Tabs,
|
|
1837
2030
|
Surface,
|
|
1838
2031
|
Skeleton,
|
|
@@ -1843,12 +2036,15 @@ export {
|
|
|
1843
2036
|
Dropdown,
|
|
1844
2037
|
ConfirmDialog,
|
|
1845
2038
|
Collapsible,
|
|
2039
|
+
Code,
|
|
2040
|
+
Cluster,
|
|
1846
2041
|
Checkbox,
|
|
1847
2042
|
Card,
|
|
1848
2043
|
Button,
|
|
1849
2044
|
Badge,
|
|
2045
|
+
ActionSelect,
|
|
1850
2046
|
ActionInput,
|
|
1851
2047
|
ActionForm
|
|
1852
2048
|
};
|
|
1853
2049
|
|
|
1854
|
-
//# debugId=
|
|
2050
|
+
//# debugId=05E49C730A24E5F464756E2164756E21
|