@volverjs/ui-vue 0.0.11 → 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.
Files changed (55) hide show
  1. package/bin/icons.js +1 -93
  2. package/dist/components/VvAccordion/VvAccordion.es.js +1 -366
  3. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +2 -702
  4. package/dist/components/VvAction/VvAction.es.js +1 -302
  5. package/dist/components/VvAlert/VvAlert.es.js +1 -527
  6. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +1 -730
  7. package/dist/components/VvAvatar/VvAvatar.es.js +1 -132
  8. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +1 -250
  9. package/dist/components/VvBadge/VvBadge.es.js +1 -131
  10. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +1 -410
  11. package/dist/components/VvButton/VvButton.es.js +1 -882
  12. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -214
  13. package/dist/components/VvCard/VvCard.es.js +1 -152
  14. package/dist/components/VvCheckbox/VvCheckbox.es.js +1 -741
  15. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +1 -981
  16. package/dist/components/VvCombobox/VvCombobox.es.js +1 -3463
  17. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  18. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +8 -1
  19. package/dist/components/VvDialog/VvDialog.es.js +1 -317
  20. package/dist/components/VvDropdown/VvDropdown.es.js +1 -750
  21. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +2 -2
  22. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +9 -2
  23. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +1 -448
  24. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +1 -149
  25. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +1 -104
  26. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  27. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +1 -281
  28. package/dist/components/VvIcon/VvIcon.es.js +1 -143
  29. package/dist/components/VvInputFile/VvInputFile.es.js +1 -1704
  30. package/dist/components/VvInputText/VvInputText.es.js +4 -2790
  31. package/dist/components/VvNav/VvNav.es.js +1 -438
  32. package/dist/components/VvNavItem/VvNavItem.es.js +1 -337
  33. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +1 -24
  34. package/dist/components/VvProgress/VvProgress.es.js +1 -163
  35. package/dist/components/VvRadio/VvRadio.es.js +1 -661
  36. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +1 -901
  37. package/dist/components/VvSelect/VvSelect.es.js +1 -1103
  38. package/dist/components/VvSelect/VvSelect.vue.d.ts +3 -1
  39. package/dist/components/VvTab/VvTab.es.js +1 -558
  40. package/dist/components/VvTextarea/VvTextarea.es.js +2 -1989
  41. package/dist/components/VvTooltip/VvTooltip.es.js +1 -154
  42. package/dist/components/index.es.js +6 -8558
  43. package/dist/components/index.umd.js +1 -1
  44. package/dist/composables/index.es.js +2 -247
  45. package/dist/composables/index.umd.js +1 -1
  46. package/dist/directives/index.es.js +2 -311
  47. package/dist/directives/index.umd.js +1 -1
  48. package/dist/directives/v-contextmenu.es.js +2 -142
  49. package/dist/directives/v-contextmenu.umd.js +1 -1
  50. package/dist/directives/v-tooltip.es.js +1 -172
  51. package/dist/icons.es.js +1 -39
  52. package/dist/icons.umd.js +1 -1
  53. package/dist/index.es.js +1 -219
  54. package/dist/resolvers/unplugin.es.js +1 -187
  55. package/package.json +33 -33
@@ -1,214 +1 @@
1
- import { provide, computed, defineComponent, toRefs, watchEffect, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
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_BUTTON_GROUP = Symbol.for(
33
- "buttonGroup"
34
- );
35
- const DisabledProps = {
36
- /**
37
- * Whether the form control is disabled
38
- */
39
- disabled: {
40
- type: Boolean,
41
- default: false
42
- }
43
- };
44
- const ModifiersProps = {
45
- /**
46
- * Component BEM modifiers
47
- */
48
- modifiers: {
49
- type: [String, Array],
50
- default: void 0
51
- }
52
- };
53
- ({
54
- /**
55
- * VvIcon position
56
- */
57
- iconPosition: {
58
- default: Position.before
59
- }
60
- });
61
- const UnselectableProps = {
62
- /**
63
- * If true the input will be unselectable
64
- */
65
- unselectable: { type: Boolean, default: true }
66
- };
67
- ({
68
- /**
69
- * Dropdown placement
70
- */
71
- placement: {
72
- default: Side.bottom
73
- }
74
- });
75
- ({
76
- /**
77
- * Button type
78
- */
79
- type: {
80
- default: ButtonType.button
81
- },
82
- /**
83
- * Default tag for the action
84
- */
85
- defaultTag: {
86
- default: ActionTag.button
87
- }
88
- });
89
- ({
90
- storageType: {
91
- default: StorageType.local
92
- }
93
- });
94
- const VvButtonGroupProps = {
95
- ...ModifiersProps,
96
- ...DisabledProps,
97
- ...UnselectableProps,
98
- legendLabel: { type: String },
99
- /**
100
- * String or String[] of css classes (modifiers) that will be provided to each button'
101
- */
102
- itemModifiers: {
103
- type: [String, Array],
104
- default: ""
105
- },
106
- toggle: { type: Boolean, default: false },
107
- multiple: { type: Boolean, default: false },
108
- modelValue: {
109
- type: [String, Number, Boolean, Array],
110
- default: void 0
111
- }
112
- };
113
- const VvButtonGroupEvents = ["update:modelValue"];
114
- function useGroupStateProvide(key, groupState) {
115
- provide(key, groupState);
116
- }
117
- function useModifiers(prefix, modifiers, others) {
118
- return computed(() => {
119
- const toReturn = {
120
- [prefix]: true
121
- };
122
- const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
123
- if (modifiersArray) {
124
- if (Array.isArray(modifiersArray)) {
125
- modifiersArray.forEach((modifier) => {
126
- if (modifier) {
127
- toReturn[`${prefix}--${modifier}`] = true;
128
- }
129
- });
130
- }
131
- }
132
- return toReturn;
133
- });
134
- }
135
- const _hoisted_1 = {
136
- key: 0,
137
- class: "vv-button-group__legend"
138
- };
139
- const __default__ = {
140
- name: "VvButtonGroup"
141
- };
142
- const _sfc_main = /* @__PURE__ */ defineComponent({
143
- ...__default__,
144
- props: VvButtonGroupProps,
145
- emits: VvButtonGroupEvents,
146
- setup(__props, { emit: __emit }) {
147
- const props = __props;
148
- const emit = __emit;
149
- const {
150
- disabled,
151
- toggle,
152
- modifiers,
153
- multiple,
154
- unselectable,
155
- itemModifiers
156
- } = toRefs(props);
157
- watchEffect(() => {
158
- if (typeof props.modelValue === "string" && multiple.value) {
159
- console.warn(
160
- `[VvButtonGroup]: modelValue is a string but multiple is true.`
161
- );
162
- }
163
- });
164
- const modelValue = computed({
165
- get: () => {
166
- if (!multiple.value) {
167
- return Array.isArray(props.modelValue) ? props.modelValue[0] : props.modelValue;
168
- }
169
- return props.modelValue;
170
- },
171
- set: (newValue) => {
172
- if (newValue !== void 0 && (Array.isArray(props.modelValue) || multiple.value) && !Array.isArray(newValue)) {
173
- return emit("update:modelValue", [newValue]);
174
- }
175
- return emit("update:modelValue", newValue);
176
- }
177
- });
178
- useGroupStateProvide(INJECTION_KEY_BUTTON_GROUP, {
179
- modelValue,
180
- disabled,
181
- toggle,
182
- multiple,
183
- unselectable,
184
- modifiers: itemModifiers
185
- });
186
- const bemCssClasses = useModifiers("vv-button-group", modifiers);
187
- return (_ctx, _cache) => {
188
- return openBlock(), createElementBlock(
189
- "fieldset",
190
- {
191
- class: normalizeClass(unref(bemCssClasses)),
192
- role: "group"
193
- },
194
- [
195
- _ctx.$slots.legend || _ctx.legendLabel ? (openBlock(), createElementBlock("legend", _hoisted_1, [
196
- renderSlot(_ctx.$slots, "legend", {}, () => [
197
- createTextVNode(
198
- toDisplayString(_ctx.legendLabel),
199
- 1
200
- /* TEXT */
201
- )
202
- ])
203
- ])) : createCommentVNode("v-if", true),
204
- renderSlot(_ctx.$slots, "default")
205
- ],
206
- 2
207
- /* CLASS */
208
- );
209
- };
210
- }
211
- });
212
- export {
213
- _sfc_main as default
214
- };
1
+ import{provide as e,computed as t,defineComponent as l,toRefs as o,watchEffect as a,createElementBlock as r,openBlock as u,normalizeClass as n,unref as s,createCommentVNode as i,renderSlot as d,createTextVNode as m,toDisplayString as p}from"vue";var b=/* @__PURE__ */(e=>(e.local="local",e.session="session",e))(b||{}),f=/* @__PURE__ */(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(f||{}),g=/* @__PURE__ */(e=>(e.before="before",e.after="after",e))(g||{}),y=/* @__PURE__ */(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(y||{}),c=/* @__PURE__ */(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(c||{});const v=Symbol.for("buttonGroup"),V={disabled:{type:Boolean,default:!1}},A={modifiers:{type:[String,Array],default:void 0}};g.before;const B={unselectable:{type:Boolean,default:!0}};f.bottom,y.button,c.button,b.local;const k={...A,...V,...B,legendLabel:{type:String},itemModifiers:{type:[String,Array],default:""},toggle:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},modelValue:{type:[String,Number,Boolean,Array],default:void 0}};const L={key:0,class:"vv-button-group__legend"},S=/* @__PURE__ */l({name:"VvButtonGroup",props:k,emits:["update:modelValue"],setup(l,{emit:b}){const f=l,g=b,{disabled:y,toggle:c,modifiers:V,multiple:A,unselectable:B,itemModifiers:k}=o(f);a(()=>{"string"==typeof f.modelValue&&A.value&&console.warn("[VvButtonGroup]: modelValue is a string but multiple is true.")});const S=t({get:()=>A.value?f.modelValue:Array.isArray(f.modelValue)?f.modelValue[0]:f.modelValue,set:e=>void 0===e||!Array.isArray(f.modelValue)&&!A.value||Array.isArray(e)?g("update:modelValue",e):g("update:modelValue",[e])});e(v,{modelValue:S,disabled:y,toggle:c,multiple:A,unselectable:B,modifiers:k});const $=function(e,l){return t(()=>{const t={[e]:!0},o="string"==typeof l?.value?l.value.split(" "):l?.value;return o&&Array.isArray(o)&&o.forEach(l=>{l&&(t[`${e}--${l}`]=!0)}),t})}("vv-button-group",V);return(e,t)=>(u(),r("fieldset",{class:n(s($)),role:"group"},[e.$slots.legend||e.legendLabel?(u(),r("legend",L,[d(e.$slots,"legend",{},()=>[m(p(e.legendLabel),1)])])):i("v-if",!0),d(e.$slots,"default")],2))}});export{S as default};
@@ -1,152 +1 @@
1
- import { computed, defineComponent, toRefs, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
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 VvCardProps = {
77
- ...ModifiersProps,
78
- title: String
79
- };
80
- function useModifiers(prefix, modifiers, others) {
81
- return computed(() => {
82
- const toReturn = {
83
- [prefix]: true
84
- };
85
- const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
86
- if (modifiersArray) {
87
- if (Array.isArray(modifiersArray)) {
88
- modifiersArray.forEach((modifier) => {
89
- if (modifier) {
90
- toReturn[`${prefix}--${modifier}`] = true;
91
- }
92
- });
93
- }
94
- }
95
- return toReturn;
96
- });
97
- }
98
- const _hoisted_1 = {
99
- key: 0,
100
- class: "vv-card__header"
101
- };
102
- const _hoisted_2 = {
103
- key: 1,
104
- class: "vv-card__content"
105
- };
106
- const _hoisted_3 = {
107
- key: 2,
108
- class: "vv-card__footer"
109
- };
110
- const __default__ = {
111
- name: "VvCard"
112
- };
113
- const _sfc_main = /* @__PURE__ */ defineComponent({
114
- ...__default__,
115
- props: VvCardProps,
116
- setup(__props) {
117
- const props = __props;
118
- const { modifiers } = toRefs(props);
119
- const bemCssClasses = useModifiers("vv-card", modifiers);
120
- return (_ctx, _cache) => {
121
- return openBlock(), createElementBlock(
122
- "article",
123
- {
124
- class: normalizeClass(unref(bemCssClasses))
125
- },
126
- [
127
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1, [
128
- renderSlot(_ctx.$slots, "header", {}, () => [
129
- createTextVNode(
130
- toDisplayString(_ctx.title),
131
- 1
132
- /* TEXT */
133
- )
134
- ])
135
- ])) : createCommentVNode("v-if", true),
136
- renderSlot(_ctx.$slots, "default"),
137
- _ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_2, [
138
- renderSlot(_ctx.$slots, "content")
139
- ])) : createCommentVNode("v-if", true),
140
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3, [
141
- renderSlot(_ctx.$slots, "footer")
142
- ])) : createCommentVNode("v-if", true)
143
- ],
144
- 2
145
- /* CLASS */
146
- );
147
- };
148
- }
149
- });
150
- export {
151
- _sfc_main as default
152
- };
1
+ import{computed as t,defineComponent as e,toRefs as o,createElementBlock as r,openBlock as s,normalizeClass as a,unref as n,createCommentVNode as l,renderSlot as i,createTextVNode as u,toDisplayString as f}from"vue";var c=/* @__PURE__ */(t=>(t.local="local",t.session="session",t))(c||{}),v=/* @__PURE__ */(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(v||{}),d=/* @__PURE__ */(t=>(t.before="before",t.after="after",t))(d||{}),b=/* @__PURE__ */(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(b||{}),m=/* @__PURE__ */(t=>(t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t))(m||{});const p={modifiers:{type:[String,Array],default:void 0}};d.before,v.bottom,b.button,m.button,c.local;const $={...p,title:String};const y={key:0,class:"vv-card__header"},h={key:1,class:"vv-card__content"},k={key:2,class:"vv-card__footer"},_=/* @__PURE__ */e({name:"VvCard",props:$,setup(e){const c=e,{modifiers:v}=o(c),d=function(e,o){return t(()=>{const t={[e]:!0},r="string"==typeof o?.value?o.value.split(" "):o?.value;return r&&Array.isArray(r)&&r.forEach(o=>{o&&(t[`${e}--${o}`]=!0)}),t})}("vv-card",v);return(t,e)=>(s(),r("article",{class:a(n(d))},[t.$slots.header||t.title?(s(),r("header",y,[i(t.$slots,"header",{},()=>[u(f(t.title),1)])])):l("v-if",!0),i(t.$slots,"default"),t.$slots.content?(s(),r("div",h,[i(t.$slots,"content")])):l("v-if",!0),t.$slots.footer?(s(),r("footer",k,[i(t.$slots,"footer")])):l("v-if",!0)],2))}});export{_ as default};