@volverjs/ui-vue 0.0.10-beta.6 → 0.0.10-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +22 -15
- package/dist/Volver.d.ts +0 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +10 -2
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -4
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +52 -25
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +4 -4
- package/dist/components/VvAction/VvAction.es.js +6 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +4 -4
- package/dist/components/VvAlert/VvAlert.es.js +73 -43
- 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 +113 -64
- 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 +1 -1
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +56 -26
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +18 -8
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +61 -38
- package/dist/components/VvButton/VvButton.es.js +45 -17
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +15 -9
- package/dist/components/VvButton/index.d.ts +2 -2
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +12 -6
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +4 -4
- package/dist/components/VvCard/VvCard.es.js +26 -16
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +9 -2
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +78 -44
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +595 -372
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +7 -7
- package/dist/components/VvCombobox/index.d.ts +11 -6
- package/dist/components/VvDialog/VvDialog.es.js +44 -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 +64 -44
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +18 -4
- package/dist/components/VvDropdown/index.d.ts +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +26 -9
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +19 -8
- package/dist/components/VvIcon/VvIcon.es.js +1 -1
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +126 -97
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
- package/dist/components/VvNav/VvNav.es.js +50 -26
- package/dist/components/VvNav/VvNav.vue.d.ts +7 -7
- package/dist/components/VvNav/index.d.ts +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +19 -7
- package/dist/components/VvProgress/VvProgress.es.js +12 -6
- package/dist/components/VvRadio/VvRadio.es.js +9 -2
- package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +78 -44
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +4 -4
- package/dist/components/VvRadioGroup/index.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +133 -94
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +4 -4
- package/dist/components/VvSelect/index.d.ts +1 -1
- package/dist/components/VvTab/VvTab.es.js +98 -44
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +4 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +99 -74
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +4 -4
- package/dist/components/VvTooltip/VvTooltip.es.js +19 -9
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +3 -3
- package/dist/components/VvTooltip/index.d.ts +1 -1
- package/dist/components/index.es.js +1363 -840
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +39 -23
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +37 -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/props/index.d.ts +1 -1
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +46 -11
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +308 -59
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/Tab/Tab.settings.d.ts +2 -15
- package/dist/types/generic.d.ts +1 -1
- package/package.json +35 -35
- package/src/Volver.ts +0 -1
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvCombobox/VvCombobox.vue +7 -3
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvInputText/VvInputText.vue +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/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Tab/Tab.settings.ts +2 -2
- package/src/types/generic.ts +2 -1
package/bin/icons.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("fs"),require("yargs"),require("yargs/helpers"),require("@iconify/tools"),require("path"),require("@iconify/utils"),require("chokidar")):"function"==typeof define&&define.amd?define(["exports","fs","yargs","yargs/helpers","@iconify/tools","path","@iconify/utils","chokidar"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self)["generate-icons"]={},e.fileSystem,e.yargs,e.helpers,e.tools,e.path,e.utils,e.chokidar)}(this,(function(e,r,o,i,t,n,s,c){"use strict";function a(e,o="iconify",i={}){return r.readdirSync(e).forEach((function(t){r.statSync(e+"/"+t).isDirectory()?i=a(e+"/"+t,t,i):t.includes(".svg")&&(i[o]?i[o].push(n.join(e,"/",t)):i[o]=[n.join(e,"/",t)])})),i}function l(e,o,i){const c=a(e,i);Object.keys(c).length?Object.keys(c).forEach((e=>{!async function(e,o,i){const c=t.blankIconSet(e);for(const n of o)try{const e=await r.promises.readFile(n,{encoding:"utf-8"}),o=new t.SVG(e);await t.cleanupSVG(o),await t.parseColors(o,{defaultColor:"currentColor",callback:(e,r,o)=>!o||t.isEmptyColor(o)?r:"currentColor"}),await t.runSVGO(o);const i=n.replace(/^.*[\\/]/,"").split(".")[0].replace(/ /g,"-").replace(/[^a-z0-9-]/gi,"");c.fromSVG(i,o)}catch(f){console.error(f)}const a=c.export();try{s.validateIconSet(a)}catch(f){throw new Error(`Icon set is not valid: ${null==f?void 0:f.message}`)}const l=`${i}/${a.prefix}.json`;r.mkdirSync(n.dirname(l),{recursive:!0}),r.writeFileSync(l,JSON.stringify(a))}(e,c[e],o),console.info(`Icons generated in: ${o}/${e}.json\n`)})):console.error(`There are no files in ${e}`)}const f=o(i.hideBin(process.argv)).argv,d=f.srcPath,u=f.destPath||d;d&&u||(console.error("Please specify the srcPath and destPath with --srcPath and --destPath"),process.exit()),f.watch?(l(d,u,f.prefix),c.watch(d,{ignoreInitial:!0}).on("add",(()=>{l(d,u,f.prefix)})).on("change",(()=>{l(d,u,f.prefix)}))):l(d,u,f.prefix),e.createIconifyJsonFiles=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
package/bin/icons.js
CHANGED
|
@@ -21,20 +21,24 @@ function getAllFiles(dirPath, prefix = "iconify", objectFiles = {}) {
|
|
|
21
21
|
async function generateIcons(prefix, files, destPath2) {
|
|
22
22
|
const iconSet = blankIconSet(prefix);
|
|
23
23
|
for (const file of files) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
try {
|
|
25
|
+
const content = await fileSystem.promises.readFile(file, {
|
|
26
|
+
encoding: "utf-8"
|
|
27
|
+
});
|
|
28
|
+
const svg = new SVG(content);
|
|
29
|
+
await cleanupSVG(svg);
|
|
30
|
+
await parseColors(svg, {
|
|
31
|
+
defaultColor: "currentColor",
|
|
32
|
+
callback: (attr, colorStr, color) => {
|
|
33
|
+
return !color || isEmptyColor(color) ? colorStr : "currentColor";
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
await runSVGO(svg);
|
|
37
|
+
const fileName = file.replace(/^.*[\\/]/, "").split(".")[0].replace(/ /g, "-").replace(/[^a-z0-9-]/gi, "");
|
|
38
|
+
iconSet.fromSVG(fileName, svg);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(error);
|
|
41
|
+
}
|
|
38
42
|
}
|
|
39
43
|
const iconifyJson = iconSet.export();
|
|
40
44
|
try {
|
|
@@ -70,7 +74,10 @@ if (!srcPath || !destPath) {
|
|
|
70
74
|
process.exit();
|
|
71
75
|
}
|
|
72
76
|
if (argv.watch) {
|
|
73
|
-
|
|
77
|
+
createIconifyJsonFiles(srcPath, destPath, argv.prefix);
|
|
78
|
+
chokidar.watch(srcPath, {
|
|
79
|
+
ignoreInitial: true
|
|
80
|
+
}).on("add", () => {
|
|
74
81
|
createIconifyJsonFiles(srcPath, destPath, argv.prefix);
|
|
75
82
|
}).on("change", () => {
|
|
76
83
|
createIconifyJsonFiles(srcPath, destPath, argv.prefix);
|
package/dist/Volver.d.ts
CHANGED
|
@@ -458,7 +458,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
458
458
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(onClick)(), ["prevent"]))
|
|
459
459
|
}, [
|
|
460
460
|
renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
|
|
461
|
-
createTextVNode(
|
|
461
|
+
createTextVNode(
|
|
462
|
+
toDisplayString(unref(title)),
|
|
463
|
+
1
|
|
464
|
+
/* TEXT */
|
|
465
|
+
)
|
|
462
466
|
])
|
|
463
467
|
], 8, _hoisted_2),
|
|
464
468
|
createElementVNode("div", {
|
|
@@ -466,7 +470,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
466
470
|
class: "vv-accordion__content"
|
|
467
471
|
}, [
|
|
468
472
|
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
|
|
469
|
-
createTextVNode(
|
|
473
|
+
createTextVNode(
|
|
474
|
+
toDisplayString(unref(content)),
|
|
475
|
+
1
|
|
476
|
+
/* TEXT */
|
|
477
|
+
)
|
|
470
478
|
])
|
|
471
479
|
], 8, _hoisted_3)
|
|
472
480
|
], 10, _hoisted_1);
|
|
@@ -9,7 +9,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
9
9
|
disabled: BooleanConstructor;
|
|
10
10
|
not: BooleanConstructor;
|
|
11
11
|
modifiers: globalThis.PropType<string | string[]>;
|
|
12
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
12
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
[x: string]: (...args: any[]) => void;
|
|
14
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
15
|
name: StringConstructor;
|
|
14
16
|
title: StringConstructor;
|
|
15
17
|
content: StringConstructor;
|
|
@@ -20,9 +22,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
20
22
|
disabled: BooleanConstructor;
|
|
21
23
|
not: BooleanConstructor;
|
|
22
24
|
modifiers: globalThis.PropType<string | string[]>;
|
|
23
|
-
}
|
|
24
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
25
|
-
}, {
|
|
25
|
+
}>>, {
|
|
26
26
|
disabled: boolean;
|
|
27
27
|
modelValue: boolean;
|
|
28
28
|
not: boolean;
|
|
@@ -458,7 +458,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
458
458
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(onClick)(), ["prevent"]))
|
|
459
459
|
}, [
|
|
460
460
|
renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
|
|
461
|
-
createTextVNode(
|
|
461
|
+
createTextVNode(
|
|
462
|
+
toDisplayString(unref(title)),
|
|
463
|
+
1
|
|
464
|
+
/* TEXT */
|
|
465
|
+
)
|
|
462
466
|
])
|
|
463
467
|
], 8, _hoisted_2),
|
|
464
468
|
createElementVNode("div", {
|
|
@@ -466,7 +470,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
466
470
|
class: "vv-accordion__content"
|
|
467
471
|
}, [
|
|
468
472
|
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
|
|
469
|
-
createTextVNode(
|
|
473
|
+
createTextVNode(
|
|
474
|
+
toDisplayString(unref(content)),
|
|
475
|
+
1
|
|
476
|
+
/* TEXT */
|
|
477
|
+
)
|
|
470
478
|
])
|
|
471
479
|
], 8, _hoisted_3)
|
|
472
480
|
], 10, _hoisted_1);
|
|
@@ -588,29 +596,48 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
588
596
|
}))
|
|
589
597
|
);
|
|
590
598
|
return (_ctx, _cache) => {
|
|
591
|
-
return openBlock(), createElementBlock(
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
599
|
+
return openBlock(), createElementBlock(
|
|
600
|
+
"div",
|
|
601
|
+
{
|
|
602
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
603
|
+
},
|
|
604
|
+
[
|
|
605
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
606
|
+
(openBlock(true), createElementBlock(
|
|
607
|
+
Fragment,
|
|
608
|
+
null,
|
|
609
|
+
renderList(unref(items), (item) => {
|
|
610
|
+
return openBlock(), createBlock(
|
|
611
|
+
_sfc_main$1,
|
|
612
|
+
mergeProps({
|
|
613
|
+
key: item.title
|
|
614
|
+
}, {
|
|
615
|
+
name: item.name,
|
|
616
|
+
title: item.title,
|
|
617
|
+
content: item.content
|
|
618
|
+
}),
|
|
619
|
+
{
|
|
620
|
+
header: withCtx((data) => [
|
|
621
|
+
renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
|
|
622
|
+
]),
|
|
623
|
+
details: withCtx((data) => [
|
|
624
|
+
renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
|
|
625
|
+
]),
|
|
626
|
+
_: 2
|
|
627
|
+
/* DYNAMIC */
|
|
628
|
+
},
|
|
629
|
+
1040
|
|
630
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
631
|
+
);
|
|
632
|
+
}),
|
|
633
|
+
128
|
|
634
|
+
/* KEYED_FRAGMENT */
|
|
635
|
+
))
|
|
636
|
+
])
|
|
637
|
+
],
|
|
638
|
+
2
|
|
639
|
+
/* CLASS */
|
|
640
|
+
);
|
|
614
641
|
};
|
|
615
642
|
}
|
|
616
643
|
});
|
|
@@ -13,7 +13,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
13
13
|
not: BooleanConstructor;
|
|
14
14
|
storeKey: StringConstructor;
|
|
15
15
|
modifiers: globalThis.PropType<string | string[]>;
|
|
16
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
16
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
[x: string]: (...args: any[]) => void;
|
|
18
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
19
|
modelValue: (ArrayConstructor | StringConstructor)[];
|
|
18
20
|
items: {
|
|
19
21
|
type: globalThis.PropType<import(".").VvAccordionGroupItem[]>;
|
|
@@ -28,9 +30,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
28
30
|
not: BooleanConstructor;
|
|
29
31
|
storeKey: StringConstructor;
|
|
30
32
|
modifiers: globalThis.PropType<string | string[]>;
|
|
31
|
-
}
|
|
32
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
33
|
-
}, {
|
|
33
|
+
}>>, {
|
|
34
34
|
disabled: boolean;
|
|
35
35
|
collapse: boolean;
|
|
36
36
|
not: boolean;
|
|
@@ -356,10 +356,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
356
356
|
}), {
|
|
357
357
|
default: withCtx(() => [
|
|
358
358
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
359
|
-
createTextVNode(
|
|
359
|
+
createTextVNode(
|
|
360
|
+
toDisplayString(_ctx.label),
|
|
361
|
+
1
|
|
362
|
+
/* TEXT */
|
|
363
|
+
)
|
|
360
364
|
])
|
|
361
365
|
]),
|
|
362
366
|
_: 3
|
|
367
|
+
/* FORWARDED */
|
|
363
368
|
}, 16, ["class"]);
|
|
364
369
|
};
|
|
365
370
|
}
|
|
@@ -27,7 +27,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
27
27
|
disabled: BooleanConstructor;
|
|
28
28
|
}, {
|
|
29
29
|
$el: globalThis.Ref<HTMLElement | null>;
|
|
30
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
30
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
[x: string]: (...args: any[]) => void;
|
|
32
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
33
|
type: {
|
|
32
34
|
type: globalThis.PropType<"button" | "submit" | "reset">;
|
|
33
35
|
default: import("../../constants").ButtonType;
|
|
@@ -54,9 +56,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
54
56
|
pressed: BooleanConstructor;
|
|
55
57
|
label: (StringConstructor | NumberConstructor)[];
|
|
56
58
|
disabled: BooleanConstructor;
|
|
57
|
-
}
|
|
58
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
59
|
-
}, {
|
|
59
|
+
}>>, {
|
|
60
60
|
disabled: boolean;
|
|
61
61
|
type: "button" | "submit" | "reset";
|
|
62
62
|
ariaLabel: string;
|
|
@@ -258,7 +258,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
258
258
|
color: _ctx.color,
|
|
259
259
|
onLoad: _ctx.onLoad,
|
|
260
260
|
icon: unref(icon)
|
|
261
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
261
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
});
|
|
@@ -613,7 +613,13 @@ const _hoisted_1 = {
|
|
|
613
613
|
};
|
|
614
614
|
const _hoisted_2 = ["id"];
|
|
615
615
|
const _hoisted_3 = ["aria-label"];
|
|
616
|
-
const _hoisted_4 = /* @__PURE__ */ createElementVNode(
|
|
616
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode(
|
|
617
|
+
"div",
|
|
618
|
+
{ class: "vv-alert__close-mask" },
|
|
619
|
+
null,
|
|
620
|
+
-1
|
|
621
|
+
/* HOISTED */
|
|
622
|
+
);
|
|
617
623
|
const _hoisted_5 = [
|
|
618
624
|
_hoisted_4
|
|
619
625
|
];
|
|
@@ -637,47 +643,71 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
637
643
|
const { hasProps, hasTitleId, hasIcon, close } = useVvAlert(props, emit);
|
|
638
644
|
__expose({ close });
|
|
639
645
|
return (_ctx, _cache) => {
|
|
640
|
-
return openBlock(), createElementBlock(
|
|
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
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
646
|
+
return openBlock(), createElementBlock(
|
|
647
|
+
"div",
|
|
648
|
+
normalizeProps(guardReactiveProps(unref(hasProps))),
|
|
649
|
+
[
|
|
650
|
+
_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, [
|
|
651
|
+
unref(hasIcon) ? (openBlock(), createBlock(
|
|
652
|
+
_sfc_main$1,
|
|
653
|
+
mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-alert__icon" }),
|
|
654
|
+
null,
|
|
655
|
+
16
|
|
656
|
+
/* FULL_PROPS */
|
|
657
|
+
)) : createCommentVNode("v-if", true),
|
|
658
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
659
|
+
renderSlot(_ctx.$slots, "title::before"),
|
|
660
|
+
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
|
|
661
|
+
key: 0,
|
|
662
|
+
id: unref(hasTitleId),
|
|
663
|
+
class: "vv-alert__title"
|
|
664
|
+
}, [
|
|
665
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
666
|
+
createTextVNode(
|
|
667
|
+
toDisplayString(_ctx.title),
|
|
668
|
+
1
|
|
669
|
+
/* TEXT */
|
|
670
|
+
)
|
|
671
|
+
])
|
|
672
|
+
], 8, _hoisted_2)) : createCommentVNode("v-if", true),
|
|
673
|
+
renderSlot(_ctx.$slots, "title::after")
|
|
674
|
+
]),
|
|
675
|
+
renderSlot(_ctx.$slots, "close", normalizeProps(guardReactiveProps({ close: unref(close) })), () => [
|
|
676
|
+
_ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("button", {
|
|
677
|
+
key: 0,
|
|
678
|
+
class: "vv-alert__close",
|
|
679
|
+
type: "button",
|
|
680
|
+
"aria-label": _ctx.closeLabel,
|
|
681
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(
|
|
682
|
+
//@ts-ignore
|
|
683
|
+
(...args) => unref(close) && unref(close)(...args),
|
|
684
|
+
["stop"]
|
|
685
|
+
))
|
|
686
|
+
}, _hoisted_5, 8, _hoisted_3)) : createCommentVNode("v-if", true)
|
|
687
|
+
])
|
|
688
|
+
])) : createCommentVNode("v-if", true),
|
|
689
|
+
_ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
690
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
691
|
+
createTextVNode(
|
|
692
|
+
toDisplayString(_ctx.content),
|
|
693
|
+
1
|
|
694
|
+
/* TEXT */
|
|
695
|
+
)
|
|
696
|
+
])
|
|
697
|
+
])) : createCommentVNode("v-if", true),
|
|
698
|
+
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
699
|
+
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
700
|
+
createTextVNode(
|
|
701
|
+
toDisplayString(_ctx.footer),
|
|
702
|
+
1
|
|
703
|
+
/* TEXT */
|
|
704
|
+
)
|
|
705
|
+
])
|
|
706
|
+
])) : createCommentVNode("v-if", true)
|
|
707
|
+
],
|
|
708
|
+
16
|
|
709
|
+
/* FULL_PROPS */
|
|
710
|
+
);
|
|
681
711
|
};
|
|
682
712
|
}
|
|
683
713
|
});
|
|
@@ -1 +1 @@
|
|
|
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||{}),
|
|
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||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{});const a=Symbol.for("volver"),s=Symbol.for("alertGroup");function c(t,o,l){return e.computed((()=>{const r={[t]:!0},i="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return i&&Array.isArray(i)&&i.forEach((e=>{e&&(r[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{r[`${t}--${o}`]=e.unref(l.value[o])})),r}))}const u=e.defineComponent({name:"VvIcon",props:l,setup(o){const l=o,r=e.computed((()=>"string"==typeof l.rotate?parseFloat(l.rotate):l.rotate)),i=e.ref(!0),n=e.inject(a),{modifiers:s}=e.toRefs(l),u=c("vv-icon",s),d=e.computed((()=>l.provider||(null==n?void 0:n.iconsProvider))),f=e.computed((()=>{const e=l.name??"",o=`@${d.value}:${l.prefix}:${e}`;if(t.iconExists(o))return o;const r=null==n?void 0:n.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 n&&l.src&&!t.iconExists(`@${d.value}:${l.prefix}:${l.name}`)&&(i.value=!1,n.fetchIcon(l.src).then((e=>{e&&(v(e),i.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(i)?(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)}}),d=(Boolean,Boolean,Boolean,Boolean,{modifiers:[String,Array]}),f={icon:{type:[String,Object]},iconPosition:{type:String,default:i.before,validation:e=>Object.values(i).includes(e)}},v={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button;const p={...v,...d,...f,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"}},m=(t,l)=>{const{bus:r}=e.inject(s,{}),i=(n=e.computed((()=>t.id)),e.computed((()=>String((null==n?void 0:n.value)||o.uid()))));var n;const a=e.computed((()=>`${i.value}-title`)),u=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",i.value),null==r||r.emit("close",i.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:u,hasTitleId:a,hasProps:e.computed((()=>({onMouseover:g,onMouseleave:y,class:d.value,style:f.value,role:t.role,"aria-labelledby":a.value})))}},g={key:0,class:"vv-alert__header"},y=["id"],h=["aria-label"],b=[e.createElementVNode("div",{class:"vv-alert__close-mask"},null,-1)],$={key:1,class:"vv-alert__content"},S={key:2,class:"vv-alert__footer"};return e.defineComponent({name:"VvAlert",props:p,emits:["close"],setup(t,{expose:o,emit:l}){const r=t,{hasProps:i,hasTitleId:n,hasIcon:a,close:s}=m(r,l);return o({close:s}),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(e.unref(i))),[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",g,[e.unref(a)?(e.openBlock(),e.createBlock(u,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(n),class:"vv-alert__title"},[e.renderSlot(t.$slots,"title",{},(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]))],8,y)):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"]))},b,8,h)):e.createCommentVNode("v-if",!0)]))])):e.createCommentVNode("v-if",!0),t.$slots.default||t.content?(e.openBlock(),e.createElementBlock("div",$,[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",S,[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;
|