rei-kit 0.14.1 → 0.16.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 +8 -1
- package/dist/GoogleButton-BxsrxZdX.js +730 -0
- package/dist/GoogleButton-BxsrxZdX.js.map +1 -0
- package/dist/app/AuthForm.vue.d.ts +78 -0
- package/dist/app/FabButton.vue.d.ts +34 -0
- package/dist/app/OfflineBanner.vue.d.ts +21 -0
- package/dist/app/TabShell.vue.d.ts +63 -0
- package/dist/app/auth-form.d.ts +36 -0
- package/dist/app/field-errors.d.ts +39 -0
- package/dist/app/guards.d.ts +68 -0
- package/dist/app/index.d.ts +13 -0
- package/dist/app/query-defaults.d.ts +43 -0
- package/dist/app/use-tab-transition.d.ts +12 -0
- package/dist/app/write-report.d.ts +43 -0
- package/dist/app.js +448 -15
- package/dist/app.js.map +1 -1
- package/dist/components/GoogleButton.vue.d.ts +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -444
- package/dist/index.js.map +1 -1
- package/dist/styles.css +166 -0
- package/dist/supabase/auth-errors.d.ts +40 -0
- package/dist/supabase/index.d.ts +2 -0
- package/dist/supabase.js +46 -2
- package/dist/supabase.js.map +1 -1
- package/dist/utils/redirect.d.ts +24 -0
- package/package.json +1 -1
- package/dist/BaseSheet-CLIhXDwe.js +0 -253
- package/dist/BaseSheet-CLIhXDwe.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-BxsrxZdX.js";
|
|
2
3
|
import { n as registerErrorMapper, r as toAppError, t as AppError } from "./app-error-DF9cijE0.js";
|
|
3
|
-
import { a as readStoredTheme, i as isThemePreference, n as useVisualViewport, o as setThemeStorageKey, r as applyTheme, s as useTheme, t as BaseSheet_default } from "./BaseSheet-CLIhXDwe.js";
|
|
4
4
|
import { n as _plugin_vue_export_helper_default, r as BaseButton_default, t as SettingsRow_default } from "./SettingsRow-MnVleeTR.js";
|
|
5
|
-
import { Fragment, Teleport, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode,
|
|
5
|
+
import { Fragment, Teleport, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, mergeProps, 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
6
|
import { ArrowDown, ArrowRight, ArrowUp, CheckCircle2, ChevronDown, Info, TriangleAlert, X, XCircle } from "lucide-vue-next";
|
|
7
7
|
import { RouterLink } from "vue-router";
|
|
8
8
|
import { createI18n } from "vue-i18n";
|
|
@@ -102,57 +102,6 @@ function downloadJson(data, filename) {
|
|
|
102
102
|
URL.revokeObjectURL(url);
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
|
-
//#region src/utils/redirect.ts
|
|
106
|
-
/**
|
|
107
|
-
* Resolves a `?redirect=` query value into a safe in-app path.
|
|
108
|
-
*
|
|
109
|
-
* Only same-origin paths are accepted. Anything else falls back to `/`,
|
|
110
|
-
* so a crafted link cannot bounce a user from the real login page to a
|
|
111
|
-
* phishing clone.
|
|
112
|
-
*
|
|
113
|
-
* Pure: takes the query value instead of reading the router, so it also
|
|
114
|
-
* works inside navigation guards and can be unit tested.
|
|
115
|
-
*
|
|
116
|
-
* @param target - Raw `route.query.redirect` value. May be a string, an
|
|
117
|
-
* array (repeated query key), `null`, or `undefined`.
|
|
118
|
-
* @returns A path starting with a single `/`. Defaults to `/`.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```ts
|
|
122
|
-
* // in a view
|
|
123
|
-
* await router.push(safeRedirect(route.query.redirect))
|
|
124
|
-
*
|
|
125
|
-
* // in a guard
|
|
126
|
-
* return safeRedirect(to.query.redirect)
|
|
127
|
-
* ```
|
|
128
|
-
*
|
|
129
|
-
* @example
|
|
130
|
-
* ```ts
|
|
131
|
-
* safeRedirect('/week') // '/week'
|
|
132
|
-
* safeRedirect('https://evil.com') // '/'
|
|
133
|
-
* safeRedirect('//evil.com') // '/' (protocol-relative URL)
|
|
134
|
-
* safeRedirect(['/a', '/b']) // '/'
|
|
135
|
-
* safeRedirect(undefined) // '/'
|
|
136
|
-
* ```
|
|
137
|
-
*/
|
|
138
|
-
function safeRedirect(target) {
|
|
139
|
-
if (typeof target === "string" && target.startsWith("/") && !target.startsWith("//")) return target;
|
|
140
|
-
return "/";
|
|
141
|
-
}
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region src/utils/haptics.ts
|
|
144
|
-
/**
|
|
145
|
-
* A short vibration for a confirmed tap.
|
|
146
|
-
*
|
|
147
|
-
* Optional chaining is not decoration: iOS Safari has no `vibrate` at all, and
|
|
148
|
-
* calling it unguarded would throw on every marked day.
|
|
149
|
-
*
|
|
150
|
-
* @param duration - Milliseconds. Keep it under ~15ms; longer reads as an alert.
|
|
151
|
-
*/
|
|
152
|
-
function tapFeedback(duration = 10) {
|
|
153
|
-
navigator.vibrate?.(duration);
|
|
154
|
-
}
|
|
155
|
-
//#endregion
|
|
156
105
|
//#region src/composables/use-today.ts
|
|
157
106
|
/**
|
|
158
107
|
* Today's date key, kept current while the app stays open.
|
|
@@ -217,41 +166,6 @@ function useToday() {
|
|
|
217
166
|
return readonly(current);
|
|
218
167
|
}
|
|
219
168
|
//#endregion
|
|
220
|
-
//#region src/composables/use-online.ts
|
|
221
|
-
/**
|
|
222
|
-
* Tracks whether the browser thinks it has a network connection.
|
|
223
|
-
*
|
|
224
|
-
* Note the limit: `navigator.onLine` only reports whether a network interface
|
|
225
|
-
* is up, not whether requests actually succeed. Treat it as a hint for the UI,
|
|
226
|
-
* never as a reason to skip error handling.
|
|
227
|
-
*
|
|
228
|
-
* Listeners are removed on unmount, so the composable is safe to call per view.
|
|
229
|
-
*
|
|
230
|
-
* @returns A readonly ref that flips with the browser's online/offline events.
|
|
231
|
-
*
|
|
232
|
-
* @example
|
|
233
|
-
* ```ts
|
|
234
|
-
* const isOnline = useOnline()
|
|
235
|
-
* // <p v-if="!isOnline">You're offline.</p>
|
|
236
|
-
* ```
|
|
237
|
-
*/
|
|
238
|
-
function useOnline() {
|
|
239
|
-
const isOnline = ref(true);
|
|
240
|
-
function update() {
|
|
241
|
-
isOnline.value = navigator.onLine;
|
|
242
|
-
}
|
|
243
|
-
onMounted(() => {
|
|
244
|
-
update();
|
|
245
|
-
window.addEventListener("online", update);
|
|
246
|
-
window.addEventListener("offline", update);
|
|
247
|
-
});
|
|
248
|
-
onUnmounted(() => {
|
|
249
|
-
window.removeEventListener("online", update);
|
|
250
|
-
window.removeEventListener("offline", update);
|
|
251
|
-
});
|
|
252
|
-
return readonly(isOnline);
|
|
253
|
-
}
|
|
254
|
-
//#endregion
|
|
255
169
|
//#region src/composables/use-debounced-callback.ts
|
|
256
170
|
/**
|
|
257
171
|
* Delays a callback until the caller stops calling it.
|
|
@@ -416,167 +330,6 @@ function useMediaQuery(query) {
|
|
|
416
330
|
return matches;
|
|
417
331
|
}
|
|
418
332
|
//#endregion
|
|
419
|
-
//#region src/composables/use-toast.ts
|
|
420
|
-
/**
|
|
421
|
-
* Four seconds: long enough to read a short sentence twice, short enough that
|
|
422
|
-
* a second action does not queue behind it.
|
|
423
|
-
*/
|
|
424
|
-
var DEFAULT_DURATION = 4e3;
|
|
425
|
-
/**
|
|
426
|
-
* A failure is read more slowly than a confirmation, and more often twice.
|
|
427
|
-
*/
|
|
428
|
-
var DANGER_DURATION = 7e3;
|
|
429
|
-
/**
|
|
430
|
-
* Three at once. A fourth pushes the oldest out rather than growing the stack
|
|
431
|
-
* off the top of the screen — an action that produces ten toasts is a loop,
|
|
432
|
-
* and a loop should not be able to cover the app it is running in.
|
|
433
|
-
*/
|
|
434
|
-
var MAX_VISIBLE = 3;
|
|
435
|
-
var items = ref([]);
|
|
436
|
-
var nextId = 0;
|
|
437
|
-
var countdowns = /* @__PURE__ */ new Map();
|
|
438
|
-
function clearCountdown(id) {
|
|
439
|
-
const countdown = countdowns.get(id);
|
|
440
|
-
if (countdown === void 0) return;
|
|
441
|
-
clearTimeout(countdown.handle);
|
|
442
|
-
countdowns.delete(id);
|
|
443
|
-
}
|
|
444
|
-
/** Removes a toast, whether it timed out or was dismissed. */
|
|
445
|
-
function dismiss(id) {
|
|
446
|
-
clearCountdown(id);
|
|
447
|
-
items.value = items.value.filter((item) => item.id !== id);
|
|
448
|
-
}
|
|
449
|
-
/** Removes everything on screen. For a route change, or a sign-out. */
|
|
450
|
-
function dismissAll() {
|
|
451
|
-
for (const id of countdowns.keys()) clearCountdown(id);
|
|
452
|
-
items.value = [];
|
|
453
|
-
}
|
|
454
|
-
function arm(id, remaining) {
|
|
455
|
-
if (typeof window === "undefined" || remaining <= 0) return;
|
|
456
|
-
countdowns.set(id, {
|
|
457
|
-
handle: setTimeout(() => dismiss(id), remaining),
|
|
458
|
-
remaining,
|
|
459
|
-
startedAt: Date.now()
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* Stops the clock on a toast the reader is pointing at.
|
|
464
|
-
*
|
|
465
|
-
* Somebody who has moved the pointer onto it is reading it, and taking it away
|
|
466
|
-
* mid-sentence is the one thing a notification must not do.
|
|
467
|
-
*/
|
|
468
|
-
function pause(id) {
|
|
469
|
-
const countdown = countdowns.get(id);
|
|
470
|
-
if (countdown === void 0) return;
|
|
471
|
-
clearTimeout(countdown.handle);
|
|
472
|
-
countdowns.set(id, {
|
|
473
|
-
...countdown,
|
|
474
|
-
remaining: Math.max(0, countdown.remaining - (Date.now() - countdown.startedAt))
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
/** Starts it again, from where it stopped rather than from the beginning. */
|
|
478
|
-
function resume(id) {
|
|
479
|
-
const countdown = countdowns.get(id);
|
|
480
|
-
if (countdown === void 0) return;
|
|
481
|
-
arm(id, countdown.remaining);
|
|
482
|
-
}
|
|
483
|
-
function push(tone, message, options = {}) {
|
|
484
|
-
const id = ++nextId;
|
|
485
|
-
const duration = options.duration ?? (tone === "danger" ? DANGER_DURATION : DEFAULT_DURATION);
|
|
486
|
-
const next = [...items.value, {
|
|
487
|
-
id,
|
|
488
|
-
message,
|
|
489
|
-
tone,
|
|
490
|
-
duration
|
|
491
|
-
}];
|
|
492
|
-
while (next.length > MAX_VISIBLE) {
|
|
493
|
-
const oldest = next.shift();
|
|
494
|
-
if (oldest !== void 0) clearCountdown(oldest.id);
|
|
495
|
-
}
|
|
496
|
-
items.value = next;
|
|
497
|
-
arm(id, duration);
|
|
498
|
-
return id;
|
|
499
|
-
}
|
|
500
|
-
/**
|
|
501
|
-
* The stack, and the four ways to add to it.
|
|
502
|
-
*
|
|
503
|
-
* @example
|
|
504
|
-
* ```ts
|
|
505
|
-
* const toast = useToast()
|
|
506
|
-
*
|
|
507
|
-
* toast.success(t('habit.saved'))
|
|
508
|
-
* toast.danger(t('common.failed'), { duration: 0 }) // stays until dismissed
|
|
509
|
-
*
|
|
510
|
-
* const id = toast.info(t('export.preparing'), { duration: 0 })
|
|
511
|
-
* toast.dismiss(id)
|
|
512
|
-
* ```
|
|
513
|
-
*/
|
|
514
|
-
function useToast() {
|
|
515
|
-
return {
|
|
516
|
-
/** Every toast on screen, oldest first. `ToastHost` renders this. */
|
|
517
|
-
toasts: readonly(items),
|
|
518
|
-
info: (message, options) => push("info", message, options),
|
|
519
|
-
success: (message, options) => push("success", message, options),
|
|
520
|
-
warning: (message, options) => push("warning", message, options),
|
|
521
|
-
danger: (message, options) => push("danger", message, options),
|
|
522
|
-
dismiss,
|
|
523
|
-
dismissAll,
|
|
524
|
-
pause,
|
|
525
|
-
resume
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
//#endregion
|
|
529
|
-
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
530
|
-
var _hoisted_1$18 = ["role", "aria-live"];
|
|
531
|
-
var _hoisted_2$13 = { class: "min-w-0 flex-1" };
|
|
532
|
-
var _hoisted_3$8 = {
|
|
533
|
-
key: 0,
|
|
534
|
-
class: "text-ink font-semibold"
|
|
535
|
-
};
|
|
536
|
-
//#endregion
|
|
537
|
-
//#region src/components/BaseAlert.vue
|
|
538
|
-
var BaseAlert_default = /* @__PURE__ */ defineComponent({
|
|
539
|
-
__name: "BaseAlert",
|
|
540
|
-
props: {
|
|
541
|
-
tone: { default: "info" },
|
|
542
|
-
assertive: {
|
|
543
|
-
type: Boolean,
|
|
544
|
-
default: false
|
|
545
|
-
}
|
|
546
|
-
},
|
|
547
|
-
setup(__props) {
|
|
548
|
-
const TONES = {
|
|
549
|
-
info: "border-hair bg-muted/40 text-ink",
|
|
550
|
-
success: "border-positive/35 bg-positive/8 text-ink",
|
|
551
|
-
warning: "border-warning/40 bg-warning/8 text-ink",
|
|
552
|
-
danger: "border-negative/35 bg-negative/8 text-ink"
|
|
553
|
-
};
|
|
554
|
-
const MARKS = {
|
|
555
|
-
info: "bg-ink-soft/15 text-ink-soft",
|
|
556
|
-
success: "bg-positive/15 text-positive",
|
|
557
|
-
warning: "bg-warning/15 text-warning",
|
|
558
|
-
danger: "bg-negative/15 text-negative"
|
|
559
|
-
};
|
|
560
|
-
const skin = computed(() => TONES[__props.tone]);
|
|
561
|
-
const mark = computed(() => MARKS[__props.tone]);
|
|
562
|
-
return (_ctx, _cache) => {
|
|
563
|
-
return openBlock(), createElementBlock("div", {
|
|
564
|
-
class: normalizeClass(["rounded-card flex items-start gap-3 border px-4 py-3.5 text-sm leading-relaxed", skin.value]),
|
|
565
|
-
role: __props.assertive ? "alert" : "status",
|
|
566
|
-
"aria-live": __props.assertive ? "assertive" : "polite"
|
|
567
|
-
}, [
|
|
568
|
-
_ctx.$slots.mark ? (openBlock(), createElementBlock("span", {
|
|
569
|
-
key: 0,
|
|
570
|
-
class: normalizeClass(["mt-px grid size-6 shrink-0 place-items-center rounded-full text-xs font-semibold", mark.value]),
|
|
571
|
-
"aria-hidden": "true"
|
|
572
|
-
}, [renderSlot(_ctx.$slots, "mark")], 2)) : createCommentVNode("", true),
|
|
573
|
-
createElementVNode("div", _hoisted_2$13, [_ctx.$slots.title ? (openBlock(), createElementBlock("p", _hoisted_3$8, [renderSlot(_ctx.$slots, "title")])) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(_ctx.$slots.title ? "mt-1" : "") }, [renderSlot(_ctx.$slots, "default")], 2)]),
|
|
574
|
-
renderSlot(_ctx.$slots, "action")
|
|
575
|
-
], 10, _hoisted_1$18);
|
|
576
|
-
};
|
|
577
|
-
}
|
|
578
|
-
});
|
|
579
|
-
//#endregion
|
|
580
333
|
//#region src/components/BaseBadge.vue
|
|
581
334
|
var BaseBadge_default = /* @__PURE__ */ defineComponent({
|
|
582
335
|
__name: "BaseBadge",
|
|
@@ -596,118 +349,6 @@ var BaseBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
596
349
|
}
|
|
597
350
|
});
|
|
598
351
|
//#endregion
|
|
599
|
-
//#region src/components/FormField.vue?vue&type=script&setup=true&lang.ts
|
|
600
|
-
var _hoisted_1$17 = ["for"];
|
|
601
|
-
//#endregion
|
|
602
|
-
//#region src/components/FormField.vue
|
|
603
|
-
var FormField_default = /* @__PURE__ */ defineComponent({
|
|
604
|
-
__name: "FormField",
|
|
605
|
-
props: {
|
|
606
|
-
label: {},
|
|
607
|
-
error: { default: "" },
|
|
608
|
-
hint: { default: "" },
|
|
609
|
-
size: { default: "md" },
|
|
610
|
-
labelHidden: {
|
|
611
|
-
type: Boolean,
|
|
612
|
-
default: false
|
|
613
|
-
}
|
|
614
|
-
},
|
|
615
|
-
setup(__props) {
|
|
616
|
-
const id = useId();
|
|
617
|
-
const errorId = `${id}-error`;
|
|
618
|
-
const hintId = `${id}-hint`;
|
|
619
|
-
const describedBy = computed(() => {
|
|
620
|
-
if (__props.error) return errorId;
|
|
621
|
-
if (__props.hint) return hintId;
|
|
622
|
-
});
|
|
623
|
-
return (_ctx, _cache) => {
|
|
624
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass(["flex flex-col", __props.size === "sm" ? "gap-1" : "gap-1.5"]) }, [
|
|
625
|
-
createElementVNode("label", {
|
|
626
|
-
for: unref(id),
|
|
627
|
-
class: normalizeClass(["font-medium", [__props.labelHidden ? "sr-only" : "", __props.size === "sm" ? "text-ink-soft text-xs" : "text-ink text-sm"]])
|
|
628
|
-
}, toDisplayString(__props.label), 11, _hoisted_1$17),
|
|
629
|
-
renderSlot(_ctx.$slots, "default", {
|
|
630
|
-
id: unref(id),
|
|
631
|
-
describedBy: describedBy.value,
|
|
632
|
-
invalid: Boolean(__props.error),
|
|
633
|
-
size: __props.size
|
|
634
|
-
}),
|
|
635
|
-
__props.error ? (openBlock(), createElementBlock("p", {
|
|
636
|
-
key: 0,
|
|
637
|
-
id: errorId,
|
|
638
|
-
class: "text-negative text-xs"
|
|
639
|
-
}, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", {
|
|
640
|
-
key: 1,
|
|
641
|
-
id: hintId,
|
|
642
|
-
class: "text-ink-soft text-xs"
|
|
643
|
-
}, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
644
|
-
], 2);
|
|
645
|
-
};
|
|
646
|
-
}
|
|
647
|
-
});
|
|
648
|
-
//#endregion
|
|
649
|
-
//#region src/components/BaseInput.vue?vue&type=script&setup=true&lang.ts
|
|
650
|
-
var _hoisted_1$16 = [
|
|
651
|
-
"id",
|
|
652
|
-
"type",
|
|
653
|
-
"aria-invalid",
|
|
654
|
-
"aria-describedby"
|
|
655
|
-
];
|
|
656
|
-
var CONTROL_CLASS = "h-11 text-base";
|
|
657
|
-
//#endregion
|
|
658
|
-
//#region src/components/BaseInput.vue
|
|
659
|
-
var BaseInput_default = /* @__PURE__ */ defineComponent({
|
|
660
|
-
inheritAttrs: false,
|
|
661
|
-
__name: "BaseInput",
|
|
662
|
-
props: /*@__PURE__*/ mergeModels({
|
|
663
|
-
label: {},
|
|
664
|
-
error: { default: "" },
|
|
665
|
-
hint: { default: "" },
|
|
666
|
-
labelHidden: {
|
|
667
|
-
type: Boolean,
|
|
668
|
-
default: false
|
|
669
|
-
},
|
|
670
|
-
type: { default: "text" },
|
|
671
|
-
size: { default: "md" },
|
|
672
|
-
variant: { default: "default" }
|
|
673
|
-
}, {
|
|
674
|
-
"modelValue": {},
|
|
675
|
-
"modelModifiers": {}
|
|
676
|
-
}),
|
|
677
|
-
emits: ["update:modelValue"],
|
|
678
|
-
setup(__props) {
|
|
679
|
-
const model = useModel(__props, "modelValue");
|
|
680
|
-
return (_ctx, _cache) => {
|
|
681
|
-
return openBlock(), createBlock(FormField_default, {
|
|
682
|
-
label: __props.label,
|
|
683
|
-
error: __props.error,
|
|
684
|
-
hint: __props.hint,
|
|
685
|
-
"label-hidden": __props.labelHidden,
|
|
686
|
-
size: __props.size
|
|
687
|
-
}, {
|
|
688
|
-
default: withCtx(({ id, describedBy, invalid }) => [withDirectives(createElementVNode("input", mergeProps({
|
|
689
|
-
id,
|
|
690
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
691
|
-
type: __props.type,
|
|
692
|
-
"aria-invalid": invalid,
|
|
693
|
-
"aria-describedby": describedBy
|
|
694
|
-
}, _ctx.$attrs, { class: [
|
|
695
|
-
__props.variant === "unstyled" ? "" : "border-hair bg-surface text-ink rounded-card focus-visible:outline-primary border px-3 focus-visible:outline-2 focus-visible:outline-offset-1",
|
|
696
|
-
__props.variant === "unstyled" ? "text-base" : CONTROL_CLASS,
|
|
697
|
-
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
698
|
-
] }), null, 16, _hoisted_1$16), [[vModelDynamic, model.value]])]),
|
|
699
|
-
_: 1
|
|
700
|
-
}, 8, [
|
|
701
|
-
"label",
|
|
702
|
-
"error",
|
|
703
|
-
"hint",
|
|
704
|
-
"label-hidden",
|
|
705
|
-
"size"
|
|
706
|
-
]);
|
|
707
|
-
};
|
|
708
|
-
}
|
|
709
|
-
});
|
|
710
|
-
//#endregion
|
|
711
352
|
//#region src/components/BaseCard.vue
|
|
712
353
|
var BaseCard_default = /* @__PURE__ */ defineComponent({
|
|
713
354
|
__name: "BaseCard",
|
|
@@ -773,70 +414,6 @@ var BaseCard_default = /* @__PURE__ */ defineComponent({
|
|
|
773
414
|
}
|
|
774
415
|
});
|
|
775
416
|
//#endregion
|
|
776
|
-
//#region src/components/BaseCheckbox.vue?vue&type=script&setup=true&lang.ts
|
|
777
|
-
var _hoisted_1$15 = { class: "flex flex-col gap-1.5" };
|
|
778
|
-
var _hoisted_2$12 = ["for"];
|
|
779
|
-
var _hoisted_3$7 = [
|
|
780
|
-
"id",
|
|
781
|
-
"disabled",
|
|
782
|
-
"aria-invalid",
|
|
783
|
-
"aria-describedby"
|
|
784
|
-
];
|
|
785
|
-
//#endregion
|
|
786
|
-
//#region src/components/BaseCheckbox.vue
|
|
787
|
-
var BaseCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
788
|
-
__name: "BaseCheckbox",
|
|
789
|
-
props: /*@__PURE__*/ mergeModels({
|
|
790
|
-
label: {},
|
|
791
|
-
error: { default: "" },
|
|
792
|
-
hint: { default: "" },
|
|
793
|
-
disabled: {
|
|
794
|
-
type: Boolean,
|
|
795
|
-
default: false
|
|
796
|
-
},
|
|
797
|
-
size: { default: "md" }
|
|
798
|
-
}, {
|
|
799
|
-
"modelValue": {
|
|
800
|
-
type: Boolean,
|
|
801
|
-
default: false
|
|
802
|
-
},
|
|
803
|
-
"modelModifiers": {}
|
|
804
|
-
}),
|
|
805
|
-
emits: ["update:modelValue"],
|
|
806
|
-
setup(__props) {
|
|
807
|
-
const model = useModel(__props, "modelValue");
|
|
808
|
-
const id = useId();
|
|
809
|
-
const errorId = `${id}-error`;
|
|
810
|
-
const hintId = `${id}-hint`;
|
|
811
|
-
const describedBy = computed(() => {
|
|
812
|
-
if (__props.error) return errorId;
|
|
813
|
-
if (__props.hint) return hintId;
|
|
814
|
-
});
|
|
815
|
-
return (_ctx, _cache) => {
|
|
816
|
-
return openBlock(), createElementBlock("div", _hoisted_1$15, [createElementVNode("label", {
|
|
817
|
-
for: unref(id),
|
|
818
|
-
class: normalizeClass(["flex items-center", [__props.size === "sm" ? "gap-2" : "gap-3", __props.disabled ? "opacity-50" : "cursor-pointer"]])
|
|
819
|
-
}, [withDirectives(createElementVNode("input", {
|
|
820
|
-
id: unref(id),
|
|
821
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
822
|
-
type: "checkbox",
|
|
823
|
-
disabled: __props.disabled,
|
|
824
|
-
"aria-invalid": Boolean(__props.error),
|
|
825
|
-
"aria-describedby": describedBy.value,
|
|
826
|
-
class: "accent-primary focus-visible:outline-primary size-4 shrink-0 focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
827
|
-
}, null, 8, _hoisted_3$7), [[vModelCheckbox, model.value]]), createElementVNode("span", { class: normalizeClass(["text-sm", __props.size === "sm" ? "text-ink-soft" : "text-ink"]) }, toDisplayString(__props.label), 3)], 10, _hoisted_2$12), __props.error ? (openBlock(), createElementBlock("p", {
|
|
828
|
-
key: 0,
|
|
829
|
-
id: errorId,
|
|
830
|
-
class: "text-negative text-xs"
|
|
831
|
-
}, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", {
|
|
832
|
-
key: 1,
|
|
833
|
-
id: hintId,
|
|
834
|
-
class: "text-ink-soft text-xs"
|
|
835
|
-
}, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)]);
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
});
|
|
839
|
-
//#endregion
|
|
840
417
|
//#region src/components/BaseRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
841
418
|
var _hoisted_1$14 = ["aria-describedby"];
|
|
842
419
|
var _hoisted_2$11 = [
|
|
@@ -1583,23 +1160,6 @@ var LocaleLinks_default = /* @__PURE__ */ defineComponent({
|
|
|
1583
1160
|
}
|
|
1584
1161
|
});
|
|
1585
1162
|
//#endregion
|
|
1586
|
-
//#region src/components/GoogleButton.vue
|
|
1587
|
-
var GoogleButton_default = /* @__PURE__ */ defineComponent({
|
|
1588
|
-
__name: "GoogleButton",
|
|
1589
|
-
props: { label: {} },
|
|
1590
|
-
emits: ["click"],
|
|
1591
|
-
setup(__props, { emit: __emit }) {
|
|
1592
|
-
const emit = __emit;
|
|
1593
|
-
return (_ctx, _cache) => {
|
|
1594
|
-
return openBlock(), createElementBlock("button", {
|
|
1595
|
-
type: "button",
|
|
1596
|
-
class: "border-hair bg-surface text-ink rounded-card hover:bg-muted flex h-11 w-full items-center justify-center gap-2 border text-sm font-medium transition-colors active:scale-95",
|
|
1597
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("click"))
|
|
1598
|
-
}, [_cache[1] || (_cache[1] = createStaticVNode("<svg class=\"size-4\" viewBox=\"0 0 48 48\" aria-hidden=\"true\"><path fill=\"#EA4335\" d=\"M24 9.5c3.5 0 6.6 1.2 9 3.6l6.7-6.7C35.6 2.7 30.2.5 24 .5 14.6.5 6.5 5.9 2.6 13.7l7.8 6.1C12.3 13.7 17.7 9.5 24 9.5z\"></path><path fill=\"#4285F4\" d=\"M46.5 24.5c0-1.6-.1-3.1-.4-4.5H24v9h12.7c-.6 3-2.3 5.6-4.9 7.3l7.6 5.9c4.4-4.1 7.1-10.2 7.1-17.7z\"></path><path fill=\"#FBBC05\" d=\"M10.4 28.2a14.6 14.6 0 0 1 0-8.4l-7.8-6.1a24 24 0 0 0 0 20.6l7.8-6.1z\"></path><path fill=\"#34A853\" d=\"M24 47.5c6.2 0 11.5-2 15.4-5.6l-7.6-5.9c-2.1 1.4-4.8 2.3-7.8 2.3-6.3 0-11.7-4.2-13.6-10l-7.8 6.1C6.5 42.1 14.6 47.5 24 47.5z\"></path></svg>", 1)), createTextVNode(" " + toDisplayString(__props.label), 1)]);
|
|
1599
|
-
};
|
|
1600
|
-
}
|
|
1601
|
-
});
|
|
1602
|
-
//#endregion
|
|
1603
1163
|
//#region src/components/TabBar.vue?vue&type=script&setup=true&lang.ts
|
|
1604
1164
|
var _hoisted_1 = { class: "tab-bar" };
|
|
1605
1165
|
var _hoisted_2 = ["aria-label"];
|
|
@@ -1781,8 +1341,8 @@ function createI18nRuntime(options) {
|
|
|
1781
1341
|
*
|
|
1782
1342
|
* The fallback keeps `vitest` and `vite dev` honest, where no define runs.
|
|
1783
1343
|
*/
|
|
1784
|
-
var VERSION = "0.
|
|
1344
|
+
var VERSION = "0.16.0";
|
|
1785
1345
|
//#endregion
|
|
1786
|
-
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, todayKey, useDebouncedCallback, useDragScroll, useMediaQuery, useOnline, useTheme, useToast, useToday, useVisualViewport };
|
|
1346
|
+
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 };
|
|
1787
1347
|
|
|
1788
1348
|
//# sourceMappingURL=index.js.map
|