@vuetify/v0 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-lS_VpRow.mjs → adapter-q1sRACUc.mjs} +3 -1
- package/dist/browser/index.d.ts +59 -9
- package/dist/browser/index.js +221 -62
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/{components-BEULKf1l.mjs → components-B2BZ1B3K.mjs} +186 -55
- package/dist/composables/index.d.mts +1 -1
- package/dist/composables/index.mjs +22 -22
- package/dist/{composables-UDLJSkis.mjs → composables-DONBl_c9.mjs} +24 -14
- package/dist/constants/index.mjs +1 -1
- package/dist/{createDataTable-odNvR9Tl.mjs → createDataTable-DgyHBfAr.mjs} +3 -3
- package/dist/{createGroup-DK5KxHjn.mjs → createGroup-BXKKcb9-.mjs} +1 -1
- package/dist/{createRegistry-DCWma-GG.mjs → createRegistry-B9cOWny2.mjs} +1 -1
- package/dist/{createSelection-B3L-4fLH.mjs → createSelection-CWE554_g.mjs} +1 -1
- package/dist/{createSingle-DBWZc1_G.mjs → createSingle-Dz-1Iv7u.mjs} +1 -1
- package/dist/{createTokens-C4ZmZFHA.mjs → createTokens-C4qcW2Kv.mjs} +2 -2
- package/dist/data-table/index.mjs +1 -1
- package/dist/date/index.mjs +1 -1
- package/dist/features/adapters/posthog/index.mjs +1 -1
- package/dist/features/index.d.mts +1 -1
- package/dist/features/index.mjs +1 -1
- package/dist/{globals-BUTW4MHG.mjs → globals-CtaXlEOI.mjs} +1 -1
- package/dist/{index-CRi_o77U.d.mts → index-CTl0cGH6.d.mts} +111 -91
- package/dist/{index-CrAgM2EJ.d.mts → index-Dc7lKT6q.d.mts} +32 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +24 -24
- package/dist/json/web-types.json +1 -1
- package/dist/locale/adapters/index.mjs +1 -1
- package/dist/locale/adapters/v0/index.mjs +1 -1
- package/dist/locale/index.d.mts +1 -1
- package/dist/locale/index.mjs +2 -2
- package/dist/locale/messages/en/index.d.mts +2 -0
- package/dist/locale/messages/en/index.mjs +5 -1
- package/dist/logger/adapters/index.mjs +1 -1
- package/dist/logger/adapters/v0/index.mjs +1 -1
- package/dist/logger/index.d.mts +1 -1
- 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/index.d.mts +1 -1
- package/dist/permissions/adapters/index.d.mts +1 -1
- package/dist/permissions/adapters/v0/index.d.mts +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/permissions/index.mjs +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/storage/index.d.mts +1 -1
- package/dist/storage/index.mjs +1 -1
- 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 +1 -1
- package/dist/theme/index.mjs +4 -4
- package/dist/{unhead-DHgoHwNp.mjs → unhead-BAWCwNOF.mjs} +2 -2
- package/dist/{useEventListener-DH8rxkg9.mjs → useEventListener-DSOeDtC-.mjs} +1 -1
- package/dist/{useFeatures-C69UhG6j.mjs → useFeatures-YJmONiU7.mjs} +3 -3
- package/dist/{useLocale-x-_byBGJ.mjs → useLocale-D-V0DENN.mjs} +4 -4
- package/dist/{useLogger-YmzhmbpJ.mjs → useLogger-CbvzXCWb.mjs} +2 -2
- package/dist/{useNotifications-HplEE-rp.mjs → useNotifications-Cqg3uDz0.mjs} +3 -3
- package/dist/{usePermissions-DOEFSPvv.mjs → usePermissions-BTdUVyQe.mjs} +2 -2
- package/dist/{useRovingFocus-B_21NzGP.mjs → useRovingFocus-g6ifibLg.mjs} +37 -21
- package/dist/{useRules-D3t_9FXV.mjs → useRules-DEiHd_eY.mjs} +2 -2
- package/dist/{useStorage-Dk0vBk5G.mjs → useStorage-BSfQfDbg.mjs} +3 -3
- package/dist/{useTheme-BgZhqWsW.mjs → useTheme-C0_i__N6.mjs} +4 -4
- package/dist/utilities/index.mjs +1 -1
- package/dist/{v0-BOwub0NK.mjs → v0-CCWHeKJM.mjs} +1 -1
- package/dist/{v0-sv4EvUA-.mjs → v0-CZBkpQjr.mjs} +1 -1
- package/dist/{v0-_kEIVNjG.mjs → v0-CveVV6On.mjs} +2 -2
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -135,7 +135,7 @@ const SUPPORTS_MATCH_MEDIA = IN_BROWSER && "matchMedia" in window && typeof wind
|
|
|
135
135
|
const SUPPORTS_OBSERVER = IN_BROWSER && "ResizeObserver" in window;
|
|
136
136
|
const SUPPORTS_INTERSECTION_OBSERVER = IN_BROWSER && "IntersectionObserver" in window;
|
|
137
137
|
const SUPPORTS_MUTATION_OBSERVER = IN_BROWSER && "MutationObserver" in window;
|
|
138
|
-
const version = "1.0
|
|
138
|
+
const version = "1.1.0";
|
|
139
139
|
/* v8 ignore next -- build-time constant, __DEV__ short-circuits in tests */
|
|
140
140
|
const __LOGGER_ENABLED__ = false;
|
|
141
141
|
//#endregion
|
|
@@ -915,6 +915,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
915
915
|
const cancelEl = shallowRef(null);
|
|
916
916
|
const titleId = `${id}-title`;
|
|
917
917
|
const descriptionId = `${id}-description`;
|
|
918
|
+
const hasTitle = shallowRef(false);
|
|
919
|
+
const hasDescription = shallowRef(false);
|
|
918
920
|
function open() {
|
|
919
921
|
isOpen.value = true;
|
|
920
922
|
}
|
|
@@ -927,6 +929,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
927
929
|
id,
|
|
928
930
|
titleId,
|
|
929
931
|
descriptionId,
|
|
932
|
+
hasTitle,
|
|
933
|
+
hasDescription,
|
|
930
934
|
isPending,
|
|
931
935
|
cancelEl,
|
|
932
936
|
open,
|
|
@@ -4175,8 +4179,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4175
4179
|
"id": context.id,
|
|
4176
4180
|
"role": "alertdialog",
|
|
4177
4181
|
"aria-modal": "true",
|
|
4178
|
-
"aria-labelledby": context.titleId,
|
|
4179
|
-
"aria-describedby": context.descriptionId,
|
|
4182
|
+
"aria-labelledby": context.hasTitle.value ? context.titleId : void 0,
|
|
4183
|
+
"aria-describedby": context.hasDescription.value ? context.descriptionId : void 0,
|
|
4180
4184
|
"style": { zIndex: ticket.zIndex.value },
|
|
4181
4185
|
"onCancel": onCancel,
|
|
4182
4186
|
"onClose": onClose
|
|
@@ -4206,6 +4210,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4206
4210
|
},
|
|
4207
4211
|
setup(__props) {
|
|
4208
4212
|
const context = useAlertDialogContext(__props.namespace);
|
|
4213
|
+
onMounted(() => {
|
|
4214
|
+
context.hasDescription.value = true;
|
|
4215
|
+
});
|
|
4216
|
+
onBeforeUnmount(() => {
|
|
4217
|
+
context.hasDescription.value = false;
|
|
4218
|
+
});
|
|
4209
4219
|
const slotProps = toRef(() => ({ attrs: { id: context.descriptionId } }));
|
|
4210
4220
|
return (_ctx, _cache) => {
|
|
4211
4221
|
return openBlock(), createBlock(unref(_sfc_main$9), mergeProps({
|
|
@@ -4230,6 +4240,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
4230
4240
|
},
|
|
4231
4241
|
setup(__props) {
|
|
4232
4242
|
const context = useAlertDialogContext(__props.namespace);
|
|
4243
|
+
onMounted(() => {
|
|
4244
|
+
context.hasTitle.value = true;
|
|
4245
|
+
});
|
|
4246
|
+
onBeforeUnmount(() => {
|
|
4247
|
+
context.hasTitle.value = false;
|
|
4248
|
+
});
|
|
4233
4249
|
const slotProps = toRef(() => ({ attrs: { id: context.titleId } }));
|
|
4234
4250
|
return (_ctx, _cache) => {
|
|
4235
4251
|
return openBlock(), createBlock(unref(_sfc_main$9), mergeProps({
|
|
@@ -9784,25 +9800,41 @@ function usePopover(options = {}) {
|
|
|
9784
9800
|
"position-anchor": anchor,
|
|
9785
9801
|
"position-try-fallbacks": positionTry
|
|
9786
9802
|
}));
|
|
9787
|
-
/* v8 ignore start -- browser popover API */
|
|
9788
9803
|
function attach(el) {
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
if (
|
|
9792
|
-
|
|
9793
|
-
|
|
9804
|
+
let current;
|
|
9805
|
+
function hide(element) {
|
|
9806
|
+
if (!IN_BROWSER || /* @__PURE__ */ isNullOrUndefined(element)) return;
|
|
9807
|
+
try {
|
|
9808
|
+
if (element.matches?.(":popover-open") === false) return;
|
|
9809
|
+
element.hidePopover?.();
|
|
9810
|
+
} catch {}
|
|
9811
|
+
}
|
|
9812
|
+
function sync() {
|
|
9813
|
+
if (!IN_BROWSER) return;
|
|
9794
9814
|
const element = toValue(el);
|
|
9795
|
-
if (
|
|
9796
|
-
|
|
9797
|
-
if (
|
|
9798
|
-
|
|
9815
|
+
if (!/* @__PURE__ */ isNullOrUndefined(current) && current !== element) hide(current);
|
|
9816
|
+
current = /* @__PURE__ */ isNullOrUndefined(element) ? void 0 : element;
|
|
9817
|
+
if (/* @__PURE__ */ isNullOrUndefined(element)) return;
|
|
9818
|
+
if (!isOpen.value) {
|
|
9819
|
+
hide(element);
|
|
9820
|
+
return;
|
|
9821
|
+
}
|
|
9822
|
+
if (!element.isConnected) return;
|
|
9823
|
+
if (element.matches?.(":popover-open")) return;
|
|
9824
|
+
element.showPopover?.();
|
|
9825
|
+
}
|
|
9826
|
+
watch([isOpen, () => toValue(el)], sync, {
|
|
9827
|
+
immediate: true,
|
|
9828
|
+
flush: "post"
|
|
9799
9829
|
});
|
|
9830
|
+
onScopeDispose(() => {
|
|
9831
|
+
hide(toValue(el) ?? current);
|
|
9832
|
+
}, true);
|
|
9800
9833
|
useEventListener(el, "toggle", (e) => {
|
|
9801
9834
|
if (!toValue(el)?.isConnected) return;
|
|
9802
9835
|
isOpen.value = e.newState === "open";
|
|
9803
9836
|
});
|
|
9804
9837
|
}
|
|
9805
|
-
/* v8 ignore stop */
|
|
9806
9838
|
return {
|
|
9807
9839
|
isOpen,
|
|
9808
9840
|
id,
|
|
@@ -11308,6 +11340,8 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
|
|
|
11308
11340
|
const id = __props.id ?? /* @__PURE__ */ useId();
|
|
11309
11341
|
const titleId = `${id}-title`;
|
|
11310
11342
|
const descriptionId = `${id}-description`;
|
|
11343
|
+
const hasTitle = shallowRef(false);
|
|
11344
|
+
const hasDescription = shallowRef(false);
|
|
11311
11345
|
function open() {
|
|
11312
11346
|
isOpen.value = true;
|
|
11313
11347
|
}
|
|
@@ -11319,6 +11353,8 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
|
|
|
11319
11353
|
id,
|
|
11320
11354
|
titleId,
|
|
11321
11355
|
descriptionId,
|
|
11356
|
+
hasTitle,
|
|
11357
|
+
hasDescription,
|
|
11322
11358
|
open,
|
|
11323
11359
|
close
|
|
11324
11360
|
});
|
|
@@ -11449,8 +11485,8 @@ const _sfc_main$57 = /* @__PURE__ */ defineComponent({
|
|
|
11449
11485
|
"id": context.id,
|
|
11450
11486
|
"role": "dialog",
|
|
11451
11487
|
"aria-modal": "true",
|
|
11452
|
-
"aria-labelledby": context.titleId,
|
|
11453
|
-
"aria-describedby": context.descriptionId,
|
|
11488
|
+
"aria-labelledby": context.hasTitle.value ? context.titleId : void 0,
|
|
11489
|
+
"aria-describedby": context.hasDescription.value ? context.descriptionId : void 0,
|
|
11454
11490
|
"style": { zIndex: ticket.zIndex.value },
|
|
11455
11491
|
"onCancel": onCancel,
|
|
11456
11492
|
"onClose": onClose
|
|
@@ -11480,6 +11516,12 @@ const _sfc_main$58 = /* @__PURE__ */ defineComponent({
|
|
|
11480
11516
|
},
|
|
11481
11517
|
setup(__props) {
|
|
11482
11518
|
const context = useDialogContext(__props.namespace);
|
|
11519
|
+
onMounted(() => {
|
|
11520
|
+
context.hasDescription.value = true;
|
|
11521
|
+
});
|
|
11522
|
+
onBeforeUnmount(() => {
|
|
11523
|
+
context.hasDescription.value = false;
|
|
11524
|
+
});
|
|
11483
11525
|
const slotProps = toRef(() => ({ attrs: { id: context.descriptionId } }));
|
|
11484
11526
|
return (_ctx, _cache) => {
|
|
11485
11527
|
return openBlock(), createBlock(unref(_sfc_main$9), mergeProps({
|
|
@@ -11504,6 +11546,12 @@ const _sfc_main$60 = /* @__PURE__ */ defineComponent({
|
|
|
11504
11546
|
},
|
|
11505
11547
|
setup(__props) {
|
|
11506
11548
|
const context = useDialogContext(__props.namespace);
|
|
11549
|
+
onMounted(() => {
|
|
11550
|
+
context.hasTitle.value = true;
|
|
11551
|
+
});
|
|
11552
|
+
onBeforeUnmount(() => {
|
|
11553
|
+
context.hasTitle.value = false;
|
|
11554
|
+
});
|
|
11507
11555
|
const slotProps = toRef(() => ({ attrs: { id: context.titleId } }));
|
|
11508
11556
|
return (_ctx, _cache) => {
|
|
11509
11557
|
return openBlock(), createBlock(unref(_sfc_main$9), mergeProps({
|
|
@@ -18466,6 +18514,7 @@ const _sfc_main$117 = /* @__PURE__ */ defineComponent({
|
|
|
18466
18514
|
"aria-disabled": toValue(context.disabled),
|
|
18467
18515
|
"disabled": toValue(context.disabled) || void 0,
|
|
18468
18516
|
"tabindex": __props.as === "button" ? void 0 : 0,
|
|
18517
|
+
"data-disabled": toValue(context.disabled) || void 0,
|
|
18469
18518
|
"data-open": context.isOpen.value || void 0,
|
|
18470
18519
|
"style": context.popover.anchorStyles.value,
|
|
18471
18520
|
onClick,
|
|
@@ -21185,6 +21234,21 @@ const _sfc_main$141 = /* @__PURE__ */ defineComponent({
|
|
|
21185
21234
|
const dragging = toRef(() => !/* @__PURE__ */ isNull(draggingHandle.value));
|
|
21186
21235
|
const expandAccum = /* @__PURE__ */ new Map();
|
|
21187
21236
|
const EXPAND_THRESHOLD = 10;
|
|
21237
|
+
const intentAccum = /* @__PURE__ */ new Map();
|
|
21238
|
+
const pending = shallowRef(null);
|
|
21239
|
+
const INTENT_THRESHOLD = 5;
|
|
21240
|
+
function arm(id, mode, delta) {
|
|
21241
|
+
const accum = (intentAccum.get(id) ?? 0) + Math.abs(delta);
|
|
21242
|
+
intentAccum.set(id, accum);
|
|
21243
|
+
if (accum >= INTENT_THRESHOLD) pending.value = {
|
|
21244
|
+
id,
|
|
21245
|
+
mode
|
|
21246
|
+
};
|
|
21247
|
+
}
|
|
21248
|
+
function disarm(id) {
|
|
21249
|
+
intentAccum.delete(id);
|
|
21250
|
+
if (pending.value?.id === id) pending.value = null;
|
|
21251
|
+
}
|
|
21188
21252
|
const panels = createSelection({
|
|
21189
21253
|
multiple: true,
|
|
21190
21254
|
enroll: true,
|
|
@@ -21209,6 +21273,21 @@ const _sfc_main$141 = /* @__PURE__ */ defineComponent({
|
|
|
21209
21273
|
if (dragging.value && ticket.size < ticket.minSize) return ticket.collapsedSize;
|
|
21210
21274
|
return ticket.minSize;
|
|
21211
21275
|
}
|
|
21276
|
+
function canExpand(ticket, neighbor) {
|
|
21277
|
+
const target = Math.min(ticket.defaultSize, ticket.maxSize);
|
|
21278
|
+
const take = Math.min(target - ticket.collapsedSize, neighbor.size - neighbor.minSize);
|
|
21279
|
+
return ticket.collapsedSize + take >= ticket.minSize;
|
|
21280
|
+
}
|
|
21281
|
+
function canCollapse(ticket) {
|
|
21282
|
+
const need = ticket.size - ticket.collapsedSize;
|
|
21283
|
+
let room = 0;
|
|
21284
|
+
for (const other of panels.values()) {
|
|
21285
|
+
if (other.id === ticket.id) continue;
|
|
21286
|
+
room += other.maxSize - other.size;
|
|
21287
|
+
if (room >= need) return true;
|
|
21288
|
+
}
|
|
21289
|
+
return false;
|
|
21290
|
+
}
|
|
21212
21291
|
function resize(index, delta, options) {
|
|
21213
21292
|
const before = panel(index);
|
|
21214
21293
|
const after = panel(index + 1);
|
|
@@ -21221,11 +21300,21 @@ const _sfc_main$141 = /* @__PURE__ */ defineComponent({
|
|
|
21221
21300
|
const upper = Math.min(before.maxSize, total - min2);
|
|
21222
21301
|
let size = /* @__PURE__ */ clamp(before.size + delta, lower, upper);
|
|
21223
21302
|
const beforeCollapsed = !toValue(before.isSelected);
|
|
21224
|
-
|
|
21303
|
+
const drag = dragging.value;
|
|
21304
|
+
if (before.collapsible && !beforeCollapsed && size <= before.minSize && delta < 0) if (drag) {
|
|
21305
|
+
if (before.size >= before.minSize) {
|
|
21306
|
+
size = before.minSize;
|
|
21307
|
+
if (canCollapse(before)) arm(before.id, "collapse", Math.max(0, before.minSize - (before.size + delta)));
|
|
21308
|
+
}
|
|
21309
|
+
} else {
|
|
21225
21310
|
size = before.collapsedSize;
|
|
21226
21311
|
before.unselect();
|
|
21227
21312
|
expandAccum.set(before.id, 0);
|
|
21228
|
-
}
|
|
21313
|
+
}
|
|
21314
|
+
else if (before.collapsible && beforeCollapsed && delta > 0) if (drag) {
|
|
21315
|
+
size = before.collapsedSize;
|
|
21316
|
+
if (canExpand(before, after)) arm(before.id, "expand", delta);
|
|
21317
|
+
} else {
|
|
21229
21318
|
const accum = (expandAccum.get(before.id) ?? 0) + delta;
|
|
21230
21319
|
expandAccum.set(before.id, accum);
|
|
21231
21320
|
if (accum >= EXPAND_THRESHOLD) {
|
|
@@ -21234,13 +21323,23 @@ const _sfc_main$141 = /* @__PURE__ */ defineComponent({
|
|
|
21234
21323
|
expandAccum.delete(before.id);
|
|
21235
21324
|
} else size = before.collapsedSize;
|
|
21236
21325
|
}
|
|
21326
|
+
else if (drag) disarm(before.id);
|
|
21237
21327
|
const afterSize = total - size;
|
|
21238
21328
|
const afterCollapsed = !toValue(after.isSelected);
|
|
21239
|
-
if (after.collapsible && !afterCollapsed && afterSize <= after.minSize && delta > 0) {
|
|
21329
|
+
if (after.collapsible && !afterCollapsed && afterSize <= after.minSize && delta > 0) if (drag) {
|
|
21330
|
+
if (after.size >= after.minSize) {
|
|
21331
|
+
size = total - after.minSize;
|
|
21332
|
+
if (canCollapse(after)) arm(after.id, "collapse", Math.max(0, after.minSize - (after.size - delta)));
|
|
21333
|
+
}
|
|
21334
|
+
} else {
|
|
21240
21335
|
size = total - after.collapsedSize;
|
|
21241
21336
|
after.unselect();
|
|
21242
21337
|
expandAccum.set(after.id, 0);
|
|
21243
|
-
}
|
|
21338
|
+
}
|
|
21339
|
+
else if (after.collapsible && afterCollapsed && delta < 0) if (drag) {
|
|
21340
|
+
size = total - after.collapsedSize;
|
|
21341
|
+
if (canExpand(after, before)) arm(after.id, "expand", delta);
|
|
21342
|
+
} else {
|
|
21244
21343
|
const accum = (expandAccum.get(after.id) ?? 0) + Math.abs(delta);
|
|
21245
21344
|
expandAccum.set(after.id, accum);
|
|
21246
21345
|
if (accum >= EXPAND_THRESHOLD) {
|
|
@@ -21249,6 +21348,7 @@ const _sfc_main$141 = /* @__PURE__ */ defineComponent({
|
|
|
21249
21348
|
expandAccum.delete(after.id);
|
|
21250
21349
|
} else size = total - after.collapsedSize;
|
|
21251
21350
|
}
|
|
21351
|
+
else if (drag) disarm(after.id);
|
|
21252
21352
|
before.size = size;
|
|
21253
21353
|
after.size = total - size;
|
|
21254
21354
|
if (options?.emit) emitLayout();
|
|
@@ -21256,10 +21356,10 @@ const _sfc_main$141 = /* @__PURE__ */ defineComponent({
|
|
|
21256
21356
|
function collapse(index, neighborIndex) {
|
|
21257
21357
|
const ticket = panel(index);
|
|
21258
21358
|
/* v8 ignore next -- defensive: collapse called only on collapsible+selected panels */
|
|
21259
|
-
if (!ticket?.collapsible || !toValue(ticket.isSelected)) return;
|
|
21359
|
+
if (!ticket?.collapsible || !toValue(ticket.isSelected)) return false;
|
|
21260
21360
|
const neighbor = panel(neighborIndex ?? (index > 0 ? index - 1 : index + 1));
|
|
21261
21361
|
/* v8 ignore next -- defensive: at least one neighbor exists when there are 2+ panels */
|
|
21262
|
-
if (!neighbor) return;
|
|
21362
|
+
if (!neighbor) return false;
|
|
21263
21363
|
const diff = ticket.size - ticket.collapsedSize;
|
|
21264
21364
|
const absorbed = Math.min(diff, neighbor.maxSize - neighbor.size);
|
|
21265
21365
|
neighbor.size += absorbed;
|
|
@@ -21275,23 +21375,23 @@ const _sfc_main$141 = /* @__PURE__ */ defineComponent({
|
|
|
21275
21375
|
if (remaining > 0) ticket.size += remaining;
|
|
21276
21376
|
if (ticket.size <= ticket.collapsedSize) ticket.unselect();
|
|
21277
21377
|
emitLayout();
|
|
21378
|
+
return true;
|
|
21278
21379
|
}
|
|
21279
21380
|
function expand(index, neighborIndex) {
|
|
21280
21381
|
const ticket = panel(index);
|
|
21281
21382
|
/* v8 ignore next -- defensive: expand called only on collapsible+collapsed panels */
|
|
21282
|
-
if (!ticket?.collapsible || toValue(ticket.isSelected)) return;
|
|
21383
|
+
if (!ticket?.collapsible || toValue(ticket.isSelected)) return false;
|
|
21283
21384
|
const neighbor = panel(neighborIndex ?? (index > 0 ? index - 1 : index + 1));
|
|
21284
21385
|
/* v8 ignore next -- defensive: at least one neighbor exists when there are 2+ panels */
|
|
21285
|
-
if (!neighbor) return;
|
|
21286
|
-
|
|
21287
|
-
const
|
|
21288
|
-
const take = Math.min(
|
|
21289
|
-
/* v8 ignore next -- defensive: only triggers when neighbor has insufficient space */
|
|
21290
|
-
if (ticket.collapsedSize + take < ticket.minSize) return;
|
|
21386
|
+
if (!neighbor) return false;
|
|
21387
|
+
if (!canExpand(ticket, neighbor)) return false;
|
|
21388
|
+
const target = Math.min(ticket.defaultSize, ticket.maxSize);
|
|
21389
|
+
const take = Math.min(target - ticket.collapsedSize, neighbor.size - neighbor.minSize);
|
|
21291
21390
|
neighbor.size -= take;
|
|
21292
21391
|
ticket.size = ticket.collapsedSize + take;
|
|
21293
21392
|
ticket.select();
|
|
21294
21393
|
emitLayout();
|
|
21394
|
+
return true;
|
|
21295
21395
|
}
|
|
21296
21396
|
function distribute(incoming) {
|
|
21297
21397
|
const values = panels.values();
|
|
@@ -21321,12 +21421,32 @@ const _sfc_main$141 = /* @__PURE__ */ defineComponent({
|
|
|
21321
21421
|
function onStartDrag(index) {
|
|
21322
21422
|
draggingHandle.value = index;
|
|
21323
21423
|
}
|
|
21324
|
-
function
|
|
21424
|
+
function endDrag(commit) {
|
|
21325
21425
|
if (/* @__PURE__ */ isNull(draggingHandle.value)) return;
|
|
21426
|
+
const handleIndex = draggingHandle.value;
|
|
21427
|
+
const intent = pending.value;
|
|
21326
21428
|
draggingHandle.value = null;
|
|
21429
|
+
pending.value = null;
|
|
21327
21430
|
expandAccum.clear();
|
|
21431
|
+
intentAccum.clear();
|
|
21432
|
+
if (commit && intent) {
|
|
21433
|
+
const ticket = panels.get(intent.id);
|
|
21434
|
+
if (ticket) {
|
|
21435
|
+
const neighborIndex = ticket.index === handleIndex ? handleIndex + 1 : handleIndex;
|
|
21436
|
+
if (intent.mode === "collapse" ? collapse(ticket.index, neighborIndex) : expand(ticket.index, neighborIndex)) return;
|
|
21437
|
+
}
|
|
21438
|
+
}
|
|
21328
21439
|
emitLayout();
|
|
21329
21440
|
}
|
|
21441
|
+
function onEndDrag() {
|
|
21442
|
+
endDrag(true);
|
|
21443
|
+
}
|
|
21444
|
+
function onAbortDrag() {
|
|
21445
|
+
endDrag(false);
|
|
21446
|
+
}
|
|
21447
|
+
onBeforeUnmount(() => {
|
|
21448
|
+
onAbortDrag();
|
|
21449
|
+
});
|
|
21330
21450
|
function emitLayout() {
|
|
21331
21451
|
emit("layout", panels.values().map((t) => t.size));
|
|
21332
21452
|
}
|
|
@@ -21337,11 +21457,13 @@ const _sfc_main$141 = /* @__PURE__ */ defineComponent({
|
|
|
21337
21457
|
handles,
|
|
21338
21458
|
dragging,
|
|
21339
21459
|
draggingHandle,
|
|
21460
|
+
pending,
|
|
21340
21461
|
rootEl,
|
|
21341
21462
|
panel,
|
|
21342
21463
|
resize,
|
|
21343
21464
|
onStartDrag,
|
|
21344
21465
|
onEndDrag,
|
|
21466
|
+
onAbortDrag,
|
|
21345
21467
|
collapse,
|
|
21346
21468
|
expand,
|
|
21347
21469
|
distribute
|
|
@@ -21504,7 +21626,8 @@ const _sfc_main$140 = /* @__PURE__ */ defineComponent({
|
|
|
21504
21626
|
flexGrow: 0,
|
|
21505
21627
|
flexShrink: 0,
|
|
21506
21628
|
flexBasis: `${size.value}%`,
|
|
21507
|
-
|
|
21629
|
+
minWidth: 0,
|
|
21630
|
+
minHeight: 0
|
|
21508
21631
|
}
|
|
21509
21632
|
]
|
|
21510
21633
|
}), {
|
|
@@ -21553,6 +21676,14 @@ const _sfc_main$139 = /* @__PURE__ */ defineComponent({
|
|
|
21553
21676
|
if (hovering.value) return "hover";
|
|
21554
21677
|
return "inactive";
|
|
21555
21678
|
});
|
|
21679
|
+
const pending = toRef(() => {
|
|
21680
|
+
const intent = splitter.pending.value;
|
|
21681
|
+
if (!intent) return null;
|
|
21682
|
+
if (splitter.draggingHandle.value !== ticket.index) return null;
|
|
21683
|
+
const before = splitter.panel(ticket.index);
|
|
21684
|
+
const after = splitter.panel(ticket.index + 1);
|
|
21685
|
+
return intent.id === before?.id || intent.id === after?.id ? intent.mode : null;
|
|
21686
|
+
});
|
|
21556
21687
|
/* v8 ignore next -- defensive: the handle's index always points to a registered panel */
|
|
21557
21688
|
const valuenow = toRef(() => Math.round(splitter.panel(ticket.index)?.size ?? 0));
|
|
21558
21689
|
const valuemin = toRef(() => {
|
|
@@ -21603,13 +21734,22 @@ const _sfc_main$139 = /* @__PURE__ */ defineComponent({
|
|
|
21603
21734
|
}
|
|
21604
21735
|
splitter.onEndDrag();
|
|
21605
21736
|
});
|
|
21737
|
+
useDocumentEventListener("pointercancel", () => {
|
|
21738
|
+
update.cancel();
|
|
21739
|
+
/* v8 ignore next 4 -- IN_BROWSER always true in happy-dom test env */
|
|
21740
|
+
if (IN_BROWSER) {
|
|
21741
|
+
document.documentElement.style.userSelect = "";
|
|
21742
|
+
document.documentElement.style.touchAction = "";
|
|
21743
|
+
}
|
|
21744
|
+
splitter.onAbortDrag();
|
|
21745
|
+
});
|
|
21606
21746
|
onScopeDispose(() => {
|
|
21607
|
-
splitter.onEndDrag();
|
|
21608
21747
|
/* v8 ignore next 4 -- IN_BROWSER always true in happy-dom test env */
|
|
21609
21748
|
if (IN_BROWSER) {
|
|
21610
21749
|
document.documentElement.style.userSelect = "";
|
|
21611
21750
|
document.documentElement.style.touchAction = "";
|
|
21612
21751
|
}
|
|
21752
|
+
splitter.onAbortDrag();
|
|
21613
21753
|
});
|
|
21614
21754
|
});
|
|
21615
21755
|
function onKeydown(e) {
|
|
@@ -21674,30 +21814,37 @@ const _sfc_main$139 = /* @__PURE__ */ defineComponent({
|
|
|
21674
21814
|
const p = splitter.panel(ticket.index);
|
|
21675
21815
|
return /* @__PURE__ */ isNullOrUndefined(p) ? void 0 : String(p.id);
|
|
21676
21816
|
});
|
|
21677
|
-
const slotProps = toRef(() =>
|
|
21678
|
-
|
|
21679
|
-
|
|
21680
|
-
|
|
21681
|
-
|
|
21682
|
-
|
|
21683
|
-
|
|
21684
|
-
|
|
21685
|
-
|
|
21686
|
-
|
|
21687
|
-
|
|
21688
|
-
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
|
|
21692
|
-
|
|
21693
|
-
|
|
21694
|
-
|
|
21695
|
-
|
|
21696
|
-
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21700
|
-
|
|
21817
|
+
const slotProps = toRef(() => {
|
|
21818
|
+
const pendingLabel = pending.value === "collapse" ? locale.ti("Splitter.releaseToHide") ?? "Release to hide" : pending.value === "expand" ? locale.ti("Splitter.releaseToOpen") ?? "Release to open" : void 0;
|
|
21819
|
+
return {
|
|
21820
|
+
isDragging: splitter.draggingHandle.value === ticket.index,
|
|
21821
|
+
isDisabled: isDisabled.value,
|
|
21822
|
+
state: state.value,
|
|
21823
|
+
pending: pending.value,
|
|
21824
|
+
pendingLabel,
|
|
21825
|
+
attrs: {
|
|
21826
|
+
"role": "separator",
|
|
21827
|
+
"tabindex": isDisabled.value ? -1 : 0,
|
|
21828
|
+
"aria-valuenow": valuenow.value,
|
|
21829
|
+
"aria-valuemin": valuemin.value,
|
|
21830
|
+
"aria-valuemax": valuemax.value,
|
|
21831
|
+
"aria-valuetext": pendingLabel,
|
|
21832
|
+
"aria-orientation": ariaOrientation.value,
|
|
21833
|
+
"aria-controls": ariaControls.value,
|
|
21834
|
+
"aria-label": __props.label || (locale.ti("Splitter.handle") ?? "Resize"),
|
|
21835
|
+
"aria-disabled": isDisabled.value,
|
|
21836
|
+
"data-state": state.value,
|
|
21837
|
+
"data-orientation": splitter.orientation.value,
|
|
21838
|
+
"data-disabled": isDisabled.value || void 0,
|
|
21839
|
+
"data-pending": pending.value ?? void 0,
|
|
21840
|
+
"style": { "touch-action": "none" },
|
|
21841
|
+
"onPointerdown": onPointerDown,
|
|
21842
|
+
"onPointerenter": onPointerEnter,
|
|
21843
|
+
"onPointerleave": onPointerLeave,
|
|
21844
|
+
"onKeydown": onKeydown
|
|
21845
|
+
}
|
|
21846
|
+
};
|
|
21847
|
+
});
|
|
21701
21848
|
return (_ctx, _cache) => {
|
|
21702
21849
|
return openBlock(), createBlock(unref(_sfc_main$9), mergeProps(mergeProps(unref(attrs), slotProps.value.attrs), {
|
|
21703
21850
|
as: __props.as,
|
|
@@ -22927,8 +23074,10 @@ const Tabs = {
|
|
|
22927
23074
|
//#endregion
|
|
22928
23075
|
//#region src/composables/useTheme/adapters/adapter.ts
|
|
22929
23076
|
var ThemeAdapter = class ThemeAdapter {
|
|
22930
|
-
|
|
23077
|
+
/** CSS ident for theme ids, color keys, and the adapter prefix. */
|
|
22931
23078
|
static SAFE_IDENT = /^[a-zA-Z0-9_-]+$/;
|
|
23079
|
+
/** Rejected inside theme color values before they are written to a stylesheet. */
|
|
23080
|
+
static UNSAFE_CSS = /url\s*\(|src\s*\(|image\s*\(|image-set\s*\(|cross-fade\s*\(|@import|expression\s*\(|[;{}<>\\]|\/\*/i;
|
|
22932
23081
|
stylesheetId = "v0-theme-stylesheet";
|
|
22933
23082
|
prefix;
|
|
22934
23083
|
rgb = false;
|
|
@@ -27346,6 +27495,19 @@ function createKanban(_options = {}) {
|
|
|
27346
27495
|
return _columns.size;
|
|
27347
27496
|
}
|
|
27348
27497
|
};
|
|
27498
|
+
function onColumnUnregister(column) {
|
|
27499
|
+
column.items.dispose();
|
|
27500
|
+
for (const t of lookup.values()) if (t.value === column.id) t.unregister();
|
|
27501
|
+
}
|
|
27502
|
+
function dispose() {
|
|
27503
|
+
for (const column of _columns.values()) column.items.dispose();
|
|
27504
|
+
lookup.dispose();
|
|
27505
|
+
bus.dispose();
|
|
27506
|
+
_columns.dispose();
|
|
27507
|
+
columns.on("unregister:ticket", onColumnUnregister);
|
|
27508
|
+
}
|
|
27509
|
+
columns.dispose = dispose;
|
|
27510
|
+
columns.on("unregister:ticket", onColumnUnregister);
|
|
27349
27511
|
function isAccepted(accept, ticket, from, toIndex) {
|
|
27350
27512
|
if (/* @__PURE__ */ isUndefined(accept)) return true;
|
|
27351
27513
|
try {
|
|
@@ -27360,10 +27522,6 @@ function createKanban(_options = {}) {
|
|
|
27360
27522
|
return false;
|
|
27361
27523
|
}
|
|
27362
27524
|
}
|
|
27363
|
-
columns.on("unregister:ticket", (column) => {
|
|
27364
|
-
column.items.dispose();
|
|
27365
|
-
for (const t of lookup.values()) if (t.value === column.id) t.unregister();
|
|
27366
|
-
});
|
|
27367
27525
|
function transfer(id, toColumnId, toIndex) {
|
|
27368
27526
|
const fromColumnId = lookup.get(id)?.value;
|
|
27369
27527
|
if (/* @__PURE__ */ isUndefined(fromColumnId)) {
|
|
@@ -27418,7 +27576,8 @@ function createKanban(_options = {}) {
|
|
|
27418
27576
|
columns,
|
|
27419
27577
|
transfer,
|
|
27420
27578
|
on,
|
|
27421
|
-
off
|
|
27579
|
+
off,
|
|
27580
|
+
dispose
|
|
27422
27581
|
};
|
|
27423
27582
|
}
|
|
27424
27583
|
//#endregion
|