@volverjs/ui-vue 0.0.10-beta.68 → 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 +39 -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 +7 -8
  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 +201 -79
  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 +44 -22
  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 +31 -31
@@ -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
  }
@@ -6186,7 +6340,7 @@ const VvInputTextProps = {
6186
6340
  multiple: Boolean,
6187
6341
  /**
6188
6342
  * VvIcon name for show password button
6189
- * @see VVIcon
6343
+ * @see VvIcon
6190
6344
  */
6191
6345
  iconShowPassword: {
6192
6346
  type: [String, Object],
@@ -6194,7 +6348,7 @@ const VvInputTextProps = {
6194
6348
  },
6195
6349
  /**
6196
6350
  * VvIcon name for hide password button
6197
- * @see VVIcon
6351
+ * @see VvIcon
6198
6352
  */
6199
6353
  iconHidePassword: {
6200
6354
  type: [String, Object],
@@ -6202,7 +6356,7 @@ const VvInputTextProps = {
6202
6356
  },
6203
6357
  /**
6204
6358
  * VvIcon name for clear button
6205
- * @see VVIcon
6359
+ * @see VvIcon
6206
6360
  */
6207
6361
  iconClear: {
6208
6362
  type: [String, Object],
@@ -6210,7 +6364,7 @@ const VvInputTextProps = {
6210
6364
  },
6211
6365
  /**
6212
6366
  * VvIcon name for remove suggestion button
6213
- * @see VVIcon
6367
+ * @see VvIcon
6214
6368
  */
6215
6369
  iconRemoveSuggestion: {
6216
6370
  type: [String, Object],
@@ -6306,63 +6460,25 @@ const VvInputTextProps = {
6306
6460
  maxSuggestions: {
6307
6461
  type: Number,
6308
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"
6309
6471
  }
6310
6472
  };
6311
- const VvInputClearAction = defineComponent({
6473
+ const VvInputPasswordAction = defineComponent({
6312
6474
  components: {
6313
6475
  VvIcon: _sfc_main$u
6314
6476
  },
6315
6477
  props: {
6316
- disabled: {
6317
- type: Boolean,
6318
- default: false
6319
- },
6320
- label: {
6478
+ inputType: {
6321
6479
  type: String,
6322
- default: "Clear"
6480
+ default: "input-text"
6323
6481
  },
6324
- icon: {
6325
- type: [String, Object],
6326
- default: "close"
6327
- }
6328
- },
6329
- emits: ["clear"],
6330
- setup(props, { emit }) {
6331
- const { hasIcon } = useComponentIcon(computed(() => props.icon));
6332
- function onClick(e) {
6333
- e == null ? void 0 : e.stopPropagation();
6334
- if (!props.disabled) {
6335
- emit("clear");
6336
- }
6337
- }
6338
- return {
6339
- hasIcon,
6340
- onClick
6341
- };
6342
- },
6343
- render() {
6344
- const icon = this.hasIcon ? h(_sfc_main$u, {
6345
- ...this.hasIcon,
6346
- class: "vv-input-text__icon"
6347
- }) : void 0;
6348
- return h(
6349
- "button",
6350
- {
6351
- disabled: this.disabled,
6352
- class: "vv-input-text__action",
6353
- ariaLabel: this.label,
6354
- type: "button",
6355
- onClick: this.onClick
6356
- },
6357
- icon
6358
- );
6359
- }
6360
- });
6361
- const VvInputPasswordAction = defineComponent({
6362
- components: {
6363
- VvIcon: _sfc_main$u
6364
- },
6365
- props: {
6366
6482
  disabled: {
6367
6483
  type: Boolean,
6368
6484
  default: false
@@ -6408,13 +6524,13 @@ const VvInputPasswordAction = defineComponent({
6408
6524
  render() {
6409
6525
  const icon = this.hasIcon ? h(_sfc_main$u, {
6410
6526
  ...this.hasIcon,
6411
- class: "vv-input-text__icon"
6527
+ class: `vv-${this.inputType}__icon`
6412
6528
  }) : void 0;
6413
6529
  return h(
6414
6530
  "button",
6415
6531
  {
6416
6532
  disabled: this.disabled,
6417
- class: "vv-input-text__action",
6533
+ class: `vv-${this.inputType}__action`,
6418
6534
  ariaLabel: this.active ? this.labelHide : this.labelShow,
6419
6535
  type: "button",
6420
6536
  onClick: this.onClick
@@ -6428,6 +6544,10 @@ const VvInputStepAction = defineComponent({
6428
6544
  VvIcon: _sfc_main$u
6429
6545
  },
6430
6546
  props: {
6547
+ inputType: {
6548
+ type: String,
6549
+ default: "input-text"
6550
+ },
6431
6551
  disabled: {
6432
6552
  type: Boolean,
6433
6553
  default: false
@@ -6458,8 +6578,9 @@ const VvInputStepAction = defineComponent({
6458
6578
  render() {
6459
6579
  return h("button", {
6460
6580
  class: [
6461
- "vv-input-text__action vv-input-text__action-chevron",
6462
- 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
6463
6584
  ],
6464
6585
  disabled: this.disabled,
6465
6586
  ariaLabel: this.label,
@@ -7009,7 +7130,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
7009
7130
  "autocomplete": props.autocomplete,
7010
7131
  "aria-invalid": isInvalid.value,
7011
7132
  "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
7012
- "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
7133
+ "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0,
7134
+ "inputMode": props.inputMode
7013
7135
  };
7014
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) {
7015
7137
  let max = props.max;
@@ -7921,7 +8043,7 @@ const VvTextareaProps = {
7921
8043
  spellcheck: { type: [Boolean, String], default: SPELLCHECK.default },
7922
8044
  /**
7923
8045
  * VvIcon name for remove suggestion button
7924
- * @see VVIcon
8046
+ * @see VvIcon
7925
8047
  */
7926
8048
  iconRemoveSuggestion: {
7927
8049
  type: [String, Object],