@quidgest/ui 0.21.2 → 0.23.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/CHANGELOG.md +31 -0
- package/dist/json/api.json +398 -86
- package/dist/manifest/components.json +1 -0
- package/dist/ui.css +2130 -1166
- package/dist/ui.esm.js +809 -786
- package/dist/ui.js +735 -712
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +735 -712
- package/dist/ui.scss +1137 -844
- package/esm/components/QBadge/QBadge.d.ts +1 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +14 -7
- package/esm/components/QBadge/index.d.ts +3 -3
- package/esm/components/QBadge/types.d.ts +11 -4
- package/esm/components/QBadge/types.d.ts.map +1 -1
- package/esm/components/QButton/QButton.d.ts +0 -1
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +10 -4
- package/esm/components/QButton/index.d.ts +0 -3
- package/esm/components/QButton/index.d.ts.map +1 -1
- package/esm/components/QButton/types.d.ts +11 -4
- package/esm/components/QButton/types.d.ts.map +1 -1
- package/esm/components/QButtonGroup/QButtonGroup.d.ts.map +1 -1
- package/esm/components/QButtonGroup/QButtonGroup.vue.js +2 -0
- package/esm/components/QButtonGroup/types.d.ts +9 -1
- package/esm/components/QButtonGroup/types.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.d.ts +0 -1
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +2 -2
- package/esm/components/QCheckbox/index.d.ts +3 -6
- package/esm/components/QCheckbox/index.d.ts.map +1 -1
- package/esm/components/QCheckbox/types.d.ts +4 -3
- package/esm/components/QCheckbox/types.d.ts.map +1 -1
- package/esm/components/QCollapsible/types.d.ts +1 -1
- package/esm/components/QCollapsible/types.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +6 -8
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +1 -1
- package/esm/components/QCombobox/index.d.ts +3 -4
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts +18 -24
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/index.d.ts +9 -12
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +6 -1
- package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
- package/esm/components/QDialog/QDialogProvider.vue.js +1 -0
- package/esm/components/QDialog/index.d.ts +3 -0
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/types.d.ts +14 -0
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/types.d.ts +1 -1
- package/esm/components/QDropdownMenu/types.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.vue.js +9 -4
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +1 -0
- package/esm/components/QObfuscation/QObfuscation.d.ts.map +1 -1
- package/esm/components/QObfuscation/QObfuscation.vue.js +0 -1
- package/esm/components/QOverflow/QOverflow.d.ts +21 -1
- package/esm/components/QOverflow/QOverflow.d.ts.map +1 -1
- package/esm/components/QOverflow/QOverflow.vue.js +109 -96
- package/esm/components/QOverflow/index.d.ts +12 -3
- package/esm/components/QOverflow/index.d.ts.map +1 -1
- package/esm/components/QOverflow/types.d.ts +11 -2
- package/esm/components/QOverflow/types.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.d.ts +0 -1
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +90 -90
- package/esm/components/QOverlay/index.d.ts +0 -3
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QOverlay/types.d.ts +5 -3
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts +20 -16
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -1
- package/esm/components/QPhoneField/index.d.ts +10 -8
- package/esm/components/QPhoneField/index.d.ts.map +1 -1
- package/esm/components/QPopover/types.d.ts +1 -1
- package/esm/components/QPopover/types.d.ts.map +1 -1
- package/esm/components/QProgress/QProgress.d.ts +21 -0
- package/esm/components/QProgress/QProgress.d.ts.map +1 -0
- package/esm/components/QProgress/QProgress.vue.js +108 -0
- package/esm/components/QProgress/QProgress2.vue.js +5 -0
- package/esm/components/QProgress/index.d.ts +45 -0
- package/esm/components/QProgress/index.d.ts.map +1 -0
- package/esm/components/QProgress/index.js +6 -0
- package/esm/components/QProgress/types.d.ts +78 -0
- package/esm/components/QProgress/types.d.ts.map +1 -0
- package/esm/components/QRadioGroup/QRadioButton.d.ts +0 -1
- package/esm/components/QRadioGroup/QRadioButton.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.vue.js +2 -2
- package/esm/components/QRadioGroup/QRadioGroup.d.ts +1 -1
- package/esm/components/QRadioGroup/QRadioGroup.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioGroup.vue.js +55 -46
- package/esm/components/QRadioGroup/index.d.ts +9 -36
- package/esm/components/QRadioGroup/index.d.ts.map +1 -1
- package/esm/components/QRadioGroup/types.d.ts +15 -24
- package/esm/components/QRadioGroup/types.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/constants.d.ts +1 -1
- package/esm/components/QRemoveScrollBar/constants.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/constants.js +1 -1
- package/esm/components/QSelect/QSelect.d.ts +20 -16
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +9 -1
- package/esm/components/QSelect/index.d.ts +10 -8
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts +0 -1
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +2 -2
- package/esm/components/QSidebar/QSidebarAnchor.d.ts +2 -1
- package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarAnchor.vue.js +1 -1
- package/esm/components/QSidebar/QSidebarItem.d.ts +12 -6
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarItem.vue.js +1 -1
- package/esm/components/QSidebar/index.d.ts +6 -6
- package/esm/components/QSidebar/index.d.ts.map +1 -1
- package/esm/components/QSidebar/types.d.ts +3 -1
- package/esm/components/QSidebar/types.d.ts.map +1 -1
- package/esm/components/QSwitch/QSwitch.d.ts +3 -2
- package/esm/components/QSwitch/QSwitch.d.ts.map +1 -1
- package/esm/components/QSwitch/QSwitch.vue.js +34 -26
- package/esm/components/QSwitch/index.d.ts +5 -4
- package/esm/components/QSwitch/index.d.ts.map +1 -1
- package/esm/components/QSwitch/types.d.ts +4 -2
- package/esm/components/QSwitch/types.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.d.ts +6 -8
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.d.ts +177 -2
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +127 -106
- package/esm/components/QTabs/context.d.ts +2 -1
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTabs/index.d.ts +91 -5
- package/esm/components/QTabs/index.d.ts.map +1 -1
- package/esm/components/QToggle/QToggle.vue.js +2 -1
- package/esm/components/QToggle/index.d.ts +6 -3
- package/esm/components/QToggle/index.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroup.vue.js +1 -0
- package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +1 -0
- package/esm/components/QToggleGroup/index.d.ts +3 -0
- package/esm/components/QToggleGroup/index.d.ts.map +1 -1
- package/esm/components/QTooltip/types.d.ts +1 -1
- package/esm/components/QTooltip/types.d.ts.map +1 -1
- package/esm/components/__internal__/QClearButton/QClearButton.vue.js +1 -1
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +34 -32
- package/esm/composables/useSafeTriangle/index.d.ts +1 -1
- package/esm/composables/useSafeTriangle/index.d.ts.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/templates/theme.js +11 -11
- package/esm/types/component.d.ts +7 -0
- package/esm/types/component.d.ts.map +1 -1
- package/esm/utils/color/theme-colors.d.ts +5 -5
- package/esm/utils/density.d.ts +12 -0
- package/esm/utils/density.d.ts.map +1 -0
- package/esm/utils/density.js +23 -0
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.d.ts.map +1 -1
- package/esm/utils/index.js +6 -2
- package/esm/{composables → utils}/overlay.d.ts +12 -0
- package/esm/utils/overlay.d.ts.map +1 -0
- package/esm/{composables → utils}/overlay.js +10 -2
- package/esm/utils/safeTriangle.d.ts +1 -1
- package/esm/utils/safeTriangle.d.ts.map +1 -1
- package/package.json +1 -1
- package/esm/composables/overlay.d.ts.map +0 -1
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { DEFAULT_ICONS } from './constants';
|
|
2
2
|
import { QOverflowProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Scrolls this overflow viewport just enough to bring `element` into view
|
|
5
|
+
* (`nearest` along the active axis). Does not call `Element.scrollIntoView`,
|
|
6
|
+
* so outer page / dialog / panel scrollers are left alone.
|
|
7
|
+
*
|
|
8
|
+
* @param element - A descendant of the content track (typically a direct child).
|
|
9
|
+
*/
|
|
10
|
+
declare function scrollElementIntoView(element: HTMLElement): void;
|
|
3
11
|
declare function __VLS_template(): {
|
|
4
12
|
attrs: Partial<{}>;
|
|
5
13
|
slots: {
|
|
@@ -20,7 +28,19 @@ declare function __VLS_template(): {
|
|
|
20
28
|
rootEl: HTMLDivElement;
|
|
21
29
|
};
|
|
22
30
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
-
declare const __VLS_component: import('vue').DefineComponent<QOverflowProps, {
|
|
31
|
+
declare const __VLS_component: import('vue').DefineComponent<QOverflowProps, {
|
|
32
|
+
/**
|
|
33
|
+
* The `.q-overflow__content` track element.
|
|
34
|
+
*
|
|
35
|
+
* Hosts (e.g. `QTabs`) use this as a teleport / `role="tablist"` target so
|
|
36
|
+
* item-mode children are direct descendants of the content track.
|
|
37
|
+
*/
|
|
38
|
+
contentEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
39
|
+
/**
|
|
40
|
+
* Scrolls only this overflow viewport to reveal an element (no ancestor scroll).
|
|
41
|
+
*/
|
|
42
|
+
scrollElementIntoView: typeof scrollElementIntoView;
|
|
43
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<QOverflowProps> & Readonly<{}>, {
|
|
24
44
|
icons: typeof DEFAULT_ICONS;
|
|
25
45
|
texts: import('./constants').QOverflowTexts;
|
|
26
46
|
direction: import('./types').QOverflowDirection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QOverflow.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QOverflow/QOverflow.vue"],"names":[],"mappings":"AA6DA;
|
|
1
|
+
{"version":3,"file":"QOverflow.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QOverflow/QOverflow.vue"],"names":[],"mappings":"AA6DA;AAqnBC,OAAO,EAAE,aAAa,EAAiB,MAAM,aAAa,CAAA;AAU1D,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,SAAS,CAAA;AAqUpE;;;;;;GAMG;AACH,iBAAS,qBAAqB,CAAC,OAAO,EAAE,WAAW,QAuBlD;AA+NF,iBAAS,cAAc;WAyIT,OAAO,IAA6B;;;;;YAdxB,GAAG;yBACC,GAAG;;;;YACN,GAAG;;;;;;;EAiB7B;AAyBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;IA9MnB;;;;;OAKG;;IAEH;;OAEG;;;;;;;;;;;;;;kBA+MH,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,19 +2,19 @@ import { QButton as e } from "../QButton/index.js";
|
|
|
2
2
|
import { QIcon as t } from "../QIcon/index.js";
|
|
3
3
|
import { useId as n } from "../../composables/useId/index.js";
|
|
4
4
|
import { DEFAULT_ICONS as r, DEFAULT_TEXTS as i } from "./constants.js";
|
|
5
|
-
import { computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, guardReactiveProps as d, mergeProps as f, nextTick as
|
|
5
|
+
import { computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, guardReactiveProps as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeProps as h, onBeforeUnmount as ee, onMounted as g, openBlock as _, ref as v, renderSlot as y, toRef as te, unref as b, watch as x, withCtx as S } from "vue";
|
|
6
6
|
//#region src/components/QOverflow/QOverflow.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var C = [
|
|
8
8
|
"id",
|
|
9
9
|
"role",
|
|
10
10
|
"aria-label"
|
|
11
|
-
],
|
|
11
|
+
], w = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "q-overflow__control q-overflow__control--prev"
|
|
14
|
-
},
|
|
14
|
+
}, ne = ["tabindex"], re = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "q-overflow__control q-overflow__control--next"
|
|
17
|
-
},
|
|
17
|
+
}, T = 1, E = /*@__PURE__*/ u({
|
|
18
18
|
__name: "QOverflow",
|
|
19
19
|
props: {
|
|
20
20
|
id: {},
|
|
@@ -28,29 +28,30 @@ var w = [
|
|
|
28
28
|
type: Boolean,
|
|
29
29
|
default: !1
|
|
30
30
|
},
|
|
31
|
+
contentClass: {},
|
|
31
32
|
icons: { default: () => r },
|
|
32
33
|
texts: { default: () => i }
|
|
33
34
|
},
|
|
34
|
-
setup(r) {
|
|
35
|
-
let
|
|
35
|
+
setup(r, { expose: i }) {
|
|
36
|
+
let u = r, E = n(te(u, "id")), D = v(null), O = v(null), k = v(!1), A = v(!1), j = null, M = null, N = !1, P = a(() => u.direction === "horizontal"), F = a(() => k.value || A.value), ie = a(() => P.value ? u.icons.back : u.icons.up), ae = a(() => P.value ? u.icons.forward : u.icons.down), I = a(() => u.texts.regionLabel || void 0), oe = a(() => I.value ? "region" : void 0), se = a(() => [
|
|
36
37
|
"q-overflow",
|
|
37
|
-
`q-overflow--${
|
|
38
|
-
`q-overflow--arrows-${
|
|
39
|
-
`q-overflow--arrows-${
|
|
38
|
+
`q-overflow--${u.direction}`,
|
|
39
|
+
`q-overflow--arrows-${u.arrowPlacement}`,
|
|
40
|
+
`q-overflow--arrows-${u.arrowVisibility}`,
|
|
40
41
|
{
|
|
41
42
|
"q-overflow--overflowing": F.value,
|
|
42
43
|
"q-overflow--can-scroll-start": k.value,
|
|
43
44
|
"q-overflow--can-scroll-end": A.value
|
|
44
45
|
},
|
|
45
|
-
|
|
46
|
-
]),
|
|
46
|
+
u.class
|
|
47
|
+
]), ce = a(() => ["q-overflow__content", u.contentClass]), L = a(() => ({
|
|
47
48
|
disabled: !k.value,
|
|
48
|
-
onClick:
|
|
49
|
-
})),
|
|
49
|
+
onClick: J
|
|
50
|
+
})), R = a(() => ({
|
|
50
51
|
disabled: !A.value,
|
|
51
|
-
onClick:
|
|
52
|
+
onClick: Y
|
|
52
53
|
}));
|
|
53
|
-
function
|
|
54
|
+
function z(e) {
|
|
54
55
|
return P.value ? {
|
|
55
56
|
position: e.scrollLeft,
|
|
56
57
|
size: e.clientWidth,
|
|
@@ -61,19 +62,19 @@ var w = [
|
|
|
61
62
|
scrollSize: e.scrollHeight
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function B() {
|
|
65
66
|
let e = D.value;
|
|
66
67
|
if (!e) return;
|
|
67
|
-
let { position: t, size: n, scrollSize: r } =
|
|
68
|
-
k.value = t >
|
|
68
|
+
let { position: t, size: n, scrollSize: r } = z(e), i = Math.max(0, r - n);
|
|
69
|
+
k.value = t > T, A.value = t < i - T;
|
|
69
70
|
}
|
|
70
|
-
function
|
|
71
|
+
function V() {
|
|
71
72
|
return typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth";
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
+
function H(e) {
|
|
74
75
|
let t = D.value;
|
|
75
76
|
if (!t) return;
|
|
76
|
-
let n =
|
|
77
|
+
let n = V();
|
|
77
78
|
P.value ? t.scrollTo({
|
|
78
79
|
left: e,
|
|
79
80
|
behavior: n
|
|
@@ -82,97 +83,106 @@ var w = [
|
|
|
82
83
|
behavior: n
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function U(e) {
|
|
86
87
|
return P.value ? e.clientWidth : e.clientHeight;
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
return Math.max(0,
|
|
89
|
+
function W() {
|
|
90
|
+
return Math.max(0, u.scrollStep);
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function G() {
|
|
92
93
|
let e = O.value;
|
|
93
|
-
return e ? Array.from(e.children).filter((e) => e instanceof HTMLElement) : [];
|
|
94
|
+
return e ? Array.from(e.children).filter((e) => e instanceof HTMLElement && e.getAttribute("aria-hidden") !== "true") : [];
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
+
function K(e, t, n, r) {
|
|
96
97
|
let i = Math.max(0, r - n), a = e + t / 2 - n / 2;
|
|
97
98
|
return Math.min(i, Math.max(0, a));
|
|
98
99
|
}
|
|
99
|
-
function
|
|
100
|
+
function le(e) {
|
|
100
101
|
let t = D.value;
|
|
101
102
|
if (!t) return null;
|
|
102
|
-
let n =
|
|
103
|
+
let n = G();
|
|
103
104
|
if (!n.length) return null;
|
|
104
|
-
let { position: r, size: i, scrollSize: a } =
|
|
105
|
+
let { position: r, size: i, scrollSize: a } = z(t), o = r, s = r + i, c = Math.max(0, a - i);
|
|
105
106
|
if (e > 0) {
|
|
106
107
|
for (let e of n) {
|
|
107
108
|
let t = P.value ? e.offsetLeft : e.offsetTop, n = P.value ? e.offsetWidth : e.offsetHeight;
|
|
108
|
-
if (t + n > s +
|
|
109
|
-
let e =
|
|
110
|
-
if (Math.abs(e - r) >
|
|
109
|
+
if (t + n > s + T) {
|
|
110
|
+
let e = K(t, n, i, a);
|
|
111
|
+
if (Math.abs(e - r) > T) return e;
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
return c - r >
|
|
114
|
+
return c - r > T ? c : null;
|
|
114
115
|
}
|
|
115
116
|
for (let e = n.length - 1; e >= 0; e--) {
|
|
116
117
|
let t = n[e], s = P.value ? t.offsetLeft : t.offsetTop, c = P.value ? t.offsetWidth : t.offsetHeight;
|
|
117
|
-
if (s < o -
|
|
118
|
-
let e =
|
|
119
|
-
if (Math.abs(e - r) >
|
|
118
|
+
if (s < o - T) {
|
|
119
|
+
let e = K(s, c, i, a);
|
|
120
|
+
if (Math.abs(e - r) > T) return e;
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
|
-
return r >
|
|
123
|
+
return r > T ? 0 : null;
|
|
123
124
|
}
|
|
124
|
-
function
|
|
125
|
+
function q(e) {
|
|
125
126
|
let t = D.value;
|
|
126
127
|
if (!t) return;
|
|
127
|
-
let { position: n } =
|
|
128
|
-
if (
|
|
129
|
-
let t =
|
|
128
|
+
let { position: n } = z(t);
|
|
129
|
+
if (u.scrollMode === "item") {
|
|
130
|
+
let t = le(e);
|
|
130
131
|
if (t === null) return;
|
|
131
|
-
|
|
132
|
+
H(t);
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
+
H(n + e * (u.scrollMode === "page" ? U(t) : W()));
|
|
135
136
|
}
|
|
136
|
-
function
|
|
137
|
-
|
|
137
|
+
function J() {
|
|
138
|
+
q(-1);
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
-
|
|
140
|
+
function Y() {
|
|
141
|
+
q(1);
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
-
|
|
143
|
+
function ue() {
|
|
144
|
+
H(0);
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
+
function X() {
|
|
146
147
|
let e = D.value;
|
|
147
148
|
if (!e) return;
|
|
148
|
-
let { size: t, scrollSize: n } =
|
|
149
|
-
|
|
149
|
+
let { size: t, scrollSize: n } = z(e);
|
|
150
|
+
H(Math.max(0, n - t));
|
|
150
151
|
}
|
|
151
|
-
function
|
|
152
|
+
function de(e) {
|
|
153
|
+
let t = D.value, n = O.value;
|
|
154
|
+
if (!t || !n || !n.contains(e)) return;
|
|
155
|
+
let { position: r, size: i, scrollSize: a } = z(t), o = P.value ? e.offsetLeft : e.offsetTop, s = o + (P.value ? e.offsetWidth : e.offsetHeight), c = r, l = r + i, u = Math.max(0, a - i), d = r;
|
|
156
|
+
if (o < c - T) d = o;
|
|
157
|
+
else if (s > l + T) d = s - i;
|
|
158
|
+
else return;
|
|
159
|
+
H(Math.min(u, Math.max(0, d)));
|
|
160
|
+
}
|
|
161
|
+
function fe(e) {
|
|
152
162
|
if (e.target !== e.currentTarget || !F.value) return;
|
|
153
163
|
let t = P.value;
|
|
154
164
|
switch (e.key) {
|
|
155
165
|
case "ArrowLeft":
|
|
156
166
|
if (!t) return;
|
|
157
|
-
e.preventDefault(),
|
|
167
|
+
e.preventDefault(), J();
|
|
158
168
|
break;
|
|
159
169
|
case "ArrowRight":
|
|
160
170
|
if (!t) return;
|
|
161
|
-
e.preventDefault(),
|
|
171
|
+
e.preventDefault(), Y();
|
|
162
172
|
break;
|
|
163
173
|
case "ArrowUp":
|
|
164
174
|
if (t) return;
|
|
165
|
-
e.preventDefault(),
|
|
175
|
+
e.preventDefault(), J();
|
|
166
176
|
break;
|
|
167
177
|
case "ArrowDown":
|
|
168
178
|
if (t) return;
|
|
169
|
-
e.preventDefault(),
|
|
179
|
+
e.preventDefault(), Y();
|
|
170
180
|
break;
|
|
171
181
|
case "Home":
|
|
172
|
-
e.preventDefault(),
|
|
182
|
+
e.preventDefault(), ue();
|
|
173
183
|
break;
|
|
174
184
|
case "End":
|
|
175
|
-
e.preventDefault(),
|
|
185
|
+
e.preventDefault(), X();
|
|
176
186
|
break;
|
|
177
187
|
}
|
|
178
188
|
}
|
|
@@ -180,15 +190,15 @@ var w = [
|
|
|
180
190
|
if (!P.value) return;
|
|
181
191
|
let t = D.value;
|
|
182
192
|
if (!t || Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
183
|
-
let { position: n, size: r, scrollSize: i } =
|
|
193
|
+
let { position: n, size: r, scrollSize: i } = z(t), a = Math.max(0, i - r);
|
|
184
194
|
if (a <= 0) return;
|
|
185
195
|
let o = Math.min(a, Math.max(0, n + e.deltaY));
|
|
186
|
-
o !== n && (e.preventDefault(), t.scrollLeft = o,
|
|
196
|
+
o !== n && (e.preventDefault(), t.scrollLeft = o, B());
|
|
187
197
|
}
|
|
188
198
|
function Q() {
|
|
189
199
|
let e = D.value;
|
|
190
200
|
if (!e) return;
|
|
191
|
-
let t =
|
|
201
|
+
let t = u.remapWheel && P.value;
|
|
192
202
|
if (t && !N) {
|
|
193
203
|
e.addEventListener("wheel", Z, { passive: !1 }), N = !0;
|
|
194
204
|
return;
|
|
@@ -200,46 +210,49 @@ var w = [
|
|
|
200
210
|
let e = D.value, t = O.value;
|
|
201
211
|
if (!(!e || !t)) {
|
|
202
212
|
j ||= new ResizeObserver(() => {
|
|
203
|
-
|
|
213
|
+
B();
|
|
204
214
|
}), j.observe(e), j.observe(t);
|
|
205
|
-
for (let e of
|
|
215
|
+
for (let e of G()) j.observe(e);
|
|
206
216
|
}
|
|
207
217
|
}
|
|
208
|
-
function
|
|
218
|
+
function pe() {
|
|
209
219
|
M?.disconnect();
|
|
210
220
|
let e = O.value;
|
|
211
221
|
e && (M ||= new MutationObserver(() => {
|
|
212
|
-
$(),
|
|
222
|
+
$(), B();
|
|
213
223
|
}), M.observe(e, { childList: !0 }));
|
|
214
224
|
}
|
|
215
225
|
return g(() => {
|
|
216
|
-
Q(), $(),
|
|
217
|
-
}),
|
|
226
|
+
Q(), $(), pe(), B();
|
|
227
|
+
}), ee(() => {
|
|
218
228
|
let e = D.value;
|
|
219
229
|
N && e && (e.removeEventListener("wheel", Z), N = !1), j?.disconnect(), j = null, M?.disconnect(), M = null;
|
|
220
|
-
}),
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
230
|
+
}), x(() => [
|
|
231
|
+
u.direction,
|
|
232
|
+
u.scrollMode,
|
|
233
|
+
u.scrollStep
|
|
224
234
|
], async () => {
|
|
225
|
-
await
|
|
226
|
-
}),
|
|
235
|
+
await p(), $(), B();
|
|
236
|
+
}), x(() => [u.remapWheel, u.direction], () => {
|
|
227
237
|
Q();
|
|
238
|
+
}), i({
|
|
239
|
+
contentEl: O,
|
|
240
|
+
scrollElementIntoView: de
|
|
228
241
|
}), (n, r) => (_(), s("div", {
|
|
229
|
-
id:
|
|
230
|
-
class:
|
|
231
|
-
role:
|
|
232
|
-
"aria-label":
|
|
242
|
+
id: b(E),
|
|
243
|
+
class: m(se.value),
|
|
244
|
+
role: oe.value,
|
|
245
|
+
"aria-label": I.value
|
|
233
246
|
}, [
|
|
234
|
-
F.value ? (_(), s("div",
|
|
247
|
+
F.value ? (_(), s("div", w, [y(n.$slots, "prev", h(d(L.value)), () => [l(b(e), {
|
|
235
248
|
class: "q-overflow__button",
|
|
236
249
|
variant: "ghost",
|
|
237
250
|
"data-testid": "q-overflow-prev",
|
|
238
|
-
disabled:
|
|
239
|
-
"aria-label":
|
|
240
|
-
onClick:
|
|
251
|
+
disabled: L.value.disabled,
|
|
252
|
+
"aria-label": u.texts.previousText,
|
|
253
|
+
onClick: L.value.onClick
|
|
241
254
|
}, {
|
|
242
|
-
default:
|
|
255
|
+
default: S(() => [l(b(t), f({ class: "q-overflow__icon" }, ie.value), null, 16)]),
|
|
243
256
|
_: 1
|
|
244
257
|
}, 8, [
|
|
245
258
|
"disabled",
|
|
@@ -252,30 +265,30 @@ var w = [
|
|
|
252
265
|
class: "q-overflow__viewport",
|
|
253
266
|
"data-testid": "q-overflow-viewport",
|
|
254
267
|
tabindex: F.value ? 0 : void 0,
|
|
255
|
-
onScroll:
|
|
256
|
-
onKeydown:
|
|
268
|
+
onScroll: B,
|
|
269
|
+
onKeydown: fe
|
|
257
270
|
}, [c("div", {
|
|
258
271
|
ref_key: "contentRef",
|
|
259
272
|
ref: O,
|
|
260
|
-
class:
|
|
261
|
-
}, [y(n.$slots, "default")],
|
|
262
|
-
F.value ? (_(), s("div",
|
|
273
|
+
class: m(ce.value)
|
|
274
|
+
}, [y(n.$slots, "default")], 2)], 40, ne),
|
|
275
|
+
F.value ? (_(), s("div", re, [y(n.$slots, "next", h(d(R.value)), () => [l(b(e), {
|
|
263
276
|
class: "q-overflow__button",
|
|
264
277
|
variant: "ghost",
|
|
265
278
|
"data-testid": "q-overflow-next",
|
|
266
|
-
disabled:
|
|
267
|
-
"aria-label":
|
|
268
|
-
onClick:
|
|
279
|
+
disabled: R.value.disabled,
|
|
280
|
+
"aria-label": u.texts.nextText,
|
|
281
|
+
onClick: R.value.onClick
|
|
269
282
|
}, {
|
|
270
|
-
default:
|
|
283
|
+
default: S(() => [l(b(t), f({ class: "q-overflow__icon" }, ae.value), null, 16)]),
|
|
271
284
|
_: 1
|
|
272
285
|
}, 8, [
|
|
273
286
|
"disabled",
|
|
274
287
|
"aria-label",
|
|
275
288
|
"onClick"
|
|
276
289
|
])])])) : o("v-if", !0)
|
|
277
|
-
], 10,
|
|
290
|
+
], 10, C));
|
|
278
291
|
}
|
|
279
292
|
});
|
|
280
293
|
//#endregion
|
|
281
|
-
export {
|
|
294
|
+
export { E as default };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
declare const QOverflow: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').QOverflowProps> & Readonly<{}>, {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').QOverflowProps> & Readonly<{}>, {
|
|
3
|
+
contentEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
4
|
+
scrollElementIntoView: (element: HTMLElement) => void;
|
|
5
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
3
6
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
4
7
|
texts: import('./constants').QOverflowTexts;
|
|
5
8
|
direction: import('./types').QOverflowDirection;
|
|
@@ -18,7 +21,10 @@ declare const QOverflow: {
|
|
|
18
21
|
C: {};
|
|
19
22
|
M: {};
|
|
20
23
|
Defaults: {};
|
|
21
|
-
}, Readonly<import('./types').QOverflowProps> & Readonly<{}>, {
|
|
24
|
+
}, Readonly<import('./types').QOverflowProps> & Readonly<{}>, {
|
|
25
|
+
contentEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
26
|
+
scrollElementIntoView: (element: HTMLElement) => void;
|
|
27
|
+
}, {}, {}, {}, {
|
|
22
28
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
23
29
|
texts: import('./constants').QOverflowTexts;
|
|
24
30
|
direction: import('./types').QOverflowDirection;
|
|
@@ -31,7 +37,10 @@ declare const QOverflow: {
|
|
|
31
37
|
__isFragment?: never;
|
|
32
38
|
__isTeleport?: never;
|
|
33
39
|
__isSuspense?: never;
|
|
34
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./types').QOverflowProps> & Readonly<{}>, {
|
|
40
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types').QOverflowProps> & Readonly<{}>, {
|
|
41
|
+
contentEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
42
|
+
scrollElementIntoView: (element: HTMLElement) => void;
|
|
43
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
35
44
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
36
45
|
texts: import('./constants').QOverflowTexts;
|
|
37
46
|
direction: import('./types').QOverflowDirection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QOverflow/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QOverflow/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA8B,CAAA;AAG7C,OAAO,EAAE,SAAS,EAAE,CAAA;AAGpB,cAAc,SAAS,CAAA"}
|
|
@@ -22,6 +22,7 @@ export type QOverflowArrowVisibility = 'always' | 'hover';
|
|
|
22
22
|
* content track (`.q-overflow__content`). The track is a plain block — lay out
|
|
23
23
|
* strip children yourself (e.g. a flex row wrapper, or inline-level items).
|
|
24
24
|
* Nested wrappers, transforms, or non-element nodes are not item targets.
|
|
25
|
+
* Children with `aria-hidden="true"` are skipped (e.g. decorative overlays).
|
|
25
26
|
*/
|
|
26
27
|
export type QOverflowScrollMode = 'page' | 'step' | 'item';
|
|
27
28
|
/**
|
|
@@ -76,7 +77,7 @@ export type QOverflowProps = QBaseComponentProps & {
|
|
|
76
77
|
* How far each navigation action advances the scroll position.
|
|
77
78
|
*
|
|
78
79
|
* For `item`, targets are direct `HTMLElement` children of the content track only
|
|
79
|
-
* (see {@link QOverflowScrollMode}).
|
|
80
|
+
* (see {@link QOverflowScrollMode}). Children with `aria-hidden="true"` are skipped.
|
|
80
81
|
*
|
|
81
82
|
* @category Behavior
|
|
82
83
|
*/
|
|
@@ -90,12 +91,20 @@ export type QOverflowProps = QBaseComponentProps & {
|
|
|
90
91
|
/**
|
|
91
92
|
* When `true` and `direction` is `horizontal`, dominant vertical wheel / trackpad
|
|
92
93
|
* deltas are mapped onto `scrollLeft` (and may `preventDefault` page scroll while
|
|
93
|
-
* the strip can still move). Default `false` so long-page hosts (e.g.
|
|
94
|
+
* the strip can still move). Default `false` so long-page hosts (e.g. tabs)
|
|
94
95
|
* are not surprised; enable for standalone strips that want trackpad UX.
|
|
95
96
|
*
|
|
96
97
|
* @category Behavior
|
|
97
98
|
*/
|
|
98
99
|
remapWheel?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Extra class(es) applied to the content track (`.q-overflow__content`).
|
|
102
|
+
*
|
|
103
|
+
* Use when a host needs to style or identify the track (e.g. `q-tabs__tablist`).
|
|
104
|
+
*
|
|
105
|
+
* @category Presentation
|
|
106
|
+
*/
|
|
107
|
+
contentClass?: string | unknown[];
|
|
99
108
|
/**
|
|
100
109
|
* Custom icon configurations for navigation controls.
|
|
101
110
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QOverflow/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEhE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAA;AAE1D;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE1D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEzD
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QOverflow/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEhE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAA;AAE1D;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE1D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAE1D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACnC;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAA;IAEjB;;;;OAIG;IACH,OAAO,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IAClD;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAE9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAA;IAExC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,wBAAwB,CAAA;IAE1C;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAEhC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;IAEjC;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,cAAc,CAAA;CACtB,CAAA"}
|
|
@@ -27,7 +27,6 @@ declare const __VLS_component: import('vue').DefineComponent<QOverlayProps, {},
|
|
|
27
27
|
focusWithinOnActivate: boolean;
|
|
28
28
|
returnFocusOnDeactivate: boolean;
|
|
29
29
|
appearance: import('./types').QOverlayAppearance;
|
|
30
|
-
offset: number;
|
|
31
30
|
crossOffset: number;
|
|
32
31
|
attach: string;
|
|
33
32
|
delay: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QOverlay.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QOverlay/QOverlay.vue"],"names":[],"mappings":"AAgEA;
|
|
1
|
+
{"version":3,"file":"QOverlay.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QOverlay/QOverlay.vue"],"names":[],"mappings":"AAgEA;AAmiBC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,GAAG,CAAA;AA2dvC,iBAAS,cAAc;WAgLT,OAAO,IAA6B;;yBAdpB,GAAG;;;;;;;;EAmBhC;AA0BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;OASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|