@volverjs/ui-vue 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/icons.js +1 -93
- package/dist/components/VvAccordion/VvAccordion.es.js +1 -366
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +2 -702
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +3 -2
- package/dist/components/VvAction/VvAction.es.js +1 -302
- package/dist/components/VvAction/VvAction.vue.d.ts +2 -1
- package/dist/components/VvAlert/VvAlert.es.js +1 -527
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +2 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +1 -730
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +2 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +1 -132
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +1 -250
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -1
- package/dist/components/VvBadge/VvBadge.es.js +1 -131
- package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +1 -410
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +2 -1
- package/dist/components/VvButton/VvButton.es.js +1 -882
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +2 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -214
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -1
- package/dist/components/VvCard/VvCard.es.js +1 -152
- package/dist/components/VvCard/VvCard.vue.d.ts +2 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +1 -741
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -2
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +1 -981
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +1 -3463
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +263 -317
- package/dist/components/VvDialog/VvDialog.es.js +1 -317
- package/dist/components/VvDialog/VvDialog.vue.d.ts +2 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +1 -750
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -1
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +5 -4
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +10 -2
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +1 -448
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +1 -149
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +1 -104
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +1 -281
- package/dist/components/VvIcon/VvIcon.es.js +1 -143
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +1 -1704
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +2 -1
- package/dist/components/VvInputText/VvInputText.es.js +4 -2790
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +2 -1
- package/dist/components/VvNav/VvNav.es.js +1 -438
- package/dist/components/VvNav/VvNav.vue.d.ts +2 -1
- package/dist/components/VvNav/VvNavItem.vue.d.ts +2 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +1 -337
- package/dist/components/VvNavSeparator/VvNavSeparator.es.js +1 -24
- package/dist/components/VvProgress/VvProgress.es.js +1 -163
- package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -1
- package/dist/components/VvRadio/VvRadio.es.js +1 -661
- package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -2
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +1 -901
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -1
- package/dist/components/VvSelect/VvSelect.es.js +1 -1103
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +130 -71
- package/dist/components/VvTab/VvTab.es.js +1 -558
- package/dist/components/VvTab/VvTab.vue.d.ts +2 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +2 -1989
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +2 -1
- package/dist/components/VvTooltip/VvTooltip.es.js +1 -154
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -1
- package/dist/components/index.es.js +6 -8558
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/index.es.js +2 -247
- package/dist/composables/index.umd.js +1 -1
- package/dist/directives/index.es.js +2 -311
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +2 -142
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +1 -172
- package/dist/icons.es.js +1 -39
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +1 -219
- package/dist/resolvers/unplugin.es.js +1 -187
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +14 -14
- package/package.json +37 -37
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
2
2
|
before?: (props: {}) => any;
|
|
3
3
|
} & {
|
|
4
4
|
default?: (props: {}) => any;
|
|
5
5
|
} & {
|
|
6
6
|
after?: (props: {}) => any;
|
|
7
7
|
}>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
8
9
|
export default _default;
|
|
9
10
|
type __VLS_WithSlots<T, S> = T & {
|
|
10
11
|
new (): {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -1,337 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
3
|
-
StorageType2["local"] = "local";
|
|
4
|
-
StorageType2["session"] = "session";
|
|
5
|
-
return StorageType2;
|
|
6
|
-
})(StorageType || {});
|
|
7
|
-
var Side = /* @__PURE__ */ ((Side2) => {
|
|
8
|
-
Side2["left"] = "left";
|
|
9
|
-
Side2["right"] = "right";
|
|
10
|
-
Side2["top"] = "top";
|
|
11
|
-
Side2["bottom"] = "bottom";
|
|
12
|
-
return Side2;
|
|
13
|
-
})(Side || {});
|
|
14
|
-
var Position = /* @__PURE__ */ ((Position2) => {
|
|
15
|
-
Position2["before"] = "before";
|
|
16
|
-
Position2["after"] = "after";
|
|
17
|
-
return Position2;
|
|
18
|
-
})(Position || {});
|
|
19
|
-
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
20
|
-
ButtonType2["button"] = "button";
|
|
21
|
-
ButtonType2["submit"] = "submit";
|
|
22
|
-
ButtonType2["reset"] = "reset";
|
|
23
|
-
return ButtonType2;
|
|
24
|
-
})(ButtonType || {});
|
|
25
|
-
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
26
|
-
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
27
|
-
ActionTag2["routerLink"] = "router-link";
|
|
28
|
-
ActionTag2["a"] = "a";
|
|
29
|
-
ActionTag2["button"] = "button";
|
|
30
|
-
return ActionTag2;
|
|
31
|
-
})(ActionTag || {});
|
|
32
|
-
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
33
|
-
const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
|
|
34
|
-
"dropdownTrigger"
|
|
35
|
-
);
|
|
36
|
-
const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
|
|
37
|
-
"dropdownAction"
|
|
38
|
-
);
|
|
39
|
-
const LinkProps = {
|
|
40
|
-
/**
|
|
41
|
-
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
42
|
-
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
43
|
-
*/
|
|
44
|
-
to: {
|
|
45
|
-
type: [String, Object]
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* Anchor href
|
|
49
|
-
*/
|
|
50
|
-
href: String,
|
|
51
|
-
/**
|
|
52
|
-
* Anchor target
|
|
53
|
-
*/
|
|
54
|
-
target: String,
|
|
55
|
-
/**
|
|
56
|
-
* Anchor rel
|
|
57
|
-
*/
|
|
58
|
-
rel: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: "noopener noreferrer"
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
const DisabledProps = {
|
|
64
|
-
/**
|
|
65
|
-
* Whether the form control is disabled
|
|
66
|
-
*/
|
|
67
|
-
disabled: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: false
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
const ActiveProps = {
|
|
73
|
-
/**
|
|
74
|
-
* Whether the item is active
|
|
75
|
-
*/
|
|
76
|
-
active: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
default: false
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const CurrentProps = {
|
|
82
|
-
/**
|
|
83
|
-
* Whether the item is current
|
|
84
|
-
*/
|
|
85
|
-
current: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: false
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
const PressedProps = {
|
|
91
|
-
/**
|
|
92
|
-
* Whether the item is pressed
|
|
93
|
-
*/
|
|
94
|
-
pressed: {
|
|
95
|
-
type: Boolean,
|
|
96
|
-
default: false
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
const LabelProps = {
|
|
100
|
-
/**
|
|
101
|
-
* The item label
|
|
102
|
-
*/
|
|
103
|
-
label: {
|
|
104
|
-
type: [String, Number],
|
|
105
|
-
default: void 0
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
({
|
|
109
|
-
/**
|
|
110
|
-
* VvIcon position
|
|
111
|
-
*/
|
|
112
|
-
iconPosition: {
|
|
113
|
-
default: Position.before
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
({
|
|
117
|
-
/**
|
|
118
|
-
* Dropdown placement
|
|
119
|
-
*/
|
|
120
|
-
placement: {
|
|
121
|
-
default: Side.bottom
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
const ActionProps = {
|
|
125
|
-
...DisabledProps,
|
|
126
|
-
...LabelProps,
|
|
127
|
-
...PressedProps,
|
|
128
|
-
...ActiveProps,
|
|
129
|
-
...CurrentProps,
|
|
130
|
-
...LinkProps,
|
|
131
|
-
/**
|
|
132
|
-
* Button type
|
|
133
|
-
*/
|
|
134
|
-
type: {
|
|
135
|
-
type: String,
|
|
136
|
-
default: ButtonType.button,
|
|
137
|
-
validator: (value) => Object.values(ButtonType).includes(value)
|
|
138
|
-
},
|
|
139
|
-
/**
|
|
140
|
-
* Button aria-label
|
|
141
|
-
*/
|
|
142
|
-
ariaLabel: {
|
|
143
|
-
type: String,
|
|
144
|
-
default: void 0
|
|
145
|
-
},
|
|
146
|
-
/**
|
|
147
|
-
* Default tag for the action
|
|
148
|
-
*/
|
|
149
|
-
defaultTag: {
|
|
150
|
-
type: String,
|
|
151
|
-
default: ActionTag.button
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
({
|
|
155
|
-
storageType: {
|
|
156
|
-
default: StorageType.local
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
const VvActionEvents = ["click", "mouseover", "mouseleave"];
|
|
160
|
-
const VvActionProps = ActionProps;
|
|
161
|
-
function useVolver() {
|
|
162
|
-
return inject(INJECTION_KEY_VOLVER, void 0);
|
|
163
|
-
}
|
|
164
|
-
function useInjectedDropdownTrigger() {
|
|
165
|
-
return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
|
|
166
|
-
}
|
|
167
|
-
function useInjectedDropdownAction() {
|
|
168
|
-
return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
|
|
169
|
-
}
|
|
170
|
-
const __default__$1 = {
|
|
171
|
-
name: "VvAction"
|
|
172
|
-
};
|
|
173
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
174
|
-
...__default__$1,
|
|
175
|
-
props: VvActionProps,
|
|
176
|
-
emits: VvActionEvents,
|
|
177
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
178
|
-
const props = __props;
|
|
179
|
-
const emit = __emit;
|
|
180
|
-
const instance = getCurrentInstance();
|
|
181
|
-
const volver = useVolver();
|
|
182
|
-
const element = ref(null);
|
|
183
|
-
__expose({ $el: element });
|
|
184
|
-
const {
|
|
185
|
-
reference: dropdownTriggerReference,
|
|
186
|
-
bus: dropdownEventBus,
|
|
187
|
-
aria: dropdownAria,
|
|
188
|
-
expanded: dropdownExpanded
|
|
189
|
-
} = useInjectedDropdownTrigger();
|
|
190
|
-
watch(
|
|
191
|
-
() => element.value,
|
|
192
|
-
(newValue) => {
|
|
193
|
-
if (dropdownTriggerReference) {
|
|
194
|
-
dropdownTriggerReference.value = newValue;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
const pressed = computed(() => {
|
|
199
|
-
return props.pressed || dropdownExpanded?.value;
|
|
200
|
-
});
|
|
201
|
-
const { role } = useInjectedDropdownAction();
|
|
202
|
-
const hasTag = computed(() => {
|
|
203
|
-
switch (true) {
|
|
204
|
-
case props.disabled:
|
|
205
|
-
return ActionTag.button;
|
|
206
|
-
case props.to !== void 0:
|
|
207
|
-
return volver?.nuxt ? resolveComponent(ActionTag.nuxtLink) : ActionTag.routerLink;
|
|
208
|
-
case props.href !== void 0:
|
|
209
|
-
return ActionTag.a;
|
|
210
|
-
default:
|
|
211
|
-
return props.defaultTag;
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
const hasProps = computed(() => {
|
|
215
|
-
const toReturn = {
|
|
216
|
-
...dropdownAria?.value,
|
|
217
|
-
ariaPressed: pressed.value ? true : void 0,
|
|
218
|
-
ariaLabel: props.ariaLabel,
|
|
219
|
-
role: role?.value
|
|
220
|
-
};
|
|
221
|
-
switch (hasTag.value) {
|
|
222
|
-
case ActionTag.a:
|
|
223
|
-
return {
|
|
224
|
-
...toReturn,
|
|
225
|
-
href: props.href,
|
|
226
|
-
target: props.target,
|
|
227
|
-
rel: props.rel
|
|
228
|
-
};
|
|
229
|
-
case ActionTag.routerLink:
|
|
230
|
-
case ActionTag.nuxtLink:
|
|
231
|
-
return {
|
|
232
|
-
...toReturn,
|
|
233
|
-
to: props.to,
|
|
234
|
-
target: props.target
|
|
235
|
-
};
|
|
236
|
-
case ActionTag.button:
|
|
237
|
-
return {
|
|
238
|
-
...toReturn,
|
|
239
|
-
type: props.type,
|
|
240
|
-
disabled: props.disabled
|
|
241
|
-
};
|
|
242
|
-
default:
|
|
243
|
-
return toReturn;
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
function onClick(e) {
|
|
247
|
-
if (props.disabled) {
|
|
248
|
-
e.preventDefault();
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
if (instance?.vnode.props?.onClick) {
|
|
252
|
-
emit("click", e);
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
dropdownEventBus?.emit("click", e);
|
|
256
|
-
}
|
|
257
|
-
function onMouseover(e) {
|
|
258
|
-
if (instance?.vnode.props?.onMouseover) {
|
|
259
|
-
emit("mouseover", e);
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
dropdownEventBus?.emit("mouseover", e);
|
|
263
|
-
}
|
|
264
|
-
function onMouseleave(e) {
|
|
265
|
-
if (instance?.vnode.props?.onMouseleave) {
|
|
266
|
-
emit("mouseleave", e);
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
dropdownEventBus?.emit("mouseleave", e);
|
|
270
|
-
}
|
|
271
|
-
return (_ctx, _cache) => {
|
|
272
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
|
|
273
|
-
ref_key: "element",
|
|
274
|
-
ref: element,
|
|
275
|
-
class: {
|
|
276
|
-
active: _ctx.active,
|
|
277
|
-
pressed: unref(pressed),
|
|
278
|
-
disabled: _ctx.disabled,
|
|
279
|
-
current: _ctx.current
|
|
280
|
-
},
|
|
281
|
-
onClickPassive: onClick,
|
|
282
|
-
onMouseoverPassive: onMouseover,
|
|
283
|
-
onMouseleavePassive: onMouseleave
|
|
284
|
-
}), {
|
|
285
|
-
default: withCtx(() => [
|
|
286
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
287
|
-
createTextVNode(
|
|
288
|
-
toDisplayString(_ctx.label),
|
|
289
|
-
1
|
|
290
|
-
/* TEXT */
|
|
291
|
-
)
|
|
292
|
-
])
|
|
293
|
-
]),
|
|
294
|
-
_: 3
|
|
295
|
-
/* FORWARDED */
|
|
296
|
-
}, 16, ["class"]);
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
const _hoisted_1 = {
|
|
301
|
-
class: "vv-nav__item",
|
|
302
|
-
role: "presentation"
|
|
303
|
-
};
|
|
304
|
-
const __default__ = {
|
|
305
|
-
name: "VvNavItem",
|
|
306
|
-
inheritAttrs: false
|
|
307
|
-
};
|
|
308
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
309
|
-
...__default__,
|
|
310
|
-
setup(__props) {
|
|
311
|
-
return (_ctx, _cache) => {
|
|
312
|
-
return openBlock(), createElementBlock("li", _hoisted_1, [
|
|
313
|
-
renderSlot(_ctx.$slots, "before"),
|
|
314
|
-
createVNode(
|
|
315
|
-
_sfc_main$1,
|
|
316
|
-
mergeProps(_ctx.$attrs, {
|
|
317
|
-
class: "vv-nav__item-label",
|
|
318
|
-
role: "menuitem"
|
|
319
|
-
}),
|
|
320
|
-
{
|
|
321
|
-
default: withCtx(() => [
|
|
322
|
-
renderSlot(_ctx.$slots, "default")
|
|
323
|
-
]),
|
|
324
|
-
_: 3
|
|
325
|
-
/* FORWARDED */
|
|
326
|
-
},
|
|
327
|
-
16
|
|
328
|
-
/* FULL_PROPS */
|
|
329
|
-
),
|
|
330
|
-
renderSlot(_ctx.$slots, "after")
|
|
331
|
-
]);
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
export {
|
|
336
|
-
_sfc_main as default
|
|
337
|
-
};
|
|
1
|
+
import{inject as e,defineComponent as t,getCurrentInstance as o,ref as r,watch as a,computed as l,resolveComponent as n,createBlock as s,openBlock as u,resolveDynamicComponent as i,unref as d,mergeProps as v,withCtx as c,renderSlot as f,createTextVNode as b,toDisplayString as p,createElementBlock as m,createVNode as g}from"vue";var y=/* @__PURE__ */(e=>(e.local="local",e.session="session",e))(y||{}),k=/* @__PURE__ */(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(k||{}),S=/* @__PURE__ */(e=>(e.before="before",e.after="after",e))(S||{}),h=/* @__PURE__ */(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(h||{}),L=/* @__PURE__ */(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(L||{});const x=Symbol.for("volver"),_=Symbol.for("dropdownTrigger"),$=Symbol.for("dropdownAction"),w={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},B={disabled:{type:Boolean,default:!1}},M={active:{type:Boolean,default:!1}},P={current:{type:Boolean,default:!1}},A={pressed:{type:Boolean,default:!1}},T={label:{type:[String,Number],default:void 0}};S.before,k.bottom;const j={...B,...T,...A,...M,...P,...w,type:{type:String,default:h.button,validator:e=>Object.values(h).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:L.button}};y.local;const C=/* @__PURE__ */t({name:"VvAction",props:j,emits:["click","mouseover","mouseleave"],setup(t,{expose:m,emit:g}){const y=t,k=g,S=o(),h=e(x,void 0),w=r(null);m({$el:w});const{reference:B,bus:M,aria:P,expanded:A}=e(_,{});a(()=>w.value,e=>{B&&(B.value=e)});const T=l(()=>y.pressed||A?.value),{role:j}=e($,{}),C=l(()=>{switch(!0){case y.disabled:return L.button;case void 0!==y.to:return h?.nuxt?n(L.nuxtLink):L.routerLink;case void 0!==y.href:return L.a;default:return y.defaultTag}}),N=l(()=>{const e={...P?.value,ariaPressed:!!T.value||void 0,ariaLabel:y.ariaLabel,role:j?.value};switch(C.value){case L.a:return{...e,href:y.href,target:y.target,rel:y.rel};case L.routerLink:case L.nuxtLink:return{...e,to:y.to,target:y.target};case L.button:return{...e,type:y.type,disabled:y.disabled};default:return e}});function O(e){y.disabled?e.preventDefault():S?.vnode.props?.onClick?k("click",e):M?.emit("click",e)}function V(e){S?.vnode.props?.onMouseover?k("mouseover",e):M?.emit("mouseover",e)}function D(e){S?.vnode.props?.onMouseleave?k("mouseleave",e):M?.emit("mouseleave",e)}return(e,t)=>(u(),s(i(d(C)),v(d(N),{ref_key:"element",ref:w,class:{active:e.active,pressed:d(T),disabled:e.disabled,current:e.current},onClickPassive:O,onMouseoverPassive:V,onMouseleavePassive:D}),{default:c(()=>[f(e.$slots,"default",{},()=>[b(p(e.label),1)])]),_:3},16,["class"]))}}),N={class:"vv-nav__item",role:"presentation"},O=/* @__PURE__ */t({name:"VvNavItem",inheritAttrs:!1,setup:e=>(e,t)=>(u(),m("li",N,[f(e.$slots,"before"),g(C,v(e.$attrs,{class:"vv-nav__item-label",role:"menuitem"}),{default:c(()=>[f(e.$slots,"default")]),_:3},16),f(e.$slots,"after")]))});export{O as default};
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
const _sfc_main = {
|
|
3
|
-
name: "VvNavSeparator"
|
|
4
|
-
};
|
|
5
|
-
const _export_sfc = (sfc, props) => {
|
|
6
|
-
const target = sfc.__vccOpts || sfc;
|
|
7
|
-
for (const [key, val] of props) {
|
|
8
|
-
target[key] = val;
|
|
9
|
-
}
|
|
10
|
-
return target;
|
|
11
|
-
};
|
|
12
|
-
const _hoisted_1 = {
|
|
13
|
-
class: "vv-nav__separator",
|
|
14
|
-
role: "separator"
|
|
15
|
-
};
|
|
16
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
17
|
-
return openBlock(), createElementBlock("li", _hoisted_1, [
|
|
18
|
-
renderSlot(_ctx.$slots, "default")
|
|
19
|
-
]);
|
|
20
|
-
}
|
|
21
|
-
const VvNavSeparator = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
22
|
-
export {
|
|
23
|
-
VvNavSeparator as default
|
|
24
|
-
};
|
|
1
|
+
import{createElementBlock as r,openBlock as t,renderSlot as o}from"vue";const a={class:"vv-nav__separator",role:"separator"};const e=/* @__PURE__ */((r,t)=>{const o=r.__vccOpts||r;for(const[a,e]of t)o[a]=e;return o})({name:"VvNavSeparator"},[["render",function(e,s,n,c,v,f){return t(),r("li",a,[o(e.$slots,"default")])}]]);export{e as default};
|
|
@@ -1,163 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
3
|
-
StorageType2["local"] = "local";
|
|
4
|
-
StorageType2["session"] = "session";
|
|
5
|
-
return StorageType2;
|
|
6
|
-
})(StorageType || {});
|
|
7
|
-
var Side = /* @__PURE__ */ ((Side2) => {
|
|
8
|
-
Side2["left"] = "left";
|
|
9
|
-
Side2["right"] = "right";
|
|
10
|
-
Side2["top"] = "top";
|
|
11
|
-
Side2["bottom"] = "bottom";
|
|
12
|
-
return Side2;
|
|
13
|
-
})(Side || {});
|
|
14
|
-
var Position = /* @__PURE__ */ ((Position2) => {
|
|
15
|
-
Position2["before"] = "before";
|
|
16
|
-
Position2["after"] = "after";
|
|
17
|
-
return Position2;
|
|
18
|
-
})(Position || {});
|
|
19
|
-
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
20
|
-
ButtonType2["button"] = "button";
|
|
21
|
-
ButtonType2["submit"] = "submit";
|
|
22
|
-
ButtonType2["reset"] = "reset";
|
|
23
|
-
return ButtonType2;
|
|
24
|
-
})(ButtonType || {});
|
|
25
|
-
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
26
|
-
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
27
|
-
ActionTag2["routerLink"] = "router-link";
|
|
28
|
-
ActionTag2["a"] = "a";
|
|
29
|
-
ActionTag2["button"] = "button";
|
|
30
|
-
return ActionTag2;
|
|
31
|
-
})(ActionTag || {});
|
|
32
|
-
const ModifiersProps = {
|
|
33
|
-
/**
|
|
34
|
-
* Component BEM modifiers
|
|
35
|
-
*/
|
|
36
|
-
modifiers: {
|
|
37
|
-
type: [String, Array],
|
|
38
|
-
default: void 0
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
({
|
|
42
|
-
/**
|
|
43
|
-
* VvIcon position
|
|
44
|
-
*/
|
|
45
|
-
iconPosition: {
|
|
46
|
-
default: Position.before
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
({
|
|
50
|
-
/**
|
|
51
|
-
* Dropdown placement
|
|
52
|
-
*/
|
|
53
|
-
placement: {
|
|
54
|
-
default: Side.bottom
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
({
|
|
58
|
-
/**
|
|
59
|
-
* Button type
|
|
60
|
-
*/
|
|
61
|
-
type: {
|
|
62
|
-
default: ButtonType.button
|
|
63
|
-
},
|
|
64
|
-
/**
|
|
65
|
-
* Default tag for the action
|
|
66
|
-
*/
|
|
67
|
-
defaultTag: {
|
|
68
|
-
default: ActionTag.button
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
({
|
|
72
|
-
storageType: {
|
|
73
|
-
default: StorageType.local
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const VvProgressProps = {
|
|
77
|
-
...ModifiersProps,
|
|
78
|
-
/**
|
|
79
|
-
* Progress value
|
|
80
|
-
* This attribute specifies how much of the task that has been completed.
|
|
81
|
-
* It must be a valid floating point number between 0 and max, or between 0 and 1 if max is omitted.
|
|
82
|
-
* If there is no value attribute, the progress bar is indeterminate.
|
|
83
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#attr-max
|
|
84
|
-
*/
|
|
85
|
-
value: {
|
|
86
|
-
type: [Number, String],
|
|
87
|
-
default: void 0
|
|
88
|
-
},
|
|
89
|
-
/**
|
|
90
|
-
* Progress max
|
|
91
|
-
* This attribute describes how much work the task indicated by the progress element requires.
|
|
92
|
-
* The max attribute, if present, must have a value greater than 0 and be a valid floating point number. The default value is 1.
|
|
93
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#attr-max
|
|
94
|
-
*/
|
|
95
|
-
max: {
|
|
96
|
-
type: [Number, String]
|
|
97
|
-
},
|
|
98
|
-
/**
|
|
99
|
-
* Progress aria-label
|
|
100
|
-
*/
|
|
101
|
-
label: {
|
|
102
|
-
type: String,
|
|
103
|
-
required: true
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
function useModifiers(prefix, modifiers, others) {
|
|
107
|
-
return computed(() => {
|
|
108
|
-
const toReturn = {
|
|
109
|
-
[prefix]: true
|
|
110
|
-
};
|
|
111
|
-
const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
|
|
112
|
-
if (modifiersArray) {
|
|
113
|
-
if (Array.isArray(modifiersArray)) {
|
|
114
|
-
modifiersArray.forEach((modifier) => {
|
|
115
|
-
if (modifier) {
|
|
116
|
-
toReturn[`${prefix}--${modifier}`] = true;
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
if (others) {
|
|
122
|
-
Object.keys(others.value).forEach((key) => {
|
|
123
|
-
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
return toReturn;
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
const __default__ = {
|
|
130
|
-
name: "VvProgress"
|
|
131
|
-
};
|
|
132
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
133
|
-
...__default__,
|
|
134
|
-
props: VvProgressProps,
|
|
135
|
-
setup(__props) {
|
|
136
|
-
const props = __props;
|
|
137
|
-
const { value, max, label: ariaLabel } = toRefs(props);
|
|
138
|
-
const indeterminate = computed(() => props.value === void 0);
|
|
139
|
-
const { modifiers } = toRefs(props);
|
|
140
|
-
const bemCssClasses = useModifiers(
|
|
141
|
-
"vv-progress",
|
|
142
|
-
modifiers,
|
|
143
|
-
computed(() => ({ indeterminate: indeterminate.value }))
|
|
144
|
-
);
|
|
145
|
-
return (_ctx, _cache) => {
|
|
146
|
-
return openBlock(), createElementBlock(
|
|
147
|
-
"progress",
|
|
148
|
-
normalizeProps(guardReactiveProps({
|
|
149
|
-
class: unref(bemCssClasses),
|
|
150
|
-
ariaLabel: unref(ariaLabel),
|
|
151
|
-
max: unref(max),
|
|
152
|
-
value: unref(value)
|
|
153
|
-
})),
|
|
154
|
-
null,
|
|
155
|
-
16
|
|
156
|
-
/* FULL_PROPS */
|
|
157
|
-
);
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
export {
|
|
162
|
-
_sfc_main as default
|
|
163
|
-
};
|
|
1
|
+
import{computed as t,unref as e,defineComponent as r,toRefs as o,createElementBlock as a,openBlock as u,normalizeProps as l,guardReactiveProps as n}from"vue";var s=/* @__PURE__ */(t=>(t.local="local",t.session="session",t))(s||{}),i=/* @__PURE__ */(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(i||{}),b=/* @__PURE__ */(t=>(t.before="before",t.after="after",t))(b||{}),v=/* @__PURE__ */(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(v||{}),f=/* @__PURE__ */(t=>(t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t))(f||{});const m={modifiers:{type:[String,Array],default:void 0}};b.before,i.bottom,v.button,f.button,s.local;const p=/* @__PURE__ */r({name:"VvProgress",props:{...m,value:{type:[Number,String],default:void 0},max:{type:[Number,String]},label:{type:String,required:!0}},setup(r){const s=r,{value:i,max:b,label:v}=o(s),f=t(()=>void 0===s.value),{modifiers:m}=o(s),p=function(r,o,a){return t(()=>{const t={[r]:!0},u="string"==typeof o?.value?o.value.split(" "):o?.value;return u&&Array.isArray(u)&&u.forEach(e=>{e&&(t[`${r}--${e}`]=!0)}),a&&Object.keys(a.value).forEach(o=>{t[`${r}--${o}`]=e(a.value[o])}),t})}("vv-progress",m,t(()=>({indeterminate:f.value})));return(t,r)=>(u(),a("progress",l(n({class:e(p),ariaLabel:e(v),max:e(b),value:e(i)})),null,16))}});export{p as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
value: {
|
|
3
3
|
type: (StringConstructor | NumberConstructor)[];
|
|
4
4
|
default: undefined;
|
|
@@ -34,4 +34,5 @@ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropType
|
|
|
34
34
|
value: string | number;
|
|
35
35
|
modifiers: string | string[];
|
|
36
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
37
38
|
export default _default;
|