@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.
Files changed (94) hide show
  1. package/bin/icons.js +1 -93
  2. package/dist/components/VvAccordion/VvAccordion.es.js +1 -366
  3. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -1
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +2 -702
  5. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +3 -2
  6. package/dist/components/VvAction/VvAction.es.js +1 -302
  7. package/dist/components/VvAction/VvAction.vue.d.ts +2 -1
  8. package/dist/components/VvAlert/VvAlert.es.js +1 -527
  9. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  10. package/dist/components/VvAlert/VvAlert.vue.d.ts +2 -1
  11. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +1 -730
  12. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  13. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +2 -1
  14. package/dist/components/VvAvatar/VvAvatar.es.js +1 -132
  15. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -1
  16. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +1 -250
  17. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -1
  18. package/dist/components/VvBadge/VvBadge.es.js +1 -131
  19. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -1
  20. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +1 -410
  21. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +2 -1
  22. package/dist/components/VvButton/VvButton.es.js +1 -882
  23. package/dist/components/VvButton/VvButton.umd.js +1 -1
  24. package/dist/components/VvButton/VvButton.vue.d.ts +2 -1
  25. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -214
  26. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -1
  27. package/dist/components/VvCard/VvCard.es.js +1 -152
  28. package/dist/components/VvCard/VvCard.vue.d.ts +2 -1
  29. package/dist/components/VvCheckbox/VvCheckbox.es.js +1 -741
  30. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -2
  31. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +1 -981
  32. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -1
  33. package/dist/components/VvCombobox/VvCombobox.es.js +1 -3463
  34. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  35. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +263 -317
  36. package/dist/components/VvDialog/VvDialog.es.js +1 -317
  37. package/dist/components/VvDialog/VvDialog.vue.d.ts +2 -1
  38. package/dist/components/VvDropdown/VvDropdown.es.js +1 -750
  39. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -1
  40. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +5 -4
  41. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -1
  42. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +10 -2
  43. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -1
  44. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +1 -448
  45. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +1 -149
  46. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +1 -104
  47. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  48. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +1 -281
  49. package/dist/components/VvIcon/VvIcon.es.js +1 -143
  50. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  51. package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -1
  52. package/dist/components/VvInputFile/VvInputFile.es.js +1 -1704
  53. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  54. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +2 -1
  55. package/dist/components/VvInputText/VvInputText.es.js +4 -2790
  56. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  57. package/dist/components/VvInputText/VvInputText.vue.d.ts +2 -1
  58. package/dist/components/VvNav/VvNav.es.js +1 -438
  59. package/dist/components/VvNav/VvNav.vue.d.ts +2 -1
  60. package/dist/components/VvNav/VvNavItem.vue.d.ts +2 -1
  61. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -1
  62. package/dist/components/VvNavItem/VvNavItem.es.js +1 -337
  63. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +1 -24
  64. package/dist/components/VvProgress/VvProgress.es.js +1 -163
  65. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -1
  66. package/dist/components/VvRadio/VvRadio.es.js +1 -661
  67. package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -2
  68. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +1 -901
  69. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -1
  70. package/dist/components/VvSelect/VvSelect.es.js +1 -1103
  71. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  72. package/dist/components/VvSelect/VvSelect.vue.d.ts +130 -71
  73. package/dist/components/VvTab/VvTab.es.js +1 -558
  74. package/dist/components/VvTab/VvTab.vue.d.ts +2 -1
  75. package/dist/components/VvTextarea/VvTextarea.es.js +2 -1989
  76. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  77. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +2 -1
  78. package/dist/components/VvTooltip/VvTooltip.es.js +1 -154
  79. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -1
  80. package/dist/components/index.es.js +6 -8558
  81. package/dist/components/index.umd.js +1 -1
  82. package/dist/composables/index.es.js +2 -247
  83. package/dist/composables/index.umd.js +1 -1
  84. package/dist/directives/index.es.js +2 -311
  85. package/dist/directives/index.umd.js +1 -1
  86. package/dist/directives/v-contextmenu.es.js +2 -142
  87. package/dist/directives/v-contextmenu.umd.js +1 -1
  88. package/dist/directives/v-tooltip.es.js +1 -172
  89. package/dist/icons.es.js +1 -39
  90. package/dist/icons.umd.js +1 -1
  91. package/dist/index.es.js +1 -219
  92. package/dist/resolvers/unplugin.es.js +1 -187
  93. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +14 -14
  94. package/package.json +37 -37
@@ -1,317 +1 @@
1
- import { computed, unref, defineComponent, ref, toRefs, createBlock, openBlock, Transition, mergeProps, toHandlers, withCtx, withDirectives, createElementVNode, withModifiers, createElementBlock, createCommentVNode, renderSlot, createTextVNode, toDisplayString, vShow } from "vue";
2
- import { useVModel, onClickOutside } from "@vueuse/core";
3
- var StorageType = /* @__PURE__ */ ((StorageType2) => {
4
- StorageType2["local"] = "local";
5
- StorageType2["session"] = "session";
6
- return StorageType2;
7
- })(StorageType || {});
8
- var Side = /* @__PURE__ */ ((Side2) => {
9
- Side2["left"] = "left";
10
- Side2["right"] = "right";
11
- Side2["top"] = "top";
12
- Side2["bottom"] = "bottom";
13
- return Side2;
14
- })(Side || {});
15
- var Position = /* @__PURE__ */ ((Position2) => {
16
- Position2["before"] = "before";
17
- Position2["after"] = "after";
18
- return Position2;
19
- })(Position || {});
20
- var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
21
- ButtonType2["button"] = "button";
22
- ButtonType2["submit"] = "submit";
23
- ButtonType2["reset"] = "reset";
24
- return ButtonType2;
25
- })(ButtonType || {});
26
- var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
27
- ActionTag2["nuxtLink"] = "nuxt-link";
28
- ActionTag2["routerLink"] = "router-link";
29
- ActionTag2["a"] = "a";
30
- ActionTag2["button"] = "button";
31
- return ActionTag2;
32
- })(ActionTag || {});
33
- const ModifiersProps = {
34
- /**
35
- * Component BEM modifiers
36
- */
37
- modifiers: {
38
- type: [String, Array],
39
- default: void 0
40
- }
41
- };
42
- ({
43
- /**
44
- * VvIcon position
45
- */
46
- iconPosition: {
47
- default: Position.before
48
- }
49
- });
50
- const IdProps = {
51
- /**
52
- * Global attribute id
53
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
54
- */
55
- id: [String, Number]
56
- };
57
- ({
58
- /**
59
- * Dropdown placement
60
- */
61
- placement: {
62
- default: Side.bottom
63
- }
64
- });
65
- ({
66
- /**
67
- * Button type
68
- */
69
- type: {
70
- default: ButtonType.button
71
- },
72
- /**
73
- * Default tag for the action
74
- */
75
- defaultTag: {
76
- default: ActionTag.button
77
- }
78
- });
79
- ({
80
- storageType: {
81
- default: StorageType.local
82
- }
83
- });
84
- const VvDialogEvents = [
85
- "open",
86
- "close",
87
- "update:modelValue",
88
- "beforeEnter",
89
- "afterLeave",
90
- "enter",
91
- "afterEnter",
92
- "enterCancelled",
93
- "beforeLeave",
94
- "leave",
95
- "leaveCancelled"
96
- ];
97
- const VvDialogProps = {
98
- ...ModifiersProps,
99
- ...IdProps,
100
- /**
101
- * Dialog title
102
- */
103
- title: String,
104
- /**
105
- * Show / hide dialog programmatically
106
- */
107
- modelValue: {
108
- type: Boolean,
109
- default: void 0
110
- },
111
- /**
112
- * Dialog transition
113
- */
114
- transition: { type: String, default: "fade-block" },
115
- /**
116
- * Dialog size
117
- * @deprecated use modifiers instead
118
- */
119
- size: String,
120
- /**
121
- * Keep open dialog on click outside
122
- */
123
- keepOpen: { type: Boolean, default: false },
124
- /**
125
- * Close button label
126
- */
127
- labelClose: { type: String, default: "Close" }
128
- };
129
- function useModifiers(prefix, modifiers, others) {
130
- return computed(() => {
131
- const toReturn = {
132
- [prefix]: true
133
- };
134
- const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
135
- if (modifiersArray) {
136
- if (Array.isArray(modifiersArray)) {
137
- modifiersArray.forEach((modifier) => {
138
- if (modifier) {
139
- toReturn[`${prefix}--${modifier}`] = true;
140
- }
141
- });
142
- }
143
- }
144
- if (others) {
145
- Object.keys(others.value).forEach((key) => {
146
- toReturn[`${prefix}--${key}`] = unref(others.value[key]);
147
- });
148
- }
149
- return toReturn;
150
- });
151
- }
152
- const _hoisted_1 = {
153
- key: 0,
154
- class: "vv-dialog__header"
155
- };
156
- const _hoisted_2 = ["aria-label", "title"];
157
- const _hoisted_3 = { class: "vv-dialog__content" };
158
- const _hoisted_4 = {
159
- key: 1,
160
- class: "vv-dialog__footer"
161
- };
162
- const __default__ = {
163
- name: "VvDialog"
164
- };
165
- const _sfc_main = /* @__PURE__ */ defineComponent({
166
- ...__default__,
167
- props: VvDialogProps,
168
- emits: VvDialogEvents,
169
- setup(__props, { expose: __expose, emit: __emit }) {
170
- const props = __props;
171
- const emit = __emit;
172
- const dialogEl = ref();
173
- const modelValue = useVModel(props, "modelValue", emit);
174
- const localModelValue = ref(false);
175
- const isOpened = computed({
176
- get: () => modelValue.value ?? localModelValue.value,
177
- set: (newValue) => {
178
- if (modelValue.value === void 0) {
179
- localModelValue.value = newValue;
180
- return;
181
- }
182
- modelValue.value = newValue;
183
- }
184
- });
185
- const modalWrapper = ref(null);
186
- const { modifiers } = toRefs(props);
187
- const bemCssClasses = useModifiers(
188
- "vv-dialog",
189
- modifiers,
190
- // DEPRECATED: Must be removed in the future
191
- computed(() => {
192
- if (props.size) {
193
- return { [props.size]: !!props.size };
194
- }
195
- return {};
196
- })
197
- );
198
- const dialogAttrs = computed(() => {
199
- const { id } = props;
200
- return {
201
- id
202
- };
203
- });
204
- const transitioName = computed(() => `vv-dialog--${props.transition}`);
205
- const dialogTransitionHandlers = {
206
- "before-enter": () => {
207
- if (!dialogEl.value?.open) {
208
- dialogEl.value?.showModal();
209
- }
210
- emit("open");
211
- emit("beforeEnter");
212
- },
213
- "after-leave": () => {
214
- if (dialogEl.value?.open) {
215
- dialogEl.value?.close();
216
- }
217
- emit("close");
218
- emit("afterLeave");
219
- },
220
- "enter": () => {
221
- emit("enter");
222
- },
223
- "after-enter": () => {
224
- emit("afterEnter");
225
- },
226
- "enter-cancelled": () => {
227
- emit("enterCancelled");
228
- },
229
- "before-leave": () => {
230
- emit("beforeLeave");
231
- },
232
- "leave": () => {
233
- emit("leave");
234
- },
235
- "leave-cancelled": () => {
236
- emit("leaveCancelled");
237
- }
238
- };
239
- onClickOutside(modalWrapper, () => {
240
- if (!props.keepOpen) {
241
- close();
242
- }
243
- });
244
- function close() {
245
- isOpened.value = false;
246
- }
247
- function open() {
248
- isOpened.value = true;
249
- }
250
- __expose({ close, open });
251
- function onCancel() {
252
- if (!props.keepOpen) {
253
- close();
254
- }
255
- }
256
- return (_ctx, _cache) => {
257
- return openBlock(), createBlock(Transition, mergeProps({ name: unref(transitioName) }, toHandlers(dialogTransitionHandlers), { persisted: "" }), {
258
- default: withCtx(() => [
259
- withDirectives(createElementVNode(
260
- "dialog",
261
- mergeProps(unref(dialogAttrs), {
262
- ref_key: "dialogEl",
263
- ref: dialogEl,
264
- class: unref(bemCssClasses),
265
- onCancel: withModifiers(onCancel, ["stop", "prevent"])
266
- }),
267
- [
268
- createElementVNode(
269
- "article",
270
- {
271
- ref_key: "modalWrapper",
272
- ref: modalWrapper,
273
- class: "vv-dialog__wrapper"
274
- },
275
- [
276
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1, [
277
- renderSlot(_ctx.$slots, "header", {}, () => [
278
- createTextVNode(
279
- toDisplayString(_ctx.title) + " ",
280
- 1
281
- /* TEXT */
282
- ),
283
- createElementVNode("button", {
284
- type: "button",
285
- "aria-label": _ctx.labelClose,
286
- title: _ctx.labelClose,
287
- class: "vv-dialog__close",
288
- onClickPassive: close
289
- }, null, 40, _hoisted_2)
290
- ])
291
- ])) : createCommentVNode("v-if", true),
292
- createElementVNode("div", _hoisted_3, [
293
- renderSlot(_ctx.$slots, "default")
294
- ]),
295
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4, [
296
- renderSlot(_ctx.$slots, "footer")
297
- ])) : createCommentVNode("v-if", true)
298
- ],
299
- 512
300
- /* NEED_PATCH */
301
- )
302
- ],
303
- 16
304
- /* FULL_PROPS */
305
- ), [
306
- [vShow, unref(isOpened)]
307
- ])
308
- ]),
309
- _: 3
310
- /* FORWARDED */
311
- }, 16, ["name"]);
312
- };
313
- }
314
- });
315
- export {
316
- _sfc_main as default
317
- };
1
+ import{computed as e,unref as t,defineComponent as l,ref as o,toRefs as a,createBlock as r,openBlock as n,Transition as s,mergeProps as i,toHandlers as u,withCtx as v,withDirectives as f,createElementVNode as d,withModifiers as c,createElementBlock as p,createCommentVNode as b,renderSlot as m,createTextVNode as g,toDisplayString as y,vShow as k}from"vue";import{useVModel as _,onClickOutside as C}from"@vueuse/core";var $=/* @__PURE__ */(e=>(e.local="local",e.session="session",e))($||{}),h=/* @__PURE__ */(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(h||{}),E=/* @__PURE__ */(e=>(e.before="before",e.after="after",e))(E||{}),L=/* @__PURE__ */(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(L||{}),S=/* @__PURE__ */(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(S||{});const x={modifiers:{type:[String,Array],default:void 0}};E.before;const z={id:[String,Number]};h.bottom,L.button,S.button,$.local;const O={...x,...z,title:String,modelValue:{type:Boolean,default:void 0},transition:{type:String,default:"fade-block"},size:String,keepOpen:{type:Boolean,default:!1},labelClose:{type:String,default:"Close"}};const V={key:0,class:"vv-dialog__header"},A=["aria-label","title"],w={class:"vv-dialog__content"},B={key:1,class:"vv-dialog__footer"},j=/* @__PURE__ */l({name:"VvDialog",props:O,emits:["open","close","update:modelValue","beforeEnter","afterLeave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(l,{expose:$,emit:h}){const E=l,L=h,S=o(),x=_(E,"modelValue",L),z=o(!1),O=e({get:()=>x.value??z.value,set:e=>{void 0!==x.value?x.value=e:z.value=e}}),j=o(null),{modifiers:D}=a(E),M=function(l,o,a){return e(()=>{const e={[l]:!0},r="string"==typeof o?.value?o.value.split(" "):o?.value;return r&&Array.isArray(r)&&r.forEach(t=>{t&&(e[`${l}--${t}`]=!0)}),a&&Object.keys(a.value).forEach(o=>{e[`${l}--${o}`]=t(a.value[o])}),e})}("vv-dialog",D,e(()=>E.size?{[E.size]:!!E.size}:{})),N=e(()=>{const{id:e}=E;return{id:e}}),P=e(()=>`vv-dialog--${E.transition}`),W={"before-enter":()=>{S.value?.open||S.value?.showModal(),L("open"),L("beforeEnter")},"after-leave":()=>{S.value?.open&&S.value?.close(),L("close"),L("afterLeave")},enter:()=>{L("enter")},"after-enter":()=>{L("afterEnter")},"enter-cancelled":()=>{L("enterCancelled")},"before-leave":()=>{L("beforeLeave")},leave:()=>{L("leave")},"leave-cancelled":()=>{L("leaveCancelled")}};function q(){O.value=!1}function F(){E.keepOpen||q()}return C(j,()=>{E.keepOpen||q()}),$({close:q,open:function(){O.value=!0}}),(e,l)=>(n(),r(s,i({name:t(P)},u(W),{persisted:""}),{default:v(()=>[f(d("dialog",i(t(N),{ref_key:"dialogEl",ref:S,class:t(M),onCancel:c(F,["stop","prevent"])}),[d("article",{ref_key:"modalWrapper",ref:j,class:"vv-dialog__wrapper"},[e.$slots.header||e.title?(n(),p("header",V,[m(e.$slots,"header",{},()=>[g(y(e.title)+" ",1),d("button",{type:"button","aria-label":e.labelClose,title:e.labelClose,class:"vv-dialog__close",onClickPassive:q},null,40,A)])])):b("v-if",!0),d("div",w,[m(e.$slots,"default")]),e.$slots.footer?(n(),p("footer",B,[m(e.$slots,"footer")])):b("v-if",!0)],512)],16),[[k,t(O)]])]),_:3},16,["name"]))}});export{j as default};
@@ -1,4 +1,4 @@
1
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
1
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
2
  title: StringConstructor;
3
3
  modelValue: {
4
4
  type: BooleanConstructor;
@@ -62,6 +62,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
62
62
  } & {
63
63
  footer?: (props: {}) => any;
64
64
  }>;
65
+ declare const _default: typeof __VLS_export;
65
66
  export default _default;
66
67
  type __VLS_WithSlots<T, S> = T & {
67
68
  new (): {