@robuust-digital/vue-components 2.1.0 → 2.2.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/dist/_shared/ButtonBase.vue_vue_type_script_setup_true_lang-DeflHqux.js +60 -0
- package/dist/_shared/ChevronDownIcon-DaaXfD3C.js +41 -0
- package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-CP3x2DUA.js +266 -0
- package/dist/_shared/Drawer.vue_vue_type_script_setup_true_lang-CD5914Fk.js +185 -0
- package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-CmYj-7WQ.js +115 -0
- package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-BhJpG-Fw.js +75 -0
- package/dist/_shared/Lightswitch.vue_vue_type_script_setup_true_lang-DX23lEFd.js +43 -0
- package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-CoHkAJj3.js +186 -0
- package/dist/_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-CIVhqJtE.js +274 -0
- package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-BgOTdYXd.js +676 -0
- package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-Be3i_0zE.js +78 -0
- package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-CoydN9sS.js +96 -0
- package/dist/_shared/{icon-spinner-CmxIOqaK.js → icon-spinner-CP0VP_YM.js} +2 -2
- package/dist/combobox/index.js +3 -347
- package/dist/combobox.d.ts +132 -0
- package/dist/core/index.js +17 -826
- package/dist/core.d.ts +669 -0
- package/dist/dialogs/index.js +4 -216
- package/dist/dialogs.d.ts +226 -0
- package/dist/dropdown/index.js +3 -131
- package/dist/dropdown.d.ts +145 -0
- package/dist/index/index.js +35 -0
- package/dist/index.d.ts +1343 -0
- package/dist/lightswitch/index.js +3 -47
- package/dist/lightswitch.d.ts +39 -0
- package/dist/rich-text-editor/index.js +3 -261
- package/dist/rich-text-editor.d.ts +89 -0
- package/dist/toast/index.js +3 -99
- package/dist/toast.d.ts +66 -0
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip.d.ts +61 -0
- package/package.json +69 -38
- package/dist/_shared/ButtonBase-DfkwHIhN.js +0 -87
- package/dist/_shared/ChevronDownIcon-z-5U4fIb.js +0 -55
- package/dist/_shared/FormInput-B-SQTZTA.js +0 -92
- package/dist/_shared/Modal-Bw2sID1x.js +0 -213
- package/dist/_shared/Tooltip-B93ZF7IF.js +0 -126
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { shallowRef as a, createElementBlock as p, openBlock as f, renderSlot as u, createElementVNode as g, normalizeStyle as x, normalizeClass as S, unref as h, createCommentVNode as $, mergeProps as R } from "vue";
|
|
2
|
-
import { useFloating as k, autoUpdate as z, autoPlacement as P, offset as W, shift as C, arrow as M, size as A } from "@floating-ui/vue";
|
|
3
|
-
const B = ["innerHTML"], N = {
|
|
4
|
-
__name: "Tooltip",
|
|
5
|
-
props: {
|
|
6
|
-
content: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: !0
|
|
9
|
-
},
|
|
10
|
-
blur: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: !0
|
|
13
|
-
},
|
|
14
|
-
maxWidth: {
|
|
15
|
-
type: Number,
|
|
16
|
-
default: null
|
|
17
|
-
},
|
|
18
|
-
tooltipClass: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: ""
|
|
21
|
-
},
|
|
22
|
-
placement: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: void 0,
|
|
25
|
-
validator: (t) => t === void 0 || [
|
|
26
|
-
"top",
|
|
27
|
-
"right",
|
|
28
|
-
"bottom",
|
|
29
|
-
"left",
|
|
30
|
-
"top-start",
|
|
31
|
-
"top-end",
|
|
32
|
-
"right-start",
|
|
33
|
-
"right-end",
|
|
34
|
-
"bottom-start",
|
|
35
|
-
"bottom-end",
|
|
36
|
-
"left-start",
|
|
37
|
-
"left-end"
|
|
38
|
-
].includes(t)
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: "base",
|
|
43
|
-
validator: (t) => ["sm", "base"].includes(t)
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
setup(t) {
|
|
47
|
-
const o = t, i = a(), s = a(), l = a(), {
|
|
48
|
-
floatingStyles: y,
|
|
49
|
-
middlewareData: w,
|
|
50
|
-
placement: c
|
|
51
|
-
} = k(i, s, {
|
|
52
|
-
middleware: [
|
|
53
|
-
o.placement ? null : P(),
|
|
54
|
-
W(o.size === "sm" ? 7 : 10),
|
|
55
|
-
C({ crossAxis: !0, padding: 5 }),
|
|
56
|
-
M({ element: l }),
|
|
57
|
-
A({
|
|
58
|
-
apply({ availableWidth: e, availableHeight: r, elements: n }) {
|
|
59
|
-
Object.assign(n.floating.style, {
|
|
60
|
-
maxWidth: o.maxWidth ? `${Math.min(e, o.maxWidth) / 16}rem` : "",
|
|
61
|
-
maxHeight: `${r / 16}rem `
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
],
|
|
66
|
-
whileElementsMounted: z,
|
|
67
|
-
placement: o.placement
|
|
68
|
-
}), b = (e) => ({
|
|
69
|
-
top: 0,
|
|
70
|
-
bottom: 180,
|
|
71
|
-
left: -90,
|
|
72
|
-
right: 90
|
|
73
|
-
})[e.split("-")[0]] || 0, v = (e) => {
|
|
74
|
-
var m, d;
|
|
75
|
-
const r = c.value.split("-")[0], n = {
|
|
76
|
-
left: "right",
|
|
77
|
-
right: "left",
|
|
78
|
-
bottom: "top",
|
|
79
|
-
top: "bottom"
|
|
80
|
-
}[r];
|
|
81
|
-
return {
|
|
82
|
-
style: {
|
|
83
|
-
left: (m = e.arrow) != null && m.x ? `${e.arrow.x}px` : "",
|
|
84
|
-
top: (d = e.arrow) != null && d.y ? `${e.arrow.y}px` : "",
|
|
85
|
-
bottom: "",
|
|
86
|
-
right: "",
|
|
87
|
-
[n]: l.value ? `${l.value.offsetWidth * -1}px` : "",
|
|
88
|
-
transform: `rotate(${b(c.value)}deg)`
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
return (e, r) => (f(), p("div", {
|
|
93
|
-
ref_key: "wrapperRef",
|
|
94
|
-
ref: i,
|
|
95
|
-
class: "rvc-tooltip-wrapper"
|
|
96
|
-
}, [
|
|
97
|
-
u(e.$slots, "default"),
|
|
98
|
-
g("div", {
|
|
99
|
-
ref_key: "tooltipRef",
|
|
100
|
-
ref: s,
|
|
101
|
-
class: S([
|
|
102
|
-
"rvc-tooltip",
|
|
103
|
-
t.tooltipClass,
|
|
104
|
-
`rvc-tooltip-${t.size}`,
|
|
105
|
-
{ "rvc-tooltip-blur": t.blur }
|
|
106
|
-
]),
|
|
107
|
-
style: x(h(y))
|
|
108
|
-
}, [
|
|
109
|
-
u(e.$slots, "content", { content: t.content }, () => [
|
|
110
|
-
t.content ? (f(), p("div", {
|
|
111
|
-
key: 0,
|
|
112
|
-
innerHTML: t.content
|
|
113
|
-
}, null, 8, B)) : $("", !0)
|
|
114
|
-
]),
|
|
115
|
-
g("div", R({
|
|
116
|
-
ref_key: "arrowRef",
|
|
117
|
-
ref: l,
|
|
118
|
-
class: "rvc-tooltip-arrow"
|
|
119
|
-
}, v(h(w))), null, 16)
|
|
120
|
-
], 6)
|
|
121
|
-
], 512));
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
export {
|
|
125
|
-
N as _
|
|
126
|
-
};
|