@quidgest/ui 0.28.0 → 0.29.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 +51 -8
- package/README.md +19 -0
- package/dist/json/api.json +1517 -86
- package/dist/manifest/components.json +0 -1
- package/dist/ui.css +59 -68
- package/dist/ui.esm.js +1031 -1043
- package/dist/ui.js +1000 -1013
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1000 -1013
- package/dist/ui.scss +83 -27
- package/esm/components/QAccordion/QAccordion.d.ts +3 -3
- package/esm/components/QAccordion/QAccordion.d.ts.map +1 -1
- package/esm/components/QAccordion/QAccordion.vue.js +33 -30
- package/esm/components/QAccordion/QAccordionItem.d.ts +4 -1
- package/esm/components/QAccordion/QAccordionItem.d.ts.map +1 -1
- package/esm/components/QAccordion/QAccordionItem.vue.js +37 -6
- package/esm/components/QAccordion/index.d.ts +20 -11
- package/esm/components/QAccordion/index.d.ts.map +1 -1
- package/esm/components/QAvatar/QAvatar.d.ts.map +1 -1
- package/esm/components/QAvatar/QAvatar.vue.js +19 -12
- package/esm/components/QAvatar/types.d.ts +2 -1
- package/esm/components/QAvatar/types.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +36 -37
- package/esm/components/QButtonGroup/QButtonGroup.vue.js +18 -18
- package/esm/components/QCarousel/QCarousel.d.ts +1 -1
- package/esm/components/QCarousel/QCarousel.d.ts.map +1 -1
- package/esm/components/QCarousel/QCarousel.vue.js +99 -95
- package/esm/components/QCarousel/constants.d.ts +1 -0
- package/esm/components/QCarousel/constants.d.ts.map +1 -1
- package/esm/components/QCarousel/constants.js +2 -1
- package/esm/components/QCarousel/index.d.ts +3 -3
- package/esm/components/QCheckbox/QCheckbox.d.ts +0 -2
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +33 -36
- package/esm/components/QCheckbox/index.d.ts +0 -1
- package/esm/components/QCheckbox/index.d.ts.map +1 -1
- package/esm/components/QColorPicker/QColorPicker.d.ts.map +1 -1
- package/esm/components/QColorPicker/QColorPicker.vue.js +1 -2
- package/esm/components/QCombobox/QCombobox.d.ts +9 -0
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +142 -134
- package/esm/components/QCombobox/index.d.ts +10 -0
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QCombobox/types.d.ts +8 -0
- package/esm/components/QCombobox/types.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +199 -219
- package/esm/components/QDialog/QDialog.d.ts +1 -1
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +4 -4
- package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
- package/esm/components/QDialog/index.d.ts +6 -6
- package/esm/components/QDialog/types.d.ts +3 -3
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +8 -0
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +136 -124
- package/esm/components/QFileUpload/QFileUpload.d.ts.map +1 -1
- package/esm/components/QFileUpload/QFileUpload.vue.js +82 -79
- package/esm/components/QFocusWrap/QFocusWrap.d.ts.map +1 -1
- package/esm/components/QIcon/QIconFont.d.ts.map +1 -1
- package/esm/components/QIcon/QSvgSymbol.d.ts.map +1 -1
- package/esm/components/QIcon/QSvgSymbol.vue.js +31 -31
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.vue.js +67 -41
- package/esm/components/QInputGroup/types.d.ts +15 -1
- package/esm/components/QInputGroup/types.d.ts.map +1 -1
- package/esm/components/QList/QList.d.ts +6 -0
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +4 -1
- package/esm/components/QList/QListItem.d.ts +6 -2
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +54 -41
- package/esm/components/QList/index.d.ts +6 -1
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/types.d.ts +16 -0
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QOverflow/QOverflow.d.ts +6 -1
- package/esm/components/QOverflow/QOverflow.d.ts.map +1 -1
- package/esm/components/QOverflow/QOverflow.vue.js +90 -95
- package/esm/components/QOverflow/index.d.ts +3 -3
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +125 -117
- package/esm/components/QOverlay/types.d.ts +9 -2
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.d.ts +1 -0
- package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.vue.js +5 -0
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +1 -0
- package/esm/components/QPasswordField/index.d.ts +6 -0
- package/esm/components/QPasswordField/index.d.ts.map +1 -1
- package/esm/components/QPasswordField/types.d.ts +10 -0
- package/esm/components/QPasswordField/types.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts +184 -18
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -1
- package/esm/components/QPhoneField/index.d.ts +92 -9
- package/esm/components/QPhoneField/index.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyList.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyList.vue.js +62 -60
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +2 -2
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.vue.js +2 -2
- package/esm/components/QRadioGroup/QRadioGroup.vue.js +46 -46
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.vue.js +7 -7
- package/esm/components/QRemoveScrollBar/utils/gap.d.ts +0 -6
- package/esm/components/QRemoveScrollBar/utils/gap.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/utils/gap.js +12 -18
- package/esm/components/QRemoveScrollBar/utils/stylesheet.d.ts +11 -0
- package/esm/components/QRemoveScrollBar/utils/stylesheet.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/utils/stylesheet.js +5 -5
- package/esm/components/QSelect/QSelect.d.ts +157 -0
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +240 -212
- package/esm/components/QSelect/index.d.ts +84 -0
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +8 -0
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +1 -2
- package/esm/components/QSidebar/QSidebarAnchor.vue.js +1 -1
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarItem.vue.js +1 -1
- package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarPanel.vue.js +5 -5
- package/esm/components/QSidebar/context.d.ts +3 -3
- package/esm/components/QSidebar/context.d.ts.map +1 -1
- package/esm/components/QSteps/QSteps.d.ts +4 -4
- package/esm/components/QSteps/QSteps.d.ts.map +1 -1
- package/esm/components/QSteps/QSteps.vue.js +9 -15
- package/esm/components/QSteps/index.d.ts +2 -2
- package/esm/components/QSteps/types.d.ts +2 -1
- package/esm/components/QSteps/types.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.vue.js +2 -2
- package/esm/components/QTabs/QTabs.d.ts +4 -4
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +86 -85
- package/esm/components/QTabs/context.d.ts +3 -3
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTabs/index.d.ts +2 -2
- package/esm/components/QTextArea/QTextArea.d.ts +1 -1
- package/esm/components/QTextArea/QTextArea.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.vue.js +25 -24
- package/esm/components/QTextArea/index.d.ts +3 -3
- package/esm/components/QToast/QToast.d.ts.map +1 -1
- package/esm/components/QToast/QToast.vue.js +7 -4
- package/esm/components/QToast/QToaster.d.ts.map +1 -1
- package/esm/components/QToast/types.d.ts +3 -3
- package/esm/components/QToggleGroup/QToggleGroup.d.ts +3 -3
- package/esm/components/QToggleGroup/QToggleGroup.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroup.vue.js +34 -31
- package/esm/components/QToggleGroup/index.d.ts +8 -8
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +1 -1
- package/esm/composables/defaults.d.ts +10 -0
- package/esm/composables/defaults.d.ts.map +1 -1
- package/esm/composables/defaults.js +8 -5
- package/esm/composables/useDialog/_internal.js +8 -11
- package/esm/composables/useDialog/index.js +1 -2
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/composables/useDropZone/index.d.ts +1 -11
- package/esm/composables/useDropZone/index.d.ts.map +1 -1
- package/esm/composables/useDropZone/index.js +23 -26
- package/esm/composables/useGroup/index.d.ts.map +1 -1
- package/esm/composables/useGroup/index.js +15 -15
- package/esm/composables/useOverlayScope/index.d.ts +29 -0
- package/esm/composables/useOverlayScope/index.d.ts.map +1 -0
- package/esm/composables/useOverlayScope/index.js +23 -0
- package/esm/composables/useTextareaAutosize/index.d.ts +3 -1
- package/esm/composables/useTextareaAutosize/index.d.ts.map +1 -1
- package/esm/composables/useTextareaAutosize/index.js +6 -6
- package/esm/composables/useToast/_internal.js +10 -15
- package/esm/composables/useToast/index.js +1 -2
- package/esm/composables/useToast/types.d.ts.map +1 -1
- package/esm/framework.js +14 -12
- package/esm/index.d.ts +1 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/symbols/overlayScope.d.ts +4 -0
- package/esm/symbols/overlayScope.d.ts.map +1 -0
- package/esm/symbols/overlayScope.js +4 -0
- package/esm/types/component.d.ts +8 -0
- package/esm/types/component.d.ts.map +1 -1
- package/esm/types/index.d.ts +1 -1
- package/esm/types/index.d.ts.map +1 -1
- package/esm/utils/color/parse.d.ts.map +1 -1
- package/esm/utils/color/parse.js +3 -10
- package/esm/utils/date.d.ts +35 -13
- package/esm/utils/date.d.ts.map +1 -1
- package/esm/utils/date.js +313 -253
- package/esm/utils/mask.d.ts +1 -0
- package/esm/utils/mask.d.ts.map +1 -1
- package/esm/utils/mask.js +42 -100
- package/esm/utils/overlay.d.ts +13 -1
- package/esm/utils/overlay.d.ts.map +1 -1
- package/esm/utils/overlay.js +55 -41
- package/esm/utils/safeTriangle.d.ts.map +1 -1
- package/esm/utils/safeTriangle.js +2 -2
- package/esm/utils/setupPropsProxy.d.ts +3 -1
- package/esm/utils/setupPropsProxy.d.ts.map +1 -1
- package/esm/utils/setupPropsProxy.js +2 -2
- package/package.json +9 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QListItem.vue"],"names":[],"mappings":"AAwEA;AAoKC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAU3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,GAAG,CAAA;AAKvC,KAAK,WAAW,GAAG,cAAc,CAAC;AAgFnC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAyIT,OAAO,IAA6B;;yBAbrB,GAAG;yBACH,GAAG;wBACH,GAAG;;;;;;EAgB/B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;iBAUnB,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,23 +2,28 @@ import { useGroupItem as e } from "../../composables/useGroup/index.js";
|
|
|
2
2
|
import { useId as t } from "../../composables/useId/index.js";
|
|
3
3
|
import { QIcon as n } from "../QIcon/index.js";
|
|
4
4
|
import { DEFAULT_ICONS as r } from "./constants.js";
|
|
5
|
-
import { createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s,
|
|
5
|
+
import { createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeModels as d, mergeProps as f, normalizeClass as p, normalizeProps as m, openBlock as h, ref as g, renderSlot as _, toDisplayString as v, unref as y, useModel as b, useTemplateRef as x, watch as S, withModifiers as C } from "vue";
|
|
6
6
|
//#region src/components/QList/QListItem.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var w = [
|
|
8
8
|
"id",
|
|
9
9
|
"data-key",
|
|
10
10
|
"tabindex",
|
|
11
|
+
"title",
|
|
11
12
|
"aria-label",
|
|
12
13
|
"aria-disabled",
|
|
13
14
|
"aria-selected"
|
|
14
|
-
],
|
|
15
|
+
], T = { class: "q-list-item__container" }, E = { class: "q-list-item__content" }, D = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "q-list-item__description"
|
|
17
|
-
},
|
|
18
|
+
}, O = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "q-list-item__check-container"
|
|
21
|
+
}, k = { class: "q-checkbox__input" }, A = /*@__PURE__*/ l({
|
|
18
22
|
__name: "QListItem",
|
|
19
|
-
props: /*@__PURE__*/
|
|
23
|
+
props: /*@__PURE__*/ d({
|
|
20
24
|
value: {},
|
|
21
25
|
label: {},
|
|
26
|
+
overflowTitle: { type: Boolean },
|
|
22
27
|
icon: {},
|
|
23
28
|
description: {},
|
|
24
29
|
selectable: { type: Boolean },
|
|
@@ -34,54 +39,62 @@ var C = [
|
|
|
34
39
|
modelValue: { type: Boolean },
|
|
35
40
|
modelModifiers: {}
|
|
36
41
|
}),
|
|
37
|
-
emits: /*@__PURE__*/
|
|
38
|
-
setup(r, { emit:
|
|
39
|
-
let
|
|
40
|
-
if (!
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
emits: /*@__PURE__*/ d(["click"], ["update:modelValue"]),
|
|
43
|
+
setup(r, { emit: l }) {
|
|
44
|
+
let d = r, A = l, j = b(r, "modelValue"), M = t(), N = e(d.value);
|
|
45
|
+
if (!N) throw Error("QListItem: Failed to retrieve group item. Ensure the component is used within a QList context.");
|
|
46
|
+
let P = x("label"), F = g(!1);
|
|
47
|
+
function I() {
|
|
48
|
+
if (!d.overflowTitle) return;
|
|
49
|
+
let e = P.value;
|
|
50
|
+
F.value = !!e && e.scrollWidth > e.clientWidth;
|
|
51
|
+
}
|
|
52
|
+
function L() {
|
|
53
|
+
d.disabled || (A("click"), d.selectable && N?.toggle());
|
|
43
54
|
}
|
|
44
|
-
function
|
|
45
|
-
e.key === "Tab" &&
|
|
55
|
+
function R(e) {
|
|
56
|
+
e.key === "Tab" && d.selectOnTab && L(), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), L());
|
|
46
57
|
}
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
}, { immediate: !0 }), (e, t) => (
|
|
50
|
-
id: y(
|
|
51
|
-
"data-key":
|
|
58
|
+
return S(N.isActive, (e) => {
|
|
59
|
+
j.value = e;
|
|
60
|
+
}, { immediate: !0 }), (e, t) => (h(), o("li", {
|
|
61
|
+
id: y(M),
|
|
62
|
+
"data-key": d.value,
|
|
52
63
|
role: "option",
|
|
53
|
-
tabindex:
|
|
54
|
-
class:
|
|
55
|
-
"q-list-item--selected":
|
|
56
|
-
"q-list-item--selectable":
|
|
57
|
-
"q-list-item--disabled":
|
|
58
|
-
"q-list-item--highlighted":
|
|
64
|
+
tabindex: d.disabled ? void 0 : -1,
|
|
65
|
+
class: p(["q-list-item", {
|
|
66
|
+
"q-list-item--selected": j.value,
|
|
67
|
+
"q-list-item--selectable": d.selectable,
|
|
68
|
+
"q-list-item--disabled": d.disabled,
|
|
69
|
+
"q-list-item--highlighted": d.highlighted
|
|
59
70
|
}]),
|
|
60
|
-
|
|
61
|
-
"aria-
|
|
62
|
-
"aria-
|
|
63
|
-
|
|
64
|
-
|
|
71
|
+
title: d.overflowTitle && F.value ? d.label : void 0,
|
|
72
|
+
"aria-label": d.label,
|
|
73
|
+
"aria-disabled": d.disabled || void 0,
|
|
74
|
+
"aria-selected": d.disabled ? void 0 : j.value,
|
|
75
|
+
onKeydown: R,
|
|
76
|
+
onMouseenter: I,
|
|
77
|
+
onClick: C(L, ["stop", "prevent"])
|
|
65
78
|
}, [
|
|
66
79
|
_(e.$slots, "prepend"),
|
|
67
|
-
s("div",
|
|
80
|
+
s("div", T, [s("div", E, [_(e.$slots, "default", {}, () => [d.icon ? (h(), i(y(n), m(f({ key: 0 }, d.icon)), null, 16)) : a("v-if", !0), s("span", {
|
|
81
|
+
ref: "label",
|
|
82
|
+
class: "q-list-item__label"
|
|
83
|
+
}, v(d.label), 513)])]), d.description ? (h(), o("div", D, [c(y(n), m(u(d.icons.description)), null, 16), s("span", null, v(d.description), 1)])) : a("v-if", !0)]),
|
|
68
84
|
_(e.$slots, "append"),
|
|
69
|
-
|
|
70
|
-
key: 0,
|
|
71
|
-
class: m(["q-list-item__check-container", { "q-list-item__check-container--top": f.description }])
|
|
72
|
-
}, [f.checkboxless && k.value ? (g(), i(y(n), p({ key: 0 }, f.icons.check, {
|
|
85
|
+
d.selectable ? (h(), o("div", O, [d.checkboxless && j.value ? (h(), i(y(n), f({ key: 0 }, d.icons.check, {
|
|
73
86
|
class: "q-list-item__check",
|
|
74
87
|
"aria-hidden": "true"
|
|
75
|
-
}), null, 16)) :
|
|
88
|
+
}), null, 16)) : d.checkboxless ? a("v-if", !0) : (h(), o("span", {
|
|
76
89
|
key: 1,
|
|
77
90
|
"aria-hidden": "true",
|
|
78
|
-
class:
|
|
79
|
-
"q-checkbox--checked":
|
|
80
|
-
"q-checkbox--disabled":
|
|
91
|
+
class: p(["q-checkbox q-checkbox--small", {
|
|
92
|
+
"q-checkbox--checked": j.value,
|
|
93
|
+
"q-checkbox--disabled": d.disabled
|
|
81
94
|
}])
|
|
82
|
-
}, [s("span",
|
|
83
|
-
], 42,
|
|
95
|
+
}, [s("span", k, [j.value ? (h(), i(y(n), f({ key: 0 }, d.icons.check, { class: "q-checkbox__input-icon" }), null, 16)) : a("v-if", !0)])], 2))])) : a("v-if", !0)
|
|
96
|
+
], 42, w));
|
|
84
97
|
}
|
|
85
98
|
});
|
|
86
99
|
//#endregion
|
|
87
|
-
export {
|
|
100
|
+
export { A as default };
|
|
@@ -28,6 +28,7 @@ declare const QList: {
|
|
|
28
28
|
readonly modelValue?: boolean | undefined;
|
|
29
29
|
readonly value: any;
|
|
30
30
|
readonly label: string;
|
|
31
|
+
readonly overflowTitle?: boolean | undefined;
|
|
31
32
|
readonly icon?: import('..').QIconProps | undefined;
|
|
32
33
|
readonly description?: string | undefined;
|
|
33
34
|
readonly selectable?: boolean | undefined;
|
|
@@ -42,6 +43,8 @@ declare const QList: {
|
|
|
42
43
|
$attrs: import('vue').Attrs;
|
|
43
44
|
$refs: {
|
|
44
45
|
[x: string]: unknown;
|
|
46
|
+
} & {
|
|
47
|
+
label: HTMLSpanElement;
|
|
45
48
|
};
|
|
46
49
|
$slots: Readonly<{
|
|
47
50
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
@@ -171,7 +174,9 @@ declare const QListItem: {
|
|
|
171
174
|
}, import('vue').PublicProps, {
|
|
172
175
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
173
176
|
selectOnTab: boolean;
|
|
174
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
177
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
178
|
+
label: HTMLSpanElement;
|
|
179
|
+
}, HTMLLIElement, import('vue').ComponentProvideOptions, {
|
|
175
180
|
P: {};
|
|
176
181
|
B: {};
|
|
177
182
|
D: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QList/index.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QList/index.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCASou0B,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EATh00B,CAAA;AACrC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA8B,CAAA;AAC7C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;EAAmC,CAAA;AAGvD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,CAAA;AAG3C,cAAc,SAAS,CAAA"}
|
|
@@ -83,6 +83,15 @@ export type QListProps = QBaseComponentProps & {
|
|
|
83
83
|
* @category Configuration
|
|
84
84
|
*/
|
|
85
85
|
itemLabel?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Whether an option whose label is cut off shows the full label in a native `title` on hover.
|
|
88
|
+
* The `title` is for sighted mouse users and is only set while the label is cut off, so screen
|
|
89
|
+
* readers do not hear the label twice. The accessible name is unchanged.
|
|
90
|
+
* Defaults to `false`.
|
|
91
|
+
*
|
|
92
|
+
* @category Behavior
|
|
93
|
+
*/
|
|
94
|
+
itemTitle?: boolean;
|
|
86
95
|
/**
|
|
87
96
|
* Custom icon configurations, used by every item. Includes the check mark and description icons.
|
|
88
97
|
* Pass every key, or omit the prop to keep the defaults.
|
|
@@ -104,6 +113,13 @@ export type QListItemProps = {
|
|
|
104
113
|
* @category Content
|
|
105
114
|
*/
|
|
106
115
|
label: string;
|
|
116
|
+
/**
|
|
117
|
+
* Whether to show the full label in a native `title` on hover when it is cut off.
|
|
118
|
+
* Only the default label is measured, not custom slot content. The accessible name is unchanged.
|
|
119
|
+
*
|
|
120
|
+
* @category Behavior
|
|
121
|
+
*/
|
|
122
|
+
overflowTitle?: boolean;
|
|
107
123
|
/**
|
|
108
124
|
* The icon of the item.
|
|
109
125
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QList/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG;IAGrE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACtD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG;IAC9C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IAEH,UAAU,CAAC,EAAE,GAAG,CAAA;IAEhB;;;;OAIG;IAEH,WAAW,CAAC,EAAE,GAAG,CAAA;IAEjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAA;IAEvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAE7B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B;;;;OAIG;IAEH,KAAK,EAAE,GAAG,CAAA;IAEV;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IACjC;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QList/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG;IAGrE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACtD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG;IAC9C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IAEH,UAAU,CAAC,EAAE,GAAG,CAAA;IAEhB;;;;OAIG;IAEH,WAAW,CAAC,EAAE,GAAG,CAAA;IAEjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAA;IAEvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAE7B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B;;;;OAIG;IAEH,KAAK,EAAE,GAAG,CAAA;IAEV;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IACjC;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA"}
|
|
@@ -5,9 +5,14 @@ import { QOverflowProps } from '.';
|
|
|
5
5
|
* (`nearest` along the active axis). Does not call `Element.scrollIntoView`,
|
|
6
6
|
* so outer page / dialog / panel scrollers are left alone.
|
|
7
7
|
*
|
|
8
|
+
* Measures after the next render. Content added just before the call (such as the
|
|
9
|
+
* tabs `QTabs` teleports into the track on mount) can make the strip overflow
|
|
10
|
+
* before the observers report it, and the arrows that then appear narrow the
|
|
11
|
+
* viewport. Measured before they render, the element would end up under them.
|
|
12
|
+
*
|
|
8
13
|
* @param element - A descendant of the content track (typically a direct child).
|
|
9
14
|
*/
|
|
10
|
-
declare function scrollElementIntoView(element: HTMLElement): void
|
|
15
|
+
declare function scrollElementIntoView(element: HTMLElement): Promise<void>;
|
|
11
16
|
declare function __VLS_template(): {
|
|
12
17
|
attrs: Partial<{}>;
|
|
13
18
|
slots: {
|
|
@@ -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;AA+nBC,OAAO,EAAE,aAAa,EAAiB,MAAM,aAAa,CAAA;AAU1D,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,GAAG,CAAA;AAuU9D;;;;;;;;;;;GAWG;AACH,iBAAe,qBAAqB,CAAC,OAAO,EAAE,WAAW,iBA0BxD;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,16 +2,16 @@ import { useId as e } from "../../composables/useId/index.js";
|
|
|
2
2
|
import { QIcon as t } from "../QIcon/index.js";
|
|
3
3
|
import { QButton as n } from "../QButton/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 p, normalizeClass as m, normalizeProps as h, onBeforeUnmount 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 g, onMounted as ee, openBlock as _, ref as v, renderSlot as y, toRef as b, unref as x, watch as S, withCtx as C } from "vue";
|
|
6
6
|
//#region src/components/QOverflow/QOverflow.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var te = [
|
|
8
8
|
"id",
|
|
9
9
|
"role",
|
|
10
10
|
"aria-label"
|
|
11
|
-
],
|
|
11
|
+
], ne = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "q-overflow__control q-overflow__control--prev"
|
|
14
|
-
},
|
|
14
|
+
}, re = ["tabindex"], w = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "q-overflow__control q-overflow__control--next"
|
|
17
17
|
}, T = 1, E = /*@__PURE__*/ u({
|
|
@@ -33,26 +33,26 @@ var C = [
|
|
|
33
33
|
texts: { default: () => i }
|
|
34
34
|
},
|
|
35
35
|
setup(r, { expose: i }) {
|
|
36
|
-
let u = r, E = e(
|
|
36
|
+
let u = r, E = e(b(u, "id")), D = v(null), O = v(null), k = v(!1), A = v(!1), j = null, M = 0, N = null, P = !1, F = a(() => u.direction === "horizontal"), I = a(() => k.value || A.value), L = a(() => F.value ? u.icons.back : u.icons.up), R = a(() => F.value ? u.icons.forward : u.icons.down), z = a(() => u.texts.regionLabel || void 0), B = a(() => z.value ? "region" : void 0), ie = a(() => [
|
|
37
37
|
"q-overflow",
|
|
38
38
|
`q-overflow--${u.direction}`,
|
|
39
39
|
`q-overflow--arrows-${u.arrowPlacement}`,
|
|
40
40
|
`q-overflow--arrows-${u.arrowVisibility}`,
|
|
41
41
|
{
|
|
42
|
-
"q-overflow--overflowing":
|
|
42
|
+
"q-overflow--overflowing": I.value,
|
|
43
43
|
"q-overflow--can-scroll-start": k.value,
|
|
44
44
|
"q-overflow--can-scroll-end": A.value
|
|
45
45
|
},
|
|
46
46
|
u.class
|
|
47
|
-
]),
|
|
47
|
+
]), ae = a(() => ["q-overflow__content", u.contentClass]), V = a(() => ({
|
|
48
48
|
disabled: !k.value,
|
|
49
|
-
onClick: J
|
|
50
|
-
})), R = a(() => ({
|
|
51
|
-
disabled: !A.value,
|
|
52
49
|
onClick: Y
|
|
50
|
+
})), H = a(() => ({
|
|
51
|
+
disabled: !A.value,
|
|
52
|
+
onClick: X
|
|
53
53
|
}));
|
|
54
|
-
function
|
|
55
|
-
return
|
|
54
|
+
function U(e) {
|
|
55
|
+
return F.value ? {
|
|
56
56
|
position: e.scrollLeft,
|
|
57
57
|
size: e.clientWidth,
|
|
58
58
|
scrollSize: e.scrollWidth
|
|
@@ -62,20 +62,20 @@ var C = [
|
|
|
62
62
|
scrollSize: e.scrollHeight
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function W() {
|
|
66
66
|
let e = D.value;
|
|
67
67
|
if (!e) return;
|
|
68
|
-
let { position: t, size: n, scrollSize: r } =
|
|
68
|
+
let { position: t, size: n, scrollSize: r } = U(e), i = Math.max(0, r - n);
|
|
69
69
|
k.value = t > T, A.value = t < i - T;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function oe() {
|
|
72
72
|
return typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth";
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function G(e) {
|
|
75
75
|
let t = D.value;
|
|
76
76
|
if (!t) return;
|
|
77
|
-
let n =
|
|
78
|
-
|
|
77
|
+
let n = oe();
|
|
78
|
+
F.value ? t.scrollTo({
|
|
79
79
|
left: e,
|
|
80
80
|
behavior: n
|
|
81
81
|
}) : t.scrollTo({
|
|
@@ -83,176 +83,171 @@ var C = [
|
|
|
83
83
|
behavior: n
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
86
|
+
function se(e) {
|
|
87
|
+
return F.value ? e.clientWidth : e.clientHeight;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function ce() {
|
|
90
90
|
return Math.max(0, u.scrollStep);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function K() {
|
|
93
93
|
let e = O.value;
|
|
94
94
|
return e ? Array.from(e.children).filter((e) => e instanceof HTMLElement && e.getAttribute("aria-hidden") !== "true") : [];
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function q(e, t, n, r) {
|
|
97
97
|
let i = Math.max(0, r - n), a = e + t / 2 - n / 2;
|
|
98
98
|
return Math.min(i, Math.max(0, a));
|
|
99
99
|
}
|
|
100
100
|
function le(e) {
|
|
101
101
|
let t = D.value;
|
|
102
102
|
if (!t) return null;
|
|
103
|
-
let n =
|
|
104
|
-
if (!n.length) return null;
|
|
105
|
-
let { position: r, size: i, scrollSize: a } = z(t), o = r, s = r + i, c = Math.max(0, a - i);
|
|
103
|
+
let n = K(), { position: r, size: i, scrollSize: a } = U(t), o = r, s = r + i, c = Math.max(0, a - i);
|
|
106
104
|
if (e > 0) {
|
|
107
105
|
for (let e of n) {
|
|
108
|
-
let t =
|
|
106
|
+
let t = F.value ? e.offsetLeft : e.offsetTop, n = F.value ? e.offsetWidth : e.offsetHeight;
|
|
109
107
|
if (t + n > s + T) {
|
|
110
|
-
let e =
|
|
108
|
+
let e = q(t, n, i, a);
|
|
111
109
|
if (Math.abs(e - r) > T) return e;
|
|
112
110
|
}
|
|
113
111
|
}
|
|
114
112
|
return c - r > T ? c : null;
|
|
115
113
|
}
|
|
116
114
|
for (let e = n.length - 1; e >= 0; e--) {
|
|
117
|
-
let t = n[e], s =
|
|
115
|
+
let t = n[e], s = F.value ? t.offsetLeft : t.offsetTop, c = F.value ? t.offsetWidth : t.offsetHeight;
|
|
118
116
|
if (s < o - T) {
|
|
119
|
-
let e =
|
|
117
|
+
let e = q(s, c, i, a);
|
|
120
118
|
if (Math.abs(e - r) > T) return e;
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
121
|
return r > T ? 0 : null;
|
|
124
122
|
}
|
|
125
|
-
function
|
|
123
|
+
function J(e) {
|
|
126
124
|
let t = D.value;
|
|
127
125
|
if (!t) return;
|
|
128
|
-
let { position: n } =
|
|
126
|
+
let { position: n } = U(t);
|
|
129
127
|
if (u.scrollMode === "item") {
|
|
130
128
|
let t = le(e);
|
|
131
129
|
if (t === null) return;
|
|
132
|
-
|
|
130
|
+
G(t);
|
|
133
131
|
return;
|
|
134
132
|
}
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
function J() {
|
|
138
|
-
q(-1);
|
|
133
|
+
G(n + e * (u.scrollMode === "page" ? se(t) : ce()));
|
|
139
134
|
}
|
|
140
135
|
function Y() {
|
|
141
|
-
|
|
136
|
+
J(-1);
|
|
137
|
+
}
|
|
138
|
+
function X() {
|
|
139
|
+
J(1);
|
|
142
140
|
}
|
|
143
141
|
function ue() {
|
|
144
|
-
|
|
142
|
+
G(0);
|
|
145
143
|
}
|
|
146
|
-
function
|
|
144
|
+
function de() {
|
|
147
145
|
let e = D.value;
|
|
148
146
|
if (!e) return;
|
|
149
|
-
let { size: t, scrollSize: n } =
|
|
150
|
-
|
|
147
|
+
let { size: t, scrollSize: n } = U(e);
|
|
148
|
+
G(Math.max(0, n - t));
|
|
151
149
|
}
|
|
152
|
-
function
|
|
150
|
+
async function fe(e) {
|
|
151
|
+
W(), await p();
|
|
153
152
|
let t = D.value, n = O.value;
|
|
154
153
|
if (!t || !n || !n.contains(e)) return;
|
|
155
|
-
let { position: r, size: i, scrollSize: a } =
|
|
154
|
+
let { position: r, size: i, scrollSize: a } = U(t), o = F.value ? e.offsetLeft : e.offsetTop, s = o + (F.value ? e.offsetWidth : e.offsetHeight), c = r, l = r + i, u = Math.max(0, a - i), d = r;
|
|
156
155
|
if (o < c - T) d = o;
|
|
157
156
|
else if (s > l + T) d = s - i;
|
|
158
157
|
else return;
|
|
159
|
-
|
|
158
|
+
G(Math.min(u, Math.max(0, d)));
|
|
160
159
|
}
|
|
161
|
-
function
|
|
162
|
-
if (e.target !== e.currentTarget || !
|
|
163
|
-
let t =
|
|
160
|
+
function pe(e) {
|
|
161
|
+
if (e.target !== e.currentTarget || !I.value) return;
|
|
162
|
+
let t = F.value;
|
|
164
163
|
switch (e.key) {
|
|
165
164
|
case "ArrowLeft":
|
|
166
165
|
if (!t) return;
|
|
167
|
-
e.preventDefault(),
|
|
166
|
+
e.preventDefault(), Y();
|
|
168
167
|
break;
|
|
169
168
|
case "ArrowRight":
|
|
170
169
|
if (!t) return;
|
|
171
|
-
e.preventDefault(),
|
|
170
|
+
e.preventDefault(), X();
|
|
172
171
|
break;
|
|
173
172
|
case "ArrowUp":
|
|
174
173
|
if (t) return;
|
|
175
|
-
e.preventDefault(),
|
|
174
|
+
e.preventDefault(), Y();
|
|
176
175
|
break;
|
|
177
176
|
case "ArrowDown":
|
|
178
177
|
if (t) return;
|
|
179
|
-
e.preventDefault(),
|
|
178
|
+
e.preventDefault(), X();
|
|
180
179
|
break;
|
|
181
180
|
case "Home":
|
|
182
181
|
e.preventDefault(), ue();
|
|
183
182
|
break;
|
|
184
183
|
case "End":
|
|
185
|
-
e.preventDefault(),
|
|
184
|
+
e.preventDefault(), de();
|
|
186
185
|
break;
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
188
|
function Z(e) {
|
|
190
|
-
if (!P.value) return;
|
|
191
189
|
let t = D.value;
|
|
192
190
|
if (!t || Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
193
|
-
let { position: n, size: r, scrollSize: i } =
|
|
194
|
-
|
|
195
|
-
let o = Math.min(a, Math.max(0, n + e.deltaY));
|
|
196
|
-
o !== n && (e.preventDefault(), t.scrollLeft = o, B());
|
|
191
|
+
let { position: n, size: r, scrollSize: i } = U(t), a = Math.max(0, i - r), o = Math.min(a, Math.max(0, n + e.deltaY));
|
|
192
|
+
o !== n && (e.preventDefault(), t.scrollLeft = o, W());
|
|
197
193
|
}
|
|
198
194
|
function Q() {
|
|
199
195
|
let e = D.value;
|
|
200
196
|
if (!e) return;
|
|
201
|
-
let t = u.remapWheel &&
|
|
202
|
-
if (t && !
|
|
203
|
-
e.addEventListener("wheel", Z, { passive: !1 }),
|
|
197
|
+
let t = u.remapWheel && F.value;
|
|
198
|
+
if (t && !P) {
|
|
199
|
+
e.addEventListener("wheel", Z, { passive: !1 }), P = !0;
|
|
204
200
|
return;
|
|
205
201
|
}
|
|
206
|
-
!t &&
|
|
202
|
+
!t && P && (e.removeEventListener("wheel", Z), P = !1);
|
|
207
203
|
}
|
|
208
204
|
function $() {
|
|
209
205
|
j?.disconnect();
|
|
210
206
|
let e = D.value, t = O.value;
|
|
211
207
|
if (!(!e || !t)) {
|
|
212
208
|
j ||= new ResizeObserver(() => {
|
|
213
|
-
|
|
209
|
+
cancelAnimationFrame(M), M = requestAnimationFrame(W);
|
|
214
210
|
}), j.observe(e), j.observe(t);
|
|
215
|
-
for (let e of
|
|
211
|
+
for (let e of K()) j.observe(e);
|
|
216
212
|
}
|
|
217
213
|
}
|
|
218
|
-
function
|
|
219
|
-
M?.disconnect();
|
|
214
|
+
function me() {
|
|
220
215
|
let e = O.value;
|
|
221
|
-
e && (
|
|
222
|
-
$(),
|
|
223
|
-
}),
|
|
216
|
+
e && (N = new MutationObserver(() => {
|
|
217
|
+
$(), W();
|
|
218
|
+
}), N.observe(e, { childList: !0 }));
|
|
224
219
|
}
|
|
225
|
-
return
|
|
226
|
-
Q(), $(),
|
|
227
|
-
}),
|
|
220
|
+
return ee(() => {
|
|
221
|
+
Q(), $(), me(), W();
|
|
222
|
+
}), g(() => {
|
|
228
223
|
let e = D.value;
|
|
229
|
-
|
|
230
|
-
}),
|
|
224
|
+
P && e && (e.removeEventListener("wheel", Z), P = !1), j?.disconnect(), j = null, cancelAnimationFrame(M), N?.disconnect(), N = null;
|
|
225
|
+
}), S(() => [
|
|
231
226
|
u.direction,
|
|
232
227
|
u.scrollMode,
|
|
233
228
|
u.scrollStep
|
|
234
229
|
], async () => {
|
|
235
|
-
await p(), $(),
|
|
236
|
-
}),
|
|
230
|
+
await p(), $(), W();
|
|
231
|
+
}), S(() => [u.remapWheel, u.direction], () => {
|
|
237
232
|
Q();
|
|
238
233
|
}), i({
|
|
239
234
|
contentEl: O,
|
|
240
|
-
scrollElementIntoView:
|
|
235
|
+
scrollElementIntoView: fe
|
|
241
236
|
}), (e, r) => (_(), s("div", {
|
|
242
|
-
id:
|
|
243
|
-
class: m(
|
|
244
|
-
role:
|
|
245
|
-
"aria-label":
|
|
237
|
+
id: x(E),
|
|
238
|
+
class: m(ie.value),
|
|
239
|
+
role: B.value,
|
|
240
|
+
"aria-label": z.value
|
|
246
241
|
}, [
|
|
247
|
-
|
|
242
|
+
I.value ? (_(), s("div", ne, [y(e.$slots, "prev", h(d(V.value)), () => [l(x(n), {
|
|
248
243
|
class: "q-overflow__button",
|
|
249
244
|
variant: "ghost",
|
|
250
245
|
"data-testid": "q-overflow-prev",
|
|
251
|
-
disabled:
|
|
246
|
+
disabled: V.value.disabled,
|
|
252
247
|
"aria-label": u.texts.back,
|
|
253
|
-
onClick:
|
|
248
|
+
onClick: V.value.onClick
|
|
254
249
|
}, {
|
|
255
|
-
default:
|
|
250
|
+
default: C(() => [l(x(t), f({ class: "q-overflow__icon" }, L.value), null, 16)]),
|
|
256
251
|
_: 1
|
|
257
252
|
}, 8, [
|
|
258
253
|
"disabled",
|
|
@@ -264,30 +259,30 @@ var C = [
|
|
|
264
259
|
ref: D,
|
|
265
260
|
class: "q-overflow__viewport",
|
|
266
261
|
"data-testid": "q-overflow-viewport",
|
|
267
|
-
tabindex:
|
|
268
|
-
onScroll:
|
|
269
|
-
onKeydown:
|
|
262
|
+
tabindex: I.value ? 0 : void 0,
|
|
263
|
+
onScroll: W,
|
|
264
|
+
onKeydown: pe
|
|
270
265
|
}, [c("div", {
|
|
271
266
|
ref_key: "contentRef",
|
|
272
267
|
ref: O,
|
|
273
|
-
class: m(
|
|
274
|
-
}, [y(e.$slots, "default")], 2)], 40,
|
|
275
|
-
|
|
268
|
+
class: m(ae.value)
|
|
269
|
+
}, [y(e.$slots, "default")], 2)], 40, re),
|
|
270
|
+
I.value ? (_(), s("div", w, [y(e.$slots, "next", h(d(H.value)), () => [l(x(n), {
|
|
276
271
|
class: "q-overflow__button",
|
|
277
272
|
variant: "ghost",
|
|
278
273
|
"data-testid": "q-overflow-next",
|
|
279
|
-
disabled:
|
|
274
|
+
disabled: H.value.disabled,
|
|
280
275
|
"aria-label": u.texts.forward,
|
|
281
|
-
onClick:
|
|
276
|
+
onClick: H.value.onClick
|
|
282
277
|
}, {
|
|
283
|
-
default:
|
|
278
|
+
default: C(() => [l(x(t), f({ class: "q-overflow__icon" }, R.value), null, 16)]),
|
|
284
279
|
_: 1
|
|
285
280
|
}, 8, [
|
|
286
281
|
"disabled",
|
|
287
282
|
"aria-label",
|
|
288
283
|
"onClick"
|
|
289
284
|
])])])) : o("v-if", !0)
|
|
290
|
-
], 10,
|
|
285
|
+
], 10, te));
|
|
291
286
|
}
|
|
292
287
|
});
|
|
293
288
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const QOverflow: {
|
|
2
2
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').QOverflowProps> & Readonly<{}>, {
|
|
3
3
|
contentEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
4
|
-
scrollElementIntoView: (element: HTMLElement) => void
|
|
4
|
+
scrollElementIntoView: (element: HTMLElement) => Promise<void>;
|
|
5
5
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
6
6
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
7
7
|
texts: import('./constants').QOverflowTexts;
|
|
@@ -23,7 +23,7 @@ declare const QOverflow: {
|
|
|
23
23
|
Defaults: {};
|
|
24
24
|
}, Readonly<import('./types').QOverflowProps> & Readonly<{}>, {
|
|
25
25
|
contentEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
26
|
-
scrollElementIntoView: (element: HTMLElement) => void
|
|
26
|
+
scrollElementIntoView: (element: HTMLElement) => Promise<void>;
|
|
27
27
|
}, {}, {}, {}, {
|
|
28
28
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
29
29
|
texts: import('./constants').QOverflowTexts;
|
|
@@ -39,7 +39,7 @@ declare const QOverflow: {
|
|
|
39
39
|
__isSuspense?: never;
|
|
40
40
|
} & import('vue').ComponentOptionsBase<Readonly<import('./types').QOverflowProps> & Readonly<{}>, {
|
|
41
41
|
contentEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
42
|
-
scrollElementIntoView: (element: HTMLElement) => void
|
|
42
|
+
scrollElementIntoView: (element: HTMLElement) => Promise<void>;
|
|
43
43
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
44
44
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
45
45
|
texts: import('./constants').QOverflowTexts;
|
|
@@ -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;AAikBC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,GAAG,CAAA;AAqfvC,iBAAS,cAAc;WA4KT,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"}
|