@quidgest/ui 0.20.1 → 0.21.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 +17 -0
- package/README.md +10 -0
- package/dist/json/api.json +36 -1
- package/dist/ui.css +52 -248
- package/dist/ui.esm.js +782 -677
- package/dist/ui.js +718 -613
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +718 -613
- package/dist/ui.scss +74 -34
- package/esm/components/QAccordion/QAccordionItem.vue.js +1 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +20 -24
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +32 -29
- package/esm/components/QCheckbox/QCheckbox.vue.js +1 -1
- package/esm/components/QDialog/QDialog.d.ts +4 -2
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +84 -74
- package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
- package/esm/components/QDialog/QDialogProvider.vue.js +21 -12
- package/esm/components/QDialog/index.d.ts +72 -3
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/types.d.ts +10 -1
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +9 -8
- package/esm/components/QDivider/QDivider.d.ts.map +1 -1
- package/esm/components/QDivider/QDivider.vue.js +3 -3
- package/esm/components/QFileUpload/QFileUpload.vue.js +1 -1
- package/esm/components/QGauge/QGauge.vue.js +1 -1
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +5 -2
- package/esm/components/QList/QListItemGroup.vue.js +1 -1
- package/esm/components/QObfuscation/QObfuscation.vue.js +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.vue.js +1 -1
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +1 -1
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +1 -1
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.vue.js +1 -1
- package/esm/components/QRadioGroup/QRadioGroup.vue.js +2 -2
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +19 -10
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarItem.vue.js +51 -49
- package/esm/components/QSidebar/context.d.ts +7 -0
- package/esm/components/QSidebar/context.d.ts.map +1 -1
- package/esm/components/QSwitch/QSwitch.vue.js +1 -1
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.vue.js +52 -50
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +37 -12
- package/esm/components/QTabs/context.d.ts +7 -0
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.vue.js +1 -1
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +1 -1
- package/esm/components/QThemeProvider/QThemeProvider.vue.js +1 -1
- package/esm/components/QToast/QToast.d.ts +4 -2
- package/esm/components/QToast/QToast.d.ts.map +1 -1
- package/esm/components/QToast/QToast.vue.js +80 -67
- package/esm/components/QToast/QToaster.d.ts.map +1 -1
- package/esm/components/QToast/QToaster.vue.js +21 -16
- package/esm/components/QToast/index.d.ts +39 -3
- package/esm/components/QToast/index.d.ts.map +1 -1
- package/esm/components/QToast/types.d.ts +6 -2
- package/esm/components/QToast/types.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +1 -1
- package/esm/composables/index.d.ts +2 -2
- package/esm/composables/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.d.ts +46 -17
- package/esm/composables/useColor/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.js +57 -29
- package/esm/composables/useColor/types.d.ts +4 -1
- package/esm/composables/useColor/types.d.ts.map +1 -1
- package/esm/composables/useDialog/_internal.d.ts +2 -0
- package/esm/composables/useDialog/_internal.d.ts.map +1 -0
- package/esm/composables/useDialog/_internal.js +65 -0
- package/esm/composables/useDialog/index.d.ts +11 -3
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/composables/useDialog/index.js +38 -22
- package/esm/composables/useDialog/types.d.ts +25 -11
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/composables/useDismissibleLayerStack/index.d.ts +17 -2
- package/esm/composables/useDismissibleLayerStack/index.d.ts.map +1 -1
- package/esm/composables/useDismissibleLayerStack/index.js +28 -11
- package/esm/composables/useGroup/index.d.ts.map +1 -1
- package/esm/composables/useGroup/index.js +12 -1
- package/esm/composables/useId/index.d.ts +18 -0
- package/esm/composables/useId/index.d.ts.map +1 -0
- package/esm/composables/useId/index.js +10 -0
- package/esm/composables/useToast/_internal.d.ts +2 -0
- package/esm/composables/useToast/_internal.d.ts.map +1 -0
- package/esm/composables/useToast/_internal.js +142 -0
- package/esm/composables/useToast/index.d.ts +8 -25
- package/esm/composables/useToast/index.d.ts.map +1 -1
- package/esm/composables/useToast/index.js +29 -26
- package/esm/composables/useToast/types.d.ts +31 -17
- package/esm/composables/useToast/types.d.ts.map +1 -1
- package/esm/framework.d.ts.map +1 -1
- package/esm/framework.js +16 -12
- package/esm/templates/theme.js +39 -39
- package/esm/utils/color/contrast.d.ts +11 -4
- package/esm/utils/color/contrast.d.ts.map +1 -1
- package/esm/utils/color/contrast.js +16 -3
- package/esm/utils/color/index.d.ts +1 -0
- package/esm/utils/color/index.d.ts.map +1 -1
- package/esm/utils/color/merge.d.ts +9 -0
- package/esm/utils/color/merge.d.ts.map +1 -1
- package/esm/utils/color/merge.js +21 -22
- package/esm/utils/color/parse.d.ts +21 -5
- package/esm/utils/color/parse.d.ts.map +1 -1
- package/esm/utils/color/parse.js +88 -20
- package/esm/utils/color/theme-colors.d.ts +35 -0
- package/esm/utils/color/theme-colors.d.ts.map +1 -0
- package/esm/utils/color/theme-colors.js +25 -0
- package/esm/utils/index.js +50 -42
- package/package.json +3 -5
- package/esm/composables/uid.d.ts +0 -9
- package/esm/composables/uid.d.ts.map +0 -1
- package/esm/composables/uid.js +0 -8
- package/esm/composables/useToast/types.js +0 -4
- package/esm/vendors/uuid/dist/native.js +0 -3
- package/esm/vendors/uuid/dist/rng.js +0 -11
- package/esm/vendors/uuid/dist/stringify.js +0 -8
- package/esm/vendors/uuid/dist/v4.js +0 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QButton as e } from "../QButton/index.js";
|
|
2
2
|
import { QIcon as t } from "../QIcon/index.js";
|
|
3
|
-
import { useId as n } from "../../composables/
|
|
3
|
+
import { useId as n } from "../../composables/useId/index.js";
|
|
4
4
|
import { DEFAULT_ICONS as r } from "./constants.js";
|
|
5
5
|
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, normalizeClass as p, normalizeProps as m, openBlock as h, ref as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
6
6
|
//#region src/components/QPropertyList/QPropertyListGroup.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useId as e } from "../../composables/
|
|
1
|
+
import { useId as e } from "../../composables/useId/index.js";
|
|
2
2
|
import { QLabel as t } from "../QLabel/index.js";
|
|
3
3
|
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, renderSlot as p, resolveDynamicComponent as m, toRef as h, unref as g, useModel as _, withModifiers as v } from "vue";
|
|
4
4
|
//#region src/components/QPropertyList/QPropertyListRow.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/index.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AACrD,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/index.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AACrD,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;2BASwhR,KAAK;;;;;;;;;cAA4J,KAAK;SAAiB,CAAC;CAT3qR,CAAA;AAC3D,QAAA,MAAM,kBAAkB;;;;;;6FAAuC,CAAA;AAC/D,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;EAAuC,CAAA;AAG/D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA;AAGlF,cAAc,SAAS,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useGroupItem as e } from "../../composables/useGroup/index.js";
|
|
2
|
-
import { useId as t } from "../../composables/
|
|
2
|
+
import { useId as t } from "../../composables/useId/index.js";
|
|
3
3
|
import { QLabel as n } from "../QLabel/index.js";
|
|
4
4
|
import { computed as r, createBlock as i, createCommentVNode as a, createElementVNode as o, createSlots as s, defineComponent as c, mergeProps as l, normalizeClass as u, openBlock as d, renderSlot as f, toRef as p, unref as m, useTemplateRef as h, withCtx as g, withModifiers as _ } from "vue";
|
|
5
5
|
//#region src/components/QRadioGroup/QRadioButton.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { provideDefaults as e } from "../../composables/defaults.js";
|
|
2
2
|
import { useGroup as t } from "../../composables/useGroup/index.js";
|
|
3
|
-
import { useId as n } from "../../composables/
|
|
3
|
+
import { useId as n } from "../../composables/useId/index.js";
|
|
4
4
|
import { QLabel as r } from "../QLabel/index.js";
|
|
5
5
|
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, mergeModels as u, mergeProps as d, normalizeClass as f, openBlock as p, renderSlot as m, toRef as h, unref as g, useModel as _, watch as v } from "vue";
|
|
6
6
|
//#region src/components/QRadioGroup/QRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -41,7 +41,7 @@ var y = ["id"], b = {
|
|
|
41
41
|
v(S, (e) => {
|
|
42
42
|
x.value = e;
|
|
43
43
|
});
|
|
44
|
-
let C = n(h(u, "id")), w = i(() => u.name
|
|
44
|
+
let C = n(h(u, "id")), w = i(() => u.name ?? C.value), T = i(() => [
|
|
45
45
|
"q-radio-group",
|
|
46
46
|
{
|
|
47
47
|
"q-radio-group--horizontal": u.orientation === "horizontal",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSelect/QSelect.vue"],"names":[],"mappings":"AAuPA;AA8sBC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAoB1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,GAAG,CAAA;AAGrC,OAAO,EAEN,QAAQ,EAOR,MAAM,KAAK,CAAA;AAEZ,KAAK,WAAW,GAAG,YAAY,CAAC;AAoUhC;;GAEG;AACH,iBAAS,SAAS,SAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAHH,GAAE,8CAC7B,GAAG,yBACN,GAAA,6DAC8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4zBjC,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"}
|
|
@@ -3,7 +3,7 @@ import { QSpinnerLoader as t } from "../QSpinnerLoader/index.js";
|
|
|
3
3
|
import { QButton as n } from "../QButton/index.js";
|
|
4
4
|
import { QIcon as r } from "../QIcon/index.js";
|
|
5
5
|
import { QChevron as i } from "../__internal__/QChevron/index.js";
|
|
6
|
-
import { useId as a } from "../../composables/
|
|
6
|
+
import { useId as a } from "../../composables/useId/index.js";
|
|
7
7
|
import { QBadge as o } from "../QBadge/index.js";
|
|
8
8
|
import { QField as ee } from "../QField/index.js";
|
|
9
9
|
import { QClearButton as te } from "../__internal__/QClearButton/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/QSidebar.vue"],"names":[],"mappings":"AAgBA;
|
|
1
|
+
{"version":3,"file":"QSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/QSidebar.vue"],"names":[],"mappings":"AAgBA;AAuPC,OAAO,KAAK,EAAkB,uBAAuB,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAM5C,KAAK,WAAW,GAAG,aAAa,CAAC;AAuNlC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAiDT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB/B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUnB,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"}
|
|
@@ -55,19 +55,27 @@ var y = ["id"], b = { class: "q-sidebar__panels" }, x = /*@__PURE__*/ s({
|
|
|
55
55
|
function I(e) {
|
|
56
56
|
E.value = E.value.filter((t) => t.value !== e);
|
|
57
57
|
}
|
|
58
|
-
function L(e) {
|
|
58
|
+
function L(e, t) {
|
|
59
|
+
if (e === t) return;
|
|
60
|
+
let n = E.value.findIndex((t) => t.value === e);
|
|
61
|
+
n !== -1 && (E.value = E.value.map((e, r) => r === n ? {
|
|
62
|
+
...e,
|
|
63
|
+
value: t
|
|
64
|
+
} : e));
|
|
65
|
+
}
|
|
66
|
+
function R(e) {
|
|
59
67
|
S("click:item", e);
|
|
60
68
|
}
|
|
61
|
-
function
|
|
69
|
+
function z() {
|
|
62
70
|
S("resize:start");
|
|
63
71
|
}
|
|
64
|
-
function
|
|
72
|
+
function B(e) {
|
|
65
73
|
k.value = e, S("resize", e);
|
|
66
74
|
}
|
|
67
|
-
function
|
|
75
|
+
function V(e) {
|
|
68
76
|
S("resize:end", e);
|
|
69
77
|
}
|
|
70
|
-
function
|
|
78
|
+
function H() {
|
|
71
79
|
C.value || (D.value = void 0, A());
|
|
72
80
|
}
|
|
73
81
|
return v(() => x.anchorWidth, A), f(n, {
|
|
@@ -79,11 +87,12 @@ var y = ["id"], b = { class: "q-sidebar__panels" }, x = /*@__PURE__*/ s({
|
|
|
79
87
|
items: E,
|
|
80
88
|
register: F,
|
|
81
89
|
unregister: I,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
90
|
+
updateValue: L,
|
|
91
|
+
onItemClick: R,
|
|
92
|
+
onResizeStart: z,
|
|
93
|
+
onPanelResize: B,
|
|
94
|
+
onResizeEnd: V,
|
|
95
|
+
onPanelAfterLeave: H
|
|
87
96
|
}), (e, n) => (d(), i("div", {
|
|
88
97
|
id: x.id,
|
|
89
98
|
class: l(P.value),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/QSidebarItem.vue"],"names":[],"mappings":"AAkEA;
|
|
1
|
+
{"version":3,"file":"QSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/QSidebarItem.vue"],"names":[],"mappings":"AAkEA;AA8LC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AA6GjD,iBAAS,cAAc;WAiMT,OAAO,IAA6B;;wBAhBrB,GAAG;kCACO,GAAG;wBACb,GAAG;iCACM,GAAG;yBACX,GAAG;wBACJ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmEqkS,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;EAnD1tS;AAqBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA6BglS,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;OArBztS,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"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useGroupItem as e } from "../../composables/useGroup/index.js";
|
|
2
2
|
import { QIcon as t } from "../QIcon/index.js";
|
|
3
|
-
import { useId as n } from "../../composables/
|
|
3
|
+
import { useId as n } from "../../composables/useId/index.js";
|
|
4
4
|
import { SidebarSymbol as r } from "./context.js";
|
|
5
5
|
import { QToggle as i } from "../QToggle/index.js";
|
|
6
6
|
import a from "./QSidebarPanel2.vue.js";
|
|
7
|
-
import { Fragment as o, Teleport as s, Transition as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createSlots as p, createVNode as m, defineComponent as h, inject as g, mergeProps as _, normalizeClass as v, normalizeProps as y, onBeforeMount as b, onBeforeUnmount as x, openBlock as S, renderSlot as C, toRef as w, unref as T, useTemplateRef as E,
|
|
7
|
+
import { Fragment as o, Teleport as s, Transition as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createSlots as p, createVNode as m, defineComponent as h, inject as g, mergeProps as _, normalizeClass as v, normalizeProps as y, onBeforeMount as b, onBeforeUnmount as x, openBlock as S, renderSlot as C, toRef as w, unref as T, useTemplateRef as E, watch as D, withCtx as O } from "vue";
|
|
8
8
|
//#region src/components/QSidebar/QSidebarItem.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var k = /*@__PURE__*/ h({
|
|
10
10
|
__name: "QSidebarItem",
|
|
11
11
|
props: {
|
|
12
12
|
id: {},
|
|
@@ -24,45 +24,47 @@ var O = /*@__PURE__*/ h({
|
|
|
24
24
|
maxWidth: { default: "block" }
|
|
25
25
|
},
|
|
26
26
|
setup(h) {
|
|
27
|
-
let
|
|
28
|
-
if (!
|
|
29
|
-
let
|
|
30
|
-
if (!
|
|
31
|
-
let
|
|
32
|
-
function B() {
|
|
33
|
-
F.toggle(), P.onItemClick(A.value);
|
|
34
|
-
}
|
|
27
|
+
let k = h, A = g(r);
|
|
28
|
+
if (!A) throw Error("QSidebarItem: Failed to retrieve sidebar context. Ensure the component is used within a QSidebar context.");
|
|
29
|
+
let j = n(w(k, "value")), M = n(w(k, "id")), N = n(), P = e(j);
|
|
30
|
+
if (!P) throw Error("QSidebarItem: Failed to retrieve group item. Ensure the component is used within a QSidebar context.");
|
|
31
|
+
let F = A, I = P, L = E("anchor"), R = l(() => F.anchorItemsEl.value), z = l(() => F.position.value === "left" ? "right" : "left"), B = l(() => F.position.value === "left" ? "slide-right" : "slide-left");
|
|
35
32
|
function V() {
|
|
36
|
-
|
|
33
|
+
I.toggle(), F.onItemClick(j.value);
|
|
34
|
+
}
|
|
35
|
+
function H() {
|
|
36
|
+
F.onPanelAfterLeave();
|
|
37
37
|
}
|
|
38
38
|
return b(() => {
|
|
39
|
-
|
|
40
|
-
value:
|
|
41
|
-
resizable: w(
|
|
42
|
-
initialWidth: w(
|
|
43
|
-
minWidth: w(
|
|
44
|
-
maxWidth: w(
|
|
45
|
-
anchorRef:
|
|
39
|
+
F.register({
|
|
40
|
+
value: j.value,
|
|
41
|
+
resizable: w(k, "resizable"),
|
|
42
|
+
initialWidth: w(k, "initialWidth"),
|
|
43
|
+
minWidth: w(k, "minWidth"),
|
|
44
|
+
maxWidth: w(k, "maxWidth"),
|
|
45
|
+
anchorRef: L
|
|
46
46
|
});
|
|
47
|
+
}), D(j, (e, t) => {
|
|
48
|
+
e !== t && F.updateValue(t, e);
|
|
47
49
|
}), x(() => {
|
|
48
|
-
|
|
49
|
-
}), (e, n) => (S(), f(o, null, [
|
|
50
|
+
F.unregister(j.value);
|
|
51
|
+
}), (e, n) => (S(), f(o, null, [R.value ? (S(), u(s, {
|
|
50
52
|
key: 0,
|
|
51
|
-
to:
|
|
53
|
+
to: R.value
|
|
52
54
|
}, [m(T(i), {
|
|
53
|
-
id: T(
|
|
55
|
+
id: T(M),
|
|
54
56
|
ref: "anchor",
|
|
55
57
|
"data-testid": "q-sidebar-panel-button",
|
|
56
58
|
borderless: "",
|
|
57
59
|
"icon-pos": "top",
|
|
58
|
-
class: v(["q-sidebar__item",
|
|
59
|
-
"model-value": T(
|
|
60
|
-
"aria-controls": T(
|
|
61
|
-
label: T(
|
|
62
|
-
title: T(
|
|
63
|
-
"onUpdate:modelValue":
|
|
60
|
+
class: v(["q-sidebar__item", k.class]),
|
|
61
|
+
"model-value": T(I).isActive.value,
|
|
62
|
+
"aria-controls": T(N),
|
|
63
|
+
label: T(F).showLabels.value ? k.title : void 0,
|
|
64
|
+
title: T(F).showLabels.value ? void 0 : k.title,
|
|
65
|
+
"onUpdate:modelValue": V
|
|
64
66
|
}, {
|
|
65
|
-
default:
|
|
67
|
+
default: O(() => [C(e.$slots, "anchor", {}, () => [k.icon ? (S(), u(T(t), y(_({ key: 0 }, k.icon)), null, 16)) : d("v-if", !0)])]),
|
|
66
68
|
_: 3
|
|
67
69
|
}, 8, [
|
|
68
70
|
"id",
|
|
@@ -72,43 +74,43 @@ var O = /*@__PURE__*/ h({
|
|
|
72
74
|
"label",
|
|
73
75
|
"title"
|
|
74
76
|
])], 8, ["to"])) : d("v-if", !0), m(c, {
|
|
75
|
-
name:
|
|
76
|
-
css: T(
|
|
77
|
-
onAfterLeave:
|
|
77
|
+
name: B.value,
|
|
78
|
+
css: T(F).animatePanel.value,
|
|
79
|
+
onAfterLeave: H
|
|
78
80
|
}, {
|
|
79
|
-
default:
|
|
81
|
+
default: O(() => [T(I).isActive.value ? (S(), u(a, {
|
|
80
82
|
key: 0,
|
|
81
|
-
id: T(
|
|
82
|
-
"aria-labelledby": T(
|
|
83
|
-
title:
|
|
84
|
-
resizable:
|
|
85
|
-
"show-grip":
|
|
86
|
-
"resize-position":
|
|
87
|
-
"onResize:start": T(
|
|
88
|
-
onResize: T(
|
|
89
|
-
"onResize:end": T(
|
|
83
|
+
id: T(N),
|
|
84
|
+
"aria-labelledby": T(M),
|
|
85
|
+
title: k.title,
|
|
86
|
+
resizable: k.resizable,
|
|
87
|
+
"show-grip": k.showGrip,
|
|
88
|
+
"resize-position": z.value,
|
|
89
|
+
"onResize:start": T(F).onResizeStart,
|
|
90
|
+
onResize: T(F).onPanelResize,
|
|
91
|
+
"onResize:end": T(F).onResizeEnd
|
|
90
92
|
}, p({
|
|
91
|
-
content:
|
|
93
|
+
content: O(() => [C(e.$slots, "default")]),
|
|
92
94
|
_: 2
|
|
93
95
|
}, [
|
|
94
96
|
e.$slots["header.prepend"] ? {
|
|
95
97
|
name: "header.prepend",
|
|
96
|
-
fn:
|
|
98
|
+
fn: O(() => [C(e.$slots, "header.prepend")]),
|
|
97
99
|
key: "0"
|
|
98
100
|
} : void 0,
|
|
99
101
|
e.$slots.header ? {
|
|
100
102
|
name: "header",
|
|
101
|
-
fn:
|
|
103
|
+
fn: O(() => [C(e.$slots, "header")]),
|
|
102
104
|
key: "1"
|
|
103
105
|
} : void 0,
|
|
104
106
|
e.$slots["header.append"] ? {
|
|
105
107
|
name: "header.append",
|
|
106
|
-
fn:
|
|
108
|
+
fn: O(() => [C(e.$slots, "header.append")]),
|
|
107
109
|
key: "2"
|
|
108
110
|
} : void 0,
|
|
109
111
|
e.$slots.footer ? {
|
|
110
112
|
name: "footer",
|
|
111
|
-
fn:
|
|
113
|
+
fn: O(() => [C(e.$slots, "footer")]),
|
|
112
114
|
key: "3"
|
|
113
115
|
} : void 0
|
|
114
116
|
]), 1032, [
|
|
@@ -127,4 +129,4 @@ var O = /*@__PURE__*/ h({
|
|
|
127
129
|
}
|
|
128
130
|
});
|
|
129
131
|
//#endregion
|
|
130
|
-
export {
|
|
132
|
+
export { k as default };
|
|
@@ -73,6 +73,13 @@ export type SidebarContext = {
|
|
|
73
73
|
* @param value - The item `value` to remove.
|
|
74
74
|
*/
|
|
75
75
|
unregister: (value: string) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Updates a registered item's value in place so registry order is preserved.
|
|
78
|
+
*
|
|
79
|
+
* @param oldValue - The previously registered item value.
|
|
80
|
+
* @param newValue - The updated item value.
|
|
81
|
+
*/
|
|
82
|
+
updateValue: (oldValue: string, newValue: string) => void;
|
|
76
83
|
/**
|
|
77
84
|
* Notifies the parent that an anchor item was clicked.
|
|
78
85
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,SAAS,EAAE,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IAEnC;;OAEG;IACH,YAAY,EAAE,GAAG,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAA;IAEhD;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAA;IAE5C;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAA;IAE5C;;OAEG;IACH,SAAS,EAAE,GAAG,CAAC;QAAE,GAAG,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,WAAW,GAAG,IAAI,CAAC,CAAA;CAC1D,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B;;OAEG;IACH,aAAa,EAAE,WAAW,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAE9C;;OAEG;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aAAa,EAAE,MAAM,IAAI,CAAA;IAEzB;;;;OAIG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAEtC;;;;OAIG;IACH,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAEpC;;;OAGG;IACH,iBAAiB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,cAAc,CAAuB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useColor as e } from "../../composables/useColor/index.js";
|
|
2
|
-
import { useId as t } from "../../composables/
|
|
2
|
+
import { useId as t } from "../../composables/useId/index.js";
|
|
3
3
|
import { QLabel as n } from "../QLabel/index.js";
|
|
4
4
|
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, defineComponent as u, mergeModels as d, mergeProps as f, normalizeClass as p, normalizeStyle as m, openBlock as h, toDisplayString as g, toRef as _, unref as v, useModel as y, vModelCheckbox as b, withDirectives as x, withModifiers as S } from "vue";
|
|
5
5
|
//#region src/components/QSwitch/QSwitch.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QTab.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTab.vue"],"names":[],"mappings":"AA6CA;
|
|
1
|
+
{"version":3,"file":"QTab.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTab.vue"],"names":[],"mappings":"AA6CA;AAuNC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAW3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AA+JzC,iBAAS,cAAc;WAwHT,OAAO,IAA6B;;iCAdZ,GAAG;uBACb,GAAG;gCACM,GAAG;yBACV,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmEisW,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;EAnDv1W;AAqBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA6B6sW,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;OArBt1W,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,15 +2,15 @@ import { useGroupItem as e } from "../../composables/useGroup/index.js";
|
|
|
2
2
|
import { DEFAULT_TEXTS as t } from "../__internal__/QRequiredIndicator/constants.js";
|
|
3
3
|
import { QButton as n } from "../QButton/index.js";
|
|
4
4
|
import { QRequiredIndicator as r } from "../__internal__/QRequiredIndicator/index.js";
|
|
5
|
-
import { useId as i } from "../../composables/
|
|
5
|
+
import { useId as i } from "../../composables/useId/index.js";
|
|
6
6
|
import { TabsSymbol as a } from "./context.js";
|
|
7
|
-
import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, inject as h, normalizeClass as g, onBeforeMount as _, onBeforeUnmount as v, openBlock as y, renderSlot as b, toDisplayString as x, toRef as S, unref as C, useTemplateRef as w, vShow as T,
|
|
7
|
+
import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, inject as h, normalizeClass as g, onBeforeMount as _, onBeforeUnmount as v, openBlock as y, renderSlot as b, toDisplayString as x, toRef as S, unref as C, useTemplateRef as w, vShow as T, watch as E, withCtx as D, withDirectives as O } from "vue";
|
|
8
8
|
//#region src/components/QTabs/QTab.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var k = { class: "q-tab__title" }, A = { class: "q-tab__title-text" }, j = [
|
|
10
10
|
"id",
|
|
11
11
|
"aria-labelledby",
|
|
12
12
|
"tabindex"
|
|
13
|
-
],
|
|
13
|
+
], M = /*@__PURE__*/ m({
|
|
14
14
|
__name: "QTab",
|
|
15
15
|
props: {
|
|
16
16
|
id: {},
|
|
@@ -22,77 +22,79 @@ var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
|
|
|
22
22
|
texts: { default: () => t }
|
|
23
23
|
},
|
|
24
24
|
setup(t) {
|
|
25
|
-
let m = t,
|
|
26
|
-
if (!
|
|
27
|
-
let
|
|
28
|
-
if (!
|
|
29
|
-
let
|
|
30
|
-
if (!
|
|
31
|
-
}),
|
|
25
|
+
let m = t, M = h(a, void 0);
|
|
26
|
+
if (!M) throw Error("QTab: Failed to retrieve tabs context. Ensure the component is used within a QTabs context.");
|
|
27
|
+
let N = i(S(m, "value")), P = i(), F = i(), I = e(N);
|
|
28
|
+
if (!I) throw Error("QTab: Failed to retrieve group item. Ensure the component is used within a QTabs context.");
|
|
29
|
+
let L = w("tabBtn"), R = c(() => M.tabListEl.value), z = c(() => !!m.disabled), B = c(() => {
|
|
30
|
+
if (!z.value) return I.isActive.value ? 0 : -1;
|
|
31
|
+
}), V = c(() => [
|
|
32
32
|
"q-tab",
|
|
33
33
|
{
|
|
34
|
-
"q-tab--active":
|
|
35
|
-
"q-tab--disabled":
|
|
34
|
+
"q-tab--active": I.isActive.value,
|
|
35
|
+
"q-tab--disabled": z.value
|
|
36
36
|
},
|
|
37
37
|
m.class
|
|
38
38
|
]);
|
|
39
|
-
function V() {
|
|
40
|
-
(I.value?.$el)?.focus?.();
|
|
41
|
-
}
|
|
42
39
|
function H() {
|
|
43
|
-
|
|
40
|
+
(L.value?.$el)?.focus?.();
|
|
44
41
|
}
|
|
45
42
|
function U() {
|
|
46
|
-
|
|
43
|
+
z.value || I?.isActive.value || I?.toggle();
|
|
44
|
+
}
|
|
45
|
+
function W() {
|
|
46
|
+
U();
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
let t =
|
|
48
|
+
function G(e) {
|
|
49
|
+
let t = M?.direction.value === "horizontal";
|
|
50
50
|
if (t && e.key === "ArrowRight" || !t && e.key === "ArrowDown") {
|
|
51
|
-
e.preventDefault(),
|
|
51
|
+
e.preventDefault(), M?.focusAdjacent(N.value, 1);
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
if (t && e.key === "ArrowLeft" || !t && e.key === "ArrowUp") {
|
|
55
|
-
e.preventDefault(),
|
|
55
|
+
e.preventDefault(), M?.focusAdjacent(N.value, -1);
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
if (e.key === "Home") {
|
|
59
|
-
e.preventDefault(),
|
|
59
|
+
e.preventDefault(), M?.focusFirst();
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
e.key === "End" && (e.preventDefault(),
|
|
62
|
+
e.key === "End" && (e.preventDefault(), M?.focusLast());
|
|
63
63
|
}
|
|
64
64
|
return _(() => {
|
|
65
|
-
|
|
66
|
-
value:
|
|
67
|
-
disabled:
|
|
68
|
-
tabRef:
|
|
69
|
-
focus:
|
|
70
|
-
select:
|
|
65
|
+
M.register({
|
|
66
|
+
value: N.value,
|
|
67
|
+
disabled: z,
|
|
68
|
+
tabRef: L,
|
|
69
|
+
focus: H,
|
|
70
|
+
select: U
|
|
71
71
|
});
|
|
72
|
+
}), E(N, (e, t) => {
|
|
73
|
+
e !== t && M.updateValue(t, e);
|
|
72
74
|
}), v(() => {
|
|
73
|
-
|
|
74
|
-
}), (e, t) => (y(), d(o, null, [
|
|
75
|
+
M.unregister(N.value);
|
|
76
|
+
}), (e, t) => (y(), d(o, null, [R.value ? (y(), l(s, {
|
|
75
77
|
key: 0,
|
|
76
|
-
to:
|
|
78
|
+
to: R.value
|
|
77
79
|
}, [p(C(n), {
|
|
78
|
-
id: C(
|
|
80
|
+
id: C(P),
|
|
79
81
|
ref: "tabBtn",
|
|
80
82
|
borderless: "",
|
|
81
83
|
role: "tab",
|
|
82
84
|
variant: "text",
|
|
83
|
-
class: g(
|
|
84
|
-
disabled:
|
|
85
|
-
"data-value": C(
|
|
86
|
-
"aria-selected": C(
|
|
87
|
-
"aria-controls": C(
|
|
85
|
+
class: g(V.value),
|
|
86
|
+
disabled: z.value,
|
|
87
|
+
"data-value": C(N),
|
|
88
|
+
"aria-selected": C(I).isActive.value,
|
|
89
|
+
"aria-controls": C(F),
|
|
88
90
|
"aria-required": m.required || void 0,
|
|
89
|
-
tabindex:
|
|
90
|
-
onClick:
|
|
91
|
-
onKeydown:
|
|
91
|
+
tabindex: B.value,
|
|
92
|
+
onClick: W,
|
|
93
|
+
onKeydown: G
|
|
92
94
|
}, {
|
|
93
|
-
default:
|
|
95
|
+
default: D(() => [f("span", k, [
|
|
94
96
|
b(e.$slots, "title.prepend"),
|
|
95
|
-
b(e.$slots, "title", {}, () => [f("span",
|
|
97
|
+
b(e.$slots, "title", {}, () => [f("span", A, x(m.title), 1)]),
|
|
96
98
|
m.required ? (y(), l(C(r), {
|
|
97
99
|
key: 0,
|
|
98
100
|
announce: "",
|
|
@@ -110,14 +112,14 @@ var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
|
|
|
110
112
|
"aria-controls",
|
|
111
113
|
"aria-required",
|
|
112
114
|
"tabindex"
|
|
113
|
-
])], 8, ["to"])) : u("v-if", !0),
|
|
114
|
-
id: C(
|
|
115
|
+
])], 8, ["to"])) : u("v-if", !0), O(f("div", {
|
|
116
|
+
id: C(F),
|
|
115
117
|
class: "q-tabs__panel",
|
|
116
118
|
role: "tabpanel",
|
|
117
|
-
"aria-labelledby": C(
|
|
118
|
-
tabindex: C(
|
|
119
|
-
}, [b(e.$slots, "default")], 8,
|
|
119
|
+
"aria-labelledby": C(P),
|
|
120
|
+
tabindex: C(I).isActive.value ? 0 : void 0
|
|
121
|
+
}, [b(e.$slots, "default")], 8, j), [[T, C(I).isActive.value]])], 64));
|
|
120
122
|
}
|
|
121
123
|
});
|
|
122
124
|
//#endregion
|
|
123
|
-
export {
|
|
125
|
+
export { M as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTabs.vue"],"names":[],"mappings":"AAuBA;
|
|
1
|
+
{"version":3,"file":"QTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTabs.vue"],"names":[],"mappings":"AAuBA;AA2YC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAiBzC,KAAK,WAAW,GAAG,UAAU,CAAC;AA4V/B,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAmDT,OAAO,IAA6B;;yBAZrB,GAAG;;;;;;;EAiB/B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;kBAUnB,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"}
|
|
@@ -105,27 +105,51 @@ var C = ["id"], w = {
|
|
|
105
105
|
let e = B();
|
|
106
106
|
e.length && (e.some((e) => e.value === D.value) || (D.value = e[0].value));
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
let H;
|
|
109
|
+
function U() {
|
|
110
|
+
H ||= l(() => {
|
|
111
|
+
H = void 0, V();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function W(e) {
|
|
115
|
+
if (A.value = [...A.value, e], !D.value) {
|
|
116
|
+
V();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
U();
|
|
110
120
|
}
|
|
111
|
-
function
|
|
121
|
+
function G(e) {
|
|
112
122
|
A.value = A.value.filter((t) => t.value !== e);
|
|
113
123
|
}
|
|
114
|
-
function
|
|
124
|
+
function K(e, t) {
|
|
125
|
+
if (e === t) return;
|
|
126
|
+
let n = A.value.findIndex((t) => t.value === e);
|
|
127
|
+
if (n !== -1) {
|
|
128
|
+
if (A.value = A.value.map((e, r) => r === n ? {
|
|
129
|
+
...e,
|
|
130
|
+
value: t
|
|
131
|
+
} : e), D.value === e || D.value === t) {
|
|
132
|
+
D.value = t;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
V();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function q(e, t) {
|
|
115
139
|
let n = B();
|
|
116
140
|
if (!n.length) return;
|
|
117
141
|
let r = n.findIndex((t) => t.value === e), i = n[r === -1 ? 0 : (r + t + n.length) % n.length];
|
|
118
142
|
i.select(), i.focus();
|
|
119
143
|
}
|
|
120
|
-
function
|
|
144
|
+
function J() {
|
|
121
145
|
let e = B()[0];
|
|
122
146
|
e && (e.select(), e.focus());
|
|
123
147
|
}
|
|
124
|
-
function
|
|
148
|
+
function Y() {
|
|
125
149
|
let e = B(), t = e[e.length - 1];
|
|
126
150
|
t && (t.select(), t.focus());
|
|
127
151
|
}
|
|
128
|
-
return S(() => A.value.map((e) => [e.value, y(e.disabled)]), () =>
|
|
152
|
+
return S(() => A.value.map((e) => [e.value, y(e.disabled)]), () => U()), S(() => [
|
|
129
153
|
D.value,
|
|
130
154
|
A.value.length,
|
|
131
155
|
c.direction,
|
|
@@ -136,11 +160,12 @@ var C = ["id"], w = {
|
|
|
136
160
|
}), m(n, {
|
|
137
161
|
tabListEl: k,
|
|
138
162
|
direction: r(() => c.direction),
|
|
139
|
-
register:
|
|
140
|
-
unregister:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
163
|
+
register: W,
|
|
164
|
+
unregister: G,
|
|
165
|
+
updateValue: K,
|
|
166
|
+
focusAdjacent: q,
|
|
167
|
+
focusFirst: J,
|
|
168
|
+
focusLast: Y
|
|
144
169
|
}), (e, t) => (p(), a("div", {
|
|
145
170
|
id: c.id,
|
|
146
171
|
class: u(F.value)
|
|
@@ -62,6 +62,13 @@ export type TabsContext = {
|
|
|
62
62
|
* @param value - The tab `value` to remove.
|
|
63
63
|
*/
|
|
64
64
|
unregister: (value: string) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Updates a registered tab's value in place so keyboard order is preserved.
|
|
67
|
+
*
|
|
68
|
+
* @param oldValue - The previously registered tab value.
|
|
69
|
+
* @param newValue - The updated tab value.
|
|
70
|
+
*/
|
|
71
|
+
updateValue: (oldValue: string, newValue: string) => void;
|
|
65
72
|
/**
|
|
66
73
|
* Activates and focuses the next or previous enabled tab relative to `currentValue`.
|
|
67
74
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAE9B;;OAEG;IACH,MAAM,EAAE,GAAG,CAAC;QAAE,GAAG,CAAC,EAAE,WAAW,CAA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,WAAW,GAAG,IAAI,CAAC,CAAA;IAEvD;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAA;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;;;OAIG;IACH,SAAS,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAElC;;;;OAIG;IACH,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;IAEtC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAA;IAExC;;;;OAIG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAEnC;;;;;OAKG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAEzD;;;;;OAKG;IACH,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE5D;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAA;IAEtB;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,WAAW,CAAoB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useId as e } from "../../composables/
|
|
1
|
+
import { useId as e } from "../../composables/useId/index.js";
|
|
2
2
|
import { QField as t } from "../QField/index.js";
|
|
3
3
|
import { useTextareaAutosize as n } from "../../composables/useTextareaAutosize/index.js";
|
|
4
4
|
import { computed as r, createBlock as i, createElementVNode as a, createSlots as o, defineComponent as s, mergeModels as c, mergeProps as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderSlot as m, toHandlers as h, toRef as g, unref as _, useModel as v, vModelText as y, watch as b, withCtx as x, withDirectives as S } from "vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"AAqDA;AAsIC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,GAAG,CAAA;AAKxC,KAAK,WAAW,GAAG,eAAe,CAAC;AAoEpC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAqIT,OAAO,IAA6B;;iCAjBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACH,GAAG;wBACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"AAqDA;AAsIC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,GAAG,CAAA;AAKxC,KAAK,WAAW,GAAG,eAAe,CAAC;AAoEpC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAqIT,OAAO,IAA6B;;iCAjBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACH,GAAG;wBACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmE81d,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;EAjDn/d;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA+By2d,GAAG,8CAA8C,GAAG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