maz-ui 3.47.2-beta.6 → 3.47.2-beta.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.
Files changed (173) hide show
  1. package/components/MazAccordion.mjs +91 -98
  2. package/components/MazAnimatedCounter.mjs +26 -26
  3. package/components/MazBottomSheet.mjs +1 -1
  4. package/components/MazBtn.mjs +1 -1
  5. package/components/MazCard.mjs +1 -1
  6. package/components/MazCardSpotlight.mjs +18 -22
  7. package/components/MazCarousel.mjs +1 -1
  8. package/components/MazCheckbox.mjs +74 -70
  9. package/components/MazChecklist.mjs +1 -1
  10. package/components/MazCircularProgressBar.mjs +48 -48
  11. package/components/MazDialog.mjs +1 -1
  12. package/components/MazDialogPromise.mjs +1 -1
  13. package/components/MazDrawer.mjs +1 -1
  14. package/components/MazDropdown.mjs +1 -1
  15. package/components/MazExpandAnimation.mjs +22 -25
  16. package/components/MazGallery.mjs +1 -1
  17. package/components/MazIcon.mjs +1 -1
  18. package/components/MazInput.mjs +1 -1
  19. package/components/MazInputCode.mjs +36 -39
  20. package/components/MazInputNumber.mjs +1 -1
  21. package/components/MazInputPrice.mjs +1 -1
  22. package/components/MazInputTags.mjs +1 -1
  23. package/components/MazLink.mjs +1 -1
  24. package/components/MazLoadingBar.mjs +31 -27
  25. package/components/MazPagination.mjs +1 -1
  26. package/components/MazPhoneNumberInput.mjs +1 -1
  27. package/components/MazPicker.d.ts +2 -0
  28. package/components/MazPicker.mjs +1 -1
  29. package/components/MazRadio.mjs +31 -36
  30. package/components/MazSelect.mjs +1 -1
  31. package/components/MazStepper.mjs +1 -1
  32. package/components/MazSwitch.mjs +20 -23
  33. package/components/MazTable.d.ts +6 -0
  34. package/components/MazTable.mjs +3 -2
  35. package/components/MazTableCell.mjs +12 -12
  36. package/components/MazTableRow.mjs +16 -16
  37. package/components/MazTableTitle.mjs +18 -18
  38. package/components/MazTabsBar.mjs +1 -1
  39. package/components/MazTabsContent.mjs +4 -4
  40. package/components/MazTabsContentItem.mjs +7 -7
  41. package/components/assets/MazAccordion.css +1 -1
  42. package/components/assets/MazAnimatedCounter.css +1 -1
  43. package/components/assets/MazCardSpotlight.css +1 -1
  44. package/components/assets/MazCheckbox.css +1 -1
  45. package/components/assets/MazChecklist.css +1 -1
  46. package/components/assets/MazCircularProgressBar.css +1 -1
  47. package/components/assets/MazDropdown.css +1 -1
  48. package/components/assets/MazExpandAnimation.css +1 -1
  49. package/components/assets/MazGallery.css +1 -1
  50. package/components/assets/MazInputCode.css +1 -1
  51. package/components/assets/MazLoadingBar.css +1 -1
  52. package/components/assets/MazPhoneNumberInput.css +1 -1
  53. package/components/assets/MazPicker.css +1 -1
  54. package/components/assets/MazRadio.css +1 -1
  55. package/components/assets/MazSelect.css +1 -1
  56. package/components/assets/MazStepper.css +1 -1
  57. package/components/assets/MazSwitch.css +1 -1
  58. package/components/assets/MazTable.css +1 -1
  59. package/components/assets/MazTableCell.css +1 -1
  60. package/components/assets/MazTableRow.css +1 -1
  61. package/components/assets/MazTableTitle.css +1 -1
  62. package/components/assets/MazTabsBar.css +1 -1
  63. package/components/chunks/{MazBadge-CqppWg2j.mjs → MazBadge-qdgVtKdQ.mjs} +1 -1
  64. package/components/chunks/{MazBottomSheet-C9GWCGys.mjs → MazBottomSheet-DX3dl16f.mjs} +1 -1
  65. package/components/chunks/{MazBtn-CMyQNKuk.mjs → MazBtn-B1DhLzSq.mjs} +2 -2
  66. package/components/chunks/{MazBtn-DA2lg-5s.mjs → MazBtn-B6xyipje.mjs} +1 -1
  67. package/components/chunks/{MazBtn-D7tI764y.mjs → MazBtn-BE_bHLkT.mjs} +2 -2
  68. package/components/chunks/MazBtn-Blj3kViZ.mjs +105 -0
  69. package/components/chunks/{MazBtn-BBb9-9O6.mjs → MazBtn-BtmrmjP3.mjs} +2 -2
  70. package/components/chunks/{MazBtn-CfUZ9QSO.mjs → MazBtn-C0fZIwfM.mjs} +2 -2
  71. package/components/chunks/MazBtn-CFf5L0DS.mjs +105 -0
  72. package/components/chunks/MazBtn-CiiCndWt.mjs +105 -0
  73. package/components/chunks/{MazBtn-DHfi8M3z.mjs → MazBtn-DMcVZ1r9.mjs} +2 -2
  74. package/components/chunks/{MazBtn-DZb-6vcl.mjs → MazBtn-DWVb9GQ3.mjs} +1 -1
  75. package/components/chunks/{MazBtn-VU3XSEv8.mjs → MazBtn-DanmhP4R.mjs} +1 -1
  76. package/components/chunks/{MazBtn-DKyz5Hc0.mjs → MazBtn-DzheqNTG.mjs} +2 -2
  77. package/components/chunks/MazBtn-FtH-ADjY.mjs +105 -0
  78. package/components/chunks/{MazBtn-DER-sPjl.mjs → MazBtn-pNpaQRRG.mjs} +2 -2
  79. package/components/chunks/{MazCard-CAPZoSqv.mjs → MazCard-DMDzDjHR.mjs} +1 -1
  80. package/components/chunks/{MazCarousel-CSv4VpC9.mjs → MazCarousel-BjBQQBFN.mjs} +1 -1
  81. package/components/chunks/{MazCheckbox-DwAd7p8o.mjs → MazCheckbox-9R4fuM8t.mjs} +63 -58
  82. package/components/chunks/{MazCheckbox-IhiWZ8D0.mjs → MazCheckbox-DXcpsRU4.mjs} +63 -59
  83. package/components/chunks/{MazCheckbox-BI2um2gY.mjs → MazCheckbox-Dgn0lw5f.mjs} +63 -60
  84. package/components/chunks/{MazChecklist-Bqd7qTO1.mjs → MazChecklist-D_IebAis.mjs} +116 -116
  85. package/components/chunks/{MazDialog-xPCkmhrE.mjs → MazDialog-Cyo_BtT4.mjs} +1 -1
  86. package/components/chunks/{MazDialogPromise-dIHWE8dO.mjs → MazDialogPromise-CHyri_Q5.mjs} +2 -2
  87. package/components/chunks/{MazDropdown-7WqbXnPN.mjs → MazDropdown-urkh4dW3.mjs} +87 -103
  88. package/components/chunks/MazExpandAnimation-CWDhei53.mjs +54 -0
  89. package/components/chunks/{MazGallery-CRY5X5zS.mjs → MazGallery-DNN_xBeg.mjs} +39 -42
  90. package/components/chunks/{MazGallery-CXQiXWFr.mjs → MazGallery-ndO4hRUh.mjs} +38 -41
  91. package/components/chunks/{MazIcon-BbvBov5G.mjs → MazIcon-B4CDdmqe.mjs} +1 -1
  92. package/components/chunks/{MazIcon-DjMuw8Bz.mjs → MazIcon-B7Mn8F75.mjs} +1 -1
  93. package/components/chunks/MazIcon-BK45d_-V.mjs +4 -0
  94. package/components/chunks/{MazIcon-D3TB52NM.mjs → MazIcon-BSgK89NE.mjs} +1 -1
  95. package/components/chunks/{MazInput-DG-grU7m.mjs → MazInput-CyWYuOsl.mjs} +1 -1
  96. package/components/chunks/{MazInput-ROgC-JLt.mjs → MazInput-DFDzf7C1.mjs} +2 -2
  97. package/components/chunks/{MazInput-rW-KBJGJ.mjs → MazInput-LS_VhQAg.mjs} +2 -2
  98. package/components/chunks/{MazInputNumber-DoeT5Lcu.mjs → MazInputNumber-qQ6MrK-y.mjs} +2 -2
  99. package/components/chunks/{MazInputPrice-CZiypHp3.mjs → MazInputPrice-C207E4RH.mjs} +1 -1
  100. package/components/chunks/{MazInputTags-DGAglIQb.mjs → MazInputTags-a57ZPojk.mjs} +2 -2
  101. package/components/chunks/{MazLink-yKgOtTlk.mjs → MazLink-Ch-w_Lf_.mjs} +1 -1
  102. package/components/chunks/MazLoadingBar-rusnhtnI.mjs +36 -0
  103. package/components/chunks/{MazPagination-eJFyS5Nn.mjs → MazPagination-CJEC7Y4E.mjs} +1 -1
  104. package/components/chunks/{MazPhoneNumberInput-Bbr0zHPZ.mjs → MazPhoneNumberInput-BUe2kgX6.mjs} +92 -97
  105. package/components/chunks/{MazPicker-EMOuyWJy.mjs → MazPicker-DteyWEwr.mjs} +279 -277
  106. package/components/chunks/{MazPickerMonthSwitcher-DJGgb6BT.mjs → MazPickerMonthSwitcher-D46P6nV5.mjs} +1 -1
  107. package/components/chunks/{MazPickerShortcuts-Cg1uqryw.mjs → MazPickerShortcuts-C50DAlfT.mjs} +1 -1
  108. package/components/chunks/{MazPickerYearSwitcher-BLUXEs0G.mjs → MazPickerYearSwitcher-5EW9ebYR.mjs} +1 -1
  109. package/components/chunks/{MazSelect-BUETsREx.mjs → MazSelect-C0rk6m_5.mjs} +85 -90
  110. package/components/chunks/{MazSelect-BDMOrVry.mjs → MazSelect-CJnsMuMG.mjs} +40 -45
  111. package/components/chunks/MazSpinner-B2mZYoLS.mjs +34 -0
  112. package/components/chunks/{MazSpinner-CQpzVTYF.mjs → MazSpinner-BxlN_quv.mjs} +1 -1
  113. package/components/chunks/{MazSpinner-CLlK6hHp.mjs → MazSpinner-CAR4Mm9l.mjs} +1 -1
  114. package/components/chunks/{MazSpinner-C0PBSYpC.mjs → MazSpinner-CQAyxmwJ.mjs} +1 -1
  115. package/components/chunks/{MazSpinner-BODHZQ9h.mjs → MazSpinner-CbuG6vB-.mjs} +1 -1
  116. package/components/chunks/MazSpinner-Cef473zM.mjs +34 -0
  117. package/components/chunks/{MazSpinner--fscjBdL.mjs → MazSpinner-CkOG2EM9.mjs} +1 -1
  118. package/components/chunks/MazSpinner-CksMqwXP.mjs +34 -0
  119. package/components/chunks/{MazSpinner-BdOKUqKA.mjs → MazSpinner-CqpyUTWh.mjs} +1 -1
  120. package/components/chunks/MazSpinner-CtZfuEKt.mjs +34 -0
  121. package/components/chunks/{MazSpinner-DJM02T-b.mjs → MazSpinner-CyvYTwaV.mjs} +1 -1
  122. package/components/chunks/{MazSpinner-CEgSruvD.mjs → MazSpinner-DCBUvJ_o.mjs} +1 -1
  123. package/components/chunks/MazSpinner-DPdh6vtw.mjs +34 -0
  124. package/components/chunks/MazSpinner-D_6j7BO6.mjs +34 -0
  125. package/components/chunks/{MazSpinner-B8vOa-3i.mjs → MazSpinner-DqZc3-_U.mjs} +1 -1
  126. package/components/chunks/MazSpinner-XikQHrkW.mjs +34 -0
  127. package/components/chunks/{MazSpinner-C-64WJje.mjs → MazSpinner-a80KrraB.mjs} +1 -1
  128. package/components/chunks/MazSpinner-q-AqkAjI.mjs +34 -0
  129. package/components/chunks/MazStepper-BWyXIppj.mjs +218 -0
  130. package/components/chunks/{MazTable-CWsaB02U.mjs → MazTable-BpIXKltC.mjs} +85 -81
  131. package/components/chunks/MazTableCell-DQAaVtw4.mjs +23 -0
  132. package/components/chunks/MazTableRow-CN415w3y.mjs +30 -0
  133. package/components/chunks/{MazTableTitle-C8P3v8b6.mjs → MazTableTitle-DbCN1l2O.mjs} +4 -4
  134. package/components/chunks/{MazTabsBar-CM-w7V97.mjs → MazTabsBar-jlclO5zk.mjs} +61 -77
  135. package/components/chunks/{MazTransitionExpand-BCgH8NZP.mjs → MazTransitionExpand-B2jKLvyg.mjs} +1 -1
  136. package/components/chunks/{inject-strict-BmiaNiwC.mjs → inject-strict-DEDSuzCz.mjs} +3 -3
  137. package/css/main.css +1 -1
  138. package/modules/chunks/{MazBtn-SZHtOzgz.cjs → MazBtn-BLjl_mR0.cjs} +1 -1
  139. package/modules/chunks/{MazBtn-y5LW9A2T.mjs → MazBtn-D6K3B6XM.mjs} +2 -2
  140. package/modules/chunks/{MazIcon-BpVDZGXl.cjs → MazIcon--UTNvIe4.cjs} +1 -1
  141. package/modules/chunks/{MazIcon-Dj66ziAh.mjs → MazIcon-BRGZkufX.mjs} +1 -1
  142. package/modules/chunks/{MazSpinner-uMrdk_99.mjs → MazSpinner-9EkSWhvP.mjs} +1 -1
  143. package/modules/chunks/{MazSpinner-CPT6UF2e.cjs → MazSpinner-B82Q3oFJ.cjs} +1 -1
  144. package/modules/chunks/{index-BG6gPie5.mjs → index-7UZ6u--K.mjs} +5 -5
  145. package/modules/chunks/index-fosopmwd.cjs +124 -0
  146. package/modules/index.cjs +1 -1
  147. package/modules/index.mjs +1 -1
  148. package/nuxt/index.json +1 -1
  149. package/package.json +1 -1
  150. package/tailwindcss/variables/colors.ts +2 -0
  151. package/types/components/MazPicker.vue.d.ts +2 -0
  152. package/types/components/MazTable.vue.d.ts +6 -0
  153. package/types/modules/helpers/inject-strict.d.ts +2 -1
  154. package/types/tailwindcss/variables/colors.d.ts +2 -0
  155. package/components/chunks/MazBtn-DhEO9uvT.mjs +0 -105
  156. package/components/chunks/MazBtn-DpFjxnMy.mjs +0 -105
  157. package/components/chunks/MazBtn-IPfW92RY.mjs +0 -105
  158. package/components/chunks/MazBtn-Lsac2Q0p.mjs +0 -105
  159. package/components/chunks/MazExpandAnimation-MDimlZGj.mjs +0 -57
  160. package/components/chunks/MazIcon-B3gy-jQ6.mjs +0 -4
  161. package/components/chunks/MazLoadingBar-D8a5KF29.mjs +0 -32
  162. package/components/chunks/MazSpinner-CMMBCwk2.mjs +0 -34
  163. package/components/chunks/MazSpinner-ChqoF_fX.mjs +0 -34
  164. package/components/chunks/MazSpinner-D5ciNjTR.mjs +0 -34
  165. package/components/chunks/MazSpinner-DebSlkVT.mjs +0 -34
  166. package/components/chunks/MazSpinner-RzOGVi6V.mjs +0 -34
  167. package/components/chunks/MazSpinner-VN2Vol2B.mjs +0 -34
  168. package/components/chunks/MazSpinner-dm4RUkiD.mjs +0 -34
  169. package/components/chunks/MazSpinner-oLVdOGaR.mjs +0 -34
  170. package/components/chunks/MazStepper-BREfkpUb.mjs +0 -213
  171. package/components/chunks/MazTableCell-CgiGF3bL.mjs +0 -23
  172. package/components/chunks/MazTableRow-6KrQQQbm.mjs +0 -30
  173. package/modules/chunks/index-BTegnVLg.cjs +0 -124
@@ -1,7 +1,8 @@
1
- import { defineComponent as I, useCssVars as N, computed as r, ref as E, openBlock as p, createElementBlock as h, unref as s, normalizeClass as c, normalizeStyle as A, createElementVNode as u, mergeProps as _, createVNode as M, renderSlot as D, createTextVNode as R, toDisplayString as b, createCommentVNode as q } from "vue";
2
- import { u as F, _ as H } from "./MazSelect-BDMOrVry.mjs";
3
- import K from "./check-C9Q_W85g.mjs";
4
- import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id", "checked", "disabled", "name"], U = { class: "m-checkbox__text" }, $ = /* @__PURE__ */ I({
1
+ import { defineComponent as N, computed as r, ref as E, openBlock as v, createElementBlock as k, unref as c, normalizeClass as u, normalizeStyle as t, createElementVNode as d, mergeProps as A, createVNode as M, renderSlot as _, createTextVNode as D, toDisplayString as y, createCommentVNode as R } from "vue";
2
+ import { u as $ } from "./useInstanceUniqId-DW9jO1Sz.mjs";
3
+ import q from "./check-C9Q_W85g.mjs";
4
+ import { _ as F } from "./MazTable-BpIXKltC.mjs";
5
+ import '../assets/MazCheckbox.css';const H = ["for", "aria-checked"], K = ["id", "checked", "disabled", "name"], P = { class: "m-checkbox__text" }, T = /* @__PURE__ */ N({
5
6
  inheritAttrs: !1,
6
7
  __name: "MazCheckbox",
7
8
  props: {
@@ -21,19 +22,13 @@ import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id",
21
22
  hint: {}
22
23
  },
23
24
  emits: ["update:model-value", "change", "blur", "focus"],
24
- setup(v, { emit: k }) {
25
- N((e) => ({
26
- b7df6194: V.value,
27
- "89a0ef50": y.value,
28
- "199d7f11": g.value,
29
- b0e1d658: x.value
30
- }));
31
- const o = v, l = k, d = F({
25
+ setup(z, { emit: g }) {
26
+ const o = z, l = g, i = $({
32
27
  componentName: "MazCheckbox",
33
28
  providedId: o.id
34
- }), i = r(
29
+ }), m = r(
35
30
  () => typeof o.value != "boolean" && Array.isArray(o.modelValue) ? o.modelValue.includes(o.value) : typeof o.modelValue == "boolean" ? o.modelValue : !1
36
- ), y = r(() => {
31
+ ), f = r(() => {
37
32
  switch (o.size) {
38
33
  case "xl":
39
34
  return "2rem";
@@ -48,7 +43,7 @@ import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id",
48
43
  default:
49
44
  return "1.5rem";
50
45
  }
51
- }), z = r(() => {
46
+ }), V = r(() => {
52
47
  switch (o.size) {
53
48
  case "xl":
54
49
  return "maz-text-2xl";
@@ -63,83 +58,93 @@ import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id",
63
58
  default:
64
59
  return "maz-text-lg";
65
60
  }
66
- }), V = r(() => o.color === "theme" ? "var(--maz-color-bg)" : `var(--maz-color-${o.color}-contrast)`), g = r(() => o.color === "theme" ? "var(--maz-color-bg-theme)" : `var(--maz-color-${o.color})`), x = r(() => o.error ? "var(--maz-color-danger)" : o.warning ? "var(--maz-color-warning)" : o.success ? "var(--maz-color-success)" : ["black", "transparent", "theme"].includes(o.color) ? "var(--maz-color-muted)" : `var(--maz-color-${o.color}-alpha)`);
67
- function w(e) {
68
- ["Space"].includes(e.code) && (e.preventDefault(), m(o.value ?? !o.modelValue));
69
- }
61
+ }), x = r(() => o.color === "theme" ? "var(--maz-color-bg)" : `var(--maz-color-${o.color}-contrast)`), w = r(() => o.color === "theme" ? "var(--maz-color-bg-theme)" : `var(--maz-color-${o.color})`), h = r(() => o.error ? "var(--maz-color-danger)" : o.warning ? "var(--maz-color-warning)" : o.success ? "var(--maz-color-success)" : ["black", "transparent", "theme"].includes(o.color) ? "var(--maz-color-muted)" : `var(--maz-color-${o.color}-alpha)`);
70
62
  function C(e) {
63
+ ["Space"].includes(e.code) && (e.preventDefault(), p(o.value ?? !o.modelValue));
64
+ }
65
+ function S(e) {
71
66
  return typeof e == "boolean" && (typeof o.modelValue == "boolean" || o.modelValue === void 0 || o.modelValue === null) ? !o.modelValue : Array.isArray(o.modelValue) && typeof e != "boolean" ? o.modelValue.includes(e) ? o.modelValue.filter((a) => a !== e) : [...o.modelValue, e] : [e];
72
67
  }
73
- function m(e) {
74
- const a = C(e);
68
+ function p(e) {
69
+ const a = S(e);
75
70
  l("update:model-value", a), l("change", a);
76
71
  }
77
- const t = E();
72
+ const n = E();
78
73
  function B(e) {
79
74
  var a;
80
- (a = t.value) == null || a.dispatchEvent(new Event("blur")), l("blur", e);
75
+ (a = n.value) == null || a.dispatchEvent(new Event("blur")), l("blur", e);
81
76
  }
82
- function S(e) {
77
+ function I(e) {
83
78
  var a;
84
- (a = t.value) == null || a.dispatchEvent(new Event("focus")), l("focus", e);
79
+ (a = n.value) == null || a.dispatchEvent(new Event("focus")), l("focus", e);
85
80
  }
86
- return (e, a) => (p(), h("label", {
87
- for: s(d),
88
- class: c(["m-checkbox", [{ "--disabled": e.disabled, "--error": e.error, "--warning": e.warning, "--success": e.success }, o.class]]),
81
+ return (e, a) => (v(), k("label", {
82
+ for: c(i),
83
+ class: u(["m-checkbox", [{ "--disabled": e.disabled, "--error": e.error, "--warning": e.warning, "--success": e.success }, o.class]]),
89
84
  tabindex: "0",
90
- style: A(e.style),
85
+ style: t([e.style, { "--checkbox-selected-color": w.value, "--checkbox-box-shadow-color": h.value }]),
91
86
  role: "checkbox",
92
- "aria-checked": i.value,
93
- onKeydown: w,
87
+ "aria-checked": m.value,
88
+ onKeydown: C,
94
89
  onBlur: B,
95
- onFocus: S
90
+ onFocus: I
96
91
  }, [
97
- u("input", _({
98
- id: s(d),
92
+ d("input", A({
93
+ id: c(i),
99
94
  ref_key: "inputRef",
100
- ref: t,
101
- checked: i.value
95
+ ref: n,
96
+ checked: m.value
102
97
  }, e.$attrs, {
103
98
  tabindex: "-1",
104
99
  disabled: e.disabled,
105
100
  name: e.name,
106
101
  type: "checkbox",
107
- onChange: a[0] || (a[0] = (n) => {
108
- var f;
109
- return m(e.value ?? ((f = n == null ? void 0 : n.target) == null ? void 0 : f.checked));
102
+ onChange: a[0] || (a[0] = (s) => {
103
+ var b;
104
+ return p(e.value ?? ((b = s == null ? void 0 : s.target) == null ? void 0 : b.checked));
110
105
  })
111
- }), null, 16, T),
112
- u("span", null, [
113
- M(s(K), {
114
- class: c(["check-icon", z.value])
115
- }, null, 8, ["class"])
116
- ]),
117
- u("div", U, [
118
- D(e.$slots, "default", { value: e.value }, () => [
119
- R(
120
- b(e.label),
106
+ }), null, 16, K),
107
+ d(
108
+ "span",
109
+ {
110
+ style: t({ width: f.value, height: f.value })
111
+ },
112
+ [
113
+ M(c(q), {
114
+ class: u(["check-icon", V.value]),
115
+ style: t({ color: x.value })
116
+ }, null, 8, ["class", "style"])
117
+ ],
118
+ 4
119
+ /* STYLE */
120
+ ),
121
+ d("div", P, [
122
+ _(e.$slots, "default", { value: e.value }, () => [
123
+ D(
124
+ y(e.label),
121
125
  1
122
126
  /* TEXT */
123
127
  )
124
128
  ], !0),
125
- e.hint ? (p(), h(
129
+ e.hint ? (v(), k(
126
130
  "span",
127
131
  {
128
132
  key: 0,
129
- class: c(["m-checkbox__hint", {
133
+ class: u(["m-checkbox__hint", {
130
134
  "--error": e.error,
131
135
  "--success": e.success,
132
136
  "--warning": e.warning
133
- }])
137
+ }]),
138
+ style: t({ boxShadow: `0 0 0 0.125rem ${h.value}` })
134
139
  },
135
- b(e.hint),
136
- 3
137
- /* TEXT, CLASS */
138
- )) : q("v-if", !0)
140
+ y(e.hint),
141
+ 7
142
+ /* TEXT, CLASS, STYLE */
143
+ )) : R("v-if", !0)
139
144
  ])
140
- ], 46, P));
145
+ ], 46, H));
141
146
  }
142
- }), L = /* @__PURE__ */ H($, [["__scopeId", "data-v-178c6a46"]]);
147
+ }), L = /* @__PURE__ */ F(T, [["__scopeId", "data-v-0ad2f376"]]);
143
148
  export {
144
149
  L as default
145
150
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as I, useCssVars as N, computed as r, ref as E, openBlock as p, createElementBlock as h, unref as s, normalizeClass as c, normalizeStyle as A, createElementVNode as u, mergeProps as _, createVNode as M, renderSlot as D, createTextVNode as R, toDisplayString as b, createCommentVNode as q } from "vue";
2
- import { u as F, _ as H } from "./MazPhoneNumberInput-Bbr0zHPZ.mjs";
3
- import K from "./check-C9Q_W85g.mjs";
4
- import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id", "checked", "disabled", "name"], U = { class: "m-checkbox__text" }, $ = /* @__PURE__ */ I({
1
+ import { defineComponent as N, computed as r, ref as E, openBlock as v, createElementBlock as k, unref as c, normalizeClass as u, normalizeStyle as t, createElementVNode as d, mergeProps as A, createVNode as M, renderSlot as _, createTextVNode as D, toDisplayString as y, createCommentVNode as R } from "vue";
2
+ import { u as $, _ as q } from "./MazPhoneNumberInput-BUe2kgX6.mjs";
3
+ import F from "./check-C9Q_W85g.mjs";
4
+ import '../assets/MazCheckbox.css';const H = ["for", "aria-checked"], K = ["id", "checked", "disabled", "name"], P = { class: "m-checkbox__text" }, T = /* @__PURE__ */ N({
5
5
  inheritAttrs: !1,
6
6
  __name: "MazCheckbox",
7
7
  props: {
@@ -21,19 +21,13 @@ import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id",
21
21
  hint: {}
22
22
  },
23
23
  emits: ["update:model-value", "change", "blur", "focus"],
24
- setup(v, { emit: k }) {
25
- N((e) => ({
26
- b7df6194: V.value,
27
- "89a0ef50": y.value,
28
- "199d7f11": g.value,
29
- b0e1d658: x.value
30
- }));
31
- const o = v, l = k, d = F({
24
+ setup(z, { emit: g }) {
25
+ const o = z, l = g, i = $({
32
26
  componentName: "MazCheckbox",
33
27
  providedId: o.id
34
- }), i = r(
28
+ }), m = r(
35
29
  () => typeof o.value != "boolean" && Array.isArray(o.modelValue) ? o.modelValue.includes(o.value) : typeof o.modelValue == "boolean" ? o.modelValue : !1
36
- ), y = r(() => {
30
+ ), f = r(() => {
37
31
  switch (o.size) {
38
32
  case "xl":
39
33
  return "2rem";
@@ -48,7 +42,7 @@ import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id",
48
42
  default:
49
43
  return "1.5rem";
50
44
  }
51
- }), z = r(() => {
45
+ }), V = r(() => {
52
46
  switch (o.size) {
53
47
  case "xl":
54
48
  return "maz-text-2xl";
@@ -63,83 +57,93 @@ import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id",
63
57
  default:
64
58
  return "maz-text-lg";
65
59
  }
66
- }), V = r(() => o.color === "theme" ? "var(--maz-color-bg)" : `var(--maz-color-${o.color}-contrast)`), g = r(() => o.color === "theme" ? "var(--maz-color-bg-theme)" : `var(--maz-color-${o.color})`), x = r(() => o.error ? "var(--maz-color-danger)" : o.warning ? "var(--maz-color-warning)" : o.success ? "var(--maz-color-success)" : ["black", "transparent", "theme"].includes(o.color) ? "var(--maz-color-muted)" : `var(--maz-color-${o.color}-alpha)`);
67
- function w(e) {
68
- ["Space"].includes(e.code) && (e.preventDefault(), m(o.value ?? !o.modelValue));
69
- }
60
+ }), x = r(() => o.color === "theme" ? "var(--maz-color-bg)" : `var(--maz-color-${o.color}-contrast)`), w = r(() => o.color === "theme" ? "var(--maz-color-bg-theme)" : `var(--maz-color-${o.color})`), h = r(() => o.error ? "var(--maz-color-danger)" : o.warning ? "var(--maz-color-warning)" : o.success ? "var(--maz-color-success)" : ["black", "transparent", "theme"].includes(o.color) ? "var(--maz-color-muted)" : `var(--maz-color-${o.color}-alpha)`);
70
61
  function C(e) {
62
+ ["Space"].includes(e.code) && (e.preventDefault(), p(o.value ?? !o.modelValue));
63
+ }
64
+ function S(e) {
71
65
  return typeof e == "boolean" && (typeof o.modelValue == "boolean" || o.modelValue === void 0 || o.modelValue === null) ? !o.modelValue : Array.isArray(o.modelValue) && typeof e != "boolean" ? o.modelValue.includes(e) ? o.modelValue.filter((a) => a !== e) : [...o.modelValue, e] : [e];
72
66
  }
73
- function m(e) {
74
- const a = C(e);
67
+ function p(e) {
68
+ const a = S(e);
75
69
  l("update:model-value", a), l("change", a);
76
70
  }
77
- const t = E();
71
+ const n = E();
78
72
  function B(e) {
79
73
  var a;
80
- (a = t.value) == null || a.dispatchEvent(new Event("blur")), l("blur", e);
74
+ (a = n.value) == null || a.dispatchEvent(new Event("blur")), l("blur", e);
81
75
  }
82
- function S(e) {
76
+ function I(e) {
83
77
  var a;
84
- (a = t.value) == null || a.dispatchEvent(new Event("focus")), l("focus", e);
78
+ (a = n.value) == null || a.dispatchEvent(new Event("focus")), l("focus", e);
85
79
  }
86
- return (e, a) => (p(), h("label", {
87
- for: s(d),
88
- class: c(["m-checkbox", [{ "--disabled": e.disabled, "--error": e.error, "--warning": e.warning, "--success": e.success }, o.class]]),
80
+ return (e, a) => (v(), k("label", {
81
+ for: c(i),
82
+ class: u(["m-checkbox", [{ "--disabled": e.disabled, "--error": e.error, "--warning": e.warning, "--success": e.success }, o.class]]),
89
83
  tabindex: "0",
90
- style: A(e.style),
84
+ style: t([e.style, { "--checkbox-selected-color": w.value, "--checkbox-box-shadow-color": h.value }]),
91
85
  role: "checkbox",
92
- "aria-checked": i.value,
93
- onKeydown: w,
86
+ "aria-checked": m.value,
87
+ onKeydown: C,
94
88
  onBlur: B,
95
- onFocus: S
89
+ onFocus: I
96
90
  }, [
97
- u("input", _({
98
- id: s(d),
91
+ d("input", A({
92
+ id: c(i),
99
93
  ref_key: "inputRef",
100
- ref: t,
101
- checked: i.value
94
+ ref: n,
95
+ checked: m.value
102
96
  }, e.$attrs, {
103
97
  tabindex: "-1",
104
98
  disabled: e.disabled,
105
99
  name: e.name,
106
100
  type: "checkbox",
107
- onChange: a[0] || (a[0] = (n) => {
108
- var f;
109
- return m(e.value ?? ((f = n == null ? void 0 : n.target) == null ? void 0 : f.checked));
101
+ onChange: a[0] || (a[0] = (s) => {
102
+ var b;
103
+ return p(e.value ?? ((b = s == null ? void 0 : s.target) == null ? void 0 : b.checked));
110
104
  })
111
- }), null, 16, T),
112
- u("span", null, [
113
- M(s(K), {
114
- class: c(["check-icon", z.value])
115
- }, null, 8, ["class"])
116
- ]),
117
- u("div", U, [
118
- D(e.$slots, "default", { value: e.value }, () => [
119
- R(
120
- b(e.label),
105
+ }), null, 16, K),
106
+ d(
107
+ "span",
108
+ {
109
+ style: t({ width: f.value, height: f.value })
110
+ },
111
+ [
112
+ M(c(F), {
113
+ class: u(["check-icon", V.value]),
114
+ style: t({ color: x.value })
115
+ }, null, 8, ["class", "style"])
116
+ ],
117
+ 4
118
+ /* STYLE */
119
+ ),
120
+ d("div", P, [
121
+ _(e.$slots, "default", { value: e.value }, () => [
122
+ D(
123
+ y(e.label),
121
124
  1
122
125
  /* TEXT */
123
126
  )
124
127
  ], !0),
125
- e.hint ? (p(), h(
128
+ e.hint ? (v(), k(
126
129
  "span",
127
130
  {
128
131
  key: 0,
129
- class: c(["m-checkbox__hint", {
132
+ class: u(["m-checkbox__hint", {
130
133
  "--error": e.error,
131
134
  "--success": e.success,
132
135
  "--warning": e.warning
133
- }])
136
+ }]),
137
+ style: t({ boxShadow: `0 0 0 0.125rem ${h.value}` })
134
138
  },
135
- b(e.hint),
136
- 3
137
- /* TEXT, CLASS */
138
- )) : q("v-if", !0)
139
+ y(e.hint),
140
+ 7
141
+ /* TEXT, CLASS, STYLE */
142
+ )) : R("v-if", !0)
139
143
  ])
140
- ], 46, P));
144
+ ], 46, H));
141
145
  }
142
- }), L = /* @__PURE__ */ H($, [["__scopeId", "data-v-178c6a46"]]);
146
+ }), J = /* @__PURE__ */ q(T, [["__scopeId", "data-v-0ad2f376"]]);
143
147
  export {
144
- L as default
148
+ J as default
145
149
  };
@@ -1,8 +1,7 @@
1
- import { defineComponent as I, useCssVars as N, computed as r, ref as E, openBlock as p, createElementBlock as h, unref as s, normalizeClass as c, normalizeStyle as A, createElementVNode as u, mergeProps as _, createVNode as M, renderSlot as D, createTextVNode as R, toDisplayString as b, createCommentVNode as q } from "vue";
2
- import { u as F } from "./useInstanceUniqId-DW9jO1Sz.mjs";
3
- import H from "./check-C9Q_W85g.mjs";
4
- import { _ as K } from "./MazTable-CWsaB02U.mjs";
5
- import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id", "checked", "disabled", "name"], U = { class: "m-checkbox__text" }, $ = /* @__PURE__ */ I({
1
+ import { defineComponent as N, computed as r, ref as E, openBlock as v, createElementBlock as k, unref as c, normalizeClass as u, normalizeStyle as t, createElementVNode as d, mergeProps as A, createVNode as M, renderSlot as _, createTextVNode as D, toDisplayString as y, createCommentVNode as R } from "vue";
2
+ import { u as $, _ as q } from "./MazSelect-CJnsMuMG.mjs";
3
+ import F from "./check-C9Q_W85g.mjs";
4
+ import '../assets/MazCheckbox.css';const H = ["for", "aria-checked"], K = ["id", "checked", "disabled", "name"], P = { class: "m-checkbox__text" }, T = /* @__PURE__ */ N({
6
5
  inheritAttrs: !1,
7
6
  __name: "MazCheckbox",
8
7
  props: {
@@ -22,19 +21,13 @@ import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id",
22
21
  hint: {}
23
22
  },
24
23
  emits: ["update:model-value", "change", "blur", "focus"],
25
- setup(v, { emit: k }) {
26
- N((e) => ({
27
- b7df6194: V.value,
28
- "89a0ef50": y.value,
29
- "199d7f11": g.value,
30
- b0e1d658: x.value
31
- }));
32
- const o = v, l = k, d = F({
24
+ setup(z, { emit: g }) {
25
+ const o = z, l = g, i = $({
33
26
  componentName: "MazCheckbox",
34
27
  providedId: o.id
35
- }), i = r(
28
+ }), m = r(
36
29
  () => typeof o.value != "boolean" && Array.isArray(o.modelValue) ? o.modelValue.includes(o.value) : typeof o.modelValue == "boolean" ? o.modelValue : !1
37
- ), y = r(() => {
30
+ ), f = r(() => {
38
31
  switch (o.size) {
39
32
  case "xl":
40
33
  return "2rem";
@@ -49,7 +42,7 @@ import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id",
49
42
  default:
50
43
  return "1.5rem";
51
44
  }
52
- }), z = r(() => {
45
+ }), V = r(() => {
53
46
  switch (o.size) {
54
47
  case "xl":
55
48
  return "maz-text-2xl";
@@ -64,83 +57,93 @@ import '../assets/MazCheckbox.css';const P = ["for", "aria-checked"], T = ["id",
64
57
  default:
65
58
  return "maz-text-lg";
66
59
  }
67
- }), V = r(() => o.color === "theme" ? "var(--maz-color-bg)" : `var(--maz-color-${o.color}-contrast)`), g = r(() => o.color === "theme" ? "var(--maz-color-bg-theme)" : `var(--maz-color-${o.color})`), x = r(() => o.error ? "var(--maz-color-danger)" : o.warning ? "var(--maz-color-warning)" : o.success ? "var(--maz-color-success)" : ["black", "transparent", "theme"].includes(o.color) ? "var(--maz-color-muted)" : `var(--maz-color-${o.color}-alpha)`);
68
- function w(e) {
69
- ["Space"].includes(e.code) && (e.preventDefault(), m(o.value ?? !o.modelValue));
70
- }
60
+ }), x = r(() => o.color === "theme" ? "var(--maz-color-bg)" : `var(--maz-color-${o.color}-contrast)`), w = r(() => o.color === "theme" ? "var(--maz-color-bg-theme)" : `var(--maz-color-${o.color})`), h = r(() => o.error ? "var(--maz-color-danger)" : o.warning ? "var(--maz-color-warning)" : o.success ? "var(--maz-color-success)" : ["black", "transparent", "theme"].includes(o.color) ? "var(--maz-color-muted)" : `var(--maz-color-${o.color}-alpha)`);
71
61
  function C(e) {
62
+ ["Space"].includes(e.code) && (e.preventDefault(), p(o.value ?? !o.modelValue));
63
+ }
64
+ function S(e) {
72
65
  return typeof e == "boolean" && (typeof o.modelValue == "boolean" || o.modelValue === void 0 || o.modelValue === null) ? !o.modelValue : Array.isArray(o.modelValue) && typeof e != "boolean" ? o.modelValue.includes(e) ? o.modelValue.filter((a) => a !== e) : [...o.modelValue, e] : [e];
73
66
  }
74
- function m(e) {
75
- const a = C(e);
67
+ function p(e) {
68
+ const a = S(e);
76
69
  l("update:model-value", a), l("change", a);
77
70
  }
78
- const t = E();
71
+ const n = E();
79
72
  function B(e) {
80
73
  var a;
81
- (a = t.value) == null || a.dispatchEvent(new Event("blur")), l("blur", e);
74
+ (a = n.value) == null || a.dispatchEvent(new Event("blur")), l("blur", e);
82
75
  }
83
- function S(e) {
76
+ function I(e) {
84
77
  var a;
85
- (a = t.value) == null || a.dispatchEvent(new Event("focus")), l("focus", e);
78
+ (a = n.value) == null || a.dispatchEvent(new Event("focus")), l("focus", e);
86
79
  }
87
- return (e, a) => (p(), h("label", {
88
- for: s(d),
89
- class: c(["m-checkbox", [{ "--disabled": e.disabled, "--error": e.error, "--warning": e.warning, "--success": e.success }, o.class]]),
80
+ return (e, a) => (v(), k("label", {
81
+ for: c(i),
82
+ class: u(["m-checkbox", [{ "--disabled": e.disabled, "--error": e.error, "--warning": e.warning, "--success": e.success }, o.class]]),
90
83
  tabindex: "0",
91
- style: A(e.style),
84
+ style: t([e.style, { "--checkbox-selected-color": w.value, "--checkbox-box-shadow-color": h.value }]),
92
85
  role: "checkbox",
93
- "aria-checked": i.value,
94
- onKeydown: w,
86
+ "aria-checked": m.value,
87
+ onKeydown: C,
95
88
  onBlur: B,
96
- onFocus: S
89
+ onFocus: I
97
90
  }, [
98
- u("input", _({
99
- id: s(d),
91
+ d("input", A({
92
+ id: c(i),
100
93
  ref_key: "inputRef",
101
- ref: t,
102
- checked: i.value
94
+ ref: n,
95
+ checked: m.value
103
96
  }, e.$attrs, {
104
97
  tabindex: "-1",
105
98
  disabled: e.disabled,
106
99
  name: e.name,
107
100
  type: "checkbox",
108
- onChange: a[0] || (a[0] = (n) => {
109
- var f;
110
- return m(e.value ?? ((f = n == null ? void 0 : n.target) == null ? void 0 : f.checked));
101
+ onChange: a[0] || (a[0] = (s) => {
102
+ var b;
103
+ return p(e.value ?? ((b = s == null ? void 0 : s.target) == null ? void 0 : b.checked));
111
104
  })
112
- }), null, 16, T),
113
- u("span", null, [
114
- M(s(H), {
115
- class: c(["check-icon", z.value])
116
- }, null, 8, ["class"])
117
- ]),
118
- u("div", U, [
119
- D(e.$slots, "default", { value: e.value }, () => [
120
- R(
121
- b(e.label),
105
+ }), null, 16, K),
106
+ d(
107
+ "span",
108
+ {
109
+ style: t({ width: f.value, height: f.value })
110
+ },
111
+ [
112
+ M(c(F), {
113
+ class: u(["check-icon", V.value]),
114
+ style: t({ color: x.value })
115
+ }, null, 8, ["class", "style"])
116
+ ],
117
+ 4
118
+ /* STYLE */
119
+ ),
120
+ d("div", P, [
121
+ _(e.$slots, "default", { value: e.value }, () => [
122
+ D(
123
+ y(e.label),
122
124
  1
123
125
  /* TEXT */
124
126
  )
125
127
  ], !0),
126
- e.hint ? (p(), h(
128
+ e.hint ? (v(), k(
127
129
  "span",
128
130
  {
129
131
  key: 0,
130
- class: c(["m-checkbox__hint", {
132
+ class: u(["m-checkbox__hint", {
131
133
  "--error": e.error,
132
134
  "--success": e.success,
133
135
  "--warning": e.warning
134
- }])
136
+ }]),
137
+ style: t({ boxShadow: `0 0 0 0.125rem ${h.value}` })
135
138
  },
136
- b(e.hint),
137
- 3
138
- /* TEXT, CLASS */
139
- )) : q("v-if", !0)
139
+ y(e.hint),
140
+ 7
141
+ /* TEXT, CLASS, STYLE */
142
+ )) : R("v-if", !0)
140
143
  ])
141
- ], 46, P));
144
+ ], 46, H));
142
145
  }
143
- }), O = /* @__PURE__ */ K($, [["__scopeId", "data-v-178c6a46"]]);
146
+ }), J = /* @__PURE__ */ q(T, [["__scopeId", "data-v-0ad2f376"]]);
144
147
  export {
145
- O as default
148
+ J as default
146
149
  };