@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.3

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 (132) hide show
  1. package/dist/components/VvAccordion/VvAccordion.es.js +7 -0
  2. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  3. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +7 -0
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  5. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
  6. package/dist/components/VvAction/VvAction.es.js +9 -1
  7. package/dist/components/VvAction/VvAction.umd.js +1 -1
  8. package/dist/components/VvAction/VvAction.vue.d.ts +3 -0
  9. package/dist/components/VvAction/index.d.ts +1 -0
  10. package/dist/components/VvAlert/VvAlert.es.js +7 -0
  11. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  12. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +7 -0
  13. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  14. package/dist/components/VvAvatar/VvAvatar.es.js +7 -0
  15. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  16. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +7 -0
  17. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  18. package/dist/components/VvBadge/VvBadge.es.js +7 -0
  19. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  20. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +7 -0
  21. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  22. package/dist/components/VvButton/VvButton.es.js +9 -1
  23. package/dist/components/VvButton/VvButton.umd.js +1 -1
  24. package/dist/components/VvButton/VvButton.vue.d.ts +6 -3
  25. package/dist/components/VvButton/index.d.ts +1 -0
  26. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +7 -0
  27. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  28. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
  29. package/dist/components/VvCard/VvCard.es.js +7 -0
  30. package/dist/components/VvCard/VvCard.umd.js +1 -1
  31. package/dist/components/VvCheckbox/VvCheckbox.es.js +7 -0
  32. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  33. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -3
  34. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +7 -0
  35. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  36. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +3 -3
  37. package/dist/components/VvCombobox/VvCombobox.es.js +16 -2
  38. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  39. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +37 -37
  40. package/dist/components/VvCombobox/index.d.ts +13 -11
  41. package/dist/components/VvDialog/VvDialog.es.js +7 -0
  42. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  43. package/dist/components/VvDropdown/VvDropdown.es.js +7 -0
  44. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  45. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +31 -31
  46. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +3 -0
  47. package/dist/components/VvDropdown/index.d.ts +10 -10
  48. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +9 -1
  49. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  50. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -0
  51. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  52. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +7 -0
  53. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  54. package/dist/components/VvInputText/VvInputClearAction.d.ts +1 -1
  55. package/dist/components/VvInputText/VvInputText.es.js +7 -0
  56. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  57. package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
  58. package/dist/components/VvNav/VvNav.es.js +69 -56
  59. package/dist/components/VvNav/VvNav.umd.js +1 -1
  60. package/dist/components/VvNav/VvNav.vue.d.ts +12 -8
  61. package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
  62. package/dist/components/VvNav/index.d.ts +1 -12
  63. package/dist/components/VvNavItem/VvNavItem.es.js +392 -0
  64. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
  65. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
  66. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
  67. package/dist/components/VvProgress/VvProgress.es.js +7 -0
  68. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  69. package/dist/components/VvRadio/VvRadio.es.js +7 -0
  70. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  71. package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -3
  72. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +7 -0
  73. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  74. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +3 -3
  75. package/dist/components/VvSelect/VvSelect.es.js +7 -0
  76. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  77. package/dist/components/VvSelect/VvSelect.vue.d.ts +7 -7
  78. package/dist/components/VvTab/VvTab.es.js +127 -87
  79. package/dist/components/VvTab/VvTab.umd.js +1 -1
  80. package/dist/components/VvTab/VvTab.vue.d.ts +19 -6
  81. package/dist/components/VvTab/index.d.ts +9 -3
  82. package/dist/components/VvTextarea/VvTextarea.es.js +7 -0
  83. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  84. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +3 -3
  85. package/dist/components/VvTooltip/VvTooltip.es.js +7 -0
  86. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  87. package/dist/components/index.es.js +246 -200
  88. package/dist/components/index.umd.js +1 -1
  89. package/dist/directives/index.es.js +7 -0
  90. package/dist/directives/index.umd.js +1 -1
  91. package/dist/directives/v-tooltip.es.js +7 -0
  92. package/dist/directives/v-tooltip.umd.js +1 -1
  93. package/dist/icons.es.js +3 -3
  94. package/dist/icons.umd.js +1 -1
  95. package/dist/props/index.d.ts +29 -12
  96. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +5 -5
  97. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +31 -31
  98. package/dist/stories/Tab/Tab.settings.d.ts +3 -23
  99. package/dist/types/alert.d.ts +13 -0
  100. package/dist/types/floating-ui.d.ts +6 -0
  101. package/dist/types/generic.d.ts +5 -0
  102. package/dist/types/group.d.ts +37 -0
  103. package/dist/types/nav.d.ts +17 -0
  104. package/package.json +41 -33
  105. package/src/assets/icons/detailed.json +1 -1
  106. package/src/assets/icons/normal.json +1 -1
  107. package/src/assets/icons/simple.json +1 -1
  108. package/src/components/VvAction/VvAction.vue +1 -0
  109. package/src/components/VvCombobox/VvCombobox.vue +11 -4
  110. package/src/components/VvNav/VvNav.vue +29 -51
  111. package/src/components/VvNav/VvNavItem.vue +18 -0
  112. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  113. package/src/components/VvNav/index.ts +2 -15
  114. package/src/components/VvTab/VvTab.vue +60 -36
  115. package/src/components/VvTab/index.ts +10 -4
  116. package/src/props/index.ts +19 -3
  117. package/src/stories/Nav/Nav.settings.ts +3 -4
  118. package/src/stories/Nav/Nav.test.ts +4 -15
  119. package/src/stories/Tab/Tab.settings.ts +8 -8
  120. package/src/stories/Tab/Tab.stories.ts +2 -2
  121. package/src/stories/Tab/Tab.test.ts +6 -14
  122. package/src/types/nav.ts +19 -0
  123. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  124. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  125. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  126. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  127. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  128. /package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +0 -0
  129. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  130. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  131. /package/src/types/{generic.d.ts → generic.ts} +0 -0
  132. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -34,24 +34,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
34
34
  };
35
35
  shift: {
36
36
  type: globalThis.PropType<boolean | {
37
- mainAxis?: boolean | undefined;
38
- crossAxis?: boolean | undefined;
39
37
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
40
38
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
41
39
  altBoundary?: boolean | undefined;
42
40
  padding?: import("@floating-ui/utils").Padding | undefined;
41
+ crossAxis?: boolean | undefined;
42
+ mainAxis?: boolean | undefined;
43
43
  limiter?: {
44
44
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
45
45
  options?: any;
46
46
  } | undefined;
47
47
  boundary?: import("@floating-ui/dom").Boundary | undefined;
48
48
  } | import("@floating-ui/dom").Derivable<{
49
- mainAxis?: boolean | undefined;
50
- crossAxis?: boolean | undefined;
51
49
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
52
50
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
53
51
  altBoundary?: boolean | undefined;
54
52
  padding?: import("@floating-ui/utils").Padding | undefined;
53
+ crossAxis?: boolean | undefined;
54
+ mainAxis?: boolean | undefined;
55
55
  limiter?: {
56
56
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
57
57
  options?: any;
@@ -62,24 +62,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
62
62
  };
63
63
  flip: {
64
64
  type: globalThis.PropType<boolean | {
65
- mainAxis?: boolean | undefined;
66
- crossAxis?: boolean | undefined;
67
65
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
68
66
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
69
67
  altBoundary?: boolean | undefined;
70
68
  padding?: import("@floating-ui/utils").Padding | undefined;
69
+ crossAxis?: boolean | undefined;
70
+ mainAxis?: boolean | undefined;
71
71
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
72
72
  fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
73
73
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
74
74
  flipAlignment?: boolean | undefined;
75
75
  boundary?: import("@floating-ui/dom").Boundary | undefined;
76
76
  } | import("@floating-ui/dom").Derivable<{
77
- mainAxis?: boolean | undefined;
78
- crossAxis?: boolean | undefined;
79
77
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
80
78
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
81
79
  altBoundary?: boolean | undefined;
82
80
  padding?: import("@floating-ui/utils").Padding | undefined;
81
+ crossAxis?: boolean | undefined;
82
+ mainAxis?: boolean | undefined;
83
83
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
84
84
  fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
85
85
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
@@ -136,21 +136,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
136
136
  };
137
137
  autoPlacement: {
138
138
  type: globalThis.PropType<boolean | {
139
- crossAxis?: boolean | undefined;
140
139
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
141
140
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
142
141
  altBoundary?: boolean | undefined;
143
142
  padding?: import("@floating-ui/utils").Padding | undefined;
143
+ crossAxis?: boolean | undefined;
144
144
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
145
145
  autoAlignment?: boolean | undefined;
146
146
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
147
147
  boundary?: import("@floating-ui/dom").Boundary | undefined;
148
148
  } | import("@floating-ui/dom").Derivable<{
149
- crossAxis?: boolean | undefined;
150
149
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
151
150
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
152
151
  altBoundary?: boolean | undefined;
153
152
  padding?: import("@floating-ui/utils").Padding | undefined;
153
+ crossAxis?: boolean | undefined;
154
154
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
155
155
  autoAlignment?: boolean | undefined;
156
156
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
@@ -214,24 +214,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
214
214
  };
215
215
  shift: {
216
216
  type: globalThis.PropType<boolean | {
217
- mainAxis?: boolean | undefined;
218
- crossAxis?: boolean | undefined;
219
217
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
220
218
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
221
219
  altBoundary?: boolean | undefined;
222
220
  padding?: import("@floating-ui/utils").Padding | undefined;
221
+ crossAxis?: boolean | undefined;
222
+ mainAxis?: boolean | undefined;
223
223
  limiter?: {
224
224
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
225
225
  options?: any;
226
226
  } | undefined;
227
227
  boundary?: import("@floating-ui/dom").Boundary | undefined;
228
228
  } | import("@floating-ui/dom").Derivable<{
229
- mainAxis?: boolean | undefined;
230
- crossAxis?: boolean | undefined;
231
229
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
232
230
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
233
231
  altBoundary?: boolean | undefined;
234
232
  padding?: import("@floating-ui/utils").Padding | undefined;
233
+ crossAxis?: boolean | undefined;
234
+ mainAxis?: boolean | undefined;
235
235
  limiter?: {
236
236
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
237
237
  options?: any;
@@ -242,24 +242,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
242
242
  };
243
243
  flip: {
244
244
  type: globalThis.PropType<boolean | {
245
- mainAxis?: boolean | undefined;
246
- crossAxis?: boolean | undefined;
247
245
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
248
246
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
249
247
  altBoundary?: boolean | undefined;
250
248
  padding?: import("@floating-ui/utils").Padding | undefined;
249
+ crossAxis?: boolean | undefined;
250
+ mainAxis?: boolean | undefined;
251
251
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
252
252
  fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
253
253
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
254
254
  flipAlignment?: boolean | undefined;
255
255
  boundary?: import("@floating-ui/dom").Boundary | undefined;
256
256
  } | import("@floating-ui/dom").Derivable<{
257
- mainAxis?: boolean | undefined;
258
- crossAxis?: boolean | undefined;
259
257
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
260
258
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
261
259
  altBoundary?: boolean | undefined;
262
260
  padding?: import("@floating-ui/utils").Padding | undefined;
261
+ crossAxis?: boolean | undefined;
262
+ mainAxis?: boolean | undefined;
263
263
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
264
264
  fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
265
265
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
@@ -316,21 +316,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
316
316
  };
317
317
  autoPlacement: {
318
318
  type: globalThis.PropType<boolean | {
319
- crossAxis?: boolean | undefined;
320
319
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
321
320
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
322
321
  altBoundary?: boolean | undefined;
323
322
  padding?: import("@floating-ui/utils").Padding | undefined;
323
+ crossAxis?: boolean | undefined;
324
324
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
325
325
  autoAlignment?: boolean | undefined;
326
326
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
327
327
  boundary?: import("@floating-ui/dom").Boundary | undefined;
328
328
  } | import("@floating-ui/dom").Derivable<{
329
- crossAxis?: boolean | undefined;
330
329
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
331
330
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
332
331
  altBoundary?: boolean | undefined;
333
332
  padding?: import("@floating-ui/utils").Padding | undefined;
333
+ crossAxis?: boolean | undefined;
334
334
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
335
335
  autoAlignment?: boolean | undefined;
336
336
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
@@ -369,29 +369,29 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
369
369
  onAfterExpand?: ((...args: any[]) => any) | undefined;
370
370
  onAfterCollapse?: ((...args: any[]) => any) | undefined;
371
371
  }, {
372
+ modelValue: boolean;
372
373
  reference: HTMLElement | null;
373
374
  placement: "left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
374
375
  strategy: "absolute" | "fixed";
375
- modelValue: boolean;
376
376
  shift: boolean | {
377
- mainAxis?: boolean | undefined;
378
- crossAxis?: boolean | undefined;
379
377
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
380
378
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
381
379
  altBoundary?: boolean | undefined;
382
380
  padding?: import("@floating-ui/utils").Padding | undefined;
381
+ crossAxis?: boolean | undefined;
382
+ mainAxis?: boolean | undefined;
383
383
  limiter?: {
384
384
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
385
385
  options?: any;
386
386
  } | undefined;
387
387
  boundary?: import("@floating-ui/dom").Boundary | undefined;
388
388
  } | import("@floating-ui/dom").Derivable<{
389
- mainAxis?: boolean | undefined;
390
- crossAxis?: boolean | undefined;
391
389
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
392
390
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
393
391
  altBoundary?: boolean | undefined;
394
392
  padding?: import("@floating-ui/utils").Padding | undefined;
393
+ crossAxis?: boolean | undefined;
394
+ mainAxis?: boolean | undefined;
395
395
  limiter?: {
396
396
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
397
397
  options?: any;
@@ -400,24 +400,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
400
400
  }> | undefined;
401
401
  role: "listbox" | "menu";
402
402
  flip: boolean | {
403
- mainAxis?: boolean | undefined;
404
- crossAxis?: boolean | undefined;
405
403
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
406
404
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
407
405
  altBoundary?: boolean | undefined;
408
406
  padding?: import("@floating-ui/utils").Padding | undefined;
407
+ crossAxis?: boolean | undefined;
408
+ mainAxis?: boolean | undefined;
409
409
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
410
410
  fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
411
411
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
412
412
  flipAlignment?: boolean | undefined;
413
413
  boundary?: import("@floating-ui/dom").Boundary | undefined;
414
414
  } | import("@floating-ui/dom").Derivable<{
415
- mainAxis?: boolean | undefined;
416
- crossAxis?: boolean | undefined;
417
415
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
418
416
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
419
417
  altBoundary?: boolean | undefined;
420
418
  padding?: import("@floating-ui/utils").Padding | undefined;
419
+ crossAxis?: boolean | undefined;
420
+ mainAxis?: boolean | undefined;
421
421
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
422
422
  fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
423
423
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
@@ -467,21 +467,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
467
467
  }> | undefined;
468
468
  offset: string | import("@floating-ui/vue").OffsetOptions | undefined;
469
469
  autoPlacement: boolean | {
470
- crossAxis?: boolean | undefined;
471
470
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
472
471
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
473
472
  altBoundary?: boolean | undefined;
474
473
  padding?: import("@floating-ui/utils").Padding | undefined;
474
+ crossAxis?: boolean | undefined;
475
475
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
476
476
  autoAlignment?: boolean | undefined;
477
477
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
478
478
  boundary?: import("@floating-ui/dom").Boundary | undefined;
479
479
  } | import("@floating-ui/dom").Derivable<{
480
- crossAxis?: boolean | undefined;
481
480
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
482
481
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
483
482
  altBoundary?: boolean | undefined;
484
483
  padding?: import("@floating-ui/utils").Padding | undefined;
484
+ crossAxis?: boolean | undefined;
485
485
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
486
486
  autoAlignment?: boolean | undefined;
487
487
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
@@ -21,6 +21,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
21
21
  type: StringConstructor;
22
22
  default: string;
23
23
  };
24
+ current: BooleanConstructor;
24
25
  active: BooleanConstructor;
25
26
  pressed: BooleanConstructor;
26
27
  label: (StringConstructor | NumberConstructor)[];
@@ -48,6 +49,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
48
49
  type: StringConstructor;
49
50
  default: string;
50
51
  };
52
+ current: BooleanConstructor;
51
53
  active: BooleanConstructor;
52
54
  pressed: BooleanConstructor;
53
55
  label: (StringConstructor | NumberConstructor)[];
@@ -57,6 +59,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
57
59
  type: "button" | "submit" | "reset";
58
60
  ariaLabel: string;
59
61
  rel: string;
62
+ current: boolean;
60
63
  active: boolean;
61
64
  pressed: boolean;
62
65
  }, {}>, {
@@ -43,24 +43,24 @@ export declare const VvDropdownProps: {
43
43
  };
44
44
  shift: {
45
45
  type: PropType<boolean | {
46
- mainAxis?: boolean | undefined;
47
- crossAxis?: boolean | undefined;
48
46
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
49
47
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
50
48
  altBoundary?: boolean | undefined;
51
49
  padding?: import("@floating-ui/utils").Padding | undefined;
50
+ crossAxis?: boolean | undefined;
51
+ mainAxis?: boolean | undefined;
52
52
  limiter?: {
53
53
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
54
54
  options?: any;
55
55
  } | undefined;
56
56
  boundary?: import("@floating-ui/dom").Boundary | undefined;
57
57
  } | import("@floating-ui/dom").Derivable<{
58
- mainAxis?: boolean | undefined;
59
- crossAxis?: boolean | undefined;
60
58
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
61
59
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
62
60
  altBoundary?: boolean | undefined;
63
61
  padding?: import("@floating-ui/utils").Padding | undefined;
62
+ crossAxis?: boolean | undefined;
63
+ mainAxis?: boolean | undefined;
64
64
  limiter?: {
65
65
  fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
66
66
  options?: any;
@@ -71,24 +71,24 @@ export declare const VvDropdownProps: {
71
71
  };
72
72
  flip: {
73
73
  type: PropType<boolean | {
74
- mainAxis?: boolean | undefined;
75
- crossAxis?: boolean | undefined;
76
74
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
77
75
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
78
76
  altBoundary?: boolean | undefined;
79
77
  padding?: import("@floating-ui/utils").Padding | undefined;
78
+ crossAxis?: boolean | undefined;
79
+ mainAxis?: boolean | undefined;
80
80
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
81
81
  fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
82
82
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
83
83
  flipAlignment?: boolean | undefined;
84
84
  boundary?: import("@floating-ui/dom").Boundary | undefined;
85
85
  } | import("@floating-ui/dom").Derivable<{
86
- mainAxis?: boolean | undefined;
87
- crossAxis?: boolean | undefined;
88
86
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
89
87
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
90
88
  altBoundary?: boolean | undefined;
91
89
  padding?: import("@floating-ui/utils").Padding | undefined;
90
+ crossAxis?: boolean | undefined;
91
+ mainAxis?: boolean | undefined;
92
92
  fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
93
93
  fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
94
94
  fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
@@ -145,21 +145,21 @@ export declare const VvDropdownProps: {
145
145
  };
146
146
  autoPlacement: {
147
147
  type: PropType<boolean | {
148
- crossAxis?: boolean | undefined;
149
148
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
150
149
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
151
150
  altBoundary?: boolean | undefined;
152
151
  padding?: import("@floating-ui/utils").Padding | undefined;
152
+ crossAxis?: boolean | undefined;
153
153
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
154
154
  autoAlignment?: boolean | undefined;
155
155
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
156
156
  boundary?: import("@floating-ui/dom").Boundary | undefined;
157
157
  } | import("@floating-ui/dom").Derivable<{
158
- crossAxis?: boolean | undefined;
159
158
  rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
160
159
  elementContext?: import("@floating-ui/core").ElementContext | undefined;
161
160
  altBoundary?: boolean | undefined;
162
161
  padding?: import("@floating-ui/utils").Padding | undefined;
162
+ crossAxis?: boolean | undefined;
163
163
  alignment?: import("@floating-ui/utils").Alignment | null | undefined;
164
164
  autoAlignment?: boolean | undefined;
165
165
  allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
@@ -104,6 +104,12 @@ const ActiveProps = {
104
104
  */
105
105
  active: Boolean
106
106
  };
107
+ const CurrentProps = {
108
+ /**
109
+ * Whether the item is current
110
+ */
111
+ current: Boolean
112
+ };
107
113
  const PressedProps = {
108
114
  /**
109
115
  * Whether the item is pressed
@@ -234,6 +240,7 @@ const ActionProps = {
234
240
  ...LabelProps,
235
241
  ...PressedProps,
236
242
  ...ActiveProps,
243
+ ...CurrentProps,
237
244
  ...LinkProps,
238
245
  /**
239
246
  * Button type
@@ -360,7 +367,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
360
367
  class: {
361
368
  active: _ctx.active,
362
369
  pressed: unref(pressed),
363
- disabled: _ctx.disabled
370
+ disabled: _ctx.disabled,
371
+ current: _ctx.current
364
372
  },
365
373
  onClickPassive: onClick,
366
374
  onMouseoverPassive: onMouseover,
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownAction=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{}),u=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(u||{}),i=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(i||{});const s=Symbol.for("volver"),d=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),f=Symbol.for("dropdownAction"),p={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(i).includes(e)},rel:{type:String,default:"noopener noreferrer"}},v={disabled:Boolean},m={active:Boolean},b={pressed:Boolean},y={label:[String,Number]},g={modifiers:[String,Array]};n.before,r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const k={...v,...y,...b,...m,...p,type:{type:String,default:l.button,validator:e=>Object.values(l).includes(e)},ariaLabel:{type:String,default:void 0}},h=k;const x=e.defineComponent({name:"VvAction",props:h,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:r}){const n=t,l=e.inject(s),u=e.ref(null);o({$el:u});const{reference:i,bus:c,aria:p,expanded:v}=e.inject(d,{});e.watch((()=>u.value),(e=>{i&&(i.value=e)}));const m=e.computed((()=>n.pressed||(null==v?void 0:v.value))),{role:b}=e.inject(f,{}),y=e.computed((()=>{switch(!0){case n.disabled:return a.button;case void 0!==n.to:return(null==l?void 0:l.nuxt)?a.nuxtLink:a.routerLink;case void 0!==n.href:return a.a;default:return a.button}})),g=e.computed((()=>{const e={...null==p?void 0:p.value,ariaPressed:!!m.value||void 0,ariaLabel:n.ariaLabel,role:null==b?void 0:b.value};switch(y.value){case a.a:return{...e,href:n.href,target:n.target,rel:n.rel};case a.routerLink:case a.nuxtLink:return{...e,to:n.to,target:n.target};default:return{...e,type:n.type,disabled:n.disabled}}})),k=e=>{n.disabled?e.preventDefault():(null==c||c.emit("click",e),r("click",e))},h=e=>{null==c||c.emit("mouseover",e),r("mouseover",e)},x=e=>{null==c||c.emit("mouseleave",e),r("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(g),{ref_key:"element",ref:u,class:{active:t.active,pressed:e.unref(m),disabled:t.disabled},onClickPassive:k,onMouseoverPassive:h,onMouseleavePassive:x}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});const B=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:r,expanded:n}=e.inject(c,{}),l=e.ref(null);!function({expanded:t}){e.provide(f,{role:e.ref(u.menuitem),expanded:t})}({expanded:n});const a=o.useElementHover(l),{focused:i}=o.useFocus(l),{focused:s}=o.useFocusWithin(l);return e.watch(a,(e=>{e&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(r)},{ref_key:"element",ref:l,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}});return e.defineComponent({name:"VvDropdownAction",props:{...k,...g},setup(t){const o=t,{modifiers:r}=e.toRefs(o),n=function(t,o,r){return e.computed((()=>{const n={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(n[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{n[`${t}--${o}`]=e.unref(r.value[o])})),n}))}("vv-dropdown-action",r);return(t,o)=>(e.openBlock(),e.createBlock(B,null,{default:e.withCtx((()=>[e.createVNode(x,e.mergeProps({disabled:t.disabled,pressed:t.pressed,active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{class:e.unref(n)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"])])),_:3}))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownAction=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{}),u=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(u||{}),i=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(i||{});const s=Symbol.for("volver"),d=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),f=Symbol.for("dropdownAction"),p={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(i).includes(e)},rel:{type:String,default:"noopener noreferrer"}},v={disabled:Boolean},m={active:Boolean},b={current:Boolean},y={pressed:Boolean},g={label:[String,Number]},k={modifiers:[String,Array]};n.before,r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const h={...v,...g,...y,...m,...b,...p,type:{type:String,default:l.button,validator:e=>Object.values(l).includes(e)},ariaLabel:{type:String,default:void 0}},x=h;const B=e.defineComponent({name:"VvAction",props:x,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:r}){const n=t,l=e.inject(s),u=e.ref(null);o({$el:u});const{reference:i,bus:c,aria:p,expanded:v}=e.inject(d,{});e.watch((()=>u.value),(e=>{i&&(i.value=e)}));const m=e.computed((()=>n.pressed||(null==v?void 0:v.value))),{role:b}=e.inject(f,{}),y=e.computed((()=>{switch(!0){case n.disabled:return a.button;case void 0!==n.to:return(null==l?void 0:l.nuxt)?a.nuxtLink:a.routerLink;case void 0!==n.href:return a.a;default:return a.button}})),g=e.computed((()=>{const e={...null==p?void 0:p.value,ariaPressed:!!m.value||void 0,ariaLabel:n.ariaLabel,role:null==b?void 0:b.value};switch(y.value){case a.a:return{...e,href:n.href,target:n.target,rel:n.rel};case a.routerLink:case a.nuxtLink:return{...e,to:n.to,target:n.target};default:return{...e,type:n.type,disabled:n.disabled}}})),k=e=>{n.disabled?e.preventDefault():(null==c||c.emit("click",e),r("click",e))},h=e=>{null==c||c.emit("mouseover",e),r("mouseover",e)},x=e=>{null==c||c.emit("mouseleave",e),r("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(g),{ref_key:"element",ref:u,class:{active:t.active,pressed:e.unref(m),disabled:t.disabled,current:t.current},onClickPassive:k,onMouseoverPassive:h,onMouseleavePassive:x}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});const S=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:r,expanded:n}=e.inject(c,{}),l=e.ref(null);!function({expanded:t}){e.provide(f,{role:e.ref(u.menuitem),expanded:t})}({expanded:n});const a=o.useElementHover(l),{focused:i}=o.useFocus(l),{focused:s}=o.useFocusWithin(l);return e.watch(a,(e=>{e&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(r)},{ref_key:"element",ref:l,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}});return e.defineComponent({name:"VvDropdownAction",props:{...h,...k},setup(t){const o=t,{modifiers:r}=e.toRefs(o),n=function(t,o,r){return e.computed((()=>{const n={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(n[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{n[`${t}--${o}`]=e.unref(r.value[o])})),n}))}("vv-dropdown-action",r);return(t,o)=>(e.openBlock(),e.createBlock(S,null,{default:e.withCtx((()=>[e.createVNode(B,e.mergeProps({disabled:t.disabled,pressed:t.pressed,active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{class:e.unref(n)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"])])),_:3}))}})}));
@@ -79,6 +79,12 @@ const ActiveProps = {
79
79
  */
80
80
  active: Boolean
81
81
  };
82
+ const CurrentProps = {
83
+ /**
84
+ * Whether the item is current
85
+ */
86
+ current: Boolean
87
+ };
82
88
  const PressedProps = {
83
89
  /**
84
90
  * Whether the item is pressed
@@ -203,6 +209,7 @@ const LabelProps = {
203
209
  ...LabelProps,
204
210
  ...PressedProps,
205
211
  ...ActiveProps,
212
+ ...CurrentProps,
206
213
  ...LinkProps,
207
214
  /**
208
215
  * Button type
@@ -1 +1 @@
1
- !function(o,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(o="undefined"!=typeof globalThis?globalThis:o||self).VvDropdownOptgroup=e(o.vue)}(this,(function(o){"use strict";var e=(o=>(o.left="left",o.right="right",o.top="top",o.bottom="bottom",o))(e||{}),t=(o=>(o.before="before",o.after="after",o))(t||{}),n=(o=>(o.button="button",o.submit="submit",o.reset="reset",o))(n||{});Boolean,Boolean,Boolean;const r={label:[String,Number]};t.before,e.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button;const l={class:"vv-dropdown-optgroup",role:"presentation",tabindex:"-1"};return o.defineComponent({name:"VvDropdownOptgroup",props:{...r},setup(e){const t=e;return(e,n)=>(o.openBlock(),o.createElementBlock("li",l,o.toDisplayString(t.label),1))}})}));
1
+ !function(o,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(o="undefined"!=typeof globalThis?globalThis:o||self).VvDropdownOptgroup=e(o.vue)}(this,(function(o){"use strict";var e=(o=>(o.left="left",o.right="right",o.top="top",o.bottom="bottom",o))(e||{}),t=(o=>(o.before="before",o.after="after",o))(t||{}),n=(o=>(o.button="button",o.submit="submit",o.reset="reset",o))(n||{});Boolean,Boolean,Boolean,Boolean;const l={label:[String,Number]};t.before,e.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button;const r={class:"vv-dropdown-optgroup",role:"presentation",tabindex:"-1"};return o.defineComponent({name:"VvDropdownOptgroup",props:{...l},setup(e){const t=e;return(e,n)=>(o.openBlock(),o.createElementBlock("li",r,o.toDisplayString(t.label),1))}})}));
@@ -138,6 +138,12 @@ const ActiveProps = {
138
138
  */
139
139
  active: Boolean
140
140
  };
141
+ const CurrentProps = {
142
+ /**
143
+ * Whether the item is current
144
+ */
145
+ current: Boolean
146
+ };
141
147
  const PressedProps = {
142
148
  /**
143
149
  * Whether the item is pressed
@@ -274,6 +280,7 @@ const UnselectableProps = {
274
280
  ...LabelProps,
275
281
  ...PressedProps,
276
282
  ...ActiveProps,
283
+ ...CurrentProps,
277
284
  ...LinkProps,
278
285
  /**
279
286
  * Button type
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownOption=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),l=(e=>(e.before="before",e.after="after",e))(l||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),s=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(s||{});const d=Symbol.for("dropdownItem"),i=Symbol.for("dropdownAction");const a=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:n,expanded:l}=e.inject(d,{}),r=e.ref(null);!function({expanded:t}){e.provide(i,{role:e.ref(s.menuitem),expanded:t})}({expanded:l});const a=o.useElementHover(r),{focused:u}=o.useFocus(r),{focused:c}=o.useFocusWithin(r);return e.watch(a,(e=>{e&&(u.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(n)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":e.unref(u)||e.unref(c)}]}),[e.renderSlot(t.$slots,"default")],16))}}),u={disabled:Boolean},c={selected:Boolean},f=(Boolean,Boolean,{modifiers:[String,Array]});l.before;const p={unselectable:{type:Boolean,default:!0}};n.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,r.button;const b=["title"];return e.defineComponent({name:"VvDropdownOption",props:{...u,...c,...p,...f,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String}},setup(t){const o=t,{modifiers:n}=e.toRefs(o),l=function(t,o,n){return e.computed((()=>{const l={[t]:!0},r="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return r&&Array.isArray(r)&&r.forEach((e=>{e&&(l[`${t}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((o=>{l[`${t}--${o}`]=e.unref(n.value[o])})),l}))}("vv-dropdown-option",n,e.computed((()=>({disabled:o.disabled,selected:o.selected,unselectable:o.unselectable&&o.selected})))),r=e.computed((()=>o.selected?o.unselectable?o.deselectHintLabel:o.selectedHintLabel:o.disabled?void 0:o.selectHintLabel));return(t,o)=>(e.openBlock(),e.createBlock(a,{class:e.normalizeClass(e.unref(l)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(r)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)),1)]))],8,b)])),_:3},8,["class","tabindex","aria-selected","aria-disabled"]))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownOption=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),l=(e=>(e.before="before",e.after="after",e))(l||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),s=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(s||{});const d=Symbol.for("dropdownItem"),a=Symbol.for("dropdownAction");const i=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:n,expanded:l}=e.inject(d,{}),r=e.ref(null);!function({expanded:t}){e.provide(a,{role:e.ref(s.menuitem),expanded:t})}({expanded:l});const i=o.useElementHover(r),{focused:u}=o.useFocus(r),{focused:c}=o.useFocusWithin(r);return e.watch(i,(e=>{e&&(u.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(n)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":e.unref(u)||e.unref(c)}]}),[e.renderSlot(t.$slots,"default")],16))}}),u={disabled:Boolean},c={selected:Boolean},f=(Boolean,Boolean,Boolean,{modifiers:[String,Array]});l.before;const p={unselectable:{type:Boolean,default:!0}};n.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,r.button;const b=["title"];return e.defineComponent({name:"VvDropdownOption",props:{...u,...c,...p,...f,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String}},setup(t){const o=t,{modifiers:n}=e.toRefs(o),l=function(t,o,n){return e.computed((()=>{const l={[t]:!0},r="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return r&&Array.isArray(r)&&r.forEach((e=>{e&&(l[`${t}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((o=>{l[`${t}--${o}`]=e.unref(n.value[o])})),l}))}("vv-dropdown-option",n,e.computed((()=>({disabled:o.disabled,selected:o.selected,unselectable:o.unselectable&&o.selected})))),r=e.computed((()=>o.selected?o.unselectable?o.deselectHintLabel:o.selectedHintLabel:o.disabled?void 0:o.selectHintLabel));return(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(e.unref(l)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(r)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)),1)]))],8,b)])),_:3},8,["class","tabindex","aria-selected","aria-disabled"]))}})}));
@@ -29,8 +29,8 @@ declare const _default: import("vue").DefineComponent<{
29
29
  }>> & {
30
30
  onClear?: ((...args: any[]) => any) | undefined;
31
31
  }, {
32
- label: string;
33
32
  disabled: boolean;
33
+ label: string;
34
34
  icon: string;
35
35
  }, {}>;
36
36
  export default _default;
@@ -457,6 +457,12 @@ const ActiveProps = {
457
457
  */
458
458
  active: Boolean
459
459
  };
460
+ const CurrentProps = {
461
+ /**
462
+ * Whether the item is current
463
+ */
464
+ current: Boolean
465
+ };
460
466
  const PressedProps = {
461
467
  /**
462
468
  * Whether the item is pressed
@@ -701,6 +707,7 @@ const InputTextareaProps = {
701
707
  ...LabelProps,
702
708
  ...PressedProps,
703
709
  ...ActiveProps,
710
+ ...CurrentProps,
704
711
  ...LinkProps,
705
712
  /**
706
713
  * Button type
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("vue-imask"),require("@iconify/vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","vue-imask","@iconify/vue","nanoid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputText=t(e.vue,e.vueImask,e.vue$1,e.nanoid,e.core)}(this,(function(e,t,l,o,a){"use strict";function n(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function i(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const r={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var u=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(u||{}),s=(e=>(e.before="before",e.after="after",e))(s||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{});const c=Symbol.for("volver");function v(){return e.inject(c)}function p(t,l,o){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const m=e.defineComponent({name:"VvIcon",props:r,setup(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=v(),{modifiers:r}=e.toRefs(o),u=p("vv-icon",r),s=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),d=e.computed((()=>{const e=o.name??"",t=`@${s.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${s.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${s.value}:${a.prefix}:${e}`:e}));function c(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${s.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!l.iconExists(`@${s.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}}),f={valid:Boolean,validLabel:[String,Array]},h={invalid:Boolean,invalidLabel:[String,Array]},b={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},g={disabled:Boolean},S=(Boolean,Boolean,{label:[String,Number]}),y={readonly:Boolean},w={modifiers:[String,Array]},k={hintLabel:{type:String,default:""}},L={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},B={debounce:[Number,String]},E={icon:{type:[String,Object]},iconPosition:{type:String,default:s.before,validation:e=>Object.values(s).includes(e)}},$={tabindex:{type:[String,Number],default:0}},x={floating:Boolean},A={id:[String,Number]};u.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const T={...{...A,name:{type:String,required:!0}},...{autofocus:Boolean},...{autocomplete:{type:String,default:"off"}},...$,...g,...y,...f,...h,...k,...b,...w,...L,...B,...E,...x,...S,minlength:[String,Number],maxlength:[String,Number],placeholder:String,required:Boolean};d.button;const P={TEXT:"text",PASSWORD:"password",NUMBER:"number",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",DATE:"date",TIME:"time",DATETIME_LOCAL:"datetime-local",MONTH:"month",WEEK:"week"},C="eye-on",D="eye-off",I="calendar",O="time",V="color",_={...T,modelValue:[String,Number],type:{type:String,default:P.TEXT,validator:e=>Object.values(P).includes(e)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:String,default:C},iconHidePassword:{type:String,default:D},iconClear:{type:String,default:"close"},labelStepUp:{type:String,default:"Increase value"},labelStepDown:{type:String,default:"Decrease value"},labelShowPassword:{type:String,default:"Show password"},labelHidePassword:{type:String,default:"Hide password"},labelClear:{type:String,default:"Clear"},iMask:{type:Object,default:void 0},masked:{type:String,default:void 0},autoWidth:{type:Boolean,default:!1},hideActions:{type:Boolean,default:!1},unit:{type:String},selectOnFocus:{type:Boolean,default:!1}},N=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:String,default:C},iconHide:{type:String,default:D}},emits:["toggle-password"],setup(t,{emit:l}){const o=e.ref(!1),a=e.computed((()=>o.value?t.iconHide:t.iconShow));return{active:o,activeIcon:a,onClick:function(e){null==e||e.stopPropagation(),t.disabled||(o.value=!o.value,l("toggle-password",o.value))}}},render(){const t=e.h(m,{name:this.activeIcon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),M=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:e=>["up","down"].includes(e),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:l}){const o=e.computed((()=>"up"===t.mode));return{isUp:o,onClick:e=>{null==e||e.stopPropagation(),t.disabled||l(o.value?"step-up":"step-down")}}},render(){return e.h("button",{class:["vv-input-text__action vv-input-text__action-chevron",this.isUp&&"vv-input-text__action-chevron-up"],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}}),R=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:String,default:"close"}},emits:["clear"],setup:(e,{emit:t})=>({onClick:function(l){null==l||l.stopPropagation(),e.disabled||t("clear")}}),render(){const t=e.h(m,{name:this.icon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.label,type:"button",onClick:this.onClick},t)}});function H(t,l){return{name:"VvInputTextActions",components:{VvIcon:m,VvInputPasswordAction:N,VvInputStepAction:M,VvInputClearAction:R},setup:()=>({isDisabled:e.computed((()=>l.disabled||l.readonly)),labelStepUp:l.labelStepUp,labelStepDown:l.labelStepDown,labelShowPassword:l.labelShowPassword,labelHidePassword:l.labelHidePassword,labelClear:l.labelClear,iconShowPassword:l.iconShowPassword,iconHidePassword:l.iconHidePassword}),render(){let o=null;switch(t){case P.SEARCH:{const{onClear:t}=this.$attrs;o=[e.h(R,{disabled:this.isDisabled,label:this.labelShowPassword,onClear:t})];break}case P.PASSWORD:{const{onTogglePassword:t}=this.$attrs;o=[e.h(N,{disabled:this.isDisabled,onTogglePassword:t,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case P.NUMBER:{const{onStepUp:t,onStepDown:a}=this.$attrs;o=[e.h(M,{mode:"up",disabled:this.isDisabled||void 0!==l.max&&l.modelValue===l.max,label:this.labelStepUp,onStepUp:t,onStepDown:a}),e.h(M,{mode:"down",disabled:this.isDisabled||void 0!==l.min&&l.modelValue===l.min,label:this.labelStepDown,onStepUp:t,onStepDown:a})];break}}return Array.isArray(o)?e.h("div",{class:"vv-input-text__actions-group"},o):o}}}const U=["for"],j={class:"vv-input-text__wrapper"},F={key:0,class:"vv-input-text__input-before"},W=["onClick"],q=["id"],z={key:1,class:"vv-input-text__unit"},K={key:5,class:"vv-input-text__input-after"},X={key:6,class:"vv-input-text__limit"};return e.defineComponent({name:"VvInputText",props:_,emits:["update:modelValue","update:masked","accept","accept:typed","accept:masked","accept:unmasked","complete","complete:typed","complete:masked","complete:unmasked","focus","blur","keyup","keydown","keypress"],setup(l,{expose:r,emit:d}){const c=l,f=e.useSlots(),h=function(t,l,o){const a=v(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===n&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===n&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}("VvInputText",_,c),{id:b,icon:g,iconPosition:S,label:y,modelValue:w,count:k,valid:L,invalid:B,loading:E,debounce:$,maxlength:x,minlength:A,type:T,iMask:C,step:D}=e.toRefs(c),N=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(b),M=e.computed((()=>`${N.value}-hint`)),R=e.computed((()=>c.floating&&n(c.placeholder)?" ":c.placeholder)),J=e.ref(!1),{el:Y,mask:G,typed:Q,masked:Z,unmasked:ee}=t.useIMask(e.computed((()=>(null==C?void 0:C.value)??{mask:/./})),{emit:d,onAccept:()=>{if(J.value){if(d("update:masked",Z.value),T.value===P.NUMBER){if(""===Z.value){if(null===oe.value||void 0===oe.value)return;return void(oe.value=void 0)}return"number"!=typeof Q.value?void(oe.value=Number(Q.value)):void(oe.value=Q.value)}if(T.value===P.DATE){if(Y.value instanceof HTMLInputElement&&"date"===Y.value.type)return void(oe.value=Y.value.value);let e=Q.value;if(null===e||""===e){if(!oe.value)return;return void(oe.value="")}return e instanceof Date||(e=new Date(e)),void(oe.value=`${e.getFullYear()}-${("0"+(e.getMonth()+1)).slice(-2)}-${("0"+e.getDate()).slice(-2)}`)}if(T.value===P.DATETIME_LOCAL){if(Y.value instanceof HTMLInputElement&&"datetime-local"===Y.value.type)return void(oe.value=Y.value.value);let e=Q.value;if(null===e||""===e){if(!oe.value)return;return void(oe.value="")}return Q.value instanceof Date||(e=new Date(e)),void(oe.value=`${e.getFullYear()}-${("0"+(e.getMonth()+1)).slice(-2)}-${("0"+e.getDate()).slice(-2)}T${("0"+e.getHours()).slice(-2)}:${("0"+e.getMinutes()).slice(-2)}`)}(oe.value||ee.value)&&(oe.value=ee.value)}}});e.onMounted((()=>{G.value&&(J.value=!0,Q.value=oe.value??"")})),e.watch((()=>c.modelValue),(e=>{var t;G.value&&(Q.value=e&&(null==(t=null==C?void 0:C.value)?void 0:t.mask)===Date?new Date(e):e??"")})),e.watch((()=>c.masked),(e=>{Z.value=e??""}));const te=Y,le=e.ref();r({$inner:le});const oe=function(t,l,o=0,{getter:a=(e=>e),setter:n=(e=>e)}={}){let i;return"string"==typeof o&&(o=parseInt(o)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{l("update:modelValue",n(e))}),o)}})}(w,d,(null==$?void 0:$.value)??0),{focused:ae}=function(t,l){const{focused:o}=a.useFocus(t);return e.watch(o,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:o}}(te,d),ne=e.computed((()=>ae.value&&!c.disabled&&!c.readonly));e.watch(ne,(e=>{e&&h.value.selectOnFocus&&te.value&&te.value.select()}));const ie=a.useElementVisibility(te);e.watch(ie,(e=>{e&&c.autofocus&&!c.disabled&&!c.readonly&&(ae.value=!0)}));const re=e.ref(!1),ue=e.computed((()=>c.type===P.PASSWORD)),se=()=>{re.value=!re.value},de=e.computed((()=>c.type===P.TIME||c.type===P.DATETIME_LOCAL||c.type===P.DATE||c.type===P.WEEK||c.type===P.MONTH)),ce=e.computed((()=>c.type===P.NUMBER)),ve=()=>{if(we.value){if(null==C?void 0:C.value)return void(Q.value=Q.value+Number((null==D?void 0:D.value)??1));te.value.stepUp(),oe.value=e.unref(te).value}},pe=()=>{if(we.value){if(null==C?void 0:C.value)return void(Q.value=Q.value-Number((null==D?void 0:D.value)??1));te.value.stepDown(),oe.value=e.unref(te).value}},me=e.computed((()=>c.type===P.SEARCH)),fe=()=>{oe.value=""},{hasIcon:he,hasIconBefore:be,hasIconAfter:ge}=function(t,l){const o=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===s.before))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===s.after))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.left))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.right))),r=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.top))),d=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),hasIconLeft:n,hasIconRight:i,hasIconTop:r,hasIconBottom:d,hasIconBefore:o,hasIconAfter:a}}(g,S),Se=e.computed((()=>{switch(c.type){case P.COLOR:return{name:V};case P.DATE:case P.DATETIME_LOCAL:case P.WEEK:case P.MONTH:return{name:I};case P.TIME:return{name:O};default:return""}})),{formatted:ye}=function(t,l){const o=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==l?void 0:l.lowerLimit)&&o.value<(null==l?void 0:l.lowerLimit)?o.value-l.lowerLimit:void 0!==(null==l?void 0:l.upperLimit)&&o.value<(null==l?void 0:l.upperLimit)?l.upperLimit-o.value:0)),n=e.computed((()=>{if(!1===(null==l?void 0:l.mode))return"";if("limit"===(null==l?void 0:l.mode)&&(null==l?void 0:l.upperLimit))return`${o.value} / ${l.lowerLimit?`${l.lowerLimit}-`:""}${l.upperLimit}`;if("countdown"===(null==l?void 0:l.mode)){if(0===a.value)return;return a}return o.value}));return{length:o,gap:a,formatted:n}}(oe,{mode:k.value,upperLimit:Number(null==x?void 0:x.value),lowerLimit:Number(null==A?void 0:A.value)}),we=e.computed((()=>!c.disabled&&!c.readonly)),ke=e.computed((()=>we.value?c.tabindex:-1)),Le=e.computed((()=>!n(w))),Be=e.computed((()=>!0===B.value||!0!==L.value&&void 0)),{modifiers:Ee}=e.toRefs(c),$e=p("vv-input-text",Ee,e.computed((()=>({valid:L.value,invalid:B.value,loading:E.value,disabled:c.disabled,readonly:c.readonly,"icon-before":be.value,"icon-after":ge.value||!n(Se),floating:c.floating&&!n(c.label),dirty:Le.value,focus:ne.value,"auto-width":c.autoWidth})))),xe=e.computed((()=>{const e=ue.value&&re.value?P.TEXT:!de.value||Le.value||ae.value?(null==C?void 0:C.value)?P.TEXT:c.type:P.TEXT,t={type:e,name:c.name,tabindex:ke.value,disabled:c.disabled,readonly:c.readonly,required:c.required,autocomplete:c.autocomplete,"aria-invalid":Be.value,"aria-describedby":Pe.value?M.value:void 0,"aria-errormessage":Ce.value?M.value:void 0};return e!==P.DATE&&e!==P.MONTH&&e!==P.WEEK&&e!==P.TIME&&e!==P.DATETIME_LOCAL&&e!==P.NUMBER||(t.step=c.step,t.max=void 0!==c.max?String(c.max):void 0,t.min=void 0!==c.min?String(c.min):void 0),e!==P.TEXT&&e!==P.SEARCH&&e!==P.URL&&e!==P.TEL&&e!==P.EMAIL&&e!==P.PASSWORD&&e!==P.NUMBER||(t.placeholder=R.value),e!==P.TEXT&&e!==P.SEARCH&&e!==P.URL&&e!==P.TEL&&e!==P.EMAIL&&e!==P.PASSWORD||(t.minlength=c.minlength,t.maxlength=c.maxlength,t.pattern=c.pattern),e===P.EMAIL&&(t.multiple=c.multiple),t})),Ae=e.computed((()=>({valid:c.valid,invalid:c.invalid,modelValue:c.modelValue,togglePassword:se,stepUp:ve,stepDown:pe,clear:fe}))),{HintSlot:Te,hasHintLabelOrSlot:Pe,hasInvalidLabelOrSlot:Ce,hintSlotScope:De}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>i(o.value.invalidLabel))),n=e.computed((()=>i(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),u=e.computed((()=>o.value.hintLabel)),s=e.computed((()=>Boolean(o.value.loading&&(l.loading||r.value)))),d=e.computed((()=>!s.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),c=e.computed((()=>!s.value&&!d.value&&Boolean(o.value.valid&&(l.valid||n.value)))),v=e.computed((()=>!s.value&&!d.value&&!c.value&&Boolean(l.hint||u.value))),p=e.computed((()=>d.value||c.value||s.value||v.value)),m=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),f=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:p,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:u,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:s,hasHintLabelOrSlot:v}),render(){var t,l,o,a,n,i,r,u;if(this.isVisible){let s;return this.hasInvalidLabelOrSlot&&(s="alert"),this.hasValidLabelOrSlot&&(s="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:s},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:s},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:s},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:s},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:s,hintSlotScope:m,HintSlot:f}}(h,f),Ie=H(P.PASSWORD,c),Oe=H(P.NUMBER,c),Ve=H(P.SEARCH,c),_e=()=>{we.value&&(ae.value=!0)},Ne=e.computed((()=>{if(c.autoWidth)return{width:void 0!==oe.value?`${String(oe.value).length+1}ch`:void 0}})),Me=e=>{switch(e.code){case"ArrowUp":ce.value&&(ve(),e.preventDefault());break;case"ArrowDown":ce.value&&(pe(),e.preventDefault())}d("keydown",e)};return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref($e))},[e.unref(y)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(N),class:"vv-input-text__label"},e.toDisplayString(e.unref(y)),9,U)):e.createCommentVNode("",!0),e.createElementVNode("div",j,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",F,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(Ae))))])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"innerEl",ref:le,class:"vv-input-text__inner",onClick:e.withModifiers(_e,["stop"])},[e.unref(be)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0,class:"vv-input-text__icon"},e.unref(he)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(N),ref_key:"inputEl",ref:te},e.unref(xe),{style:e.unref(Ne),onKeyup:l[0]||(l[0]=e=>d("keyup",e)),onKeydown:Me,onKeypress:l[1]||(l[1]=e=>d("keypress",e))}),null,16,q),(t.unit||t.$slots.unit)&&e.unref(Le)?(e.openBlock(),e.createElementBlock("div",z,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(Ae))),(()=>[e.createTextVNode(e.toDisplayString(t.unit),1)]))])):e.createCommentVNode("",!0)],8,W),e.unref(ge)||e.unref(Se)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:1,class:"vv-input-text__icon vv-input-text__icon-after"},e.unref(ge)?e.unref(he):e.unref(Se)),null,16)):e.unref(ue)&&!t.hideActions&&e.unref(we)?(e.openBlock(),e.createBlock(e.unref(Ie),{key:2,onTogglePassword:se})):e.unref(ce)&&!t.hideActions&&e.unref(we)?(e.openBlock(),e.createBlock(e.unref(Oe),{key:3,onStepUp:ve,onStepDown:pe})):e.unref(me)&&!t.hideActions&&e.unref(we)?(e.openBlock(),e.createBlock(e.unref(Ve),{key:4,onClear:fe})):e.createCommentVNode("",!0),t.$slots.after?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(Ae))))])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("span",X,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(Ae))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ye)),1)]))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(Te),{id:e.unref(M),class:"vv-input-text__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(De))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(De))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(De))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(De))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("vue-imask"),require("@iconify/vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","vue-imask","@iconify/vue","nanoid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputText=t(e.vue,e.vueImask,e.vue$1,e.nanoid,e.core)}(this,(function(e,t,l,o,a){"use strict";function n(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function i(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const r={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var u=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(u||{}),s=(e=>(e.before="before",e.after="after",e))(s||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{});const c=Symbol.for("volver");function v(){return e.inject(c)}function p(t,l,o){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const m=e.defineComponent({name:"VvIcon",props:r,setup(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=v(),{modifiers:r}=e.toRefs(o),u=p("vv-icon",r),s=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),d=e.computed((()=>{const e=o.name??"",t=`@${s.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${s.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${s.value}:${a.prefix}:${e}`:e}));function c(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${s.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!l.iconExists(`@${s.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}}),f={valid:Boolean,validLabel:[String,Array]},h={invalid:Boolean,invalidLabel:[String,Array]},b={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},g={disabled:Boolean},S=(Boolean,Boolean,Boolean,{label:[String,Number]}),y={readonly:Boolean},w={modifiers:[String,Array]},k={hintLabel:{type:String,default:""}},L={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},B={debounce:[Number,String]},E={icon:{type:[String,Object]},iconPosition:{type:String,default:s.before,validation:e=>Object.values(s).includes(e)}},$={tabindex:{type:[String,Number],default:0}},x={floating:Boolean},A={id:[String,Number]};u.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const T={...{...A,name:{type:String,required:!0}},...{autofocus:Boolean},...{autocomplete:{type:String,default:"off"}},...$,...g,...y,...f,...h,...k,...b,...w,...L,...B,...E,...x,...S,minlength:[String,Number],maxlength:[String,Number],placeholder:String,required:Boolean};d.button;const P={TEXT:"text",PASSWORD:"password",NUMBER:"number",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",DATE:"date",TIME:"time",DATETIME_LOCAL:"datetime-local",MONTH:"month",WEEK:"week"},C="eye-on",D="eye-off",I="calendar",O="time",V="color",_={...T,modelValue:[String,Number],type:{type:String,default:P.TEXT,validator:e=>Object.values(P).includes(e)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:String,default:C},iconHidePassword:{type:String,default:D},iconClear:{type:String,default:"close"},labelStepUp:{type:String,default:"Increase value"},labelStepDown:{type:String,default:"Decrease value"},labelShowPassword:{type:String,default:"Show password"},labelHidePassword:{type:String,default:"Hide password"},labelClear:{type:String,default:"Clear"},iMask:{type:Object,default:void 0},masked:{type:String,default:void 0},autoWidth:{type:Boolean,default:!1},hideActions:{type:Boolean,default:!1},unit:{type:String},selectOnFocus:{type:Boolean,default:!1}},N=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:String,default:C},iconHide:{type:String,default:D}},emits:["toggle-password"],setup(t,{emit:l}){const o=e.ref(!1),a=e.computed((()=>o.value?t.iconHide:t.iconShow));return{active:o,activeIcon:a,onClick:function(e){null==e||e.stopPropagation(),t.disabled||(o.value=!o.value,l("toggle-password",o.value))}}},render(){const t=e.h(m,{name:this.activeIcon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),M=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:e=>["up","down"].includes(e),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:l}){const o=e.computed((()=>"up"===t.mode));return{isUp:o,onClick:e=>{null==e||e.stopPropagation(),t.disabled||l(o.value?"step-up":"step-down")}}},render(){return e.h("button",{class:["vv-input-text__action vv-input-text__action-chevron",this.isUp&&"vv-input-text__action-chevron-up"],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}}),R=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:String,default:"close"}},emits:["clear"],setup:(e,{emit:t})=>({onClick:function(l){null==l||l.stopPropagation(),e.disabled||t("clear")}}),render(){const t=e.h(m,{name:this.icon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.label,type:"button",onClick:this.onClick},t)}});function H(t,l){return{name:"VvInputTextActions",components:{VvIcon:m,VvInputPasswordAction:N,VvInputStepAction:M,VvInputClearAction:R},setup:()=>({isDisabled:e.computed((()=>l.disabled||l.readonly)),labelStepUp:l.labelStepUp,labelStepDown:l.labelStepDown,labelShowPassword:l.labelShowPassword,labelHidePassword:l.labelHidePassword,labelClear:l.labelClear,iconShowPassword:l.iconShowPassword,iconHidePassword:l.iconHidePassword}),render(){let o=null;switch(t){case P.SEARCH:{const{onClear:t}=this.$attrs;o=[e.h(R,{disabled:this.isDisabled,label:this.labelShowPassword,onClear:t})];break}case P.PASSWORD:{const{onTogglePassword:t}=this.$attrs;o=[e.h(N,{disabled:this.isDisabled,onTogglePassword:t,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case P.NUMBER:{const{onStepUp:t,onStepDown:a}=this.$attrs;o=[e.h(M,{mode:"up",disabled:this.isDisabled||void 0!==l.max&&l.modelValue===l.max,label:this.labelStepUp,onStepUp:t,onStepDown:a}),e.h(M,{mode:"down",disabled:this.isDisabled||void 0!==l.min&&l.modelValue===l.min,label:this.labelStepDown,onStepUp:t,onStepDown:a})];break}}return Array.isArray(o)?e.h("div",{class:"vv-input-text__actions-group"},o):o}}}const U=["for"],j={class:"vv-input-text__wrapper"},F={key:0,class:"vv-input-text__input-before"},W=["onClick"],q=["id"],z={key:1,class:"vv-input-text__unit"},K={key:5,class:"vv-input-text__input-after"},X={key:6,class:"vv-input-text__limit"};return e.defineComponent({name:"VvInputText",props:_,emits:["update:modelValue","update:masked","accept","accept:typed","accept:masked","accept:unmasked","complete","complete:typed","complete:masked","complete:unmasked","focus","blur","keyup","keydown","keypress"],setup(l,{expose:r,emit:d}){const c=l,f=e.useSlots(),h=function(t,l,o){const a=v(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===n&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===n&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}("VvInputText",_,c),{id:b,icon:g,iconPosition:S,label:y,modelValue:w,count:k,valid:L,invalid:B,loading:E,debounce:$,maxlength:x,minlength:A,type:T,iMask:C,step:D}=e.toRefs(c),N=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(b),M=e.computed((()=>`${N.value}-hint`)),R=e.computed((()=>c.floating&&n(c.placeholder)?" ":c.placeholder)),J=e.ref(!1),{el:Y,mask:G,typed:Q,masked:Z,unmasked:ee}=t.useIMask(e.computed((()=>(null==C?void 0:C.value)??{mask:/./})),{emit:d,onAccept:()=>{if(J.value){if(d("update:masked",Z.value),T.value===P.NUMBER){if(""===Z.value){if(null===oe.value||void 0===oe.value)return;return void(oe.value=void 0)}return"number"!=typeof Q.value?void(oe.value=Number(Q.value)):void(oe.value=Q.value)}if(T.value===P.DATE){if(Y.value instanceof HTMLInputElement&&"date"===Y.value.type)return void(oe.value=Y.value.value);let e=Q.value;if(null===e||""===e){if(!oe.value)return;return void(oe.value="")}return e instanceof Date||(e=new Date(e)),void(oe.value=`${e.getFullYear()}-${("0"+(e.getMonth()+1)).slice(-2)}-${("0"+e.getDate()).slice(-2)}`)}if(T.value===P.DATETIME_LOCAL){if(Y.value instanceof HTMLInputElement&&"datetime-local"===Y.value.type)return void(oe.value=Y.value.value);let e=Q.value;if(null===e||""===e){if(!oe.value)return;return void(oe.value="")}return Q.value instanceof Date||(e=new Date(e)),void(oe.value=`${e.getFullYear()}-${("0"+(e.getMonth()+1)).slice(-2)}-${("0"+e.getDate()).slice(-2)}T${("0"+e.getHours()).slice(-2)}:${("0"+e.getMinutes()).slice(-2)}`)}(oe.value||ee.value)&&(oe.value=ee.value)}}});e.onMounted((()=>{G.value&&(J.value=!0,Q.value=oe.value??"")})),e.watch((()=>c.modelValue),(e=>{var t;G.value&&(Q.value=e&&(null==(t=null==C?void 0:C.value)?void 0:t.mask)===Date?new Date(e):e??"")})),e.watch((()=>c.masked),(e=>{Z.value=e??""}));const te=Y,le=e.ref();r({$inner:le});const oe=function(t,l,o=0,{getter:a=(e=>e),setter:n=(e=>e)}={}){let i;return"string"==typeof o&&(o=parseInt(o)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{l("update:modelValue",n(e))}),o)}})}(w,d,(null==$?void 0:$.value)??0),{focused:ae}=function(t,l){const{focused:o}=a.useFocus(t);return e.watch(o,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:o}}(te,d),ne=e.computed((()=>ae.value&&!c.disabled&&!c.readonly));e.watch(ne,(e=>{e&&h.value.selectOnFocus&&te.value&&te.value.select()}));const ie=a.useElementVisibility(te);e.watch(ie,(e=>{e&&c.autofocus&&!c.disabled&&!c.readonly&&(ae.value=!0)}));const re=e.ref(!1),ue=e.computed((()=>c.type===P.PASSWORD)),se=()=>{re.value=!re.value},de=e.computed((()=>c.type===P.TIME||c.type===P.DATETIME_LOCAL||c.type===P.DATE||c.type===P.WEEK||c.type===P.MONTH)),ce=e.computed((()=>c.type===P.NUMBER)),ve=()=>{if(we.value){if(null==C?void 0:C.value)return void(Q.value=Q.value+Number((null==D?void 0:D.value)??1));te.value.stepUp(),oe.value=e.unref(te).value}},pe=()=>{if(we.value){if(null==C?void 0:C.value)return void(Q.value=Q.value-Number((null==D?void 0:D.value)??1));te.value.stepDown(),oe.value=e.unref(te).value}},me=e.computed((()=>c.type===P.SEARCH)),fe=()=>{oe.value=""},{hasIcon:he,hasIconBefore:be,hasIconAfter:ge}=function(t,l){const o=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===s.before))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===s.after))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.left))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.right))),r=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.top))),d=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),hasIconLeft:n,hasIconRight:i,hasIconTop:r,hasIconBottom:d,hasIconBefore:o,hasIconAfter:a}}(g,S),Se=e.computed((()=>{switch(c.type){case P.COLOR:return{name:V};case P.DATE:case P.DATETIME_LOCAL:case P.WEEK:case P.MONTH:return{name:I};case P.TIME:return{name:O};default:return""}})),{formatted:ye}=function(t,l){const o=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==l?void 0:l.lowerLimit)&&o.value<(null==l?void 0:l.lowerLimit)?o.value-l.lowerLimit:void 0!==(null==l?void 0:l.upperLimit)&&o.value<(null==l?void 0:l.upperLimit)?l.upperLimit-o.value:0)),n=e.computed((()=>{if(!1===(null==l?void 0:l.mode))return"";if("limit"===(null==l?void 0:l.mode)&&(null==l?void 0:l.upperLimit))return`${o.value} / ${l.lowerLimit?`${l.lowerLimit}-`:""}${l.upperLimit}`;if("countdown"===(null==l?void 0:l.mode)){if(0===a.value)return;return a}return o.value}));return{length:o,gap:a,formatted:n}}(oe,{mode:k.value,upperLimit:Number(null==x?void 0:x.value),lowerLimit:Number(null==A?void 0:A.value)}),we=e.computed((()=>!c.disabled&&!c.readonly)),ke=e.computed((()=>we.value?c.tabindex:-1)),Le=e.computed((()=>!n(w))),Be=e.computed((()=>!0===B.value||!0!==L.value&&void 0)),{modifiers:Ee}=e.toRefs(c),$e=p("vv-input-text",Ee,e.computed((()=>({valid:L.value,invalid:B.value,loading:E.value,disabled:c.disabled,readonly:c.readonly,"icon-before":be.value,"icon-after":ge.value||!n(Se),floating:c.floating&&!n(c.label),dirty:Le.value,focus:ne.value,"auto-width":c.autoWidth})))),xe=e.computed((()=>{const e=ue.value&&re.value?P.TEXT:!de.value||Le.value||ae.value?(null==C?void 0:C.value)?P.TEXT:c.type:P.TEXT,t={type:e,name:c.name,tabindex:ke.value,disabled:c.disabled,readonly:c.readonly,required:c.required,autocomplete:c.autocomplete,"aria-invalid":Be.value,"aria-describedby":Pe.value?M.value:void 0,"aria-errormessage":Ce.value?M.value:void 0};return e!==P.DATE&&e!==P.MONTH&&e!==P.WEEK&&e!==P.TIME&&e!==P.DATETIME_LOCAL&&e!==P.NUMBER||(t.step=c.step,t.max=void 0!==c.max?String(c.max):void 0,t.min=void 0!==c.min?String(c.min):void 0),e!==P.TEXT&&e!==P.SEARCH&&e!==P.URL&&e!==P.TEL&&e!==P.EMAIL&&e!==P.PASSWORD&&e!==P.NUMBER||(t.placeholder=R.value),e!==P.TEXT&&e!==P.SEARCH&&e!==P.URL&&e!==P.TEL&&e!==P.EMAIL&&e!==P.PASSWORD||(t.minlength=c.minlength,t.maxlength=c.maxlength,t.pattern=c.pattern),e===P.EMAIL&&(t.multiple=c.multiple),t})),Ae=e.computed((()=>({valid:c.valid,invalid:c.invalid,modelValue:c.modelValue,togglePassword:se,stepUp:ve,stepDown:pe,clear:fe}))),{HintSlot:Te,hasHintLabelOrSlot:Pe,hasInvalidLabelOrSlot:Ce,hintSlotScope:De}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>i(o.value.invalidLabel))),n=e.computed((()=>i(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),u=e.computed((()=>o.value.hintLabel)),s=e.computed((()=>Boolean(o.value.loading&&(l.loading||r.value)))),d=e.computed((()=>!s.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),c=e.computed((()=>!s.value&&!d.value&&Boolean(o.value.valid&&(l.valid||n.value)))),v=e.computed((()=>!s.value&&!d.value&&!c.value&&Boolean(l.hint||u.value))),p=e.computed((()=>d.value||c.value||s.value||v.value)),m=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),f=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:p,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:u,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:s,hasHintLabelOrSlot:v}),render(){var t,l,o,a,n,i,r,u;if(this.isVisible){let s;return this.hasInvalidLabelOrSlot&&(s="alert"),this.hasValidLabelOrSlot&&(s="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:s},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:s},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:s},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:s},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:s,hintSlotScope:m,HintSlot:f}}(h,f),Ie=H(P.PASSWORD,c),Oe=H(P.NUMBER,c),Ve=H(P.SEARCH,c),_e=()=>{we.value&&(ae.value=!0)},Ne=e.computed((()=>{if(c.autoWidth)return{width:void 0!==oe.value?`${String(oe.value).length+1}ch`:void 0}})),Me=e=>{switch(e.code){case"ArrowUp":ce.value&&(ve(),e.preventDefault());break;case"ArrowDown":ce.value&&(pe(),e.preventDefault())}d("keydown",e)};return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref($e))},[e.unref(y)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(N),class:"vv-input-text__label"},e.toDisplayString(e.unref(y)),9,U)):e.createCommentVNode("",!0),e.createElementVNode("div",j,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",F,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(Ae))))])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"innerEl",ref:le,class:"vv-input-text__inner",onClick:e.withModifiers(_e,["stop"])},[e.unref(be)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0,class:"vv-input-text__icon"},e.unref(he)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(N),ref_key:"inputEl",ref:te},e.unref(xe),{style:e.unref(Ne),onKeyup:l[0]||(l[0]=e=>d("keyup",e)),onKeydown:Me,onKeypress:l[1]||(l[1]=e=>d("keypress",e))}),null,16,q),(t.unit||t.$slots.unit)&&e.unref(Le)?(e.openBlock(),e.createElementBlock("div",z,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(Ae))),(()=>[e.createTextVNode(e.toDisplayString(t.unit),1)]))])):e.createCommentVNode("",!0)],8,W),e.unref(ge)||e.unref(Se)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:1,class:"vv-input-text__icon vv-input-text__icon-after"},e.unref(ge)?e.unref(he):e.unref(Se)),null,16)):e.unref(ue)&&!t.hideActions&&e.unref(we)?(e.openBlock(),e.createBlock(e.unref(Ie),{key:2,onTogglePassword:se})):e.unref(ce)&&!t.hideActions&&e.unref(we)?(e.openBlock(),e.createBlock(e.unref(Oe),{key:3,onStepUp:ve,onStepDown:pe})):e.unref(me)&&!t.hideActions&&e.unref(we)?(e.openBlock(),e.createBlock(e.unref(Ve),{key:4,onClear:fe})):e.createCommentVNode("",!0),t.$slots.after?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(Ae))))])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("span",X,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(Ae))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ye)),1)]))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(Te),{id:e.unref(M),class:"vv-input-text__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(De))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(De))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(De))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(De))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));