@vuetify/v0 1.0.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/{adapter-Butx_2UU.d.mts → adapter-BXunW_mw.d.mts} +1 -1
- package/dist/{createPagination-B5dfqY-a.mjs → adapter-BiQV5j8B.mjs} +98 -3
- package/dist/adapter-ClB-53_F.d.mts +62 -0
- package/dist/{adapter-hq9YlPOF.d.mts → adapter-CqS8xexO.d.mts} +2 -2
- package/dist/adapter-CrRJuxRk.mjs +21 -0
- package/dist/{adapter-_srNCBEi.d.mts → adapter-PDTe5nFT.d.mts} +6 -7
- package/dist/{adapter-lS_VpRow.mjs → adapter-TiGrumDi.mjs} +3 -1
- package/dist/browser/index.d.ts +17953 -15766
- package/dist/browser/index.js +16633 -14006
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -2
- package/dist/{components-OCsY4P1f.mjs → components-DBhVg-t1.mjs} +4253 -2247
- package/dist/composables/index.d.mts +22 -20
- package/dist/composables/index.mjs +37 -34
- package/dist/{composables-xhcxXjuE.mjs → composables-ZGhVN2EJ.mjs} +47 -1066
- package/dist/{consola-BPGkJp_q.d.mts → consola-CdMU53rU.d.mts} +1 -1
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +1 -1
- package/dist/{createDataTable-D38H0Zbp.mjs → createDataTable-VmQEDn-7.mjs} +23 -7
- package/dist/{createGroup-CjUHFae5.mjs → createGroup-B_LL7xRr.mjs} +2 -2
- package/dist/createPlugin-Oo6t-vBw.mjs +157 -0
- package/dist/{createRegistry-B8VqA-QF.mjs → createRegistry-DVdvep0v.mjs} +1 -1
- package/dist/{createSelection-BXd5clS0.mjs → createSelection-BNdDz8oY.mjs} +1 -1
- package/dist/{createSingle-Bdkfht_B.mjs → createSingle-DHyIQ9Cj.mjs} +1 -1
- package/dist/{createTokens-vgyk_0vA.mjs → createTokens-DoISbwd7.mjs} +2 -2
- package/dist/data-table/adapters/client/index.d.mts +1 -1
- package/dist/data-table/adapters/client/index.mjs +1 -1
- package/dist/data-table/adapters/index.d.mts +4 -4
- package/dist/data-table/adapters/index.mjs +4 -4
- package/dist/data-table/adapters/server/index.d.mts +1 -1
- package/dist/data-table/adapters/server/index.mjs +1 -1
- package/dist/data-table/adapters/virtual/index.d.mts +1 -1
- package/dist/data-table/adapters/virtual/index.mjs +1 -1
- package/dist/data-table/index.d.mts +5 -5
- package/dist/data-table/index.mjs +5 -5
- package/dist/date/index.d.mts +1 -1
- package/dist/date/index.mjs +2 -2
- package/dist/features/adapters/flagsmith/index.d.mts +1 -1
- package/dist/features/adapters/flagsmith/index.mjs +1 -1
- package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
- package/dist/features/adapters/launchdarkly/index.mjs +1 -1
- package/dist/features/adapters/posthog/index.d.mts +1 -1
- package/dist/features/adapters/posthog/index.mjs +2 -2
- package/dist/features/index.d.mts +2 -2
- package/dist/features/index.mjs +2 -2
- package/dist/{flagsmith-DA2GCyGv.d.mts → flagsmith-DcIDrI7_.d.mts} +1 -1
- package/dist/{globals-B7ejLnrz.mjs → globals-DaoKtIGF.mjs} +1 -1
- package/dist/{index-DY81ptHb.d.mts → index-Cm6CbqI6.d.mts} +7494 -5834
- package/dist/{index-CrAgM2EJ.d.mts → index-Cx0cWGlx.d.mts} +493 -132
- package/dist/{index-QnpcDsV7.d.mts → index-D0ub61GV.d.mts} +2 -2
- package/dist/{index-RGiSdjYt.d.mts → index-DSPkZ0ql.d.mts} +2 -2
- package/dist/{index-DCtHbY0a.d.mts → index-Di9e8sOm.d.mts} +24 -19
- package/dist/{index-DF0tMI2_.d.mts → index-DjRE4lLl.d.mts} +108 -2
- package/dist/index.d.mts +25 -24
- package/dist/index.mjs +40 -37
- package/dist/json/attributes.json +488 -0
- package/dist/json/importMap.json +92 -0
- package/dist/json/tags.json +234 -0
- package/dist/json/web-types.json +1540 -113
- package/dist/{launchdarkly-Bp8p9PMD.d.mts → launchdarkly-CUzunYol.d.mts} +1 -1
- package/dist/locale/adapters/index.d.mts +2 -2
- package/dist/locale/adapters/index.mjs +2 -2
- package/dist/locale/adapters/v0/index.d.mts +1 -1
- package/dist/locale/adapters/v0/index.mjs +1 -1
- package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
- package/dist/locale/adapters/vue-i18n/index.mjs +1 -1
- package/dist/locale/index.d.mts +3 -3
- package/dist/locale/index.mjs +3 -3
- package/dist/locale/messages/en/index.d.mts +5 -0
- package/dist/locale/messages/en/index.mjs +6 -1
- package/dist/logger/adapters/consola/index.d.mts +1 -1
- package/dist/logger/adapters/index.d.mts +4 -4
- package/dist/logger/adapters/index.mjs +1 -1
- package/dist/logger/adapters/pino/index.d.mts +1 -1
- package/dist/logger/adapters/v0/index.d.mts +1 -1
- package/dist/logger/adapters/v0/index.mjs +1 -1
- package/dist/logger/index.d.mts +5 -5
- package/dist/logger/index.mjs +2 -2
- package/dist/notifications/index.d.mts +1 -1
- package/dist/notifications/index.mjs +2 -2
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +3 -3
- package/dist/palettes/material/index.d.mts +1 -1
- package/dist/palettes/md1/index.d.mts +1 -1
- package/dist/palettes/md2/index.d.mts +1 -1
- package/dist/palettes/radix/index.d.mts +1 -1
- package/dist/palettes/tailwind/index.d.mts +1 -1
- package/dist/permissions/adapters/index.d.mts +1 -1
- package/dist/permissions/adapters/index.mjs +1 -1
- package/dist/permissions/adapters/v0/index.d.mts +1 -1
- package/dist/permissions/adapters/v0/index.mjs +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/permissions/index.mjs +2 -2
- package/dist/{pino-B6BI1AOK.d.mts → pino-DjeWBFnj.d.mts} +1 -1
- package/dist/popover/adapters/floating-ui/index.d.mts +25 -0
- package/dist/popover/adapters/floating-ui/index.mjs +98 -0
- package/dist/popover/index.d.mts +3 -0
- package/dist/popover/index.mjs +3 -0
- package/dist/{posthog-sFqk0bGy.d.mts → posthog-CJAYssdr.d.mts} +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/{server-DbtTGb67.d.mts → server-5vbJ7GGs.d.mts} +2 -2
- package/dist/{server-D5BJBjB0.mjs → server-m7iD1vOr.mjs} +1 -2
- package/dist/storage/adapters/index.d.mts +2 -2
- package/dist/storage/adapters/index.mjs +1 -1
- package/dist/storage/adapters/memory/index.d.mts +1 -1
- package/dist/storage/adapters/memory/index.mjs +1 -1
- package/dist/storage/index.d.mts +3 -3
- package/dist/storage/index.mjs +2 -2
- package/dist/theme/adapters/index.d.mts +1 -1
- package/dist/theme/adapters/index.mjs +3 -3
- package/dist/theme/adapters/unhead/index.d.mts +1 -1
- package/dist/theme/adapters/unhead/index.mjs +1 -1
- package/dist/theme/adapters/v0/index.d.mts +1 -1
- package/dist/theme/adapters/v0/index.mjs +1 -1
- package/dist/theme/index.d.mts +2 -2
- package/dist/theme/index.mjs +4 -4
- package/dist/types/index.d.mts +1 -1
- package/dist/{unhead-DxiB3P5p.mjs → unhead-C8zbWr45.mjs} +2 -2
- package/dist/{useEventListener-BjWJPfYS.mjs → useEventListener-2eAMwUdw.mjs} +2 -2
- package/dist/useFeatures-DLafCOWt.mjs +221 -0
- package/dist/{useLocale-B2BAEieU.mjs → useLocale-K_45ulPt.mjs} +4 -4
- package/dist/{useLogger-CXKIZhks.mjs → useLogger-YyWuYvrH.mjs} +5 -159
- package/dist/{useNotifications-Czgbh8Ns.mjs → useNotifications-Kh_KvM7j.mjs} +57 -154
- package/dist/{usePermissions-BkndJNpk.mjs → usePermissions-BCGwsOES.mjs} +4 -4
- package/dist/usePopover-BTo0AGIQ.mjs +420 -0
- package/dist/{useRovingFocus-Cn96TXRw.mjs → useRovingFocus-CkRnVmJ1.mjs} +1122 -531
- package/dist/{useRules-NzJChxfk.mjs → useRules-BuE5ffOJ.mjs} +3 -2
- package/dist/{useStorage-D6xihSHv.mjs → useStorage-BT8-mjVs.mjs} +5 -4
- package/dist/useTheme-DkK6tPqY.mjs +445 -0
- package/dist/useTimer-CGVXk397.mjs +151 -0
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +181 -2
- package/dist/{v0-BFMaRqAx.mjs → v0-B_53w7Fu.mjs} +2 -2
- package/dist/{v0-BnUwMaOv.d.mts → v0-CDW1Ktk-.d.mts} +1 -1
- package/dist/{v0-gU93DxmF.mjs → v0-D0Exc2bO.mjs} +2 -2
- package/dist/{v0-rSxMW8FJ.d.mts → v0-DfFK-p4X.d.mts} +1 -1
- package/dist/{v0-DotXXGXU.d.mts → v0-GI9U-rPA.d.mts} +2 -2
- package/dist/{v0-eZcJPyii.mjs → v0-SuxTihEe.mjs} +1 -1
- package/dist/{v0-A4GLojAr.mjs → v0-yZ2ZUtVF.mjs} +1 -2
- package/dist/{virtual-DFvOoeG6.mjs → virtual-Bbu26O_h.mjs} +1 -2
- package/dist/{virtual-C-NsLue0.d.mts → virtual-JIdFLpTQ.d.mts} +2 -2
- package/package.json +8 -1
- package/dist/adapter-CVoWg0sw.mjs +0 -99
- package/dist/useFeatures-DcgU66KC.mjs +0 -124
- package/dist/useTheme-BuXEQdPz.mjs +0 -162
- /package/dist/{adapter-CTsckKAR.mjs → adapter-8UADsA3-.mjs} +0 -0
- /package/dist/{adapter-BCtceV3b.mjs → adapter-BuSfpxur.mjs} +0 -0
- /package/dist/{adapter-Bc0yPSfo.d.mts → adapter-D5nT3bLw.d.mts} +0 -0
- /package/dist/{adapter-bwZo7b5p.mjs → adapter-D8zizQVP.mjs} +0 -0
- /package/dist/{adapter-BYzU4Ey5.d.mts → adapter-ryk5H6YZ.d.mts} +0 -0
- /package/dist/{index-CROz1VSV.d.mts → index-CX869wwk.d.mts} +0 -0
- /package/dist/{index-FtE8MXJ_.d.mts → index-CsuikFeJ.d.mts} +0 -0
- /package/dist/{index-DidZKN6S.d.mts → index-Djhiy3nS.d.mts} +0 -0
- /package/dist/{index-CyNk9FpR.d.mts → index-DtiaWx5U.d.mts} +0 -0
- /package/dist/{index-DXMlYoiQ.d.mts → index-H_hl6-4b.d.mts} +0 -0
- /package/dist/{index-BgCkepP_.d.mts → index-u_qSc2xS.d.mts} +0 -0
- /package/dist/{memory-DbyZeNjg.d.mts → memory-B7z1RR9r.d.mts} +0 -0
- /package/dist/{memory-BJjkQzxs.mjs → memory-CR6zvuaP.mjs} +0 -0
- /package/dist/{toArray-C89ZaEuF.mjs → toArray-MY9Kb1Qy.mjs} +0 -0
- /package/dist/{v0-UNyykD27.mjs → v0-Ch0yBKEj.mjs} +0 -0
package/README.md
CHANGED
|
@@ -142,6 +142,7 @@ import { ... } from '@vuetify/v0/date' // Date adapter and utilities
|
|
|
142
142
|
|
|
143
143
|
| Component | Description |
|
|
144
144
|
|-----------|-------------|
|
|
145
|
+
| [Alert](https://0.vuetifyjs.com/components/semantic/alert) | Inline status message with ARIA live-region semantics |
|
|
145
146
|
| [Avatar](https://0.vuetifyjs.com/components/semantic/avatar) | Image/fallback avatar with priority loading |
|
|
146
147
|
| [Breadcrumbs](https://0.vuetifyjs.com/components/semantic/breadcrumbs) | Navigation breadcrumbs with overflow detection and truncation |
|
|
147
148
|
| [Carousel](https://0.vuetifyjs.com/components/semantic/carousel) | Scroll-snap slide navigation with multi-slide display and drag/swipe |
|
|
@@ -152,6 +153,13 @@ import { ... } from '@vuetify/v0/date' // Date adapter and utilities
|
|
|
152
153
|
| [Snackbar](https://0.vuetifyjs.com/components/semantic/snackbar) | Toast notification with queue, positioning, and auto-dismiss |
|
|
153
154
|
| [Splitter](https://0.vuetifyjs.com/components/semantic/splitter) | Resizable panel layout with drag handles |
|
|
154
155
|
|
|
156
|
+
#### Data
|
|
157
|
+
|
|
158
|
+
| Component | Description |
|
|
159
|
+
|-----------|-------------|
|
|
160
|
+
| [DataGrid](https://0.vuetifyjs.com/components/data/data-grid) | Headless data grid with column layout, cell editing, row ordering, and row spanning |
|
|
161
|
+
| [DataTable](https://0.vuetifyjs.com/components/data/data-table) | Headless table with sorting, pagination, selection, and expansion |
|
|
162
|
+
|
|
155
163
|
### Composables
|
|
156
164
|
|
|
157
165
|
#### Foundation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { clamp, isNaN, isObject, range } from "./utilities/index.mjs";
|
|
1
|
+
import { clamp, isArray, isNaN, isNullOrUndefined, isNumber, isObject, isString, range } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { t as toArray } from "./toArray-
|
|
3
|
+
import { t as toArray } from "./toArray-MY9Kb1Qy.mjs";
|
|
4
4
|
import { computed, isRef, shallowRef, toRef, toValue } from "vue";
|
|
5
5
|
//#region src/composables/createFilter/index.ts
|
|
6
6
|
/**
|
|
@@ -383,4 +383,99 @@ function usePagination(namespace = "v0:pagination") {
|
|
|
383
383
|
return useContext(namespace);
|
|
384
384
|
}
|
|
385
385
|
//#endregion
|
|
386
|
-
|
|
386
|
+
//#region src/composables/createDataTable/adapters/adapter.ts
|
|
387
|
+
/**
|
|
388
|
+
* @module createDataTable/adapters
|
|
389
|
+
*
|
|
390
|
+
* @remarks
|
|
391
|
+
* Defines the adapter interface and abstract base class for data table
|
|
392
|
+
* pipeline strategies. Adapters control how raw items are filtered, sorted,
|
|
393
|
+
* and sliced into visible items.
|
|
394
|
+
*
|
|
395
|
+
* The abstract DataTableAdapter provides shared filter and sort pipelines
|
|
396
|
+
* used by client-side adapters. Server adapters that delegate pipeline
|
|
397
|
+
* operations externally subclass DataTableAdapter directly.
|
|
398
|
+
*/
|
|
399
|
+
function getNestedValue(obj, parts) {
|
|
400
|
+
let result = obj;
|
|
401
|
+
for (const k of parts) {
|
|
402
|
+
if (/* @__PURE__ */ isNullOrUndefined(result)) return void 0;
|
|
403
|
+
result = result[k];
|
|
404
|
+
}
|
|
405
|
+
return result;
|
|
406
|
+
}
|
|
407
|
+
function compareValues(a, b, collator) {
|
|
408
|
+
if (a === b) return 0;
|
|
409
|
+
const aNil = /* @__PURE__ */ isNullOrUndefined(a);
|
|
410
|
+
const bNil = /* @__PURE__ */ isNullOrUndefined(b);
|
|
411
|
+
if (aNil && bNil) return 0;
|
|
412
|
+
if (aNil) return 1;
|
|
413
|
+
if (bNil) return -1;
|
|
414
|
+
if (/* @__PURE__ */ isString(a) && /* @__PURE__ */ isString(b)) return collator ? collator.compare(a, b) : a.localeCompare(b);
|
|
415
|
+
if (/* @__PURE__ */ isNumber(a) && /* @__PURE__ */ isNumber(b)) {
|
|
416
|
+
if (/* @__PURE__ */ isNaN(a)) return 1;
|
|
417
|
+
if (/* @__PURE__ */ isNaN(b)) return -1;
|
|
418
|
+
return a - b;
|
|
419
|
+
}
|
|
420
|
+
const sa = String(a);
|
|
421
|
+
const sb = String(b);
|
|
422
|
+
return collator ? collator.compare(sa, sb) : sa.localeCompare(sb);
|
|
423
|
+
}
|
|
424
|
+
var DataTableAdapter = class {
|
|
425
|
+
/** Create the filter pipeline stage */
|
|
426
|
+
filter(context) {
|
|
427
|
+
const filter = createFilter({
|
|
428
|
+
...context.filterOptions,
|
|
429
|
+
keys: [...toValue(context.filterableKeys)],
|
|
430
|
+
customFilter: context.filterOptions.customFilter ?? ((query, item) => {
|
|
431
|
+
const columnFilters = toValue(context.customColumnFilters);
|
|
432
|
+
const keys = toValue(context.filterableKeys);
|
|
433
|
+
if (!/* @__PURE__ */ isObject(item)) return false;
|
|
434
|
+
const q = String(/* @__PURE__ */ isArray(query) ? query[0] : query).toLowerCase();
|
|
435
|
+
if (!q) return true;
|
|
436
|
+
const obj = item;
|
|
437
|
+
for (const key of keys) {
|
|
438
|
+
const customFn = columnFilters[key];
|
|
439
|
+
if (customFn) {
|
|
440
|
+
if (customFn(obj[key], q)) return true;
|
|
441
|
+
} else {
|
|
442
|
+
const val = obj[key];
|
|
443
|
+
if (!/* @__PURE__ */ isNullOrUndefined(val) && String(val).toLowerCase().includes(q)) return true;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return false;
|
|
447
|
+
})
|
|
448
|
+
});
|
|
449
|
+
const allItems = toRef(() => toValue(context.items));
|
|
450
|
+
const { items: filtered } = filter.apply(context.search, allItems);
|
|
451
|
+
return {
|
|
452
|
+
allItems,
|
|
453
|
+
filteredItems: filtered
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
/** Create the sort pipeline stage */
|
|
457
|
+
sort(filteredItems, sortBy, locale, customSorts) {
|
|
458
|
+
return computed(() => {
|
|
459
|
+
const entries = sortBy.value;
|
|
460
|
+
if (entries.length === 0) return filteredItems.value;
|
|
461
|
+
const sorts = toValue(customSorts) ?? {};
|
|
462
|
+
const collator = new Intl.Collator(locale?.value);
|
|
463
|
+
const resolved = entries.map(({ key, direction }) => ({
|
|
464
|
+
parts: key.split("."),
|
|
465
|
+
direction,
|
|
466
|
+
custom: sorts[key]
|
|
467
|
+
}));
|
|
468
|
+
return filteredItems.value.toSorted((a, b) => {
|
|
469
|
+
for (const { parts, direction, custom } of resolved) {
|
|
470
|
+
const aVal = parts.length === 1 ? a[parts[0]] : getNestedValue(a, parts);
|
|
471
|
+
const bVal = parts.length === 1 ? b[parts[0]] : getNestedValue(b, parts);
|
|
472
|
+
const cmp = custom ? custom(aVal, bVal) : compareValues(aVal, bVal, collator);
|
|
473
|
+
if (cmp !== 0) return direction === "desc" ? -cmp : cmp;
|
|
474
|
+
}
|
|
475
|
+
return 0;
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
//#endregion
|
|
481
|
+
export { createFilter as a, usePagination as i, createPagination as n, createFilterContext as o, createPaginationContext as r, useFilter as s, DataTableAdapter as t };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/composables/usePopover/adapters/adapter.d.ts
|
|
4
|
+
type PopoverSide = 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
type PopoverAlign = 'start' | 'center' | 'end';
|
|
6
|
+
interface PopoverPlacement {
|
|
7
|
+
/** Which side of the anchor the content prefers to render on. */
|
|
8
|
+
side: PopoverSide;
|
|
9
|
+
/** Alignment along that side, relative to the anchor. */
|
|
10
|
+
align: PopoverAlign;
|
|
11
|
+
/**
|
|
12
|
+
* The `position-area` value this placement was derived from, verbatim.
|
|
13
|
+
* `side`/`align` are a best-effort normalization of the common cases
|
|
14
|
+
* (single keyword, or a keyword plus a `span-*`/`start`/`end` modifier) -
|
|
15
|
+
* `raw` is the escape hatch for compound values the normalization doesn't
|
|
16
|
+
* cover, and is what the default adapter renders back into CSS.
|
|
17
|
+
*/
|
|
18
|
+
raw: string;
|
|
19
|
+
}
|
|
20
|
+
interface PopoverAdapterContext {
|
|
21
|
+
/** CSS anchor-name custom ident (e.g. `--popover-abc123`). */
|
|
22
|
+
anchorName: string;
|
|
23
|
+
/** The activator/reference element, once registered via `attachAnchor()`. */
|
|
24
|
+
anchorEl: Readonly<Ref<Element | null | undefined>>;
|
|
25
|
+
/** The content/floating element, once registered via `attach()`. */
|
|
26
|
+
contentEl: Readonly<Ref<HTMLElement | null | undefined>>;
|
|
27
|
+
/** Whether the popover is currently open. */
|
|
28
|
+
isOpen: Readonly<Ref<boolean>>;
|
|
29
|
+
/** Normalized placement intent, derived from the `positionArea` option. */
|
|
30
|
+
placement: Readonly<Ref<PopoverPlacement>>;
|
|
31
|
+
/** The `positionTry` option, verbatim - CSS `position-try-fallbacks` passthrough. */
|
|
32
|
+
positionTry: Readonly<Ref<string>>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Positioning engine seam for `usePopover`. `V0PopoverAdapter` (the default)
|
|
36
|
+
* emits CSS anchor positioning and needs nothing installed. A consumer who
|
|
37
|
+
* wants a JS positioning library (floating-ui, Popper, or their own) extends
|
|
38
|
+
* this class and passes an instance via the `adapter` option.
|
|
39
|
+
*
|
|
40
|
+
* @see https://0.vuetifyjs.com/composables/system/use-popover
|
|
41
|
+
*/
|
|
42
|
+
declare abstract class PopoverAdapter {
|
|
43
|
+
/**
|
|
44
|
+
* Optional instance teardown; read lazily when the popover's scope disposes.
|
|
45
|
+
* Plugin-shared adapters must put per-popover cleanup in `setup()` +
|
|
46
|
+
* `onScopeDispose`, never `this.dispose` — assigning `dispose` on a shared
|
|
47
|
+
* instance clobbers the previous popover's teardown when `setup()` is
|
|
48
|
+
* re-entered. First-party `FloatingUIPopoverAdapter` already follows this.
|
|
49
|
+
*/
|
|
50
|
+
dispose?: () => void;
|
|
51
|
+
/**
|
|
52
|
+
* Called once, synchronously, during `usePopover()` setup. Returns the
|
|
53
|
+
* reactive style object to spread onto the content element. Implementations
|
|
54
|
+
* that need to react to `isOpen`, `placement`, or the anchor/content
|
|
55
|
+
* elements becoming available should watch `context`'s refs themselves -
|
|
56
|
+
* `anchorEl`/`contentEl` populate asynchronously, after `attachAnchor()` /
|
|
57
|
+
* `attach()` run in the consuming component.
|
|
58
|
+
*/
|
|
59
|
+
abstract setup(context: PopoverAdapterContext): Readonly<Ref<Record<string, string>>>;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { PopoverSide as a, PopoverPlacement as i, PopoverAdapterContext as n, PopoverAlign as r, PopoverAdapter as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ID } from "./index-
|
|
2
|
-
import { c as TokenTicket, i as TokenContext } from "./index-
|
|
1
|
+
import { a as ID } from "./index-DtiaWx5U.mjs";
|
|
2
|
+
import { c as TokenTicket, i as TokenContext } from "./index-D0ub61GV.mjs";
|
|
3
3
|
import { Ref } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/composables/useLocale/adapters/adapter.d.ts
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/composables/usePopover/adapters/adapter.ts
|
|
2
|
+
/**
|
|
3
|
+
* Positioning engine seam for `usePopover`. `V0PopoverAdapter` (the default)
|
|
4
|
+
* emits CSS anchor positioning and needs nothing installed. A consumer who
|
|
5
|
+
* wants a JS positioning library (floating-ui, Popper, or their own) extends
|
|
6
|
+
* this class and passes an instance via the `adapter` option.
|
|
7
|
+
*
|
|
8
|
+
* @see https://0.vuetifyjs.com/composables/system/use-popover
|
|
9
|
+
*/
|
|
10
|
+
var PopoverAdapter = class {
|
|
11
|
+
/**
|
|
12
|
+
* Optional instance teardown; read lazily when the popover's scope disposes.
|
|
13
|
+
* Plugin-shared adapters must put per-popover cleanup in `setup()` +
|
|
14
|
+
* `onScopeDispose`, never `this.dispose` — assigning `dispose` on a shared
|
|
15
|
+
* instance clobbers the previous popover's teardown when `setup()` is
|
|
16
|
+
* re-entered. First-party `FloatingUIPopoverAdapter` already follows this.
|
|
17
|
+
*/
|
|
18
|
+
dispose;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { PopoverAdapter as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as ContextTrinity } from "./index-
|
|
2
|
-
import * as _$vue from "vue";
|
|
1
|
+
import { t as ContextTrinity } from "./index-H_hl6-4b.mjs";
|
|
3
2
|
import { ComputedRef, MaybeRefOrGetter, Ref, ShallowRef, WritableComputedRef } from "vue";
|
|
4
3
|
|
|
5
4
|
//#region src/composables/createFilter/index.d.ts
|
|
@@ -244,7 +243,7 @@ interface SortEntry {
|
|
|
244
243
|
direction: SortDirection;
|
|
245
244
|
}
|
|
246
245
|
/** Inputs provided by createDataTable to the adapter */
|
|
247
|
-
interface DataTableAdapterContext<T extends
|
|
246
|
+
interface DataTableAdapterContext<T extends object> {
|
|
248
247
|
/** Source items */
|
|
249
248
|
items: MaybeRefOrGetter<T[]>;
|
|
250
249
|
/** Search query ref */
|
|
@@ -265,7 +264,7 @@ interface DataTableAdapterContext<T extends Record<string, unknown>> {
|
|
|
265
264
|
customColumnFilters: MaybeRefOrGetter<Partial<Record<string, (value: unknown, query: string) => boolean>>>;
|
|
266
265
|
}
|
|
267
266
|
/** Outputs returned by the adapter to createDataTable */
|
|
268
|
-
interface DataTableAdapterResult<T extends
|
|
267
|
+
interface DataTableAdapterResult<T extends object> {
|
|
269
268
|
/** Raw unprocessed items */
|
|
270
269
|
allItems: Readonly<Ref<readonly T[]>>;
|
|
271
270
|
/** Items after filtering */
|
|
@@ -283,11 +282,11 @@ interface DataTableAdapterResult<T extends Record<string, unknown>> {
|
|
|
283
282
|
/** Error state (optional, for async adapters) */
|
|
284
283
|
error?: Readonly<Ref<Error | null>>;
|
|
285
284
|
}
|
|
286
|
-
declare abstract class DataTableAdapter<T extends
|
|
285
|
+
declare abstract class DataTableAdapter<T extends object> {
|
|
287
286
|
/** Create the filter pipeline stage */
|
|
288
287
|
protected filter(context: DataTableAdapterContext<T>): {
|
|
289
|
-
allItems: Readonly<Ref<T[]
|
|
290
|
-
filteredItems:
|
|
288
|
+
allItems: Readonly<Ref<T[]>>;
|
|
289
|
+
filteredItems: Readonly<Ref<readonly T[]>>;
|
|
291
290
|
};
|
|
292
291
|
/** Create the sort pipeline stage */
|
|
293
292
|
protected sort(filteredItems: Readonly<Ref<readonly T[]>>, sortBy: Readonly<Ref<SortEntry[]>>, locale?: Readonly<Ref<string | undefined>>, customSorts?: MaybeRefOrGetter<Partial<Record<string, (a: unknown, b: unknown) => number>>>): Readonly<Ref<readonly T[]>>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { V0Error, hexToRgb, isUndefined } from "./utilities/index.mjs";
|
|
2
2
|
//#region src/composables/useTheme/adapters/adapter.ts
|
|
3
3
|
var ThemeAdapter = class ThemeAdapter {
|
|
4
|
-
|
|
4
|
+
/** CSS ident for theme ids, color keys, and the adapter prefix. */
|
|
5
5
|
static SAFE_IDENT = /^[a-zA-Z0-9_-]+$/;
|
|
6
|
+
/** Rejected inside theme color values before they are written to a stylesheet. */
|
|
7
|
+
static UNSAFE_CSS = /url\s*\(|src\s*\(|image\s*\(|image-set\s*\(|cross-fade\s*\(|@import|expression\s*\(|[;{}<>\\]|\/\*/i;
|
|
6
8
|
stylesheetId = "v0-theme-stylesheet";
|
|
7
9
|
prefix;
|
|
8
10
|
rgb = false;
|