@volverjs/ui-vue 0.0.3 → 0.0.4
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/LICENSE +1 -1
- package/README.md +52 -13
- package/dist/Volver.d.ts +5 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +113 -66
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +159 -101
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAction/VvAction.es.js +170 -0
- package/dist/components/VvAction/VvAction.umd.js +1 -0
- package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
- package/dist/components/VvAction/index.d.ts +24 -0
- package/dist/components/VvBadge/VvBadge.es.js +86 -16
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +97 -41
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +434 -251
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +50 -50
- package/dist/components/VvButton/index.d.ts +22 -67
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +118 -43
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvCard/VvCard.es.js +38 -25
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +334 -154
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
- package/dist/components/VvCheckbox/index.d.ts +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +401 -204
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +950 -594
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +54 -30
- package/dist/components/VvCombobox/index.d.ts +18 -13
- package/dist/components/VvDialog/VvDialog.es.js +139 -64
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +276 -158
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +9 -9
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
- package/dist/components/VvDropdown/index.d.ts +6 -9
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +251 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +30 -15
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +176 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.es.js +48 -32
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +508 -344
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +11 -4
- package/dist/components/VvInputText/index.d.ts +13 -2
- package/dist/components/VvProgress/VvProgress.es.js +90 -20
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +305 -125
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
- package/dist/components/VvRadio/index.d.ts +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +372 -175
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
- package/dist/components/VvRadioGroup/index.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +371 -216
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +11 -4
- package/dist/components/VvSelect/index.d.ts +5 -5
- package/dist/components/VvTextarea/VvTextarea.es.js +408 -244
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +11 -4
- package/dist/components/VvTextarea/index.d.ts +5 -5
- package/dist/components/VvTooltip/VvTooltip.es.js +88 -18
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/index.es.js +1913 -1521
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +2 -2
- package/dist/constants.d.ts +30 -0
- package/dist/directives/index.es.js +128 -0
- package/dist/directives/index.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +126 -0
- package/dist/directives/v-tooltip.umd.js +1 -0
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +2102 -1761
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +179 -11
- package/dist/resolvers/unplugin.d.ts +8 -8
- package/dist/resolvers/unplugin.es.js +51 -30
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
- package/package.json +60 -34
- package/src/Volver.ts +12 -5
- 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/VvAction/VvAction.vue +144 -0
- package/src/components/VvAction/index.ts +5 -0
- package/src/components/VvButton/VvButton.vue +31 -114
- package/src/components/VvButton/index.ts +6 -79
- package/src/components/VvCombobox/VvCombobox.vue +54 -42
- package/src/components/VvCombobox/index.ts +11 -9
- package/src/components/VvDropdown/VvDropdownAction.vue +44 -0
- package/src/components/VvDropdown/VvDropdownOption.vue +65 -0
- package/src/components/VvDropdown/index.ts +4 -9
- package/src/components/VvSelect/index.ts +2 -4
- package/src/composables/dropdown/useInjectDropdown.ts +1 -1
- package/src/composables/dropdown/useProvideDropdown.ts +7 -9
- package/src/composables/useModifiers.ts +4 -7
- package/src/constants.ts +36 -0
- package/src/props/index.ts +106 -14
- package/src/resolvers/unplugin.ts +81 -48
- package/src/stories/Accordion/AccordionSlots.stories.mdx +2 -2
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +2 -1
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
- package/src/stories/Button/Button.stories.mdx +4 -2
- package/src/stories/Button/Button.test.ts +3 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
- package/src/stories/Button/ButtonState.stories.mdx +2 -11
- package/src/stories/Card/Card.stories.mdx +2 -1
- package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
- package/src/stories/Combobox/Combobox.settings.ts +44 -0
- package/src/stories/Combobox/Combobox.stories.mdx +40 -1
- package/src/stories/Dialog/Dialog.stories.mdx +2 -1
- package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
- package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
- package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
- package/src/stories/Icon/Icon.stories.mdx +2 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
- package/src/stories/InputText/InputText.stories.mdx +2 -1
- package/src/stories/Progress/Progress.stories.mdx +2 -1
- package/src/stories/Radio/Radio.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
- package/src/stories/Select/Select.stories.mdx +2 -1
- package/src/stories/Textarea/Textarea.stories.mdx +2 -1
- package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
|
@@ -1,33 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var
|
|
3
|
-
const
|
|
1
|
+
import { computed as c, unref as p, defineComponent as b, toRefs as d, openBlock as v, createElementBlock as g, normalizeClass as y, renderSlot as S, createTextVNode as B, toDisplayString as _ } from "vue";
|
|
2
|
+
var s = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(s || {}), i = /* @__PURE__ */ ((t) => (t.topStart = "top-start", t.topEnd = "top-end", t.bottomStart = "bottom-start", t.bottomEnd = "bottom-end", t.leftStart = "left-start", t.leftEnd = "left-end", t.rightStart = "right-start", t.rightEnd = "right-end", t))(i || {}), l = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(l || {}), u = /* @__PURE__ */ ((t) => (t.button = "button", t.submit = "submit", t.reset = "reset", t))(u || {}), f = /* @__PURE__ */ ((t) => (t._blank = "_blank", t._self = "_self", t._parent = "_parent", t._top = "_top", t))(f || {});
|
|
3
|
+
const j = {
|
|
4
|
+
/**
|
|
5
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
6
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
7
|
+
*/
|
|
8
|
+
to: {
|
|
9
|
+
type: [String, Object]
|
|
10
|
+
},
|
|
11
|
+
/**
|
|
12
|
+
* Anchor href
|
|
13
|
+
*/
|
|
14
|
+
href: String,
|
|
15
|
+
/**
|
|
16
|
+
* Anchor target
|
|
17
|
+
*/
|
|
18
|
+
target: {
|
|
19
|
+
type: String,
|
|
20
|
+
validator: (t) => Object.values(f).includes(t)
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* Anchor rel
|
|
24
|
+
*/
|
|
25
|
+
rel: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "noopener noreferrer"
|
|
28
|
+
}
|
|
29
|
+
}, O = {
|
|
30
|
+
/**
|
|
31
|
+
* Whether the form control is disabled
|
|
32
|
+
*/
|
|
33
|
+
disabled: Boolean
|
|
34
|
+
}, m = {
|
|
35
|
+
/**
|
|
36
|
+
* Whether the item is active
|
|
37
|
+
*/
|
|
38
|
+
active: Boolean
|
|
39
|
+
}, h = {
|
|
40
|
+
/**
|
|
41
|
+
* Whether the item is pressed
|
|
42
|
+
*/
|
|
43
|
+
pressed: Boolean
|
|
44
|
+
}, E = {
|
|
45
|
+
/**
|
|
46
|
+
* The item label
|
|
47
|
+
*/
|
|
48
|
+
label: [String, Number]
|
|
49
|
+
}, k = {
|
|
4
50
|
/**
|
|
5
51
|
* Component BEM modifiers
|
|
6
52
|
*/
|
|
7
53
|
modifiers: [String, Array]
|
|
8
54
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
55
|
+
l.before;
|
|
56
|
+
s.bottom;
|
|
57
|
+
({
|
|
58
|
+
...O,
|
|
59
|
+
...E,
|
|
60
|
+
...h,
|
|
12
61
|
...m,
|
|
62
|
+
...j,
|
|
63
|
+
/**
|
|
64
|
+
* Button type
|
|
65
|
+
*/
|
|
66
|
+
type: u.button
|
|
67
|
+
});
|
|
68
|
+
const C = {
|
|
69
|
+
...k,
|
|
13
70
|
value: [String, Number]
|
|
14
|
-
}
|
|
71
|
+
};
|
|
72
|
+
function N(t, e, o) {
|
|
73
|
+
return c(() => {
|
|
74
|
+
const a = {
|
|
75
|
+
[t]: !0
|
|
76
|
+
}, r = typeof (e == null ? void 0 : e.value) == "string" ? e.value.split(" ") : e == null ? void 0 : e.value;
|
|
77
|
+
return r && Array.isArray(r) && r.forEach((n) => {
|
|
78
|
+
a[`${t}--${n}`] = !0;
|
|
79
|
+
}), o && Object.keys(o.value).forEach((n) => {
|
|
80
|
+
a[`${t}--${n}`] = p(o.value[n]);
|
|
81
|
+
}), a;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const $ = {
|
|
15
85
|
name: "VvBadge"
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
props:
|
|
86
|
+
}, z = /* @__PURE__ */ b({
|
|
87
|
+
...$,
|
|
88
|
+
props: C,
|
|
19
89
|
setup(t) {
|
|
20
|
-
const
|
|
21
|
-
return (r,
|
|
22
|
-
class:
|
|
90
|
+
const e = t, { modifiers: o } = d(e), a = N("vv-badge", o);
|
|
91
|
+
return (r, n) => (v(), g("span", {
|
|
92
|
+
class: y(p(a)),
|
|
23
93
|
role: "status"
|
|
24
94
|
}, [
|
|
25
|
-
|
|
26
|
-
|
|
95
|
+
S(r.$slots, "default", {}, () => [
|
|
96
|
+
B(_(r.value), 1)
|
|
27
97
|
])
|
|
28
98
|
], 2));
|
|
29
99
|
}
|
|
30
100
|
});
|
|
31
101
|
export {
|
|
32
|
-
|
|
102
|
+
z as default
|
|
33
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue")):typeof define=="function"&&define.amd?define(["vue"],o):(e=typeof globalThis<"u"?globalThis:e||self,e.VvBadge=o(e.vue))})(this,function(e){"use strict";var o=(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(o||{}),
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue")):typeof define=="function"&&define.amd?define(["vue"],o):(e=typeof globalThis<"u"?globalThis:e||self,e.VvBadge=o(e.vue))})(this,function(e){"use strict";var o=(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(o||{}),f=(t=>(t.topStart="top-start",t.topEnd="top-end",t.bottomStart="bottom-start",t.bottomEnd="bottom-end",t.leftStart="left-start",t.leftEnd="left-end",t.rightStart="right-start",t.rightEnd="right-end",t))(f||{}),u=(t=>(t.before="before",t.after="after",t))(u||{}),i=(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(i||{}),p=(t=>(t._blank="_blank",t._self="_self",t._parent="_parent",t._top="_top",t))(p||{});const d={to:{type:[String,Object]},href:String,target:{type:String,validator:t=>Object.values(p).includes(t)},rel:{type:String,default:"noopener noreferrer"}},c={disabled:Boolean},b={active:Boolean},g={pressed:Boolean},y={label:[String,Number]},v={modifiers:[String,Array]};u.before,o.bottom,{...c,...y,...g,...b,...d,type:i.button};const S={...v,value:[String,Number]};function _(t,r,a){return e.computed(()=>{const s={[t]:!0},n=typeof(r==null?void 0:r.value)=="string"?r.value.split(" "):r==null?void 0:r.value;return n&&Array.isArray(n)&&n.forEach(l=>{s[`${t}--${l}`]=!0}),a&&Object.keys(a.value).forEach(l=>{s[`${t}--${l}`]=e.unref(a.value[l])}),s})}const B={name:"VvBadge"};return e.defineComponent({...B,props:S,setup(t){const r=t,{modifiers:a}=e.toRefs(r),s=_("vv-badge",a);return(n,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(s)),role:"status"},[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.value),1)])],2))}})});
|
|
@@ -1,71 +1,127 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
function
|
|
3
|
-
return
|
|
4
|
-
const
|
|
1
|
+
import { computed as S, unref as _, defineComponent as j, toRefs as O, openBlock as u, createElementBlock as i, normalizeClass as g, createElementVNode as y, Fragment as k, renderList as E, createBlock as N, resolveDynamicComponent as $, mergeProps as C, withCtx as L, renderSlot as P, normalizeProps as V, guardReactiveProps as z, createTextVNode as A, toDisplayString as D } from "vue";
|
|
2
|
+
function R(t, r, s) {
|
|
3
|
+
return S(() => {
|
|
4
|
+
const n = {
|
|
5
5
|
[t]: !0
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}), s;
|
|
6
|
+
}, e = typeof (r == null ? void 0 : r.value) == "string" ? r.value.split(" ") : r == null ? void 0 : r.value;
|
|
7
|
+
return e && Array.isArray(e) && e.forEach((l) => {
|
|
8
|
+
n[`${t}--${l}`] = !0;
|
|
9
|
+
}), s && Object.keys(s.value).forEach((l) => {
|
|
10
|
+
n[`${t}--${l}`] = _(s.value[l]);
|
|
11
|
+
}), n;
|
|
13
12
|
});
|
|
14
13
|
}
|
|
15
|
-
var
|
|
16
|
-
const
|
|
14
|
+
var p = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(p || {}), h = /* @__PURE__ */ ((t) => (t.topStart = "top-start", t.topEnd = "top-end", t.bottomStart = "bottom-start", t.bottomEnd = "bottom-end", t.leftStart = "left-start", t.leftEnd = "left-end", t.rightStart = "right-start", t.rightEnd = "right-end", t))(h || {}), c = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(c || {}), b = /* @__PURE__ */ ((t) => (t.button = "button", t.submit = "submit", t.reset = "reset", t))(b || {}), B = /* @__PURE__ */ ((t) => (t._blank = "_blank", t._self = "_self", t._parent = "_parent", t._top = "_top", t))(B || {});
|
|
15
|
+
const w = {
|
|
16
|
+
/**
|
|
17
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
18
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
19
|
+
*/
|
|
20
|
+
to: {
|
|
21
|
+
type: [String, Object]
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* Anchor href
|
|
25
|
+
*/
|
|
26
|
+
href: String,
|
|
27
|
+
/**
|
|
28
|
+
* Anchor target
|
|
29
|
+
*/
|
|
30
|
+
target: {
|
|
31
|
+
type: String,
|
|
32
|
+
validator: (t) => Object.values(B).includes(t)
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Anchor rel
|
|
36
|
+
*/
|
|
37
|
+
rel: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "noopener noreferrer"
|
|
40
|
+
}
|
|
41
|
+
}, F = {
|
|
42
|
+
/**
|
|
43
|
+
* Whether the form control is disabled
|
|
44
|
+
*/
|
|
45
|
+
disabled: Boolean
|
|
46
|
+
}, M = {
|
|
47
|
+
/**
|
|
48
|
+
* Whether the item is active
|
|
49
|
+
*/
|
|
50
|
+
active: Boolean
|
|
51
|
+
}, I = {
|
|
52
|
+
/**
|
|
53
|
+
* Whether the item is pressed
|
|
54
|
+
*/
|
|
55
|
+
pressed: Boolean
|
|
56
|
+
}, W = {
|
|
57
|
+
/**
|
|
58
|
+
* The item label
|
|
59
|
+
*/
|
|
60
|
+
label: [String, Number]
|
|
61
|
+
}, q = {
|
|
17
62
|
/**
|
|
18
63
|
* Component BEM modifiers
|
|
19
64
|
*/
|
|
20
65
|
modifiers: [String, Array]
|
|
21
66
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
...
|
|
67
|
+
c.before;
|
|
68
|
+
p.bottom;
|
|
69
|
+
({
|
|
70
|
+
...F,
|
|
71
|
+
...W,
|
|
72
|
+
...I,
|
|
73
|
+
...M,
|
|
74
|
+
...w,
|
|
75
|
+
/**
|
|
76
|
+
* Button type
|
|
77
|
+
*/
|
|
78
|
+
type: b.button
|
|
79
|
+
});
|
|
80
|
+
const G = {
|
|
81
|
+
...q,
|
|
26
82
|
routes: Array
|
|
27
|
-
},
|
|
83
|
+
}, H = { class: "vv-breadcrumb__list" }, J = ["content"], K = {
|
|
28
84
|
name: "VvBreadcrumb"
|
|
29
|
-
},
|
|
30
|
-
...
|
|
31
|
-
props:
|
|
85
|
+
}, U = /* @__PURE__ */ j({
|
|
86
|
+
...K,
|
|
87
|
+
props: G,
|
|
32
88
|
setup(t) {
|
|
33
|
-
const
|
|
34
|
-
return (e,
|
|
35
|
-
class: g(_(
|
|
89
|
+
const r = t, { modifiers: s } = O(r), n = R("vv-breadcrumb", s);
|
|
90
|
+
return (e, l) => (u(), i("nav", {
|
|
91
|
+
class: g(_(n)),
|
|
36
92
|
"aria-label": "breadcrumbs"
|
|
37
93
|
}, [
|
|
38
|
-
|
|
39
|
-
(
|
|
40
|
-
var
|
|
41
|
-
return
|
|
42
|
-
key: `${
|
|
94
|
+
y("ol", H, [
|
|
95
|
+
(u(!0), i(k, null, E(e.routes, (a, o) => {
|
|
96
|
+
var d, f, m, v;
|
|
97
|
+
return u(), i("li", {
|
|
98
|
+
key: `${a.label}-${o}`,
|
|
43
99
|
class: g({
|
|
44
|
-
"vv-breadcrumb__item":
|
|
45
|
-
"vv-breadcrumb__item-active":
|
|
100
|
+
"vv-breadcrumb__item": o < Number((d = e.routes) == null ? void 0 : d.length) - 1,
|
|
101
|
+
"vv-breadcrumb__item-active": o === Number((f = e.routes) == null ? void 0 : f.length) - 1
|
|
46
102
|
}),
|
|
47
103
|
itemprop: "itemListElement",
|
|
48
104
|
itemtype: "https://schema.org/ListItem",
|
|
49
105
|
itemscope: ""
|
|
50
106
|
}, [
|
|
51
|
-
(
|
|
107
|
+
(u(), N($(a.to ? "router-link" : a.href ? "a" : "span"), C(a, {
|
|
52
108
|
class: {
|
|
53
|
-
"vv-breadcrumb__link":
|
|
109
|
+
"vv-breadcrumb__link": o < Number((m = e.routes) == null ? void 0 : m.length) - 1
|
|
54
110
|
},
|
|
55
|
-
"aria-current":
|
|
111
|
+
"aria-current": o === Number((v = e.routes) == null ? void 0 : v.length) - 1 ? "page" : void 0,
|
|
56
112
|
itemprop: "item"
|
|
57
113
|
}), {
|
|
58
|
-
default:
|
|
59
|
-
|
|
60
|
-
|
|
114
|
+
default: L(() => [
|
|
115
|
+
P(e.$slots, "label", V(z({ route: a, index: o })), () => [
|
|
116
|
+
A(D(a.label), 1)
|
|
61
117
|
])
|
|
62
118
|
]),
|
|
63
119
|
_: 2
|
|
64
120
|
}, 1040, ["class", "aria-current"])),
|
|
65
|
-
|
|
121
|
+
y("meta", {
|
|
66
122
|
itemprop: "position",
|
|
67
|
-
content: `${
|
|
68
|
-
}, null, 8,
|
|
123
|
+
content: `${o + 1}`
|
|
124
|
+
}, null, 8, J)
|
|
69
125
|
], 2);
|
|
70
126
|
}), 128))
|
|
71
127
|
])
|
|
@@ -73,5 +129,5 @@ const R = {
|
|
|
73
129
|
}
|
|
74
130
|
});
|
|
75
131
|
export {
|
|
76
|
-
|
|
132
|
+
U as default
|
|
77
133
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("vue")):typeof define=="function"&&define.amd?define(["vue"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.VvBreadcrumb=s(e.vue))})(this,function(e){"use strict";function s(t,o,l){return e.computed(()=>{const i={[t]:!0},r=typeof(o==null?void 0:o.value)=="string"?o.value.split(" "):o==null?void 0:o.value;return r&&Array.isArray(r)&&r.forEach(c=>{i[`${t}--${c}`]=!0}),l&&Object.keys(l.value).forEach(c=>{i[`${t}--${c}`]=e.unref(l.value[c])}),i})}var p=(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(p||{}),d=(t=>(t.topStart="top-start",t.topEnd="top-end",t.bottomStart="bottom-start",t.bottomEnd="bottom-end",t.leftStart="left-start",t.leftEnd="left-end",t.rightStart="right-start",t.rightEnd="right-end",t))(d||{}),u=(t=>(t.before="before",t.after="after",t))(u||{}),b=(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(b||{}),f=(t=>(t._blank="_blank",t._self="_self",t._parent="_parent",t._top="_top",t))(f||{});const B={to:{type:[String,Object]},href:String,target:{type:String,validator:t=>Object.values(f).includes(t)},rel:{type:String,default:"noopener noreferrer"}},h={disabled:Boolean},v={active:Boolean},S={pressed:Boolean},j={label:[String,Number]},k={modifiers:[String,Array]};u.before,p.bottom,{...h,...j,...S,...v,...B,type:b.button};const O={...k,routes:Array},E={class:"vv-breadcrumb__list"},N=["content"],C={name:"VvBreadcrumb"};return e.defineComponent({...C,props:O,setup(t){const o=t,{modifiers:l}=e.toRefs(o),i=s("vv-breadcrumb",l);return(r,c)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(i)),"aria-label":"breadcrumbs"},[e.createElementVNode("ol",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.routes,(n,a)=>{var m,g,y,_;return e.openBlock(),e.createElementBlock("li",{key:`${n.label}-${a}`,class:e.normalizeClass({"vv-breadcrumb__item":a<Number((m=r.routes)==null?void 0:m.length)-1,"vv-breadcrumb__item-active":a===Number((g=r.routes)==null?void 0:g.length)-1}),itemprop:"itemListElement",itemtype:"https://schema.org/ListItem",itemscope:""},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.to?"router-link":n.href?"a":"span"),e.mergeProps(n,{class:{"vv-breadcrumb__link":a<Number((y=r.routes)==null?void 0:y.length)-1},"aria-current":a===Number((_=r.routes)==null?void 0:_.length)-1?"page":void 0,itemprop:"item"}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"label",e.normalizeProps(e.guardReactiveProps({route:n,index:a})),()=>[e.createTextVNode(e.toDisplayString(n.label),1)])]),_:2},1040,["class","aria-current"])),e.createElementVNode("meta",{itemprop:"position",content:`${a+1}`},null,8,N)],2)}),128))])],2))}})});
|