rei-kit 0.19.0 → 1.0.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 +59 -19
- package/dist/{GoogleButton-dXOuBJwe.js → GoogleButton-lxNEycyw.js} +44 -5
- package/dist/GoogleButton-lxNEycyw.js.map +1 -0
- package/dist/{SettingsGroup-DtEB_Hrd.js → SettingsGroup-JsD19V81.js} +8 -1
- package/dist/{SettingsGroup-DtEB_Hrd.js.map → SettingsGroup-JsD19V81.js.map} +1 -1
- package/dist/app.js +1 -1
- package/dist/components/BaseCombobox.vue.d.ts +36 -0
- package/dist/components/BaseSlider.vue.d.ts +40 -0
- package/dist/components/BaseTable.vue.d.ts +44 -0
- package/dist/components/EmptyState.vue.d.ts +8 -0
- package/dist/components/PageHeader.vue.d.ts +9 -0
- package/dist/components/SettingsGroup.vue.d.ts +7 -0
- package/dist/components/StatCard.vue.d.ts +9 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +399 -39
- package/dist/index.js.map +1 -1
- package/dist/pwa.js +1 -1
- package/dist/styles.css +238 -10
- package/dist/utils/sheet-root.d.ts +20 -0
- package/package.json +23 -4
- package/dist/GoogleButton-dXOuBJwe.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
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-
|
|
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-JsD19V81.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, v as SHEET_ROOT_ID, y as ensureSheetRoot } from "./GoogleButton-lxNEycyw.js";
|
|
3
3
|
import { n as registerErrorMapper, r as toAppError, t as AppError } from "./app-error-DF9cijE0.js";
|
|
4
4
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
|
|
5
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";
|
|
6
|
+
import { Fragment, Teleport, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onErrorCaptured, onMounted, onScopeDispose, openBlock, readonly, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useId, useModel, vModelRadio, vModelSelect, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } 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";
|
|
@@ -332,17 +332,17 @@ function useMediaQuery(query) {
|
|
|
332
332
|
}
|
|
333
333
|
//#endregion
|
|
334
334
|
//#region src/components/BaseAvatar.vue?vue&type=script&setup=true&lang.ts
|
|
335
|
-
var _hoisted_1$
|
|
335
|
+
var _hoisted_1$21 = [
|
|
336
336
|
"role",
|
|
337
337
|
"aria-label",
|
|
338
338
|
"aria-hidden"
|
|
339
339
|
];
|
|
340
|
-
var _hoisted_2$
|
|
341
|
-
var _hoisted_3$
|
|
340
|
+
var _hoisted_2$18 = ["src"];
|
|
341
|
+
var _hoisted_3$11 = {
|
|
342
342
|
key: 1,
|
|
343
343
|
class: "rk-avatar-initials"
|
|
344
344
|
};
|
|
345
|
-
var _hoisted_4$
|
|
345
|
+
var _hoisted_4$10 = {
|
|
346
346
|
key: 2,
|
|
347
347
|
viewBox: "0 0 20 20",
|
|
348
348
|
class: "rk-avatar-figure",
|
|
@@ -388,7 +388,7 @@ var BaseAvatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
388
388
|
alt: "",
|
|
389
389
|
class: "rk-avatar-img",
|
|
390
390
|
onError: _cache[0] || (_cache[0] = ($event) => broken.value = true)
|
|
391
|
-
}, null, 40, _hoisted_2$
|
|
391
|
+
}, null, 40, _hoisted_2$18)) : __props.fallback === "initials" && initials.value ? (openBlock(), createElementBlock("span", _hoisted_3$11, toDisplayString(initials.value), 1)) : (openBlock(), createElementBlock("svg", _hoisted_4$10, [..._cache[1] || (_cache[1] = [createElementVNode("circle", {
|
|
392
392
|
cx: "10",
|
|
393
393
|
cy: "6.75",
|
|
394
394
|
r: "3.25",
|
|
@@ -397,7 +397,7 @@ var BaseAvatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
397
397
|
d: "M3.75 17c0-3.05 2.8-5.25 6.25-5.25S16.25 13.95 16.25 17",
|
|
398
398
|
"stroke-width": "1.5",
|
|
399
399
|
"stroke-linecap": "round"
|
|
400
|
-
}, null, -1)])]))], 10, _hoisted_1$
|
|
400
|
+
}, null, -1)])]))], 10, _hoisted_1$21);
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
403
|
}), [["__scopeId", "data-v-47586bec"]]);
|
|
@@ -422,12 +422,12 @@ var BaseBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
422
422
|
});
|
|
423
423
|
//#endregion
|
|
424
424
|
//#region src/components/BaseMenu.vue?vue&type=script&setup=true&lang.ts
|
|
425
|
-
var _hoisted_1$
|
|
425
|
+
var _hoisted_1$20 = [
|
|
426
426
|
"aria-label",
|
|
427
427
|
"aria-expanded",
|
|
428
428
|
"aria-controls"
|
|
429
429
|
];
|
|
430
|
-
var _hoisted_2$
|
|
430
|
+
var _hoisted_2$17 = ["id"];
|
|
431
431
|
//#endregion
|
|
432
432
|
//#region src/components/BaseMenu.vue
|
|
433
433
|
var BaseMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -526,14 +526,14 @@ var BaseMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
526
526
|
"aria-haspopup": true,
|
|
527
527
|
"aria-controls": open.value ? unref(id) : void 0,
|
|
528
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$
|
|
529
|
+
}, [renderSlot(_ctx.$slots, "trigger", { open: open.value }, void 0, true)], 8, _hoisted_1$20), open.value ? (openBlock(), createElementBlock("div", {
|
|
530
530
|
key: 0,
|
|
531
531
|
id: unref(id),
|
|
532
532
|
ref_key: "panel",
|
|
533
533
|
ref: panel,
|
|
534
534
|
class: normalizeClass(["rk-menu-panel", `is-${__props.align}`]),
|
|
535
535
|
role: "menu"
|
|
536
|
-
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 10, _hoisted_2$
|
|
536
|
+
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 10, _hoisted_2$17)) : createCommentVNode("", true)], 544);
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
539
|
}), [["__scopeId", "data-v-8ad05b3d"]]);
|
|
@@ -603,14 +603,215 @@ var BaseCard_default = /* @__PURE__ */ defineComponent({
|
|
|
603
603
|
}
|
|
604
604
|
});
|
|
605
605
|
//#endregion
|
|
606
|
+
//#region src/components/BaseCombobox.vue?vue&type=script&setup=true&lang.ts
|
|
607
|
+
var _hoisted_1$19 = ["for"];
|
|
608
|
+
var _hoisted_2$16 = { class: "rk-combo-field" };
|
|
609
|
+
var _hoisted_3$10 = [
|
|
610
|
+
"id",
|
|
611
|
+
"placeholder",
|
|
612
|
+
"disabled",
|
|
613
|
+
"aria-expanded",
|
|
614
|
+
"aria-activedescendant",
|
|
615
|
+
"aria-invalid",
|
|
616
|
+
"aria-describedby"
|
|
617
|
+
];
|
|
618
|
+
var _hoisted_4$9 = ["disabled"];
|
|
619
|
+
var _hoisted_5$5 = ["aria-label"];
|
|
620
|
+
var _hoisted_6$1 = [
|
|
621
|
+
"id",
|
|
622
|
+
"aria-selected",
|
|
623
|
+
"onPointerdown",
|
|
624
|
+
"onPointermove"
|
|
625
|
+
];
|
|
626
|
+
var _hoisted_7$1 = {
|
|
627
|
+
key: 0,
|
|
628
|
+
class: "rk-combo-empty"
|
|
629
|
+
};
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region src/components/BaseCombobox.vue
|
|
632
|
+
var BaseCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
633
|
+
__name: "BaseCombobox",
|
|
634
|
+
props: /*@__PURE__*/ mergeModels({
|
|
635
|
+
label: {},
|
|
636
|
+
options: {},
|
|
637
|
+
placeholder: { default: "" },
|
|
638
|
+
hint: { default: "" },
|
|
639
|
+
error: { default: "" },
|
|
640
|
+
disabled: {
|
|
641
|
+
type: Boolean,
|
|
642
|
+
default: false
|
|
643
|
+
},
|
|
644
|
+
emptyLabel: {}
|
|
645
|
+
}, {
|
|
646
|
+
"modelValue": { default: "" },
|
|
647
|
+
"modelModifiers": {}
|
|
648
|
+
}),
|
|
649
|
+
emits: ["update:modelValue"],
|
|
650
|
+
setup(__props) {
|
|
651
|
+
const model = useModel(__props, "modelValue");
|
|
652
|
+
const id = useId();
|
|
653
|
+
const listId = `${id}-list`;
|
|
654
|
+
const hintId = `${id}-hint`;
|
|
655
|
+
const errorId = `${id}-error`;
|
|
656
|
+
const optionId = (index) => `${id}-opt-${index}`;
|
|
657
|
+
const open = ref(false);
|
|
658
|
+
const query = ref("");
|
|
659
|
+
const highlighted = ref(0);
|
|
660
|
+
const root = ref(null);
|
|
661
|
+
const list = ref(null);
|
|
662
|
+
const selected = computed(() => __props.options.find((option) => option.value === model.value));
|
|
663
|
+
/** What the input shows: the query while typing, the chosen label otherwise. */
|
|
664
|
+
const text = computed({
|
|
665
|
+
get: () => open.value ? query.value : selected.value?.label ?? "",
|
|
666
|
+
set: (value) => {
|
|
667
|
+
query.value = value;
|
|
668
|
+
open.value = true;
|
|
669
|
+
highlighted.value = 0;
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
const matches = computed(() => {
|
|
673
|
+
const needle = query.value.trim().toLowerCase();
|
|
674
|
+
if (!open.value || needle === "") return __props.options;
|
|
675
|
+
return __props.options.filter((option) => option.label.toLowerCase().includes(needle));
|
|
676
|
+
});
|
|
677
|
+
const describedBy = computed(() => {
|
|
678
|
+
if (__props.error) return errorId;
|
|
679
|
+
if (__props.hint) return hintId;
|
|
680
|
+
});
|
|
681
|
+
function choose(option) {
|
|
682
|
+
if (!option) return;
|
|
683
|
+
model.value = option.value;
|
|
684
|
+
query.value = "";
|
|
685
|
+
open.value = false;
|
|
686
|
+
}
|
|
687
|
+
function move(delta) {
|
|
688
|
+
const count = matches.value.length;
|
|
689
|
+
if (count === 0) return;
|
|
690
|
+
open.value = true;
|
|
691
|
+
highlighted.value = (highlighted.value + delta + count) % count;
|
|
692
|
+
scrollHighlightIntoView();
|
|
693
|
+
}
|
|
694
|
+
async function scrollHighlightIntoView() {
|
|
695
|
+
await nextTick();
|
|
696
|
+
(list.value?.children[highlighted.value])?.scrollIntoView?.({ block: "nearest" });
|
|
697
|
+
}
|
|
698
|
+
function onKeydown(event) {
|
|
699
|
+
switch (event.key) {
|
|
700
|
+
case "ArrowDown":
|
|
701
|
+
event.preventDefault();
|
|
702
|
+
move(1);
|
|
703
|
+
break;
|
|
704
|
+
case "ArrowUp":
|
|
705
|
+
event.preventDefault();
|
|
706
|
+
move(-1);
|
|
707
|
+
break;
|
|
708
|
+
case "Enter":
|
|
709
|
+
if (!open.value) return;
|
|
710
|
+
event.preventDefault();
|
|
711
|
+
choose(matches.value[highlighted.value]);
|
|
712
|
+
break;
|
|
713
|
+
case "Escape":
|
|
714
|
+
event.preventDefault();
|
|
715
|
+
if (open.value) {
|
|
716
|
+
open.value = false;
|
|
717
|
+
query.value = "";
|
|
718
|
+
} else model.value = "";
|
|
719
|
+
break;
|
|
720
|
+
case "Tab": open.value = false;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
function onDocumentPointer(event) {
|
|
724
|
+
if (root.value && !root.value.contains(event.target)) {
|
|
725
|
+
open.value = false;
|
|
726
|
+
query.value = "";
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
watch(open, (isOpen) => {
|
|
730
|
+
if (typeof document === "undefined") return;
|
|
731
|
+
if (isOpen) document.addEventListener("pointerdown", onDocumentPointer);
|
|
732
|
+
else document.removeEventListener("pointerdown", onDocumentPointer);
|
|
733
|
+
}, { immediate: true });
|
|
734
|
+
onBeforeUnmount(() => {
|
|
735
|
+
if (typeof document !== "undefined") document.removeEventListener("pointerdown", onDocumentPointer);
|
|
736
|
+
});
|
|
737
|
+
return (_ctx, _cache) => {
|
|
738
|
+
return openBlock(), createElementBlock("div", {
|
|
739
|
+
ref_key: "root",
|
|
740
|
+
ref: root,
|
|
741
|
+
class: "rk-combo"
|
|
742
|
+
}, [
|
|
743
|
+
createElementVNode("label", {
|
|
744
|
+
for: unref(id),
|
|
745
|
+
class: "rk-combo-label"
|
|
746
|
+
}, toDisplayString(__props.label), 9, _hoisted_1$19),
|
|
747
|
+
createElementVNode("div", _hoisted_2$16, [withDirectives(createElementVNode("input", {
|
|
748
|
+
id: unref(id),
|
|
749
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => text.value = $event),
|
|
750
|
+
type: "text",
|
|
751
|
+
role: "combobox",
|
|
752
|
+
class: "rk-combo-input",
|
|
753
|
+
autocomplete: "off",
|
|
754
|
+
placeholder: __props.placeholder,
|
|
755
|
+
disabled: __props.disabled,
|
|
756
|
+
"aria-expanded": open.value,
|
|
757
|
+
"aria-controls": listId,
|
|
758
|
+
"aria-autocomplete": "list",
|
|
759
|
+
"aria-activedescendant": open.value ? optionId(highlighted.value) : void 0,
|
|
760
|
+
"aria-invalid": Boolean(__props.error),
|
|
761
|
+
"aria-describedby": describedBy.value,
|
|
762
|
+
onKeydown,
|
|
763
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => open.value = true)
|
|
764
|
+
}, null, 40, _hoisted_3$10), [[vModelText, text.value]]), createElementVNode("button", {
|
|
765
|
+
type: "button",
|
|
766
|
+
class: "rk-combo-toggle",
|
|
767
|
+
tabindex: "-1",
|
|
768
|
+
"aria-hidden": "true",
|
|
769
|
+
disabled: __props.disabled,
|
|
770
|
+
onClick: _cache[2] || (_cache[2] = ($event) => open.value = !open.value)
|
|
771
|
+
}, " ▾ ", 8, _hoisted_4$9)]),
|
|
772
|
+
withDirectives(createElementVNode("ul", {
|
|
773
|
+
id: listId,
|
|
774
|
+
ref_key: "list",
|
|
775
|
+
ref: list,
|
|
776
|
+
role: "listbox",
|
|
777
|
+
class: "rk-combo-list",
|
|
778
|
+
"aria-label": __props.label
|
|
779
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(matches.value, (option, index) => {
|
|
780
|
+
return openBlock(), createElementBlock("li", {
|
|
781
|
+
id: optionId(index),
|
|
782
|
+
key: option.value,
|
|
783
|
+
role: "option",
|
|
784
|
+
class: normalizeClass(["rk-combo-option", {
|
|
785
|
+
"is-highlighted": index === highlighted.value,
|
|
786
|
+
"is-selected": option.value === model.value
|
|
787
|
+
}]),
|
|
788
|
+
"aria-selected": option.value === model.value,
|
|
789
|
+
onPointerdown: withModifiers(($event) => choose(option), ["prevent"]),
|
|
790
|
+
onPointermove: ($event) => highlighted.value = index
|
|
791
|
+
}, toDisplayString(option.label), 43, _hoisted_6$1);
|
|
792
|
+
}), 128)), matches.value.length === 0 ? (openBlock(), createElementBlock("li", _hoisted_7$1, toDisplayString(__props.emptyLabel), 1)) : createCommentVNode("", true)], 8, _hoisted_5$5), [[vShow, open.value]]),
|
|
793
|
+
__props.error ? (openBlock(), createElementBlock("p", {
|
|
794
|
+
key: 0,
|
|
795
|
+
id: errorId,
|
|
796
|
+
class: "rk-combo-error"
|
|
797
|
+
}, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", {
|
|
798
|
+
key: 1,
|
|
799
|
+
id: hintId,
|
|
800
|
+
class: "rk-combo-hint"
|
|
801
|
+
}, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
802
|
+
], 512);
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
}), [["__scopeId", "data-v-52b21155"]]);
|
|
806
|
+
//#endregion
|
|
606
807
|
//#region src/components/BaseRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
607
|
-
var _hoisted_1$
|
|
608
|
-
var _hoisted_2$
|
|
808
|
+
var _hoisted_1$18 = ["aria-describedby"];
|
|
809
|
+
var _hoisted_2$15 = [
|
|
609
810
|
"name",
|
|
610
811
|
"value",
|
|
611
812
|
"disabled"
|
|
612
813
|
];
|
|
613
|
-
var _hoisted_3$
|
|
814
|
+
var _hoisted_3$9 = { class: "text-ink text-sm" };
|
|
614
815
|
//#endregion
|
|
615
816
|
//#region src/components/BaseRadioGroup.vue
|
|
616
817
|
var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -655,7 +856,7 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
655
856
|
value: option.value,
|
|
656
857
|
disabled: option.disabled,
|
|
657
858
|
class: "accent-primary focus-visible:outline-primary size-4 shrink-0 focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
658
|
-
}, null, 8, _hoisted_2$
|
|
859
|
+
}, null, 8, _hoisted_2$15), [[vModelRadio, model.value]]), createElementVNode("span", _hoisted_3$9, toDisplayString(option.label), 1)], 2);
|
|
659
860
|
}), 128)),
|
|
660
861
|
__props.error ? (openBlock(), createElementBlock("p", {
|
|
661
862
|
key: 0,
|
|
@@ -666,24 +867,24 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
666
867
|
id: hintId,
|
|
667
868
|
class: "text-ink-soft text-xs"
|
|
668
869
|
}, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
669
|
-
], 8, _hoisted_1$
|
|
870
|
+
], 8, _hoisted_1$18);
|
|
670
871
|
};
|
|
671
872
|
}
|
|
672
873
|
});
|
|
673
874
|
//#endregion
|
|
674
875
|
//#region src/components/BaseSelect.vue?vue&type=script&setup=true&lang.ts
|
|
675
|
-
var _hoisted_1$
|
|
676
|
-
var _hoisted_2$
|
|
876
|
+
var _hoisted_1$17 = { class: "relative" };
|
|
877
|
+
var _hoisted_2$14 = [
|
|
677
878
|
"id",
|
|
678
879
|
"aria-invalid",
|
|
679
880
|
"aria-describedby"
|
|
680
881
|
];
|
|
681
|
-
var _hoisted_3$
|
|
882
|
+
var _hoisted_3$8 = {
|
|
682
883
|
key: 0,
|
|
683
884
|
value: void 0,
|
|
684
885
|
disabled: ""
|
|
685
886
|
};
|
|
686
|
-
var _hoisted_4$
|
|
887
|
+
var _hoisted_4$8 = ["value", "disabled"];
|
|
687
888
|
//#endregion
|
|
688
889
|
//#region src/components/BaseSelect.vue
|
|
689
890
|
var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
@@ -719,7 +920,7 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
719
920
|
"label-hidden": __props.labelHidden,
|
|
720
921
|
size: __props.size
|
|
721
922
|
}, {
|
|
722
|
-
default: withCtx(({ id, describedBy, invalid }) => [createElementVNode("div", _hoisted_1$
|
|
923
|
+
default: withCtx(({ id, describedBy, invalid }) => [createElementVNode("div", _hoisted_1$17, [withDirectives(createElementVNode("select", {
|
|
723
924
|
id,
|
|
724
925
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
725
926
|
"aria-invalid": invalid,
|
|
@@ -729,13 +930,13 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
729
930
|
__props.variant === "unstyled" ? "" : SIZE_CLASS[__props.size],
|
|
730
931
|
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
731
932
|
]])
|
|
732
|
-
}, [__props.placeholder ? (openBlock(), createElementBlock("option", _hoisted_3$
|
|
933
|
+
}, [__props.placeholder ? (openBlock(), createElementBlock("option", _hoisted_3$8, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
733
934
|
return openBlock(), createElementBlock("option", {
|
|
734
935
|
key: option.value,
|
|
735
936
|
value: option.value,
|
|
736
937
|
disabled: option.disabled
|
|
737
|
-
}, toDisplayString(option.label), 9, _hoisted_4$
|
|
738
|
-
}), 128))], 10, _hoisted_2$
|
|
938
|
+
}, toDisplayString(option.label), 9, _hoisted_4$8);
|
|
939
|
+
}), 128))], 10, _hoisted_2$14), [[vModelSelect, model.value]]), createVNode(unref(ChevronDown), {
|
|
739
940
|
class: "text-ink-soft pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2",
|
|
740
941
|
"aria-hidden": "true"
|
|
741
942
|
})])]),
|
|
@@ -751,12 +952,98 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
751
952
|
}
|
|
752
953
|
});
|
|
753
954
|
//#endregion
|
|
955
|
+
//#region src/components/BaseSlider.vue?vue&type=script&setup=true&lang.ts
|
|
956
|
+
var _hoisted_1$16 = { class: "rk-slider" };
|
|
957
|
+
var _hoisted_2$13 = { class: "rk-slider-head" };
|
|
958
|
+
var _hoisted_3$7 = ["for"];
|
|
959
|
+
var _hoisted_4$7 = ["for"];
|
|
960
|
+
var _hoisted_5$4 = [
|
|
961
|
+
"id",
|
|
962
|
+
"min",
|
|
963
|
+
"max",
|
|
964
|
+
"step",
|
|
965
|
+
"disabled",
|
|
966
|
+
"aria-valuetext",
|
|
967
|
+
"aria-describedby"
|
|
968
|
+
];
|
|
969
|
+
//#endregion
|
|
970
|
+
//#region src/components/BaseSlider.vue
|
|
971
|
+
var BaseSlider_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
972
|
+
__name: "BaseSlider",
|
|
973
|
+
props: /*@__PURE__*/ mergeModels({
|
|
974
|
+
label: {},
|
|
975
|
+
min: { default: 0 },
|
|
976
|
+
max: { default: 100 },
|
|
977
|
+
step: { default: 1 },
|
|
978
|
+
hint: { default: "" },
|
|
979
|
+
disabled: {
|
|
980
|
+
type: Boolean,
|
|
981
|
+
default: false
|
|
982
|
+
},
|
|
983
|
+
format: { type: Function },
|
|
984
|
+
showValue: {
|
|
985
|
+
type: Boolean,
|
|
986
|
+
default: true
|
|
987
|
+
}
|
|
988
|
+
}, {
|
|
989
|
+
"modelValue": { default: 0 },
|
|
990
|
+
"modelModifiers": {}
|
|
991
|
+
}),
|
|
992
|
+
emits: ["update:modelValue"],
|
|
993
|
+
setup(__props) {
|
|
994
|
+
const model = useModel(__props, "modelValue");
|
|
995
|
+
const id = useId();
|
|
996
|
+
const hintId = `${id}-hint`;
|
|
997
|
+
const text = computed(() => __props.format ? __props.format(model.value) : String(model.value));
|
|
998
|
+
/** Where the fill stops, as a percentage of the track. */
|
|
999
|
+
const filled = computed(() => {
|
|
1000
|
+
const span = __props.max - __props.min;
|
|
1001
|
+
return span <= 0 ? 0 : (model.value - __props.min) / span * 100;
|
|
1002
|
+
});
|
|
1003
|
+
return (_ctx, _cache) => {
|
|
1004
|
+
return openBlock(), createElementBlock("div", _hoisted_1$16, [
|
|
1005
|
+
createElementVNode("div", _hoisted_2$13, [createElementVNode("label", {
|
|
1006
|
+
for: unref(id),
|
|
1007
|
+
class: "rk-slider-label"
|
|
1008
|
+
}, toDisplayString(__props.label), 9, _hoisted_3$7), __props.showValue ? (openBlock(), createElementBlock("output", {
|
|
1009
|
+
key: 0,
|
|
1010
|
+
for: unref(id),
|
|
1011
|
+
class: "rk-slider-value"
|
|
1012
|
+
}, toDisplayString(text.value), 9, _hoisted_4$7)) : createCommentVNode("", true)]),
|
|
1013
|
+
withDirectives(createElementVNode("input", {
|
|
1014
|
+
id: unref(id),
|
|
1015
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
1016
|
+
type: "range",
|
|
1017
|
+
class: "rk-slider-input",
|
|
1018
|
+
min: __props.min,
|
|
1019
|
+
max: __props.max,
|
|
1020
|
+
step: __props.step,
|
|
1021
|
+
disabled: __props.disabled,
|
|
1022
|
+
"aria-valuetext": text.value,
|
|
1023
|
+
"aria-describedby": __props.hint ? hintId : void 0,
|
|
1024
|
+
style: normalizeStyle({ "--rk-slider-filled": `${filled.value}%` })
|
|
1025
|
+
}, null, 12, _hoisted_5$4), [[
|
|
1026
|
+
vModelText,
|
|
1027
|
+
model.value,
|
|
1028
|
+
void 0,
|
|
1029
|
+
{ number: true }
|
|
1030
|
+
]]),
|
|
1031
|
+
__props.hint ? (openBlock(), createElementBlock("p", {
|
|
1032
|
+
key: 0,
|
|
1033
|
+
id: hintId,
|
|
1034
|
+
class: "rk-slider-hint"
|
|
1035
|
+
}, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
1036
|
+
]);
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
}), [["__scopeId", "data-v-0a408519"]]);
|
|
1040
|
+
//#endregion
|
|
754
1041
|
//#region src/components/BaseSpinner.vue?vue&type=script&setup=true&lang.ts
|
|
755
|
-
var _hoisted_1$
|
|
1042
|
+
var _hoisted_1$15 = {
|
|
756
1043
|
class: "rk-spin-wrap",
|
|
757
1044
|
role: "status"
|
|
758
1045
|
};
|
|
759
|
-
var _hoisted_2$
|
|
1046
|
+
var _hoisted_2$12 = { class: "rk-spin-label" };
|
|
760
1047
|
//#endregion
|
|
761
1048
|
//#region src/components/BaseSpinner.vue
|
|
762
1049
|
var BaseSpinner_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -784,26 +1071,26 @@ var BaseSpinner_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
784
1071
|
lg: "2.5rem"
|
|
785
1072
|
};
|
|
786
1073
|
return (_ctx, _cache) => {
|
|
787
|
-
return openBlock(), createElementBlock("span", _hoisted_1$
|
|
1074
|
+
return openBlock(), createElementBlock("span", _hoisted_1$15, [createElementVNode("span", {
|
|
788
1075
|
class: "rk-spin",
|
|
789
1076
|
style: normalizeStyle({
|
|
790
1077
|
width: SIZES[__props.size],
|
|
791
1078
|
height: SIZES[__props.size]
|
|
792
1079
|
}),
|
|
793
1080
|
"aria-hidden": "true"
|
|
794
|
-
}, null, 4), createElementVNode("span", _hoisted_2$
|
|
1081
|
+
}, null, 4), createElementVNode("span", _hoisted_2$12, toDisplayString(__props.label), 1)]);
|
|
795
1082
|
};
|
|
796
1083
|
}
|
|
797
1084
|
}), [["__scopeId", "data-v-842da62c"]]);
|
|
798
1085
|
//#endregion
|
|
799
1086
|
//#region src/components/BaseSwitch.vue?vue&type=script&setup=true&lang.ts
|
|
800
|
-
var _hoisted_1$
|
|
801
|
-
var _hoisted_2$
|
|
1087
|
+
var _hoisted_1$14 = { class: "flex items-center justify-between gap-4" };
|
|
1088
|
+
var _hoisted_2$11 = {
|
|
802
1089
|
key: 0,
|
|
803
1090
|
class: "min-w-0"
|
|
804
1091
|
};
|
|
805
|
-
var _hoisted_3$
|
|
806
|
-
var _hoisted_4$
|
|
1092
|
+
var _hoisted_3$6 = ["id"];
|
|
1093
|
+
var _hoisted_4$6 = [
|
|
807
1094
|
"aria-checked",
|
|
808
1095
|
"aria-labelledby",
|
|
809
1096
|
"aria-label",
|
|
@@ -842,10 +1129,10 @@ var BaseSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
842
1129
|
if (!__props.disabled) model.value = !model.value;
|
|
843
1130
|
}
|
|
844
1131
|
return (_ctx, _cache) => {
|
|
845
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1132
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, [!__props.labelHidden ? (openBlock(), createElementBlock("span", _hoisted_2$11, [createElementVNode("span", {
|
|
846
1133
|
id: unref(id),
|
|
847
1134
|
class: "text-ink block text-sm"
|
|
848
|
-
}, toDisplayString(__props.label), 9, _hoisted_3$
|
|
1135
|
+
}, toDisplayString(__props.label), 9, _hoisted_3$6), __props.hint ? (openBlock(), createElementBlock("span", {
|
|
849
1136
|
key: 0,
|
|
850
1137
|
id: hintId,
|
|
851
1138
|
class: "text-ink-soft mt-0.5 block text-xs"
|
|
@@ -862,11 +1149,67 @@ var BaseSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
862
1149
|
}, [..._cache[0] || (_cache[0] = [createElementVNode("span", {
|
|
863
1150
|
class: "rk-switch-knob",
|
|
864
1151
|
"aria-hidden": "true"
|
|
865
|
-
}, null, -1)])], 10, _hoisted_4$
|
|
1152
|
+
}, null, -1)])], 10, _hoisted_4$6)]);
|
|
866
1153
|
};
|
|
867
1154
|
}
|
|
868
1155
|
}), [["__scopeId", "data-v-a9f65b91"]]);
|
|
869
1156
|
//#endregion
|
|
1157
|
+
//#region src/components/BaseTable.vue?vue&type=script&setup=true&lang.ts
|
|
1158
|
+
var _hoisted_1$13 = ["aria-label"];
|
|
1159
|
+
var _hoisted_2$10 = { class: "rk-table" };
|
|
1160
|
+
var _hoisted_3$5 = { key: 0 };
|
|
1161
|
+
var _hoisted_4$5 = { key: 1 };
|
|
1162
|
+
var _hoisted_5$3 = ["colspan"];
|
|
1163
|
+
//#endregion
|
|
1164
|
+
//#region src/components/BaseTable.vue
|
|
1165
|
+
var BaseTable_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1166
|
+
__name: "BaseTable",
|
|
1167
|
+
props: {
|
|
1168
|
+
columns: {},
|
|
1169
|
+
rows: {},
|
|
1170
|
+
caption: {},
|
|
1171
|
+
captionHidden: {
|
|
1172
|
+
type: Boolean,
|
|
1173
|
+
default: false
|
|
1174
|
+
},
|
|
1175
|
+
rowKey: {}
|
|
1176
|
+
},
|
|
1177
|
+
setup(__props) {
|
|
1178
|
+
const keyFor = (row, index) => __props.rowKey ? String(row[__props.rowKey]) : index;
|
|
1179
|
+
return (_ctx, _cache) => {
|
|
1180
|
+
return openBlock(), createElementBlock("div", {
|
|
1181
|
+
class: "rk-table-scroll",
|
|
1182
|
+
tabindex: "0",
|
|
1183
|
+
role: "region",
|
|
1184
|
+
"aria-label": __props.caption
|
|
1185
|
+
}, [createElementVNode("table", _hoisted_2$10, [
|
|
1186
|
+
createElementVNode("caption", { class: normalizeClass(__props.captionHidden ? "rk-table-caption-hidden" : "rk-table-caption") }, toDisplayString(__props.caption), 3),
|
|
1187
|
+
createElementVNode("thead", null, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
1188
|
+
return openBlock(), createElementBlock("th", {
|
|
1189
|
+
key: column.key,
|
|
1190
|
+
scope: "col",
|
|
1191
|
+
class: normalizeClass([column.align === "end" && "is-end", column.nowrap && "is-nowrap"])
|
|
1192
|
+
}, toDisplayString(column.label), 3);
|
|
1193
|
+
}), 128))])]),
|
|
1194
|
+
__props.rows.length > 0 ? (openBlock(), createElementBlock("tbody", _hoisted_3$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, index) => {
|
|
1195
|
+
return openBlock(), createElementBlock("tr", { key: keyFor(row, index) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
1196
|
+
return openBlock(), createElementBlock("td", {
|
|
1197
|
+
key: column.key,
|
|
1198
|
+
class: normalizeClass([column.align === "end" && "is-end", column.nowrap && "is-nowrap"])
|
|
1199
|
+
}, [renderSlot(_ctx.$slots, column.key, {
|
|
1200
|
+
row,
|
|
1201
|
+
value: row[column.key]
|
|
1202
|
+
}, () => [createTextVNode(toDisplayString(row[column.key]), 1)], true)], 2);
|
|
1203
|
+
}), 128))]);
|
|
1204
|
+
}), 128))])) : (openBlock(), createElementBlock("tbody", _hoisted_4$5, [createElementVNode("tr", null, [createElementVNode("td", {
|
|
1205
|
+
colspan: __props.columns.length,
|
|
1206
|
+
class: "rk-table-empty"
|
|
1207
|
+
}, [renderSlot(_ctx.$slots, "empty", {}, void 0, true)], 8, _hoisted_5$3)])]))
|
|
1208
|
+
])], 8, _hoisted_1$13);
|
|
1209
|
+
};
|
|
1210
|
+
}
|
|
1211
|
+
}), [["__scopeId", "data-v-89958b5a"]]);
|
|
1212
|
+
//#endregion
|
|
870
1213
|
//#region src/components/BaseTextarea.vue?vue&type=script&setup=true&lang.ts
|
|
871
1214
|
var _hoisted_1$12 = [
|
|
872
1215
|
"id",
|
|
@@ -952,6 +1295,14 @@ var EmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
952
1295
|
description: { default: "" }
|
|
953
1296
|
},
|
|
954
1297
|
setup(__props) {
|
|
1298
|
+
/**
|
|
1299
|
+
* A list with nothing in it yet, said kindly.
|
|
1300
|
+
*
|
|
1301
|
+
* A blank area reads as a page that failed to load, and the reader's first
|
|
1302
|
+
* thought is that something is broken rather than that they have not started.
|
|
1303
|
+
* So there is always a sentence, and the slot below it is where the way out
|
|
1304
|
+
* goes — the button that creates the first one.
|
|
1305
|
+
*/
|
|
955
1306
|
return (_ctx, _cache) => {
|
|
956
1307
|
return openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
957
1308
|
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2$9, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("", true),
|
|
@@ -1035,6 +1386,15 @@ var PageHeader_default = /* @__PURE__ */ defineComponent({
|
|
|
1035
1386
|
__name: "PageHeader",
|
|
1036
1387
|
props: { title: {} },
|
|
1037
1388
|
setup(__props) {
|
|
1389
|
+
/**
|
|
1390
|
+
* The bar at the top of a screen: a title with room either side of it.
|
|
1391
|
+
*
|
|
1392
|
+
* Three fixed columns rather than a flex row, so the title is centred on the
|
|
1393
|
+
* screen rather than centred on what is left after the buttons. A back arrow on
|
|
1394
|
+
* one side and nothing on the other would otherwise push every title off centre
|
|
1395
|
+
* by exactly half a button, which is visible the moment two screens sit next to
|
|
1396
|
+
* each other.
|
|
1397
|
+
*/
|
|
1038
1398
|
return (_ctx, _cache) => {
|
|
1039
1399
|
return openBlock(), createElementBlock("header", _hoisted_1$10, [
|
|
1040
1400
|
createElementVNode("div", _hoisted_2$8, [renderSlot(_ctx.$slots, "left")]),
|
|
@@ -1646,8 +2006,8 @@ function createI18nRuntime(options) {
|
|
|
1646
2006
|
*
|
|
1647
2007
|
* The fallback keeps `vitest` and `vite dev` honest, where no define runs.
|
|
1648
2008
|
*/
|
|
1649
|
-
var VERSION = "0.
|
|
2009
|
+
var VERSION = "1.0.0";
|
|
1650
2010
|
//#endregion
|
|
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 };
|
|
2011
|
+
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, BaseCombobox_default as BaseCombobox, BaseInput_default as BaseInput, BaseMenu_default as BaseMenu, BaseRadioGroup_default as BaseRadioGroup, BaseSelect_default as BaseSelect, BaseSheet_default as BaseSheet, BaseSlider_default as BaseSlider, BaseSpinner_default as BaseSpinner, BaseSwitch_default as BaseSwitch, BaseTable_default as BaseTable, 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, SHEET_ROOT_ID, 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, ensureSheetRoot, 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 };
|
|
1652
2012
|
|
|
1653
2013
|
//# sourceMappingURL=index.js.map
|