maz-ui 3.9.0 → 3.10.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 (150) hide show
  1. package/components/MazAvatar.mjs +22 -185
  2. package/components/MazAvatar.umd.js +2 -2
  3. package/components/MazBackdrop.mjs +1 -1
  4. package/components/MazBackdrop.umd.js +1 -1
  5. package/components/MazBadge.mjs +3 -3
  6. package/components/MazBadge.umd.js +2 -2
  7. package/components/MazBottomSheet.mjs +60 -33
  8. package/components/MazBottomSheet.umd.js +2 -2
  9. package/components/MazBtn.mjs +25 -20
  10. package/components/MazBtn.umd.js +2 -2
  11. package/components/MazCard.mjs +255 -231
  12. package/components/MazCard.umd.js +2 -2
  13. package/components/MazCarousel.mjs +93 -38
  14. package/components/MazCarousel.umd.js +2 -2
  15. package/components/MazChart.mjs +43 -25
  16. package/components/MazChart.umd.js +1 -2
  17. package/components/MazCheckbox.mjs +3 -3
  18. package/components/MazCheckbox.umd.js +2 -2
  19. package/components/MazDialog.mjs +61 -34
  20. package/components/MazDialog.umd.js +2 -2
  21. package/components/MazDialogPromise.mjs +75 -58
  22. package/components/MazDialogPromise.umd.js +2 -2
  23. package/components/MazDrawer.mjs +57 -30
  24. package/components/MazDrawer.umd.js +2 -2
  25. package/components/MazDropzone.mjs +4 -4
  26. package/components/MazDropzone.umd.js +2 -2
  27. package/components/MazGallery.mjs +16 -181
  28. package/components/MazGallery.umd.js +2 -2
  29. package/components/MazIcon.mjs +7 -2
  30. package/components/MazIcon.umd.js +2 -2
  31. package/components/MazInput.mjs +46 -40
  32. package/components/MazInput.umd.js +2 -2
  33. package/components/MazInputNumber.mjs +175 -125
  34. package/components/MazInputNumber.umd.js +2 -2
  35. package/components/MazInputPrice.mjs +97 -91
  36. package/components/MazInputPrice.umd.js +2 -2
  37. package/components/MazInputTags.mjs +135 -107
  38. package/components/MazInputTags.umd.js +2 -2
  39. package/components/MazLazyImg.mjs +9 -9
  40. package/components/MazLazyImg.umd.js +2 -2
  41. package/components/MazPhoneNumberInput.mjs +165 -90
  42. package/components/MazPhoneNumberInput.umd.js +2 -2
  43. package/components/MazPicker.mjs +349 -261
  44. package/components/MazPicker.umd.js +2 -2
  45. package/components/MazRadioButtons.mjs +3 -3
  46. package/components/MazRadioButtons.umd.js +2 -2
  47. package/components/MazSelect.mjs +155 -80
  48. package/components/MazSelect.umd.js +2 -2
  49. package/components/MazSlider.mjs +6 -6
  50. package/components/MazSlider.umd.js +2 -2
  51. package/components/MazSpinner.mjs +4 -4
  52. package/components/MazSpinner.umd.js +2 -2
  53. package/components/MazStepper.mjs +16 -11
  54. package/components/MazStepper.umd.js +2 -2
  55. package/components/MazSwitch.mjs +6 -6
  56. package/components/MazSwitch.umd.js +2 -2
  57. package/components/MazTabsBar.mjs +29 -24
  58. package/components/MazTabsBar.umd.js +2 -2
  59. package/components/MazTabsContent.mjs +7 -2
  60. package/components/MazTabsContent.umd.js +2 -2
  61. package/components/MazTabsContentItem.mjs +5 -5
  62. package/components/MazTabsContentItem.umd.js +2 -2
  63. package/components/MazTextarea.mjs +26 -17
  64. package/components/MazTextarea.umd.js +2 -2
  65. package/components/MazTransitionExpand.mjs +3 -3
  66. package/components/MazTransitionExpand.umd.js +2 -2
  67. package/components/assets/check-ac2fdfbb.mjs +31 -0
  68. package/components/assets/eye-ac35bb54.mjs +44 -0
  69. package/components/assets/eye-off-4a5fd13d.mjs +31 -0
  70. package/components/assets/no-photography-7a1e4d68.mjs +36 -0
  71. package/components/assets/pencil-c1aa23f9.mjs +31 -0
  72. package/modules/assets/no-photography-7a1e4d68.mjs +36 -0
  73. package/modules/{maz-ui.mjs → index.mjs} +130 -191
  74. package/modules/index.umd.js +2 -0
  75. package/nuxt/index.ts +130 -0
  76. package/nuxt/runtime/composables/use-toast.ts +8 -0
  77. package/nuxt/runtime/plugins/toaster.ts +26 -0
  78. package/package.json +91 -62
  79. package/tailwindcss/{tailwind.config.js → tailwind.config.ts} +13 -9
  80. package/tailwindcss/tailwind.css +4 -0
  81. package/tailwindcss/utils/colors.ts +20 -0
  82. package/tailwindcss/variables/{breakpoints.js → breakpoints.ts} +1 -1
  83. package/tailwindcss/variables/colors.ts +44 -0
  84. package/tailwindcss/variables/{utilities.js → utilities.ts} +1 -1
  85. package/tailwindcss/variables/{z-indexes.js → z-indexes.ts} +1 -1
  86. package/components/MazAvatar.d.ts +0 -161
  87. package/components/MazBackdrop.d.ts +0 -92
  88. package/components/MazBadge.d.ts +0 -78
  89. package/components/MazBottomSheet.d.ts +0 -41
  90. package/components/MazBtn.d.ts +0 -183
  91. package/components/MazCard.d.ts +0 -199
  92. package/components/MazCarousel.d.ts +0 -29
  93. package/components/MazChart.d.ts +0 -22
  94. package/components/MazCheckbox.d.ts +0 -59
  95. package/components/MazDialog.d.ts +0 -96
  96. package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +0 -30
  97. package/components/MazDialogPromise.d.ts +0 -77
  98. package/components/MazDrawer.d.ts +0 -74
  99. package/components/MazDropzone.d.ts +0 -129
  100. package/components/MazGallery.d.ts +0 -126
  101. package/components/MazIcon.d.ts +0 -65
  102. package/components/MazInput.d.ts +0 -277
  103. package/components/MazInputNumber.d.ts +0 -66
  104. package/components/MazInputPrice.d.ts +0 -74
  105. package/components/MazInputTags.d.ts +0 -95
  106. package/components/MazLazyImg.d.ts +0 -82
  107. package/components/MazPhoneNumberInput/constantes/locales.d.ts +0 -12
  108. package/components/MazPhoneNumberInput/types.d.ts +0 -21
  109. package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +0 -2
  110. package/components/MazPhoneNumberInput/utils/index.d.ts +0 -12
  111. package/components/MazPhoneNumberInput.d.ts +0 -254
  112. package/components/MazPicker/MazPickerCalendar.vue.d.ts +0 -136
  113. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +0 -21
  114. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +0 -113
  115. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +0 -123
  116. package/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +0 -37
  117. package/components/MazPicker/MazPickerContainer.vue.d.ts +0 -211
  118. package/components/MazPicker/MazPickerFooter.vue.d.ts +0 -17
  119. package/components/MazPicker/MazPickerHeader.vue.d.ts +0 -83
  120. package/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +0 -42
  121. package/components/MazPicker/MazPickerShortcuts.vue.d.ts +0 -61
  122. package/components/MazPicker/MazPickerTime.vue.d.ts +0 -128
  123. package/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +0 -34
  124. package/components/MazPicker/types.d.ts +0 -15
  125. package/components/MazPicker/utils.d.ts +0 -54
  126. package/components/MazPicker.d.ts +0 -312
  127. package/components/MazRadioButtons.d.ts +0 -82
  128. package/components/MazSelect.d.ts +0 -191
  129. package/components/MazSlider/utils.d.ts +0 -15
  130. package/components/MazSlider.d.ts +0 -95
  131. package/components/MazSpinner.d.ts +0 -29
  132. package/components/MazStepper.d.ts +0 -119
  133. package/components/MazSwitch.d.ts +0 -55
  134. package/components/MazTabsBar.d.ts +0 -48
  135. package/components/MazTabsContent.d.ts +0 -26
  136. package/components/MazTabsContentItem.d.ts +0 -24
  137. package/components/MazTextarea/textarea-autogrow.d.ts +0 -9
  138. package/components/MazTextarea.d.ts +0 -124
  139. package/components/MazTransitionExpand.d.ts +0 -14
  140. package/components/assets/no-photography-584c6185.mjs +0 -4
  141. package/components/index.d.ts +0 -33
  142. package/components/index.mjs +0 -35
  143. package/components/types.d.ts +0 -17
  144. package/css/aos.css +0 -1
  145. package/css/main.css +0 -1
  146. package/maz-ui.d.ts +0 -318
  147. package/modules/assets/no-photography-584c6185.mjs +0 -4
  148. package/modules/maz-ui.umd.js +0 -2
  149. package/tailwindcss/utils/colors.js +0 -26
  150. package/tailwindcss/variables/colors.js +0 -44
package/nuxt/index.ts ADDED
@@ -0,0 +1,130 @@
1
+ import { defineNuxtModule, addPlugin, createResolver, addImports, addComponent } from '@nuxt/kit'
2
+ import { defu } from 'defu'
3
+ import { componentList } from '../components/component-list'
4
+ import { dirname } from 'node:path'
5
+ import { fileURLToPath } from 'node:url'
6
+
7
+ export interface MazUiNuxtOptions {
8
+ /**
9
+ * Install the toaster plugin and enable auto import of toaster composable
10
+ */
11
+ injectToaster?: boolean
12
+ /**
13
+ * Enable auto import of useCurrency composable
14
+ */
15
+ injectUseCurrency?: boolean
16
+ /**
17
+ * Enable auto import of useTheme composable
18
+ */
19
+ injectUseTheme?: boolean
20
+ /**
21
+ * install global of v-fullscreen-img directive
22
+ */
23
+ installFullscreenImgDirective?: boolean
24
+ /**
25
+ * Enable auto import of all components
26
+ * @default true
27
+ */
28
+ injectComponents?: boolean
29
+ /**
30
+ * Enable Nuxt Devtools integration
31
+ * @default true
32
+ */
33
+ devtools?: boolean
34
+ }
35
+
36
+ declare module '@nuxt/schema' {
37
+ interface PublicRuntimeConfig {
38
+ mazUi?: MazUiNuxtOptions
39
+ }
40
+ interface NuxtConfig {
41
+ mazUi?: MazUiNuxtOptions
42
+ }
43
+ interface NuxtOptions {
44
+ mazUi?: MazUiNuxtOptions
45
+ }
46
+ }
47
+
48
+ const _dirname = dirname(fileURLToPath(import.meta.url))
49
+
50
+ export default defineNuxtModule<MazUiNuxtOptions>({
51
+ meta: {
52
+ name: 'maz-ui/nuxt',
53
+ configKey: 'mazUi',
54
+ compatibility: {
55
+ nuxt: '^3.0.0',
56
+ },
57
+ },
58
+ defaults: {
59
+ devtools: true,
60
+ injectComponents: true,
61
+ },
62
+ setup(options, nuxt) {
63
+ const resolver = createResolver(import.meta.url)
64
+
65
+ const moduleOptions = defu(nuxt.options.runtimeConfig.public.mazUi, options)
66
+
67
+ nuxt.options.runtimeConfig.public.mazUi = moduleOptions
68
+
69
+ if (moduleOptions.injectComponents) {
70
+ for (const componentName of componentList) {
71
+ addComponent({
72
+ name: componentName,
73
+ filePath:
74
+ process.env.NODE_ENV === 'prodution'
75
+ ? `maz-ui/components/${componentName}`
76
+ : `maz-ui/components/${componentName}.vue`,
77
+ })
78
+ }
79
+ }
80
+
81
+ if (moduleOptions.injectToaster) {
82
+ addPlugin(resolver.resolve(_dirname, './runtime/plugins/toaster'))
83
+
84
+ addImports({
85
+ from: resolver.resolve(_dirname, './runtime/composables/use-toast'),
86
+ name: 'useToast',
87
+ as: 'useToast',
88
+ })
89
+ }
90
+
91
+ if (moduleOptions.injectUseCurrency) {
92
+ addImports({
93
+ from: 'maz-ui',
94
+ name: 'useCurrency',
95
+ as: 'useCurrency',
96
+ })
97
+ }
98
+
99
+ if (moduleOptions.injectUseTheme) {
100
+ addImports({
101
+ from: 'maz-ui',
102
+ name: 'useTheme',
103
+ as: 'useTheme',
104
+ })
105
+ }
106
+
107
+ if (moduleOptions.installFullscreenImgDirective) {
108
+ addPlugin(resolver.resolve(_dirname, './runtime/plugins/v-fullscreen-img'))
109
+ }
110
+
111
+ if (options.devtools) {
112
+ // @ts-expect-error - private API
113
+ nuxt.hook('devtools:customTabs', (iframeTabs) => {
114
+ iframeTabs.push({
115
+ // unique identifier
116
+ name: 'maz-ui',
117
+ // title to display in the tab
118
+ title: 'maz-ui',
119
+ // any icon from Iconify, or a URL to an image
120
+ icon: 'https://louismazel.github.io/maz-ui-3/img/icons/android-chrome-512x512.png',
121
+ // iframe view
122
+ view: {
123
+ type: 'iframe',
124
+ src: 'https://louismazel.github.io/maz-ui-3',
125
+ },
126
+ })
127
+ })
128
+ }
129
+ },
130
+ })
@@ -0,0 +1,8 @@
1
+ import type { ToasterHandler } from './../../../modules'
2
+ import { useNuxtApp } from 'nuxt/app'
3
+
4
+ export function useToast() {
5
+ const { $toast } = useNuxtApp()
6
+
7
+ return $toast as ToasterHandler
8
+ }
@@ -0,0 +1,26 @@
1
+ import { ToasterHandler } from './../../../modules'
2
+ import { defineNuxtPlugin } from 'nuxt/app'
3
+
4
+ export default defineNuxtPlugin(({ vueApp }) => {
5
+ const instance = new ToasterHandler(vueApp, {
6
+ position: 'top',
7
+ timeout: 10_000,
8
+ persistent: false,
9
+ })
10
+
11
+ /* eslint-disable @typescript-eslint/no-empty-function */
12
+ const toasterServer = {
13
+ show: () => {},
14
+ success: () => {},
15
+ error: () => {},
16
+ warning: () => {},
17
+ info: () => {},
18
+ } as unknown as ToasterHandler
19
+ /* eslint-enable @typescript-eslint/no-empty-function */
20
+
21
+ return {
22
+ provide: {
23
+ toast: (process.client ? instance : toasterServer) as ToasterHandler,
24
+ },
25
+ }
26
+ })
package/package.json CHANGED
@@ -1,19 +1,27 @@
1
1
  {
2
2
  "name": "maz-ui",
3
- "version": "3.9.0",
3
+ "version": "3.10.0",
4
4
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
5
5
  "author": "Louis Mazel <me@loicmazuel.com>",
6
- "main": "modules/maz-ui.umd.js",
7
- "module": "modules/maz-ui.mjs",
8
- "types": "maz-ui.d.ts",
6
+ "main": "./modules/index.mjs",
7
+ "module": "./modules/index.mjs",
8
+ "types": "./modules/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "default": "./modules/index.mjs",
12
+ "types": "./modules/index.d.ts"
13
+ },
14
+ "./*": "./*",
15
+ "./components": "./components/index.mjs",
16
+ "./components/*": "./components/*",
17
+ "./nuxt": "./nuxt/index.ts"
18
+ },
9
19
  "files": [
10
20
  "components",
11
21
  "modules",
12
22
  "css",
13
- "maz-ui.d.ts",
14
- "tailwindcss/tailwind.config.js",
15
- "tailwindcss/utils",
16
- "tailwindcss/variables"
23
+ "tailwindcss",
24
+ "nuxt"
17
25
  ],
18
26
  "lint-staged": {
19
27
  "*": "prettier -w -u",
@@ -21,10 +29,13 @@
21
29
  "*.{vue,css,scss,postcss,pcss}": "stylelint --fix"
22
30
  },
23
31
  "peerDependencies": {
32
+ "@nuxt/kit": "^3.4.0",
24
33
  "chart.js": "^4.0.0",
25
34
  "dayjs": "^1.1.0",
35
+ "defu": "^6.0.0",
26
36
  "dropzone": "^5.9.3",
27
37
  "libphonenumber-js": "^1.9.44",
38
+ "nuxt": "^3.4.0",
28
39
  "vue": "^3.0.0",
29
40
  "vue-router": "^4.0.0"
30
41
  },
@@ -43,82 +54,96 @@
43
54
  },
44
55
  "dayjs": {
45
56
  "optional": true
57
+ },
58
+ "nuxt": {
59
+ "optional": true
60
+ },
61
+ "@nuxt/kit": {
62
+ "optional": true
63
+ },
64
+ "defu": {
65
+ "optional": true
46
66
  }
47
67
  },
48
68
  "devDependencies": {
49
- "@babel/core": "^7.21.4",
50
- "@babel/preset-env": "^7.21.4",
51
- "@babel/preset-typescript": "^7.21.4",
52
- "@rollup/plugin-typescript": "^11.1.0",
69
+ "@babel/core": "^7.22.11",
70
+ "@babel/preset-env": "^7.22.14",
71
+ "@babel/preset-typescript": "^7.22.11",
72
+ "@nuxt/kit": "^3.7.0",
73
+ "@nuxt/schema": "^3.7.0",
74
+ "@rollup/plugin-typescript": "^11.1.3",
53
75
  "@types/dropzone": "^5.7.4",
54
- "@types/google.maps": "^3.52.6",
55
- "@types/node": "^18.16.0",
76
+ "@types/google.maps": "^3.54.0",
77
+ "@types/node": "^20.5.8",
56
78
  "@types/rollup-plugin-peer-deps-external": "^2.2.1",
57
- "@typescript-eslint/eslint-plugin": "^5.59.1",
58
- "@typescript-eslint/parser": "^5.59.1",
59
- "@vitejs/plugin-vue": "^4.1.0",
60
- "@vitest/coverage-c8": "^0.30.1",
61
- "@vue/compiler-sfc": "^3.2.39",
62
- "@vue/eslint-config-prettier": "^7.0.0",
63
- "@vue/eslint-config-typescript": "^11.0.1",
64
- "@vue/test-utils": "^2.3.2",
65
- "@vue/tsconfig": "^0.3.2",
66
- "autoprefixer": "^10.4.14",
67
- "c8": "^7.12.0",
79
+ "@typescript-eslint/eslint-plugin": "^6.5.0",
80
+ "@typescript-eslint/parser": "^6.5.0",
81
+ "@vitejs/plugin-vue": "^4.3.4",
82
+ "@vitest/coverage-v8": "^0.34.3",
83
+ "@vue/compiler-sfc": "^3.3.4",
84
+ "@vue/eslint-config-prettier": "^8.0.0",
85
+ "@vue/eslint-config-typescript": "^11.0.3",
86
+ "@vue/test-utils": "^2.4.1",
87
+ "@vue/tsconfig": "^0.4.0",
88
+ "autoprefixer": "^10.4.15",
89
+ "c8": "^8.0.1",
68
90
  "chalk": "^4.1.2",
69
- "chart.js": "^4.2.1",
91
+ "chart.js": "^4.4.0",
70
92
  "cross-env": "^7.0.3",
71
- "dayjs": "^1.11.7",
93
+ "dayjs": "^1.11.9",
94
+ "defu": "^6.1.2",
72
95
  "dropzone": "^5.9.3",
73
- "eslint": "^8.39.0",
74
- "eslint-plugin-prettier": "^4.2.1",
75
- "eslint-plugin-sonarjs": "^0.19.0",
76
- "eslint-plugin-unicorn": "^46.0.0",
77
- "eslint-plugin-vue": "^9.11.0",
96
+ "eslint": "^8.48.0",
97
+ "eslint-plugin-prettier": "^5.0.0",
98
+ "eslint-plugin-sonarjs": "^0.21.0",
99
+ "eslint-plugin-unicorn": "^48.0.1",
100
+ "eslint-plugin-vue": "^9.17.0",
78
101
  "fs": "0.0.2",
79
- "jsdom": "^21.1.1",
102
+ "jsdom": "^22.1.0",
80
103
  "json-templater": "^1.2.0",
81
- "libphonenumber-js": "^1.10.28",
82
- "lint-staged": "^13.2.1",
104
+ "libphonenumber-js": "^1.10.43",
105
+ "lint-staged": "^14.0.1",
83
106
  "minimist": "^1.2.8",
107
+ "nuxt": "^3.7.0",
84
108
  "onchange": "^7.1.0",
85
109
  "path": "^0.12.7",
86
- "postcss": "^8.4.23",
110
+ "postcss": "^8.4.29",
87
111
  "postcss-html": "^1.5.0",
88
112
  "postcss-import": "^15.1.0",
89
113
  "postcss-nested": "^6.0.0",
90
114
  "postcss-simple-vars": "^7.0.1",
91
115
  "postcss-url": "^10.1.3",
92
- "prettier": "^2.8.8",
93
- "prettier-plugin-tailwindcss": "^0.2.7",
94
- "replace-in-file": "^6.3.5",
95
- "rimraf": "^5.0.0",
96
- "rollup": "^3.21.0",
97
- "rollup-plugin-dts": "^5.3.0",
116
+ "prettier": "^3.0.3",
117
+ "prettier-plugin-tailwindcss": "^0.5.4",
118
+ "replace-in-file": "^7.0.1",
119
+ "rimraf": "^5.0.1",
120
+ "rollup": "^3.28.1",
121
+ "rollup-plugin-dts": "^6.0.1",
98
122
  "rollup-plugin-peer-deps-external": "^2.2.4",
99
- "sass": "^1.62.0",
100
- "semver": "^7.5.0",
101
- "stylelint": "^15.6.0",
102
- "stylelint-config-recommended-vue": "^1.4.0",
103
- "stylelint-config-standard": "^33.0.0",
104
- "stylelint-config-standard-scss": "^9.0.0",
123
+ "sass": "^1.66.1",
124
+ "semver": "^7.5.4",
125
+ "sirv": "^2.0.3",
126
+ "stylelint": "^15.10.3",
127
+ "stylelint-config-recommended-vue": "^1.5.0",
128
+ "stylelint-config-standard": "^34.0.0",
129
+ "stylelint-config-standard-scss": "^10.0.0",
105
130
  "stylelint-config-tailwindcss": "^0.0.7",
106
131
  "tailwind-css-variables": "^3.0.1",
107
- "tailwindcss": "^3.3.1",
108
- "terser": "^5.17.1",
132
+ "tailwindcss": "^3.3.3",
133
+ "terser": "^5.19.3",
109
134
  "ts-node": "^10.9.1",
110
- "typescript": "^5.0.4",
111
- "vite": "^4.3.1",
112
- "vite-plugin-css-injected-by-js": "^3.1.0",
113
- "vite-plugin-static-copy": "^0.14.0",
135
+ "typescript": "^5.2.2",
136
+ "vite": "^4.4.9",
137
+ "vite-plugin-css-injected-by-js": "^3.3.0",
138
+ "vite-plugin-static-copy": "^0.17.0",
114
139
  "vite-svg-loader": "^4.0.0",
115
- "vitest": "^0.30.1",
116
- "vitest-canvas-mock": "^0.2.2",
117
- "vue": "^3.2.45",
140
+ "vitest": "^0.34.3",
141
+ "vitest-canvas-mock": "^0.3.3",
142
+ "vue": "^3.3.4",
118
143
  "vue-chartjs": "^5.2.0",
119
- "vue-loader": "^17.0.1",
120
- "vue-router": "^4.1.6",
121
- "vue-tsc": "^1.4.4",
144
+ "vue-loader": "^17.2.2",
145
+ "vue-router": "^4.2.4",
146
+ "vue-tsc": "^1.8.8",
122
147
  "vuedraggable": "^2.24.3"
123
148
  },
124
149
  "engines": {
@@ -136,7 +161,11 @@
136
161
  "vue-component",
137
162
  "framework",
138
163
  "library",
139
- "ui"
164
+ "ui",
165
+ "nuxt",
166
+ "nuxt3",
167
+ "module",
168
+ "nuxt-module"
140
169
  ],
141
170
  "repository": {
142
171
  "type": "git",
@@ -144,7 +173,7 @@
144
173
  },
145
174
  "license": "MIT",
146
175
  "scripts": {
147
- "lint": "npm run lint:js && npm run lint:style",
176
+ "lint": "pnpm lint:js && pnpm lint:style",
148
177
  "lint:nofix": "cross-env NODE_ENV=production eslint --ext .ts,.js,.vue .",
149
178
  "lint:js": "cross-env NODE_ENV=production eslint --fix --ext .ts,.js,.vue .",
150
179
  "lint:style": "stylelint --fix \"./**/*.{vue,css,scss,postcss,pcss}\"",
@@ -1,24 +1,28 @@
1
1
  // @ts-check
2
2
 
3
3
  // Tailwind CSS configuration (https://tailwindcss.com/docs/configuration)
4
- const plugin = require('tailwindcss/plugin')
4
+ import plugin from 'tailwindcss/plugin'
5
+ import type { Config } from 'tailwindcss'
5
6
 
6
- const { utilities } = require('./variables/utilities')
7
- const { screens } = require('./variables/breakpoints')
8
- const { zIndex } = require('./variables/z-indexes')
9
- const { colors } = require('./utils/colors')
7
+ import { utilities } from './variables/utilities'
8
+ import { screens } from './variables/breakpoints'
9
+ import { zIndex } from './variables/z-indexes'
10
+ import { getColors } from './utils/colors'
10
11
 
11
- module.exports = {
12
+ import tailwindCSSVariable from 'tailwind-css-variables'
13
+
14
+ export default <Config>{
12
15
  darkMode: 'class',
16
+ content: [],
13
17
  theme: {
14
18
  extend: {
15
- backgroundColor: ['even', 'odd'],
19
+ // backgroundColor: ['even', 'odd'],
16
20
  fontFamily: {
17
21
  base: 'var(--maz-font-family)',
18
22
  },
19
23
  zIndex,
20
24
  screens,
21
- colors: colors(),
25
+ colors: getColors(),
22
26
  borderWidth: {
23
27
  0: '0',
24
28
  1: '1px',
@@ -34,7 +38,7 @@ module.exports = {
34
38
  },
35
39
  },
36
40
  plugins: [
37
- require('tailwind-css-variables')({
41
+ tailwindCSSVariable({
38
42
  colors: false,
39
43
  screens: 'screen',
40
44
  fontFamily: false,
@@ -0,0 +1,4 @@
1
+ @import './../modules/css/index.css';
2
+ @tailwind base;
3
+ @tailwind components;
4
+ @tailwind utilities;
@@ -0,0 +1,20 @@
1
+ /* eslint-disable unicorn/prefer-module */
2
+ import { baseColors, variations, variatingColors } from '../variables/colors'
3
+
4
+ export function getColors() {
5
+ const colors = {
6
+ ...baseColors,
7
+ }
8
+
9
+ for (const color of Object.keys(variatingColors)) {
10
+ colors[color] = variations.reduce((colorVariations, variation) => {
11
+ colorVariations[variation] =
12
+ variation === 'DEFAULT'
13
+ ? `var(--maz-color-${color})`
14
+ : `var(--maz-color-${color}-${variation})`
15
+ return colorVariations
16
+ }, {})
17
+ }
18
+
19
+ return colors
20
+ }
@@ -1,4 +1,4 @@
1
- exports.screens = {
1
+ export const screens = {
2
2
  'mob-s': '320px',
3
3
  'mob-m': '425px',
4
4
  'mob-l': '576px',
@@ -0,0 +1,44 @@
1
+ /* eslint-disable unicorn/prefer-module */
2
+ export const baseColors = {
3
+ transparent: 'transparent',
4
+ black: 'var(--maz-color-black)',
5
+ 'black-contrast': 'var(--maz-color-black-contrast)',
6
+ white: 'var(--maz-color-white)',
7
+ 'white-contrast': 'var(--maz-color-white-contrast)',
8
+ current: 'currentColor',
9
+ normal: 'var(--maz-color-text)',
10
+ color: 'var(--maz-color-bg)',
11
+ 'color-light': 'var(--maz-color-bg-light)',
12
+ 'color-lighter': 'var(--maz-color-bg-lighter)',
13
+ 'bg-dark': 'var(--maz-bg-color-dark)',
14
+ 'bg-light': 'var(--maz-bg-color-light)',
15
+ light: 'var(--maz-color-text-light)',
16
+ dark: 'var(--maz-color-text-dark)',
17
+ muted: 'var(--maz-color-muted)',
18
+ overlay: 'var(--maz-bg-overlay)',
19
+ }
20
+
21
+ export const variations = [
22
+ 'DEFAULT',
23
+ 50,
24
+ 100,
25
+ 200,
26
+ 300,
27
+ 400,
28
+ 600,
29
+ 700,
30
+ 800,
31
+ 900,
32
+ 'contrast',
33
+ 'alpha',
34
+ 'alpha-20',
35
+ ]
36
+
37
+ export const variatingColors = {
38
+ primary: true,
39
+ secondary: true,
40
+ info: true,
41
+ success: true,
42
+ warning: true,
43
+ danger: true,
44
+ }
@@ -1,4 +1,4 @@
1
- exports.utilities = {
1
+ export const utilities = {
2
2
  '.padded-container': {
3
3
  width: '100%',
4
4
  'padding-left': 'var(--maz-container-padding)',
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable unicorn/prefer-module */
2
- exports.zIndex = {
2
+ export const zIndex = {
3
3
  1: '1',
4
4
  2: '2',
5
5
  3: '3',