@quidgest/ui 0.16.49 → 0.16.51

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 (56) hide show
  1. package/dist/json/api.json +220 -5
  2. package/dist/manifest/components.json +1 -0
  3. package/dist/ui.css +9 -0
  4. package/dist/ui.esm.js +7048 -7703
  5. package/dist/ui.js +27 -38
  6. package/dist/ui.min.css +1 -1
  7. package/dist/ui.min.js +1026 -1148
  8. package/dist/ui.scss +9 -1
  9. package/esm/components/QDialog/QDialog.d.ts +3 -2
  10. package/esm/components/QDialog/QDialog.d.ts.map +1 -1
  11. package/esm/components/QDialog/QDialog.vue.js +83 -77
  12. package/esm/components/QDialog/index.d.ts +21 -9
  13. package/esm/components/QDialog/index.d.ts.map +1 -1
  14. package/esm/components/QDialog/types.d.ts +24 -3
  15. package/esm/components/QDialog/types.d.ts.map +1 -1
  16. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +3 -3
  17. package/esm/components/QDropdownMenu/index.d.ts +9 -9
  18. package/esm/components/QFocusWrap/QFocusWrap.d.ts +26 -0
  19. package/esm/components/QFocusWrap/QFocusWrap.d.ts.map +1 -0
  20. package/esm/components/QFocusWrap/QFocusWrap.vue.js +119 -0
  21. package/esm/components/QFocusWrap/QFocusWrap.vue2.js +4 -0
  22. package/esm/components/QFocusWrap/index.d.ts +31 -0
  23. package/esm/components/QFocusWrap/index.d.ts.map +1 -0
  24. package/esm/components/QFocusWrap/index.js +6 -0
  25. package/esm/components/QFocusWrap/types.d.ts +42 -0
  26. package/esm/components/QFocusWrap/types.d.ts.map +1 -0
  27. package/esm/components/QOverlay/QOverlay.d.ts +5 -4
  28. package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
  29. package/esm/components/QOverlay/QOverlay.vue.js +126 -120
  30. package/esm/components/QOverlay/index.d.ts +36 -24
  31. package/esm/components/QOverlay/index.d.ts.map +1 -1
  32. package/esm/components/QOverlay/types.d.ts +25 -3
  33. package/esm/components/QOverlay/types.d.ts.map +1 -1
  34. package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +17 -14
  35. package/esm/components/QPopover/QPopover.d.ts +1 -1
  36. package/esm/components/QPopover/QPopover.d.ts.map +1 -1
  37. package/esm/components/QPopover/QPopover.vue.js +13 -14
  38. package/esm/components/QPopover/index.d.ts +6 -6
  39. package/esm/components/QSelect/QSelect.d.ts +8 -8
  40. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  41. package/esm/components/QSelect/QSelect.vue.js +79 -77
  42. package/esm/components/QSelect/constants.d.ts +1 -0
  43. package/esm/components/QSelect/constants.d.ts.map +1 -1
  44. package/esm/components/QSelect/constants.js +10 -8
  45. package/esm/components/QTooltip/QTooltip.d.ts +3 -3
  46. package/esm/components/QTooltip/index.d.ts +18 -18
  47. package/esm/components/index.d.ts +1 -0
  48. package/esm/components/index.d.ts.map +1 -1
  49. package/esm/components/index.js +76 -74
  50. package/esm/composables/useDialog/index.d.ts +4 -1
  51. package/esm/composables/useDialog/index.d.ts.map +1 -1
  52. package/esm/index.d.ts +1 -0
  53. package/package.json +1 -3
  54. package/esm/vendors/focus-trap/dist/focus-trap.esm.js +0 -473
  55. package/esm/vendors/focus-trap-vue/dist/focus-trap-vue.esm-browser.js +0 -104
  56. package/esm/vendors/tabbable/dist/index.esm.js +0 -202
@@ -0,0 +1,119 @@
1
+ import { defineComponent as v, useTemplateRef as h, onBeforeUnmount as y, nextTick as c, watch as x, createElementBlock as u, openBlock as r, Fragment as B, createCommentVNode as d, createElementVNode as S, renderSlot as _ } from "vue";
2
+ const w = { ref: "container" }, A = /* @__PURE__ */ v({
3
+ __name: "QFocusWrap",
4
+ props: {
5
+ id: {},
6
+ class: {},
7
+ active: { type: Boolean, default: !0 },
8
+ initialFocus: {},
9
+ focusWithinOnActivate: { type: Boolean, default: !0 },
10
+ closingFocus: {},
11
+ returnFocusOnDeactivate: { type: Boolean }
12
+ },
13
+ setup(b) {
14
+ const t = b, p = h("container"), m = [
15
+ "a[href]",
16
+ "area[href]",
17
+ "input:not([disabled])",
18
+ "select:not([disabled])",
19
+ "textarea:not([disabled])",
20
+ "button:not([disabled])",
21
+ "iframe",
22
+ "object",
23
+ "embed",
24
+ '[tabindex]:not([tabindex="-1"])',
25
+ "[contenteditable]"
26
+ ].join(",");
27
+ let i;
28
+ y(() => {
29
+ t.closingFocus ? c(() => {
30
+ a(t.closingFocus);
31
+ }) : t.returnFocusOnDeactivate && c(() => {
32
+ a(i);
33
+ });
34
+ });
35
+ function F(n) {
36
+ return n ? Array.prototype.slice.call(
37
+ n.querySelectorAll(m)
38
+ ).filter((o) => (o.offsetWidth > 0 || o.offsetHeight > 0 || o.getClientRects().length > 0) && !o.getAttribute("data-focus-wall")) : void 0;
39
+ }
40
+ function l(n) {
41
+ const e = F(p.value);
42
+ if (!e || e.length === 0) return;
43
+ const o = n === "first" ? 0 : e.length - 1, s = e[o];
44
+ typeof (s == null ? void 0 : s.focus) == "function" && s.focus();
45
+ }
46
+ function f() {
47
+ l("first");
48
+ }
49
+ function g() {
50
+ l("last");
51
+ }
52
+ function a(n) {
53
+ let e;
54
+ typeof n == "string" ? e = document.querySelector(n) : e = n, typeof (e == null ? void 0 : e.focus) == "function" && (e == null || e.focus());
55
+ }
56
+ return x(
57
+ () => t.active,
58
+ () => {
59
+ t.active ? (t.returnFocusOnDeactivate && (i = document.activeElement), t.initialFocus ? c(() => {
60
+ a(t.initialFocus);
61
+ }) : t.focusWithinOnActivate && c(() => {
62
+ f();
63
+ })) : t.closingFocus ? c(() => {
64
+ a(t.closingFocus);
65
+ }) : t.returnFocusOnDeactivate && c(() => {
66
+ a(i);
67
+ });
68
+ },
69
+ {
70
+ immediate: !0
71
+ }
72
+ ), (n, e) => (r(), u(
73
+ B,
74
+ null,
75
+ [
76
+ t.active ? (r(), u(
77
+ "span",
78
+ {
79
+ key: 0,
80
+ class: "q-focus-wrap",
81
+ tabindex: "0",
82
+ "data-focus-wall": "true",
83
+ onFocus: g
84
+ },
85
+ null,
86
+ 32
87
+ /* NEED_HYDRATION */
88
+ )) : d("v-if", !0),
89
+ S(
90
+ "span",
91
+ w,
92
+ [
93
+ _(n.$slots, "default")
94
+ ],
95
+ 512
96
+ /* NEED_PATCH */
97
+ ),
98
+ t.active ? (r(), u(
99
+ "span",
100
+ {
101
+ key: 1,
102
+ class: "q-focus-wrap",
103
+ tabindex: "0",
104
+ "data-focus-wall": "true",
105
+ onFocus: f
106
+ },
107
+ null,
108
+ 32
109
+ /* NEED_HYDRATION */
110
+ )) : d("v-if", !0)
111
+ ],
112
+ 64
113
+ /* STABLE_FRAGMENT */
114
+ ));
115
+ }
116
+ });
117
+ export {
118
+ A as default
119
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./QFocusWrap.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,31 @@
1
+ declare const QFocusWrap: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').QFocusWrapProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
3
+ active: boolean;
4
+ focusWithinOnActivate: boolean;
5
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
6
+ container: HTMLSpanElement;
7
+ }, any, import('vue').ComponentProvideOptions, {
8
+ P: {};
9
+ B: {};
10
+ D: {};
11
+ C: {};
12
+ M: {};
13
+ Defaults: {};
14
+ }, Readonly<import('./types').QFocusWrapProps> & Readonly<{}>, {}, {}, {}, {}, {
15
+ active: boolean;
16
+ focusWithinOnActivate: boolean;
17
+ }>;
18
+ __isFragment?: never;
19
+ __isTeleport?: never;
20
+ __isSuspense?: never;
21
+ } & import('vue').ComponentOptionsBase<Readonly<import('./types').QFocusWrapProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
22
+ active: boolean;
23
+ focusWithinOnActivate: boolean;
24
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
25
+ $slots: {
26
+ default?(_: {}): any;
27
+ };
28
+ });
29
+ export { QFocusWrap };
30
+ export * from './types';
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QFocusWrap/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA+B,CAAA;AAG/C,OAAO,EAAE,UAAU,EAAE,CAAA;AAGrB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,6 @@
1
+ import o from "./QFocusWrap.vue.js";
2
+ import { setupPropsProxy as r } from "../../utils/setupPropsProxy.js";
3
+ const s = r(o);
4
+ export {
5
+ s as QFocusWrap
6
+ };
@@ -0,0 +1,42 @@
1
+ import { QBaseComponentProps } from '../../types/component';
2
+ export type QFocusWrapProps = QBaseComponentProps & {
3
+ /**
4
+ * Whether to enable focus wrapping within the components contents.
5
+ * When enabled, focus will wrap from the last element to the first
6
+ * when tabbing forward and from the first element to the last
7
+ * when tabbing backward.
8
+ *
9
+ * @category Behavior
10
+ */
11
+ active?: boolean;
12
+ /**
13
+ * Element to set focus on when the focus wrap is activated.
14
+ * Has priority over focusWithinOnActivate
15
+ *
16
+ * @category Behavior
17
+ */
18
+ initialFocus?: HTMLElement | string | null;
19
+ /**
20
+ * Whether to focus on the first focusable element within when
21
+ * activating the focus wrap.
22
+ *
23
+ * @category Behavior
24
+ */
25
+ focusWithinOnActivate?: boolean;
26
+ /**
27
+ * Element to set focus on when the focus wrap is deactivated.
28
+ * Has priority over returnFocusOnDeactivate.
29
+ *
30
+ * @category Behavior
31
+ */
32
+ closingFocus?: HTMLElement | string | null;
33
+ /**
34
+ * Whether to return focus to the element that had focus before
35
+ * activating the focus wrap.
36
+ *
37
+ * @category Behavior
38
+ */
39
+ returnFocusOnDeactivate?: boolean;
40
+ };
41
+ export type QFocusWrapElementIndicator = 'first' | 'last';
42
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QFocusWrap/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG;IACnD;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAAA;IAE1C;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAAA;IAE1C;;;;;OAKG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,MAAM,CAAA"}
@@ -28,14 +28,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
28
28
  }>, {
29
29
  transition: string;
30
30
  width: "auto" | "anchor";
31
- placement: import('../../composables/overlay').Placement;
32
- appearance: import('../../composables/overlay').Appearance;
31
+ placement: import('./types').QOverlayPlacement;
32
+ focusWithinOnActivate: boolean;
33
+ returnFocusOnDeactivate: boolean;
34
+ appearance: import('./types').QOverlayAppearance;
33
35
  offset: number;
34
36
  crossOffset: number;
35
37
  attach: string;
36
38
  delay: number;
37
- trigger: import('../../composables/overlay').Trigger;
38
- returnFocusOnDeactivate: boolean;
39
+ trigger: import('./types').QOverlayTrigger;
39
40
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
40
41
  overlayContainerRef: HTMLDivElement;
41
42
  overlayRef: HTMLDivElement;
@@ -1 +1 @@
1
- {"version":3,"file":"QOverlay.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QOverlay/QOverlay.vue"],"names":[],"mappings":"AA8DA;AAuhBC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAM5C,KAAK,WAAW,GAAG,aAAa,CAAC;AA0clC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WA6KT,OAAO,IAA6B;;yBAdpB,GAAG;;;;;;;;EAmBhC;AA+BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;OASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"QOverlay.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QOverlay/QOverlay.vue"],"names":[],"mappings":"AAgEA;AA0hBC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAM5C,KAAK,WAAW,GAAG,aAAa,CAAC;AA4clC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAgLT,OAAO,IAA6B;;yBAdpB,GAAG;;;;;;;;EAmBhC;AA8BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;OASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}