vueless 0.0.420 → 0.0.422

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.
@@ -24,7 +24,7 @@ import {
24
24
  /**
25
25
  * Merging component configs in a given sequence (bigger number = bigger priority):
26
26
  * 1. Default component config
27
- * 2. Custom global component config (/vueless.config.js)
27
+ * 2. Custom global component config (/vueless.config.{js,ts})
28
28
  * 3. Component config (:config="{...}" props)
29
29
  * 4. Component classes (class="...")
30
30
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.420",
3
+ "version": "0.0.422",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -53,7 +53,7 @@
53
53
  "@release-it/bumper": "^6.0.1",
54
54
  "@vitejs/plugin-vue": "^5.0.5",
55
55
  "@vue/eslint-config-prettier": "^9.0.0",
56
- "@vueless/plugin-vite": "^0.0.67",
56
+ "@vueless/plugin-vite": "^0.0.68",
57
57
  "@vueless/storybook": "^0.0.34",
58
58
  "@vueless/web-types": "^0.0.15",
59
59
  "autoprefixer": "^10.4.19",
@@ -17,8 +17,8 @@ const isStrategyOverride = process.env.VUELESS_STRATEGY === "override";
17
17
  export const vuelessContent = [
18
18
  "./vueless.config.{js,ts}",
19
19
  "./node_modules/vueless/**/*.{js,ts,vue}",
20
- ...(isStrategyOverride ? ["!./src/**/ui.*/config.js"] : []), // only for vueless env
21
- ...(isStrategyOverride ? ["!./node_modules/vueless/**/ui.*/config.js"] : []),
20
+ ...(isStrategyOverride ? ["!./src/**/ui.*/config.{js,ts}"] : []), // only for vueless env
21
+ ...(isStrategyOverride ? ["!./node_modules/vueless/**/ui.*/config.{js,ts}"] : []),
22
22
  ];
23
23
 
24
24
  /**
@@ -22,19 +22,23 @@
22
22
  <slot name="left" />
23
23
  </template>
24
24
 
25
- <template #left-icon>
26
- <!-- @slot Use it add an icon before the date. -->
27
- <slot name="left-icon" />
25
+ <template #left-icon="{ iconName, iconSize }">
26
+ <!--
27
+ @slot Use it add an icon before the date.
28
+ @binding {string} iconName
29
+ @binding {string} iconSize
30
+ -->
31
+ <slot name="left-icon" :icon-name="iconName" :icon-size="iconSize" />
28
32
  </template>
29
33
 
30
- <template #right-icon>
34
+ <template #right-icon="{ iconName, iconSize }">
31
35
  <!--
32
36
  @slot Use it add an icon after the date.
33
- @binding {string} icon-name
34
- @binding {string} icon-size
37
+ @binding {string} iconName
38
+ @binding {string} iconSize
35
39
  -->
36
- <slot name="right-icon" :icon-name="rightIcon" :icon-size="size">
37
- <UIcon :name="rightIcon" :size="size" color="gray" />
40
+ <slot name="right-icon" :icon-name="iconName" :icon-size="iconSize">
41
+ <UIcon :name="iconName" :size="iconSize" color="gray" />
38
42
  </slot>
39
43
  </template>
40
44
 
@@ -24,8 +24,8 @@
24
24
  >
25
25
  <!--
26
26
  @slot Use it to add icon before the text.
27
- @binding {string} icon-name
28
- @binding {string} icon-size
27
+ @binding {string} iconName
28
+ @binding {string} iconSize
29
29
  -->
30
30
  <slot name="left-icon" :icon-name="leftIcon" :icon-size="iconSize">
31
31
  <UIcon
package/utils/utilUI.js CHANGED
@@ -20,8 +20,13 @@ if (isSSR) {
20
20
  /* Load Vueless config from the project root in IIFE (no top-level await). */
21
21
  (async () => {
22
22
  try {
23
- // eslint-disable-next-line prettier/prettier
24
- vuelessConfig = (await import(/* @vite-ignore */ `${process.cwd()}/vueless.config.js`)).default;
23
+ const filePath = `${process.cwd()}/vueless.config`;
24
+
25
+ vuelessConfig = (await import(/* @vite-ignore */ `${filePath}.js`)).default;
26
+
27
+ if (!vuelessConfig) {
28
+ vuelessConfig = (await import(/* @vite-ignore */ `${filePath}.ts`)).default;
29
+ }
25
30
  } catch (error) {
26
31
  vuelessConfig = {};
27
32
  }
@@ -30,8 +35,9 @@ if (isSSR) {
30
35
 
31
36
  if (isCSR) {
32
37
  vuelessConfig =
33
- Object.values(import.meta.glob("/vueless.config.js", { eager: true, import: "default" }))[0] ||
34
- {};
38
+ Object.values(
39
+ import.meta.glob("/vueless.config.{js,ts}", { eager: true, import: "default" }),
40
+ )[0] || {};
35
41
  }
36
42
 
37
43
  /**
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.420",
4
+ "version": "0.0.422",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -2550,7 +2550,16 @@
2550
2550
  },
2551
2551
  {
2552
2552
  "name": "left-icon",
2553
- "description": "Use it add an icon before the date."
2553
+ "scoped": true,
2554
+ "description": "Use it add an icon before the date.",
2555
+ "bindings": [
2556
+ {
2557
+ "name": "icon-name"
2558
+ },
2559
+ {
2560
+ "name": "icon-size"
2561
+ }
2562
+ ]
2554
2563
  },
2555
2564
  {
2556
2565
  "name": "right-icon",
@@ -2558,11 +2567,9 @@
2558
2567
  "description": "Use it add an icon after the date.",
2559
2568
  "bindings": [
2560
2569
  {
2561
- "type": "string",
2562
2570
  "name": "icon-name"
2563
2571
  },
2564
2572
  {
2565
- "type": "string",
2566
2573
  "name": "icon-size"
2567
2574
  }
2568
2575
  ]
@@ -4617,11 +4624,9 @@
4617
4624
  "description": "Use it to add icon before the text.",
4618
4625
  "bindings": [
4619
4626
  {
4620
- "type": "string",
4621
4627
  "name": "icon-name"
4622
4628
  },
4623
4629
  {
4624
- "type": "string",
4625
4630
  "name": "icon-size"
4626
4631
  }
4627
4632
  ]