@robuust-digital/vue-components 2.0.0-rc.0 → 2.0.0-rc.10

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 (37) hide show
  1. package/CHANGELOG.md +246 -0
  2. package/dist/_shared/{ButtonBase-CQjlJ85F.js → ButtonBase-DfkwHIhN.js} +10 -10
  3. package/dist/_shared/Modal-DdpJnce6.js +200 -0
  4. package/dist/_shared/{Tooltip-BKXJoJ1x.js → Tooltip-B93ZF7IF.js} +16 -16
  5. package/dist/combobox/combobox.css +76 -34
  6. package/dist/combobox/index.js +46 -46
  7. package/dist/core/accordion.css +21 -10
  8. package/dist/core/alert.css +26 -20
  9. package/dist/core/badge.css +10 -10
  10. package/dist/core/button.css +31 -19
  11. package/dist/core/checkbox.css +35 -10
  12. package/dist/core/empty-state.css +6 -6
  13. package/dist/core/index.js +351 -347
  14. package/dist/core/input.css +23 -13
  15. package/dist/core/pagination.css +68 -9
  16. package/dist/core/radio.css +35 -10
  17. package/dist/core/select.css +25 -16
  18. package/dist/core/styles.css +5 -35
  19. package/dist/core/table.css +66 -5
  20. package/dist/core/tabs.css +20 -9
  21. package/dist/core/textarea.css +17 -10
  22. package/dist/core/utilities.css +12 -0
  23. package/dist/dialogs/drawer.css +140 -4
  24. package/dist/dialogs/index.js +100 -93
  25. package/dist/dialogs/modal.css +124 -22
  26. package/dist/dialogs/styles.css +20 -0
  27. package/dist/dropdown/dropdown.css +79 -49
  28. package/dist/dropdown/index.js +38 -38
  29. package/dist/lightswitch/lightswitch.css +19 -8
  30. package/dist/rich-text-editor/index.js +42 -39
  31. package/dist/rich-text-editor/rich-text.css +28 -10
  32. package/dist/toast/index.js +35 -34
  33. package/dist/toast/toast.css +54 -28
  34. package/dist/tooltip/index.js +1 -1
  35. package/dist/tooltip/tooltip.css +18 -16
  36. package/package.json +22 -8
  37. package/dist/_shared/Modal-COVlUEud.js +0 -193
@@ -17,15 +17,61 @@
17
17
  --rvc-drawer-footer-bg-color: var(--rvc-dialog-footer-bg-color);
18
18
  --rvc-drawer-footer-gap: var(--rvc-dialog-footer-gap);
19
19
  --rvc-drawer-footer-justify-content: space-between;
20
+ --rvc-drawer-transition-timing-function: var(--rvc-dialog-transition-timing-function);
21
+ --rvc-drawer-transition-duration: var(--rvc-dialog-transition-duration);
22
+ --rvc-drawer-panel-shadow: var(--rvc-dialog-panel-shadow);
20
23
  }
21
24
 
22
25
  @layer components {
23
26
  .rvc-drawer {
24
- z-index: 500;
25
27
  position: relative;
28
+ z-index: 997;
26
29
 
27
30
  .rvc-drawer-backdrop {
31
+ position: fixed;
32
+ transition-property: opacity;
33
+ transition-duration: var(--rvc-drawer-transition-duration);
34
+ transition-timing-function: var(--rvc-drawer-transition-timing-function);
28
35
  background-color: var(--rvc-drawer-backdrop-bg-color);
36
+ inset: 0;
37
+ }
38
+
39
+ .rvc-drawer-presentation {
40
+ inset: 0;
41
+ position: fixed;
42
+ overflow: hidden;
43
+ }
44
+
45
+ .rvc-drawer-container {
46
+ inset: 0;
47
+ position: absolute;
48
+ overflow: hidden;
49
+ }
50
+
51
+ .rvc-drawer-inner {
52
+ display: flex;
53
+ position: fixed;
54
+ right: 0;
55
+ max-width: 100%;
56
+ padding-left: calc(var(--spacing) * 10);
57
+ pointer-events: none;
58
+ inset-block: 0;
59
+ }
60
+
61
+ .rvc-drawer-panel {
62
+ width: 100vw;
63
+ pointer-events: auto;
64
+
65
+ &.rvc-drawer-panel-max-width {
66
+ max-width: 36rem;
67
+ }
68
+ }
69
+
70
+ .rvc-drawer-panel-inner {
71
+ display: flex;
72
+ flex-direction: column;
73
+ height: 100%;
74
+ box-shadow: 0 20px 25px -5px rgb(0 0 0 / 10%), 0 8px 10px -6px rgb(0 0 0 / 10%);
29
75
  }
30
76
 
31
77
  .rvc-drawer-header {
@@ -34,16 +80,38 @@
34
80
  border-bottom-style: var(--rvc-drawer-border-style);
35
81
  border-color: var(--rvc-drawer-border-color);
36
82
  background-color: var(--rvc-drawer-header-bg-color);
83
+
84
+ &.rvc-drawer-header-sticky {
85
+ position: sticky;
86
+ z-index: 10;
87
+ top: 0;
88
+ left: 0;
89
+ width: 100%;
90
+ }
91
+ }
92
+
93
+ .rvc-drawer-header-inner {
94
+ display: flex;
95
+ align-items: center;
96
+ justify-content: space-between;
37
97
  }
38
98
 
39
99
  .rvc-drawer-title {
100
+ color: var(--rvc-drawer-title-color);
101
+ font-family: var(--rvc-drawer-title-font-family);
40
102
  font-size: var(--rvc-drawer-title-font-size);
41
103
  font-weight: var(--rvc-drawer-title-font-weight);
42
- font-family: var(--rvc-drawer-title-font-family);
43
- color: var(--rvc-drawer-title-color);
104
+ }
105
+
106
+ .rvc-drawer-close-wrapper {
107
+ display: flex;
108
+ align-items: center;
109
+ height: calc(var(--spacing) * 7);
110
+ margin-left: calc(var(--spacing) * 3);
44
111
  }
45
112
 
46
113
  .rvc-drawer-close {
114
+ position: relative;
47
115
  width: var(--rvc-drawer-close-size);
48
116
  height: var(--rvc-drawer-close-size);
49
117
  color: var(--rvc-drawer-close-color);
@@ -51,22 +119,90 @@
51
119
  &:hover {
52
120
  color: var(--rvc-drawer-close-color-hover);
53
121
  }
122
+
123
+ svg {
124
+ width: 100%;
125
+ height: 100%;
126
+ }
127
+ }
128
+
129
+ .rvc-drawer-scroll {
130
+ display: flex;
131
+ flex: 1;
132
+ flex-direction: column;
133
+ min-height: 0;
134
+ overflow-y: scroll;
135
+
136
+ &.rvc-drawer-scroll-reverse {
137
+ flex-direction: column-reverse;
138
+ }
54
139
  }
55
140
 
56
141
  .rvc-drawer-content {
142
+ position: relative;
143
+ flex: 1;
57
144
  padding-block: var(--rvc-drawer-padding-y);
58
145
  padding-inline: var(--rvc-drawer-padding-x);
59
146
  background-color: var(--rvc-drawer-content-bg-color);
60
147
  }
61
148
 
62
149
  .rvc-drawer-footer {
150
+ display: flex;
151
+ flex-shrink: 0;
152
+ justify-content: var(--rvc-drawer-footer-justify-content);
63
153
  padding: var(--rvc-drawer-padding-y) var(--rvc-drawer-padding-x);
64
154
  border-top-width: var(--rvc-drawer-border-width);
65
155
  border-top-style: var(--rvc-drawer-border-style);
66
156
  border-color: var(--rvc-drawer-border-color);
67
157
  background-color: var(--rvc-drawer-footer-bg-color);
68
158
  gap: var(--rvc-drawer-footer-gap);
69
- justify-content: var(--rvc-drawer-footer-justify-content);
70
159
  }
71
160
  }
161
+
162
+ /* Transitions */
163
+ .rvc-drawer-backdrop-transition-enter,
164
+ .rvc-drawer-backdrop-transition-leave {
165
+ --tw-duration: var(--rvc-drawer-transition-duration);
166
+
167
+ transition-duration: var(--rvc-drawer-transition-duration);
168
+
169
+ --tw-ease: var(--rvc-drawer-transition-timing-function);
170
+
171
+ transition-timing-function: var(--rvc-drawer-transition-timing-function);
172
+ }
173
+
174
+ .rvc-drawer-backdrop-transition-enter-from,
175
+ .rvc-drawer-backdrop-transition-leave-to {
176
+ opacity: 0;
177
+ }
178
+
179
+ .rvc-drawer-backdrop-transition-enter-to,
180
+ .rvc-drawer-backdrop-transition-leave-from {
181
+ opacity: 1;
182
+ }
183
+
184
+ .rvc-drawer-transition-enter,
185
+ .rvc-drawer-transition-leave {
186
+ --tw-duration: var(--rvc-drawer-transition-duration);
187
+
188
+ transition-duration: var(--rvc-drawer-transition-duration);
189
+
190
+ --tw-ease: var(--rvc-drawer-transition-timing-function);
191
+
192
+ transition-timing-function: var(--rvc-drawer-transition-timing-function);
193
+ }
194
+
195
+ .rvc-drawer-transition-enter-from,
196
+ .rvc-drawer-transition-leave-to {
197
+ --tw-translate-x: 100%;
198
+
199
+ translate: var(--tw-translate-x) var(--tw-translate-y);
200
+ }
201
+
202
+ .rvc-drawer-transition-enter-to,
203
+ .rvc-drawer-transition-leave-from {
204
+ --tw-translate-x: 0;
205
+
206
+ translate: var(--tw-translate-x) var(--tw-translate-y);
207
+ }
72
208
  }
@@ -1,16 +1,13 @@
1
- import { createBlock as w, openBlock as f, unref as l, withCtx as o, createVNode as i, withModifiers as S, createElementVNode as a, normalizeClass as u, renderSlot as c, createElementBlock as $, createCommentVNode as y, createTextVNode as B, toDisplayString as D } from "vue";
2
- import { TransitionRoot as E, Dialog as L, TransitionChild as b, DialogPanel as N, DialogTitle as T } from "@headlessui/vue";
3
- import { _ as p } from "../_shared/ButtonBase-CQjlJ85F.js";
4
- import { u as V } from "../_shared/Modal-COVlUEud.js";
5
- import { _ as X } from "../_shared/Modal-COVlUEud.js";
6
- import { r as z } from "../_shared/XMarkIcon-90mcPzBs.js";
7
- const R = {
8
- class: "fixed inset-0 overflow-hidden",
1
+ import { createBlock as u, openBlock as m, unref as r, withCtx as s, createVNode as i, withModifiers as B, createElementVNode as a, normalizeClass as w, renderSlot as d, createCommentVNode as b, createTextVNode as E, toDisplayString as L } from "vue";
2
+ import { TransitionRoot as T, Dialog as N, TransitionChild as p, DialogPanel as V, DialogTitle as y } from "@headlessui/vue";
3
+ import { _ as g } from "../_shared/ButtonBase-DfkwHIhN.js";
4
+ import { u as R } from "../_shared/Modal-DdpJnce6.js";
5
+ import { _ as W } from "../_shared/Modal-DdpJnce6.js";
6
+ import { r as k } from "../_shared/XMarkIcon-90mcPzBs.js";
7
+ const q = {
8
+ class: "rvc-drawer-presentation",
9
9
  role: "presentation"
10
- }, q = { class: "absolute inset-0 overflow-hidden" }, F = { class: "pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10" }, I = { class: "flex h-full flex-col shadow-xl" }, M = { class: "flex items-center justify-between" }, j = {
11
- key: 0,
12
- class: "ml-3 flex h-7 items-center"
13
- }, A = ["id"], P = { class: "flex shrink-0 rvc-drawer-footer" }, Q = {
10
+ }, A = { class: "rvc-drawer-container" }, F = { class: "rvc-drawer-inner" }, I = { class: "rvc-drawer-panel-inner" }, M = { class: "rvc-drawer-header-inner" }, x = { class: "rvc-drawer-close-wrapper" }, z = ["id"], P = { class: "rvc-drawer-footer" }, O = {
14
11
  __name: "Drawer",
15
12
  props: {
16
13
  as: {
@@ -47,133 +44,143 @@ const R = {
47
44
  },
48
45
  panelClass: {
49
46
  type: String,
50
- default: "max-w-xl"
47
+ default: "rvc-drawer-panel-max-width"
51
48
  }
52
49
  },
53
- emits: ["drawer:open", "drawer:close", "drawer:save", "drawer:closed"],
54
- setup(t, { emit: x }) {
55
- const n = x, g = t, {
56
- contentRef: h,
57
- ready: d,
58
- isForm: C,
59
- titleId: m,
60
- descriptionId: v,
61
- initialFocusElement: k
62
- } = V(g);
63
- return (s, e) => (f(), w(l(E), { as: "template" }, {
64
- default: o(() => [
65
- i(l(L), {
50
+ emits: ["drawer:open", "drawer:opened", "drawer:close", "drawer:save", "drawer:closed"],
51
+ setup(t, { emit: C }) {
52
+ const o = C, $ = t, {
53
+ contentRef: S,
54
+ ready: c,
55
+ isForm: h,
56
+ titleId: v,
57
+ descriptionId: f,
58
+ initialFocusElement: D
59
+ } = R($);
60
+ return (l, e) => (m(), u(r(T), { as: "template" }, {
61
+ default: s(() => [
62
+ i(r(N), {
66
63
  as: t.as,
67
64
  class: "rvc-drawer",
68
65
  static: "",
69
66
  "aria-modal": "true",
70
67
  role: "dialog",
71
- "initial-focus": l(k),
72
- "aria-labelledby": l(m),
73
- onClose: e[5] || (e[5] = (r) => s.$emit("drawer:close")),
74
- onSubmit: e[6] || (e[6] = S((r) => n("drawer:save", r), ["prevent"]))
68
+ "initial-focus": r(D),
69
+ "aria-labelledby": r(v),
70
+ onClose: e[6] || (e[6] = (n) => l.$emit("drawer:close")),
71
+ onSubmit: e[7] || (e[7] = B((n) => o("drawer:save", n), ["prevent"]))
75
72
  }, {
76
- default: o(() => [
77
- i(l(b), {
73
+ default: s(() => [
74
+ i(r(p), {
78
75
  as: "template",
79
- enter: "ease-in-out duration-500",
80
- "enter-from": "opacity-0",
81
- "enter-to": "opacity-100",
82
- leave: "ease-in-out duration-500",
83
- "leave-from": "opacity-100",
84
- "leave-to": "opacity-0",
85
- onBeforeEnter: e[0] || (e[0] = (r) => n("drawer:open"))
76
+ enter: "rvc-drawer-backdrop-transition-enter",
77
+ "enter-from": "rvc-drawer-backdrop-transition-enter-from",
78
+ "enter-to": "rvc-drawer-backdrop-transition-enter-to",
79
+ leave: "rvc-drawer-backdrop-transition-leave",
80
+ "leave-from": "rvc-drawer-backdrop-transition-leave-from",
81
+ "leave-to": "rvc-drawer-backdrop-transition-leave-to",
82
+ onBeforeEnter: e[0] || (e[0] = (n) => o("drawer:open")),
83
+ onAfterEnter: e[1] || (e[1] = (n) => o("drawer:opened"))
86
84
  }, {
87
- default: o(() => e[7] || (e[7] = [
85
+ default: s(() => e[8] || (e[8] = [
88
86
  a("div", {
89
- class: "fixed inset-0 transition-opacity rvc-drawer-backdrop",
87
+ class: "rvc-drawer-backdrop",
90
88
  "aria-hidden": "true"
91
89
  }, null, -1)
92
90
  ])),
93
91
  _: 1
94
92
  }),
95
- a("div", R, [
96
- a("div", q, [
93
+ a("div", q, [
94
+ a("div", A, [
97
95
  a("div", F, [
98
- i(l(b), {
96
+ i(r(p), {
99
97
  as: "template",
100
- enter: "transform transition ease-in-out duration-500 sm:duration-700",
101
- "enter-from": "translate-x-full",
102
- "enter-to": "translate-x-0",
103
- leave: "transform transition ease-in-out duration-500 sm:duration-700",
104
- "leave-from": "translate-x-0",
105
- "leave-to": "translate-x-full",
106
- onBeforeEnter: e[3] || (e[3] = (r) => d.value = !0),
107
- onAfterLeave: e[4] || (e[4] = (r) => (d.value = !1, n("drawer:closed")))
98
+ enter: "rvc-drawer-transition-enter",
99
+ "enter-from": "rvc-drawer-transition-enter-from",
100
+ "enter-to": "rvc-drawer-transition-enter-to",
101
+ leave: "rvc-drawer-transition-leave",
102
+ "leave-from": "rvc-drawer-transition-leave-from",
103
+ "leave-to": "rvc-drawer-transition-leave-to",
104
+ onBeforeEnter: e[4] || (e[4] = (n) => c.value = !0),
105
+ onAfterLeave: e[5] || (e[5] = (n) => (c.value = !1, o("drawer:closed")))
108
106
  }, {
109
- default: o(() => [
110
- i(l(N), {
111
- class: u(["pointer-events-auto w-screen", t.panelClass]),
107
+ default: s(() => [
108
+ i(r(V), {
109
+ class: w(["rvc-drawer-panel", t.panelClass]),
112
110
  "aria-busy": t.spinning,
113
- "aria-describedby": l(v)
111
+ "aria-describedby": r(f)
114
112
  }, {
115
- default: o(() => [
113
+ default: s(() => [
116
114
  a("div", I, [
117
115
  a("header", {
118
- class: u([{ "sticky top-0 left-0 -w-full z-10": t.headerSticky }, "rvc-drawer-header"])
116
+ class: w([{ "rvc-drawer-header-sticky": t.headerSticky }, "rvc-drawer-header"])
119
117
  }, [
120
- c(s.$slots, "header", {
118
+ d(l.$slots, "header", {
121
119
  title: t.title,
122
120
  showClose: t.showClose
123
121
  }, () => [
124
122
  a("div", M, [
125
- i(l(T), {
126
- id: l(m),
127
- class: "rvc-drawer-title"
128
- }, {
129
- default: o(() => [
130
- B(D(t.title), 1)
131
- ]),
132
- _: 1
133
- }, 8, ["id"]),
134
- t.showClose ? (f(), $("div", j, [
135
- a("button", {
136
- type: "button",
137
- class: "relative rvc-drawer-close",
138
- "aria-label": "Close panel",
139
- onClick: e[1] || (e[1] = (r) => n("drawer:close"))
140
- }, [
141
- i(l(z), {
142
- class: "size-full",
143
- "aria-hidden": "true"
144
- })
123
+ d(l.$slots, "title", {
124
+ id: r(v),
125
+ dialogTitle: r(y),
126
+ title: t.title
127
+ }, () => [
128
+ i(r(y), {
129
+ id: r(v),
130
+ class: "rvc-drawer-title"
131
+ }, {
132
+ default: s(() => [
133
+ E(L(t.title), 1)
134
+ ]),
135
+ _: 1
136
+ }, 8, ["id"])
137
+ ]),
138
+ t.showClose ? d(l.$slots, "close", {
139
+ key: 0,
140
+ icon: r(k),
141
+ emitClose: () => o("drawer:close")
142
+ }, () => [
143
+ a("div", x, [
144
+ a("button", {
145
+ type: "button",
146
+ class: "rvc-drawer-close",
147
+ "aria-label": "Close panel",
148
+ onClick: e[2] || (e[2] = (n) => o("drawer:close"))
149
+ }, [
150
+ i(r(k), { "aria-hidden": "true" })
151
+ ])
145
152
  ])
146
- ])) : y("", !0)
153
+ ]) : b("", !0)
147
154
  ])
148
155
  ])
149
156
  ], 2),
150
157
  a("div", {
151
- class: u([t.scrolledDown ? "flex-col-reverse" : "flex-col", "flex min-h-0 flex-1 overflow-y-scroll"])
158
+ class: w([{ "rvc-drawer-scroll-reverse": t.scrolledDown }, "rvc-drawer-scroll"])
152
159
  }, [
153
160
  a("div", {
154
- id: l(v),
161
+ id: r(f),
155
162
  ref_key: "contentRef",
156
- ref: h,
157
- class: "relative flex-1 rvc-drawer-content"
163
+ ref: S,
164
+ class: "rvc-drawer-content"
158
165
  }, [
159
- c(s.$slots, "default", { ready: l(d) })
160
- ], 8, A)
166
+ d(l.$slots, "default", { ready: r(c) })
167
+ ], 8, z)
161
168
  ], 2),
162
169
  a("footer", P, [
163
- c(s.$slots, "footer", { loading: t.spinning }, () => [
164
- i(p, {
170
+ d(l.$slots, "footer", { loading: t.spinning }, () => [
171
+ i(g, {
165
172
  type: "button",
166
173
  label: t.cancelLabel,
167
174
  color: "light",
168
- onClick: e[2] || (e[2] = (r) => n("drawer:close"))
175
+ onClick: e[3] || (e[3] = (n) => o("drawer:close"))
169
176
  }, null, 8, ["label"]),
170
- l(C) ? (f(), w(p, {
177
+ r(h) ? (m(), u(g, {
171
178
  key: 0,
172
179
  type: "submit",
173
180
  label: t.submitLabel,
174
181
  spinning: t.spinning,
175
182
  disabled: t.spinning
176
- }, null, 8, ["label", "spinning", "disabled"])) : y("", !0)
183
+ }, null, 8, ["label", "spinning", "disabled"])) : b("", !0)
177
184
  ])
178
185
  ])
179
186
  ])
@@ -195,6 +202,6 @@ const R = {
195
202
  }
196
203
  };
197
204
  export {
198
- Q as Drawer,
199
- X as Modal
205
+ O as Drawer,
206
+ W as Modal
200
207
  };
@@ -19,51 +19,96 @@
19
19
  --rvc-modal-footer-gap: var(--rvc-dialog-footer-gap);
20
20
  --rvc-modal-box-shadow: var(--box-shadow-xl);
21
21
  --rvc-modal-margin-y: 0;
22
+ --rvc-modal-transition-timing-function: var(--rvc-dialog-transition-timing-function);
23
+ --rvc-modal-transition-duration: var(--rvc-dialog-transition-duration);
22
24
  }
23
25
 
24
26
  @layer components {
25
27
  .rvc-modal {
26
- z-index: 600;
27
28
  position: relative;
29
+ z-index: 998;
28
30
 
29
31
  .rvc-modal-backdrop {
32
+ position: fixed;
33
+ transition-property: opacity;
34
+ transition-duration: var(--rvc-modal-transition-duration);
35
+ transition-timing-function: var(--rvc-modal-transition-timing-function);
30
36
  background-color: var(--rvc-modal-backdrop-bg-color);
37
+ inset: 0;
38
+ }
39
+
40
+ .rvc-modal-presentation {
41
+ position: fixed;
42
+ z-index: 10;
43
+ width: 100vw;
44
+ overflow-y: auto;
45
+ inset: 0;
46
+ }
47
+
48
+ .rvc-modal-container {
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ min-height: 100%;
53
+ padding: calc(var(--spacing) * 4);
54
+
55
+ @media (width >= theme(--breakpoint-sm)) {
56
+ padding: 0;
57
+ }
31
58
  }
32
59
 
33
60
  .rvc-modal-panel {
34
- border-color: var(--rvc-modal-border-color);
61
+ display: flex;
62
+ position: relative;
63
+ flex-direction: column;
64
+ width: 100%;
65
+ height: 100%;
66
+ margin-block: var(--rvc-modal-margin-y);
67
+ overflow: hidden;
68
+ transform: translate(0, 0);
35
69
  border-width: var(--rvc-modal-border-width);
36
70
  border-style: var(--rvc-modal-border-style);
37
71
  border-radius: var(--rvc-modal-border-radius);
72
+ border-color: var(--rvc-modal-border-color);
38
73
  box-shadow: var(--rvc-modal-box-shadow);
39
- margin-block: var(--rvc-modal-margin-y);
40
- display: flex;
41
- height: 100%;
42
- flex-direction: column;
43
- position: relative;
44
- transform: translate(0, 0);
45
- overflow: hidden;
46
- width: 100%;
47
74
  text-align: left;
75
+
76
+ &.rvc-modal-panel-max-width {
77
+ @media (width >= theme(--breakpoint-sm)) {
78
+ max-width: 32rem;
79
+ }
80
+ }
48
81
  }
49
82
 
50
83
  .rvc-modal-header {
51
84
  padding-block: var(--rvc-modal-padding-y);
52
85
  padding-inline: var(--rvc-modal-padding-x);
86
+ border-bottom: var(--rvc-modal-border-width) var(--rvc-modal-border-style) var(--rvc-modal-border-color);
53
87
  background-color: var(--rvc-modal-header-bg-color);
54
- border-bottom-color: var(--rvc-modal-border-color);
55
- border-bottom-width: var(--rvc-modal-border-width);
56
- border-bottom-style: var(--rvc-modal-border-style);
88
+ }
89
+
90
+ .rvc-modal-header-inner {
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: space-between;
57
94
  }
58
95
 
59
96
  .rvc-modal-title {
97
+ color: var(--rvc-modal-title-color);
98
+ font-family: var(--rvc-modal-title-font-family);
60
99
  font-size: var(--rvc-modal-title-font-size);
61
100
  font-weight: var(--rvc-modal-title-font-weight);
62
- font-family: var(--rvc-modal-title-font-family);
63
- color: var(--rvc-modal-title-color);
101
+ }
102
+
103
+ .rvc-modal-close-wrapper {
104
+ display: flex;
105
+ align-items: center;
106
+ height: cacl(var(--spacing) * 7);
107
+ margin-left: calc(var(--spacing) * 3);
64
108
  }
65
109
 
66
110
  .rvc-modal-close {
111
+ position: relative;
67
112
  width: var(--rvc-modal-close-size);
68
113
  height: var(--rvc-modal-close-size);
69
114
  color: var(--rvc-modal-close-color);
@@ -71,6 +116,11 @@
71
116
  &:hover {
72
117
  color: var(--rvc-modal-close-color-hover);
73
118
  }
119
+
120
+ svg {
121
+ width: 100%;
122
+ height: 100%;
123
+ }
74
124
  }
75
125
 
76
126
  .rvc-modal-content {
@@ -80,19 +130,71 @@
80
130
  }
81
131
 
82
132
  .rvc-modal-footer {
133
+ display: flex;
134
+ flex-direction: column;
83
135
  padding-block: var(--rvc-modal-padding-y);
84
136
  padding-inline: var(--rvc-modal-padding-x);
85
- gap: var(--rvc-modal-footer-gap);
137
+ border-top: var(--rvc-modal-border-width) var(--rvc-modal-border-style) var(--rvc-modal-border-color);
86
138
  background-color: var(--rvc-modal-footer-bg-color);
87
- border-top-color: var(--rvc-modal-border-color);
88
- border-top-width: var(--rvc-modal-border-width);
89
- border-top-style: var(--rvc-modal-border-style);
90
- display: flex;
91
- flex-direction: column;
139
+ gap: var(--rvc-modal-footer-gap);
92
140
 
93
- @media (width >= 40rem) {
141
+ @media (width >= theme(--breakpoint-sm)) {
94
142
  flex-direction: row-reverse;
95
143
  }
96
144
  }
97
145
  }
146
+
147
+ /* Transition */
148
+ .rvc-modal-backdrop-transition-enter,
149
+ .rvc-modal-backgrop-transition-leave {
150
+ --tw-duration: var(--rvc-modal-transition-duration);
151
+
152
+ transition-duration: var(--rvc-modal-transition-duration);
153
+
154
+ --tw-ease: var(--rvc-modal-transition-timing-function);
155
+
156
+ transition-timing-function: var(--rvc-modal-transition-timing-function);
157
+ }
158
+
159
+ .rvc-modal-backdrop-transition-enter-from,
160
+ .rvc-modal-backdrop-transition-leave-to {
161
+ opacity: 0;
162
+ }
163
+
164
+ .rvc-modal-backdrop-transition-enter-to,
165
+ .rvc-modal-backdrop-transition-leave-from {
166
+ opacity: 1;
167
+ }
168
+
169
+ .rvc-modal-transition-enter,
170
+ .rvc-modal-transition-leave {
171
+ --tw-duration: var(--rvc-modal-transition-duration);
172
+
173
+ transition-duration: var(--rvc-modal-transition-duration);
174
+
175
+ --tw-ease: var(--rvc-modal-transition-timing-function);
176
+
177
+ transition-timing-function: var(--rvc-modal-transition-timing-function);
178
+ }
179
+
180
+ .rvc-modal-transition-enter-from,
181
+ .rvc-modal-transition-leave-to {
182
+ opacity: 0;
183
+ translate: 0 calc(var(--spacing) * 4);
184
+
185
+ @media (width >= theme(--breakpoint-sm)) {
186
+ scale: 0.95;
187
+ translate: 0 0;
188
+ }
189
+ }
190
+
191
+ .rvc-modal-transition-enter-to,
192
+ .rvc-modal-transition-leave-from {
193
+ opacity: 1;
194
+ translate: 0 0;
195
+
196
+ @media (width >= theme(--breakpoint-sm)) {
197
+ scale: 1;
198
+ }
199
+ }
98
200
  }