@quidgest/ui 0.32.0 → 0.32.1
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 +24 -0
- package/dist/json/api.json +198 -28
- package/dist/ui.css +291 -108
- package/dist/ui.esm.js +989 -966
- package/dist/ui.min.css +1 -1
- package/dist/ui.scss +433 -105
- package/lib/components/QAlert/QAlert.d.ts.map +1 -1
- package/lib/components/QAlert/QAlert.vue.js +13 -3
- package/lib/components/QAlert/types.d.ts +12 -0
- package/lib/components/QAlert/types.d.ts.map +1 -1
- package/lib/components/QBadge/QBadge.d.ts.map +1 -1
- package/lib/components/QBadge/QBadge.vue.js +20 -12
- package/lib/components/QBadge/types.d.ts +11 -0
- package/lib/components/QBadge/types.d.ts.map +1 -1
- package/lib/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/lib/components/QDateTimePicker/QDateTimePicker.vue.js +596 -574
- package/lib/components/QDefaultsProvider/QDefaultsProvider.vue.js +4 -2
- package/lib/components/QDefaultsProvider/types.d.ts +10 -0
- package/lib/components/QDefaultsProvider/types.d.ts.map +1 -1
- package/lib/components/QDrawer/QDrawer.d.ts.map +1 -1
- package/lib/components/QDrawer/QDrawer.vue.js +204 -201
- package/lib/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/lib/components/QDropdownMenu/QDropdownMenuContent.vue.js +95 -83
- package/lib/components/QField/types.d.ts +4 -4
- package/lib/components/QGauge/QGauge.d.ts.map +1 -1
- package/lib/components/QGauge/QGauge.vue.js +149 -121
- package/lib/components/QGauge/types.d.ts +16 -1
- package/lib/components/QGauge/types.d.ts.map +1 -1
- package/lib/components/QInputGroup/QInputGroup.d.ts +8 -7
- package/lib/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/lib/components/QInputGroup/QInputGroup.vue.js +82 -43
- package/lib/components/QLabel/QLabel.d.ts.map +1 -1
- package/lib/components/QLabel/QLabel.vue.js +1 -0
- package/lib/components/QList/QListItem.d.ts.map +1 -1
- package/lib/components/QList/QListItem.vue.js +39 -32
- package/lib/components/QMeter/types.d.ts +3 -0
- package/lib/components/QMeter/types.d.ts.map +1 -1
- package/lib/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/lib/components/QOverlay/QOverlay.vue.js +88 -85
- package/lib/components/QPhoneField/QPhoneField.d.ts +6 -0
- package/lib/components/QPhoneField/QPhoneField.d.ts.map +1 -1
- package/lib/components/QPhoneField/QPhoneField.vue.js +1 -1
- package/lib/components/QPhoneField/index.d.ts +3 -0
- package/lib/components/QPhoneField/index.d.ts.map +1 -1
- package/lib/components/QProgress/QProgress.d.ts.map +1 -1
- package/lib/components/QProgress/QProgress.vue.js +66 -47
- package/lib/components/QProgress/types.d.ts +3 -0
- package/lib/components/QProgress/types.d.ts.map +1 -1
- package/lib/components/QRadioGroup/QRadioGroup.d.ts +1 -1
- package/lib/components/QRadioGroup/index.d.ts +3 -3
- package/lib/components/QSelect/QSelect.d.ts +6 -0
- package/lib/components/QSelect/QSelect.d.ts.map +1 -1
- package/lib/components/QSelect/index.d.ts +3 -0
- package/lib/components/QSelect/index.d.ts.map +1 -1
- package/lib/components/QToast/QToaster.d.ts.map +1 -1
- package/lib/components/QToast/QToaster.vue.js +61 -58
- package/lib/composables/defaults.d.ts +25 -1
- package/lib/composables/defaults.d.ts.map +1 -1
- package/lib/composables/defaults.js +15 -7
- package/lib/composables/useColor/index.d.ts +2 -0
- package/lib/composables/useColor/index.d.ts.map +1 -1
- package/lib/composables/useColor/index.js +25 -19
- package/lib/composables/useColor/types.d.ts +12 -0
- package/lib/composables/useColor/types.d.ts.map +1 -1
- package/lib/utils/bidi.d.ts +27 -0
- package/lib/utils/bidi.d.ts.map +1 -0
- package/lib/utils/bidi.js +15 -0
- package/package.json +1 -1
|
@@ -6,10 +6,12 @@ var i = /*@__PURE__*/ t({
|
|
|
6
6
|
props: {
|
|
7
7
|
id: {},
|
|
8
8
|
class: {},
|
|
9
|
-
defaults: {}
|
|
9
|
+
defaults: {},
|
|
10
|
+
local: { type: Boolean }
|
|
10
11
|
},
|
|
11
12
|
setup(t) {
|
|
12
|
-
|
|
13
|
+
let i = t;
|
|
14
|
+
return e(r(i, "defaults"), { local: r(i, "local") }), (e, t) => n(e.$slots, "default");
|
|
13
15
|
}
|
|
14
16
|
});
|
|
15
17
|
//#endregion
|
|
@@ -11,5 +11,15 @@ export type QDefaultsProviderProps = QBaseComponentProps & {
|
|
|
11
11
|
* @category Configuration
|
|
12
12
|
*/
|
|
13
13
|
defaults: QDefaults;
|
|
14
|
+
/**
|
|
15
|
+
* Keeps the defaults out of what is drawn on its own surface, over the page, but declared in
|
|
16
|
+
* the slot: overlays (dialogs, popovers, menus), temporary drawers and toasts. They reach every
|
|
17
|
+
* other component in it. For defaults that depend on where the content is drawn, such as the
|
|
18
|
+
* `surface` of buttons on a colored banner. The defaults the app sets, and those of other
|
|
19
|
+
* providers, still reach them.
|
|
20
|
+
*
|
|
21
|
+
* @category Configuration
|
|
22
|
+
*/
|
|
23
|
+
local?: boolean;
|
|
14
24
|
};
|
|
15
25
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QDefaultsProvider/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,GAAG;IAC1D;;;;;OAKG;IACH,QAAQ,EAAE,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QDefaultsProvider/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,GAAG;IAC1D;;;;;OAKG;IACH,QAAQ,EAAE,SAAS,CAAA;IAEnB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CACf,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QDrawer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDrawer/QDrawer.vue"],"names":[],"mappings":"AAkKA;
|
|
1
|
+
{"version":3,"file":"QDrawer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDrawer/QDrawer.vue"],"names":[],"mappings":"AAkKA;AA+uBC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAiB,MAAM,aAAa,CAAA;AAiBzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,GAAG,CAAA;AAkBrC,KAAK,WAAW,GAAG,YAAY,CAAC;AAikBjC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAoZT,OAAO,IAA6B;;wBApBrB,GAAG;sBACL,GAAG;wBACD,GAAG;kCACO,GAAG;iCACJ,GAAG;yBACX,GAAG;yBACH,GAAG;wBACJ,GAAG;wBACH,GAAG;;;;;;;EAiB/B;AA4DD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;wCAjkCpB,oBApiBC;;;;;;;;;;;;;;;;;;;;;;;;OA+mDA,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,45 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { provideOuterDefaults as e } from "../../composables/defaults.js";
|
|
2
|
+
import { useId as t } from "../../composables/useId/index.js";
|
|
3
|
+
import { QIcon as n } from "../QIcon/index.js";
|
|
4
|
+
import { QDismissibleLayer as r } from "../QDismissibleLayer/index.js";
|
|
5
|
+
import { QRemoveScrollBar as ee } from "../QRemoveScrollBar/index.js";
|
|
6
|
+
import { QFocusWrap as te } from "../QFocusWrap/index.js";
|
|
7
|
+
import { useOverlayScopeItem as ne } from "../../composables/useOverlayScope/index.js";
|
|
8
|
+
import { addModalLayer as re, removeModalLayer as ie } from "../QOverlay/layers.js";
|
|
9
|
+
import { hasSlotContent as i } from "../../utils/slots.js";
|
|
10
|
+
import { QButton as ae } from "../QButton/index.js";
|
|
11
|
+
import { DEFAULT_ICONS as a, DEFAULT_TEXTS as o } from "./constants.js";
|
|
12
|
+
import { QResizeButtons as oe, QResizeHandle as se } from "../__internal__/QResizeHandle/index.js";
|
|
13
|
+
import { DEFAULT_RAIL_WIDTH as s } from "../../utils/railWidth.js";
|
|
14
|
+
import { Teleport as ce, Transition as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as le, createVNode as m, defineComponent as h, guardReactiveProps as ue, mergeModels as g, nextTick as de, normalizeClass as _, normalizeProps as fe, normalizeStyle as pe, onBeforeUnmount as me, onMounted as he, openBlock as v, ref as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as ge, toRef as _e, unref as S, useModel as ve, useSlots as ye, useTemplateRef as be, watch as C, withCtx as w, withModifiers as xe } from "vue";
|
|
14
15
|
//#region src/components/QDrawer/QDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
-
var
|
|
16
|
+
var Se = [
|
|
16
17
|
"role",
|
|
17
18
|
"aria-modal",
|
|
18
19
|
"aria-labelledby",
|
|
19
20
|
"aria-label",
|
|
20
21
|
"tabindex"
|
|
21
|
-
],
|
|
22
|
+
], Ce = { class: "q-drawer__inner" }, we = {
|
|
22
23
|
key: 0,
|
|
23
24
|
class: "q-drawer__rail"
|
|
24
|
-
},
|
|
25
|
+
}, Te = { class: "q-drawer__expanded" }, Ee = {
|
|
25
26
|
key: 0,
|
|
26
27
|
class: "q-drawer__header"
|
|
27
|
-
},
|
|
28
|
+
}, De = {
|
|
28
29
|
key: 1,
|
|
29
30
|
class: "q-drawer__prepend"
|
|
30
|
-
},
|
|
31
|
+
}, Oe = { class: "q-drawer__content" }, ke = {
|
|
31
32
|
key: 2,
|
|
32
33
|
class: "q-drawer__append"
|
|
33
|
-
},
|
|
34
|
+
}, Ae = {
|
|
34
35
|
key: 3,
|
|
35
36
|
class: "q-drawer__footer"
|
|
36
|
-
},
|
|
37
|
+
}, je = {
|
|
37
38
|
key: 0,
|
|
38
39
|
ref: "layer",
|
|
39
40
|
class: "q-drawer__layer"
|
|
40
|
-
},
|
|
41
|
+
}, T = /*@__PURE__*/ h({
|
|
41
42
|
__name: "QDrawer",
|
|
42
|
-
props: /*@__PURE__*/
|
|
43
|
+
props: /*@__PURE__*/ g({
|
|
43
44
|
id: {},
|
|
44
45
|
class: {},
|
|
45
46
|
location: { default: "left" },
|
|
@@ -54,7 +55,7 @@ var be = [
|
|
|
54
55
|
},
|
|
55
56
|
railExpand: { default: "beside" },
|
|
56
57
|
width: { default: 280 },
|
|
57
|
-
railWidth: { default:
|
|
58
|
+
railWidth: { default: s },
|
|
58
59
|
minWidth: { default: 50 },
|
|
59
60
|
maxWidth: {},
|
|
60
61
|
resizable: {
|
|
@@ -103,8 +104,8 @@ var be = [
|
|
|
103
104
|
type: Boolean,
|
|
104
105
|
default: !1
|
|
105
106
|
},
|
|
106
|
-
icons: { default: () =>
|
|
107
|
-
texts: { default: () =>
|
|
107
|
+
icons: { default: () => a },
|
|
108
|
+
texts: { default: () => o }
|
|
108
109
|
}, {
|
|
109
110
|
modelValue: {
|
|
110
111
|
type: Boolean,
|
|
@@ -112,275 +113,277 @@ var be = [
|
|
|
112
113
|
},
|
|
113
114
|
modelModifiers: {}
|
|
114
115
|
}),
|
|
115
|
-
emits: /*@__PURE__*/
|
|
116
|
+
emits: /*@__PURE__*/ g([
|
|
116
117
|
"resize",
|
|
117
118
|
"resize:start",
|
|
118
119
|
"resize:end"
|
|
119
120
|
], ["update:modelValue"]),
|
|
120
|
-
setup(
|
|
121
|
-
let
|
|
122
|
-
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
setup(a, { emit: o }) {
|
|
122
|
+
let s = a, h = o, g = ve(a, "modelValue"), T = t(_e(s, "id")), E = ye(), Me = l(() => `${T.value}_title`), D = be("surface"), O = be("layer");
|
|
123
|
+
ne(D);
|
|
124
|
+
let k = l(() => g.value), A = l(() => s.mode === "temporary");
|
|
125
|
+
e(A);
|
|
126
|
+
let Ne = l(() => A.value && (k.value || K.value)), j = l(() => A.value && !!s.focusWrap && k.value), Pe = l(() => A.value && k.value), Fe = l(() => A.value && s.scrollLock && (k.value || K.value)), Ie = l(() => A.value ? "div" : "aside"), Le = l(() => j.value ? !0 : void 0), Re = l(() => s.location === "left" ? "slide-right" : "slide-left"), ze = l(() => s.headingLevel !== void 0 && s.headingLevel >= 1 && s.headingLevel <= 6 ? `h${s.headingLevel}` : "div");
|
|
127
|
+
function Be() {
|
|
128
|
+
return !!s.title && !i(E.header) && !i(E.drawer);
|
|
126
129
|
}
|
|
127
|
-
function
|
|
128
|
-
return !!
|
|
130
|
+
function Ve() {
|
|
131
|
+
return !!s.title || i(E.header) || i(E["header.prepend"]) || i(E["header.append"]) || s.dismissible || !!G.value;
|
|
129
132
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
133
|
+
function M() {
|
|
134
|
+
return s.rail && i(E.rail);
|
|
132
135
|
}
|
|
133
|
-
let
|
|
134
|
-
function
|
|
135
|
-
return
|
|
136
|
+
let N = y(!1), P = y(!1), F = y(!1), I;
|
|
137
|
+
function L() {
|
|
138
|
+
return M() && s.expandOnHover && N.value;
|
|
136
139
|
}
|
|
137
|
-
function
|
|
138
|
-
return
|
|
140
|
+
function R() {
|
|
141
|
+
return L() && P.value;
|
|
139
142
|
}
|
|
140
|
-
function
|
|
141
|
-
return
|
|
143
|
+
function He() {
|
|
144
|
+
return M() && !(s.railExpand === "replace" && R());
|
|
142
145
|
}
|
|
143
|
-
function
|
|
144
|
-
return
|
|
146
|
+
function Ue() {
|
|
147
|
+
return M() && s.expandOnHover && F.value;
|
|
145
148
|
}
|
|
146
|
-
function
|
|
149
|
+
function z(e) {
|
|
147
150
|
let t = getComputedStyle(e).getPropertyValue("--q-transition-duration").trim() || "0s", n = parseFloat(t);
|
|
148
151
|
return Number.isNaN(n) ? 0 : t.endsWith("ms") ? n : n * 1e3;
|
|
149
152
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
153
|
+
function B() {
|
|
154
|
+
I !== void 0 && (clearTimeout(I), I = void 0);
|
|
152
155
|
}
|
|
153
|
-
function
|
|
154
|
-
|
|
155
|
-
let e =
|
|
156
|
+
function We() {
|
|
157
|
+
B();
|
|
158
|
+
let e = D.value, t = e ? z(e) : 0;
|
|
156
159
|
if (t <= 0) {
|
|
157
|
-
|
|
160
|
+
P.value = !0;
|
|
158
161
|
return;
|
|
159
162
|
}
|
|
160
|
-
|
|
161
|
-
|
|
163
|
+
I = setTimeout(() => {
|
|
164
|
+
I = void 0, N.value && (P.value = !0);
|
|
162
165
|
}, t);
|
|
163
166
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
166
|
-
let e =
|
|
167
|
+
function Ge() {
|
|
168
|
+
B();
|
|
169
|
+
let e = D.value, t = e ? z(e) : 0;
|
|
167
170
|
if (t <= 0) {
|
|
168
|
-
|
|
171
|
+
F.value = !1;
|
|
169
172
|
return;
|
|
170
173
|
}
|
|
171
|
-
|
|
172
|
-
|
|
174
|
+
I = setTimeout(() => {
|
|
175
|
+
I = void 0, N.value || (F.value = !1);
|
|
173
176
|
}, t);
|
|
174
177
|
}
|
|
175
|
-
function
|
|
178
|
+
function Ke(e) {
|
|
176
179
|
if (e.target === e.currentTarget && e.propertyName === "width") {
|
|
177
|
-
if (
|
|
178
|
-
|
|
180
|
+
if (B(), N.value) {
|
|
181
|
+
P.value = !0;
|
|
179
182
|
return;
|
|
180
183
|
}
|
|
181
|
-
|
|
184
|
+
F.value = !1;
|
|
182
185
|
}
|
|
183
186
|
}
|
|
184
|
-
function
|
|
185
|
-
!
|
|
187
|
+
function V() {
|
|
188
|
+
!M() || !s.expandOnHover || N.value || (B(), N.value = !0, s.railExpand !== "replace" && (F.value = !0), We());
|
|
186
189
|
}
|
|
187
|
-
function
|
|
188
|
-
|
|
190
|
+
function qe() {
|
|
191
|
+
H();
|
|
189
192
|
}
|
|
190
|
-
function
|
|
193
|
+
function Je(e) {
|
|
191
194
|
let t = e.relatedTarget ?? document.activeElement;
|
|
192
|
-
t &&
|
|
193
|
-
}
|
|
194
|
-
function Je() {
|
|
195
|
-
V(), I.value = !1, le(() => {
|
|
196
|
-
F.value = !1, Ue();
|
|
197
|
-
});
|
|
195
|
+
t && D.value?.contains(t) || H();
|
|
198
196
|
}
|
|
199
197
|
function H() {
|
|
200
|
-
|
|
198
|
+
B(), P.value = !1, de(() => {
|
|
199
|
+
N.value = !1, Ge();
|
|
200
|
+
});
|
|
201
201
|
}
|
|
202
202
|
function U() {
|
|
203
|
-
if (!
|
|
203
|
+
if (!M()) return Be() ? Me.value : void 0;
|
|
204
|
+
}
|
|
205
|
+
function W() {
|
|
206
|
+
if (!U()) return s.label ? s.label : s.title ? s.title : s.texts.drawer;
|
|
204
207
|
}
|
|
205
208
|
function Ye() {
|
|
206
|
-
return
|
|
209
|
+
return U();
|
|
207
210
|
}
|
|
208
211
|
function Xe() {
|
|
209
|
-
return
|
|
212
|
+
return W();
|
|
210
213
|
}
|
|
211
|
-
let Ze =
|
|
212
|
-
|
|
213
|
-
t &&
|
|
214
|
+
let Ze = l(() => s.location === "left" ? "right" : "left"), G = l(() => s.resizable && !s.rail), K = y(!1), q = y(), J = y(!1);
|
|
215
|
+
C(() => J.value && j.value ? O.value : null, (e, t) => {
|
|
216
|
+
t && ie(t), e && re(e);
|
|
214
217
|
});
|
|
215
|
-
let
|
|
218
|
+
let Y = y({
|
|
216
219
|
now: 0,
|
|
217
220
|
min: 0,
|
|
218
221
|
max: 0
|
|
219
222
|
});
|
|
220
|
-
function
|
|
221
|
-
let e =
|
|
222
|
-
return
|
|
223
|
+
function X() {
|
|
224
|
+
let e = D.value?.getBoundingClientRect().width || 0, t = q.value ?? (typeof s.width == "number" ? s.width : 280), n = Math.round(q.value ?? (e || t)), r = Math.max(Math.round(s.minWidth), 0);
|
|
225
|
+
return Y.value = {
|
|
223
226
|
now: n,
|
|
224
227
|
min: r,
|
|
225
|
-
max: Math.max(Math.round(
|
|
226
|
-
},
|
|
228
|
+
max: Math.max(Math.round(s.maxWidth ?? window.innerWidth), r)
|
|
229
|
+
}, Y.value;
|
|
227
230
|
}
|
|
228
231
|
function Qe() {
|
|
229
|
-
return
|
|
232
|
+
return D.value?.getBoundingClientRect().width || q.value || 0;
|
|
230
233
|
}
|
|
231
|
-
let
|
|
234
|
+
let Z = y(!1);
|
|
232
235
|
function $e() {
|
|
233
|
-
|
|
236
|
+
Z.value = !0, h("resize:start");
|
|
234
237
|
}
|
|
235
238
|
function et(e) {
|
|
236
|
-
|
|
239
|
+
Z.value = !1, X(), h("resize:end", Y.value.now || e);
|
|
237
240
|
}
|
|
238
|
-
|
|
239
|
-
|
|
241
|
+
C(g, () => {
|
|
242
|
+
K.value = !0;
|
|
240
243
|
});
|
|
241
244
|
function tt() {
|
|
242
|
-
|
|
245
|
+
J.value = !0;
|
|
243
246
|
}
|
|
244
247
|
function nt() {
|
|
245
|
-
|
|
248
|
+
J.value = !1;
|
|
246
249
|
}
|
|
247
250
|
function rt() {
|
|
248
|
-
|
|
251
|
+
K.value = !1;
|
|
249
252
|
}
|
|
250
|
-
let it =
|
|
253
|
+
let it = l(() => [
|
|
251
254
|
"q-drawer",
|
|
252
|
-
`q-drawer--${
|
|
253
|
-
`q-drawer--${
|
|
255
|
+
`q-drawer--${s.location}`,
|
|
256
|
+
`q-drawer--${s.mode}`,
|
|
254
257
|
{
|
|
255
|
-
"q-drawer--rail":
|
|
256
|
-
"q-drawer--expand-on-hover":
|
|
257
|
-
"q-drawer--rail-expand-beside":
|
|
258
|
-
"q-drawer--rail-expand-replace":
|
|
259
|
-
"q-drawer--resizable":
|
|
260
|
-
"q-drawer--resizing":
|
|
258
|
+
"q-drawer--rail": s.rail,
|
|
259
|
+
"q-drawer--expand-on-hover": s.rail && s.expandOnHover,
|
|
260
|
+
"q-drawer--rail-expand-beside": s.rail && s.railExpand === "beside",
|
|
261
|
+
"q-drawer--rail-expand-replace": s.rail && s.railExpand === "replace",
|
|
262
|
+
"q-drawer--resizable": G.value,
|
|
263
|
+
"q-drawer--resizing": Z.value
|
|
261
264
|
},
|
|
262
|
-
|
|
265
|
+
s.class
|
|
263
266
|
]);
|
|
264
|
-
function
|
|
267
|
+
function Q(e) {
|
|
265
268
|
return typeof e == "number" ? `calc(${e}px * var(--q-density-scale))` : e;
|
|
266
269
|
}
|
|
267
|
-
let at =
|
|
268
|
-
"--q-drawer-width":
|
|
270
|
+
let at = l(() => s.rail ? Q(s.railWidth) : Q(s.width)), ot = l(() => Q(s.width)), st = l(() => ({
|
|
271
|
+
"--q-drawer-width": q.value === void 0 ? at.value : `${q.value}px`,
|
|
269
272
|
"--q-drawer-expanded-width": ot.value
|
|
270
273
|
}));
|
|
271
274
|
function ct() {
|
|
272
|
-
|
|
275
|
+
g.value = !1;
|
|
273
276
|
}
|
|
274
277
|
function lt() {
|
|
275
278
|
ct();
|
|
276
279
|
}
|
|
277
280
|
function ut(e) {
|
|
278
|
-
|
|
281
|
+
s.persistent && e.preventDefault();
|
|
279
282
|
}
|
|
280
283
|
function dt(e) {
|
|
281
|
-
let t =
|
|
282
|
-
|
|
283
|
-
...
|
|
284
|
+
let t = s.maxWidth ?? window.innerWidth, n = Math.min(Math.max(e, s.minWidth), t);
|
|
285
|
+
q.value = n, h("resize", n), Y.value = {
|
|
286
|
+
...Y.value,
|
|
284
287
|
now: Math.round(n)
|
|
285
288
|
};
|
|
286
289
|
}
|
|
287
|
-
|
|
288
|
-
e && (
|
|
289
|
-
}),
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
290
|
+
C(() => s.rail, (e) => {
|
|
291
|
+
e && (q.value = void 0);
|
|
292
|
+
}), C(() => [
|
|
293
|
+
s.minWidth,
|
|
294
|
+
s.maxWidth,
|
|
295
|
+
s.width,
|
|
296
|
+
q.value
|
|
294
297
|
], () => {
|
|
295
|
-
|
|
298
|
+
D.value && X();
|
|
296
299
|
});
|
|
297
|
-
let
|
|
298
|
-
function
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
return
|
|
302
|
-
|
|
303
|
-
}), (e,
|
|
304
|
-
disabled: !
|
|
305
|
-
to:
|
|
300
|
+
let $ = null;
|
|
301
|
+
function ft(e) {
|
|
302
|
+
$?.disconnect(), $ = null, e && ($ = new ResizeObserver(X), $.observe(e), X());
|
|
303
|
+
}
|
|
304
|
+
return he(() => ft(D.value)), C(D, (e) => ft(e)), me(() => {
|
|
305
|
+
B(), O.value && ie(O.value), $?.disconnect(), $ = null, K.value = !1, J.value = !1;
|
|
306
|
+
}), (e, t) => (v(), u(ce, {
|
|
307
|
+
disabled: !A.value || s.inline,
|
|
308
|
+
to: s.attach
|
|
306
309
|
}, [
|
|
307
|
-
|
|
310
|
+
m(c, {
|
|
308
311
|
name: "fade",
|
|
309
312
|
appear: ""
|
|
310
313
|
}, {
|
|
311
|
-
default:
|
|
314
|
+
default: w(() => [Ne.value ? (v(), f("div", {
|
|
312
315
|
key: 0,
|
|
313
|
-
class:
|
|
316
|
+
class: _(["q-drawer__underlay", { "q-drawer__underlay--blur": s.backdropBlur }]),
|
|
314
317
|
"aria-hidden": "true",
|
|
315
|
-
onMousedown:
|
|
316
|
-
}, null, 34)) :
|
|
318
|
+
onMousedown: t[0] ||= xe(() => {}, ["prevent"])
|
|
319
|
+
}, null, 34)) : d("", !0)]),
|
|
317
320
|
_: 1
|
|
318
321
|
}),
|
|
319
|
-
|
|
320
|
-
name:
|
|
322
|
+
m(c, {
|
|
323
|
+
name: Re.value,
|
|
321
324
|
appear: "",
|
|
322
325
|
onAfterEnter: tt,
|
|
323
326
|
onLeave: nt,
|
|
324
327
|
onAfterLeave: rt
|
|
325
328
|
}, {
|
|
326
|
-
default:
|
|
329
|
+
default: w(() => [k.value ? (v(), u(x(Ie.value), {
|
|
327
330
|
key: 0,
|
|
328
|
-
id:
|
|
331
|
+
id: S(T),
|
|
329
332
|
ref: "surface",
|
|
330
|
-
class:
|
|
331
|
-
"q-drawer--has-rail-slot":
|
|
332
|
-
"q-drawer--rail-open":
|
|
333
|
-
"q-drawer--rail-panel":
|
|
334
|
-
"q-drawer--rail-divider":
|
|
333
|
+
class: _([it.value, {
|
|
334
|
+
"q-drawer--has-rail-slot": M(),
|
|
335
|
+
"q-drawer--rail-open": L(),
|
|
336
|
+
"q-drawer--rail-panel": R(),
|
|
337
|
+
"q-drawer--rail-divider": Ue()
|
|
335
338
|
}]),
|
|
336
|
-
style:
|
|
337
|
-
"aria-labelledby":
|
|
338
|
-
"aria-label":
|
|
339
|
-
onMouseenter:
|
|
340
|
-
onMouseleave:
|
|
341
|
-
onFocusin:
|
|
342
|
-
onFocusout:
|
|
343
|
-
onTransitionend:
|
|
339
|
+
style: pe(st.value),
|
|
340
|
+
"aria-labelledby": A.value ? void 0 : U(),
|
|
341
|
+
"aria-label": A.value ? void 0 : W(),
|
|
342
|
+
onMouseenter: V,
|
|
343
|
+
onMouseleave: qe,
|
|
344
|
+
onFocusin: V,
|
|
345
|
+
onFocusout: Je,
|
|
346
|
+
onTransitionend: Ke
|
|
344
347
|
}, {
|
|
345
|
-
default:
|
|
348
|
+
default: w(() => [(v(), u(x(A.value ? S(r) : "div"), {
|
|
346
349
|
onDismiss: lt,
|
|
347
350
|
onInteractOutside: ut
|
|
348
351
|
}, {
|
|
349
|
-
default:
|
|
350
|
-
active:
|
|
351
|
-
wrap:
|
|
352
|
-
"initial-focus":
|
|
353
|
-
"focus-within-on-activate":
|
|
354
|
-
"closing-focus":
|
|
355
|
-
"return-focus-on-deactivate":
|
|
352
|
+
default: w(() => [m(S(te), {
|
|
353
|
+
active: Pe.value,
|
|
354
|
+
wrap: j.value,
|
|
355
|
+
"initial-focus": s.initialFocus,
|
|
356
|
+
"focus-within-on-activate": s.focusWithinOnActivate,
|
|
357
|
+
"closing-focus": s.closingFocus,
|
|
358
|
+
"return-focus-on-deactivate": s.returnFocusOnDeactivate
|
|
356
359
|
}, {
|
|
357
|
-
default:
|
|
360
|
+
default: w(() => [p("div", {
|
|
358
361
|
class: "q-drawer__dialog",
|
|
359
|
-
role:
|
|
360
|
-
"aria-modal":
|
|
361
|
-
"aria-labelledby":
|
|
362
|
-
"aria-label":
|
|
363
|
-
tabindex:
|
|
364
|
-
}, [
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
362
|
+
role: A.value ? "dialog" : void 0,
|
|
363
|
+
"aria-modal": Le.value,
|
|
364
|
+
"aria-labelledby": A.value ? U() : void 0,
|
|
365
|
+
"aria-label": A.value ? W() : void 0,
|
|
366
|
+
tabindex: A.value ? -1 : void 0
|
|
367
|
+
}, [p("div", Ce, [b(e.$slots, "drawer", {}, () => [He() ? (v(), f("div", we, [b(e.$slots, "rail")])) : d("", !0), p("div", Te, [
|
|
368
|
+
Ve() ? (v(), f("div", Ee, [
|
|
369
|
+
b(e.$slots, "header", {}, () => [
|
|
370
|
+
b(e.$slots, "header.prepend"),
|
|
371
|
+
s.title ? (v(), u(x(ze.value), {
|
|
369
372
|
key: 0,
|
|
370
|
-
id:
|
|
373
|
+
id: Me.value,
|
|
371
374
|
class: "q-drawer__title"
|
|
372
375
|
}, {
|
|
373
|
-
default:
|
|
376
|
+
default: w(() => [le(ge(s.title), 1)]),
|
|
374
377
|
_: 1
|
|
375
|
-
}, 8, ["id"])) :
|
|
376
|
-
|
|
378
|
+
}, 8, ["id"])) : d("", !0),
|
|
379
|
+
b(e.$slots, "header.append")
|
|
377
380
|
]),
|
|
378
|
-
|
|
381
|
+
G.value ? (v(), u(S(oe), {
|
|
379
382
|
key: 0,
|
|
380
|
-
size:
|
|
381
|
-
measure:
|
|
382
|
-
icons:
|
|
383
|
-
texts:
|
|
383
|
+
size: Y.value,
|
|
384
|
+
measure: X,
|
|
385
|
+
icons: s.icons,
|
|
386
|
+
texts: s.texts,
|
|
384
387
|
"shrink-test-id": "q-drawer-shrink",
|
|
385
388
|
"grow-test-id": "q-drawer-grow",
|
|
386
389
|
onResize: dt,
|
|
@@ -390,31 +393,31 @@ var be = [
|
|
|
390
393
|
"size",
|
|
391
394
|
"icons",
|
|
392
395
|
"texts"
|
|
393
|
-
])) :
|
|
394
|
-
|
|
396
|
+
])) : d("", !0),
|
|
397
|
+
s.dismissible ? (v(), u(S(ae), {
|
|
395
398
|
key: 1,
|
|
396
399
|
class: "q-drawer__close",
|
|
397
400
|
variant: "text",
|
|
398
|
-
"aria-label":
|
|
401
|
+
"aria-label": s.texts.close,
|
|
399
402
|
onClick: ct
|
|
400
403
|
}, {
|
|
401
|
-
default:
|
|
404
|
+
default: w(() => [m(S(n), fe(ue(s.icons.close)), null, 16)]),
|
|
402
405
|
_: 1
|
|
403
|
-
}, 8, ["aria-label"])) :
|
|
404
|
-
])) :
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
])]),
|
|
406
|
+
}, 8, ["aria-label"])) : d("", !0)
|
|
407
|
+
])) : d("", !0),
|
|
408
|
+
S(i)(e.$slots.prepend) ? (v(), f("div", De, [b(e.$slots, "prepend")])) : d("", !0),
|
|
409
|
+
p("div", Oe, [b(e.$slots, "default")]),
|
|
410
|
+
S(i)(e.$slots.append) ? (v(), f("div", ke, [b(e.$slots, "append")])) : d("", !0),
|
|
411
|
+
S(i)(e.$slots.footer) ? (v(), f("div", Ae, [b(e.$slots, "footer")])) : d("", !0)
|
|
412
|
+
])]), G.value ? (v(), u(S(se), {
|
|
410
413
|
key: 0,
|
|
411
414
|
class: "q-drawer__handle",
|
|
412
415
|
edge: Ze.value,
|
|
413
|
-
size:
|
|
414
|
-
measure:
|
|
416
|
+
size: Y.value,
|
|
417
|
+
measure: X,
|
|
415
418
|
"get-width": Qe,
|
|
416
|
-
"show-grip":
|
|
417
|
-
enabled:
|
|
419
|
+
"show-grip": s.showGrip,
|
|
420
|
+
enabled: s.resizable && !s.rail,
|
|
418
421
|
"labelled-by": Ye(),
|
|
419
422
|
label: Xe(),
|
|
420
423
|
"handle-test-id": "q-drawer-handle",
|
|
@@ -428,7 +431,7 @@ var be = [
|
|
|
428
431
|
"enabled",
|
|
429
432
|
"labelled-by",
|
|
430
433
|
"label"
|
|
431
|
-
])) :
|
|
434
|
+
])) : d("", !0)]), j.value ? (v(), f("div", je, null, 512)) : d("", !0)], 8, Se)]),
|
|
432
435
|
_: 3
|
|
433
436
|
}, 8, [
|
|
434
437
|
"active",
|
|
@@ -447,12 +450,12 @@ var be = [
|
|
|
447
450
|
"style",
|
|
448
451
|
"aria-labelledby",
|
|
449
452
|
"aria-label"
|
|
450
|
-
])) :
|
|
453
|
+
])) : d("", !0)]),
|
|
451
454
|
_: 3
|
|
452
455
|
}, 8, ["name"]),
|
|
453
|
-
|
|
456
|
+
Fe.value ? (v(), u(S(ee), { key: 0 })) : d("", !0)
|
|
454
457
|
], 8, ["disabled", "to"]));
|
|
455
458
|
}
|
|
456
459
|
});
|
|
457
460
|
//#endregion
|
|
458
|
-
export {
|
|
461
|
+
export { T as default };
|