maz-ui 3.44.4-beta.7 → 3.44.4-beta.9

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 (128) hide show
  1. package/components/MazBackdrop.d.ts +1 -1
  2. package/components/MazCheckbox.d.ts +45 -65
  3. package/components/MazCheckbox.mjs +97 -71
  4. package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +105 -29
  5. package/components/MazDropdown.d.ts +4 -4
  6. package/components/MazDropdown.mjs +1 -12
  7. package/components/MazDropzone.d.ts +3 -3
  8. package/components/MazInput.d.ts +3 -3
  9. package/components/MazInput.mjs +1 -1
  10. package/components/MazInputCode.d.ts +17 -67
  11. package/components/MazInputCode.mjs +109 -93
  12. package/components/MazInputNumber.d.ts +9 -1
  13. package/components/MazInputNumber.mjs +1 -1
  14. package/components/MazInputPrice.d.ts +23 -6
  15. package/components/MazInputPrice.mjs +1 -1
  16. package/components/MazInputTags.d.ts +6 -4
  17. package/components/MazInputTags.mjs +1 -1
  18. package/components/MazPhoneNumberInput.mjs +1 -1
  19. package/components/MazPicker.mjs +1 -1
  20. package/components/MazRadio.d.ts +41 -87
  21. package/components/MazRadio.mjs +85 -57
  22. package/components/MazRadioButtons.d.ts +40 -67
  23. package/components/MazRadioButtons.mjs +157 -122
  24. package/components/MazReadingProgressBar.mjs +29 -28
  25. package/components/MazSelect.d.ts +3 -3
  26. package/components/MazSelect.mjs +1 -1
  27. package/components/MazSwitch.d.ts +15 -1
  28. package/components/MazSwitch.mjs +79 -36
  29. package/components/MazTable.d.ts +6 -34
  30. package/components/MazTable.mjs +1 -1
  31. package/components/MazTextarea.d.ts +7 -5
  32. package/components/MazTextarea.mjs +9 -4
  33. package/components/assets/MazCheckbox.css +1 -1
  34. package/components/assets/MazInput.css +1 -1
  35. package/components/assets/MazInputCode.css +1 -1
  36. package/components/assets/MazInputNumber.css +1 -1
  37. package/components/assets/MazInputPrice.css +1 -1
  38. package/components/assets/MazInputTags.css +1 -1
  39. package/components/assets/MazPhoneNumberInput.css +1 -1
  40. package/components/assets/MazPicker.css +1 -1
  41. package/components/assets/MazRadio.css +1 -1
  42. package/components/assets/MazRadioButtons.css +1 -1
  43. package/components/assets/MazSelect.css +1 -1
  44. package/components/assets/MazSwitch.css +1 -1
  45. package/components/assets/MazTable.css +1 -1
  46. package/components/assets/MazTextarea.css +1 -1
  47. package/components/chunks/{MazBtn-YtY4PeyZ.mjs → MazBtn-BGGyg-rm.mjs} +2 -2
  48. package/components/chunks/{MazBtn-B6TXxFme.mjs → MazBtn-BPU_AqTZ.mjs} +2 -2
  49. package/components/chunks/{MazBtn-BURByjBO.mjs → MazBtn-BpA0sObZ.mjs} +2 -2
  50. package/components/chunks/{MazBtn-DeLJCP2D.mjs → MazBtn-lTOX3L3D.mjs} +2 -2
  51. package/components/chunks/MazCheckbox-Bn3Dj9NV.mjs +145 -0
  52. package/components/chunks/MazCheckbox-Dd9Lbwu5.mjs +145 -0
  53. package/components/chunks/{MazIcon-CwITLbPL.mjs → MazIcon-AqrraC4c.mjs} +1 -1
  54. package/components/chunks/{MazIcon-x_aGvHlZ.mjs → MazIcon-CACuxev1.mjs} +1 -1
  55. package/components/chunks/{MazInput-DtXDTEbn.mjs → MazInput-BhKgHfCf.mjs} +2 -2
  56. package/components/chunks/{MazInputNumber-Bbo6UwHG.mjs → MazInputNumber-F6IVaJOM.mjs} +58 -50
  57. package/components/chunks/{MazInputPrice-CSft00gJ.mjs → MazInputPrice-B6uSbUfK.mjs} +172 -152
  58. package/components/chunks/{MazInputTags-CMLyznXG.mjs → MazInputTags-RknxybLY.mjs} +45 -40
  59. package/components/chunks/{MazPhoneNumberInput-fo2MtuWB.mjs → MazPhoneNumberInput-D12Ibm8u.mjs} +200 -196
  60. package/components/chunks/{MazPicker-Df-LRtwz.mjs → MazPicker-BI9ZeVKO.mjs} +3 -3
  61. package/components/chunks/{MazPickerMonthSwitcher-CrrfUDPA.mjs → MazPickerMonthSwitcher-BpZqdD5K.mjs} +1 -1
  62. package/components/chunks/{MazPickerShortcuts-Dpm1ra_Y.mjs → MazPickerShortcuts-BFYu-DCq.mjs} +1 -1
  63. package/components/chunks/{MazPickerYearSwitcher-BIeGuXI7.mjs → MazPickerYearSwitcher-DOixNBLR.mjs} +1 -1
  64. package/components/chunks/{MazSelect-xBiD7HuJ.mjs → MazSelect-3IfnAYTM.mjs} +187 -183
  65. package/components/chunks/{MazSpinner-CvucKhXp.mjs → MazSpinner-BjWSi43k.mjs} +1 -1
  66. package/components/chunks/{MazSpinner-QIX5R4Hk.mjs → MazSpinner-BuoLivqP.mjs} +1 -1
  67. package/components/chunks/{MazSpinner-BzQ5Fn3J.mjs → MazSpinner-Cfum6OA7.mjs} +1 -1
  68. package/components/chunks/MazSpinner-D6To61E2.mjs +37 -0
  69. package/components/chunks/{MazSpinner-Cytz0rab.mjs → MazSpinner-DBxRDGWB.mjs} +1 -1
  70. package/components/chunks/{MazSpinner-C5MXwcx7.mjs → MazSpinner-DMoNTx6P.mjs} +1 -1
  71. package/components/chunks/MazSpinner-DSuBq7vR.mjs +37 -0
  72. package/components/chunks/{MazSpinner-Bj5hXQuh.mjs → MazSpinner-DfLymjp0.mjs} +1 -1
  73. package/components/chunks/{MazTable-1D7GRSpa.mjs → MazTable-C6u9AHMK.mjs} +694 -664
  74. package/css/main.css +1 -1
  75. package/modules/chunks/{MazBtn-D7qEKqya.mjs → MazBtn-CRXv0h6A.mjs} +2 -2
  76. package/modules/chunks/{MazBtn-BN6jcbJx.cjs → MazBtn-ESi64rk1.cjs} +1 -1
  77. package/modules/chunks/{MazIcon-2NIMk5qW.mjs → MazIcon-BCJS1Geo.mjs} +1 -1
  78. package/modules/chunks/{MazIcon-CJO12Sfi.cjs → MazIcon-Cv_9xeNS.cjs} +1 -1
  79. package/modules/chunks/{MazSpinner-CjKo06vg.cjs → MazSpinner-CexHrCCW.cjs} +1 -1
  80. package/modules/chunks/{MazSpinner-BsBvhcRd.mjs → MazSpinner-DggGj5LA.mjs} +1 -1
  81. package/modules/chunks/index--QQ7NnV6.cjs +1 -0
  82. package/modules/chunks/index-DDzZfuaO.cjs +124 -0
  83. package/modules/chunks/{index-IH_7hv2n.mjs → index-DLSZ-jVW.mjs} +654 -618
  84. package/modules/chunks/{index-CLMC2m3A.mjs → index-TsZCzVnS.mjs} +1102 -928
  85. package/modules/index.cjs +1 -1
  86. package/modules/index.mjs +44 -43
  87. package/nuxt/index.d.mts +5 -0
  88. package/nuxt/index.d.ts +5 -0
  89. package/nuxt/index.json +1 -1
  90. package/nuxt/index.mjs +12 -0
  91. package/package.json +29 -25
  92. package/types/components/MazBackdrop.vue.d.ts +1 -1
  93. package/types/components/MazCheckbox.vue.d.ts +45 -65
  94. package/types/components/MazDialogPromise/use-maz-dialog-promise.d.ts +105 -29
  95. package/types/components/MazDropdown.vue.d.ts +4 -4
  96. package/types/components/MazDropzone.vue.d.ts +3 -3
  97. package/types/components/MazInput.vue.d.ts +3 -3
  98. package/types/components/MazInputCode.vue.d.ts +17 -67
  99. package/types/components/MazInputNumber.vue.d.ts +9 -1
  100. package/types/components/MazInputPrice.vue.d.ts +23 -6
  101. package/types/components/MazInputTags.vue.d.ts +6 -4
  102. package/types/components/MazRadio.vue.d.ts +41 -87
  103. package/types/components/MazRadioButtons.vue.d.ts +40 -67
  104. package/types/components/MazSelect.vue.d.ts +3 -3
  105. package/types/components/MazSwitch.vue.d.ts +15 -1
  106. package/types/components/MazTable.vue.d.ts +6 -34
  107. package/types/components/MazTextarea.vue.d.ts +7 -5
  108. package/types/modules/composables/use-breakpoints.d.ts +1 -1
  109. package/types/modules/composables/use-form-validator/config.d.ts +7 -0
  110. package/types/modules/composables/use-form-validator/index.d.ts +15 -38
  111. package/types/modules/composables/use-form-validator/types.d.ts +45 -26
  112. package/types/modules/composables/use-form-validator/utils.d.ts +90 -27
  113. package/types/modules/composables/use-swipe.d.ts +6 -6
  114. package/types/modules/composables/use-theme-handler.d.ts +2 -2
  115. package/types/modules/composables/use-timer.d.ts +1 -1
  116. package/types/modules/composables/use-window-size.d.ts +2 -2
  117. package/types/modules/helpers/check-availability.d.ts +5 -0
  118. package/types/modules/helpers/debounce-id.d.ts +6 -0
  119. package/types/modules/helpers/index.d.ts +1 -0
  120. package/types/modules/helpers/{throttle-async.d.ts → throttle-id.d.ts} +2 -2
  121. package/types/modules/helpers/throttle.d.ts +1 -1
  122. package/components/chunks/MazCheckbox-BMzMZ-_l.mjs +0 -119
  123. package/components/chunks/MazCheckbox-B_Rx3ZCe.mjs +0 -119
  124. package/components/chunks/MazSpinner-DDmCKWOx.mjs +0 -37
  125. package/components/chunks/MazSpinner-DIa-qXiV.mjs +0 -37
  126. package/modules/chunks/index-7Gl8PhoH.cjs +0 -124
  127. package/modules/chunks/index-bVxwbrqO.cjs +0 -1
  128. package/types/modules/helpers/debounce-async.d.ts +0 -6
@@ -34,7 +34,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
34
34
  onBackdropAnimationLeave: typeof onBackdropAnimationLeave;
35
35
  onBackdropClicked: typeof onBackdropClicked;
36
36
  close: typeof close;
37
- present: import("vue").Ref<boolean>;
37
+ present: import("vue").Ref<boolean, boolean>;
38
38
  toggleModal: typeof toggleModal;
39
39
  onKeyPress: typeof onKeyPress;
40
40
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
@@ -1,82 +1,62 @@
1
1
  import { type HTMLAttributes } from 'vue';
2
2
  import type { Color, Size } from './types';
3
- export type { Color, Size };
4
- export interface Props {
3
+ export interface Props<T = boolean | (string | number)[]> {
4
+ /** Style attribut of the component root element */
5
5
  style?: HTMLAttributes['style'];
6
+ /** Class attribut of the component root element */
6
7
  class?: HTMLAttributes['class'];
7
- modelValue?: boolean | (string | number)[];
8
+ /** The model value of the checkbox */
9
+ modelValue?: T;
10
+ /** The id of the checkbox */
8
11
  id?: string;
12
+ /** The color of the checkbox */
9
13
  color?: Color;
14
+ /** The value of the checkbox when selected */
10
15
  value?: string | number | boolean;
16
+ /** The name of the checkbox */
11
17
  name?: string;
18
+ /** The size of the checkbox */
12
19
  size?: Size;
20
+ /** Text label */
13
21
  label?: string;
22
+ /** If the checkbox is disabled */
14
23
  disabled?: boolean;
24
+ /** Whether there is an error with the input. */
25
+ error?: boolean;
26
+ /** Whether the input is successful. */
27
+ success?: boolean;
28
+ /** Whether there is a warning with the input. */
29
+ warning?: boolean;
30
+ /** The hint text to display below the input. */
31
+ hint?: string;
15
32
  }
16
- declare function __VLS_template(): {
17
- default?(_: {}): any;
33
+ export type { Color, Size } from './types';
34
+ declare const _default: <T extends boolean | (string | number)[]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
35
+ props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
36
+ onFocus?: ((value: FocusEvent) => any) | undefined;
37
+ onBlur?: ((value: FocusEvent) => any) | undefined;
38
+ onChange?: ((value: T) => any) | undefined;
39
+ "onUpdate:model-value"?: ((value: T) => any) | undefined;
40
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
41
+ onFocus?: ((value: FocusEvent) => any) | undefined;
42
+ onBlur?: ((value: FocusEvent) => any) | undefined;
43
+ onChange?: ((value: T) => any) | undefined;
44
+ "onUpdate:model-value"?: ((value: T) => any) | undefined;
45
+ }, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:model-value"> & Props<T>> & import("vue").PublicProps;
46
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
47
+ attrs: any;
48
+ slots: ReturnType<() => {
49
+ default?(_: {
50
+ value: string | number | boolean | undefined;
51
+ }): any;
52
+ }>;
53
+ emit: (((evt: "blur", value: FocusEvent) => void) & ((evt: "change", value: T) => void) & ((evt: "focus", value: FocusEvent) => void) & ((evt: "update:model-value", value: T) => void)) & {};
54
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
55
+ [key: string]: any;
56
+ }> & {
57
+ __ctx?: Awaited<typeof __VLS_setup>;
18
58
  };
19
- declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
20
- style: undefined;
21
- class: undefined;
22
- modelValue: undefined;
23
- label: undefined;
24
- id: undefined;
25
- color: string;
26
- value: undefined;
27
- name: string;
28
- size: string;
29
- disabled: boolean;
30
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
- change: (...args: any[]) => void;
32
- "update:model-value": (...args: any[]) => void;
33
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
34
- style: undefined;
35
- class: undefined;
36
- modelValue: undefined;
37
- label: undefined;
38
- id: undefined;
39
- color: string;
40
- value: undefined;
41
- name: string;
42
- size: string;
43
- disabled: boolean;
44
- }>>> & {
45
- onChange?: ((...args: any[]) => any) | undefined;
46
- "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
47
- }, {
48
- size: Size;
49
- label: string;
50
- style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
51
- name: string;
52
- id: string;
53
- value: string | number | boolean;
54
- disabled: boolean;
55
- color: Color;
56
- class: HTMLAttributes["class"];
57
- modelValue: boolean | (string | number)[];
58
- }, {}>;
59
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
60
59
  export default _default;
61
- type __VLS_WithDefaults<P, D> = {
62
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
63
- default: D[K];
64
- }> : P[K];
65
- };
66
60
  type __VLS_Prettify<T> = {
67
61
  [K in keyof T]: T[K];
68
62
  } & {};
69
- type __VLS_WithTemplateSlots<T, S> = T & {
70
- new (): {
71
- $slots: S;
72
- };
73
- };
74
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
75
- type __VLS_TypePropsToOption<T> = {
76
- [K in keyof T]-?: {} extends Pick<T, K> ? {
77
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
78
- } : {
79
- type: import('vue').PropType<T[K]>;
80
- required: true;
81
- };
82
- };
@@ -1,18 +1,18 @@
1
- import { getCurrentInstance as _, computed as l, openBlock as p, createElementBlock as b, createElementVNode as u, defineComponent as w, useCssVars as C, unref as d, normalizeClass as h, normalizeStyle as I, mergeProps as S, createVNode as B, renderSlot as A, createTextVNode as N, toDisplayString as $ } from "vue";
2
- import './assets/MazCheckbox.css';function M({
3
- componentName: a,
4
- providedId: r
1
+ import { getCurrentInstance as I, computed as n, openBlock as f, createElementBlock as h, createElementVNode as c, defineComponent as S, useCssVars as N, ref as E, unref as i, normalizeClass as m, normalizeStyle as $, mergeProps as A, createVNode as M, renderSlot as D, createTextVNode as R, toDisplayString as k, createCommentVNode as j } from "vue";
2
+ import './assets/MazCheckbox.css';function q({
3
+ componentName: r,
4
+ providedId: t
5
5
  }) {
6
- const e = _();
7
- return l(() => r ?? `${a}-${e == null ? void 0 : e.uid}`);
6
+ const e = I();
7
+ return n(() => t ?? `${r}-${e == null ? void 0 : e.uid}`);
8
8
  }
9
- const D = {
9
+ const F = {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  width: "1em",
12
12
  height: "1em",
13
13
  fill: "none",
14
14
  viewBox: "0 0 24 24"
15
- }, E = /* @__PURE__ */ u(
15
+ }, H = /* @__PURE__ */ c(
16
16
  "path",
17
17
  {
18
18
  stroke: "currentColor",
@@ -24,46 +24,45 @@ const D = {
24
24
  null,
25
25
  -1
26
26
  /* HOISTED */
27
- ), j = [
28
- E
27
+ ), K = [
28
+ H
29
29
  ];
30
- function q(a, r) {
31
- return p(), b("svg", D, [...j]);
30
+ function O(r, t) {
31
+ return f(), h("svg", F, [...K]);
32
32
  }
33
- const H = { render: q }, K = ["for", "aria-checked"], O = ["id", "checked", "disabled", "name"], P = /* @__PURE__ */ w({
33
+ const P = { render: O }, T = ["for", "aria-checked"], U = ["id", "checked", "disabled", "name"], G = { class: "m-checkbox__text" }, J = /* @__PURE__ */ S({
34
34
  inheritAttrs: !1,
35
35
  __name: "MazCheckbox",
36
36
  props: {
37
37
  style: { default: void 0 },
38
38
  class: { default: void 0 },
39
- modelValue: { type: [Boolean, Array], default: void 0 },
39
+ modelValue: { default: void 0 },
40
40
  id: { default: void 0 },
41
41
  color: { default: "primary" },
42
42
  value: { type: [String, Number, Boolean], default: void 0 },
43
43
  name: { default: "m-checkbox" },
44
44
  size: { default: "md" },
45
45
  label: { default: void 0 },
46
- disabled: { type: Boolean, default: !1 }
46
+ disabled: { type: Boolean, default: !1 },
47
+ error: { type: Boolean },
48
+ success: { type: Boolean },
49
+ warning: { type: Boolean },
50
+ hint: {}
47
51
  },
48
- emits: [
49
- /* emitted when value change */
50
- "update:model-value",
51
- /* emited when value change */
52
- "change"
53
- ],
54
- setup(a, { emit: r }) {
55
- C((o) => ({
56
- "30ad0e00": v.value,
57
- "46bd1cbc": k.value,
58
- "7c7c6907": y.value,
59
- "47a52c6c": V.value
52
+ emits: ["update:model-value", "change", "blur", "focus"],
53
+ setup(r, { emit: t }) {
54
+ N((o) => ({
55
+ "2fc45926": z.value,
56
+ "5b22a362": y.value,
57
+ "09741efa": w.value,
58
+ "087c113d": V.value
60
59
  }));
61
- const e = a, n = r, c = M({
60
+ const e = r, l = t, s = q({
62
61
  componentName: "MazCheckbox",
63
62
  providedId: e.id
64
- }), i = l(
63
+ }), p = n(
65
64
  () => typeof e.value != "boolean" && Array.isArray(e.modelValue) ? e.modelValue.includes(e.value) : typeof e.modelValue == "boolean" ? e.modelValue : !1
66
- ), k = l(() => {
65
+ ), y = n(() => {
67
66
  switch (e.size) {
68
67
  case "xl":
69
68
  return "2.25rem";
@@ -78,7 +77,7 @@ const H = { render: q }, K = ["for", "aria-checked"], O = ["id", "checked", "dis
78
77
  default:
79
78
  return "1.625rem";
80
79
  }
81
- }), x = l(() => {
80
+ }), g = n(() => {
82
81
  switch (e.size) {
83
82
  case "xl":
84
83
  return "maz-text-2xl";
@@ -93,61 +92,88 @@ const H = { render: q }, K = ["for", "aria-checked"], O = ["id", "checked", "dis
93
92
  default:
94
93
  return "maz-text-lg";
95
94
  }
96
- }), v = l(() => `var(--maz-color-${e.color}-contrast)`), y = l(() => `var(--maz-color-${e.color})`), V = l(
97
- () => ["black", "transparent"].includes(e.color) ? "var(--maz-color-muted)" : `var(--maz-color-${e.color}-alpha)`
98
- );
99
- function z(o) {
100
- ["Space"].includes(o.code) && (o.preventDefault(), m(e.value ?? !e.modelValue));
95
+ }), z = n(() => `var(--maz-color-${e.color}-contrast)`), w = n(() => `var(--maz-color-${e.color})`), V = n(() => e.error ? "var(--maz-color-danger)" : e.warning ? "var(--maz-color-warning)" : e.success ? "var(--maz-color-success)" : ["black", "transparent"].includes(e.color) ? "var(--maz-color-muted)" : `var(--maz-color-${e.color}-alpha)`);
96
+ function x(o) {
97
+ ["Space"].includes(o.code) && (o.preventDefault(), b(e.value ?? !e.modelValue));
101
98
  }
102
- function g(o) {
103
- return typeof o == "boolean" && (typeof e.modelValue == "boolean" || e.modelValue === void 0 || e.modelValue === null) ? !e.modelValue : Array.isArray(e.modelValue) && typeof o != "boolean" ? e.modelValue.includes(o) ? e.modelValue.filter((t) => t !== o) : [...e.modelValue, o] : [o];
99
+ function C(o) {
100
+ return typeof o == "boolean" && (typeof e.modelValue == "boolean" || e.modelValue === void 0 || e.modelValue === null) ? !e.modelValue : Array.isArray(e.modelValue) && typeof o != "boolean" ? e.modelValue.includes(o) ? e.modelValue.filter((a) => a !== o) : [...e.modelValue, o] : [o];
104
101
  }
105
- function m(o) {
106
- const t = g(o);
107
- n("update:model-value", t), n("change", t);
102
+ function b(o) {
103
+ const a = C(o);
104
+ l("update:model-value", a), l("change", a);
108
105
  }
109
- return (o, t) => (p(), b("label", {
110
- for: d(c),
111
- class: h(["m-checkbox", [{ "--disabled": o.disabled }, e.class]]),
106
+ const u = E();
107
+ function _(o) {
108
+ var a;
109
+ (a = u.value) == null || a.dispatchEvent(new Event("blur")), l("blur", o);
110
+ }
111
+ function B(o) {
112
+ var a;
113
+ (a = u.value) == null || a.dispatchEvent(new Event("focus")), l("focus", o);
114
+ }
115
+ return (o, a) => (f(), h("label", {
116
+ for: i(s),
117
+ class: m(["m-checkbox", [{ "--disabled": o.disabled, "--error": o.error, "--warning": o.warning, "--success": o.success }, e.class]]),
112
118
  tabindex: "0",
113
- style: I(o.style),
119
+ style: $(o.style),
114
120
  role: "checkbox",
115
- "aria-checked": i.value,
116
- onKeydown: z
121
+ "aria-checked": p.value,
122
+ onKeydown: x,
123
+ onBlur: _,
124
+ onFocus: B
117
125
  }, [
118
- u("input", S({
119
- id: d(c),
120
- checked: i.value
126
+ c("input", A({
127
+ id: i(s),
128
+ ref_key: "inputRef",
129
+ ref: u,
130
+ checked: p.value
121
131
  }, o.$attrs, {
122
132
  tabindex: "-1",
123
133
  disabled: o.disabled,
124
134
  name: o.name,
125
135
  type: "checkbox",
126
- onChange: t[0] || (t[0] = (s) => {
127
- var f;
128
- return m(o.value ?? ((f = s == null ? void 0 : s.target) == null ? void 0 : f.checked));
136
+ onChange: a[0] || (a[0] = (d) => {
137
+ var v;
138
+ return b(o.value ?? ((v = d == null ? void 0 : d.target) == null ? void 0 : v.checked));
129
139
  })
130
- }), null, 16, O),
131
- u("span", null, [
132
- B(d(H), {
133
- class: h(["check-icon", x.value])
140
+ }), null, 16, U),
141
+ c("span", null, [
142
+ M(i(P), {
143
+ class: m(["check-icon", g.value])
134
144
  }, null, 8, ["class"])
135
145
  ]),
136
- A(o.$slots, "default", {}, () => [
137
- N(
138
- $(o.label),
139
- 1
140
- /* TEXT */
141
- )
142
- ], !0)
143
- ], 46, K));
146
+ c("div", G, [
147
+ D(o.$slots, "default", { value: o.value }, () => [
148
+ R(
149
+ k(o.label),
150
+ 1
151
+ /* TEXT */
152
+ )
153
+ ], !0),
154
+ o.hint ? (f(), h(
155
+ "span",
156
+ {
157
+ key: 0,
158
+ class: m(["m-checkbox__hint", {
159
+ "--error": o.error,
160
+ "--success": o.success,
161
+ "--warning": o.warning
162
+ }])
163
+ },
164
+ k(o.hint),
165
+ 3
166
+ /* TEXT, CLASS */
167
+ )) : j("v-if", !0)
168
+ ])
169
+ ], 46, T));
144
170
  }
145
- }), T = (a, r) => {
146
- const e = a.__vccOpts || a;
147
- for (const [n, c] of r)
148
- e[n] = c;
171
+ }), L = (r, t) => {
172
+ const e = r.__vccOpts || r;
173
+ for (const [l, s] of t)
174
+ e[l] = s;
149
175
  return e;
150
- }, F = /* @__PURE__ */ T(P, [["__scopeId", "data-v-85c875a9"]]);
176
+ }, W = /* @__PURE__ */ L(J, [["__scopeId", "data-v-3b3da996"]]);
151
177
  export {
152
- F as default
178
+ W as default
153
179
  };
@@ -70,43 +70,114 @@ declare function removeDialogFromState(identifier: string): {
70
70
  id: string;
71
71
  isActive: boolean;
72
72
  resolve: (value: unknown) => void;
73
- reject?: (reason?: unknown) => void;
73
+ reject?: ((reason?: unknown) => void) | undefined;
74
74
  }[];
75
75
  export declare function useMazDialogPromise(): {
76
76
  data: import("vue").Ref<{
77
- title?: string;
78
- message?: string;
79
- cancelText?: string;
77
+ title?: string
78
+ /**
79
+ * Dialog message
80
+ */
81
+ | undefined;
82
+ message?: string
83
+ /**
84
+ * Dialog cancel text
85
+ * @default 'Cancel'
86
+ */
87
+ | undefined;
88
+ cancelText?: string
89
+ /**
90
+ * Dialog cancel button
91
+ */
92
+ | undefined;
80
93
  cancelButton?: false | {
81
- text?: string;
82
- block?: boolean;
83
- color?: Color;
84
- disabled?: boolean;
85
- loading?: boolean;
86
- outline?: boolean;
87
- rounded?: boolean;
88
- size?: Size;
94
+ text?: string | undefined;
95
+ block?: boolean | undefined;
96
+ color?: Color | undefined;
97
+ disabled?: boolean | undefined;
98
+ loading?: boolean | undefined;
99
+ outline?: boolean | undefined;
100
+ rounded?: boolean | undefined;
101
+ size?: Size | undefined;
89
102
  } | undefined;
90
- confirmText?: string;
103
+ confirmText?: string
104
+ /**
105
+ * Dialog confirm button
106
+ */
107
+ | undefined;
91
108
  confirmButton?: false | {
92
- text?: string;
93
- block?: boolean;
94
- color?: Color;
95
- disabled?: boolean;
96
- loading?: boolean;
97
- outline?: boolean;
98
- rounded?: boolean;
99
- size?: Size;
109
+ text?: string | undefined;
110
+ block?: boolean | undefined;
111
+ color?: Color | undefined;
112
+ disabled?: boolean | undefined;
113
+ loading?: boolean | undefined;
114
+ outline?: boolean | undefined;
115
+ rounded?: boolean | undefined;
116
+ size?: Size | undefined;
100
117
  } | undefined;
101
118
  buttons?: {
102
119
  text: string;
103
- block?: boolean;
104
- color?: Color;
105
- disabled?: boolean;
106
- loading?: boolean;
107
- outline?: boolean;
108
- rounded?: boolean;
109
- size?: Size;
120
+ block?: boolean | undefined;
121
+ color?: Color | undefined;
122
+ disabled?: boolean | undefined;
123
+ loading?: boolean | undefined;
124
+ outline?: boolean | undefined;
125
+ rounded?: boolean | undefined;
126
+ size?: Size | undefined;
127
+ type: "resolve" | "reject";
128
+ response?: unknown;
129
+ }[] | undefined;
130
+ }, DialogData | {
131
+ title?: string
132
+ /**
133
+ * Dialog message
134
+ */
135
+ | undefined;
136
+ message?: string
137
+ /**
138
+ * Dialog cancel text
139
+ * @default 'Cancel'
140
+ */
141
+ | undefined;
142
+ cancelText?: string
143
+ /**
144
+ * Dialog cancel button
145
+ */
146
+ | undefined;
147
+ cancelButton?: false | {
148
+ text?: string | undefined;
149
+ block?: boolean | undefined;
150
+ color?: Color | undefined;
151
+ disabled?: boolean | undefined;
152
+ loading?: boolean | undefined;
153
+ outline?: boolean | undefined;
154
+ rounded?: boolean | undefined;
155
+ size?: Size | undefined;
156
+ } | undefined;
157
+ confirmText?: string
158
+ /**
159
+ * Dialog confirm button
160
+ */
161
+ | undefined;
162
+ confirmButton?: false | {
163
+ text?: string | undefined;
164
+ block?: boolean | undefined;
165
+ color?: Color | undefined;
166
+ disabled?: boolean | undefined;
167
+ loading?: boolean | undefined;
168
+ outline?: boolean | undefined;
169
+ rounded?: boolean | undefined;
170
+ size?: Size | undefined;
171
+ } | undefined;
172
+ buttons?: {
173
+ text: string;
174
+ block?: boolean | undefined;
175
+ color?: Color | undefined;
176
+ disabled?: boolean | undefined;
177
+ loading?: boolean | undefined;
178
+ outline?: boolean | undefined;
179
+ rounded?: boolean | undefined;
180
+ size?: Size | undefined;
110
181
  type: "resolve" | "reject";
111
182
  response?: unknown;
112
183
  }[] | undefined;
@@ -115,7 +186,12 @@ export declare function useMazDialogPromise(): {
115
186
  id: string;
116
187
  isActive: boolean;
117
188
  resolve: (value: unknown) => void;
118
- reject?: (reason?: unknown) => void;
189
+ reject?: ((reason?: unknown) => void) | undefined;
190
+ }[], DialogState[] | {
191
+ id: string;
192
+ isActive: boolean;
193
+ resolve: (value: unknown) => void;
194
+ reject?: ((reason?: unknown) => void) | undefined;
119
195
  }[]>;
120
196
  showDialogAndWaitChoice: typeof showDialogAndWaitChoice;
121
197
  removeDialogFromState: typeof removeDialogFromState;
@@ -79,8 +79,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
79
79
  position: string;
80
80
  screenReaderDescription: string;
81
81
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
82
- "menuitem-clicked": (...args: any[]) => void;
83
- "update:open": (...args: any[]) => void;
82
+ "menuitem-clicked": (event: Event) => void;
83
+ "update:open": (value: boolean) => void;
84
84
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
85
85
  class: undefined;
86
86
  style: undefined;
@@ -91,8 +91,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
91
91
  position: string;
92
92
  screenReaderDescription: string;
93
93
  }>>> & {
94
- "onMenuitem-clicked"?: ((...args: any[]) => any) | undefined;
95
- "onUpdate:open"?: ((...args: any[]) => any) | undefined;
94
+ "onMenuitem-clicked"?: ((event: Event) => any) | undefined;
95
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
96
96
  }, {
97
97
  style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
98
98
  id: string;
@@ -72,18 +72,7 @@ const de = {
72
72
  noChevron: { type: Boolean },
73
73
  screenReaderDescription: { default: "Open menu dropdown" }
74
74
  },
75
- emits: [
76
- /**
77
- * emitted when a menu item is clicked
78
- */
79
- "menuitem-clicked",
80
- /**
81
- * Triggers when the number changes
82
- *
83
- * @property {boolean} open new value
84
- */
85
- "update:open"
86
- ],
75
+ emits: ["menuitem-clicked", "update:open"],
87
76
  setup(t, { emit: l }) {
88
77
  const n = t, c = l, w = A(() => import("./chunks/MazBtn-BQ7aH6Qe.mjs").then((e) => e.M)), z = A(() => import("./chunks/chevron-down-CzMH-gFW.mjs")), f = ae({
89
78
  componentName: "MazDropdown",
@@ -49,9 +49,9 @@ declare const _default: import("vue").DefineComponent<{
49
49
  default: boolean;
50
50
  };
51
51
  }, {
52
- ButtonElement: import("vue").Ref<HTMLButtonElement | undefined>;
53
- dropzoneReady: import("vue").Ref<boolean>;
54
- dropzoneOptions: import("vue").Ref<MazDropzoneOptions | undefined>;
52
+ ButtonElement: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
53
+ dropzoneReady: import("vue").Ref<boolean, boolean>;
54
+ dropzoneOptions: import("vue").Ref<MazDropzoneOptions | undefined, MazDropzoneOptions | undefined>;
55
55
  dropzoneStyle: import("vue").ComputedRef<{
56
56
  width: string;
57
57
  height: string;
@@ -1,6 +1,5 @@
1
1
  import { type Component, type ComponentPublicInstance, type FunctionalComponent, type HTMLAttributes, type SVGAttributes } from 'vue';
2
2
  import type { Color, ModelValueSimple, Size } from './types';
3
- export type { Color, Size, ModelValueSimple } from './types';
4
3
  export type Icon = FunctionalComponent<SVGAttributes> | ComponentPublicInstance | Component;
5
4
  export interface Props<T = ModelValueSimple> {
6
5
  /** The style of the component */
@@ -81,7 +80,8 @@ export interface Props<T = ModelValueSimple> {
81
80
  /** The input will be displayed in full width */
82
81
  block?: boolean;
83
82
  }
84
- declare const _default: <T extends ModelValueSimple>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
83
+ export type { Color, Size, ModelValueSimple } from './types';
84
+ declare const _default: <T extends ModelValueSimple>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
85
85
  props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
86
86
  onFocus?: ((event: Event) => any) | undefined;
87
87
  onBlur?: ((event: Event) => any) | undefined;
@@ -96,7 +96,7 @@ declare const _default: <T extends ModelValueSimple>(__VLS_props: Awaited<typeof
96
96
  onInput?: ((event: Event) => any) | undefined;
97
97
  onClick?: ((event: Event) => any) | undefined;
98
98
  "onUpdate:model-value"?: ((value?: T | undefined) => any) | undefined;
99
- }, never>, "onFocus" | "onBlur" | "onChange" | "onInput" | "onClick" | "onUpdate:model-value"> & Props<T>> & __VLS_BuiltInPublicProps;
99
+ }, never>, "onFocus" | "onBlur" | "onChange" | "onInput" | "onClick" | "onUpdate:model-value"> & Props<T>> & import("vue").PublicProps;
100
100
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
101
101
  attrs: any;
102
102
  slots: ReturnType<() => {
@@ -1,4 +1,4 @@
1
- import { M as f } from "./chunks/MazInput-DtXDTEbn.mjs";
1
+ import { M as f } from "./chunks/MazInput-BhKgHfCf.mjs";
2
2
  export {
3
3
  f as default
4
4
  };