maz-ui 3.37.2 → 3.37.4

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 (136) hide show
  1. package/components/MazBottomSheet.mjs +1 -1
  2. package/components/MazBtn.d.ts +2 -2
  3. package/components/MazBtn.mjs +1 -1
  4. package/components/MazCard.d.ts +2 -0
  5. package/components/MazCard.mjs +1 -1
  6. package/components/MazCarousel.mjs +1 -1
  7. package/components/MazDialog.mjs +1 -1
  8. package/components/MazDialogPromise.mjs +1 -1
  9. package/components/MazDrawer.mjs +1 -1
  10. package/components/MazDropdown.mjs +1 -1
  11. package/components/MazInput.mjs +1 -1
  12. package/components/MazInputNumber.mjs +1 -1
  13. package/components/MazInputPrice.mjs +1 -1
  14. package/components/MazInputTags.d.ts +4 -4
  15. package/components/MazInputTags.mjs +1 -1
  16. package/components/MazPagination.mjs +1 -1
  17. package/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +8 -4
  18. package/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +2 -2
  19. package/components/MazPhoneNumberInput.d.ts +21 -8
  20. package/components/MazPhoneNumberInput.mjs +1 -1
  21. package/components/MazPicker.mjs +1 -1
  22. package/components/MazRadio.d.ts +89 -92
  23. package/components/MazRadio.mjs +67 -73
  24. package/components/MazRadioButtons.d.ts +84 -62
  25. package/components/MazRadioButtons.mjs +112 -60
  26. package/components/MazSelect.d.ts +12 -7
  27. package/components/MazSelect.mjs +1 -1
  28. package/components/MazSwitch.d.ts +61 -67
  29. package/components/MazSwitch.mjs +41 -48
  30. package/components/MazTable.mjs +1 -1
  31. package/components/MazTextarea.d.ts +23 -8
  32. package/components/MazTextarea.mjs +1 -1
  33. package/components/assets/MazBtn.css +1 -1
  34. package/components/assets/MazCard.css +1 -1
  35. package/components/assets/MazInputNumber.css +1 -1
  36. package/components/assets/MazInputTags.css +1 -1
  37. package/components/assets/MazPagination.css +1 -1
  38. package/components/assets/MazPhoneNumberInput.css +1 -1
  39. package/components/assets/MazRadio.css +1 -1
  40. package/components/assets/MazRadioButtons.css +1 -1
  41. package/components/assets/MazSelect.css +1 -1
  42. package/components/assets/MazSwitch.css +1 -1
  43. package/components/assets/MazTable.css +1 -1
  44. package/components/assets/MazTextarea.css +1 -1
  45. package/components/chunks/{MazBottomSheet-DZ1n4bGL.mjs → MazBottomSheet-B9OYmgyx.mjs} +1 -1
  46. package/components/chunks/{MazBtn-CnZU5zlG.mjs → MazBtn-4stpYG-V.mjs} +8 -8
  47. package/components/chunks/{MazBtn-Dbe098kd.mjs → MazBtn-BQZOiUux.mjs} +8 -8
  48. package/components/chunks/{MazBtn-DLYgzr9e.mjs → MazBtn-Bgt41rUb.mjs} +11 -11
  49. package/components/chunks/MazBtn-CNyFbl9Y.mjs +151 -0
  50. package/components/chunks/{MazBtn-BTHDxDz7.mjs → MazBtn-CrNEwd_M.mjs} +8 -8
  51. package/components/chunks/MazBtn-CyXtFeAh.mjs +151 -0
  52. package/components/chunks/{MazBtn-CnkBOGKK.mjs → MazBtn-DOtOjQOl.mjs} +11 -11
  53. package/components/chunks/{MazBtn-IH6bjzah.mjs → MazBtn-DXC8jXNK.mjs} +8 -8
  54. package/components/chunks/{MazBtn-Bo51KtKY.mjs → MazBtn-De3ZeaJJ.mjs} +8 -8
  55. package/components/chunks/{MazBtn-CDQAW3fg.mjs → MazBtn-g6VJMuer.mjs} +8 -8
  56. package/components/chunks/MazBtn-v1mwE1O3.mjs +151 -0
  57. package/components/chunks/{MazBtn-pLRsSxug.mjs → MazBtn-z9IFp0ZS.mjs} +8 -8
  58. package/components/chunks/{MazCard-CNE9c3L5.mjs → MazCard-E9Eg2VRn.mjs} +10 -8
  59. package/components/chunks/{MazCarousel-CMJgMJf1.mjs → MazCarousel-CtSpgIm6.mjs} +1 -1
  60. package/components/chunks/{MazCheckbox-DBlQwP82.mjs → MazCheckbox-BE7eLIkK.mjs} +1 -1
  61. package/components/chunks/{MazCheckbox-CXVe5vda.mjs → MazCheckbox-eSSrvpn9.mjs} +1 -1
  62. package/components/chunks/{MazDialog-BVqOTysP.mjs → MazDialog-CjsC6fGo.mjs} +1 -1
  63. package/components/chunks/{MazDialogPromise-BjciKAwR.mjs → MazDialogPromise-Blv60XZR.mjs} +2 -2
  64. package/components/chunks/{MazGallery-BUUq89aM.mjs → MazGallery-DRgvR7K0.mjs} +2 -2
  65. package/components/chunks/{MazIcon-BTsi1M-S.mjs → MazIcon-C_IIdjqr.mjs} +1 -1
  66. package/components/chunks/{MazInput-Caas-0Nk.mjs → MazInput-Dn4JzYhe.mjs} +1 -1
  67. package/components/chunks/{MazInputNumber-CnoCQQzg.mjs → MazInputNumber-Df31nPnc.mjs} +2 -2
  68. package/components/chunks/{MazInputPrice---5nCUKm.mjs → MazInputPrice-DATyEiwP.mjs} +1 -1
  69. package/components/chunks/{MazInputTags-CipoVBP2.mjs → MazInputTags-DBzwE87F.mjs} +3 -3
  70. package/components/chunks/{MazPagination-CXw3yqbu.mjs → MazPagination-BU6fSHr2.mjs} +2 -2
  71. package/components/chunks/MazPhoneNumberInput-D8hP4ZzW.mjs +1419 -0
  72. package/components/chunks/{MazPicker-CfhI75aw.mjs → MazPicker-D71j9m8h.mjs} +2 -2
  73. package/components/chunks/{MazPickerCalendar-DnkNE-Am.mjs → MazPickerCalendar-psuBcTR7.mjs} +3 -3
  74. package/components/chunks/{MazPickerHeader-Vt86yzXS.mjs → MazPickerHeader-BmqHJE0a.mjs} +1 -1
  75. package/components/chunks/{MazPickerMonthSwitcher-zfKhsjW1.mjs → MazPickerMonthSwitcher-DgU0pLkF.mjs} +2 -2
  76. package/components/chunks/{MazPickerShortcuts-DUIKfOO8.mjs → MazPickerShortcuts-D9YXi3Ns.mjs} +2 -2
  77. package/components/chunks/{MazPickerTime-B2znRxr2.mjs → MazPickerTime-8ZqSEb_N.mjs} +2 -2
  78. package/components/chunks/{MazPickerYearSwitcher-CB339kof.mjs → MazPickerYearSwitcher-D-zu0tMs.mjs} +3 -3
  79. package/components/chunks/MazSelect-Cc8JAFML.mjs +731 -0
  80. package/components/chunks/{MazSpinner-DFseK3o_.mjs → MazSpinner-2-OAJWTi.mjs} +1 -1
  81. package/components/chunks/MazSpinner-B0xEVmcj.mjs +38 -0
  82. package/components/chunks/{MazSpinner-2fDI3i5h.mjs → MazSpinner-B3Gt0AEt.mjs} +1 -1
  83. package/components/chunks/MazSpinner-B6Z6X_KC.mjs +38 -0
  84. package/components/chunks/{MazSpinner-CORsBFCP.mjs → MazSpinner-BVaJBGw5.mjs} +1 -1
  85. package/components/chunks/{MazSpinner-CJaSrYbQ.mjs → MazSpinner-BVflp3wp.mjs} +1 -1
  86. package/components/chunks/MazSpinner-BmqyUsTZ.mjs +38 -0
  87. package/components/chunks/{MazSpinner-XMLkiLTL.mjs → MazSpinner-Btk7fYzq.mjs} +1 -1
  88. package/components/chunks/{MazSpinner-BtFWH26r.mjs → MazSpinner-CAQqdZfW.mjs} +1 -1
  89. package/components/chunks/MazSpinner-COqX5baD.mjs +38 -0
  90. package/components/chunks/{MazSpinner-CVBVegaS.mjs → MazSpinner-CV3h3CKR.mjs} +1 -1
  91. package/components/chunks/MazSpinner-Cm5GeVV-.mjs +38 -0
  92. package/components/chunks/{MazSpinner-CkHAaRhk.mjs → MazSpinner-D9uDPRkX.mjs} +1 -1
  93. package/components/chunks/MazSpinner-DO1id61e.mjs +38 -0
  94. package/components/chunks/{MazSpinner-BAhgxOgg.mjs → MazSpinner-K26cuR_A.mjs} +1 -1
  95. package/components/chunks/MazSpinner-LCpiZGMP.mjs +38 -0
  96. package/components/chunks/MazTable-vcm_SC7e.mjs +1846 -0
  97. package/components/chunks/{MazTransitionExpand-BWsQP7UF.mjs → MazTransitionExpand-DXKtquVe.mjs} +1 -1
  98. package/css/main.css +1 -1
  99. package/modules/assets/MazBtn.css +1 -1
  100. package/modules/chunks/{MazBtn-BxYYeNGe.mjs → MazBtn-CNsgLyRm.mjs} +8 -8
  101. package/modules/chunks/{MazBtn-CHUwa3fu.cjs → MazBtn-DmXrGuUE.cjs} +2 -2
  102. package/modules/chunks/{MazIcon-CnOCvJTw.mjs → MazIcon-DwRWkhhR.mjs} +1 -1
  103. package/modules/chunks/{MazIcon-DcbutTbM.cjs → MazIcon-rh9PwwaQ.cjs} +1 -1
  104. package/modules/chunks/{MazSpinner-TL9_4BOs.cjs → MazSpinner-BzucVZXm.cjs} +1 -1
  105. package/modules/chunks/{MazSpinner-ClFhZyF_.mjs → MazSpinner-mCJd14Kq.mjs} +1 -1
  106. package/modules/chunks/{index-DksGhf51.cjs → index-DHsybBwE.cjs} +1 -1
  107. package/modules/chunks/{index-_xAQ9uTd.mjs → index-DrSSNP9y.mjs} +2 -2
  108. package/modules/index.cjs +1 -1
  109. package/modules/index.mjs +1 -1
  110. package/nuxt/index.json +1 -1
  111. package/nuxt/index.mjs +5 -5
  112. package/package.json +6 -6
  113. package/types/components/MazBtn.vue.d.ts +2 -2
  114. package/types/components/MazCard.vue.d.ts +2 -0
  115. package/types/components/MazInputTags.vue.d.ts +4 -4
  116. package/types/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +8 -4
  117. package/types/components/MazPhoneNumberInput/use-maz-phone-number-input.d.ts +2 -2
  118. package/types/components/MazPhoneNumberInput.vue.d.ts +21 -8
  119. package/types/components/MazRadio.vue.d.ts +89 -92
  120. package/types/components/MazRadioButtons.vue.d.ts +84 -62
  121. package/types/components/MazSelect.vue.d.ts +12 -7
  122. package/types/components/MazSwitch.vue.d.ts +61 -67
  123. package/types/components/MazTextarea.vue.d.ts +23 -8
  124. package/components/chunks/MazBtn-Cpnby6Lb.mjs +0 -151
  125. package/components/chunks/MazBtn-D-Axz-X0.mjs +0 -151
  126. package/components/chunks/MazBtn-Koayc6g_.mjs +0 -151
  127. package/components/chunks/MazPhoneNumberInput-CsX6Kqob.mjs +0 -1423
  128. package/components/chunks/MazSelect-DZeXglR8.mjs +0 -767
  129. package/components/chunks/MazSpinner-CdKm_Lcp.mjs +0 -38
  130. package/components/chunks/MazSpinner-CkdjTE0y.mjs +0 -38
  131. package/components/chunks/MazSpinner-DECa8Pby.mjs +0 -38
  132. package/components/chunks/MazSpinner-DMBy6mx3.mjs +0 -38
  133. package/components/chunks/MazSpinner-Dq4o-_GM.mjs +0 -38
  134. package/components/chunks/MazSpinner-DqXjnLKa.mjs +0 -38
  135. package/components/chunks/MazSpinner-DyE_USVF.mjs +0 -38
  136. package/components/chunks/MazTable-DrFqDO-J.mjs +0 -1882
@@ -1,59 +1,45 @@
1
1
  import './assets/MazRadio.css';
2
- import { getCurrentInstance as S, computed as d, defineComponent as g, useCssVars as h, openBlock as k, createElementBlock as z, unref as f, normalizeClass as x, normalizeStyle as I, createElementVNode as i, mergeProps as C, renderSlot as V, createTextVNode as w, toDisplayString as B, pushScopeId as q, popScopeId as M } from "vue";
3
- const N = ({
4
- componentName: e,
5
- providedId: r
2
+ import { getCurrentInstance as g, computed as r, defineComponent as S, useCssVars as y, openBlock as k, createElementBlock as z, unref as p, normalizeClass as I, normalizeStyle as C, createElementVNode as c, mergeProps as B, createCommentVNode as V, renderSlot as N, createTextVNode as _, toDisplayString as w, pushScopeId as M, popScopeId as x } from "vue";
3
+ const D = ({
4
+ componentName: o,
5
+ providedId: t
6
6
  }) => {
7
- const t = S();
8
- return d(() => r ?? `${e}-${t == null ? void 0 : t.uid}`);
9
- }, O = (e) => (q("data-v-f5f34e8f"), e = e(), M(), e), j = ["for", "aria-checked"], A = ["id", "value", "disabled", "name", "checked"], D = /* @__PURE__ */ O(() => /* @__PURE__ */ i(
7
+ const a = g();
8
+ return r(() => t ?? `${o}-${a == null ? void 0 : a.uid}`);
9
+ }, E = (o) => (M("data-v-0b81d1b5"), o = o(), x(), o), R = ["for", "aria-checked"], T = ["id", "value", "disabled", "name", "checked"], $ = /* @__PURE__ */ E(() => /* @__PURE__ */ c(
10
10
  "span",
11
11
  null,
12
12
  [
13
- /* @__PURE__ */ i("span", { class: "round" })
13
+ /* @__PURE__ */ c("span", { class: "round" })
14
14
  ],
15
15
  -1
16
16
  /* HOISTED */
17
- )), E = /* @__PURE__ */ g({
17
+ )), q = /* @__PURE__ */ S({
18
18
  __name: "MazRadio",
19
19
  props: {
20
- style: {
21
- type: [String, Array, Object],
22
- default: void 0
23
- },
24
- class: {
25
- type: [String, Array, Object],
26
- default: void 0
27
- },
28
- label: { type: String, default: void 0 },
29
- modelValue: { type: String, default: void 0 },
30
- value: { type: String, required: !0 },
31
- name: { type: String, required: !0 },
32
- id: { type: String, default: void 0 },
33
- color: {
34
- type: String,
35
- default: "primary"
36
- },
37
- size: { type: String, default: "md" },
20
+ style: { default: void 0 },
21
+ class: { default: void 0 },
22
+ id: { default: void 0 },
23
+ modelValue: { type: [String, Number, Boolean], default: void 0 },
24
+ value: { type: [String, Number, Boolean] },
25
+ name: {},
26
+ label: { default: void 0 },
27
+ color: { default: "primary" },
28
+ size: { default: "md" },
38
29
  disabled: { type: Boolean, default: !1 }
39
30
  },
40
- emits: [
41
- /* emitted when value change */
42
- "update:model-value",
43
- /* emited when value change */
44
- "change"
45
- ],
46
- setup(e, { emit: r }) {
47
- h((a) => ({
48
- "2bb5b2cb": p.value,
49
- ad373404: v.value,
50
- "0a907a41": y.value
31
+ emits: ["update:model-value", "change"],
32
+ setup(o, { emit: t }) {
33
+ y((e) => ({
34
+ "8d62fd0a": f.value,
35
+ "1b5dc564": v.value,
36
+ "22c54cde": b.value
51
37
  }));
52
- const t = e, n = r, s = N({
38
+ const a = o, n = t, s = D({
53
39
  componentName: "MazCheckbox",
54
- providedId: t.id
55
- }), c = d(() => t.modelValue === t.value), p = d(() => {
56
- switch (t.size) {
40
+ providedId: a.id
41
+ }), i = r(() => a.modelValue === a.value), f = r(() => {
42
+ switch (a.size) {
57
43
  case "xl":
58
44
  return "2.25rem";
59
45
  case "lg":
@@ -67,54 +53,62 @@ const N = ({
67
53
  case "mini":
68
54
  return "1.2rem";
69
55
  }
70
- }), v = d(() => `var(--maz-color-${t.color})`), y = d(
71
- () => ["black", "transparent"].includes(t.color) ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-alpha)`
56
+ }), v = r(() => `var(--maz-color-${a.color})`), b = r(
57
+ () => ["black", "transparent"].includes(a.color) ? "var(--maz-color-muted)" : `var(--maz-color-${a.color}-alpha)`
72
58
  );
73
- function b(a, o) {
74
- ["Space"].includes(a.code) && (a.preventDefault(), u(o));
59
+ function h(e, l) {
60
+ ["Space"].includes(e.code) && (e.preventDefault(), u(l));
75
61
  }
76
- function u(a) {
77
- n("update:model-value", a), n("change", a);
62
+ function u(e) {
63
+ n("update:model-value", e), n("change", e);
78
64
  }
79
- return (a, o) => (k(), z("label", {
80
- for: f(s),
81
- class: x(["m-checkbox", [{ "--disabled": e.disabled, "--selected": c.value }, t.class]]),
65
+ return (e, l) => (k(), z("label", {
66
+ for: p(s),
67
+ class: I(["m-checkbox", [{ "--disabled": e.disabled, "--selected": i.value }, a.class]]),
82
68
  tabindex: "0",
83
69
  role: "radio",
84
- style: I(e.style),
85
- "aria-checked": c.value,
86
- onKeydown: o[1] || (o[1] = (l) => b(l, e.value))
70
+ style: C(e.style),
71
+ "aria-checked": i.value,
72
+ onKeydown: l[1] || (l[1] = (d) => h(d, e.value))
87
73
  }, [
88
- i("input", C({
89
- id: f(s),
74
+ c("input", B({
75
+ id: p(s),
90
76
  value: e.value
91
- }, a.$attrs, {
77
+ }, e.$attrs, {
92
78
  tabindex: "-1",
93
79
  disabled: e.disabled,
94
80
  name: e.name,
95
81
  type: "radio",
96
- checked: c.value,
97
- onChange: o[0] || (o[0] = (l) => {
82
+ checked: i.value,
83
+ onChange: l[0] || (l[0] = (d) => {
98
84
  var m;
99
- return u((m = l == null ? void 0 : l.target) == null ? void 0 : m.value);
85
+ return u((m = d == null ? void 0 : d.target) == null ? void 0 : m.value);
100
86
  })
101
- }), null, 16, A),
102
- D,
103
- V(a.$slots, "default", {}, () => [
104
- w(
105
- B(e.label),
87
+ }), null, 16, T),
88
+ $,
89
+ V(`
90
+ @slot Label of the radio
91
+ @binding {Boolean} is-selected - If the radio is selected
92
+ @binding {string | number | boolean} value - The value of the radio
93
+ `),
94
+ N(e.$slots, "default", {
95
+ isSelected: i.value,
96
+ value: e.value
97
+ }, () => [
98
+ _(
99
+ w(e.label),
106
100
  1
107
101
  /* TEXT */
108
102
  )
109
103
  ], !0)
110
- ], 46, j));
104
+ ], 46, R));
111
105
  }
112
- }), R = (e, r) => {
113
- const t = e.__vccOpts || e;
114
- for (const [n, s] of r)
115
- t[n] = s;
116
- return t;
117
- }, H = /* @__PURE__ */ R(E, [["__scopeId", "data-v-f5f34e8f"]]);
106
+ }), H = (o, t) => {
107
+ const a = o.__vccOpts || o;
108
+ for (const [n, s] of t)
109
+ a[n] = s;
110
+ return a;
111
+ }, L = /* @__PURE__ */ H(q, [["__scopeId", "data-v-0b81d1b5"]]);
118
112
  export {
119
- H as default
113
+ L as default
120
114
  };
@@ -1,71 +1,76 @@
1
- import type { PropType } from 'vue';
1
+ import { type StyleValue } from 'vue';
2
2
  import type { Color } from './types';
3
- export interface ButtonsRadioOption {
3
+ export type ButtonsRadioOption = {
4
+ /** The label of the option */
4
5
  label: string;
5
- value: string | number;
6
- }
7
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
8
- modelValue: {
9
- type: (StringConstructor | NumberConstructor)[];
10
- default: undefined;
11
- };
12
- options: {
13
- type: PropType<ButtonsRadioOption[]>;
14
- required: true;
15
- };
16
- name: {
17
- type: PropType<string>;
18
- default: string;
19
- };
20
- color: {
21
- type: PropType<Color>;
22
- default: string;
23
- };
24
- noElevation: {
25
- type: BooleanConstructor;
26
- default: boolean;
27
- };
28
- orientation: {
29
- type: PropType<"col" | "row">;
30
- default: string;
31
- };
32
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
- change: (...args: any[]) => void;
34
- "update:model-value": (...args: any[]) => void;
35
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
36
- modelValue: {
37
- type: (StringConstructor | NumberConstructor)[];
38
- default: undefined;
39
- };
40
- options: {
41
- type: PropType<ButtonsRadioOption[]>;
42
- required: true;
43
- };
44
- name: {
45
- type: PropType<string>;
46
- default: string;
47
- };
48
- color: {
49
- type: PropType<Color>;
50
- default: string;
51
- };
52
- noElevation: {
53
- type: BooleanConstructor;
54
- default: boolean;
55
- };
56
- orientation: {
57
- type: PropType<"col" | "row">;
58
- default: string;
59
- };
60
- }>> & {
61
- onChange?: ((...args: any[]) => any) | undefined;
62
- "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
6
+ /** The value of the option */
7
+ value: string | number | boolean;
8
+ /** The classes to apply to the option */
9
+ classes?: any;
10
+ /** The style to apply to the option */
11
+ style?: StyleValue;
12
+ } & Record<string, unknown>;
13
+ export type Props = {
14
+ /** @model The value of the selected option */
15
+ modelValue?: string | number | boolean;
16
+ /** The options to display */
17
+ options: ButtonsRadioOption[];
18
+ /** The name of the radio group */
19
+ name?: string;
20
+ /** The color of the selected radio buttons */
21
+ color?: Color;
22
+ /** Add elevation to the radio buttons */
23
+ elevation?: boolean;
24
+ /**
25
+ * The orientation of the radio buttons
26
+ * @values 'row' | 'col'
27
+ */
28
+ orientation?: 'row' | 'col';
29
+ /** Disable the wrap of the radio buttons */
30
+ noWrap?: boolean;
31
+ /** Make all radio buttons the same size */
32
+ equalSize?: boolean;
33
+ /** Display a selector icon */
34
+ selector?: boolean;
35
+ /** The component will be displayed in full width */
36
+ block?: boolean;
37
+ };
38
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
39
+ modelValue: undefined;
40
+ name: string;
41
+ color: string;
42
+ elevation: boolean;
43
+ orientation: string;
44
+ noWrap: boolean;
45
+ equalSize: boolean;
46
+ selector: boolean;
47
+ block: boolean;
48
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
49
+ "update:model-value": (value: string | number | boolean) => void;
50
+ change: (value: string | number | boolean) => void;
51
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
52
+ modelValue: undefined;
53
+ name: string;
54
+ color: string;
55
+ elevation: boolean;
56
+ orientation: string;
57
+ noWrap: boolean;
58
+ equalSize: boolean;
59
+ selector: boolean;
60
+ block: boolean;
61
+ }>>> & {
62
+ onChange?: ((value: string | number | boolean) => any) | undefined;
63
+ "onUpdate:model-value"?: ((value: string | number | boolean) => any) | undefined;
63
64
  }, {
64
65
  name: string;
65
66
  orientation: "col" | "row";
66
67
  color: Color;
67
- noElevation: boolean;
68
- modelValue: string | number;
68
+ block: boolean;
69
+ modelValue: string | number | boolean;
70
+ elevation: boolean;
71
+ noWrap: boolean;
72
+ equalSize: boolean;
73
+ selector: boolean;
69
74
  }, {}>, {
70
75
  default?(_: {
71
76
  option: ButtonsRadioOption;
@@ -73,8 +78,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
73
78
  }): any;
74
79
  }>;
75
80
  export default _default;
81
+ type __VLS_WithDefaults<P, D> = {
82
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
83
+ default: D[K];
84
+ }> : P[K];
85
+ };
86
+ type __VLS_Prettify<T> = {
87
+ [K in keyof T]: T[K];
88
+ } & {};
76
89
  type __VLS_WithTemplateSlots<T, S> = T & {
77
90
  new (): {
78
91
  $slots: S;
79
92
  };
80
93
  };
94
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
95
+ type __VLS_TypePropsToOption<T> = {
96
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
97
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
98
+ } : {
99
+ type: import('vue').PropType<T[K]>;
100
+ required: true;
101
+ };
102
+ };
@@ -1,79 +1,131 @@
1
1
  import './assets/MazRadioButtons.css';
2
- import { defineComponent as y, openBlock as c, createElementBlock as u, normalizeClass as m, Fragment as g, renderList as z, normalizeStyle as S, createElementVNode as h, renderSlot as b, createTextVNode as k, toDisplayString as p } from "vue";
3
- const x = ["for", "aria-checked", "onKeydown"], B = ["id", "name", "value", "onChange"], w = /* @__PURE__ */ y({
2
+ import { defineComponent as z, defineAsyncComponent as k, openBlock as r, createElementBlock as s, normalizeClass as c, Fragment as _, renderList as B, normalizeStyle as p, createElementVNode as b, createVNode as h, Transition as S, withCtx as $, withDirectives as C, unref as w, vShow as V, createCommentVNode as y, renderSlot as N, createTextVNode as q, toDisplayString as D } from "vue";
3
+ const I = ["for", "aria-checked", "onKeydown"], M = ["id", "name", "value", "onChange"], R = {
4
+ key: 0,
5
+ class: "m-radio-buttons__items__checkbox"
6
+ }, T = /* @__PURE__ */ z({
4
7
  __name: "MazRadioButtons",
5
8
  props: {
6
- modelValue: { type: [String, Number], default: void 0 },
7
- options: { type: Array, required: !0 },
8
- name: {
9
- type: String,
10
- default: "MazButtonsRadio"
11
- },
12
- color: {
13
- type: String,
14
- default: "primary"
15
- },
16
- noElevation: { type: Boolean, default: !1 },
17
- orientation: { type: String, default: "row" }
9
+ modelValue: { type: [String, Number, Boolean], default: void 0 },
10
+ options: {},
11
+ name: { default: "MazButtonsRadio" },
12
+ color: { default: "primary" },
13
+ elevation: { type: Boolean, default: !1 },
14
+ orientation: { default: "row" },
15
+ noWrap: { type: Boolean, default: !1 },
16
+ equalSize: { type: Boolean, default: !1 },
17
+ selector: { type: Boolean, default: !1 },
18
+ block: { type: Boolean, default: !1 }
18
19
  },
19
20
  emits: ["update:model-value", "change"],
20
- setup(t, { emit: r }) {
21
- const o = t, d = r;
22
- function l(a) {
23
- d("update:model-value", a.value);
21
+ setup(l, { emit: u }) {
22
+ const t = k(() => import("./chunks/check-CL-vqe79.mjs")), n = l, d = u;
23
+ function m(e) {
24
+ d("update:model-value", e.value);
24
25
  }
25
- function n(a) {
26
- return o.modelValue === a;
26
+ function o(e) {
27
+ return n.modelValue === e;
27
28
  }
28
- function v(a, i) {
29
- ["Space"].includes(a.code) && (a.preventDefault(), l(i));
29
+ function g(e, f) {
30
+ ["Space"].includes(e.code) && (e.preventDefault(), m(f));
30
31
  }
31
- return (a, i) => (c(), u(
32
+ return (e, f) => (r(), s(
32
33
  "div",
33
34
  {
34
- class: m(["m-radio-buttons", [t.orientation === "row" ? "maz-flex-row" : "maz-flex-col"]])
35
+ class: c(["m-radio-buttons", [`--${e.orientation}`, { "--no-wrap": e.noWrap, "--block": e.block }]])
35
36
  },
36
37
  [
37
- (c(!0), u(
38
- g,
38
+ (r(!0), s(
39
+ _,
39
40
  null,
40
- z(t.options, (e, f) => (c(), u("label", {
41
- key: f,
42
- for: e.value.toString(),
43
- class: m(["m-radio-buttons__items", {
44
- "--is-selected": n(e.value),
45
- "maz-elevation": !t.noElevation
46
- }]),
41
+ B(e.options, (a, i) => (r(), s("label", {
42
+ key: `option-${i}-${a.value.toString()}`,
43
+ for: `option-${i}-${a.value.toString()}`,
44
+ class: c(["m-radio-buttons__items maz-group", [
45
+ {
46
+ "--is-selected": o(a.value),
47
+ "--elevation": e.elevation,
48
+ "--equal-size": e.equalSize
49
+ },
50
+ a.classes
51
+ ]]),
47
52
  tabindex: "0",
48
- style: S(
49
- n(e.value) ? {
50
- color: `var(--maz-color-${t.color}-contrast)`,
51
- backgroundColor: `var(--maz-color-${t.color})`
52
- } : void 0
53
- ),
53
+ style: p([
54
+ o(a.value) ? {
55
+ color: `var(--maz-color-${e.color}-contrast)`,
56
+ backgroundColor: `var(--maz-color-${e.color})`
57
+ } : {},
58
+ a.style
59
+ ]),
54
60
  role: "radio",
55
- "aria-checked": n(e.value),
56
- onKeydown: (s) => v(s, e)
61
+ "aria-checked": o(a.value),
62
+ onKeydown: (v) => g(v, a)
57
63
  }, [
58
- h("input", {
59
- id: e.value.toString(),
64
+ b("input", {
65
+ id: `option-${i}-${a.value.toString()}`,
60
66
  type: "radio",
61
- name: t.name,
62
- value: e.value,
67
+ name: e.name,
68
+ value: a.value,
63
69
  class: "maz-hidden",
64
- onChange: (s) => l(e)
65
- }, null, 40, B),
66
- b(a.$slots, "default", {
67
- option: e,
68
- selected: n(e.value)
70
+ onChange: (v) => m(a)
71
+ }, null, 40, M),
72
+ e.selector ? (r(), s("div", R, [
73
+ b(
74
+ "span",
75
+ {
76
+ class: c({
77
+ "--is-selected": o(a.value)
78
+ }),
79
+ style: p([
80
+ o(a.value) ? { backgroundColor: `var(--maz-color-${n.color}-600)` } : {}
81
+ ])
82
+ },
83
+ [
84
+ h(
85
+ S,
86
+ {
87
+ name: "maz-radio-buttons-scale",
88
+ persisted: ""
89
+ },
90
+ {
91
+ default: $(() => [
92
+ C(h(
93
+ w(t),
94
+ { class: "maz-h-full maz-w-full" },
95
+ null,
96
+ 512
97
+ /* NEED_PATCH */
98
+ ), [
99
+ [V, o(a.value)]
100
+ ])
101
+ ]),
102
+ _: 2
103
+ /* DYNAMIC */
104
+ },
105
+ 1024
106
+ /* DYNAMIC_SLOTS */
107
+ )
108
+ ],
109
+ 6
110
+ /* CLASS, STYLE */
111
+ )
112
+ ])) : y("v-if", !0),
113
+ y(`
114
+ @slot Label of the radio
115
+ @binding {Boolean} selected - If the option is selected
116
+ @binding {string | number | boolean} option - The value of the option
117
+ `),
118
+ N(e.$slots, "default", {
119
+ option: a,
120
+ selected: o(a.value)
69
121
  }, () => [
70
- k(
71
- p(e.label),
122
+ q(
123
+ D(a.label),
72
124
  1
73
125
  /* TEXT */
74
126
  )
75
127
  ], !0)
76
- ], 46, x))),
128
+ ], 46, I))),
77
129
  128
78
130
  /* KEYED_FRAGMENT */
79
131
  ))
@@ -82,12 +134,12 @@ const x = ["for", "aria-checked", "onKeydown"], B = ["id", "name", "value", "onC
82
134
  /* CLASS */
83
135
  ));
84
136
  }
85
- }), C = (t, r) => {
86
- const o = t.__vccOpts || t;
87
- for (const [d, l] of r)
88
- o[d] = l;
89
- return o;
90
- }, E = /* @__PURE__ */ C(w, [["__scopeId", "data-v-c6249f79"]]);
137
+ }), E = (l, u) => {
138
+ const t = l.__vccOpts || l;
139
+ for (const [n, d] of u)
140
+ t[n] = d;
141
+ return t;
142
+ }, L = /* @__PURE__ */ E(T, [["__scopeId", "data-v-7f9271c8"]]);
91
143
  export {
92
- E as default
144
+ L as default
93
145
  };
@@ -1,4 +1,4 @@
1
- import { type StyleValue } from 'vue';
1
+ import { type HTMLAttributes } from 'vue';
2
2
  import type { Color, ModelValueSimple, Position, Size } from './types';
3
3
  export type NormalizedOption = Record<string, ModelValueSimple>;
4
4
  export type MazSelectOptionWithOptGroup = {
@@ -8,10 +8,10 @@ export type MazSelectOptionWithOptGroup = {
8
8
  export type MazSelectOption = NormalizedOption | string | number | boolean | MazSelectOptionWithOptGroup;
9
9
  export type { Color, Size, ModelValueSimple, Position };
10
10
  export type Props = {
11
- /** The style of the select */
12
- style?: StyleValue;
13
- /** The class of the select */
14
- class?: any;
11
+ /** Style attribut of the component root element */
12
+ style?: HTMLAttributes['style'];
13
+ /** Class attribut of the component root element */
14
+ class?: HTMLAttributes['class'];
15
15
  /** The id of the select */
16
16
  id?: string;
17
17
  /** The value of the select */
@@ -51,6 +51,8 @@ export type Props = {
51
51
  /** The input will be displayed in full width */
52
52
  block?: boolean;
53
53
  };
54
+ declare function closeList(event?: Event): Promise<void>;
55
+ declare function openList(event?: Event): Promise<void>;
54
56
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
55
57
  id: undefined;
56
58
  class: undefined;
@@ -67,7 +69,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
67
69
  color: string;
68
70
  searchPlaceholder: string;
69
71
  options: undefined;
70
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
72
+ }>, {
73
+ openList: typeof openList;
74
+ closeList: typeof closeList;
75
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
71
76
  close: (value?: Event | undefined) => void;
72
77
  open: (value?: boolean | undefined) => void;
73
78
  blur: (value?: Event | undefined) => void;
@@ -101,7 +106,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
101
106
  "onSelected-option"?: ((option: MazSelectOption) => any) | undefined;
102
107
  }, {
103
108
  size: Size;
104
- style: string | false | import("vue").CSSProperties | StyleValue[] | null;
109
+ style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
105
110
  id: string;
106
111
  options: MazSelectOption[];
107
112
  color: Color;
@@ -1,4 +1,4 @@
1
- import { M as f } from "./chunks/MazSelect-DZeXglR8.mjs";
1
+ import { M as f } from "./chunks/MazSelect-Cc8JAFML.mjs";
2
2
  export {
3
3
  f as default
4
4
  };