@robuust-digital/vue-components 2.0.0-rc.5 → 2.0.0-rc.6
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/dist/_shared/{ButtonBase-CQjlJ85F.js → ButtonBase-DfkwHIhN.js} +10 -10
- package/dist/_shared/Modal-BXOR8t7c.js +199 -0
- package/dist/_shared/{Tooltip-BKXJoJ1x.js → Tooltip-B93ZF7IF.js} +16 -16
- package/dist/combobox/combobox.css +65 -34
- package/dist/combobox/index.js +46 -46
- package/dist/core/accordion.css +21 -10
- package/dist/core/alert.css +26 -20
- package/dist/core/badge.css +10 -10
- package/dist/core/button.css +31 -19
- package/dist/core/checkbox.css +14 -10
- package/dist/core/empty-state.css +6 -6
- package/dist/core/index.js +296 -300
- package/dist/core/input.css +13 -13
- package/dist/core/pagination.css +68 -9
- package/dist/core/radio.css +14 -10
- package/dist/core/select.css +15 -16
- package/dist/core/styles.css +3 -35
- package/dist/core/table.css +66 -5
- package/dist/core/tabs.css +20 -9
- package/dist/core/textarea.css +10 -10
- package/dist/core/utilities.css +12 -0
- package/dist/dialogs/drawer.css +140 -4
- package/dist/dialogs/index.js +93 -96
- package/dist/dialogs/modal.css +118 -22
- package/dist/dialogs/styles.css +20 -0
- package/dist/dropdown/dropdown.css +79 -49
- package/dist/dropdown/index.js +38 -38
- package/dist/lightswitch/lightswitch.css +8 -8
- package/dist/rich-text-editor/index.js +9 -9
- package/dist/rich-text-editor/rich-text.css +15 -10
- package/dist/toast/index.js +35 -34
- package/dist/toast/toast.css +54 -28
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip/tooltip.css +18 -16
- package/package.json +9 -2
- package/dist/_shared/Modal-CsI5mZlJ.js +0 -202
|
@@ -23,67 +23,97 @@
|
|
|
23
23
|
--rvc-dropdown-item-padding-y: 0;
|
|
24
24
|
--rvc-dropdown-item-font-size: var(--rvc-base-font-size);
|
|
25
25
|
--rvc-dropdown-item-font-weight: var(--rvc-base-font-weight);
|
|
26
|
+
--rvc-dropdown-transition-timing-function: ease-in-out;
|
|
27
|
+
--rvc-dropdown-transition-duration: 100ms;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
@layer components {
|
|
29
31
|
.rvc-dropdown {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
border-width: var(--rvc-dropdown-border-width);
|
|
34
|
-
border-color: var(--rvc-dropdown-border-color);
|
|
35
|
-
padding-block: var(--rvc-dropdown-padding-y);
|
|
36
|
-
padding-inline: var(--rvc-dropdown-padding-x);
|
|
37
|
-
font-size: var(--rvc-dropdown-font-size);
|
|
38
|
-
font-weight: var(--rvc-dropdown-font-weight);
|
|
39
|
-
gap: var(--rvc-dropdown-gap);
|
|
40
|
-
z-index: var(--rvc-dropdown-z-index);
|
|
41
|
-
margin-top: calc(var(--spacing) * 1);
|
|
42
|
-
position: absolute;
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
align-items: flex-start;
|
|
46
|
-
right: 0;
|
|
32
|
+
display: inline-block;
|
|
33
|
+
position: relative;
|
|
34
|
+
width: fit-content;
|
|
47
35
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
&.rvc-dropdown-full {
|
|
54
|
-
left: 0;
|
|
36
|
+
.rvc-dropdown-items {
|
|
37
|
+
display: flex;
|
|
38
|
+
position: absolute;
|
|
39
|
+
z-index: var(--rvc-dropdown-z-index);
|
|
55
40
|
right: 0;
|
|
56
|
-
|
|
57
|
-
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
align-items: flex-start;
|
|
43
|
+
width: var(--rvc-dropdown-width);
|
|
44
|
+
margin-top: calc(var(--spacing) * 1);
|
|
45
|
+
padding-block: var(--rvc-dropdown-padding-y);
|
|
46
|
+
padding-inline: var(--rvc-dropdown-padding-x);
|
|
47
|
+
border-width: var(--rvc-dropdown-border-width);
|
|
48
|
+
border-radius: var(--rvc-dropdown-border-radius);
|
|
49
|
+
border-color: var(--rvc-dropdown-border-color);
|
|
50
|
+
background-color: var(--rvc-dropdown-bg-color);
|
|
51
|
+
font-size: var(--rvc-dropdown-font-size);
|
|
52
|
+
font-weight: var(--rvc-dropdown-font-weight);
|
|
53
|
+
gap: var(--rvc-dropdown-gap);
|
|
58
54
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
padding-block: var(--rvc-dropdown-item-padding-y);
|
|
64
|
-
padding-inline: var(--rvc-dropdown-item-padding-x);
|
|
65
|
-
border-radius: var(--rvc-dropdown-item-border-radius);
|
|
66
|
-
font-size: var(--rvc-dropdown-item-font-size);
|
|
67
|
-
font-weight: var(--rvc-dropdown-item-font-weight);
|
|
68
|
-
display: flex;
|
|
69
|
-
align-items: center;
|
|
70
|
-
width: 100%;
|
|
55
|
+
&.rvc-dropdown-items-left {
|
|
56
|
+
right: auto;
|
|
57
|
+
left: 0;
|
|
58
|
+
}
|
|
71
59
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
60
|
+
&.rvc-dropdown-items-full {
|
|
61
|
+
right: 0;
|
|
62
|
+
left: 0;
|
|
63
|
+
width: 100%;
|
|
64
|
+
}
|
|
76
65
|
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
.rvc-dropdown-item {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
width: 100%;
|
|
70
|
+
padding-block: var(--rvc-dropdown-item-padding-y);
|
|
71
|
+
padding-inline: var(--rvc-dropdown-item-padding-x);
|
|
72
|
+
border-radius: var(--rvc-dropdown-item-border-radius);
|
|
73
|
+
background-color: var(--rvc-dropdown-item-bg-color);
|
|
74
|
+
color: var(--rvc-dropdown-item-color);
|
|
75
|
+
font-size: var(--rvc-dropdown-item-font-size);
|
|
76
|
+
font-weight: var(--rvc-dropdown-item-font-weight);
|
|
77
|
+
gap: var(--rvc-dropdown-item-gap);
|
|
78
|
+
|
|
79
|
+
&:hover {
|
|
80
|
+
background-color: var(--rvc-dropdown-item-bg-color-hover);
|
|
81
|
+
color: var(--rvc-dropdown-item-color-hover);
|
|
82
|
+
text-decoration: underline;
|
|
83
|
+
|
|
84
|
+
.rvc-dropdown-item-icon {
|
|
85
|
+
color: var(--rvc-dropdown-icon-color-hover);
|
|
86
|
+
}
|
|
79
87
|
}
|
|
80
|
-
}
|
|
81
88
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
89
|
+
.rvc-dropdown-item-icon {
|
|
90
|
+
width: var(--rvc-dropdown-icon-size);
|
|
91
|
+
height: var(--rvc-dropdown-icon-size);
|
|
92
|
+
color: var(--rvc-dropdown-icon-color);
|
|
93
|
+
}
|
|
86
94
|
}
|
|
87
95
|
}
|
|
88
96
|
}
|
|
97
|
+
|
|
98
|
+
/* Transitions */
|
|
99
|
+
.rvc-dropdown-transition-enter,
|
|
100
|
+
.rvc-dropdown-transition-leave {
|
|
101
|
+
--tw-duration: var(--rvc-dropdown-transition-duration);
|
|
102
|
+
|
|
103
|
+
transition-duration: var(--rvc-dropdown-transition-duration);
|
|
104
|
+
|
|
105
|
+
--tw-ease: var(--rvc-dropdown-transition-timing-function);
|
|
106
|
+
|
|
107
|
+
transition-timing-function: var(--rvc-dropdown-transition-timing-function);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.rvc-dropdown-transition-enter-from,
|
|
111
|
+
.rvc-dropdown-transition-leave-to {
|
|
112
|
+
opacity: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.rvc-dropdown-transition-enter-to,
|
|
116
|
+
.rvc-dropdown-transition-leave-from {
|
|
117
|
+
opacity: 1;
|
|
118
|
+
}
|
|
89
119
|
}
|
package/dist/dropdown/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createElementBlock as w, openBlock as
|
|
2
|
-
import { Menu as N, MenuButton as
|
|
3
|
-
import { _ as V } from "../_shared/ButtonBase-
|
|
1
|
+
import { createElementBlock as w, openBlock as r, createElementVNode as C, createBlock as l, unref as n, normalizeClass as u, withCtx as a, renderSlot as s, createVNode as i, mergeProps as f, Transition as B, Fragment as M, renderList as $, resolveDynamicComponent as m, createCommentVNode as A, createTextVNode as D, toDisplayString as L } from "vue";
|
|
2
|
+
import { Menu as N, MenuButton as v, MenuItems as S, MenuItem as p } from "@headlessui/vue";
|
|
3
|
+
import { _ as V } from "../_shared/ButtonBase-DfkwHIhN.js";
|
|
4
4
|
function x(t, c) {
|
|
5
|
-
return
|
|
5
|
+
return r(), w("svg", {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
viewBox: "0 0 20 20",
|
|
8
8
|
fill: "currentColor",
|
|
@@ -41,72 +41,72 @@ const T = /* @__PURE__ */ Object.assign({
|
|
|
41
41
|
},
|
|
42
42
|
emits: ["dropdown:click"],
|
|
43
43
|
setup(t, { emit: c }) {
|
|
44
|
-
const b = c,
|
|
44
|
+
const b = c, g = (o) => {
|
|
45
45
|
const {
|
|
46
|
-
as:
|
|
46
|
+
as: h,
|
|
47
47
|
bindAs: e,
|
|
48
48
|
event: d,
|
|
49
|
-
icon:
|
|
49
|
+
icon: y,
|
|
50
50
|
name: I,
|
|
51
51
|
...k
|
|
52
|
-
} =
|
|
52
|
+
} = o;
|
|
53
53
|
return k;
|
|
54
54
|
};
|
|
55
|
-
return (
|
|
55
|
+
return (o, h) => (r(), l(n(N), {
|
|
56
56
|
as: "div",
|
|
57
|
-
class: u(["
|
|
57
|
+
class: u(["rvc-dropdown", t.rootClass])
|
|
58
58
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
s(
|
|
59
|
+
default: a(() => [
|
|
60
|
+
s(o.$slots, "button", {
|
|
61
61
|
label: t.label,
|
|
62
|
-
button:
|
|
62
|
+
button: n(v)
|
|
63
63
|
}, () => [
|
|
64
|
-
i(
|
|
64
|
+
i(n(v), f({
|
|
65
65
|
as: V,
|
|
66
66
|
label: t.label,
|
|
67
67
|
color: "light",
|
|
68
|
-
icon:
|
|
68
|
+
icon: n(x),
|
|
69
69
|
"icon-left": t.alignLeft
|
|
70
|
-
},
|
|
70
|
+
}, o.$attrs), null, 16, ["label", "icon", "icon-left"])
|
|
71
71
|
]),
|
|
72
72
|
i(B, {
|
|
73
|
-
"enter-active-class": "transition
|
|
74
|
-
"enter-from-class": "
|
|
75
|
-
"enter-to-class": "
|
|
76
|
-
"leave-active-class": "transition
|
|
77
|
-
"leave-from-class": "
|
|
78
|
-
"leave-to-class": "
|
|
73
|
+
"enter-active-class": "rvc-dropdown-transition-enter",
|
|
74
|
+
"enter-from-class": "rvc-dropdown-transition-enter-from",
|
|
75
|
+
"enter-to-class": "rvc-dropdown-transition-enter-to",
|
|
76
|
+
"leave-active-class": "rvc-dropdown-transition-leave",
|
|
77
|
+
"leave-from-class": "rvc-dropdown-transition-leave-from",
|
|
78
|
+
"leave-to-class": "rvc-dropdown-transition-leave-to"
|
|
79
79
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
i(
|
|
80
|
+
default: a(() => [
|
|
81
|
+
i(n(S), {
|
|
82
82
|
class: u([
|
|
83
|
-
"rvc-dropdown",
|
|
83
|
+
"rvc-dropdown-items",
|
|
84
84
|
{
|
|
85
|
-
"rvc-dropdown-left": t.alignLeft,
|
|
86
|
-
"rvc-dropdown-full": t.fullWidth
|
|
85
|
+
"rvc-dropdown-items-left": t.alignLeft,
|
|
86
|
+
"rvc-dropdown-items-full": t.fullWidth
|
|
87
87
|
}
|
|
88
88
|
])
|
|
89
89
|
}, {
|
|
90
|
-
default:
|
|
91
|
-
s(
|
|
90
|
+
default: a(() => [
|
|
91
|
+
s(o.$slots, "items", {
|
|
92
92
|
items: t.items,
|
|
93
|
-
menuItem:
|
|
93
|
+
menuItem: n(p)
|
|
94
94
|
}, () => [
|
|
95
|
-
(
|
|
95
|
+
(r(!0), w(M, null, $(t.items, (e, d) => (r(), l(n(p), {
|
|
96
96
|
key: `${d}-dropdown-item`,
|
|
97
97
|
as: "template"
|
|
98
98
|
}, {
|
|
99
|
-
default:
|
|
100
|
-
s(
|
|
101
|
-
(
|
|
99
|
+
default: a(() => [
|
|
100
|
+
s(o.$slots, "item", { item: e }, () => [
|
|
101
|
+
(r(), l(m(e.as ? e.as : "button"), f({
|
|
102
102
|
class: "rvc-dropdown-item",
|
|
103
103
|
ref_for: !0
|
|
104
|
-
},
|
|
104
|
+
}, g(e), {
|
|
105
105
|
as: e.bindAs ? e.bindAs : void 0,
|
|
106
|
-
onClick: (
|
|
106
|
+
onClick: (y) => (b("dropdown:click", e), e.event ? e.event() : null)
|
|
107
107
|
}), {
|
|
108
|
-
default:
|
|
109
|
-
e.icon ? (
|
|
108
|
+
default: a(() => [
|
|
109
|
+
e.icon ? (r(), l(m(e.icon), {
|
|
110
110
|
key: 0,
|
|
111
111
|
class: "rvc-dropdown-item-icon"
|
|
112
112
|
})) : A("", !0),
|
|
@@ -26,33 +26,33 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
label {
|
|
29
|
-
cursor: pointer;
|
|
30
29
|
padding-left: var(--rvc-lightswitch-label-offset);
|
|
30
|
+
cursor: pointer;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.rvc-lightswitch {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
position: relative;
|
|
36
|
+
align-items: center;
|
|
37
|
+
width: var(--rvc-lightswitch-width);
|
|
34
38
|
height: var(--rvc-lightswitch-height);
|
|
35
39
|
transition-property: var(--rvc-lightswitch-transition-property);
|
|
36
40
|
transition-duration: var(--rvc-lightswitch-transition-duration);
|
|
37
41
|
transition-timing-function: var(--rvc-lightswitch-transition-timing-function);
|
|
38
|
-
width: var(--rvc-lightswitch-width);
|
|
39
42
|
border-radius: var(--rvc-lightswitch-border-radius);
|
|
40
43
|
background-color: var(--rvc-lightswitch-bg-color);
|
|
41
|
-
position: relative;
|
|
42
|
-
display: inline-flex;
|
|
43
|
-
align-items: center;
|
|
44
44
|
|
|
45
45
|
.rvc-lightswitch-toggle {
|
|
46
|
+
display: inline-block;
|
|
46
47
|
width: var(--rvc-lightswitch-toggle-size);
|
|
47
48
|
height: var(--rvc-lightswitch-toggle-size);
|
|
48
49
|
transform: translateX(var(--rvc-lightswitch-toggle-offset));
|
|
49
50
|
transform-origin: left;
|
|
50
|
-
border-radius: var(--rvc-lightswitch-border-radius);
|
|
51
|
-
background-color: var(--rvc-lightswitch-toggle-bg-color);
|
|
52
51
|
transition-property: var(--rvc-lightswitch-toggle-transition-property);
|
|
53
52
|
transition-duration: var(--rvc-lightswitch-toggle-transition-duration);
|
|
54
53
|
transition-timing-function: var(--rvc-lightswitch-toggle-transition-timing-function);
|
|
55
|
-
|
|
54
|
+
border-radius: var(--rvc-lightswitch-border-radius);
|
|
55
|
+
background-color: var(--rvc-lightswitch-toggle-bg-color);
|
|
56
56
|
box-shadow: var(--shadow-md);
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createElementBlock as r, openBlock as s, createElementVNode as n, ref as p, useAttrs as H, computed as x, watch as L, Fragment as A, createVNode as v, renderSlot as C, withCtx as _, normalizeClass as M, createCommentVNode as $, unref as
|
|
1
|
+
import { createElementBlock as r, openBlock as s, createElementVNode as n, ref as p, useAttrs as H, computed as x, watch as L, Fragment as A, createVNode as v, renderSlot as C, withCtx as _, normalizeClass as M, createCommentVNode as $, unref as f, renderList as B, createBlock as E, resolveDynamicComponent as S } from "vue";
|
|
2
2
|
import { useEditor as O, EditorContent as T } from "@tiptap/vue-3";
|
|
3
3
|
import N from "@tiptap/extension-link";
|
|
4
4
|
import U from "@tiptap/starter-kit";
|
|
5
|
-
import { _ as q } from "../_shared/Tooltip-
|
|
5
|
+
import { _ as q } from "../_shared/Tooltip-B93ZF7IF.js";
|
|
6
6
|
import { _ as z } from "../_shared/FormInput-abFMz_J4.js";
|
|
7
|
-
import { _ as D } from "../_shared/Modal-
|
|
7
|
+
import { _ as D } from "../_shared/Modal-BXOR8t7c.js";
|
|
8
8
|
function I(a, c) {
|
|
9
9
|
return s(), r("svg", {
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -108,7 +108,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
108
108
|
},
|
|
109
109
|
emits: ["update:modelValue", "tiptap:onCreate"],
|
|
110
110
|
setup(a, { emit: c }) {
|
|
111
|
-
const i = a, h = c, g = p(!1), u = p(!1), d = p(""),
|
|
111
|
+
const i = a, h = c, g = p(!1), u = p(!1), d = p(""), m = H(), k = m.class ? `${m.class} ` : "", V = [
|
|
112
112
|
U,
|
|
113
113
|
N.configure({
|
|
114
114
|
openOnClick: !1
|
|
@@ -118,7 +118,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
118
118
|
content: i.modelValue,
|
|
119
119
|
editorProps: {
|
|
120
120
|
attributes: {
|
|
121
|
-
...
|
|
121
|
+
...m,
|
|
122
122
|
id: i.id,
|
|
123
123
|
class: `${k}rvc-textarea rvc-rich-text-textarea`
|
|
124
124
|
}
|
|
@@ -220,10 +220,10 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
220
220
|
n("div", {
|
|
221
221
|
class: M(["rvc-rich-text", a.rootClass])
|
|
222
222
|
}, [
|
|
223
|
-
|
|
223
|
+
f(t) ? C(l.$slots, "toolbar", {
|
|
224
224
|
key: 0,
|
|
225
225
|
commands: b.value,
|
|
226
|
-
tiptap:
|
|
226
|
+
tiptap: f(t)
|
|
227
227
|
}, () => [
|
|
228
228
|
n("ul", P, [
|
|
229
229
|
(s(!0), r(A, null, B(b.value.filter((e) => e.isVisible), (e) => (s(), r("li", {
|
|
@@ -233,7 +233,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
233
233
|
content: e.title,
|
|
234
234
|
placement: "bottom",
|
|
235
235
|
size: "sm",
|
|
236
|
-
class: "text-
|
|
236
|
+
class: "rvc-rich-text-tooltip"
|
|
237
237
|
}, {
|
|
238
238
|
default: _(() => [
|
|
239
239
|
n("button", {
|
|
@@ -251,7 +251,7 @@ const P = { class: "rvc-rich-text-toolbar" }, G = ["disabled", "aria-label", "on
|
|
|
251
251
|
]))), 128))
|
|
252
252
|
])
|
|
253
253
|
]) : $("", !0),
|
|
254
|
-
v(
|
|
254
|
+
v(f(T), { editor: f(t) }, null, 8, ["editor"])
|
|
255
255
|
], 2)
|
|
256
256
|
], 64));
|
|
257
257
|
}
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
ul, ol {
|
|
31
|
-
list-style-position: var(--rvc-rich-text-list-position);
|
|
32
31
|
padding-left: var(--rvc-rich-text-list-padding);
|
|
32
|
+
list-style-position: var(--rvc-rich-text-list-position);
|
|
33
33
|
|
|
34
34
|
li > * {
|
|
35
35
|
display: inline;
|
|
@@ -40,28 +40,28 @@
|
|
|
40
40
|
ol { list-style-type: decimal; }
|
|
41
41
|
|
|
42
42
|
a {
|
|
43
|
-
text-decoration: var(--rvc-rich-text-anchor-text-decoration);
|
|
44
|
-
font-weight: var(--rvc-rich-text-anchor-font-weight);
|
|
45
43
|
color: var(--rvc-rich-text-anchor-color);
|
|
44
|
+
font-weight: var(--rvc-rich-text-anchor-font-weight);
|
|
45
|
+
text-decoration: var(--rvc-rich-text-anchor-text-decoration);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.rvc-rich-text-toolbar {
|
|
50
|
-
padding: var(--rvc-textarea-padding-x);
|
|
51
|
-
gap: calc(var(--spacing) * 1);
|
|
52
50
|
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
51
|
position: absolute;
|
|
55
|
-
inset-block-start: 0;
|
|
56
|
-
inset-inline: 0;
|
|
57
|
-
flex-wrap: wrap;
|
|
58
52
|
z-index: 1;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
align-items: center;
|
|
55
|
+
padding: var(--rvc-textarea-padding-x);
|
|
59
56
|
pointer-events: none;
|
|
57
|
+
gap: calc(var(--spacing) * 1);
|
|
58
|
+
inset-block-start: 0;
|
|
59
|
+
inset-inline: 0;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.rvc-rich-text-button {
|
|
63
|
-
border-radius: var(--rvc-rich-text-button-border-radius);
|
|
64
63
|
padding: var(--rvc-rich-text-button-padding);
|
|
64
|
+
border-radius: var(--rvc-rich-text-button-border-radius);
|
|
65
65
|
background-color: var(--rvc-rich-text-button-bg-color);
|
|
66
66
|
color: var(--rvc-rich-text-button-color);
|
|
67
67
|
pointer-events: auto;
|
|
@@ -79,5 +79,10 @@
|
|
|
79
79
|
height: var(--rvc-rich-text-icon-size);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
.rvc-rich-text-tooltip {
|
|
84
|
+
font-size: var(--text-sm);
|
|
85
|
+
font-weight: var(--font-weight-medium);
|
|
86
|
+
}
|
|
82
87
|
}
|
|
83
88
|
}
|
package/dist/toast/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { onMounted as
|
|
2
|
-
import { TransitionRoot as
|
|
3
|
-
import { r as
|
|
1
|
+
import { onMounted as y, watch as w, createBlock as n, openBlock as s, unref as r, withCtx as c, resolveDynamicComponent as m, normalizeClass as h, renderSlot as a, createElementVNode as u, createCommentVNode as f, toDisplayString as p, createElementBlock as C, createVNode as $ } from "vue";
|
|
2
|
+
import { TransitionRoot as b } from "@headlessui/vue";
|
|
3
|
+
import { r as g } from "../_shared/XMarkIcon-90mcPzBs.js";
|
|
4
4
|
const k = { class: "rvc-toast-title" }, V = {
|
|
5
5
|
__name: "Toast",
|
|
6
6
|
props: {
|
|
@@ -39,52 +39,53 @@ const k = { class: "rvc-toast-title" }, V = {
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
emits: ["toast:close"],
|
|
42
|
-
setup(t, { emit:
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
42
|
+
setup(t, { emit: d }) {
|
|
43
|
+
const o = t, v = d, l = () => {
|
|
44
|
+
o.timeout && o.show && setTimeout(() => {
|
|
45
|
+
v("toast:close");
|
|
46
|
+
}, o.timeout);
|
|
47
47
|
};
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
}), (
|
|
48
|
+
return y(() => {
|
|
49
|
+
l();
|
|
50
|
+
}), w(() => o.show, (e) => {
|
|
51
|
+
e && l();
|
|
52
|
+
}), (e, i) => (s(), n(r(b), {
|
|
53
53
|
show: t.show,
|
|
54
54
|
as: "template",
|
|
55
|
-
enter: "transition-
|
|
56
|
-
"enter-from": "
|
|
57
|
-
"enter-to": "
|
|
58
|
-
leave: "transition-
|
|
59
|
-
"leave-from": "
|
|
60
|
-
"leave-to": "
|
|
55
|
+
enter: "rvc-toast-transition-enter",
|
|
56
|
+
"enter-from": "rvc-toast-transition-enter-from",
|
|
57
|
+
"enter-to": "rvc-toast-transition-enter-to",
|
|
58
|
+
leave: "rvc-toast-transition-leave",
|
|
59
|
+
"leave-from": "rvc-toast-transition-leave-from",
|
|
60
|
+
"leave-to": "rvc-toast-transition-leave-to"
|
|
61
61
|
}, {
|
|
62
62
|
default: c(() => [
|
|
63
|
-
(s(),
|
|
64
|
-
class:
|
|
63
|
+
(s(), n(m(t.as), {
|
|
64
|
+
class: h(["rvc-toast", `rvc-toast-${t.position}`, `rvc-toast-${t.type}`, { "rvc-toast-open": t.show }])
|
|
65
65
|
}, {
|
|
66
66
|
default: c(() => [
|
|
67
|
-
a(
|
|
68
|
-
t.icon ? (s(),
|
|
67
|
+
a(e.$slots, "icon", {}, () => [
|
|
68
|
+
t.icon ? (s(), n(m(t.icon), {
|
|
69
69
|
key: 0,
|
|
70
70
|
class: "rvc-toast-icon"
|
|
71
|
-
})) :
|
|
71
|
+
})) : f("", !0)
|
|
72
72
|
]),
|
|
73
|
-
|
|
74
|
-
a(
|
|
75
|
-
|
|
73
|
+
u("div", null, [
|
|
74
|
+
a(e.$slots, "title", {}, () => [
|
|
75
|
+
u("span", k, p(t.title), 1)
|
|
76
76
|
]),
|
|
77
|
-
a(
|
|
77
|
+
a(e.$slots, "default")
|
|
78
78
|
]),
|
|
79
|
-
a(
|
|
80
|
-
t.showClose ? (s(),
|
|
79
|
+
a(e.$slots, "close", {}, () => [
|
|
80
|
+
t.showClose ? (s(), C("button", {
|
|
81
81
|
key: 0,
|
|
82
82
|
type: "button",
|
|
83
|
-
class: "rvc-toast-close
|
|
84
|
-
|
|
83
|
+
class: "rvc-toast-close",
|
|
84
|
+
"aria-label": "Close",
|
|
85
|
+
onClick: i[0] || (i[0] = (B) => e.$emit("toast:close"))
|
|
85
86
|
}, [
|
|
86
|
-
|
|
87
|
-
])) :
|
|
87
|
+
$(r(g))
|
|
88
|
+
])) : f("", !0)
|
|
88
89
|
])
|
|
89
90
|
]),
|
|
90
91
|
_: 3
|