@volverjs/ui-vue 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +52 -13
- package/dist/Volver.d.ts +5 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +113 -66
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +159 -101
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAction/VvAction.es.js +170 -0
- package/dist/components/VvAction/VvAction.umd.js +1 -0
- package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
- package/dist/components/VvAction/index.d.ts +24 -0
- package/dist/components/VvBadge/VvBadge.es.js +86 -16
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +97 -41
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +434 -251
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +50 -50
- package/dist/components/VvButton/index.d.ts +22 -67
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +118 -43
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvCard/VvCard.es.js +38 -25
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +334 -154
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
- package/dist/components/VvCheckbox/index.d.ts +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +401 -204
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +950 -594
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +54 -30
- package/dist/components/VvCombobox/index.d.ts +18 -13
- package/dist/components/VvDialog/VvDialog.es.js +139 -64
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +276 -158
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +9 -9
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
- package/dist/components/VvDropdown/index.d.ts +6 -9
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +251 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +30 -15
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +176 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.es.js +48 -32
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +508 -344
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +11 -4
- package/dist/components/VvInputText/index.d.ts +13 -2
- package/dist/components/VvProgress/VvProgress.es.js +90 -20
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +305 -125
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
- package/dist/components/VvRadio/index.d.ts +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +372 -175
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
- package/dist/components/VvRadioGroup/index.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +371 -216
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +11 -4
- package/dist/components/VvSelect/index.d.ts +5 -5
- package/dist/components/VvTextarea/VvTextarea.es.js +408 -244
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +11 -4
- package/dist/components/VvTextarea/index.d.ts +5 -5
- package/dist/components/VvTooltip/VvTooltip.es.js +88 -18
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/index.es.js +1913 -1521
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +2 -2
- package/dist/constants.d.ts +30 -0
- package/dist/directives/index.es.js +128 -0
- package/dist/directives/index.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +126 -0
- package/dist/directives/v-tooltip.umd.js +1 -0
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +2102 -1761
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +179 -11
- package/dist/resolvers/unplugin.d.ts +8 -8
- package/dist/resolvers/unplugin.es.js +51 -30
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
- package/package.json +60 -34
- package/src/Volver.ts +12 -5
- 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/VvAction/VvAction.vue +144 -0
- package/src/components/VvAction/index.ts +5 -0
- package/src/components/VvButton/VvButton.vue +31 -114
- package/src/components/VvButton/index.ts +6 -79
- package/src/components/VvCombobox/VvCombobox.vue +54 -42
- package/src/components/VvCombobox/index.ts +11 -9
- package/src/components/VvDropdown/VvDropdownAction.vue +44 -0
- package/src/components/VvDropdown/VvDropdownOption.vue +65 -0
- package/src/components/VvDropdown/index.ts +4 -9
- package/src/components/VvSelect/index.ts +2 -4
- package/src/composables/dropdown/useInjectDropdown.ts +1 -1
- package/src/composables/dropdown/useProvideDropdown.ts +7 -9
- package/src/composables/useModifiers.ts +4 -7
- package/src/constants.ts +36 -0
- package/src/props/index.ts +106 -14
- package/src/resolvers/unplugin.ts +81 -48
- package/src/stories/Accordion/AccordionSlots.stories.mdx +2 -2
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +2 -1
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
- package/src/stories/Button/Button.stories.mdx +4 -2
- package/src/stories/Button/Button.test.ts +3 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
- package/src/stories/Button/ButtonState.stories.mdx +2 -11
- package/src/stories/Card/Card.stories.mdx +2 -1
- package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
- package/src/stories/Combobox/Combobox.settings.ts +44 -0
- package/src/stories/Combobox/Combobox.stories.mdx +40 -1
- package/src/stories/Dialog/Dialog.stories.mdx +2 -1
- package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
- package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
- package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
- package/src/stories/Icon/Icon.stories.mdx +2 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
- package/src/stories/InputText/InputText.stories.mdx +2 -1
- package/src/stories/Progress/Progress.stories.mdx +2 -1
- package/src/stories/Radio/Radio.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
- package/src/stories/Select/Select.stories.mdx +2 -1
- package/src/stories/Textarea/Textarea.stories.mdx +2 -1
- package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { iconExists as
|
|
3
|
-
const
|
|
1
|
+
import { inject as S, computed as g, unref as l, defineComponent as w, ref as $, toRefs as y, openBlock as b, createBlock as F, mergeProps as B, createCommentVNode as E } from "vue";
|
|
2
|
+
import { iconExists as p, Icon as I, addIcon as V } from "@iconify/vue";
|
|
3
|
+
const C = {
|
|
4
4
|
/**
|
|
5
5
|
* Color
|
|
6
6
|
*/
|
|
@@ -93,46 +93,62 @@ const b = {
|
|
|
93
93
|
modifiers: {
|
|
94
94
|
type: [String, Array]
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, N = Symbol.for("volver");
|
|
97
|
+
function D() {
|
|
98
|
+
return S(N);
|
|
99
|
+
}
|
|
100
|
+
function O(a, n, o) {
|
|
101
|
+
return g(() => {
|
|
102
|
+
const t = {
|
|
103
|
+
[a]: !0
|
|
104
|
+
}, s = typeof (n == null ? void 0 : n.value) == "string" ? n.value.split(" ") : n == null ? void 0 : n.value;
|
|
105
|
+
return s && Array.isArray(s) && s.forEach((i) => {
|
|
106
|
+
t[`${a}--${i}`] = !0;
|
|
107
|
+
}), o && Object.keys(o.value).forEach((i) => {
|
|
108
|
+
t[`${a}--${i}`] = l(o.value[i]);
|
|
109
|
+
}), t;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const P = {
|
|
97
113
|
name: "VvIcon"
|
|
98
|
-
},
|
|
99
|
-
...
|
|
100
|
-
props:
|
|
101
|
-
setup(
|
|
102
|
-
const
|
|
103
|
-
const e =
|
|
104
|
-
return
|
|
105
|
-
(
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
108
|
-
return
|
|
114
|
+
}, k = /* @__PURE__ */ w({
|
|
115
|
+
...P,
|
|
116
|
+
props: C,
|
|
117
|
+
setup(a) {
|
|
118
|
+
const n = a, o = $(!0), t = D(), { modifiers: s } = y(n), i = O("vv-icon", s), u = g(() => n.provider || (t == null ? void 0 : t.provider)), m = g(() => {
|
|
119
|
+
const e = n.name ?? "", r = `@${u.value}:${n.prefix}:${n.name}`;
|
|
120
|
+
return p(e) ? e : p(r) ? r : (t == null ? void 0 : t.iconsCollections.find(
|
|
121
|
+
(c) => {
|
|
122
|
+
const f = `@${u.value}:${c.prefix}:${e}`;
|
|
123
|
+
if (p(f))
|
|
124
|
+
return f;
|
|
109
125
|
}
|
|
110
126
|
)) || e;
|
|
111
127
|
});
|
|
112
|
-
function
|
|
113
|
-
let
|
|
128
|
+
function d(e) {
|
|
129
|
+
let r = null;
|
|
114
130
|
if (typeof window > "u") {
|
|
115
131
|
const { JSDOM: h } = require("jsdom");
|
|
116
|
-
|
|
132
|
+
r = new h().window;
|
|
117
133
|
}
|
|
118
|
-
return (
|
|
134
|
+
return (r ? new r.DOMParser() : new window.DOMParser()).parseFromString(e, "text/html").querySelector("svg");
|
|
119
135
|
}
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
body:
|
|
136
|
+
function v(e) {
|
|
137
|
+
const r = d(e), c = (r == null ? void 0 : r.innerHTML.trim()) || "";
|
|
138
|
+
r && c && V(`@${u.value}:${n.prefix}:${n.name}`, {
|
|
139
|
+
body: c,
|
|
124
140
|
// Set height and width from svg content
|
|
125
|
-
height:
|
|
126
|
-
width:
|
|
141
|
+
height: r.viewBox.baseVal.height,
|
|
142
|
+
width: r.viewBox.baseVal.width
|
|
127
143
|
});
|
|
128
144
|
}
|
|
129
|
-
return
|
|
130
|
-
e && (
|
|
145
|
+
return t && (n.src && !p(`@${u.value}:${n.prefix}:${n.name}`) ? (o.value = !1, t.fetchIcon(n.src).then((e) => {
|
|
146
|
+
e && (v(e), o.value = !0);
|
|
131
147
|
}).catch((e) => {
|
|
132
148
|
throw new Error(`During fetch icon: ${e == null ? void 0 : e.message}`);
|
|
133
|
-
})) :
|
|
149
|
+
})) : n.svg && v(n.svg)), (e, r) => l(o) ? (b(), F(l(I), B({
|
|
134
150
|
key: 0,
|
|
135
|
-
class:
|
|
151
|
+
class: l(i)
|
|
136
152
|
}, {
|
|
137
153
|
inline: e.inline,
|
|
138
154
|
width: e.width,
|
|
@@ -143,10 +159,10 @@ const b = {
|
|
|
143
159
|
rotate: e.rotate,
|
|
144
160
|
color: e.color,
|
|
145
161
|
onLoad: e.onLoad,
|
|
146
|
-
icon:
|
|
147
|
-
}), null, 16, ["class"])) :
|
|
162
|
+
icon: l(m)
|
|
163
|
+
}), null, 16, ["class"])) : E("", !0);
|
|
148
164
|
}
|
|
149
165
|
});
|
|
150
166
|
export {
|
|
151
|
-
|
|
167
|
+
k as default
|
|
152
168
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("vue"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","@iconify/vue"],i):(e=typeof globalThis<"u"?globalThis:e||self,e.VvIcon=i(e.vue,e.vue$1))})(this,function(e,i){"use strict";const g={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}},m=Symbol.for("volver");function h(){return e.inject(m)}function y(a,t,s){return e.computed(()=>{const r={[a]:!0},l=typeof(t==null?void 0:t.value)=="string"?t.value.split(" "):t==null?void 0:t.value;return l&&Array.isArray(l)&&l.forEach(c=>{r[`${a}--${c}`]=!0}),s&&Object.keys(s.value).forEach(c=>{r[`${a}--${c}`]=e.unref(s.value[c])}),r})}const S={name:"VvIcon"};return e.defineComponent({...S,props:g,setup(a){const t=a,s=e.ref(!0),r=h(),{modifiers:l}=e.toRefs(t),c=y("vv-icon",l),f=e.computed(()=>t.provider||(r==null?void 0:r.provider)),w=e.computed(()=>{const n=t.name??"",o=`@${f.value}:${t.prefix}:${t.name}`;return i.iconExists(n)?n:i.iconExists(o)?o:(r==null?void 0:r.iconsCollections.find(u=>{const p=`@${f.value}:${u.prefix}:${n}`;if(i.iconExists(p))return p}))||n});function v(n){let o=null;if(typeof window>"u"){const{JSDOM:$}=require("jsdom");o=new $().window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(n,"text/html").querySelector("svg")}function d(n){const o=v(n),u=(o==null?void 0:o.innerHTML.trim())||"";o&&u&&i.addIcon(`@${f.value}:${t.prefix}:${t.name}`,{body:u,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return r&&(t.src&&!i.iconExists(`@${f.value}:${t.prefix}:${t.name}`)?(s.value=!1,r.fetchIcon(t.src).then(n=>{n&&(d(n),s.value=!0)}).catch(n=>{throw new Error(`During fetch icon: ${n==null?void 0:n.message}`)})):t.svg&&d(t.svg)),(n,o)=>e.unref(s)?(e.openBlock(),e.createBlock(e.unref(i.Icon),e.mergeProps({key:0,class:e.unref(c)},{inline:n.inline,width:n.width,height:n.height,horizontalFlip:n.horizontalFlip,verticalFlip:n.verticalFlip,flip:n.flip,rotate:n.rotate,color:n.color,onLoad:n.onLoad,icon:e.unref(w)}),null,16,["class"])):e.createCommentVNode("",!0)}})});
|