vueless 0.0.252 → 0.0.253

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": "vueless",
3
- "version": "0.0.252",
3
+ "version": "0.0.253",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -10,12 +10,12 @@ export default /*tw*/ {
10
10
  `,
11
11
  variants: {
12
12
  size: {
13
- "2xs": "px-2 py-1 text-xs leading-tight gap-0.5",
14
- xs: "px-3 py-1.5 text-xs leading-tight gap-0.5",
15
- sm: "px-4 py-2 text-sm leading-tight gap-1",
16
- md: "px-5 py-3 text-sm leading-tight gap-1",
17
- lg: "px-6 py-3.5 text-base leading-tight gap-1.5",
18
- xl: "px-7 py-4 text-base leading-tight gap-1.5",
13
+ "2xs": "px-2 py-1 text-xs gap-0.5",
14
+ xs: "px-3 py-1.5 text-xs gap-1",
15
+ sm: "px-4 py-2 text-sm gap-1.5",
16
+ md: "px-5 py-3 text-sm gap-1.5",
17
+ lg: "px-6 py-3.5 text-base gap-1.5",
18
+ xl: "px-7 py-4 text-base gap-2",
19
19
  },
20
20
  variant: {
21
21
  primary: `
@@ -134,11 +134,11 @@ export default /*tw*/ {
134
134
  },
135
135
  { filled: true, variant: "thirdary", color: "white", class: "bg-gray-50" },
136
136
  { iconLeft: true, size: "2xs", class: "pl-1" },
137
- { iconLeft: true, size: "xs", class: "pl-1.5" },
138
- { iconLeft: true, size: "sm", class: "pl-2" },
137
+ { iconLeft: true, size: "xs", class: "pl-2" },
138
+ { iconLeft: true, size: "sm", class: "pl-3" },
139
139
  { iconLeft: true, size: "md", class: "pl-4" },
140
- { iconLeft: true, size: "lg", class: "pl-3.5" },
141
- { iconLeft: true, size: "xl", class: "pl-4" },
140
+ { iconLeft: true, size: "lg", class: "pl-5" },
141
+ { iconLeft: true, size: "xl", class: "pl-6" },
142
142
  { iconRight: true, size: "2xs", class: "pr-1" },
143
143
  { iconRight: true, size: "xs", class: "pr-2" },
144
144
  { iconRight: true, size: "sm", class: "pr-3" },
@@ -154,6 +154,8 @@ export default /*tw*/ {
154
154
  ],
155
155
  },
156
156
  text: "whitespace-nowrap focus-visible:outline-none",
157
+ iconLeft: "{UIcon}",
158
+ iconRight: "{UIcon}",
157
159
  defaultVariants: {
158
160
  color: "brand",
159
161
  variant: "primary",
@@ -33,6 +33,7 @@
33
33
  :size="iconSize"
34
34
  :color="componentColor"
35
35
  internal
36
+ v-bind="iconLeftAttrs"
36
37
  />
37
38
  </slot>
38
39
  </div>
@@ -71,6 +72,7 @@
71
72
  :size="iconSize"
72
73
  :color="componentColor"
73
74
  internal
75
+ v-bind="iconRightAttrs"
74
76
  />
75
77
  </slot>
76
78
  </div>
@@ -234,7 +236,8 @@ const props = defineProps({
234
236
  },
235
237
  });
236
238
 
237
- const { buttonAttrs, loaderAttrs, textAttrs, hasSlotContent } = useAttrs(props);
239
+ const { buttonAttrs, loaderAttrs, textAttrs, iconLeftAttrs, iconRightAttrs, hasSlotContent } =
240
+ useAttrs(props);
238
241
 
239
242
  const buttonRef = ref(null);
240
243
 
@@ -255,12 +258,12 @@ const loaderSize = computed(() => {
255
258
 
256
259
  const iconSize = computed(() => {
257
260
  const sizes = {
258
- "2xs": "3xs",
259
- xs: "2xs",
260
- sm: "xs",
261
+ "2xs": "xs",
262
+ xs: "xs",
263
+ sm: "sm",
261
264
  md: "sm",
262
265
  lg: "md",
263
- xl: "lg",
266
+ xl: "md",
264
267
  };
265
268
 
266
269
  return sizes[props.size];
@@ -3,6 +3,8 @@ export default /*tw*/ {
3
3
  inputWrapper: "flex relative w-full",
4
4
  rightIconSlot: "flex items-center justify-end whitespace-nowrap pr-2 gap-1 rounded-dynamic rounded-l-none",
5
5
  leftIconSlot: "flex items-center justify-end whitespace-nowrap pl-2 gap-1 rounded-dynamic rounded-r-none",
6
+ iconLeft: "{UIcon}",
7
+ iconRight: "{UIcon}",
6
8
  passwordIcon: "",
7
9
  passwordVisibleIconName: "visibility-fill",
8
10
  passwordHiddenIconName: "visibility_off-fill",
@@ -64,8 +64,10 @@ export default /*tw*/ {
64
64
  { size: "lg", multiple: true, class: "text-base" },
65
65
  ],
66
66
  },
67
- leftIcon: "pr-3 flex items-center",
68
- rightIcon: "pl-3 flex items-center",
67
+ leftIconWrapper: "pr-3 flex items-center",
68
+ rightIconWrapper: "pl-3 flex items-center",
69
+ iconLeft: "{UIcon}",
70
+ iconRight: "{UIcon}",
69
71
  beforeCaret: "",
70
72
  afterCaret: "mr-3",
71
73
  caret: {
@@ -78,7 +78,7 @@
78
78
  <span
79
79
  v-if="hasSlotContent($slots['icon-left']) || iconLeft"
80
80
  ref="leftSlotWrapperRef"
81
- v-bind="leftIconAttrs"
81
+ v-bind="leftIconWrapperAttrs"
82
82
  >
83
83
  <!--
84
84
  @slot Use it to add icon before option.
@@ -86,7 +86,13 @@
86
86
  @binding {string} icon-size
87
87
  -->
88
88
  <slot name="icon-left" :icon-name="iconLeft" :icon-size="iconSize">
89
- <UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" internal />
89
+ <UIcon
90
+ v-if="iconLeft"
91
+ :name="iconLeft"
92
+ :size="iconSize"
93
+ internal
94
+ v-bind="iconLeftAttrs"
95
+ />
90
96
  </slot>
91
97
  </span>
92
98
 
@@ -190,14 +196,23 @@
190
196
  <!-- @slot Use it to add something after input. -->
191
197
  <slot name="right" />
192
198
 
193
- <span v-if="hasSlotContent($slots['icon-right']) || iconRight" v-bind="rightIconAttrs">
199
+ <span
200
+ v-if="hasSlotContent($slots['icon-right']) || iconRight"
201
+ v-bind="rightIconWrapperAttrs"
202
+ >
194
203
  <!--
195
204
  @slot Use it to add icon after option.
196
205
  @binding {string} icon-name
197
206
  @binding {string} icon-size
198
207
  -->
199
208
  <slot name="icon-right" :icon-name="iconRight" :icon-size="iconSize">
200
- <UIcon v-if="iconRight" :name="iconRight" :size="iconSize" internal />
209
+ <UIcon
210
+ v-if="iconRight"
211
+ :name="iconRight"
212
+ :size="iconSize"
213
+ internal
214
+ v-bind="iconRightAttrs"
215
+ />
201
216
  </slot>
202
217
  </span>
203
218
  </div>
@@ -565,8 +580,10 @@ const {
565
580
  labelAttrs,
566
581
  wrapperAttrs,
567
582
  innerWrapperAttrs,
568
- leftIconAttrs,
569
- rightIconAttrs,
583
+ leftIconWrapperAttrs,
584
+ rightIconWrapperAttrs,
585
+ iconLeftAttrs,
586
+ iconRightAttrs,
570
587
  beforeCaretAttrs,
571
588
  afterCaretAttrs,
572
589
  toggleAttrs,
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.252",
4
+ "version": "0.0.253",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",