@quidgest/ui 0.16.13 → 0.16.15

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 (60) hide show
  1. package/dist/manifest/components.json +2 -0
  2. package/dist/ui.css +242 -0
  3. package/dist/ui.esm.js +4932 -4638
  4. package/dist/ui.js +18 -18
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +1044 -1022
  7. package/dist/ui.scss +169 -1
  8. package/esm/components/QCombobox/QCombobox.d.ts +40 -0
  9. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
  10. package/esm/components/QCombobox/QCombobox.vue.js +126 -117
  11. package/esm/components/QCombobox/index.d.ts +20 -0
  12. package/esm/components/QCombobox/index.d.ts.map +1 -1
  13. package/esm/components/QDialog/QDialog.d.ts +3 -1
  14. package/esm/components/QDialog/QDialog.d.ts.map +1 -1
  15. package/esm/components/QDialog/QDialog.vue.js +151 -108
  16. package/esm/components/QDialog/QDialogProvider.d.ts +6 -1
  17. package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
  18. package/esm/components/QDialog/QDialogProvider.vue.js +22 -14
  19. package/esm/components/QDialog/index.d.ts +11 -2
  20. package/esm/components/QDialog/index.d.ts.map +1 -1
  21. package/esm/components/QDialog/types.d.ts +31 -1
  22. package/esm/components/QDialog/types.d.ts.map +1 -1
  23. package/esm/components/QSidebar/QSidebarPanel.d.ts +2 -2
  24. package/esm/components/QSidebar/QSidebarPanel.vue.js +24 -25
  25. package/esm/components/QToast/QToast.d.ts +33 -0
  26. package/esm/components/QToast/QToast.d.ts.map +1 -0
  27. package/esm/components/QToast/QToast.vue.js +212 -0
  28. package/esm/components/QToast/QToast.vue2.js +4 -0
  29. package/esm/components/QToast/QToaster.d.ts +6 -0
  30. package/esm/components/QToast/QToaster.d.ts.map +1 -0
  31. package/esm/components/QToast/QToaster.vue.js +48 -0
  32. package/esm/components/QToast/QToaster.vue2.js +4 -0
  33. package/esm/components/QToast/index.d.ts +56 -0
  34. package/esm/components/QToast/index.d.ts.map +1 -0
  35. package/esm/components/QToast/index.js +8 -0
  36. package/esm/components/QToast/types.d.ts +69 -0
  37. package/esm/components/QToast/types.d.ts.map +1 -0
  38. package/esm/components/QToast/types.js +8 -0
  39. package/esm/components/index.d.ts +1 -0
  40. package/esm/components/index.d.ts.map +1 -1
  41. package/esm/components/index.js +15 -12
  42. package/esm/composables/index.d.ts +1 -0
  43. package/esm/composables/index.d.ts.map +1 -1
  44. package/esm/composables/useDialog/index.d.ts +15 -3
  45. package/esm/composables/useDialog/index.d.ts.map +1 -1
  46. package/esm/composables/useDialog/index.js +14 -14
  47. package/esm/composables/useDialog/types.d.ts +7 -4
  48. package/esm/composables/useDialog/types.d.ts.map +1 -1
  49. package/esm/composables/useToast/index.d.ts +33 -0
  50. package/esm/composables/useToast/index.d.ts.map +1 -0
  51. package/esm/composables/useToast/index.js +35 -0
  52. package/esm/composables/useToast/types.d.ts +40 -0
  53. package/esm/composables/useToast/types.d.ts.map +1 -0
  54. package/esm/composables/useToast/types.js +4 -0
  55. package/esm/framework.d.ts.map +1 -1
  56. package/esm/framework.js +25 -19
  57. package/esm/index.d.ts +2 -0
  58. package/esm/index.js +7 -5
  59. package/esm/utils/color.js +29 -24
  60. package/package.json +1 -1
@@ -1,61 +1,77 @@
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 = {
1
+ import { defineComponent as Q, mergeModels as g, useModel as A, ref as V, computed as b, createBlock as c, openBlock as l, unref as a, normalizeClass as B, withCtx as p, createElementVNode as $, createElementBlock as i, createCommentVNode as s, renderSlot as r, toDisplayString as v, createVNode as _, normalizeProps as q, guardReactiveProps as C, createTextVNode as O, Fragment as S, renderList as I, mergeProps as T } from "vue";
2
+ import { DEFAULT_ICONS as P, DEFAULT_BUTTONS as H, DEFAULT_ICON as w } from "./types.js";
3
+ import { QButton as L } from "../QButton/index.js";
4
+ import { QIcon as f } from "../QIcon/index.js";
5
+ import { QOverlay as x } from "../QOverlay/index.js";
6
+ import { QTextField as R } from "../QTextField/index.js";
7
+ const j = {
7
8
  key: 0,
8
9
  class: "q-dialog__header"
9
- }, P = { class: "q-dialog__header-title" }, H = {
10
+ }, G = {
11
+ key: 0,
12
+ class: "q-dialog__header-title"
13
+ }, J = {
10
14
  key: 1,
11
15
  class: "q-dialog__body"
12
- }, w = {
16
+ }, K = {
13
17
  key: 0,
14
18
  class: "q-dialog__body-icon"
15
- }, x = { class: "q-dialog__body-text" }, R = ["innerHTML"], j = { key: 1 }, G = {
19
+ }, W = { class: "q-dialog__body-text" }, X = ["innerHTML"], Y = { key: 1 }, Z = {
20
+ key: 0,
21
+ class: "q-dialog__input"
22
+ }, ee = {
16
23
  key: 2,
17
24
  class: "q-dialog__footer"
18
- }, J = { class: "q-dialog__footer-buttons" }, ee = /* @__PURE__ */ z({
25
+ }, oe = {
26
+ key: 0,
27
+ class: "q-dialog__footer-buttons"
28
+ }, re = /* @__PURE__ */ Q({
19
29
  __name: "QDialog",
20
- props: /* @__PURE__ */ v({
30
+ props: /* @__PURE__ */ g({
21
31
  id: {},
22
32
  class: {},
23
33
  title: {},
24
34
  text: {},
25
- icon: { default: () => Q },
26
- buttons: { default: () => O },
35
+ icon: { default: () => w },
36
+ buttons: { default: () => H },
27
37
  attach: { default: "body" },
28
38
  inline: { type: Boolean },
29
39
  backdropBlur: { type: Boolean, default: !0 },
30
40
  dismissible: { type: Boolean },
31
41
  html: { type: Boolean, default: !0 },
32
- icons: { default: () => F },
42
+ icons: { default: () => P },
33
43
  size: { default: "small" },
34
- centerVertically: { type: Boolean }
44
+ centerVertically: { type: Boolean },
45
+ input: {}
35
46
  }, {
36
47
  modelValue: { type: Boolean },
37
48
  modelModifiers: {}
38
49
  }),
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
- u.value = !1;
50
+ emits: /* @__PURE__ */ g(["enter", "leave"], ["update:modelValue"]),
51
+ setup(y, { emit: N }) {
52
+ const e = y, k = N, m = A(y, "modelValue"), u = V(""), d = V(""), z = b(() => ["q-dialog", e.class]), D = b(() => `q-overlay--${e.size}`);
53
+ function h() {
54
+ m.value = !1;
44
55
  }
45
- function D(o) {
46
- var n;
47
- (n = o.action) == null || n.call(o), y();
56
+ function E(o) {
57
+ var n, t;
58
+ if (o.action) {
59
+ if ((n = e.input) != null && n.validator && (d.value = e.input.validator(a(u)), a(d)))
60
+ return;
61
+ (t = o.action) == null || t.call(o, a(u));
62
+ }
63
+ h();
48
64
  }
49
- function E() {
50
- p("enter");
65
+ function M() {
66
+ k("enter");
51
67
  }
52
- function N() {
53
- p("leave");
68
+ function U() {
69
+ k("leave");
54
70
  }
55
- return (o, n) => (l(), d(a(S), {
71
+ return (o, n) => (l(), c(a(x), {
56
72
  id: e.id,
57
- modelValue: u.value,
58
- "onUpdate:modelValue": n[0] || (n[0] = (t) => u.value = t),
73
+ modelValue: m.value,
74
+ "onUpdate:modelValue": n[1] || (n[1] = (t) => m.value = t),
59
75
  "backdrop-class": "q-dialog__underlay",
60
76
  "scroll-lock": "",
61
77
  persistent: "",
@@ -63,97 +79,124 @@ const I = {
63
79
  attach: e.attach,
64
80
  "backdrop-blur": e.backdropBlur,
65
81
  "center-vertically": e.centerVertically,
66
- class: h(T.value),
67
- onEnter: E,
68
- onLeave: N
82
+ class: B(D.value),
83
+ onEnter: M,
84
+ onLeave: U
69
85
  }, {
70
- default: f(() => [
71
- c(
86
+ default: p(() => [
87
+ $(
72
88
  "div",
73
89
  {
74
- class: h(L.value)
90
+ class: B(z.value)
75
91
  },
76
92
  [
77
- e.title || o.$slots.header ? (l(), s("div", I, [
93
+ e.title || o.$slots.header || o.$slots["header.prepend"] || o.$slots["header.append"] ? (l(), i("div", j, [
78
94
  r(o.$slots, "header", {}, () => [
79
- c(
95
+ r(o.$slots, "header.prepend"),
96
+ e.title ? (l(), i(
80
97
  "span",
81
- P,
82
- g(e.title),
98
+ G,
99
+ v(e.title),
83
100
  1
84
101
  /* TEXT */
85
- )
102
+ )) : s("v-if", !0),
103
+ r(o.$slots, "header.append")
86
104
  ])
87
- ])) : i("v-if", !0),
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)),
95
- null,
96
- 16
97
- /* FULL_PROPS */
98
- )
99
- ])) : i("v-if", !0)
100
- ]),
101
- c("div", x, [
102
- e.html ? (l(), s("div", {
103
- key: 0,
104
- innerHTML: e.text
105
- }, null, 8, R)) : (l(), s(
106
- "div",
107
- j,
108
- g(e.text),
109
- 1
110
- /* TEXT */
111
- ))
112
- ]),
113
- r(o.$slots, "body.append")
114
- ])
115
- ])) : i("v-if", !0),
116
- e.buttons || o.$slots.footer ? (l(), s("div", G, [
117
- r(o.$slots, "footer", {}, () => [
118
- c("span", J, [
119
- (l(!0), s(
120
- U,
121
- null,
122
- A(e.buttons, (t) => (l(), d(a(V), C({ ref_for: !0 }, t.props, {
123
- key: t.id,
124
- onClick: () => D(t)
125
- }), {
126
- default: f(() => [
127
- t.icon ? (l(), d(
128
- a(m),
129
- C({
130
- key: 0,
131
- ref_for: !0
132
- }, t.icon),
133
- null,
134
- 16
135
- /* FULL_PROPS */
136
- )) : i("v-if", !0)
105
+ ])) : s("v-if", !0),
106
+ e.icon || e.text || o.$slots.body ? (l(), i("div", J, [
107
+ r(o.$slots, "body", {}, () => {
108
+ var t;
109
+ return [
110
+ r(o.$slots, "body.icon", {}, () => [
111
+ e.icon ? (l(), i("span", K, [
112
+ _(
113
+ a(f),
114
+ q(C(e.icon)),
115
+ null,
116
+ 16
117
+ /* FULL_PROPS */
118
+ )
119
+ ])) : s("v-if", !0)
120
+ ]),
121
+ $("div", W, [
122
+ e.html ? (l(), i("div", {
123
+ key: 0,
124
+ innerHTML: e.text
125
+ }, null, 8, X)) : (l(), i(
126
+ "div",
127
+ Y,
128
+ v(e.text),
129
+ 1
130
+ /* TEXT */
131
+ ))
132
+ ]),
133
+ e.input ? (l(), i("div", Z, [
134
+ _(a(R), {
135
+ modelValue: u.value,
136
+ "onUpdate:modelValue": n[0] || (n[0] = (F) => u.value = F),
137
+ invalid: !!d.value,
138
+ placeholder: (t = e.input) == null ? void 0 : t.placeholder,
139
+ size: "block"
140
+ }, {
141
+ extras: p(() => [
142
+ d.value ? (l(), c(a(f), {
143
+ key: 0,
144
+ icon: "exclamation-sign"
145
+ })) : s("v-if", !0),
146
+ O(
147
+ " " + v(d.value),
148
+ 1
149
+ /* TEXT */
150
+ )
137
151
  ]),
138
- _: 2
139
- /* DYNAMIC */
140
- }, 1040, ["onClick"]))),
141
- 128
142
- /* KEYED_FRAGMENT */
143
- ))
144
- ])
145
- ])
146
- ])) : i("v-if", !0),
147
- e.dismissible ? (l(), d(a(V), {
152
+ _: 1
153
+ /* STABLE */
154
+ }, 8, ["modelValue", "invalid", "placeholder"])
155
+ ])) : s("v-if", !0),
156
+ r(o.$slots, "body.append")
157
+ ];
158
+ })
159
+ ])) : s("v-if", !0),
160
+ e.buttons || o.$slots["footer.append"] ? (l(), i("div", ee, [
161
+ e.buttons ? (l(), i("span", oe, [
162
+ (l(!0), i(
163
+ S,
164
+ null,
165
+ I(e.buttons, (t) => (l(), c(a(L), T({ ref_for: !0 }, t.props, {
166
+ key: t.id,
167
+ onClick: () => E(t)
168
+ }), {
169
+ default: p(() => [
170
+ t.icon ? (l(), c(
171
+ a(f),
172
+ T({
173
+ key: 0,
174
+ ref_for: !0
175
+ }, t.icon),
176
+ null,
177
+ 16
178
+ /* FULL_PROPS */
179
+ )) : s("v-if", !0)
180
+ ]),
181
+ _: 2
182
+ /* DYNAMIC */
183
+ }, 1040, ["onClick"]))),
184
+ 128
185
+ /* KEYED_FRAGMENT */
186
+ ))
187
+ ])) : s("v-if", !0),
188
+ r(o.$slots, "footer.append")
189
+ ])) : s("v-if", !0),
190
+ e.dismissible ? (l(), c(a(L), {
148
191
  key: 3,
149
192
  class: "q-dialog__close",
150
193
  variant: "text",
151
- onClick: y
194
+ onClick: h
152
195
  }, {
153
- default: f(() => [
154
- b(
155
- a(m),
156
- B(q(e.icons.close)),
196
+ default: p(() => [
197
+ _(
198
+ a(f),
199
+ q(C(e.icons.close)),
157
200
  null,
158
201
  16
159
202
  /* FULL_PROPS */
@@ -161,7 +204,7 @@ const I = {
161
204
  ]),
162
205
  _: 1
163
206
  /* STABLE */
164
- })) : i("v-if", !0)
207
+ })) : s("v-if", !0)
165
208
  ],
166
209
  2
167
210
  /* CLASS */
@@ -173,5 +216,5 @@ const I = {
173
216
  }
174
217
  });
175
218
  export {
176
- ee as default
219
+ re as default
177
220
  };
@@ -1,3 +1,8 @@
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>;
1
+ import { QDialogProviderProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<QDialogProviderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ leave: (id: string) => any;
4
+ }, string, import('vue').PublicProps, Readonly<QDialogProviderProps> & Readonly<{
5
+ onLeave?: ((id: string) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
2
7
  export default _default;
3
8
  //# sourceMappingURL=QDialogProvider.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QDialogProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialogProvider.vue"],"names":[],"mappings":"AASA;;AA+FA,wBAKG"}
1
+ {"version":3,"file":"QDialogProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialogProvider.vue"],"names":[],"mappings":"AAUA;AA+CC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;;;;;;AAmFpD,wBAOG"}
@@ -1,26 +1,34 @@
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({
1
+ import { defineComponent as c, createElementBlock as u, openBlock as o, Fragment as f, renderList as v, unref as r, createBlock as _, mergeProps as d } from "vue";
2
+ import { QDialog as g } from "./index.js";
3
+ import { useDialog as k } from "../../composables/useDialog/index.js";
4
+ const x = /* @__PURE__ */ c({
5
5
  inheritAttrs: !1,
6
6
  __name: "QDialogProvider",
7
- setup(f) {
8
- const { dialogs: t, removeDialog: n } = c();
9
- return (_, d) => (o(!0), l(
10
- i,
7
+ props: {
8
+ inline: { type: Boolean }
9
+ },
10
+ emits: ["leave"],
11
+ setup(t, { emit: i }) {
12
+ const l = t, a = i, { dialogs: m, removeDialog: s } = k();
13
+ function p(e) {
14
+ s(e), a("leave", e);
15
+ }
16
+ return (e, B) => (o(!0), u(
17
+ f,
11
18
  null,
12
- m(r(t), (e) => (o(), s(r(u), p({
13
- key: e.id,
19
+ v(r(m), (n) => (o(), _(r(g), d({
20
+ key: n.id,
14
21
  ref_for: !0
15
- }, e.props, {
22
+ }, n.props, {
16
23
  "model-value": "",
17
- onLeave: () => r(n)(e.id)
18
- }), null, 16, ["onLeave"]))),
24
+ inline: l.inline,
25
+ onLeave: () => p(n.id)
26
+ }), null, 16, ["inline", "onLeave"]))),
19
27
  128
20
28
  /* KEYED_FRAGMENT */
21
29
  ));
22
30
  }
23
31
  });
24
32
  export {
25
- D as default
33
+ x as default
26
34
  };
@@ -15,6 +15,7 @@ declare const QDialog: {
15
15
  icons?: typeof import('./types').DEFAULT_ICONS;
16
16
  size?: import('./types').QDialogSize;
17
17
  centerVertically?: boolean;
18
+ input?: import('./types').QDialogInputOption;
18
19
  }> & Readonly<{
19
20
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
20
21
  onEnter?: (() => any) | undefined;
@@ -54,6 +55,7 @@ declare const QDialog: {
54
55
  icons?: typeof import('./types').DEFAULT_ICONS;
55
56
  size?: import('./types').QDialogSize;
56
57
  centerVertically?: boolean;
58
+ input?: import('./types').QDialogInputOption;
57
59
  }> & Readonly<{
58
60
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
59
61
  onEnter?: (() => any) | undefined;
@@ -85,6 +87,7 @@ declare const QDialog: {
85
87
  icons?: typeof import('./types').DEFAULT_ICONS;
86
88
  size?: import('./types').QDialogSize;
87
89
  centerVertically?: boolean;
90
+ input?: import('./types').QDialogInputOption;
88
91
  }> & Readonly<{
89
92
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
90
93
  onEnter?: (() => any) | undefined;
@@ -105,13 +108,19 @@ declare const QDialog: {
105
108
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
106
109
  $slots: {
107
110
  header?(_: {}): any;
111
+ 'header.prepend'?(_: {}): any;
112
+ 'header.append'?(_: {}): any;
108
113
  body?(_: {}): any;
109
114
  'body.icon'?(_: {}): any;
110
115
  'body.append'?(_: {}): any;
111
- footer?(_: {}): any;
116
+ 'footer.append'?(_: {}): any;
112
117
  };
113
118
  });
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>;
119
+ declare const QDialogProvider: import('vue').DefineComponent<import('./types').QDialogProviderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
120
+ leave: (id: string) => any;
121
+ }, string, import('vue').PublicProps, Readonly<import('./types').QDialogProviderProps> & Readonly<{
122
+ onLeave?: ((id: string) => any) | undefined;
123
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
115
124
  export { QDialog, QDialogProvider };
116
125
  export type { DialogButton };
117
126
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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
+ {"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;;;;kFAAoC,CAAA;AAGzD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAA;AAGnC,YAAY,EAAE,YAAY,EAAE,CAAA"}
@@ -53,6 +53,10 @@ export type QDialogProps = QBaseComponentProps & {
53
53
  * Whether to vertically align the dialog to the center (true) or top (false)
54
54
  */
55
55
  centerVertically?: boolean;
56
+ /**
57
+ * The input control configuration.
58
+ */
59
+ input?: QDialogInputOption;
56
60
  };
57
61
  export type DialogButton = {
58
62
  /**
@@ -67,13 +71,39 @@ export type DialogButton = {
67
71
  * The action that the button performs when clicked.
68
72
  */
69
73
  action?: {
70
- (): void;
74
+ (value?: string): void;
71
75
  };
72
76
  /**
73
77
  * The generic button props.
74
78
  */
75
79
  props: QButtonProps;
76
80
  };
81
+ export type QDialogOptions = {
82
+ /**
83
+ * Options for input control to add.
84
+ */
85
+ input?: QDialogInputOption;
86
+ };
87
+ export type QDialogInputOption = {
88
+ /**
89
+ * Control type.
90
+ */
91
+ type: string;
92
+ /**
93
+ * Control placeholder text.
94
+ */
95
+ placeholder?: string;
96
+ /**
97
+ * Function to validate value entered.
98
+ */
99
+ validator?: (value: string) => string | undefined;
100
+ };
101
+ export type QDialogProviderProps = {
102
+ /**
103
+ * Whether to inline the dialogs
104
+ */
105
+ inline?: boolean;
106
+ };
77
107
  export declare const DEFAULT_BUTTONS: Array<DialogButton>;
78
108
  export declare const DEFAULT_ICON: Icon;
79
109
  export declare const DEFAULT_ICONS: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAA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EnC;;OAEG;IACH,KAAK,EAAE,YAAY,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAGD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,YAAY,CAW/C,CAAA;AAGD,eAAO,MAAM,YAAY,EAAE,IAE1B,CAAA;AAGD,eAAO,MAAM,aAAa;;;;CAIM,CAAA"}
@@ -9,7 +9,7 @@ declare function __VLS_template(): {
9
9
  footer?(_: {}): any;
10
10
  };
11
11
  refs: {
12
- panelRef: HTMLDivElement;
12
+ panel: HTMLDivElement;
13
13
  };
14
14
  rootEl: HTMLDivElement;
15
15
  };
@@ -29,7 +29,7 @@ declare const __VLS_component: import('vue').DefineComponent<QSidebarPanelProps,
29
29
  maxWidth: import('./types').QSidebarPanelSize;
30
30
  resizePosition: "left" | "right";
31
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
32
- panelRef: HTMLDivElement;
32
+ panel: HTMLDivElement;
33
33
  }, HTMLDivElement>;
34
34
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
35
35
  export default _default;
@@ -1,14 +1,17 @@
1
- import { defineComponent as y, useTemplateRef as q, ref as k, onUnmounted as R, createElementBlock as s, openBlock as i, createElementVNode as h, createCommentVNode as o, renderSlot as n, toDisplayString as W, normalizeClass as $ } from "vue";
2
- const g = { class: "q-sidebar-panel__header" }, E = {
1
+ import { defineComponent as y, useTemplateRef as q, ref as W, onUnmounted as $, createElementBlock as s, openBlock as i, createElementVNode as h, createCommentVNode as o, renderSlot as n, toDisplayString as g, normalizeClass as k } from "vue";
2
+ const E = {
3
+ ref: "panel",
4
+ class: "q-sidebar-panel"
5
+ }, R = { class: "q-sidebar-panel__header" }, S = {
3
6
  key: 0,
4
7
  class: "q-sidebar-panel__title"
5
- }, S = { class: "q-sidebar-panel__content" }, w = {
8
+ }, w = { class: "q-sidebar-panel__content" }, B = {
6
9
  key: 0,
7
10
  class: "q-sidebar-panel__footer"
8
- }, B = {
11
+ }, L = {
9
12
  key: 0,
10
13
  class: "q-sidebar-panel__grip"
11
- }, P = /* @__PURE__ */ y({
14
+ }, X = /* @__PURE__ */ y({
12
15
  __name: "QSidebarPanel",
13
16
  props: {
14
17
  title: {},
@@ -22,59 +25,55 @@ const g = { class: "q-sidebar-panel__header" }, E = {
22
25
  },
23
26
  emits: ["resize", "resize:start", "resize:end"],
24
27
  setup(v, { emit: _ }) {
25
- const t = v, r = _, a = q("panelRef"), l = k(!1);
26
- let d = 0, u = 0;
28
+ const t = v, r = _, d = q("panel"), a = W(!1);
29
+ let l = 0, u = 0;
27
30
  function z(e) {
28
- t.resizable && (l.value = !0, d = e.clientX, u = a.value.clientWidth, document.addEventListener("mousemove", c), document.addEventListener("mouseup", p), document.body.style.userSelect = "none", r("resize:start"));
31
+ t.resizable && (a.value = !0, l = e.clientX, u = d.value.clientWidth, document.addEventListener("mousemove", c), document.addEventListener("mouseup", p), document.body.style.userSelect = "none", r("resize:start"));
29
32
  }
30
33
  function c(e) {
31
- if (!t.resizable || !l.value) return;
32
- const f = t.resizePosition === "right" ? e.clientX - d : d - e.clientX, b = u + f;
34
+ if (!t.resizable || !a.value) return;
35
+ const f = t.resizePosition === "right" ? e.clientX - l : l - e.clientX, b = u + f;
33
36
  r("resize", b);
34
37
  }
35
38
  function p() {
36
- t.resizable && (l.value = !1, r("resize:end", a.value.clientWidth), m());
39
+ t.resizable && (a.value = !1, r("resize:end", d.value.clientWidth), m());
37
40
  }
38
41
  function m() {
39
42
  t.resizable && (document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", p), document.body.style.userSelect = "");
40
43
  }
41
- return R(m), (e, f) => (i(), s(
44
+ return $(m), (e, f) => (i(), s(
42
45
  "div",
43
- {
44
- ref_key: "panelRef",
45
- ref: a,
46
- class: "q-sidebar-panel"
47
- },
46
+ E,
48
47
  [
49
- h("div", g, [
48
+ h("div", R, [
50
49
  n(e.$slots, "header", {}, () => [
51
50
  n(e.$slots, "header.prepend"),
52
51
  t.title ? (i(), s(
53
52
  "h3",
54
- E,
55
- W(t.title),
53
+ S,
54
+ g(t.title),
56
55
  1
57
56
  /* TEXT */
58
57
  )) : o("v-if", !0),
59
58
  n(e.$slots, "header.append")
60
59
  ])
61
60
  ]),
62
- h("div", S, [
61
+ h("div", w, [
63
62
  n(e.$slots, "content")
64
63
  ]),
65
- e.$slots.footer ? (i(), s("div", w, [
64
+ e.$slots.footer ? (i(), s("div", B, [
66
65
  n(e.$slots, "footer")
67
66
  ])) : o("v-if", !0),
68
67
  e.resizable ? (i(), s(
69
68
  "div",
70
69
  {
71
70
  key: 1,
72
- class: $(["q-sidebar-panel__handle", `q-sidebar-panel__handle--${e.resizePosition}`]),
71
+ class: k(["q-sidebar-panel__handle", `q-sidebar-panel__handle--${e.resizePosition}`]),
73
72
  "data-testid": "q-sidebar-panel-handle",
74
73
  onMousedown: z
75
74
  },
76
75
  [
77
- e.showGrip ? (i(), s("div", B)) : o("v-if", !0)
76
+ e.showGrip ? (i(), s("div", L)) : o("v-if", !0)
78
77
  ],
79
78
  34
80
79
  /* CLASS, NEED_HYDRATION */
@@ -86,5 +85,5 @@ const g = { class: "q-sidebar-panel__header" }, E = {
86
85
  }
87
86
  });
88
87
  export {
89
- P as default
88
+ X as default
90
89
  };