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