vueless 1.3.2-beta.0 → 1.3.2-beta.2

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": "1.3.2-beta.0",
3
+ "version": "1.3.2-beta.2",
4
4
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
5
5
  "author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
6
6
  "homepage": "https://vueless.com",
@@ -318,7 +318,7 @@ watchEffect(() => {
318
318
  @binding {string} icon-name
319
319
  -->
320
320
  <slot name="right" :icon-name="iconName">
321
- <UIcon :name="iconName" color="neutral" v-bind="rightIconAttrs" />
321
+ <UIcon :name="iconName" color="neutral" v-bind="rightIconAttrs" @click="activate" />
322
322
  </slot>
323
323
  </template>
324
324
  </UInput>
@@ -653,7 +653,7 @@ watchEffect(() => {
653
653
  @binding {string} icon-name
654
654
  -->
655
655
  <slot name="right" :icon-name="iconName">
656
- <UIcon :name="iconName" color="neutral" v-bind="rightIconAttrs" />
656
+ <UIcon :name="iconName" color="neutral" v-bind="rightIconAttrs" @click="activate" />
657
657
  </slot>
658
658
  </template>
659
659
  </UInput>
@@ -176,9 +176,7 @@ function onKeydown(event: KeyboardEvent) {
176
176
  emit("keydown", event);
177
177
  }
178
178
 
179
- function onSlotClick(event: MouseEvent) {
180
- if (event.target !== event.currentTarget) return;
181
-
179
+ function onClickIcon() {
182
180
  inputRef.value?.focus();
183
181
  }
184
182
 
@@ -297,14 +295,19 @@ const {
297
295
  v-if="hasSlotContent($slots['left'], { iconName: leftIcon }) || leftIcon"
298
296
  v-bind="leftSlotAttrs"
299
297
  ref="leftSlotWrapper"
300
- @click="onSlotClick"
301
298
  >
302
299
  <!--
303
300
  @slot Use it to add something before the text.
304
301
  @binding {string} icon-name
305
302
  -->
306
303
  <slot name="left" :icon-name="leftIcon">
307
- <UIcon v-if="leftIcon" color="neutral" :name="leftIcon" v-bind="leftIconAttrs" />
304
+ <UIcon
305
+ v-if="leftIcon"
306
+ color="neutral"
307
+ :name="leftIcon"
308
+ v-bind="leftIconAttrs"
309
+ @click="onClickIcon"
310
+ />
308
311
  </slot>
309
312
  </span>
310
313
 
@@ -335,14 +338,19 @@ const {
335
338
  <span
336
339
  v-if="hasSlotContent($slots['right'], { iconName: rightIcon }) || rightIcon"
337
340
  v-bind="rightSlotAttrs"
338
- @click="onSlotClick"
339
341
  >
340
342
  <!--
341
343
  @slot Use it to add something after the text.
342
344
  @binding {string} icon-name
343
345
  -->
344
346
  <slot name="right" :icon-name="rightIcon">
345
- <UIcon v-if="rightIcon" color="neutral" :name="rightIcon" v-bind="rightIconAttrs" />
347
+ <UIcon
348
+ v-if="rightIcon"
349
+ color="neutral"
350
+ :name="rightIcon"
351
+ v-bind="rightIconAttrs"
352
+ @click="onClickIcon"
353
+ />
346
354
  </slot>
347
355
  </span>
348
356
  </div>
@@ -203,9 +203,9 @@ export const Slots: StoryFn<UInputNumberArgs> = (args) => ({
203
203
  components: { UInputNumber, URow, UButton, UDropdownButton, UText },
204
204
  setup() {
205
205
  const currencies = [
206
- { label: "USD", id: "usd" },
207
- { label: "EUR", id: "eur" },
208
- { label: "UAH", id: "uah" },
206
+ { label: "USD", value: "usd" },
207
+ { label: "EUR", value: "eur" },
208
+ { label: "UAH", value: "uah" },
209
209
  ];
210
210
 
211
211
  const currency = ref("usd");
@@ -142,8 +142,8 @@ export const Slots: StoryFn<UInputPasswordArgs> = (args) => ({
142
142
  components: { UInputPassword, URow, UButton, UDropdownButton },
143
143
  setup() {
144
144
  const wifiTypes = [
145
- { label: "WPA2", id: "wpa2" },
146
- { label: "WPA3", id: "wpa3" },
145
+ { label: "WPA2", value: "wpa2" },
146
+ { label: "WPA3", value: "wpa3" },
147
147
  ];
148
148
 
149
149
  return { args, wifiTypes };
@@ -155,9 +155,9 @@ export const Slots: StoryFn<UInputSearchArgs> = (args) => ({
155
155
  components: { UInputSearch, UCol, URow, UIcon, UDropdownButton, UText },
156
156
  setup() {
157
157
  const aiVersions = [
158
- { label: "GPT-4o", id: "gpt-4o" },
159
- { label: "GPT-4o-mini", id: "gpt-4o-mini" },
160
- { label: "GPT-4", id: "gpt-4" },
158
+ { label: "GPT-4o", value: "gpt-4o" },
159
+ { label: "GPT-4o-mini", value: "gpt-4o-mini" },
160
+ { label: "GPT-4", value: "gpt-4" },
161
161
  ];
162
162
 
163
163
  return { args, aiVersions };
@@ -51,11 +51,11 @@ const EnumTemplate: StoryFn<ULoaderOverlayArgs> = (args: ULoaderOverlayArgs, { a
51
51
  const selectModel = ref(null);
52
52
 
53
53
  const options = computed(() => {
54
- return argTypes?.[args.enum]?.options?.map((label, id) => ({ label, id }));
54
+ return argTypes?.[args.enum]?.options?.map((label, value) => ({ label, value }));
55
55
  });
56
56
 
57
57
  const selectedValue = computed(() => {
58
- return options.value?.find((option) => option.id === selectModel.value)?.label;
58
+ return options.value?.find((option) => option.value === selectModel.value)?.label;
59
59
  });
60
60
 
61
61
  return {