@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.20
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 +67 -13
- 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 +111 -37
- 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 +56 -12
- 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 +188 -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 +230 -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 +71 -16
- 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 +257 -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 +165 -137
- 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 +67 -15
- 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 +79 -24
- 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 +89 -21
- 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 +168 -66
- 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 +721 -527
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +145 -72
- package/dist/components/VvCombobox/index.d.ts +53 -22
- package/dist/components/VvDialog/VvDialog.es.js +133 -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 +61 -35
- 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 +80 -21
- 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 +21 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +1558 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +190 -0
- package/dist/components/VvInputFile/index.d.ts +74 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +266 -242
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +153 -46
- package/dist/components/VvInputText/index.d.ts +69 -18
- package/dist/components/VvNav/VvNav.es.js +150 -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.d.ts → VvNavSeparator.vue.d.ts} +1 -1
- package/dist/components/VvNav/index.d.ts +5 -13
- package/dist/components/VvNavItem/VvNavItem.es.js +435 -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 +168 -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 +244 -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 +251 -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 +225 -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/index.d.ts +10 -0
- package/dist/components/index.es.js +2635 -1301
- 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 +6 -6
- 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 +13 -0
- package/dist/stories/InputFile/InputFileModifiers.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +6 -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 +14 -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 +91 -74
- 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 +22 -48
- package/src/components/VvInputFile/VvInputFile.vue +302 -0
- package/src/components/VvInputFile/index.ts +38 -0
- package/src/components/VvInputText/VvInputText.vue +13 -14
- 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 +98 -0
- package/src/stories/InputFile/InputFileModifiers.stories.ts +51 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +25 -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 +16 -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/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
|
@@ -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 VvAvatarProps = {
|
|
@@ -276,7 +321,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
276
321
|
key: 0,
|
|
277
322
|
src: _ctx.imgSrc,
|
|
278
323
|
alt: "avatar"
|
|
279
|
-
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
324
|
+
}, null, 8, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
280
325
|
])
|
|
281
326
|
], 10, _hoisted_1);
|
|
282
327
|
};
|
|
@@ -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).VvAvatar=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||{}),
|
|
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).VvAvatar=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 a={modifiers:{type:[String,Array],default:void 0}};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button,r.button;const l={...a,imgSrc:String};const i=["role","aria-label"],u=["src"];return e.defineComponent({__name:"VvAvatar",props:l,setup(o){const t=o,{modifiers:n}=e.toRefs(t),r=function(o,t,n){return e.computed((()=>{const r={[o]:!0},a="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{r[`${o}--${t}`]=e.unref(n.value[t])})),r}))}("vv-avatar",n);return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(r)),role:o.imgSrc?void 0:"img","aria-label":o.imgSrc?void 0:"avatar"},[e.renderSlot(o.$slots,"default",{},(()=>[o.imgSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.imgSrc,alt:"avatar"},null,8,u)):e.createCommentVNode("v-if",!0)]))],10,i))}})}));
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
2
|
imgSrc: StringConstructor;
|
|
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").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
|
|
5
8
|
imgSrc: StringConstructor;
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, Fragment, renderList, createBlock, mergeProps, withCtx, toDisplayString, createTextVNode } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { uid } from "uid";
|
|
3
3
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
4
4
|
Strategy2["absolute"] = "absolute";
|
|
5
5
|
Strategy2["fixed"] = "fixed";
|
|
@@ -34,6 +34,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
34
34
|
ButtonType2["reset"] = "reset";
|
|
35
35
|
return ButtonType2;
|
|
36
36
|
})(ButtonType || {});
|
|
37
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
38
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
39
|
+
ActionTag2["routerLink"] = "router-link";
|
|
40
|
+
ActionTag2["a"] = "a";
|
|
41
|
+
ActionTag2["button"] = "button";
|
|
42
|
+
return ActionTag2;
|
|
43
|
+
})(ActionTag || {});
|
|
37
44
|
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
38
45
|
AnchorTarget2["_blank"] = "_blank";
|
|
39
46
|
AnchorTarget2["_self"] = "_self";
|
|
@@ -58,6 +65,7 @@ const LinkProps = {
|
|
|
58
65
|
*/
|
|
59
66
|
target: {
|
|
60
67
|
type: String,
|
|
68
|
+
default: void 0,
|
|
61
69
|
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
62
70
|
},
|
|
63
71
|
/**
|
|
@@ -72,38 +80,65 @@ const DisabledProps = {
|
|
|
72
80
|
/**
|
|
73
81
|
* Whether the form control is disabled
|
|
74
82
|
*/
|
|
75
|
-
disabled:
|
|
83
|
+
disabled: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false
|
|
86
|
+
}
|
|
76
87
|
};
|
|
77
88
|
const ActiveProps = {
|
|
78
89
|
/**
|
|
79
90
|
* Whether the item is active
|
|
80
91
|
*/
|
|
81
|
-
active:
|
|
92
|
+
active: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const CurrentProps = {
|
|
98
|
+
/**
|
|
99
|
+
* Whether the item is current
|
|
100
|
+
*/
|
|
101
|
+
current: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: false
|
|
104
|
+
}
|
|
82
105
|
};
|
|
83
106
|
const PressedProps = {
|
|
84
107
|
/**
|
|
85
108
|
* Whether the item is pressed
|
|
86
109
|
*/
|
|
87
|
-
pressed:
|
|
110
|
+
pressed: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: false
|
|
113
|
+
}
|
|
88
114
|
};
|
|
89
115
|
const LabelProps = {
|
|
90
116
|
/**
|
|
91
117
|
* The item label
|
|
92
118
|
*/
|
|
93
|
-
label:
|
|
119
|
+
label: {
|
|
120
|
+
type: [String, Number],
|
|
121
|
+
default: void 0
|
|
122
|
+
}
|
|
94
123
|
};
|
|
95
124
|
const ModifiersProps = {
|
|
96
125
|
/**
|
|
97
126
|
* Component BEM modifiers
|
|
98
127
|
*/
|
|
99
|
-
modifiers:
|
|
128
|
+
modifiers: {
|
|
129
|
+
type: [String, Array],
|
|
130
|
+
default: void 0
|
|
131
|
+
}
|
|
100
132
|
};
|
|
101
133
|
({
|
|
102
134
|
/**
|
|
103
135
|
* VvIcon name or props
|
|
104
136
|
* @see VVIcon
|
|
105
137
|
*/
|
|
106
|
-
icon: {
|
|
138
|
+
icon: {
|
|
139
|
+
type: [String, Object],
|
|
140
|
+
default: void 0
|
|
141
|
+
},
|
|
107
142
|
/**
|
|
108
143
|
* VvIcon position
|
|
109
144
|
*/
|
|
@@ -134,7 +169,8 @@ const ModifiersProps = {
|
|
|
134
169
|
* Dropdown show / hide transition name
|
|
135
170
|
*/
|
|
136
171
|
transitionName: {
|
|
137
|
-
type: String
|
|
172
|
+
type: String,
|
|
173
|
+
default: void 0
|
|
138
174
|
},
|
|
139
175
|
/**
|
|
140
176
|
* Offset of the dropdown from the trigger
|
|
@@ -202,7 +238,8 @@ const ModifiersProps = {
|
|
|
202
238
|
* Set dropdown width to the same as the trigger
|
|
203
239
|
*/
|
|
204
240
|
triggerWidth: {
|
|
205
|
-
type: Boolean
|
|
241
|
+
type: Boolean,
|
|
242
|
+
default: false
|
|
206
243
|
}
|
|
207
244
|
});
|
|
208
245
|
({
|
|
@@ -210,6 +247,7 @@ const ModifiersProps = {
|
|
|
210
247
|
...LabelProps,
|
|
211
248
|
...PressedProps,
|
|
212
249
|
...ActiveProps,
|
|
250
|
+
...CurrentProps,
|
|
213
251
|
...LinkProps,
|
|
214
252
|
/**
|
|
215
253
|
* Button type
|
|
@@ -225,6 +263,13 @@ const ModifiersProps = {
|
|
|
225
263
|
ariaLabel: {
|
|
226
264
|
type: String,
|
|
227
265
|
default: void 0
|
|
266
|
+
},
|
|
267
|
+
/**
|
|
268
|
+
* Default tag for the action
|
|
269
|
+
*/
|
|
270
|
+
defaultTag: {
|
|
271
|
+
type: String,
|
|
272
|
+
default: ActionTag.button
|
|
228
273
|
}
|
|
229
274
|
});
|
|
230
275
|
const VvAvatarGroupProps = {
|
|
@@ -296,13 +341,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
296
341
|
key: 0,
|
|
297
342
|
src: _ctx.imgSrc,
|
|
298
343
|
alt: "avatar"
|
|
299
|
-
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
344
|
+
}, null, 8, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
300
345
|
])
|
|
301
346
|
], 10, _hoisted_1$1);
|
|
302
347
|
};
|
|
303
348
|
}
|
|
304
349
|
});
|
|
305
|
-
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) ||
|
|
350
|
+
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
306
351
|
const _hoisted_1 = { key: 0 };
|
|
307
352
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
308
353
|
__name: "VvAvatarGroup",
|
|
@@ -335,34 +380,64 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
335
380
|
});
|
|
336
381
|
});
|
|
337
382
|
return (_ctx, _cache) => {
|
|
338
|
-
return openBlock(), createElementBlock(
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
383
|
+
return openBlock(), createElementBlock(
|
|
384
|
+
"span",
|
|
385
|
+
{
|
|
386
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
387
|
+
},
|
|
388
|
+
[
|
|
389
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
390
|
+
(openBlock(true), createElementBlock(
|
|
391
|
+
Fragment,
|
|
392
|
+
null,
|
|
393
|
+
renderList(unref(avatarItems), (avatarItem) => {
|
|
394
|
+
return openBlock(), createBlock(
|
|
395
|
+
_sfc_main$1,
|
|
396
|
+
mergeProps({
|
|
397
|
+
key: avatarItem.key
|
|
398
|
+
}, {
|
|
399
|
+
modifiers: avatarItem.modifiers,
|
|
400
|
+
imgSrc: avatarItem.imgSrc
|
|
401
|
+
}),
|
|
402
|
+
{
|
|
403
|
+
default: withCtx(() => [
|
|
404
|
+
avatarItem.text ? (openBlock(), createElementBlock(
|
|
405
|
+
"span",
|
|
406
|
+
_hoisted_1,
|
|
407
|
+
toDisplayString(avatarItem.text),
|
|
408
|
+
1
|
|
409
|
+
/* TEXT */
|
|
410
|
+
)) : createCommentVNode("v-if", true)
|
|
411
|
+
]),
|
|
412
|
+
_: 2
|
|
413
|
+
/* DYNAMIC */
|
|
414
|
+
},
|
|
415
|
+
1040
|
|
416
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
417
|
+
);
|
|
418
|
+
}),
|
|
419
|
+
128
|
|
420
|
+
/* KEYED_FRAGMENT */
|
|
421
|
+
)),
|
|
422
|
+
(unref(totalItems) || unref(items).length) > unref(toShow) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
423
|
+
key: 0,
|
|
424
|
+
modifiers: `${unref(stringModifiers)} surface bordered`
|
|
345
425
|
}, {
|
|
346
|
-
modifiers: avatarItem.modifiers,
|
|
347
|
-
imgSrc: avatarItem.imgSrc
|
|
348
|
-
}), {
|
|
349
426
|
default: withCtx(() => [
|
|
350
|
-
|
|
427
|
+
createTextVNode(
|
|
428
|
+
toDisplayString(`+${(unref(totalItems) || unref(items).length) - unref(toShow)}`),
|
|
429
|
+
1
|
|
430
|
+
/* TEXT */
|
|
431
|
+
)
|
|
351
432
|
]),
|
|
352
|
-
_:
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
createTextVNode(toDisplayString(`+${(unref(totalItems) || unref(items).length) - unref(toShow)}`), 1)
|
|
361
|
-
]),
|
|
362
|
-
_: 1
|
|
363
|
-
}, 8, ["modifiers"])) : createCommentVNode("", true)
|
|
364
|
-
])
|
|
365
|
-
], 2);
|
|
433
|
+
_: 1
|
|
434
|
+
/* STABLE */
|
|
435
|
+
}, 8, ["modifiers"])) : createCommentVNode("v-if", true)
|
|
436
|
+
])
|
|
437
|
+
],
|
|
438
|
+
2
|
|
439
|
+
/* CLASS */
|
|
440
|
+
);
|
|
366
441
|
};
|
|
367
442
|
}
|
|
368
443
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("uid")):"function"==typeof define&&define.amd?define(["vue","uid"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAvatarGroup=o(e.vue,e.uid)}(this,(function(e,o){"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||{}),a=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(a||{}),l=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(l||{});Boolean,Boolean,Boolean,Boolean;const n={modifiers:{type:[String,Array],default:void 0}};r.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,a.button,l.button;const i={...n,items:{type:Array,default:()=>[],required:!0},toShow:{type:Number,default:3},totalItems:{type:Number},avatarModifiers:[String,Array]},u={...n,imgSrc:String};function s(o,t,r){return e.computed((()=>{const a={[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&&(a[`${o}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((t=>{a[`${o}--${t}`]=e.unref(r.value[t])})),a}))}const d=["role","aria-label"],f=["src"],m=e.defineComponent({__name:"VvAvatar",props:u,setup(o){const t=o,{modifiers:r}=e.toRefs(t),a=s("vv-avatar",r);return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a)),role:o.imgSrc?void 0:"img","aria-label":o.imgSrc?void 0:"avatar"},[e.renderSlot(o.$slots,"default",{},(()=>[o.imgSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.imgSrc,alt:"avatar"},null,8,f)):e.createCommentVNode("v-if",!0)]))],10,d))}}),c={key:0};return e.defineComponent({__name:"VvAvatarGroup",props:i,setup(t){const r=t,{modifiers:a,items:l,toShow:n,totalItems:i,avatarModifiers:u}=e.toRefs(r),d=s("vv-avatar-group",a),f=e.computed((()=>(null==u?void 0:u.value)&&Array.isArray(null==u?void 0:u.value)?u.value.join(" "):(null==u?void 0:u.value)||"")),v=e.computed((()=>l.value.slice(0,n.value).map((t=>{let r=[],a=[];return(null==u?void 0:u.value)&&(r=Array.isArray(null==u?void 0:u.value)?null==u?void 0:u.value:[null==u?void 0:u.value]),t.modifiers&&(a=Array.isArray(t.modifiers)?t.modifiers:[t.modifiers]),{...t,key:t.key||e.computed((()=>String((null==l?void 0:l.value)||o.uid()))).value,modifiers:[...r,...a]};var l}))));return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(d))},[e.renderSlot(o.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(o=>(e.openBlock(),e.createBlock(m,e.mergeProps({key:o.key},{modifiers:o.modifiers,imgSrc:o.imgSrc}),{default:e.withCtx((()=>[o.text?(e.openBlock(),e.createElementBlock("span",c,e.toDisplayString(o.text),1)):e.createCommentVNode("v-if",!0)])),_:2},1040)))),128)),(e.unref(i)||e.unref(l).length)>e.unref(n)?(e.openBlock(),e.createBlock(m,{key:0,modifiers:`${e.unref(f)} surface bordered`},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString("+"+((e.unref(i)||e.unref(l).length)-e.unref(n))),1)])),_:1},8,["modifiers"])):e.createCommentVNode("v-if",!0)]))],2))}})}));
|
|
@@ -12,8 +12,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
12
12
|
type: NumberConstructor;
|
|
13
13
|
};
|
|
14
14
|
avatarModifiers: globalThis.PropType<string | string[]>;
|
|
15
|
-
modifiers:
|
|
16
|
-
|
|
15
|
+
modifiers: {
|
|
16
|
+
type: globalThis.PropType<string | string[]>;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
|
|
17
20
|
items: {
|
|
18
21
|
type: globalThis.PropType<import("@/components/VvAvatarGroup").AvatarItem[]>;
|
|
19
22
|
default: () => never[];
|
|
@@ -27,8 +30,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
27
30
|
type: NumberConstructor;
|
|
28
31
|
};
|
|
29
32
|
avatarModifiers: globalThis.PropType<string | string[]>;
|
|
30
|
-
modifiers:
|
|
33
|
+
modifiers: {
|
|
34
|
+
type: globalThis.PropType<string | string[]>;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
31
37
|
}>>, {
|
|
38
|
+
modifiers: string | string[];
|
|
32
39
|
items: import("@/components/VvAvatarGroup").AvatarItem[];
|
|
33
40
|
toShow: number;
|
|
34
41
|
}, {}>, {
|
|
@@ -21,5 +21,8 @@ export declare const VvAvatarGroupProps: {
|
|
|
21
21
|
type: NumberConstructor;
|
|
22
22
|
};
|
|
23
23
|
avatarModifiers: globalThis.PropType<string | string[]>;
|
|
24
|
-
modifiers:
|
|
24
|
+
modifiers: {
|
|
25
|
+
type: globalThis.PropType<string | string[]>;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
25
28
|
};
|
|
@@ -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,24 @@ 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
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
320
|
+
createTextVNode(
|
|
321
|
+
toDisplayString(_ctx.value),
|
|
322
|
+
1
|
|
323
|
+
/* TEXT */
|
|
324
|
+
)
|
|
325
|
+
])
|
|
326
|
+
],
|
|
327
|
+
2
|
|
328
|
+
/* CLASS */
|
|
329
|
+
);
|
|
275
330
|
};
|
|
276
331
|
}
|
|
277
332
|
});
|
|
@@ -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.renderSlot(o.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(o.value),1)]))],2))}})}));
|