@quidgest/ui 0.15.2 → 0.15.4

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.
Files changed (123) hide show
  1. package/dist/manifest/components.json +4 -0
  2. package/dist/ui.css +111 -6
  3. package/dist/ui.esm.js +6988 -5987
  4. package/dist/ui.js +33 -26
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +1141 -990
  7. package/dist/ui.scss +119 -9
  8. package/esm/components/QCombobox/QCombobox.d.ts +18 -14
  9. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
  10. package/esm/components/QCombobox/QCombobox.vue.js +1 -1
  11. package/esm/components/QCombobox/index.d.ts +29 -17
  12. package/esm/components/QCombobox/index.d.ts.map +1 -1
  13. package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +1 -1
  14. package/esm/components/QDateTimePicker/index.d.ts +3 -0
  15. package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
  16. package/esm/components/QDialog/QDialog.d.ts +2 -2
  17. package/esm/components/QDialog/QDialog.d.ts.map +1 -1
  18. package/esm/components/QDialog/QDialog.vue.js +51 -50
  19. package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts +35 -0
  20. package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -0
  21. package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +50 -0
  22. package/esm/components/QDismissibleLayer/QDismissibleLayer.vue2.js +4 -0
  23. package/esm/components/QDismissibleLayer/index.d.ts +53 -0
  24. package/esm/components/QDismissibleLayer/index.d.ts.map +1 -0
  25. package/esm/components/QDismissibleLayer/index.js +6 -0
  26. package/esm/components/QDismissibleLayer/types.d.ts +25 -0
  27. package/esm/components/QDismissibleLayer/types.d.ts.map +1 -0
  28. package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +0 -4
  29. package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -1
  30. package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +10 -15
  31. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +10 -15
  32. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
  33. package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +72 -117
  34. package/esm/components/QDropdownMenu/index.d.ts +0 -3
  35. package/esm/components/QDropdownMenu/index.d.ts.map +1 -1
  36. package/esm/components/QField/QField.d.ts.map +1 -1
  37. package/esm/components/QField/QField.vue.js +11 -10
  38. package/esm/components/QFileUpload/QFileUpload.vue.js +1 -1
  39. package/esm/components/QFileUpload/index.d.ts +3 -0
  40. package/esm/components/QFileUpload/index.d.ts.map +1 -1
  41. package/esm/components/QFocusTrap/QFocusTrap.d.ts +28 -0
  42. package/esm/components/QFocusTrap/QFocusTrap.d.ts.map +1 -0
  43. package/esm/components/QFocusTrap/QFocusTrap.vue.js +32 -0
  44. package/esm/components/QFocusTrap/QFocusTrap.vue2.js +4 -0
  45. package/esm/components/QFocusTrap/index.d.ts +38 -0
  46. package/esm/components/QFocusTrap/index.d.ts.map +1 -0
  47. package/esm/components/QFocusTrap/index.js +6 -0
  48. package/esm/components/QFocusTrap/types.d.ts +6 -0
  49. package/esm/components/QFocusTrap/types.d.ts.map +1 -0
  50. package/esm/components/QInputGroup/QInputGroup.vue.js +1 -1
  51. package/esm/components/QLabel/QLabel.d.ts +1 -0
  52. package/esm/components/QLabel/QLabel.d.ts.map +1 -1
  53. package/esm/components/QLabel/QLabel.vue.js +28 -13
  54. package/esm/components/QLabel/index.d.ts +1 -0
  55. package/esm/components/QLabel/index.d.ts.map +1 -1
  56. package/esm/components/QLabel/types.d.ts +5 -0
  57. package/esm/components/QLabel/types.d.ts.map +1 -1
  58. package/esm/components/QList/QList.d.ts +0 -9
  59. package/esm/components/QList/QList.d.ts.map +1 -1
  60. package/esm/components/QList/QList.vue.js +97 -82
  61. package/esm/components/QList/index.d.ts +0 -3
  62. package/esm/components/QList/index.d.ts.map +1 -1
  63. package/esm/components/QMeter/QMeter.vue.js +14 -13
  64. package/esm/components/QMeter/index.d.ts +2 -0
  65. package/esm/components/QMeter/index.d.ts.map +1 -1
  66. package/esm/components/QOverlay/QOverlay.d.ts +2 -0
  67. package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
  68. package/esm/components/QOverlay/QOverlay.vue.js +197 -148
  69. package/esm/components/QOverlay/index.d.ts +4 -0
  70. package/esm/components/QOverlay/index.d.ts.map +1 -1
  71. package/esm/components/QOverlay/types.d.ts +6 -1
  72. package/esm/components/QOverlay/types.d.ts.map +1 -1
  73. package/esm/components/QPasswordField/QPasswordField.d.ts +8 -4
  74. package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -1
  75. package/esm/components/QPasswordField/QPasswordField.vue.js +1 -1
  76. package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +6 -5
  77. package/esm/components/QPasswordField/index.d.ts +4 -2
  78. package/esm/components/QPasswordField/index.d.ts.map +1 -1
  79. package/esm/components/QPropertyList/QPropertyList.vue.js +23 -23
  80. package/esm/components/QPropertyList/QPropertyListRow.d.ts +6 -2
  81. package/esm/components/QPropertyList/QPropertyListRow.d.ts.map +1 -1
  82. package/esm/components/QPropertyList/QPropertyListRow.vue.js +20 -20
  83. package/esm/components/QPropertyList/index.d.ts +9 -2
  84. package/esm/components/QPropertyList/index.d.ts.map +1 -1
  85. package/esm/components/QRadioGroup/QRadioButton.d.ts +24 -0
  86. package/esm/components/QRadioGroup/QRadioButton.d.ts.map +1 -0
  87. package/esm/components/QRadioGroup/QRadioButton.vue.js +78 -0
  88. package/esm/components/QRadioGroup/QRadioButton.vue2.js +4 -0
  89. package/esm/components/QRadioGroup/QRadioGroup.d.ts +32 -0
  90. package/esm/components/QRadioGroup/QRadioGroup.d.ts.map +1 -0
  91. package/esm/components/QRadioGroup/QRadioGroup.vue.js +79 -0
  92. package/esm/components/QRadioGroup/QRadioGroup.vue2.js +4 -0
  93. package/esm/components/QRadioGroup/index.d.ts +108 -0
  94. package/esm/components/QRadioGroup/index.d.ts.map +1 -0
  95. package/esm/components/QRadioGroup/index.js +8 -0
  96. package/esm/components/QRadioGroup/types.d.ts +65 -0
  97. package/esm/components/QRadioGroup/types.d.ts.map +1 -0
  98. package/esm/components/QSelect/QSelect.d.ts +4 -8
  99. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  100. package/esm/components/QSelect/QSelect.vue.js +107 -126
  101. package/esm/components/QSelect/index.d.ts +5 -4
  102. package/esm/components/QSelect/index.d.ts.map +1 -1
  103. package/esm/components/QTextArea/QTextArea.vue.js +1 -1
  104. package/esm/components/QTextArea/index.d.ts +3 -0
  105. package/esm/components/QTextArea/index.d.ts.map +1 -1
  106. package/esm/components/QTextField/QTextField.d.ts +2 -2
  107. package/esm/components/QTextField/QTextField.vue.js +1 -1
  108. package/esm/components/QTextField/index.d.ts +4 -1
  109. package/esm/components/QTextField/index.d.ts.map +1 -1
  110. package/esm/components/index.d.ts +3 -0
  111. package/esm/components/index.d.ts.map +1 -1
  112. package/esm/components/index.js +67 -60
  113. package/esm/composables/group.d.ts.map +1 -1
  114. package/esm/composables/group.js +1 -1
  115. package/esm/index.d.ts +4 -0
  116. package/esm/utils/merge.d.ts.map +1 -1
  117. package/esm/utils/merge.js +12 -16
  118. package/esm/vendors/@vueuse/core/index.js +173 -67
  119. package/esm/vendors/@vueuse/integrations/useFocusTrap/component.js +24 -0
  120. package/esm/vendors/@vueuse/shared/index.js +36 -15
  121. package/esm/vendors/focus-trap/dist/focus-trap.esm.js +473 -0
  122. package/esm/vendors/tabbable/dist/index.esm.js +202 -0
  123. package/package.json +3 -1
@@ -1,85 +1,191 @@
1
- import { toRef as y, isClient as x, tryOnScopeDispose as _ } from "../shared/index.js";
2
- import { noop as C } from "../shared/index.js";
3
- import { shallowRef as m, watch as v, nextTick as b, toValue as h, computed as w, getCurrentInstance as R, onMounted as z } from "vue";
4
- const p = x ? window : void 0;
5
- function g(e) {
6
- var t;
7
- const r = h(e);
8
- return (t = r == null ? void 0 : r.$el) != null ? t : r;
1
+ import { noop as g, isIOS as $, toRef as w, isClient as C, toArray as x, watchImmediate as F, tryOnScopeDispose as I, isObject as W } from "../shared/index.js";
2
+ import { shallowRef as M, watch as O, nextTick as q, computed as P, toValue as v, unref as L, getCurrentInstance as _, onMounted as B } from "vue";
3
+ const E = C ? window : void 0;
4
+ function y(e) {
5
+ var r;
6
+ const a = v(e);
7
+ return (r = a == null ? void 0 : a.$el) != null ? r : a;
9
8
  }
10
- function A() {
11
- const e = m(!1), t = R();
12
- return t && z(() => {
9
+ function A(...e) {
10
+ const r = [], a = () => {
11
+ r.forEach((u) => u()), r.length = 0;
12
+ }, o = (u, n, i, s) => (u.addEventListener(n, i, s), () => u.removeEventListener(n, i, s)), c = P(() => {
13
+ const u = x(v(e[0])).filter((n) => n != null);
14
+ return u.every((n) => typeof n != "string") ? u : void 0;
15
+ }), f = F(
16
+ () => {
17
+ var u, n;
18
+ return [
19
+ (n = (u = c.value) == null ? void 0 : u.map((i) => y(i))) != null ? n : [E].filter((i) => i != null),
20
+ x(v(c.value ? e[1] : e[0])),
21
+ x(L(c.value ? e[2] : e[1])),
22
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
23
+ v(c.value ? e[3] : e[2])
24
+ ];
25
+ },
26
+ ([u, n, i, s]) => {
27
+ if (a(), !(u != null && u.length) || !(n != null && n.length) || !(i != null && i.length))
28
+ return;
29
+ const d = W(s) ? { ...s } : s;
30
+ r.push(
31
+ ...u.flatMap(
32
+ (m) => n.flatMap(
33
+ (b) => i.map((R) => o(m, b, R, d))
34
+ )
35
+ )
36
+ );
37
+ },
38
+ { flush: "post" }
39
+ ), h = () => {
40
+ f(), a();
41
+ };
42
+ return I(a), h;
43
+ }
44
+ let z = !1;
45
+ function J(e, r, a = {}) {
46
+ const { window: o = E, ignore: c = [], capture: f = !0, detectIframe: h = !1, controls: u = !1 } = a;
47
+ if (!o)
48
+ return u ? { stop: g, cancel: g, trigger: g } : g;
49
+ if ($ && !z) {
50
+ z = !0;
51
+ const t = { passive: !0 };
52
+ Array.from(o.document.body.children).forEach((l) => A(l, "click", g, t)), A(o.document.documentElement, "click", g, t);
53
+ }
54
+ let n = !0;
55
+ const i = (t) => v(c).some((l) => {
56
+ if (typeof l == "string")
57
+ return Array.from(o.document.querySelectorAll(l)).some((p) => p === t.target || t.composedPath().includes(p));
58
+ {
59
+ const p = y(l);
60
+ return p && (t.target === p || t.composedPath().includes(p));
61
+ }
62
+ });
63
+ function s(t) {
64
+ const l = v(t);
65
+ return l && l.$.subTree.shapeFlag === 16;
66
+ }
67
+ function d(t, l) {
68
+ const p = v(t), T = p.$.subTree && p.$.subTree.children;
69
+ return T == null || !Array.isArray(T) ? !1 : T.some((S) => S.el === l.target || l.composedPath().includes(S.el));
70
+ }
71
+ const m = (t) => {
72
+ const l = y(e);
73
+ if (t.target != null && !(!(l instanceof Element) && s(e) && d(e, t)) && !(!l || l === t.target || t.composedPath().includes(l))) {
74
+ if ("detail" in t && t.detail === 0 && (n = !i(t)), !n) {
75
+ n = !0;
76
+ return;
77
+ }
78
+ r(t);
79
+ }
80
+ };
81
+ let b = !1;
82
+ const R = [
83
+ A(o, "click", (t) => {
84
+ b || (b = !0, setTimeout(() => {
85
+ b = !1;
86
+ }, 0), m(t));
87
+ }, { passive: !0, capture: f }),
88
+ A(o, "pointerdown", (t) => {
89
+ const l = y(e);
90
+ n = !i(t) && !!(l && !t.composedPath().includes(l));
91
+ }, { passive: !0 }),
92
+ h && A(o, "blur", (t) => {
93
+ setTimeout(() => {
94
+ var l;
95
+ const p = y(e);
96
+ ((l = o.document.activeElement) == null ? void 0 : l.tagName) === "IFRAME" && !(p != null && p.contains(o.document.activeElement)) && r(t);
97
+ }, 0);
98
+ }, { passive: !0 })
99
+ ].filter(Boolean), k = () => R.forEach((t) => t());
100
+ return u ? {
101
+ stop: k,
102
+ cancel: () => {
103
+ n = !1;
104
+ },
105
+ trigger: (t) => {
106
+ n = !0, m(t), n = !1;
107
+ }
108
+ } : k;
109
+ }
110
+ function H() {
111
+ const e = M(!1), r = _();
112
+ return r && B(() => {
13
113
  e.value = !0;
14
- }, t), e;
114
+ }, r), e;
15
115
  }
16
- function O(e) {
17
- const t = A();
18
- return w(() => (t.value, !!e()));
116
+ function j(e) {
117
+ const r = H();
118
+ return P(() => (r.value, !!e()));
19
119
  }
20
- function M(e, t, r = {}) {
21
- const { window: d = p, ...u } = r;
22
- let l;
23
- const o = O(() => d && "ResizeObserver" in d), a = () => {
24
- l && (l.disconnect(), l = void 0);
25
- }, f = w(() => {
26
- const i = h(e);
27
- return Array.isArray(i) ? i.map((s) => g(s)) : [g(i)];
28
- }), c = v(
29
- f,
30
- (i) => {
31
- if (a(), o.value && d) {
32
- l = new ResizeObserver(t);
33
- for (const s of i)
34
- s && l.observe(s, u);
120
+ function D(e, r, a = {}) {
121
+ const { window: o = E, ...c } = a;
122
+ let f;
123
+ const h = j(() => o && "ResizeObserver" in o), u = () => {
124
+ f && (f.disconnect(), f = void 0);
125
+ }, n = P(() => {
126
+ const d = v(e);
127
+ return Array.isArray(d) ? d.map((m) => y(m)) : [y(d)];
128
+ }), i = O(
129
+ n,
130
+ (d) => {
131
+ if (u(), h.value && o) {
132
+ f = new ResizeObserver(r);
133
+ for (const m of d)
134
+ m && f.observe(m, c);
35
135
  }
36
136
  },
37
137
  { immediate: !0, flush: "post" }
38
- ), n = () => {
39
- a(), c();
138
+ ), s = () => {
139
+ u(), i();
40
140
  };
41
- return _(n), {
42
- isSupported: o,
43
- stop: n
141
+ return I(s), {
142
+ isSupported: h,
143
+ stop: s
44
144
  };
45
145
  }
46
- function S(e = p, t) {
47
- e && typeof e.requestAnimationFrame == "function" ? e.requestAnimationFrame(t) : t();
146
+ function N(e = E, r) {
147
+ e && typeof e.requestAnimationFrame == "function" ? e.requestAnimationFrame(r) : r();
48
148
  }
49
- function F(e = {}) {
50
- var t, r;
51
- const { window: d = p } = e, u = y(e == null ? void 0 : e.element), l = y((t = e == null ? void 0 : e.input) != null ? t : ""), o = (r = e == null ? void 0 : e.styleProp) != null ? r : "height", a = m(1), f = m(0);
52
- function c() {
53
- var n;
54
- if (!u.value)
149
+ function K(e = {}) {
150
+ var r, a;
151
+ const { window: o = E } = e, c = w(e == null ? void 0 : e.element), f = w((r = e == null ? void 0 : e.input) != null ? r : ""), h = (a = e == null ? void 0 : e.styleProp) != null ? a : "height", u = M(1), n = M(0);
152
+ function i() {
153
+ var s;
154
+ if (!c.value)
55
155
  return;
56
- let i = "";
57
- u.value.style[o] = "1px", a.value = (n = u.value) == null ? void 0 : n.scrollHeight;
58
- const s = h(e == null ? void 0 : e.styleTarget);
59
- s ? s.style[o] = `${a.value}px` : i = `${a.value}px`, u.value.style[o] = i;
156
+ let d = "";
157
+ c.value.style[h] = "1px", u.value = (s = c.value) == null ? void 0 : s.scrollHeight;
158
+ const m = v(e == null ? void 0 : e.styleTarget);
159
+ m ? m.style[h] = `${u.value}px` : d = `${u.value}px`, c.value.style[h] = d;
60
160
  }
61
- return v([l, u], () => b(c), { immediate: !0 }), v(a, () => {
62
- var n;
63
- return (n = e == null ? void 0 : e.onResize) == null ? void 0 : n.call(e);
64
- }), M(u, ([{ contentRect: n }]) => {
65
- f.value !== n.width && S(d, () => {
66
- f.value = n.width, c();
161
+ return O([f, c], () => q(i), { immediate: !0 }), O(u, () => {
162
+ var s;
163
+ return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
164
+ }), D(c, ([{ contentRect: s }]) => {
165
+ n.value !== s.width && N(o, () => {
166
+ n.value = s.width, i();
67
167
  });
68
- }), e != null && e.watch && v(e.watch, c, { immediate: !0, deep: !0 }), {
69
- textarea: u,
70
- input: l,
71
- triggerResize: c
168
+ }), e != null && e.watch && O(e.watch, i, { immediate: !0, deep: !0 }), {
169
+ textarea: c,
170
+ input: f,
171
+ triggerResize: i
72
172
  };
73
173
  }
74
174
  export {
75
- p as defaultWindow,
76
- x as isClient,
77
- C as noop,
78
- y as toRef,
79
- _ as tryOnScopeDispose,
80
- g as unrefElement,
81
- A as useMounted,
82
- M as useResizeObserver,
83
- O as useSupported,
84
- F as useTextareaAutosize
175
+ E as defaultWindow,
176
+ C as isClient,
177
+ $ as isIOS,
178
+ W as isObject,
179
+ g as noop,
180
+ J as onClickOutside,
181
+ x as toArray,
182
+ w as toRef,
183
+ I as tryOnScopeDispose,
184
+ y as unrefElement,
185
+ A as useEventListener,
186
+ H as useMounted,
187
+ D as useResizeObserver,
188
+ j as useSupported,
189
+ K as useTextareaAutosize,
190
+ F as watchImmediate
85
191
  };
@@ -0,0 +1,24 @@
1
+ import { unrefElement as p } from "../../core/index.js";
2
+ import { createFocusTrap as c } from "../../../focus-trap/dist/focus-trap.esm.js";
3
+ import { defineComponent as i, ref as f, watch as u, onScopeDispose as m, h as d } from "vue";
4
+ const F = /* @__PURE__ */ i({
5
+ name: "UseFocusTrap",
6
+ props: ["as", "options"],
7
+ setup(e, { slots: o }) {
8
+ let t;
9
+ const r = f(), n = () => t && t.activate(), s = () => t && t.deactivate();
10
+ return u(
11
+ () => p(r),
12
+ (a) => {
13
+ a && (t = c(a, e.options || {}), n());
14
+ },
15
+ { flush: "post" }
16
+ ), m(() => s()), () => {
17
+ if (o.default)
18
+ return d(e.as || "div", { ref: r }, o.default());
19
+ };
20
+ }
21
+ });
22
+ export {
23
+ F as UseFocusTrap
24
+ };
@@ -1,20 +1,41 @@
1
- import { toRef as n, readonly as t, ref as f, customRef as r, getCurrentScope as i, onScopeDispose as c } from "vue";
2
- function s(e) {
3
- return i() ? (c(e), !0) : !1;
1
+ import { toRef as o, readonly as i, ref as r, customRef as u, watch as d, getCurrentScope as c, onScopeDispose as f } from "vue";
2
+ function g(n) {
3
+ return c() ? (f(n), !0) : !1;
4
4
  }
5
- const l = typeof window < "u" && typeof document < "u";
5
+ const s = typeof window < "u" && typeof document < "u";
6
6
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
7
- const p = () => {
8
- };
9
- function d(...e) {
10
- if (e.length !== 1)
11
- return n(...e);
12
- const o = e[0];
13
- return typeof o == "function" ? t(r(() => ({ get: o, set: p }))) : f(o);
7
+ const a = Object.prototype.toString, y = (n) => a.call(n) === "[object Object]", l = () => {
8
+ }, m = /* @__PURE__ */ w();
9
+ function w() {
10
+ var n, e;
11
+ return s && ((n = window == null ? void 0 : window.navigator) == null ? void 0 : n.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
12
+ }
13
+ function S(...n) {
14
+ if (n.length !== 1)
15
+ return o(...n);
16
+ const e = n[0];
17
+ return typeof e == "function" ? i(u(() => ({ get: e, set: l }))) : r(e);
18
+ }
19
+ function b(n) {
20
+ return Array.isArray(n) ? n : [n];
21
+ }
22
+ function h(n, e, t) {
23
+ return d(
24
+ n,
25
+ e,
26
+ {
27
+ ...t,
28
+ immediate: !0
29
+ }
30
+ );
14
31
  }
15
32
  export {
16
- l as isClient,
17
- p as noop,
18
- d as toRef,
19
- s as tryOnScopeDispose
33
+ s as isClient,
34
+ m as isIOS,
35
+ y as isObject,
36
+ l as noop,
37
+ b as toArray,
38
+ S as toRef,
39
+ g as tryOnScopeDispose,
40
+ h as watchImmediate
20
41
  };