@volverjs/ui-vue 0.0.2 → 0.0.3-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.
- package/auto-imports.d.ts +289 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +63 -131
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -2
- package/dist/components/VvAccordion/index.d.ts +2 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +97 -176
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +4 -4
- package/dist/components/VvAccordionGroup/index.d.ts +2 -2
- package/dist/components/VvBadge/VvBadge.es.js +16 -50
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +38 -45
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +170 -306
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +4 -4
- package/dist/components/VvButton/index.d.ts +3 -3
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +39 -84
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvCard/VvCard.es.js +26 -60
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +2 -2
- package/dist/components/VvCard/index.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +144 -282
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +6 -6
- package/dist/components/VvCheckbox/index.d.ts +10 -4
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -346
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/index.d.ts +3 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +330 -487
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +8 -8
- package/dist/components/VvCombobox/index.d.ts +4 -4
- package/dist/components/VvDialog/VvDialog.es.js +66 -102
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +61 -185
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -2
- package/dist/components/VvDropdown/index.d.ts +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +30 -65
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +304 -407
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +5 -5
- package/dist/components/VvProgress/VvProgress.es.js +17 -51
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +110 -249
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +6 -6
- package/dist/components/VvRadio/index.d.ts +3 -3
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +161 -318
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
- package/dist/components/VvRadioGroup/index.d.ts +3 -3
- package/dist/components/VvSelect/VvSelect.es.js +200 -292
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +8 -8
- package/dist/components/VvSelect/index.d.ts +4 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +196 -299
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +6 -6
- package/dist/components/VvTextarea/index.d.ts +3 -3
- package/dist/components/VvTooltip/VvTooltip.es.js +28 -0
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -0
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +23 -0
- package/dist/components/VvTooltip/index.d.ts +18 -0
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.es.js +1179 -1371
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useComponentIcons.d.ts +1 -1
- package/dist/composables/useDebouncedInput.d.ts +1 -1
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/composables/useTextCount.d.ts +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +1211 -1404
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +12 -12
- package/dist/stories/Tooltip/Tooltip.settings.d.ts +42 -0
- package/dist/stories/Tooltip/Tooltip.test.d.ts +2 -0
- package/dist/utils/ObjectUtilities.d.ts +1 -1
- package/package.json +27 -20
- 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/VvAccordion/VvAccordion.vue +0 -3
- package/src/components/VvAccordion/index.ts +1 -2
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +1 -3
- package/src/components/VvBadge/VvBadge.vue +0 -1
- package/src/components/VvButton/VvButton.vue +0 -3
- package/src/components/VvButton/index.ts +2 -10
- package/src/components/VvButtonGroup/VvButtonGroup.vue +0 -3
- package/src/components/VvCard/VvCard.vue +0 -1
- package/src/components/VvCheckbox/VvCheckbox.vue +0 -3
- package/src/components/VvCheckbox/index.ts +1 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +0 -5
- package/src/components/VvCombobox/VvCombobox.vue +0 -7
- package/src/components/VvDialog/VvDialog.vue +1 -2
- package/src/components/VvDropdown/VvDropdown.vue +0 -4
- package/src/components/VvIcon/VvIcon.vue +0 -2
- package/src/components/VvInputText/VvInputClearAction.ts +0 -1
- package/src/components/VvInputText/VvInputPasswordAction.ts +0 -1
- package/src/components/VvInputText/VvInputStepAction.ts +0 -1
- package/src/components/VvInputText/VvInputText.vue +1 -16
- package/src/components/VvInputText/VvInputTextActions.ts +1 -1
- package/src/components/VvProgress/VvProgress.vue +0 -2
- package/src/components/VvRadio/VvRadio.vue +0 -3
- package/src/components/VvRadio/index.ts +0 -1
- package/src/components/VvRadioGroup/VvRadioGroup.vue +0 -5
- package/src/components/VvSelect/VvSelect.vue +1 -14
- package/src/components/VvTextarea/VvTextarea.vue +1 -15
- package/src/components/VvTooltip/VvTooltip.vue +17 -0
- package/src/components/VvTooltip/index.ts +21 -0
- package/src/components/common/HintSlot.ts +1 -11
- package/src/composables/group/types/IAccordionGroupState.ts +0 -1
- package/src/composables/group/types/IButtonGroupState.ts +0 -1
- package/src/composables/group/types/IInputGroup.ts +0 -1
- package/src/composables/group/useInjectedGroupState.ts +1 -2
- package/src/composables/group/useProvideGroupState.ts +0 -1
- package/src/composables/useComponentFocus.ts +1 -2
- package/src/composables/useComponentIcons.ts +1 -1
- package/src/composables/useDebouncedInput.ts +1 -1
- package/src/composables/useModifiers.ts +1 -2
- package/src/composables/useOptions.ts +0 -1
- package/src/composables/useTextCount.ts +1 -1
- package/src/stories/Accordion/Accordion.stories.mdx +1 -1
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +1 -1
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
- package/src/stories/Badge/Badge.stories.mdx +1 -1
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +0 -1
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +1 -1
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +1 -1
- package/src/stories/Button/Button.stories.mdx +1 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +3 -3
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +0 -1
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +1 -1
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +1 -1
- package/src/stories/Card/Card.stories.mdx +1 -1
- package/src/stories/Card/CardSlots.stories.mdx +1 -1
- package/src/stories/Checkbox/Checkbox.stories.mdx +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +1 -1
- package/src/stories/Combobox/Combobox.settings.ts +0 -1
- package/src/stories/Combobox/Combobox.stories.mdx +1 -1
- package/src/stories/Dialog/Dialog.stories.mdx +1 -1
- package/src/stories/Dropdown/Dropdown.settings.ts +0 -1
- package/src/stories/Dropdown/Dropdown.stories.mdx +1 -1
- package/src/stories/Icon/Icon.settings.ts +0 -1
- package/src/stories/Icon/Icon.stories.mdx +1 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +1 -1
- package/src/stories/InputText/InputText.settings.ts +0 -1
- package/src/stories/InputText/InputText.stories.mdx +1 -1
- package/src/stories/Progress/Progress.stories.mdx +1 -1
- package/src/stories/Radio/Radio.stories.mdx +1 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +1 -1
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +1 -1
- package/src/stories/Select/Select.settings.ts +0 -1
- package/src/stories/Select/Select.stories.mdx +1 -1
- package/src/stories/Textarea/Textarea.settings.ts +0 -1
- package/src/stories/Textarea/Textarea.stories.mdx +1 -1
- package/src/stories/Tooltip/Tooltip.settings.ts +25 -0
- package/src/stories/Tooltip/Tooltip.stories.mdx +98 -0
- package/src/stories/Tooltip/Tooltip.test.ts +49 -0
- package/src/utils/ObjectUtilities.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,x){typeof exports=="object"&&typeof module<"u"?module.exports=x(require("vue"),require("nanoid")):typeof define=="function"&&define.amd?define(["vue","nanoid"],x):(e=typeof globalThis<"u"?globalThis:e||self,e.VvCheckboxGroup=x(e.vue,e.nanoid))})(this,function(e,x){"use strict";const G="VV_CHECK_GROUP";function P(r){return Array.isArray(r)?r.filter(m=>isString(m)).join(" "):r}function N(r,m){const{invalid:t,valid:f,hint:l,loading:d}=m,{hintLabel:o,modelValue:b,valid:p,validLabel:n,invalid:c,invalidLabel:a,...V}=toRefs(r),s=resolveFieldData(V,"loading"),u=resolveFieldData(V,"loadingLabel"),v=computed(()=>c.value?!!(c.value&&t||a!=null&&a.value&&Array.isArray(a.value)&&a.value.length>0||a!=null&&a.value&&!isEmpty(a)):!1),i=computed(()=>!!(o&&o.value||l)),k=computed(()=>!!(n&&n.value||f)),g=computed(()=>!!(s!=null&&s.value&&d||s!=null&&s.value&&(u!=null&&u.value))),C=computed(()=>i.value||k.value||v.value||g.value);return{hasInvalid:v,hasHint:i,hasValid:k,hasLoading:g,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(A){const B=computed(()=>{const S=toReactive({hintLabel:o,modelValue:b,valid:p,validLabel:n,invalid:c,invalidLabel:a,loading:s,loadingLabel:u,...A.params});return c!=null&&c.value?(t==null?void 0:t(S))||P(a==null?void 0:a.value)||(o==null?void 0:o.value):p!=null&&p.value?(f==null?void 0:f(S))||P(n==null?void 0:n.value)||(o==null?void 0:o.value):s!=null&&s.value?(d==null?void 0:d(S))||P(u==null?void 0:u.value)||(o==null?void 0:o.value):(l==null?void 0:l(S))||P(o==null?void 0:o.value)||(o==null?void 0:o.value)});return{isVisible:C,hasInvalid:v,hasValid:k,hintContent:B}},render(){if(this.isVisible)return h("small",{role:this.hasInvalid||this.hasValid?"alert":void 0},this.hintContent)}}}}const E={valid:Boolean,validLabel:[String,Array]},R={invalid:Boolean,invalidLabel:[String,Array]},I={disabled:Boolean},O={readonly:Boolean},H={hintLabel:{type:String,default:""}},w={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"}},$={...{id:[String,Number],name:{type:String,required:!0}},...{tabindex:{type:[String,Number],default:0}},...E,...R,...H,...I,...O,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String],label:String},D={...E,...R,...w,...H,...I,...O,modelValue:[String,Array],label:String,name:{type:String,required:!0},vertical:Boolean},j={...$,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean},F=["click","update:modelValue","change","blur"];function M(r,m){const{group:t,isInGroup:f,getGroupOrLocalRef:l}=useInjectedGroupState(G),{switch:d,indeterminate:o}=toRefs(r),b=l("modelValue",r,m),p=l("readonly",r),n=l("disabled",r),c=l("valid",r),a=l("invalid",r);return{propsSwitch:d,indeterminate:o,group:t,isInGroup:f,modelValue:b,readonly:p,disabled:n,valid:c,invalid:a}}const T=["for"],q=["id","name","disabled","value","tabindex","aria-invalid"],K={name:"VvCheckbox"},z=e.defineComponent({...K,props:j,emits:F,setup(r,{emit:m}){const t=r,f=useSlots(),{disabled:l,readonly:d,valid:o,invalid:b,propsSwitch:p,modelValue:n,indeterminate:c,isInGroup:a}=M(t,m),V=computed(()=>String(t.id||x.nanoid())),s=computed(()=>i.value?-1:t.tabindex),u=ref(),v=computed(()=>t.uncheckedValue!==void 0&&!a.value),i=computed(()=>l.value||d.value),k=computed(()=>{if(b.value===!0)return!0;if(o.value===!0)return!1}),g=computed(()=>v.value?n.value===t.value:Array.isArray(n.value)?contains(t.value,n.value):equals(t.value,n.value)),C=computed(()=>!!(c.value||!g.value&&v.value&&t.uncheckedValue!==n.value)),A=computed(()=>{if(!v.value)return["string","number","boolean"].includes(typeof t.value)?t.value:!0}),B=computed({get(){return g.value},set(y){if(v.value)n.value=y?t.value:t.uncheckedValue;else if(Array.isArray(n.value)||a.value){const _=new Set(Array.isArray(n.value)?n.value:n.value!==void 0?[n.value]:[]);y?_.add(t.value):_.delete(t.value),n.value=[..._]}else n.value=y?t.value:void 0;m("change",y)}}),{bemCssClasses:S}=useBemModifiers("vv-checkbox",{switch:p,valid:o,invalid:b,disabled:l,readonly:d,indeterminate:c});watchEffect(()=>{v.value&&Array.isArray(n.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")}),watch(()=>C.value,y=>{y?u.value.indeterminate=!0:u.value.indeterminate=!1}),onMounted(()=>{C.value&&(u.value.indeterminate=!0)});const{HintSlot:Y}=N(t,f);return(y,_)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(S)),for:e.unref(V)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(V),ref_key:"input",ref:u,"onUpdate:modelValue":_[0]||(_[0]=Z=>e.isRef(B)?B.value=Z:null),type:"checkbox",class:"vv-checkbox__input",name:y.name,disabled:e.unref(i),value:e.unref(A),tabindex:e.unref(s),"aria-invalid":e.unref(k)},null,8,q),[[e.vModelCheckbox,e.unref(B)]]),e.renderSlot(y.$slots,"default",{value:e.unref(n)},()=>[e.createTextVNode(e.toDisplayString(y.label),1)]),e.createVNode(e.unref(Y),{class:"vv-checkbox__hint",params:{value:e.unref(n)}},null,8,["params"])],10,T))}}),U=D,J=["update:modelValue","change"],Q=["textContent"],W={class:"vv-checkbox-group__wrapper"},X={name:"VvCheckboxGroup"};return e.defineComponent({...X,props:U,emits:J,setup(r,{emit:m}){const t=r,f=useSlots(),l=useVModel(t,"modelValue",m),{disabled:d,readonly:o,vertical:b,valid:p,invalid:n}=toRefs(t),c={key:G,modelValue:l,disabled:d,readonly:o,valid:p,invalid:n};useProvideGroupState(c);const{getOptionLabel:a,getOptionValue:V}=useOptions(t),{bemCssClasses:s}=useBemModifiers("vv-checkbox-group",{disabled:d,readonly:o,horizontal:computed(()=>!b.value),valid:p,invalid:n}),u=(i,k)=>({id:`${t.name}_opt${k}`,name:t.name,label:a(i),value:V(i)}),{HintSlot:v}=N(t,f);return(i,k)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(s))},[i.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(i.label)},null,8,Q)):e.createCommentVNode("",!0),e.createElementVNode("div",W,[i.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.options,(g,C)=>(e.openBlock(),e.createBlock(z,e.mergeProps({key:C},u(g,C)),null,16))),128)):e.renderSlot(i.$slots,"default",{key:1})]),e.createVNode(e.unref(v),{class:"vv-checkbox-group__hint"})],2))}})});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Option } from '@/types/generic';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
-
modelValue: (
|
|
3
|
+
modelValue: (StringConstructor | ArrayConstructor)[];
|
|
4
4
|
label: StringConstructor;
|
|
5
5
|
name: {
|
|
6
6
|
type: StringConstructor;
|
|
@@ -26,11 +26,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
26
26
|
default: string;
|
|
27
27
|
};
|
|
28
28
|
invalid: BooleanConstructor;
|
|
29
|
-
invalidLabel: (
|
|
29
|
+
invalidLabel: (StringConstructor | ArrayConstructor)[];
|
|
30
30
|
valid: BooleanConstructor;
|
|
31
|
-
validLabel: (
|
|
31
|
+
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
32
32
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
-
modelValue: (
|
|
33
|
+
modelValue: (StringConstructor | ArrayConstructor)[];
|
|
34
34
|
label: StringConstructor;
|
|
35
35
|
name: {
|
|
36
36
|
type: StringConstructor;
|
|
@@ -56,9 +56,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
56
56
|
default: string;
|
|
57
57
|
};
|
|
58
58
|
invalid: BooleanConstructor;
|
|
59
|
-
invalidLabel: (
|
|
59
|
+
invalidLabel: (StringConstructor | ArrayConstructor)[];
|
|
60
60
|
valid: BooleanConstructor;
|
|
61
|
-
validLabel: (
|
|
61
|
+
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
62
62
|
}>> & {
|
|
63
63
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
64
64
|
}, {
|
|
@@ -67,10 +67,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
67
67
|
hintLabel: string;
|
|
68
68
|
invalid: boolean;
|
|
69
69
|
valid: boolean;
|
|
70
|
+
vertical: boolean;
|
|
70
71
|
options: (string | Option)[];
|
|
71
72
|
labelKey: string | Function;
|
|
72
73
|
valueKey: string | Function;
|
|
73
|
-
vertical: boolean;
|
|
74
74
|
}>, {
|
|
75
75
|
default: (_: {}) => any;
|
|
76
76
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const VvCheckboxGroupProps: {
|
|
2
|
-
modelValue: (
|
|
2
|
+
modelValue: (StringConstructor | ArrayConstructor)[];
|
|
3
3
|
label: StringConstructor;
|
|
4
4
|
name: {
|
|
5
5
|
type: StringConstructor;
|
|
@@ -25,8 +25,8 @@ export declare const VvCheckboxGroupProps: {
|
|
|
25
25
|
default: string;
|
|
26
26
|
};
|
|
27
27
|
invalid: BooleanConstructor;
|
|
28
|
-
invalidLabel: (
|
|
28
|
+
invalidLabel: (StringConstructor | ArrayConstructor)[];
|
|
29
29
|
valid: BooleanConstructor;
|
|
30
|
-
validLabel: (
|
|
30
|
+
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
31
31
|
};
|
|
32
32
|
export declare const VvCheckboxGroupEvents: string[];
|