@quidgest/ui 0.16.67 → 0.16.69

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.
package/dist/ui.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quidgest UI v0.16.67
2
+ * Quidgest UI v0.16.69
3
3
  * (c) 2026 Quidgest - Consultores de Gestão, S.A.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1724,6 +1724,7 @@ $q-carousel-height-md: 300px;
1724
1724
  flex-direction: column;
1725
1725
  border-radius: var(--border-radius);
1726
1726
  width: fit-content;
1727
+ max-width: 100%;
1727
1728
  &__control {
1728
1729
  display: flex;
1729
1730
  align-items: center;
@@ -1802,6 +1803,7 @@ $q-carousel-height-md: 300px;
1802
1803
  &--#{$size} {
1803
1804
  > #{$this}__control {
1804
1805
  width: calc(#{$multiplier} * 5em + #{$multiplier - 1} * $space-base);
1806
+ max-width: 100%;
1805
1807
  }
1806
1808
  }
1807
1809
  }
@@ -1912,7 +1914,7 @@ $q-carousel-height-md: 300px;
1912
1914
  .q-focus-wrap {
1913
1915
  width: 0;
1914
1916
  height: 0;
1915
- display: inline-block;
1917
+ display: block;
1916
1918
  &:focus {
1917
1919
  outline: 0;
1918
1920
  }
@@ -2503,6 +2505,14 @@ $arrow-tip-radius: 0.1rem;
2503
2505
  --q-overlay-color: var(--q-theme-background);
2504
2506
  --q-overlay-border-color: var(--q-theme-neutral-dark);
2505
2507
  }
2508
+ &--small,
2509
+ &--medium,
2510
+ &--large,
2511
+ &--xlarge {
2512
+ .q-overlay__content {
2513
+ min-width: unset;
2514
+ }
2515
+ }
2506
2516
  &--small {
2507
2517
  width: 20rem;
2508
2518
  }
@@ -17,8 +17,10 @@ declare function __VLS_template(): {
17
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
18
  declare const __VLS_component: import('vue').DefineComponent<QDialogProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
19
19
  "update:modelValue": (val: boolean) => any;
20
+ action: (val: string) => any;
20
21
  }, string, import('vue').PublicProps, Readonly<QDialogProps> & Readonly<{
21
22
  "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
23
+ onAction?: ((val: string) => any) | undefined;
22
24
  }>, {
23
25
  size: import('./types').QDialogSize;
24
26
  html: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"QDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialog.vue"],"names":[],"mappings":"AAwGA;AAuLC,OAAO,EAAiC,aAAa,EAAE,MAAM,aAAa,CAAA;AAS1E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAgF1D,iBAAS,cAAc;WAgQT,OAAO,IAA6B;;wBAhBrB,GAAG;kCACO,GAAG;iCACJ,GAAG;sBACd,GAAG;6BACI,GAAG;+BACD,GAAG;iCACD,GAAG;;;;EAexC;AAsBD,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":"AAwGA;AA0LC,OAAO,EAAiC,aAAa,EAAE,MAAM,aAAa,CAAA;AAS1E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAmF1D,iBAAS,cAAc;WAgQT,OAAO,IAA6B;;wBAhBrB,GAAG;kCACO,GAAG;iCACJ,GAAG;sBACd,GAAG;6BACI,GAAG;+BACD,GAAG;iCACD,GAAG;;;;EAexC;AAsBD,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,6 +1,6 @@
1
- import { defineComponent as E, ref as h, computed as k, createBlock as d, openBlock as t, unref as a, normalizeClass as g, withCtx as p, createElementVNode as B, createElementBlock as i, createCommentVNode as s, renderSlot as n, toDisplayString as m, createVNode as _, normalizeProps as V, guardReactiveProps as b, createTextVNode as L, Fragment as U, renderList as w, mergeProps as $ } from "vue";
1
+ import { defineComponent as E, ref as k, computed as g, createBlock as d, openBlock as t, unref as a, normalizeClass as B, withCtx as p, createElementVNode as V, createElementBlock as i, createCommentVNode as s, renderSlot as n, toDisplayString as m, createVNode as _, normalizeProps as b, guardReactiveProps as $, createTextVNode as L, Fragment as U, renderList as w, mergeProps as q } from "vue";
2
2
  import { DEFAULT_ICONS as Q, DEFAULT_BUTTONS as M, DEFAULT_ICON as S } from "./constants.js";
3
- import { QButton as q } from "../QButton/index.js";
3
+ import { QButton as F } from "../QButton/index.js";
4
4
  import { QIcon as f } from "../QIcon/index.js";
5
5
  import { QOverlay as W } from "../QOverlay/index.js";
6
6
  import { QTextField as I } from "../QTextField/index.js";
@@ -50,26 +50,26 @@ const P = {
50
50
  input: {},
51
51
  icons: { default: () => Q }
52
52
  },
53
- emits: ["update:modelValue"],
54
- setup(C, { emit: F }) {
55
- const e = C, T = F, u = h(""), r = h(""), D = k(() => ["q-dialog", e.class]), O = k(() => `q-overlay--${e.size}`);
53
+ emits: ["update:modelValue", "action"],
54
+ setup(C, { emit: T }) {
55
+ const e = C, y = T, u = k(""), r = k(""), D = g(() => ["q-dialog", e.class]), O = g(() => `q-overlay--${e.size}`);
56
56
  function N() {
57
57
  v(!0);
58
58
  }
59
- function y() {
59
+ function h() {
60
60
  v(!1);
61
61
  }
62
62
  function z(o) {
63
63
  var c, l;
64
- if (o.action) {
64
+ if (y("action", o.id), o.action) {
65
65
  if ((c = e.input) != null && c.validator && (r.value = e.input.validator(a(u)), a(r)))
66
66
  return;
67
67
  (l = o.action) == null || l.call(o, a(u));
68
68
  }
69
- y();
69
+ h();
70
70
  }
71
71
  function v(o) {
72
- T("update:modelValue", o);
72
+ y("update:modelValue", o);
73
73
  }
74
74
  return (o, c) => (t(), d(a(W), {
75
75
  id: e.id,
@@ -86,15 +86,15 @@ const P = {
86
86
  "focus-within-on-activate": e.focusWithinOnActivate,
87
87
  "closing-focus": e.closingFocus,
88
88
  "return-focus-on-deactivate": e.returnFocusOnDeactivate,
89
- class: g(O.value),
89
+ class: B(O.value),
90
90
  onEnter: N,
91
91
  "onUpdate:modelValue": v
92
92
  }, {
93
93
  default: p(() => [
94
- B(
94
+ V(
95
95
  "div",
96
96
  {
97
- class: g(D.value)
97
+ class: B(D.value)
98
98
  },
99
99
  [
100
100
  e.title || o.$slots.header || o.$slots["header.prepend"] || o.$slots["header.append"] ? (t(), i("div", P, [
@@ -118,14 +118,14 @@ const P = {
118
118
  e.icon ? (t(), i("span", R, [
119
119
  _(
120
120
  a(f),
121
- V(b(e.icon)),
121
+ b($(e.icon)),
122
122
  null,
123
123
  16
124
124
  /* FULL_PROPS */
125
125
  )
126
126
  ])) : s("v-if", !0)
127
127
  ]),
128
- B("div", j, [
128
+ V("div", j, [
129
129
  e.html ? (t(), i("div", {
130
130
  key: 0,
131
131
  innerHTML: e.text
@@ -169,14 +169,14 @@ const P = {
169
169
  (t(!0), i(
170
170
  U,
171
171
  null,
172
- w(e.buttons, (l) => (t(), d(a(q), $({ ref_for: !0 }, l.props, {
172
+ w(e.buttons, (l) => (t(), d(a(F), q({ ref_for: !0 }, l.props, {
173
173
  key: l.id,
174
174
  onClick: () => z(l)
175
175
  }), {
176
176
  default: p(() => [
177
177
  l.icon ? (t(), d(
178
178
  a(f),
179
- $({
179
+ q({
180
180
  key: 0,
181
181
  ref_for: !0
182
182
  }, l.icon),
@@ -194,16 +194,16 @@ const P = {
194
194
  ])) : s("v-if", !0),
195
195
  n(o.$slots, "footer.append")
196
196
  ])) : s("v-if", !0),
197
- e.dismissible ? (t(), d(a(q), {
197
+ e.dismissible ? (t(), d(a(F), {
198
198
  key: 3,
199
199
  class: "q-dialog__close",
200
200
  variant: "text",
201
- onClick: y
201
+ onClick: h
202
202
  }, {
203
203
  default: p(() => [
204
204
  _(
205
205
  a(f),
206
- V(b(e.icons.close)),
206
+ b($(e.icons.close)),
207
207
  null,
208
208
  16
209
209
  /* FULL_PROPS */
@@ -1 +1 @@
1
- {"version":3,"file":"QDialogProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialogProvider.vue"],"names":[],"mappings":"AASA;AAgDC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;;;;;;AAmFpD,wBAOG"}
1
+ {"version":3,"file":"QDialogProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialogProvider.vue"],"names":[],"mappings":"AAUA;AAiDC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;;;;;;AAuFpD,wBAOG"}
@@ -1,28 +1,32 @@
1
- import { defineComponent as f, createElementBlock as d, openBlock as r, Fragment as _, renderList as g, unref as t, createBlock as k, mergeProps as v } from "vue";
1
+ import { defineComponent as d, createElementBlock as _, openBlock as r, Fragment as g, renderList as k, unref as i, createBlock as v, mergeProps as A } from "vue";
2
2
  import { QDialog as B } from "./index.js";
3
3
  import { useDialog as D } from "../../composables/useDialog/index.js";
4
- const x = /* @__PURE__ */ f({
4
+ const x = /* @__PURE__ */ d({
5
5
  inheritAttrs: !1,
6
6
  __name: "QDialogProvider",
7
7
  props: {
8
8
  inline: { type: Boolean }
9
9
  },
10
10
  emits: ["leave"],
11
- setup(i, { emit: l }) {
12
- const a = i, m = l, { dialogs: p, removeDialog: s } = D();
13
- function u(e, n) {
14
- n || (s(e), m("leave", e));
11
+ setup(l, { emit: a }) {
12
+ const m = l, p = a, { dialogs: s, removeDialog: c } = D();
13
+ function u(n, o) {
14
+ o || (c(n), p("leave", n));
15
15
  }
16
- return (e, n) => (r(!0), d(
17
- _,
16
+ return (n, o) => (r(!0), _(
17
+ g,
18
18
  null,
19
- g(t(p), (o) => (r(), k(t(B), v({
20
- key: o.id,
21
- ref_for: !0
22
- }, o.props, {
23
- inline: a.inline,
24
- "onUpdate:modelValue": (c) => u(o.id, c)
25
- }), null, 16, ["inline", "onUpdate:modelValue"]))),
19
+ k(i(s), (e) => {
20
+ var t;
21
+ return r(), v(i(B), A({
22
+ key: e.id,
23
+ ref_for: !0
24
+ }, e.props, {
25
+ inline: m.inline,
26
+ onAction: (t = e.handlers) == null ? void 0 : t.onAction,
27
+ "onUpdate:modelValue": (f) => u(e.id, f)
28
+ }), null, 16, ["inline", "onAction", "onUpdate:modelValue"]);
29
+ }),
26
30
  128
27
31
  /* KEYED_FRAGMENT */
28
32
  ));
@@ -1,8 +1,10 @@
1
1
  declare const QDialog: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').QDialogProps> & Readonly<{
3
3
  "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
4
+ onAction?: ((val: string) => any) | undefined;
4
5
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
5
6
  "update:modelValue": (val: boolean) => any;
7
+ action: (val: string) => any;
6
8
  }, import('vue').PublicProps, {
7
9
  size: import('./types').QDialogSize;
8
10
  html: boolean;
@@ -23,6 +25,7 @@ declare const QDialog: {
23
25
  Defaults: {};
24
26
  }, Readonly<import('./types').QDialogProps> & Readonly<{
25
27
  "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
28
+ onAction?: ((val: string) => any) | undefined;
26
29
  }>, {}, {}, {}, {}, {
27
30
  size: import('./types').QDialogSize;
28
31
  html: boolean;
@@ -40,8 +43,10 @@ declare const QDialog: {
40
43
  __isSuspense?: never;
41
44
  } & import('vue').ComponentOptionsBase<Readonly<import('./types').QDialogProps> & Readonly<{
42
45
  "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
46
+ onAction?: ((val: string) => any) | undefined;
43
47
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
44
48
  "update:modelValue": (val: boolean) => any;
49
+ action: (val: string) => any;
45
50
  }, string, {
46
51
  size: import('./types').QDialogSize;
47
52
  html: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/index.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA4B,CAAA;AACzC,QAAA,MAAM,eAAe;;;;kFAAoC,CAAA;AAGzD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAA;AAGnC,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/index.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA4B,CAAA;AACzC,QAAA,MAAM,eAAe;;;;kFAAoC,CAAA;AAGzD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAA;AAGnC,cAAc,SAAS,CAAA"}
@@ -199,5 +199,12 @@ export type QDialogHandlers = {
199
199
  * @category Behavior
200
200
  */
201
201
  onLeave?: () => boolean | void;
202
+ /**
203
+ * Handler for 'action' event.
204
+ *
205
+ * @category Behavior
206
+ * @param val - The ID of the button pressed
207
+ */
208
+ onAction?: (val: string) => void;
202
209
  };
203
210
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEjE,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG;IAChD;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;IAEX;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IAExB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,CAAA;IAElB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAA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AAO,CAAC,EAAE,MAAM,IAAI,CAAA;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAA;IAE9B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"QTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextArea/QTextArea.vue"],"names":[],"mappings":"AAiDA;AAmHC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAO7C,KAAK,WAAW,GAAG,cAAc,CAAC;AAwDnC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;iCAhBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACJ,GAAG;wBACF,GAAG;;;;;;EAiB/B;AAgBD,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":"QTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextArea/QTextArea.vue"],"names":[],"mappings":"AAiDA;AAsHC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAO7C,KAAK,WAAW,GAAG,cAAc,CAAC;AA2DnC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;iCAhBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACJ,GAAG;wBACF,GAAG;;;;;;EAiB/B;AAgBD,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,11 +1,11 @@
1
- import { defineComponent as y, mergeModels as h, useModel as z, computed as t, watch as x, toRef as g, ref as w, createBlock as q, openBlock as $, unref as n, normalizeClass as v, createSlots as B, withCtx as a, withDirectives as k, createElementVNode as M, mergeProps as V, toHandlers as P, vModelText as R, renderSlot as r } from "vue";
2
- import { QField as A } from "../QField/index.js";
3
- import { useId as C } from "../../composables/uid.js";
4
- import { useTextareaAutosize as H } from "../../vendors/@vueuse/core/index.js";
5
- const L = ["id", "required", "placeholder", "readonly", "disabled", "maxlength", "rows", "cols", "resize", "wrap"], D = /* @__PURE__ */ y({
1
+ import { defineComponent as h, mergeModels as z, useModel as x, computed as t, watch as g, toRef as w, ref as q, onBeforeUnmount as $, createBlock as B, openBlock as v, unref as n, normalizeClass as k, createSlots as M, withCtx as a, withDirectives as V, createElementVNode as P, mergeProps as R, toHandlers as A, vModelText as C, renderSlot as r } from "vue";
2
+ import { QField as H } from "../QField/index.js";
3
+ import { useId as L } from "../../composables/uid.js";
4
+ import { useTextareaAutosize as T } from "../../composables/useTextareaAutosize/index.js";
5
+ const I = ["id", "required", "placeholder", "readonly", "disabled", "maxlength", "rows", "cols", "resize", "wrap"], E = /* @__PURE__ */ h({
6
6
  inheritAttrs: !1,
7
7
  __name: "QTextArea",
8
- props: /* @__PURE__ */ h({
8
+ props: /* @__PURE__ */ z({
9
9
  id: {},
10
10
  class: {},
11
11
  label: {},
@@ -29,22 +29,22 @@ const L = ["id", "required", "placeholder", "readonly", "disabled", "maxlength",
29
29
  }),
30
30
  emits: ["update:modelValue"],
31
31
  setup(i) {
32
- const e = i, s = z(i, "modelValue"), d = t({
32
+ const e = i, s = x(i, "modelValue"), d = t({
33
33
  get: () => s.value,
34
34
  set: (l) => {
35
35
  const o = e.maxLength;
36
36
  s.value = o ? l == null ? void 0 : l.slice(0, o) : l;
37
37
  }
38
38
  });
39
- x(s, (l) => d.value = l, { immediate: !0 });
40
- const p = C(g(e, "id")), m = t(
39
+ g(s, (l) => d.value = l, { immediate: !0 });
40
+ const p = L(w(e, "id")), m = t(
41
41
  () => e.readonly || e.disabled ? void 0 : e.placeholder
42
- ), f = t(() => ({ input: e.autosize ? c : null })), u = w(), { triggerResize: c } = H({
42
+ ), f = t(() => ({ input: e.autosize ? c : null })), u = q(), { triggerResize: c, stop: b } = T({
43
43
  element: t(() => e.autosize ? u.value : void 0),
44
44
  styleProp: "minHeight"
45
45
  });
46
- return (l, o) => ($(), q(n(A), {
47
- class: v(["q-text-area", e.class]),
46
+ return $(b), (l, o) => (v(), B(n(H), {
47
+ class: k(["q-text-area", e.class]),
48
48
  for: n(p),
49
49
  label: e.label,
50
50
  "label-position": e.labelPosition,
@@ -52,7 +52,7 @@ const L = ["id", "required", "placeholder", "readonly", "disabled", "maxlength",
52
52
  readonly: e.readonly,
53
53
  disabled: e.disabled,
54
54
  required: e.required
55
- }, B({
55
+ }, M({
56
56
  "label.prepend": a(() => [
57
57
  r(l.$slots, "label.prepend")
58
58
  ]),
@@ -60,11 +60,11 @@ const L = ["id", "required", "placeholder", "readonly", "disabled", "maxlength",
60
60
  r(l.$slots, "label.append")
61
61
  ]),
62
62
  default: a(() => [
63
- k(M("textarea", V({
63
+ V(P("textarea", R({
64
64
  id: n(p),
65
65
  ref_key: "textareaRef",
66
66
  ref: u,
67
- "onUpdate:modelValue": o[0] || (o[0] = (b) => d.value = b),
67
+ "onUpdate:modelValue": o[0] || (o[0] = (y) => d.value = y),
68
68
  class: "q-text-area__input",
69
69
  required: e.required,
70
70
  placeholder: m.value,
@@ -75,8 +75,8 @@ const L = ["id", "required", "placeholder", "readonly", "disabled", "maxlength",
75
75
  cols: e.cols,
76
76
  resize: e.resize,
77
77
  wrap: e.wrap
78
- }, l.$attrs, P(f.value, !0)), null, 16, L), [
79
- [R, d.value]
78
+ }, l.$attrs, A(f.value, !0)), null, 16, I), [
79
+ [C, d.value]
80
80
  ])
81
81
  ]),
82
82
  _: 2
@@ -107,5 +107,5 @@ const L = ["id", "required", "placeholder", "readonly", "disabled", "maxlength",
107
107
  }
108
108
  });
109
109
  export {
110
- D as default
110
+ E as default
111
111
  };
@@ -87,6 +87,7 @@ export declare function useDialog(): {
87
87
  handlers?: {
88
88
  onEnter?: (() => void) | undefined;
89
89
  onLeave?: (() => boolean | void) | undefined;
90
+ onAction?: ((val: string) => void) | undefined;
90
91
  } | undefined;
91
92
  }[];
92
93
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,MAAM,mCAAmC,CAAA;AAS1C;;;;GAIG;AACH,wBAAgB,SAAS;uBAWhB,YAAY,OACd,MAAM,YACD,cAAc,aACb,eAAe;uBAyBD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAmBm7B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EADp9B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,MAAM,mCAAmC,CAAA;AAS1C;;;;GAIG;AACH,wBAAgB,SAAS;uBAWhB,YAAY,OACd,MAAM,YACD,cAAc,aACb,eAAe;uBAyBD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAmBm7B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EADp9B"}
@@ -0,0 +1,11 @@
1
+ import { ComputedRef } from 'vue';
2
+ interface UseTextareaAutosizeOptions {
3
+ element: ComputedRef<HTMLTextAreaElement | undefined>;
4
+ styleProp?: 'height' | 'minHeight';
5
+ }
6
+ export declare function useTextareaAutosize(options: UseTextareaAutosizeOptions): {
7
+ triggerResize: () => void;
8
+ stop: () => void;
9
+ };
10
+ export {};
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useTextareaAutosize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,WAAW,EAAE,MAAM,KAAK,CAAA;AAE7C,UAAU,0BAA0B;IACnC,OAAO,EAAE,WAAW,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAAA;IACrD,SAAS,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAClC;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;EA+BtE"}
@@ -0,0 +1,22 @@
1
+ import { watch as l } from "vue";
2
+ function i(r) {
3
+ const { element: e, styleProp: s = "height" } = r, o = () => {
4
+ const t = e.value;
5
+ if (!t) return;
6
+ t.style[s] = "auto";
7
+ const a = t.scrollHeight;
8
+ t.style[s] = `${a}px`;
9
+ }, c = l(e, o), n = l(() => {
10
+ var t;
11
+ return (t = e.value) == null ? void 0 : t.value;
12
+ }, o);
13
+ return {
14
+ triggerResize: o,
15
+ stop: () => {
16
+ c(), n();
17
+ }
18
+ };
19
+ }
20
+ export {
21
+ i as useTextareaAutosize
22
+ };
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.16.67",
4
+ "version": "0.16.69",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",
@@ -72,8 +72,6 @@
72
72
  },
73
73
  "dependencies": {
74
74
  "@vuepic/vue-datepicker": "^11.0.3",
75
- "@vueuse/core": "^13.0.0",
76
- "@vueuse/integrations": "^13.0.0",
77
75
  "maska": "^3.1.0",
78
76
  "uuid": "^13.0.0"
79
77
  },
@@ -1,85 +0,0 @@
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;
9
- }
10
- function A() {
11
- const e = m(!1), t = R();
12
- return t && z(() => {
13
- e.value = !0;
14
- }, t), e;
15
- }
16
- function O(e) {
17
- const t = A();
18
- return w(() => (t.value, !!e()));
19
- }
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);
35
- }
36
- },
37
- { immediate: !0, flush: "post" }
38
- ), n = () => {
39
- a(), c();
40
- };
41
- return _(n), {
42
- isSupported: o,
43
- stop: n
44
- };
45
- }
46
- function S(e = p, t) {
47
- e && typeof e.requestAnimationFrame == "function" ? e.requestAnimationFrame(t) : t();
48
- }
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)
55
- 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;
60
- }
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();
67
- });
68
- }), e != null && e.watch && v(e.watch, c, { immediate: !0, deep: !0 }), {
69
- textarea: u,
70
- input: l,
71
- triggerResize: c
72
- };
73
- }
74
- 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
85
- };
@@ -1,20 +0,0 @@
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;
4
- }
5
- const l = typeof window < "u" && typeof document < "u";
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);
14
- }
15
- export {
16
- l as isClient,
17
- p as noop,
18
- d as toRef,
19
- s as tryOnScopeDispose
20
- };