@volverjs/ui-vue 0.0.10-beta.20 → 0.0.10-beta.21
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/dist/components/VvAccordion/VvAccordion.es.js +3 -1
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +6 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
- package/dist/components/VvAction/VvAction.es.js +2 -1
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +7 -0
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +10 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +2 -1
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +33 -15
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +2 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +1 -1
- package/dist/components/VvCard/VvCard.es.js +5 -1
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +2 -1
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +13 -2
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +48 -15
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +42 -42
- package/dist/components/VvDialog/VvDialog.es.js +3 -0
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +42 -42
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +2 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +1 -1
- package/dist/components/VvIcon/index.d.ts +12 -0
- package/dist/components/VvInputFile/VvInputFile.es.js +258 -82
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +152 -29
- package/dist/components/VvInputFile/index.d.ts +119 -14
- package/dist/components/VvInputText/VvInputClearAction.d.ts +6 -4
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +79 -65
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
- package/dist/components/VvInputText/index.d.ts +6 -15
- package/dist/components/VvNav/VvNav.es.js +2 -1
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +2 -1
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +13 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +4 -0
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
- package/dist/components/VvTab/VvTab.es.js +7 -2
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +4 -0
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +1 -1
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.es.js +354 -115
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
- package/dist/icons.es.js +210 -210
- package/dist/icons.umd.js +1 -1
- package/dist/stories/InputFile/InputFile.stories.d.ts +1 -2
- package/dist/stories/InputFile/{InputFileModifiers.stories.d.ts → InputFileDropArea.stories.d.ts} +4 -4
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +1 -0
- package/dist/types/input-file.d.ts +2 -0
- package/package.json +45 -45
- 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/VvIcon/index.ts +13 -0
- package/src/components/VvInputFile/VvInputFile.vue +103 -40
- package/src/components/VvInputFile/index.ts +88 -10
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +6 -6
- package/src/components/VvInputText/index.ts +7 -15
- package/src/stories/InputFile/InputFile.settings.ts +1 -1
- package/src/stories/InputFile/InputFile.stories.ts +7 -16
- package/src/stories/InputFile/{InputFileModifiers.stories.ts → InputFileDropArea.stories.ts} +18 -13
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +11 -3
- package/src/types/input-file.ts +4 -2
|
@@ -199,7 +199,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
199
199
|
beforeCollapse: (...args: any[]) => void;
|
|
200
200
|
afterExpand: (...args: any[]) => void;
|
|
201
201
|
afterCollapse: (...args: any[]) => void;
|
|
202
|
-
}, string, import("vue").
|
|
202
|
+
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
203
203
|
modelValue: {
|
|
204
204
|
type: BooleanConstructor;
|
|
205
205
|
default: undefined;
|
|
@@ -395,6 +395,47 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
395
395
|
}, {
|
|
396
396
|
modelValue: boolean;
|
|
397
397
|
modifiers: string | string[];
|
|
398
|
+
size: boolean | {
|
|
399
|
+
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
400
|
+
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
401
|
+
altBoundary?: boolean | undefined;
|
|
402
|
+
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
403
|
+
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
404
|
+
apply?: ((args: {
|
|
405
|
+
x: number;
|
|
406
|
+
y: number;
|
|
407
|
+
initialPlacement: import("@floating-ui/utils").Placement;
|
|
408
|
+
placement: import("@floating-ui/utils").Placement;
|
|
409
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
410
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
411
|
+
rects: import("@floating-ui/utils").ElementRects;
|
|
412
|
+
platform: import("@floating-ui/core").Platform;
|
|
413
|
+
elements: import("@floating-ui/dom").Elements;
|
|
414
|
+
} & {
|
|
415
|
+
availableWidth: number;
|
|
416
|
+
availableHeight: number;
|
|
417
|
+
}) => void | Promise<void>) | undefined;
|
|
418
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
419
|
+
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
420
|
+
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
421
|
+
altBoundary?: boolean | undefined;
|
|
422
|
+
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
423
|
+
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
424
|
+
apply?: ((args: {
|
|
425
|
+
x: number;
|
|
426
|
+
y: number;
|
|
427
|
+
initialPlacement: import("@floating-ui/utils").Placement;
|
|
428
|
+
placement: import("@floating-ui/utils").Placement;
|
|
429
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
430
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
431
|
+
rects: import("@floating-ui/utils").ElementRects;
|
|
432
|
+
platform: import("@floating-ui/core").Platform;
|
|
433
|
+
elements: import("@floating-ui/dom").Elements;
|
|
434
|
+
} & {
|
|
435
|
+
availableWidth: number;
|
|
436
|
+
availableHeight: number;
|
|
437
|
+
}) => void | Promise<void>) | undefined;
|
|
438
|
+
}> | undefined;
|
|
398
439
|
reference: HTMLElement | null;
|
|
399
440
|
placement: "left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
|
|
400
441
|
strategy: "absolute" | "fixed";
|
|
@@ -451,47 +492,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
451
492
|
}> | undefined;
|
|
452
493
|
transitionName: string;
|
|
453
494
|
offset: string | import("@floating-ui/vue").OffsetOptions | undefined;
|
|
454
|
-
size: boolean | {
|
|
455
|
-
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
456
|
-
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
457
|
-
altBoundary?: boolean | undefined;
|
|
458
|
-
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
459
|
-
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
460
|
-
apply?: ((args: {
|
|
461
|
-
x: number;
|
|
462
|
-
y: number;
|
|
463
|
-
initialPlacement: import("@floating-ui/utils").Placement;
|
|
464
|
-
placement: import("@floating-ui/utils").Placement;
|
|
465
|
-
strategy: import("@floating-ui/utils").Strategy;
|
|
466
|
-
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
467
|
-
rects: import("@floating-ui/utils").ElementRects;
|
|
468
|
-
platform: import("@floating-ui/core").Platform;
|
|
469
|
-
elements: import("@floating-ui/dom").Elements;
|
|
470
|
-
} & {
|
|
471
|
-
availableWidth: number;
|
|
472
|
-
availableHeight: number;
|
|
473
|
-
}) => void | Promise<void>) | undefined;
|
|
474
|
-
} | import("@floating-ui/dom").Derivable<{
|
|
475
|
-
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
476
|
-
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
477
|
-
altBoundary?: boolean | undefined;
|
|
478
|
-
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
479
|
-
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
480
|
-
apply?: ((args: {
|
|
481
|
-
x: number;
|
|
482
|
-
y: number;
|
|
483
|
-
initialPlacement: import("@floating-ui/utils").Placement;
|
|
484
|
-
placement: import("@floating-ui/utils").Placement;
|
|
485
|
-
strategy: import("@floating-ui/utils").Strategy;
|
|
486
|
-
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
487
|
-
rects: import("@floating-ui/utils").ElementRects;
|
|
488
|
-
platform: import("@floating-ui/core").Platform;
|
|
489
|
-
elements: import("@floating-ui/dom").Elements;
|
|
490
|
-
} & {
|
|
491
|
-
availableWidth: number;
|
|
492
|
-
availableHeight: number;
|
|
493
|
-
}) => void | Promise<void>) | undefined;
|
|
494
|
-
}> | undefined;
|
|
495
495
|
autoPlacement: boolean | {
|
|
496
496
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
497
497
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
@@ -53,7 +53,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
53
53
|
type: BooleanConstructor;
|
|
54
54
|
default: boolean;
|
|
55
55
|
};
|
|
56
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
56
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
57
57
|
modifiers: {
|
|
58
58
|
type: globalThis.PropType<string | string[]>;
|
|
59
59
|
default: undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{}>>, {}, {}>, {
|
|
2
2
|
default?(_: {}): any;
|
|
3
3
|
}>;
|
|
4
4
|
export default _default;
|
|
@@ -3,7 +3,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3
3
|
type: (StringConstructor | NumberConstructor)[];
|
|
4
4
|
default: undefined;
|
|
5
5
|
};
|
|
6
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
7
7
|
label: {
|
|
8
8
|
type: (StringConstructor | NumberConstructor)[];
|
|
9
9
|
default: undefined;
|
|
@@ -24,7 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
24
24
|
type: BooleanConstructor;
|
|
25
25
|
default: boolean;
|
|
26
26
|
};
|
|
27
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
27
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
28
28
|
deselectHintLabel: {
|
|
29
29
|
type: StringConstructor;
|
|
30
30
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject, defineComponent, ref, watch, computed, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, provide, createElementBlock, toRefs, createVNode } from "vue";
|
|
1
|
+
import { inject, defineComponent, ref, watch, computed, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, withCtx, createCommentVNode, renderSlot, createTextVNode, toDisplayString, provide, createElementBlock, toRefs, createVNode } from "vue";
|
|
2
2
|
import "mitt";
|
|
3
3
|
import { useElementHover, useFocus, useFocusWithin } from "@vueuse/core";
|
|
4
4
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
@@ -409,6 +409,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
409
409
|
onMouseleavePassive: onMouseleave
|
|
410
410
|
}), {
|
|
411
411
|
default: withCtx(() => [
|
|
412
|
+
createCommentVNode(" @slot Default slot "),
|
|
412
413
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
413
414
|
createTextVNode(
|
|
414
415
|
toDisplayString(_ctx.label),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownAction=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{}),u=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(u||{}),i=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(i||{});const s=Symbol.for("volver"),d=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),f=Symbol.for("dropdownAction"),p={to:{type:[String,Object]},href:String,target:{type:String,default:void 0,validator:e=>Object.values(i).includes(e)},rel:{type:String,default:"noopener noreferrer"}},v={disabled:{type:Boolean,default:!1}},m={active:{type:Boolean,default:!1}},b={current:{type:Boolean,default:!1}},y={pressed:{type:Boolean,default:!1}},g={label:{type:[String,Number],default:void 0}},k={modifiers:{type:[String,Array],default:void 0}};n.before,r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const h={...v,...g,...y,...m,...b,...p,type:{type:String,default:l.button,validator:e=>Object.values(l).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:a.button}},x=h;const B=e.defineComponent({name:"VvAction",props:x,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:r}){const n=t,l=r,u=e.inject(s),i=e.ref(null);o({$el:i});const{reference:c,bus:p,aria:v,expanded:m}=e.inject(d,{});e.watch((()=>i.value),(e=>{c&&(c.value=e)}));const b=e.computed((()=>n.pressed||(null==m?void 0:m.value))),{role:y}=e.inject(f,{}),g=e.computed((()=>{switch(!0){case n.disabled:return a.button;case void 0!==n.to:return(null==u?void 0:u.nuxt)?a.nuxtLink:a.routerLink;case void 0!==n.href:return a.a;default:return n.defaultTag}})),k=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!b.value||void 0,ariaLabel:n.ariaLabel,role:null==y?void 0:y.value};switch(g.value){case a.a:return{...e,href:n.href,target:n.target,rel:n.rel};case a.routerLink:case a.nuxtLink:return{...e,to:n.to,target:n.target};case a.button:return{...e,type:n.type,disabled:n.disabled};default:return e}})),h=e=>{n.disabled?e.preventDefault():(null==p||p.emit("click",e),l("click",e))},x=e=>{null==p||p.emit("mouseover",e),l("mouseover",e)},B=e=>{null==p||p.emit("mouseleave",e),l("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(g)),e.mergeProps(e.unref(k),{ref_key:"element",ref:i,class:{active:t.active,pressed:e.unref(b),disabled:t.disabled,current:t.current},onClickPassive:h,onMouseoverPassive:x,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});const S=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:r,expanded:n}=e.inject(c,{}),l=e.ref(null);!function({expanded:t}){e.provide(f,{role:e.ref(u.menuitem),expanded:t})}({expanded:n});const a=o.useElementHover(l),{focused:i}=o.useFocus(l),{focused:s}=o.useFocusWithin(l);return e.watch(a,(e=>{e&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(r)},{ref_key:"element",ref:l,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}});return e.defineComponent({name:"VvDropdownAction",props:{...h,...k},setup(t){const o=t,{modifiers:r}=e.toRefs(o),n=function(t,o,r){return e.computed((()=>{const n={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(n[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{n[`${t}--${o}`]=e.unref(r.value[o])})),n}))}("vv-dropdown-action",r);return(t,o)=>(e.openBlock(),e.createBlock(S,null,{default:e.withCtx((()=>[e.createVNode(B,e.mergeProps({disabled:t.disabled,pressed:t.pressed,active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{class:e.unref(n)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"])])),_:3}))}})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownAction=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{}),u=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(u||{}),i=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(i||{});const s=Symbol.for("volver"),d=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),f=Symbol.for("dropdownAction"),p={to:{type:[String,Object]},href:String,target:{type:String,default:void 0,validator:e=>Object.values(i).includes(e)},rel:{type:String,default:"noopener noreferrer"}},v={disabled:{type:Boolean,default:!1}},m={active:{type:Boolean,default:!1}},b={current:{type:Boolean,default:!1}},y={pressed:{type:Boolean,default:!1}},g={label:{type:[String,Number],default:void 0}},k={modifiers:{type:[String,Array],default:void 0}};n.before,r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const h={...v,...g,...y,...m,...b,...p,type:{type:String,default:l.button,validator:e=>Object.values(l).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:a.button}},x=h;const B=e.defineComponent({name:"VvAction",props:x,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:r}){const n=t,l=r,u=e.inject(s),i=e.ref(null);o({$el:i});const{reference:c,bus:p,aria:v,expanded:m}=e.inject(d,{});e.watch((()=>i.value),(e=>{c&&(c.value=e)}));const b=e.computed((()=>n.pressed||(null==m?void 0:m.value))),{role:y}=e.inject(f,{}),g=e.computed((()=>{switch(!0){case n.disabled:return a.button;case void 0!==n.to:return(null==u?void 0:u.nuxt)?a.nuxtLink:a.routerLink;case void 0!==n.href:return a.a;default:return n.defaultTag}})),k=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!b.value||void 0,ariaLabel:n.ariaLabel,role:null==y?void 0:y.value};switch(g.value){case a.a:return{...e,href:n.href,target:n.target,rel:n.rel};case a.routerLink:case a.nuxtLink:return{...e,to:n.to,target:n.target};case a.button:return{...e,type:n.type,disabled:n.disabled};default:return e}})),h=e=>{n.disabled?e.preventDefault():(null==p||p.emit("click",e),l("click",e))},x=e=>{null==p||p.emit("mouseover",e),l("mouseover",e)},B=e=>{null==p||p.emit("mouseleave",e),l("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(g)),e.mergeProps(e.unref(k),{ref_key:"element",ref:i,class:{active:t.active,pressed:e.unref(b),disabled:t.disabled,current:t.current},onClickPassive:h,onMouseoverPassive:x,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.createCommentVNode(" @slot Default slot "),e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});const S=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:r,expanded:n}=e.inject(c,{}),l=e.ref(null);!function({expanded:t}){e.provide(f,{role:e.ref(u.menuitem),expanded:t})}({expanded:n});const a=o.useElementHover(l),{focused:i}=o.useFocus(l),{focused:s}=o.useFocusWithin(l);return e.watch(a,(e=>{e&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(r)},{ref_key:"element",ref:l,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}});return e.defineComponent({name:"VvDropdownAction",props:{...h,...k},setup(t){const o=t,{modifiers:r}=e.toRefs(o),n=function(t,o,r){return e.computed((()=>{const n={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(n[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{n[`${t}--${o}`]=e.unref(r.value[o])})),n}))}("vv-dropdown-action",r);return(t,o)=>(e.openBlock(),e.createBlock(S,null,{default:e.withCtx((()=>[e.createVNode(B,e.mergeProps({disabled:t.disabled,pressed:t.pressed,active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{class:e.unref(n)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"])])),_:3}))}})}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VvIconProps } from '.';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VvIconProps>, {
|
|
3
3
|
prefix: import(".").IconPrefix;
|
|
4
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VvIconProps>, {
|
|
5
5
|
prefix: import(".").IconPrefix;
|
|
6
6
|
}>>>, {
|
|
7
7
|
prefix: string;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import type { IconifyIconOnLoad, IconifyRenderMode } from '@iconify/vue';
|
|
2
|
+
export declare const ACTION_ICONS: {
|
|
3
|
+
readonly showPassword: "eye-on";
|
|
4
|
+
readonly hidePassword: "eye-off";
|
|
5
|
+
readonly showDatePicker: "calendar";
|
|
6
|
+
readonly showTimePicker: "time";
|
|
7
|
+
readonly showColorPicker: "color";
|
|
8
|
+
readonly clear: "close";
|
|
9
|
+
readonly add: "add";
|
|
10
|
+
readonly remove: "trash";
|
|
11
|
+
readonly edit: "edit";
|
|
12
|
+
readonly download: "download";
|
|
13
|
+
};
|
|
2
14
|
export declare enum IconPrefix {
|
|
3
15
|
simple = "simple",
|
|
4
16
|
normal = "normal",
|