@volverjs/ui-vue 0.0.10-beta.67 → 0.0.10-beta.69

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 (79) hide show
  1. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +5 -4
  2. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +4 -2
  3. package/dist/components/VvAction/VvAction.vue.d.ts +1 -1
  4. package/dist/components/VvAlert/VvAlert.es.js +6 -7
  5. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  6. package/dist/components/VvAlert/VvAlert.vue.d.ts +14 -8
  7. package/dist/components/VvAlert/index.d.ts +1 -1
  8. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +6 -7
  9. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  10. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +5 -3
  11. package/dist/components/VvAlertGroup/index.d.ts +1 -1
  12. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +1 -1
  13. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +1 -1
  14. package/dist/components/VvBadge/VvBadge.vue.d.ts +1 -1
  15. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +2 -2
  16. package/dist/components/VvButton/VvButton.es.js +6 -7
  17. package/dist/components/VvButton/VvButton.umd.js +1 -1
  18. package/dist/components/VvButton/VvButton.vue.d.ts +9 -5
  19. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +3 -2
  20. package/dist/components/VvCard/VvCard.vue.d.ts +7 -4
  21. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  22. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +14 -10
  23. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  24. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +13 -9
  25. package/dist/components/VvCombobox/VvCombobox.es.js +301 -182
  26. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  27. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +41 -23
  28. package/dist/components/VvCombobox/index.d.ts +36 -4
  29. package/dist/components/VvDialog/VvDialog.vue.d.ts +5 -3
  30. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +11 -8
  31. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +2 -116
  32. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
  33. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +4 -3
  34. package/dist/components/VvIcon/VvIcon.es.js +5 -6
  35. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  36. package/dist/components/VvIcon/index.d.ts +2 -2
  37. package/dist/components/VvInputFile/VvInputFile.es.js +50 -13
  38. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  39. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +13 -9
  40. package/dist/components/VvInputFile/index.d.ts +4 -4
  41. package/dist/components/VvInputText/VvInputText.es.js +43 -18
  42. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  43. package/dist/components/VvInputText/VvInputText.vue.d.ts +37 -20
  44. package/dist/components/VvInputText/index.d.ts +12 -4
  45. package/dist/components/VvNav/VvNav.vue.d.ts +4 -3
  46. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  47. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  48. package/dist/components/VvRadio/VvRadio.vue.d.ts +14 -10
  49. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  50. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +13 -9
  51. package/dist/components/VvSelect/VvSelect.es.js +143 -51
  52. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  53. package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -14
  54. package/dist/components/VvSelect/index.d.ts +34 -2
  55. package/dist/components/VvTab/VvTab.vue.d.ts +3 -2
  56. package/dist/components/VvTextarea/VvTextarea.es.js +10 -9
  57. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  58. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +23 -16
  59. package/dist/components/VvTextarea/index.d.ts +1 -1
  60. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +1 -1
  61. package/dist/components/{VvInputText → common}/VvInputClearAction.d.ts +10 -0
  62. package/dist/components/{VvInputText → common}/VvInputPasswordAction.d.ts +9 -0
  63. package/dist/components/{VvInputText → common}/VvInputStepAction.d.ts +9 -0
  64. package/dist/components/index.es.js +208 -80
  65. package/dist/components/index.umd.js +1 -1
  66. package/dist/composables/alert/useAlert.d.ts +4 -4
  67. package/dist/composables/dropdown/useDropdownContextmenu.d.ts +1 -1
  68. package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +1 -1
  69. package/dist/icons.es.js +3 -3
  70. package/dist/icons.umd.js +1 -1
  71. package/dist/props/index.d.ts +3 -3
  72. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +46 -49
  73. package/dist/stories/Alert/Alert.settings.d.ts +1 -1
  74. package/dist/stories/Button/Button.settings.d.ts +1 -1
  75. package/dist/stories/Combobox/Combobox.settings.d.ts +1 -1
  76. package/dist/stories/Nav/Nav.settings.d.ts +1 -1
  77. package/dist/stories/Tab/Tab.settings.d.ts +1 -1
  78. package/dist/utils/FileUtilities.d.ts +14 -0
  79. package/package.json +36 -36
@@ -1,7 +1,7 @@
1
1
  import { inject, computed, toRef, unref, defineComponent, useAttrs, useId, toRefs, ref, watch, onBeforeUnmount, createElementBlock, openBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, onMounted, isRef, provide, watchEffect, reactive, nextTick, Fragment, renderList, createBlock, mergeProps, createSlots, withCtx, getCurrentInstance, resolveComponent, resolveDynamicComponent, mergeDefaults, createCommentVNode, createVNode, TransitionGroup, toHandlers, useSlots, h, withDirectives, vModelCheckbox, Transition, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio } from "vue";
2
2
  import { useVModel, useStorage, useMutationObserver, onClickOutside, useFocusWithin, useElementHover, onKeyStroke, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
3
3
  import mitt from "mitt";
4
- import { iconExists, Icon, addIcon } from "@iconify/vue";
4
+ import { iconLoaded, Icon, addIcon } from "@iconify/vue";
5
5
  import { get } from "ts-dot-prop";
6
6
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
7
7
  import Sortable from "vuedraggable";
@@ -288,7 +288,7 @@ const DebounceProps = {
288
288
  const IconProps = {
289
289
  /**
290
290
  * VvIcon name or props
291
- * @see VVIcon
291
+ * @see VvIcon
292
292
  */
293
293
  icon: {
294
294
  type: [String, Object],
@@ -1609,13 +1609,13 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1609
1609
  const icon = computed(() => {
1610
1610
  const name = props.name ?? "";
1611
1611
  const iconName = `@${provider.value}:${props.prefix}:${name}`;
1612
- if (iconExists(iconName)) {
1612
+ if (iconLoaded(iconName)) {
1613
1613
  return iconName;
1614
1614
  }
1615
1615
  const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
1616
1616
  (iconsCollection2) => {
1617
1617
  const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
1618
- return iconExists(icon2);
1618
+ return iconLoaded(icon2);
1619
1619
  }
1620
1620
  );
1621
1621
  if (iconsCollection) {
@@ -1647,7 +1647,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1647
1647
  }
1648
1648
  }
1649
1649
  if (volver) {
1650
- if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
1650
+ if (props.src && !iconLoaded(`@${provider.value}:${props.prefix}:${props.name}`)) {
1651
1651
  show.value = false;
1652
1652
  volver.fetchIcon(props.src).then((svg) => {
1653
1653
  if (svg) {
@@ -1675,9 +1675,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1675
1675
  flip: _ctx.flip,
1676
1676
  rotate: unref(hasRotate),
1677
1677
  color: _ctx.color,
1678
- onLoad: _ctx.onLoad,
1679
1678
  icon: unref(icon)
1680
- }), null, 16, ["class"])) : createCommentVNode("v-if", true);
1679
+ }, { onLoad: _ctx.onLoad }), null, 16, ["class", "onLoad"])) : createCommentVNode("v-if", true);
1681
1680
  };
1682
1681
  }
1683
1682
  });
@@ -3488,6 +3487,21 @@ const VvComboboxProps = {
3488
3487
  focusOnHover: {
3489
3488
  type: Boolean,
3490
3489
  default: true
3490
+ },
3491
+ /**
3492
+ * VvIcon name for clear button
3493
+ * @see VvIcon
3494
+ */
3495
+ iconClear: {
3496
+ type: [String, Object],
3497
+ default: ACTION_ICONS.clear
3498
+ },
3499
+ /**
3500
+ * Label for clear button
3501
+ */
3502
+ labelClear: {
3503
+ type: String,
3504
+ default: "Clear"
3491
3505
  }
3492
3506
  };
3493
3507
  function useVvComboboxProps() {
@@ -3503,6 +3517,60 @@ function useVvComboboxProps() {
3503
3517
  }
3504
3518
  };
3505
3519
  }
3520
+ const VvInputClearAction = defineComponent({
3521
+ components: {
3522
+ VvIcon: _sfc_main$u
3523
+ },
3524
+ props: {
3525
+ inputType: {
3526
+ type: String,
3527
+ default: "input-text"
3528
+ },
3529
+ disabled: {
3530
+ type: Boolean,
3531
+ default: false
3532
+ },
3533
+ label: {
3534
+ type: String,
3535
+ default: "Clear"
3536
+ },
3537
+ icon: {
3538
+ type: [String, Object],
3539
+ default: "close"
3540
+ }
3541
+ },
3542
+ emits: ["clear"],
3543
+ setup(props, { emit }) {
3544
+ const { hasIcon } = useComponentIcon(computed(() => props.icon));
3545
+ function onClick(e) {
3546
+ e == null ? void 0 : e.stopPropagation();
3547
+ if (!props.disabled) {
3548
+ emit("clear");
3549
+ }
3550
+ }
3551
+ return {
3552
+ hasIcon,
3553
+ onClick
3554
+ };
3555
+ },
3556
+ render() {
3557
+ const icon = this.hasIcon ? h(_sfc_main$u, {
3558
+ ...this.hasIcon,
3559
+ class: `vv-${this.inputType}__icon`
3560
+ }) : void 0;
3561
+ return h(
3562
+ "button",
3563
+ {
3564
+ disabled: this.disabled,
3565
+ class: `vv-${this.inputType}__action`,
3566
+ ariaLabel: this.label,
3567
+ type: "button",
3568
+ onClick: this.onClick
3569
+ },
3570
+ icon
3571
+ );
3572
+ }
3573
+ });
3506
3574
  const VvDropdownProps = {
3507
3575
  ...IdProps,
3508
3576
  ...DropdownProps,
@@ -4212,7 +4280,22 @@ const VvSelectProps = {
4212
4280
  /**
4213
4281
  * Select placeholder
4214
4282
  */
4215
- placeholder: String
4283
+ placeholder: String,
4284
+ /**
4285
+ * VvIcon name for clear button
4286
+ * @see VvIcon
4287
+ */
4288
+ iconClear: {
4289
+ type: [String, Object],
4290
+ default: ACTION_ICONS.clear
4291
+ },
4292
+ /**
4293
+ * Label for clear button
4294
+ */
4295
+ labelClear: {
4296
+ type: String,
4297
+ default: "Clear"
4298
+ }
4216
4299
  };
4217
4300
  function useVvSelectProps() {
4218
4301
  return {
@@ -4255,7 +4338,7 @@ const __default__$c = {
4255
4338
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
4256
4339
  ...__default__$c,
4257
4340
  props: useVvSelectProps(),
4258
- emits: ["update:modelValue", "focus", "blur"],
4341
+ emits: ["update:modelValue", "focus", "blur", "clear"],
4259
4342
  setup(__props, { emit: __emit }) {
4260
4343
  const props = __props;
4261
4344
  const emit = __emit;
@@ -4321,6 +4404,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4321
4404
  }
4322
4405
  return localModelValue.value !== void 0 && localModelValue.value !== null;
4323
4406
  });
4407
+ const isUnselectable = computed(() => {
4408
+ if (isDisabledOrReadonly.value) {
4409
+ return false;
4410
+ }
4411
+ return props.unselectable;
4412
+ });
4324
4413
  const isVisible = useElementVisibility(selectEl);
4325
4414
  watch(isVisible, (newValue) => {
4326
4415
  if (newValue && props.autofocus) {
@@ -4370,6 +4459,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4370
4459
  },
4371
4460
  { immediate: true }
4372
4461
  );
4462
+ function onClear() {
4463
+ if (Array.isArray(localModelValue.value)) {
4464
+ localModelValue.value = [];
4465
+ } else {
4466
+ localModelValue.value = void 0;
4467
+ }
4468
+ emit("clear");
4469
+ }
4373
4470
  const hasAttrs = computed(() => {
4374
4471
  return {
4375
4472
  "name": props.name,
@@ -4422,8 +4519,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4422
4519
  _ctx.placeholder ? (openBlock(), createElementBlock("option", {
4423
4520
  key: 0,
4424
4521
  value: void 0,
4425
- disabled: !_ctx.unselectable,
4426
- hidden: !_ctx.unselectable
4522
+ disabled: !unref(isUnselectable),
4523
+ hidden: !unref(isUnselectable)
4427
4524
  }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$4)) : createCommentVNode("v-if", true),
4428
4525
  (openBlock(true), createElementBlock(
4429
4526
  Fragment,
@@ -4467,9 +4564,16 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4467
4564
  ], 16, _hoisted_5$4), [
4468
4565
  [vModelSelect, unref(localModelValue)]
4469
4566
  ]),
4567
+ unref(isUnselectable) ? (openBlock(), createBlock(unref(VvInputClearAction), {
4568
+ key: 1,
4569
+ "input-type": "select",
4570
+ label: _ctx.labelClear,
4571
+ icon: _ctx.iconClear,
4572
+ onClear
4573
+ }, null, 8, ["label", "icon"])) : createCommentVNode("v-if", true),
4470
4574
  unref(hasIconAfter) ? (openBlock(), createBlock(
4471
4575
  _sfc_main$u,
4472
- mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
4576
+ mergeProps({ key: 2 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
4473
4577
  null,
4474
4578
  16
4475
4579
  /* FULL_PROPS */
@@ -4552,7 +4656,7 @@ const __default__$b = {
4552
4656
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
4553
4657
  ...__default__$b,
4554
4658
  props: useVvComboboxProps(),
4555
- emits: ["update:modelValue", "update:search", "change:search", "focus", "blur"],
4659
+ emits: ["update:modelValue", "update:search", "focus", "blur", "clear", "change:search"],
4556
4660
  setup(__props, { emit: __emit }) {
4557
4661
  const props = __props;
4558
4662
  const emit = __emit;
@@ -4800,6 +4904,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4800
4904
  collapse();
4801
4905
  }
4802
4906
  }
4907
+ function onClear() {
4908
+ localModelValue.value = [];
4909
+ emit("update:search", "");
4910
+ emit("clear");
4911
+ }
4803
4912
  watch(
4804
4913
  () => props.options,
4805
4914
  (newValue) => {
@@ -4985,9 +5094,16 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4985
5094
  ))
4986
5095
  ])
4987
5096
  ], 16, _hoisted_6$3),
5097
+ unref(isUnselectable) ? (openBlock(), createBlock(unref(VvInputClearAction), {
5098
+ key: 1,
5099
+ "input-type": "select",
5100
+ label: _ctx.labelClear,
5101
+ icon: _ctx.iconClear,
5102
+ onClear
5103
+ }, null, 8, ["label", "icon"])) : createCommentVNode("v-if", true),
4988
5104
  unref(hasIconAfter) ? (openBlock(), createBlock(
4989
5105
  _sfc_main$u,
4990
- mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
5106
+ mergeProps({ key: 2 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
4991
5107
  null,
4992
5108
  16
4993
5109
  /* FULL_PROPS */
@@ -5547,7 +5663,7 @@ const VvInputFileProps = {
5547
5663
  },
5548
5664
  /**
5549
5665
  * VvIcon name for add button
5550
- * @see VVIcon
5666
+ * @see VvIcon
5551
5667
  */
5552
5668
  iconAdd: {
5553
5669
  type: [String, Object],
@@ -5562,7 +5678,7 @@ const VvInputFileProps = {
5562
5678
  },
5563
5679
  /**
5564
5680
  * VvIcon name for replace button
5565
- * @see VVIcon
5681
+ * @see VvIcon
5566
5682
  */
5567
5683
  iconReplace: {
5568
5684
  type: [String, Object],
@@ -5577,7 +5693,7 @@ const VvInputFileProps = {
5577
5693
  },
5578
5694
  /**
5579
5695
  * VvIcon name for download button
5580
- * @see VVIcon
5696
+ * @see VvIcon
5581
5697
  */
5582
5698
  iconDownload: {
5583
5699
  type: [String, Object],
@@ -5591,6 +5707,43 @@ const VvInputFileProps = {
5591
5707
  default: "Remove file"
5592
5708
  }
5593
5709
  };
5710
+ function acceptedMimeTypes(acceptValue) {
5711
+ const mimeTypes = [];
5712
+ const extensions = [];
5713
+ const wildcards = [];
5714
+ const acceptedTypes = acceptValue == null ? void 0 : acceptValue.split(",").map((type) => type.trim().toLowerCase());
5715
+ if (acceptedTypes == null ? void 0 : acceptedTypes.length) {
5716
+ acceptedTypes.forEach((type) => {
5717
+ if (type.startsWith(".")) {
5718
+ extensions.push(type);
5719
+ } else if (type.includes("/*")) {
5720
+ wildcards.push(type.replace("/*", ""));
5721
+ } else {
5722
+ mimeTypes.push(type);
5723
+ }
5724
+ });
5725
+ }
5726
+ return {
5727
+ mimeTypes,
5728
+ extensions,
5729
+ wildcards
5730
+ };
5731
+ }
5732
+ function filterFileList(fileList, acceptValue) {
5733
+ if (!acceptValue || acceptValue.trim() === "") {
5734
+ return Array.from(fileList);
5735
+ }
5736
+ const { mimeTypes, extensions, wildcards } = acceptedMimeTypes(acceptValue);
5737
+ return Array.from(fileList).filter((file) => {
5738
+ var _a;
5739
+ const fileType = file.type.toLowerCase();
5740
+ const fileExtension = `.${(_a = file.name.split(".").pop()) == null ? void 0 : _a.toLowerCase()}`;
5741
+ const mimeMatches = mimeTypes.includes(fileType);
5742
+ const wildcardMatches = wildcards.some((wildcard) => fileType.startsWith(`${wildcard}/`));
5743
+ const extensionMatches = extensions.some((ext) => fileExtension === ext.toLowerCase());
5744
+ return mimeMatches || wildcardMatches || extensionMatches;
5745
+ });
5746
+ }
5594
5747
  const _hoisted_1$6 = ["for"];
5595
5748
  const _hoisted_2$4 = { class: "vv-input-file__preview" };
5596
5749
  const _hoisted_3$2 = ["src", "alt"];
@@ -5710,12 +5863,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5710
5863
  inputEl.value.value = "";
5711
5864
  }
5712
5865
  function addFiles(uploadedFiles) {
5866
+ const filteredFiles = filterFileList(uploadedFiles, props.accept);
5713
5867
  if (!props.multiple) {
5714
5868
  if (Array.isArray(localModelValue.value)) {
5715
- localModelValue.value = [...uploadedFiles];
5869
+ localModelValue.value = filteredFiles;
5716
5870
  return;
5717
5871
  }
5718
- localModelValue.value = uploadedFiles[0];
5872
+ localModelValue.value = filteredFiles[0];
5719
5873
  return;
5720
5874
  }
5721
5875
  let toReturn = [];
@@ -5724,7 +5878,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5724
5878
  } else {
5725
5879
  toReturn = localModelValue.value && Array.isArray(localModelValue.value) ? [...localModelValue.value] : toReturn;
5726
5880
  }
5727
- for (const file of uploadedFiles) {
5881
+ for (const file of filteredFiles) {
5728
5882
  if (hasMax.value && toReturn.length >= hasMax.value) {
5729
5883
  break;
5730
5884
  }
@@ -6128,6 +6282,8 @@ const VvInputTextEvents = [
6128
6282
  "complete:typed",
6129
6283
  "complete:masked",
6130
6284
  "complete:unmasked",
6285
+ "suggestion:selected",
6286
+ "suggestion:removed",
6131
6287
  "focus",
6132
6288
  "blur",
6133
6289
  "keyup",
@@ -6184,7 +6340,7 @@ const VvInputTextProps = {
6184
6340
  multiple: Boolean,
6185
6341
  /**
6186
6342
  * VvIcon name for show password button
6187
- * @see VVIcon
6343
+ * @see VvIcon
6188
6344
  */
6189
6345
  iconShowPassword: {
6190
6346
  type: [String, Object],
@@ -6192,7 +6348,7 @@ const VvInputTextProps = {
6192
6348
  },
6193
6349
  /**
6194
6350
  * VvIcon name for hide password button
6195
- * @see VVIcon
6351
+ * @see VvIcon
6196
6352
  */
6197
6353
  iconHidePassword: {
6198
6354
  type: [String, Object],
@@ -6200,7 +6356,7 @@ const VvInputTextProps = {
6200
6356
  },
6201
6357
  /**
6202
6358
  * VvIcon name for clear button
6203
- * @see VVIcon
6359
+ * @see VvIcon
6204
6360
  */
6205
6361
  iconClear: {
6206
6362
  type: [String, Object],
@@ -6208,7 +6364,7 @@ const VvInputTextProps = {
6208
6364
  },
6209
6365
  /**
6210
6366
  * VvIcon name for remove suggestion button
6211
- * @see VVIcon
6367
+ * @see VvIcon
6212
6368
  */
6213
6369
  iconRemoveSuggestion: {
6214
6370
  type: [String, Object],
@@ -6304,63 +6460,25 @@ const VvInputTextProps = {
6304
6460
  maxSuggestions: {
6305
6461
  type: Number,
6306
6462
  default: 5
6463
+ },
6464
+ /**
6465
+ * The input mode to use for the input
6466
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
6467
+ */
6468
+ inputMode: {
6469
+ type: String,
6470
+ default: "text"
6307
6471
  }
6308
6472
  };
6309
- const VvInputClearAction = defineComponent({
6473
+ const VvInputPasswordAction = defineComponent({
6310
6474
  components: {
6311
6475
  VvIcon: _sfc_main$u
6312
6476
  },
6313
6477
  props: {
6314
- disabled: {
6315
- type: Boolean,
6316
- default: false
6317
- },
6318
- label: {
6478
+ inputType: {
6319
6479
  type: String,
6320
- default: "Clear"
6480
+ default: "input-text"
6321
6481
  },
6322
- icon: {
6323
- type: [String, Object],
6324
- default: "close"
6325
- }
6326
- },
6327
- emits: ["clear"],
6328
- setup(props, { emit }) {
6329
- const { hasIcon } = useComponentIcon(computed(() => props.icon));
6330
- function onClick(e) {
6331
- e == null ? void 0 : e.stopPropagation();
6332
- if (!props.disabled) {
6333
- emit("clear");
6334
- }
6335
- }
6336
- return {
6337
- hasIcon,
6338
- onClick
6339
- };
6340
- },
6341
- render() {
6342
- const icon = this.hasIcon ? h(_sfc_main$u, {
6343
- ...this.hasIcon,
6344
- class: "vv-input-text__icon"
6345
- }) : void 0;
6346
- return h(
6347
- "button",
6348
- {
6349
- disabled: this.disabled,
6350
- class: "vv-input-text__action",
6351
- ariaLabel: this.label,
6352
- type: "button",
6353
- onClick: this.onClick
6354
- },
6355
- icon
6356
- );
6357
- }
6358
- });
6359
- const VvInputPasswordAction = defineComponent({
6360
- components: {
6361
- VvIcon: _sfc_main$u
6362
- },
6363
- props: {
6364
6482
  disabled: {
6365
6483
  type: Boolean,
6366
6484
  default: false
@@ -6406,13 +6524,13 @@ const VvInputPasswordAction = defineComponent({
6406
6524
  render() {
6407
6525
  const icon = this.hasIcon ? h(_sfc_main$u, {
6408
6526
  ...this.hasIcon,
6409
- class: "vv-input-text__icon"
6527
+ class: `vv-${this.inputType}__icon`
6410
6528
  }) : void 0;
6411
6529
  return h(
6412
6530
  "button",
6413
6531
  {
6414
6532
  disabled: this.disabled,
6415
- class: "vv-input-text__action",
6533
+ class: `vv-${this.inputType}__action`,
6416
6534
  ariaLabel: this.active ? this.labelHide : this.labelShow,
6417
6535
  type: "button",
6418
6536
  onClick: this.onClick
@@ -6426,6 +6544,10 @@ const VvInputStepAction = defineComponent({
6426
6544
  VvIcon: _sfc_main$u
6427
6545
  },
6428
6546
  props: {
6547
+ inputType: {
6548
+ type: String,
6549
+ default: "input-text"
6550
+ },
6429
6551
  disabled: {
6430
6552
  type: Boolean,
6431
6553
  default: false
@@ -6456,8 +6578,9 @@ const VvInputStepAction = defineComponent({
6456
6578
  render() {
6457
6579
  return h("button", {
6458
6580
  class: [
6459
- "vv-input-text__action vv-input-text__action-chevron",
6460
- this.isUp && "vv-input-text__action-chevron-up"
6581
+ `vv-${this.inputType}__action`,
6582
+ `vv-${this.inputType}__action-chevron`,
6583
+ this.isUp ? `vv-${this.inputType}__action-chevron-up` : void 0
6461
6584
  ],
6462
6585
  disabled: this.disabled,
6463
6586
  ariaLabel: this.label,
@@ -6958,10 +7081,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
6958
7081
  var _a;
6959
7082
  localModelValue.value = suggestion;
6960
7083
  (_a = suggestionsDropdownEl.value) == null ? void 0 : _a.hide();
7084
+ emit("suggestion:selected", suggestion);
6961
7085
  }
6962
7086
  function onSuggestionRemove(suggestion) {
6963
7087
  var _a;
6964
7088
  (_a = suggestions.value) == null ? void 0 : _a.delete(suggestion);
7089
+ emit("suggestion:removed", suggestion);
6965
7090
  }
6966
7091
  const { modifiers } = toRefs(props);
6967
7092
  const bemCssClasses = useModifiers(
@@ -7005,7 +7130,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
7005
7130
  "autocomplete": props.autocomplete,
7006
7131
  "aria-invalid": isInvalid.value,
7007
7132
  "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
7008
- "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
7133
+ "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0,
7134
+ "inputMode": props.inputMode
7009
7135
  };
7010
7136
  if (type2 === INPUT_TYPES.DATE || type2 === INPUT_TYPES.MONTH || type2 === INPUT_TYPES.WEEK || type2 === INPUT_TYPES.TIME || type2 === INPUT_TYPES.DATETIME_LOCAL || type2 === INPUT_TYPES.NUMBER) {
7011
7137
  let max = props.max;
@@ -7886,7 +8012,7 @@ const WRAP = {
7886
8012
  const SPELLCHECK = {
7887
8013
  default: "default"
7888
8014
  };
7889
- const VvTextareaEvents = ["update:modelValue", "focus", "blur", "keyup"];
8015
+ const VvTextareaEvents = ["update:modelValue", "focus", "blur", "keyup", "suggestion:selected", "suggestion:removed"];
7890
8016
  const VvTextareaProps = {
7891
8017
  ...InputTextareaProps,
7892
8018
  ...StorageProps,
@@ -7917,7 +8043,7 @@ const VvTextareaProps = {
7917
8043
  spellcheck: { type: [Boolean, String], default: SPELLCHECK.default },
7918
8044
  /**
7919
8045
  * VvIcon name for remove suggestion button
7920
- * @see VVIcon
8046
+ * @see VvIcon
7921
8047
  */
7922
8048
  iconRemoveSuggestion: {
7923
8049
  type: [String, Object],
@@ -8083,10 +8209,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8083
8209
  var _a;
8084
8210
  localModelValue.value = suggestion;
8085
8211
  (_a = suggestionsDropdownEl.value) == null ? void 0 : _a.hide();
8212
+ emit("suggestion:selected", suggestion);
8086
8213
  }
8087
8214
  function onSuggestionRemove(suggestion) {
8088
8215
  var _a;
8089
8216
  (_a = suggestions.value) == null ? void 0 : _a.delete(suggestion);
8217
+ emit("suggestion:removed", suggestion);
8090
8218
  }
8091
8219
  const {
8092
8220
  HintSlot,