@vuetify/v0 1.0.0-beta.0 → 1.0.0-beta.2
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 +2 -1
- package/dist/{adapter-DZeI0ZbW.d.mts → adapter-CQoi3rdC.d.mts} +1 -1
- package/dist/adapter-CVoWg0sw.mjs +99 -0
- package/dist/{adapter-oM18AdUc.mjs → adapter-Cj7vxEdB.mjs} +6 -1
- package/dist/adapter-Cy7wXVFe.mjs +4 -0
- package/dist/{adapter-we-0GbFH.d.mts → adapter-D2ABPTpo.d.mts} +2 -2
- package/dist/{adapter-BO75n0Cn.d.mts → adapter-_srNCBEi.d.mts} +3 -3
- package/dist/browser/index.js +23639 -23267
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{components-_uxZ_Zo3.mjs → components-DcOwIGXt.mjs} +304 -214
- package/dist/composables/index.d.mts +20 -20
- package/dist/composables/index.mjs +34 -28
- package/dist/composables-DxKmYiTj.mjs +4077 -0
- package/dist/{consola-CUNHyu8J.d.mts → consola-BPGkJp_q.d.mts} +1 -1
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +1 -1
- package/dist/{createDataTable-DlFQyBTN.mjs → createDataTable-CBfnCUKU.mjs} +14 -11
- package/dist/{createGroup-DsKJMuRd.mjs → createGroup-BTG6xcyp.mjs} +26 -14
- package/dist/{adapter-BCVxBtDp.mjs → createPagination-B5dfqY-a.mjs} +3 -98
- package/dist/{createRegistry-tJ1PPNIr.mjs → createRegistry-Cb6ftNMU.mjs} +57 -41
- package/dist/{createSelection-DEqhvdoj.mjs → createSelection-BMvXj84C.mjs} +7 -4
- package/dist/{createSingle-ClzWqRCe.mjs → createSingle-BCUJuV4D.mjs} +3 -3
- package/dist/{createTokens-mNxs8DQ3.mjs → createTokens-BSSQAfNX.mjs} +12 -6
- 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 -5
- 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 +36 -33
- package/dist/features/adapters/flagsmith/index.d.mts +1 -1
- package/dist/features/adapters/flagsmith/index.mjs +47 -1
- package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
- package/dist/features/adapters/launchdarkly/index.mjs +37 -1
- package/dist/features/adapters/posthog/index.d.mts +1 -1
- package/dist/features/adapters/posthog/index.mjs +46 -1
- package/dist/features/index.d.mts +2 -2
- package/dist/features/index.mjs +2 -2
- package/dist/{flagsmith-Cn_KVy6v.d.mts → flagsmith-CXzNBqm3.d.mts} +1 -1
- package/dist/{globals-DB-krEA-.mjs → globals-C1X-9O7K.mjs} +1 -1
- package/dist/{index-DWAgQOBa.d.mts → index-Bmz8PZMY.d.mts} +3 -4
- package/dist/{index-BN06veYe.d.mts → index-CKyDkh8J.d.mts} +169 -88
- package/dist/{index-B3PDLk_Y.d.mts → index-DLBPM47A.d.mts} +509 -439
- package/dist/{index-ZD3hw2Zo.d.mts → index-DRrHHgE7.d.mts} +4 -4
- package/dist/{index-ATZqco03.d.mts → index-LMiCHwZl.d.mts} +7 -2
- package/dist/{index-BIyQ3OxC.d.mts → index-rJ_lhMYJ.d.mts} +5 -5
- package/dist/index.d.mts +24 -24
- package/dist/index.mjs +37 -31
- package/dist/json/attributes.json +2 -2
- package/dist/json/web-types.json +3 -3
- package/dist/{launchdarkly-C3Knz7-v.d.mts → launchdarkly-DvhloBts.d.mts} +1 -1
- package/dist/locale/adapters/index.d.mts +2 -2
- package/dist/locale/adapters/index.mjs +2 -3
- 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/logger/adapters/consola/index.d.mts +1 -1
- package/dist/logger/adapters/index.d.mts +4 -4
- package/dist/logger/adapters/index.mjs +1 -2
- 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 +6 -6
- package/dist/notifications/index.mjs +29 -29
- 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 -2
- 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-BaYY_KIN.d.mts → pino-B6BI1AOK.d.mts} +1 -1
- package/dist/{posthog-CR8R2ywM.d.mts → posthog-BOT5W7Ds.d.mts} +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/{server-CZ83nTn_.mjs → server-D5BJBjB0.mjs} +2 -1
- package/dist/{server-7vjHxjNc.d.mts → server-DbtTGb67.d.mts} +1 -1
- 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 -4
- 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 +1 -1
- package/dist/theme/index.mjs +5 -4
- package/dist/types/index.d.mts +1 -1
- package/dist/{unhead-CG672gKh.mjs → unhead-i8ji788n.mjs} +12 -8
- package/dist/useEventListener-BK_uaXZv.mjs +103 -0
- package/dist/{useFeatures-B-A-eOo-.mjs → useFeatures-BKAK56af.mjs} +4 -8
- package/dist/{useLocale-CbpoxbVU.mjs → useLocale-CTwn8uZk.mjs} +4 -5
- package/dist/{useLogger-CTgAedNH.mjs → useLogger-D7_hm4e8.mjs} +2 -3
- package/dist/{useNotifications-BkKGUl_1.mjs → useNotifications-B2YeotHN.mjs} +15 -8
- package/dist/{usePermissions-BYOrKcnk.mjs → usePermissions-CWYXR7ji.mjs} +18 -11
- package/dist/{useClickOutside-DoOgNtrj.mjs → useRovingFocus-BdnSUVrD.mjs} +4014 -8138
- package/dist/{useRules-mD_DY9dy.mjs → useRules-CB2_tvd0.mjs} +2 -2
- package/dist/useStorage-BORz1d1g.mjs +162 -0
- package/dist/{useTheme-B1lUya5B.mjs → useTheme-ClUmdmvT.mjs} +12 -9
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +7 -3
- package/dist/{v0-COaQncfZ.mjs → v0-A4GLojAr.mjs} +2 -1
- package/dist/{v0-Bx5Mi7qE.mjs → v0-BU39ZO4s.mjs} +21 -10
- package/dist/{v0-WzS4GAIp.d.mts → v0-D7NA38Vu.d.mts} +1 -1
- package/dist/{v0-CG9o3on7.mjs → v0-DL9JtgCO.mjs} +1 -1
- package/dist/{v0-QIjffi4E.d.mts → v0-DotXXGXU.d.mts} +1 -1
- package/dist/{v0-CHK79mZX.mjs → v0-SwedwC_b.mjs} +3 -4
- package/dist/{v0-DWZ_N2GG.d.mts → v0-rSxMW8FJ.d.mts} +1 -1
- package/dist/{virtual-CrgGA-o6.d.mts → virtual-C-NsLue0.d.mts} +1 -1
- package/dist/{virtual-UumJ2BQ9.mjs → virtual-DFvOoeG6.mjs} +2 -1
- package/package.json +10 -7
- package/dist/adapters-BHD1lc-K.mjs +0 -4
- package/dist/adapters-BYLWDmYl.mjs +0 -5
- package/dist/adapters-BxrTL8E3.mjs +0 -4
- package/dist/adapters-CBgBd7VE.mjs +0 -2
- package/dist/adapters-D64TORDu.mjs +0 -2
- package/dist/flagsmith-Cu93hUIF.mjs +0 -48
- package/dist/launchdarkly-CLGtJCsI.mjs +0 -38
- package/dist/posthog-B5s_KGhy.mjs +0 -47
- /package/dist/{adapter-BEJXp-ie.d.mts → adapter-BYzU4Ey5.d.mts} +0 -0
- /package/dist/{adapter-B6IrPwib.d.mts → adapter-C5F2huij.d.mts} +0 -0
- /package/dist/{adapter-BSKx9WQ7.mjs → adapter-CTsckKAR.mjs} +0 -0
- /package/dist/{adapter-D8zizQVP.mjs → adapter-bwZo7b5p.mjs} +0 -0
- /package/dist/{index-DHmuwBdv.d.mts → index-B9YmdGZ3.d.mts} +0 -0
- /package/dist/{index-PvkxPev3.d.mts → index-BgCkepP_.d.mts} +0 -0
- /package/dist/{index-BOn0AAue.d.mts → index-CROz1VSV.d.mts} +0 -0
- /package/dist/{index-H_hl6-4b.d.mts → index-DXMlYoiQ.d.mts} +0 -0
- /package/dist/{index-C6NnIuDv.d.mts → index-DidZKN6S.d.mts} +0 -0
- /package/dist/{index-CKKoxA9V.d.mts → index-FtE8MXJ_.d.mts} +0 -0
- /package/dist/{memory-BMpJcQjQ.mjs → memory-BJjkQzxs.mjs} +0 -0
- /package/dist/{memory-D-JbdKXg.d.mts → memory-DbyZeNjg.d.mts} +0 -0
- /package/dist/{toArray-CD2-OxAz.mjs → toArray-C89ZaEuF.mjs} +0 -0
- /package/dist/{v0-Dvu8fMl3.mjs → v0-UNyykD27.mjs} +0 -0
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<a href="https://github.com/vuetifyjs/0/blob/master/LICENSE.md">
|
|
20
20
|
<img src="https://img.shields.io/npm/l/@vuetify/v0.svg" alt="License">
|
|
21
21
|
</a>
|
|
22
|
-
<a href="https://
|
|
22
|
+
<a href="https://discord.gg/vuetify">
|
|
23
23
|
<img src="https://discordapp.com/api/guilds/340160225338195969/widget.png" alt="Chat">
|
|
24
24
|
</a>
|
|
25
25
|
</p>
|
|
@@ -254,6 +254,7 @@ Plugin-capable composables following the trinity pattern:
|
|
|
254
254
|
- [`useLogger`](https://0.vuetifyjs.com/composables/plugins/use-logger) - Logging adapter (consola/pino/custom)
|
|
255
255
|
- [`useNotifications`](https://0.vuetifyjs.com/composables/plugins/use-notifications) - Toast/snackbar queue management with positioning
|
|
256
256
|
- [`usePermissions`](https://0.vuetifyjs.com/composables/plugins/use-permissions) - RBAC/ABAC permission system
|
|
257
|
+
- [`useReducedMotion`](https://0.vuetifyjs.com/composables/plugins/use-reduced-motion) - Respect or override the prefers-reduced-motion media query
|
|
257
258
|
- [`useRtl`](https://0.vuetifyjs.com/composables/plugins/use-rtl) - Right-to-left text direction detection and management
|
|
258
259
|
- [`useRules`](https://0.vuetifyjs.com/composables/plugins/use-rules) - Validation rule adapter with built-in rule library
|
|
259
260
|
- [`useStack`](https://0.vuetifyjs.com/composables/plugins/use-stack) - Overlay z-index stacking with automatic scrim coordination
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { isArray, isNaN, isNullOrUndefined, isNumber, isObject, isString } from "./utilities/index.mjs";
|
|
2
|
+
import { i as createFilter } from "./createPagination-B5dfqY-a.mjs";
|
|
3
|
+
import { computed, toRef, toValue } from "vue";
|
|
4
|
+
//#region src/composables/createDataTable/adapters/adapter.ts
|
|
5
|
+
/**
|
|
6
|
+
* @module createDataTable/adapters
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Defines the adapter interface and abstract base class for data table
|
|
10
|
+
* pipeline strategies. Adapters control how raw items are filtered, sorted,
|
|
11
|
+
* and sliced into visible items.
|
|
12
|
+
*
|
|
13
|
+
* The abstract DataTableAdapter provides shared filter and sort pipelines
|
|
14
|
+
* used by client-side adapters. Server adapters that delegate pipeline
|
|
15
|
+
* operations externally subclass DataTableAdapter directly.
|
|
16
|
+
*/
|
|
17
|
+
function getNestedValue(obj, parts) {
|
|
18
|
+
let result = obj;
|
|
19
|
+
for (const k of parts) {
|
|
20
|
+
if (/* @__PURE__ */ isNullOrUndefined(result)) return void 0;
|
|
21
|
+
result = result[k];
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
function compareValues(a, b, collator) {
|
|
26
|
+
if (a === b) return 0;
|
|
27
|
+
const aNil = /* @__PURE__ */ isNullOrUndefined(a);
|
|
28
|
+
const bNil = /* @__PURE__ */ isNullOrUndefined(b);
|
|
29
|
+
if (aNil && bNil) return 0;
|
|
30
|
+
if (aNil) return 1;
|
|
31
|
+
if (bNil) return -1;
|
|
32
|
+
if (/* @__PURE__ */ isString(a) && /* @__PURE__ */ isString(b)) return collator ? collator.compare(a, b) : a.localeCompare(b);
|
|
33
|
+
if (/* @__PURE__ */ isNumber(a) && /* @__PURE__ */ isNumber(b)) {
|
|
34
|
+
if (/* @__PURE__ */ isNaN(a)) return 1;
|
|
35
|
+
if (/* @__PURE__ */ isNaN(b)) return -1;
|
|
36
|
+
return a - b;
|
|
37
|
+
}
|
|
38
|
+
const sa = String(a);
|
|
39
|
+
const sb = String(b);
|
|
40
|
+
return collator ? collator.compare(sa, sb) : sa.localeCompare(sb);
|
|
41
|
+
}
|
|
42
|
+
var DataTableAdapter = class {
|
|
43
|
+
/** Create the filter pipeline stage */
|
|
44
|
+
filter(context) {
|
|
45
|
+
const filter = createFilter({
|
|
46
|
+
...context.filterOptions,
|
|
47
|
+
keys: [...toValue(context.filterableKeys)],
|
|
48
|
+
customFilter: context.filterOptions.customFilter ?? ((query, item) => {
|
|
49
|
+
const columnFilters = toValue(context.customColumnFilters);
|
|
50
|
+
const keys = toValue(context.filterableKeys);
|
|
51
|
+
if (!/* @__PURE__ */ isObject(item)) return false;
|
|
52
|
+
const q = String(/* @__PURE__ */ isArray(query) ? query[0] : query).toLowerCase();
|
|
53
|
+
if (!q) return true;
|
|
54
|
+
const obj = item;
|
|
55
|
+
for (const key of keys) {
|
|
56
|
+
const customFn = columnFilters[key];
|
|
57
|
+
if (customFn) {
|
|
58
|
+
if (customFn(obj[key], q)) return true;
|
|
59
|
+
} else {
|
|
60
|
+
const val = obj[key];
|
|
61
|
+
if (!/* @__PURE__ */ isNullOrUndefined(val) && String(val).toLowerCase().includes(q)) return true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
const allItems = toRef(() => toValue(context.items));
|
|
68
|
+
const { items: filteredItems } = filter.apply(context.search, allItems);
|
|
69
|
+
return {
|
|
70
|
+
allItems,
|
|
71
|
+
filteredItems
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/** Create the sort pipeline stage */
|
|
75
|
+
sort(filteredItems, sortBy, locale, customSorts) {
|
|
76
|
+
return computed(() => {
|
|
77
|
+
const entries = sortBy.value;
|
|
78
|
+
if (entries.length === 0) return filteredItems.value;
|
|
79
|
+
const sorts = toValue(customSorts) ?? {};
|
|
80
|
+
const collator = new Intl.Collator(locale?.value);
|
|
81
|
+
const resolved = entries.map(({ key, direction }) => ({
|
|
82
|
+
parts: key.split("."),
|
|
83
|
+
direction,
|
|
84
|
+
custom: sorts[key]
|
|
85
|
+
}));
|
|
86
|
+
return filteredItems.value.toSorted((a, b) => {
|
|
87
|
+
for (const { parts, direction, custom } of resolved) {
|
|
88
|
+
const aVal = parts.length === 1 ? a[parts[0]] : getNestedValue(a, parts);
|
|
89
|
+
const bVal = parts.length === 1 ? b[parts[0]] : getNestedValue(b, parts);
|
|
90
|
+
const cmp = custom ? custom(aVal, bVal) : compareValues(aVal, bVal, collator);
|
|
91
|
+
if (cmp !== 0) return direction === "desc" ? -cmp : cmp;
|
|
92
|
+
}
|
|
93
|
+
return 0;
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
//#endregion
|
|
99
|
+
export { DataTableAdapter as t };
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { hexToRgb, isUndefined } from "./utilities/index.mjs";
|
|
2
2
|
//#region src/composables/useTheme/adapters/adapter.ts
|
|
3
3
|
var ThemeAdapter = class ThemeAdapter {
|
|
4
|
-
static UNSAFE_CSS = /url\s*\(|@import|expression\s*\(|[{}]/i;
|
|
4
|
+
static UNSAFE_CSS = /url\s*\(|@import|expression\s*\(|[{}<>]/i;
|
|
5
5
|
static SAFE_IDENT = /^[a-zA-Z0-9_-]+$/;
|
|
6
6
|
stylesheetId = "v0-theme-stylesheet";
|
|
7
7
|
prefix;
|
|
8
8
|
rgb = false;
|
|
9
|
+
/**
|
|
10
|
+
* Teardown registered by `setup`. Called once via `app.onUnmount` on the
|
|
11
|
+
* plugin path and available as a reachable handle on standalone paths.
|
|
12
|
+
*/
|
|
13
|
+
dispose;
|
|
9
14
|
constructor(prefix) {
|
|
10
15
|
this.prefix = prefix;
|
|
11
16
|
}
|
|
@@ -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-B9YmdGZ3.mjs";
|
|
2
|
+
import { c as TokenTicket, i as TokenContext } from "./index-Bmz8PZMY.mjs";
|
|
3
3
|
import { Ref } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/composables/useLocale/adapters/adapter.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ContextTrinity } from "./index-
|
|
1
|
+
import { t as ContextTrinity } from "./index-DXMlYoiQ.mjs";
|
|
2
2
|
import * as _$vue from "vue";
|
|
3
3
|
import { ComputedRef, MaybeRefOrGetter, Ref, ShallowRef, WritableComputedRef } from "vue";
|
|
4
4
|
|
|
@@ -158,9 +158,9 @@ interface PaginationOptions {
|
|
|
158
158
|
itemsPerPage?: MaybeRefOrGetter<number>;
|
|
159
159
|
/** Total number of items. @default 0 */
|
|
160
160
|
size?: MaybeRefOrGetter<number>;
|
|
161
|
-
/** Maximum visible page buttons. @default
|
|
161
|
+
/** Maximum visible page buttons. @default 7 */
|
|
162
162
|
visible?: MaybeRefOrGetter<number>;
|
|
163
|
-
/** Ellipsis character. @default '
|
|
163
|
+
/** Ellipsis character. @default '...' */
|
|
164
164
|
ellipsis?: string | false;
|
|
165
165
|
}
|
|
166
166
|
interface PaginationContextOptions extends PaginationOptions {
|