vectis-ui 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/VColorPicker/VColorPicker.css +1 -1
- package/dist/components/VColorPicker/VColorPicker.js.map +1 -1
- package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCommandPalette/VCommandPalette.css +1 -1
- package/dist/components/VCommandPalette/VCommandPalette.js.map +1 -1
- package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +6 -5
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VNumberInput/number.d.ts +2 -2
- package/dist/components/VNumberInput/number.js +1 -1
- package/dist/components/VNumberInput/number.js.map +1 -1
- package/dist/components/VPagination/VPagination.js.map +1 -1
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSelect/VSelect.js.map +1 -1
- package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +168 -174
- package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/VToggle.js.map +1 -1
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTreeView/VTreeView.js.map +1 -1
- package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +127 -131
- package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/composables/useHotkeyListener.js +5 -2
- package/dist/composables/useHotkeyListener.js.map +1 -1
- package/dist/composables/useInfiniteScroll.js +2 -2
- package/dist/composables/useInfiniteScroll.js.map +1 -1
- package/dist/composables/useTypeahead.d.ts +13 -0
- package/dist/composables/useTypeahead.js +23 -0
- package/dist/composables/useTypeahead.js.map +1 -0
- package/dist/i18n/state.d.ts +1 -1
- package/dist/i18n/state.js +17 -6
- package/dist/i18n/state.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils/date.js +4 -3
- package/dist/utils/date.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHotkeyListener.js","names":[],"sources":["../../src/composables/useHotkeyListener.ts"],"sourcesContent":["import { onActivated, onBeforeUnmount, onDeactivated, onMounted, watch } from 'vue'\n\nimport { isEditableTarget, matchesEvent } from '../components/VHotkeys/platform'\nimport type { HotkeysPlatform } from '../components/VHotkeys/platform'\n\n// @keyboard @core\n/**\n * Listens on the document for one keyboard shortcut, shared by VHotkeys and VCommandPalette. The\n * listener exists only while `enabled` holds and the component is mounted and active, so a page\n * displaying fifty shortcuts installs no listener at all.\n */\nexport function useHotkeyListener(options: {\n /** The combination, as `parseHotkeys` returns it. */\n tokens: () => string[]\n platform: () => HotkeysPlatform\n enabled: () => boolean\n /** Lets the browser go on doing whatever the combination normally does. */\n allowDefault?: () => boolean\n /** Fires even when the reader is typing in a field. */\n allowInInput?: () => boolean\n onTrigger: (event: KeyboardEvent) => void\n}) {\n let listening = false\n\n function onKeydown(event: KeyboardEvent) {\n /* A held-down combination repeats at the system's auto-repeat rate, which would\n reopen the consumer's palette a dozen times a second; only the first press\n counts. */\n if (!options.enabled() || event.repeat) return\n /* A key another handler has already dealt with (a menu's arrow, a field's Enter) is not\n a shortcut any more. And the Enter that confirms an input method's candidate is the\n end of a word being typed, not a command. */\n if (event.defaultPrevented || event.isComposing) return\n /* The document sees a key typed inside a shadow root as coming from the shadow HOST, a\n plain element: the field itself is the first entry of the composed path. */\n if (!options.allowInInput?.() && isEditableTarget(event.composedPath()[0] ?? event.target)) {\n return\n }\n const tokens = options.tokens()\n if (!matchesEvent(event, tokens, options.platform())) return\n /*\n * Escape is never cancelled. A cancelled Escape is not turned into a close request, so every\n * open dialog and light-dismiss popover on the page would stop closing on it.\n */\n if (!options.allowDefault?.() && !tokens.includes('esc')) event.preventDefault()\n options.onTrigger(event)\n }\n\n function attach() {\n if (listening || typeof document === 'undefined') return\n document.addEventListener('keydown', onKeydown)\n listening = true\n }\n\n function detach() {\n if (!listening) return\n document.removeEventListener('keydown', onKeydown)\n listening = false\n }\n\n onMounted(() => {\n if (options.enabled()) attach()\n })\n watch(options.enabled, (on) => (on ? attach() : detach()))\n onBeforeUnmount(detach)\n
|
|
1
|
+
{"version":3,"file":"useHotkeyListener.js","names":[],"sources":["../../src/composables/useHotkeyListener.ts"],"sourcesContent":["import { onActivated, onBeforeUnmount, onDeactivated, onMounted, watch } from 'vue'\n\nimport { isEditableTarget, matchesEvent } from '../components/VHotkeys/platform'\nimport type { HotkeysPlatform } from '../components/VHotkeys/platform'\n\n// @keyboard @core\n/**\n * Listens on the document for one keyboard shortcut, shared by VHotkeys and VCommandPalette. The\n * listener exists only while `enabled` holds and the component is mounted and active, so a page\n * displaying fifty shortcuts installs no listener at all.\n */\nexport function useHotkeyListener(options: {\n /** The combination, as `parseHotkeys` returns it. */\n tokens: () => string[]\n platform: () => HotkeysPlatform\n enabled: () => boolean\n /** Lets the browser go on doing whatever the combination normally does. */\n allowDefault?: () => boolean\n /** Fires even when the reader is typing in a field. */\n allowInInput?: () => boolean\n onTrigger: (event: KeyboardEvent) => void\n}) {\n let listening = false\n\n function onKeydown(event: KeyboardEvent) {\n /* A held-down combination repeats at the system's auto-repeat rate, which would\n reopen the consumer's palette a dozen times a second; only the first press\n counts. */\n if (!options.enabled() || event.repeat) return\n /* A key another handler has already dealt with (a menu's arrow, a field's Enter) is not\n a shortcut any more. And the Enter that confirms an input method's candidate is the\n end of a word being typed, not a command. */\n if (event.defaultPrevented || event.isComposing) return\n /* The document sees a key typed inside a shadow root as coming from the shadow HOST, a\n plain element: the field itself is the first entry of the composed path. */\n if (!options.allowInInput?.() && isEditableTarget(event.composedPath()[0] ?? event.target)) {\n return\n }\n const tokens = options.tokens()\n if (!matchesEvent(event, tokens, options.platform())) return\n /*\n * Escape is never cancelled. A cancelled Escape is not turned into a close request, so every\n * open dialog and light-dismiss popover on the page would stop closing on it.\n */\n if (!options.allowDefault?.() && !tokens.includes('esc')) event.preventDefault()\n options.onTrigger(event)\n }\n\n function attach() {\n if (listening || typeof document === 'undefined') return\n document.addEventListener('keydown', onKeydown)\n listening = true\n }\n\n function detach() {\n if (!listening) return\n document.removeEventListener('keydown', onKeydown)\n listening = false\n }\n\n /* A view kept alive by <KeepAlive> is never unmounted, only put aside: its shortcut must\n stop with it, or a hidden page would go on answering the keyboard; even when `enabled`\n turns on while it is put aside. */\n let active = true\n\n onMounted(() => {\n if (options.enabled()) attach()\n })\n watch(options.enabled, (on) => (on && active ? attach() : detach()))\n onBeforeUnmount(detach)\n onDeactivated(() => {\n active = false\n detach()\n })\n onActivated(() => {\n active = true\n if (options.enabled()) attach()\n })\n}\n"],"mappings":";;;AAWA,SAAgB,EAAkB,GAU/B;CACD,IAAI,IAAY;CAEhB,SAAS,EAAU,GAAsB;EAWvC,IAPI,CAAC,EAAQ,QAAQ,KAAK,EAAM,UAI5B,EAAM,oBAAoB,EAAM,eAGhC,CAAC,EAAQ,eAAe,KAAK,EAAiB,EAAM,aAAa,CAAC,CAAC,MAAM,EAAM,MAAM,GACvF;EAEF,IAAM,IAAS,EAAQ,OAAO;EACzB,EAAa,GAAO,GAAQ,EAAQ,SAAS,CAAC,MAK/C,CAAC,EAAQ,eAAe,KAAK,CAAC,EAAO,SAAS,KAAK,KAAG,EAAM,eAAe,GAC/E,EAAQ,UAAU,CAAK;CACzB;CAEA,SAAS,IAAS;EACZ,KAAa,OAAO,WAAa,QACrC,SAAS,iBAAiB,WAAW,CAAS,GAC9C,IAAY;CACd;CAEA,SAAS,IAAS;EACX,AAEL,OADA,SAAS,oBAAoB,WAAW,CAAS,GACrC;CACd;CAKA,IAAI,IAAS;CAWb,AATA,QAAgB;EACd,AAAI,EAAQ,QAAQ,KAAG,EAAO;CAChC,CAAC,GACD,EAAM,EAAQ,UAAU,MAAQ,KAAM,IAAS,EAAO,IAAI,EAAO,CAAE,GACnE,EAAgB,CAAM,GACtB,QAAoB;EAElB,AADA,IAAS,IACT,EAAO;CACT,CAAC,GACD,QAAkB;EAEhB,AADA,IAAS,IACL,EAAQ,QAAQ,KAAG,EAAO;CAChC,CAAC;AACH"}
|
|
@@ -14,8 +14,8 @@ function t(t) {
|
|
|
14
14
|
}), n.observe(e), i(() => {
|
|
15
15
|
n?.disconnect(), n = null;
|
|
16
16
|
}));
|
|
17
|
-
}, { flush: "post" }), e(t.loaded, (e, a) => {
|
|
18
|
-
if (e
|
|
17
|
+
}, { flush: "post" }), e([t.loaded, () => t.loaded().length], ([, e], [, a]) => {
|
|
18
|
+
if (e === a && !i) return;
|
|
19
19
|
i = !1, r = !1;
|
|
20
20
|
let o = t.sentinelEl.value;
|
|
21
21
|
!n || !o || (n.unobserve(o), n.observe(o));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteScroll.js","names":[],"sources":["../../src/composables/useInfiniteScroll.ts"],"sourcesContent":["// @core\n/**\n * Observe a list's sentinel to request another page, for VCombobox and VVirtualList; retain\n * ownership of data fetching with the consumer.\n */\nimport { watch, type Ref } from 'vue'\n\nexport interface InfiniteScrollOptions {\n /** The marker at the foot of the list. It is absent when there is nothing left to load. */\n sentinelEl: Ref<HTMLElement | null>\n /**\n * The scrolling frame the marker is watched within. Left to the viewport, a marker inside a\n * panel floating above the page would count as visible from the very first moment, firing a\n * burst of requests for every page at once.\n */\n root: (sentinel: HTMLElement) => Element | null\n /** Whether a page may be asked for right now: the panel open, more to come, none in flight. */\n canLoad: () => boolean\n /**\n * The options loaded so far. A change in their NUMBER is the signal that a page has\n * arrived; a new array of the same length counts only after `restart`.\n */\n loaded: () => readonly unknown[]\n /** Asks for the next page. */\n onLoadMore: () => void\n}\n\nexport interface InfiniteScroll {\n /** Releases the lock that stops two requests overlapping. */\n reset: () => void\n /**\n * Releases the lock and takes the next list handed over as an arrival, whatever its length.\n * For a new search: the page asked for under the old term never lands, and the new first page\n * may be exactly as long as the list it replaces.\n */\n restart: () => void\n}\n\nexport function useInfiniteScroll(options: InfiniteScrollOptions): InfiniteScroll {\n let observer: IntersectionObserver | null = null\n /*\n * The consumer's loading flag cannot serve: they raise it when their request starts, which is\n * at best a tick later, and the gap between the two is wide enough for several requests to go\n * out.\n */\n let pending = false\n let rearm = false\n\n function onIntersect(entries: IntersectionObserverEntry[]) {\n if (!entries.some((entry) => entry.isIntersecting)) return\n if (pending || !options.canLoad()) return\n pending = true\n options.onLoadMore()\n }\n\n watch(\n options.sentinelEl,\n (el, _previous, onCleanup) => {\n // @fallback\n // The observer does not exist in the unit-test environment, so its absence has to\n // be tolerated rather than assumed away; the behaviour is checked in a real\n // browser.\n if (!el || typeof IntersectionObserver === 'undefined') return\n const root = options.root(el)\n if (!root) return\n observer = new IntersectionObserver(onIntersect, {\n root,\n // The next page is asked for half a frame before the marker is actually reached,\n // so the list is already growing by the time the reader gets there. It is\n // expressed as a proportion of the frame rather than as a number of pixels.\n rootMargin: '0px 0px 50% 0px',\n })\n observer.observe(el)\n onCleanup(() => {\n observer?.disconnect()\n observer = null\n })\n },\n { flush: 'post' },\n )\n\n // An observer only reports a CROSSING. If the page that arrives is too short to push the\n // marker out of view, the marker stays visible without ever crossing anything again, and the\n // loading would stop dead at the second page.\n watch(options.loaded, (
|
|
1
|
+
{"version":3,"file":"useInfiniteScroll.js","names":[],"sources":["../../src/composables/useInfiniteScroll.ts"],"sourcesContent":["// @core\n/**\n * Observe a list's sentinel to request another page, for VCombobox and VVirtualList; retain\n * ownership of data fetching with the consumer.\n */\nimport { watch, type Ref } from 'vue'\n\nexport interface InfiniteScrollOptions {\n /** The marker at the foot of the list. It is absent when there is nothing left to load. */\n sentinelEl: Ref<HTMLElement | null>\n /**\n * The scrolling frame the marker is watched within. Left to the viewport, a marker inside a\n * panel floating above the page would count as visible from the very first moment, firing a\n * burst of requests for every page at once.\n */\n root: (sentinel: HTMLElement) => Element | null\n /** Whether a page may be asked for right now: the panel open, more to come, none in flight. */\n canLoad: () => boolean\n /**\n * The options loaded so far. A change in their NUMBER is the signal that a page has\n * arrived; a new array of the same length counts only after `restart`.\n */\n loaded: () => readonly unknown[]\n /** Asks for the next page. */\n onLoadMore: () => void\n}\n\nexport interface InfiniteScroll {\n /** Releases the lock that stops two requests overlapping. */\n reset: () => void\n /**\n * Releases the lock and takes the next list handed over as an arrival, whatever its length.\n * For a new search: the page asked for under the old term never lands, and the new first page\n * may be exactly as long as the list it replaces.\n */\n restart: () => void\n}\n\nexport function useInfiniteScroll(options: InfiniteScrollOptions): InfiniteScroll {\n let observer: IntersectionObserver | null = null\n /*\n * The consumer's loading flag cannot serve: they raise it when their request starts, which is\n * at best a tick later, and the gap between the two is wide enough for several requests to go\n * out.\n */\n let pending = false\n let rearm = false\n\n function onIntersect(entries: IntersectionObserverEntry[]) {\n if (!entries.some((entry) => entry.isIntersecting)) return\n if (pending || !options.canLoad()) return\n pending = true\n options.onLoadMore()\n }\n\n watch(\n options.sentinelEl,\n (el, _previous, onCleanup) => {\n // @fallback\n // The observer does not exist in the unit-test environment, so its absence has to\n // be tolerated rather than assumed away; the behaviour is checked in a real\n // browser.\n if (!el || typeof IntersectionObserver === 'undefined') return\n const root = options.root(el)\n if (!root) return\n observer = new IntersectionObserver(onIntersect, {\n root,\n // The next page is asked for half a frame before the marker is actually reached,\n // so the list is already growing by the time the reader gets there. It is\n // expressed as a proportion of the frame rather than as a number of pixels.\n rootMargin: '0px 0px 50% 0px',\n })\n observer.observe(el)\n onCleanup(() => {\n observer?.disconnect()\n observer = null\n })\n },\n { flush: 'post' },\n )\n\n // An observer only reports a CROSSING. If the page that arrives is too short to push the\n // marker out of view, the marker stays visible without ever crossing anything again, and the\n // loading would stop dead at the second page. The length is watched as well as the array: a\n // page pushed into the same array is still an arrival, and both sides then hold that array.\n watch([options.loaded, () => options.loaded().length], ([, length], [, previousLength]) => {\n if (length === previousLength && !rearm) return\n rearm = false\n pending = false\n const el = options.sentinelEl.value\n if (!observer || !el) return\n observer.unobserve(el)\n observer.observe(el)\n })\n\n return {\n reset: () => {\n pending = false\n },\n restart: () => {\n pending = false\n rearm = true\n },\n }\n}\n"],"mappings":";;AAsCA,SAAgB,EAAkB,GAAgD;CAChF,IAAI,IAAwC,MAMxC,IAAU,IACV,IAAQ;CAEZ,SAAS,EAAY,GAAsC;EACpD,EAAQ,MAAM,MAAU,EAAM,cAAc,MAC7C,KAAW,CAAC,EAAQ,QAAQ,MAChC,IAAU,IACV,EAAQ,WAAW;CACrB;CA0CA,OAxCA,EACE,EAAQ,aACP,GAAI,GAAW,MAAc;EAK5B,IAAI,CAAC,KAAM,OAAO,uBAAyB,KAAa;EACxD,IAAM,IAAO,EAAQ,KAAK,CAAE;EACvB,MACL,IAAW,IAAI,qBAAqB,GAAa;GAC/C;GAIA,YAAY;EACd,CAAC,GACD,EAAS,QAAQ,CAAE,GACnB,QAAgB;GAEd,AADA,GAAU,WAAW,GACrB,IAAW;EACb,CAAC;CACH,GACA,EAAE,OAAO,OAAO,CAClB,GAMA,EAAM,CAAC,EAAQ,cAAc,EAAQ,OAAO,CAAC,CAAC,MAAM,IAAI,GAAG,IAAS,GAAG,OAAoB;EACzF,IAAI,MAAW,KAAkB,CAAC,GAAO;EAEzC,AADA,IAAQ,IACR,IAAU;EACV,IAAM,IAAK,EAAQ,WAAW;EAC1B,CAAC,KAAY,CAAC,MAClB,EAAS,UAAU,CAAE,GACrB,EAAS,QAAQ,CAAE;CACrB,CAAC,GAEM;EACL,aAAa;GACX,IAAU;EACZ;EACA,eAAe;GAEb,AADA,IAAU,IACV,IAAQ;EACV;CACF;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-to-find, as a native list does, for VSelect and VTreeView: the letters typed within half a
|
|
3
|
+
* second add up to a prefix, and the same letter repeated cycles through the items it starts.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useTypeahead(): {
|
|
6
|
+
/**
|
|
7
|
+
* Adds a key to the prefix and returns the index it leads to, searching from `from`, or -1.
|
|
8
|
+
* `labelAt` gives an item's label already normalized, or nothing for one to skip.
|
|
9
|
+
*/
|
|
10
|
+
find: (key: string, count: number, from: number, labelAt: (index: number) => string | undefined) => number;
|
|
11
|
+
/** Whether a prefix is being typed, so that a space belongs to it: "New York". */
|
|
12
|
+
typing: () => boolean;
|
|
13
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { normalizeText as e } from "../utils/text.js";
|
|
2
|
+
import { useTimer as t } from "./useTimer.js";
|
|
3
|
+
//#region src/composables/useTypeahead.ts
|
|
4
|
+
function n() {
|
|
5
|
+
let n = t(), r = "";
|
|
6
|
+
function i(t, i, a, o) {
|
|
7
|
+
if (r += e(t), n.start(() => r = "", 500), !r) return -1;
|
|
8
|
+
let s = [...r].every((e) => e === r[0]), c = s ? r[0] : r, l = Math.max(a + +!!s, 0);
|
|
9
|
+
for (let e = 0; e < i; e++) {
|
|
10
|
+
let t = (l + e) % i;
|
|
11
|
+
if (o(t)?.startsWith(c)) return t;
|
|
12
|
+
}
|
|
13
|
+
return -1;
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
find: i,
|
|
17
|
+
typing: () => r !== ""
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { n as useTypeahead };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=useTypeahead.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTypeahead.js","names":[],"sources":["../../src/composables/useTypeahead.ts"],"sourcesContent":["import { normalizeText } from '../utils/text'\n\nimport { useTimer } from './useTimer'\n\n// @keyboard\n/**\n * Type-to-find, as a native list does, for VSelect and VTreeView: the letters typed within half a\n * second add up to a prefix, and the same letter repeated cycles through the items it starts.\n */\nexport function useTypeahead(): {\n /**\n * Adds a key to the prefix and returns the index it leads to, searching from `from`, or -1.\n * `labelAt` gives an item's label already normalized, or nothing for one to skip.\n */\n find: (\n key: string,\n count: number,\n from: number,\n labelAt: (index: number) => string | undefined,\n ) => number\n /** Whether a prefix is being typed, so that a space belongs to it: \"New York\". */\n typing: () => boolean\n} {\n const timer = useTimer()\n let typed = ''\n\n function find(\n key: string,\n count: number,\n from: number,\n labelAt: (index: number) => string | undefined,\n ): number {\n typed += normalizeText(key)\n timer.start(() => (typed = ''), 500)\n if (!typed) return -1\n const cycling = [...typed].every((char) => char === typed[0])\n const needle = cycling ? typed[0]! : typed\n // A new prefix may match the current item itself; a cycle moves on from it.\n const start = Math.max(from + (cycling ? 1 : 0), 0)\n for (let step = 0; step < count; step++) {\n const index = (start + step) % count\n if (labelAt(index)?.startsWith(needle)) return index\n }\n return -1\n }\n\n return { find, typing: () => typed !== '' }\n}\n"],"mappings":";;;AASA,SAAgB,IAad;CACA,IAAM,IAAQ,EAAS,GACnB,IAAQ;CAEZ,SAAS,EACP,GACA,GACA,GACA,GACQ;EAGR,IAFA,KAAS,EAAc,CAAG,GAC1B,EAAM,YAAa,IAAQ,IAAK,GAAG,GAC/B,CAAC,GAAO,OAAO;EACnB,IAAM,IAAU,CAAC,GAAG,CAAK,CAAC,CAAC,OAAO,MAAS,MAAS,EAAM,EAAE,GACtD,IAAS,IAAU,EAAM,KAAM,GAE/B,IAAQ,KAAK,IAAI,IAAQ,MAAkB,CAAC;EAClD,KAAK,IAAI,IAAO,GAAG,IAAO,GAAO,KAAQ;GACvC,IAAM,KAAS,IAAQ,KAAQ;GAC/B,IAAI,EAAQ,CAAK,CAAC,EAAE,WAAW,CAAM,GAAG,OAAO;EACjD;EACA,OAAO;CACT;CAEA,OAAO;EAAE;EAAM,cAAc,MAAU;CAAG;AAC5C"}
|
package/dist/i18n/state.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Messages, MessagesInput } from './types.js';
|
|
|
4
4
|
export declare const DEFAULT_LOCALE = "en-US";
|
|
5
5
|
/**
|
|
6
6
|
* Chooses the locale the library speaks. Those components also take their own `locale`, which
|
|
7
|
-
* wins.
|
|
7
|
+
* wins. A malformed tag is ignored and the locale in force stays.
|
|
8
8
|
*/
|
|
9
9
|
export declare function setLocale(locale: string): void;
|
|
10
10
|
/**
|
package/dist/i18n/state.js
CHANGED
|
@@ -30,23 +30,34 @@ function f(t, n) {
|
|
|
30
30
|
return r;
|
|
31
31
|
}
|
|
32
32
|
function p(t) {
|
|
33
|
+
try {
|
|
34
|
+
return Intl.getCanonicalLocales(t), !0;
|
|
35
|
+
} catch {
|
|
36
|
+
return e && console.warn(`[vectis] Locale “${t}” ignored: not a language tag ('fr-FR').`), !1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function m(t) {
|
|
40
|
+
if (!p(t)) return;
|
|
33
41
|
let n = l(t);
|
|
34
42
|
e && !o.has(n) && console.warn(`[vectis] No dictionary registered for “${n}”: the text stays in “${a}”. French is shipped — import { fr } from 'vectis-ui' then registerMessages('fr', fr). For another language: registerMessages('${n}', { … }).`), s.value = t, c.value = u(t);
|
|
35
43
|
}
|
|
36
|
-
function
|
|
44
|
+
function h(n, r) {
|
|
37
45
|
let i = l(n);
|
|
38
46
|
e && i !== n.toLowerCase() && console.warn(`[vectis] registerMessages('${n}', …): the expected key is a language subtag alone — registered under “${i}”, which covers all its regional variants.`), r === void 0 ? i === a ? o.set(a, t) : o.delete(i) : o.set(i, f(o.get(i) ?? t, r)), c.value = u(s.value);
|
|
39
47
|
}
|
|
40
|
-
function
|
|
48
|
+
function g() {
|
|
41
49
|
return c;
|
|
42
50
|
}
|
|
43
|
-
function
|
|
51
|
+
function _() {
|
|
44
52
|
return s;
|
|
45
53
|
}
|
|
46
|
-
function
|
|
47
|
-
return n(() =>
|
|
54
|
+
function v(e) {
|
|
55
|
+
return n(() => {
|
|
56
|
+
let t = e();
|
|
57
|
+
return t && p(t) ? t : s.value;
|
|
58
|
+
});
|
|
48
59
|
}
|
|
49
60
|
//#endregion
|
|
50
|
-
export { i as DEFAULT_LOCALE,
|
|
61
|
+
export { i as DEFAULT_LOCALE, h as registerMessages, m as setLocale, _ as useLocale, g as useMessages, v as useResolvedLocale };
|
|
51
62
|
|
|
52
63
|
//# sourceMappingURL=state.js.map
|
package/dist/i18n/state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","names":[],"sources":["../../src/i18n/state.ts"],"sourcesContent":["/**\n * Reactive process-wide locale configuration, callable outside components. Per-request\n * multilingual SSR requires explicit component text props.\n */\nimport { computed, shallowRef, type ComputedRef, type ShallowRef } from 'vue'\n\nimport { isDev } from '../utils/env'\n\nimport { en } from './en'\nimport type { Messages, MessagesInput } from './types'\n\n/** The language tag assumed until one is chosen. */\nexport const DEFAULT_LOCALE = 'en-US'\nconst DEFAULT_LANG = 'en'\n\n/** The dictionaries, filed under the LANGUAGE subtag alone; `en`, `fr`, `de`. */\nconst registry = new Map<string, Messages>([[DEFAULT_LANG, en]])\n\nconst currentLocale = shallowRef<string>(DEFAULT_LOCALE)\nconst currentMessages = shallowRef<Messages>(en)\n\n/**\n * The language part of a tag: British English is filed under English. A tag that makes no\n * sense comes back untouched, and will simply match no dictionary.\n */\nfunction langOf(locale: string): string {\n return locale.toLowerCase().split('-')[0] ?? locale\n}\n\n/**\n * The dictionary a tag resolves to, falling back to the default language. The last `?? en`\n * never fires: `registry` is seeded with `DEFAULT_LANG` and the only path that could remove it;\n * `registerMessages` passing `undefined`; puts `en` straight back instead of deleting.\n */\nfunction resolve(locale: string): Messages {\n return registry.get(langOf(locale)) ?? registry.get(DEFAULT_LANG) ?? en\n}\n\n/** Names that would reach into an object's own machinery instead of naming a section. */\nconst FORBIDDEN_KEYS = new Set(['__proto__', 'constructor', 'prototype'])\n\n/** Lays a partial override over a complete dictionary. */\nfunction mergeMessages(base: Messages, patch: MessagesInput): Messages {\n const out: Record<string, object> = { ...base }\n for (const [namespace, section] of Object.entries(patch)) {\n // A dictionary parsed from a file can carry one of these as a namespace, and assigning to\n // it would replace the copy's own machinery instead of adding a section. Nothing outside is\n // affected, the object being fresh; but every lookup in it is then wrong, and nothing says\n // so.\n if (FORBIDDEN_KEYS.has(namespace)) continue\n if (!section) continue\n /* Ignore nullish dictionary leaves so partial overrides cannot erase fallback labels. */\n const words = Object.entries(section).filter(([key, value]) => {\n const empty = value === undefined || value === null || value === ''\n if (empty && isDev) {\n console.warn(`[vectis] registerMessages: “${namespace}.${key}” is empty and was ignored.`)\n }\n return !empty\n })\n out[namespace] = { ...out[namespace], ...Object.fromEntries(words) }\n }\n return out as unknown as Messages\n}\n\n/**\n * Chooses the locale the library speaks. Those components also take their own `locale`, which\n * wins.\n */\nexport function setLocale(locale: string): void {\n const lang = langOf(locale)\n if (isDev && !registry.has(lang)) {\n console.warn(\n `[vectis] No dictionary registered for “${lang}”: the text stays in ` +\n `“${DEFAULT_LANG}”. French is shipped — import { fr } from 'vectis-ui' then ` +\n `registerMessages('fr', fr). For another language: registerMessages('${lang}', { … }).`,\n )\n }\n currentLocale.value = locale\n currentMessages.value = resolve(locale)\n}\n\n/**\n * Adds or adjusts the words of a LANGUAGE, filed under the subtag alone: `fr`, not `fr-FR`.\n * What is left out falls back to whatever was registered before, then to the English always\n * carried, never to an empty string.\n */\nexport function registerMessages(lang: string, messages: MessagesInput | undefined): void {\n const key = langOf(lang)\n if (isDev && key !== lang.toLowerCase()) {\n console.warn(\n `[vectis] registerMessages('${lang}', …): the expected key is a language subtag ` +\n `alone — registered under “${key}”, which covers all its regional variants.`,\n )\n }\n if (messages === undefined) {\n if (key === DEFAULT_LANG) registry.set(DEFAULT_LANG, en)\n else registry.delete(key)\n } else {\n registry.set(key, mergeMessages(registry.get(key) ?? en, messages))\n }\n currentMessages.value = resolve(currentLocale.value)\n}\n\n/**\n * Reading `.value.x` once in a `setup()` body FREEZES that word. Read it where the read\n * repeats: inside a `computed`, or in the template.\n */\nexport function useMessages(): ShallowRef<Messages> {\n return currentMessages\n}\n\n/**\n * The locale tag in force. Internal: what the calendar and the pickers fall back on with no\n * `locale` of their own, and what VDataTable passes to `localeCompare` when it sorts.\n */\nexport function useLocale(): ShallowRef<string> {\n return currentLocale\n}\n\n/**\n * The locale a component with a `locale` prop of its own actually uses: the prop when it is\n * given, the locale in force otherwise. The prop has no literal default in any of the\n * components that read it, and that is what this relies on: `undefined` is the \"not given\" that\n * lets the global locale have its chance.\n */\nexport function useResolvedLocale(locale: () => string | undefined): ComputedRef<string> {\n // An empty tag is no tag: handed to `Intl` as it stands, it throws a RangeError.\n return computed(() => locale()
|
|
1
|
+
{"version":3,"file":"state.js","names":[],"sources":["../../src/i18n/state.ts"],"sourcesContent":["/**\n * Reactive process-wide locale configuration, callable outside components. Per-request\n * multilingual SSR requires explicit component text props.\n */\nimport { computed, shallowRef, type ComputedRef, type ShallowRef } from 'vue'\n\nimport { isDev } from '../utils/env'\n\nimport { en } from './en'\nimport type { Messages, MessagesInput } from './types'\n\n/** The language tag assumed until one is chosen. */\nexport const DEFAULT_LOCALE = 'en-US'\nconst DEFAULT_LANG = 'en'\n\n/** The dictionaries, filed under the LANGUAGE subtag alone; `en`, `fr`, `de`. */\nconst registry = new Map<string, Messages>([[DEFAULT_LANG, en]])\n\nconst currentLocale = shallowRef<string>(DEFAULT_LOCALE)\nconst currentMessages = shallowRef<Messages>(en)\n\n/**\n * The language part of a tag: British English is filed under English. A tag that makes no\n * sense comes back untouched, and will simply match no dictionary.\n */\nfunction langOf(locale: string): string {\n return locale.toLowerCase().split('-')[0] ?? locale\n}\n\n/**\n * The dictionary a tag resolves to, falling back to the default language. The last `?? en`\n * never fires: `registry` is seeded with `DEFAULT_LANG` and the only path that could remove it;\n * `registerMessages` passing `undefined`; puts `en` straight back instead of deleting.\n */\nfunction resolve(locale: string): Messages {\n return registry.get(langOf(locale)) ?? registry.get(DEFAULT_LANG) ?? en\n}\n\n/** Names that would reach into an object's own machinery instead of naming a section. */\nconst FORBIDDEN_KEYS = new Set(['__proto__', 'constructor', 'prototype'])\n\n/** Lays a partial override over a complete dictionary. */\nfunction mergeMessages(base: Messages, patch: MessagesInput): Messages {\n const out: Record<string, object> = { ...base }\n for (const [namespace, section] of Object.entries(patch)) {\n // A dictionary parsed from a file can carry one of these as a namespace, and assigning to\n // it would replace the copy's own machinery instead of adding a section. Nothing outside is\n // affected, the object being fresh; but every lookup in it is then wrong, and nothing says\n // so.\n if (FORBIDDEN_KEYS.has(namespace)) continue\n if (!section) continue\n /* Ignore nullish dictionary leaves so partial overrides cannot erase fallback labels. */\n const words = Object.entries(section).filter(([key, value]) => {\n const empty = value === undefined || value === null || value === ''\n if (empty && isDev) {\n console.warn(`[vectis] registerMessages: “${namespace}.${key}” is empty and was ignored.`)\n }\n return !empty\n })\n out[namespace] = { ...out[namespace], ...Object.fromEntries(words) }\n }\n return out as unknown as Messages\n}\n\n/**\n * Whether `Intl` takes a tag: a malformed one (\"fr_FR\") throws a RangeError in every formatter,\n * so it is ignored rather than passed on.\n */\nfunction isValidTag(tag: string): boolean {\n try {\n Intl.getCanonicalLocales(tag)\n return true\n } catch {\n if (isDev) console.warn(`[vectis] Locale “${tag}” ignored: not a language tag ('fr-FR').`)\n return false\n }\n}\n\n/**\n * Chooses the locale the library speaks. Those components also take their own `locale`, which\n * wins. A malformed tag is ignored and the locale in force stays.\n */\nexport function setLocale(locale: string): void {\n if (!isValidTag(locale)) return\n const lang = langOf(locale)\n if (isDev && !registry.has(lang)) {\n console.warn(\n `[vectis] No dictionary registered for “${lang}”: the text stays in ` +\n `“${DEFAULT_LANG}”. French is shipped — import { fr } from 'vectis-ui' then ` +\n `registerMessages('fr', fr). For another language: registerMessages('${lang}', { … }).`,\n )\n }\n currentLocale.value = locale\n currentMessages.value = resolve(locale)\n}\n\n/**\n * Adds or adjusts the words of a LANGUAGE, filed under the subtag alone: `fr`, not `fr-FR`.\n * What is left out falls back to whatever was registered before, then to the English always\n * carried, never to an empty string.\n */\nexport function registerMessages(lang: string, messages: MessagesInput | undefined): void {\n const key = langOf(lang)\n if (isDev && key !== lang.toLowerCase()) {\n console.warn(\n `[vectis] registerMessages('${lang}', …): the expected key is a language subtag ` +\n `alone — registered under “${key}”, which covers all its regional variants.`,\n )\n }\n if (messages === undefined) {\n if (key === DEFAULT_LANG) registry.set(DEFAULT_LANG, en)\n else registry.delete(key)\n } else {\n registry.set(key, mergeMessages(registry.get(key) ?? en, messages))\n }\n currentMessages.value = resolve(currentLocale.value)\n}\n\n/**\n * Reading `.value.x` once in a `setup()` body FREEZES that word. Read it where the read\n * repeats: inside a `computed`, or in the template.\n */\nexport function useMessages(): ShallowRef<Messages> {\n return currentMessages\n}\n\n/**\n * The locale tag in force. Internal: what the calendar and the pickers fall back on with no\n * `locale` of their own, and what VDataTable passes to `localeCompare` when it sorts.\n */\nexport function useLocale(): ShallowRef<string> {\n return currentLocale\n}\n\n/**\n * The locale a component with a `locale` prop of its own actually uses: the prop when it is\n * given, the locale in force otherwise. The prop has no literal default in any of the\n * components that read it, and that is what this relies on: `undefined` is the \"not given\" that\n * lets the global locale have its chance.\n */\nexport function useResolvedLocale(locale: () => string | undefined): ComputedRef<string> {\n // An empty or malformed tag is no tag: handed to `Intl` as it stands, it throws a RangeError.\n return computed(() => {\n const tag = locale()\n return tag && isValidTag(tag) ? tag : currentLocale.value\n })\n}\n"],"mappings":";;;;AAYA,IAAa,IAAiB,SACxB,IAAe,MAGf,oBAAW,IAAI,IAAsB,CAAC,CAAC,GAAc,CAAE,CAAC,CAAC,GAEzD,IAAgB,EAAmB,CAAc,GACjD,IAAkB,EAAqB,CAAE;AAM/C,SAAS,EAAO,GAAwB;CACtC,OAAO,EAAO,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM;AAC/C;AAOA,SAAS,EAAQ,GAA0B;CACzC,OAAO,EAAS,IAAI,EAAO,CAAM,CAAC,KAAK,EAAS,IAAI,CAAY,KAAK;AACvE;AAGA,IAAM,oBAAiB,IAAI,IAAI;CAAC;CAAa;CAAe;AAAW,CAAC;AAGxE,SAAS,EAAc,GAAgB,GAAgC;CACrE,IAAM,IAA8B,EAAE,GAAG,EAAK;CAC9C,KAAK,IAAM,CAAC,GAAW,MAAY,OAAO,QAAQ,CAAK,GAAG;EAMxD,IADI,EAAe,IAAI,CAAS,KAC5B,CAAC,GAAS;EAEd,IAAM,IAAQ,OAAO,QAAQ,CAAO,CAAC,CAAC,QAAQ,CAAC,GAAK,OAAW;GAC7D,IAAM,IAAQ,KAAiC,QAAQ,MAAU;GAIjE,OAHI,KAAS,KACX,QAAQ,KAAK,+BAA+B,EAAU,GAAG,EAAI,4BAA4B,GAEpF,CAAC;EACV,CAAC;EACD,EAAI,KAAa;GAAE,GAAG,EAAI;GAAY,GAAG,OAAO,YAAY,CAAK;EAAE;CACrE;CACA,OAAO;AACT;AAMA,SAAS,EAAW,GAAsB;CACxC,IAAI;EAEF,OADA,KAAK,oBAAoB,CAAG,GACrB;CACT,QAAQ;EAEN,OADI,KAAO,QAAQ,KAAK,oBAAoB,EAAI,yCAAyC,GAClF;CACT;AACF;AAMA,SAAgB,EAAU,GAAsB;CAC9C,IAAI,CAAC,EAAW,CAAM,GAAG;CACzB,IAAM,IAAO,EAAO,CAAM;CAS1B,AARI,KAAS,CAAC,EAAS,IAAI,CAAI,KAC7B,QAAQ,KACN,0CAA0C,EAAK,wBACzC,EAAa,iIACsD,EAAK,WAChF,GAEF,EAAc,QAAQ,GACtB,EAAgB,QAAQ,EAAQ,CAAM;AACxC;AAOA,SAAgB,EAAiB,GAAc,GAA2C;CACxF,IAAM,IAAM,EAAO,CAAI;CAavB,AAZI,KAAS,MAAQ,EAAK,YAAY,KACpC,QAAQ,KACN,8BAA8B,EAAK,yEACJ,EAAI,2CACrC,GAEE,MAAa,KAAA,IACX,MAAQ,IAAc,EAAS,IAAI,GAAc,CAAE,IAClD,EAAS,OAAO,CAAG,IAExB,EAAS,IAAI,GAAK,EAAc,EAAS,IAAI,CAAG,KAAK,GAAI,CAAQ,CAAC,GAEpE,EAAgB,QAAQ,EAAQ,EAAc,KAAK;AACrD;AAMA,SAAgB,IAAoC;CAClD,OAAO;AACT;AAMA,SAAgB,IAAgC;CAC9C,OAAO;AACT;AAQA,SAAgB,EAAkB,GAAuD;CAEvF,OAAO,QAAe;EACpB,IAAM,IAAM,EAAO;EACnB,OAAO,KAAO,EAAW,CAAG,IAAI,IAAM,EAAc;CACtD,CAAC;AACH"}
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer vectis.reset{*,:before,:after{box-sizing:border-box}*{margin:0}html{-webkit-text-size-adjust:100%;tab-size:4}body{-webkit-font-smoothing:antialiased;line-height:1.5}img,picture,video,canvas,svg{max-width:100%;display:block}input,button,textarea,select{font:inherit;color:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}}@layer vectis.tokens{:root{--vectis-color-white:oklch(100% 0 0);--vectis-color-black:oklch(0% 0 0);--vectis-color-red-50:oklch(97.1% .013 17.38);--vectis-color-red-100:oklch(93.6% .032 17.717);--vectis-color-red-200:oklch(88.5% .062 18.334);--vectis-color-red-300:oklch(80.8% .114 19.571);--vectis-color-red-400:oklch(70.4% .191 22.216);--vectis-color-red-500:oklch(63.7% .237 25.331);--vectis-color-red-600:oklch(57.7% .245 27.325);--vectis-color-red-700:oklch(50.5% .213 27.518);--vectis-color-red-800:oklch(44.4% .177 26.899);--vectis-color-red-900:oklch(39.6% .141 25.723);--vectis-color-red-950:oklch(25.8% .092 26.042);--vectis-color-amber-50:oklch(98.7% .022 95.277);--vectis-color-amber-100:oklch(96.2% .059 95.617);--vectis-color-amber-200:oklch(92.4% .12 95.746);--vectis-color-amber-300:oklch(87.9% .169 91.605);--vectis-color-amber-400:oklch(82.8% .189 84.429);--vectis-color-amber-500:oklch(76.9% .188 70.08);--vectis-color-amber-600:oklch(66.6% .179 58.318);--vectis-color-amber-700:oklch(55.5% .163 48.998);--vectis-color-amber-800:oklch(47.3% .137 46.201);--vectis-color-amber-900:oklch(41.4% .112 45.904);--vectis-color-amber-950:oklch(27.9% .077 45.635);--vectis-color-green-50:oklch(98.2% .018 155.826);--vectis-color-green-100:oklch(96.2% .044 156.743);--vectis-color-green-200:oklch(92.5% .084 155.995);--vectis-color-green-300:oklch(87.1% .15 154.449);--vectis-color-green-400:oklch(79.2% .209 151.711);--vectis-color-green-500:oklch(72.3% .219 149.579);--vectis-color-green-600:oklch(62.7% .194 149.214);--vectis-color-green-700:oklch(52.7% .154 150.069);--vectis-color-green-800:oklch(44.8% .119 151.328);--vectis-color-green-900:oklch(39.3% .095 152.535);--vectis-color-green-950:oklch(26.6% .065 152.934);--vectis-color-indigo-50:oklch(96.2% .018 272.314);--vectis-color-indigo-100:oklch(93% .034 272.788);--vectis-color-indigo-200:oklch(87% .065 274.039);--vectis-color-indigo-300:oklch(78.5% .115 274.713);--vectis-color-indigo-400:oklch(67.3% .182 276.935);--vectis-color-indigo-500:oklch(58.5% .233 277.117);--vectis-color-indigo-600:oklch(51.1% .262 276.966);--vectis-color-indigo-700:oklch(45.7% .24 277.023);--vectis-color-indigo-800:oklch(39.8% .195 277.366);--vectis-color-indigo-900:oklch(35.9% .144 278.697);--vectis-color-indigo-950:oklch(25.7% .09 281.288);--vectis-color-gray-50:oklch(98.5% .002 247.839);--vectis-color-gray-100:oklch(96.7% .003 264.542);--vectis-color-gray-200:oklch(92.8% .006 264.531);--vectis-color-gray-300:oklch(87.2% .01 258.338);--vectis-color-gray-400:oklch(70.7% .022 261.325);--vectis-color-gray-500:oklch(55.1% .027 264.364);--vectis-color-gray-600:oklch(44.6% .03 256.802);--vectis-color-gray-700:oklch(37.3% .034 259.733);--vectis-color-gray-800:oklch(27.8% .033 256.848);--vectis-color-gray-900:oklch(21% .034 264.665);--vectis-color-gray-950:oklch(13% .028 261.692);--vectis-space-1:.25rem;--vectis-space-2:.5rem;--vectis-space-3:.75rem;--vectis-space-4:1rem;--vectis-space-5:1.25rem;--vectis-space-6:1.5rem;--vectis-space-7:2rem;--vectis-space-8:2.5rem;--vectis-space-9:3rem;--vectis-space-10:4rem;--vectis-space-11:5rem;--vectis-space-12:6rem;--vectis-font-family-sans:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--vectis-font-family-display:var(--vectis-font-family-sans);--vectis-font-family-mono:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;--vectis-font-family-icon:"Material Symbols Rounded";--vectis-font-weight-regular:400;--vectis-font-weight-medium:500;--vectis-font-weight-semibold:600;--vectis-font-weight-bold:700;--vectis-font-size-xs:.75rem;--vectis-font-size-sm:.875rem;--vectis-font-size-md:1rem;--vectis-font-size-lg:1.125rem;--vectis-font-size-xl:1.25rem;--vectis-font-size-2xl:1.5rem;--vectis-font-size-3xl:1.875rem;--vectis-font-size-4xl:2.25rem;--vectis-font-size-5xl:3rem;--vectis-font-leading-none:1;--vectis-font-leading-tight:1.25;--vectis-font-leading-snug:1.4;--vectis-font-leading-normal:1.5;--vectis-font-leading-relaxed:1.65;--vectis-font-tracking-tight:-.015em;--vectis-font-tracking-wide:.05em;--vectis-radius-none:0px;--vectis-radius-xs:.125rem;--vectis-radius-sm:.25rem;--vectis-radius-md:.375rem;--vectis-radius-lg:.5rem;--vectis-radius-xl:.75rem;--vectis-radius-2xl:1rem;--vectis-radius-full:9999px;--vectis-shadow-xs:0 1px 2px 0 oklch(0% 0 0/.05);--vectis-shadow-sm:0 1px 3px 0 oklch(0% 0 0/.1), 0 1px 2px -1px oklch(0% 0 0/.1);--vectis-shadow-md:0 4px 6px -1px oklch(0% 0 0/.1), 0 2px 4px -2px oklch(0% 0 0/.1);--vectis-shadow-lg:0 10px 15px -3px oklch(0% 0 0/.1), 0 4px 6px -4px oklch(0% 0 0/.1);--vectis-shadow-xl:0 20px 25px -5px oklch(0% 0 0/.1), 0 8px 10px -6px oklch(0% 0 0/.1);--vectis-duration-0:0s;--vectis-duration-50:50ms;--vectis-duration-100:.1s;--vectis-duration-150:.15s;--vectis-duration-200:.2s;--vectis-duration-300:.3s;--vectis-duration-400:.4s;--vectis-duration-500:.5s;--vectis-duration-700:.7s;--vectis-duration-1000:1s;--vectis-duration-1500:1.5s;--vectis-duration-2000:2s;--vectis-duration-3000:3s;--vectis-duration-5000:5s;--vectis-ease-default:cubic-bezier(.2, 0, 0, 1);--vectis-ease-in:cubic-bezier(.5, 0, 1, 1);--vectis-ease-out:cubic-bezier(0, 0, .2, 1);--vectis-ease-in-out:cubic-bezier(.4, 0, .2, 1)}:root,[data-theme=light]{color-scheme:light;--vectis-color-surface:var(--vectis-color-white);--vectis-color-surface-muted:var(--vectis-color-gray-100);--vectis-color-surface-raised:var(--vectis-color-white);--vectis-color-surface-overlay:var(--vectis-color-white);--vectis-color-surface-sunken:var(--vectis-color-gray-50);--vectis-color-surface-inverse:var(--vectis-color-gray-900);--vectis-color-surface-skeleton:var(--vectis-color-gray-200);--vectis-color-text-on-inverse:var(--vectis-color-white);--vectis-color-text:var(--vectis-color-gray-900);--vectis-color-text-muted:var(--vectis-color-gray-600);--vectis-color-text-subtle:var(--vectis-color-gray-500);--vectis-color-text-on-accent:var(--vectis-color-white);--vectis-color-text-on-warning:var(--vectis-color-gray-950);--vectis-color-border:var(--vectis-color-gray-200);--vectis-color-border-strong:var(--vectis-color-gray-300);--vectis-color-border-on-fill:oklch(0% 0 0/.12);--vectis-color-accent:var(--vectis-color-indigo-600);--vectis-color-accent-hover:var(--vectis-color-indigo-700);--vectis-color-accent-active:var(--vectis-color-indigo-800);--vectis-color-accent-surface:var(--vectis-color-indigo-50);--vectis-color-accent-border:var(--vectis-color-indigo-200);--vectis-color-accent-text:var(--vectis-color-indigo-700);--vectis-color-danger:var(--vectis-color-red-600);--vectis-color-danger-hover:var(--vectis-color-red-700);--vectis-color-danger-active:var(--vectis-color-red-800);--vectis-color-danger-surface:var(--vectis-color-red-50);--vectis-color-danger-border:var(--vectis-color-red-200);--vectis-color-danger-text:var(--vectis-color-red-700);--vectis-color-success:var(--vectis-color-green-700);--vectis-color-success-hover:var(--vectis-color-green-800);--vectis-color-success-active:var(--vectis-color-green-900);--vectis-color-success-surface:var(--vectis-color-green-50);--vectis-color-success-border:var(--vectis-color-green-200);--vectis-color-success-text:var(--vectis-color-green-800);--vectis-color-warning:var(--vectis-color-amber-600);--vectis-color-warning-hover:var(--vectis-color-amber-700);--vectis-color-warning-active:var(--vectis-color-amber-800);--vectis-color-warning-surface:var(--vectis-color-amber-50);--vectis-color-warning-border:var(--vectis-color-amber-200);--vectis-color-warning-text:var(--vectis-color-amber-900);--vectis-color-backdrop:oklch(0% 0 0/.45);--vectis-color-event-surface:oklch(95% .045 265);--vectis-color-event-border:oklch(85% .08 265);--vectis-color-event-text:oklch(40% .11 265);--vectis-text-family:var(--vectis-font-family-sans);--vectis-text-family-heading:var(--vectis-font-family-display);--vectis-text-family-code:var(--vectis-font-family-mono);--vectis-text-display-size:var(--vectis-font-size-5xl);--vectis-text-display-weight:var(--vectis-font-weight-bold);--vectis-text-display-leading:var(--vectis-font-leading-none);--vectis-text-display-tracking:var(--vectis-font-tracking-tight);--vectis-text-heading-1-size:var(--vectis-font-size-4xl);--vectis-text-heading-1-weight:var(--vectis-font-weight-bold);--vectis-text-heading-1-leading:var(--vectis-font-leading-tight);--vectis-text-heading-1-tracking:var(--vectis-font-tracking-tight);--vectis-text-heading-2-size:var(--vectis-font-size-2xl);--vectis-text-heading-2-weight:var(--vectis-font-weight-semibold);--vectis-text-heading-2-leading:var(--vectis-font-leading-tight);--vectis-text-heading-2-tracking:var(--vectis-font-tracking-tight);--vectis-text-heading-3-size:var(--vectis-font-size-lg);--vectis-text-heading-3-weight:var(--vectis-font-weight-semibold);--vectis-text-heading-3-leading:var(--vectis-font-leading-snug);--vectis-text-heading-4-size:var(--vectis-font-size-md);--vectis-text-heading-4-weight:var(--vectis-font-weight-semibold);--vectis-text-heading-4-leading:var(--vectis-font-leading-snug);--vectis-text-subtitle-size:var(--vectis-font-size-sm);--vectis-text-subtitle-weight:var(--vectis-font-weight-regular);--vectis-text-subtitle-leading:var(--vectis-font-leading-normal);--vectis-text-body-xl-size:var(--vectis-font-size-lg);--vectis-text-body-xl-weight:var(--vectis-font-weight-regular);--vectis-text-body-xl-leading:var(--vectis-font-leading-relaxed);--vectis-text-body-lg-size:var(--vectis-font-size-md);--vectis-text-body-lg-weight:var(--vectis-font-weight-regular);--vectis-text-body-lg-leading:var(--vectis-font-leading-relaxed);--vectis-text-body-md-size:var(--vectis-font-size-sm);--vectis-text-body-md-weight:var(--vectis-font-weight-regular);--vectis-text-body-md-leading:var(--vectis-font-leading-normal);--vectis-text-body-sm-size:var(--vectis-font-size-xs);--vectis-text-body-sm-weight:var(--vectis-font-weight-regular);--vectis-text-body-sm-leading:var(--vectis-font-leading-normal);--vectis-text-label-size:var(--vectis-font-size-sm);--vectis-text-label-weight:var(--vectis-font-weight-medium);--vectis-text-label-leading:var(--vectis-font-leading-snug);--vectis-text-choice-size:var(--vectis-font-size-sm);--vectis-text-choice-weight:var(--vectis-font-weight-regular);--vectis-text-choice-leading:var(--vectis-font-leading-snug);--vectis-text-caption-size:var(--vectis-font-size-xs);--vectis-text-caption-weight:var(--vectis-font-weight-regular);--vectis-text-caption-leading:var(--vectis-font-leading-snug);--vectis-text-overline-size:var(--vectis-font-size-xs);--vectis-text-overline-weight:var(--vectis-font-weight-medium);--vectis-text-overline-leading:var(--vectis-font-leading-snug);--vectis-text-overline-tracking:var(--vectis-font-tracking-wide);--vectis-text-code-size:var(--vectis-font-size-sm);--vectis-text-code-weight:var(--vectis-font-weight-regular);--vectis-text-code-leading:var(--vectis-font-leading-normal);--vectis-text-control-weight:var(--vectis-font-weight-medium);--vectis-text-control-leading:var(--vectis-font-leading-none);--vectis-radius-interactive:var(--vectis-radius-md);--vectis-radius-surface:var(--vectis-radius-lg);--vectis-radius-overlay:var(--vectis-radius-xl);--vectis-radius-pill:var(--vectis-radius-full);--vectis-radius-chip:var(--vectis-radius-interactive);--vectis-duration-fast:var(--vectis-duration-150);--vectis-duration-base:var(--vectis-duration-200);--vectis-duration-slow:var(--vectis-duration-300);--vectis-focus-ring-color:var(--vectis-color-indigo-500);--vectis-focus-ring-width:2px;--vectis-focus-ring-offset:2px;--vectis-control-height-xs:1.5rem;--vectis-control-height-sm:2rem;--vectis-control-height-md:2.5rem;--vectis-control-height-lg:3rem;--vectis-control-height-xl:3.5rem;--vectis-control-border-width:2px;--vectis-control-size-check:1.25rem;--vectis-control-size-check-mark:.875rem;--vectis-control-size-check-dot:.5rem;--vectis-control-size-switch-w:2.5rem;--vectis-control-size-switch-h:1.25rem;--vectis-control-size-switch-pad:.125rem;--vectis-control-action-size-sm:1.25rem;--vectis-control-action-size-md:1.5rem;--vectis-control-action-size-lg:1.75rem;--vectis-control-size-slider-track:.375rem;--vectis-control-size-slider-thumb:1.25rem;--vectis-control-size-slider-length:10rem;--vectis-control-size-slider-field:5rem;--vectis-control-size-carousel-block:24rem;--vectis-control-size-carousel-indicator:.625rem;--vectis-control-size-carousel-indicator-active:1.25rem;--vectis-control-size-combobox-list-max-block:18rem;--vectis-control-size-select-list-max-block:18rem;--vectis-control-size-menu-min:11rem;--vectis-control-size-menu-max:20rem;--vectis-control-size-progress-linear-thickness:.25rem;--vectis-control-size-progress-linear-length:10rem;--vectis-control-size-meter-thickness-sm:.25rem;--vectis-control-size-meter-thickness-md:.5rem;--vectis-control-size-meter-thickness-lg:.75rem;--vectis-control-size-meter-segment-gap:.125rem;--vectis-control-size-progress-circular-diameter:3rem;--vectis-control-size-progress-circular-thickness:.25rem;--vectis-control-size-skeleton-surface:6rem;--vectis-control-size-resizable-hit:.75rem;--vectis-control-size-resizable-grip-length:1.5rem;--vectis-control-size-resizable-grip-thickness:.5rem;--vectis-control-size-toast-width:22rem;--vectis-control-size-tooltip-max:18rem;--vectis-control-size-hover-card-max:20rem;--vectis-control-size-dialog-width:25rem;--vectis-control-size-command-palette-width:40rem;--vectis-control-size-command-palette-list-max-block:20rem;--vectis-control-size-command-palette-offset:6rem;--vectis-control-size-stepper-indicator:2rem;--vectis-control-size-stepper-connector-min:1.5rem;--vectis-control-size-timeline-dot-sm:.5rem;--vectis-control-size-timeline-dot-md:.625rem;--vectis-control-size-timeline-icon-sm:1.5rem;--vectis-control-size-timeline-icon-md:2rem;--vectis-control-size-timeline-item-min:12rem;--vectis-control-size-rating-sm:1.25rem;--vectis-control-size-rating-md:1.5rem;--vectis-control-size-rating-lg:2rem;--vectis-control-size-drawer-sm:20rem;--vectis-control-size-drawer-md:25rem;--vectis-control-size-drawer-lg:35rem;--vectis-control-size-snackbar-min:18rem;--vectis-control-size-snackbar-max:36rem;--vectis-control-size-card-media:12rem;--vectis-control-size-card-body-min:16rem;--vectis-control-size-empty-state-media-sm:2.5rem;--vectis-control-size-empty-state-media-md:3rem;--vectis-control-size-empty-state-media-lg:4rem;--vectis-control-size-empty-state-text-max:28rem;--vectis-control-size-field-label:10rem;--vectis-control-size-field-control-min:16rem;--vectis-control-size-badge-h:1.25rem;--vectis-control-size-badge-dot:.625rem;--vectis-control-size-badge-ring:2px;--vectis-control-size-avatar-ring:2px;--vectis-control-size-color-picker-width:16rem;--vectis-control-size-color-picker-area:10rem;--vectis-control-size-color-picker-track:.75rem;--vectis-control-size-color-picker-thumb:1.25rem;--vectis-control-size-color-picker-preview:2rem;--vectis-control-size-color-picker-format:6rem;--vectis-control-size-color-picker-swatch:1.5rem;--vectis-control-size-color-picker-checker:.5rem;--vectis-control-size-date-picker-cell:2.5rem;--vectis-control-size-date-picker-day:var(--vectis-control-height-md);--vectis-control-size-date-picker-dot:.25rem;--vectis-control-size-date-picker-nav-min:5.375rem;--vectis-control-size-tab-indicator:2px;--vectis-control-size-table-search:16rem;--vectis-control-size-time-picker-dial:16rem;--vectis-control-size-time-picker-number:3rem;--vectis-control-size-time-picker-center:.5rem;--vectis-control-size-time-picker-hand:2px;--vectis-control-size-time-picker-hand-minor:1rem;--vectis-control-size-file-picker-min-block:10rem;--vectis-control-size-file-picker-icon:2.5rem;--vectis-control-size-file-picker-thumb:2.5rem;--vectis-control-size-calendar-hour:4rem;--vectis-control-size-calendar-gutter:4.5rem;--vectis-control-size-calendar-tick:.375rem;--vectis-control-size-calendar-edge:3rem;--vectis-control-size-calendar-day-min:5rem;--vectis-control-size-calendar-handle:.5rem;--vectis-control-size-calendar-allday-lane:1.5rem;--vectis-control-size-calendar-allday-max:7rem;--vectis-control-size-calendar-now-dot:.625rem;--vectis-control-size-calendar-event-edge:3px;--vectis-control-size-calendar-gap:.125rem;--vectis-control-size-calendar-grip:1rem;--vectis-control-size-calendar-grip-thickness:2px;--vectis-control-size-calendar-year-month:13rem;--vectis-control-size-calendar-month-cell:8.5rem;--vectis-control-size-calendar-year-cell:1.5rem;--vectis-icon-size-sm:1rem;--vectis-icon-size-md:1.25rem;--vectis-icon-size-lg:1.5rem}[data-theme=dark]{color-scheme:dark;--vectis-color-surface:var(--vectis-color-gray-950);--vectis-color-surface-muted:var(--vectis-color-gray-800);--vectis-color-surface-raised:var(--vectis-color-gray-900);--vectis-color-surface-overlay:var(--vectis-color-gray-900);--vectis-color-surface-sunken:oklch(11% .006 260);--vectis-color-surface-inverse:var(--vectis-color-gray-800);--vectis-color-surface-skeleton:var(--vectis-color-gray-800);--vectis-color-text-on-inverse:var(--vectis-color-gray-50);--vectis-color-text:var(--vectis-color-gray-50);--vectis-color-text-muted:var(--vectis-color-gray-300);--vectis-color-text-subtle:var(--vectis-color-gray-400);--vectis-color-text-on-accent:var(--vectis-color-white);--vectis-color-border:var(--vectis-color-gray-800);--vectis-color-border-strong:var(--vectis-color-gray-700);--vectis-color-border-on-fill:oklch(100% 0 0/.15);--vectis-color-accent:var(--vectis-color-indigo-500);--vectis-color-accent-hover:var(--vectis-color-indigo-400);--vectis-color-accent-active:var(--vectis-color-indigo-300);--vectis-color-accent-surface:var(--vectis-color-indigo-950);--vectis-color-accent-border:var(--vectis-color-indigo-900);--vectis-color-accent-text:var(--vectis-color-indigo-300);--vectis-color-danger:var(--vectis-color-red-600);--vectis-color-danger-hover:var(--vectis-color-red-700);--vectis-color-danger-active:var(--vectis-color-red-800);--vectis-color-danger-surface:var(--vectis-color-red-950);--vectis-color-danger-border:var(--vectis-color-red-900);--vectis-color-danger-text:var(--vectis-color-red-300);--vectis-color-success:var(--vectis-color-green-700);--vectis-color-success-hover:var(--vectis-color-green-800);--vectis-color-success-active:var(--vectis-color-green-900);--vectis-color-success-surface:var(--vectis-color-green-950);--vectis-color-success-border:var(--vectis-color-green-900);--vectis-color-success-text:var(--vectis-color-green-300);--vectis-color-warning:var(--vectis-color-amber-500);--vectis-color-warning-hover:var(--vectis-color-amber-400);--vectis-color-warning-active:var(--vectis-color-amber-300);--vectis-color-warning-surface:var(--vectis-color-amber-950);--vectis-color-warning-border:var(--vectis-color-amber-900);--vectis-color-warning-text:var(--vectis-color-amber-300);--vectis-color-backdrop:oklch(0% 0 0/.6);--vectis-color-event-surface:oklch(30% .05 265);--vectis-color-event-border:oklch(42% .08 265);--vectis-color-event-text:oklch(90% .06 265);--vectis-focus-ring-color:var(--vectis-color-indigo-400)}.v-tone[data-tone=accent]{--tone-bg-solid:var(--vectis-color-accent);--tone-bg-solid-hover:var(--vectis-color-accent-hover);--tone-bg-solid-active:var(--vectis-color-accent-active);--tone-text-solid:var(--vectis-color-text-on-accent);--tone-text-tinted:var(--vectis-color-accent-text);--tone-bg-soft:var(--vectis-color-accent-surface);--tone-border-soft:var(--vectis-color-accent-border)}.v-tone[data-tone=danger]{--tone-bg-solid:var(--vectis-color-danger);--tone-bg-solid-hover:var(--vectis-color-danger-hover);--tone-bg-solid-active:var(--vectis-color-danger-active);--tone-text-solid:var(--vectis-color-text-on-accent);--tone-text-tinted:var(--vectis-color-danger-text);--tone-bg-soft:var(--vectis-color-danger-surface);--tone-border-soft:var(--vectis-color-danger-border)}.v-tone[data-tone=success]{--tone-bg-solid:var(--vectis-color-success);--tone-bg-solid-hover:var(--vectis-color-success-hover);--tone-bg-solid-active:var(--vectis-color-success-active);--tone-text-solid:var(--vectis-color-text-on-accent);--tone-text-tinted:var(--vectis-color-success-text);--tone-bg-soft:var(--vectis-color-success-surface);--tone-border-soft:var(--vectis-color-success-border)}.v-tone[data-tone=warning]{--tone-bg-solid:var(--vectis-color-warning);--tone-bg-solid-hover:var(--vectis-color-warning-hover);--tone-bg-solid-active:var(--vectis-color-warning-active);--tone-text-solid:var(--vectis-color-text-on-warning);--tone-text-tinted:var(--vectis-color-warning-text);--tone-bg-soft:var(--vectis-color-warning-surface);--tone-border-soft:var(--vectis-color-warning-border)}.v-tone[data-tone=neutral]{--tone-bg-solid:var(--vectis-color-text);--tone-bg-solid-hover:color-mix(in oklab, var(--vectis-color-text), var(--vectis-color-surface) 8%);--tone-bg-solid-active:color-mix(in oklab, var(--vectis-color-text), var(--vectis-color-surface) 14%);--tone-text-solid:var(--vectis-color-surface);--tone-text-tinted:var(--vectis-color-text);--tone-bg-soft:var(--vectis-color-surface-muted);--tone-border-soft:var(--vectis-color-border-strong)}.v-tone[data-custom]{--tone-bg-solid:var(--custom-color);--tone-text-solid:var(--vectis-color-text-on-accent);--tone-text-tinted:color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 30%);--tone-bg-soft:color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 85%)}}@layer vectis.components{.v-variant[data-variant=solid]{background:var(--tone-bg-solid);color:var(--tone-text-solid)}.v-variant[data-variant=soft]{background:var(--tone-bg-soft);color:var(--tone-text-tinted)}.v-variant[data-variant=outline]{color:var(--tone-text-tinted);border-color:var(--tone-border-soft);background:0 0}.v-variant[data-variant=ghost]{color:var(--tone-text-tinted);background:0 0}.v-overlay{position:fixed;inset:auto}.v-overlay.v-overlay:not(:popover-open){display:none}.v-floating{margin:var(--vectis-space-2);position-try-fallbacks:flip-block, flip-inline}.v-floating[data-placement$=-start]{margin-inline-start:0}.v-floating[data-placement$=-end]{margin-inline-end:0}.v-floating[data-placement=bottom]{position-area:block-end;justify-self:anchor-center}.v-floating[data-placement=bottom-start]{position-area:block-end span-inline-end}.v-floating[data-placement=bottom-end]{position-area:block-end span-inline-start}.v-floating[data-placement=top]{position-area:block-start;justify-self:anchor-center}.v-floating[data-placement=top-start]{position-area:block-start span-inline-end}.v-floating[data-placement=top-end]{position-area:block-start span-inline-start}.v-floating[data-placement=left]{position-area:inline-start;align-self:anchor-center}.v-floating[data-placement=right]{position-area:inline-end;align-self:anchor-center}.v-floating[data-placement=right-start]{position-area:inline-end span-block-end}.v-floating[data-placement=right-end]{position-area:inline-end span-block-start}.v-floating[data-placement=left-start]{position-area:inline-start span-block-end}.v-floating[data-placement=left-end]{position-area:inline-start span-block-start}.v-floating[data-placement^=right-],.v-floating[data-placement^=left-]{margin-inline:var(--vectis-space-2)}.v-floating:is([data-placement=right-start],[data-placement=left-start]){margin-block-start:0}.v-floating:is([data-placement=right-end],[data-placement=left-end]){margin-block-end:0}.v-floating{opacity:0;transition:opacity var(--vectis-duration-fast) var(--vectis-ease-default), transform var(--vectis-duration-fast) var(--vectis-ease-default), overlay var(--vectis-duration-fast) allow-discrete, display var(--vectis-duration-fast) allow-discrete;transform:scale(.97)}.v-floating:popover-open{opacity:1;transform:none}@starting-style{.v-floating:popover-open{opacity:0;transform:scale(.97)}}@media (prefers-reduced-motion:reduce){.v-floating{transition:none}}.v-panel{gap:var(--vectis-space-1);padding:var(--vectis-space-1);background:var(--vectis-color-surface-overlay);color:var(--vectis-color-text);border:1px solid var(--vectis-color-border);border-radius:var(--vectis-radius-surface);box-shadow:var(--vectis-shadow-lg);font-family:var(--vectis-text-family);flex-direction:column;display:flex}.v-banner{--banner-line:calc(var(--vectis-text-body-md-size) * var(--vectis-text-body-md-leading));gap:var(--vectis-space-3);border-radius:var(--vectis-radius-overlay);box-shadow:var(--vectis-shadow-lg);font-family:var(--vectis-text-family);font-size:var(--vectis-text-body-md-size);line-height:var(--vectis-text-body-md-leading);transition:opacity var(--vectis-duration-base) var(--vectis-ease-default), translate var(--vectis-duration-base) var(--vectis-ease-default);display:flex}@starting-style{.v-banner{opacity:0;translate:0 var(--banner-enter-y,0)}}.v-banner-text{overflow-wrap:anywhere;flex:1;min-inline-size:0}.v-banner-control{--banner-control-height:var(--vectis-control-height-sm);margin-block:calc((var(--banner-line) - var(--banner-control-height)) / 2);margin-inline-end:calc(-1 * var(--vectis-space-2))}.v-banner .v-banner-control[data-tone]{--tone-text-tinted:currentcolor;--tone-bg-soft:color-mix(in oklab, currentcolor, transparent 85%)}@media (prefers-reduced-motion:reduce){.v-banner{transition:none}}.v-control{--control-height:var(--control-height-base)}.v-control[data-compact]{--control-height:calc(var(--control-height-base) - var(--vectis-space-1))}.v-control[data-size=xs]{--control-height-base:var(--vectis-control-height-xs);--control-font-size:var(--vectis-font-size-xs);--control-padding-inline:var(--vectis-space-2);--control-gap:var(--vectis-space-1);--control-action-size:var(--vectis-control-action-size-sm);--vectis-icon-size:var(--vectis-icon-size-sm);--vectis-icon-opsz:20}.v-control[data-size=sm]{--control-height-base:var(--vectis-control-height-sm);--control-font-size:var(--vectis-font-size-sm);--control-padding-inline:var(--vectis-space-3);--control-padding-inline-field:var(--vectis-space-2);--control-gap:var(--vectis-space-2);--control-action-size:var(--vectis-control-action-size-md);--vectis-icon-size:var(--vectis-icon-size-md);--vectis-icon-opsz:20}.v-control[data-size=md]{--control-height-base:var(--vectis-control-height-md);--control-font-size:var(--vectis-font-size-sm);--control-padding-inline:var(--vectis-space-4);--control-padding-inline-field:var(--vectis-space-3);--control-gap:var(--vectis-space-2);--control-action-size:var(--vectis-control-action-size-md);--vectis-icon-size:var(--vectis-icon-size-md);--vectis-icon-opsz:20}.v-control[data-size=lg]{--control-height-base:var(--vectis-control-height-lg);--control-font-size:var(--vectis-font-size-md);--control-padding-inline:var(--vectis-space-5);--control-padding-inline-field:var(--vectis-space-4);--control-gap:var(--vectis-space-3);--control-action-size:var(--vectis-control-action-size-lg);--vectis-icon-size:var(--vectis-icon-size-lg);--vectis-icon-opsz:24}.v-control[data-size=xl]{--control-height-base:var(--vectis-control-height-xl);--control-font-size:var(--vectis-font-size-md);--control-padding-inline:var(--vectis-space-6);--control-gap:var(--vectis-space-3);--vectis-icon-size:var(--vectis-icon-size-lg);--vectis-icon-opsz:24}.v-field-action{inline-size:var(--control-action-size);block-size:var(--control-action-size);margin-inline:calc((var(--vectis-icon-size) - var(--control-action-size)) / 2);border-radius:var(--vectis-radius-interactive);color:var(--vectis-color-text-muted);cursor:pointer;transition:color var(--vectis-duration-fast) var(--vectis-ease-default);background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.v-field-action:hover:not(:disabled){color:var(--vectis-color-text)}.v-field-action:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:calc(-1 * var(--vectis-focus-ring-width))}.v-field-meta{align-items:baseline;gap:var(--vectis-space-2);display:flex}.v-field-counter{font-size:var(--vectis-text-caption-size);color:var(--vectis-color-text-muted);font-variant-numeric:tabular-nums}.v-field-meta>.v-field-counter{margin-inline-start:auto}.v-field-counter[data-over]{color:var(--vectis-color-danger-text)}.v-field-error{color:var(--vectis-color-danger-text);font-family:var(--vectis-text-family);font-size:var(--vectis-text-caption-size);font-weight:var(--vectis-text-caption-weight);line-height:var(--vectis-text-caption-leading)}.v-field-required{color:var(--vectis-color-danger-text);margin-inline-start:var(--vectis-space-1)}@media (prefers-reduced-motion:reduce){.v-field-action{transition:none}}.v-choice{font-family:var(--vectis-text-family);font-size:var(--vectis-text-choice-size);font-weight:var(--vectis-text-choice-weight);line-height:var(--vectis-text-choice-leading);color:var(--vectis-color-text);grid-template-columns:auto auto;align-items:center;display:inline-grid;position:relative}.v-choice-row{grid-column:1/-1;grid-template-columns:subgrid;cursor:pointer;align-items:center;display:grid}.v-choice-label,.v-choice>:is(.v-field-hint,.v-field-error){margin-inline-start:var(--vectis-space-2)}.v-choice>:is(.v-field-hint,.v-field-error){grid-column:2}.v-choice[data-label-position=start] .v-choice-label{order:-1}.v-choice[data-label-position=start] .v-choice-label,.v-choice[data-label-position=start]>:is(.v-field-hint,.v-field-error){margin-inline:0 var(--vectis-space-2)}.v-choice[data-label-position=start]>:is(.v-field-hint,.v-field-error){grid-column:1}.v-choice[data-spread]{justify-content:space-between;display:grid}.v-choice-row .v-hidden-input:focus-visible+*{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-choice[data-readonly] .v-choice-row{cursor:default}.v-choice:has(.v-hidden-input:disabled){color:var(--vectis-color-text-subtle)}.v-choice:has(.v-hidden-input:disabled) .v-choice-row{cursor:not-allowed}.v-choice:has(.v-hidden-input:disabled)>.v-field-hint{--typography-color:var(--vectis-color-text-subtle)}.v-disclosure{interpolate-size:allow-keywords}.v-disclosure::details-content{block-size:0;transition:block-size var(--vectis-duration-base) var(--vectis-ease-default), content-visibility var(--vectis-duration-base) allow-discrete;overflow:clip}.v-disclosure[open]::details-content{block-size:auto}.v-disclosure>summary::-webkit-details-marker{display:none}.v-disclosure-chevron{color:var(--vectis-color-text-muted);transition:rotate var(--vectis-duration-base) var(--vectis-ease-default);flex:none}.v-disclosure[open]:not([data-swap])>summary>.v-disclosure-chevron{rotate:180deg}.v-disclosure[data-swap][open]>summary>.v-disclosure-chevron:not(.v-disclosure-chevron-open),.v-disclosure[data-swap]:not([open])>summary>.v-disclosure-chevron-open{display:none}.v-disclosure>summary[data-disabled]>.v-disclosure-chevron{color:inherit}@media (prefers-reduced-motion:reduce){.v-disclosure::details-content,.v-disclosure-chevron{transition:none}}}@layer vectis.utilities{.v-hidden-input{opacity:0;pointer-events:none;block-size:1px;inline-size:1px;margin:0;position:absolute}.v-visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}}
|
|
1
|
+
@layer vectis.reset{*,:before,:after{box-sizing:border-box}*{margin:0}html{-webkit-text-size-adjust:100%;tab-size:4}body{-webkit-font-smoothing:antialiased;line-height:1.5}img,picture,video,canvas,svg{max-width:100%;display:block}input,button,textarea,select{font:inherit;color:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}}@layer vectis.tokens{:root{--vectis-color-white:oklch(100% 0 0);--vectis-color-black:oklch(0% 0 0);--vectis-color-red-50:oklch(97.1% .013 17.38);--vectis-color-red-100:oklch(93.6% .032 17.717);--vectis-color-red-200:oklch(88.5% .062 18.334);--vectis-color-red-300:oklch(80.8% .114 19.571);--vectis-color-red-400:oklch(70.4% .191 22.216);--vectis-color-red-500:oklch(63.7% .237 25.331);--vectis-color-red-600:oklch(57.7% .245 27.325);--vectis-color-red-700:oklch(50.5% .213 27.518);--vectis-color-red-800:oklch(44.4% .177 26.899);--vectis-color-red-900:oklch(39.6% .141 25.723);--vectis-color-red-950:oklch(25.8% .092 26.042);--vectis-color-amber-50:oklch(98.7% .022 95.277);--vectis-color-amber-100:oklch(96.2% .059 95.617);--vectis-color-amber-200:oklch(92.4% .12 95.746);--vectis-color-amber-300:oklch(87.9% .169 91.605);--vectis-color-amber-400:oklch(82.8% .189 84.429);--vectis-color-amber-500:oklch(76.9% .188 70.08);--vectis-color-amber-600:oklch(66.6% .179 58.318);--vectis-color-amber-700:oklch(55.5% .163 48.998);--vectis-color-amber-800:oklch(47.3% .137 46.201);--vectis-color-amber-900:oklch(41.4% .112 45.904);--vectis-color-amber-950:oklch(27.9% .077 45.635);--vectis-color-green-50:oklch(98.2% .018 155.826);--vectis-color-green-100:oklch(96.2% .044 156.743);--vectis-color-green-200:oklch(92.5% .084 155.995);--vectis-color-green-300:oklch(87.1% .15 154.449);--vectis-color-green-400:oklch(79.2% .209 151.711);--vectis-color-green-500:oklch(72.3% .219 149.579);--vectis-color-green-600:oklch(62.7% .194 149.214);--vectis-color-green-700:oklch(52.7% .154 150.069);--vectis-color-green-800:oklch(44.8% .119 151.328);--vectis-color-green-900:oklch(39.3% .095 152.535);--vectis-color-green-950:oklch(26.6% .065 152.934);--vectis-color-indigo-50:oklch(96.2% .018 272.314);--vectis-color-indigo-100:oklch(93% .034 272.788);--vectis-color-indigo-200:oklch(87% .065 274.039);--vectis-color-indigo-300:oklch(78.5% .115 274.713);--vectis-color-indigo-400:oklch(67.3% .182 276.935);--vectis-color-indigo-500:oklch(58.5% .233 277.117);--vectis-color-indigo-600:oklch(51.1% .262 276.966);--vectis-color-indigo-700:oklch(45.7% .24 277.023);--vectis-color-indigo-800:oklch(39.8% .195 277.366);--vectis-color-indigo-900:oklch(35.9% .144 278.697);--vectis-color-indigo-950:oklch(25.7% .09 281.288);--vectis-color-gray-50:oklch(98.5% .002 247.839);--vectis-color-gray-100:oklch(96.7% .003 264.542);--vectis-color-gray-200:oklch(92.8% .006 264.531);--vectis-color-gray-300:oklch(87.2% .01 258.338);--vectis-color-gray-400:oklch(70.7% .022 261.325);--vectis-color-gray-500:oklch(55.1% .027 264.364);--vectis-color-gray-600:oklch(44.6% .03 256.802);--vectis-color-gray-700:oklch(37.3% .034 259.733);--vectis-color-gray-800:oklch(27.8% .033 256.848);--vectis-color-gray-900:oklch(21% .034 264.665);--vectis-color-gray-950:oklch(13% .028 261.692);--vectis-space-1:.25rem;--vectis-space-2:.5rem;--vectis-space-3:.75rem;--vectis-space-4:1rem;--vectis-space-5:1.25rem;--vectis-space-6:1.5rem;--vectis-space-7:2rem;--vectis-space-8:2.5rem;--vectis-space-9:3rem;--vectis-space-10:4rem;--vectis-space-11:5rem;--vectis-space-12:6rem;--vectis-font-family-sans:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--vectis-font-family-display:var(--vectis-font-family-sans);--vectis-font-family-mono:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;--vectis-font-family-icon:"Material Symbols Rounded";--vectis-font-weight-regular:400;--vectis-font-weight-medium:500;--vectis-font-weight-semibold:600;--vectis-font-weight-bold:700;--vectis-font-size-xs:.75rem;--vectis-font-size-sm:.875rem;--vectis-font-size-md:1rem;--vectis-font-size-lg:1.125rem;--vectis-font-size-xl:1.25rem;--vectis-font-size-2xl:1.5rem;--vectis-font-size-3xl:1.875rem;--vectis-font-size-4xl:2.25rem;--vectis-font-size-5xl:3rem;--vectis-font-leading-none:1;--vectis-font-leading-tight:1.25;--vectis-font-leading-snug:1.4;--vectis-font-leading-normal:1.5;--vectis-font-leading-relaxed:1.65;--vectis-font-tracking-tight:-.015em;--vectis-font-tracking-wide:.05em;--vectis-radius-none:0px;--vectis-radius-xs:.125rem;--vectis-radius-sm:.25rem;--vectis-radius-md:.375rem;--vectis-radius-lg:.5rem;--vectis-radius-xl:.75rem;--vectis-radius-2xl:1rem;--vectis-radius-full:9999px;--vectis-shadow-xs:0 1px 2px 0 oklch(0% 0 0/.05);--vectis-shadow-sm:0 1px 3px 0 oklch(0% 0 0/.1), 0 1px 2px -1px oklch(0% 0 0/.1);--vectis-shadow-md:0 4px 6px -1px oklch(0% 0 0/.1), 0 2px 4px -2px oklch(0% 0 0/.1);--vectis-shadow-lg:0 10px 15px -3px oklch(0% 0 0/.1), 0 4px 6px -4px oklch(0% 0 0/.1);--vectis-shadow-xl:0 20px 25px -5px oklch(0% 0 0/.1), 0 8px 10px -6px oklch(0% 0 0/.1);--vectis-duration-0:0s;--vectis-duration-50:50ms;--vectis-duration-100:.1s;--vectis-duration-150:.15s;--vectis-duration-200:.2s;--vectis-duration-300:.3s;--vectis-duration-400:.4s;--vectis-duration-500:.5s;--vectis-duration-700:.7s;--vectis-duration-1000:1s;--vectis-duration-1500:1.5s;--vectis-duration-2000:2s;--vectis-duration-3000:3s;--vectis-duration-5000:5s;--vectis-ease-default:cubic-bezier(.2, 0, 0, 1);--vectis-ease-in:cubic-bezier(.5, 0, 1, 1);--vectis-ease-out:cubic-bezier(0, 0, .2, 1);--vectis-ease-in-out:cubic-bezier(.4, 0, .2, 1)}:root,[data-theme=light]{color-scheme:light;--vectis-color-surface:var(--vectis-color-white);--vectis-color-surface-muted:var(--vectis-color-gray-100);--vectis-color-surface-raised:var(--vectis-color-white);--vectis-color-surface-overlay:var(--vectis-color-white);--vectis-color-surface-sunken:var(--vectis-color-gray-50);--vectis-color-surface-inverse:var(--vectis-color-gray-900);--vectis-color-surface-skeleton:var(--vectis-color-gray-200);--vectis-color-text-on-inverse:var(--vectis-color-white);--vectis-color-text:var(--vectis-color-gray-900);--vectis-color-text-muted:var(--vectis-color-gray-600);--vectis-color-text-subtle:var(--vectis-color-gray-500);--vectis-color-text-on-accent:var(--vectis-color-white);--vectis-color-text-on-warning:var(--vectis-color-gray-950);--vectis-color-border:var(--vectis-color-gray-200);--vectis-color-border-strong:var(--vectis-color-gray-300);--vectis-color-border-on-fill:oklch(0% 0 0/.12);--vectis-color-accent:var(--vectis-color-indigo-600);--vectis-color-accent-hover:var(--vectis-color-indigo-700);--vectis-color-accent-active:var(--vectis-color-indigo-800);--vectis-color-accent-surface:var(--vectis-color-indigo-50);--vectis-color-accent-border:var(--vectis-color-indigo-200);--vectis-color-accent-text:var(--vectis-color-indigo-700);--vectis-color-danger:var(--vectis-color-red-600);--vectis-color-danger-hover:var(--vectis-color-red-700);--vectis-color-danger-active:var(--vectis-color-red-800);--vectis-color-danger-surface:var(--vectis-color-red-50);--vectis-color-danger-border:var(--vectis-color-red-200);--vectis-color-danger-text:var(--vectis-color-red-700);--vectis-color-success:var(--vectis-color-green-700);--vectis-color-success-hover:var(--vectis-color-green-800);--vectis-color-success-active:var(--vectis-color-green-900);--vectis-color-success-surface:var(--vectis-color-green-50);--vectis-color-success-border:var(--vectis-color-green-200);--vectis-color-success-text:var(--vectis-color-green-800);--vectis-color-warning:var(--vectis-color-amber-600);--vectis-color-warning-hover:var(--vectis-color-amber-700);--vectis-color-warning-active:var(--vectis-color-amber-800);--vectis-color-warning-surface:var(--vectis-color-amber-50);--vectis-color-warning-border:var(--vectis-color-amber-200);--vectis-color-warning-text:var(--vectis-color-amber-900);--vectis-color-backdrop:oklch(0% 0 0/.45);--vectis-color-event-surface:oklch(95% .045 265);--vectis-color-event-border:oklch(85% .08 265);--vectis-color-event-text:oklch(40% .11 265);--vectis-text-family:var(--vectis-font-family-sans);--vectis-text-family-heading:var(--vectis-font-family-display);--vectis-text-family-code:var(--vectis-font-family-mono);--vectis-text-display-size:var(--vectis-font-size-5xl);--vectis-text-display-weight:var(--vectis-font-weight-bold);--vectis-text-display-leading:var(--vectis-font-leading-none);--vectis-text-display-tracking:var(--vectis-font-tracking-tight);--vectis-text-heading-1-size:var(--vectis-font-size-4xl);--vectis-text-heading-1-weight:var(--vectis-font-weight-bold);--vectis-text-heading-1-leading:var(--vectis-font-leading-tight);--vectis-text-heading-1-tracking:var(--vectis-font-tracking-tight);--vectis-text-heading-2-size:var(--vectis-font-size-2xl);--vectis-text-heading-2-weight:var(--vectis-font-weight-semibold);--vectis-text-heading-2-leading:var(--vectis-font-leading-tight);--vectis-text-heading-2-tracking:var(--vectis-font-tracking-tight);--vectis-text-heading-3-size:var(--vectis-font-size-lg);--vectis-text-heading-3-weight:var(--vectis-font-weight-semibold);--vectis-text-heading-3-leading:var(--vectis-font-leading-snug);--vectis-text-heading-4-size:var(--vectis-font-size-md);--vectis-text-heading-4-weight:var(--vectis-font-weight-semibold);--vectis-text-heading-4-leading:var(--vectis-font-leading-snug);--vectis-text-subtitle-size:var(--vectis-font-size-sm);--vectis-text-subtitle-weight:var(--vectis-font-weight-regular);--vectis-text-subtitle-leading:var(--vectis-font-leading-normal);--vectis-text-body-xl-size:var(--vectis-font-size-lg);--vectis-text-body-xl-weight:var(--vectis-font-weight-regular);--vectis-text-body-xl-leading:var(--vectis-font-leading-relaxed);--vectis-text-body-lg-size:var(--vectis-font-size-md);--vectis-text-body-lg-weight:var(--vectis-font-weight-regular);--vectis-text-body-lg-leading:var(--vectis-font-leading-relaxed);--vectis-text-body-md-size:var(--vectis-font-size-sm);--vectis-text-body-md-weight:var(--vectis-font-weight-regular);--vectis-text-body-md-leading:var(--vectis-font-leading-normal);--vectis-text-body-sm-size:var(--vectis-font-size-xs);--vectis-text-body-sm-weight:var(--vectis-font-weight-regular);--vectis-text-body-sm-leading:var(--vectis-font-leading-normal);--vectis-text-label-size:var(--vectis-font-size-sm);--vectis-text-label-weight:var(--vectis-font-weight-medium);--vectis-text-label-leading:var(--vectis-font-leading-snug);--vectis-text-choice-size:var(--vectis-font-size-sm);--vectis-text-choice-weight:var(--vectis-font-weight-regular);--vectis-text-choice-leading:var(--vectis-font-leading-snug);--vectis-text-caption-size:var(--vectis-font-size-xs);--vectis-text-caption-weight:var(--vectis-font-weight-regular);--vectis-text-caption-leading:var(--vectis-font-leading-snug);--vectis-text-overline-size:var(--vectis-font-size-xs);--vectis-text-overline-weight:var(--vectis-font-weight-medium);--vectis-text-overline-leading:var(--vectis-font-leading-snug);--vectis-text-overline-tracking:var(--vectis-font-tracking-wide);--vectis-text-code-size:var(--vectis-font-size-sm);--vectis-text-code-weight:var(--vectis-font-weight-regular);--vectis-text-code-leading:var(--vectis-font-leading-normal);--vectis-text-control-weight:var(--vectis-font-weight-medium);--vectis-text-control-leading:var(--vectis-font-leading-none);--vectis-radius-interactive:var(--vectis-radius-md);--vectis-radius-surface:var(--vectis-radius-lg);--vectis-radius-overlay:var(--vectis-radius-xl);--vectis-radius-pill:var(--vectis-radius-full);--vectis-radius-chip:var(--vectis-radius-interactive);--vectis-duration-fast:var(--vectis-duration-150);--vectis-duration-base:var(--vectis-duration-200);--vectis-duration-slow:var(--vectis-duration-300);--vectis-focus-ring-color:var(--vectis-color-indigo-500);--vectis-focus-ring-width:2px;--vectis-focus-ring-offset:2px;--vectis-control-height-xs:1.5rem;--vectis-control-height-sm:2rem;--vectis-control-height-md:2.5rem;--vectis-control-height-lg:3rem;--vectis-control-height-xl:3.5rem;--vectis-control-border-width:2px;--vectis-control-size-check:1.25rem;--vectis-control-size-check-mark:.875rem;--vectis-control-size-check-dot:.5rem;--vectis-control-size-switch-w:2.5rem;--vectis-control-size-switch-h:1.25rem;--vectis-control-size-switch-pad:.125rem;--vectis-control-action-size-sm:1.25rem;--vectis-control-action-size-md:1.5rem;--vectis-control-action-size-lg:1.75rem;--vectis-control-size-slider-track:.375rem;--vectis-control-size-slider-thumb:1.25rem;--vectis-control-size-slider-length:10rem;--vectis-control-size-slider-field:5rem;--vectis-control-size-carousel-block:24rem;--vectis-control-size-carousel-indicator:.625rem;--vectis-control-size-carousel-indicator-active:1.25rem;--vectis-control-size-combobox-list-max-block:18rem;--vectis-control-size-select-list-max-block:18rem;--vectis-control-size-menu-min:11rem;--vectis-control-size-menu-max:20rem;--vectis-control-size-progress-linear-thickness:.25rem;--vectis-control-size-progress-linear-length:10rem;--vectis-control-size-meter-thickness-sm:.25rem;--vectis-control-size-meter-thickness-md:.5rem;--vectis-control-size-meter-thickness-lg:.75rem;--vectis-control-size-meter-segment-gap:.125rem;--vectis-control-size-progress-circular-diameter:3rem;--vectis-control-size-progress-circular-thickness:.25rem;--vectis-control-size-skeleton-surface:6rem;--vectis-control-size-resizable-hit:.75rem;--vectis-control-size-resizable-grip-length:1.5rem;--vectis-control-size-resizable-grip-thickness:.5rem;--vectis-control-size-toast-width:22rem;--vectis-control-size-tooltip-max:18rem;--vectis-control-size-hover-card-max:20rem;--vectis-control-size-dialog-width:25rem;--vectis-control-size-command-palette-width:40rem;--vectis-control-size-command-palette-list-max-block:20rem;--vectis-control-size-command-palette-offset:6rem;--vectis-control-size-stepper-indicator:2rem;--vectis-control-size-stepper-connector-min:1.5rem;--vectis-control-size-timeline-dot-sm:.5rem;--vectis-control-size-timeline-dot-md:.625rem;--vectis-control-size-timeline-icon-sm:1.5rem;--vectis-control-size-timeline-icon-md:2rem;--vectis-control-size-timeline-item-min:12rem;--vectis-control-size-rating-sm:1.25rem;--vectis-control-size-rating-md:1.5rem;--vectis-control-size-rating-lg:2rem;--vectis-control-size-drawer-sm:20rem;--vectis-control-size-drawer-md:25rem;--vectis-control-size-drawer-lg:35rem;--vectis-control-size-snackbar-min:18rem;--vectis-control-size-snackbar-max:36rem;--vectis-control-size-card-media:12rem;--vectis-control-size-card-body-min:16rem;--vectis-control-size-empty-state-media-sm:2.5rem;--vectis-control-size-empty-state-media-md:3rem;--vectis-control-size-empty-state-media-lg:4rem;--vectis-control-size-empty-state-text-max:28rem;--vectis-control-size-field-label:10rem;--vectis-control-size-field-control-min:16rem;--vectis-control-size-badge-h:1.25rem;--vectis-control-size-badge-dot:.625rem;--vectis-control-size-badge-ring:2px;--vectis-control-size-avatar-ring:2px;--vectis-control-size-color-picker-width:16rem;--vectis-control-size-color-picker-area:10rem;--vectis-control-size-color-picker-track:.75rem;--vectis-control-size-color-picker-thumb:1.25rem;--vectis-control-size-color-picker-preview:2rem;--vectis-control-size-color-picker-format:6rem;--vectis-control-size-color-picker-swatch:1.5rem;--vectis-control-size-color-picker-checker:.5rem;--vectis-control-size-date-picker-cell:2.5rem;--vectis-control-size-date-picker-day:var(--vectis-control-height-md);--vectis-control-size-date-picker-dot:.25rem;--vectis-control-size-date-picker-nav-min:5.375rem;--vectis-control-size-tab-indicator:2px;--vectis-control-size-table-search:16rem;--vectis-control-size-time-picker-dial:16rem;--vectis-control-size-time-picker-number:3rem;--vectis-control-size-time-picker-center:.5rem;--vectis-control-size-time-picker-hand:2px;--vectis-control-size-time-picker-hand-minor:1rem;--vectis-control-size-file-picker-min-block:10rem;--vectis-control-size-file-picker-icon:2.5rem;--vectis-control-size-file-picker-thumb:2.5rem;--vectis-control-size-calendar-hour:4rem;--vectis-control-size-calendar-gutter:4.5rem;--vectis-control-size-calendar-tick:.375rem;--vectis-control-size-calendar-edge:3rem;--vectis-control-size-calendar-day-min:5rem;--vectis-control-size-calendar-handle:.5rem;--vectis-control-size-calendar-allday-lane:1.5rem;--vectis-control-size-calendar-allday-max:7rem;--vectis-control-size-calendar-now-dot:.625rem;--vectis-control-size-calendar-event-edge:3px;--vectis-control-size-calendar-gap:.125rem;--vectis-control-size-calendar-grip:1rem;--vectis-control-size-calendar-grip-thickness:2px;--vectis-control-size-calendar-year-month:13rem;--vectis-control-size-calendar-month-cell:8.5rem;--vectis-control-size-calendar-year-cell:1.5rem;--vectis-icon-size-sm:1rem;--vectis-icon-size-md:1.25rem;--vectis-icon-size-lg:1.5rem}[data-theme=dark]{color-scheme:dark;--vectis-color-surface:var(--vectis-color-gray-950);--vectis-color-surface-muted:var(--vectis-color-gray-800);--vectis-color-surface-raised:var(--vectis-color-gray-900);--vectis-color-surface-overlay:var(--vectis-color-gray-900);--vectis-color-surface-sunken:oklch(11% .006 260);--vectis-color-surface-inverse:var(--vectis-color-gray-800);--vectis-color-surface-skeleton:var(--vectis-color-gray-800);--vectis-color-text-on-inverse:var(--vectis-color-gray-50);--vectis-color-text:var(--vectis-color-gray-50);--vectis-color-text-muted:var(--vectis-color-gray-300);--vectis-color-text-subtle:var(--vectis-color-gray-400);--vectis-color-text-on-accent:var(--vectis-color-white);--vectis-color-border:var(--vectis-color-gray-800);--vectis-color-border-strong:var(--vectis-color-gray-700);--vectis-color-border-on-fill:oklch(100% 0 0/.15);--vectis-color-accent:var(--vectis-color-indigo-500);--vectis-color-accent-hover:var(--vectis-color-indigo-400);--vectis-color-accent-active:var(--vectis-color-indigo-300);--vectis-color-accent-surface:var(--vectis-color-indigo-950);--vectis-color-accent-border:var(--vectis-color-indigo-900);--vectis-color-accent-text:var(--vectis-color-indigo-300);--vectis-color-danger:var(--vectis-color-red-600);--vectis-color-danger-hover:var(--vectis-color-red-700);--vectis-color-danger-active:var(--vectis-color-red-800);--vectis-color-danger-surface:var(--vectis-color-red-950);--vectis-color-danger-border:var(--vectis-color-red-900);--vectis-color-danger-text:var(--vectis-color-red-300);--vectis-color-success:var(--vectis-color-green-700);--vectis-color-success-hover:var(--vectis-color-green-800);--vectis-color-success-active:var(--vectis-color-green-900);--vectis-color-success-surface:var(--vectis-color-green-950);--vectis-color-success-border:var(--vectis-color-green-900);--vectis-color-success-text:var(--vectis-color-green-300);--vectis-color-warning:var(--vectis-color-amber-500);--vectis-color-warning-hover:var(--vectis-color-amber-400);--vectis-color-warning-active:var(--vectis-color-amber-300);--vectis-color-warning-surface:var(--vectis-color-amber-950);--vectis-color-warning-border:var(--vectis-color-amber-900);--vectis-color-warning-text:var(--vectis-color-amber-300);--vectis-color-backdrop:oklch(0% 0 0/.6);--vectis-color-event-surface:oklch(30% .05 265);--vectis-color-event-border:oklch(42% .08 265);--vectis-color-event-text:oklch(90% .06 265);--vectis-focus-ring-color:var(--vectis-color-indigo-400)}.v-tone[data-tone=accent]{--tone-bg-solid:var(--vectis-color-accent);--tone-bg-solid-hover:var(--vectis-color-accent-hover);--tone-bg-solid-active:var(--vectis-color-accent-active);--tone-text-solid:var(--vectis-color-text-on-accent);--tone-text-tinted:var(--vectis-color-accent-text);--tone-bg-soft:var(--vectis-color-accent-surface);--tone-border-soft:var(--vectis-color-accent-border)}.v-tone[data-tone=danger]{--tone-bg-solid:var(--vectis-color-danger);--tone-bg-solid-hover:var(--vectis-color-danger-hover);--tone-bg-solid-active:var(--vectis-color-danger-active);--tone-text-solid:var(--vectis-color-text-on-accent);--tone-text-tinted:var(--vectis-color-danger-text);--tone-bg-soft:var(--vectis-color-danger-surface);--tone-border-soft:var(--vectis-color-danger-border)}.v-tone[data-tone=success]{--tone-bg-solid:var(--vectis-color-success);--tone-bg-solid-hover:var(--vectis-color-success-hover);--tone-bg-solid-active:var(--vectis-color-success-active);--tone-text-solid:var(--vectis-color-text-on-accent);--tone-text-tinted:var(--vectis-color-success-text);--tone-bg-soft:var(--vectis-color-success-surface);--tone-border-soft:var(--vectis-color-success-border)}.v-tone[data-tone=warning]{--tone-bg-solid:var(--vectis-color-warning);--tone-bg-solid-hover:var(--vectis-color-warning-hover);--tone-bg-solid-active:var(--vectis-color-warning-active);--tone-text-solid:var(--vectis-color-text-on-warning);--tone-text-tinted:var(--vectis-color-warning-text);--tone-bg-soft:var(--vectis-color-warning-surface);--tone-border-soft:var(--vectis-color-warning-border)}.v-tone[data-tone=neutral]{--tone-bg-solid:var(--vectis-color-text);--tone-bg-solid-hover:color-mix(in oklab, var(--vectis-color-text), var(--vectis-color-surface) 8%);--tone-bg-solid-active:color-mix(in oklab, var(--vectis-color-text), var(--vectis-color-surface) 14%);--tone-text-solid:var(--vectis-color-surface);--tone-text-tinted:var(--vectis-color-text);--tone-bg-soft:var(--vectis-color-surface-muted);--tone-border-soft:var(--vectis-color-border-strong)}.v-tone[data-custom]{--tone-bg-solid:var(--custom-color);--tone-text-solid:var(--vectis-color-text-on-accent);--tone-text-tinted:color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 30%);--tone-bg-soft:color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 85%)}}@layer vectis.components{.v-variant[data-variant=solid]{background:var(--tone-bg-solid);color:var(--tone-text-solid)}.v-variant[data-variant=soft]{background:var(--tone-bg-soft);color:var(--tone-text-tinted)}.v-variant[data-variant=outline]{color:var(--tone-text-tinted);border-color:var(--tone-border-soft);background:0 0}.v-variant[data-variant=ghost]{color:var(--tone-text-tinted);background:0 0}.v-overlay{position:fixed;inset:auto}.v-overlay.v-overlay:not(:popover-open){display:none}.v-floating{margin:var(--vectis-space-2);position-try-fallbacks:flip-block, flip-inline}.v-floating[data-placement$=-start]{margin-inline-start:0}.v-floating[data-placement$=-end]{margin-inline-end:0}.v-floating[data-placement=bottom]{position-area:block-end;justify-self:anchor-center}.v-floating[data-placement=bottom-start]{position-area:block-end span-inline-end}.v-floating[data-placement=bottom-end]{position-area:block-end span-inline-start}.v-floating[data-placement=top]{position-area:block-start;justify-self:anchor-center}.v-floating[data-placement=top-start]{position-area:block-start span-inline-end}.v-floating[data-placement=top-end]{position-area:block-start span-inline-start}.v-floating[data-placement=left]{position-area:inline-start;align-self:anchor-center}.v-floating[data-placement=right]{position-area:inline-end;align-self:anchor-center}.v-floating[data-placement=right-start]{position-area:inline-end span-block-end}.v-floating[data-placement=right-end]{position-area:inline-end span-block-start}.v-floating[data-placement=left-start]{position-area:inline-start span-block-end}.v-floating[data-placement=left-end]{position-area:inline-start span-block-start}.v-floating[data-placement^=right-],.v-floating[data-placement^=left-]{margin-inline:var(--vectis-space-2)}.v-floating:is([data-placement=right-start],[data-placement=left-start]){margin-block-start:0}.v-floating:is([data-placement=right-end],[data-placement=left-end]){margin-block-end:0}.v-floating{opacity:0;transition:opacity var(--vectis-duration-fast) var(--vectis-ease-default), transform var(--vectis-duration-fast) var(--vectis-ease-default), overlay var(--vectis-duration-fast) allow-discrete, display var(--vectis-duration-fast) allow-discrete;transform:scale(.97)}.v-floating:popover-open{opacity:1;transform:none}@starting-style{.v-floating:popover-open{opacity:0;transform:scale(.97)}}@media (prefers-reduced-motion:reduce){.v-floating{transition:none}}.v-panel{gap:var(--vectis-space-1);padding:var(--vectis-space-1);background:var(--vectis-color-surface-overlay);color:var(--vectis-color-text);border:1px solid var(--vectis-color-border);border-radius:var(--vectis-radius-surface);box-shadow:var(--vectis-shadow-lg);font-family:var(--vectis-text-family);flex-direction:column;display:flex}.v-banner{--banner-line:calc(var(--vectis-text-body-md-size) * var(--vectis-text-body-md-leading));gap:var(--vectis-space-3);border-radius:var(--vectis-radius-overlay);box-shadow:var(--vectis-shadow-lg);font-family:var(--vectis-text-family);font-size:var(--vectis-text-body-md-size);line-height:var(--vectis-text-body-md-leading);transition:opacity var(--vectis-duration-base) var(--vectis-ease-default), translate var(--vectis-duration-base) var(--vectis-ease-default);display:flex}@starting-style{.v-banner{opacity:0;translate:0 var(--banner-enter-y,0)}}.v-banner-text{overflow-wrap:anywhere;flex:1;min-inline-size:0}.v-banner-control{--banner-control-height:var(--vectis-control-height-sm);margin-block:calc((var(--banner-line) - var(--banner-control-height)) / 2);margin-inline-end:calc(-1 * var(--vectis-space-2))}.v-banner .v-banner-control[data-tone]{--tone-text-tinted:currentcolor;--tone-bg-soft:color-mix(in oklab, currentcolor, transparent 85%)}@media (prefers-reduced-motion:reduce){.v-banner{transition:none}}.v-control{--control-height:var(--control-height-base)}.v-control[data-compact]{--control-height:calc(var(--control-height-base) - var(--vectis-space-1))}.v-control[data-size=xs]{--control-height-base:var(--vectis-control-height-xs);--control-font-size:var(--vectis-font-size-xs);--control-padding-inline:var(--vectis-space-2);--control-gap:var(--vectis-space-1);--control-action-size:var(--vectis-control-action-size-sm);--vectis-icon-size:var(--vectis-icon-size-sm);--vectis-icon-opsz:20}.v-control[data-size=sm]{--control-height-base:var(--vectis-control-height-sm);--control-font-size:var(--vectis-font-size-sm);--control-padding-inline:var(--vectis-space-3);--control-padding-inline-field:var(--vectis-space-2);--control-gap:var(--vectis-space-2);--control-action-size:var(--vectis-control-action-size-md);--vectis-icon-size:var(--vectis-icon-size-md);--vectis-icon-opsz:20}.v-control[data-size=md]{--control-height-base:var(--vectis-control-height-md);--control-font-size:var(--vectis-font-size-sm);--control-padding-inline:var(--vectis-space-4);--control-padding-inline-field:var(--vectis-space-3);--control-gap:var(--vectis-space-2);--control-action-size:var(--vectis-control-action-size-md);--vectis-icon-size:var(--vectis-icon-size-md);--vectis-icon-opsz:20}.v-control[data-size=lg]{--control-height-base:var(--vectis-control-height-lg);--control-font-size:var(--vectis-font-size-md);--control-padding-inline:var(--vectis-space-5);--control-padding-inline-field:var(--vectis-space-4);--control-gap:var(--vectis-space-3);--control-action-size:var(--vectis-control-action-size-lg);--vectis-icon-size:var(--vectis-icon-size-lg);--vectis-icon-opsz:24}.v-control[data-size=xl]{--control-height-base:var(--vectis-control-height-xl);--control-font-size:var(--vectis-font-size-md);--control-padding-inline:var(--vectis-space-6);--control-gap:var(--vectis-space-3);--vectis-icon-size:var(--vectis-icon-size-lg);--vectis-icon-opsz:24}.v-field-action{inline-size:var(--control-action-size);block-size:var(--control-action-size);margin-inline:calc((var(--vectis-icon-size) - var(--control-action-size)) / 2);border-radius:var(--vectis-radius-interactive);color:var(--vectis-color-text-muted);cursor:pointer;transition:color var(--vectis-duration-fast) var(--vectis-ease-default);background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.v-field-action:hover:not(:disabled){color:var(--vectis-color-text)}.v-field-action:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:calc(-1 * var(--vectis-focus-ring-width))}.v-field-meta{align-items:baseline;gap:var(--vectis-space-2);display:flex}.v-field-counter{font-size:var(--vectis-text-caption-size);color:var(--vectis-color-text-muted);font-variant-numeric:tabular-nums}.v-field-meta>.v-field-counter{margin-inline-start:auto}.v-field-counter[data-over]{color:var(--vectis-color-danger-text)}.v-field-error{color:var(--vectis-color-danger-text);font-family:var(--vectis-text-family);font-size:var(--vectis-text-caption-size);font-weight:var(--vectis-text-caption-weight);line-height:var(--vectis-text-caption-leading)}.v-field-required{color:var(--vectis-color-danger-text);margin-inline-start:var(--vectis-space-1)}@media (prefers-reduced-motion:reduce){.v-field-action{transition:none}}.v-choice{font-family:var(--vectis-text-family);font-size:var(--vectis-text-choice-size);font-weight:var(--vectis-text-choice-weight);line-height:var(--vectis-text-choice-leading);color:var(--vectis-color-text);grid-template-columns:auto auto;justify-content:start;align-items:center;display:inline-grid;position:relative}.v-choice-row{grid-column:1/-1;grid-template-columns:subgrid;cursor:pointer;align-items:center;display:grid}.v-choice-label,.v-choice>:is(.v-field-hint,.v-field-error){margin-inline-start:var(--vectis-space-2)}.v-choice>:is(.v-field-hint,.v-field-error){grid-column:2}.v-choice[data-label-position=start] .v-choice-label{order:-1}.v-choice[data-label-position=start] .v-choice-label,.v-choice[data-label-position=start]>:is(.v-field-hint,.v-field-error){margin-inline:0 var(--vectis-space-2)}.v-choice[data-label-position=start]>:is(.v-field-hint,.v-field-error){grid-column:1}.v-choice[data-spread]{justify-content:space-between;display:grid}.v-choice-row .v-hidden-input:focus-visible+*{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-choice[data-readonly] .v-choice-row{cursor:default}.v-choice:has(.v-hidden-input:disabled){color:var(--vectis-color-text-subtle)}.v-choice:has(.v-hidden-input:disabled) .v-choice-row{cursor:not-allowed}.v-choice:has(.v-hidden-input:disabled)>.v-field-hint{--typography-color:var(--vectis-color-text-subtle)}.v-disclosure{interpolate-size:allow-keywords}.v-disclosure::details-content{block-size:0;transition:block-size var(--vectis-duration-base) var(--vectis-ease-default), content-visibility var(--vectis-duration-base) allow-discrete;overflow:clip}.v-disclosure[open]::details-content{block-size:auto}.v-disclosure>summary::-webkit-details-marker{display:none}.v-disclosure-chevron{color:var(--vectis-color-text-muted);transition:rotate var(--vectis-duration-base) var(--vectis-ease-default);flex:none}.v-disclosure[open]:not([data-swap])>summary>.v-disclosure-chevron{rotate:180deg}.v-disclosure[data-swap][open]>summary>.v-disclosure-chevron:not(.v-disclosure-chevron-open),.v-disclosure[data-swap]:not([open])>summary>.v-disclosure-chevron-open{display:none}.v-disclosure>summary[data-disabled]>.v-disclosure-chevron{color:inherit}@media (prefers-reduced-motion:reduce){.v-disclosure::details-content,.v-disclosure-chevron{transition:none}}}@layer vectis.utilities{.v-hidden-input{opacity:0;pointer-events:none;block-size:1px;inline-size:1px;margin:0;position:absolute}.v-visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}}
|
package/dist/utils/date.js
CHANGED
|
@@ -85,13 +85,14 @@ function T(e, t, n) {
|
|
|
85
85
|
let r = a(e);
|
|
86
86
|
return r ? w(t, n).format(r) : "";
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
var E = /[\u2009\u200A]/g;
|
|
89
|
+
function D(e, t, n, r) {
|
|
89
90
|
let i = a(e), o = a(t);
|
|
90
91
|
if (!i || !o) return "";
|
|
91
92
|
let s = w(n, r), c = d(e, t);
|
|
92
|
-
return c === 0 ? s.format(i) : c < 0 ? s.formatRange(i, o) : s.formatRange(o, i);
|
|
93
|
+
return c === 0 ? s.format(i) : (c < 0 ? s.formatRange(i, o) : s.formatRange(o, i)).replace(E, " ");
|
|
93
94
|
}
|
|
94
95
|
//#endregion
|
|
95
|
-
export { c as addDays, l as addMonths, g as buildMonthGrid, p as clampISO, d as compareISO, w as dateFormatter, u as daysInMonth, v as firstDayOfWeekFor, T as formatDateDisplay,
|
|
96
|
+
export { c as addDays, l as addMonths, g as buildMonthGrid, p as clampISO, d as compareISO, w as dateFormatter, u as daysInMonth, v as firstDayOfWeekFor, T as formatDateDisplay, D as formatDisplayRange, o as formatISO, h as isDateAllowed, f as isSameISO, i as isValidISO, m as isWithin, s as isoOf, a as parseISO, S as weekdayNames };
|
|
96
97
|
|
|
97
98
|
//# sourceMappingURL=date.js.map
|
package/dist/utils/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","names":[],"sources":["../../src/utils/date.ts"],"sourcesContent":["// @ssr @core\n/** Pure date arithmetic shared by date inputs, pickers and calendars. */\n\nimport { memo } from './memo'\nimport { pad2 } from './text'\n\n/**\n * Not `new Date(y, m, d)` itself, which reads a year from 0 to 99 as 1900 to 1999: `0050-01-01`\n * would come back as 1950, and a `min` in the first century would open the years view nineteen\n * centuries late. `setFullYear` takes the year as it is.\n */\nfunction localDate(year: number, month0: number, day: number): Date {\n const date = new Date(year, month0, day)\n if (year >= 0 && year < 100) date.setFullYear(year, month0, day)\n return date\n}\n\nconst ISO_RE = /^\\d{4}-\\d{2}-\\d{2}$/\n\n/** Tells whether a value is a real `YYYY-MM-DD` date. */\nexport function isValidISO(iso: unknown): iso is string {\n return typeof iso === 'string' && parseISO(iso) !== null\n}\n\n/**\n * Parse ISO dates at local midnight, returning null for invalid input. Round-trip the result to\n * reject impossible days that Date silently rolls into the next month.\n */\nexport function parseISO(iso: string | null | undefined): Date | null {\n if (typeof iso !== 'string' || !ISO_RE.test(iso)) return null\n const parts = iso.split('-')\n const date = localDate(Number(parts[0]), Number(parts[1]) - 1, Number(parts[2]))\n return Number.isNaN(date.getTime()) || formatISO(date) !== iso ? null : date\n}\n\n/**\n * Writes a `Date` as an ISO string, reading its LOCAL components. This manual\n * concatenation is what `toISOString()` cannot do, since that one formats in UTC.\n */\nexport function formatISO(date: Date): string {\n const year = String(date.getFullYear()).padStart(4, '0')\n return `${year}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`\n}\n\n/**\n * Builds an ISO string from separate values. The month is 0-indexed, as everywhere\n * in the language: 0 is January.\n */\nexport function isoOf(year: number, month0: number, day: number): string {\n return formatISO(localDate(year, month0, day))\n}\n\n/**\n * Moves a date by a number of days, forwards or backwards. Crossing into another\n * month or year is handled by `Date` itself.\n */\nexport function addDays(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n d.setDate(d.getDate() + n)\n return formatISO(d)\n}\n\n/** Moves a date by a number of months, keeping the day of the month where possible. */\nexport function addMonths(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n const day = d.getDate()\n d.setDate(1)\n d.setMonth(d.getMonth() + n)\n d.setDate(Math.min(day, daysInMonth(d.getFullYear(), d.getMonth())))\n return formatISO(d)\n}\n\n/**\n * How many days the given month holds, leap years included. Day 0 of the following month is the\n * last day of this one, which makes the leap year rule the language's problem rather than ours.\n */\nexport function daysInMonth(year: number, month0: number): number {\n return localDate(year, month0 + 1, 0).getDate()\n}\n\n/** Compares two dates chronologically, returning the usual -1, 0 or 1. */\nexport function compareISO(a: string, b: string): number {\n return a < b ? -1 : a > b ? 1 : 0\n}\n\n/**\n * Whether two dates are the same day, with a null on either side counting as no\n * date at all rather than as a match.\n */\nexport const isSameISO = (a: string | null, b: string | null) => !!a && a === b\n\n/**\n * Brings a date back inside the allowed interval, returning the bound it exceeded.\n * Both bounds are optional, and an absent one means unbounded on that side.\n */\nexport function clampISO(iso: string, min?: string, max?: string): string {\n if (min && compareISO(iso, min) < 0) return min\n if (max && compareISO(iso, max) > 0) return max\n return iso\n}\n\n/** Whether a date falls inside the allowed interval, each bound being optional. */\nexport function isWithin(iso: string, min?: string, max?: string): boolean {\n if (min && compareISO(iso, min) < 0) return false\n if (max && compareISO(iso, max) > 0) return false\n return true\n}\n\n/** Whether a date may be chosen: inside the bounds, and not one the matcher excludes. */\nexport function isDateAllowed(\n iso: string,\n min: string | undefined,\n max: string | undefined,\n excluded: (iso: string) => boolean,\n): boolean {\n return isWithin(iso, min, max) && !excluded(iso)\n}\n\n/** One square of a month grid. */\nexport interface MonthCell {\n /** The day it stands for, as an ISO `YYYY-MM-DD` string. */\n iso: string\n /** The day of the month, carried so a caller does not parse back what was just formatted. */\n day: number\n /**\n * Which side of the displayed month this day belongs to when it is not part of it,\n * and `null` when it is.\n */\n adjacent: 'prev' | 'next' | null\n}\n\n/**\n * Builds the grid of a month: 42 cells, six rows of seven, filled out at both ends with the\n * days of the neighbouring months. The count is fixed on purpose, so that the calendar keeps\n * the same height from one month to the next instead of jumping by a row.\n */\nexport function buildMonthGrid(year: number, month0: number, firstDayOfWeek: number): MonthCell[] {\n const first = localDate(year, month0, 1)\n // How many cells the 1st of the month sits after the start of its row, which is\n // exactly how many days of the previous month the grid has to open with.\n const offset = (first.getDay() - firstDayOfWeek + 7) % 7\n const cells: MonthCell[] = []\n for (let i = 0; i < 42; i++) {\n // Built from the 1st rather than stepped from a start date, so the month and year\n // rolling over at either end is `Date`'s arithmetic and not ours.\n const d = localDate(year, month0, 1 - offset + i)\n const adjacent =\n d.getMonth() === month0 && d.getFullYear() === year ? null : d < first ? 'prev' : 'next'\n cells.push({ iso: formatISO(d), day: d.getDate(), adjacent })\n }\n return cells\n}\n\nconst firstDayCache = new Map<string, number>()\n\n// @fallback @ssr\n/**\n * The day the week starts on in a given locale, from 0 for Sunday to 6 for Saturday : Sunday in\n * the United States, Monday in most of Europe, Saturday in much of the Middle East. That part\n * of `Intl` is not everywhere (some Node builds lack it), so the answer falls back to Monday\n * when it is missing.\n */\nexport function firstDayOfWeekFor(locale: string): number {\n return memo(firstDayCache, locale, () => resolveFirstDayOfWeek(locale))\n}\n\nfunction resolveFirstDayOfWeek(locale: string): number {\n try {\n // Implementations disagree on the shape: Chrome and Safari expose `weekInfo` as\n // a getter, others a `getWeekInfo()` method. Both are tried.\n const loc = new Intl.Locale(locale) as Intl.Locale & {\n weekInfo?: { firstDay: number }\n getWeekInfo?: () => { firstDay: number }\n }\n const info = loc.getWeekInfo?.() ?? loc.weekInfo\n if (info?.firstDay) return info.firstDay % 7\n } catch {\n /* An invalid locale throws a RangeError: fall through to the fallback */\n }\n return 1\n}\n\n// The reference instants the names are formatted from. Any Sunday will do for the\n// weekdays, and any year for the months; combined with `timeZone: 'UTC'` at every\n// call site, they pin the output whatever zone the machine is in.\nconst REF_SUNDAY = Date.UTC(2021, 7, 1)\nconst MS_DAY = 86_400_000\n\n/**\n * The names of the seven days, starting from `firstDayOfWeek` so the list can be\n * dropped straight into a calendar header.\n */\nexport function weekdayNames(\n locale: string,\n firstDayOfWeek: number,\n weekday: 'short' | 'long' = 'short',\n): string[] {\n const fmt = dateFormatter(locale, { weekday, timeZone: 'UTC' })\n return Array.from({ length: 7 }, (_, i) =>\n fmt.format(REF_SUNDAY + ((firstDayOfWeek + i) % 7) * MS_DAY),\n )\n}\n\n/**\n * One formatter kept per locale and set of options, for the lifetime of the module: building an\n * `Intl` formatter costs far more than using one.\n */\nconst formatters = new Map<string, Intl.DateTimeFormat>()\n\nexport function dateFormatter(\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n return memo(\n formatters,\n `${locale}|${JSON.stringify(options)}`,\n () => new Intl.DateTimeFormat(locale, options),\n )\n}\n\n/**\n * A date written out for the reader, in the conventions of their locale: this is\n * what VDateInput shows in its field. An unparsable date yields an empty string\n * rather than a broken one.\n */\nexport function formatDateDisplay(\n iso: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const d = parseISO(iso)\n return d ? dateFormatter(locale, options).format(d) : ''\n}\n\n/** A period written out for the reader. */\nexport function formatDisplayRange(\n start: string,\n end: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const a = parseISO(start)\n const b = parseISO(end)\n if (!a || !b) return ''\n const fmt = dateFormatter(locale, options)\n const order = compareISO(start, end)\n if (order === 0) return fmt.format(a)\n return order < 0 ? fmt.formatRange(a, b) : fmt.formatRange(b, a)\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"date.js","names":[],"sources":["../../src/utils/date.ts"],"sourcesContent":["// @ssr @core\n/** Pure date arithmetic shared by date inputs, pickers and calendars. */\n\nimport { memo } from './memo'\nimport { pad2 } from './text'\n\n/**\n * Not `new Date(y, m, d)` itself, which reads a year from 0 to 99 as 1900 to 1999: `0050-01-01`\n * would come back as 1950, and a `min` in the first century would open the years view nineteen\n * centuries late. `setFullYear` takes the year as it is.\n */\nfunction localDate(year: number, month0: number, day: number): Date {\n const date = new Date(year, month0, day)\n if (year >= 0 && year < 100) date.setFullYear(year, month0, day)\n return date\n}\n\nconst ISO_RE = /^\\d{4}-\\d{2}-\\d{2}$/\n\n/** Tells whether a value is a real `YYYY-MM-DD` date. */\nexport function isValidISO(iso: unknown): iso is string {\n return typeof iso === 'string' && parseISO(iso) !== null\n}\n\n/**\n * Parse ISO dates at local midnight, returning null for invalid input. Round-trip the result to\n * reject impossible days that Date silently rolls into the next month.\n */\nexport function parseISO(iso: string | null | undefined): Date | null {\n if (typeof iso !== 'string' || !ISO_RE.test(iso)) return null\n const parts = iso.split('-')\n const date = localDate(Number(parts[0]), Number(parts[1]) - 1, Number(parts[2]))\n return Number.isNaN(date.getTime()) || formatISO(date) !== iso ? null : date\n}\n\n/**\n * Writes a `Date` as an ISO string, reading its LOCAL components. This manual\n * concatenation is what `toISOString()` cannot do, since that one formats in UTC.\n */\nexport function formatISO(date: Date): string {\n const year = String(date.getFullYear()).padStart(4, '0')\n return `${year}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`\n}\n\n/**\n * Builds an ISO string from separate values. The month is 0-indexed, as everywhere\n * in the language: 0 is January.\n */\nexport function isoOf(year: number, month0: number, day: number): string {\n return formatISO(localDate(year, month0, day))\n}\n\n/**\n * Moves a date by a number of days, forwards or backwards. Crossing into another\n * month or year is handled by `Date` itself.\n */\nexport function addDays(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n d.setDate(d.getDate() + n)\n return formatISO(d)\n}\n\n/** Moves a date by a number of months, keeping the day of the month where possible. */\nexport function addMonths(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n const day = d.getDate()\n d.setDate(1)\n d.setMonth(d.getMonth() + n)\n d.setDate(Math.min(day, daysInMonth(d.getFullYear(), d.getMonth())))\n return formatISO(d)\n}\n\n/**\n * How many days the given month holds, leap years included. Day 0 of the following month is the\n * last day of this one, which makes the leap year rule the language's problem rather than ours.\n */\nexport function daysInMonth(year: number, month0: number): number {\n return localDate(year, month0 + 1, 0).getDate()\n}\n\n/** Compares two dates chronologically, returning the usual -1, 0 or 1. */\nexport function compareISO(a: string, b: string): number {\n return a < b ? -1 : a > b ? 1 : 0\n}\n\n/**\n * Whether two dates are the same day, with a null on either side counting as no\n * date at all rather than as a match.\n */\nexport const isSameISO = (a: string | null, b: string | null) => !!a && a === b\n\n/**\n * Brings a date back inside the allowed interval, returning the bound it exceeded.\n * Both bounds are optional, and an absent one means unbounded on that side.\n */\nexport function clampISO(iso: string, min?: string, max?: string): string {\n if (min && compareISO(iso, min) < 0) return min\n if (max && compareISO(iso, max) > 0) return max\n return iso\n}\n\n/** Whether a date falls inside the allowed interval, each bound being optional. */\nexport function isWithin(iso: string, min?: string, max?: string): boolean {\n if (min && compareISO(iso, min) < 0) return false\n if (max && compareISO(iso, max) > 0) return false\n return true\n}\n\n/** Whether a date may be chosen: inside the bounds, and not one the matcher excludes. */\nexport function isDateAllowed(\n iso: string,\n min: string | undefined,\n max: string | undefined,\n excluded: (iso: string) => boolean,\n): boolean {\n return isWithin(iso, min, max) && !excluded(iso)\n}\n\n/** One square of a month grid. */\nexport interface MonthCell {\n /** The day it stands for, as an ISO `YYYY-MM-DD` string. */\n iso: string\n /** The day of the month, carried so a caller does not parse back what was just formatted. */\n day: number\n /**\n * Which side of the displayed month this day belongs to when it is not part of it,\n * and `null` when it is.\n */\n adjacent: 'prev' | 'next' | null\n}\n\n/**\n * Builds the grid of a month: 42 cells, six rows of seven, filled out at both ends with the\n * days of the neighbouring months. The count is fixed on purpose, so that the calendar keeps\n * the same height from one month to the next instead of jumping by a row.\n */\nexport function buildMonthGrid(year: number, month0: number, firstDayOfWeek: number): MonthCell[] {\n const first = localDate(year, month0, 1)\n // How many cells the 1st of the month sits after the start of its row, which is\n // exactly how many days of the previous month the grid has to open with.\n const offset = (first.getDay() - firstDayOfWeek + 7) % 7\n const cells: MonthCell[] = []\n for (let i = 0; i < 42; i++) {\n // Built from the 1st rather than stepped from a start date, so the month and year\n // rolling over at either end is `Date`'s arithmetic and not ours.\n const d = localDate(year, month0, 1 - offset + i)\n const adjacent =\n d.getMonth() === month0 && d.getFullYear() === year ? null : d < first ? 'prev' : 'next'\n cells.push({ iso: formatISO(d), day: d.getDate(), adjacent })\n }\n return cells\n}\n\nconst firstDayCache = new Map<string, number>()\n\n// @fallback @ssr\n/**\n * The day the week starts on in a given locale, from 0 for Sunday to 6 for Saturday : Sunday in\n * the United States, Monday in most of Europe, Saturday in much of the Middle East. That part\n * of `Intl` is not everywhere (some Node builds lack it), so the answer falls back to Monday\n * when it is missing.\n */\nexport function firstDayOfWeekFor(locale: string): number {\n return memo(firstDayCache, locale, () => resolveFirstDayOfWeek(locale))\n}\n\nfunction resolveFirstDayOfWeek(locale: string): number {\n try {\n // Implementations disagree on the shape: Chrome and Safari expose `weekInfo` as\n // a getter, others a `getWeekInfo()` method. Both are tried.\n const loc = new Intl.Locale(locale) as Intl.Locale & {\n weekInfo?: { firstDay: number }\n getWeekInfo?: () => { firstDay: number }\n }\n const info = loc.getWeekInfo?.() ?? loc.weekInfo\n if (info?.firstDay) return info.firstDay % 7\n } catch {\n /* An invalid locale throws a RangeError: fall through to the fallback */\n }\n return 1\n}\n\n// The reference instants the names are formatted from. Any Sunday will do for the\n// weekdays, and any year for the months; combined with `timeZone: 'UTC'` at every\n// call site, they pin the output whatever zone the machine is in.\nconst REF_SUNDAY = Date.UTC(2021, 7, 1)\nconst MS_DAY = 86_400_000\n\n/**\n * The names of the seven days, starting from `firstDayOfWeek` so the list can be\n * dropped straight into a calendar header.\n */\nexport function weekdayNames(\n locale: string,\n firstDayOfWeek: number,\n weekday: 'short' | 'long' = 'short',\n): string[] {\n const fmt = dateFormatter(locale, { weekday, timeZone: 'UTC' })\n return Array.from({ length: 7 }, (_, i) =>\n fmt.format(REF_SUNDAY + ((firstDayOfWeek + i) % 7) * MS_DAY),\n )\n}\n\n/**\n * One formatter kept per locale and set of options, for the lifetime of the module: building an\n * `Intl` formatter costs far more than using one.\n */\nconst formatters = new Map<string, Intl.DateTimeFormat>()\n\nexport function dateFormatter(\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n return memo(\n formatters,\n `${locale}|${JSON.stringify(options)}`,\n () => new Intl.DateTimeFormat(locale, options),\n )\n}\n\n/**\n * A date written out for the reader, in the conventions of their locale: this is\n * what VDateInput shows in its field. An unparsable date yields an empty string\n * rather than a broken one.\n */\nexport function formatDateDisplay(\n iso: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const d = parseISO(iso)\n return d ? dateFormatter(locale, options).format(d) : ''\n}\n\n/**\n * ICU releases disagree on the spaces around a range's dash: Node 24 (ICU 78) writes thin spaces\n * where Chromium writes plain ones. Writing every thin or hair space as a plain one keeps a\n * prerendered range identical to the one the browser hydrates.\n */\nconst RANGE_SPACES = /[\\u2009\\u200A]/g\n\n/** A period written out for the reader. */\nexport function formatDisplayRange(\n start: string,\n end: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const a = parseISO(start)\n const b = parseISO(end)\n if (!a || !b) return ''\n const fmt = dateFormatter(locale, options)\n const order = compareISO(start, end)\n if (order === 0) return fmt.format(a)\n const text = order < 0 ? fmt.formatRange(a, b) : fmt.formatRange(b, a)\n return text.replace(RANGE_SPACES, ' ')\n}\n"],"mappings":"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"}
|