@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
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import { inject, defineComponent, ref, watch, computed, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, withCtx, createCommentVNode, renderSlot, createTextVNode, toDisplayString, createElementBlock, createVNode } from "vue";
|
|
2
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
3
|
+
Strategy2["absolute"] = "absolute";
|
|
4
|
+
Strategy2["fixed"] = "fixed";
|
|
5
|
+
return Strategy2;
|
|
6
|
+
})(Strategy || {});
|
|
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 Placement = /* @__PURE__ */ ((Placement2) => {
|
|
15
|
+
Placement2["topStart"] = "top-start";
|
|
16
|
+
Placement2["topEnd"] = "top-end";
|
|
17
|
+
Placement2["bottomStart"] = "bottom-start";
|
|
18
|
+
Placement2["bottomEnd"] = "bottom-end";
|
|
19
|
+
Placement2["leftStart"] = "left-start";
|
|
20
|
+
Placement2["leftEnd"] = "left-end";
|
|
21
|
+
Placement2["rightStart"] = "right-start";
|
|
22
|
+
Placement2["rightEnd"] = "right-end";
|
|
23
|
+
return Placement2;
|
|
24
|
+
})(Placement || {});
|
|
25
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
26
|
+
Position2["before"] = "before";
|
|
27
|
+
Position2["after"] = "after";
|
|
28
|
+
return Position2;
|
|
29
|
+
})(Position || {});
|
|
30
|
+
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
31
|
+
ButtonType2["button"] = "button";
|
|
32
|
+
ButtonType2["submit"] = "submit";
|
|
33
|
+
ButtonType2["reset"] = "reset";
|
|
34
|
+
return ButtonType2;
|
|
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 || {});
|
|
43
|
+
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
44
|
+
AnchorTarget2["_blank"] = "_blank";
|
|
45
|
+
AnchorTarget2["_self"] = "_self";
|
|
46
|
+
AnchorTarget2["_parent"] = "_parent";
|
|
47
|
+
AnchorTarget2["_top"] = "_top";
|
|
48
|
+
return AnchorTarget2;
|
|
49
|
+
})(AnchorTarget || {});
|
|
50
|
+
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
51
|
+
const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
|
|
52
|
+
"dropdownTrigger"
|
|
53
|
+
);
|
|
54
|
+
const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
|
|
55
|
+
"dropdownAction"
|
|
56
|
+
);
|
|
57
|
+
const LinkProps = {
|
|
58
|
+
/**
|
|
59
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
60
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
61
|
+
*/
|
|
62
|
+
to: {
|
|
63
|
+
type: [String, Object]
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* Anchor href
|
|
67
|
+
*/
|
|
68
|
+
href: String,
|
|
69
|
+
/**
|
|
70
|
+
* Anchor target
|
|
71
|
+
*/
|
|
72
|
+
target: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: void 0,
|
|
75
|
+
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Anchor rel
|
|
79
|
+
*/
|
|
80
|
+
rel: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: "noopener noreferrer"
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const DisabledProps = {
|
|
86
|
+
/**
|
|
87
|
+
* Whether the form control is disabled
|
|
88
|
+
*/
|
|
89
|
+
disabled: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const ActiveProps = {
|
|
95
|
+
/**
|
|
96
|
+
* Whether the item is active
|
|
97
|
+
*/
|
|
98
|
+
active: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const CurrentProps = {
|
|
104
|
+
/**
|
|
105
|
+
* Whether the item is current
|
|
106
|
+
*/
|
|
107
|
+
current: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: false
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const PressedProps = {
|
|
113
|
+
/**
|
|
114
|
+
* Whether the item is pressed
|
|
115
|
+
*/
|
|
116
|
+
pressed: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: false
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const LabelProps = {
|
|
122
|
+
/**
|
|
123
|
+
* The item label
|
|
124
|
+
*/
|
|
125
|
+
label: {
|
|
126
|
+
type: [String, Number],
|
|
127
|
+
default: void 0
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
({
|
|
131
|
+
/**
|
|
132
|
+
* VvIcon name or props
|
|
133
|
+
* @see VVIcon
|
|
134
|
+
*/
|
|
135
|
+
icon: {
|
|
136
|
+
type: [String, Object],
|
|
137
|
+
default: void 0
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* VvIcon position
|
|
141
|
+
*/
|
|
142
|
+
iconPosition: {
|
|
143
|
+
type: String,
|
|
144
|
+
default: Position.before,
|
|
145
|
+
validation: (value) => Object.values(Position).includes(value)
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
({
|
|
149
|
+
/**
|
|
150
|
+
* Dropdown placement
|
|
151
|
+
*/
|
|
152
|
+
placement: {
|
|
153
|
+
type: String,
|
|
154
|
+
default: Side.bottom,
|
|
155
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* Dropdown strategy
|
|
159
|
+
*/
|
|
160
|
+
strategy: {
|
|
161
|
+
type: String,
|
|
162
|
+
default: void 0,
|
|
163
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
164
|
+
},
|
|
165
|
+
/**
|
|
166
|
+
* Dropdown show / hide transition name
|
|
167
|
+
*/
|
|
168
|
+
transitionName: {
|
|
169
|
+
type: String,
|
|
170
|
+
default: void 0
|
|
171
|
+
},
|
|
172
|
+
/**
|
|
173
|
+
* Offset of the dropdown from the trigger
|
|
174
|
+
* @see https://floating-ui.com/docs/offset
|
|
175
|
+
*/
|
|
176
|
+
offset: {
|
|
177
|
+
type: [Number, String, Object],
|
|
178
|
+
default: 0
|
|
179
|
+
},
|
|
180
|
+
/**
|
|
181
|
+
* Move dropdown to the side if there is no space in the default position
|
|
182
|
+
* @see https://floating-ui.com/docs/shift
|
|
183
|
+
*/
|
|
184
|
+
shift: {
|
|
185
|
+
type: [Boolean, Object],
|
|
186
|
+
default: false
|
|
187
|
+
},
|
|
188
|
+
/**
|
|
189
|
+
* Flip dropdown position if there is no space in the default position
|
|
190
|
+
* @see https://floating-ui.com/docs/flip
|
|
191
|
+
*/
|
|
192
|
+
flip: {
|
|
193
|
+
type: [Boolean, Object],
|
|
194
|
+
default: true
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* Size of the dropdown
|
|
198
|
+
* @see https://floating-ui.com/docs/size
|
|
199
|
+
*/
|
|
200
|
+
size: {
|
|
201
|
+
type: [Boolean, Object],
|
|
202
|
+
default: () => ({ padding: 10 })
|
|
203
|
+
},
|
|
204
|
+
/**
|
|
205
|
+
* Automatically change the position of the dropdown
|
|
206
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
207
|
+
*/
|
|
208
|
+
autoPlacement: {
|
|
209
|
+
type: [Boolean, Object],
|
|
210
|
+
default: false
|
|
211
|
+
},
|
|
212
|
+
/**
|
|
213
|
+
* Add arrow to the dropdown
|
|
214
|
+
* @see https://floating-ui.com/docs/arrow
|
|
215
|
+
*/
|
|
216
|
+
arrow: {
|
|
217
|
+
type: Boolean,
|
|
218
|
+
default: false
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
* Keep open dropdown on click outside
|
|
222
|
+
*/
|
|
223
|
+
keepOpen: {
|
|
224
|
+
type: Boolean,
|
|
225
|
+
default: false
|
|
226
|
+
},
|
|
227
|
+
/**
|
|
228
|
+
* Autofocus first item on dropdown open
|
|
229
|
+
*/
|
|
230
|
+
autofocusFirst: {
|
|
231
|
+
type: Boolean,
|
|
232
|
+
default: true
|
|
233
|
+
},
|
|
234
|
+
/**
|
|
235
|
+
* Set dropdown width to the same as the trigger
|
|
236
|
+
*/
|
|
237
|
+
triggerWidth: {
|
|
238
|
+
type: Boolean,
|
|
239
|
+
default: false
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
const ActionProps = {
|
|
243
|
+
...DisabledProps,
|
|
244
|
+
...LabelProps,
|
|
245
|
+
...PressedProps,
|
|
246
|
+
...ActiveProps,
|
|
247
|
+
...CurrentProps,
|
|
248
|
+
...LinkProps,
|
|
249
|
+
/**
|
|
250
|
+
* Button type
|
|
251
|
+
*/
|
|
252
|
+
type: {
|
|
253
|
+
type: String,
|
|
254
|
+
default: ButtonType.button,
|
|
255
|
+
validator: (value) => Object.values(ButtonType).includes(value)
|
|
256
|
+
},
|
|
257
|
+
/**
|
|
258
|
+
* Button aria-label
|
|
259
|
+
*/
|
|
260
|
+
ariaLabel: {
|
|
261
|
+
type: String,
|
|
262
|
+
default: void 0
|
|
263
|
+
},
|
|
264
|
+
/**
|
|
265
|
+
* Default tag for the action
|
|
266
|
+
*/
|
|
267
|
+
defaultTag: {
|
|
268
|
+
type: String,
|
|
269
|
+
default: ActionTag.button
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
const VvActionEvents = ["click", "mouseover", "mouseleave"];
|
|
273
|
+
const VvActionProps = ActionProps;
|
|
274
|
+
function useVolver() {
|
|
275
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
276
|
+
}
|
|
277
|
+
function useInjectedDropdownTrigger() {
|
|
278
|
+
return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
|
|
279
|
+
}
|
|
280
|
+
function useInjectedDropdownAction() {
|
|
281
|
+
return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
|
|
282
|
+
}
|
|
283
|
+
const __default__$1 = {
|
|
284
|
+
name: "VvAction"
|
|
285
|
+
};
|
|
286
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
287
|
+
...__default__$1,
|
|
288
|
+
props: VvActionProps,
|
|
289
|
+
emits: VvActionEvents,
|
|
290
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
291
|
+
const props = __props;
|
|
292
|
+
const emit = __emit;
|
|
293
|
+
const volver = useVolver();
|
|
294
|
+
const element = ref(null);
|
|
295
|
+
__expose({ $el: element });
|
|
296
|
+
const {
|
|
297
|
+
reference: dropdownTriggerReference,
|
|
298
|
+
bus: dropdownEventBus,
|
|
299
|
+
aria: dropdownAria,
|
|
300
|
+
expanded: dropdownExpanded
|
|
301
|
+
} = useInjectedDropdownTrigger();
|
|
302
|
+
watch(
|
|
303
|
+
() => element.value,
|
|
304
|
+
(newValue) => {
|
|
305
|
+
if (dropdownTriggerReference) {
|
|
306
|
+
dropdownTriggerReference.value = newValue;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
const pressed = computed(() => {
|
|
311
|
+
return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
|
|
312
|
+
});
|
|
313
|
+
const { role } = useInjectedDropdownAction();
|
|
314
|
+
const hasTag = computed(() => {
|
|
315
|
+
switch (true) {
|
|
316
|
+
case props.disabled:
|
|
317
|
+
return ActionTag.button;
|
|
318
|
+
case props.to !== void 0:
|
|
319
|
+
return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
|
|
320
|
+
case props.href !== void 0:
|
|
321
|
+
return ActionTag.a;
|
|
322
|
+
default:
|
|
323
|
+
return props.defaultTag;
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
const hasProps = computed(() => {
|
|
327
|
+
const toReturn = {
|
|
328
|
+
...dropdownAria == null ? void 0 : dropdownAria.value,
|
|
329
|
+
ariaPressed: pressed.value ? true : void 0,
|
|
330
|
+
ariaLabel: props.ariaLabel,
|
|
331
|
+
role: role == null ? void 0 : role.value
|
|
332
|
+
};
|
|
333
|
+
switch (hasTag.value) {
|
|
334
|
+
case ActionTag.a:
|
|
335
|
+
return {
|
|
336
|
+
...toReturn,
|
|
337
|
+
href: props.href,
|
|
338
|
+
target: props.target,
|
|
339
|
+
rel: props.rel
|
|
340
|
+
};
|
|
341
|
+
case ActionTag.routerLink:
|
|
342
|
+
case ActionTag.nuxtLink:
|
|
343
|
+
return {
|
|
344
|
+
...toReturn,
|
|
345
|
+
to: props.to,
|
|
346
|
+
target: props.target
|
|
347
|
+
};
|
|
348
|
+
case ActionTag.button:
|
|
349
|
+
return {
|
|
350
|
+
...toReturn,
|
|
351
|
+
type: props.type,
|
|
352
|
+
disabled: props.disabled
|
|
353
|
+
};
|
|
354
|
+
default:
|
|
355
|
+
return toReturn;
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
const onClick = (e) => {
|
|
359
|
+
if (props.disabled) {
|
|
360
|
+
e.preventDefault();
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
|
|
364
|
+
emit("click", e);
|
|
365
|
+
};
|
|
366
|
+
const onMouseover = (e) => {
|
|
367
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
|
|
368
|
+
emit("mouseover", e);
|
|
369
|
+
};
|
|
370
|
+
const onMouseleave = (e) => {
|
|
371
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
|
|
372
|
+
emit("mouseleave", e);
|
|
373
|
+
};
|
|
374
|
+
return (_ctx, _cache) => {
|
|
375
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
|
|
376
|
+
ref_key: "element",
|
|
377
|
+
ref: element,
|
|
378
|
+
class: {
|
|
379
|
+
active: _ctx.active,
|
|
380
|
+
pressed: unref(pressed),
|
|
381
|
+
disabled: _ctx.disabled,
|
|
382
|
+
current: _ctx.current
|
|
383
|
+
},
|
|
384
|
+
onClickPassive: onClick,
|
|
385
|
+
onMouseoverPassive: onMouseover,
|
|
386
|
+
onMouseleavePassive: onMouseleave
|
|
387
|
+
}), {
|
|
388
|
+
default: withCtx(() => [
|
|
389
|
+
createCommentVNode(" @slot Default slot "),
|
|
390
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
391
|
+
createTextVNode(
|
|
392
|
+
toDisplayString(_ctx.label),
|
|
393
|
+
1
|
|
394
|
+
/* TEXT */
|
|
395
|
+
)
|
|
396
|
+
])
|
|
397
|
+
]),
|
|
398
|
+
_: 3
|
|
399
|
+
/* FORWARDED */
|
|
400
|
+
}, 16, ["class"]);
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
const _hoisted_1 = {
|
|
405
|
+
class: "vv-nav__item",
|
|
406
|
+
role: "presentation"
|
|
407
|
+
};
|
|
408
|
+
const __default__ = {
|
|
409
|
+
name: "VvNavItem",
|
|
410
|
+
inheritAttrs: false
|
|
411
|
+
};
|
|
412
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
413
|
+
...__default__,
|
|
414
|
+
setup(__props) {
|
|
415
|
+
return (_ctx, _cache) => {
|
|
416
|
+
return openBlock(), createElementBlock("li", _hoisted_1, [
|
|
417
|
+
createVNode(
|
|
418
|
+
_sfc_main$1,
|
|
419
|
+
mergeProps(_ctx.$attrs, { class: "vv-nav__item-label" }),
|
|
420
|
+
{
|
|
421
|
+
default: withCtx(() => [
|
|
422
|
+
renderSlot(_ctx.$slots, "default")
|
|
423
|
+
]),
|
|
424
|
+
_: 3
|
|
425
|
+
/* FORWARDED */
|
|
426
|
+
},
|
|
427
|
+
16
|
|
428
|
+
/* FULL_PROPS */
|
|
429
|
+
)
|
|
430
|
+
]);
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
export {
|
|
435
|
+
_sfc_main as default
|
|
436
|
+
};
|
|
@@ -0,0 +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).VvNavItem=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||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{}),l=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(l||{});const a=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}},f={current:{type:Boolean,default:!1}},v={pressed:{type:Boolean,default:!1}},p={label:{type:[String,Number],default:void 0}};o.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...p,...v,...c,...f,...s,type:{type:String,default:r.button,validator:e=>Object.values(r).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:n.button}};const m=e.defineComponent({name:"VvAction",props:b,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:r}){const l=t,s=r,d=e.inject(a),c=e.ref(null);o({$el:c});const{reference:f,bus:v,aria:p,expanded:b}=e.inject(u,{});e.watch((()=>c.value),(e=>{f&&(f.value=e)}));const m=e.computed((()=>l.pressed||(null==b?void 0:b.value))),{role:g}=e.inject(i,{}),y=e.computed((()=>{switch(!0){case l.disabled:return n.button;case void 0!==l.to:return(null==d?void 0:d.nuxt)?n.nuxtLink:n.routerLink;case void 0!==l.href:return n.a;default:return l.defaultTag}})),k=e.computed((()=>{const e={...null==p?void 0:p.value,ariaPressed:!!m.value||void 0,ariaLabel:l.ariaLabel,role:null==g?void 0:g.value};switch(y.value){case n.a:return{...e,href:l.href,target:l.target,rel:l.rel};case n.routerLink:case n.nuxtLink:return{...e,to:l.to,target:l.target};case n.button:return{...e,type:l.type,disabled:l.disabled};default:return e}})),B=e=>{l.disabled?e.preventDefault():(null==v||v.emit("click",e),s("click",e))},h=e=>{null==v||v.emit("mouseover",e),s("mouseover",e)},_=e=>{null==v||v.emit("mouseleave",e),s("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(k),{ref_key:"element",ref:c,class:{active:t.active,pressed:e.unref(m),disabled:t.disabled,current:t.current},onClickPassive:B,onMouseoverPassive:h,onMouseleavePassive:_}),{default:e.withCtx((()=>[e.createCommentVNode(" @slot Default slot "),e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}}),g={class:"vv-nav__item",role:"presentation"};return e.defineComponent({name:"VvNavItem",inheritAttrs:!1,setup:t=>(t,o)=>(e.openBlock(),e.createElementBlock("li",g,[e.createVNode(m,e.mergeProps(t.$attrs,{class:"vv-nav__item-label"}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default")])),_:3},16)]))})}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { openBlock, createElementBlock, renderSlot } from "vue";
|
|
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
|
+
};
|
|
@@ -0,0 +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).VvNavSeparator=o(e.vue)}(this,(function(e){"use strict";const o={class:"vv-nav__separator",role:"separator"};return((e,o)=>{const t=e.__vccOpts||e;for(const[n,r]of o)t[n]=r;return t})({name:"VvNavSeparator"},[["render",function(t,n,r,a,s,f){return e.openBlock(),e.createElementBlock("li",o,[e.renderSlot(t.$slots,"default")])}]])}));
|
|
@@ -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 VvProgressProps = {
|
|
@@ -296,12 +341,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
296
341
|
computed(() => ({ indeterminate: indeterminate.value }))
|
|
297
342
|
);
|
|
298
343
|
return (_ctx, _cache) => {
|
|
299
|
-
return openBlock(), createElementBlock(
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
344
|
+
return openBlock(), createElementBlock(
|
|
345
|
+
"progress",
|
|
346
|
+
mergeProps({ role: "progressbar" }, {
|
|
347
|
+
class: unref(bemCssClasses),
|
|
348
|
+
ariaLabel: unref(ariaLabel),
|
|
349
|
+
max: unref(max),
|
|
350
|
+
value: unref(value)
|
|
351
|
+
}),
|
|
352
|
+
null,
|
|
353
|
+
16
|
|
354
|
+
/* FULL_PROPS */
|
|
355
|
+
);
|
|
305
356
|
};
|
|
306
357
|
}
|
|
307
358
|
});
|
|
@@ -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).VvProgress=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||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{});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).VvProgress=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||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{});Boolean,Boolean,Boolean,Boolean;const u={modifiers:{type:[String,Array],default:void 0}};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,r.button,n.button;const l={...u,value:{type:[Number,String],default:void 0},max:{type:[Number,String]},label:{type:String,required:!0}};return e.defineComponent({name:"VvProgress",props:l,setup(o){const t=o,{value:r,max:n,label:u}=e.toRefs(t),l=e.computed((()=>void 0===t.value)),{modifiers:a}=e.toRefs(t),i=function(o,t,r){return e.computed((()=>{const n={[o]:!0},u="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return u&&Array.isArray(u)&&u.forEach((e=>{e&&(n[`${o}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((t=>{n[`${o}--${t}`]=e.unref(r.value[t])})),n}))}("vv-progress",a,e.computed((()=>({indeterminate:l.value}))));return(o,t)=>(e.openBlock(),e.createElementBlock("progress",e.mergeProps({role:"progressbar"},{class:e.unref(i),ariaLabel:e.unref(u),max:e.unref(n),value:e.unref(r)}),null,16))}})}));
|
|
@@ -10,8 +10,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
10
|
type: StringConstructor;
|
|
11
11
|
required: boolean;
|
|
12
12
|
};
|
|
13
|
-
modifiers:
|
|
14
|
-
|
|
13
|
+
modifiers: {
|
|
14
|
+
type: globalThis.PropType<string | string[]>;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
15
18
|
value: {
|
|
16
19
|
type: (StringConstructor | NumberConstructor)[];
|
|
17
20
|
default: undefined;
|
|
@@ -23,8 +26,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
26
|
type: StringConstructor;
|
|
24
27
|
required: boolean;
|
|
25
28
|
};
|
|
26
|
-
modifiers:
|
|
29
|
+
modifiers: {
|
|
30
|
+
type: globalThis.PropType<string | string[]>;
|
|
31
|
+
default: undefined;
|
|
32
|
+
};
|
|
27
33
|
}>>, {
|
|
34
|
+
modifiers: string | string[];
|
|
28
35
|
value: string | number;
|
|
29
36
|
}, {}>;
|
|
30
37
|
export default _default;
|