@volverjs/ui-vue 0.0.2 → 0.0.3-beta.3
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/auto-imports.d.ts +289 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +63 -131
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -2
- package/dist/components/VvAccordion/index.d.ts +2 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +97 -176
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +4 -4
- package/dist/components/VvAccordionGroup/index.d.ts +2 -2
- package/dist/components/VvBadge/VvBadge.es.js +16 -50
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +38 -45
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +170 -306
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +4 -4
- package/dist/components/VvButton/index.d.ts +3 -3
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +39 -84
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvCard/VvCard.es.js +26 -60
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +2 -2
- package/dist/components/VvCard/index.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +144 -282
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +6 -6
- package/dist/components/VvCheckbox/index.d.ts +10 -4
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -346
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/index.d.ts +3 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +330 -487
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +8 -8
- package/dist/components/VvCombobox/index.d.ts +4 -4
- package/dist/components/VvDialog/VvDialog.es.js +66 -102
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +61 -185
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -2
- package/dist/components/VvDropdown/index.d.ts +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +30 -65
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +304 -407
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +5 -5
- package/dist/components/VvProgress/VvProgress.es.js +17 -51
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +110 -249
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +6 -6
- package/dist/components/VvRadio/index.d.ts +3 -3
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +161 -318
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
- package/dist/components/VvRadioGroup/index.d.ts +3 -3
- package/dist/components/VvSelect/VvSelect.es.js +200 -292
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +8 -8
- package/dist/components/VvSelect/index.d.ts +4 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +196 -299
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +6 -6
- package/dist/components/VvTextarea/index.d.ts +3 -3
- package/dist/components/VvTooltip/VvTooltip.es.js +28 -0
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -0
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +23 -0
- package/dist/components/VvTooltip/index.d.ts +18 -0
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.es.js +1179 -1371
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useComponentIcons.d.ts +1 -1
- package/dist/composables/useDebouncedInput.d.ts +1 -1
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/composables/useTextCount.d.ts +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +1211 -1404
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +12 -12
- package/dist/stories/Tooltip/Tooltip.settings.d.ts +42 -0
- package/dist/stories/Tooltip/Tooltip.test.d.ts +2 -0
- package/dist/utils/ObjectUtilities.d.ts +1 -1
- package/package.json +27 -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 +0 -3
- package/src/components/VvAccordion/index.ts +1 -2
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +1 -3
- package/src/components/VvBadge/VvBadge.vue +0 -1
- package/src/components/VvButton/VvButton.vue +0 -3
- package/src/components/VvButton/index.ts +2 -10
- package/src/components/VvButtonGroup/VvButtonGroup.vue +0 -3
- package/src/components/VvCard/VvCard.vue +0 -1
- package/src/components/VvCheckbox/VvCheckbox.vue +0 -3
- package/src/components/VvCheckbox/index.ts +1 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +0 -5
- package/src/components/VvCombobox/VvCombobox.vue +0 -7
- package/src/components/VvDialog/VvDialog.vue +1 -2
- package/src/components/VvDropdown/VvDropdown.vue +0 -4
- package/src/components/VvIcon/VvIcon.vue +0 -2
- package/src/components/VvInputText/VvInputClearAction.ts +0 -1
- package/src/components/VvInputText/VvInputPasswordAction.ts +0 -1
- package/src/components/VvInputText/VvInputStepAction.ts +0 -1
- package/src/components/VvInputText/VvInputText.vue +1 -16
- package/src/components/VvInputText/VvInputTextActions.ts +1 -1
- package/src/components/VvProgress/VvProgress.vue +0 -2
- package/src/components/VvRadio/VvRadio.vue +0 -3
- package/src/components/VvRadio/index.ts +0 -1
- package/src/components/VvRadioGroup/VvRadioGroup.vue +0 -5
- package/src/components/VvSelect/VvSelect.vue +1 -14
- package/src/components/VvTextarea/VvTextarea.vue +1 -15
- package/src/components/VvTooltip/VvTooltip.vue +17 -0
- package/src/components/VvTooltip/index.ts +21 -0
- package/src/components/common/HintSlot.ts +1 -11
- package/src/composables/group/types/IAccordionGroupState.ts +0 -1
- package/src/composables/group/types/IButtonGroupState.ts +0 -1
- package/src/composables/group/types/IInputGroup.ts +0 -1
- package/src/composables/group/useInjectedGroupState.ts +1 -2
- package/src/composables/group/useProvideGroupState.ts +0 -1
- package/src/composables/useComponentFocus.ts +1 -2
- package/src/composables/useComponentIcons.ts +1 -1
- package/src/composables/useDebouncedInput.ts +1 -1
- package/src/composables/useModifiers.ts +1 -2
- package/src/composables/useOptions.ts +0 -1
- package/src/composables/useTextCount.ts +1 -1
- package/src/stories/Accordion/Accordion.stories.mdx +1 -1
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +1 -1
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
- package/src/stories/Badge/Badge.stories.mdx +1 -1
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +0 -1
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +1 -1
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +1 -1
- package/src/stories/Button/Button.stories.mdx +1 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +3 -3
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +0 -1
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +1 -1
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +1 -1
- package/src/stories/Card/Card.stories.mdx +1 -1
- package/src/stories/Card/CardSlots.stories.mdx +1 -1
- package/src/stories/Checkbox/Checkbox.stories.mdx +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +1 -1
- package/src/stories/Combobox/Combobox.settings.ts +0 -1
- package/src/stories/Combobox/Combobox.stories.mdx +1 -1
- package/src/stories/Dialog/Dialog.stories.mdx +1 -1
- package/src/stories/Dropdown/Dropdown.settings.ts +0 -1
- package/src/stories/Dropdown/Dropdown.stories.mdx +1 -1
- package/src/stories/Icon/Icon.settings.ts +0 -1
- package/src/stories/Icon/Icon.stories.mdx +1 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +1 -1
- package/src/stories/InputText/InputText.settings.ts +0 -1
- package/src/stories/InputText/InputText.stories.mdx +1 -1
- package/src/stories/Progress/Progress.stories.mdx +1 -1
- package/src/stories/Radio/Radio.stories.mdx +1 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +1 -1
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +1 -1
- package/src/stories/Select/Select.settings.ts +0 -1
- package/src/stories/Select/Select.stories.mdx +1 -1
- package/src/stories/Textarea/Textarea.settings.ts +0 -1
- package/src/stories/Textarea/Textarea.stories.mdx +1 -1
- package/src/stories/Tooltip/Tooltip.settings.ts +25 -0
- package/src/stories/Tooltip/Tooltip.stories.mdx +98 -0
- package/src/stories/Tooltip/Tooltip.test.ts +49 -0
- package/src/utils/ObjectUtilities.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonIconPosition } from '@/components/VvButton';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
3
|
icon: {
|
|
4
|
-
type: (
|
|
4
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
5
5
|
default: string;
|
|
6
6
|
};
|
|
7
7
|
iconPosition: {
|
|
@@ -20,7 +20,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
22
|
to: {
|
|
23
|
-
type: (
|
|
23
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
24
24
|
};
|
|
25
25
|
href: StringConstructor;
|
|
26
26
|
target: {
|
|
@@ -51,7 +51,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
51
51
|
modifiers: import("vue").PropType<string | string[]>;
|
|
52
52
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
53
|
icon: {
|
|
54
|
-
type: (
|
|
54
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
55
55
|
default: string;
|
|
56
56
|
};
|
|
57
57
|
iconPosition: {
|
|
@@ -70,7 +70,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
70
70
|
default: string;
|
|
71
71
|
};
|
|
72
72
|
to: {
|
|
73
|
-
type: (
|
|
73
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
74
74
|
};
|
|
75
75
|
href: StringConstructor;
|
|
76
76
|
target: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Ref, PropType, ExtractPropTypes } from 'vue';
|
|
2
2
|
import type IButtonGroupState from '@/composables/group/types/IButtonGroupState';
|
|
3
3
|
export declare enum ButtonIconPosition {
|
|
4
4
|
left = "left",
|
|
@@ -29,7 +29,7 @@ export declare const VvButtonProps: {
|
|
|
29
29
|
* Button icon
|
|
30
30
|
*/
|
|
31
31
|
icon: {
|
|
32
|
-
type: (
|
|
32
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
33
33
|
default: string;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
@@ -67,7 +67,7 @@ export declare const VvButtonProps: {
|
|
|
67
67
|
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
68
68
|
*/
|
|
69
69
|
to: {
|
|
70
|
-
type: (
|
|
70
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
73
73
|
* Link href
|
|
@@ -1,107 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
function G(e) {
|
|
4
|
-
if (Object.keys(e).some(
|
|
5
|
-
(r) => r !== "key" && !y(e[r])
|
|
6
|
-
))
|
|
7
|
-
throw Error("One or more groupState props aren't ref.");
|
|
8
|
-
b(
|
|
9
|
-
e.key,
|
|
10
|
-
d(() => e)
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
function c(e) {
|
|
14
|
-
var r, t;
|
|
15
|
-
if (e)
|
|
16
|
-
return (t = (r = e.match(
|
|
17
|
-
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
18
|
-
)) == null ? void 0 : r.join("-")) == null ? void 0 : t.toLowerCase();
|
|
19
|
-
}
|
|
20
|
-
function O(e, r) {
|
|
21
|
-
const t = { [`${e}`]: !0 };
|
|
22
|
-
return {
|
|
23
|
-
bemCssClasses: d(() => Object.keys(r).reduce((l, a) => {
|
|
24
|
-
const o = p(r[a]) || !1;
|
|
25
|
-
if (!o)
|
|
26
|
-
return l;
|
|
27
|
-
if (a === "modifiers") {
|
|
28
|
-
const n = Array.isArray(o) ? o : o.split(" ");
|
|
29
|
-
return {
|
|
30
|
-
...l,
|
|
31
|
-
...n.reduce(
|
|
32
|
-
(u, i) => ({
|
|
33
|
-
...u,
|
|
34
|
-
[`${e}--${c(i)}`]: !0
|
|
35
|
-
}),
|
|
36
|
-
{}
|
|
37
|
-
)
|
|
38
|
-
};
|
|
39
|
-
} else
|
|
40
|
-
return {
|
|
41
|
-
...l,
|
|
42
|
-
[`${e}--${c(a)}`]: o
|
|
43
|
-
};
|
|
44
|
-
}, t) || {})
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
const P = {
|
|
1
|
+
import { defineComponent as c, openBlock as f, createElementBlock as y, normalizeClass as v, unref as V, renderSlot as g } from "vue";
|
|
2
|
+
const B = "VV_BUTTON_GROUP", _ = {
|
|
48
3
|
disabled: Boolean
|
|
49
|
-
},
|
|
4
|
+
}, b = {
|
|
50
5
|
modifiers: [String, Array]
|
|
51
|
-
},
|
|
6
|
+
}, A = {
|
|
52
7
|
unselectable: { type: Boolean, default: !0 }
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
...
|
|
56
|
-
...
|
|
8
|
+
}, G = {
|
|
9
|
+
...b,
|
|
10
|
+
..._,
|
|
11
|
+
...A,
|
|
57
12
|
itemModifiers: { type: [String, Array], default: void 0 },
|
|
58
13
|
toggle: { type: Boolean, default: !1 },
|
|
59
14
|
multiple: { type: Boolean, default: !1 },
|
|
60
15
|
modelValue: { type: [String, Array], default: void 0 }
|
|
61
|
-
},
|
|
16
|
+
}, P = ["update:modelValue"], S = {
|
|
62
17
|
name: "VvButtonGroup"
|
|
63
|
-
},
|
|
64
|
-
...
|
|
65
|
-
props:
|
|
66
|
-
emits:
|
|
67
|
-
setup(
|
|
68
|
-
const
|
|
69
|
-
disabled:
|
|
70
|
-
toggle:
|
|
71
|
-
modifiers:
|
|
18
|
+
}, M = /* @__PURE__ */ c({
|
|
19
|
+
...S,
|
|
20
|
+
props: G,
|
|
21
|
+
emits: P,
|
|
22
|
+
setup(r, { emit: l }) {
|
|
23
|
+
const e = r, {
|
|
24
|
+
disabled: s,
|
|
25
|
+
toggle: a,
|
|
26
|
+
modifiers: u,
|
|
72
27
|
multiple: o,
|
|
73
28
|
unselectable: n,
|
|
74
|
-
itemModifiers:
|
|
75
|
-
} =
|
|
76
|
-
|
|
77
|
-
typeof
|
|
29
|
+
itemModifiers: i
|
|
30
|
+
} = toRefs(e);
|
|
31
|
+
watchEffect(() => {
|
|
32
|
+
typeof e.modelValue == "string" && o.value && console.warn(
|
|
78
33
|
"[VvButtonGroup]: modelValue is a string but multiple is true."
|
|
79
34
|
);
|
|
80
35
|
});
|
|
81
|
-
const
|
|
82
|
-
get: () => o.value ?
|
|
83
|
-
set: (
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
toggle: l,
|
|
36
|
+
const d = computed({
|
|
37
|
+
get: () => o.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue,
|
|
38
|
+
set: (t) => (t !== void 0 && (Array.isArray(e.modelValue) || o.value) && !Array.isArray(t) && (t = [t]), l("update:modelValue", t))
|
|
39
|
+
}), p = {
|
|
40
|
+
key: B,
|
|
41
|
+
modelValue: d,
|
|
42
|
+
disabled: s,
|
|
43
|
+
toggle: a,
|
|
90
44
|
multiple: o,
|
|
91
45
|
unselectable: n,
|
|
92
|
-
itemModifiers:
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
46
|
+
itemModifiers: i
|
|
47
|
+
};
|
|
48
|
+
useProvideGroupState(p);
|
|
49
|
+
const { bemCssClasses: m } = useBemModifiers("vv-button-group", {
|
|
50
|
+
modifiers: u
|
|
96
51
|
});
|
|
97
|
-
return (
|
|
98
|
-
class:
|
|
52
|
+
return (t, U) => (f(), y("div", {
|
|
53
|
+
class: v(V(m)),
|
|
99
54
|
role: "group"
|
|
100
55
|
}, [
|
|
101
|
-
|
|
56
|
+
g(t.$slots, "default")
|
|
102
57
|
], 2));
|
|
103
58
|
}
|
|
104
59
|
});
|
|
105
60
|
export {
|
|
106
|
-
|
|
61
|
+
M as default
|
|
107
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("vue")):typeof define=="function"&&define.amd?define(["vue"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.VvButtonGroup=s(e.vue))})(this,function(e){"use strict";const s="VV_BUTTON_GROUP",l={...{modifiers:[String,Array]},...{disabled:Boolean},...{unselectable:{type:Boolean,default:!0}},itemModifiers:{type:[String,Array],default:void 0},toggle:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},modelValue:{type:[String,Array],default:void 0}},n=["update:modelValue"],u={name:"VvButtonGroup"};return e.defineComponent({...u,props:l,emits:n,setup(i,{emit:a}){const t=i,{disabled:d,toggle:p,modifiers:f,multiple:r,unselectable:c,itemModifiers:m}=toRefs(t);watchEffect(()=>{typeof t.modelValue=="string"&&r.value&&console.warn("[VvButtonGroup]: modelValue is a string but multiple is true.")});const y=computed({get:()=>r.value?t.modelValue:Array.isArray(t.modelValue)?t.modelValue[0]:t.modelValue,set:o=>(o!==void 0&&(Array.isArray(t.modelValue)||r.value)&&!Array.isArray(o)&&(o=[o]),a("update:modelValue",o))}),V={key:s,modelValue:y,disabled:d,toggle:p,multiple:r,unselectable:c,itemModifiers:m};useProvideGroupState(V);const{bemCssClasses:v}=useBemModifiers("vv-button-group",{modifiers:f});return(o,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(v)),role:"group"},[e.renderSlot(o.$slots,"default")],2))}})});
|
|
@@ -1,77 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var r, t;
|
|
4
|
-
if (s)
|
|
5
|
-
return (t = (r = s.match(
|
|
6
|
-
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
7
|
-
)) == null ? void 0 : r.join("-")) == null ? void 0 : t.toLowerCase();
|
|
8
|
-
}
|
|
9
|
-
function y(s, r) {
|
|
10
|
-
const t = { [`${s}`]: !0 };
|
|
11
|
-
return {
|
|
12
|
-
bemCssClasses: $(() => Object.keys(r).reduce((n, l) => {
|
|
13
|
-
const o = f(r[l]) || !1;
|
|
14
|
-
if (!o)
|
|
15
|
-
return n;
|
|
16
|
-
if (l === "modifiers") {
|
|
17
|
-
const m = Array.isArray(o) ? o : o.split(" ");
|
|
18
|
-
return {
|
|
19
|
-
...n,
|
|
20
|
-
...m.reduce(
|
|
21
|
-
(C, _) => ({
|
|
22
|
-
...C,
|
|
23
|
-
[`${s}--${u(_)}`]: !0
|
|
24
|
-
}),
|
|
25
|
-
{}
|
|
26
|
-
)
|
|
27
|
-
};
|
|
28
|
-
} else
|
|
29
|
-
return {
|
|
30
|
-
...n,
|
|
31
|
-
[`${s}--${u(l)}`]: o
|
|
32
|
-
};
|
|
33
|
-
}, t) || {})
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
const k = {
|
|
1
|
+
import { defineComponent as d, openBlock as s, createElementBlock as o, normalizeClass as i, unref as c, renderSlot as t, createTextVNode as f, toDisplayString as m, createCommentVNode as r } from "vue";
|
|
2
|
+
const p = {
|
|
37
3
|
title: String,
|
|
38
4
|
modifiers: [String, Array]
|
|
39
|
-
},
|
|
5
|
+
}, u = {
|
|
40
6
|
key: 0,
|
|
41
7
|
class: "vv-card__header"
|
|
42
|
-
},
|
|
8
|
+
}, v = {
|
|
43
9
|
key: 1,
|
|
44
10
|
class: "vv-card__content"
|
|
45
|
-
},
|
|
11
|
+
}, _ = {
|
|
46
12
|
key: 2,
|
|
47
13
|
class: "vv-card__footer"
|
|
48
|
-
},
|
|
14
|
+
}, h = {
|
|
49
15
|
name: "VvCard"
|
|
50
|
-
},
|
|
51
|
-
...
|
|
52
|
-
props:
|
|
53
|
-
setup(
|
|
54
|
-
const
|
|
55
|
-
modifiers:
|
|
16
|
+
}, k = /* @__PURE__ */ d({
|
|
17
|
+
...h,
|
|
18
|
+
props: p,
|
|
19
|
+
setup(a) {
|
|
20
|
+
const n = a, { bemCssClasses: l } = useBemModifiers("vv-card", {
|
|
21
|
+
modifiers: n.modifiers
|
|
56
22
|
});
|
|
57
|
-
return (e,
|
|
58
|
-
class:
|
|
23
|
+
return (e, C) => (s(), o("article", {
|
|
24
|
+
class: i(c(l))
|
|
59
25
|
}, [
|
|
60
|
-
e.$slots.header || e.title ? (
|
|
61
|
-
|
|
62
|
-
|
|
26
|
+
e.$slots.header || e.title ? (s(), o("header", u, [
|
|
27
|
+
t(e.$slots, "header", {}, () => [
|
|
28
|
+
f(m(e.title), 1)
|
|
63
29
|
])
|
|
64
|
-
])) :
|
|
65
|
-
|
|
66
|
-
e.$slots.content ? (
|
|
67
|
-
|
|
68
|
-
])) :
|
|
69
|
-
e.$slots.footer ? (
|
|
70
|
-
|
|
71
|
-
])) :
|
|
30
|
+
])) : r("", !0),
|
|
31
|
+
t(e.$slots, "default"),
|
|
32
|
+
e.$slots.content ? (s(), o("div", v, [
|
|
33
|
+
t(e.$slots, "content")
|
|
34
|
+
])) : r("", !0),
|
|
35
|
+
e.$slots.footer ? (s(), o("footer", _, [
|
|
36
|
+
t(e.$slots, "footer")
|
|
37
|
+
])) : r("", !0)
|
|
72
38
|
], 2));
|
|
73
39
|
}
|
|
74
40
|
});
|
|
75
41
|
export {
|
|
76
|
-
|
|
42
|
+
k as default
|
|
77
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t(require("vue")):typeof define=="function"&&define.amd?define(["vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,e.VvCard=t(e.vue))})(this,function(e){"use strict";const t={title:String,modifiers:[String,Array]},s={key:0,class:"vv-card__header"},r={key:1,class:"vv-card__content"},n={key:2,class:"vv-card__footer"},d={name:"VvCard"};return e.defineComponent({...d,props:t,setup(l){const i=l,{bemCssClasses:c}=useBemModifiers("vv-card",{modifiers:i.modifiers});return(o,f)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass(e.unref(c))},[o.$slots.header||o.title?(e.openBlock(),e.createElementBlock("header",s,[e.renderSlot(o.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default"),o.$slots.content?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(o.$slots,"content")])):e.createCommentVNode("",!0),o.$slots.footer?(e.openBlock(),e.createElementBlock("footer",n,[e.renderSlot(o.$slots,"footer")])):e.createCommentVNode("",!0)],2))}})});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
2
|
title: StringConstructor;
|
|
3
|
-
modifiers: (
|
|
3
|
+
modifiers: (StringConstructor | ArrayConstructor)[];
|
|
4
4
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5
5
|
title: StringConstructor;
|
|
6
|
-
modifiers: (
|
|
6
|
+
modifiers: (StringConstructor | ArrayConstructor)[];
|
|
7
7
|
}>>, {}>, {
|
|
8
8
|
header: (_: {}) => any;
|
|
9
9
|
default: (_: {}) => any;
|