@volverjs/ui-vue 0.0.10-beta.42 → 0.0.10-beta.43

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 (78) hide show
  1. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +12 -12
  2. package/dist/components/VvAccordionGroup/index.d.ts +4 -4
  3. package/dist/components/VvAction/VvAction.vue.d.ts +2 -2
  4. package/dist/components/VvAction/index.d.ts +1 -1
  5. package/dist/components/VvAlert/VvAlert.vue.d.ts +6 -6
  6. package/dist/components/VvAlert/index.d.ts +4 -3
  7. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -9
  8. package/dist/components/VvAlertGroup/index.d.ts +4 -4
  9. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +4 -4
  10. package/dist/components/VvAvatarGroup/index.d.ts +2 -2
  11. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +13 -13
  12. package/dist/components/VvBreadcrumb/index.d.ts +1 -1
  13. package/dist/components/VvButton/VvButton.vue.d.ts +4 -4
  14. package/dist/components/VvButton/index.d.ts +2 -2
  15. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +4 -4
  16. package/dist/components/VvButtonGroup/index.d.ts +2 -2
  17. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +1 -1
  18. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +3 -3
  19. package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
  20. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +438 -559
  21. package/dist/components/VvCombobox/index.d.ts +21 -241
  22. package/dist/components/VvDialog/VvDialog.es.js +41 -165
  23. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  24. package/dist/components/VvDialog/VvDialog.vue.d.ts +9 -0
  25. package/dist/components/VvDialog/index.d.ts +7 -0
  26. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +33 -268
  27. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +8 -6
  28. package/dist/components/VvDropdown/index.d.ts +9 -117
  29. package/dist/components/VvIcon/VvIcon.vue.d.ts +1 -1
  30. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +22 -105
  31. package/dist/components/VvInputFile/index.d.ts +7 -28
  32. package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
  33. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +4 -4
  34. package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
  35. package/dist/components/VvInputText/index.d.ts +4 -9
  36. package/dist/components/VvNav/VvNav.vue.d.ts +9 -9
  37. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +3 -3
  38. package/dist/components/VvRadioGroup/index.d.ts +1 -1
  39. package/dist/components/VvSelect/VvSelect.vue.d.ts +174 -184
  40. package/dist/components/VvSelect/index.d.ts +4 -4
  41. package/dist/components/VvTab/VvTab.vue.d.ts +13 -13
  42. package/dist/components/VvTab/index.d.ts +2 -2
  43. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +2 -2
  44. package/dist/components/VvTextarea/index.d.ts +1 -1
  45. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -2
  46. package/dist/components/VvTooltip/index.d.ts +1 -1
  47. package/dist/components/index.es.js +23 -25
  48. package/dist/components/index.umd.js +1 -1
  49. package/dist/composables/alert/useAlert.d.ts +47 -77
  50. package/dist/composables/index.es.js +1 -2
  51. package/dist/composables/useBlurhash.d.ts +1 -1
  52. package/dist/composables/useOptions.d.ts +3 -3
  53. package/dist/icons.es.js +3 -3
  54. package/dist/icons.umd.js +1 -1
  55. package/dist/index.es.js +1 -4
  56. package/dist/index.umd.js +1 -1
  57. package/dist/props/index.d.ts +14 -121
  58. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +283 -347
  59. package/dist/test/expect.d.ts +0 -1
  60. package/dist/types/input-file.d.ts +2 -9
  61. package/dist/utils/ObjectUtilities.d.ts +1 -1
  62. package/package.json +29 -30
  63. package/src/Volver.ts +6 -6
  64. package/src/assets/icons/detailed.json +1 -1
  65. package/src/assets/icons/normal.json +1 -1
  66. package/src/assets/icons/simple.json +1 -1
  67. package/src/components/VvButtonGroup/index.ts +1 -1
  68. package/src/components/VvCombobox/index.ts +6 -6
  69. package/src/components/VvDialog/VvDialog.vue +3 -5
  70. package/src/components/VvDialog/index.ts +4 -0
  71. package/src/components/VvInputText/VvInputText.vue +18 -18
  72. package/src/components/common/HintSlot.ts +2 -2
  73. package/src/composables/group/useInjectedGroupState.ts +3 -3
  74. package/src/composables/group/useProvideGroupState.ts +3 -3
  75. package/src/composables/useDefaults.ts +4 -4
  76. package/src/props/index.ts +1 -1
  77. package/src/types/group.ts +1 -1
  78. package/src/types/input-file.ts +10 -18
@@ -21,7 +21,7 @@ export const VvButtonGroupProps = {
21
21
  | boolean
22
22
  | (string | number | boolean)[]
23
23
  | undefined
24
- >,
24
+ >,
25
25
  default: undefined,
26
26
  },
27
27
  }
@@ -99,11 +99,11 @@ export const VvComboboxProps = {
99
99
  */
100
100
  searchFunction: {
101
101
  type: Function as PropType<
102
- (
102
+ (
103
103
  search: string,
104
104
  options: (Option | string)[],
105
- ) => (Option | string)[] | Promise<(Option | string)[]>
106
- >,
105
+ ) => (Option | string)[] | Promise<(Option | string)[]>
106
+ >,
107
107
  default: undefined,
108
108
  },
109
109
  /**
@@ -207,11 +207,11 @@ export function useVvComboboxProps<T extends Option | string>() {
207
207
  searchFunction: {
208
208
  ...VvComboboxProps.searchFunction,
209
209
  type: Function as PropType<
210
- (
210
+ (
211
211
  search: string,
212
212
  options: T[],
213
- ) => T[] | Promise<T[]>
214
- >,
213
+ ) => T[] | Promise<T[]>
214
+ >,
215
215
  },
216
216
  }
217
217
  }
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
2
  import type { DialogHTMLAttributes } from 'vue'
3
- import VvIcon from '../VvIcon/VvIcon.vue'
4
3
  import { VvDialogEvents, VvDialogProps } from '.'
5
4
 
6
5
  // props, emit and template refs
@@ -134,12 +133,11 @@ export default {
134
133
  {{ title }}
135
134
  <button
136
135
  type="button"
137
- aria-label="Close"
136
+ :aria-label="labelClose"
137
+ :title="labelClose"
138
138
  class="vv-dialog__close"
139
139
  @click.passive="close"
140
- >
141
- <VvIcon name="close" />
142
- </button>
140
+ />
143
141
  </slot>
144
142
  </header>
145
143
  <div class="vv-dialog__content">
@@ -41,4 +41,8 @@ export const VvDialogProps = {
41
41
  * Keep open dialog on click outside
42
42
  */
43
43
  keepOpen: { type: Boolean, default: false },
44
+ /**
45
+ * Close button label
46
+ */
47
+ labelClose: { type: String, default: 'Close' },
44
48
  }
@@ -171,8 +171,8 @@ function updateMaskValue(newValue: string | number | undefined) {
171
171
  }
172
172
  if (
173
173
  type.value === INPUT_TYPES.NUMBER
174
- && NEGATIVE_ZERO_REGEX.test(unmasked.value)
175
- && newValue === 0
174
+ && NEGATIVE_ZERO_REGEX.test(unmasked.value)
175
+ && newValue === 0
176
176
  ) {
177
177
  return
178
178
  }
@@ -430,11 +430,11 @@ const hasAttrs = computed(() => {
430
430
  }
431
431
  if (
432
432
  type === INPUT_TYPES.DATE
433
- || type === INPUT_TYPES.MONTH
434
- || type === INPUT_TYPES.WEEK
435
- || type === INPUT_TYPES.TIME
436
- || type === INPUT_TYPES.DATETIME_LOCAL
437
- || type === INPUT_TYPES.NUMBER
433
+ || type === INPUT_TYPES.MONTH
434
+ || type === INPUT_TYPES.WEEK
435
+ || type === INPUT_TYPES.TIME
436
+ || type === INPUT_TYPES.DATETIME_LOCAL
437
+ || type === INPUT_TYPES.NUMBER
438
438
  ) {
439
439
  let max = props.max
440
440
  if (type === INPUT_TYPES.DATE && !max) {
@@ -447,22 +447,22 @@ const hasAttrs = computed(() => {
447
447
  }
448
448
  if (
449
449
  type === INPUT_TYPES.TEXT
450
- || type === INPUT_TYPES.SEARCH
451
- || type === INPUT_TYPES.URL
452
- || type === INPUT_TYPES.TEL
453
- || type === INPUT_TYPES.EMAIL
454
- || type === INPUT_TYPES.PASSWORD
455
- || type === INPUT_TYPES.NUMBER
450
+ || type === INPUT_TYPES.SEARCH
451
+ || type === INPUT_TYPES.URL
452
+ || type === INPUT_TYPES.TEL
453
+ || type === INPUT_TYPES.EMAIL
454
+ || type === INPUT_TYPES.PASSWORD
455
+ || type === INPUT_TYPES.NUMBER
456
456
  ) {
457
457
  toReturn.placeholder = inputTextPlaceholder.value
458
458
  }
459
459
  if (
460
460
  type === INPUT_TYPES.TEXT
461
- || type === INPUT_TYPES.SEARCH
462
- || type === INPUT_TYPES.URL
463
- || type === INPUT_TYPES.TEL
464
- || type === INPUT_TYPES.EMAIL
465
- || type === INPUT_TYPES.PASSWORD
461
+ || type === INPUT_TYPES.SEARCH
462
+ || type === INPUT_TYPES.URL
463
+ || type === INPUT_TYPES.TEL
464
+ || type === INPUT_TYPES.EMAIL
465
+ || type === INPUT_TYPES.PASSWORD
466
466
  ) {
467
467
  toReturn.minlength = props.minlength
468
468
  toReturn.maxlength = props.maxlength
@@ -13,7 +13,7 @@ function joinLines(items: string[] | string | unknown[] | undefined) {
13
13
  }
14
14
 
15
15
  export type HintSlotProps = Readonly<
16
- ExtractPropTypes<{
16
+ ExtractPropTypes<{
17
17
  hintLabel: {
18
18
  type: StringConstructor
19
19
  default: ''
@@ -26,7 +26,7 @@ export type HintSlotProps = Readonly<
26
26
  invalidLabel: (StringConstructor | ArrayConstructor)[]
27
27
  loading: BooleanConstructor
28
28
  loadingLabel: StringConstructor
29
- }>
29
+ }>
30
30
  >
31
31
 
32
32
  /**
@@ -16,9 +16,9 @@ export function useInjectedGroupState<GroupStateType>(
16
16
  * Get a group or local property
17
17
  */
18
18
  function getGroupOrLocalRef<
19
- TProps extends object,
20
- TName extends keyof GroupStateType,
21
- >(
19
+ TProps extends object,
20
+ TName extends keyof GroupStateType,
21
+ >(
22
22
  propName: TName,
23
23
  props: TProps,
24
24
  emit?: (event: string, ...args: unknown[]) => void,
@@ -5,10 +5,10 @@ import type { Emitter } from 'mitt'
5
5
  * Share part of the state of the component with all its children.
6
6
  */
7
7
  export function useProvideGroupState<
8
- TGroupState extends Record<
9
- string,
8
+ TGroupState extends Record<
9
+ string,
10
10
  Ref<unknown> | Emitter<any>
11
- >,
11
+ >,
12
12
  >(key: InjectionKey<TGroupState>, groupState: TGroupState) {
13
13
  provide(key, groupState)
14
14
  }
@@ -55,8 +55,8 @@ export function useDefaults<Definition>(
55
55
  // single type
56
56
  if (typeof simplifiedPropsDefinition[key] === 'function') {
57
57
  const typeFunction = simplifiedPropsDefinition[key] as <
58
- T,
59
- >() => T
58
+ T,
59
+ >() => T
60
60
  if (typeFunction() === propValue) {
61
61
  acc[key] = componentDefaults[key]
62
62
  }
@@ -84,7 +84,7 @@ export function useDefaults<Definition>(
84
84
  }
85
85
  return acc
86
86
  }, {} as Record<string, unknown>) as Readonly<
87
- ExtractPropTypes<Definition>
88
- >
87
+ ExtractPropTypes<Definition>
88
+ >
89
89
  })
90
90
  }
@@ -300,7 +300,7 @@ export const DropdownProps = {
300
300
  offset: {
301
301
  type: [Number, String, Object] as PropType<
302
302
  OffsetOptions | number | string
303
- >,
303
+ >,
304
304
  default: 0,
305
305
  },
306
306
  /**
@@ -18,7 +18,7 @@ export type InputGroupState = {
18
18
  export type ButtonGroupState = {
19
19
  modelValue: Ref<
20
20
  string | number | boolean | (string | number | boolean)[] | undefined
21
- >
21
+ >
22
22
  disabled: Ref<boolean>
23
23
  toggle: Ref<boolean>
24
24
  multiple: Ref<boolean>
@@ -1,18 +1,10 @@
1
- export type UploadedFile<Source = undefined> = Source extends undefined
2
- ? {
3
- name: string
4
- size: number
5
- type: string
6
- url?: string
7
- thumbnailUrl?: string
8
- lastModified?: number
9
- }
10
- : {
11
- name: string
12
- size: number
13
- type: string
14
- url?: string
15
- thumbnailUrl?: string
16
- lastModified?: number
17
- source: Source
18
- }
1
+ export type UploadedFile<Source = unknown> =
2
+ {
3
+ name: string
4
+ size: number
5
+ type: string
6
+ url?: string
7
+ thumbnailUrl?: string
8
+ lastModified?: number
9
+ source?: Source
10
+ }