@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
@@ -13,7 +13,7 @@
13
13
  --rvc-toast-anchor-decoration: underline;
14
14
  --rvc-toast-icon-size: calc(var(--spacing) * 6);
15
15
  --rvc-toast-title-font-weight: var(--font-weight-medium);
16
- --rvc-toast-transition-property: colors;
16
+ --rvc-toast-transition-property: color, background-color, border-color;
17
17
  --rvc-toast-offset: calc(var(--spacing) * 6);
18
18
 
19
19
  /* Default (Info) variant */
@@ -59,23 +59,26 @@
59
59
 
60
60
  @layer components {
61
61
  .rvc-toast {
62
- gap: var(--rvc-toast-gap);
63
- padding: var(--rvc-toast-padding-y) var(--rvc-toast-padding-x);
64
- border-radius: var(--rvc-toast-border-radius);
65
- font-size: var(--rvc-toast-font-size);
66
- background-color: var(--rvc-toast-bg-color);
67
- color: var(--rvc-toast-color);
68
- width: var(--rvc-toast-width);
69
- max-width: var(--rvc-toast-max-width);
70
- border-width: var(--rvc-toast-border-width);
71
- border-color: var(--rvc-toast-border-color);
72
- filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.05));
73
62
  display: flex;
74
63
  position: fixed;
64
+ z-index: 99;
75
65
  left: 50%;
76
- transform: translateX(-50%);
66
+ width: var(--rvc-toast-width);
67
+ max-width: var(--rvc-toast-max-width);
68
+ padding: var(--rvc-toast-padding-y) var(--rvc-toast-padding-x);
77
69
  overflow: hidden;
78
- z-index: 99;
70
+ transform: translateX(-50%);
71
+ transition-property: opacity;
72
+ transition-duration: var(--rvc-toast-transition-duration);
73
+ transition-timing-function: var(--rvc-toast-transition-timing-function);
74
+ border-width: var(--rvc-toast-border-width);
75
+ border-radius: var(--rvc-toast-border-radius);
76
+ border-color: var(--rvc-toast-border-color);
77
+ background-color: var(--rvc-toast-bg-color);
78
+ color: var(--rvc-toast-color);
79
+ font-size: var(--rvc-toast-font-size);
80
+ gap: var(--rvc-toast-gap);
81
+ filter: drop-shadow(0 4px 8px rgb(0 0 0 / 5%));
79
82
 
80
83
  &.rvc-toast-bottom {
81
84
  bottom: var(--rvc-toast-offset);
@@ -86,11 +89,11 @@
86
89
  }
87
90
 
88
91
  a {
89
- text-decoration: var(--rvc-toast-anchor-decoration);
90
92
  transition-property: var(--rvc-toast-transition-property);
91
93
  transition-duration: var(--rvc-toast-transition-duration);
92
94
  transition-timing-function: var(--rvc-toast-transition-timing-function);
93
95
  color: var(--rvc-toast-anchor-color);
96
+ text-decoration: var(--rvc-toast-anchor-decoration);
94
97
 
95
98
  &:hover {
96
99
  color: var(--rvc-toast-anchor-color);
@@ -98,9 +101,9 @@
98
101
  }
99
102
 
100
103
  ul, ol {
101
- list-style-position: inside;
102
104
  margin: 0;
103
105
  padding-left: calc(var(--spacing) * 2);
106
+ list-style-position: inside;
104
107
  }
105
108
 
106
109
  ul {
@@ -112,39 +115,44 @@
112
115
  }
113
116
 
114
117
  .rvc-toast-close {
115
- background-color: var(--rvc-toast-close-bg-color);
116
- color: var(--rvc-toast-icon-color);
117
- border-bottom-left-radius: var(--rvc-toast-border-radius);
118
- transition-property: var(--rvc-toast-transition-property);
119
- transition-duration: var(--rvc-toast-transition-duration);
120
- transition-timing-function: var(--rvc-toast-transition-timing-function);
121
118
  display: inline-flex;
122
- justify-content: center;
123
- align-items: center;
124
119
  position: absolute;
125
120
  top: 0;
126
121
  right: 0;
122
+ align-items: center;
123
+ justify-content: center;
127
124
  padding: calc(var(--spacing) * 1.5);
125
+ transition-property: var(--rvc-toast-transition-property);
126
+ transition-duration: var(--rvc-toast-transition-duration);
127
+ transition-timing-function: var(--rvc-toast-transition-timing-function);
128
+ border-bottom-left-radius: var(--rvc-toast-border-radius);
129
+ background-color: var(--rvc-toast-close-bg-color);
130
+ color: var(--rvc-toast-icon-color);
128
131
 
129
132
  &:hover {
130
133
  background-color: var(--rvc-toast-close-bg-color-hover);
131
134
  color: var(--rvc-toast-icon-color-hover);
132
135
  }
136
+
137
+ svg {
138
+ width: calc(var(--spacing) * 5);
139
+ height: calc(var(--spacing) * 5);
140
+ }
133
141
  }
134
142
 
135
143
  .rvc-toast-icon {
144
+ display: block;
145
+ flex-shrink: 0;
136
146
  width: var(--rvc-toast-icon-size);
137
147
  height: var(--rvc-toast-icon-size);
138
148
  color: var(--rvc-toast-icon-color);
139
- display: block;
140
- flex-shrink: 0;
141
149
  }
142
150
 
143
151
  .rvc-toast-title {
144
- color: var(--rvc-toast-title-color);
145
- font-weight: var(--rvc-toast-title-font-weight);
146
152
  display: block;
147
153
  margin-bottom: calc(var(--spacing) * 2);
154
+ color: var(--rvc-toast-title-color);
155
+ font-weight: var(--rvc-toast-title-font-weight);
148
156
 
149
157
  &:last-child {
150
158
  margin-bottom: 0;
@@ -184,4 +192,22 @@
184
192
  --rvc-toast-anchor-color-hover: var(--rvc-toast-anchor-color-danger-hover);
185
193
  }
186
194
  }
195
+
196
+ /* Transitions */
197
+ .rvc-toast-transition-enter,
198
+ .rvc-toast-transition-leave {
199
+ transition-property: opacity;
200
+ transition-duration: 300ms;
201
+ transition-timing-function: var(--rvc-toast-transition-timing-function);
202
+ }
203
+
204
+ .rvc-toast-transition-enter-from,
205
+ .rvc-toast-transition-leave-to {
206
+ opacity: 0;
207
+ }
208
+
209
+ .rvc-toast-transition-enter-to,
210
+ .rvc-toast-transition-leave-from {
211
+ opacity: 1;
212
+ }
187
213
  }
@@ -1,4 +1,4 @@
1
- import { _ as o } from "../_shared/Tooltip-BKXJoJ1x.js";
1
+ import { _ as o } from "../_shared/Tooltip-B93ZF7IF.js";
2
2
  export {
3
3
  o as Tooltip,
4
4
  o as default
@@ -20,39 +20,36 @@
20
20
 
21
21
  @layer components {
22
22
  .rvc-tooltip {
23
+ visibility: hidden;
24
+ position: absolute;
23
25
  z-index: 10;
24
- color: var(--rvc-tooltip-color);
26
+ top: 0;
27
+ left: 0;
28
+ width: var(--rvc-tooltip-width);
29
+ padding: var(--rvc-tooltip-padding-y) var(--rvc-tooltip-padding-x) var(--rvc-tooltip-padding-y) var(--rvc-tooltip-padding-x);
25
30
  transition-property: var(--rvc-tooltip-transition-property);
26
31
  transition-duration: var(--rvc-tooltip-transition-duration);
27
32
  transition-timing-function: var(--rvc-tooltip-transition-timing-function);
33
+ opacity: 0;
34
+ color: var(--rvc-tooltip-color);
28
35
  text-align: var(--rvc-tooltip-text-align);
29
- padding-top: var(--rvc-tooltip-padding-y);
30
- padding-right: var(--rvc-tooltip-padding-x);
31
- padding-bottom: var(--rvc-tooltip-padding-y);
32
- padding-left: var(--rvc-tooltip-padding-x);
33
- width: var(--rvc-tooltip-width);
34
- position: absolute;
35
- top: 0;
36
- left: 0;
37
36
 
38
37
  &::before {
39
38
  content: '';
40
39
  position: absolute;
41
- top: 0;
42
- right: 0;
43
- bottom: 0;
44
- left: 0;
40
+ z-index: -1;
41
+ inset: 0;
45
42
  border-radius: var(--rvc-tooltip-border-radius);
46
43
  background-color: var(--rvc-tooltip-bg-color);
47
- z-index: -1;
48
44
  }
49
45
 
50
46
  .rvc-tooltip-arrow {
51
- background-color: var(--rvc-tooltip-bg-color);
47
+ position: absolute;
48
+ z-index: -1;
52
49
  width: var(--rvc-tooltip-arrow-size);
53
50
  height: var(--rvc-tooltip-arrow-size);
51
+ background-color: var(--rvc-tooltip-bg-color);
54
52
  clip-path: polygon(0 0, 50% 50%, 100% 0);
55
- z-index: -1;
56
53
  }
57
54
 
58
55
  &.rvc-tooltip-blur::before,
@@ -66,4 +63,9 @@
66
63
  --rvc-tooltip-arrow-size: var(--rvc-tooltip-arrow-size-sm);
67
64
  }
68
65
  }
66
+
67
+ .rvc-tooltip-wrapper:hover .rvc-tooltip {
68
+ visibility: visible;
69
+ opacity: 1;
70
+ }
69
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robuust-digital/vue-components",
3
- "version": "2.0.0-rc.5",
3
+ "version": "2.0.0-rc.6",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -50,7 +50,8 @@
50
50
  "docs:build": "vitepress build docs",
51
51
  "docs:preview": "vitepress preview docs",
52
52
  "test:unit": "vitest run",
53
- "lint": "eslint ."
53
+ "lint": "eslint .",
54
+ "lint:style": "stylelint 'src/**/*.{vue,css}'"
54
55
  },
55
56
  "dependencies": {
56
57
  "@floating-ui/vue": "^1.1.6",
@@ -74,10 +75,16 @@
74
75
  "eslint-plugin-vue": "^9.32.0",
75
76
  "jsdom": "^26.0.0",
76
77
  "postcss": "^8.5.2",
78
+ "postcss-html": "^1.8.0",
79
+ "postcss-scss": "^4.0.9",
80
+ "stylelint": "^16.14.1",
81
+ "stylelint-config-property-sort-order-smacss": "^10.0.0",
82
+ "stylelint-config-standard": "^37.0.0",
77
83
  "tailwindcss": "^4.0.6",
78
84
  "vite": "^6.1.0",
79
85
  "vite-plugin-eslint": "^1.8.1",
80
86
  "vite-plugin-static-copy": "^2.2.0",
87
+ "vite-plugin-stylelint": "^6.0.0",
81
88
  "vite-plugin-vue-devtools": "^7.7.2",
82
89
  "vite-svg-loader": "^5.1.0",
83
90
  "vitepress": "^2.0.0-alpha.2",
@@ -1,202 +0,0 @@
1
- import { ref as g, computed as y, createBlock as x, openBlock as B, unref as t, withCtx as d, createVNode as n, withModifiers as D, createElementVNode as a, normalizeClass as E, renderSlot as u, createCommentVNode as L, createTextVNode as T, toDisplayString as h } from "vue";
2
- import { TransitionRoot as F, Dialog as I, TransitionChild as $, DialogPanel as N, DialogTitle as C } from "@headlessui/vue";
3
- import { _ as S } from "./ButtonBase-CQjlJ85F.js";
4
- import { r as w } from "./XMarkIcon-90mcPzBs.js";
5
- function R(l) {
6
- const c = g(null), s = g(!1), v = y(() => l.as === "form"), b = y(() => `${l.id}-title`), m = y(() => `${l.id}-content`), f = y(() => {
7
- var r;
8
- return (r = c.value) == null ? void 0 : r.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
9
- });
10
- return {
11
- contentRef: c,
12
- ready: s,
13
- isForm: v,
14
- titleId: b,
15
- descriptionId: m,
16
- initialFocusElement: f
17
- };
18
- }
19
- const V = {
20
- role: "presentation",
21
- class: "fixed inset-0 z-10 w-screen overflow-y-auto"
22
- }, q = { class: "flex min-h-full justify-center p-4 items-center sm:p-0" }, z = { class: "rvc-modal-header" }, j = { class: "flex items-center justify-between" }, M = { class: "ml-3 flex h-7 items-center" }, A = ["id"], P = { class: "rvc-modal-footer" }, O = {
23
- __name: "Modal",
24
- props: {
25
- as: {
26
- type: String,
27
- default: "div"
28
- },
29
- id: {
30
- type: String,
31
- required: !0
32
- },
33
- title: {
34
- type: String,
35
- required: !0
36
- },
37
- showClose: {
38
- type: Boolean
39
- },
40
- spinning: {
41
- type: Boolean
42
- },
43
- submitLabel: {
44
- type: String,
45
- default: "Confirm"
46
- },
47
- cancelLabel: {
48
- type: String,
49
- default: "Cancel"
50
- },
51
- panelClass: {
52
- type: String,
53
- default: "sm:max-w-lg"
54
- }
55
- },
56
- emits: ["modal:open", "modal:close", "modal:save", "modal:closed"],
57
- setup(l, { emit: c }) {
58
- const s = c, v = l, {
59
- contentRef: b,
60
- ready: m,
61
- isForm: f,
62
- titleId: r,
63
- descriptionId: p,
64
- initialFocusElement: k
65
- } = R(v);
66
- return (i, e) => (B(), x(t(F), { as: "template" }, {
67
- default: d(() => [
68
- n(t(I), {
69
- as: l.as,
70
- class: "rvc-modal",
71
- static: "",
72
- "aria-modal": "true",
73
- role: "dialog",
74
- "initial-focus": t(k),
75
- "aria-labelledby": t(r),
76
- onClose: e[6] || (e[6] = (o) => i.$emit("modal:close")),
77
- onSubmit: e[7] || (e[7] = D((o) => s("modal:save", o), ["prevent"]))
78
- }, {
79
- default: d(() => [
80
- n(t($), {
81
- as: "template",
82
- enter: "ease-out duration-300",
83
- "enter-from": "opacity-0",
84
- "enter-to": "opacity-100",
85
- leave: "ease-in duration-200",
86
- "leave-from": "opacity-100",
87
- "leave-to": "opacity-0",
88
- onBeforeEnter: e[0] || (e[0] = (o) => s("modal:open"))
89
- }, {
90
- default: d(() => e[8] || (e[8] = [
91
- a("div", {
92
- "aria-hidden": "true",
93
- class: "fixed inset-0 transition-opacity rvc-modal-backdrop"
94
- }, null, -1)
95
- ])),
96
- _: 1
97
- }),
98
- a("div", V, [
99
- a("div", q, [
100
- n(t($), {
101
- as: "template",
102
- enter: "ease-out duration-300",
103
- "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
104
- "enter-to": "opacity-100 translate-y-0 sm:scale-100",
105
- leave: "ease-in duration-200",
106
- "leave-from": "opacity-100 translate-y-0 sm:scale-100",
107
- "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
108
- onBeforeEnter: e[4] || (e[4] = (o) => m.value = !0),
109
- onAfterLeave: e[5] || (e[5] = (o) => (m.value = !1, s("modal:closed")))
110
- }, {
111
- default: d(() => [
112
- n(t(N), {
113
- class: E(["rvc-modal-panel", l.panelClass]),
114
- "aria-busy": l.spinning,
115
- "aria-describedby": t(p)
116
- }, {
117
- default: d(() => [
118
- a("header", z, [
119
- u(i.$slots, "header", { title: l.title }, () => [
120
- a("div", j, [
121
- u(i.$slots, "title", {
122
- id: t(r),
123
- dialogTitle: t(C),
124
- title: l.title
125
- }, () => [
126
- n(t(C), {
127
- id: t(r),
128
- class: "rvc-modal-title"
129
- }, {
130
- default: d(() => [
131
- T(h(l.title), 1)
132
- ]),
133
- _: 1
134
- }, 8, ["id"])
135
- ]),
136
- l.showClose ? u(i.$slots, "close", {
137
- key: 0,
138
- icon: t(w),
139
- emitClose: () => s("drawer:close")
140
- }, () => [
141
- a("div", M, [
142
- a("button", {
143
- type: "button",
144
- class: "relative rvc-modal-close",
145
- "aria-label": "Close panel",
146
- onClick: e[1] || (e[1] = (o) => s("modal:close"))
147
- }, [
148
- n(t(w), {
149
- class: "size-full",
150
- "aria-hidden": "true"
151
- })
152
- ])
153
- ])
154
- ]) : L("", !0)
155
- ])
156
- ])
157
- ]),
158
- a("div", {
159
- id: t(p),
160
- ref_key: "contentRef",
161
- ref: b,
162
- class: "rvc-modal-content"
163
- }, [
164
- u(i.$slots, "default", { ready: t(m) })
165
- ], 8, A),
166
- a("footer", P, [
167
- u(i.$slots, "footer", { loading: l.spinning }, () => [
168
- n(S, {
169
- type: t(f) ? "submit" : "button",
170
- label: l.submitLabel,
171
- spinning: l.spinning,
172
- disabled: l.spinning,
173
- onClick: e[2] || (e[2] = (o) => !t(f) && i.$emit("modal:save"))
174
- }, null, 8, ["type", "label", "spinning", "disabled"]),
175
- n(S, {
176
- type: "button",
177
- color: "light",
178
- label: l.cancelLabel,
179
- onClick: e[3] || (e[3] = (o) => i.$emit("modal:close"))
180
- }, null, 8, ["label"])
181
- ])
182
- ])
183
- ]),
184
- _: 3
185
- }, 8, ["class", "aria-busy", "aria-describedby"])
186
- ]),
187
- _: 3
188
- })
189
- ])
190
- ])
191
- ]),
192
- _: 3
193
- }, 8, ["as", "initial-focus", "aria-labelledby"])
194
- ]),
195
- _: 3
196
- }));
197
- }
198
- };
199
- export {
200
- O as _,
201
- R as u
202
- };