@volverjs/ui-vue 0.0.9 → 0.0.10-beta.10
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 +64 -1
- package/auto-imports.d.ts +1 -1
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +34 -19
- package/dist/components/VvAccordion/VvAccordion.es.js +33 -4
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -4
- package/dist/components/VvAccordion/index.d.ts +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +75 -27
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +5 -5
- package/dist/components/VvAction/VvAction.es.js +26 -4
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +17 -4
- package/dist/components/VvAction/index.d.ts +5 -0
- package/dist/components/VvAlert/VvAlert.es.js +96 -45
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +4 -4
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +136 -66
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +4 -4
- package/dist/components/VvAvatar/VvAvatar.es.js +22 -1
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +79 -28
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +39 -8
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +224 -41
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +14 -3
- package/dist/components/VvBreadcrumb/index.d.ts +2 -9
- package/dist/components/VvButton/VvButton.es.js +70 -25
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +25 -9
- package/dist/components/VvButton/index.d.ts +5 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +33 -6
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -6
- package/dist/components/VvCard/VvCard.es.js +47 -16
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +35 -7
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +8 -8
- package/dist/components/VvCheckbox/index.d.ts +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +106 -51
- 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 +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +635 -400
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +112 -112
- package/dist/components/VvCombobox/index.d.ts +32 -32
- package/dist/components/VvDialog/VvDialog.es.js +65 -27
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdown.es.js +87 -46
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +203 -189
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +12 -0
- package/dist/components/VvDropdown/index.d.ts +32 -32
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +46 -12
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +28 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +40 -8
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +1 -1
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputClearAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +149 -99
- 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 +8 -2
- package/dist/components/VvNav/VvNav.es.js +115 -63
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +31 -12
- package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
- package/dist/components/VvNav/index.d.ts +1 -12
- package/dist/components/VvNavItem/VvNavItem.es.js +413 -0
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
- package/dist/components/VvProgress/VvProgress.es.js +33 -6
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +35 -7
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +8 -8
- package/dist/components/VvRadio/index.d.ts +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +106 -51
- 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 +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +159 -99
- 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 +1 -1
- package/dist/components/VvTab/VvTab.es.js +214 -99
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +40 -11
- package/dist/components/VvTab/index.d.ts +9 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +123 -77
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +10 -10
- package/dist/components/VvTooltip/VvTooltip.es.js +40 -9
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/index.es.js +1593 -1012
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +60 -23
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +58 -18
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +19 -16
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +58 -34
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +50 -15
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +332 -83
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +1 -0
- package/dist/stories/InputText/InputTextMask.stories.d.ts +1 -1
- package/dist/stories/Tab/Tab.settings.d.ts +4 -37
- package/dist/types/alert.d.ts +13 -0
- package/dist/types/floating-ui.d.ts +6 -0
- package/dist/types/generic.d.ts +4 -0
- package/dist/types/group.d.ts +37 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/nav.d.ts +17 -0
- package/package.json +61 -52
- package/src/Volver.ts +22 -16
- 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 +2 -2
- package/src/components/VvAction/VvAction.vue +5 -2
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
- package/src/components/VvBreadcrumb/index.ts +2 -8
- package/src/components/VvCombobox/VvCombobox.vue +32 -33
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvInputText/VvInputText.vue +2 -2
- package/src/components/VvNav/VvNav.vue +30 -50
- package/src/components/VvNav/VvNavItem.vue +18 -0
- package/src/components/VvNav/VvNavSeparator.vue +11 -0
- package/src/components/VvNav/index.ts +2 -15
- package/src/components/VvSelect/VvSelect.vue +4 -4
- package/src/components/VvTab/VvTab.vue +63 -35
- package/src/components/VvTab/index.ts +10 -4
- package/src/components/VvTextarea/VvTextarea.vue +1 -1
- package/src/composables/useOptions.ts +2 -2
- package/src/composables/useUniqueId.ts +2 -2
- package/src/directives/index.ts +1 -4
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/props/index.ts +27 -3
- package/src/stories/Button/ButtonModifiers.stories.ts +4 -14
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Combobox/ComboboxOptions.stories.ts +18 -0
- package/src/stories/InputText/InputTextMask.stories.ts +1 -1
- package/src/stories/Nav/Nav.settings.ts +3 -4
- package/src/stories/Nav/Nav.test.ts +4 -15
- package/src/stories/Tab/Tab.settings.ts +9 -9
- package/src/stories/Tab/Tab.stories.ts +2 -2
- package/src/stories/Tab/Tab.test.ts +6 -14
- package/src/stories/argTypes.ts +1 -1
- package/src/types/generic.ts +6 -0
- package/src/types/index.ts +5 -0
- package/src/types/nav.ts +19 -0
- package/src/utils/ObjectUtilities.ts +3 -2
- package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
- package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
- package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
- package/src/components/VvNav/VvNavItemTitle.vue +0 -11
- package/src/components/VvNav/VvNavSeparator.ts +0 -8
- package/src/types/generic.d.ts +0 -6
- /package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +0 -0
- /package/src/types/{alert.d.ts → alert.ts} +0 -0
- /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
- /package/src/types/{group.d.ts → group.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAction=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAction=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{}),l=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(l||{});const a=Symbol.for("volver"),u=Symbol.for("dropdownTrigger"),i=Symbol.for("dropdownAction"),s={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(l).includes(e)},rel:{type:String,default:"noopener noreferrer"}},d={disabled:Boolean},c={active:Boolean},f={current:Boolean},v={pressed:Boolean},b={label:[String,Number]};o.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const p={...d,...b,...v,...c,...f,...s,type:{type:String,default:r.button,validator:e=>Object.values(r).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:n.button}};return e.defineComponent({name:"VvAction",props:p,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:r}){const l=t,s=e.inject(a),d=e.ref(null);o({$el:d});const{reference:c,bus:f,aria:v,expanded:b}=e.inject(u,{});e.watch((()=>d.value),(e=>{c&&(c.value=e)}));const p=e.computed((()=>l.pressed||(null==b?void 0:b.value))),{role:m}=e.inject(i,{}),g=e.computed((()=>{switch(!0){case l.disabled:return n.button;case void 0!==l.to:return(null==s?void 0:s.nuxt)?n.nuxtLink:n.routerLink;case void 0!==l.href:return n.a;default:return l.defaultTag}})),y=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!p.value||void 0,ariaLabel:l.ariaLabel,role:null==m?void 0:m.value};switch(g.value){case n.a:return{...e,href:l.href,target:l.target,rel:l.rel};case n.routerLink:case n.nuxtLink:return{...e,to:l.to,target:l.target};case n.button:return{...e,type:l.type,disabled:l.disabled};default:return e}})),k=e=>{l.disabled?e.preventDefault():(null==f||f.emit("click",e),r("click",e))},B=e=>{null==f||f.emit("mouseover",e),r("mouseover",e)},h=e=>{null==f||f.emit("mouseleave",e),r("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(g)),e.mergeProps(e.unref(y),{ref_key:"element",ref:d,class:{active:t.active,pressed:e.unref(p),disabled:t.disabled,current:t.current},onClickPassive:k,onMouseoverPassive:B,onMouseleavePassive:h}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}})}));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ActionTag } from '../../constants';
|
|
1
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
3
|
type: {
|
|
3
4
|
type: globalThis.PropType<"button" | "submit" | "reset">;
|
|
@@ -8,6 +9,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
8
9
|
type: StringConstructor;
|
|
9
10
|
default: undefined;
|
|
10
11
|
};
|
|
12
|
+
defaultTag: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: ActionTag;
|
|
15
|
+
};
|
|
11
16
|
to: {
|
|
12
17
|
type: (ObjectConstructor | StringConstructor)[];
|
|
13
18
|
};
|
|
@@ -20,13 +25,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
20
25
|
type: StringConstructor;
|
|
21
26
|
default: string;
|
|
22
27
|
};
|
|
28
|
+
current: BooleanConstructor;
|
|
23
29
|
active: BooleanConstructor;
|
|
24
30
|
pressed: BooleanConstructor;
|
|
25
31
|
label: (StringConstructor | NumberConstructor)[];
|
|
26
32
|
disabled: BooleanConstructor;
|
|
27
33
|
}, {
|
|
28
34
|
$el: globalThis.Ref<HTMLElement | null>;
|
|
29
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
35
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
[x: string]: (...args: any[]) => void;
|
|
37
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
38
|
type: {
|
|
31
39
|
type: globalThis.PropType<"button" | "submit" | "reset">;
|
|
32
40
|
default: import("../../constants").ButtonType;
|
|
@@ -36,6 +44,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
36
44
|
type: StringConstructor;
|
|
37
45
|
default: undefined;
|
|
38
46
|
};
|
|
47
|
+
defaultTag: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: ActionTag;
|
|
50
|
+
};
|
|
39
51
|
to: {
|
|
40
52
|
type: (ObjectConstructor | StringConstructor)[];
|
|
41
53
|
};
|
|
@@ -48,17 +60,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
48
60
|
type: StringConstructor;
|
|
49
61
|
default: string;
|
|
50
62
|
};
|
|
63
|
+
current: BooleanConstructor;
|
|
51
64
|
active: BooleanConstructor;
|
|
52
65
|
pressed: BooleanConstructor;
|
|
53
66
|
label: (StringConstructor | NumberConstructor)[];
|
|
54
67
|
disabled: BooleanConstructor;
|
|
55
|
-
}
|
|
56
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
57
|
-
}, {
|
|
68
|
+
}>>, {
|
|
58
69
|
disabled: boolean;
|
|
59
70
|
type: "button" | "submit" | "reset";
|
|
60
71
|
ariaLabel: string;
|
|
72
|
+
defaultTag: string;
|
|
61
73
|
rel: string;
|
|
74
|
+
current: boolean;
|
|
62
75
|
active: boolean;
|
|
63
76
|
pressed: boolean;
|
|
64
77
|
}, {}>, {
|
|
@@ -9,6 +9,10 @@ export declare const VvActionProps: {
|
|
|
9
9
|
type: StringConstructor;
|
|
10
10
|
default: undefined;
|
|
11
11
|
};
|
|
12
|
+
defaultTag: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: import("../../constants").ActionTag;
|
|
15
|
+
};
|
|
12
16
|
to: {
|
|
13
17
|
type: (ObjectConstructor | StringConstructor)[];
|
|
14
18
|
};
|
|
@@ -21,6 +25,7 @@ export declare const VvActionProps: {
|
|
|
21
25
|
type: StringConstructor;
|
|
22
26
|
default: string;
|
|
23
27
|
};
|
|
28
|
+
current: BooleanConstructor;
|
|
24
29
|
active: BooleanConstructor;
|
|
25
30
|
pressed: BooleanConstructor;
|
|
26
31
|
label: (StringConstructor | NumberConstructor)[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, withModifiers, createElementBlock, normalizeProps, guardReactiveProps, renderSlot, createTextVNode, toDisplayString, createElementVNode } from "vue";
|
|
2
2
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
|
-
import {
|
|
3
|
+
import { uid } from "uid";
|
|
4
4
|
const VvIconProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Color
|
|
@@ -129,6 +129,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
129
129
|
ButtonType2["reset"] = "reset";
|
|
130
130
|
return ButtonType2;
|
|
131
131
|
})(ButtonType || {});
|
|
132
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
133
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
134
|
+
ActionTag2["routerLink"] = "router-link";
|
|
135
|
+
ActionTag2["a"] = "a";
|
|
136
|
+
ActionTag2["button"] = "button";
|
|
137
|
+
return ActionTag2;
|
|
138
|
+
})(ActionTag || {});
|
|
132
139
|
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
133
140
|
AnchorTarget2["_blank"] = "_blank";
|
|
134
141
|
AnchorTarget2["_self"] = "_self";
|
|
@@ -258,7 +265,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
258
265
|
color: _ctx.color,
|
|
259
266
|
onLoad: _ctx.onLoad,
|
|
260
267
|
icon: unref(icon)
|
|
261
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
268
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
262
269
|
};
|
|
263
270
|
}
|
|
264
271
|
});
|
|
@@ -301,6 +308,12 @@ const ActiveProps = {
|
|
|
301
308
|
*/
|
|
302
309
|
active: Boolean
|
|
303
310
|
};
|
|
311
|
+
const CurrentProps = {
|
|
312
|
+
/**
|
|
313
|
+
* Whether the item is current
|
|
314
|
+
*/
|
|
315
|
+
current: Boolean
|
|
316
|
+
};
|
|
304
317
|
const PressedProps = {
|
|
305
318
|
/**
|
|
306
319
|
* Whether the item is pressed
|
|
@@ -438,6 +451,7 @@ const IdProps = {
|
|
|
438
451
|
...LabelProps,
|
|
439
452
|
...PressedProps,
|
|
440
453
|
...ActiveProps,
|
|
454
|
+
...CurrentProps,
|
|
441
455
|
...LinkProps,
|
|
442
456
|
/**
|
|
443
457
|
* Button type
|
|
@@ -453,12 +467,19 @@ const IdProps = {
|
|
|
453
467
|
ariaLabel: {
|
|
454
468
|
type: String,
|
|
455
469
|
default: void 0
|
|
470
|
+
},
|
|
471
|
+
/**
|
|
472
|
+
* Default tag for the action
|
|
473
|
+
*/
|
|
474
|
+
defaultTag: {
|
|
475
|
+
type: String,
|
|
476
|
+
default: ActionTag.button
|
|
456
477
|
}
|
|
457
478
|
});
|
|
458
479
|
function useInjectedAlertGroup() {
|
|
459
480
|
return inject(INJECTION_KEY_ALERT_GROUP, {});
|
|
460
481
|
}
|
|
461
|
-
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) ||
|
|
482
|
+
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
462
483
|
const VvAlertProps = {
|
|
463
484
|
...IdProps,
|
|
464
485
|
...ModifiersProps,
|
|
@@ -606,7 +627,13 @@ const _hoisted_1 = {
|
|
|
606
627
|
};
|
|
607
628
|
const _hoisted_2 = ["id"];
|
|
608
629
|
const _hoisted_3 = ["aria-label"];
|
|
609
|
-
const _hoisted_4 = /* @__PURE__ */ createElementVNode(
|
|
630
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode(
|
|
631
|
+
"div",
|
|
632
|
+
{ class: "vv-alert__close-mask" },
|
|
633
|
+
null,
|
|
634
|
+
-1
|
|
635
|
+
/* HOISTED */
|
|
636
|
+
);
|
|
610
637
|
const _hoisted_5 = [
|
|
611
638
|
_hoisted_4
|
|
612
639
|
];
|
|
@@ -630,47 +657,71 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
630
657
|
const { hasProps, hasTitleId, hasIcon, close } = useVvAlert(props, emit);
|
|
631
658
|
__expose({ close });
|
|
632
659
|
return (_ctx, _cache) => {
|
|
633
|
-
return openBlock(), createElementBlock(
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
))
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
660
|
+
return openBlock(), createElementBlock(
|
|
661
|
+
"div",
|
|
662
|
+
normalizeProps(guardReactiveProps(unref(hasProps))),
|
|
663
|
+
[
|
|
664
|
+
_ctx.$slots.header || _ctx.$slots.title || _ctx.$slots.close || _ctx.$slots["title::before"] || _ctx.$slots["title::after"] || _ctx.title || _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
665
|
+
unref(hasIcon) ? (openBlock(), createBlock(
|
|
666
|
+
_sfc_main$1,
|
|
667
|
+
mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-alert__icon" }),
|
|
668
|
+
null,
|
|
669
|
+
16
|
|
670
|
+
/* FULL_PROPS */
|
|
671
|
+
)) : createCommentVNode("v-if", true),
|
|
672
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
673
|
+
renderSlot(_ctx.$slots, "title::before"),
|
|
674
|
+
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
|
|
675
|
+
key: 0,
|
|
676
|
+
id: unref(hasTitleId),
|
|
677
|
+
class: "vv-alert__title"
|
|
678
|
+
}, [
|
|
679
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
680
|
+
createTextVNode(
|
|
681
|
+
toDisplayString(_ctx.title),
|
|
682
|
+
1
|
|
683
|
+
/* TEXT */
|
|
684
|
+
)
|
|
685
|
+
])
|
|
686
|
+
], 8, _hoisted_2)) : createCommentVNode("v-if", true),
|
|
687
|
+
renderSlot(_ctx.$slots, "title::after")
|
|
688
|
+
]),
|
|
689
|
+
renderSlot(_ctx.$slots, "close", normalizeProps(guardReactiveProps({ close: unref(close) })), () => [
|
|
690
|
+
_ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("button", {
|
|
691
|
+
key: 0,
|
|
692
|
+
class: "vv-alert__close",
|
|
693
|
+
type: "button",
|
|
694
|
+
"aria-label": _ctx.closeLabel,
|
|
695
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(
|
|
696
|
+
//@ts-ignore
|
|
697
|
+
(...args) => unref(close) && unref(close)(...args),
|
|
698
|
+
["stop"]
|
|
699
|
+
))
|
|
700
|
+
}, _hoisted_5, 8, _hoisted_3)) : createCommentVNode("v-if", true)
|
|
701
|
+
])
|
|
702
|
+
])) : createCommentVNode("v-if", true),
|
|
703
|
+
_ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
704
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
705
|
+
createTextVNode(
|
|
706
|
+
toDisplayString(_ctx.content),
|
|
707
|
+
1
|
|
708
|
+
/* TEXT */
|
|
709
|
+
)
|
|
710
|
+
])
|
|
711
|
+
])) : createCommentVNode("v-if", true),
|
|
712
|
+
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
713
|
+
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
714
|
+
createTextVNode(
|
|
715
|
+
toDisplayString(_ctx.footer),
|
|
716
|
+
1
|
|
717
|
+
/* TEXT */
|
|
718
|
+
)
|
|
719
|
+
])
|
|
720
|
+
])) : createCommentVNode("v-if", true)
|
|
721
|
+
],
|
|
722
|
+
16
|
|
723
|
+
/* FULL_PROPS */
|
|
724
|
+
);
|
|
674
725
|
};
|
|
675
726
|
}
|
|
676
727
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("uid")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","uid"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAlert=t(e.vue,e.vue$1,e.uid)}(this,(function(e,t,o){"use strict";const l={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};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||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{});const s=Symbol.for("volver"),u=Symbol.for("alertGroup");function c(t,o,l){return e.computed((()=>{const r={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(r[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{r[`${t}--${o}`]=e.unref(l.value[o])})),r}))}const d=e.defineComponent({name:"VvIcon",props:l,setup(o){const l=o,r=e.computed((()=>"string"==typeof l.rotate?parseFloat(l.rotate):l.rotate)),n=e.ref(!0),i=e.inject(s),{modifiers:a}=e.toRefs(l),u=c("vv-icon",a),d=e.computed((()=>l.provider||(null==i?void 0:i.iconsProvider))),f=e.computed((()=>{const e=l.name??"",o=`@${d.value}:${l.prefix}:${e}`;if(t.iconExists(o))return o;const r=null==i?void 0:i.iconsCollections.find((o=>{const l=`@${d.value}:${o.prefix}:${e}`;return t.iconExists(l)}));return r?`@${d.value}:${r.prefix}:${e}`:e}));function v(e){const o=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),r=(null==o?void 0:o.innerHTML.trim())||"";o&&r&&t.addIcon(`@${d.value}:${l.prefix}:${l.name}`,{body:r,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return i&&l.src&&!t.iconExists(`@${d.value}:${l.prefix}:${l.name}`)&&(n.value=!1,i.fetchIcon(l.src).then((e=>{e&&(v(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),l.svg&&v(l.svg),(o,l)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:o.inline,width:o.width,height:o.height,horizontalFlip:o.horizontalFlip,verticalFlip:o.verticalFlip,flip:o.flip,rotate:e.unref(r),color:o.color,onLoad:o.onLoad,icon:e.unref(f)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),f=(Boolean,Boolean,Boolean,Boolean,{modifiers:[String,Array]}),v={icon:{type:[String,Object]},iconPosition:{type:String,default:n.before,validation:e=>Object.values(n).includes(e)}},p={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,i.button,a.button;const m={...p,...f,...v,dismissable:{type:Boolean,default:!1},autoClose:{type:Number,default:0},closeLabel:{type:String,default:"Close"},title:{type:String,default:void 0},content:{type:String,default:void 0},footer:{type:String,default:void 0},role:{type:String,default:"alert"}},g=(t,l)=>{const{bus:r}=e.inject(u,{}),n=(i=e.computed((()=>t.id)),e.computed((()=>String((null==i?void 0:i.value)||o.uid()))));var i;const a=e.computed((()=>`${n.value}-title`)),s=e.computed((()=>"string"==typeof t.icon?{name:t.icon}:t.icon)),d=c("vv-alert",e.computed((()=>t.modifiers)),e.computed((()=>({dismissable:t.autoClose>0||t.dismissable,"auto-close":t.autoClose>0,hover:m.value})))),f=e.computed((()=>({"--alert-duration":`${t.autoClose}ms`}))),v=()=>{p&&clearTimeout(p),l("close",n.value),null==r||r.emit("close",n.value)};let p;e.watch((()=>t.autoClose),(e=>{e>0?p=setTimeout(v,e):p&&clearTimeout(p)}),{immediate:!0});const m=e.ref(!1),g=e.withModifiers((()=>{m.value=!0,p&&clearTimeout(p)}),["passive"]),y=e.withModifiers((()=>{m.value=!1,t.autoClose>0&&(p=setTimeout(v,t.autoClose))}),["passive"]);return{close:v,hasIcon:s,hasTitleId:a,hasProps:e.computed((()=>({onMouseover:g,onMouseleave:y,class:d.value,style:f.value,role:t.role,"aria-labelledby":a.value})))}},y={key:0,class:"vv-alert__header"},b=["id"],h=["aria-label"],$=[e.createElementVNode("div",{class:"vv-alert__close-mask"},null,-1)],S={key:1,class:"vv-alert__content"},B={key:2,class:"vv-alert__footer"};return e.defineComponent({name:"VvAlert",props:m,emits:["close"],setup(t,{expose:o,emit:l}){const r=t,{hasProps:n,hasTitleId:i,hasIcon:a,close:s}=g(r,l);return o({close:s}),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(e.unref(n))),[t.$slots.header||t.$slots.title||t.$slots.close||t.$slots["title::before"]||t.$slots["title::after"]||t.title||t.dismissable||t.autoClose?(e.openBlock(),e.createElementBlock("div",y,[e.unref(a)?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0},e.unref(a),{class:"vv-alert__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"header",{},(()=>[e.renderSlot(t.$slots,"title::before"),t.$slots.title||t.title?(e.openBlock(),e.createElementBlock("strong",{key:0,id:e.unref(i),class:"vv-alert__title"},[e.renderSlot(t.$slots,"title",{},(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]))],8,b)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"title::after")])),e.renderSlot(t.$slots,"close",e.normalizeProps(e.guardReactiveProps({close:e.unref(s)})),(()=>[t.dismissable||t.autoClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"vv-alert__close",type:"button","aria-label":t.closeLabel,onClick:o[0]||(o[0]=e.withModifiers(((...t)=>e.unref(s)&&e.unref(s)(...t)),["stop"]))},$,8,h)):e.createCommentVNode("v-if",!0)]))])):e.createCommentVNode("v-if",!0),t.$slots.default||t.content?(e.openBlock(),e.createElementBlock("div",S,[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.content),1)]))])):e.createCommentVNode("v-if",!0),t.$slots.footer||t.footer?(e.openBlock(),e.createElementBlock("div",B,[e.renderSlot(t.$slots,"footer",{},(()=>[e.createTextVNode(e.toDisplayString(t.footer),1)]))])):e.createCommentVNode("v-if",!0)],16))}})}));
|
|
@@ -39,7 +39,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
39
39
|
id: (StringConstructor | NumberConstructor)[];
|
|
40
40
|
}, {
|
|
41
41
|
close: () => void;
|
|
42
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
42
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
43
|
+
[x: string]: (...args: any[]) => void;
|
|
44
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
45
|
dismissable: {
|
|
44
46
|
type: BooleanConstructor;
|
|
45
47
|
default: boolean;
|
|
@@ -78,9 +80,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
78
80
|
};
|
|
79
81
|
modifiers: globalThis.PropType<string | string[]>;
|
|
80
82
|
id: (StringConstructor | NumberConstructor)[];
|
|
81
|
-
}
|
|
82
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
83
|
-
}, {
|
|
83
|
+
}>>, {
|
|
84
84
|
title: string;
|
|
85
85
|
content: string;
|
|
86
86
|
footer: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { provide, computed, unref, inject, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, withModifiers, createElementBlock, normalizeProps, guardReactiveProps, renderSlot, createTextVNode, toDisplayString, createElementVNode, createVNode, TransitionGroup, toHandlers, withCtx, Fragment, renderList } from "vue";
|
|
2
2
|
import mitt from "mitt";
|
|
3
3
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
4
|
-
import {
|
|
4
|
+
import { uid } from "uid";
|
|
5
5
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
6
6
|
Strategy2["absolute"] = "absolute";
|
|
7
7
|
Strategy2["fixed"] = "fixed";
|
|
@@ -36,6 +36,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
36
36
|
ButtonType2["reset"] = "reset";
|
|
37
37
|
return ButtonType2;
|
|
38
38
|
})(ButtonType || {});
|
|
39
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
40
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
41
|
+
ActionTag2["routerLink"] = "router-link";
|
|
42
|
+
ActionTag2["a"] = "a";
|
|
43
|
+
ActionTag2["button"] = "button";
|
|
44
|
+
return ActionTag2;
|
|
45
|
+
})(ActionTag || {});
|
|
39
46
|
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
40
47
|
AnchorTarget2["_blank"] = "_blank";
|
|
41
48
|
AnchorTarget2["_self"] = "_self";
|
|
@@ -86,6 +93,12 @@ const ActiveProps = {
|
|
|
86
93
|
*/
|
|
87
94
|
active: Boolean
|
|
88
95
|
};
|
|
96
|
+
const CurrentProps = {
|
|
97
|
+
/**
|
|
98
|
+
* Whether the item is current
|
|
99
|
+
*/
|
|
100
|
+
current: Boolean
|
|
101
|
+
};
|
|
89
102
|
const PressedProps = {
|
|
90
103
|
/**
|
|
91
104
|
* Whether the item is pressed
|
|
@@ -223,6 +236,7 @@ const IdProps = {
|
|
|
223
236
|
...LabelProps,
|
|
224
237
|
...PressedProps,
|
|
225
238
|
...ActiveProps,
|
|
239
|
+
...CurrentProps,
|
|
226
240
|
...LinkProps,
|
|
227
241
|
/**
|
|
228
242
|
* Button type
|
|
@@ -238,6 +252,13 @@ const IdProps = {
|
|
|
238
252
|
ariaLabel: {
|
|
239
253
|
type: String,
|
|
240
254
|
default: void 0
|
|
255
|
+
},
|
|
256
|
+
/**
|
|
257
|
+
* Default tag for the action
|
|
258
|
+
*/
|
|
259
|
+
defaultTag: {
|
|
260
|
+
type: String,
|
|
261
|
+
default: ActionTag.button
|
|
241
262
|
}
|
|
242
263
|
});
|
|
243
264
|
function useProvideAlertGroup({
|
|
@@ -564,14 +585,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
564
585
|
color: _ctx.color,
|
|
565
586
|
onLoad: _ctx.onLoad,
|
|
566
587
|
icon: unref(icon)
|
|
567
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
588
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
568
589
|
};
|
|
569
590
|
}
|
|
570
591
|
});
|
|
571
592
|
function useInjectedAlertGroup() {
|
|
572
593
|
return inject(INJECTION_KEY_ALERT_GROUP, {});
|
|
573
594
|
}
|
|
574
|
-
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) ||
|
|
595
|
+
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
575
596
|
const VvAlertProps = {
|
|
576
597
|
...IdProps,
|
|
577
598
|
...ModifiersProps,
|
|
@@ -719,7 +740,13 @@ const _hoisted_1 = {
|
|
|
719
740
|
};
|
|
720
741
|
const _hoisted_2 = ["id"];
|
|
721
742
|
const _hoisted_3 = ["aria-label"];
|
|
722
|
-
const _hoisted_4 = /* @__PURE__ */ createElementVNode(
|
|
743
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode(
|
|
744
|
+
"div",
|
|
745
|
+
{ class: "vv-alert__close-mask" },
|
|
746
|
+
null,
|
|
747
|
+
-1
|
|
748
|
+
/* HOISTED */
|
|
749
|
+
);
|
|
723
750
|
const _hoisted_5 = [
|
|
724
751
|
_hoisted_4
|
|
725
752
|
];
|
|
@@ -743,47 +770,71 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
743
770
|
const { hasProps, hasTitleId, hasIcon, close } = useVvAlert(props, emit);
|
|
744
771
|
__expose({ close });
|
|
745
772
|
return (_ctx, _cache) => {
|
|
746
|
-
return openBlock(), createElementBlock(
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
))
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
773
|
+
return openBlock(), createElementBlock(
|
|
774
|
+
"div",
|
|
775
|
+
normalizeProps(guardReactiveProps(unref(hasProps))),
|
|
776
|
+
[
|
|
777
|
+
_ctx.$slots.header || _ctx.$slots.title || _ctx.$slots.close || _ctx.$slots["title::before"] || _ctx.$slots["title::after"] || _ctx.title || _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
778
|
+
unref(hasIcon) ? (openBlock(), createBlock(
|
|
779
|
+
_sfc_main$2,
|
|
780
|
+
mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-alert__icon" }),
|
|
781
|
+
null,
|
|
782
|
+
16
|
|
783
|
+
/* FULL_PROPS */
|
|
784
|
+
)) : createCommentVNode("v-if", true),
|
|
785
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
786
|
+
renderSlot(_ctx.$slots, "title::before"),
|
|
787
|
+
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
|
|
788
|
+
key: 0,
|
|
789
|
+
id: unref(hasTitleId),
|
|
790
|
+
class: "vv-alert__title"
|
|
791
|
+
}, [
|
|
792
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
793
|
+
createTextVNode(
|
|
794
|
+
toDisplayString(_ctx.title),
|
|
795
|
+
1
|
|
796
|
+
/* TEXT */
|
|
797
|
+
)
|
|
798
|
+
])
|
|
799
|
+
], 8, _hoisted_2)) : createCommentVNode("v-if", true),
|
|
800
|
+
renderSlot(_ctx.$slots, "title::after")
|
|
801
|
+
]),
|
|
802
|
+
renderSlot(_ctx.$slots, "close", normalizeProps(guardReactiveProps({ close: unref(close) })), () => [
|
|
803
|
+
_ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("button", {
|
|
804
|
+
key: 0,
|
|
805
|
+
class: "vv-alert__close",
|
|
806
|
+
type: "button",
|
|
807
|
+
"aria-label": _ctx.closeLabel,
|
|
808
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(
|
|
809
|
+
//@ts-ignore
|
|
810
|
+
(...args) => unref(close) && unref(close)(...args),
|
|
811
|
+
["stop"]
|
|
812
|
+
))
|
|
813
|
+
}, _hoisted_5, 8, _hoisted_3)) : createCommentVNode("v-if", true)
|
|
814
|
+
])
|
|
815
|
+
])) : createCommentVNode("v-if", true),
|
|
816
|
+
_ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
817
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
818
|
+
createTextVNode(
|
|
819
|
+
toDisplayString(_ctx.content),
|
|
820
|
+
1
|
|
821
|
+
/* TEXT */
|
|
822
|
+
)
|
|
823
|
+
])
|
|
824
|
+
])) : createCommentVNode("v-if", true),
|
|
825
|
+
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
826
|
+
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
827
|
+
createTextVNode(
|
|
828
|
+
toDisplayString(_ctx.footer),
|
|
829
|
+
1
|
|
830
|
+
/* TEXT */
|
|
831
|
+
)
|
|
832
|
+
])
|
|
833
|
+
])) : createCommentVNode("v-if", true)
|
|
834
|
+
],
|
|
835
|
+
16
|
|
836
|
+
/* FULL_PROPS */
|
|
837
|
+
);
|
|
787
838
|
};
|
|
788
839
|
}
|
|
789
840
|
});
|
|
@@ -824,27 +875,46 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
824
875
|
}
|
|
825
876
|
};
|
|
826
877
|
return (_ctx, _cache) => {
|
|
827
|
-
return openBlock(), createElementBlock(
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
878
|
+
return openBlock(), createElementBlock(
|
|
879
|
+
"div",
|
|
880
|
+
normalizeProps(guardReactiveProps(unref(hasProps))),
|
|
881
|
+
[
|
|
882
|
+
renderSlot(_ctx.$slots, "before"),
|
|
883
|
+
createVNode(TransitionGroup, mergeProps({
|
|
884
|
+
tag: "div",
|
|
885
|
+
role: "group",
|
|
886
|
+
name: unref(hasTransition),
|
|
887
|
+
class: "vv-alert-group__list"
|
|
888
|
+
}, toHandlers(alertGroupTransitionHandlers)), {
|
|
889
|
+
default: withCtx(() => [
|
|
890
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
891
|
+
(openBlock(true), createElementBlock(
|
|
892
|
+
Fragment,
|
|
893
|
+
null,
|
|
894
|
+
renderList(_ctx.items, (item) => {
|
|
895
|
+
return openBlock(), createBlock(
|
|
896
|
+
_sfc_main$1,
|
|
897
|
+
mergeProps(item, {
|
|
898
|
+
key: item.id
|
|
899
|
+
}),
|
|
900
|
+
null,
|
|
901
|
+
16
|
|
902
|
+
/* FULL_PROPS */
|
|
903
|
+
);
|
|
904
|
+
}),
|
|
905
|
+
128
|
|
906
|
+
/* KEYED_FRAGMENT */
|
|
907
|
+
))
|
|
908
|
+
])
|
|
909
|
+
]),
|
|
910
|
+
_: 3
|
|
911
|
+
/* FORWARDED */
|
|
912
|
+
}, 16, ["name"]),
|
|
913
|
+
renderSlot(_ctx.$slots, "after")
|
|
914
|
+
],
|
|
915
|
+
16
|
|
916
|
+
/* FULL_PROPS */
|
|
917
|
+
);
|
|
848
918
|
};
|
|
849
919
|
}
|
|
850
920
|
});
|