@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +98 -3
- package/auto-imports.d.ts +6 -2
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +23 -16
- package/dist/Volver.d.ts +1 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +70 -14
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +13 -6
- package/dist/components/VvAccordion/index.d.ts +4 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +117 -38
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -8
- package/dist/components/VvAccordionGroup/index.d.ts +4 -1
- package/dist/components/VvAction/VvAction.es.js +58 -13
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +59 -12
- package/dist/components/VvAction/index.d.ts +25 -4
- package/dist/components/VvAlert/VvAlert.es.js +195 -152
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +18 -8
- package/dist/components/VvAlert/index.d.ts +9 -5
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +240 -174
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +13 -6
- package/dist/components/VvAlertGroup/index.d.ts +6 -2
- package/dist/components/VvAvatar/VvAvatar.es.js +54 -9
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
- package/dist/components/VvAvatar/index.d.ts +4 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +111 -36
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
- package/dist/components/VvAvatarGroup/index.d.ts +4 -1
- package/dist/components/VvBadge/VvBadge.es.js +73 -17
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -4
- package/dist/components/VvBadge/index.d.ts +4 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +259 -49
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
- package/dist/components/VvBreadcrumb/index.d.ts +6 -10
- package/dist/components/VvButton/VvButton.es.js +187 -141
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +101 -27
- package/dist/components/VvButton/index.d.ts +41 -14
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +69 -16
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +23 -10
- package/dist/components/VvButtonGroup/index.d.ts +8 -2
- package/dist/components/VvCard/VvCard.es.js +84 -25
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +12 -4
- package/dist/components/VvCard/index.d.ts +4 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +91 -22
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +104 -32
- package/dist/components/VvCheckbox/index.d.ts +45 -12
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +180 -67
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +100 -29
- package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
- package/dist/components/VvCombobox/VvCombobox.es.js +758 -531
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +181 -108
- package/dist/components/VvCombobox/index.d.ts +53 -22
- package/dist/components/VvDialog/VvDialog.es.js +136 -141
- 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 +121 -55
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +72 -11
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +26 -7
- package/dist/components/VvDropdown/index.d.ts +16 -11
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +82 -22
- 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 +56 -8
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +76 -17
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +23 -96
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
- package/dist/components/VvIcon/index.d.ts +33 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +1734 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +313 -0
- package/dist/components/VvInputFile/index.d.ts +179 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +331 -293
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +162 -55
- package/dist/components/VvInputText/index.d.ts +71 -29
- package/dist/components/VvNav/VvNav.es.js +151 -73
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +41 -14
- package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -0
- package/dist/components/VvNav/index.d.ts +5 -13
- package/dist/components/VvNavItem/VvNavItem.es.js +436 -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 +65 -14
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
- package/dist/components/VvProgress/index.d.ts +4 -1
- package/dist/components/VvRadio/VvRadio.es.js +89 -21
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +102 -30
- package/dist/components/VvRadio/index.d.ts +44 -11
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +180 -66
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +100 -29
- package/dist/components/VvRadioGroup/index.d.ts +45 -12
- package/dist/components/VvSelect/VvSelect.es.js +248 -226
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -39
- package/dist/components/VvSelect/index.d.ts +48 -14
- package/dist/components/VvTab/VvTab.es.js +256 -110
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +50 -13
- package/dist/components/VvTab/index.d.ts +13 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +229 -212
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +155 -48
- package/dist/components/VvTextarea/index.d.ts +68 -19
- package/dist/components/VvTooltip/VvTooltip.es.js +72 -17
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +10 -3
- package/dist/components/VvTooltip/index.d.ts +4 -1
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.es.js +2902 -1329
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +37 -4
- package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.es.js +88 -1
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentIcon.d.ts +9 -8
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +92 -31
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +90 -26
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +210 -210
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +81 -16
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +287 -73
- package/dist/resolvers/unplugin.d.ts +6 -1
- package/dist/resolvers/unplugin.es.js +78 -10
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +72 -84
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +623 -461
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/Icon/Icon.settings.d.ts +1 -0
- package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/Tab/Tab.settings.d.ts +4 -37
- package/dist/types/alert.d.ts +13 -0
- package/dist/types/blurhash.d.ts +12 -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 +7 -0
- package/dist/types/input-file.d.ts +16 -0
- package/dist/types/nav.d.ts +18 -0
- package/dist/utils/ObjectUtilities.d.ts +0 -1
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +97 -80
- package/src/Volver.ts +31 -20
- 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/VvAlert/index.ts +1 -3
- package/src/components/VvAlertGroup/index.ts +2 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
- package/src/components/VvBreadcrumb/index.ts +2 -8
- package/src/components/VvButton/VvButton.vue +6 -6
- package/src/components/VvButton/index.ts +2 -4
- package/src/components/VvCombobox/VvCombobox.vue +24 -16
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvIcon/index.ts +35 -48
- package/src/components/VvInputFile/VvInputFile.vue +365 -0
- package/src/components/VvInputFile/index.ts +116 -0
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +17 -18
- package/src/components/VvInputText/index.ts +7 -15
- 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 +5 -8
- package/src/components/VvTab/VvTab.vue +63 -35
- package/src/components/VvTab/index.ts +10 -4
- package/src/components/VvTextarea/VvTextarea.vue +6 -9
- package/src/components/index.ts +10 -0
- package/src/composables/index.ts +1 -0
- package/src/composables/useBlurhash.ts +76 -0
- package/src/composables/useComponentIcon.ts +15 -14
- package/src/composables/useUniqueId.ts +2 -2
- package/src/directives/index.ts +3 -6
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/props/index.ts +115 -27
- package/src/resolvers/unplugin.ts +24 -14
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Icon/Icon.settings.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +36 -0
- package/src/stories/InputFile/InputFile.stories.ts +89 -0
- package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
- 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/blurhash.ts +21 -0
- package/src/types/generic.ts +6 -0
- package/src/types/index.ts +7 -0
- package/src/types/input-file.ts +18 -0
- package/src/types/nav.ts +20 -0
- package/src/utils/ObjectUtilities.ts +0 -11
- package/src/workers/blurhash.ts +9 -0
- package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
- package/dist/components/VvNav/VvNavSeparator.d.ts +0 -2
- 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/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,4 +1,4 @@
|
|
|
1
|
-
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
1
|
+
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
3
3
|
Strategy2["absolute"] = "absolute";
|
|
4
4
|
Strategy2["fixed"] = "fixed";
|
|
@@ -33,6 +33,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
33
33
|
ButtonType2["reset"] = "reset";
|
|
34
34
|
return ButtonType2;
|
|
35
35
|
})(ButtonType || {});
|
|
36
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
37
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
38
|
+
ActionTag2["routerLink"] = "router-link";
|
|
39
|
+
ActionTag2["a"] = "a";
|
|
40
|
+
ActionTag2["button"] = "button";
|
|
41
|
+
return ActionTag2;
|
|
42
|
+
})(ActionTag || {});
|
|
36
43
|
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
37
44
|
AnchorTarget2["_blank"] = "_blank";
|
|
38
45
|
AnchorTarget2["_self"] = "_self";
|
|
@@ -57,6 +64,7 @@ const LinkProps = {
|
|
|
57
64
|
*/
|
|
58
65
|
target: {
|
|
59
66
|
type: String,
|
|
67
|
+
default: void 0,
|
|
60
68
|
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
61
69
|
},
|
|
62
70
|
/**
|
|
@@ -71,38 +79,65 @@ const DisabledProps = {
|
|
|
71
79
|
/**
|
|
72
80
|
* Whether the form control is disabled
|
|
73
81
|
*/
|
|
74
|
-
disabled:
|
|
82
|
+
disabled: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false
|
|
85
|
+
}
|
|
75
86
|
};
|
|
76
87
|
const ActiveProps = {
|
|
77
88
|
/**
|
|
78
89
|
* Whether the item is active
|
|
79
90
|
*/
|
|
80
|
-
active:
|
|
91
|
+
active: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
const CurrentProps = {
|
|
97
|
+
/**
|
|
98
|
+
* Whether the item is current
|
|
99
|
+
*/
|
|
100
|
+
current: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false
|
|
103
|
+
}
|
|
81
104
|
};
|
|
82
105
|
const PressedProps = {
|
|
83
106
|
/**
|
|
84
107
|
* Whether the item is pressed
|
|
85
108
|
*/
|
|
86
|
-
pressed:
|
|
109
|
+
pressed: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: false
|
|
112
|
+
}
|
|
87
113
|
};
|
|
88
114
|
const LabelProps = {
|
|
89
115
|
/**
|
|
90
116
|
* The item label
|
|
91
117
|
*/
|
|
92
|
-
label:
|
|
118
|
+
label: {
|
|
119
|
+
type: [String, Number],
|
|
120
|
+
default: void 0
|
|
121
|
+
}
|
|
93
122
|
};
|
|
94
123
|
const ModifiersProps = {
|
|
95
124
|
/**
|
|
96
125
|
* Component BEM modifiers
|
|
97
126
|
*/
|
|
98
|
-
modifiers:
|
|
127
|
+
modifiers: {
|
|
128
|
+
type: [String, Array],
|
|
129
|
+
default: void 0
|
|
130
|
+
}
|
|
99
131
|
};
|
|
100
132
|
({
|
|
101
133
|
/**
|
|
102
134
|
* VvIcon name or props
|
|
103
135
|
* @see VVIcon
|
|
104
136
|
*/
|
|
105
|
-
icon: {
|
|
137
|
+
icon: {
|
|
138
|
+
type: [String, Object],
|
|
139
|
+
default: void 0
|
|
140
|
+
},
|
|
106
141
|
/**
|
|
107
142
|
* VvIcon position
|
|
108
143
|
*/
|
|
@@ -133,7 +168,8 @@ const ModifiersProps = {
|
|
|
133
168
|
* Dropdown show / hide transition name
|
|
134
169
|
*/
|
|
135
170
|
transitionName: {
|
|
136
|
-
type: String
|
|
171
|
+
type: String,
|
|
172
|
+
default: void 0
|
|
137
173
|
},
|
|
138
174
|
/**
|
|
139
175
|
* Offset of the dropdown from the trigger
|
|
@@ -201,7 +237,8 @@ const ModifiersProps = {
|
|
|
201
237
|
* Set dropdown width to the same as the trigger
|
|
202
238
|
*/
|
|
203
239
|
triggerWidth: {
|
|
204
|
-
type: Boolean
|
|
240
|
+
type: Boolean,
|
|
241
|
+
default: false
|
|
205
242
|
}
|
|
206
243
|
});
|
|
207
244
|
({
|
|
@@ -209,6 +246,7 @@ const ModifiersProps = {
|
|
|
209
246
|
...LabelProps,
|
|
210
247
|
...PressedProps,
|
|
211
248
|
...ActiveProps,
|
|
249
|
+
...CurrentProps,
|
|
212
250
|
...LinkProps,
|
|
213
251
|
/**
|
|
214
252
|
* Button type
|
|
@@ -224,6 +262,13 @@ const ModifiersProps = {
|
|
|
224
262
|
ariaLabel: {
|
|
225
263
|
type: String,
|
|
226
264
|
default: void 0
|
|
265
|
+
},
|
|
266
|
+
/**
|
|
267
|
+
* Default tag for the action
|
|
268
|
+
*/
|
|
269
|
+
defaultTag: {
|
|
270
|
+
type: String,
|
|
271
|
+
default: ActionTag.button
|
|
227
272
|
}
|
|
228
273
|
});
|
|
229
274
|
const VvBadgeProps = {
|
|
@@ -264,14 +309,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
264
309
|
const { modifiers } = toRefs(props);
|
|
265
310
|
const bemCssClasses = useModifiers("vv-badge", modifiers);
|
|
266
311
|
return (_ctx, _cache) => {
|
|
267
|
-
return openBlock(), createElementBlock(
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
312
|
+
return openBlock(), createElementBlock(
|
|
313
|
+
"span",
|
|
314
|
+
{
|
|
315
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
316
|
+
role: "status"
|
|
317
|
+
},
|
|
318
|
+
[
|
|
319
|
+
createCommentVNode(" @slot Default slot "),
|
|
320
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
321
|
+
createTextVNode(
|
|
322
|
+
toDisplayString(_ctx.value),
|
|
323
|
+
1
|
|
324
|
+
/* TEXT */
|
|
325
|
+
)
|
|
326
|
+
])
|
|
327
|
+
],
|
|
328
|
+
2
|
|
329
|
+
/* CLASS */
|
|
330
|
+
);
|
|
275
331
|
};
|
|
276
332
|
}
|
|
277
333
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue")):"function"==typeof define&&define.amd?define(["vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvBadge=o(e.vue)}(this,(function(e){"use strict";var o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),t=(e=>(e.before="before",e.after="after",e))(t||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{});Boolean,Boolean,Boolean;const
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue")):"function"==typeof define&&define.amd?define(["vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvBadge=o(e.vue)}(this,(function(e){"use strict";var o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),t=(e=>(e.before="before",e.after="after",e))(t||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{});Boolean,Boolean,Boolean,Boolean;const l={modifiers:{type:[String,Array],default:void 0}};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button,r.button;const a={...l,value:[String,Number]};return e.defineComponent({name:"VvBadge",props:a,setup(o){const t=o,{modifiers:n}=e.toRefs(t),r=function(o,t,n){return e.computed((()=>{const r={[o]:!0},l="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{r[`${o}--${t}`]=e.unref(n.value[t])})),r}))}("vv-badge",n);return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(r)),role:"status"},[e.createCommentVNode(" @slot Default slot "),e.renderSlot(o.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(o.value),1)]))],2))}})}));
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
2
|
value: (StringConstructor | NumberConstructor)[];
|
|
3
|
-
modifiers:
|
|
4
|
-
|
|
3
|
+
modifiers: {
|
|
4
|
+
type: globalThis.PropType<string | string[]>;
|
|
5
|
+
default: undefined;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
5
8
|
value: (StringConstructor | NumberConstructor)[];
|
|
6
|
-
modifiers:
|
|
7
|
-
|
|
9
|
+
modifiers: {
|
|
10
|
+
type: globalThis.PropType<string | string[]>;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
}>>, {
|
|
14
|
+
modifiers: string | string[];
|
|
15
|
+
}, {}>, {
|
|
8
16
|
default?(_: {}): any;
|
|
9
17
|
}>;
|
|
10
18
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, unref, defineComponent,
|
|
1
|
+
import { computed, unref, inject, defineComponent, ref, watch, openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, createCommentVNode, renderSlot, createTextVNode, toDisplayString, toRefs, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createVNode, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
function useModifiers(prefix, modifiers, others) {
|
|
3
3
|
return computed(() => {
|
|
4
4
|
const toReturn = {
|
|
@@ -56,6 +56,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
56
56
|
ButtonType2["reset"] = "reset";
|
|
57
57
|
return ButtonType2;
|
|
58
58
|
})(ButtonType || {});
|
|
59
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
60
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
61
|
+
ActionTag2["routerLink"] = "router-link";
|
|
62
|
+
ActionTag2["a"] = "a";
|
|
63
|
+
ActionTag2["button"] = "button";
|
|
64
|
+
return ActionTag2;
|
|
65
|
+
})(ActionTag || {});
|
|
59
66
|
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
60
67
|
AnchorTarget2["_blank"] = "_blank";
|
|
61
68
|
AnchorTarget2["_self"] = "_self";
|
|
@@ -63,6 +70,13 @@ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
|
63
70
|
AnchorTarget2["_top"] = "_top";
|
|
64
71
|
return AnchorTarget2;
|
|
65
72
|
})(AnchorTarget || {});
|
|
73
|
+
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
74
|
+
const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
|
|
75
|
+
"dropdownTrigger"
|
|
76
|
+
);
|
|
77
|
+
const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
|
|
78
|
+
"dropdownAction"
|
|
79
|
+
);
|
|
66
80
|
const LinkProps = {
|
|
67
81
|
/**
|
|
68
82
|
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
@@ -80,6 +94,7 @@ const LinkProps = {
|
|
|
80
94
|
*/
|
|
81
95
|
target: {
|
|
82
96
|
type: String,
|
|
97
|
+
default: void 0,
|
|
83
98
|
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
84
99
|
},
|
|
85
100
|
/**
|
|
@@ -94,38 +109,65 @@ const DisabledProps = {
|
|
|
94
109
|
/**
|
|
95
110
|
* Whether the form control is disabled
|
|
96
111
|
*/
|
|
97
|
-
disabled:
|
|
112
|
+
disabled: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: false
|
|
115
|
+
}
|
|
98
116
|
};
|
|
99
117
|
const ActiveProps = {
|
|
100
118
|
/**
|
|
101
119
|
* Whether the item is active
|
|
102
120
|
*/
|
|
103
|
-
active:
|
|
121
|
+
active: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const CurrentProps = {
|
|
127
|
+
/**
|
|
128
|
+
* Whether the item is current
|
|
129
|
+
*/
|
|
130
|
+
current: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: false
|
|
133
|
+
}
|
|
104
134
|
};
|
|
105
135
|
const PressedProps = {
|
|
106
136
|
/**
|
|
107
137
|
* Whether the item is pressed
|
|
108
138
|
*/
|
|
109
|
-
pressed:
|
|
139
|
+
pressed: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
default: false
|
|
142
|
+
}
|
|
110
143
|
};
|
|
111
144
|
const LabelProps = {
|
|
112
145
|
/**
|
|
113
146
|
* The item label
|
|
114
147
|
*/
|
|
115
|
-
label:
|
|
148
|
+
label: {
|
|
149
|
+
type: [String, Number],
|
|
150
|
+
default: void 0
|
|
151
|
+
}
|
|
116
152
|
};
|
|
117
153
|
const ModifiersProps = {
|
|
118
154
|
/**
|
|
119
155
|
* Component BEM modifiers
|
|
120
156
|
*/
|
|
121
|
-
modifiers:
|
|
157
|
+
modifiers: {
|
|
158
|
+
type: [String, Array],
|
|
159
|
+
default: void 0
|
|
160
|
+
}
|
|
122
161
|
};
|
|
123
162
|
({
|
|
124
163
|
/**
|
|
125
164
|
* VvIcon name or props
|
|
126
165
|
* @see VVIcon
|
|
127
166
|
*/
|
|
128
|
-
icon: {
|
|
167
|
+
icon: {
|
|
168
|
+
type: [String, Object],
|
|
169
|
+
default: void 0
|
|
170
|
+
},
|
|
129
171
|
/**
|
|
130
172
|
* VvIcon position
|
|
131
173
|
*/
|
|
@@ -156,7 +198,8 @@ const ModifiersProps = {
|
|
|
156
198
|
* Dropdown show / hide transition name
|
|
157
199
|
*/
|
|
158
200
|
transitionName: {
|
|
159
|
-
type: String
|
|
201
|
+
type: String,
|
|
202
|
+
default: void 0
|
|
160
203
|
},
|
|
161
204
|
/**
|
|
162
205
|
* Offset of the dropdown from the trigger
|
|
@@ -224,14 +267,16 @@ const ModifiersProps = {
|
|
|
224
267
|
* Set dropdown width to the same as the trigger
|
|
225
268
|
*/
|
|
226
269
|
triggerWidth: {
|
|
227
|
-
type: Boolean
|
|
270
|
+
type: Boolean,
|
|
271
|
+
default: false
|
|
228
272
|
}
|
|
229
273
|
});
|
|
230
|
-
|
|
274
|
+
const ActionProps = {
|
|
231
275
|
...DisabledProps,
|
|
232
276
|
...LabelProps,
|
|
233
277
|
...PressedProps,
|
|
234
278
|
...ActiveProps,
|
|
279
|
+
...CurrentProps,
|
|
235
280
|
...LinkProps,
|
|
236
281
|
/**
|
|
237
282
|
* Button type
|
|
@@ -247,12 +292,151 @@ const ModifiersProps = {
|
|
|
247
292
|
ariaLabel: {
|
|
248
293
|
type: String,
|
|
249
294
|
default: void 0
|
|
295
|
+
},
|
|
296
|
+
/**
|
|
297
|
+
* Default tag for the action
|
|
298
|
+
*/
|
|
299
|
+
defaultTag: {
|
|
300
|
+
type: String,
|
|
301
|
+
default: ActionTag.button
|
|
250
302
|
}
|
|
251
|
-
}
|
|
303
|
+
};
|
|
252
304
|
const VvBreadcrumbProps = {
|
|
253
305
|
...ModifiersProps,
|
|
254
306
|
routes: Array
|
|
255
307
|
};
|
|
308
|
+
const VvActionEvents = ["click", "mouseover", "mouseleave"];
|
|
309
|
+
const VvActionProps = ActionProps;
|
|
310
|
+
function useVolver() {
|
|
311
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
312
|
+
}
|
|
313
|
+
function useInjectedDropdownTrigger() {
|
|
314
|
+
return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
|
|
315
|
+
}
|
|
316
|
+
function useInjectedDropdownAction() {
|
|
317
|
+
return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
|
|
318
|
+
}
|
|
319
|
+
const __default__$1 = {
|
|
320
|
+
name: "VvAction"
|
|
321
|
+
};
|
|
322
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
323
|
+
...__default__$1,
|
|
324
|
+
props: VvActionProps,
|
|
325
|
+
emits: VvActionEvents,
|
|
326
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
327
|
+
const props = __props;
|
|
328
|
+
const emit = __emit;
|
|
329
|
+
const volver = useVolver();
|
|
330
|
+
const element = ref(null);
|
|
331
|
+
__expose({ $el: element });
|
|
332
|
+
const {
|
|
333
|
+
reference: dropdownTriggerReference,
|
|
334
|
+
bus: dropdownEventBus,
|
|
335
|
+
aria: dropdownAria,
|
|
336
|
+
expanded: dropdownExpanded
|
|
337
|
+
} = useInjectedDropdownTrigger();
|
|
338
|
+
watch(
|
|
339
|
+
() => element.value,
|
|
340
|
+
(newValue) => {
|
|
341
|
+
if (dropdownTriggerReference) {
|
|
342
|
+
dropdownTriggerReference.value = newValue;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
);
|
|
346
|
+
const pressed = computed(() => {
|
|
347
|
+
return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
|
|
348
|
+
});
|
|
349
|
+
const { role } = useInjectedDropdownAction();
|
|
350
|
+
const hasTag = computed(() => {
|
|
351
|
+
switch (true) {
|
|
352
|
+
case props.disabled:
|
|
353
|
+
return ActionTag.button;
|
|
354
|
+
case props.to !== void 0:
|
|
355
|
+
return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
|
|
356
|
+
case props.href !== void 0:
|
|
357
|
+
return ActionTag.a;
|
|
358
|
+
default:
|
|
359
|
+
return props.defaultTag;
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
const hasProps = computed(() => {
|
|
363
|
+
const toReturn = {
|
|
364
|
+
...dropdownAria == null ? void 0 : dropdownAria.value,
|
|
365
|
+
ariaPressed: pressed.value ? true : void 0,
|
|
366
|
+
ariaLabel: props.ariaLabel,
|
|
367
|
+
role: role == null ? void 0 : role.value
|
|
368
|
+
};
|
|
369
|
+
switch (hasTag.value) {
|
|
370
|
+
case ActionTag.a:
|
|
371
|
+
return {
|
|
372
|
+
...toReturn,
|
|
373
|
+
href: props.href,
|
|
374
|
+
target: props.target,
|
|
375
|
+
rel: props.rel
|
|
376
|
+
};
|
|
377
|
+
case ActionTag.routerLink:
|
|
378
|
+
case ActionTag.nuxtLink:
|
|
379
|
+
return {
|
|
380
|
+
...toReturn,
|
|
381
|
+
to: props.to,
|
|
382
|
+
target: props.target
|
|
383
|
+
};
|
|
384
|
+
case ActionTag.button:
|
|
385
|
+
return {
|
|
386
|
+
...toReturn,
|
|
387
|
+
type: props.type,
|
|
388
|
+
disabled: props.disabled
|
|
389
|
+
};
|
|
390
|
+
default:
|
|
391
|
+
return toReturn;
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
const onClick = (e) => {
|
|
395
|
+
if (props.disabled) {
|
|
396
|
+
e.preventDefault();
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
|
|
400
|
+
emit("click", e);
|
|
401
|
+
};
|
|
402
|
+
const onMouseover = (e) => {
|
|
403
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
|
|
404
|
+
emit("mouseover", e);
|
|
405
|
+
};
|
|
406
|
+
const onMouseleave = (e) => {
|
|
407
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
|
|
408
|
+
emit("mouseleave", e);
|
|
409
|
+
};
|
|
410
|
+
return (_ctx, _cache) => {
|
|
411
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
|
|
412
|
+
ref_key: "element",
|
|
413
|
+
ref: element,
|
|
414
|
+
class: {
|
|
415
|
+
active: _ctx.active,
|
|
416
|
+
pressed: unref(pressed),
|
|
417
|
+
disabled: _ctx.disabled,
|
|
418
|
+
current: _ctx.current
|
|
419
|
+
},
|
|
420
|
+
onClickPassive: onClick,
|
|
421
|
+
onMouseoverPassive: onMouseover,
|
|
422
|
+
onMouseleavePassive: onMouseleave
|
|
423
|
+
}), {
|
|
424
|
+
default: withCtx(() => [
|
|
425
|
+
createCommentVNode(" @slot Default slot "),
|
|
426
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
427
|
+
createTextVNode(
|
|
428
|
+
toDisplayString(_ctx.label),
|
|
429
|
+
1
|
|
430
|
+
/* TEXT */
|
|
431
|
+
)
|
|
432
|
+
])
|
|
433
|
+
]),
|
|
434
|
+
_: 3
|
|
435
|
+
/* FORWARDED */
|
|
436
|
+
}, 16, ["class"]);
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
});
|
|
256
440
|
const _hoisted_1 = { class: "vv-breadcrumb__list" };
|
|
257
441
|
const _hoisted_2 = ["content"];
|
|
258
442
|
const __default__ = {
|
|
@@ -265,46 +449,72 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
265
449
|
const props = __props;
|
|
266
450
|
const { modifiers } = toRefs(props);
|
|
267
451
|
const bemCssClasses = useModifiers("vv-breadcrumb", modifiers);
|
|
452
|
+
const length = computed(() => {
|
|
453
|
+
var _a;
|
|
454
|
+
return ((_a = props.routes) == null ? void 0 : _a.length) ?? 0;
|
|
455
|
+
});
|
|
456
|
+
const isLast = (index) => index === length.value - 1;
|
|
268
457
|
return (_ctx, _cache) => {
|
|
269
|
-
return openBlock(), createElementBlock(
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
458
|
+
return openBlock(), createElementBlock(
|
|
459
|
+
"nav",
|
|
460
|
+
{
|
|
461
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
462
|
+
"aria-label": "breadcrumbs"
|
|
463
|
+
},
|
|
464
|
+
[
|
|
465
|
+
createElementVNode("ol", _hoisted_1, [
|
|
466
|
+
(openBlock(true), createElementBlock(
|
|
467
|
+
Fragment,
|
|
468
|
+
null,
|
|
469
|
+
renderList(_ctx.routes, ({ label, ...route }, index) => {
|
|
470
|
+
return openBlock(), createElementBlock(
|
|
471
|
+
"li",
|
|
472
|
+
{
|
|
473
|
+
key: `${label}-${index}`,
|
|
474
|
+
class: normalizeClass(
|
|
475
|
+
!isLast(index) ? "vv-breadcrumb__item" : "vv-breadcrumb__item-active"
|
|
476
|
+
),
|
|
477
|
+
itemprop: "itemListElement",
|
|
478
|
+
itemtype: "https://schema.org/ListItem",
|
|
479
|
+
itemscope: ""
|
|
480
|
+
},
|
|
481
|
+
[
|
|
482
|
+
createVNode(_sfc_main$1, mergeProps(route, {
|
|
483
|
+
class: !isLast(index) ? "vv-breadcrumb__link" : "vv-breadcrumb__label",
|
|
484
|
+
"aria-current": isLast(index) ? "page" : void 0,
|
|
485
|
+
itemprop: "item",
|
|
486
|
+
"default-tag": "span"
|
|
487
|
+
}), {
|
|
488
|
+
default: withCtx(() => [
|
|
489
|
+
createCommentVNode(" @slot Slot for label "),
|
|
490
|
+
renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
|
|
491
|
+
createTextVNode(
|
|
492
|
+
toDisplayString(label),
|
|
493
|
+
1
|
|
494
|
+
/* TEXT */
|
|
495
|
+
)
|
|
496
|
+
])
|
|
497
|
+
]),
|
|
498
|
+
_: 2
|
|
499
|
+
/* DYNAMIC */
|
|
500
|
+
}, 1040, ["class", "aria-current"]),
|
|
501
|
+
createElementVNode("meta", {
|
|
502
|
+
itemprop: "position",
|
|
503
|
+
content: `${index + 1}`
|
|
504
|
+
}, null, 8, _hoisted_2)
|
|
505
|
+
],
|
|
506
|
+
2
|
|
507
|
+
/* CLASS */
|
|
508
|
+
);
|
|
281
509
|
}),
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
"aria-current": index === Number((_d = _ctx.routes) == null ? void 0 : _d.length) - 1 ? "page" : void 0,
|
|
291
|
-
itemprop: "item"
|
|
292
|
-
}), {
|
|
293
|
-
default: withCtx(() => [
|
|
294
|
-
renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
|
|
295
|
-
createTextVNode(toDisplayString(route.label), 1)
|
|
296
|
-
])
|
|
297
|
-
]),
|
|
298
|
-
_: 2
|
|
299
|
-
}, 1040, ["class", "aria-current"])),
|
|
300
|
-
createElementVNode("meta", {
|
|
301
|
-
itemprop: "position",
|
|
302
|
-
content: `${index + 1}`
|
|
303
|
-
}, null, 8, _hoisted_2)
|
|
304
|
-
], 2);
|
|
305
|
-
}), 128))
|
|
306
|
-
])
|
|
307
|
-
], 2);
|
|
510
|
+
128
|
|
511
|
+
/* KEYED_FRAGMENT */
|
|
512
|
+
))
|
|
513
|
+
])
|
|
514
|
+
],
|
|
515
|
+
2
|
|
516
|
+
/* CLASS */
|
|
517
|
+
);
|
|
308
518
|
};
|
|
309
519
|
}
|
|
310
520
|
});
|
|
@@ -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).VvBreadcrumb=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||{}),
|
|
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).VvBreadcrumb=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||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),o=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(o||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{}),l=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(l||{});const n=Symbol.for("volver"),u=Symbol.for("dropdownTrigger"),i=Symbol.for("dropdownAction"),s={to:{type:[String,Object]},href:String,target:{type:String,default:void 0,validator:e=>Object.values(l).includes(e)},rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},m={current:{type:Boolean,default:!1}},p={pressed:{type:Boolean,default:!1}},v={label:{type:[String,Number],default:void 0}},f={modifiers:{type:[String,Array],default:void 0}};r.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...v,...p,...c,...m,...s,type:{type:String,default:o.button,validator:e=>Object.values(o).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:a.button}},y={...f,routes:Array},g=b;const k=e.defineComponent({name:"VvAction",props:g,emits:["click","mouseover","mouseleave"],setup(t,{expose:r,emit:o}){const l=t,s=o,d=e.inject(n),c=e.ref(null);r({$el:c});const{reference:m,bus:p,aria:v,expanded:f}=e.inject(u,{});e.watch((()=>c.value),(e=>{m&&(m.value=e)}));const b=e.computed((()=>l.pressed||(null==f?void 0:f.value))),{role:y}=e.inject(i,{}),g=e.computed((()=>{switch(!0){case l.disabled:return a.button;case void 0!==l.to:return(null==d?void 0:d.nuxt)?a.nuxtLink:a.routerLink;case void 0!==l.href:return a.a;default:return l.defaultTag}})),k=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!b.value||void 0,ariaLabel:l.ariaLabel,role:null==y?void 0:y.value};switch(g.value){case a.a:return{...e,href:l.href,target:l.target,rel:l.rel};case a.routerLink:case a.nuxtLink:return{...e,to:l.to,target:l.target};case a.button:return{...e,type:l.type,disabled:l.disabled};default:return e}})),B=e=>{l.disabled?e.preventDefault():(null==p||p.emit("click",e),s("click",e))},_=e=>{null==p||p.emit("mouseover",e),s("mouseover",e)},h=e=>{null==p||p.emit("mouseleave",e),s("mouseleave",e)};return(t,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(g)),e.mergeProps(e.unref(k),{ref_key:"element",ref:c,class:{active:t.active,pressed:e.unref(b),disabled:t.disabled,current:t.current},onClickPassive:B,onMouseoverPassive:_,onMouseleavePassive:h}),{default:e.withCtx((()=>[e.createCommentVNode(" @slot Default slot "),e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}}),B={class:"vv-breadcrumb__list"},_=["content"];return e.defineComponent({name:"VvBreadcrumb",props:y,setup(t){const r=t,{modifiers:o}=e.toRefs(r),a=function(t,r,o){return e.computed((()=>{const a={[t]:!0},l="string"==typeof(null==r?void 0:r.value)?r.value.split(" "):null==r?void 0:r.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((r=>{a[`${t}--${r}`]=e.unref(o.value[r])})),a}))}("vv-breadcrumb",o),l=e.computed((()=>{var e;return(null==(e=r.routes)?void 0:e.length)??0})),n=e=>e===l.value-1;return(t,r)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(a)),"aria-label":"breadcrumbs"},[e.createElementVNode("ol",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.routes,(({label:r,...o},a)=>(e.openBlock(),e.createElementBlock("li",{key:`${r}-${a}`,class:e.normalizeClass(n(a)?"vv-breadcrumb__item-active":"vv-breadcrumb__item"),itemprop:"itemListElement",itemtype:"https://schema.org/ListItem",itemscope:""},[e.createVNode(k,e.mergeProps(o,{class:n(a)?"vv-breadcrumb__label":"vv-breadcrumb__link","aria-current":n(a)?"page":void 0,itemprop:"item","default-tag":"span"}),{default:e.withCtx((()=>[e.createCommentVNode(" @slot Slot for label "),e.renderSlot(t.$slots,"label",e.normalizeProps(e.guardReactiveProps({route:o,index:a})),(()=>[e.createTextVNode(e.toDisplayString(r),1)]))])),_:2},1040,["class","aria-current"]),e.createElementVNode("meta",{itemprop:"position",content:`${a+1}`},null,8,_)],2)))),128))])],2))}})}));
|
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
-
routes: globalThis.PropType<import("
|
|
3
|
-
modifiers:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
routes: globalThis.PropType<import("../..").NavItem[]>;
|
|
3
|
+
modifiers: {
|
|
4
|
+
type: globalThis.PropType<string | string[]>;
|
|
5
|
+
default: undefined;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
8
|
+
routes: globalThis.PropType<import("../..").NavItem[]>;
|
|
9
|
+
modifiers: {
|
|
10
|
+
type: globalThis.PropType<string | string[]>;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
}>>, {
|
|
14
|
+
modifiers: string | string[];
|
|
15
|
+
}, {}>, {
|
|
8
16
|
label?(_: {
|
|
9
|
-
route:
|
|
17
|
+
route: {
|
|
18
|
+
ariaLabel?: string | undefined;
|
|
19
|
+
title?: string | undefined;
|
|
20
|
+
to?: string | Record<string, unknown> | undefined;
|
|
21
|
+
href?: string | undefined;
|
|
22
|
+
target?: "_blank" | "_self" | "_parent" | "_top" | undefined;
|
|
23
|
+
rel?: string | undefined;
|
|
24
|
+
disabled?: boolean | undefined;
|
|
25
|
+
current?: boolean | undefined;
|
|
26
|
+
class?: string | string[] | undefined;
|
|
27
|
+
on?: Record<string, () => void> | undefined;
|
|
28
|
+
data?: Record<string, unknown> | undefined;
|
|
29
|
+
};
|
|
10
30
|
index: number;
|
|
11
31
|
}): any;
|
|
12
32
|
}>;
|