@quidgest/ui 0.14.7 → 0.14.8

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,12 +1,13 @@
1
- import { defineComponent as k, mergeModels as f, useModel as y, computed as x, openBlock as l, createElementBlock as t, Fragment as _, createElementVNode as a, normalizeClass as v, toDisplayString as s, createCommentVNode as n, unref as u, withModifiers as d, withKeys as m, createBlock as g, mergeProps as q } from "vue";
2
- import { QIcon as B } from "../QIcon/index.js";
3
- import { useId as C } from "../../composables/uid.js";
4
- import { DEFAULT_ICONS as V } from "./types.js";
5
- const w = { key: 0 }, M = ["id", "aria-checked", "disabled", "onKeydown"], P = { key: 1 }, z = ["checked", "disabled"], D = /* @__PURE__ */ k({
1
+ import { defineComponent as x, mergeModels as v, useModel as _, computed as q, openBlock as t, createElementBlock as g, Fragment as B, createElementVNode as o, normalizeClass as C, createBlock as n, createSlots as u, withCtx as m, renderSlot as b, createCommentVNode as d, unref as f, withModifiers as i, withKeys as p, mergeProps as $ } from "vue";
2
+ import { QIcon as w } from "../QIcon/index.js";
3
+ import k from "./QCheckboxLabel.vue.js";
4
+ import { useId as V } from "../../composables/uid.js";
5
+ import { DEFAULT_ICONS as M } from "./types.js";
6
+ const P = ["id", "aria-checked", "disabled", "onKeydown"], z = ["checked", "disabled"], F = /* @__PURE__ */ x({
6
7
  __name: "QCheckbox",
7
- props: /* @__PURE__ */ f({
8
- id: { default: void 0 },
8
+ props: /* @__PURE__ */ v({
9
9
  label: { default: "" },
10
+ id: { default: void 0 },
10
11
  labelPlacement: { default: "right" },
11
12
  disabled: { type: Boolean },
12
13
  readonly: { type: Boolean },
@@ -14,84 +15,100 @@ const w = { key: 0 }, M = ["id", "aria-checked", "disabled", "onKeydown"], P = {
14
15
  color: { default: "primary" },
15
16
  size: { default: "regular" },
16
17
  class: { default: void 0 },
17
- icons: { default: () => V }
18
+ icons: { default: () => M }
18
19
  }, {
19
20
  modelValue: { type: Boolean },
20
21
  modelModifiers: {}
21
22
  }),
22
23
  emits: ["update:modelValue"],
23
- setup(i) {
24
- const e = i, o = y(i, "modelValue"), b = C(e.id), p = x(() => [
24
+ setup(r) {
25
+ const e = r, l = _(r, "modelValue"), h = V(e.id), y = q(() => [
25
26
  "q-checkbox",
26
27
  `q-checkbox--${e.size}`,
27
28
  `q-checkbox--${e.color}`,
28
29
  {
29
30
  "q-checkbox--readonly": e.readonly,
30
31
  "q-checkbox--disabled": e.disabled,
31
- "q-checkbox--checked": o.value,
32
+ "q-checkbox--checked": l.value,
32
33
  "q-checkbox--indeterminate": e.indeterminate
33
34
  },
34
35
  e.class
35
36
  ]);
36
- function c() {
37
- !e.disabled && !e.readonly && (o.value = !o.value);
37
+ function s() {
38
+ !e.disabled && !e.readonly && (l.value = !l.value);
38
39
  }
39
- return (h, r) => (l(), t(
40
- _,
40
+ return (a, c) => (t(), g(
41
+ B,
41
42
  null,
42
43
  [
43
- a(
44
+ o(
44
45
  "label",
45
46
  {
46
- class: v(p.value)
47
+ class: C(y.value)
47
48
  },
48
49
  [
49
- e.labelPlacement !== "right" ? (l(), t(
50
- "span",
51
- w,
52
- s(e.label),
53
- 1
54
- /* TEXT */
55
- )) : n("v-if", !0),
56
- a("button", {
57
- id: u(b),
50
+ e.labelPlacement !== "right" ? (t(), n(k, {
51
+ key: 0,
52
+ label: e.label
53
+ }, u({
54
+ _: 2
55
+ /* DYNAMIC */
56
+ }, [
57
+ a.$slots.extras ? {
58
+ name: "extras",
59
+ fn: m(() => [
60
+ b(a.$slots, "extras")
61
+ ]),
62
+ key: "0"
63
+ } : void 0
64
+ ]), 1032, ["label"])) : d("v-if", !0),
65
+ o("button", {
66
+ id: f(h),
58
67
  role: "checkbox",
59
68
  type: "button",
60
- "aria-checked": e.indeterminate ? "mixed" : o.value,
69
+ "aria-checked": e.indeterminate ? "mixed" : l.value,
61
70
  disabled: e.disabled || e.readonly,
62
71
  class: "q-checkbox__input",
63
- onClick: d(c, ["prevent"]),
72
+ onClick: i(s, ["prevent"]),
64
73
  onKeydown: [
65
- m(d(c, ["prevent"]), ["space"]),
66
- r[0] || (r[0] = m(d(() => {
74
+ p(i(s, ["prevent"]), ["space"]),
75
+ c[0] || (c[0] = p(i(() => {
67
76
  }, ["prevent"]), ["enter"]))
68
77
  ]
69
78
  }, [
70
- o.value || h.indeterminate ? (l(), g(
71
- u(B),
72
- q({ key: 0 }, o.value ? e.icons.checked : e.icons.indeterminate, { class: "q-checkbox__input-icon" }),
79
+ l.value || a.indeterminate ? (t(), n(
80
+ f(w),
81
+ $({ key: 0 }, l.value ? e.icons.checked : e.icons.indeterminate, { class: "q-checkbox__input-icon" }),
73
82
  null,
74
83
  16
75
84
  /* FULL_PROPS */
76
- )) : n("v-if", !0)
77
- ], 40, M),
78
- e.labelPlacement === "right" ? (l(), t(
79
- "span",
80
- P,
81
- s(e.label),
82
- 1
83
- /* TEXT */
84
- )) : n("v-if", !0)
85
+ )) : d("v-if", !0)
86
+ ], 40, P),
87
+ e.labelPlacement === "right" ? (t(), n(k, {
88
+ key: 1,
89
+ label: e.label
90
+ }, u({
91
+ _: 2
92
+ /* DYNAMIC */
93
+ }, [
94
+ a.$slots.extras ? {
95
+ name: "extras",
96
+ fn: m(() => [
97
+ b(a.$slots, "extras")
98
+ ]),
99
+ key: "0"
100
+ } : void 0
101
+ ]), 1032, ["label"])) : d("v-if", !0)
85
102
  ],
86
103
  2
87
104
  /* CLASS */
88
105
  ),
89
- a("input", {
106
+ o("input", {
90
107
  type: "checkbox",
91
108
  tabindex: "-1",
92
109
  "aria-hidden": "true",
93
110
  class: "q-checkbox__native-input",
94
- checked: !!o.value,
111
+ checked: !!l.value,
95
112
  disabled: e.disabled || e.readonly
96
113
  }, null, 8, z)
97
114
  ],
@@ -101,5 +118,5 @@ const w = { key: 0 }, M = ["id", "aria-checked", "disabled", "onKeydown"], P = {
101
118
  }
102
119
  });
103
120
  export {
104
- D as default
121
+ F as default
105
122
  };
@@ -0,0 +1,21 @@
1
+ import { QCheckboxLabelProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ extras?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<QCheckboxLabelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<QCheckboxLabelProps> & Readonly<{}>, {
12
+ label: string;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
+ export default _default;
16
+ type __VLS_WithTemplateSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
21
+ //# sourceMappingURL=QCheckboxLabel.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QCheckboxLabel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QCheckbox/QCheckboxLabel.vue"],"names":[],"mappings":"AAWA;AAuBC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAiBnD,iBAAS,cAAc;WA4CT,OAAO,IAA6B;;wBARtB,GAAG;;;;EAa9B;AASD,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;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { defineComponent as r, openBlock as s, createElementBlock as o, createElementVNode as l, toDisplayString as n, renderSlot as c } from "vue";
2
+ const p = { key: 0 }, _ = { class: "q-field__extras" }, d = { key: 1 }, f = /* @__PURE__ */ r({
3
+ __name: "QCheckboxLabel",
4
+ props: {
5
+ label: { default: "" }
6
+ },
7
+ setup(a) {
8
+ const e = a;
9
+ return (t, i) => t.$slots.extras ? (s(), o("div", p, [
10
+ l(
11
+ "span",
12
+ null,
13
+ n(e.label),
14
+ 1
15
+ /* TEXT */
16
+ ),
17
+ l("div", _, [
18
+ c(t.$slots, "extras")
19
+ ])
20
+ ])) : (s(), o(
21
+ "span",
22
+ d,
23
+ n(e.label),
24
+ 1
25
+ /* TEXT */
26
+ ));
27
+ }
28
+ });
29
+ export {
30
+ f as default
31
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./QCheckboxLabel.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,13 +1,9 @@
1
1
  import { Icon } from '../QIcon';
2
- export type QCheckboxProps = {
2
+ export type QCheckboxProps = QCheckboxLabelProps & {
3
3
  /**
4
4
  * The field unique identifier.
5
5
  */
6
6
  id?: string;
7
- /**
8
- * The text content of the checkbox.
9
- */
10
- label?: string;
11
7
  /**
12
8
  * The placement of the label shown.
13
9
  */
@@ -41,6 +37,12 @@ export type QCheckboxProps = {
41
37
  */
42
38
  icons?: typeof DEFAULT_ICONS;
43
39
  };
40
+ export type QCheckboxLabelProps = {
41
+ /**
42
+ * The text content of the checkbox.
43
+ */
44
+ label?: string;
45
+ };
44
46
  type IconKeys = 'checked' | 'indeterminate';
45
47
  export declare const DEFAULT_ICONS: Record<IconKeys, Icon>;
46
48
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QCheckbox/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,MAAM,cAAc,GAAG;IAC5B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;I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;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,KAAK,QAAQ,GAAG,SAAS,GAAG,eAAe,CAAA;AAG3C,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,CAOhD,CAAA"}
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.14.7",
4
+ "version": "0.14.8",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",