@quidgest/ui 0.14.13 → 0.14.14

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as ne, mergeModels as O, useModel as oe, computed as l, reactive as V, watch as k, ref as A, nextTick as v, onMounted as re, onBeforeUnmount as ie, createElementBlock as g, openBlock as u, Fragment as ae, createBlock as U, createCommentVNode as L, Teleport as le, createVNode as z, unref as B, withCtx as I, normalizeClass as P, Transition as se, normalizeStyle as N, createElementVNode as de, mergeProps as ue, withKeys as ce, renderSlot as fe } from "vue";
1
+ import { defineComponent as ne, mergeModels as V, useModel as oe, computed as l, reactive as A, watch as k, ref as U, nextTick as v, onMounted as re, onBeforeUnmount as ie, createElementBlock as E, openBlock as u, Fragment as ae, createBlock as B, createCommentVNode as g, Teleport as le, createVNode as se, normalizeClass as z, Transition as de, withCtx as I, unref as b, createElementVNode as P, normalizeStyle as N, mergeProps as ue, withKeys as ce, renderSlot as fe } from "vue";
2
2
  import { QRemoveScrollBar as me } from "../QRemoveScrollBar/index.js";
3
3
  import { QThemeProvider as ve } from "../QThemeProvider/index.js";
4
4
  import { getSideFromPlacement as pe, computePosition as he } from "../../composables/overlay.js";
@@ -7,7 +7,7 @@ import { getElement as we } from "../../utils/getElement.js";
7
7
  const ke = ["role"], Te = /* @__PURE__ */ ne({
8
8
  inheritAttrs: !1,
9
9
  __name: "QOverlay",
10
- props: /* @__PURE__ */ O({
10
+ props: /* @__PURE__ */ V({
11
11
  anchor: {},
12
12
  appearance: { default: "regular" },
13
13
  arrow: { type: Boolean },
@@ -31,9 +31,9 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
31
31
  modelValue: { type: Boolean },
32
32
  modelModifiers: {}
33
33
  }),
34
- emits: /* @__PURE__ */ O(["enter", "leave"], ["update:modelValue"]),
35
- setup(b, { emit: Q }) {
36
- const t = b, _ = Q, r = oe(b, "modelValue"), D = ye(), F = l(() => [
34
+ emits: /* @__PURE__ */ V(["enter", "leave"], ["update:modelValue"]),
35
+ setup(_, { emit: Q }) {
36
+ const t = _, T = Q, r = oe(_, "modelValue"), D = ye(), F = l(() => [
37
37
  "q-overlay",
38
38
  `q-overlay--${pe(n.placement)}`,
39
39
  {
@@ -41,13 +41,13 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
41
41
  "q-overlay--inverted": t.appearance === "inverted"
42
42
  },
43
43
  t.class
44
- ]), c = l(() => t.anchor === void 0), T = l(() => (r.value || n.animating) && !t.nonModal), K = l(() => (r.value || n.animating) && t.scrollLock), n = V({
44
+ ]), c = l(() => t.anchor === void 0), C = l(() => (r.value || n.animating) && !t.nonModal), K = l(() => (r.value || n.animating) && t.scrollLock), n = A({
45
45
  animating: !1,
46
46
  top: 0,
47
47
  left: 0,
48
48
  width: 0,
49
49
  placement: t.placement
50
- }), i = V({
50
+ }), i = A({
51
51
  top: void 0,
52
52
  left: void 0,
53
53
  hidden: !0
@@ -68,7 +68,7 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
68
68
  left: i.left !== void 0 ? `${i.left}px` : void 0,
69
69
  opacity: i.hidden ? 0 : 1
70
70
  };
71
- }), p = A(null), h = A(null);
71
+ }), p = U(null), h = U(null);
72
72
  function a() {
73
73
  const e = d();
74
74
  if (!e || !h.value)
@@ -93,32 +93,32 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
93
93
  );
94
94
  let f;
95
95
  function y() {
96
- x(0);
96
+ S(0);
97
97
  }
98
- function C() {
99
- x(t.delay);
98
+ function x() {
99
+ S(t.delay);
100
100
  }
101
- function x(e) {
102
- f && S(), f = window.setTimeout(() => {
101
+ function S(e) {
102
+ f && q(), f = window.setTimeout(() => {
103
103
  r.value = !0;
104
104
  }, e);
105
105
  }
106
106
  function s() {
107
- if (f && S(), r.value = !1, t.anchor && t.trigger === "click") {
107
+ if (f && q(), r.value = !1, t.anchor && t.trigger === "click") {
108
108
  const e = d();
109
109
  e == null || e.focus();
110
110
  }
111
111
  }
112
- function S() {
112
+ function q() {
113
113
  clearTimeout(f), f = void 0;
114
114
  }
115
115
  k(W, () => v(H));
116
116
  function H() {
117
- _("enter");
117
+ T("enter");
118
118
  }
119
- let q;
119
+ let $;
120
120
  function J() {
121
- window.clearTimeout(q), q = window.setTimeout(() => n.animating = !1, 200), _("leave");
121
+ window.clearTimeout($), $ = window.setTimeout(() => n.animating = !1, 200), T("leave");
122
122
  }
123
123
  function d() {
124
124
  return t.anchor ? we(t.anchor) : null;
@@ -137,7 +137,7 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
137
137
  e.addEventListener("click", y);
138
138
  break;
139
139
  case "hover":
140
- e.addEventListener("mouseenter", C), e.addEventListener("mouseleave", s), e.addEventListener("focusin", y), e.addEventListener("focusout", s);
140
+ e.addEventListener("mouseenter", x), e.addEventListener("mouseleave", s), e.addEventListener("focusin", y), e.addEventListener("focusout", s);
141
141
  break;
142
142
  }
143
143
  }
@@ -149,7 +149,7 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
149
149
  e.removeEventListener("click", y);
150
150
  break;
151
151
  case "hover":
152
- e.removeEventListener("mouseenter", C), e.removeEventListener("mouseleave", s), e.removeEventListener("focusin", y), e.removeEventListener("focusout", s);
152
+ e.removeEventListener("mouseenter", x), e.removeEventListener("mouseleave", s), e.removeEventListener("focusin", y), e.removeEventListener("focusout", s);
153
153
  break;
154
154
  }
155
155
  }
@@ -159,83 +159,83 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
159
159
  function ee() {
160
160
  window.removeEventListener("resize", a), t.scrollLock || window.removeEventListener("scroll", a);
161
161
  }
162
- let E;
163
- function $() {
164
- d() ? (a(), E = window.setTimeout($, 100)) : s();
162
+ let L;
163
+ function M() {
164
+ d() ? (a(), L = window.setTimeout(M, 100)) : s();
165
165
  }
166
166
  function te() {
167
- c.value || (Z(), t.spy ? $() : a()), (c.value || t.trigger === "click") && v(() => {
167
+ c.value || (Z(), t.spy ? M() : a()), (c.value || t.trigger === "click") && v(() => {
168
168
  var e;
169
169
  return (e = h.value) == null ? void 0 : e.focus();
170
170
  });
171
171
  }
172
- function M() {
173
- c.value || ee(), t.spy && (clearTimeout(E), E = void 0), n.top = 0, n.left = 0;
174
- }
175
172
  function R() {
173
+ c.value || ee(), t.spy && (clearTimeout(L), L = void 0), n.top = 0, n.left = 0;
174
+ }
175
+ function O() {
176
176
  t.persistent || s();
177
177
  }
178
178
  return re(() => {
179
179
  v(X);
180
180
  }), ie(() => {
181
- Y(), M();
181
+ Y(), R();
182
182
  }), k(
183
183
  r,
184
184
  (e) => {
185
- v(() => e ? te() : M());
185
+ v(() => e ? te() : R());
186
186
  },
187
187
  { immediate: !0 }
188
- ), (e, w) => (u(), g(
188
+ ), (e, w) => (u(), E(
189
189
  ae,
190
190
  null,
191
191
  [
192
- (u(), U(le, {
192
+ (u(), B(le, {
193
193
  disabled: !r.value && !n.animating || t.inline,
194
194
  to: t.attach
195
195
  }, [
196
- z(B(ve), {
197
- theme: B(D).current.value.name
196
+ C.value ? (u(), E(
197
+ "div",
198
+ {
199
+ key: 0,
200
+ class: z([
201
+ t.backdropClass,
202
+ "q-overlay__underlay",
203
+ { "q-overlay__underlay--blur": t.backdropBlur }
204
+ ])
205
+ },
206
+ null,
207
+ 2
208
+ /* CLASS */
209
+ )) : g("v-if", !0),
210
+ se(de, {
211
+ name: t.transition,
212
+ appear: "",
213
+ onLeave: J
198
214
  }, {
199
215
  default: I(() => [
200
- T.value ? (u(), g(
201
- "div",
202
- {
203
- key: 0,
204
- class: P([
205
- t.backdropClass,
206
- "q-overlay__underlay",
207
- { "q-overlay__underlay--blur": t.backdropBlur }
208
- ])
209
- },
210
- null,
211
- 2
212
- /* CLASS */
213
- )) : L("v-if", !0),
214
- z(se, {
215
- name: t.transition,
216
- appear: "",
217
- onLeave: J
216
+ r.value ? (u(), B(b(ve), {
217
+ key: 0,
218
+ theme: b(D).current.value.name
218
219
  }, {
219
220
  default: I(() => [
220
- r.value ? (u(), g(
221
+ P(
221
222
  "div",
222
223
  {
223
- key: 0,
224
- class: P(F.value),
224
+ class: z(F.value),
225
225
  style: N(j.value)
226
226
  },
227
227
  [
228
- de("div", ue({
228
+ P("div", ue({
229
229
  ref_key: "overlayRef",
230
230
  ref: h,
231
231
  class: "q-overlay__content",
232
232
  tabindex: "-1",
233
- role: T.value ? "dialog" : void 0
233
+ role: C.value ? "dialog" : void 0
234
234
  }, e.$attrs, {
235
- onKeydown: ce(R, ["escape"]),
236
- onBlur: R
235
+ onKeydown: ce(O, ["escape"]),
236
+ onBlur: O
237
237
  }), [
238
- t.arrow ? (u(), g(
238
+ t.arrow ? (u(), E(
239
239
  "div",
240
240
  {
241
241
  key: 0,
@@ -248,23 +248,23 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
248
248
  null,
249
249
  4
250
250
  /* STYLE */
251
- )) : L("v-if", !0),
251
+ )) : g("v-if", !0),
252
252
  fe(e.$slots, "default")
253
253
  ], 16, ke)
254
254
  ],
255
255
  6
256
256
  /* CLASS, STYLE */
257
- )) : L("v-if", !0)
257
+ )
258
258
  ]),
259
259
  _: 3
260
260
  /* FORWARDED */
261
- }, 8, ["name"])
261
+ }, 8, ["theme"])) : g("v-if", !0)
262
262
  ]),
263
263
  _: 3
264
264
  /* FORWARDED */
265
- }, 8, ["theme"])
265
+ }, 8, ["name"])
266
266
  ], 8, ["disabled", "to"])),
267
- K.value ? (u(), U(B(me), { key: 0 })) : L("v-if", !0)
267
+ K.value ? (u(), B(b(me), { key: 0 })) : g("v-if", !0)
268
268
  ],
269
269
  64
270
270
  /* STABLE_FRAGMENT */
@@ -1 +1 @@
1
- {"version":3,"file":"QTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/QTooltip.vue"],"names":[],"mappings":"AAkCA;AAmEC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK5C,KAAK,WAAW,GAAG,aAAa,CAAC;AA2BlC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAkFT,OAAO,IAA6B;;;;;;YAXtB,GAAG;yBACF,GAAG;;;;EAe/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;6EAQnB,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
+ {"version":3,"file":"QTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/QTooltip.vue"],"names":[],"mappings":"AAkCA;AAyHC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAO5C,KAAK,WAAW,GAAG,aAAa,CAAC;AA6ElC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAkFT,OAAO,IAA6B;;;;;;YAXtB,GAAG;yBACF,GAAG;;;;EAe/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;6EAQnB,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,10 +1,11 @@
1
- import { defineComponent as s, mergeModels as p, useModel as m, createElementBlock as o, openBlock as a, Fragment as d, renderSlot as i, createVNode as u, unref as t, normalizeClass as f, withCtx as h, createBlock as y, createCommentVNode as g, normalizeProps as B, mergeProps as b, createTextVNode as v, toDisplayString as k } from "vue";
2
- import { QOverlay as V } from "../QOverlay/index.js";
3
- import { QIcon as w } from "../QIcon/index.js";
4
- import { useId as x } from "../../composables/uid.js";
5
- const M = ["innerHTML"], z = /* @__PURE__ */ s({
1
+ import { defineComponent as g, mergeModels as V, useModel as v, onMounted as B, onUnmounted as k, watch as M, createElementBlock as l, openBlock as a, Fragment as m, renderSlot as u, createVNode as w, unref as r, normalizeClass as x, withCtx as C, createBlock as T, createCommentVNode as A, normalizeProps as D, mergeProps as N, createTextVNode as Q, toDisplayString as _ } from "vue";
2
+ import { QIcon as z } from "../QIcon/index.js";
3
+ import { QOverlay as H } from "../QOverlay/index.js";
4
+ import { useId as I } from "../../composables/uid.js";
5
+ import { getElement as p } from "../../utils/getElement.js";
6
+ const L = ["innerHTML"], F = /* @__PURE__ */ g({
6
7
  __name: "QTooltip",
7
- props: /* @__PURE__ */ p({
8
+ props: /* @__PURE__ */ V({
8
9
  id: {},
9
10
  anchor: {},
10
11
  appearance: { default: "inverted" },
@@ -24,18 +25,38 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
24
25
  modelModifiers: {}
25
26
  }),
26
27
  emits: ["update:modelValue"],
27
- setup(l) {
28
- const e = l, c = m(l, "modelValue"), r = x(e.id);
29
- return (n, _) => (a(), o(
30
- d,
28
+ setup(i) {
29
+ const e = i, d = v(i, "modelValue"), n = I(e.id);
30
+ function c(o) {
31
+ const t = p(o);
32
+ t == null || t.setAttribute("aria-describedby", n);
33
+ }
34
+ function f() {
35
+ e.anchor && c(e.anchor);
36
+ }
37
+ B(f);
38
+ function s(o) {
39
+ const t = p(o);
40
+ t == null || t.removeAttribute("aria-describedby");
41
+ }
42
+ function y() {
43
+ e.anchor && s(e.anchor);
44
+ }
45
+ k(y);
46
+ function h(o, t) {
47
+ t && s(t), o && c(o);
48
+ }
49
+ return M(() => e.anchor, h), (o, t) => (a(), l(
50
+ m,
31
51
  null,
32
52
  [
33
- i(n.$slots, "anchor", {
34
- props: { "aria-describedby": t(r) }
53
+ u(o.$slots, "anchor", {
54
+ props: { "aria-describedby": r(n) }
35
55
  }),
36
- u(t(V), {
37
- id: t(r),
38
- "model-value": c.value,
56
+ w(r(H), {
57
+ modelValue: d.value,
58
+ "onUpdate:modelValue": t[0] || (t[0] = (b) => d.value = b),
59
+ id: r(n),
39
60
  anchor: e.anchor,
40
61
  role: "tooltip",
41
62
  "non-modal": "",
@@ -43,30 +64,30 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
43
64
  arrow: e.arrow,
44
65
  attach: e.attach,
45
66
  inline: e.inline,
46
- class: f(["q-tooltip", e.class]),
67
+ class: x(["q-tooltip", e.class]),
47
68
  delay: e.delay,
48
69
  disabled: e.disabled,
49
70
  placement: e.placement,
50
71
  trigger: e.trigger
51
72
  }, {
52
- default: h(() => [
53
- i(n.$slots, "default", {}, () => [
54
- e.icon ? (a(), y(
55
- t(w),
56
- B(b({ key: 0 }, e.icon)),
73
+ default: C(() => [
74
+ u(o.$slots, "default", {}, () => [
75
+ e.icon ? (a(), T(
76
+ r(z),
77
+ D(N({ key: 0 }, e.icon)),
57
78
  null,
58
79
  16
59
80
  /* FULL_PROPS */
60
- )) : g("v-if", !0),
61
- e.html ? (a(), o("span", {
81
+ )) : A("v-if", !0),
82
+ e.html ? (a(), l("span", {
62
83
  key: 1,
63
84
  innerHTML: e.text
64
- }, null, 8, M)) : (a(), o(
65
- d,
85
+ }, null, 8, L)) : (a(), l(
86
+ m,
66
87
  { key: 2 },
67
88
  [
68
- v(
69
- k(e.text),
89
+ Q(
90
+ _(e.text),
70
91
  1
71
92
  /* TEXT */
72
93
  )
@@ -78,7 +99,7 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
78
99
  ]),
79
100
  _: 3
80
101
  /* FORWARDED */
81
- }, 8, ["id", "model-value", "anchor", "appearance", "arrow", "attach", "inline", "class", "delay", "disabled", "placement", "trigger"])
102
+ }, 8, ["modelValue", "id", "anchor", "appearance", "arrow", "attach", "inline", "class", "delay", "disabled", "placement", "trigger"])
82
103
  ],
83
104
  64
84
105
  /* STABLE_FRAGMENT */
@@ -86,5 +107,5 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
86
107
  }
87
108
  });
88
109
  export {
89
- z as default
110
+ F as default
90
111
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quidgest/ui",
3
3
  "description": "Quidgest's UI framework",
4
- "version": "0.14.13",
4
+ "version": "0.14.14",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",