@volverjs/ui-vue 0.0.4 → 0.0.5-beta.2
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 +2 -2
- package/auto-imports.d.ts +12 -3
- package/bin/icons.cjs +1 -73
- package/dist/Volver.d.ts +19 -11
- package/dist/components/VvAccordion/VvAccordion.es.js +165 -106
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
- package/dist/components/VvAccordion/index.d.ts +8 -3
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +264 -164
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
- package/dist/components/VvAccordionGroup/index.d.ts +8 -0
- package/dist/components/VvAction/VvAction.es.js +276 -98
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +12 -12
- package/dist/components/VvAction/index.d.ts +2 -2
- package/dist/components/VvBadge/VvBadge.es.js +213 -44
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
- package/dist/components/VvBadge/index.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +247 -75
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
- package/dist/components/VvBreadcrumb/index.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +646 -360
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +18 -18
- package/dist/components/VvButton/index.d.ts +13 -13
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +261 -79
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
- package/dist/components/VvButtonGroup/index.d.ts +1 -1
- package/dist/components/VvCard/VvCard.es.js +57 -38
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +562 -274
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
- package/dist/components/VvCheckbox/index.d.ts +5 -5
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +661 -340
- 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 +1546 -983
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +138 -51
- package/dist/components/VvCombobox/index.d.ts +41 -10
- package/dist/components/VvDialog/VvDialog.es.js +387 -141
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
- package/dist/components/VvDialog/index.d.ts +4 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +452 -244
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +130 -42
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +13 -13
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -2
- package/dist/components/VvDropdown/index.d.ts +40 -11
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +373 -160
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +43 -28
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +285 -90
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +113 -65
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
- package/dist/components/VvIcon/index.d.ts +2 -2
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +986 -462
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +100 -20
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +66 -13
- package/dist/components/VvProgress/VvProgress.es.js +216 -45
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
- package/dist/components/VvProgress/index.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +499 -238
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
- package/dist/components/VvRadio/index.d.ts +5 -5
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +598 -304
- 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 +631 -324
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +13 -13
- package/dist/components/VvSelect/index.d.ts +3 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +676 -355
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +20 -20
- package/dist/components/VvTextarea/index.d.ts +4 -4
- package/dist/components/VvTooltip/VvTooltip.es.js +215 -47
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
- package/dist/components/VvTooltip/index.d.ts +2 -2
- package/dist/components/index.es.js +3522 -2231
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
- package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
- package/dist/composables/group/useProvideGroupState.d.ts +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useComponentIcon.d.ts +7 -7
- package/dist/composables/useDebouncedInput.d.ts +4 -1
- package/dist/composables/useDefaults.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +2 -2
- package/dist/composables/useTextCount.d.ts +3 -3
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/index.es.js +264 -55
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.d.ts +3 -0
- package/dist/directives/v-contextmenu.es.js +42 -0
- package/dist/directives/v-contextmenu.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +222 -53
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.d.ts +3 -1
- package/dist/icons.es.js +40 -23
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +112 -3607
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +50 -18
- package/dist/resolvers/unplugin.d.ts +7 -1
- package/dist/resolvers/unplugin.es.js +77 -37
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +12 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +12 -0
- package/dist/stories/InputText/InputText.settings.d.ts +53 -0
- package/dist/stories/argTypes.d.ts +13 -1
- package/package.json +126 -40
- package/src/Volver.ts +49 -22
- 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 +19 -22
- package/src/components/VvAccordion/index.ts +12 -4
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
- package/src/components/VvAccordionGroup/index.ts +8 -0
- package/src/components/VvAction/VvAction.vue +7 -7
- package/src/components/VvAction/index.ts +1 -1
- package/src/components/VvBadge/VvBadge.vue +2 -2
- package/src/components/VvBadge/index.ts +1 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
- package/src/components/VvButton/VvButton.vue +11 -11
- package/src/components/VvButton/index.ts +10 -9
- package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
- package/src/components/VvButtonGroup/index.ts +1 -1
- package/src/components/VvCard/VvCard.vue +2 -2
- package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
- package/src/components/VvCheckbox/index.ts +11 -7
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
- package/src/components/VvCheckboxGroup/index.ts +1 -1
- package/src/components/VvCombobox/VvCombobox.vue +44 -26
- package/src/components/VvCombobox/index.ts +1 -1
- package/src/components/VvDialog/VvDialog.vue +28 -11
- package/src/components/VvDialog/index.ts +5 -2
- package/src/components/VvDropdown/VvDropdown.vue +7 -5
- package/src/components/VvDropdown/VvDropdownAction.vue +7 -5
- package/src/components/VvDropdown/VvDropdownOption.vue +17 -10
- package/src/components/VvDropdown/index.ts +3 -3
- package/src/components/VvIcon/VvIcon.vue +3 -3
- package/src/components/VvIcon/index.ts +3 -3
- package/src/components/VvInputText/VvInputClearAction.ts +2 -2
- package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
- package/src/components/VvInputText/VvInputStepAction.ts +3 -2
- package/src/components/VvInputText/VvInputText.vue +130 -37
- package/src/components/VvInputText/VvInputTextActions.ts +5 -8
- package/src/components/VvInputText/index.ts +62 -1
- package/src/components/VvProgress/VvProgress.vue +2 -2
- package/src/components/VvProgress/index.ts +1 -1
- package/src/components/VvRadio/VvRadio.vue +3 -7
- package/src/components/VvRadio/index.ts +11 -7
- package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
- package/src/components/VvRadioGroup/index.ts +1 -1
- package/src/components/VvSelect/VvSelect.vue +4 -4
- package/src/components/VvSelect/index.ts +1 -1
- package/src/components/VvTextarea/VvTextarea.vue +6 -6
- package/src/components/VvTextarea/index.ts +1 -1
- package/src/components/VvTooltip/VvTooltip.vue +2 -2
- package/src/components/VvTooltip/index.ts +3 -3
- package/src/composables/dropdown/useInjectDropdown.ts +2 -2
- package/src/composables/dropdown/useProvideDropdown.ts +2 -2
- package/src/composables/group/useInjectedGroupState.ts +1 -1
- package/src/composables/group/useProvideGroupState.ts +1 -1
- package/src/composables/useComponentIcon.ts +1 -1
- package/src/composables/useDebouncedInput.ts +10 -3
- package/src/composables/useDefaults.ts +89 -0
- package/src/composables/useModifiers.ts +4 -2
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/useVolver.ts +2 -2
- package/src/directives/index.ts +3 -1
- package/src/directives/v-contextmenu.ts +40 -0
- package/src/directives/v-tooltip.ts +2 -2
- package/src/icons.ts +1 -1
- package/src/index.ts +0 -2
- package/src/props/index.ts +20 -10
- package/src/resolvers/unplugin.ts +15 -1
- package/src/stories/Accordion/Accordion.stories.mdx +8 -2
- package/src/stories/Accordion/Accordion.test.ts +21 -15
- package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +41 -0
- package/src/stories/InputText/InputText.settings.ts +53 -0
- package/src/stories/InputText/InputText.stories.mdx +40 -0
- package/src/stories/InputText/InputText.test.ts +5 -2
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +1 -1
- package/src/stories/argTypes.ts +12 -2
- package/src/types/group.d.ts +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@vueuse/core"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","nanoid"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckboxGroup=l(e.vue,e.core,e.nanoid)}(this,(function(e,l,n){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),o=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(o||{});const u=Symbol.for("checkGroup");function i(e,l,n){return n?d(e,n)===d(l,n):r(e,l)}function r(e,l){if(e===l)return!0;if(e&&l&&"object"==typeof e&&"object"==typeof l){const n=Array.isArray(e),t=Array.isArray(l);let a,o,u;if(n&&t){if(o=e.length,o!=l.length)return!1;for(a=o;0!=a--;)if(!r(e[a],l[a]))return!1;return!0}if(n!=t)return!1;const i=e instanceof Date,d=l instanceof Date;if(i!=d)return!1;if(i&&d)return e.getTime()==l.getTime();const v=e instanceof RegExp,s=l instanceof RegExp;if(v!=s)return!1;if(v&&s)return e.toString()==l.toString();const c=Object.keys(e);if(o=c.length,o!==Object.keys(l).length)return!1;for(a=o;0!=a--;)if(!Object.prototype.hasOwnProperty.call(l,c[a]))return!1;for(a=o;0!=a--;)if(u=c[a],!r(e[u],l[u]))return!1;return!0}return e!=e&&l!=l}function d(e,l){if(e&&Object.keys(e).length&&l){if(-1===l.indexOf("."))return e[l];{const n=l.split(".");let t=e;for(let l=0,a=n.length;l<a;++l){if(null==e)return null;t=t[n[l]]}return t}}return null}function v(l){return null==(n=e.unref(l))||""===n||Array.isArray(n)&&0===n.length||!(n instanceof Date)&&"object"==typeof n&&0===Object.keys(n).length;var n}function s(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}function c(n,t){const{invalid:a,valid:o,hint:u,loading:i}=t,{hintLabel:r,modelValue:c,valid:f,validLabel:p,invalid:m,invalidLabel:b,...y}=e.toRefs(n),g=d(y,"loading"),h=d(y,"loadingLabel"),k=e.computed((()=>!!m.value&&(!(!m.value||!a)||(!!((null==b?void 0:b.value)&&Array.isArray(b.value)&&b.value.length>0)||!(!(null==b?void 0:b.value)||v(b)))))),S=e.computed((()=>!!(r&&r.value||u))),V=e.computed((()=>!!(p&&p.value||o))),B=e.computed((()=>!!((null==g?void 0:g.value)&&i||(null==g?void 0:g.value)&&(null==h?void 0:h.value)))),A=e.computed((()=>S.value||V.value||k.value||B.value));return{hasInvalid:k,hasHint:S,hasValid:V,hasLoading:B,HintSlot:{name:"HintSlot",props:{params:{type:Object,default:()=>({})}},setup(n){const t=e.computed((()=>{const e=l.toReactive({hintLabel:r,modelValue:c,valid:f,validLabel:p,invalid:m,invalidLabel:b,loading:g,loadingLabel:h,...n.params});return(null==m?void 0:m.value)?(null==a?void 0:a(e))||s(null==b?void 0:b.value)||(null==r?void 0:r.value):(null==f?void 0:f.value)?(null==o?void 0:o(e))||s(null==p?void 0:p.value)||(null==r?void 0:r.value):(null==g?void 0:g.value)?(null==i?void 0:i(e))||s(null==h?void 0:h.value)||(null==r?void 0:r.value):(null==u?void 0:u(e))||s(null==r?void 0:r.value)||(null==r?void 0:r.value)}));return{isVisible:A,hasInvalid:k,hasValid:V,hintContent:t}},render(){if(this.isVisible)return e.h("small",{role:this.hasInvalid?"alert":this.hasValid?"status":void 0},this.hintContent)}}}}const f={valid:Boolean,validLabel:[String,Array]},p={invalid:Boolean,invalidLabel:[String,Array]},m={disabled:Boolean},b=(Boolean,Boolean,{label:[String,Number]}),y={readonly:Boolean},g={modifiers:[String,Array]},h={hintLabel:{type:String,default:""}},k={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}};a.before;const S={tabindex:{type:[String,Number],default:0}},V={id:[String,Number]};t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const B={...{...V,name:{type:String,required:!0}},...S,...f,...p,...h,...m,...y,...g,...b,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String]},A={...f,...p,...k,...h,...m,...y,...g,...b,modelValue:[String,Array,Boolean,Number,Symbol],name:{type:String,required:!0},vertical:Boolean};o.button;const x={...B,...g,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function O(l,n){const{group:t,isInGroup:a,getGroupOrLocalRef:o}=function(l){const n=e.inject(l,void 0),t=e.computed((()=>!v(n)));return{group:n,isInGroup:t,getGroupOrLocalRef:function(l,t,a){if(null==n?void 0:n.value){const t=e.unref(n.value)[l];return e.computed({get:()=>null==t?void 0:t.value,set(e){t.value=e}})}const o=e.toRef(t,l);return e.computed({get:()=>o.value,set(e){a&&a(`update:${l}`,e)}})}}}(u),{id:i,switch:r,indeterminate:d}=e.toRefs(l),s=o("modelValue",l,n),c=o("valid",l),f=o("invalid",l),p=e.computed((()=>{var e;return Boolean(l.readonly||(null==(e=null==t?void 0:t.value)?void 0:e.disabled.value))})),m=e.computed((()=>{var e;return Boolean(l.disabled||(null==(e=null==t?void 0:t.value)?void 0:e.disabled.value))}));return{id:i,propsSwitch:r,indeterminate:d,group:t,isInGroup:a,modelValue:s,valid:c,invalid:f,readonly:p,disabled:m}}function j(l,n,t){return e.computed((()=>{const a={[l]:!0},o="string"==typeof(null==n?void 0:n.value)?n.value.split(" "):null==n?void 0:n.value;return o&&Array.isArray(o)&&o.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((n=>{a[`${l}--${n}`]=e.unref(t.value[n])})),a}))}const L=["for"],C=["id","name","disabled","value","tabindex","aria-invalid"],w=e.defineComponent({name:"VvCheckbox",props:x,emits:["click","update:modelValue","change","blur"],setup(l,{emit:t}){const a=l,o=e.useSlots(),{id:u,disabled:r,readonly:d,valid:v,invalid:s,propsSwitch:f,modelValue:p,indeterminate:m,isInGroup:b}=O(a,t),y=(l=>e.computed((()=>String((null==l?void 0:l.value)||n.nanoid()))))(u),g=e.computed((()=>S.value?-1:a.tabindex)),h=e.ref(),k=e.computed((()=>void 0!==a.uncheckedValue&&!b.value)),S=e.computed((()=>r.value||d.value)),V=e.computed((()=>!0===s.value||!0!==v.value&&void 0)),B=e.computed((()=>k.value?p.value===a.value:Array.isArray(p.value)?function(e,l){if(null!=e&&l&&l.length)for(const n of l)if(i(e,n))return!0;return!1}(a.value,p.value):i(a.value,p.value))),A=e.computed((()=>!!m.value||!(B.value||!k.value||a.uncheckedValue===p.value))),x=e.computed((()=>{if(!k.value)return!["string","number","boolean"].includes(typeof a.value)||a.value})),w=e.computed({get:()=>B.value,set(e){if(k.value)p.value=e?a.value:a.uncheckedValue;else if(Array.isArray(p.value)||b.value){const l=new Set(Array.isArray(p.value)?p.value:void 0!==p.value?[p.value]:[]);e?l.add(a.value):l.delete(a.value),p.value=[...l]}else p.value=e?a.value:void 0;t("change",e)}}),{modifiers:N}=e.toRefs(a),R=j("vv-checkbox",N,e.computed((()=>({switch:f.value,valid:v.value,invalid:s.value,disabled:r.value,readonly:d.value,indeterminate:m.value}))));e.watchEffect((()=>{k.value&&Array.isArray(p.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>A.value),(e=>{h.value.indeterminate=!!e})),e.onMounted((()=>{A.value&&(h.value.indeterminate=!0)}));const{HintSlot:E}=c(a,o);return(l,n)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(R)),for:e.unref(y)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(y),ref_key:"input",ref:h,"onUpdate:modelValue":n[0]||(n[0]=l=>e.isRef(w)?w.value=l:null),type:"checkbox",class:"vv-checkbox__input",name:l.name,disabled:e.unref(S),value:e.unref(x),tabindex:e.unref(g),"aria-invalid":e.unref(V)},null,8,C),[[e.vModelCheckbox,e.unref(w)]]),e.renderSlot(l.$slots,"default",{value:e.unref(p)},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)])),e.createVNode(e.unref(E),{class:"vv-checkbox__hint",params:{value:e.unref(p)}},null,8,["params"])],10,L))}}),N=A;const R=["textContent"],E={class:"vv-checkbox-group__wrapper"};return e.defineComponent({name:"VvCheckboxGroup",props:N,emits:["update:modelValue","change"],setup(n,{emit:t}){const a=n,o=e.useSlots(),i=l.useVModel(a,"modelValue",t),{disabled:r,readonly:d,vertical:v,valid:s,invalid:f,modifiers:p}=e.toRefs(a);!function(l){if(Object.keys(l).some((n=>"key"!==n&&!e.isRef(l[n]))))throw Error("One or more groupState props aren't ref.");e.provide(l.key,e.computed((()=>l)))}({key:u,modelValue:i,disabled:r,readonly:d,valid:s,invalid:f});const{getOptionLabel:m,getOptionValue:b}=function(l){const{options:n,labelKey:t,valueKey:a,disabledKey:o}=e.toRefs(l);return{options:n,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:"function"==typeof t.value?t.value(e):e[t.value],getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof a.value?a.value(e):e[a.value],getOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof o.value?o.value(e):e[o.value])}}(a),y=j("vv-checkbox-group",p,e.computed((()=>({disabled:r.value,readonly:d.value,horizontal:!v.value,valid:s.value,invalid:f.value})))),{HintSlot:g}=c(a,o);return(l,n)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(e.unref(y))},[l.label?(e.openBlock(),e.createElementBlock("legend",{key:0,textContent:e.toDisplayString(l.label)},null,8,R)):e.createCommentVNode("",!0),e.createElementVNode("div",E,[l.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.options,((l,n)=>(e.openBlock(),e.createBlock(w,e.mergeProps({key:n},((e,l)=>({id:`${a.name}_opt${l}`,name:a.name,label:m(e),value:b(e)}))(l,n)),null,16)))),128)):e.renderSlot(l.$slots,"default",{key:1})]),e.createVNode(e.unref(g),{class:"vv-checkbox-group__hint"})],2))}})}));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Option } from '
|
|
1
|
+
import type { Option } from '../../types/generic';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
-
modelValue: (StringConstructor | ArrayConstructor)[];
|
|
3
|
+
modelValue: (SymbolConstructor | StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
|
|
4
4
|
name: {
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
required: boolean;
|
|
7
7
|
};
|
|
8
8
|
vertical: BooleanConstructor;
|
|
9
9
|
label: (StringConstructor | NumberConstructor)[];
|
|
10
|
-
modifiers:
|
|
10
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
11
11
|
readonly: BooleanConstructor;
|
|
12
12
|
disabled: BooleanConstructor;
|
|
13
13
|
hintLabel: {
|
|
@@ -15,7 +15,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
17
|
options: {
|
|
18
|
-
type:
|
|
18
|
+
type: globalThis.PropType<(string | Option)[]>;
|
|
19
19
|
default: () => never[];
|
|
20
20
|
};
|
|
21
21
|
labelKey: {
|
|
@@ -35,14 +35,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
35
35
|
valid: BooleanConstructor;
|
|
36
36
|
validLabel: (StringConstructor | ArrayConstructor)[];
|
|
37
37
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
-
modelValue: (StringConstructor | ArrayConstructor)[];
|
|
38
|
+
modelValue: (SymbolConstructor | StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
|
|
39
39
|
name: {
|
|
40
40
|
type: StringConstructor;
|
|
41
41
|
required: boolean;
|
|
42
42
|
};
|
|
43
43
|
vertical: BooleanConstructor;
|
|
44
44
|
label: (StringConstructor | NumberConstructor)[];
|
|
45
|
-
modifiers:
|
|
45
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
46
46
|
readonly: BooleanConstructor;
|
|
47
47
|
disabled: BooleanConstructor;
|
|
48
48
|
hintLabel: {
|
|
@@ -50,7 +50,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
50
50
|
default: string;
|
|
51
51
|
};
|
|
52
52
|
options: {
|
|
53
|
-
type:
|
|
53
|
+
type: globalThis.PropType<(string | Option)[]>;
|
|
54
54
|
default: () => never[];
|
|
55
55
|
};
|
|
56
56
|
labelKey: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const VvCheckboxGroupProps: {
|
|
2
|
-
modelValue: (StringConstructor | ArrayConstructor)[];
|
|
2
|
+
modelValue: (SymbolConstructor | StringConstructor | BooleanConstructor | ArrayConstructor | NumberConstructor)[];
|
|
3
3
|
name: {
|
|
4
4
|
type: StringConstructor;
|
|
5
5
|
required: boolean;
|
|
6
6
|
};
|
|
7
7
|
vertical: BooleanConstructor;
|
|
8
8
|
label: (StringConstructor | NumberConstructor)[];
|
|
9
|
-
modifiers:
|
|
9
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
10
10
|
readonly: BooleanConstructor;
|
|
11
11
|
disabled: BooleanConstructor;
|
|
12
12
|
hintLabel: {
|
|
@@ -14,7 +14,7 @@ export declare const VvCheckboxGroupProps: {
|
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
16
|
options: {
|
|
17
|
-
type:
|
|
17
|
+
type: globalThis.PropType<(string | import("../../types/generic").Option)[]>;
|
|
18
18
|
default: () => never[];
|
|
19
19
|
};
|
|
20
20
|
labelKey: {
|