maz-ui 4.7.5 → 4.7.6

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 (220) hide show
  1. package/dist/chunks/MazAccordion.CKnz73h4.js +1 -0
  2. package/dist/chunks/MazAlert.B8hE7wet.js +1 -0
  3. package/dist/chunks/MazAnimatedCounter.GLLYbZAz.js +1 -0
  4. package/dist/chunks/MazAnimatedElement._8NY8WgC.js +1 -0
  5. package/dist/chunks/MazAnimatedText.BSZ8FNf-.js +1 -0
  6. package/dist/chunks/MazAvatar.vO5VNPi8.js +1 -0
  7. package/dist/chunks/MazBackdrop.Cjbwi8-V.js +1 -0
  8. package/dist/chunks/MazBadge.BBZJgHXm.js +1 -0
  9. package/dist/chunks/MazBottomSheet.WgZ6qobx.js +1 -0
  10. package/dist/chunks/MazBtn.Cc9C1v2l.js +1 -0
  11. package/dist/chunks/MazBtnGroup.3B1XcqWM.js +1 -0
  12. package/dist/chunks/MazCard.YYC0LaHY.js +1 -0
  13. package/dist/chunks/MazCardSpotlight.SpZF61hl.js +1 -0
  14. package/dist/chunks/MazCarousel.1NT4jcvR.js +1 -0
  15. package/dist/chunks/MazChart.CDZ2PBTC.js +1 -0
  16. package/dist/chunks/MazCheckbox.DurIbKdf.js +1 -0
  17. package/dist/chunks/MazChecklist.D9ezwGpQ.js +1 -0
  18. package/dist/chunks/MazCircularProgressBar.rATx_hD9.js +1 -0
  19. package/dist/chunks/MazContainer.zXcfMOs-.js +1 -0
  20. package/dist/chunks/MazDatePicker.KUP34cbV.js +1 -0
  21. package/dist/chunks/MazDialog.CtKF3Xzo.js +1 -0
  22. package/dist/chunks/MazDialogConfirm.CAAHeBPE.js +1 -0
  23. package/dist/chunks/MazDrawer.Dc_RGG8a.js +1 -0
  24. package/dist/chunks/MazDropdown.2DUcivzO.js +1 -0
  25. package/dist/chunks/MazDropzone.CiWiPcFM.js +1 -0
  26. package/dist/chunks/MazExpandAnimation.CMMwtuQA.js +1 -0
  27. package/dist/chunks/MazFullscreenLoader.BIVRcZJ8.js +1 -0
  28. package/dist/chunks/MazGallery.CEmGy0K9.js +1 -0
  29. package/dist/chunks/MazIcon.ZWAk25ZX.js +1 -0
  30. package/dist/chunks/MazInput.DJjWLaKg.js +1 -0
  31. package/dist/chunks/MazInputCode.DKnl3i-X.js +1 -0
  32. package/dist/chunks/MazInputNumber.B42Mn-9h.js +1 -0
  33. package/dist/chunks/MazInputPhoneNumber.CLivThtK.js +1 -0
  34. package/dist/chunks/MazInputPrice.BeL-M944.js +1 -0
  35. package/dist/chunks/MazInputTags.CIVT9F6Q.js +1 -0
  36. package/dist/chunks/MazLazyImg.-EMwandx.js +1 -0
  37. package/dist/chunks/MazLink.BOpxMATj.js +1 -0
  38. package/dist/chunks/MazLoadingBar.C86AX2Tk.js +1 -0
  39. package/dist/chunks/MazPagination.CNNKXBsg.js +1 -0
  40. package/dist/chunks/MazPickerCalendarDays.CSZZbk5Z.js +1 -0
  41. package/dist/chunks/MazPickerCalendarGrid.DrUHBH6-.js +1 -0
  42. package/dist/chunks/MazPickerContainer.BZ74M74V.js +1 -0
  43. package/dist/chunks/MazPopover.Co8BEopX.js +1 -0
  44. package/dist/chunks/MazPullToRefresh.DMtb6Oa3.js +1 -0
  45. package/dist/chunks/MazRadio.75ipjTw2.js +1 -0
  46. package/dist/chunks/MazRadioButtons.DenHCgB3.js +1 -0
  47. package/dist/chunks/MazReadMore.CDXacQIw.js +1 -0
  48. package/dist/chunks/MazReadingProgressBar.828Y0mxA.js +1 -0
  49. package/dist/chunks/MazSelect.yYFAbBb5.js +1 -0
  50. package/dist/chunks/MazSelectCountry.DvVgk2es.js +1 -0
  51. package/dist/chunks/MazSkeleton.BewTYJC2.js +1 -0
  52. package/dist/chunks/MazSlider.BS5QHWK6.js +1 -0
  53. package/dist/chunks/MazSpinner.D3NN2pow.js +1 -0
  54. package/dist/chunks/MazStepper.DTu8HG9T.js +1 -0
  55. package/dist/chunks/MazSwitch.Dvmj-rTW.js +1 -0
  56. package/dist/chunks/MazTable.DnOehvN6.js +1 -0
  57. package/dist/chunks/MazTableCell.xbm2NGWL.js +1 -0
  58. package/dist/chunks/MazTableRow.B5dJiXk1.js +1 -0
  59. package/dist/chunks/MazTableTitle.DNA_1mCy.js +1 -0
  60. package/dist/chunks/MazTabs.-0-YP3QQ.js +1 -0
  61. package/dist/chunks/MazTabsBar.D2JVKMS7.js +1 -0
  62. package/dist/chunks/MazTabsContent.C9omK25X.js +1 -0
  63. package/dist/chunks/MazTabsContentItem.mJEAS5R8.js +1 -0
  64. package/dist/chunks/MazTextarea.BliEP5G5.js +1 -0
  65. package/dist/chunks/MazUiProvider.BgN8V0lD.js +1 -0
  66. package/dist/chunks/_plugin-vue_export-helper.ChmETRGw.js +1 -0
  67. package/dist/chunks/dialog.DexeIC3K.js +1 -0
  68. package/dist/chunks/dom-events.BPrKJiCz.js +1 -0
  69. package/dist/chunks/resolveLinkComponent.DAc3sqGH.js +1 -0
  70. package/dist/chunks/toast.UQ8RRuT9.js +1 -0
  71. package/dist/chunks/types.DDbvTVqf.js +1 -0
  72. package/dist/chunks/useMazInputPhoneNumber.B_qQ0ldP.js +1 -0
  73. package/dist/chunks/utils.B8bfGQxN.js +1 -0
  74. package/dist/chunks/vFullscreenImg.CZeRh3mw.js +1 -0
  75. package/dist/chunks/vLazyImg.CXmd3Lp0.js +1 -0
  76. package/dist/chunks/vZoomImg.CaAHb98S.js +124 -0
  77. package/dist/components/MazAccordion.js +1 -86
  78. package/dist/components/MazAlert.js +1 -85
  79. package/dist/components/MazAnimatedCounter.js +1 -73
  80. package/dist/components/MazAnimatedElement.js +1 -44
  81. package/dist/components/MazAnimatedText.js +1 -103
  82. package/dist/components/MazAvatar.js +1 -125
  83. package/dist/components/MazBackdrop.js +1 -163
  84. package/dist/components/MazBadge.js +1 -29
  85. package/dist/components/MazBottomSheet.js +1 -55
  86. package/dist/components/MazBtn.js +1 -109
  87. package/dist/components/MazBtnGroup.js +1 -44
  88. package/dist/components/MazCard.js +1 -184
  89. package/dist/components/MazCardSpotlight.js +1 -81
  90. package/dist/components/MazCarousel.js +1 -104
  91. package/dist/components/MazChart.js +1 -4
  92. package/dist/components/MazCheckbox.js +1 -128
  93. package/dist/components/MazChecklist.js +1 -133
  94. package/dist/components/MazCircularProgressBar.js +1 -131
  95. package/dist/components/MazContainer.js +1 -71
  96. package/dist/components/MazDatePicker/MazPickerCalendar.js +1 -113
  97. package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarDays.js +1 -19
  98. package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarGrid.js +1 -181
  99. package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarMonth.js +1 -75
  100. package/dist/components/MazDatePicker/MazPickerCalendarSwitcher.js +1 -90
  101. package/dist/components/MazDatePicker/MazPickerContainer.js +1 -116
  102. package/dist/components/MazDatePicker/MazPickerHeader.js +1 -126
  103. package/dist/components/MazDatePicker/MazPickerMonthSwitcher.js +1 -82
  104. package/dist/components/MazDatePicker/MazPickerShortcuts.js +1 -55
  105. package/dist/components/MazDatePicker/MazPickerTime.js +1 -178
  106. package/dist/components/MazDatePicker/MazPickerYearSwitcher.js +1 -95
  107. package/dist/components/MazDatePicker.js +1 -466
  108. package/dist/components/MazDatePicker.vue.d.ts +2 -6
  109. package/dist/components/MazDialog.js +1 -115
  110. package/dist/components/MazDialog.vue.d.ts +2 -6
  111. package/dist/components/MazDialogConfirm.js +1 -6
  112. package/dist/components/MazDialogConfirm.vue.d.ts +2 -6
  113. package/dist/components/MazDrawer.js +1 -70
  114. package/dist/components/MazDropdown.js +1 -277
  115. package/dist/components/MazDropdown.vue.d.ts +2 -6
  116. package/dist/components/MazDropzone.js +1 -533
  117. package/dist/components/MazExpandAnimation.js +1 -46
  118. package/dist/components/MazFullscreenLoader.js +1 -38
  119. package/dist/components/MazGallery.js +1 -105
  120. package/dist/components/MazIcon.js +1 -114
  121. package/dist/components/MazInput.js +1 -256
  122. package/dist/components/MazInputCode.js +1 -152
  123. package/dist/components/MazInputNumber.js +1 -152
  124. package/dist/components/MazInputPhoneNumber/PhoneInput.js +1 -114
  125. package/dist/components/MazInputPhoneNumber.js +1 -253
  126. package/dist/components/MazInputPrice.js +1 -4
  127. package/dist/components/MazInputTags.js +1 -145
  128. package/dist/components/MazLazyImg.js +1 -62
  129. package/dist/components/MazLink.js +1 -80
  130. package/dist/components/MazLoadingBar.js +1 -24
  131. package/dist/components/MazPagination.js +1 -184
  132. package/dist/components/MazPopover.js +1 -326
  133. package/dist/components/MazPullToRefresh.js +1 -145
  134. package/dist/components/MazRadio.js +1 -103
  135. package/dist/components/MazRadioButtons.js +1 -135
  136. package/dist/components/MazReadMore.js +1 -110
  137. package/dist/components/MazReadingProgressBar.js +1 -68
  138. package/dist/components/MazSelect.js +1 -413
  139. package/dist/components/MazSelectCountry.js +1 -192
  140. package/dist/components/MazSkeleton.js +1 -50
  141. package/dist/components/MazSlider.js +1 -205
  142. package/dist/components/MazSpinner.js +1 -27
  143. package/dist/components/MazStepper.js +1 -170
  144. package/dist/components/MazSwitch.js +1 -4
  145. package/dist/components/MazTable.js +1 -8
  146. package/dist/components/MazTableCell.js +1 -18
  147. package/dist/components/MazTableRow.js +1 -26
  148. package/dist/components/MazTableTitle.js +1 -18
  149. package/dist/components/MazTabs.js +1 -4
  150. package/dist/components/MazTabsBar.js +1 -138
  151. package/dist/components/MazTabsContent.js +1 -4
  152. package/dist/components/MazTabsContentItem.js +1 -37
  153. package/dist/components/MazTextarea.js +1 -147
  154. package/dist/components/MazUiProvider.js +1 -4
  155. package/dist/components/index.js +1 -127
  156. package/dist/composables/index.js +1 -44
  157. package/dist/composables/useAos.js +1 -7
  158. package/dist/composables/useBreakpoints.js +1 -34
  159. package/dist/composables/useDialog.js +1 -7
  160. package/dist/composables/useDisplayNames.js +1 -111
  161. package/dist/composables/useDropzone.js +1 -66
  162. package/dist/composables/useFormField.js +1 -101
  163. package/dist/composables/useFormValidator.js +1 -163
  164. package/dist/composables/useFreezeValue.js +1 -8
  165. package/dist/composables/useIdleTimeout.js +1 -10
  166. package/dist/composables/useInjectStrict.js +1 -10
  167. package/dist/composables/useInstanceUniqId.js +1 -12
  168. package/dist/composables/useMountComponent.js +1 -16
  169. package/dist/composables/useMutationObserver.js +1 -37
  170. package/dist/composables/useReadingTime.js +1 -33
  171. package/dist/composables/useStringMatching.js +1 -42
  172. package/dist/composables/useSwipe.js +1 -26
  173. package/dist/composables/useTimer.js +1 -36
  174. package/dist/composables/useToast.js +1 -14
  175. package/dist/composables/useUserVisibility.js +1 -10
  176. package/dist/composables/useWait.js +1 -7
  177. package/dist/composables/useWindowSize.js +1 -21
  178. package/dist/directives/index.js +1 -19
  179. package/dist/directives/vClickOutside.js +1 -104
  180. package/dist/directives/vFullscreenImg.js +1 -10
  181. package/dist/directives/vLazyImg.js +1 -23
  182. package/dist/directives/vTooltip.js +1 -161
  183. package/dist/directives/vZoomImg.js +1 -286
  184. package/dist/index.js +1 -1
  185. package/dist/plugins/aos.js +1 -89
  186. package/dist/plugins/dialog.js +1 -61
  187. package/dist/plugins/index.js +1 -17
  188. package/dist/plugins/maz-ui.js +1 -11
  189. package/dist/plugins/toast.js +1 -261
  190. package/dist/plugins/wait.js +1 -43
  191. package/dist/resolvers/MazComponentsResolver.js +1 -18
  192. package/dist/resolvers/MazDirectivesResolver.js +1 -14
  193. package/dist/resolvers/MazModulesResolver.js +1 -76
  194. package/dist/resolvers/index.js +1 -8
  195. package/dist/tailwindcss/index.js +1 -20
  196. package/dist/tailwindcss/tailwind.config.js +1 -35
  197. package/dist/tailwindcss/utils/colors.js +1 -25
  198. package/dist/tailwindcss/variables/breakpoints.js +1 -29
  199. package/dist/tailwindcss/variables/colors.js +1 -33
  200. package/dist/tailwindcss/variables/design-tokens.js +1 -42
  201. package/dist/tailwindcss/variables/utilities.js +1 -20
  202. package/dist/tailwindcss/variables/z-indexes.js +1 -17
  203. package/package.json +12 -13
  204. package/dist/chunks/MazChart.vue_vue_type_script_setup_true_lang.DpG9UYdm.js +0 -50
  205. package/dist/chunks/MazDialogConfirm.vue_vue_type_script_setup_true_lang.BB2rYkwY.js +0 -215
  206. package/dist/chunks/MazInputPrice.vue_vue_type_script_setup_true_lang.DcNkyw1C.js +0 -77
  207. package/dist/chunks/MazSwitch.vue_vue_type_style_index_0_lang.lYfYsI0R.js +0 -84
  208. package/dist/chunks/MazTable.vue_vue_type_script_setup_true_lang.ycpSYFvJ.js +0 -517
  209. package/dist/chunks/MazTabs.vue_vue_type_script_setup_true_lang.CiIFxs7J.js +0 -28
  210. package/dist/chunks/MazTabsContent.vue_vue_type_script_setup_true_lang.MO7zA8LZ.js +0 -26
  211. package/dist/chunks/MazUiProvider.vue_vue_type_script_setup_true_lang.DtnM1DOn.js +0 -34
  212. package/dist/chunks/_plugin-vue_export-helper.B--vMWp3.js +0 -9
  213. package/dist/chunks/dom-events.DTx6Kblx.js +0 -368
  214. package/dist/chunks/fullscreen-img.directive.BJieSSIt.js +0 -321
  215. package/dist/chunks/lazy-img.directive.GRfYbidn.js +0 -174
  216. package/dist/chunks/resolveLinkComponent.CKR2McYy.js +0 -8
  217. package/dist/chunks/types.D0Bp_UhS.js +0 -6
  218. package/dist/chunks/useMazInputPhoneNumber.Os-2y9bz.js +0 -157
  219. package/dist/chunks/utils.D89Q5cCP.js +0 -207
  220. /package/dist/assets/{fullscreen-img.DFp1SMPU.css → vFullscreenImg.DFp1SMPU.css} +0 -0
@@ -1,35 +1 @@
1
- import plugin from "tailwindcss/plugin";
2
- import { getColors } from "./utils/colors.js";
3
- import { screens } from "./variables/breakpoints.js";
4
- import { getNumericScreensFromTailwind } from "./variables/breakpoints.js";
5
- import { designTokens } from "./variables/design-tokens.js";
6
- import { utilities } from "./variables/utilities.js";
7
- import { zIndex } from "./variables/z-indexes.js";
8
- import "./variables/colors.js";
9
- function defineMazTailwindConfig(config, { utilities: utilities$1 } = {}) {
10
- return {
11
- darkMode: ["class", '[class~="dark"]'],
12
- content: [],
13
- theme: {
14
- extend: {
15
- ...designTokens,
16
- colors: getColors(),
17
- screens,
18
- zIndex
19
- }
20
- },
21
- plugins: [
22
- plugin(({ addUtilities }) => {
23
- addUtilities({
24
- ...utilities,
25
- ...utilities$1
26
- });
27
- })
28
- ],
29
- ...config
30
- };
31
- }
32
- export {
33
- defineMazTailwindConfig,
34
- getNumericScreensFromTailwind
35
- };
1
+ import{getNumericScreensFromTailwind,screens}from"./variables/breakpoints.js";import{getColors}from"./utils/colors.js";import{designTokens}from"./variables/design-tokens.js";import{utilities}from"./variables/utilities.js";import{zIndex}from"./variables/z-indexes.js";import plugin from"tailwindcss/plugin";function defineMazTailwindConfig(config,{utilities:utilities$1}={}){return{darkMode:[`class`,`[class~="dark"]`],content:[],theme:{extend:{...designTokens,colors:getColors(),screens,zIndex}},plugins:[plugin(({addUtilities})=>{addUtilities({...utilities,...utilities$1})})],...config}}export{defineMazTailwindConfig,getNumericScreensFromTailwind};
@@ -1,25 +1 @@
1
- import { colorScales, scaleColors, noForegroundColors, baseColors } from "../variables/colors.js";
2
- function getColors() {
3
- const colors = baseColors;
4
- for (const [colorNameTailwind, variableName] of Object.entries(scaleColors)) {
5
- const colorVariations = colorScales.reduce((variants, scale) => (variants[scale] = `hsl(var(--maz-${variableName}-${scale}) / <alpha-value>)`, variants), {});
6
- colorVariations.DEFAULT = `hsl(var(--maz-${variableName}) / <alpha-value>)`, noForegroundColors.includes(colorNameTailwind) || (colorVariations.foreground = `hsl(var(--maz-${variableName}-foreground) / <alpha-value>)`), colors[colorNameTailwind] = colorVariations;
7
- }
8
- return colors;
9
- }
10
- function createScaleColor(colorName) {
11
- const variants = colorScales.reduce((acc, scale) => (acc[scale] = `hsl(var(--maz-${colorName}-${scale}) / <alpha-value>)`, acc), {});
12
- return variants.DEFAULT = `hsl(var(--maz-${colorName}) / <alpha-value>)`, variants.foreground = `hsl(var(--maz-${colorName}-foreground) / <alpha-value>)`, variants;
13
- }
14
- function createSimpleColor(colorName, withForeground = !1) {
15
- const color = `hsl(var(--maz-${colorName}) / <alpha-value>)`;
16
- return withForeground ? {
17
- DEFAULT: color,
18
- foreground: `hsl(var(--maz-${colorName}-foreground) / <alpha-value>)`
19
- } : color;
20
- }
21
- export {
22
- createScaleColor,
23
- createSimpleColor,
24
- getColors
25
- };
1
+ import{baseColors,colorScales,noForegroundColors,scaleColors}from"../variables/colors.js";function getColors(){let colors=baseColors;for(let[colorNameTailwind,variableName]of Object.entries(scaleColors)){let colorVariations=colorScales.reduce((variants,scale)=>(variants[scale]=`hsl(var(--maz-${variableName}-${scale}) / <alpha-value>)`,variants),{});colorVariations.DEFAULT=`hsl(var(--maz-${variableName}) / <alpha-value>)`,noForegroundColors.includes(colorNameTailwind)||(colorVariations.foreground=`hsl(var(--maz-${variableName}-foreground) / <alpha-value>)`),colors[colorNameTailwind]=colorVariations}return colors}function createScaleColor(colorName){let variants=colorScales.reduce((acc,scale)=>(acc[scale]=`hsl(var(--maz-${colorName}-${scale}) / <alpha-value>)`,acc),{});return variants.DEFAULT=`hsl(var(--maz-${colorName}) / <alpha-value>)`,variants.foreground=`hsl(var(--maz-${colorName}-foreground) / <alpha-value>)`,variants}function createSimpleColor(colorName,withForeground=!1){let color=`hsl(var(--maz-${colorName}) / <alpha-value>)`;return withForeground?{DEFAULT:color,foreground:`hsl(var(--maz-${colorName}-foreground) / <alpha-value>)`}:color}export{createScaleColor,createSimpleColor,getColors};
@@ -1,29 +1 @@
1
- const screens = {
2
- "mob-s": "320px",
3
- "mob-m": "425px",
4
- "mob-l": "576px",
5
- "tab-s": "640px",
6
- // sm
7
- "tab-m": "768px",
8
- // md
9
- "tab-l": "992px",
10
- "lap-s": "1024px",
11
- // lg
12
- "lap-m": "1280px",
13
- // xl
14
- "lap-l": "1366px",
15
- "lap-xl": "1440px",
16
- // 2xl
17
- "lap-2xl": "1680px",
18
- "lap-3xl": "1920px"
19
- };
20
- function getNumericScreensFromTailwind(inputScreens) {
21
- const breakpoints = {};
22
- for (const [key, value] of Object.entries(inputScreens))
23
- breakpoints[key] = Number.parseInt(value, 10);
24
- return breakpoints;
25
- }
26
- export {
27
- getNumericScreensFromTailwind,
28
- screens
29
- };
1
+ var screens={"mob-s":`320px`,"mob-m":`425px`,"mob-l":`576px`,"tab-s":`640px`,"tab-m":`768px`,"tab-l":`992px`,"lap-s":`1024px`,"lap-m":`1280px`,"lap-l":`1366px`,"lap-xl":`1440px`,"lap-2xl":`1680px`,"lap-3xl":`1920px`};function getNumericScreensFromTailwind(inputScreens){let breakpoints={};for(let[key,value]of Object.entries(inputScreens))breakpoints[key]=Number.parseInt(value,10);return breakpoints}export{getNumericScreensFromTailwind,screens};
@@ -1,33 +1 @@
1
- const baseColors = {}, scaleColors = {
2
- primary: "primary",
3
- secondary: "secondary",
4
- accent: "accent",
5
- destructive: "destructive",
6
- success: "success",
7
- warning: "warning",
8
- contrast: "contrast",
9
- info: "info",
10
- foreground: "foreground",
11
- surface: "background",
12
- divider: "border",
13
- elevation: "shadow",
14
- overlay: "overlay",
15
- muted: "muted"
16
- }, noForegroundColors = ["surface", "foreground", "overlay", "divider", "muted", "elevation"], colorScales = [
17
- "50",
18
- "100",
19
- "200",
20
- "300",
21
- "400",
22
- "500",
23
- "600",
24
- "700",
25
- "800",
26
- "900"
27
- ];
28
- export {
29
- baseColors,
30
- colorScales,
31
- noForegroundColors,
32
- scaleColors
33
- };
1
+ var baseColors={};var scaleColors={primary:`primary`,secondary:`secondary`,accent:`accent`,destructive:`destructive`,success:`success`,warning:`warning`,contrast:`contrast`,info:`info`,foreground:`foreground`,surface:`background`,divider:`border`,elevation:`shadow`,overlay:`overlay`,muted:`muted`};var noForegroundColors=[`surface`,`foreground`,`overlay`,`divider`,`muted`,`elevation`];var colorScales=[`50`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`];export{baseColors,colorScales,noForegroundColors,scaleColors};
@@ -1,42 +1 @@
1
- const designTokens = {
2
- borderRadius: {
3
- sm: "calc(var(--maz-radius) - 8px)",
4
- md: "calc(var(--maz-radius) - 4px)",
5
- DEFAULT: "var(--maz-radius)",
6
- lg: "calc(var(--maz-radius) + 4px)",
7
- xl: "calc(var(--maz-radius) + 8px)"
8
- },
9
- borderColor: {
10
- DEFAULT: "hsl(var(--maz-border) / <alpha-value>)"
11
- },
12
- // Bordures
13
- borderWidth: {
14
- DEFAULT: "var(--maz-border-width)",
15
- 0: "0",
16
- 2: "2px",
17
- 4: "4px",
18
- 8: "8px"
19
- },
20
- // Typography
21
- fontFamily: {
22
- sans: "var(--maz-font-family)"
23
- },
24
- // Animations et transitions
25
- transitionDuration: {
26
- DEFAULT: "200ms"
27
- },
28
- transitionTimingFunction: {
29
- DEFAULT: "cubic-bezier(0.4, 0, 0.2, 1)"
30
- },
31
- // Shadows
32
- boxShadow: {
33
- sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
34
- DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
35
- md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
36
- lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
37
- xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
38
- }
39
- };
40
- export {
41
- designTokens
42
- };
1
+ var designTokens={borderRadius:{sm:`calc(var(--maz-radius) - 8px)`,md:`calc(var(--maz-radius) - 4px)`,DEFAULT:`var(--maz-radius)`,lg:`calc(var(--maz-radius) + 4px)`,xl:`calc(var(--maz-radius) + 8px)`},borderColor:{DEFAULT:`hsl(var(--maz-border) / <alpha-value>)`},borderWidth:{DEFAULT:`var(--maz-border-width)`,0:`0`,2:`2px`,4:`4px`,8:`8px`},fontFamily:{sans:`var(--maz-font-family)`},transitionDuration:{DEFAULT:`200ms`},transitionTimingFunction:{DEFAULT:`cubic-bezier(0.4, 0, 0.2, 1)`},boxShadow:{sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,DEFAULT:`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`}};export{designTokens};
@@ -1,20 +1 @@
1
- const utilities = {
2
- ".flex-center": {
3
- "align-items": "center",
4
- "justify-content": "center"
5
- },
6
- ".padded-container-no-p": {
7
- width: "100%",
8
- "padding-inline": "calc(50% - var(--maz-container-max-width) / 2)"
9
- },
10
- ".padded-container": {
11
- width: "100%",
12
- "padding-inline": "var(--maz-container-padding)"
13
- },
14
- ".cap-f::first-letter": {
15
- "text-transform": "capitalize"
16
- }
17
- };
18
- export {
19
- utilities
20
- };
1
+ var utilities={".flex-center":{"align-items":`center`,"justify-content":`center`},".padded-container-no-p":{width:`100%`,"padding-inline":`calc(50% - var(--maz-container-max-width) / 2)`},".padded-container":{width:`100%`,"padding-inline":`var(--maz-container-padding)`},".cap-f::first-letter":{"text-transform":`capitalize`}};export{utilities};
@@ -1,17 +1 @@
1
- const zIndex = {
2
- 1: "1",
3
- 2: "2",
4
- 3: "3",
5
- 4: "4",
6
- 5: "5",
7
- 15: "15",
8
- 25: "25",
9
- 35: "35",
10
- 45: "45",
11
- 75: "75",
12
- 100: "100",
13
- "default-backdrop": "1050"
14
- };
15
- export {
16
- zIndex
17
- };
1
+ var zIndex={1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,15:`15`,25:`25`,35:`35`,45:`45`,75:`75`,100:`100`,"default-backdrop":`1050`};export{zIndex};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "maz-ui",
3
3
  "type": "module",
4
- "version": "4.7.5",
4
+ "version": "4.7.6",
5
5
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -156,25 +156,25 @@
156
156
  "dependencies": {
157
157
  "@floating-ui/vue": "^1.1.11",
158
158
  "chart.js": "^4.5.1",
159
- "dayjs": "^1.11.19",
160
- "libphonenumber-js": "^1.12.38",
159
+ "dayjs": "^1.11.20",
160
+ "libphonenumber-js": "^1.12.40",
161
161
  "valibot": "^1.2.0",
162
162
  "vue-chartjs": "^5.3.3",
163
163
  "@maz-ui/cli": "4.7.3",
164
- "@maz-ui/icons": "4.7.2",
165
- "@maz-ui/themes": "4.7.4",
166
- "@maz-ui/translations": "4.7.4",
167
- "@maz-ui/utils": "4.7.4"
164
+ "@maz-ui/icons": "4.7.6",
165
+ "@maz-ui/translations": "4.7.6",
166
+ "@maz-ui/utils": "4.7.6",
167
+ "@maz-ui/themes": "4.7.6"
168
168
  },
169
169
  "devDependencies": {
170
- "@vitejs/plugin-vue": "^6.0.4",
171
- "@vue/compiler-sfc": "^3.5.29",
170
+ "@vitejs/plugin-vue": "^6.0.5",
171
+ "@vue/compiler-sfc": "^3.5.30",
172
172
  "@vue/test-utils": "^2.4.6",
173
173
  "autoprefixer": "^10.4.27",
174
174
  "jsdom": "^28.1.0",
175
175
  "lightningcss": "^1.32.0",
176
- "nuxt": "^4.3.1",
177
- "sass": "^1.97.3",
176
+ "nuxt": "^4.4.2",
177
+ "sass": "^1.98.0",
178
178
  "tailwindcss": "^3.4.16",
179
179
  "unplugin-auto-import": "^21.0.0",
180
180
  "unplugin-vue-components": "^31.0.0",
@@ -194,8 +194,7 @@
194
194
  "lint:js:fix": "pnpm lint:js --fix",
195
195
  "lint:style": "stylelint \"./**/*.{vue,css,scss,postcss,pcss,html}\"",
196
196
  "lint:style:fix": "pnpm lint:style --fix",
197
- "build": "pnpm typecheck && pnpm build:only",
198
- "build:only": "vite build",
197
+ "build": "vite build",
199
198
  "build:watch": "vite build --watch --mode development",
200
199
  "build:analyze": "vite-node build/analyze-bundle.ts",
201
200
  "test:unit": "vitest run",
@@ -1,50 +0,0 @@
1
- import { defineComponent, defineAsyncComponent, openBlock, createBlock, resolveDynamicComponent, unref } from "vue";
2
- import { Chart, CategoryScale, LinearScale, Title, Tooltip, Legend, BarElement, ArcElement, PointElement, LineElement } from "chart.js";
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "MazChart",
5
- props: {
6
- type: {},
7
- data: {},
8
- options: { default: () => ({}) },
9
- plugins: {},
10
- datasetIdKey: {},
11
- updateMode: {}
12
- },
13
- setup(__props) {
14
- Chart.register(
15
- CategoryScale,
16
- LinearScale,
17
- Title,
18
- Tooltip,
19
- Legend,
20
- BarElement,
21
- ArcElement,
22
- PointElement,
23
- LineElement
24
- );
25
- const component = defineAsyncComponent(async () => {
26
- const { Bar, Bubble, Doughnut, Line, Pie, PolarArea, Radar, Scatter } = await import("vue-chartjs");
27
- return {
28
- bar: Bar,
29
- line: Line,
30
- scatter: Scatter,
31
- bubble: Bubble,
32
- pie: Pie,
33
- doughnut: Doughnut,
34
- polarArea: PolarArea,
35
- radar: Radar
36
- }[__props.type];
37
- });
38
- return (_ctx, _cache) => (openBlock(), createBlock(resolveDynamicComponent(unref(component)), {
39
- class: "m-chart m-reset-css",
40
- data: __props.data,
41
- options: __props.options,
42
- plugins: __props.plugins,
43
- "dataset-id-key": __props.datasetIdKey,
44
- "update-mode": __props.updateMode
45
- }, null, 8, ["data", "options", "plugins", "dataset-id-key", "update-mode"]));
46
- }
47
- });
48
- export {
49
- _sfc_main as _
50
- };
@@ -1,215 +0,0 @@
1
- import { ref, defineComponent, createPropsRestProxy, defineAsyncComponent, computed, openBlock, createBlock, mergeProps, unref, withCtx, renderSlot, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
- import MazDialog from "../components/MazDialog.js";
3
- const defaultData = {
4
- buttons: void 0,
5
- acceptText: "Confirm",
6
- hideAcceptButton: !1,
7
- acceptProps: {
8
- color: "success",
9
- type: "accept",
10
- response: "accept"
11
- },
12
- rejectText: "Cancel",
13
- hideRejectButton: !1,
14
- rejectProps: {
15
- color: "destructive",
16
- type: "reject",
17
- response: "reject"
18
- }
19
- }, data = ref(defaultData), dialogState = ref([]);
20
- function showDialogAndWaitChoice(identifier, callback) {
21
- return new Promise((resolve, reject) => {
22
- dialogState.value = [
23
- ...dialogState.value,
24
- {
25
- id: identifier,
26
- isActive: !0,
27
- accept: async (response) => {
28
- resolve(response), await callback?.();
29
- },
30
- reject: async (response) => {
31
- reject(response), await callback?.();
32
- }
33
- }
34
- ];
35
- });
36
- }
37
- function removeDialogFromState(identifier) {
38
- return dialogState.value = dialogState.value.filter(({ id }) => id !== identifier), dialogState.value;
39
- }
40
- function responseDialog(type, currentDialog, response) {
41
- if (currentDialog)
42
- return currentDialog[type]?.(response), currentDialog.isActive = !1, setTimeout(() => {
43
- removeDialogFromState(currentDialog.id);
44
- }, 500), response;
45
- }
46
- function useMazDialogConfirm() {
47
- return {
48
- data,
49
- dialogState,
50
- showDialogAndWaitChoice,
51
- removeDialogFromState,
52
- reject: async (currentDialog, response = "reject", onClick) => (await onClick?.(), responseDialog("reject", currentDialog, response)),
53
- accept: async (currentDialog, response = "accept", onClick) => (await onClick?.(), responseDialog("accept", currentDialog, response))
54
- };
55
- }
56
- const _hoisted_1 = { class: "maz-flex maz-items-center maz-gap-2" }, _sfc_main = /* @__PURE__ */ defineComponent({
57
- __name: "MazDialogConfirm",
58
- props: {
59
- identifier: {},
60
- title: {},
61
- message: {},
62
- rejectText: {},
63
- rejectProps: {},
64
- hideRejectButton: { type: Boolean },
65
- acceptText: {},
66
- acceptProps: {},
67
- hideAcceptButton: { type: Boolean },
68
- buttons: {},
69
- modelValue: { type: Boolean },
70
- hideCloseButton: { type: Boolean },
71
- maxWidth: {},
72
- minWidth: {},
73
- scrollable: { type: Boolean },
74
- persistent: { type: Boolean },
75
- teleportSelector: {},
76
- beforeClose: { type: Function },
77
- closeOnEscape: { type: Boolean, default: !0 },
78
- transitionName: {},
79
- backdropClass: { type: [Boolean, null, String, Object, Array] },
80
- backdropContentClass: { type: [Boolean, null, String, Object, Array] },
81
- contentPadding: { type: Boolean },
82
- justify: {},
83
- align: {},
84
- variant: {},
85
- ariaLabelledby: {},
86
- ariaDescribedby: {}
87
- },
88
- emits: ["open", "close"],
89
- setup(__props, { expose: __expose }) {
90
- const dialogProps = createPropsRestProxy(__props, ["identifier", "message", "buttons", "title", "modelValue", "closeOnEscape", "rejectText", "acceptText", "rejectProps", "acceptProps", "hideRejectButton", "hideAcceptButton"]), MazBtn = defineAsyncComponent(() => import("../components/MazBtn.js")), { dialogState: dialogState2, reject, accept, data: data2 } = useMazDialogConfirm(), currentData = computed(() => {
91
- const baseData = {
92
- ...defaultData,
93
- ...data2.value,
94
- hideAcceptButton: data2.value.hideAcceptButton ?? defaultData.hideAcceptButton,
95
- hideRejectButton: data2.value.hideRejectButton ?? defaultData.hideRejectButton,
96
- acceptProps: {
97
- ...defaultData.acceptProps,
98
- ...data2.value.acceptProps,
99
- text: __props.acceptText ?? data2.value.acceptText ?? data2.value.acceptProps?.text ?? defaultData.acceptText,
100
- type: data2.value.acceptProps?.type ?? defaultData.acceptProps.type
101
- },
102
- rejectProps: {
103
- ...defaultData.rejectProps,
104
- ...data2.value.rejectProps,
105
- text: __props.rejectText ?? data2.value.rejectText ?? data2.value.rejectProps?.text ?? defaultData.rejectText,
106
- type: data2.value.rejectProps?.type ?? defaultData.rejectProps.type
107
- }
108
- };
109
- return {
110
- ...baseData,
111
- acceptText: __props.acceptText ?? baseData.acceptText,
112
- rejectText: __props.rejectText ?? baseData.rejectText,
113
- hideAcceptButton: __props.hideAcceptButton ?? baseData.hideAcceptButton,
114
- hideRejectButton: __props.hideRejectButton ?? baseData.hideRejectButton,
115
- acceptProps: {
116
- ...baseData.acceptProps,
117
- ...__props.acceptProps,
118
- text: __props.acceptText ?? __props.acceptProps?.text ?? baseData.acceptText ?? baseData.acceptProps.text
119
- },
120
- rejectProps: {
121
- ...baseData.rejectProps,
122
- ...__props.rejectProps,
123
- text: __props.rejectText ?? __props.rejectProps?.text ?? baseData.rejectText ?? baseData.rejectProps?.text
124
- }
125
- };
126
- }), currentButtons = computed(() => __props.buttons ?? currentData.value.buttons), currentModal = computed(
127
- () => dialogState2.value.find(({ id }) => id === __props.identifier)
128
- ), dialog = ref();
129
- __expose({
130
- /**
131
- * Close the dialog
132
- * @description This is used to close the dialog
133
- */
134
- close: () => dialog.value?.close?.(),
135
- /**
136
- * Check if the dialog is active
137
- * @description This is used to check if the dialog is active
138
- */
139
- isActive: computed(() => currentModal.value?.isActive ?? __props.modelValue ?? !1)
140
- });
141
- function isPromiseButton(button) {
142
- return button ? "type" in button && (button.type === "accept" || button.type === "reject") : !1;
143
- }
144
- function buttonClick(currentModal2, button) {
145
- return isPromiseButton(button) ? button.type === "accept" ? accept(currentModal2, button.response) : reject(currentModal2, button.response) : accept(currentModal2, void 0, button.onClick);
146
- }
147
- return (_ctx, _cache) => (openBlock(), createBlock(MazDialog, mergeProps({
148
- ref_key: "dialog",
149
- ref: dialog
150
- }, { ..._ctx.$attrs, ...dialogProps }, {
151
- "close-on-escape": __props.closeOnEscape,
152
- "model-value": currentModal.value?.isActive ?? __props.modelValue ?? !1,
153
- onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close", $event)),
154
- onOpen: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("open", $event)),
155
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(reject)(currentModal.value))
156
- }), {
157
- title: withCtx(() => [
158
- renderSlot(_ctx.$slots, "title", {}, () => [
159
- createTextVNode(toDisplayString(__props.title || currentData.value?.title), 1)
160
- ])
161
- ]),
162
- default: withCtx(() => [
163
- renderSlot(_ctx.$slots, "default", {
164
- accept: (reason) => unref(accept)(currentModal.value, reason),
165
- reject: (reason) => unref(reject)(currentModal.value, reason)
166
- }, () => [
167
- createTextVNode(toDisplayString(__props.message || currentData.value?.message), 1)
168
- ])
169
- ]),
170
- footer: withCtx(() => [
171
- renderSlot(_ctx.$slots, "footer-button", {
172
- accept: (reason) => unref(accept)(currentModal.value, reason),
173
- reject: (reason) => unref(reject)(currentModal.value, reason)
174
- }, () => [
175
- createElementVNode("div", _hoisted_1, [
176
- currentButtons.value ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(currentButtons.value, (button, i) => (openBlock(), createBlock(unref(MazBtn), mergeProps({ key: i }, { ref_for: !0 }, {
177
- ...button,
178
- onClick: void 0,
179
- type: "button"
180
- }, {
181
- onClick: ($event) => buttonClick(currentModal.value, button)
182
- }), {
183
- default: withCtx(() => [
184
- createTextVNode(toDisplayString(button.text), 1)
185
- ]),
186
- _: 2
187
- }, 1040, ["onClick"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
188
- currentData.value.hideAcceptButton ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(MazBtn), mergeProps({ key: 0 }, {
189
- ...currentData.value.acceptProps,
190
- type: "button",
191
- // onClick: undefined,
192
- text: currentData.value.acceptText ?? currentData.value.acceptProps?.text
193
- }, {
194
- onClick: _cache[0] || (_cache[0] = ($event) => isPromiseButton(currentData.value.acceptProps) ? unref(accept)(currentModal.value, currentData.value.acceptProps.response) : currentData.value.acceptProps?.onClick?.())
195
- }), null, 16)),
196
- currentData.value.hideRejectButton ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(MazBtn), mergeProps({ key: 1 }, {
197
- ...currentData.value.rejectProps,
198
- type: "button",
199
- onClick: void 0,
200
- text: currentData.value.rejectText ?? currentData.value.rejectProps?.text
201
- }, {
202
- onClick: _cache[1] || (_cache[1] = ($event) => isPromiseButton(currentData.value.rejectProps) ? unref(reject)(currentModal.value, currentData.value.rejectProps.response) : currentData.value.rejectProps?.onClick?.())
203
- }), null, 16))
204
- ], 64))
205
- ])
206
- ])
207
- ]),
208
- _: 3
209
- }, 16, ["close-on-escape", "model-value"]));
210
- }
211
- });
212
- export {
213
- _sfc_main as _,
214
- useMazDialogConfirm as u
215
- };
@@ -1,77 +0,0 @@
1
- import { defineComponent, ref, watch, computed, onMounted, openBlock, createBlock, withKeys, unref, nextTick } from "vue";
2
- import { MazBanknotes } from "@maz-ui/icons/lazy";
3
- import { formatCurrency } from "@maz-ui/utils/helpers/formatCurrency";
4
- import MazInput from "../components/MazInput.js";
5
- const _sfc_main = /* @__PURE__ */ defineComponent({
6
- __name: "MazInputPrice",
7
- props: {
8
- modelValue: { default: void 0 },
9
- currency: { default: "EUR" },
10
- locale: { default: "fr-FR" },
11
- min: { default: Number.NEGATIVE_INFINITY },
12
- max: { default: Number.POSITIVE_INFINITY },
13
- noIcon: { type: Boolean, default: !1 },
14
- block: { type: Boolean },
15
- error: { type: Boolean },
16
- hint: {},
17
- success: { type: Boolean },
18
- warning: { type: Boolean },
19
- currencyOptions: {}
20
- },
21
- emits: ["update:model-value", "input", "formatted", "blur", "focus"],
22
- setup(__props, { emit: __emit }) {
23
- const props = __props, emits = __emit, internalValue = ref(getAdjustedPrice(props.modelValue));
24
- watch(() => props.modelValue, updateInternalValue);
25
- const isActive = ref(!1), valueString = computed(() => props.modelValue?.toString()), valueNumber = computed(() => props.modelValue), priceFormatted = computed(
26
- () => typeof valueNumber.value == "number" ? formatCurrency(valueNumber.value, props.locale, { ...props.currencyOptions, currency: props.currency }) : void 0
27
- ), isLetterRegex = /[^\d.]/g;
28
- function getAdjustedPrice(value) {
29
- const isNegative = typeof value == "string" && value.startsWith("-");
30
- let newValue = typeof value == "string" ? Number.parseFloat(value.replace(",", ".").replaceAll(isLetterRegex, "")) : value;
31
- return newValue = isNegative && newValue ? -newValue : newValue, (typeof newValue != "number" || Number.isNaN(newValue)) && (newValue = void 0), newValue && newValue < props.min && (newValue = props.min), newValue && newValue > props.max && (newValue = props.max), newValue;
32
- }
33
- const displayPrice = computed(() => {
34
- if (isActive.value)
35
- return valueString.value;
36
- if (typeof props.modelValue == "number")
37
- return priceFormatted.value;
38
- });
39
- async function emitValues(newValue) {
40
- const adjustedPrice = getAdjustedPrice(newValue);
41
- emits("update:model-value", adjustedPrice), await nextTick(), emits("formatted", priceFormatted.value);
42
- }
43
- onMounted(() => {
44
- emitValues(props.modelValue);
45
- });
46
- function onBlur(event) {
47
- isActive.value = !1, emitValues(internalValue.value), emits("blur", event);
48
- }
49
- function onFocus(event) {
50
- isActive.value = !0, emits("focus", event);
51
- }
52
- function onInput() {
53
- emits("input", internalValue.value), emitValues(internalValue.value);
54
- }
55
- function updateInternalValue(value) {
56
- internalValue.value = getAdjustedPrice(value);
57
- }
58
- return (_ctx, _cache) => (openBlock(), createBlock(MazInput, {
59
- "model-value": displayPrice.value,
60
- class: "maz-input-price m-reset-css",
61
- block: __props.block,
62
- error: __props.error,
63
- success: __props.success,
64
- warning: __props.warning,
65
- hint: __props.hint,
66
- "left-icon": __props.noIcon ? void 0 : unref(MazBanknotes),
67
- onFocus,
68
- onBlur,
69
- onInput,
70
- onKeydown: _cache[0] || (_cache[0] = withKeys(($event) => emitValues(internalValue.value), ["enter"])),
71
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => updateInternalValue($event))
72
- }, null, 8, ["model-value", "block", "error", "success", "warning", "hint", "left-icon"]));
73
- }
74
- });
75
- export {
76
- _sfc_main as _
77
- };