maz-ui 3.11.4 → 3.12.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 (63) hide show
  1. package/components/MazAvatar.d.ts +154 -0
  2. package/components/MazBackdrop.d.ts +91 -0
  3. package/components/MazBadge.d.ts +73 -0
  4. package/components/MazBottomSheet.d.ts +36 -0
  5. package/components/MazBtn.d.ts +195 -0
  6. package/components/MazCard.d.ts +194 -0
  7. package/components/MazCarousel.d.ts +24 -0
  8. package/components/MazChart.d.ts +95 -0
  9. package/components/MazCheckbox.d.ts +52 -0
  10. package/components/MazDialog.d.ts +91 -0
  11. package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +30 -0
  12. package/components/MazDialogPromise.d.ts +72 -0
  13. package/components/MazDrawer.d.ts +69 -0
  14. package/components/MazDropzone.d.ts +128 -0
  15. package/components/MazGallery.d.ts +125 -0
  16. package/components/MazIcon.d.ts +64 -0
  17. package/components/MazInput.d.ts +271 -0
  18. package/components/MazInputNumber.d.ts +65 -0
  19. package/components/MazInputPrice.d.ts +69 -0
  20. package/components/MazInputTags.d.ts +92 -0
  21. package/components/MazLazyImg.d.ts +77 -0
  22. package/components/MazPhoneNumberInput/constantes/locales.d.ts +12 -0
  23. package/components/MazPhoneNumberInput/types.d.ts +21 -0
  24. package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +2 -0
  25. package/components/MazPhoneNumberInput/utils/index.d.ts +12 -0
  26. package/components/MazPhoneNumberInput.d.ts +251 -0
  27. package/components/MazPicker/MazPickerCalendar.vue.d.ts +135 -0
  28. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +20 -0
  29. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +112 -0
  30. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +122 -0
  31. package/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +36 -0
  32. package/components/MazPicker/MazPickerContainer.vue.d.ts +210 -0
  33. package/components/MazPicker/MazPickerFooter.vue.d.ts +16 -0
  34. package/components/MazPicker/MazPickerHeader.vue.d.ts +82 -0
  35. package/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +41 -0
  36. package/components/MazPicker/MazPickerShortcuts.vue.d.ts +60 -0
  37. package/components/MazPicker/MazPickerTime.vue.d.ts +127 -0
  38. package/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +33 -0
  39. package/components/MazPicker/types.d.ts +15 -0
  40. package/components/MazPicker/utils.d.ts +54 -0
  41. package/components/MazPicker.d.ts +309 -0
  42. package/components/MazRadioButtons.d.ts +77 -0
  43. package/components/MazSelect.d.ts +184 -0
  44. package/components/MazSlider/utils.d.ts +15 -0
  45. package/components/MazSlider.d.ts +92 -0
  46. package/components/MazSpinner.d.ts +26 -0
  47. package/components/MazStepper.d.ts +112 -0
  48. package/components/MazSwitch.d.ts +54 -0
  49. package/components/MazTabs.d.ts +28 -0
  50. package/components/MazTabsBar.d.ts +55 -0
  51. package/components/MazTabsContent.d.ts +9 -0
  52. package/components/MazTabsContentItem.d.ts +19 -0
  53. package/components/MazTextarea/textarea-autogrow.d.ts +9 -0
  54. package/components/MazTextarea.d.ts +121 -0
  55. package/components/MazTransitionExpand.d.ts +9 -0
  56. package/components/component-list.d.ts +1 -0
  57. package/components/index.d.ts +35 -0
  58. package/components/types.d.ts +17 -0
  59. package/nuxt/index.ts +49 -21
  60. package/package.json +10 -7
  61. package/tailwindcss/tailwind.config.ts +2 -2
  62. package/types/nuxt/index.d.ts +12 -8
  63. package/types/tailwindcss/tailwind.config.d.ts +75 -1
@@ -0,0 +1,121 @@
1
+ import { type PropType } from 'vue';
2
+ import type { Color } from './types';
3
+ export type { Color } from './types';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ modelValue: {
6
+ type: StringConstructor;
7
+ default: undefined;
8
+ };
9
+ id: {
10
+ type: StringConstructor;
11
+ default: undefined;
12
+ };
13
+ name: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ label: {
18
+ type: StringConstructor;
19
+ default: undefined;
20
+ };
21
+ required: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ disabled: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ readonly: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ error: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ success: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ warning: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ hint: {
46
+ type: StringConstructor;
47
+ default: undefined;
48
+ };
49
+ color: {
50
+ type: PropType<Color>;
51
+ default: string;
52
+ };
53
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "blur" | "change" | "focus")[], "input" | "blur" | "change" | "focus", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
54
+ modelValue: {
55
+ type: StringConstructor;
56
+ default: undefined;
57
+ };
58
+ id: {
59
+ type: StringConstructor;
60
+ default: undefined;
61
+ };
62
+ name: {
63
+ type: StringConstructor;
64
+ default: string;
65
+ };
66
+ label: {
67
+ type: StringConstructor;
68
+ default: undefined;
69
+ };
70
+ required: {
71
+ type: BooleanConstructor;
72
+ default: boolean;
73
+ };
74
+ disabled: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ readonly: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ error: {
83
+ type: BooleanConstructor;
84
+ default: boolean;
85
+ };
86
+ success: {
87
+ type: BooleanConstructor;
88
+ default: boolean;
89
+ };
90
+ warning: {
91
+ type: BooleanConstructor;
92
+ default: boolean;
93
+ };
94
+ hint: {
95
+ type: StringConstructor;
96
+ default: undefined;
97
+ };
98
+ color: {
99
+ type: PropType<Color>;
100
+ default: string;
101
+ };
102
+ }>> & {
103
+ onFocus?: ((...args: any[]) => any) | undefined;
104
+ onBlur?: ((...args: any[]) => any) | undefined;
105
+ onChange?: ((...args: any[]) => any) | undefined;
106
+ onInput?: ((...args: any[]) => any) | undefined;
107
+ }, {
108
+ label: string;
109
+ success: boolean;
110
+ warning: boolean;
111
+ required: boolean;
112
+ id: string;
113
+ color: Color;
114
+ disabled: boolean;
115
+ name: string;
116
+ error: boolean;
117
+ modelValue: string;
118
+ readonly: boolean;
119
+ hint: string;
120
+ }, {}>;
121
+ export default _default;
@@ -0,0 +1,9 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
2
+ default?(_: {}): any;
3
+ }>;
4
+ export default _default;
5
+ type __VLS_WithTemplateSlots<T, S> = T & {
6
+ new (): {
7
+ $slots: S;
8
+ };
9
+ };
@@ -0,0 +1 @@
1
+ export declare const componentList: string[];
@@ -0,0 +1,35 @@
1
+ export { default as MazAvatar } from './MazAvatar.js';
2
+ export { default as MazBackdrop } from './MazBackdrop.js';
3
+ export { default as MazBadge } from './MazBadge.js';
4
+ export { default as MazBottomSheet } from './MazBottomSheet.js';
5
+ export { default as MazBtn } from './MazBtn.js';
6
+ export { default as MazCard } from './MazCard.js';
7
+ export { default as MazCarousel } from './MazCarousel.js';
8
+ export { default as MazChart } from './MazChart.js';
9
+ export { default as MazCheckbox } from './MazCheckbox.js';
10
+ export { default as MazDialog } from './MazDialog.js';
11
+ export { default as MazDialogPromise } from './MazDialogPromise.js';
12
+ export { default as MazDrawer } from './MazDrawer.js';
13
+ export { default as MazDropzone } from './MazDropzone.js';
14
+ export { default as MazGallery } from './MazGallery.js';
15
+ export { default as MazIcon } from './MazIcon.js';
16
+ export { default as MazInput } from './MazInput.js';
17
+ export { default as MazInputNumber } from './MazInputNumber.js';
18
+ export { default as MazInputPrice } from './MazInputPrice.js';
19
+ export { default as MazInputTags } from './MazInputTags.js';
20
+ export { default as MazLazyImg } from './MazLazyImg.js';
21
+ export { default as MazPhoneNumberInput } from './MazPhoneNumberInput.js';
22
+ export { default as MazPicker } from './MazPicker.js';
23
+ export { default as MazRadioButtons } from './MazRadioButtons.js';
24
+ export { default as MazSelect } from './MazSelect.js';
25
+ export { default as MazSlider } from './MazSlider.js';
26
+ export { default as MazSpinner } from './MazSpinner.js';
27
+ export { default as MazStepper } from './MazStepper.js';
28
+ export { default as MazSwitch } from './MazSwitch.js';
29
+ export { default as MazTabs } from './MazTabs.js';
30
+ export { default as MazTabsBar } from './MazTabsBar.js';
31
+ export { default as MazTabsContent } from './MazTabsContent.js';
32
+ export { default as MazTabsContentItem } from './MazTabsContentItem.js';
33
+ export { default as MazTextarea } from './MazTextarea.js';
34
+ export { default as MazTransitionExpand } from './MazTransitionExpand.js';
35
+ export * from './types';
@@ -0,0 +1,17 @@
1
+ export type ModelValueSimple = string | number | null | undefined | boolean;
2
+ export type MazGalleryImage = {
3
+ src: string;
4
+ alt?: string;
5
+ } | string;
6
+ export type Color = 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'white' | 'black' | 'transparent' | 'theme';
7
+ export declare const colors: Color[];
8
+ export type Size = 'mini' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
9
+ export type Position = 'top' | 'top right' | 'top left' | 'bottom' | 'bottom right' | 'bottom left' | 'left' | 'right';
10
+ export interface Source {
11
+ srcset?: string;
12
+ media?: string;
13
+ }
14
+ export interface DataImage {
15
+ sources?: Source[];
16
+ }
17
+ export type Image = DataImage | string;
package/nuxt/index.ts CHANGED
@@ -6,21 +6,35 @@ import { fileURLToPath } from 'node:url'
6
6
 
7
7
  export interface MazUiNuxtOptions {
8
8
  /**
9
- * Install the toaster plugin and enable auto import of toaster composable
9
+ * Enable auto import of main css file
10
+ * @default true
10
11
  */
11
- injectToaster?: boolean
12
+ injectCss?: boolean
12
13
  /**
13
- * Enable auto import of useCurrency composable
14
+ * Enable auto import of main css file
15
+ * @default false
14
16
  */
15
- injectUseCurrency?: boolean
17
+ injectAosCss?: boolean
16
18
  /**
17
- * Enable auto import of useTheme composable
19
+ * Install the toaster plugin and enable auto import of toaster composable
20
+ * @default false
18
21
  */
19
- injectUseThemeHandler?: boolean
22
+ injectToaster?: boolean
23
+ // /**
24
+ // * Enable auto import of useCurrency composable
25
+ // * @default false
26
+ // */
27
+ // injectUseCurrency?: boolean
20
28
  /**
21
- * install global of v-fullscreen-img directive
29
+ * Enable auto import of useTheme composable
30
+ * @default false
22
31
  */
23
- installFullscreenImgDirective?: boolean
32
+ injectUseThemeHandler?: boolean
33
+ // /**
34
+ // * install global of v-fullscreen-img directive
35
+ // * @default false
36
+ // */
37
+ // installFullscreenImgDirective?: boolean
24
38
  /**
25
39
  * Enable auto import of all components
26
40
  * @default true
@@ -57,15 +71,29 @@ export default defineNuxtModule<MazUiNuxtOptions>({
57
71
  },
58
72
  defaults: {
59
73
  devtools: true,
74
+ injectCss: true,
60
75
  injectComponents: true,
61
76
  },
77
+ // eslint-disable-next-line sonarjs/cognitive-complexity
62
78
  setup(options, nuxt) {
63
- const resolver = createResolver(import.meta.url)
79
+ const { resolve } = createResolver(import.meta.url)
64
80
 
65
81
  const moduleOptions = defu(nuxt.options.runtimeConfig.public.mazUi, options)
66
82
 
67
83
  nuxt.options.runtimeConfig.public.mazUi = moduleOptions
68
84
 
85
+ if (moduleOptions.injectCss) {
86
+ const path = process.env.MAZ_UI_DEV === 'true' ? './../css/index.css' : './../css/main.css'
87
+ nuxt.options.css = [resolve(path), ...nuxt.options.css]
88
+ }
89
+
90
+ if (moduleOptions.injectAosCss && process.env.MAZ_UI_DEV === 'true') {
91
+ // the library should be built
92
+ nuxt.options.css = [resolve('./../dist/css/aos.css'), ...nuxt.options.css]
93
+ } else if (moduleOptions.injectAosCss) {
94
+ nuxt.options.css = [resolve('./../css/aos.css'), ...nuxt.options.css]
95
+ }
96
+
69
97
  if (moduleOptions.injectComponents) {
70
98
  for (const componentName of componentList) {
71
99
  addComponent({
@@ -79,22 +107,22 @@ export default defineNuxtModule<MazUiNuxtOptions>({
79
107
  }
80
108
 
81
109
  if (moduleOptions.injectToaster) {
82
- addPlugin(resolver.resolve(_dirname, './runtime/plugins/toaster'))
110
+ addPlugin(resolve(_dirname, './runtime/plugins/toaster'))
83
111
 
84
112
  addImports({
85
- from: resolver.resolve(_dirname, './runtime/composables/use-toast'),
113
+ from: resolve(_dirname, './runtime/composables/use-toast'),
86
114
  name: 'useToast',
87
115
  as: 'useToast',
88
116
  })
89
117
  }
90
118
 
91
- if (moduleOptions.injectUseCurrency) {
92
- addImports({
93
- from: 'maz-ui',
94
- name: 'useCurrency',
95
- as: 'useCurrency',
96
- })
97
- }
119
+ // if (moduleOptions.injectUseCurrency) {
120
+ // addImports({
121
+ // from: 'maz-ui',
122
+ // name: 'useCurrency',
123
+ // as: 'useCurrency',
124
+ // })
125
+ // }
98
126
 
99
127
  if (moduleOptions.injectUseThemeHandler) {
100
128
  addImports({
@@ -104,9 +132,9 @@ export default defineNuxtModule<MazUiNuxtOptions>({
104
132
  })
105
133
  }
106
134
 
107
- if (moduleOptions.installFullscreenImgDirective) {
108
- addPlugin(resolver.resolve(_dirname, './runtime/plugins/v-fullscreen-img'))
109
- }
135
+ // if (moduleOptions.installFullscreenImgDirective) {
136
+ // addPlugin(resolve(_dirname, './runtime/plugins/v-fullscreen-img'))
137
+ // }
110
138
 
111
139
  if (options.devtools) {
112
140
  // @ts-expect-error - private API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maz-ui",
3
- "version": "3.11.4",
3
+ "version": "3.12.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.mjs",
@@ -11,7 +11,6 @@
11
11
  "default": "./modules/index.mjs",
12
12
  "types": "./types/modules/index.d.ts"
13
13
  },
14
- "./*": "./*",
15
14
  "./components": {
16
15
  "default": "./components/index.mjs",
17
16
  "types": "./types/components/index.d.ts"
@@ -27,7 +26,11 @@
27
26
  "./nuxt": {
28
27
  "default": "./nuxt/index.ts",
29
28
  "types": "./types/nuxt/index.d.ts"
30
- }
29
+ },
30
+ "./styles": "./css/main.css",
31
+ "./aos-styles": "./css/aos.css",
32
+ "./package.json": "./package.json",
33
+ "./*": "./*"
31
34
  },
32
35
  "files": [
33
36
  "components",
@@ -90,8 +93,8 @@
90
93
  "@types/google.maps": "^3.54.1",
91
94
  "@types/node": "^20.6.2",
92
95
  "@types/rollup-plugin-peer-deps-external": "^2.2.1",
93
- "@typescript-eslint/eslint-plugin": "^6.7.0",
94
- "@typescript-eslint/parser": "^6.7.0",
96
+ "@typescript-eslint/eslint-plugin": "^6.7.2",
97
+ "@typescript-eslint/parser": "^6.7.2",
95
98
  "@vitejs/plugin-vue": "^4.3.4",
96
99
  "@vitest/coverage-v8": "^0.34.4",
97
100
  "@vue/compiler-sfc": "^3.3.4",
@@ -104,7 +107,7 @@
104
107
  "chalk": "^4.1.2",
105
108
  "chart.js": "^4.4.0",
106
109
  "cross-env": "^7.0.3",
107
- "dayjs": "^1.11.9",
110
+ "dayjs": "^1.11.10",
108
111
  "defu": "^6.1.2",
109
112
  "dropzone": "^5.9.3",
110
113
  "eslint": "^8.49.0",
@@ -121,7 +124,7 @@
121
124
  "nuxt": "^3.7.3",
122
125
  "onchange": "^7.1.0",
123
126
  "path": "^0.12.7",
124
- "postcss": "^8.4.29",
127
+ "postcss": "^8.4.30",
125
128
  "postcss-html": "^1.5.0",
126
129
  "postcss-import": "^15.1.0",
127
130
  "postcss-nested": "^6.0.0",
@@ -9,7 +9,7 @@ import { screens } from './variables/breakpoints'
9
9
  import { zIndex } from './variables/z-indexes'
10
10
  import { getColors } from './utils/colors'
11
11
 
12
- export default <Config>{
12
+ export default {
13
13
  darkMode: ['class', '[class="dark"]'],
14
14
  content: [],
15
15
  theme: {
@@ -40,4 +40,4 @@ export default <Config>{
40
40
  addUtilities(utilities)
41
41
  }),
42
42
  ],
43
- }
43
+ } satisfies Config
@@ -1,20 +1,24 @@
1
1
  export interface MazUiNuxtOptions {
2
2
  /**
3
- * Install the toaster plugin and enable auto import of toaster composable
3
+ * Enable auto import of main css file
4
+ * @default true
4
5
  */
5
- injectToaster?: boolean;
6
+ injectCss?: boolean;
6
7
  /**
7
- * Enable auto import of useCurrency composable
8
+ * Enable auto import of main css file
9
+ * @default false
8
10
  */
9
- injectUseCurrency?: boolean;
11
+ injectAosCss?: boolean;
10
12
  /**
11
- * Enable auto import of useTheme composable
13
+ * Install the toaster plugin and enable auto import of toaster composable
14
+ * @default false
12
15
  */
13
- injectUseThemeHandler?: boolean;
16
+ injectToaster?: boolean;
14
17
  /**
15
- * install global of v-fullscreen-img directive
18
+ * Enable auto import of useTheme composable
19
+ * @default false
16
20
  */
17
- installFullscreenImgDirective?: boolean;
21
+ injectUseThemeHandler?: boolean;
18
22
  /**
19
23
  * Enable auto import of all components
20
24
  * @default true
@@ -1,3 +1,77 @@
1
1
  import type { Config } from 'tailwindcss';
2
- declare const _default: Config;
2
+ declare const _default: {
3
+ darkMode: ["class", string];
4
+ content: never[];
5
+ theme: {
6
+ extend: {
7
+ fontFamily: {
8
+ base: string;
9
+ };
10
+ zIndex: {
11
+ 1: string;
12
+ 2: string;
13
+ 3: string;
14
+ 4: string;
15
+ 5: string;
16
+ 15: string;
17
+ 25: string;
18
+ 35: string;
19
+ 45: string;
20
+ 75: string;
21
+ 100: string;
22
+ 'default-backdrop': string;
23
+ };
24
+ screens: {
25
+ 'mob-s': string;
26
+ 'mob-m': string;
27
+ 'mob-l': string;
28
+ 'tab-s': string;
29
+ 'tab-m': string;
30
+ 'tab-l': string;
31
+ 'lap-s': string;
32
+ 'lap-m': string;
33
+ 'lap-l': string;
34
+ 'lap-xl': string;
35
+ 'lap-2xl': string;
36
+ 'lap-3xl': string;
37
+ };
38
+ colors: {
39
+ transparent: string;
40
+ black: string;
41
+ 'black-contrast': string;
42
+ white: string;
43
+ 'white-contrast': string;
44
+ current: string;
45
+ normal: string;
46
+ color: string;
47
+ 'color-light': string;
48
+ 'color-lighter': string;
49
+ theme: string;
50
+ 'theme-hover': string;
51
+ 'bg-dark': string;
52
+ 'bg-light': string;
53
+ light: string;
54
+ dark: string;
55
+ muted: string;
56
+ overlay: string;
57
+ };
58
+ borderWidth: {
59
+ 0: string;
60
+ 1: string;
61
+ DEFAULT: string;
62
+ 2: string;
63
+ 3: string;
64
+ 4: string;
65
+ };
66
+ borderRadius: {
67
+ DEFAULT: string;
68
+ };
69
+ spacing: {};
70
+ };
71
+ };
72
+ plugins: {
73
+ handler: import("tailwindcss/types/config").PluginCreator;
74
+ config?: Partial<Config> | undefined;
75
+ }[];
76
+ };
3
77
  export default _default;