@volverjs/ui-vue 0.0.10-beta.3 → 0.0.10-beta.5
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/dist/components/VvAccordion/VvAccordion.es.js +2 -2
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +2 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +2 -2
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +2 -2
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +2 -2
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +2 -2
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +2 -2
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +2 -2
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +2 -2
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +2 -2
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +2 -2
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +2 -2
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +2 -2
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +2 -2
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +2 -2
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/index.es.js +3 -3
- package/dist/components/index.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +19 -16
- package/dist/index.umd.js +1 -1
- package/package.json +31 -31
- package/src/Volver.ts +22 -16
- 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/composables/useUniqueId.ts +2 -2
- package/src/stories/argTypes.ts +1 -1
package/dist/index.es.js
CHANGED
|
@@ -21,25 +21,28 @@ function useDefaultProps(component, defaults, name) {
|
|
|
21
21
|
return {
|
|
22
22
|
...component,
|
|
23
23
|
name: componentName,
|
|
24
|
-
props: Object.keys(props).reduce(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
props: Object.keys(props).reduce(
|
|
25
|
+
(acc, key) => {
|
|
26
|
+
if (!(key in componentDefaults)) {
|
|
27
|
+
acc[key] = props[key];
|
|
28
|
+
return acc;
|
|
29
|
+
}
|
|
30
|
+
const customDefault = componentDefaults[key];
|
|
31
|
+
if (typeof props[key] === "function" || Array.isArray(props[key])) {
|
|
32
|
+
acc[key] = {
|
|
33
|
+
type: props[key],
|
|
34
|
+
default: customDefault
|
|
35
|
+
};
|
|
36
|
+
return acc;
|
|
37
|
+
}
|
|
31
38
|
acc[key] = {
|
|
32
|
-
|
|
39
|
+
...props[key],
|
|
33
40
|
default: customDefault
|
|
34
41
|
};
|
|
35
42
|
return acc;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
default: customDefault
|
|
40
|
-
};
|
|
41
|
-
return acc;
|
|
42
|
-
}, {})
|
|
43
|
+
},
|
|
44
|
+
{}
|
|
45
|
+
)
|
|
43
46
|
};
|
|
44
47
|
}
|
|
45
48
|
class Volver {
|
|
@@ -111,7 +114,7 @@ const VolverPlugin = {
|
|
|
111
114
|
* @param {App} Vue
|
|
112
115
|
* @param {Object} options
|
|
113
116
|
*/
|
|
114
|
-
install(app, options) {
|
|
117
|
+
install(app, options = {}) {
|
|
115
118
|
const volver = new Volver(options);
|
|
116
119
|
app.config.globalProperties.$vv = volver;
|
|
117
120
|
if (options.components) {
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@iconify/vue"),require("vue")):"function"==typeof define&&define.amd?define(["exports","@iconify/vue","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).volver={},e.vue$1,e.vue)}(this,(function(e,t,o){"use strict";var i=Object.defineProperty,n=(e,t,o)=>(((e,t,o)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o})(e,"symbol"!=typeof t?t+"":t,o),o);const r=Symbol.for("volver");function s(e,t,o){const i=o||e.name;if(!i)return e;const n=null==t?void 0:t[i],r=e.props;return n&&r?{...e,name:i,props:Object.keys(r).reduce(((e,t)=>{if(!(t in n))return e[t]=r[t],e;const o=n[t];return"function"==typeof r[t]||Array.isArray(r[t])?(e[t]={type:r[t],default:o},e):(e[t]={...r[t],default:o},e)}),{})}:{...e,name:i}}class c{constructor({fetchWithCredentials:e,fetchOptions:t,iconsProvider:i,nuxt:r,iconsCollections:s,defaults:c}={}){n(this,"_fetchOptions",{}),n(this,"_iconsCollections",[]),n(this,"_iconsProvider","vv"),n(this,"_nuxt",!1),n(this,"defaults",o.ref({})),t&&(this._fetchOptions=t),e&&(this._fetchOptions={...this._fetchOptions,credentials:"include"}),i&&(this._iconsProvider=i),r&&(this._nuxt=r),s&&Array.isArray(s)&&s.forEach((e=>{this.addCollection(e,this._iconsProvider)})),c&&(this.defaults.value=c)}get nuxt(){return this._nuxt}get iconsProvider(){return this._iconsProvider}get iconsCollections(){return this._iconsCollections}addCollection(e,o=this._iconsProvider){return this._iconsCollections.push(e),t.addCollection(e,o)}addIcon(e,o){return t.addIcon(e,o)}addIconsAPIProvider(e,o){return t.addAPIProvider(e,o)}fetchIcon(e,t={cache:"force-cache"}){return new Promise(((o,i)=>{fetch(e,{...this._fetchOptions,...t}).catch((e=>i(e))).then((e=>null==e?void 0:e.text())).then((e=>o(e)))}))}}const l={install(e,t){const o=new c(t);e.config.globalProperties.$vv=o,t.components&&Object.entries(t.components).forEach((([o,i])=>{e.component(o,s(i,t.defaults))})),t.aliases&&Object.entries(t.aliases).forEach((([o,i])=>{e.component(o,s(i,t.defaults,o))})),t.directives&&Object.entries(t.directives).forEach((([t,o])=>{e.directive(t,o)})),e.provide(r,o)}};e.VolverPlugin=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@iconify/vue"),require("vue")):"function"==typeof define&&define.amd?define(["exports","@iconify/vue","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).volver={},e.vue$1,e.vue)}(this,(function(e,t,o){"use strict";var i=Object.defineProperty,n=(e,t,o)=>(((e,t,o)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o})(e,"symbol"!=typeof t?t+"":t,o),o);const r=Symbol.for("volver");function s(e,t,o){const i=o||e.name;if(!i)return e;const n=null==t?void 0:t[i],r=e.props;return n&&r?{...e,name:i,props:Object.keys(r).reduce(((e,t)=>{if(!(t in n))return e[t]=r[t],e;const o=n[t];return"function"==typeof r[t]||Array.isArray(r[t])?(e[t]={type:r[t],default:o},e):(e[t]={...r[t],default:o},e)}),{})}:{...e,name:i}}class c{constructor({fetchWithCredentials:e,fetchOptions:t,iconsProvider:i,nuxt:r,iconsCollections:s,defaults:c}={}){n(this,"_fetchOptions",{}),n(this,"_iconsCollections",[]),n(this,"_iconsProvider","vv"),n(this,"_nuxt",!1),n(this,"defaults",o.ref({})),t&&(this._fetchOptions=t),e&&(this._fetchOptions={...this._fetchOptions,credentials:"include"}),i&&(this._iconsProvider=i),r&&(this._nuxt=r),s&&Array.isArray(s)&&s.forEach((e=>{this.addCollection(e,this._iconsProvider)})),c&&(this.defaults.value=c)}get nuxt(){return this._nuxt}get iconsProvider(){return this._iconsProvider}get iconsCollections(){return this._iconsCollections}addCollection(e,o=this._iconsProvider){return this._iconsCollections.push(e),t.addCollection(e,o)}addIcon(e,o){return t.addIcon(e,o)}addIconsAPIProvider(e,o){return t.addAPIProvider(e,o)}fetchIcon(e,t={cache:"force-cache"}){return new Promise(((o,i)=>{fetch(e,{...this._fetchOptions,...t}).catch((e=>i(e))).then((e=>null==e?void 0:e.text())).then((e=>o(e)))}))}}const l={install(e,t={}){const o=new c(t);e.config.globalProperties.$vv=o,t.components&&Object.entries(t.components).forEach((([o,i])=>{e.component(o,s(i,t.defaults))})),t.aliases&&Object.entries(t.aliases).forEach((([o,i])=>{e.component(o,s(i,t.defaults,o))})),t.directives&&Object.entries(t.directives).forEach((([t,o])=>{e.directive(t,o)})),e.provide(r,o)}};e.VolverPlugin=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/volverjs/ui-vue/issues"
|
|
21
21
|
},
|
|
22
|
-
"version": "0.0.10-beta.
|
|
22
|
+
"version": "0.0.10-beta.5",
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">= 16.x"
|
|
25
25
|
},
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@vueuse/core": "^10.4.1",
|
|
45
45
|
"jsdom": "^22.1.0",
|
|
46
46
|
"mitt": "^3.0.1",
|
|
47
|
-
"nanoid": "^5.0.1",
|
|
48
47
|
"ts-dot-prop": "^2.1.3",
|
|
48
|
+
"uid": "^2.0.2",
|
|
49
49
|
"vue": "^3.3.4",
|
|
50
50
|
"vue-imask": "^7.1.3"
|
|
51
51
|
},
|
|
@@ -53,43 +53,43 @@
|
|
|
53
53
|
"@volverjs/style": "0.*"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/core": "^7.22.
|
|
57
|
-
"@babel/preset-env": "^7.22.
|
|
56
|
+
"@babel/core": "^7.22.20",
|
|
57
|
+
"@babel/preset-env": "^7.22.20",
|
|
58
58
|
"@babel/preset-typescript": "^7.22.15",
|
|
59
59
|
"@iconify/types": "^2.0.0",
|
|
60
|
-
"@iconify/utils": "^2.1.
|
|
60
|
+
"@iconify/utils": "^2.1.10",
|
|
61
61
|
"@mdx-js/react": "^2.3.0",
|
|
62
|
-
"@rushstack/eslint-patch": "^1.
|
|
63
|
-
"@storybook/addon-a11y": "^7.4.
|
|
64
|
-
"@storybook/addon-actions": "^7.4.
|
|
65
|
-
"@storybook/addon-docs": "^7.4.
|
|
66
|
-
"@storybook/addon-essentials": "^7.4.
|
|
67
|
-
"@storybook/addon-interactions": "^7.4.
|
|
68
|
-
"@storybook/addon-links": "^7.4.
|
|
69
|
-
"@storybook/channel-postmessage": "^7.4.
|
|
70
|
-
"@storybook/channel-websocket": "^7.4.
|
|
71
|
-
"@storybook/cli": "^7.4.
|
|
72
|
-
"@storybook/client-api": "^7.4.
|
|
73
|
-
"@storybook/client-logger": "^7.4.
|
|
74
|
-
"@storybook/core-common": "^7.4.
|
|
62
|
+
"@rushstack/eslint-patch": "^1.4.0",
|
|
63
|
+
"@storybook/addon-a11y": "^7.4.2",
|
|
64
|
+
"@storybook/addon-actions": "^7.4.2",
|
|
65
|
+
"@storybook/addon-docs": "^7.4.2",
|
|
66
|
+
"@storybook/addon-essentials": "^7.4.2",
|
|
67
|
+
"@storybook/addon-interactions": "^7.4.2",
|
|
68
|
+
"@storybook/addon-links": "^7.4.2",
|
|
69
|
+
"@storybook/channel-postmessage": "^7.4.2",
|
|
70
|
+
"@storybook/channel-websocket": "^7.4.2",
|
|
71
|
+
"@storybook/cli": "^7.4.2",
|
|
72
|
+
"@storybook/client-api": "^7.4.2",
|
|
73
|
+
"@storybook/client-logger": "^7.4.2",
|
|
74
|
+
"@storybook/core-common": "^7.4.2",
|
|
75
75
|
"@storybook/jest": "^0.2.2",
|
|
76
|
-
"@storybook/preview-api": "^7.4.
|
|
77
|
-
"@storybook/preview-web": "^7.4.
|
|
76
|
+
"@storybook/preview-api": "^7.4.2",
|
|
77
|
+
"@storybook/preview-web": "^7.4.2",
|
|
78
78
|
"@storybook/test-runner": "^0.13.0",
|
|
79
|
-
"@storybook/testing-library": "^0.2.
|
|
80
|
-
"@storybook/vue3": "^7.4.
|
|
81
|
-
"@storybook/vue3-vite": "^7.4.
|
|
79
|
+
"@storybook/testing-library": "^0.2.1",
|
|
80
|
+
"@storybook/vue3": "^7.4.2",
|
|
81
|
+
"@storybook/vue3-vite": "^7.4.2",
|
|
82
82
|
"@tsconfig/node18": "^18.2.2",
|
|
83
|
-
"@types/jest-axe": "^3.5.
|
|
84
|
-
"@types/jsdom": "^21.1.
|
|
85
|
-
"@types/node": "^20.6.
|
|
86
|
-
"@types/react": "^18.2.
|
|
83
|
+
"@types/jest-axe": "^3.5.6",
|
|
84
|
+
"@types/jsdom": "^21.1.3",
|
|
85
|
+
"@types/node": "^20.6.2",
|
|
86
|
+
"@types/react": "^18.2.22",
|
|
87
87
|
"@types/yargs": "^17.0.24",
|
|
88
88
|
"@vitejs/plugin-vue": "^4.3.4",
|
|
89
89
|
"@volverjs/style": "0.1.12-beta.8",
|
|
90
90
|
"@vue/compiler-sfc": "^3.3.4",
|
|
91
91
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
92
|
-
"@vue/eslint-config-typescript": "^
|
|
92
|
+
"@vue/eslint-config-typescript": "^12.0.0",
|
|
93
93
|
"@vue/test-utils": "^2.4.1",
|
|
94
94
|
"@vue/tsconfig": "^0.4.0",
|
|
95
95
|
"change-case": "^4.1.2",
|
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
"pretty-format": "^29.7.0",
|
|
112
112
|
"react": "^18.2.0",
|
|
113
113
|
"react-dom": "^18.2.0",
|
|
114
|
-
"remark": "^
|
|
115
|
-
"sass": "^1.
|
|
116
|
-
"storybook": "^7.4.
|
|
114
|
+
"remark": "^15.0.1",
|
|
115
|
+
"sass": "^1.67.0",
|
|
116
|
+
"storybook": "^7.4.2",
|
|
117
117
|
"storybook-addon-markdown-docs": "^2.0.0",
|
|
118
118
|
"storybook-dark-mode": "^3.0.1",
|
|
119
119
|
"storybook-version": "^0.1.1",
|
package/src/Volver.ts
CHANGED
|
@@ -36,25 +36,31 @@ export function useDefaultProps(
|
|
|
36
36
|
return {
|
|
37
37
|
...component,
|
|
38
38
|
name: componentName,
|
|
39
|
-
props: Object.keys(props).reduce(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
props: Object.keys(props).reduce(
|
|
40
|
+
(acc, key) => {
|
|
41
|
+
if (!(key in componentDefaults)) {
|
|
42
|
+
acc[key] = props[key]
|
|
43
|
+
return acc
|
|
44
|
+
}
|
|
45
|
+
const customDefault = componentDefaults[key]
|
|
46
|
+
if (
|
|
47
|
+
typeof props[key] === 'function' ||
|
|
48
|
+
Array.isArray(props[key])
|
|
49
|
+
) {
|
|
50
|
+
acc[key] = {
|
|
51
|
+
type: props[key],
|
|
52
|
+
default: customDefault,
|
|
53
|
+
}
|
|
54
|
+
return acc
|
|
55
|
+
}
|
|
46
56
|
acc[key] = {
|
|
47
|
-
|
|
57
|
+
...(props[key] as Record<string, unknown>),
|
|
48
58
|
default: customDefault,
|
|
49
59
|
}
|
|
50
60
|
return acc
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
default: customDefault,
|
|
55
|
-
}
|
|
56
|
-
return acc
|
|
57
|
-
}, {} as Record<string, unknown>),
|
|
61
|
+
},
|
|
62
|
+
{} as Record<string, unknown>,
|
|
63
|
+
),
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
|
|
@@ -248,7 +254,7 @@ const VolverPlugin: Plugin = {
|
|
|
248
254
|
* @param {App} Vue
|
|
249
255
|
* @param {Object} options
|
|
250
256
|
*/
|
|
251
|
-
install(app: App, options: VolverOptions) {
|
|
257
|
+
install(app: App, options: VolverOptions = {}) {
|
|
252
258
|
const volver = new Volver(options)
|
|
253
259
|
|
|
254
260
|
// register global methods
|