winduum 2.0.2 → 2.0.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "winduum",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "type": "module",
5
5
  "types": "types/index.d.ts",
6
6
  "main": "plugin/index.cjs",
@@ -19,28 +19,28 @@
19
19
  "publish-next": "npm publish --tag next"
20
20
  },
21
21
  "devDependencies": {
22
- "@floating-ui/dom": "^1.6.11",
22
+ "@floating-ui/dom": "^1.6.12",
23
23
  "@stylistic/stylelint-config": "^2.0.0",
24
24
  "@tailwindcss/container-queries": "^0.1.1",
25
- "@vitejs/plugin-vue": "^5.1.4",
25
+ "@vitejs/plugin-vue": "^5.2.0",
26
26
  "autoprefixer": "^10.4.20",
27
- "css-has-pseudo": "^7.0.0",
27
+ "css-has-pseudo": "^7.0.1",
28
28
  "dts-buddy": "^0.5.3",
29
- "eslint": "^9.12.0",
29
+ "eslint": "^9.14.0",
30
30
  "fast-glob": "^3.3.2",
31
- "neostandard": "^0.11.6",
32
- "postcss": "^8.4.47",
33
- "postcss-custom-media": "^11.0.2",
31
+ "neostandard": "^0.11.8",
32
+ "postcss": "^8.4.49",
33
+ "postcss-custom-media": "^11.0.5",
34
34
  "postcss-import": "^16.1.0",
35
- "postcss-nesting": "^13.0.0",
35
+ "postcss-nesting": "^13.0.1",
36
36
  "slide-element": "^2.3.1",
37
- "stylelint": "^16.9.0",
37
+ "stylelint": "^16.10.0",
38
38
  "stylelint-config-standard": "^36.0.1",
39
- "tailwindcss": "^3.4.13",
39
+ "tailwindcss": "^3.4.15",
40
40
  "tailwindcss-animate": "^1.0.7",
41
41
  "typescript": "^5",
42
- "vite": "^5.4.8",
43
- "vue": "^3.5.11"
42
+ "vite": "^5.4.11",
43
+ "vue": "^3.5.12"
44
44
  },
45
45
  "files": [
46
46
  "index.js",
package/plugin/index.cjs CHANGED
@@ -164,7 +164,7 @@ const tailwindParseVariables = (type, file, customValues = {}, customPath, initi
164
164
  const fileContent = node_fs.readFileSync(file).toString();
165
165
  const values = parseFile(fileContent);
166
166
 
167
- if (customPath) {
167
+ if (customPath && !Array.isArray(customPath)) {
168
168
  const customFileContent = node_fs.readFileSync(node_path.resolve(process.cwd(), customPath)).toString();
169
169
  customValues = { ...customValues, ...parseFile(customFileContent) };
170
170
  }
@@ -298,10 +298,10 @@ const createPlugin = (userConfig = {}) => {
298
298
  ...tailwindVariables('color', userConfig.colors ?? [])
299
299
  }, userConfig.colors)), settings.colorMix, settings.rgb),
300
300
  fontSize: tailwindParseVariables('font-size', relativePath('../src/theme/config/font.css'), {
301
- ...tailwindVariables('font-weight', userConfig.fontSize ?? [])
301
+ ...tailwindVariables('font-size', userConfig.fontSize ?? [])
302
302
  }, userConfig.fontSize),
303
303
  fontFamily: tailwindParseVariables('font-family', relativePath('../src/theme/config/font.css'), {
304
- ...tailwindVariables('font-weight', userConfig.fontFamily ?? [])
304
+ ...tailwindVariables('font-family', userConfig.fontFamily ?? [])
305
305
  }, userConfig.fontFamily),
306
306
  fontWeight: tailwindParseVariables('font-weight', relativePath('../src/theme/config/font.css'), {
307
307
  ...tailwindVariables('font-weight', userConfig.fontWeight ?? [])
package/plugin/index.js CHANGED
@@ -92,10 +92,10 @@ export const createPlugin = (userConfig = {}) => {
92
92
  ...tailwindVariables('color', userConfig.colors ?? [])
93
93
  }, userConfig.colors)), settings.colorMix, settings.rgb),
94
94
  fontSize: tailwindParseVariables('font-size', relativePath('../src/theme/config/font.css'), {
95
- ...tailwindVariables('font-weight', userConfig.fontSize ?? [])
95
+ ...tailwindVariables('font-size', userConfig.fontSize ?? [])
96
96
  }, userConfig.fontSize),
97
97
  fontFamily: tailwindParseVariables('font-family', relativePath('../src/theme/config/font.css'), {
98
- ...tailwindVariables('font-weight', userConfig.fontFamily ?? [])
98
+ ...tailwindVariables('font-family', userConfig.fontFamily ?? [])
99
99
  }, userConfig.fontFamily),
100
100
  fontWeight: tailwindParseVariables('font-weight', relativePath('../src/theme/config/font.css'), {
101
101
  ...tailwindVariables('font-weight', userConfig.fontWeight ?? [])
@@ -67,7 +67,7 @@ export const tailwindParseVariables = (type, file, customValues = {}, customPath
67
67
  const fileContent = readFileSync(file).toString()
68
68
  const values = parseFile(fileContent)
69
69
 
70
- if (customPath) {
70
+ if (customPath && !Array.isArray(customPath)) {
71
71
  const customFileContent = readFileSync(resolve(process.cwd(), customPath)).toString()
72
72
  customValues = { ...customValues, ...parseFile(customFileContent) }
73
73
  }
@@ -6,20 +6,24 @@
6
6
  export const validateForm = (event, options = {}) => {
7
7
  options = {
8
8
  validateSelectors: '.x-control, .x-check, .x-switch, .x-rating, .x-color',
9
- validateOptions: {},
9
+ validateOptions: {
10
+ validate: true
11
+ },
10
12
  submitterLoadingAttribute: 'data-loading',
11
13
  scrollOptions: { behavior: 'smooth', block: 'center' },
12
14
  ...options
13
15
  }
14
16
 
15
- if (!event.target.checkValidity()) {
16
- event.preventDefault()
17
- event.stopImmediatePropagation()
17
+ if (options.validateOptions.validate) {
18
+ if (!event.target.checkValidity()) {
19
+ event.preventDefault()
20
+ event.stopImmediatePropagation()
18
21
 
19
- event.target.querySelector(':invalid').scrollIntoView(options.scrollOptions)
20
- event.target.querySelector(':invalid').focus()
21
- } else {
22
- event?.submitter?.setAttribute(options.submitterLoadingAttribute, '')
22
+ event.target.querySelector(':invalid').scrollIntoView(options.scrollOptions)
23
+ event.target.querySelector(':invalid').focus()
24
+ } else {
25
+ event?.submitter?.setAttribute(options.submitterLoadingAttribute, '')
26
+ }
23
27
  }
24
28
 
25
29
  event.target.querySelectorAll(options.validateSelectors).forEach((element) => {