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