maz-ui 3.40.3 → 3.41.0

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 (120) hide show
  1. package/components/MazAccordion.mjs +4 -4
  2. package/components/MazAnimatedCounter.d.ts +75 -0
  3. package/components/MazAnimatedCounter.mjs +91 -0
  4. package/components/MazBottomSheet.mjs +1 -1
  5. package/components/MazBtn.mjs +1 -1
  6. package/components/MazCard.mjs +1 -1
  7. package/components/MazCardSpotlight.d.ts +2 -2
  8. package/components/MazCardSpotlight.mjs +11 -11
  9. package/components/MazCarousel.mjs +1 -1
  10. package/components/MazCircularProgressBar.d.ts +114 -0
  11. package/components/MazCircularProgressBar.mjs +220 -0
  12. package/components/MazDialog.mjs +1 -1
  13. package/components/MazDialogPromise.mjs +1 -1
  14. package/components/MazDrawer.mjs +1 -1
  15. package/components/MazDropdown.mjs +1 -1
  16. package/components/MazInput.mjs +1 -1
  17. package/components/MazInputNumber.mjs +1 -1
  18. package/components/MazInputPrice.mjs +1 -1
  19. package/components/MazInputTags.mjs +1 -1
  20. package/components/MazPagination.mjs +1 -1
  21. package/components/MazPhoneNumberInput.mjs +1 -1
  22. package/components/MazPicker.mjs +1 -1
  23. package/components/MazSelect.mjs +1 -1
  24. package/components/MazTable.mjs +1 -1
  25. package/components/assets/MazAccordion.css +1 -1
  26. package/components/assets/MazAnimatedCounter.css +1 -0
  27. package/components/assets/MazBtn.css +1 -1
  28. package/components/assets/MazCardSpotlight.css +1 -1
  29. package/components/assets/MazCircularProgressBar.css +1 -0
  30. package/components/assets/MazInputNumber.css +1 -1
  31. package/components/assets/MazInputTags.css +1 -1
  32. package/components/assets/MazPagination.css +1 -1
  33. package/components/assets/MazTable.css +1 -1
  34. package/components/chunks/{MazBottomSheet-BuBc8C9L.mjs → MazBottomSheet-CIlIdn-2.mjs} +1 -1
  35. package/components/chunks/{MazBtn-CjKivGUG.mjs → MazBtn-78ToUjeK.mjs} +40 -40
  36. package/components/chunks/MazBtn-BKtYocJV.mjs +151 -0
  37. package/components/chunks/{MazBtn-IBS93Vda.mjs → MazBtn-BydIwD1J.mjs} +3 -3
  38. package/components/chunks/MazBtn-Bz4-bhWf.mjs +151 -0
  39. package/components/chunks/{MazBtn-BBKOvmc0.mjs → MazBtn-CPyDRy19.mjs} +40 -40
  40. package/components/chunks/MazBtn-CauvhLv6.mjs +151 -0
  41. package/components/chunks/{MazBtn-Bhjz7DkY.mjs → MazBtn-Ccvl1ZWv.mjs} +3 -3
  42. package/components/chunks/MazBtn-DWDitOvL.mjs +151 -0
  43. package/components/chunks/{MazBtn-4I65a0tG.mjs → MazBtn-Da5Nh9ga.mjs} +40 -40
  44. package/components/chunks/{MazBtn-ZcEB5i12.mjs → MazBtn-Dnq16gKt.mjs} +40 -40
  45. package/components/chunks/MazBtn-Ng8Jql0R.mjs +151 -0
  46. package/components/chunks/MazBtn-_NGDIlQK.mjs +151 -0
  47. package/components/chunks/{MazCard-zP6XYYO8.mjs → MazCard-DCz1q6wT.mjs} +1 -1
  48. package/components/chunks/{MazCarousel-IzbBgBrr.mjs → MazCarousel-DZZilIAg.mjs} +1 -1
  49. package/components/chunks/{MazCheckbox-CnQ4qPG4.mjs → MazCheckbox-C1O-MBZa.mjs} +1 -1
  50. package/components/chunks/{MazCheckbox-CylZNBvL.mjs → MazCheckbox-PgXh8RSO.mjs} +1 -1
  51. package/components/chunks/{MazDialog-DfykSNZV.mjs → MazDialog-wPf8YzO5.mjs} +1 -1
  52. package/components/chunks/{MazDialogPromise-DW7DF186.mjs → MazDialogPromise-C4xTbUi9.mjs} +2 -2
  53. package/components/chunks/{MazGallery-DK724Wxg.mjs → MazGallery-CaZnMqiM.mjs} +2 -2
  54. package/components/chunks/{MazIcon-DAuhmKoh.mjs → MazIcon-BfD79t7M.mjs} +1 -1
  55. package/components/chunks/{MazIcon-C0jJgPt6.mjs → MazIcon-DAWEYUs6.mjs} +1 -1
  56. package/components/chunks/{MazInput-CuNNbyX5.mjs → MazInput-BZBaDBjc.mjs} +1 -1
  57. package/components/chunks/{MazInputNumber-D9lhCaXw.mjs → MazInputNumber-DsSRD1TO.mjs} +83 -83
  58. package/components/chunks/{MazInputPrice-C5gaLIoj.mjs → MazInputPrice-BjI2ZK_A.mjs} +1 -1
  59. package/components/chunks/{MazInputTags-DHawCIaZ.mjs → MazInputTags-CUV1HRPI.mjs} +3 -3
  60. package/components/chunks/{MazPagination-B5x3ZUrk.mjs → MazPagination-CfLOeWuj.mjs} +22 -22
  61. package/components/chunks/{MazPhoneNumberInput-ChPzHftZ.mjs → MazPhoneNumberInput-CsBXHpCq.mjs} +2 -2
  62. package/components/chunks/{MazPicker-BVsSfMXU.mjs → MazPicker-_ndeWiCy.mjs} +2 -2
  63. package/components/chunks/{MazPickerCalendar-DVB8Rr9I.mjs → MazPickerCalendar-BXadlngJ.mjs} +3 -3
  64. package/components/chunks/{MazPickerHeader-bClHUr7z.mjs → MazPickerHeader-BpNxHXI2.mjs} +1 -1
  65. package/components/chunks/{MazPickerMonthSwitcher-12vPV_ek.mjs → MazPickerMonthSwitcher-BzEZ5x7j.mjs} +2 -2
  66. package/components/chunks/{MazPickerShortcuts-BcJpy3BQ.mjs → MazPickerShortcuts-BreMu-Sy.mjs} +2 -2
  67. package/components/chunks/{MazPickerTime-_IheJF21.mjs → MazPickerTime-Cc2hHJlp.mjs} +2 -2
  68. package/components/chunks/{MazPickerYearSwitcher-AG8UoA8w.mjs → MazPickerYearSwitcher-B2Dk5iso.mjs} +3 -3
  69. package/components/chunks/{MazSelect-v2Qz7qp9.mjs → MazSelect-CraB8U5x.mjs} +2 -2
  70. package/components/chunks/{MazSpinner-D14Qdl-q.mjs → MazSpinner-8VnYwZdB.mjs} +1 -1
  71. package/components/chunks/{MazSpinner-CZMyB5uT.mjs → MazSpinner-B_WP-2kr.mjs} +1 -1
  72. package/components/chunks/MazSpinner-BmOvvC7W.mjs +38 -0
  73. package/components/chunks/{MazSpinner-CeOzWwoA.mjs → MazSpinner-BtpIL60X.mjs} +1 -1
  74. package/components/chunks/MazSpinner-BxYAlebs.mjs +38 -0
  75. package/components/chunks/{MazSpinner-B9PIGTBM.mjs → MazSpinner-C-lFmcUR.mjs} +1 -1
  76. package/components/chunks/MazSpinner-CTm1URNC.mjs +38 -0
  77. package/components/chunks/{MazSpinner-CT-zwBmg.mjs → MazSpinner-CZBhl7ce.mjs} +1 -1
  78. package/components/chunks/{MazSpinner-BpD28_Nv.mjs → MazSpinner-DWts_Ogu.mjs} +1 -1
  79. package/components/chunks/MazSpinner-DYkIZhje.mjs +38 -0
  80. package/components/chunks/MazSpinner-DibP0zFm.mjs +38 -0
  81. package/components/chunks/MazSpinner-DkLBbDGC.mjs +38 -0
  82. package/components/chunks/MazSpinner-DpOv_AqU.mjs +38 -0
  83. package/components/chunks/{MazSpinner-CTOH4qIV.mjs → MazSpinner-Dt5ax5Hn.mjs} +1 -1
  84. package/components/chunks/{MazSpinner-BrRExSkV.mjs → MazSpinner-RodpKP96.mjs} +1 -1
  85. package/components/chunks/MazSpinner-bGMoZfcX.mjs +38 -0
  86. package/components/chunks/{MazTable-CjlSdLnh.mjs → MazTable-Cr4kGAth.mjs} +117 -117
  87. package/components/chunks/{MazTransitionExpand-BBkwCVdE.mjs → MazTransitionExpand-Bxl5ajH4.mjs} +1 -1
  88. package/components/index.d.ts +2 -0
  89. package/components/index.mjs +2 -0
  90. package/modules/assets/MazBtn.css +1 -1
  91. package/modules/chunks/{MazBtn-C3u6aAVE.cjs → MazBtn-CJkDV-lC.cjs} +3 -3
  92. package/{components/chunks/MazBtn-Ch56YVOw.mjs → modules/chunks/MazBtn-Dv9nwclG.mjs} +40 -40
  93. package/modules/chunks/{MazIcon-_eQBprV9.cjs → MazIcon-C8crlYdE.cjs} +1 -1
  94. package/modules/chunks/{MazIcon-8SXd9pCW.mjs → MazIcon-CRXUvqjd.mjs} +1 -1
  95. package/modules/chunks/{MazSpinner-BeST_Oa5.mjs → MazSpinner-AmAmgKgK.mjs} +1 -1
  96. package/modules/chunks/{MazSpinner-Box3DbCT.cjs → MazSpinner-C7r_jjn3.cjs} +1 -1
  97. package/modules/chunks/{index-C5Co4FGk.cjs → index-95nXhooW.cjs} +1 -1
  98. package/modules/chunks/{index-CU4cxgKq.mjs → index-B99VOYdM.mjs} +2 -2
  99. package/modules/index.cjs +1 -1
  100. package/modules/index.mjs +1 -1
  101. package/nuxt/index.json +1 -1
  102. package/package.json +1 -1
  103. package/types/components/MazAnimatedCounter.vue.d.ts +75 -0
  104. package/types/components/MazCardSpotlight.vue.d.ts +2 -2
  105. package/types/components/MazCircularProgressBar.vue.d.ts +114 -0
  106. package/types/components/index.d.ts +2 -0
  107. package/components/chunks/MazBtn-DAvgjToE.mjs +0 -151
  108. package/components/chunks/MazBtn-DfXeBnFe.mjs +0 -151
  109. package/components/chunks/MazBtn-Dyw1WZgU.mjs +0 -151
  110. package/components/chunks/MazBtn-SJl9Kugs.mjs +0 -151
  111. package/components/chunks/MazBtn-peKwI3PB.mjs +0 -151
  112. package/components/chunks/MazSpinner-CeUPefEl.mjs +0 -38
  113. package/components/chunks/MazSpinner-Cj16ZXPC.mjs +0 -38
  114. package/components/chunks/MazSpinner-DJyu0bjt.mjs +0 -38
  115. package/components/chunks/MazSpinner-DcsAehl9.mjs +0 -38
  116. package/components/chunks/MazSpinner-DeiRyoct.mjs +0 -38
  117. package/components/chunks/MazSpinner-DmsRmaiI.mjs +0 -38
  118. package/components/chunks/MazSpinner-ISxUR3Y1.mjs +0 -38
  119. package/components/chunks/MazSpinner-afth4SV3.mjs +0 -38
  120. package/modules/chunks/MazBtn-kEp7hZt8.mjs +0 -151
package/nuxt/index.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "3.40.3"
7
+ "version": "3.41.0"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maz-ui",
3
- "version": "3.40.3",
3
+ "version": "3.41.0",
4
4
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
5
5
  "author": "Louis Mazel <me@loicmazuel.com>",
6
6
  "main": "./modules/index.cjs",
@@ -0,0 +1,75 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
2
+ /**
3
+ * The number to animate
4
+ */
5
+ count: number;
6
+ /**
7
+ * Duration of the animation in milliseconds
8
+ * @default 1000
9
+ */
10
+ duration?: number | undefined;
11
+ /**
12
+ * Suffix to display next to the number
13
+ */
14
+ prefix?: string | undefined;
15
+ /**
16
+ * Suffix to display next to the number
17
+ */
18
+ suffix?: string | undefined;
19
+ }>, {
20
+ duration: number;
21
+ prefix: undefined;
22
+ suffix: undefined;
23
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
24
+ /**
25
+ * The number to animate
26
+ */
27
+ count: number;
28
+ /**
29
+ * Duration of the animation in milliseconds
30
+ * @default 1000
31
+ */
32
+ duration?: number | undefined;
33
+ /**
34
+ * Suffix to display next to the number
35
+ */
36
+ prefix?: string | undefined;
37
+ /**
38
+ * Suffix to display next to the number
39
+ */
40
+ suffix?: string | undefined;
41
+ }>, {
42
+ duration: number;
43
+ prefix: undefined;
44
+ suffix: undefined;
45
+ }>>>, {
46
+ duration: number;
47
+ prefix: string;
48
+ suffix: string;
49
+ }, {}>, {
50
+ prefix?(_: {}): any;
51
+ suffix?(_: {}): any;
52
+ }>;
53
+ export default _default;
54
+ type __VLS_WithDefaults<P, D> = {
55
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
56
+ default: D[K];
57
+ }> : P[K];
58
+ };
59
+ type __VLS_Prettify<T> = {
60
+ [K in keyof T]: T[K];
61
+ } & {};
62
+ type __VLS_WithTemplateSlots<T, S> = T & {
63
+ new (): {
64
+ $slots: S;
65
+ };
66
+ };
67
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
68
+ type __VLS_TypePropsToOption<T> = {
69
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
70
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
71
+ } : {
72
+ type: import('vue').PropType<T[K]>;
73
+ required: true;
74
+ };
75
+ };
@@ -37,14 +37,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
37
37
  noElevation: boolean;
38
38
  color: string;
39
39
  padding: boolean;
40
- contentClass: string;
40
+ contentClass: undefined;
41
41
  contentStyle: undefined;
42
42
  innerOpacity: number;
43
43
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
44
44
  noElevation: boolean;
45
45
  color: string;
46
46
  padding: boolean;
47
- contentClass: string;
47
+ contentClass: undefined;
48
48
  contentStyle: undefined;
49
49
  innerOpacity: number;
50
50
  }>>>, {
@@ -0,0 +1,114 @@
1
+ import { type Color } from './types';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
3
+ /**
4
+ * The percentage value of the progress bar
5
+ */
6
+ percentage: number;
7
+ /**
8
+ * The size of the progress bar
9
+ * @default '10em'
10
+ */
11
+ size?: string | undefined;
12
+ /**
13
+ * Duration of the animation in milliseconds
14
+ * @default 1000
15
+ */
16
+ duration?: number | undefined;
17
+ /**
18
+ * The color of the progress bar
19
+ */
20
+ color?: Color | undefined;
21
+ /**
22
+ * Auto color based on the count (danger, warning, success)
23
+ * @default false
24
+ */
25
+ autoColor?: boolean | undefined;
26
+ /**
27
+ * Suffix to display next to the number
28
+ */
29
+ prefix?: string | undefined;
30
+ /**
31
+ * Suffix to display next to the number
32
+ */
33
+ suffix?: string | undefined;
34
+ }>, {
35
+ percentage: number;
36
+ size: string;
37
+ duration: number;
38
+ color: undefined;
39
+ prefix: undefined;
40
+ suffix: undefined;
41
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
42
+ /**
43
+ * The percentage value of the progress bar
44
+ */
45
+ percentage: number;
46
+ /**
47
+ * The size of the progress bar
48
+ * @default '10em'
49
+ */
50
+ size?: string | undefined;
51
+ /**
52
+ * Duration of the animation in milliseconds
53
+ * @default 1000
54
+ */
55
+ duration?: number | undefined;
56
+ /**
57
+ * The color of the progress bar
58
+ */
59
+ color?: Color | undefined;
60
+ /**
61
+ * Auto color based on the count (danger, warning, success)
62
+ * @default false
63
+ */
64
+ autoColor?: boolean | undefined;
65
+ /**
66
+ * Suffix to display next to the number
67
+ */
68
+ prefix?: string | undefined;
69
+ /**
70
+ * Suffix to display next to the number
71
+ */
72
+ suffix?: string | undefined;
73
+ }>, {
74
+ percentage: number;
75
+ size: string;
76
+ duration: number;
77
+ color: undefined;
78
+ prefix: undefined;
79
+ suffix: undefined;
80
+ }>>>, {
81
+ size: string;
82
+ color: Color;
83
+ duration: number;
84
+ prefix: string;
85
+ suffix: string;
86
+ percentage: number;
87
+ }, {}>, {
88
+ default?(_: {}): any;
89
+ prefix?(_: {}): any;
90
+ suffix?(_: {}): any;
91
+ }>;
92
+ export default _default;
93
+ type __VLS_WithDefaults<P, D> = {
94
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
95
+ default: D[K];
96
+ }> : P[K];
97
+ };
98
+ type __VLS_Prettify<T> = {
99
+ [K in keyof T]: T[K];
100
+ } & {};
101
+ type __VLS_WithTemplateSlots<T, S> = T & {
102
+ new (): {
103
+ $slots: S;
104
+ };
105
+ };
106
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
107
+ type __VLS_TypePropsToOption<T> = {
108
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
109
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
110
+ } : {
111
+ type: import('vue').PropType<T[K]>;
112
+ required: true;
113
+ };
114
+ };
@@ -1,4 +1,5 @@
1
1
  export { default as MazAccordion } from './MazAccordion.vue';
2
+ export { default as MazAnimatedCounter } from './MazAnimatedCounter.vue';
2
3
  export { default as MazAvatar } from './MazAvatar.vue';
3
4
  export { default as MazBackdrop } from './MazBackdrop.vue';
4
5
  export { default as MazBadge } from './MazBadge.vue';
@@ -9,6 +10,7 @@ export { default as MazCardSpotlight } from './MazCardSpotlight.vue';
9
10
  export { default as MazCarousel } from './MazCarousel.vue';
10
11
  export { default as MazChart } from './MazChart.vue';
11
12
  export { default as MazCheckbox } from './MazCheckbox.vue';
13
+ export { default as MazCircularProgressBar } from './MazCircularProgressBar.vue';
12
14
  export { default as MazDialog } from './MazDialog.vue';
13
15
  export { default as MazDialogPromise } from './MazDialogPromise.vue';
14
16
  export { default as MazDrawer } from './MazDrawer.vue';
@@ -1,151 +0,0 @@
1
- import '../assets/MazBtn.css';
2
- import { defineComponent as E, defineAsyncComponent as h, useAttrs as R, useSlots as w, onBeforeMount as A, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as D, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
3
- import { _ as L } from "./MazPicker-BVsSfMXU.mjs";
4
- const P = /* @__PURE__ */ E({
5
- __name: "MazBtn",
6
- props: {
7
- variant: { default: "button" },
8
- size: { default: "md" },
9
- color: { default: "primary" },
10
- type: { default: "button" },
11
- rounded: { type: Boolean },
12
- roundedSize: { default: "lg" },
13
- noRounded: { type: Boolean },
14
- outline: { type: Boolean },
15
- pastel: { type: Boolean },
16
- block: { type: Boolean },
17
- noUnderline: { type: Boolean },
18
- loading: { type: Boolean },
19
- disabled: { type: Boolean },
20
- fab: { type: Boolean },
21
- icon: { default: void 0 },
22
- leftIcon: { default: void 0 },
23
- rightIcon: { default: void 0 },
24
- noPadding: { type: Boolean },
25
- noElevation: { type: Boolean },
26
- contentClass: { default: void 0 }
27
- },
28
- setup(g) {
29
- const k = h(() => import("./MazSpinner-CTOH4qIV.mjs")), f = h(() => import("./MazIcon-Cxrv3_OK.mjs")), { href: z, to: B } = R(), p = w(), e = g;
30
- A(() => {
31
- e.icon && !e.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
32
- });
33
- const v = l(() => z ? "a" : B ? "router-link" : "button"), I = l(
34
- () => e.pastel ? `--${e.color}-pastel` : e.outline ? `--${e.color}-outline` : `--${e.color}`
35
- ), m = l(
36
- () => (e.loading || e.disabled) && v.value === "button"
37
- ), C = l(() => m.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${e.variant}`), i = l(() => e.loading && e.variant === "button"), b = l(() => !!p["left-icon"] || e.leftIcon), y = l(() => !!p["right-icon"] || e.rightIcon), M = l(() => b.value || y.value), S = l(() => e.fab && (e.icon || !!p.icon)), T = l(() => v.value === "button" ? e.type : void 0);
38
- return (o, U) => (n(), a(r(v.value), {
39
- disabled: m.value || void 0,
40
- class: s(["m-btn", [
41
- `--${o.size}`,
42
- `--rounded-${o.roundedSize}`,
43
- I.value,
44
- C.value,
45
- $.value,
46
- {
47
- "--block": o.block,
48
- "--no-underline": o.noUnderline,
49
- "--fab": o.fab,
50
- "--loading": o.loading,
51
- "--disabled": m.value,
52
- "--icon": M.value,
53
- "--rounded": o.rounded,
54
- "--no-rounded": o.noRounded,
55
- "--no-padding": o.noPadding,
56
- "--no-elevation": o.noElevation
57
- }
58
- ]]),
59
- type: T.value
60
- }, {
61
- default: D(() => [
62
- b.value ? (n(), u(
63
- "div",
64
- {
65
- key: 0,
66
- class: s(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": i.value }])
67
- },
68
- [
69
- t(`
70
- @slot left-icon - The icon to display on the left of the button
71
- `),
72
- d(o.$slots, "left-icon", {}, () => [
73
- typeof o.leftIcon == "string" ? (n(), a(c(f), {
74
- key: 0,
75
- name: o.leftIcon
76
- }, null, 8, ["name"])) : o.leftIcon ? (n(), a(r(o.leftIcon), { key: 1 })) : t("v-if", !0)
77
- ], !0)
78
- ],
79
- 2
80
- /* CLASS */
81
- )) : t("v-if", !0),
82
- S.value ? (n(), u(
83
- "div",
84
- {
85
- key: 1,
86
- class: s(["m-btn__icon", { "maz-invisible": i.value }])
87
- },
88
- [
89
- t(`
90
- @slot icon - The icon to display on the fab button
91
- `),
92
- d(o.$slots, "icon", {}, () => [
93
- typeof o.icon == "string" ? (n(), a(c(f), {
94
- key: 0,
95
- name: o.icon
96
- }, null, 8, ["name"])) : o.icon ? (n(), a(r(o.icon), { key: 1 })) : t("v-if", !0)
97
- ], !0)
98
- ],
99
- 2
100
- /* CLASS */
101
- )) : t("v-if", !0),
102
- o.$slots.default ? (n(), u(
103
- "span",
104
- {
105
- key: 2,
106
- class: s([{ "maz-invisible": i.value }, o.contentClass])
107
- },
108
- [
109
- t(`
110
- @slot default - The content of the button
111
- `),
112
- d(o.$slots, "default", {}, void 0, !0)
113
- ],
114
- 2
115
- /* CLASS */
116
- )) : t("v-if", !0),
117
- y.value ? (n(), u(
118
- "div",
119
- {
120
- key: 3,
121
- class: s(["m-btn__icon-right", { "maz-invisible": i.value }])
122
- },
123
- [
124
- t(`
125
- @slot right-icon - The icon to display on the right of the button
126
- `),
127
- d(o.$slots, "right-icon", {}, () => [
128
- typeof o.rightIcon == "string" ? (n(), a(c(f), {
129
- key: 0,
130
- name: o.rightIcon
131
- }, null, 8, ["name"])) : o.rightIcon ? (n(), a(r(o.rightIcon), { key: 1 })) : t("v-if", !0)
132
- ], !0)
133
- ],
134
- 2
135
- /* CLASS */
136
- )) : t("v-if", !0),
137
- i.value ? (n(), a(c(k), {
138
- key: 4,
139
- class: "m-btn-loader",
140
- size: "2em",
141
- color: o.color
142
- }, null, 8, ["color"])) : t("v-if", !0)
143
- ]),
144
- _: 3
145
- /* FORWARDED */
146
- }, 8, ["disabled", "class", "type"]));
147
- }
148
- }), V = /* @__PURE__ */ L(P, [["__scopeId", "data-v-f89548fd"]]);
149
- export {
150
- V as default
151
- };
@@ -1,151 +0,0 @@
1
- import '../assets/MazBtn.css';
2
- import { defineComponent as E, defineAsyncComponent as h, useAttrs as R, useSlots as w, onBeforeMount as A, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as D, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
3
- import { _ as L } from "./MazSelect-v2Qz7qp9.mjs";
4
- const P = /* @__PURE__ */ E({
5
- __name: "MazBtn",
6
- props: {
7
- variant: { default: "button" },
8
- size: { default: "md" },
9
- color: { default: "primary" },
10
- type: { default: "button" },
11
- rounded: { type: Boolean },
12
- roundedSize: { default: "lg" },
13
- noRounded: { type: Boolean },
14
- outline: { type: Boolean },
15
- pastel: { type: Boolean },
16
- block: { type: Boolean },
17
- noUnderline: { type: Boolean },
18
- loading: { type: Boolean },
19
- disabled: { type: Boolean },
20
- fab: { type: Boolean },
21
- icon: { default: void 0 },
22
- leftIcon: { default: void 0 },
23
- rightIcon: { default: void 0 },
24
- noPadding: { type: Boolean },
25
- noElevation: { type: Boolean },
26
- contentClass: { default: void 0 }
27
- },
28
- setup(g) {
29
- const k = h(() => import("./MazSpinner-ISxUR3Y1.mjs")), f = h(() => import("./MazIcon-Cxrv3_OK.mjs")), { href: z, to: B } = R(), p = w(), e = g;
30
- A(() => {
31
- e.icon && !e.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
32
- });
33
- const v = l(() => z ? "a" : B ? "router-link" : "button"), I = l(
34
- () => e.pastel ? `--${e.color}-pastel` : e.outline ? `--${e.color}-outline` : `--${e.color}`
35
- ), m = l(
36
- () => (e.loading || e.disabled) && v.value === "button"
37
- ), C = l(() => m.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${e.variant}`), i = l(() => e.loading && e.variant === "button"), b = l(() => !!p["left-icon"] || e.leftIcon), y = l(() => !!p["right-icon"] || e.rightIcon), M = l(() => b.value || y.value), S = l(() => e.fab && (e.icon || !!p.icon)), T = l(() => v.value === "button" ? e.type : void 0);
38
- return (o, U) => (n(), a(r(v.value), {
39
- disabled: m.value || void 0,
40
- class: s(["m-btn", [
41
- `--${o.size}`,
42
- `--rounded-${o.roundedSize}`,
43
- I.value,
44
- C.value,
45
- $.value,
46
- {
47
- "--block": o.block,
48
- "--no-underline": o.noUnderline,
49
- "--fab": o.fab,
50
- "--loading": o.loading,
51
- "--disabled": m.value,
52
- "--icon": M.value,
53
- "--rounded": o.rounded,
54
- "--no-rounded": o.noRounded,
55
- "--no-padding": o.noPadding,
56
- "--no-elevation": o.noElevation
57
- }
58
- ]]),
59
- type: T.value
60
- }, {
61
- default: D(() => [
62
- b.value ? (n(), u(
63
- "div",
64
- {
65
- key: 0,
66
- class: s(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": i.value }])
67
- },
68
- [
69
- t(`
70
- @slot left-icon - The icon to display on the left of the button
71
- `),
72
- d(o.$slots, "left-icon", {}, () => [
73
- typeof o.leftIcon == "string" ? (n(), a(c(f), {
74
- key: 0,
75
- name: o.leftIcon
76
- }, null, 8, ["name"])) : o.leftIcon ? (n(), a(r(o.leftIcon), { key: 1 })) : t("v-if", !0)
77
- ], !0)
78
- ],
79
- 2
80
- /* CLASS */
81
- )) : t("v-if", !0),
82
- S.value ? (n(), u(
83
- "div",
84
- {
85
- key: 1,
86
- class: s(["m-btn__icon", { "maz-invisible": i.value }])
87
- },
88
- [
89
- t(`
90
- @slot icon - The icon to display on the fab button
91
- `),
92
- d(o.$slots, "icon", {}, () => [
93
- typeof o.icon == "string" ? (n(), a(c(f), {
94
- key: 0,
95
- name: o.icon
96
- }, null, 8, ["name"])) : o.icon ? (n(), a(r(o.icon), { key: 1 })) : t("v-if", !0)
97
- ], !0)
98
- ],
99
- 2
100
- /* CLASS */
101
- )) : t("v-if", !0),
102
- o.$slots.default ? (n(), u(
103
- "span",
104
- {
105
- key: 2,
106
- class: s([{ "maz-invisible": i.value }, o.contentClass])
107
- },
108
- [
109
- t(`
110
- @slot default - The content of the button
111
- `),
112
- d(o.$slots, "default", {}, void 0, !0)
113
- ],
114
- 2
115
- /* CLASS */
116
- )) : t("v-if", !0),
117
- y.value ? (n(), u(
118
- "div",
119
- {
120
- key: 3,
121
- class: s(["m-btn__icon-right", { "maz-invisible": i.value }])
122
- },
123
- [
124
- t(`
125
- @slot right-icon - The icon to display on the right of the button
126
- `),
127
- d(o.$slots, "right-icon", {}, () => [
128
- typeof o.rightIcon == "string" ? (n(), a(c(f), {
129
- key: 0,
130
- name: o.rightIcon
131
- }, null, 8, ["name"])) : o.rightIcon ? (n(), a(r(o.rightIcon), { key: 1 })) : t("v-if", !0)
132
- ], !0)
133
- ],
134
- 2
135
- /* CLASS */
136
- )) : t("v-if", !0),
137
- i.value ? (n(), a(c(k), {
138
- key: 4,
139
- class: "m-btn-loader",
140
- size: "2em",
141
- color: o.color
142
- }, null, 8, ["color"])) : t("v-if", !0)
143
- ]),
144
- _: 3
145
- /* FORWARDED */
146
- }, 8, ["disabled", "class", "type"]));
147
- }
148
- }), V = /* @__PURE__ */ L(P, [["__scopeId", "data-v-f89548fd"]]);
149
- export {
150
- V as default
151
- };
@@ -1,151 +0,0 @@
1
- import '../assets/MazBtn.css';
2
- import { defineComponent as E, defineAsyncComponent as h, useAttrs as R, useSlots as w, onBeforeMount as A, computed as l, openBlock as n, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as D, createElementBlock as u, createCommentVNode as t, renderSlot as d, unref as c } from "vue";
3
- import { _ as L } from "./MazInput-CuNNbyX5.mjs";
4
- const P = /* @__PURE__ */ E({
5
- __name: "MazBtn",
6
- props: {
7
- variant: { default: "button" },
8
- size: { default: "md" },
9
- color: { default: "primary" },
10
- type: { default: "button" },
11
- rounded: { type: Boolean },
12
- roundedSize: { default: "lg" },
13
- noRounded: { type: Boolean },
14
- outline: { type: Boolean },
15
- pastel: { type: Boolean },
16
- block: { type: Boolean },
17
- noUnderline: { type: Boolean },
18
- loading: { type: Boolean },
19
- disabled: { type: Boolean },
20
- fab: { type: Boolean },
21
- icon: { default: void 0 },
22
- leftIcon: { default: void 0 },
23
- rightIcon: { default: void 0 },
24
- noPadding: { type: Boolean },
25
- noElevation: { type: Boolean },
26
- contentClass: { default: void 0 }
27
- },
28
- setup(g) {
29
- const k = h(() => import("./MazSpinner-afth4SV3.mjs")), f = h(() => import("./MazIcon-Cxrv3_OK.mjs")), { href: z, to: B } = R(), p = w(), e = g;
30
- A(() => {
31
- e.icon && !e.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
32
- });
33
- const v = l(() => z ? "a" : B ? "router-link" : "button"), I = l(
34
- () => e.pastel ? `--${e.color}-pastel` : e.outline ? `--${e.color}-outline` : `--${e.color}`
35
- ), m = l(
36
- () => (e.loading || e.disabled) && v.value === "button"
37
- ), C = l(() => m.value ? "--cursor-default" : "--cursor-pointer"), $ = l(() => `--is-${e.variant}`), i = l(() => e.loading && e.variant === "button"), b = l(() => !!p["left-icon"] || e.leftIcon), y = l(() => !!p["right-icon"] || e.rightIcon), M = l(() => b.value || y.value), S = l(() => e.fab && (e.icon || !!p.icon)), T = l(() => v.value === "button" ? e.type : void 0);
38
- return (o, U) => (n(), a(r(v.value), {
39
- disabled: m.value || void 0,
40
- class: s(["m-btn", [
41
- `--${o.size}`,
42
- `--rounded-${o.roundedSize}`,
43
- I.value,
44
- C.value,
45
- $.value,
46
- {
47
- "--block": o.block,
48
- "--no-underline": o.noUnderline,
49
- "--fab": o.fab,
50
- "--loading": o.loading,
51
- "--disabled": m.value,
52
- "--icon": M.value,
53
- "--rounded": o.rounded,
54
- "--no-rounded": o.noRounded,
55
- "--no-padding": o.noPadding,
56
- "--no-elevation": o.noElevation
57
- }
58
- ]]),
59
- type: T.value
60
- }, {
61
- default: D(() => [
62
- b.value ? (n(), u(
63
- "div",
64
- {
65
- key: 0,
66
- class: s(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": i.value }])
67
- },
68
- [
69
- t(`
70
- @slot left-icon - The icon to display on the left of the button
71
- `),
72
- d(o.$slots, "left-icon", {}, () => [
73
- typeof o.leftIcon == "string" ? (n(), a(c(f), {
74
- key: 0,
75
- name: o.leftIcon
76
- }, null, 8, ["name"])) : o.leftIcon ? (n(), a(r(o.leftIcon), { key: 1 })) : t("v-if", !0)
77
- ], !0)
78
- ],
79
- 2
80
- /* CLASS */
81
- )) : t("v-if", !0),
82
- S.value ? (n(), u(
83
- "div",
84
- {
85
- key: 1,
86
- class: s(["m-btn__icon", { "maz-invisible": i.value }])
87
- },
88
- [
89
- t(`
90
- @slot icon - The icon to display on the fab button
91
- `),
92
- d(o.$slots, "icon", {}, () => [
93
- typeof o.icon == "string" ? (n(), a(c(f), {
94
- key: 0,
95
- name: o.icon
96
- }, null, 8, ["name"])) : o.icon ? (n(), a(r(o.icon), { key: 1 })) : t("v-if", !0)
97
- ], !0)
98
- ],
99
- 2
100
- /* CLASS */
101
- )) : t("v-if", !0),
102
- o.$slots.default ? (n(), u(
103
- "span",
104
- {
105
- key: 2,
106
- class: s([{ "maz-invisible": i.value }, o.contentClass])
107
- },
108
- [
109
- t(`
110
- @slot default - The content of the button
111
- `),
112
- d(o.$slots, "default", {}, void 0, !0)
113
- ],
114
- 2
115
- /* CLASS */
116
- )) : t("v-if", !0),
117
- y.value ? (n(), u(
118
- "div",
119
- {
120
- key: 3,
121
- class: s(["m-btn__icon-right", { "maz-invisible": i.value }])
122
- },
123
- [
124
- t(`
125
- @slot right-icon - The icon to display on the right of the button
126
- `),
127
- d(o.$slots, "right-icon", {}, () => [
128
- typeof o.rightIcon == "string" ? (n(), a(c(f), {
129
- key: 0,
130
- name: o.rightIcon
131
- }, null, 8, ["name"])) : o.rightIcon ? (n(), a(r(o.rightIcon), { key: 1 })) : t("v-if", !0)
132
- ], !0)
133
- ],
134
- 2
135
- /* CLASS */
136
- )) : t("v-if", !0),
137
- i.value ? (n(), a(c(k), {
138
- key: 4,
139
- class: "m-btn-loader",
140
- size: "2em",
141
- color: o.color
142
- }, null, 8, ["color"])) : t("v-if", !0)
143
- ]),
144
- _: 3
145
- /* FORWARDED */
146
- }, 8, ["disabled", "class", "type"]));
147
- }
148
- }), V = /* @__PURE__ */ L(P, [["__scopeId", "data-v-f89548fd"]]);
149
- export {
150
- V as default
151
- };