rei-kit 0.18.1 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -16
- package/dist/{GoogleButton-DV_RIpJE.js → GoogleButton-dXOuBJwe.js} +2 -2
- package/dist/{GoogleButton-DV_RIpJE.js.map → GoogleButton-dXOuBJwe.js.map} +1 -1
- package/dist/app.js +2 -2
- package/dist/components/BaseAvatar.vue.d.ts +28 -0
- package/dist/components/BaseMenu.vue.d.ts +63 -0
- package/dist/components/BaseSpinner.vue.d.ts +20 -0
- package/dist/components/BaseSwitch.vue.d.ts +34 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +322 -18
- package/dist/index.js.map +1 -1
- package/dist/pwa.js +1 -1
- package/dist/styles.css +194 -16
- package/dist/web/BaseDisclosure.vue.d.ts +8 -2
- package/dist/web.js +2 -2
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as addDays, c as lastNDays, d as toDateKey, f as todayKey, i as needsIosInstall, l as leadingBlanks, n as isApplePortable, o as eachDayOfYear, r as isInstalled, s as fromDateKey, t as SettingsGroup_default, u as startOfWeek } from "./SettingsGroup-DtEB_Hrd.js";
|
|
2
|
-
import { _ as toRedirectPath, a as FormField_default, c as useVisualViewport, d as isThemePreference, f as readStoredTheme, g as safeRedirect, h as tapFeedback, i as BaseInput_default, l as useOnline, m as useTheme, n as BaseCheckbox_default, o as BaseAlert_default, p as setThemeStorageKey, r as BaseSheet_default, s as useToast, t as GoogleButton_default, u as applyTheme } from "./GoogleButton-
|
|
2
|
+
import { _ as toRedirectPath, a as FormField_default, c as useVisualViewport, d as isThemePreference, f as readStoredTheme, g as safeRedirect, h as tapFeedback, i as BaseInput_default, l as useOnline, m as useTheme, n as BaseCheckbox_default, o as BaseAlert_default, p as setThemeStorageKey, r as BaseSheet_default, s as useToast, t as GoogleButton_default, u as applyTheme } from "./GoogleButton-dXOuBJwe.js";
|
|
3
3
|
import { n as registerErrorMapper, r as toAppError, t as AppError } from "./app-error-DF9cijE0.js";
|
|
4
|
-
import { n as BaseButton_default, t as SettingsRow_default } from "./SettingsRow-3lPRJbBZ.js";
|
|
5
4
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
|
|
6
|
-
import {
|
|
5
|
+
import { n as BaseButton_default, t as SettingsRow_default } from "./SettingsRow-3lPRJbBZ.js";
|
|
6
|
+
import { Fragment, Teleport, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onErrorCaptured, onMounted, onScopeDispose, openBlock, readonly, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useId, useModel, vModelRadio, vModelSelect, vModelText, watch, watchEffect, withCtx, withDirectives } from "vue";
|
|
7
7
|
import { ArrowDown, ArrowRight, ArrowUp, CheckCircle2, ChevronDown, Info, TriangleAlert, X, XCircle } from "lucide-vue-next";
|
|
8
8
|
import { RouterLink } from "vue-router";
|
|
9
9
|
import { createI18n } from "vue-i18n";
|
|
@@ -331,6 +331,77 @@ function useMediaQuery(query) {
|
|
|
331
331
|
return matches;
|
|
332
332
|
}
|
|
333
333
|
//#endregion
|
|
334
|
+
//#region src/components/BaseAvatar.vue?vue&type=script&setup=true&lang.ts
|
|
335
|
+
var _hoisted_1$18 = [
|
|
336
|
+
"role",
|
|
337
|
+
"aria-label",
|
|
338
|
+
"aria-hidden"
|
|
339
|
+
];
|
|
340
|
+
var _hoisted_2$15 = ["src"];
|
|
341
|
+
var _hoisted_3$8 = {
|
|
342
|
+
key: 1,
|
|
343
|
+
class: "rk-avatar-initials"
|
|
344
|
+
};
|
|
345
|
+
var _hoisted_4$7 = {
|
|
346
|
+
key: 2,
|
|
347
|
+
viewBox: "0 0 20 20",
|
|
348
|
+
class: "rk-avatar-figure",
|
|
349
|
+
fill: "none",
|
|
350
|
+
stroke: "currentColor"
|
|
351
|
+
};
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/components/BaseAvatar.vue
|
|
354
|
+
var BaseAvatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
355
|
+
__name: "BaseAvatar",
|
|
356
|
+
props: {
|
|
357
|
+
name: { default: "" },
|
|
358
|
+
src: { default: "" },
|
|
359
|
+
size: { default: "md" },
|
|
360
|
+
fallback: { default: "figure" },
|
|
361
|
+
label: { default: "" }
|
|
362
|
+
},
|
|
363
|
+
setup(__props) {
|
|
364
|
+
const broken = ref(false);
|
|
365
|
+
watch(() => __props.src, () => broken.value = false);
|
|
366
|
+
const showImage = computed(() => Boolean(__props.src) && !broken.value);
|
|
367
|
+
/**
|
|
368
|
+
* Two letters at most, from the first and last word.
|
|
369
|
+
*
|
|
370
|
+
* `Array.from` rather than `slice`, so a name written in a script outside the
|
|
371
|
+
* basic plane is cut between characters rather than through one.
|
|
372
|
+
*/
|
|
373
|
+
const initials = computed(() => {
|
|
374
|
+
const words = __props.name.trim().split(/\s+/).filter(Boolean);
|
|
375
|
+
if (words.length === 0) return "";
|
|
376
|
+
return ((Array.from(words[0])[0] ?? "") + (words.length > 1 ? Array.from(words[words.length - 1])[0] ?? "" : "")).toUpperCase();
|
|
377
|
+
});
|
|
378
|
+
const accessibleName = computed(() => __props.label || __props.name);
|
|
379
|
+
return (_ctx, _cache) => {
|
|
380
|
+
return openBlock(), createElementBlock("span", {
|
|
381
|
+
class: normalizeClass(["rk-avatar", `is-${__props.size}`]),
|
|
382
|
+
role: accessibleName.value ? "img" : void 0,
|
|
383
|
+
"aria-label": accessibleName.value || void 0,
|
|
384
|
+
"aria-hidden": accessibleName.value ? void 0 : "true"
|
|
385
|
+
}, [showImage.value ? (openBlock(), createElementBlock("img", {
|
|
386
|
+
key: 0,
|
|
387
|
+
src: __props.src,
|
|
388
|
+
alt: "",
|
|
389
|
+
class: "rk-avatar-img",
|
|
390
|
+
onError: _cache[0] || (_cache[0] = ($event) => broken.value = true)
|
|
391
|
+
}, null, 40, _hoisted_2$15)) : __props.fallback === "initials" && initials.value ? (openBlock(), createElementBlock("span", _hoisted_3$8, toDisplayString(initials.value), 1)) : (openBlock(), createElementBlock("svg", _hoisted_4$7, [..._cache[1] || (_cache[1] = [createElementVNode("circle", {
|
|
392
|
+
cx: "10",
|
|
393
|
+
cy: "6.75",
|
|
394
|
+
r: "3.25",
|
|
395
|
+
"stroke-width": "1.5"
|
|
396
|
+
}, null, -1), createElementVNode("path", {
|
|
397
|
+
d: "M3.75 17c0-3.05 2.8-5.25 6.25-5.25S16.25 13.95 16.25 17",
|
|
398
|
+
"stroke-width": "1.5",
|
|
399
|
+
"stroke-linecap": "round"
|
|
400
|
+
}, null, -1)])]))], 10, _hoisted_1$18);
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
}), [["__scopeId", "data-v-47586bec"]]);
|
|
404
|
+
//#endregion
|
|
334
405
|
//#region src/components/BaseBadge.vue
|
|
335
406
|
var BaseBadge_default = /* @__PURE__ */ defineComponent({
|
|
336
407
|
__name: "BaseBadge",
|
|
@@ -350,6 +421,123 @@ var BaseBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
350
421
|
}
|
|
351
422
|
});
|
|
352
423
|
//#endregion
|
|
424
|
+
//#region src/components/BaseMenu.vue?vue&type=script&setup=true&lang.ts
|
|
425
|
+
var _hoisted_1$17 = [
|
|
426
|
+
"aria-label",
|
|
427
|
+
"aria-expanded",
|
|
428
|
+
"aria-controls"
|
|
429
|
+
];
|
|
430
|
+
var _hoisted_2$14 = ["id"];
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region src/components/BaseMenu.vue
|
|
433
|
+
var BaseMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
434
|
+
__name: "BaseMenu",
|
|
435
|
+
props: /*@__PURE__*/ mergeModels({
|
|
436
|
+
label: {},
|
|
437
|
+
align: { default: "end" }
|
|
438
|
+
}, {
|
|
439
|
+
"modelValue": {
|
|
440
|
+
type: Boolean,
|
|
441
|
+
default: false
|
|
442
|
+
},
|
|
443
|
+
"modelModifiers": {}
|
|
444
|
+
}),
|
|
445
|
+
emits: ["update:modelValue"],
|
|
446
|
+
setup(__props) {
|
|
447
|
+
const open = useModel(__props, "modelValue");
|
|
448
|
+
const root = ref(null);
|
|
449
|
+
const panel = ref(null);
|
|
450
|
+
const trigger = ref(null);
|
|
451
|
+
const id = useId();
|
|
452
|
+
function items() {
|
|
453
|
+
if (!panel.value) return [];
|
|
454
|
+
return Array.from(panel.value.querySelectorAll("[role=\"menuitem\"]"));
|
|
455
|
+
}
|
|
456
|
+
function focusAt(index) {
|
|
457
|
+
const list = items();
|
|
458
|
+
if (list.length === 0) return;
|
|
459
|
+
list[(index + list.length) % list.length]?.focus();
|
|
460
|
+
}
|
|
461
|
+
function currentIndex() {
|
|
462
|
+
return items().indexOf(document.activeElement);
|
|
463
|
+
}
|
|
464
|
+
function onKeydown(event) {
|
|
465
|
+
if (!open.value) {
|
|
466
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
467
|
+
event.preventDefault();
|
|
468
|
+
open.value = true;
|
|
469
|
+
}
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
switch (event.key) {
|
|
473
|
+
case "Escape":
|
|
474
|
+
event.preventDefault();
|
|
475
|
+
open.value = false;
|
|
476
|
+
break;
|
|
477
|
+
case "ArrowDown":
|
|
478
|
+
event.preventDefault();
|
|
479
|
+
focusAt(currentIndex() + 1);
|
|
480
|
+
break;
|
|
481
|
+
case "ArrowUp":
|
|
482
|
+
event.preventDefault();
|
|
483
|
+
focusAt(currentIndex() - 1);
|
|
484
|
+
break;
|
|
485
|
+
case "Home":
|
|
486
|
+
event.preventDefault();
|
|
487
|
+
focusAt(0);
|
|
488
|
+
break;
|
|
489
|
+
case "End":
|
|
490
|
+
event.preventDefault();
|
|
491
|
+
focusAt(items().length - 1);
|
|
492
|
+
break;
|
|
493
|
+
case "Tab": open.value = false;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
function onDocumentPointer(event) {
|
|
497
|
+
if (root.value && !root.value.contains(event.target)) open.value = false;
|
|
498
|
+
}
|
|
499
|
+
watch(open, async (isOpen) => {
|
|
500
|
+
if (typeof document === "undefined") return;
|
|
501
|
+
if (isOpen) {
|
|
502
|
+
document.addEventListener("pointerdown", onDocumentPointer);
|
|
503
|
+
await nextTick();
|
|
504
|
+
items()[0]?.focus();
|
|
505
|
+
} else {
|
|
506
|
+
document.removeEventListener("pointerdown", onDocumentPointer);
|
|
507
|
+
if (root.value?.contains(document.activeElement)) trigger.value?.focus();
|
|
508
|
+
}
|
|
509
|
+
}, { immediate: true });
|
|
510
|
+
onBeforeUnmount(() => {
|
|
511
|
+
if (typeof document !== "undefined") document.removeEventListener("pointerdown", onDocumentPointer);
|
|
512
|
+
});
|
|
513
|
+
return (_ctx, _cache) => {
|
|
514
|
+
return openBlock(), createElementBlock("div", {
|
|
515
|
+
ref_key: "root",
|
|
516
|
+
ref: root,
|
|
517
|
+
class: "rk-menu",
|
|
518
|
+
onKeydown
|
|
519
|
+
}, [createElementVNode("button", {
|
|
520
|
+
ref_key: "trigger",
|
|
521
|
+
ref: trigger,
|
|
522
|
+
type: "button",
|
|
523
|
+
class: "rk-menu-trigger",
|
|
524
|
+
"aria-label": __props.label,
|
|
525
|
+
"aria-expanded": open.value,
|
|
526
|
+
"aria-haspopup": true,
|
|
527
|
+
"aria-controls": open.value ? unref(id) : void 0,
|
|
528
|
+
onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
|
|
529
|
+
}, [renderSlot(_ctx.$slots, "trigger", { open: open.value }, void 0, true)], 8, _hoisted_1$17), open.value ? (openBlock(), createElementBlock("div", {
|
|
530
|
+
key: 0,
|
|
531
|
+
id: unref(id),
|
|
532
|
+
ref_key: "panel",
|
|
533
|
+
ref: panel,
|
|
534
|
+
class: normalizeClass(["rk-menu-panel", `is-${__props.align}`]),
|
|
535
|
+
role: "menu"
|
|
536
|
+
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 10, _hoisted_2$14)) : createCommentVNode("", true)], 544);
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
}), [["__scopeId", "data-v-8ad05b3d"]]);
|
|
540
|
+
//#endregion
|
|
353
541
|
//#region src/components/BaseCard.vue
|
|
354
542
|
var BaseCard_default = /* @__PURE__ */ defineComponent({
|
|
355
543
|
__name: "BaseCard",
|
|
@@ -416,13 +604,13 @@ var BaseCard_default = /* @__PURE__ */ defineComponent({
|
|
|
416
604
|
});
|
|
417
605
|
//#endregion
|
|
418
606
|
//#region src/components/BaseRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
419
|
-
var _hoisted_1$
|
|
420
|
-
var _hoisted_2$
|
|
607
|
+
var _hoisted_1$16 = ["aria-describedby"];
|
|
608
|
+
var _hoisted_2$13 = [
|
|
421
609
|
"name",
|
|
422
610
|
"value",
|
|
423
611
|
"disabled"
|
|
424
612
|
];
|
|
425
|
-
var _hoisted_3$
|
|
613
|
+
var _hoisted_3$7 = { class: "text-ink text-sm" };
|
|
426
614
|
//#endregion
|
|
427
615
|
//#region src/components/BaseRadioGroup.vue
|
|
428
616
|
var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -467,7 +655,7 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
467
655
|
value: option.value,
|
|
468
656
|
disabled: option.disabled,
|
|
469
657
|
class: "accent-primary focus-visible:outline-primary size-4 shrink-0 focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
470
|
-
}, null, 8, _hoisted_2$
|
|
658
|
+
}, null, 8, _hoisted_2$13), [[vModelRadio, model.value]]), createElementVNode("span", _hoisted_3$7, toDisplayString(option.label), 1)], 2);
|
|
471
659
|
}), 128)),
|
|
472
660
|
__props.error ? (openBlock(), createElementBlock("p", {
|
|
473
661
|
key: 0,
|
|
@@ -478,24 +666,24 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
478
666
|
id: hintId,
|
|
479
667
|
class: "text-ink-soft text-xs"
|
|
480
668
|
}, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
481
|
-
], 8, _hoisted_1$
|
|
669
|
+
], 8, _hoisted_1$16);
|
|
482
670
|
};
|
|
483
671
|
}
|
|
484
672
|
});
|
|
485
673
|
//#endregion
|
|
486
674
|
//#region src/components/BaseSelect.vue?vue&type=script&setup=true&lang.ts
|
|
487
|
-
var _hoisted_1$
|
|
488
|
-
var _hoisted_2$
|
|
675
|
+
var _hoisted_1$15 = { class: "relative" };
|
|
676
|
+
var _hoisted_2$12 = [
|
|
489
677
|
"id",
|
|
490
678
|
"aria-invalid",
|
|
491
679
|
"aria-describedby"
|
|
492
680
|
];
|
|
493
|
-
var _hoisted_3$
|
|
681
|
+
var _hoisted_3$6 = {
|
|
494
682
|
key: 0,
|
|
495
683
|
value: void 0,
|
|
496
684
|
disabled: ""
|
|
497
685
|
};
|
|
498
|
-
var _hoisted_4$
|
|
686
|
+
var _hoisted_4$6 = ["value", "disabled"];
|
|
499
687
|
//#endregion
|
|
500
688
|
//#region src/components/BaseSelect.vue
|
|
501
689
|
var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
@@ -531,7 +719,7 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
531
719
|
"label-hidden": __props.labelHidden,
|
|
532
720
|
size: __props.size
|
|
533
721
|
}, {
|
|
534
|
-
default: withCtx(({ id, describedBy, invalid }) => [createElementVNode("div", _hoisted_1$
|
|
722
|
+
default: withCtx(({ id, describedBy, invalid }) => [createElementVNode("div", _hoisted_1$15, [withDirectives(createElementVNode("select", {
|
|
535
723
|
id,
|
|
536
724
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
537
725
|
"aria-invalid": invalid,
|
|
@@ -541,13 +729,13 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
541
729
|
__props.variant === "unstyled" ? "" : SIZE_CLASS[__props.size],
|
|
542
730
|
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
543
731
|
]])
|
|
544
|
-
}, [__props.placeholder ? (openBlock(), createElementBlock("option", _hoisted_3$
|
|
732
|
+
}, [__props.placeholder ? (openBlock(), createElementBlock("option", _hoisted_3$6, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
545
733
|
return openBlock(), createElementBlock("option", {
|
|
546
734
|
key: option.value,
|
|
547
735
|
value: option.value,
|
|
548
736
|
disabled: option.disabled
|
|
549
|
-
}, toDisplayString(option.label), 9, _hoisted_4$
|
|
550
|
-
}), 128))], 10, _hoisted_2$
|
|
737
|
+
}, toDisplayString(option.label), 9, _hoisted_4$6);
|
|
738
|
+
}), 128))], 10, _hoisted_2$12), [[vModelSelect, model.value]]), createVNode(unref(ChevronDown), {
|
|
551
739
|
class: "text-ink-soft pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2",
|
|
552
740
|
"aria-hidden": "true"
|
|
553
741
|
})])]),
|
|
@@ -563,6 +751,122 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
563
751
|
}
|
|
564
752
|
});
|
|
565
753
|
//#endregion
|
|
754
|
+
//#region src/components/BaseSpinner.vue?vue&type=script&setup=true&lang.ts
|
|
755
|
+
var _hoisted_1$14 = {
|
|
756
|
+
class: "rk-spin-wrap",
|
|
757
|
+
role: "status"
|
|
758
|
+
};
|
|
759
|
+
var _hoisted_2$11 = { class: "rk-spin-label" };
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region src/components/BaseSpinner.vue
|
|
762
|
+
var BaseSpinner_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
763
|
+
__name: "BaseSpinner",
|
|
764
|
+
props: {
|
|
765
|
+
label: {},
|
|
766
|
+
size: { default: "md" }
|
|
767
|
+
},
|
|
768
|
+
setup(__props) {
|
|
769
|
+
/**
|
|
770
|
+
* Work in progress, with no idea how much is left.
|
|
771
|
+
*
|
|
772
|
+
* `ProgressBar` is the one to reach for when the amount is known; this is for
|
|
773
|
+
* when it is not. Showing a bar that cannot move is worse than a spinner,
|
|
774
|
+
* because a bar is a promise about how long.
|
|
775
|
+
*
|
|
776
|
+
* `role="status"` and a label, so a screen reader says what is happening. A
|
|
777
|
+
* spinner with no accessible name is a decoration that happens to be the only
|
|
778
|
+
* thing on screen — which is why `label` is required and not defaulted to
|
|
779
|
+
* "Loading" in a language the app may not speak.
|
|
780
|
+
*/
|
|
781
|
+
const SIZES = {
|
|
782
|
+
sm: "1rem",
|
|
783
|
+
md: "1.5rem",
|
|
784
|
+
lg: "2.5rem"
|
|
785
|
+
};
|
|
786
|
+
return (_ctx, _cache) => {
|
|
787
|
+
return openBlock(), createElementBlock("span", _hoisted_1$14, [createElementVNode("span", {
|
|
788
|
+
class: "rk-spin",
|
|
789
|
+
style: normalizeStyle({
|
|
790
|
+
width: SIZES[__props.size],
|
|
791
|
+
height: SIZES[__props.size]
|
|
792
|
+
}),
|
|
793
|
+
"aria-hidden": "true"
|
|
794
|
+
}, null, 4), createElementVNode("span", _hoisted_2$11, toDisplayString(__props.label), 1)]);
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
}), [["__scopeId", "data-v-842da62c"]]);
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region src/components/BaseSwitch.vue?vue&type=script&setup=true&lang.ts
|
|
800
|
+
var _hoisted_1$13 = { class: "flex items-center justify-between gap-4" };
|
|
801
|
+
var _hoisted_2$10 = {
|
|
802
|
+
key: 0,
|
|
803
|
+
class: "min-w-0"
|
|
804
|
+
};
|
|
805
|
+
var _hoisted_3$5 = ["id"];
|
|
806
|
+
var _hoisted_4$5 = [
|
|
807
|
+
"aria-checked",
|
|
808
|
+
"aria-labelledby",
|
|
809
|
+
"aria-label",
|
|
810
|
+
"aria-describedby",
|
|
811
|
+
"disabled"
|
|
812
|
+
];
|
|
813
|
+
//#endregion
|
|
814
|
+
//#region src/components/BaseSwitch.vue
|
|
815
|
+
var BaseSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
816
|
+
__name: "BaseSwitch",
|
|
817
|
+
props: /*@__PURE__*/ mergeModels({
|
|
818
|
+
label: {},
|
|
819
|
+
hint: { default: "" },
|
|
820
|
+
disabled: {
|
|
821
|
+
type: Boolean,
|
|
822
|
+
default: false
|
|
823
|
+
},
|
|
824
|
+
labelHidden: {
|
|
825
|
+
type: Boolean,
|
|
826
|
+
default: false
|
|
827
|
+
}
|
|
828
|
+
}, {
|
|
829
|
+
"modelValue": {
|
|
830
|
+
type: Boolean,
|
|
831
|
+
default: false
|
|
832
|
+
},
|
|
833
|
+
"modelModifiers": {}
|
|
834
|
+
}),
|
|
835
|
+
emits: ["update:modelValue"],
|
|
836
|
+
setup(__props) {
|
|
837
|
+
const model = useModel(__props, "modelValue");
|
|
838
|
+
const id = useId();
|
|
839
|
+
const hintId = `${id}-hint`;
|
|
840
|
+
const describedBy = computed(() => __props.hint ? hintId : void 0);
|
|
841
|
+
function toggle() {
|
|
842
|
+
if (!__props.disabled) model.value = !model.value;
|
|
843
|
+
}
|
|
844
|
+
return (_ctx, _cache) => {
|
|
845
|
+
return openBlock(), createElementBlock("div", _hoisted_1$13, [!__props.labelHidden ? (openBlock(), createElementBlock("span", _hoisted_2$10, [createElementVNode("span", {
|
|
846
|
+
id: unref(id),
|
|
847
|
+
class: "text-ink block text-sm"
|
|
848
|
+
}, toDisplayString(__props.label), 9, _hoisted_3$5), __props.hint ? (openBlock(), createElementBlock("span", {
|
|
849
|
+
key: 0,
|
|
850
|
+
id: hintId,
|
|
851
|
+
class: "text-ink-soft mt-0.5 block text-xs"
|
|
852
|
+
}, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)])) : createCommentVNode("", true), createElementVNode("button", {
|
|
853
|
+
type: "button",
|
|
854
|
+
role: "switch",
|
|
855
|
+
class: normalizeClass(["rk-switch", { "is-on": model.value }]),
|
|
856
|
+
"aria-checked": model.value,
|
|
857
|
+
"aria-labelledby": __props.labelHidden ? void 0 : unref(id),
|
|
858
|
+
"aria-label": __props.labelHidden ? __props.label : void 0,
|
|
859
|
+
"aria-describedby": describedBy.value,
|
|
860
|
+
disabled: __props.disabled,
|
|
861
|
+
onClick: toggle
|
|
862
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("span", {
|
|
863
|
+
class: "rk-switch-knob",
|
|
864
|
+
"aria-hidden": "true"
|
|
865
|
+
}, null, -1)])], 10, _hoisted_4$5)]);
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
}), [["__scopeId", "data-v-a9f65b91"]]);
|
|
869
|
+
//#endregion
|
|
566
870
|
//#region src/components/BaseTextarea.vue?vue&type=script&setup=true&lang.ts
|
|
567
871
|
var _hoisted_1$12 = [
|
|
568
872
|
"id",
|
|
@@ -1342,8 +1646,8 @@ function createI18nRuntime(options) {
|
|
|
1342
1646
|
*
|
|
1343
1647
|
* The fallback keeps `vitest` and `vite dev` honest, where no define runs.
|
|
1344
1648
|
*/
|
|
1345
|
-
var VERSION = "0.
|
|
1649
|
+
var VERSION = "0.19.0";
|
|
1346
1650
|
//#endregion
|
|
1347
|
-
export { AppError, BaseAlert_default as BaseAlert, BaseBadge_default as BaseBadge, BaseButton_default as BaseButton, BaseCard_default as BaseCard, BaseCheckbox_default as BaseCheckbox, BaseInput_default as BaseInput, BaseRadioGroup_default as BaseRadioGroup, BaseSelect_default as BaseSelect, BaseSheet_default as BaseSheet, BaseTextarea_default as BaseTextarea, EmptyState_default as EmptyState, ErrorBoundary_default as ErrorBoundary, FormField_default as FormField, GoogleButton_default as GoogleButton, LocaleLinks_default as LocaleLinks, PageContainer_default as PageContainer, PageHeader_default as PageHeader, PriceCard_default as PriceCard, ProgressBar_default as ProgressBar, SectionHeading_default as SectionHeading, SegmentedControl_default as SegmentedControl, SettingsGroup_default as SettingsGroup, SettingsRow_default as SettingsRow, SkeletonList_default as SkeletonList, StatCard_default as StatCard, TabBar_default as TabBar, ToastHost_default as ToastHost, ToneDot_default as ToneDot, VERSION, addDays, applyTheme, createI18nRuntime, downloadJson, eachDayOfYear, formatDate, fromDateKey, isApplePortable, isInstalled, isThemePreference, lastNDays, leadingBlanks, needsIosInstall, readStoredTheme, registerErrorMapper, relativeDayLabel, safeRedirect, setFormatLocale, setThemeStorageKey, startOfWeek, tapFeedback, toAppError, toDateKey, toRedirectPath, todayKey, useDebouncedCallback, useDragScroll, useMediaQuery, useOnline, useTheme, useToast, useToday, useVisualViewport };
|
|
1651
|
+
export { AppError, BaseAlert_default as BaseAlert, BaseAvatar_default as BaseAvatar, BaseBadge_default as BaseBadge, BaseButton_default as BaseButton, BaseCard_default as BaseCard, BaseCheckbox_default as BaseCheckbox, BaseInput_default as BaseInput, BaseMenu_default as BaseMenu, BaseRadioGroup_default as BaseRadioGroup, BaseSelect_default as BaseSelect, BaseSheet_default as BaseSheet, BaseSpinner_default as BaseSpinner, BaseSwitch_default as BaseSwitch, BaseTextarea_default as BaseTextarea, EmptyState_default as EmptyState, ErrorBoundary_default as ErrorBoundary, FormField_default as FormField, GoogleButton_default as GoogleButton, LocaleLinks_default as LocaleLinks, PageContainer_default as PageContainer, PageHeader_default as PageHeader, PriceCard_default as PriceCard, ProgressBar_default as ProgressBar, SectionHeading_default as SectionHeading, SegmentedControl_default as SegmentedControl, SettingsGroup_default as SettingsGroup, SettingsRow_default as SettingsRow, SkeletonList_default as SkeletonList, StatCard_default as StatCard, TabBar_default as TabBar, ToastHost_default as ToastHost, ToneDot_default as ToneDot, VERSION, addDays, applyTheme, createI18nRuntime, downloadJson, eachDayOfYear, formatDate, fromDateKey, isApplePortable, isInstalled, isThemePreference, lastNDays, leadingBlanks, needsIosInstall, readStoredTheme, registerErrorMapper, relativeDayLabel, safeRedirect, setFormatLocale, setThemeStorageKey, startOfWeek, tapFeedback, toAppError, toDateKey, toRedirectPath, todayKey, useDebouncedCallback, useDragScroll, useMediaQuery, useOnline, useTheme, useToast, useToday, useVisualViewport };
|
|
1348
1652
|
|
|
1349
1653
|
//# sourceMappingURL=index.js.map
|