@vuetify/v0 1.1.0 → 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.
Files changed (162) hide show
  1. package/README.md +8 -0
  2. package/dist/{adapter-Butx_2UU.d.mts → adapter-BXunW_mw.d.mts} +1 -1
  3. package/dist/{createPagination-B5dfqY-a.mjs → adapter-BiQV5j8B.mjs} +98 -3
  4. package/dist/adapter-ClB-53_F.d.mts +62 -0
  5. package/dist/{adapter-hq9YlPOF.d.mts → adapter-CqS8xexO.d.mts} +2 -2
  6. package/dist/adapter-CrRJuxRk.mjs +21 -0
  7. package/dist/{adapter-_srNCBEi.d.mts → adapter-PDTe5nFT.d.mts} +6 -7
  8. package/dist/browser/index.d.ts +15101 -12955
  9. package/dist/browser/index.js +16553 -14035
  10. package/dist/components/index.d.mts +2 -2
  11. package/dist/components/index.mjs +2 -2
  12. package/dist/{components-B2BZ1B3K.mjs → components-DBhVg-t1.mjs} +8210 -6301
  13. package/dist/composables/index.d.mts +22 -20
  14. package/dist/composables/index.mjs +37 -34
  15. package/dist/{composables-DONBl_c9.mjs → composables-ZGhVN2EJ.mjs} +32 -1061
  16. package/dist/{consola-BPGkJp_q.d.mts → consola-CdMU53rU.d.mts} +1 -1
  17. package/dist/constants/index.d.mts +1 -1
  18. package/dist/constants/index.mjs +1 -1
  19. package/dist/{createDataTable-DgyHBfAr.mjs → createDataTable-VmQEDn-7.mjs} +23 -7
  20. package/dist/{createGroup-BXKKcb9-.mjs → createGroup-B_LL7xRr.mjs} +2 -2
  21. package/dist/createPlugin-Oo6t-vBw.mjs +157 -0
  22. package/dist/{createRegistry-B9cOWny2.mjs → createRegistry-DVdvep0v.mjs} +1 -1
  23. package/dist/{createSelection-CWE554_g.mjs → createSelection-BNdDz8oY.mjs} +1 -1
  24. package/dist/{createSingle-Dz-1Iv7u.mjs → createSingle-DHyIQ9Cj.mjs} +1 -1
  25. package/dist/{createTokens-C4qcW2Kv.mjs → createTokens-DoISbwd7.mjs} +2 -2
  26. package/dist/data-table/adapters/client/index.d.mts +1 -1
  27. package/dist/data-table/adapters/client/index.mjs +1 -1
  28. package/dist/data-table/adapters/index.d.mts +4 -4
  29. package/dist/data-table/adapters/index.mjs +4 -4
  30. package/dist/data-table/adapters/server/index.d.mts +1 -1
  31. package/dist/data-table/adapters/server/index.mjs +1 -1
  32. package/dist/data-table/adapters/virtual/index.d.mts +1 -1
  33. package/dist/data-table/adapters/virtual/index.mjs +1 -1
  34. package/dist/data-table/index.d.mts +5 -5
  35. package/dist/data-table/index.mjs +5 -5
  36. package/dist/date/index.d.mts +1 -1
  37. package/dist/date/index.mjs +2 -2
  38. package/dist/features/adapters/flagsmith/index.d.mts +1 -1
  39. package/dist/features/adapters/flagsmith/index.mjs +1 -1
  40. package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
  41. package/dist/features/adapters/launchdarkly/index.mjs +1 -1
  42. package/dist/features/adapters/posthog/index.d.mts +1 -1
  43. package/dist/features/adapters/posthog/index.mjs +2 -2
  44. package/dist/features/index.d.mts +2 -2
  45. package/dist/features/index.mjs +2 -2
  46. package/dist/{flagsmith-DA2GCyGv.d.mts → flagsmith-DcIDrI7_.d.mts} +1 -1
  47. package/dist/{globals-CtaXlEOI.mjs → globals-DaoKtIGF.mjs} +1 -1
  48. package/dist/{index-CTl0cGH6.d.mts → index-Cm6CbqI6.d.mts} +7258 -5609
  49. package/dist/{index-Dc7lKT6q.d.mts → index-Cx0cWGlx.d.mts} +461 -130
  50. package/dist/{index-QnpcDsV7.d.mts → index-D0ub61GV.d.mts} +2 -2
  51. package/dist/{index-RGiSdjYt.d.mts → index-DSPkZ0ql.d.mts} +2 -2
  52. package/dist/{index-DCtHbY0a.d.mts → index-Di9e8sOm.d.mts} +24 -19
  53. package/dist/{index-DF0tMI2_.d.mts → index-DjRE4lLl.d.mts} +108 -2
  54. package/dist/index.d.mts +25 -24
  55. package/dist/index.mjs +40 -37
  56. package/dist/json/attributes.json +488 -0
  57. package/dist/json/importMap.json +92 -0
  58. package/dist/json/tags.json +234 -0
  59. package/dist/json/web-types.json +1540 -113
  60. package/dist/{launchdarkly-Bp8p9PMD.d.mts → launchdarkly-CUzunYol.d.mts} +1 -1
  61. package/dist/locale/adapters/index.d.mts +2 -2
  62. package/dist/locale/adapters/index.mjs +2 -2
  63. package/dist/locale/adapters/v0/index.d.mts +1 -1
  64. package/dist/locale/adapters/v0/index.mjs +1 -1
  65. package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
  66. package/dist/locale/adapters/vue-i18n/index.mjs +1 -1
  67. package/dist/locale/index.d.mts +3 -3
  68. package/dist/locale/index.mjs +3 -3
  69. package/dist/locale/messages/en/index.d.mts +3 -0
  70. package/dist/locale/messages/en/index.mjs +1 -0
  71. package/dist/logger/adapters/consola/index.d.mts +1 -1
  72. package/dist/logger/adapters/index.d.mts +4 -4
  73. package/dist/logger/adapters/index.mjs +1 -1
  74. package/dist/logger/adapters/pino/index.d.mts +1 -1
  75. package/dist/logger/adapters/v0/index.d.mts +1 -1
  76. package/dist/logger/adapters/v0/index.mjs +1 -1
  77. package/dist/logger/index.d.mts +5 -5
  78. package/dist/logger/index.mjs +2 -2
  79. package/dist/notifications/index.d.mts +1 -1
  80. package/dist/notifications/index.mjs +2 -2
  81. package/dist/palettes/ant/index.d.mts +1 -1
  82. package/dist/palettes/index.d.mts +3 -3
  83. package/dist/palettes/material/index.d.mts +1 -1
  84. package/dist/palettes/md1/index.d.mts +1 -1
  85. package/dist/palettes/md2/index.d.mts +1 -1
  86. package/dist/palettes/radix/index.d.mts +1 -1
  87. package/dist/palettes/tailwind/index.d.mts +1 -1
  88. package/dist/permissions/adapters/index.d.mts +1 -1
  89. package/dist/permissions/adapters/index.mjs +1 -1
  90. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  91. package/dist/permissions/adapters/v0/index.mjs +1 -1
  92. package/dist/permissions/index.d.mts +1 -1
  93. package/dist/permissions/index.mjs +2 -2
  94. package/dist/{pino-B6BI1AOK.d.mts → pino-DjeWBFnj.d.mts} +1 -1
  95. package/dist/popover/adapters/floating-ui/index.d.mts +25 -0
  96. package/dist/popover/adapters/floating-ui/index.mjs +98 -0
  97. package/dist/popover/index.d.mts +3 -0
  98. package/dist/popover/index.mjs +3 -0
  99. package/dist/{posthog-sFqk0bGy.d.mts → posthog-CJAYssdr.d.mts} +1 -1
  100. package/dist/rules/index.d.mts +1 -1
  101. package/dist/rules/index.mjs +1 -1
  102. package/dist/{server-DbtTGb67.d.mts → server-5vbJ7GGs.d.mts} +2 -2
  103. package/dist/{server-D5BJBjB0.mjs → server-m7iD1vOr.mjs} +1 -2
  104. package/dist/storage/adapters/index.d.mts +2 -2
  105. package/dist/storage/adapters/index.mjs +1 -1
  106. package/dist/storage/adapters/memory/index.d.mts +1 -1
  107. package/dist/storage/adapters/memory/index.mjs +1 -1
  108. package/dist/storage/index.d.mts +3 -3
  109. package/dist/storage/index.mjs +2 -2
  110. package/dist/theme/adapters/index.d.mts +1 -1
  111. package/dist/theme/adapters/index.mjs +3 -3
  112. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  113. package/dist/theme/adapters/unhead/index.mjs +1 -1
  114. package/dist/theme/adapters/v0/index.d.mts +1 -1
  115. package/dist/theme/adapters/v0/index.mjs +1 -1
  116. package/dist/theme/index.d.mts +2 -2
  117. package/dist/theme/index.mjs +4 -4
  118. package/dist/types/index.d.mts +1 -1
  119. package/dist/{unhead-BAWCwNOF.mjs → unhead-C8zbWr45.mjs} +2 -2
  120. package/dist/{useEventListener-DSOeDtC-.mjs → useEventListener-2eAMwUdw.mjs} +2 -2
  121. package/dist/useFeatures-DLafCOWt.mjs +221 -0
  122. package/dist/{useLocale-D-V0DENN.mjs → useLocale-K_45ulPt.mjs} +4 -4
  123. package/dist/{useLogger-CbvzXCWb.mjs → useLogger-YyWuYvrH.mjs} +5 -159
  124. package/dist/{useNotifications-Cqg3uDz0.mjs → useNotifications-Kh_KvM7j.mjs} +57 -154
  125. package/dist/{usePermissions-BTdUVyQe.mjs → usePermissions-BCGwsOES.mjs} +4 -4
  126. package/dist/usePopover-BTo0AGIQ.mjs +420 -0
  127. package/dist/{useRovingFocus-g6ifibLg.mjs → useRovingFocus-CkRnVmJ1.mjs} +1122 -531
  128. package/dist/{useRules-DEiHd_eY.mjs → useRules-BuE5ffOJ.mjs} +3 -2
  129. package/dist/{useStorage-BSfQfDbg.mjs → useStorage-BT8-mjVs.mjs} +5 -4
  130. package/dist/useTheme-DkK6tPqY.mjs +445 -0
  131. package/dist/useTimer-CGVXk397.mjs +151 -0
  132. package/dist/utilities/index.d.mts +2 -2
  133. package/dist/utilities/index.mjs +181 -2
  134. package/dist/{v0-CveVV6On.mjs → v0-B_53w7Fu.mjs} +2 -2
  135. package/dist/{v0-BnUwMaOv.d.mts → v0-CDW1Ktk-.d.mts} +1 -1
  136. package/dist/{v0-CZBkpQjr.mjs → v0-D0Exc2bO.mjs} +2 -2
  137. package/dist/{v0-rSxMW8FJ.d.mts → v0-DfFK-p4X.d.mts} +1 -1
  138. package/dist/{v0-DotXXGXU.d.mts → v0-GI9U-rPA.d.mts} +2 -2
  139. package/dist/{v0-CCWHeKJM.mjs → v0-SuxTihEe.mjs} +1 -1
  140. package/dist/{v0-A4GLojAr.mjs → v0-yZ2ZUtVF.mjs} +1 -2
  141. package/dist/{virtual-DFvOoeG6.mjs → virtual-Bbu26O_h.mjs} +1 -2
  142. package/dist/{virtual-C-NsLue0.d.mts → virtual-JIdFLpTQ.d.mts} +2 -2
  143. package/package.json +8 -1
  144. package/dist/adapter-CVoWg0sw.mjs +0 -99
  145. package/dist/useFeatures-YJmONiU7.mjs +0 -124
  146. package/dist/useTheme-C0_i__N6.mjs +0 -162
  147. /package/dist/{adapter-CTsckKAR.mjs → adapter-8UADsA3-.mjs} +0 -0
  148. /package/dist/{adapter-BCtceV3b.mjs → adapter-BuSfpxur.mjs} +0 -0
  149. /package/dist/{adapter-Bc0yPSfo.d.mts → adapter-D5nT3bLw.d.mts} +0 -0
  150. /package/dist/{adapter-bwZo7b5p.mjs → adapter-D8zizQVP.mjs} +0 -0
  151. /package/dist/{adapter-q1sRACUc.mjs → adapter-TiGrumDi.mjs} +0 -0
  152. /package/dist/{adapter-BYzU4Ey5.d.mts → adapter-ryk5H6YZ.d.mts} +0 -0
  153. /package/dist/{index-CROz1VSV.d.mts → index-CX869wwk.d.mts} +0 -0
  154. /package/dist/{index-FtE8MXJ_.d.mts → index-CsuikFeJ.d.mts} +0 -0
  155. /package/dist/{index-DidZKN6S.d.mts → index-Djhiy3nS.d.mts} +0 -0
  156. /package/dist/{index-CyNk9FpR.d.mts → index-DtiaWx5U.d.mts} +0 -0
  157. /package/dist/{index-DXMlYoiQ.d.mts → index-H_hl6-4b.d.mts} +0 -0
  158. /package/dist/{index-BgCkepP_.d.mts → index-u_qSc2xS.d.mts} +0 -0
  159. /package/dist/{memory-DbyZeNjg.d.mts → memory-B7z1RR9r.d.mts} +0 -0
  160. /package/dist/{memory-BJjkQzxs.mjs → memory-CR6zvuaP.mjs} +0 -0
  161. /package/dist/{toArray-C89ZaEuF.mjs → toArray-MY9Kb1Qy.mjs} +0 -0
  162. /package/dist/{v0-UNyykD27.mjs → v0-Ch0yBKEj.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "../globals-CtaXlEOI.mjs";
1
+ import { t as IN_BROWSER } from "../globals-DaoKtIGF.mjs";
2
2
  import * as Vue from "vue";
3
3
  import { useId as useId$1 } from "vue";
4
4
  //#region src/utilities/color.ts
@@ -102,6 +102,126 @@ function foreground(hex) {
102
102
  return Math.abs(/* @__PURE__ */ apca(BLACK, rgb)) > Math.abs(/* @__PURE__ */ apca(WHITE, rgb)) ? "#000000" : "#ffffff";
103
103
  }
104
104
  //#endregion
105
+ //#region src/utilities/diacritics.ts
106
+ const COMBINING_MARKS = /[\u0300-\u036F]/g;
107
+ const FINAL_SIGMA = /ς/g;
108
+ function lower(str) {
109
+ return str.toLowerCase().replace(FINAL_SIGMA, "σ");
110
+ }
111
+ const SPECIAL_LETTERS = {
112
+ ł: "l",
113
+ ø: "o",
114
+ đ: "d",
115
+ ð: "d",
116
+ þ: "th",
117
+ ħ: "h",
118
+ ŧ: "t",
119
+ ŋ: "n",
120
+ ß: "ss",
121
+ æ: "ae",
122
+ œ: "oe",
123
+ ı: "i",
124
+ Ł: "L",
125
+ Ø: "O",
126
+ Đ: "D",
127
+ Ð: "D",
128
+ Þ: "Th",
129
+ Ħ: "H",
130
+ Ŧ: "T",
131
+ Ŋ: "N",
132
+ ẞ: "Ss",
133
+ Æ: "Ae",
134
+ Œ: "Oe"
135
+ };
136
+ const SPECIAL_LETTER = /* @__PURE__ */ new RegExp(`[${Object.keys(SPECIAL_LETTERS).join("")}]`, "g");
137
+ function fold(str) {
138
+ return str.normalize("NFD").replace(COMBINING_MARKS, "").replace(SPECIAL_LETTER, (char) => SPECIAL_LETTERS[char]);
139
+ }
140
+ function foldWithMap(str, ignoreCase, foldAccents) {
141
+ let folded = "";
142
+ const map = [];
143
+ let index = 0;
144
+ for (const char of str) {
145
+ const raw = ignoreCase ? lower(char) : char;
146
+ const chunk = foldAccents ? fold(raw) : raw;
147
+ folded += chunk;
148
+ for (let unit = 0; unit < chunk.length; unit++) map.push(index);
149
+ index += char.length;
150
+ }
151
+ map.push(str.length);
152
+ return {
153
+ folded,
154
+ map
155
+ };
156
+ }
157
+ function collect(haystack, needle, matchAll) {
158
+ const ranges = [];
159
+ let index = haystack.indexOf(needle);
160
+ while (index !== -1) {
161
+ ranges.push([index, index + needle.length]);
162
+ if (!matchAll) break;
163
+ index = haystack.indexOf(needle, index + needle.length);
164
+ }
165
+ return ranges;
166
+ }
167
+ function remap(map, start, end) {
168
+ const sourceStart = map[start];
169
+ let sourceEnd = map[end];
170
+ if (end > 0 && map[end] === map[end - 1]) {
171
+ let index = end;
172
+ const current = map[end];
173
+ while (index < map.length && map[index] === current) index++;
174
+ sourceEnd = map[index];
175
+ }
176
+ return [sourceStart, sourceEnd];
177
+ }
178
+ function project(ranges, map) {
179
+ const projected = [];
180
+ for (const [start, end] of ranges) {
181
+ const span = remap(map, start, end);
182
+ const last = projected.at(-1);
183
+ if (!last || last[0] !== span[0] || last[1] !== span[1]) projected.push(span);
184
+ }
185
+ return projected;
186
+ }
187
+ /**
188
+ * Finds `[start, end]` index pairs where `query` occurs in `text`, optionally
189
+ * folding accents on either side. Returned indices always address the original
190
+ * `text`, even when folding or case-conversion changed its length.
191
+ *
192
+ * @param text The string to search.
193
+ * @param query The term to look for. An empty query yields no ranges.
194
+ * @param options Optional `ignoreCase`, `ignoreAccents`, `matchAll`.
195
+ * @returns Ranges into `text`, where `end` is exclusive.
196
+ *
197
+ * @example
198
+ * ```ts
199
+ * import { findMatchRanges } from '@vuetify/v0'
200
+ *
201
+ * findMatchRanges('Zürich', 'zurich', { ignoreCase: true, ignoreAccents: true })
202
+ * // [[0, 6]]
203
+ *
204
+ * findMatchRanges('Łódź', 'Lo', { ignoreAccents: 'target' })
205
+ * // [[0, 2]]
206
+ * ```
207
+ */
208
+ /* @__NO_SIDE_EFFECTS__ */
209
+ function findMatchRanges(text, query, options = {}) {
210
+ const { ignoreCase = false, ignoreAccents = false, matchAll = false } = options;
211
+ const foldQuery = ignoreAccents === true || ignoreAccents === "query";
212
+ const foldTarget = ignoreAccents === true || ignoreAccents === "target";
213
+ const folded = foldQuery ? fold(query) : query;
214
+ const needle = ignoreCase ? lower(folded) : folded;
215
+ if (needle.length === 0) return [];
216
+ if (!foldTarget) {
217
+ if (!ignoreCase) return collect(text, needle, matchAll);
218
+ const lowered = lower(text);
219
+ if (lowered.length === text.length) return collect(lowered, needle, matchAll);
220
+ }
221
+ const { folded: haystack, map } = foldWithMap(text, ignoreCase, foldTarget);
222
+ return project(collect(haystack, needle, matchAll), map);
223
+ }
224
+ //#endregion
105
225
  //#region src/utilities/instance.ts
106
226
  /**
107
227
  * Vue 3.6+ exposes `currentInstance` for Vapor mode compatibility.
@@ -308,6 +428,27 @@ function isElement(item) {
308
428
  return typeof Element !== "undefined" && item instanceof Element;
309
429
  }
310
430
  /**
431
+ * Resolve the deepest focused element, piercing open shadow roots.
432
+ *
433
+ * `document.activeElement` returns the shadow *host* when focus is inside an
434
+ * open shadow root — walk down through open roots so focus/keyboard logic
435
+ * resolves the real focused element (e.g. a control inside a custom element).
436
+ * Returns the same value as `document.activeElement` in light DOM, and `null`
437
+ * under SSR. Closed shadow roots can't be traversed.
438
+ *
439
+ * @example
440
+ * ```ts
441
+ * const active = getActiveElement()
442
+ * ```
443
+ */
444
+ /* @__NO_SIDE_EFFECTS__ */
445
+ function getActiveElement() {
446
+ if (typeof document === "undefined") return null;
447
+ let active = document.activeElement;
448
+ while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
449
+ return active;
450
+ }
451
+ /**
311
452
  * Checks if a value is null
312
453
  *
313
454
  * @param item The value to check
@@ -550,6 +691,44 @@ function range(length, start = 0) {
550
691
  return Array.from({ length }, (_, index) => start + index);
551
692
  }
552
693
  /**
694
+ * Parses a CSS pixel length into a number
695
+ *
696
+ * @param value The resolved CSS length, e.g. `getComputedStyle(el).marginLeft`
697
+ * @param fallback The value to return when `value` does not parse (default: 0)
698
+ * @returns The parsed number, or `fallback`
699
+ *
700
+ * @remarks
701
+ * Built for reading `getComputedStyle` output, where a length that does not
702
+ * apply resolves to `''` or `'auto'` rather than to a number. An unparseable
703
+ * length returns `fallback`; a length that legitimately parses to `0` returns
704
+ * `0`. That distinction is why this exists — `Number.parseFloat(v) || 0`
705
+ * collapses both cases onto `0`, which is only correct when the fallback is
706
+ * itself `0`.
707
+ *
708
+ * Only the leading number is read, matching `Number.parseFloat`, so any unit
709
+ * suffix is ignored. Values `getComputedStyle` never returns — percentages,
710
+ * `calc()` expressions, multi-value shorthands — are out of scope.
711
+ *
712
+ * @example
713
+ * ```ts
714
+ * pxToNumber('16px') // 16
715
+ * pxToNumber('0px') // 0
716
+ * pxToNumber('-4.5px') // -4.5
717
+ * pxToNumber('auto') // 0
718
+ * pxToNumber(undefined) // 0
719
+ *
720
+ * // A non-zero fallback is the case `|| 0` cannot express
721
+ * pxToNumber('auto', 100) // 100
722
+ * pxToNumber('0px', 100) // 0
723
+ * ```
724
+ */
725
+ /* @__NO_SIDE_EFFECTS__ */
726
+ function pxToNumber(value, fallback = 0) {
727
+ if (!/* @__PURE__ */ isString(value)) return fallback;
728
+ const parsed = Number.parseFloat(value);
729
+ return /* @__PURE__ */ isNaN(parsed) ? fallback : parsed;
730
+ }
731
+ /**
553
732
  * Resolves an iterable of IDs to their items via a getter,
554
733
  * filtering out any that return undefined.
555
734
  *
@@ -697,4 +876,4 @@ function isV0Error(value, code) {
697
876
  return /* @__PURE__ */ isUndefined(code) || value.code === code;
698
877
  }
699
878
  //#endregion
700
- export { UNSAFE_KEYS, V0Error, apca, clamp, foreground, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isThenable, isUndefined, isV0Error, mergeDeep, range, resolveIds, resolveIndexes, rgbToHex, useId };
879
+ export { UNSAFE_KEYS, V0Error, apca, clamp, findMatchRanges, foreground, getActiveElement, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isThenable, isUndefined, isV0Error, mergeDeep, pxToNumber, range, resolveIds, resolveIndexes, rgbToHex, useId };
@@ -1,6 +1,6 @@
1
- import { t as IN_BROWSER } from "./globals-CtaXlEOI.mjs";
1
+ import { t as IN_BROWSER } from "./globals-DaoKtIGF.mjs";
2
2
  import { isNull, isString } from "./utilities/index.mjs";
3
- import { t as ThemeAdapter } from "./adapter-q1sRACUc.mjs";
3
+ import { t as ThemeAdapter } from "./adapter-TiGrumDi.mjs";
4
4
  import { watch } from "vue";
5
5
  //#region src/composables/useTheme/adapters/v0.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { n as LocaleAdapterContext, t as LocaleAdapter } from "./adapter-hq9YlPOF.mjs";
1
+ import { n as LocaleAdapterContext, t as LocaleAdapter } from "./adapter-CqS8xexO.mjs";
2
2
 
3
3
  //#region src/composables/useLocale/adapters/v0.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { t as IN_BROWSER } from "./globals-CtaXlEOI.mjs";
1
+ import { t as IN_BROWSER } from "./globals-DaoKtIGF.mjs";
2
2
  import { isObject, isString, isUndefined } from "./utilities/index.mjs";
3
- import { t as LocaleAdapter } from "./adapter-bwZo7b5p.mjs";
3
+ import { t as LocaleAdapter } from "./adapter-D8zizQVP.mjs";
4
4
  //#region src/composables/useLocale/adapters/v0.ts
5
5
  /**
6
6
  * Default locale adapter for @vuetify/v0.
@@ -1,4 +1,4 @@
1
- import { t as LoggerAdapter } from "./adapter-BYzU4Ey5.mjs";
1
+ import { t as LoggerAdapter } from "./adapter-ryk5H6YZ.mjs";
2
2
 
3
3
  //#region src/composables/useLogger/adapters/v0.d.ts
4
4
  /**
@@ -1,7 +1,7 @@
1
- import { n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "./adapter-_srNCBEi.mjs";
1
+ import { n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "./adapter-PDTe5nFT.mjs";
2
2
 
3
3
  //#region src/composables/createDataTable/adapters/v0.d.ts
4
- declare class ClientDataTableAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
4
+ declare class ClientDataTableAdapter<T extends object> extends DataTableAdapter<T> {
5
5
  setup(context: DataTableAdapterContext<T>): DataTableAdapterResult<T>;
6
6
  }
7
7
  //#endregion
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-CtaXlEOI.mjs";
1
+ import { t as IN_BROWSER } from "./globals-DaoKtIGF.mjs";
2
2
  import { isFunction } from "./utilities/index.mjs";
3
3
  import { t as LoggerAdapter } from "./adapter-Chznb9Ju.mjs";
4
4
  //#region src/composables/useLogger/adapters/v0.ts
@@ -1,5 +1,4 @@
1
- import { t as createPagination } from "./createPagination-B5dfqY-a.mjs";
2
- import { t as DataTableAdapter } from "./adapter-CVoWg0sw.mjs";
1
+ import { n as createPagination, t as DataTableAdapter } from "./adapter-BiQV5j8B.mjs";
3
2
  import { computed, toRef, watch } from "vue";
4
3
  //#region src/composables/createDataTable/adapters/v0.ts
5
4
  /**
@@ -1,5 +1,4 @@
1
- import { t as createPagination } from "./createPagination-B5dfqY-a.mjs";
2
- import { t as DataTableAdapter } from "./adapter-CVoWg0sw.mjs";
1
+ import { n as createPagination, t as DataTableAdapter } from "./adapter-BiQV5j8B.mjs";
3
2
  import { toRef, watch } from "vue";
4
3
  //#region src/composables/createDataTable/adapters/virtual.ts
5
4
  /**
@@ -1,7 +1,7 @@
1
- import { n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "./adapter-_srNCBEi.mjs";
1
+ import { n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "./adapter-PDTe5nFT.mjs";
2
2
 
3
3
  //#region src/composables/createDataTable/adapters/virtual.d.ts
4
- declare class VirtualDataTableAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
4
+ declare class VirtualDataTableAdapter<T extends object> extends DataTableAdapter<T> {
5
5
  setup(context: DataTableAdapterContext<T>): DataTableAdapterResult<T>;
6
6
  }
7
7
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuetify/v0",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Headless, unstyled, accessible Vue 3 primitives and composables — a meta UI framework for building applications, component libraries, and design systems",
5
5
  "keywords": [
6
6
  "vue",
@@ -50,6 +50,7 @@
50
50
  "@adobe/leonardo-contrast-colors": ">=1.0.0",
51
51
  "@ant-design/colors": ">=7.0.0",
52
52
  "@flagsmith/flagsmith": ">=11.0.0",
53
+ "@floating-ui/dom": ">=1.8.0",
53
54
  "@js-temporal/polyfill": ">=0.5.0",
54
55
  "@material/material-color-utilities": ">=0.3.0",
55
56
  "launchdarkly-js-client-sdk": "^3.0.0",
@@ -61,6 +62,9 @@
61
62
  "@flagsmith/flagsmith": {
62
63
  "optional": true
63
64
  },
65
+ "@floating-ui/dom": {
66
+ "optional": true
67
+ },
64
68
  "@js-temporal/polyfill": {
65
69
  "optional": true
66
70
  },
@@ -87,6 +91,7 @@
87
91
  "@adobe/leonardo-contrast-colors": "^1.1.0",
88
92
  "@ant-design/colors": "^8.0.1",
89
93
  "@flagsmith/flagsmith": "^11.0.0",
94
+ "@floating-ui/dom": "^1.8.0",
90
95
  "@js-temporal/polyfill": "0.5.1",
91
96
  "@material/material-color-utilities": "^0.4.0",
92
97
  "@testing-library/vue": "^8.1.0",
@@ -148,6 +153,8 @@
148
153
  "./permissions": "./dist/permissions/index.mjs",
149
154
  "./permissions/adapters": "./dist/permissions/adapters/index.mjs",
150
155
  "./permissions/adapters/v0": "./dist/permissions/adapters/v0/index.mjs",
156
+ "./popover": "./dist/popover/index.mjs",
157
+ "./popover/adapters/floating-ui": "./dist/popover/adapters/floating-ui/index.mjs",
151
158
  "./rules": "./dist/rules/index.mjs",
152
159
  "./storage": "./dist/storage/index.mjs",
153
160
  "./storage/adapters": "./dist/storage/adapters/index.mjs",
@@ -1,99 +0,0 @@
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,124 +0,0 @@
1
- import { isArray, isBoolean, isFunction, isObject } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-CbvzXCWb.mjs";
3
- import { t as createTokens } from "./createTokens-C4qcW2Kv.mjs";
4
- import { t as createGroup } from "./createGroup-BXKKcb9-.mjs";
5
- //#region src/composables/useFeatures/index.ts
6
- /**
7
- * @module useFeatures
8
- *
9
- * @see https://0.vuetifyjs.com/composables/plugins/use-features
10
- *
11
- * @remarks
12
- * Feature flag system with boolean and token-based features.
13
- *
14
- * Key features:
15
- * - Boolean features (true/false activation)
16
- * - Token features with $variation support
17
- * - Auto-selection of enabled features
18
- * - Multi-select support for feature combinations
19
- * - Perfect for A/B testing, progressive rollout, feature toggles
20
- * - Adapter pattern for external feature flag services (Generic, LaunchDarkly, Flagsmith)
21
- *
22
- * Inheritance chain: createRegistry → createSelection → createGroup → createFeatures
23
- * Integrates with createTokens for token-based features.
24
- *
25
- * @example
26
- * ```ts
27
- * import { useFeatures } from '@vuetify/v0'
28
- *
29
- * const features = useFeatures()
30
- * features.register({ id: 'new-checkout', value: true })
31
- * console.log(features.variation('new-checkout'))
32
- * ```
33
- */
34
- /**
35
- * Creates a new features instance.
36
- *
37
- * @param options The options for the features instance.
38
- * @returns A new features instance.
39
- *
40
- * @see https://0.vuetifyjs.com/composables/plugins/use-features
41
- *
42
- * @example
43
- * ```ts
44
- * import { createFeatures } from '@vuetify/v0'
45
- *
46
- * const features = createFeatures({
47
- * features: {
48
- * 'dark-mode': true,
49
- * 'theme-color': { $variation: 'blue' },
50
- * },
51
- * })
52
- * ```
53
- */
54
- function createFeatures(_options = {}) {
55
- const { features, ...options } = _options;
56
- const tokens = createTokens(features, { flat: true });
57
- const registry = createGroup({
58
- ...options,
59
- events: true,
60
- reactive: true
61
- });
62
- for (const [id, { value }] of tokens.entries()) register({
63
- id,
64
- value
65
- });
66
- function variation(id, fallback = null) {
67
- const ticket = registry.get(id);
68
- if (!ticket) return fallback;
69
- return /* @__PURE__ */ isObject(ticket.value) ? ticket.value.$variation ?? fallback : ticket.value ?? fallback;
70
- }
71
- function register(registration = {}) {
72
- const item = {
73
- value: false,
74
- ...registration
75
- };
76
- const ticket = registry.register(item);
77
- if (/* @__PURE__ */ isBoolean(ticket.value) && ticket.value === true || /* @__PURE__ */ isObject(ticket.value) && /* @__PURE__ */ isBoolean(ticket.value.$value) && ticket.value.$value === true) registry.select(ticket.id);
78
- return ticket;
79
- }
80
- function sync(flags) {
81
- for (const [id, value] of Object.entries(flags)) if (registry.get(id)) {
82
- const shouldSelect = /* @__PURE__ */ isBoolean(value) ? value === true : /* @__PURE__ */ isObject(value) && /* @__PURE__ */ isBoolean(value.$value) && value.$value === true;
83
- registry.upsert(id, { value });
84
- if (shouldSelect) registry.select(id);
85
- else registry.selectedIds.delete(id);
86
- } else register({
87
- id,
88
- value
89
- });
90
- }
91
- function onboard(registrations) {
92
- return registry.batch(() => registrations.map((registration) => register(registration)));
93
- }
94
- return {
95
- ...registry,
96
- variation,
97
- register,
98
- onboard,
99
- sync,
100
- get size() {
101
- return registry.size;
102
- }
103
- };
104
- }
105
- function createFeaturesFallback() {
106
- return {
107
- size: 0,
108
- variation: (_id, fallback = null) => fallback,
109
- sync: () => {},
110
- onboard: () => []
111
- };
112
- }
113
- const [createFeaturesContext, createFeaturesPlugin, useFeatures] = createPluginContext("v0:features", (options) => createFeatures(options), {
114
- fallback: () => createFeaturesFallback(),
115
- setup: (context, app, { adapter }) => {
116
- if (!adapter) return;
117
- for (const a of /* @__PURE__ */ isArray(adapter) ? adapter : [adapter]) {
118
- context.sync(a.setup((flags) => context.sync(flags)));
119
- if (/* @__PURE__ */ isFunction(a.dispose)) app.onUnmount(() => a.dispose());
120
- }
121
- }
122
- });
123
- //#endregion
124
- export { useFeatures as i, createFeaturesContext as n, createFeaturesPlugin as r, createFeatures as t };