@quidgest/ui 0.16.45 → 0.16.46

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.
@@ -1,6 +1,5 @@
1
- import { defineComponent as l, computed as a, createElementBlock as n, openBlock as d, normalizeClass as i, renderSlot as s, createElementVNode as p, mergeProps as c, createTextVNode as u, toDisplayString as f } from "vue";
2
- const m = ["id"], b = ["for"], h = /* @__PURE__ */ l({
3
- inheritAttrs: !1,
1
+ import { defineComponent as t, computed as a, createElementBlock as n, openBlock as d, normalizeClass as c, renderSlot as l, createElementVNode as i, createTextVNode as p, toDisplayString as u } from "vue";
2
+ const f = ["id"], m = ["for"], q = /* @__PURE__ */ t({
4
3
  __name: "QLabel",
5
4
  props: {
6
5
  id: {},
@@ -9,34 +8,34 @@ const m = ["id"], b = ["for"], h = /* @__PURE__ */ l({
9
8
  required: { type: Boolean },
10
9
  for: {}
11
10
  },
12
- setup(o) {
13
- const e = o, t = a(() => [
11
+ setup(s) {
12
+ const e = s, r = a(() => [
14
13
  "q-label",
15
14
  {
16
15
  "q-label--required": e.required
17
16
  },
18
17
  e.class
19
18
  ]);
20
- return (r, _) => (d(), n("div", {
19
+ return (o, _) => (d(), n("div", {
21
20
  id: e.id,
22
- class: i(t.value)
21
+ class: c(r.value)
23
22
  }, [
24
- s(r.$slots, "prepend"),
25
- p("label", c({
23
+ l(o.$slots, "prepend"),
24
+ i("label", {
26
25
  for: e.for
27
- }, r.$attrs), [
28
- s(r.$slots, "default", {}, () => [
29
- u(
30
- f(e.label),
26
+ }, [
27
+ l(o.$slots, "default", {}, () => [
28
+ p(
29
+ u(e.label),
31
30
  1
32
31
  /* TEXT */
33
32
  )
34
33
  ])
35
- ], 16, b),
36
- s(r.$slots, "append")
37
- ], 10, m));
34
+ ], 8, m),
35
+ l(o.$slots, "append")
36
+ ], 10, f));
38
37
  }
39
38
  });
40
39
  export {
41
- h as default
40
+ q as default
42
41
  };
@@ -1,5 +1,5 @@
1
1
  declare const QLabel: {
2
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').QLabelProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').QLabelProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
3
3
  P: {};
4
4
  B: {};
5
5
  D: {};
@@ -5,7 +5,9 @@ declare function __VLS_template(): {
5
5
  default?(_: {}): any;
6
6
  default?(_: {}): any;
7
7
  };
8
- refs: {};
8
+ refs: {
9
+ inputEl: HTMLInputElement;
10
+ };
9
11
  rootEl: any;
10
12
  };
11
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -13,7 +15,9 @@ declare const __VLS_component: import('vue').DefineComponent<QRadioButtonProps,
13
15
  size: import('./types').QRadioButtonSize;
14
16
  color: string;
15
17
  labelPlacement: import('./types').QRadioButtonLabelPlacement;
16
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
19
+ inputEl: HTMLInputElement;
20
+ }, any>;
17
21
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
22
  export default _default;
19
23
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"QRadioButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QRadioGroup/QRadioButton.vue"],"names":[],"mappings":"AA2BA;AA0FC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAmDjD,iBAAS,cAAc;WAgET,OAAO,IAA6B;;yBAZrB,GAAG;yBACH,GAAG;;;;EAgB/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6EAOnB,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":"QRadioButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QRadioGroup/QRadioButton.vue"],"names":[],"mappings":"AA+BA;AAuGC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AA4DjD,iBAAS,cAAc;WAiFT,OAAO,IAA6B;;yBAbrB,GAAG;yBACF,GAAG;;;;;;EAiBhC;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;OAQnB,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,8 +1,8 @@
1
- import { defineComponent as m, toRef as b, computed as r, createBlock as f, openBlock as v, unref as o, normalizeClass as y, createSlots as g, withCtx as d, createElementVNode as q, renderSlot as s, createCommentVNode as B, mergeProps as C } from "vue";
2
- import { QLabel as h } from "../QLabel/index.js";
3
- import { useId as k } from "../../composables/uid.js";
4
- import { useGroupItem as z } from "../../composables/useGroup/index.js";
5
- const P = ["id", "checked", "name", "value", "disabled"], w = /* @__PURE__ */ m({
1
+ import { defineComponent as v, toRef as y, useTemplateRef as g, computed as r, createBlock as C, openBlock as k, unref as t, withModifiers as i, normalizeClass as q, createSlots as B, withCtx as s, createElementVNode as R, renderSlot as d, createCommentVNode as h, mergeProps as w } from "vue";
2
+ import { QLabel as z } from "../QLabel/index.js";
3
+ import { useId as E } from "../../composables/uid.js";
4
+ import { useGroupItem as P } from "../../composables/useGroup/index.js";
5
+ const $ = ["id", "checked", "name", "value", "disabled"], G = /* @__PURE__ */ v({
6
6
  inheritAttrs: !1,
7
7
  __name: "QRadioButton",
8
8
  props: {
@@ -20,15 +20,15 @@ const P = ["id", "checked", "name", "value", "disabled"], w = /* @__PURE__ */ m(
20
20
  readonly: { type: Boolean },
21
21
  invalid: { type: Boolean }
22
22
  },
23
- setup(i) {
24
- const e = i, n = k(b(e, "id")), t = z(e.value);
25
- if (!t)
23
+ setup(u) {
24
+ const e = u, n = E(y(e, "id")), p = g("inputEl"), a = P(e.value);
25
+ if (!a)
26
26
  throw new Error("QRadioButton must be used inside a QRadioGroup");
27
- const u = r(() => e.labelPlacement === "start" ? "append" : "prepend"), p = r(() => {
28
- const a = e.size !== "regular" ? `q-radio-button--${e.size}` : void 0, l = e.color !== "primary" ? `q-radio-button--${e.color}` : void 0;
27
+ const c = r(() => e.labelPlacement === "start" ? "append" : "prepend"), m = r(() => {
28
+ const o = e.size !== "regular" ? `q-radio-button--${e.size}` : void 0, l = e.color !== "primary" ? `q-radio-button--${e.color}` : void 0;
29
29
  return [
30
30
  "q-radio-button",
31
- a,
31
+ o,
32
32
  l,
33
33
  {
34
34
  "q-radio-button--readonly": e.readonly,
@@ -38,40 +38,49 @@ const P = ["id", "checked", "name", "value", "disabled"], w = /* @__PURE__ */ m(
38
38
  e.class
39
39
  ];
40
40
  });
41
- return (a, l) => (v(), f(o(h), {
42
- for: o(n),
43
- class: y(p.value),
44
- label: e.label
45
- }, g({
46
- [u.value]: d(() => [
47
- q("input", C({
48
- id: o(n),
49
- checked: o(t).isActive.value,
50
- tabindex: "0",
41
+ function f() {
42
+ var o;
43
+ (o = p.value) == null || o.focus();
44
+ }
45
+ return (o, l) => (k(), C(t(z), {
46
+ for: t(n),
47
+ class: q(m.value),
48
+ label: e.label,
49
+ tabindex: "-1",
50
+ onMousedown: i(f, ["prevent"]),
51
+ onClick: t(a).toggle
52
+ }, B({
53
+ [c.value]: s(() => [
54
+ R("input", w({
55
+ id: t(n),
56
+ ref: "inputEl",
57
+ checked: t(a).isActive.value,
51
58
  type: "radio",
52
59
  class: "q-radio-button__input",
53
60
  name: e.name,
54
- value: a.value,
61
+ value: o.value,
55
62
  disabled: e.readonly || e.disabled
56
- }, a.$attrs, {
63
+ }, o.$attrs, {
57
64
  onChange: l[0] || (l[0] = //@ts-ignore
58
- (...c) => o(t).toggle && o(t).toggle(...c))
59
- }), null, 16, P),
60
- e.labelPlacement === "end" ? s(a.$slots, "default", { key: 0 }) : B("v-if", !0)
65
+ (...b) => t(a).toggle && t(a).toggle(...b)),
66
+ onClick: l[1] || (l[1] = i(() => {
67
+ }, ["stop"]))
68
+ }), null, 16, $),
69
+ e.labelPlacement === "end" ? d(o.$slots, "default", { key: 0 }) : h("v-if", !0)
61
70
  ]),
62
71
  _: 2
63
72
  /* DYNAMIC */
64
73
  }, [
65
74
  e.labelPlacement === "start" ? {
66
75
  name: "prepend",
67
- fn: d(() => [
68
- s(a.$slots, "default")
76
+ fn: s(() => [
77
+ d(o.$slots, "default")
69
78
  ]),
70
79
  key: "0"
71
80
  } : void 0
72
- ]), 1032, ["for", "class", "label"]));
81
+ ]), 1032, ["for", "class", "label", "onClick"]));
73
82
  }
74
83
  });
75
84
  export {
76
- w as default
85
+ G as default
77
86
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as y, mergeModels as q, useModel as b, watch as B, toRef as r, computed as d, createElementBlock as n, openBlock as l, normalizeClass as _, createBlock as h, createCommentVNode as u, createElementVNode as z, unref as a, mergeProps as k, renderSlot as m } from "vue";
1
+ import { defineComponent as q, mergeModels as y, useModel as b, watch as B, toRef as r, computed as d, createElementBlock as n, openBlock as l, normalizeClass as _, createBlock as h, createCommentVNode as u, createElementVNode as z, unref as a, mergeProps as k, renderSlot as m } from "vue";
2
2
  import { QLabel as V } from "../QLabel/index.js";
3
3
  import { provideDefaults as $ } from "../../composables/defaults.js";
4
4
  import { useId as c } from "../../composables/uid.js";
@@ -6,10 +6,10 @@ import { useGroup as C } from "../../composables/useGroup/index.js";
6
6
  const M = ["id"], Q = {
7
7
  key: 1,
8
8
  class: "q-field__extras"
9
- }, x = /* @__PURE__ */ y({
9
+ }, x = /* @__PURE__ */ q({
10
10
  inheritAttrs: !1,
11
11
  __name: "QRadioGroup",
12
- props: /* @__PURE__ */ q({
12
+ props: /* @__PURE__ */ y({
13
13
  id: {},
14
14
  class: {},
15
15
  label: {},
@@ -28,7 +28,7 @@ const M = ["id"], Q = {
28
28
  }),
29
29
  emits: ["update:modelValue"],
30
30
  setup(t) {
31
- const e = t, i = b(t, "modelValue"), { active: p } = C({ active: i });
31
+ const e = t, i = b(t, "modelValue"), { active: p } = C({ active: i, required: !0 });
32
32
  B(p, (o) => {
33
33
  i.value = o;
34
34
  });
@@ -3,7 +3,9 @@ declare const QRadioButton: {
3
3
  size: import('./types').QRadioButtonSize;
4
4
  color: string;
5
5
  labelPlacement: import('./types').QRadioButtonLabelPlacement;
6
- }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
6
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
7
+ inputEl: HTMLInputElement;
8
+ }, any, import('vue').ComponentProvideOptions, {
7
9
  P: {};
8
10
  B: {};
9
11
  D: {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QRadioGroup/index.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiC,CAAA;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAA;AAGjD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAA;AAGpC,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QRadioGroup/index.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiC,CAAA;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAA;AAGjD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAA;AAGpC,cAAc,SAAS,CAAA"}