@volverjs/ui-vue 0.0.1-beta.6 → 0.0.1-beta.8

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 (82) hide show
  1. package/README.md +61 -2
  2. package/dist/components/VvButton/vv-button.es.js +56 -58
  3. package/dist/components/VvButton/vv-button.umd.js +1 -1
  4. package/dist/components/VvCheckGroup/vv-check-group.es.js +221 -203
  5. package/dist/components/VvCheckGroup/vv-check-group.umd.js +2 -2
  6. package/dist/components/VvInputText/VvInputText.d.ts +14 -0
  7. package/dist/components/VvInputText/VvInputText.vue.d.ts +36 -1
  8. package/dist/components/VvInputText/VvInputTextActions.d.ts +3 -0
  9. package/dist/components/VvInputText/vv-input-text.es.js +509 -380
  10. package/dist/components/VvInputText/vv-input-text.umd.js +2 -2
  11. package/dist/components/VvNativeSelect/vv-native-select.es.js +180 -161
  12. package/dist/components/VvNativeSelect/vv-native-select.umd.js +2 -2
  13. package/dist/components/VvRadioGroup/vv-radio-group.es.js +211 -193
  14. package/dist/components/VvRadioGroup/vv-radio-group.umd.js +2 -2
  15. package/dist/components/VvSelect/vv-select.es.js +189 -171
  16. package/dist/components/VvSelect/vv-select.umd.js +2 -2
  17. package/dist/components/VvTextarea/VvTextarea.d.ts +43 -22
  18. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +140 -85
  19. package/dist/components/VvTextarea/vv-textarea.es.js +364 -288
  20. package/dist/components/VvTextarea/vv-textarea.umd.js +2 -2
  21. package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -0
  22. package/dist/composables/icons/useComponentIcons.d.ts +6 -0
  23. package/dist/composables/textLimit/useTextLimit.d.ts +14 -0
  24. package/dist/composables/useModifiers.d.ts +3 -2
  25. package/dist/icons.es.js +3 -3
  26. package/dist/icons.umd.js +1 -1
  27. package/dist/props/index.d.ts +42 -0
  28. package/dist/stories/utils.d.ts +5 -0
  29. package/dist/ui-vue.es.js +417 -401
  30. package/dist/ui-vue.umd.js +2 -2
  31. package/package.json +3 -1
  32. package/src/assets/icons/detailed.json +1 -1
  33. package/src/assets/icons/normal.json +1 -1
  34. package/src/assets/icons/simple.json +1 -1
  35. package/src/components/VvButton/VvButton.vue +1 -2
  36. package/src/components/VvInputText/VvInputText.ts +19 -2
  37. package/src/components/VvInputText/VvInputText.vue +123 -149
  38. package/src/components/VvInputText/VvInputTextActions.ts +151 -0
  39. package/src/components/VvTextarea/VvTextarea.ts +25 -16
  40. package/src/components/VvTextarea/VvTextarea.vue +89 -93
  41. package/src/components/common/HintSlot.ts +31 -13
  42. package/src/composables/debouncedInput/useDebouncedInput.ts +19 -0
  43. package/src/composables/icons/useComponentIcons.ts +35 -0
  44. package/src/composables/textLimit/useTextLimit.ts +44 -0
  45. package/src/composables/useModifiers.ts +47 -1
  46. package/src/props/index.ts +39 -0
  47. package/src/stories/InputText/InputTextMaxLength.stories.mdx +21 -0
  48. package/src/stories/Textarea/Textarea.stories.mdx +33 -51
  49. package/src/stories/Textarea/TextareaAutoclear.stories.mdx +23 -0
  50. package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +10 -2
  51. package/src/stories/Textarea/TextareaAutofocus.stories.mdx +5 -1
  52. package/src/stories/Textarea/TextareaDebounce.stories.mdx +23 -0
  53. package/src/stories/Textarea/TextareaDisabled.stories.mdx +5 -1
  54. package/src/stories/Textarea/TextareaError.stories.mdx +6 -3
  55. package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +37 -0
  56. package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
  57. package/src/stories/Textarea/TextareaHintLabel.stories.mdx +5 -1
  58. package/src/stories/Textarea/TextareaIcon.stories.mdx +5 -1
  59. package/src/stories/Textarea/TextareaIconPosition.stories.mdx +9 -1
  60. package/src/stories/Textarea/TextareaId.stories.mdx +19 -0
  61. package/src/stories/Textarea/TextareaLabel.stories.mdx +5 -1
  62. package/src/stories/Textarea/TextareaLimit.stories.mdx +50 -0
  63. package/src/stories/Textarea/TextareaLoading.stories.mdx +6 -3
  64. package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +23 -0
  65. package/src/stories/Textarea/TextareaMaxLength.stories.mdx +6 -2
  66. package/src/stories/Textarea/TextareaMinLength.stories.mdx +5 -1
  67. package/src/stories/Textarea/TextareaModifiers.stories.mdx +24 -0
  68. package/src/stories/Textarea/TextareaName.stories.mdx +23 -0
  69. package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +5 -1
  70. package/src/stories/Textarea/TextareaReadonly.stories.mdx +5 -1
  71. package/src/stories/Textarea/TextareaRequired.stories.mdx +22 -0
  72. package/src/stories/Textarea/TextareaResizable.stories.mdx +22 -0
  73. package/src/stories/Textarea/TextareaRowsCols.stories.mdx +9 -1
  74. package/src/stories/Textarea/TextareaValid.stories.mdx +7 -4
  75. package/src/stories/Textarea/TextareaValidLabel.stories.mdx +35 -0
  76. package/src/stories/stories.scss +11 -0
  77. package/src/stories/utils.ts +12 -0
  78. package/src/stories/volver-ui-vue.stories.mdx +7 -1
  79. package/dist/components/VvInputText/useInputNumber.d.ts +0 -16
  80. package/dist/components/VvInputText/useInputPassword.d.ts +0 -16
  81. package/src/components/VvInputText/useInputNumber.ts +0 -40
  82. package/src/components/VvInputText/useInputPassword.ts +0 -38
@@ -1,16 +0,0 @@
1
- import type { Ref } from 'vue';
2
- interface useVvInputNumberProps {
3
- type: Ref<string>;
4
- disabled: Ref<boolean>;
5
- readonly: Ref<boolean>;
6
- inputTemplateRef: Ref<HTMLInputElement>;
7
- }
8
- /**
9
- * Funzionalità input number
10
- */
11
- export declare function useInputNumber(inputModelValue: Ref<any>, options: useVvInputNumberProps): {
12
- isNumber: import("vue").ComputedRef<boolean>;
13
- stepUp: () => void;
14
- stepDown: () => void;
15
- };
16
- export {};
@@ -1,16 +0,0 @@
1
- import type { Ref } from 'vue';
2
- interface useVvInputPasswordProps {
3
- type: Ref<string>;
4
- disabled: Ref<boolean>;
5
- readonly: Ref<boolean>;
6
- }
7
- /**
8
- * Funzionalità input password.
9
- */
10
- export declare function useInputPassword(props: useVvInputPasswordProps): {
11
- isPassword: import("vue").ComputedRef<boolean>;
12
- isPasswordVisible: import("vue").ComputedRef<boolean>;
13
- passwordButtonIcon: import("vue").ComputedRef<string>;
14
- toggleShowHidePassword: () => void;
15
- };
16
- export {};
@@ -1,40 +0,0 @@
1
- import type { Ref } from 'vue'
2
- import { computed, unref } from 'vue'
3
- import INPUT from './constants'
4
-
5
- interface useVvInputNumberProps {
6
- type: Ref<string>
7
- disabled: Ref<boolean>
8
- readonly: Ref<boolean>
9
- inputTemplateRef: Ref<HTMLInputElement>
10
- }
11
-
12
- /**
13
- * Funzionalità input number
14
- */
15
- export function useInputNumber(
16
- inputModelValue: Ref<any>,
17
- options: useVvInputNumberProps
18
- ) {
19
- const { type, disabled, readonly, inputTemplateRef } = options
20
- const isNumber = computed(() => type.value === INPUT.TYPES.NUMBER)
21
-
22
- function stepUp() {
23
- if (!disabled.value && !readonly.value) {
24
- inputTemplateRef.value.stepUp()
25
- inputModelValue.value = unref(inputTemplateRef.value).value
26
- }
27
- }
28
- function stepDown() {
29
- if (!disabled.value && !readonly.value) {
30
- inputTemplateRef.value.stepDown()
31
- inputModelValue.value = unref(inputTemplateRef.value).value
32
- }
33
- }
34
-
35
- return {
36
- isNumber,
37
- stepUp,
38
- stepDown
39
- }
40
- }
@@ -1,38 +0,0 @@
1
- import type { Ref } from 'vue'
2
- import { ref, computed } from 'vue'
3
- import INPUT from './constants'
4
-
5
- interface useVvInputPasswordProps {
6
- type: Ref<string>
7
- disabled: Ref<boolean>
8
- readonly: Ref<boolean>
9
- }
10
-
11
- /**
12
- * Funzionalità input password.
13
- */
14
- export function useInputPassword(props: useVvInputPasswordProps) {
15
- const { type, disabled, readonly } = props
16
- const bHidePassword = ref(true)
17
-
18
- const isPassword = computed(() => type.value === INPUT.TYPES.PASSWORD)
19
- const isPasswordVisible = computed(() => !bHidePassword.value)
20
- const passwordButtonIcon = computed(() =>
21
- isPasswordVisible.value
22
- ? INPUT.TYPES_ICON.PASSWORD_OFF
23
- : INPUT.TYPES_ICON.PASSWORD_ON
24
- )
25
-
26
- function toggleShowHidePassword() {
27
- if (!disabled.value && !readonly.value) {
28
- bHidePassword.value = !bHidePassword.value
29
- }
30
- }
31
-
32
- return {
33
- isPassword,
34
- isPasswordVisible,
35
- passwordButtonIcon,
36
- toggleShowHidePassword
37
- }
38
- }