rei-kit 1.0.3 → 2.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 +100 -15
- package/dist/{GoogleButton-lxNEycyw.js → GoogleButton-DS-3rpUA.js} +6 -6
- package/dist/GoogleButton-DS-3rpUA.js.map +1 -0
- package/dist/{SettingsGroup-JsD19V81.js → SettingsGroup-BXkajKGl.js} +2 -2
- package/dist/{SettingsGroup-JsD19V81.js.map → SettingsGroup-BXkajKGl.js.map} +1 -1
- package/dist/{SettingsRow-3lPRJbBZ.js → SettingsRow-BXFn8tCk.js} +12 -12
- package/dist/SettingsRow-BXFn8tCk.js.map +1 -0
- package/dist/app.js +7 -7
- package/dist/app.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +130 -30
- package/dist/index.js.map +1 -1
- package/dist/materials/brutal.css +32 -0
- package/dist/materials/glass.css +104 -0
- package/dist/materials/quiet.css +39 -0
- package/dist/materials/soft.css +57 -0
- package/dist/materials.css +15 -0
- package/dist/palettes/palettes.generated.json.d.ts +475 -0
- package/dist/palettes.css +420 -0
- package/dist/pwa.js +4 -4
- package/dist/pwa.js.map +1 -1
- package/dist/shell/mobile.css +7 -7
- package/dist/shell/web.css +4 -4
- package/dist/styles.css +296 -426
- package/dist/tokens.css +254 -8
- package/dist/utils/appearance.d.ts +71 -0
- package/dist/web.js +9 -9
- package/dist/web.js.map +1 -1
- package/package.json +21 -5
- package/dist/GoogleButton-lxNEycyw.js.map +0 -1
- package/dist/SettingsRow-3lPRJbBZ.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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, v as SHEET_ROOT_ID, y as ensureSheetRoot } 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-BXkajKGl.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-DS-3rpUA.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
|
-
import { n as BaseButton_default, t as SettingsRow_default } from "./SettingsRow-
|
|
5
|
+
import { n as BaseButton_default, t as SettingsRow_default } from "./SettingsRow-BXFn8tCk.js";
|
|
6
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";
|
|
@@ -103,6 +103,106 @@ function downloadJson(data, filename) {
|
|
|
103
103
|
URL.revokeObjectURL(url);
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
|
+
//#region src/palettes/palettes.generated.json
|
|
107
|
+
var palettes_generated_default = /*#__PURE__*/ JSON.parse("[{\"name\":\"rei\",\"label\":\"Rei\",\"origin\":\"rei-kit\",\"light\":{\"primary\":\"#26667f\",\"accent\":\"#124170\",\"positive\":\"#67c090\",\"negative\":\"#c9463b\",\"warning\":\"#d89a3e\",\"canvas\":\"#f4faf8\",\"surface\":\"#ffffff\",\"muted\":\"#ddf4e7\",\"ink\":\"#0f2229\",\"inkSoft\":\"#5c7480\",\"hair\":\"#e1edea\",\"onPrimary\":\"#ffffff\",\"onAccent\":\"#ffffff\",\"onPositive\":\"#07141a\",\"onNegative\":\"#ffffff\",\"onWarning\":\"#07141a\"},\"dark\":{\"primary\":\"#5fb0c9\",\"accent\":\"#8cb8e0\",\"positive\":\"#67c090\",\"negative\":\"#f07a6f\",\"warning\":\"#e6ad58\",\"canvas\":\"#07141a\",\"surface\":\"#102630\",\"muted\":\"#12303a\",\"ink\":\"#e6f0ee\",\"inkSoft\":\"#8fa8b2\",\"hair\":\"#1c3945\",\"onPrimary\":\"#07141a\",\"onAccent\":\"#07141a\",\"onPositive\":\"#07141a\",\"onNegative\":\"#07141a\",\"onWarning\":\"#07141a\"},\"swatch\":[\"#26667f\",\"#124170\",\"#67c090\",\"#d89a3e\"]},{\"name\":\"nord\",\"label\":\"Nord\",\"origin\":\"Arctic Ice Studio\",\"light\":{\"primary\":\"#5e81ac\",\"accent\":\"#b48ead\",\"positive\":\"#a3be8c\",\"negative\":\"#bf616a\",\"warning\":\"#ebcb8b\",\"canvas\":\"#eceff4\",\"surface\":\"#ffffff\",\"muted\":\"#e5e9f0\",\"ink\":\"#2e3440\",\"inkSoft\":\"#4c566a\",\"hair\":\"#d8dee9\",\"onPrimary\":\"#111111\",\"onAccent\":\"#111111\",\"onPositive\":\"#2e3440\",\"onNegative\":\"#111111\",\"onWarning\":\"#2e3440\"},\"dark\":{\"primary\":\"#88c0d0\",\"accent\":\"#b48ead\",\"positive\":\"#a3be8c\",\"negative\":\"#bf616a\",\"warning\":\"#ebcb8b\",\"canvas\":\"#2e3440\",\"surface\":\"#3b4252\",\"muted\":\"#434c5e\",\"ink\":\"#eceff4\",\"inkSoft\":\"#d8dee9\",\"hair\":\"#4c566a\",\"onPrimary\":\"#2e3440\",\"onAccent\":\"#111111\",\"onPositive\":\"#2e3440\",\"onNegative\":\"#111111\",\"onWarning\":\"#2e3440\"},\"swatch\":[\"#5e81ac\",\"#b48ead\",\"#a3be8c\",\"#ebcb8b\"]},{\"name\":\"dracula\",\"label\":\"Dracula\",\"origin\":\"Dracula Theme\",\"swatch\":[\"#bd93f9\",\"#ff79c6\",\"#50fa7b\",\"#282a36\"],\"light\":{\"primary\":\"#644ac9\",\"accent\":\"#a3144d\",\"positive\":\"#14710a\",\"negative\":\"#cb3a2a\",\"warning\":\"#a34d14\",\"canvas\":\"#fffbeb\",\"surface\":\"#ffffff\",\"muted\":\"#f3eeda\",\"ink\":\"#1f1f1f\",\"inkSoft\":\"#635d4f\",\"hair\":\"#e6e0c8\",\"onPrimary\":\"#ffffff\",\"onAccent\":\"#ffffff\",\"onPositive\":\"#ffffff\",\"onNegative\":\"#ffffff\",\"onWarning\":\"#ffffff\"},\"dark\":{\"primary\":\"#bd93f9\",\"accent\":\"#ff79c6\",\"positive\":\"#50fa7b\",\"negative\":\"#ff5555\",\"warning\":\"#ffb86c\",\"canvas\":\"#21222c\",\"surface\":\"#282a36\",\"muted\":\"#343746\",\"ink\":\"#f8f8f2\",\"inkSoft\":\"#b6b9cf\",\"hair\":\"#44475a\",\"onPrimary\":\"#1f1f1f\",\"onAccent\":\"#1f1f1f\",\"onPositive\":\"#1f1f1f\",\"onNegative\":\"#1f1f1f\",\"onWarning\":\"#1f1f1f\"}},{\"name\":\"catppuccin\",\"label\":\"Catppuccin\",\"origin\":\"Catppuccin\",\"light\":{\"primary\":\"#8839ef\",\"accent\":\"#1e66f5\",\"positive\":\"#40a02b\",\"negative\":\"#d20f39\",\"warning\":\"#df8e1d\",\"canvas\":\"#eff1f5\",\"surface\":\"#ffffff\",\"muted\":\"#e6e9ef\",\"ink\":\"#4c4f69\",\"inkSoft\":\"#5c5f77\",\"hair\":\"#ccd0da\",\"onPrimary\":\"#ffffff\",\"onAccent\":\"#ffffff\",\"onPositive\":\"#1e1e2e\",\"onNegative\":\"#ffffff\",\"onWarning\":\"#1e1e2e\"},\"dark\":{\"primary\":\"#cba6f7\",\"accent\":\"#89b4fa\",\"positive\":\"#a6e3a1\",\"negative\":\"#f38ba8\",\"warning\":\"#f9e2af\",\"canvas\":\"#1e1e2e\",\"surface\":\"#24273a\",\"muted\":\"#313244\",\"ink\":\"#cdd6f4\",\"inkSoft\":\"#a6adc8\",\"hair\":\"#45475a\",\"onPrimary\":\"#1e1e2e\",\"onAccent\":\"#1e1e2e\",\"onPositive\":\"#1e1e2e\",\"onNegative\":\"#1e1e2e\",\"onWarning\":\"#1e1e2e\"},\"swatch\":[\"#8839ef\",\"#1e66f5\",\"#40a02b\",\"#df8e1d\"]},{\"name\":\"solarized\",\"label\":\"Solarized\",\"origin\":\"Ethan Schoonover\",\"light\":{\"primary\":\"#268bd2\",\"accent\":\"#6a6fc0\",\"positive\":\"#859900\",\"negative\":\"#dc322f\",\"warning\":\"#b58900\",\"canvas\":\"#fdf6e3\",\"surface\":\"#fffcf3\",\"muted\":\"#eee8d5\",\"ink\":\"#073642\",\"inkSoft\":\"#586e75\",\"hair\":\"#e4dcc4\",\"onPrimary\":\"#111111\",\"onAccent\":\"#ffffff\",\"onPositive\":\"#002b36\",\"onNegative\":\"#ffffff\",\"onWarning\":\"#002b36\"},\"dark\":{\"primary\":\"#268bd2\",\"accent\":\"#6a6fc0\",\"positive\":\"#859900\",\"negative\":\"#dc322f\",\"warning\":\"#b58900\",\"canvas\":\"#002b36\",\"surface\":\"#073642\",\"muted\":\"#0b3f4c\",\"ink\":\"#eee8d5\",\"inkSoft\":\"#93a1a1\",\"hair\":\"#16505e\",\"onPrimary\":\"#111111\",\"onAccent\":\"#ffffff\",\"onPositive\":\"#002b36\",\"onNegative\":\"#ffffff\",\"onWarning\":\"#002b36\"},\"swatch\":[\"#268bd2\",\"#6a6fc0\",\"#859900\",\"#b58900\"]},{\"name\":\"gruvbox\",\"label\":\"Gruvbox\",\"origin\":\"morhetz\",\"light\":{\"primary\":\"#076678\",\"accent\":\"#8f3f71\",\"positive\":\"#79740e\",\"negative\":\"#9d0006\",\"warning\":\"#b57614\",\"canvas\":\"#fbf1c7\",\"surface\":\"#fdf7dd\",\"muted\":\"#ebdbb2\",\"ink\":\"#3c3836\",\"inkSoft\":\"#665c54\",\"hair\":\"#e2cfa4\",\"onPrimary\":\"#ffffff\",\"onAccent\":\"#ffffff\",\"onPositive\":\"#ffffff\",\"onNegative\":\"#ffffff\",\"onWarning\":\"#111111\"},\"dark\":{\"primary\":\"#83a598\",\"accent\":\"#d3869b\",\"positive\":\"#b8bb26\",\"negative\":\"#fb4934\",\"warning\":\"#fabd2f\",\"canvas\":\"#282828\",\"surface\":\"#32302f\",\"muted\":\"#3c3836\",\"ink\":\"#ebdbb2\",\"inkSoft\":\"#bdae93\",\"hair\":\"#504945\",\"onPrimary\":\"#282828\",\"onAccent\":\"#282828\",\"onPositive\":\"#282828\",\"onNegative\":\"#111111\",\"onWarning\":\"#282828\"},\"swatch\":[\"#076678\",\"#8f3f71\",\"#79740e\",\"#b57614\"]},{\"name\":\"tokyo-night\",\"label\":\"Tokyo Night\",\"origin\":\"enkia\",\"swatch\":[\"#7aa2f7\",\"#bb9af7\",\"#9ece6a\",\"#1a1b26\"],\"light\":{\"primary\":\"#2e7de9\",\"accent\":\"#9351ea\",\"positive\":\"#587539\",\"negative\":\"#f52a65\",\"warning\":\"#8c6c3e\",\"canvas\":\"#e1e2e7\",\"surface\":\"#f5f5f8\",\"muted\":\"#d5d6db\",\"ink\":\"#3760bf\",\"inkSoft\":\"#536297\",\"hair\":\"#c4c8da\",\"onPrimary\":\"#111111\",\"onAccent\":\"#ffffff\",\"onPositive\":\"#ffffff\",\"onNegative\":\"#16161e\",\"onWarning\":\"#ffffff\"},\"dark\":{\"primary\":\"#7aa2f7\",\"accent\":\"#bb9af7\",\"positive\":\"#9ece6a\",\"negative\":\"#f7768e\",\"warning\":\"#e0af68\",\"canvas\":\"#16161e\",\"surface\":\"#1a1b26\",\"muted\":\"#292e42\",\"ink\":\"#c0caf5\",\"inkSoft\":\"#a9b1d6\",\"hair\":\"#2f3549\",\"onPrimary\":\"#16161e\",\"onAccent\":\"#16161e\",\"onPositive\":\"#16161e\",\"onNegative\":\"#16161e\",\"onWarning\":\"#16161e\"}},{\"name\":\"rose-pine\",\"label\":\"Rosé Pine\",\"origin\":\"Rosé Pine\",\"light\":{\"primary\":\"#286983\",\"accent\":\"#907aa9\",\"positive\":\"#56949f\",\"negative\":\"#b4637a\",\"warning\":\"#ea9d34\",\"canvas\":\"#faf4ed\",\"surface\":\"#fffaf3\",\"muted\":\"#f2e9e1\",\"ink\":\"#575279\",\"inkSoft\":\"#716d89\",\"hair\":\"#dfdad9\",\"onPrimary\":\"#ffffff\",\"onAccent\":\"#191724\",\"onPositive\":\"#191724\",\"onNegative\":\"#111111\",\"onWarning\":\"#191724\"},\"dark\":{\"primary\":\"#9ccfd8\",\"accent\":\"#c4a7e7\",\"positive\":\"#31748f\",\"negative\":\"#eb6f92\",\"warning\":\"#f6c177\",\"canvas\":\"#191724\",\"surface\":\"#1f1d2e\",\"muted\":\"#26233a\",\"ink\":\"#e0def4\",\"inkSoft\":\"#908caa\",\"hair\":\"#403d52\",\"onPrimary\":\"#191724\",\"onAccent\":\"#191724\",\"onPositive\":\"#ffffff\",\"onNegative\":\"#191724\",\"onWarning\":\"#191724\"},\"swatch\":[\"#286983\",\"#907aa9\",\"#56949f\",\"#ea9d34\"]},{\"name\":\"sakura\",\"label\":\"Sakura\",\"origin\":\"rei-kit\",\"light\":{\"primary\":\"#c2415d\",\"accent\":\"#7a3b4f\",\"positive\":\"#3f8f6a\",\"negative\":\"#c43d3d\",\"warning\":\"#c98a2a\",\"canvas\":\"#fdf6f7\",\"surface\":\"#ffffff\",\"muted\":\"#fbe4e8\",\"ink\":\"#2a1b1f\",\"inkSoft\":\"#6f5a5f\",\"hair\":\"#f0dde1\",\"onPrimary\":\"#ffffff\",\"onAccent\":\"#ffffff\",\"onPositive\":\"#1a1013\",\"onNegative\":\"#ffffff\",\"onWarning\":\"#1a1013\"},\"dark\":{\"primary\":\"#f08aa0\",\"accent\":\"#d7a1b3\",\"positive\":\"#6fc39a\",\"negative\":\"#f07a7a\",\"warning\":\"#e6b060\",\"canvas\":\"#1a1013\",\"surface\":\"#24171b\",\"muted\":\"#321f25\",\"ink\":\"#f6e8eb\",\"inkSoft\":\"#c3a9b0\",\"hair\":\"#3d2930\",\"onPrimary\":\"#1a1013\",\"onAccent\":\"#1a1013\",\"onPositive\":\"#1a1013\",\"onNegative\":\"#1a1013\",\"onWarning\":\"#1a1013\"},\"swatch\":[\"#c2415d\",\"#7a3b4f\",\"#3f8f6a\",\"#c98a2a\"]},{\"name\":\"matcha\",\"label\":\"Matcha\",\"origin\":\"rei-kit\",\"light\":{\"primary\":\"#5a7a2e\",\"accent\":\"#3d5a3a\",\"positive\":\"#4a8a4f\",\"negative\":\"#b8473a\",\"warning\":\"#b8862c\",\"canvas\":\"#f6f7f0\",\"surface\":\"#ffffff\",\"muted\":\"#e7ecd6\",\"ink\":\"#1e2418\",\"inkSoft\":\"#5b6450\",\"hair\":\"#e1e6d3\",\"onPrimary\":\"#ffffff\",\"onAccent\":\"#ffffff\",\"onPositive\":\"#111111\",\"onNegative\":\"#ffffff\",\"onWarning\":\"#11140d\"},\"dark\":{\"primary\":\"#a8c77a\",\"accent\":\"#8fb58a\",\"positive\":\"#7cc281\",\"negative\":\"#e8826f\",\"warning\":\"#e0b35c\",\"canvas\":\"#11140d\",\"surface\":\"#191d13\",\"muted\":\"#242a1b\",\"ink\":\"#eef1e6\",\"inkSoft\":\"#aab39e\",\"hair\":\"#2e3525\",\"onPrimary\":\"#11140d\",\"onAccent\":\"#11140d\",\"onPositive\":\"#11140d\",\"onNegative\":\"#11140d\",\"onWarning\":\"#11140d\"},\"swatch\":[\"#5a7a2e\",\"#3d5a3a\",\"#4a8a4f\",\"#b8862c\"]}]");
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/utils/appearance.ts
|
|
110
|
+
var MATERIALS = [
|
|
111
|
+
"quiet",
|
|
112
|
+
"glass",
|
|
113
|
+
"brutal",
|
|
114
|
+
"soft"
|
|
115
|
+
];
|
|
116
|
+
function isMaterial(value) {
|
|
117
|
+
return typeof value === "string" && MATERIALS.includes(value);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Switches the material for everything under `root`.
|
|
121
|
+
*
|
|
122
|
+
* `quiet` removes the attribute rather than writing it, because quiet is what
|
|
123
|
+
* the tokens already are — there is nothing to override.
|
|
124
|
+
*
|
|
125
|
+
* Needs `rei-kit/materials.css` (or the one material file) imported after
|
|
126
|
+
* `tokens.css`, or the attribute changes nothing.
|
|
127
|
+
*/
|
|
128
|
+
function applyMaterial(material, root) {
|
|
129
|
+
const el = root ?? (typeof document === "undefined" ? void 0 : document.documentElement);
|
|
130
|
+
if (!el) return;
|
|
131
|
+
if (material === "quiet") delete el.dataset["material"];
|
|
132
|
+
else el.dataset["material"] = material;
|
|
133
|
+
}
|
|
134
|
+
var PALETTES = palettes_generated_default;
|
|
135
|
+
function isPaletteName(value) {
|
|
136
|
+
return typeof value === "string" && PALETTES.some((p) => p.name === value);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Switches the palette for everything under `root`.
|
|
140
|
+
*
|
|
141
|
+
* `rei` is the tokens' own palette, so it removes the attribute. Needs
|
|
142
|
+
* `rei-kit/palettes.css` imported after `tokens.css`.
|
|
143
|
+
*/
|
|
144
|
+
function applyPalette(name, root) {
|
|
145
|
+
const el = root ?? (typeof document === "undefined" ? void 0 : document.documentElement);
|
|
146
|
+
if (!el) return;
|
|
147
|
+
if (name === "rei") delete el.dataset["palette"];
|
|
148
|
+
else el.dataset["palette"] = name;
|
|
149
|
+
}
|
|
150
|
+
function stored(key, accept, fallback) {
|
|
151
|
+
try {
|
|
152
|
+
const value = localStorage.getItem(key);
|
|
153
|
+
return accept(value) ? value : fallback;
|
|
154
|
+
} catch {
|
|
155
|
+
return fallback;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function store(key, value) {
|
|
159
|
+
try {
|
|
160
|
+
localStorage.setItem(key, value);
|
|
161
|
+
} catch {}
|
|
162
|
+
}
|
|
163
|
+
var materialKey = "rei-material";
|
|
164
|
+
var materialRef = null;
|
|
165
|
+
/** Call once at startup, before `useMaterial`, to namespace the stored value. */
|
|
166
|
+
function setMaterialStorageKey(key) {
|
|
167
|
+
materialKey = key;
|
|
168
|
+
if (materialRef) materialRef.value = stored(key, isMaterial, "quiet");
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* The active material, as a writable ref. Assigning it stores and applies it.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```ts
|
|
175
|
+
* const material = useMaterial()
|
|
176
|
+
* material.value = 'glass'
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
function useMaterial() {
|
|
180
|
+
if (materialRef) return materialRef;
|
|
181
|
+
materialRef = ref(stored(materialKey, isMaterial, "quiet"));
|
|
182
|
+
watch(materialRef, (next) => {
|
|
183
|
+
store(materialKey, next);
|
|
184
|
+
applyMaterial(next);
|
|
185
|
+
}, { immediate: true });
|
|
186
|
+
return materialRef;
|
|
187
|
+
}
|
|
188
|
+
var paletteKey = "rei-palette";
|
|
189
|
+
var paletteRef = null;
|
|
190
|
+
/** Call once at startup, before `usePalette`, to namespace the stored value. */
|
|
191
|
+
function setPaletteStorageKey(key) {
|
|
192
|
+
paletteKey = key;
|
|
193
|
+
if (paletteRef) paletteRef.value = stored(key, isPaletteName, "rei");
|
|
194
|
+
}
|
|
195
|
+
/** The active palette's name, as a writable ref. Assigning it stores and applies it. */
|
|
196
|
+
function usePalette() {
|
|
197
|
+
if (paletteRef) return paletteRef;
|
|
198
|
+
paletteRef = ref(stored(paletteKey, isPaletteName, "rei"));
|
|
199
|
+
watch(paletteRef, (next) => {
|
|
200
|
+
store(paletteKey, next);
|
|
201
|
+
applyPalette(next);
|
|
202
|
+
}, { immediate: true });
|
|
203
|
+
return paletteRef;
|
|
204
|
+
}
|
|
205
|
+
//#endregion
|
|
106
206
|
//#region src/composables/use-today.ts
|
|
107
207
|
/**
|
|
108
208
|
* Today's date key, kept current while the app stays open.
|
|
@@ -531,12 +631,12 @@ var BaseMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
531
631
|
id: unref(id),
|
|
532
632
|
ref_key: "panel",
|
|
533
633
|
ref: panel,
|
|
534
|
-
class: normalizeClass(["rk-menu-panel", `is-${__props.align}`]),
|
|
634
|
+
class: normalizeClass(["rk-menu-panel surface-overlay", `is-${__props.align}`]),
|
|
535
635
|
role: "menu"
|
|
536
636
|
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 10, _hoisted_2$17)) : createCommentVNode("", true)], 544);
|
|
537
637
|
};
|
|
538
638
|
}
|
|
539
|
-
}), [["__scopeId", "data-v-
|
|
639
|
+
}), [["__scopeId", "data-v-e57ec901"]]);
|
|
540
640
|
//#endregion
|
|
541
641
|
//#region src/components/BaseCard.vue
|
|
542
642
|
var BaseCard_default = /* @__PURE__ */ defineComponent({
|
|
@@ -582,7 +682,7 @@ var BaseCard_default = /* @__PURE__ */ defineComponent({
|
|
|
582
682
|
lg: "px-5 py-4"
|
|
583
683
|
};
|
|
584
684
|
return (_ctx, _cache) => {
|
|
585
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.as), { class: normalizeClass(["
|
|
685
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), { class: normalizeClass(["surface rounded-card", [__props.interactive ? "ease-standard transition-[transform,box-shadow] duration-(--duration-slow) hover:-translate-y-0.5 hover:[--surface-shadow:var(--shadow-raised)] active:translate-y-0 active:[--surface-shadow:var(--shadow-card)]" : "", _ctx.$slots.head || _ctx.$slots.foot ? "" : BODY[__props.padding]]]) }, {
|
|
586
686
|
default: withCtx(() => [
|
|
587
687
|
_ctx.$slots.head ? (openBlock(), createElementBlock("div", {
|
|
588
688
|
key: 0,
|
|
@@ -749,7 +849,7 @@ var BaseCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
749
849
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => text.value = $event),
|
|
750
850
|
type: "text",
|
|
751
851
|
role: "combobox",
|
|
752
|
-
class: "rk-combo-input",
|
|
852
|
+
class: "rk-combo-input control",
|
|
753
853
|
autocomplete: "off",
|
|
754
854
|
placeholder: __props.placeholder,
|
|
755
855
|
disabled: __props.disabled,
|
|
@@ -774,7 +874,7 @@ var BaseCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
774
874
|
ref_key: "list",
|
|
775
875
|
ref: list,
|
|
776
876
|
role: "listbox",
|
|
777
|
-
class: "rk-combo-list",
|
|
877
|
+
class: "rk-combo-list surface-overlay",
|
|
778
878
|
"aria-label": __props.label
|
|
779
879
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(matches.value, (option, index) => {
|
|
780
880
|
return openBlock(), createElementBlock("li", {
|
|
@@ -802,7 +902,7 @@ var BaseCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
802
902
|
], 512);
|
|
803
903
|
};
|
|
804
904
|
}
|
|
805
|
-
}), [["__scopeId", "data-v-
|
|
905
|
+
}), [["__scopeId", "data-v-ce4c503f"]]);
|
|
806
906
|
//#endregion
|
|
807
907
|
//#region src/components/BaseRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
808
908
|
var _hoisted_1$18 = ["aria-describedby"];
|
|
@@ -926,7 +1026,7 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
926
1026
|
"aria-invalid": invalid,
|
|
927
1027
|
"aria-describedby": describedBy,
|
|
928
1028
|
class: normalizeClass(["w-full appearance-none", [
|
|
929
|
-
__props.variant === "unstyled" ? "" : "
|
|
1029
|
+
__props.variant === "unstyled" ? "" : "control text-ink rounded-card focus-visible:outline-primary py-0 pr-10 pl-3 focus-visible:outline-2 focus-visible:outline-offset-1",
|
|
930
1030
|
__props.variant === "unstyled" ? "" : SIZE_CLASS[__props.size],
|
|
931
1031
|
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
932
1032
|
]])
|
|
@@ -1036,7 +1136,7 @@ var BaseSlider_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
1036
1136
|
]);
|
|
1037
1137
|
};
|
|
1038
1138
|
}
|
|
1039
|
-
}), [["__scopeId", "data-v-
|
|
1139
|
+
}), [["__scopeId", "data-v-7fa2769b"]]);
|
|
1040
1140
|
//#endregion
|
|
1041
1141
|
//#region src/components/BaseSpinner.vue?vue&type=script&setup=true&lang.ts
|
|
1042
1142
|
var _hoisted_1$15 = {
|
|
@@ -1152,7 +1252,7 @@ var BaseSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
1152
1252
|
}, null, -1)])], 10, _hoisted_4$6)]);
|
|
1153
1253
|
};
|
|
1154
1254
|
}
|
|
1155
|
-
}), [["__scopeId", "data-v-
|
|
1255
|
+
}), [["__scopeId", "data-v-3f4400a0"]]);
|
|
1156
1256
|
//#endregion
|
|
1157
1257
|
//#region src/components/BaseTable.vue?vue&type=script&setup=true&lang.ts
|
|
1158
1258
|
var _hoisted_1$13 = ["aria-label"];
|
|
@@ -1255,7 +1355,7 @@ var BaseTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
1255
1355
|
"aria-invalid": invalid,
|
|
1256
1356
|
"aria-describedby": describedBy
|
|
1257
1357
|
}, _ctx.$attrs, { class: [
|
|
1258
|
-
__props.variant === "unstyled" ? "" : "
|
|
1358
|
+
__props.variant === "unstyled" ? "" : "control text-ink rounded-card focus-visible:outline-primary resize-y px-3 py-2 leading-relaxed focus-visible:outline-2 focus-visible:outline-offset-1",
|
|
1259
1359
|
"text-base",
|
|
1260
1360
|
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
1261
1361
|
] }), null, 16, _hoisted_1$12), [[vModelText, model.value]])]),
|
|
@@ -1446,7 +1546,7 @@ var ProgressBar_default = /* @__PURE__ */ defineComponent({
|
|
|
1446
1546
|
//#region src/components/PriceCard.vue?vue&type=script&setup=true&lang.ts
|
|
1447
1547
|
var _hoisted_1$8 = {
|
|
1448
1548
|
key: 0,
|
|
1449
|
-
class: "bg-primary rounded-cell absolute -top-3 left-7 px-3 py-1 text-[0.7rem] font-semibold
|
|
1549
|
+
class: "bg-primary rounded-cell text-on-primary absolute -top-3 left-7 px-3 py-1 text-[0.7rem] font-semibold"
|
|
1450
1550
|
};
|
|
1451
1551
|
var _hoisted_2$7 = { class: "flex items-start justify-between gap-4" };
|
|
1452
1552
|
var _hoisted_3$2 = { class: "text-ink mt-5 text-lg font-semibold" };
|
|
@@ -1501,24 +1601,24 @@ var PriceCard_default = /* @__PURE__ */ defineComponent({
|
|
|
1501
1601
|
setup(__props) {
|
|
1502
1602
|
const TONE = {
|
|
1503
1603
|
neutral: {
|
|
1504
|
-
ring: "
|
|
1604
|
+
ring: "",
|
|
1505
1605
|
soft: "bg-muted text-ink-soft",
|
|
1506
1606
|
icon: "bg-primary/10 text-primary"
|
|
1507
1607
|
},
|
|
1508
1608
|
warm: {
|
|
1509
|
-
ring: "border-
|
|
1510
|
-
soft: "bg-
|
|
1511
|
-
icon: "bg-
|
|
1609
|
+
ring: "[--surface-border-color:color-mix(in_oklab,var(--color-warning)_40%,transparent)]",
|
|
1610
|
+
soft: "bg-warning/15 text-ink",
|
|
1611
|
+
icon: "bg-warning/15 text-warning"
|
|
1512
1612
|
},
|
|
1513
1613
|
cool: {
|
|
1514
|
-
ring: "border-
|
|
1515
|
-
soft: "bg-
|
|
1516
|
-
icon: "bg-
|
|
1614
|
+
ring: "[--surface-border-color:color-mix(in_oklab,var(--color-accent)_38%,transparent)]",
|
|
1615
|
+
soft: "bg-accent/12 text-ink",
|
|
1616
|
+
icon: "bg-accent/12 text-accent"
|
|
1517
1617
|
}
|
|
1518
1618
|
};
|
|
1519
1619
|
const palette = computed(() => TONE[__props.tone]);
|
|
1520
1620
|
return (_ctx, _cache) => {
|
|
1521
|
-
return openBlock(), createElementBlock("article", { class: normalizeClass(["
|
|
1621
|
+
return openBlock(), createElementBlock("article", { class: normalizeClass(["surface rounded-card ease-standard relative flex h-full flex-col p-7 transition-[border-color,box-shadow,transform] duration-(--duration-slower) hover:[--surface-border-color:color-mix(in_oklab,var(--color-primary)_60%,transparent)] hover:[--surface-shadow:var(--shadow-raised)] sm:p-8", [palette.value.ring, __props.recommended ? "[--surface-shadow:var(--shadow-raised)]" : "hover:-translate-y-0.5"]]) }, [
|
|
1522
1622
|
__props.badge && __props.recommended ? (openBlock(), createElementBlock("span", _hoisted_1$8, toDisplayString(__props.badge), 1)) : createCommentVNode("", true),
|
|
1523
1623
|
createElementVNode("div", _hoisted_2$7, [_ctx.$slots.icon ? (openBlock(), createElementBlock("span", {
|
|
1524
1624
|
key: 0,
|
|
@@ -1587,7 +1687,7 @@ var SectionHeading_default = /* @__PURE__ */ defineComponent({
|
|
|
1587
1687
|
},
|
|
1588
1688
|
setup(__props) {
|
|
1589
1689
|
return (_ctx, _cache) => {
|
|
1590
|
-
return openBlock(), createElementBlock("h2", { class: normalizeClass(["flex items-center gap-2 self-start rounded-full border px-3 py-1", __props.tone.card]) }, [
|
|
1690
|
+
return openBlock(), createElementBlock("h2", { class: normalizeClass(["flex w-fit items-center gap-2 self-start rounded-full border px-3 py-1", __props.tone.card]) }, [
|
|
1591
1691
|
createVNode(ToneDot_default, { fill: __props.tone.fill }, null, 8, ["fill"]),
|
|
1592
1692
|
createElementVNode("span", { class: normalizeClass(["text-xs font-semibold tracking-wide uppercase", __props.tone.text]) }, toDisplayString(__props.label), 3),
|
|
1593
1693
|
__props.count > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$6, toDisplayString(__props.count), 1)) : createCommentVNode("", true)
|
|
@@ -1622,7 +1722,7 @@ var SegmentedControl_default = /* @__PURE__ */ defineComponent({
|
|
|
1622
1722
|
value: option.value,
|
|
1623
1723
|
name: unref(name),
|
|
1624
1724
|
class: "sr-only"
|
|
1625
|
-
}, null, 8, _hoisted_2$5), [[vModelRadio, model.value]]), createElementVNode("span", { class: normalizeClass(["flex h-10 items-center justify-center rounded-xl px-2 text-sm font-medium transition-colors select-none", model.value === option.value ? "bg-surface text-ink shadow-
|
|
1725
|
+
}, null, 8, _hoisted_2$5), [[vModelRadio, model.value]]), createElementVNode("span", { class: normalizeClass(["flex h-10 items-center justify-center rounded-xl px-2 text-sm font-medium transition-colors select-none", model.value === option.value ? "bg-surface text-ink shadow-(--shadow-control)" : "text-ink-soft"]) }, toDisplayString(option.label), 3)]);
|
|
1626
1726
|
}), 128))]);
|
|
1627
1727
|
};
|
|
1628
1728
|
}
|
|
@@ -1660,7 +1760,7 @@ var SkeletonList_default = /* @__PURE__ */ defineComponent({
|
|
|
1660
1760
|
});
|
|
1661
1761
|
//#endregion
|
|
1662
1762
|
//#region src/components/StatCard.vue?vue&type=script&setup=true&lang.ts
|
|
1663
|
-
var _hoisted_1$3 = { class: "
|
|
1763
|
+
var _hoisted_1$3 = { class: "surface rounded-card flex flex-1 flex-col gap-0.5 p-3" };
|
|
1664
1764
|
var _hoisted_2$3 = { class: "flex items-baseline gap-1" };
|
|
1665
1765
|
var _hoisted_3$1 = { class: "text-ink text-xl font-semibold tabular-nums" };
|
|
1666
1766
|
var _hoisted_4$1 = { class: "text-ink-soft text-xs" };
|
|
@@ -1742,7 +1842,7 @@ var ToastHost_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
1742
1842
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(toasts), (toast) => {
|
|
1743
1843
|
return openBlock(), createElementBlock("div", {
|
|
1744
1844
|
key: toast.id,
|
|
1745
|
-
class: "
|
|
1845
|
+
class: "surface-raised text-ink rounded-card pointer-events-auto flex w-full max-w-sm items-start gap-3 p-3",
|
|
1746
1846
|
onMouseenter: ($event) => unref(pause)(toast.id),
|
|
1747
1847
|
onMouseleave: ($event) => unref(resume)(toast.id),
|
|
1748
1848
|
onFocusin: ($event) => unref(pause)(toast.id),
|
|
@@ -1771,7 +1871,7 @@ var ToastHost_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
1771
1871
|
})], 2)])) : createCommentVNode("", true);
|
|
1772
1872
|
};
|
|
1773
1873
|
}
|
|
1774
|
-
}), [["__scopeId", "data-v-
|
|
1874
|
+
}), [["__scopeId", "data-v-b336935c"]]);
|
|
1775
1875
|
//#endregion
|
|
1776
1876
|
//#region src/components/LocaleLinks.vue?vue&type=script&setup=true&lang.ts
|
|
1777
1877
|
var _hoisted_1$1 = ["aria-label"];
|
|
@@ -1862,7 +1962,7 @@ var TabBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1862
1962
|
}), 128))], 8, _hoisted_2)]);
|
|
1863
1963
|
};
|
|
1864
1964
|
}
|
|
1865
|
-
}), [["__scopeId", "data-v-
|
|
1965
|
+
}), [["__scopeId", "data-v-e9bd0632"]]);
|
|
1866
1966
|
//#endregion
|
|
1867
1967
|
//#region src/i18n/runtime.ts
|
|
1868
1968
|
/**
|
|
@@ -2006,8 +2106,8 @@ function createI18nRuntime(options) {
|
|
|
2006
2106
|
*
|
|
2007
2107
|
* The fallback keeps `vitest` and `vite dev` honest, where no define runs.
|
|
2008
2108
|
*/
|
|
2009
|
-
var VERSION = "
|
|
2109
|
+
var VERSION = "2.0.0";
|
|
2010
2110
|
//#endregion
|
|
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 };
|
|
2111
|
+
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, MATERIALS, PALETTES, 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, applyMaterial, applyPalette, applyTheme, createI18nRuntime, downloadJson, eachDayOfYear, ensureSheetRoot, formatDate, fromDateKey, isApplePortable, isInstalled, isMaterial, isPaletteName, isThemePreference, lastNDays, leadingBlanks, needsIosInstall, readStoredTheme, registerErrorMapper, relativeDayLabel, safeRedirect, setFormatLocale, setMaterialStorageKey, setPaletteStorageKey, setThemeStorageKey, startOfWeek, tapFeedback, toAppError, toDateKey, toRedirectPath, todayKey, useDebouncedCallback, useDragScroll, useMaterial, useMediaQuery, useOnline, usePalette, useTheme, useToast, useToday, useVisualViewport };
|
|
2012
2112
|
|
|
2013
2113
|
//# sourceMappingURL=index.js.map
|