@quidgest/ui 0.16.4 → 0.16.6

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 (41) hide show
  1. package/dist/manifest/components.json +1 -0
  2. package/dist/ui.css +1 -1
  3. package/dist/ui.esm.js +2545 -2475
  4. package/dist/ui.js +24 -24
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +672 -662
  7. package/dist/ui.scss +3 -3
  8. package/esm/components/QDialog/QDialog.d.ts +5 -0
  9. package/esm/components/QDialog/QDialog.d.ts.map +1 -1
  10. package/esm/components/QDialog/QDialog.vue.js +66 -58
  11. package/esm/components/QDialog/QDialogProvider.d.ts +3 -0
  12. package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -0
  13. package/esm/components/QDialog/QDialogProvider.vue.js +26 -0
  14. package/esm/components/QDialog/QDialogProvider.vue2.js +4 -0
  15. package/esm/components/QDialog/index.d.ts +14 -1
  16. package/esm/components/QDialog/index.d.ts.map +1 -1
  17. package/esm/components/QDialog/index.js +6 -4
  18. package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
  19. package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +26 -24
  20. package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
  21. package/esm/components/QTooltip/QTooltip.vue.js +47 -46
  22. package/esm/components/index.js +70 -69
  23. package/esm/composables/index.d.ts +2 -1
  24. package/esm/composables/index.d.ts.map +1 -1
  25. package/esm/composables/theme.js +3 -3
  26. package/esm/composables/useDialog/index.d.ts +69 -0
  27. package/esm/composables/useDialog/index.d.ts.map +1 -0
  28. package/esm/composables/useDialog/index.js +21 -0
  29. package/esm/composables/useDialog/types.d.ts +25 -0
  30. package/esm/composables/useDialog/types.d.ts.map +1 -0
  31. package/esm/composables/useDismissibleLayerStack/index.d.ts +14 -0
  32. package/esm/composables/useDismissibleLayerStack/index.d.ts.map +1 -0
  33. package/esm/composables/useDismissibleLayerStack/index.js +32 -0
  34. package/esm/framework.d.ts.map +1 -1
  35. package/esm/framework.js +35 -31
  36. package/esm/index.d.ts +1 -0
  37. package/esm/index.js +4 -2
  38. package/esm/symbols/dismissibleLayer.d.ts +4 -0
  39. package/esm/symbols/dismissibleLayer.d.ts.map +1 -0
  40. package/esm/symbols/dismissibleLayer.js +4 -0
  41. package/package.json +1 -1
package/dist/ui.scss CHANGED
@@ -1,8 +1,9 @@
1
1
  /*!
2
- * Quidgest UI v0.16.4
2
+ * Quidgest UI v0.16.6
3
3
  * (c) 2025 Quidgest - Consultores de Gestão, S.A.
4
4
  * Released under the MIT License.
5
5
  */
6
+ @use 'sass:math';
6
7
 
7
8
  *,
8
9
  ::before,
@@ -1522,7 +1523,6 @@ $transition-duration: 0.2s !default;
1522
1523
  }
1523
1524
  }
1524
1525
  }
1525
- @use 'sass:math';
1526
1526
  .q-container {
1527
1527
  width: 100%;
1528
1528
  margin-left: auto;
@@ -1906,7 +1906,7 @@ $arrow-tip-radius: 0.1rem;
1906
1906
  &__underlay {
1907
1907
  position: fixed;
1908
1908
  inset: 0;
1909
- z-index: $overlay-z-index - 1;
1909
+ z-index: $overlay-z-index;
1910
1910
  &--blur {
1911
1911
  backdrop-filter: blur(2px);
1912
1912
  }
@@ -18,8 +18,13 @@ declare function __VLS_template(): {
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
20
  "update:modelValue": (value: boolean) => any;
21
+ } & {
22
+ enter: () => any;
23
+ leave: () => any;
21
24
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
25
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
26
+ onEnter?: (() => any) | undefined;
27
+ onLeave?: (() => any) | undefined;
23
28
  }>, {
24
29
  size: import('./types').QDialogSize;
25
30
  html: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"QDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialog.vue"],"names":[],"mappings":"AAuEA;AAuHC,OAAO,EAAiC,aAAa,EAAE,MAAM,SAAS,CAAA;AAQtE,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAKzD,KAAK,WAAW,GAAG,YAAY,CAAC;AA0CjC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAuLT,OAAO,IAA6B;;wBAdtB,GAAG;sBACL,GAAG;6BACI,GAAG;+BACA,GAAG;wBACV,GAAG;;;;EAe/B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;6EASnB,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":"QDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialog.vue"],"names":[],"mappings":"AAyEA;AAsIC,OAAO,EAAiC,aAAa,EAAE,MAAM,SAAS,CAAA;AAQtE,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAKzD,KAAK,WAAW,GAAG,YAAY,CAAC;AAwDjC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAkMT,OAAO,IAA6B;;wBAdrB,GAAG;sBACL,GAAG;6BACI,GAAG;+BACD,GAAG;wBACV,GAAG;;;;EAe/B;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;6EASnB,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,55 +1,61 @@
1
- import { defineComponent as T, mergeModels as D, useModel as L, computed as y, createBlock as d, openBlock as l, unref as a, normalizeClass as v, withCtx as _, createElementVNode as c, createElementBlock as s, createCommentVNode as i, renderSlot as n, toDisplayString as k, createVNode as h, normalizeProps as g, guardReactiveProps as b, Fragment as N, renderList as z, mergeProps as B } from "vue";
2
- import { DEFAULT_ICONS as E, DEFAULT_BUTTONS as M, DEFAULT_ICON as U } from "./types.js";
3
- import { QButton as q } from "../QButton/index.js";
4
- import { QIcon as f } from "../QIcon/index.js";
5
- import { QOverlay as A } from "../QOverlay/index.js";
6
- const F = {
1
+ import { defineComponent as z, mergeModels as v, useModel as M, computed as k, createBlock as d, openBlock as l, unref as a, normalizeClass as h, withCtx as f, createElementVNode as c, createElementBlock as s, createCommentVNode as i, renderSlot as r, toDisplayString as g, createVNode as b, normalizeProps as B, guardReactiveProps as q, Fragment as U, renderList as A, mergeProps as C } from "vue";
2
+ import { DEFAULT_ICONS as F, DEFAULT_BUTTONS as O, DEFAULT_ICON as Q } from "./types.js";
3
+ import { QButton as V } from "../QButton/index.js";
4
+ import { QIcon as m } from "../QIcon/index.js";
5
+ import { QOverlay as S } from "../QOverlay/index.js";
6
+ const I = {
7
7
  key: 0,
8
8
  class: "q-dialog__header"
9
- }, O = { class: "q-dialog__header-title" }, Q = {
9
+ }, P = { class: "q-dialog__header-title" }, H = {
10
10
  key: 1,
11
11
  class: "q-dialog__body"
12
- }, S = {
12
+ }, w = {
13
13
  key: 0,
14
14
  class: "q-dialog__body-icon"
15
- }, I = { class: "q-dialog__body-text" }, P = ["innerHTML"], H = { key: 1 }, w = {
15
+ }, x = { class: "q-dialog__body-text" }, R = ["innerHTML"], j = { key: 1 }, G = {
16
16
  key: 2,
17
17
  class: "q-dialog__footer"
18
- }, x = { class: "q-dialog__footer-buttons" }, W = /* @__PURE__ */ T({
18
+ }, J = { class: "q-dialog__footer-buttons" }, ee = /* @__PURE__ */ z({
19
19
  __name: "QDialog",
20
- props: /* @__PURE__ */ D({
20
+ props: /* @__PURE__ */ v({
21
21
  id: {},
22
22
  class: {},
23
23
  title: {},
24
24
  text: {},
25
- icon: { default: () => U },
26
- buttons: { default: () => M },
25
+ icon: { default: () => Q },
26
+ buttons: { default: () => O },
27
27
  attach: { default: "body" },
28
28
  inline: { type: Boolean },
29
29
  backdropBlur: { type: Boolean, default: !0 },
30
30
  dismissible: { type: Boolean },
31
31
  html: { type: Boolean, default: !0 },
32
- icons: { default: () => E },
32
+ icons: { default: () => F },
33
33
  size: { default: "small" },
34
34
  centerVertically: { type: Boolean }
35
35
  }, {
36
36
  modelValue: { type: Boolean },
37
37
  modelModifiers: {}
38
38
  }),
39
- emits: ["update:modelValue"],
40
- setup(m) {
41
- const e = m, u = L(m, "modelValue"), C = y(() => ["q-dialog", e.class]), V = y(() => `q-overlay--${e.size}`);
42
- function p() {
39
+ emits: /* @__PURE__ */ v(["enter", "leave"], ["update:modelValue"]),
40
+ setup(_, { emit: $ }) {
41
+ const e = _, p = $, u = M(_, "modelValue"), L = k(() => ["q-dialog", e.class]), T = k(() => `q-overlay--${e.size}`);
42
+ function y() {
43
43
  u.value = !1;
44
44
  }
45
- function $(o) {
46
- var r;
47
- (r = o.action) == null || r.call(o), p();
45
+ function D(o) {
46
+ var n;
47
+ (n = o.action) == null || n.call(o), y();
48
48
  }
49
- return (o, r) => (l(), d(a(A), {
49
+ function E() {
50
+ p("enter");
51
+ }
52
+ function N() {
53
+ p("leave");
54
+ }
55
+ return (o, n) => (l(), d(a(S), {
50
56
  id: e.id,
51
57
  modelValue: u.value,
52
- "onUpdate:modelValue": r[0] || (r[0] = (t) => u.value = t),
58
+ "onUpdate:modelValue": n[0] || (n[0] = (t) => u.value = t),
53
59
  "backdrop-class": "q-dialog__underlay",
54
60
  "scroll-lock": "",
55
61
  persistent: "",
@@ -57,68 +63,70 @@ const F = {
57
63
  attach: e.attach,
58
64
  "backdrop-blur": e.backdropBlur,
59
65
  "center-vertically": e.centerVertically,
60
- class: v(V.value)
66
+ class: h(T.value),
67
+ onEnter: E,
68
+ onLeave: N
61
69
  }, {
62
- default: _(() => [
70
+ default: f(() => [
63
71
  c(
64
72
  "div",
65
73
  {
66
- class: v(C.value)
74
+ class: h(L.value)
67
75
  },
68
76
  [
69
- e.title || o.$slots.header ? (l(), s("div", F, [
70
- n(o.$slots, "header", {}, () => [
77
+ e.title || o.$slots.header ? (l(), s("div", I, [
78
+ r(o.$slots, "header", {}, () => [
71
79
  c(
72
80
  "span",
73
- O,
74
- k(e.title),
81
+ P,
82
+ g(e.title),
75
83
  1
76
84
  /* TEXT */
77
85
  )
78
86
  ])
79
87
  ])) : i("v-if", !0),
80
- e.icon || e.text || o.$slots.body ? (l(), s("div", Q, [
81
- n(o.$slots, "body", {}, () => [
82
- n(o.$slots, "body.icon", {}, () => [
83
- e.icon ? (l(), s("span", S, [
84
- h(
85
- a(f),
86
- g(b(e.icon)),
88
+ e.icon || e.text || o.$slots.body ? (l(), s("div", H, [
89
+ r(o.$slots, "body", {}, () => [
90
+ r(o.$slots, "body.icon", {}, () => [
91
+ e.icon ? (l(), s("span", w, [
92
+ b(
93
+ a(m),
94
+ B(q(e.icon)),
87
95
  null,
88
96
  16
89
97
  /* FULL_PROPS */
90
98
  )
91
99
  ])) : i("v-if", !0)
92
100
  ]),
93
- c("div", I, [
101
+ c("div", x, [
94
102
  e.html ? (l(), s("div", {
95
103
  key: 0,
96
104
  innerHTML: e.text
97
- }, null, 8, P)) : (l(), s(
105
+ }, null, 8, R)) : (l(), s(
98
106
  "div",
99
- H,
100
- k(e.text),
107
+ j,
108
+ g(e.text),
101
109
  1
102
110
  /* TEXT */
103
111
  ))
104
112
  ]),
105
- n(o.$slots, "body.append")
113
+ r(o.$slots, "body.append")
106
114
  ])
107
115
  ])) : i("v-if", !0),
108
- e.buttons || o.$slots.footer ? (l(), s("div", w, [
109
- n(o.$slots, "footer", {}, () => [
110
- c("span", x, [
116
+ e.buttons || o.$slots.footer ? (l(), s("div", G, [
117
+ r(o.$slots, "footer", {}, () => [
118
+ c("span", J, [
111
119
  (l(!0), s(
112
- N,
120
+ U,
113
121
  null,
114
- z(e.buttons, (t) => (l(), d(a(q), B({ ref_for: !0 }, t.props, {
122
+ A(e.buttons, (t) => (l(), d(a(V), C({ ref_for: !0 }, t.props, {
115
123
  key: t.id,
116
- onClick: () => $(t)
124
+ onClick: () => D(t)
117
125
  }), {
118
- default: _(() => [
126
+ default: f(() => [
119
127
  t.icon ? (l(), d(
120
- a(f),
121
- B({
128
+ a(m),
129
+ C({
122
130
  key: 0,
123
131
  ref_for: !0
124
132
  }, t.icon),
@@ -136,16 +144,16 @@ const F = {
136
144
  ])
137
145
  ])
138
146
  ])) : i("v-if", !0),
139
- e.dismissible ? (l(), d(a(q), {
147
+ e.dismissible ? (l(), d(a(V), {
140
148
  key: 3,
141
149
  class: "q-dialog__close",
142
150
  variant: "text",
143
- onClick: p
151
+ onClick: y
144
152
  }, {
145
- default: _(() => [
146
- h(
147
- a(f),
148
- g(b(e.icons.close)),
153
+ default: f(() => [
154
+ b(
155
+ a(m),
156
+ B(q(e.icons.close)),
149
157
  null,
150
158
  16
151
159
  /* FULL_PROPS */
@@ -165,5 +173,5 @@ const F = {
165
173
  }
166
174
  });
167
175
  export {
168
- W as default
176
+ ee as default
169
177
  };
@@ -0,0 +1,3 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=QDialogProvider.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QDialogProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialogProvider.vue"],"names":[],"mappings":"AASA;;AA+FA,wBAKG"}
@@ -0,0 +1,26 @@
1
+ import { defineComponent as a, createElementBlock as l, openBlock as o, Fragment as i, renderList as m, unref as r, createBlock as s, mergeProps as p } from "vue";
2
+ import { QDialog as u } from "./index.js";
3
+ import { useDialog as c } from "../../composables/useDialog/index.js";
4
+ const D = /* @__PURE__ */ a({
5
+ inheritAttrs: !1,
6
+ __name: "QDialogProvider",
7
+ setup(f) {
8
+ const { dialogs: t, removeDialog: n } = c();
9
+ return (_, d) => (o(!0), l(
10
+ i,
11
+ null,
12
+ m(r(t), (e) => (o(), s(r(u), p({
13
+ key: e.id,
14
+ ref_for: !0
15
+ }, e.props, {
16
+ "model-value": "",
17
+ onLeave: () => r(n)(e.id)
18
+ }), null, 16, ["onLeave"]))),
19
+ 128
20
+ /* KEYED_FRAGMENT */
21
+ ));
22
+ }
23
+ });
24
+ export {
25
+ D as default
26
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./QDialogProvider.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -17,8 +17,13 @@ declare const QDialog: {
17
17
  centerVertically?: boolean;
18
18
  }> & Readonly<{
19
19
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
20
+ onEnter?: (() => any) | undefined;
21
+ onLeave?: (() => any) | undefined;
20
22
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
23
  "update:modelValue": (value: boolean) => any;
24
+ } & {
25
+ enter: () => any;
26
+ leave: () => any;
22
27
  }, import('vue').PublicProps, {
23
28
  size: import('./types').QDialogSize;
24
29
  html: boolean;
@@ -51,6 +56,8 @@ declare const QDialog: {
51
56
  centerVertically?: boolean;
52
57
  }> & Readonly<{
53
58
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
59
+ onEnter?: (() => any) | undefined;
60
+ onLeave?: (() => any) | undefined;
54
61
  }>, {}, {}, {}, {}, {
55
62
  size: import('./types').QDialogSize;
56
63
  html: boolean;
@@ -80,8 +87,13 @@ declare const QDialog: {
80
87
  centerVertically?: boolean;
81
88
  }> & Readonly<{
82
89
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
90
+ onEnter?: (() => any) | undefined;
91
+ onLeave?: (() => any) | undefined;
83
92
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
84
93
  "update:modelValue": (value: boolean) => any;
94
+ } & {
95
+ enter: () => any;
96
+ leave: () => any;
85
97
  }, string, {
86
98
  size: import('./types').QDialogSize;
87
99
  html: boolean;
@@ -99,6 +111,7 @@ declare const QDialog: {
99
111
  footer?(_: {}): any;
100
112
  };
101
113
  });
102
- export { QDialog };
114
+ declare const QDialogProvider: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
115
+ export { QDialog, QDialogProvider };
103
116
  export type { DialogButton };
104
117
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA4B,CAAA;AAGzC,OAAO,EAAE,OAAO,EAAE,CAAA;AAGlB,YAAY,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA4B,CAAA;AACzC,QAAA,MAAM,eAAe,+QAAoC,CAAA;AAGzD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAA;AAGnC,YAAY,EAAE,YAAY,EAAE,CAAA"}
@@ -1,6 +1,8 @@
1
- import o from "./QDialog.vue.js";
2
- import { setupPropsProxy as r } from "../../utils/setupPropsProxy.js";
3
- const t = r(o);
1
+ import r from "./QDialog.vue.js";
2
+ import i from "./QDialogProvider.vue.js";
3
+ import { setupPropsProxy as o } from "../../utils/setupPropsProxy.js";
4
+ const s = o(r), f = o(i);
4
5
  export {
5
- t as QDialog
6
+ s as QDialog,
7
+ f as QDialogProvider
6
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QDismissibleLayer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDismissibleLayer/QDismissibleLayer.vue"],"names":[],"mappings":"AAKA;AA8HC,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAgH1E,iBAAS,cAAc;WA0BT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;kBAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"QDismissibleLayer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDismissibleLayer/QDismissibleLayer.vue"],"names":[],"mappings":"AAKA;AAyIC,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAyH1E,iBAAS,cAAc;WA0BT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;kBAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,44 +1,46 @@
1
- import { defineComponent as r, ref as a, onMounted as c, onUnmounted as l, createElementBlock as f, openBlock as m, renderSlot as p } from "vue";
2
- import { onClickOutside as v } from "../../vendors/@vueuse/core/index.js";
3
- const b = /* @__PURE__ */ r({
1
+ import { defineComponent as a, ref as c, useId as f, onMounted as m, onUnmounted as p, createElementBlock as v, openBlock as E, renderSlot as y } from "vue";
2
+ import { onClickOutside as b } from "../../vendors/@vueuse/core/index.js";
3
+ import { useDismissibleLayerStackItem as w } from "../../composables/useDismissibleLayerStack/index.js";
4
+ const h = /* @__PURE__ */ a({
4
5
  __name: "QDismissibleLayer",
5
6
  emits: ["escape-key-down", "pointer-down-outside", "focus-outside", "interact-outside", "dismiss"],
6
- setup(E, { emit: u }) {
7
- const t = u, o = a(null);
8
- function i(e) {
9
- e.key === "Escape" && (t("escape-key-down", e), e.defaultPrevented || t("dismiss", e));
7
+ setup(_, { emit: u }) {
8
+ const o = u, i = c(null), l = f(), e = w(l);
9
+ function r(n) {
10
+ n.key === "Escape" && (e != null && e.isTop()) && (o("escape-key-down", n), n.defaultPrevented || o("dismiss", n));
10
11
  }
11
- function d(e) {
12
- if (!o.value) return;
13
- const n = e.target;
14
- if (!o.value.contains(n)) {
12
+ function d(n) {
13
+ if (!i.value) return;
14
+ const t = n.target;
15
+ if (!i.value.contains(t) && (e != null && e.isTop())) {
15
16
  const s = new CustomEvent("focus-outside", {
16
17
  bubbles: !1,
17
18
  cancelable: !0,
18
- detail: { originalEvent: e }
19
+ detail: { originalEvent: n }
19
20
  });
20
- t("focus-outside", s), t("interact-outside", s), s.defaultPrevented || t("dismiss", s);
21
+ o("focus-outside", s), o("interact-outside", s), s.defaultPrevented || o("dismiss", s);
21
22
  }
22
23
  }
23
- return c(() => {
24
- document.addEventListener("keydown", i), document.addEventListener("focusin", d), v(o, (e) => {
25
- const n = new CustomEvent("pointer-down-outside", {
24
+ return m(() => {
25
+ e == null || e.register(), document.addEventListener("keydown", r), document.addEventListener("focusin", d), b(i, (n) => {
26
+ if (!(e != null && e.isTop())) return;
27
+ const t = new CustomEvent("pointer-down-outside", {
26
28
  bubbles: !1,
27
29
  cancelable: !0,
28
- detail: { originalEvent: e }
30
+ detail: { originalEvent: n }
29
31
  });
30
- t("pointer-down-outside", n), t("interact-outside", n), n.defaultPrevented || t("dismiss", n);
32
+ o("pointer-down-outside", t), o("interact-outside", t), t.defaultPrevented || o("dismiss", t);
31
33
  });
32
- }), l(() => {
33
- document.removeEventListener("keydown", i), document.removeEventListener("focusin", d);
34
- }), (e, n) => (m(), f(
34
+ }), p(() => {
35
+ e == null || e.unregister(), document.removeEventListener("keydown", r), document.removeEventListener("focusin", d);
36
+ }), (n, t) => (E(), v(
35
37
  "div",
36
38
  {
37
39
  ref_key: "layerRef",
38
- ref: o
40
+ ref: i
39
41
  },
40
42
  [
41
- p(e.$slots, "default")
43
+ y(n.$slots, "default")
42
44
  ],
43
45
  512
44
46
  /* NEED_PATCH */
@@ -46,5 +48,5 @@ const b = /* @__PURE__ */ r({
46
48
  }
47
49
  });
48
50
  export {
49
- b as default
51
+ h as default
50
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/QTooltip.vue"],"names":[],"mappings":"AAoCA;AA2HC,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;WAqFT,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":"AAsCA;AAuHC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAO5C,KAAK,WAAW,GAAG,aAAa,CAAC;AAuElC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAgGT,OAAO,IAA6B;;;;;;YAXtB,GAAG;yBACD,GAAG;;;;EAehC;AAgBD,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,11 +1,11 @@
1
- import { defineComponent as g, mergeModels as V, useModel as v, onMounted as B, onUnmounted as _, watch as k, createElementBlock as l, openBlock as a, Fragment as m, renderSlot as p, createVNode as M, unref as n, normalizeClass as w, withCtx as x, createElementVNode as C, createBlock as N, createCommentVNode as T, normalizeProps as A, mergeProps as D, createTextVNode as Q, toDisplayString as q } 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 u } from "../../utils/getElement.js";
6
- const L = { class: "q-tooltip__content" }, P = ["innerHTML"], O = /* @__PURE__ */ g({
1
+ import { defineComponent as b, mergeModels as g, useModel as v, onUnmounted as V, watch as B, createElementBlock as d, openBlock as a, Fragment as u, renderSlot as p, createVNode as _, unref as n, normalizeClass as k, withCtx as w, createElementVNode as A, createBlock as x, createCommentVNode as C, normalizeProps as E, mergeProps as M, createTextVNode as N, toDisplayString as T } from "vue";
2
+ import { QIcon as D } from "../QIcon/index.js";
3
+ import { QOverlay as L } from "../QOverlay/index.js";
4
+ import { useId as Q } from "../../composables/uid.js";
5
+ import { getElement as q } from "../../utils/getElement.js";
6
+ const z = { class: "q-tooltip__content" }, H = ["innerHTML"], F = /* @__PURE__ */ b({
7
7
  __name: "QTooltip",
8
- props: /* @__PURE__ */ V({
8
+ props: /* @__PURE__ */ g({
9
9
  id: {},
10
10
  class: {},
11
11
  anchor: {},
@@ -25,38 +25,37 @@ const L = { class: "q-tooltip__content" }, P = ["innerHTML"], O = /* @__PURE__ *
25
25
  modelModifiers: {}
26
26
  }),
27
27
  emits: ["update:modelValue"],
28
- setup(i) {
29
- const e = i, d = v(i, "modelValue"), r = I(e.id);
30
- function c(o) {
31
- const t = u(o);
32
- t == null || t.setAttribute("aria-describedby", r);
28
+ setup(c) {
29
+ const e = c, r = v(c, "modelValue"), l = Q(e.id);
30
+ function s() {
31
+ return e.anchor ? q(e.anchor) : void 0;
33
32
  }
34
- function f() {
35
- e.anchor && c(e.anchor);
33
+ function m() {
34
+ var t;
35
+ (t = s()) == null || t.setAttribute("aria-describedby", l);
36
36
  }
37
- B(f);
38
- function s(o) {
39
- const t = u(o);
40
- t == null || t.removeAttribute("aria-describedby");
37
+ function i() {
38
+ var t;
39
+ (t = s()) == null || t.removeAttribute("aria-describedby");
41
40
  }
42
- function y() {
43
- e.anchor && s(e.anchor);
41
+ function f() {
42
+ e.anchor && i();
44
43
  }
45
- _(y);
46
- function h(o, t) {
47
- t && s(t), o && c(o);
44
+ V(f);
45
+ function h(t, o) {
46
+ o && i(), t && r && m();
48
47
  }
49
- return k(() => e.anchor, h), (o, t) => (a(), l(
50
- m,
48
+ return B(() => e.anchor, h), (t, o) => (a(), d(
49
+ u,
51
50
  null,
52
51
  [
53
- p(o.$slots, "anchor", {
54
- props: { "aria-describedby": n(r) }
52
+ p(t.$slots, "anchor", {
53
+ props: { "aria-describedby": n(l) }
55
54
  }),
56
- M(n(H), {
57
- id: n(r),
58
- modelValue: d.value,
59
- "onUpdate:modelValue": t[0] || (t[0] = (b) => d.value = b),
55
+ _(n(L), {
56
+ id: n(l),
57
+ modelValue: r.value,
58
+ "onUpdate:modelValue": o[0] || (o[0] = (y) => r.value = y),
60
59
  anchor: e.anchor,
61
60
  role: "tooltip",
62
61
  "non-modal": "",
@@ -64,31 +63,33 @@ const L = { class: "q-tooltip__content" }, P = ["innerHTML"], O = /* @__PURE__ *
64
63
  arrow: e.arrow,
65
64
  attach: e.attach,
66
65
  inline: e.inline,
67
- class: w(["q-tooltip", e.class]),
66
+ class: k(["q-tooltip", e.class]),
68
67
  delay: e.delay,
69
68
  disabled: e.disabled,
70
69
  placement: e.placement,
71
- trigger: e.trigger
70
+ trigger: e.trigger,
71
+ onEnter: m,
72
+ onLeave: i
72
73
  }, {
73
- default: x(() => [
74
- C("div", L, [
75
- p(o.$slots, "default", {}, () => [
76
- e.icon ? (a(), N(
77
- n(z),
78
- A(D({ key: 0 }, e.icon)),
74
+ default: w(() => [
75
+ A("div", z, [
76
+ p(t.$slots, "default", {}, () => [
77
+ e.icon ? (a(), x(
78
+ n(D),
79
+ E(M({ key: 0 }, e.icon)),
79
80
  null,
80
81
  16
81
82
  /* FULL_PROPS */
82
- )) : T("v-if", !0),
83
- e.html ? (a(), l("span", {
83
+ )) : C("v-if", !0),
84
+ e.html ? (a(), d("span", {
84
85
  key: 1,
85
86
  innerHTML: e.text
86
- }, null, 8, P)) : (a(), l(
87
- m,
87
+ }, null, 8, H)) : (a(), d(
88
+ u,
88
89
  { key: 2 },
89
90
  [
90
- Q(
91
- q(e.text),
91
+ N(
92
+ T(e.text),
92
93
  1
93
94
  /* TEXT */
94
95
  )
@@ -109,5 +110,5 @@ const L = { class: "q-tooltip__content" }, P = ["innerHTML"], O = /* @__PURE__ *
109
110
  }
110
111
  });
111
112
  export {
112
- O as default
113
+ F as default
113
114
  };