@vuetify/v0 1.1.0 → 1.2.1
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 +13 -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-CrRJuxRk.mjs +21 -0
- package/dist/{adapter-hq9YlPOF.d.mts → adapter-FckJSz_o.d.mts} +2 -2
- package/dist/{adapter-_srNCBEi.d.mts → adapter-PDTe5nFT.d.mts} +6 -7
- package/dist/browser/index.d.ts +15918 -13714
- package/dist/browser/index.js +16708 -14105
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -2
- package/dist/{components-B2BZ1B3K.mjs → components-MCFhfNlt.mjs} +8234 -6307
- package/dist/composables/index.d.mts +22 -20
- package/dist/composables/index.mjs +37 -34
- package/dist/{composables-DONBl_c9.mjs → composables-8xtFVviy.mjs} +32 -1061
- 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-DgyHBfAr.mjs → createDataTable-OCGnpy-N.mjs} +24 -8
- package/dist/{createGroup-BXKKcb9-.mjs → createGroup-DtVYu-VY.mjs} +14 -3
- package/dist/createPlugin-Oo6t-vBw.mjs +157 -0
- package/dist/{createRegistry-B9cOWny2.mjs → createRegistry-DSQiALGi.mjs} +3 -3
- package/dist/{createSelection-CWE554_g.mjs → createSelection-TB5oK1FG.mjs} +2 -1
- package/dist/{createSingle-Dz-1Iv7u.mjs → createSingle-CV1qigP2.mjs} +1 -1
- package/dist/{createTokens-C4qcW2Kv.mjs → createTokens-B0CqJEL6.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-CtaXlEOI.mjs → globals-wvVdMRFF.mjs} +1 -1
- package/dist/{index-DCtHbY0a.d.mts → index-3bThcqCN.d.mts} +25 -20
- package/dist/{index-QnpcDsV7.d.mts → index-3vvA76pZ.d.mts} +2 -2
- package/dist/{index-RGiSdjYt.d.mts → index-4Z38WhA9.d.mts} +9 -3
- package/dist/{index-CTl0cGH6.d.mts → index-BTdCsSz0.d.mts} +7264 -5608
- package/dist/{index-DF0tMI2_.d.mts → index-CORslci7.d.mts} +121 -2
- package/dist/{index-Dc7lKT6q.d.mts → index-Dgkt7Ve9.d.mts} +494 -131
- package/dist/index.d.mts +25 -24
- package/dist/index.mjs +40 -37
- package/dist/json/attributes.json +500 -0
- package/dist/json/importMap.json +92 -0
- package/dist/json/tags.json +237 -0
- package/dist/json/web-types.json +1553 -97
- 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 +6 -0
- package/dist/locale/messages/en/index.mjs +2 -0
- 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-BAWCwNOF.mjs → unhead-SyU953Pt.mjs} +2 -2
- package/dist/{useEventListener-DSOeDtC-.mjs → useEventListener-hF6R2p6X.mjs} +2 -2
- package/dist/useFeatures-CTpkM6hV.mjs +221 -0
- package/dist/{useLocale-D-V0DENN.mjs → useLocale-D-iWu08b.mjs} +4 -4
- package/dist/{useLogger-CbvzXCWb.mjs → useLogger-CDsgHbzO.mjs} +5 -159
- package/dist/{useNotifications-Cqg3uDz0.mjs → useNotifications-DhNjvRt1.mjs} +57 -154
- package/dist/{usePermissions-BTdUVyQe.mjs → usePermissions-CKe8xcvz.mjs} +4 -4
- package/dist/usePopover-DyAdne_S.mjs +421 -0
- package/dist/{useRovingFocus-g6ifibLg.mjs → useRovingFocus-D0OOozbe.mjs} +1169 -553
- package/dist/{useRules-DEiHd_eY.mjs → useRules-DA8bNhNq.mjs} +3 -2
- package/dist/{useStorage-BSfQfDbg.mjs → useStorage-D9c6xx4N.mjs} +5 -4
- package/dist/useTheme-BrXA5VBp.mjs +445 -0
- package/dist/useTimer-DLtkRCHw.mjs +151 -0
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +204 -2
- package/dist/{v0-BnUwMaOv.d.mts → v0-C09lR5fc.d.mts} +1 -1
- package/dist/{v0-CveVV6On.mjs → v0-CaTmC7C4.mjs} +2 -2
- package/dist/{v0-rSxMW8FJ.d.mts → v0-DfFK-p4X.d.mts} +1 -1
- package/dist/{v0-CCWHeKJM.mjs → v0-DpFVF6pD.mjs} +1 -1
- package/dist/{v0-DotXXGXU.d.mts → v0-GI9U-rPA.d.mts} +2 -2
- package/dist/{v0-CZBkpQjr.mjs → v0-cC-WxCLd.mjs} +2 -2
- 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-YJmONiU7.mjs +0 -124
- package/dist/useTheme-C0_i__N6.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-q1sRACUc.mjs → adapter-TiGrumDi.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
|
@@ -43,6 +43,11 @@ This is a **pnpm monorepo** containing:
|
|
|
43
43
|
| Package | Description |
|
|
44
44
|
|---------|-------------|
|
|
45
45
|
| [`@vuetify/v0`](./packages/0) | Core headless components and composables |
|
|
46
|
+
| [`@vuetify/play`](./packages/play) | Playground hash protocol |
|
|
47
|
+
| [`@paper/emerald`](./packages/emerald) | Emerald design system |
|
|
48
|
+
| [`@paper/bulma`](./packages/bulma) | Bulma compat design system |
|
|
49
|
+
| [`@paper/genesis`](./packages/genesis) | Genesis design system (docs primitives) |
|
|
50
|
+
| [`@vuetify/paper`](./packages/paper) | Styling primitives (private, dormant) |
|
|
46
51
|
| [`apps/docs`](./apps/docs) | Documentation site ([0.vuetifyjs.com](https://0.vuetifyjs.com)) |
|
|
47
52
|
| [`apps/playground`](./apps/playground) | Interactive development environment |
|
|
48
53
|
|
|
@@ -142,6 +147,7 @@ import { ... } from '@vuetify/v0/date' // Date adapter and utilities
|
|
|
142
147
|
|
|
143
148
|
| Component | Description |
|
|
144
149
|
|-----------|-------------|
|
|
150
|
+
| [Alert](https://0.vuetifyjs.com/components/semantic/alert) | Inline status message with ARIA live-region semantics |
|
|
145
151
|
| [Avatar](https://0.vuetifyjs.com/components/semantic/avatar) | Image/fallback avatar with priority loading |
|
|
146
152
|
| [Breadcrumbs](https://0.vuetifyjs.com/components/semantic/breadcrumbs) | Navigation breadcrumbs with overflow detection and truncation |
|
|
147
153
|
| [Carousel](https://0.vuetifyjs.com/components/semantic/carousel) | Scroll-snap slide navigation with multi-slide display and drag/swipe |
|
|
@@ -152,6 +158,13 @@ import { ... } from '@vuetify/v0/date' // Date adapter and utilities
|
|
|
152
158
|
| [Snackbar](https://0.vuetifyjs.com/components/semantic/snackbar) | Toast notification with queue, positioning, and auto-dismiss |
|
|
153
159
|
| [Splitter](https://0.vuetifyjs.com/components/semantic/splitter) | Resizable panel layout with drag handles |
|
|
154
160
|
|
|
161
|
+
#### Data
|
|
162
|
+
|
|
163
|
+
| Component | Description |
|
|
164
|
+
|-----------|-------------|
|
|
165
|
+
| [DataGrid](https://0.vuetifyjs.com/components/data/data-grid) | Headless data grid with column layout, cell editing, row ordering, and row spanning |
|
|
166
|
+
| [DataTable](https://0.vuetifyjs.com/components/data/data-table) | Headless table with sorting, pagination, selection, and expansion |
|
|
167
|
+
|
|
155
168
|
### Composables
|
|
156
169
|
|
|
157
170
|
#### 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 };
|
|
@@ -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,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-3vvA76pZ.mjs";
|
|
3
3
|
import { Ref } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/composables/useLocale/adapters/adapter.d.ts
|
|
@@ -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[]>>;
|