@d0rich/esprit-design 0.5.0 → 1.0.0
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/CHANGELOG.md +6 -0
- package/README.md +157 -11
- package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/components/DChip.vue.js +14 -0
- package/dist/components/DChip.vue2.js +6 -0
- package/dist/components/DPagination.vue.js +116 -0
- package/dist/components/DPagination.vue2.js +4 -0
- package/dist/components/DStats.vue.js +367 -0
- package/dist/components/DStats.vue4.js +6 -0
- package/dist/components/animations/DAnimationAccordion.vue.js +47 -0
- package/dist/components/animations/DAnimationAccordion.vue3.js +5 -0
- package/dist/components/animations/DAnimationDefLetterD.vue.js +11 -0
- package/dist/components/animations/DAnimationDefLetterD.vue2.js +6 -0
- package/dist/components/animations/DAnimationFloatingLetter.vue.js +39 -0
- package/dist/components/animations/DAnimationFloatingLetter.vue3.js +5 -0
- package/dist/components/animations/DAnimationHypnosis.vue.js +46 -0
- package/dist/components/animations/DAnimationHypnosis.vue3.js +5 -0
- package/dist/components/animations/DAnimationSpinner.vue.js +80 -0
- package/dist/components/animations/DAnimationSpinner.vue3.js +5 -0
- package/dist/components/buttons/DBigBangButton.vue.js +56 -0
- package/dist/components/buttons/DBigBangButton.vue3.js +5 -0
- package/dist/components/buttons/DBigBangButtonAnimation.vue.js +97 -0
- package/dist/components/buttons/DBigBangButtonAnimation.vue3.js +5 -0
- package/dist/components/buttons/DBtn.vue.js +92 -0
- package/dist/components/buttons/DBtn.vue3.js +5 -0
- package/dist/components/cards/DCard.vue.js +50 -0
- package/dist/components/cards/DCard.vue3.js +5 -0
- package/dist/components/cards/DCardTitle.vue.js +30 -0
- package/dist/components/cards/DCardTitle.vue2.js +12 -0
- package/dist/components/content/DAlert.vue.js +61 -0
- package/dist/components/content/DAlert.vue3.js +5 -0
- package/dist/components/content/DQuote.vue.js +39 -0
- package/dist/components/content/DQuote.vue3.js +5 -0
- package/dist/components/index.js +61 -0
- package/dist/components/lists/DActionsFan.vue.js +101 -0
- package/dist/components/lists/DActionsFan.vue4.js +6 -0
- package/dist/components/lists/DActionsList.vue.js +89 -0
- package/dist/components/lists/DActionsList.vue3.js +5 -0
- package/dist/components/utils/DWrapBackground.vue.js +86 -0
- package/dist/components/utils/DWrapBackground.vue3.js +5 -0
- package/dist/components/utils/DWrapFocusHighlight.vue.js +93 -0
- package/dist/components/utils/DWrapFocusHighlight.vue5.js +7 -0
- package/dist/components/utils/DWrapShape.vue.js +73 -0
- package/dist/components/utils/DWrapShape.vue4.js +6 -0
- package/dist/composables/big-bang-button-utils.js +8 -0
- package/dist/composables/index.js +6 -0
- package/dist/composables/router.js +71 -0
- package/dist/composables/utils.js +7 -0
- package/dist/index.js +78 -0
- package/dist/style.css +869 -0
- package/dist/style.pure.css +2026 -0
- package/dist/style.tailwind.css +869 -0
- package/dist/utils/boundings.js +33 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/pagination.js +7 -0
- package/dist/utils/polygon-animation.js +85 -0
- package/package.json +31 -5
- package/tailwind.config.js +4 -1
- package/vite.config.ts +74 -10
- package/dist/esprit-design.css +0 -1
- package/dist/esprit-design.js +0 -2701
- package/dist/esprit-design.umd.cjs +0 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineComponent, useSlots, createBlock, openBlock, withCtx, createElementVNode, createElementBlock, createCommentVNode, createVNode, renderSlot, TransitionGroup, normalizeClass, Fragment, renderList, mergeProps, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import _sfc_main$2 from "../utils/DWrapFocusHighlight.vue.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
import _sfc_main$1 from "../utils/DWrapShape.vue.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
const _hoisted_1 = { class: "d-actions-list__body" };
|
|
10
|
+
const _hoisted_2 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "d-actions-list__header"
|
|
13
|
+
};
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...{
|
|
16
|
+
name: "DActionsList",
|
|
17
|
+
components: {
|
|
18
|
+
DWrapFocusHighlight: _sfc_main$2,
|
|
19
|
+
DWrapShape: _sfc_main$1
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
__name: "DActionsList",
|
|
23
|
+
props: {
|
|
24
|
+
actions: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => []
|
|
27
|
+
},
|
|
28
|
+
listClass: {
|
|
29
|
+
type: [String, Object],
|
|
30
|
+
default: ""
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ["actionFocus", "actionUnfocus", "actionChoose"],
|
|
34
|
+
setup(__props) {
|
|
35
|
+
function getCurrentHighlightVariant(action) {
|
|
36
|
+
var _a;
|
|
37
|
+
if ((_a = action.attrs) == null ? void 0 : _a.highlightVariant) return action.attrs.highlightVariant;
|
|
38
|
+
return "negative-list-item";
|
|
39
|
+
}
|
|
40
|
+
const slots = useSlots();
|
|
41
|
+
return (_ctx, _cache) => {
|
|
42
|
+
return openBlock(), createBlock(_sfc_main$1, { "shape-class": "d-actions-list__shape" }, {
|
|
43
|
+
default: withCtx(() => [
|
|
44
|
+
createElementVNode("div", _hoisted_1, [
|
|
45
|
+
slots.header ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
46
|
+
renderSlot(_ctx.$slots, "header")
|
|
47
|
+
])) : createCommentVNode("", true),
|
|
48
|
+
createVNode(TransitionGroup, {
|
|
49
|
+
name: "actions",
|
|
50
|
+
tag: "ul",
|
|
51
|
+
class: normalizeClass(["d-actions-list__list", __props.listClass])
|
|
52
|
+
}, {
|
|
53
|
+
default: withCtx(() => [
|
|
54
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (action) => {
|
|
55
|
+
return openBlock(), createElementBlock("li", {
|
|
56
|
+
key: action.title
|
|
57
|
+
}, [
|
|
58
|
+
createVNode(_sfc_main$2, mergeProps({ ref_for: true }, action.attrs, {
|
|
59
|
+
tag: "button",
|
|
60
|
+
variant: getCurrentHighlightVariant(action),
|
|
61
|
+
"no-passive-link": "",
|
|
62
|
+
onClick: ($event) => _ctx.$emit("actionChoose", action.emit),
|
|
63
|
+
onMouseenter: ($event) => _ctx.$emit("actionFocus", action.emit),
|
|
64
|
+
onTouchstart: ($event) => _ctx.$emit("actionFocus", action.emit),
|
|
65
|
+
onFocusin: ($event) => _ctx.$emit("actionFocus", action.emit),
|
|
66
|
+
onMouseleave: ($event) => _ctx.$emit("actionUnfocus", action.emit),
|
|
67
|
+
onTouchend: ($event) => _ctx.$emit("actionUnfocus", action.emit),
|
|
68
|
+
onFocusout: ($event) => _ctx.$emit("actionUnfocus", action.emit)
|
|
69
|
+
}), {
|
|
70
|
+
default: withCtx(() => [
|
|
71
|
+
createTextVNode(toDisplayString(action.title), 1)
|
|
72
|
+
]),
|
|
73
|
+
_: 2
|
|
74
|
+
}, 1040, ["variant", "onClick", "onMouseenter", "onTouchstart", "onFocusin", "onMouseleave", "onTouchend", "onFocusout"])
|
|
75
|
+
]);
|
|
76
|
+
}), 128))
|
|
77
|
+
]),
|
|
78
|
+
_: 1
|
|
79
|
+
}, 8, ["class"])
|
|
80
|
+
])
|
|
81
|
+
]),
|
|
82
|
+
_: 3
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
export {
|
|
88
|
+
_sfc_main as default
|
|
89
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { defineComponent, useSlots, computed, createBlock, openBlock, resolveDynamicComponent, withCtx, createElementBlock, createCommentVNode, normalizeStyle, normalizeClass, renderSlot } from "vue";
|
|
2
|
+
const _hoisted_1 = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "mbg__relative-container"
|
|
5
|
+
};
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "mbg__layer"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = {
|
|
11
|
+
key: 3,
|
|
12
|
+
class: "mbg__content"
|
|
13
|
+
};
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...{
|
|
16
|
+
name: "DWrapBackground"
|
|
17
|
+
},
|
|
18
|
+
__name: "DWrapBackground",
|
|
19
|
+
props: {
|
|
20
|
+
overlayClass: {
|
|
21
|
+
type: [String, Object],
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
overlayStyle: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => {
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
dotsClass: {
|
|
30
|
+
type: [String, Object],
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
dotsStyle: {
|
|
34
|
+
type: Object,
|
|
35
|
+
default: () => {
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
dots: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
41
|
+
},
|
|
42
|
+
tag: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "div"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
setup(__props) {
|
|
48
|
+
const props = __props;
|
|
49
|
+
const slots = useSlots();
|
|
50
|
+
const isOverlayStyleEmpty = computed(() => {
|
|
51
|
+
if (typeof props.overlayStyle === "string") return !props.overlayStyle.trim();
|
|
52
|
+
if (Array.isArray(props.overlayStyle)) return props.overlayStyle.length === 0;
|
|
53
|
+
if (props.overlayStyle === null) return true;
|
|
54
|
+
if (props.overlayStyle === void 0) return true;
|
|
55
|
+
return Object.keys(props.overlayStyle).length === 0;
|
|
56
|
+
});
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.tag), { class: "mbg__main-container" }, {
|
|
59
|
+
default: withCtx(() => [
|
|
60
|
+
__props.overlayClass || !isOverlayStyleEmpty.value || slots.svg || slots.default ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
61
|
+
__props.overlayClass || !isOverlayStyleEmpty.value ? (openBlock(), createElementBlock("div", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: normalizeClass(["mbg__layer", __props.overlayClass]),
|
|
64
|
+
style: normalizeStyle(__props.overlayStyle)
|
|
65
|
+
}, null, 6)) : createCommentVNode("", true),
|
|
66
|
+
slots.svg ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
67
|
+
renderSlot(_ctx.$slots, "svg")
|
|
68
|
+
])) : createCommentVNode("", true),
|
|
69
|
+
__props.dots ? (openBlock(), createElementBlock("div", {
|
|
70
|
+
key: 2,
|
|
71
|
+
class: normalizeClass(["mbg__layer mbg__dots", __props.dotsClass]),
|
|
72
|
+
style: normalizeStyle(__props.dotsStyle)
|
|
73
|
+
}, null, 6)) : createCommentVNode("", true),
|
|
74
|
+
slots.default ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
75
|
+
renderSlot(_ctx.$slots, "default")
|
|
76
|
+
])) : createCommentVNode("", true)
|
|
77
|
+
])) : createCommentVNode("", true)
|
|
78
|
+
]),
|
|
79
|
+
_: 3
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
_sfc_main as default
|
|
86
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineComponent, computed, createBlock, openBlock, withCtx, resolveDynamicComponent, mergeProps, createElementBlock, createCommentVNode, renderSlot, normalizeClass } from "vue";
|
|
2
|
+
import _sfc_main$1 from "./DWrapShape.vue.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
const _hoisted_1 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "d-focus-hl__hl--negative-tile"
|
|
8
|
+
};
|
|
9
|
+
const _hoisted_2 = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "d-focus-hl__hl--negative-list-item"
|
|
12
|
+
};
|
|
13
|
+
const _hoisted_3 = {
|
|
14
|
+
key: 4,
|
|
15
|
+
class: "d-focus-hl__hl--negative-tile"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_4 = {
|
|
18
|
+
key: 5,
|
|
19
|
+
class: "d-focus-hl__hl--negative-list-item"
|
|
20
|
+
};
|
|
21
|
+
const __default__ = {
|
|
22
|
+
name: "DWrapFocusHighlight",
|
|
23
|
+
components: {
|
|
24
|
+
DWrapShape: _sfc_main$1
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
|
+
...__default__,
|
|
29
|
+
props: {
|
|
30
|
+
/**
|
|
31
|
+
* If true, the highlight will be shown only if the link is exact string a URL.
|
|
32
|
+
*/
|
|
33
|
+
linkExact: Boolean,
|
|
34
|
+
/**
|
|
35
|
+
* Turn off the highlight for active links.
|
|
36
|
+
*/
|
|
37
|
+
noPassiveLink: Boolean,
|
|
38
|
+
/**
|
|
39
|
+
* Turn on the highlight even if the link is not active.
|
|
40
|
+
*/
|
|
41
|
+
active: Boolean,
|
|
42
|
+
variant: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "negative-tile"
|
|
45
|
+
},
|
|
46
|
+
tag: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "div"
|
|
49
|
+
},
|
|
50
|
+
colorClass: {
|
|
51
|
+
type: [String, Object],
|
|
52
|
+
default: "d-focus-hl--default-color"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
setup(__props) {
|
|
56
|
+
const props = __props;
|
|
57
|
+
const currentComponent = computed(() => {
|
|
58
|
+
if (props.to || props.href) return resolveComponent("NuxtLink");
|
|
59
|
+
return props.tag;
|
|
60
|
+
});
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
return openBlock(), createBlock(_sfc_main$1, null, {
|
|
63
|
+
default: withCtx(() => [
|
|
64
|
+
(openBlock(), createBlock(resolveDynamicComponent(currentComponent.value), mergeProps(props, {
|
|
65
|
+
class: ["d-focus-hl d-focusable", {
|
|
66
|
+
"d-focus-hl--exact": __props.linkExact,
|
|
67
|
+
"d-focus-hl--not-exact": !__props.linkExact,
|
|
68
|
+
"d-focus-hl--no-passive-link": __props.noPassiveLink,
|
|
69
|
+
"d-focus-hl--active": __props.active
|
|
70
|
+
}]
|
|
71
|
+
}), {
|
|
72
|
+
default: withCtx(() => [
|
|
73
|
+
__props.variant === "negative-tile" ? (openBlock(), createElementBlock("div", _hoisted_1)) : __props.variant === "tile" || __props.variant === "composite-tile" ? (openBlock(), createElementBlock("div", {
|
|
74
|
+
key: 1,
|
|
75
|
+
class: normalizeClass(["d-focus-hl__hl--tile", __props.colorClass])
|
|
76
|
+
}, null, 2)) : __props.variant === "negative-list-item" ? (openBlock(), createElementBlock("div", _hoisted_2)) : __props.variant === "list-item" || __props.variant === "composite-list-item" ? (openBlock(), createElementBlock("div", {
|
|
77
|
+
key: 3,
|
|
78
|
+
class: normalizeClass(["d-focus-hl__hl--list-item", __props.colorClass])
|
|
79
|
+
}, null, 2)) : createCommentVNode("", true),
|
|
80
|
+
renderSlot(_ctx.$slots, "default"),
|
|
81
|
+
__props.variant === "composite-tile" ? (openBlock(), createElementBlock("div", _hoisted_3)) : __props.variant === "composite-list-item" ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true)
|
|
82
|
+
]),
|
|
83
|
+
_: 3
|
|
84
|
+
}, 16, ["class"]))
|
|
85
|
+
]),
|
|
86
|
+
_: 3
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
export {
|
|
92
|
+
_sfc_main as default
|
|
93
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineComponent, useSlots, computed, createBlock, openBlock, resolveDynamicComponent, withCtx, createElementVNode, createElementBlock, createCommentVNode, renderSlot, normalizeStyle, normalizeClass } from "vue";
|
|
2
|
+
const _hoisted_1 = { class: "d-shape" };
|
|
3
|
+
const _hoisted_2 = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "d-shape__bg-wrapper"
|
|
6
|
+
};
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
...{
|
|
9
|
+
name: "DWrapShape"
|
|
10
|
+
},
|
|
11
|
+
__name: "DWrapShape",
|
|
12
|
+
props: {
|
|
13
|
+
shapeClass: {},
|
|
14
|
+
shapeStyle: { type: [Boolean, null, String, Object, Array] },
|
|
15
|
+
filterClass: {},
|
|
16
|
+
filterStyle: { type: [Boolean, null, String, Object, Array] },
|
|
17
|
+
tag: {}
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const slots = useSlots();
|
|
22
|
+
function isClassEmpty(cls) {
|
|
23
|
+
if (!cls) return true;
|
|
24
|
+
if (typeof cls === "string") return !cls.trim();
|
|
25
|
+
return Object.keys(cls).length === 0;
|
|
26
|
+
}
|
|
27
|
+
function isStyleEmpty(style) {
|
|
28
|
+
if (typeof style === "string") return !style.trim();
|
|
29
|
+
if (Array.isArray(style)) return style.length === 0;
|
|
30
|
+
if (style === null) return true;
|
|
31
|
+
if (style === void 0) return true;
|
|
32
|
+
return Object.keys(style).length === 0;
|
|
33
|
+
}
|
|
34
|
+
const isShapeCustomized = computed(() => {
|
|
35
|
+
if (slots["shape-content"]) return true;
|
|
36
|
+
if (!isClassEmpty(props.shapeClass)) return true;
|
|
37
|
+
return !isStyleEmpty(props.shapeStyle);
|
|
38
|
+
});
|
|
39
|
+
const isFilterCustomized = computed(() => {
|
|
40
|
+
if (!isClassEmpty(props.filterClass)) return true;
|
|
41
|
+
return !isStyleEmpty(props.filterStyle);
|
|
42
|
+
});
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag ?? "div"), null, {
|
|
45
|
+
default: withCtx(() => [
|
|
46
|
+
createElementVNode("div", _hoisted_1, [
|
|
47
|
+
isShapeCustomized.value || slots["bg-overlay"] || isFilterCustomized.value ? (openBlock(), createElementBlock("div", {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: normalizeClass(["d-shape__bg-filter", _ctx.filterClass]),
|
|
50
|
+
style: normalizeStyle(_ctx.filterStyle)
|
|
51
|
+
}, [
|
|
52
|
+
isShapeCustomized.value || slots["bg-overlay"] ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
53
|
+
isShapeCustomized.value ? (openBlock(), createElementBlock("div", {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: normalizeClass(["d-shape__bg", _ctx.shapeClass]),
|
|
56
|
+
style: normalizeStyle(_ctx.shapeStyle)
|
|
57
|
+
}, [
|
|
58
|
+
renderSlot(_ctx.$slots, "shape-content")
|
|
59
|
+
], 6)) : createCommentVNode("", true),
|
|
60
|
+
renderSlot(_ctx.$slots, "bg-overlay")
|
|
61
|
+
])) : createCommentVNode("", true)
|
|
62
|
+
], 6)) : createCommentVNode("", true),
|
|
63
|
+
renderSlot(_ctx.$slots, "default")
|
|
64
|
+
])
|
|
65
|
+
]),
|
|
66
|
+
_: 3
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
export {
|
|
72
|
+
_sfc_main as default
|
|
73
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { resolveDynamicComponent, computed } from "vue";
|
|
2
|
+
function useLink(props) {
|
|
3
|
+
const RouterLink = resolveDynamicComponent("RouterLink");
|
|
4
|
+
const NuxtLink = (
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
typeof defineNuxtLink === "function" ? (
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
defineNuxtLink({
|
|
9
|
+
componentName: "DNuxtLink"
|
|
10
|
+
})
|
|
11
|
+
) : void 0
|
|
12
|
+
);
|
|
13
|
+
const isLink = computed(() => !!(props.href || props.to));
|
|
14
|
+
const isExternalLink = computed(() => {
|
|
15
|
+
if (!props.href) return false;
|
|
16
|
+
const href = props.href;
|
|
17
|
+
return href.startsWith("http") || href.startsWith("mailto:") || href.startsWith("tel:") || href.startsWith("#");
|
|
18
|
+
});
|
|
19
|
+
const propsToProvide = computed(() => {
|
|
20
|
+
const propsToProvide2 = { ...props };
|
|
21
|
+
if (props.href && props.to) {
|
|
22
|
+
delete propsToProvide2.href;
|
|
23
|
+
} else if (props.href) {
|
|
24
|
+
delete propsToProvide2.to;
|
|
25
|
+
} else if (props.to) {
|
|
26
|
+
delete propsToProvide2.href;
|
|
27
|
+
}
|
|
28
|
+
return propsToProvide2;
|
|
29
|
+
});
|
|
30
|
+
if (isLink.value) {
|
|
31
|
+
if (isExternalLink.value) {
|
|
32
|
+
return {
|
|
33
|
+
isLink,
|
|
34
|
+
isExternalLink,
|
|
35
|
+
linkComponent: "a",
|
|
36
|
+
propsToProvide
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (typeof NuxtLink !== "undefined") {
|
|
40
|
+
return {
|
|
41
|
+
isLink,
|
|
42
|
+
isExternalLink,
|
|
43
|
+
linkComponent: NuxtLink,
|
|
44
|
+
propsToProvide
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
if (typeof RouterLink !== "string") {
|
|
48
|
+
return {
|
|
49
|
+
isLink,
|
|
50
|
+
isExternalLink,
|
|
51
|
+
linkComponent: RouterLink,
|
|
52
|
+
propsToProvide
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
isLink,
|
|
57
|
+
isExternalLink,
|
|
58
|
+
linkComponent: "a",
|
|
59
|
+
propsToProvide
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
isLink,
|
|
64
|
+
isExternalLink,
|
|
65
|
+
linkComponent: props.tag || "span",
|
|
66
|
+
propsToProvide
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
useLink
|
|
71
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { default as default2 } from "./components/DChip.vue.js";
|
|
2
|
+
import { default as default3 } from "./components/DPagination.vue.js";
|
|
3
|
+
import { default as default4 } from "./components/DStats.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { default as default5 } from "./components/animations/DAnimationAccordion.vue.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import { default as default6 } from "./components/animations/DAnimationFloatingLetter.vue.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import { default as default7 } from "./components/animations/DAnimationHypnosis.vue.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
import { default as default8 } from "./components/animations/DAnimationSpinner.vue.js";
|
|
13
|
+
/* empty css */
|
|
14
|
+
import { default as default9 } from "./components/buttons/DBigBangButtonAnimation.vue.js";
|
|
15
|
+
/* empty css */
|
|
16
|
+
import { default as default10 } from "./components/buttons/DBigBangButton.vue.js";
|
|
17
|
+
/* empty css */
|
|
18
|
+
import { default as default11 } from "./components/buttons/DBtn.vue.js";
|
|
19
|
+
/* empty css */
|
|
20
|
+
import { default as default12 } from "./components/cards/DCard.vue.js";
|
|
21
|
+
/* empty css */
|
|
22
|
+
import { default as default13 } from "./components/cards/DCardTitle.vue.js";
|
|
23
|
+
import { default as default14 } from "./components/content/DAlert.vue.js";
|
|
24
|
+
/* empty css */
|
|
25
|
+
import { default as default15 } from "./components/content/DQuote.vue.js";
|
|
26
|
+
/* empty css */
|
|
27
|
+
import { default as default16 } from "./components/lists/DActionsFan.vue.js";
|
|
28
|
+
/* empty css */
|
|
29
|
+
/* empty css */
|
|
30
|
+
import { default as default17 } from "./components/lists/DActionsList.vue.js";
|
|
31
|
+
/* empty css */
|
|
32
|
+
import { default as default18 } from "./components/utils/DWrapFocusHighlight.vue.js";
|
|
33
|
+
/* empty css */
|
|
34
|
+
/* empty css */
|
|
35
|
+
/* empty css */
|
|
36
|
+
import { default as default19 } from "./components/utils/DWrapBackground.vue.js";
|
|
37
|
+
/* empty css */
|
|
38
|
+
import { default as default20 } from "./components/utils/DWrapShape.vue.js";
|
|
39
|
+
/* empty css */
|
|
40
|
+
/* empty css */
|
|
41
|
+
import { useDBigBangButtonUtils } from "./composables/big-bang-button-utils.js";
|
|
42
|
+
import { useDPaginationUtils } from "./composables/utils.js";
|
|
43
|
+
import { getAbsoluteBoundings, getAbsoluteBoundingsGetters } from "./utils/boundings.js";
|
|
44
|
+
import { getLinkToPaginatedPage } from "./utils/pagination.js";
|
|
45
|
+
import { applyLinePerPointAnimation, applyStaticPoints, createCoordsFromArray, createLineEdgeFromArray, createLineFromArray, generatePolygonLineKeyframes, generatePolygonPointsKeyframes } from "./utils/polygon-animation.js";
|
|
46
|
+
export {
|
|
47
|
+
default16 as DActionsFan,
|
|
48
|
+
default17 as DActionsList,
|
|
49
|
+
default14 as DAlert,
|
|
50
|
+
default5 as DAnimationAccordion,
|
|
51
|
+
default6 as DAnimationFloatingLetter,
|
|
52
|
+
default7 as DAnimationHypnosis,
|
|
53
|
+
default8 as DAnimationSpinner,
|
|
54
|
+
default10 as DBigBangButton,
|
|
55
|
+
default9 as DBigBangButtonAnimation,
|
|
56
|
+
default11 as DBtn,
|
|
57
|
+
default12 as DCard,
|
|
58
|
+
default13 as DCardTitle,
|
|
59
|
+
default2 as DChip,
|
|
60
|
+
default3 as DPagination,
|
|
61
|
+
default15 as DQuote,
|
|
62
|
+
default4 as DStats,
|
|
63
|
+
default19 as DWrapBackground,
|
|
64
|
+
default18 as DWrapFocusHighlight,
|
|
65
|
+
default20 as DWrapShape,
|
|
66
|
+
applyLinePerPointAnimation,
|
|
67
|
+
applyStaticPoints,
|
|
68
|
+
createCoordsFromArray,
|
|
69
|
+
createLineEdgeFromArray,
|
|
70
|
+
createLineFromArray,
|
|
71
|
+
generatePolygonLineKeyframes,
|
|
72
|
+
generatePolygonPointsKeyframes,
|
|
73
|
+
getAbsoluteBoundings,
|
|
74
|
+
getAbsoluteBoundingsGetters,
|
|
75
|
+
getLinkToPaginatedPage,
|
|
76
|
+
useDBigBangButtonUtils,
|
|
77
|
+
useDPaginationUtils
|
|
78
|
+
};
|