@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.
- package/README.md +61 -2
- package/dist/components/VvButton/vv-button.es.js +56 -58
- package/dist/components/VvButton/vv-button.umd.js +1 -1
- package/dist/components/VvCheckGroup/vv-check-group.es.js +221 -203
- package/dist/components/VvCheckGroup/vv-check-group.umd.js +2 -2
- package/dist/components/VvInputText/VvInputText.d.ts +14 -0
- package/dist/components/VvInputText/VvInputText.vue.d.ts +36 -1
- package/dist/components/VvInputText/VvInputTextActions.d.ts +3 -0
- package/dist/components/VvInputText/vv-input-text.es.js +509 -380
- package/dist/components/VvInputText/vv-input-text.umd.js +2 -2
- package/dist/components/VvNativeSelect/vv-native-select.es.js +180 -161
- package/dist/components/VvNativeSelect/vv-native-select.umd.js +2 -2
- package/dist/components/VvRadioGroup/vv-radio-group.es.js +211 -193
- package/dist/components/VvRadioGroup/vv-radio-group.umd.js +2 -2
- package/dist/components/VvSelect/vv-select.es.js +189 -171
- package/dist/components/VvSelect/vv-select.umd.js +2 -2
- package/dist/components/VvTextarea/VvTextarea.d.ts +43 -22
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +140 -85
- package/dist/components/VvTextarea/vv-textarea.es.js +364 -288
- package/dist/components/VvTextarea/vv-textarea.umd.js +2 -2
- package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -0
- package/dist/composables/icons/useComponentIcons.d.ts +6 -0
- package/dist/composables/textLimit/useTextLimit.d.ts +14 -0
- package/dist/composables/useModifiers.d.ts +3 -2
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +42 -0
- package/dist/stories/utils.d.ts +5 -0
- package/dist/ui-vue.es.js +417 -401
- package/dist/ui-vue.umd.js +2 -2
- package/package.json +3 -1
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvButton/VvButton.vue +1 -2
- package/src/components/VvInputText/VvInputText.ts +19 -2
- package/src/components/VvInputText/VvInputText.vue +123 -149
- package/src/components/VvInputText/VvInputTextActions.ts +151 -0
- package/src/components/VvTextarea/VvTextarea.ts +25 -16
- package/src/components/VvTextarea/VvTextarea.vue +89 -93
- package/src/components/common/HintSlot.ts +31 -13
- package/src/composables/debouncedInput/useDebouncedInput.ts +19 -0
- package/src/composables/icons/useComponentIcons.ts +35 -0
- package/src/composables/textLimit/useTextLimit.ts +44 -0
- package/src/composables/useModifiers.ts +47 -1
- package/src/props/index.ts +39 -0
- package/src/stories/InputText/InputTextMaxLength.stories.mdx +21 -0
- package/src/stories/Textarea/Textarea.stories.mdx +33 -51
- package/src/stories/Textarea/TextareaAutoclear.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +10 -2
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaDebounce.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaError.stories.mdx +6 -3
- package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +37 -0
- package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaIcon.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +9 -1
- package/src/stories/Textarea/TextareaId.stories.mdx +19 -0
- package/src/stories/Textarea/TextareaLabel.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaLimit.stories.mdx +50 -0
- package/src/stories/Textarea/TextareaLoading.stories.mdx +6 -3
- package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +6 -2
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaModifiers.stories.mdx +24 -0
- package/src/stories/Textarea/TextareaName.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaRequired.stories.mdx +22 -0
- package/src/stories/Textarea/TextareaResizable.stories.mdx +22 -0
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +9 -1
- package/src/stories/Textarea/TextareaValid.stories.mdx +7 -4
- package/src/stories/Textarea/TextareaValidLabel.stories.mdx +35 -0
- package/src/stories/stories.scss +11 -0
- package/src/stories/utils.ts +12 -0
- package/src/stories/volver-ui-vue.stories.mdx +7 -1
- package/dist/components/VvInputText/useInputNumber.d.ts +0 -16
- package/dist/components/VvInputText/useInputPassword.d.ts +0 -16
- package/src/components/VvInputText/useInputNumber.ts +0 -40
- 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
|
-
}
|