@robuust-digital/vue-components 2.0.0-rc.5 → 2.0.0-rc.7
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 +242 -0
- package/dist/_shared/{ButtonBase-CQjlJ85F.js → ButtonBase-DfkwHIhN.js} +10 -10
- package/dist/_shared/Modal-BztsrTZC.js +199 -0
- package/dist/_shared/{Tooltip-BKXJoJ1x.js → Tooltip-B93ZF7IF.js} +16 -16
- package/dist/combobox/combobox.css +76 -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 +35 -10
- package/dist/core/empty-state.css +6 -6
- package/dist/core/index.js +307 -313
- package/dist/core/input.css +23 -13
- package/dist/core/pagination.css +68 -9
- package/dist/core/radio.css +35 -10
- package/dist/core/select.css +25 -16
- package/dist/core/styles.css +5 -35
- package/dist/core/table.css +66 -5
- package/dist/core/tabs.css +20 -9
- package/dist/core/textarea.css +17 -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 +124 -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 +19 -8
- package/dist/rich-text-editor/index.js +42 -39
- package/dist/rich-text-editor/rich-text.css +28 -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 +11 -3
- package/dist/_shared/Modal-CsI5mZlJ.js +0 -202
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
## 2.0.0-rc.7 (27-02-2025)
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
* `Radio` and `Checkbox` `modelValue` now allows `Number` type
|
|
6
|
+
* `wrapperClass` prop to `DataTable` component
|
|
7
|
+
* Introduced `--rvc-table-wrapper-border-radius` variable for `DataTable` component
|
|
8
|
+
* `Radio`: background color is now customizable with `--rvc-radio-bg-color` CSS variable
|
|
9
|
+
* `Checkbox`: background color is now customizable with `--rvc-checkbox-input-bg-color` CSS variable
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
* `Toast`: `open` prop is now `show`
|
|
14
|
+
* `DataTable`: `items` slot is renamed to `item` and added a parent `items` slot to customize the whole row
|
|
15
|
+
* `DataTable`: `headers` slot is renamed to `header` and added a parent `headers` slot to customize the whole row
|
|
16
|
+
|
|
17
|
+
### Updated
|
|
18
|
+
|
|
19
|
+
* Upgraded to **Tailwind v4.0.0** 🚀
|
|
20
|
+
* Customize RVC components with CSS variables
|
|
21
|
+
* Improved `Drawer` and `Modal` slots: Added `title` and `close` slots
|
|
22
|
+
* `FormSelect`: `modelValue` now allows `Boolean` type
|
|
23
|
+
* Improved zIndex order for Dialogs and Toast
|
|
24
|
+
|
|
25
|
+
### Deprecated
|
|
26
|
+
|
|
27
|
+
* ⚠️ **Nuxt 3** module support. You can manually integrate the components into your Nuxt 3 project now.
|
|
28
|
+
|
|
29
|
+
## 1.3.2 (24-01-2025)
|
|
30
|
+
|
|
31
|
+
### Updated
|
|
32
|
+
|
|
33
|
+
* Fixed `FormInput` modelValue type to allow `Number` type
|
|
34
|
+
|
|
35
|
+
## 1.3.1 (17-01-2025)
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
* Introduced `peerDependenciesMeta` to the `package.json` file to prevent installation issues
|
|
40
|
+
|
|
41
|
+
## 1.3.0 (16-01-2025)
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
* `RichTextEditor` component
|
|
46
|
+
* `--rvc-base-input-font-weight` to inputs
|
|
47
|
+
* `Tooltip` `size` prop. `sm` is now supported
|
|
48
|
+
* Added a `fullWidth` prop to the `Dropdown` Component
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
* `@floating-ui/vue`, `@headlessui/vue`, and `vue` are now peer dependencies
|
|
53
|
+
|
|
54
|
+
### Updated
|
|
55
|
+
|
|
56
|
+
* This library only supports ES format builds now
|
|
57
|
+
|
|
58
|
+
## 1.2.10 (13-01-2025)
|
|
59
|
+
|
|
60
|
+
### Updated
|
|
61
|
+
|
|
62
|
+
* Fixed `Combobox` `searchOnly`: prevent firing the request if no value is present
|
|
63
|
+
* Respect the `Combobox` `minLength` prop
|
|
64
|
+
* Combobox `onSearch` params order: `searchValue` first, `params` second and last `endpoint`
|
|
65
|
+
|
|
66
|
+
## 1.2.9 (10-01-2025)
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
* For `Combobox`, `FormInput`, `FormSelect` renamed `iconLeft` prop to `prefixIcon`
|
|
71
|
+
|
|
72
|
+
## 1.2.8 (10-01-2025)
|
|
73
|
+
|
|
74
|
+
### Added
|
|
75
|
+
|
|
76
|
+
* `FormTextarea` component
|
|
77
|
+
* `Combobox` component
|
|
78
|
+
* `rvc-radio` to Tailwind safelist
|
|
79
|
+
|
|
80
|
+
### Updated
|
|
81
|
+
|
|
82
|
+
* `Drawer` fixed docs slots section
|
|
83
|
+
|
|
84
|
+
## 1.2.7 (08-01-2025)
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
|
|
88
|
+
* `FormInput` component
|
|
89
|
+
|
|
90
|
+
### Changed
|
|
91
|
+
|
|
92
|
+
* Renamed `--rvc-input-*` CSS variables to `--rvc-base-input-*`
|
|
93
|
+
|
|
94
|
+
## 1.2.6 (07-01-2025)
|
|
95
|
+
|
|
96
|
+
### Updated
|
|
97
|
+
|
|
98
|
+
* Bugfix for nesting in tabs.js, empty-state.js and dropdown.js
|
|
99
|
+
* Refactor `Dropdown` component
|
|
100
|
+
* Added the icon-left prop to the `FormSelect` component
|
|
101
|
+
|
|
102
|
+
## 1.2.5 (06-01-2025)
|
|
103
|
+
|
|
104
|
+
### Added
|
|
105
|
+
|
|
106
|
+
* `Dropdown` component
|
|
107
|
+
* `EmptyState` component
|
|
108
|
+
* `Toast` component
|
|
109
|
+
* `Pagination` component
|
|
110
|
+
* `Tabs` component
|
|
111
|
+
|
|
112
|
+
## 1.2.4 (21-12-2024)
|
|
113
|
+
|
|
114
|
+
### Added
|
|
115
|
+
|
|
116
|
+
* Bind `header` data to `DataTable` `<th>` element
|
|
117
|
+
* `FormSelect` component
|
|
118
|
+
* `Checkbox`: introduced `rootClass` prop
|
|
119
|
+
* Do not map `id` from `DataTable` component items
|
|
120
|
+
|
|
121
|
+
### Updated
|
|
122
|
+
|
|
123
|
+
* Improved `DataTable` `headers` prop validators
|
|
124
|
+
* `Checkbox`: `id` prop is not required anymore
|
|
125
|
+
|
|
126
|
+
## 1.2.3 (18-12-2024)
|
|
127
|
+
|
|
128
|
+
### Added
|
|
129
|
+
|
|
130
|
+
* Global CSS variables and Tailwind config. See the [docs](https://robuust.github.io/vue-components/base/) for more information.
|
|
131
|
+
|
|
132
|
+
## 1.2.2 (17-12-2024)
|
|
133
|
+
|
|
134
|
+
### Added
|
|
135
|
+
|
|
136
|
+
* Added `loading` prop to Modal footer slot
|
|
137
|
+
|
|
138
|
+
## 1.2.1 (12-12-2024)
|
|
139
|
+
|
|
140
|
+
### Added
|
|
141
|
+
|
|
142
|
+
* `Modal` component
|
|
143
|
+
* `Tooltip` component
|
|
144
|
+
* `Accordion` component
|
|
145
|
+
* `@drawer:closed` event to `Drawer` component
|
|
146
|
+
* `@modal:closed` event to `Modal` component
|
|
147
|
+
* `Checkbox` component
|
|
148
|
+
* `Radio` component
|
|
149
|
+
* `Lightswitch` component
|
|
150
|
+
* Added crucial safelisting for component library
|
|
151
|
+
|
|
152
|
+
### Updated
|
|
153
|
+
|
|
154
|
+
* Improved customizability for all components
|
|
155
|
+
|
|
156
|
+
## 1.2.0 (11-12-2024)
|
|
157
|
+
|
|
158
|
+
### Added
|
|
159
|
+
|
|
160
|
+
* Introduced CSS variables for component customization
|
|
161
|
+
* `Modal` component
|
|
162
|
+
* `Tooltip` component
|
|
163
|
+
* `Accordion` component
|
|
164
|
+
* `Checkbox` component
|
|
165
|
+
* `Lightswitch` component
|
|
166
|
+
* `DataTable` component
|
|
167
|
+
* `@drawer:closed` event to `Drawer` component
|
|
168
|
+
* `@modal:closed` event to `Modal` component
|
|
169
|
+
* Added hover color for the `Alert` component
|
|
170
|
+
|
|
171
|
+
### Changed
|
|
172
|
+
|
|
173
|
+
* `rvc-` prefix for all components
|
|
174
|
+
* Changed the colors of the `Badge` component
|
|
175
|
+
* `fontSize` `base` to 15px and `sm` to 13px
|
|
176
|
+
* `xs` and `lg` from `size` prop in `Badge` component
|
|
177
|
+
* `ButtonBase` default color variants
|
|
178
|
+
|
|
179
|
+
## 1.1.1 (27-11-2024)
|
|
180
|
+
|
|
181
|
+
### Added
|
|
182
|
+
|
|
183
|
+
* `Alert` component
|
|
184
|
+
* `iconOnly` prop to `ButtonBase` component for icon-only button variant
|
|
185
|
+
* a11y attributes to `ButtonBase` component
|
|
186
|
+
|
|
187
|
+
### Updated
|
|
188
|
+
|
|
189
|
+
* Added slot bindings to `ButtonBase` component:
|
|
190
|
+
* Default slot: Access to `label` prop
|
|
191
|
+
* Icon slot: Access to `icon` prop
|
|
192
|
+
* Spinner slot: Access to `spinning` state
|
|
193
|
+
|
|
194
|
+
### Deprecated
|
|
195
|
+
|
|
196
|
+
* `xs` and `lg` from `size` prop in `ButtonBase` component
|
|
197
|
+
|
|
198
|
+
## 1.1.0-rc.0 (25-11-2024)
|
|
199
|
+
|
|
200
|
+
### Added
|
|
201
|
+
|
|
202
|
+
* `Badge` component
|
|
203
|
+
* `Drawer` component
|
|
204
|
+
* Export component library utilities CSS
|
|
205
|
+
* Library Tailwind `prefix: 'rvc-'` so it doesn't conflict with the consuming application
|
|
206
|
+
* `bindAs` prop to `ButtonBase` component to have more flexible component rendering [#30](https://github.com/robuust/vue-components/issues/30)
|
|
207
|
+
|
|
208
|
+
### Changed
|
|
209
|
+
|
|
210
|
+
* Removed `@apply` style classes from `./tailwind/components/button` to prevent conflicts with the consuming application. Added native CSS props instead.
|
|
211
|
+
|
|
212
|
+
### Updated
|
|
213
|
+
|
|
214
|
+
* Added CSS section to docs guide
|
|
215
|
+
* Added docs for `ButtonBase` slots
|
|
216
|
+
|
|
217
|
+
## 1.0.1-rc.3 (15-11-2024)
|
|
218
|
+
|
|
219
|
+
### Added
|
|
220
|
+
|
|
221
|
+
* `disabled` and `icon` customizations for `custom` `ButtonBase` component
|
|
222
|
+
|
|
223
|
+
### Changed
|
|
224
|
+
|
|
225
|
+
* Improved `custom` button Tailwind CSS configuration see [#22](https://github.com/robuust/vue-components/issues/22)
|
|
226
|
+
|
|
227
|
+
### Deprecated
|
|
228
|
+
|
|
229
|
+
* `hoverBackgroundColor`, `hoverColor`, `styles`, and `hoverStyles` properties for `custom` `ButtonBase` component
|
|
230
|
+
|
|
231
|
+
## 1.0.1-rc.2 (14-11-2024)
|
|
232
|
+
|
|
233
|
+
### Changed
|
|
234
|
+
|
|
235
|
+
* `ButtonBase` component improvements
|
|
236
|
+
* Updated docs
|
|
237
|
+
|
|
238
|
+
## 1.0.1-rc.1 (12-11-2024)
|
|
239
|
+
|
|
240
|
+
### Added
|
|
241
|
+
|
|
242
|
+
* `ButtonBase` component
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { watchEffect as u, createBlock as
|
|
1
|
+
import { watchEffect as u, createBlock as i, openBlock as t, resolveDynamicComponent as c, mergeProps as b, withCtx as d, createElementBlock as y, renderSlot as l, createCommentVNode as a, createTextVNode as r, toDisplayString as s, unref as f } from "vue";
|
|
2
2
|
import { S as g } from "./icon-spinner-CmxIOqaK.js";
|
|
3
3
|
const m = {
|
|
4
4
|
key: 0,
|
|
5
|
-
class: "
|
|
5
|
+
class: "rvc-button-label"
|
|
6
6
|
}, O = {
|
|
7
7
|
__name: "ButtonBase",
|
|
8
8
|
props: {
|
|
@@ -47,31 +47,31 @@ const m = {
|
|
|
47
47
|
const o = n;
|
|
48
48
|
return u(() => {
|
|
49
49
|
o.iconOnly && !o.icon && console.warn("[ButtonBase] Using iconOnly prop without providing an icon may result in an empty button.");
|
|
50
|
-
}), (e,
|
|
50
|
+
}), (e, v) => (t(), i(c(n.as), b(n.bindAs ? { as: n.bindAs } : {}, {
|
|
51
51
|
class: ["rvc-button", `rvc-button-${n.color}`, `rvc-button-${n.size}`, { "rvc-button-reverse": n.iconLeft }, { "rvc-button-icon-only": n.iconOnly }],
|
|
52
52
|
"aria-label": n.iconOnly ? n.label : null,
|
|
53
53
|
"aria-busy": n.spinning
|
|
54
54
|
}), {
|
|
55
55
|
default: d(() => [
|
|
56
|
-
n.iconOnly && n.label ? (t(),
|
|
57
|
-
|
|
56
|
+
n.iconOnly && n.label ? (t(), y("span", m, [
|
|
57
|
+
l(e.$slots, "default", { label: n.label }, () => [
|
|
58
58
|
r(s(n.label), 1)
|
|
59
59
|
])
|
|
60
|
-
])) : n.label ?
|
|
60
|
+
])) : n.label ? l(e.$slots, "default", {
|
|
61
61
|
key: 1,
|
|
62
62
|
label: n.label
|
|
63
63
|
}, () => [
|
|
64
64
|
r(s(n.label), 1)
|
|
65
65
|
]) : a("", !0),
|
|
66
|
-
|
|
67
|
-
n.icon && !n.spinning ? (t(),
|
|
66
|
+
l(e.$slots, "icon", { icon: n.icon }, () => [
|
|
67
|
+
n.icon && !n.spinning ? (t(), i(c(n.icon), {
|
|
68
68
|
key: 0,
|
|
69
69
|
class: "rvc-button-icon",
|
|
70
70
|
"aria-hidden": !n.iconOnly
|
|
71
71
|
}, null, 8, ["aria-hidden"])) : a("", !0)
|
|
72
72
|
]),
|
|
73
|
-
|
|
74
|
-
n.spinning ? (t(),
|
|
73
|
+
l(e.$slots, "spinner", { spinning: n.spinning }, () => [
|
|
74
|
+
n.spinning ? (t(), i(f(g), {
|
|
75
75
|
key: 0,
|
|
76
76
|
class: "rvc-button-icon rvc-button-icon-loading",
|
|
77
77
|
"aria-hidden": "true"
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { ref as g, computed as f, createBlock as B, openBlock as D, unref as t, withCtx as d, createVNode as i, withModifiers as E, createElementVNode as a, normalizeClass as L, renderSlot as c, createCommentVNode as T, createTextVNode as h, toDisplayString as F } from "vue";
|
|
2
|
+
import { TransitionRoot as I, Dialog as N, TransitionChild as $, DialogPanel as R, DialogTitle as C } from "@headlessui/vue";
|
|
3
|
+
import { _ as k } from "./ButtonBase-DfkwHIhN.js";
|
|
4
|
+
import { r as S } from "./XMarkIcon-90mcPzBs.js";
|
|
5
|
+
function V(o) {
|
|
6
|
+
const v = g(null), r = g(!1), b = f(() => o.as === "form"), p = f(() => `${o.id}-title`), m = f(() => `${o.id}-content`), u = f(() => {
|
|
7
|
+
var s;
|
|
8
|
+
return (s = v.value) == null ? void 0 : s.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
9
|
+
});
|
|
10
|
+
return {
|
|
11
|
+
contentRef: v,
|
|
12
|
+
ready: r,
|
|
13
|
+
isForm: b,
|
|
14
|
+
titleId: p,
|
|
15
|
+
descriptionId: m,
|
|
16
|
+
initialFocusElement: u
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const q = {
|
|
20
|
+
role: "presentation",
|
|
21
|
+
class: "rvc-modal-presentation"
|
|
22
|
+
}, M = { class: "rvc-modal-container" }, x = { class: "rvc-modal-header" }, z = { class: "rvc-modal-header-inner" }, A = { class: "rvc-modal-close-wrapper" }, P = ["id"], j = { 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: "rvc-modal-panel-max-width"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
emits: ["modal:open", "modal:close", "modal:save", "modal:closed"],
|
|
57
|
+
setup(o, { emit: v }) {
|
|
58
|
+
const r = v, b = o, {
|
|
59
|
+
contentRef: p,
|
|
60
|
+
ready: m,
|
|
61
|
+
isForm: u,
|
|
62
|
+
titleId: s,
|
|
63
|
+
descriptionId: y,
|
|
64
|
+
initialFocusElement: w
|
|
65
|
+
} = V(b);
|
|
66
|
+
return (l, e) => (D(), B(t(I), { as: "template" }, {
|
|
67
|
+
default: d(() => [
|
|
68
|
+
i(t(N), {
|
|
69
|
+
as: o.as,
|
|
70
|
+
class: "rvc-modal",
|
|
71
|
+
static: "",
|
|
72
|
+
"aria-modal": "true",
|
|
73
|
+
role: "dialog",
|
|
74
|
+
"initial-focus": t(w),
|
|
75
|
+
"aria-labelledby": t(s),
|
|
76
|
+
onClose: e[6] || (e[6] = (n) => l.$emit("modal:close")),
|
|
77
|
+
onSubmit: e[7] || (e[7] = E((n) => r("modal:save", n), ["prevent"]))
|
|
78
|
+
}, {
|
|
79
|
+
default: d(() => [
|
|
80
|
+
i(t($), {
|
|
81
|
+
as: "template",
|
|
82
|
+
enter: "rvc-modal-backdrop-transition-enter",
|
|
83
|
+
"enter-from": "rvc-modal-backdrop-transition-enter-from",
|
|
84
|
+
"enter-to": "rvc-modal-backdrop-transition-enter-to",
|
|
85
|
+
leave: "rvc-modal-backdrop-transition-leave",
|
|
86
|
+
"leave-from": "rvc-modal-backdrop-transition-leave-from",
|
|
87
|
+
"leave-to": "rvc-modal-backdrop-transition-leave-to",
|
|
88
|
+
onBeforeEnter: e[0] || (e[0] = (n) => r("modal:open"))
|
|
89
|
+
}, {
|
|
90
|
+
default: d(() => e[8] || (e[8] = [
|
|
91
|
+
a("div", {
|
|
92
|
+
"aria-hidden": "true",
|
|
93
|
+
class: "rvc-modal-backdrop"
|
|
94
|
+
}, null, -1)
|
|
95
|
+
])),
|
|
96
|
+
_: 1
|
|
97
|
+
}),
|
|
98
|
+
a("div", q, [
|
|
99
|
+
a("div", M, [
|
|
100
|
+
i(t($), {
|
|
101
|
+
as: "template",
|
|
102
|
+
enter: "rvc-modal-transition-enter",
|
|
103
|
+
"enter-from": "rvc-modal-transition-enter-from",
|
|
104
|
+
"enter-to": "rvc-modal-transition-enter-to",
|
|
105
|
+
leave: "rvc-modal-transition-leave",
|
|
106
|
+
"leave-from": "rvc-modal-transition-leave-from",
|
|
107
|
+
"leave-to": "rvc-modal-transition-leave-to",
|
|
108
|
+
onBeforeEnter: e[4] || (e[4] = (n) => m.value = !0),
|
|
109
|
+
onAfterLeave: e[5] || (e[5] = (n) => (m.value = !1, r("modal:closed")))
|
|
110
|
+
}, {
|
|
111
|
+
default: d(() => [
|
|
112
|
+
i(t(R), {
|
|
113
|
+
class: L(["rvc-modal-panel", o.panelClass]),
|
|
114
|
+
"aria-busy": o.spinning,
|
|
115
|
+
"aria-describedby": t(y)
|
|
116
|
+
}, {
|
|
117
|
+
default: d(() => [
|
|
118
|
+
a("header", x, [
|
|
119
|
+
c(l.$slots, "header", { title: o.title }, () => [
|
|
120
|
+
a("div", z, [
|
|
121
|
+
c(l.$slots, "title", {
|
|
122
|
+
id: t(s),
|
|
123
|
+
dialogTitle: t(C),
|
|
124
|
+
title: o.title
|
|
125
|
+
}, () => [
|
|
126
|
+
i(t(C), {
|
|
127
|
+
id: t(s),
|
|
128
|
+
class: "rvc-modal-title"
|
|
129
|
+
}, {
|
|
130
|
+
default: d(() => [
|
|
131
|
+
h(F(o.title), 1)
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
}, 8, ["id"])
|
|
135
|
+
]),
|
|
136
|
+
o.showClose ? c(l.$slots, "close", {
|
|
137
|
+
key: 0,
|
|
138
|
+
icon: t(S),
|
|
139
|
+
emitClose: () => r("drawer:close")
|
|
140
|
+
}, () => [
|
|
141
|
+
a("div", A, [
|
|
142
|
+
a("button", {
|
|
143
|
+
type: "button",
|
|
144
|
+
class: "rvc-modal-close",
|
|
145
|
+
"aria-label": "Close panel",
|
|
146
|
+
onClick: e[1] || (e[1] = (n) => r("modal:close"))
|
|
147
|
+
}, [
|
|
148
|
+
i(t(S), { "aria-hidden": "true" })
|
|
149
|
+
])
|
|
150
|
+
])
|
|
151
|
+
]) : T("", !0)
|
|
152
|
+
])
|
|
153
|
+
])
|
|
154
|
+
]),
|
|
155
|
+
a("div", {
|
|
156
|
+
id: t(y),
|
|
157
|
+
ref_key: "contentRef",
|
|
158
|
+
ref: p,
|
|
159
|
+
class: "rvc-modal-content"
|
|
160
|
+
}, [
|
|
161
|
+
c(l.$slots, "default", { ready: t(m) })
|
|
162
|
+
], 8, P),
|
|
163
|
+
a("footer", j, [
|
|
164
|
+
c(l.$slots, "footer", { loading: o.spinning }, () => [
|
|
165
|
+
i(k, {
|
|
166
|
+
type: t(u) ? "submit" : "button",
|
|
167
|
+
label: o.submitLabel,
|
|
168
|
+
spinning: o.spinning,
|
|
169
|
+
disabled: o.spinning,
|
|
170
|
+
onClick: e[2] || (e[2] = (n) => !t(u) && l.$emit("modal:save"))
|
|
171
|
+
}, null, 8, ["type", "label", "spinning", "disabled"]),
|
|
172
|
+
i(k, {
|
|
173
|
+
type: "button",
|
|
174
|
+
color: "light",
|
|
175
|
+
label: o.cancelLabel,
|
|
176
|
+
onClick: e[3] || (e[3] = (n) => l.$emit("modal:close"))
|
|
177
|
+
}, null, 8, ["label"])
|
|
178
|
+
])
|
|
179
|
+
])
|
|
180
|
+
]),
|
|
181
|
+
_: 3
|
|
182
|
+
}, 8, ["class", "aria-busy", "aria-describedby"])
|
|
183
|
+
]),
|
|
184
|
+
_: 3
|
|
185
|
+
})
|
|
186
|
+
])
|
|
187
|
+
])
|
|
188
|
+
]),
|
|
189
|
+
_: 3
|
|
190
|
+
}, 8, ["as", "initial-focus", "aria-labelledby"])
|
|
191
|
+
]),
|
|
192
|
+
_: 3
|
|
193
|
+
}));
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
export {
|
|
197
|
+
O as _,
|
|
198
|
+
V as u
|
|
199
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowRef as a, createElementBlock as
|
|
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
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
3
|
const B = ["innerHTML"], N = {
|
|
4
4
|
__name: "Tooltip",
|
|
@@ -46,7 +46,7 @@ const B = ["innerHTML"], N = {
|
|
|
46
46
|
setup(t) {
|
|
47
47
|
const o = t, i = a(), s = a(), l = a(), {
|
|
48
48
|
floatingStyles: y,
|
|
49
|
-
middlewareData:
|
|
49
|
+
middlewareData: w,
|
|
50
50
|
placement: c
|
|
51
51
|
} = k(i, s, {
|
|
52
52
|
middleware: [
|
|
@@ -65,13 +65,13 @@ const B = ["innerHTML"], N = {
|
|
|
65
65
|
],
|
|
66
66
|
whileElementsMounted: z,
|
|
67
67
|
placement: o.placement
|
|
68
|
-
}),
|
|
68
|
+
}), b = (e) => ({
|
|
69
69
|
top: 0,
|
|
70
70
|
bottom: 180,
|
|
71
71
|
left: -90,
|
|
72
72
|
right: 90
|
|
73
|
-
})[e.split("-")[0]] || 0,
|
|
74
|
-
var
|
|
73
|
+
})[e.split("-")[0]] || 0, v = (e) => {
|
|
74
|
+
var m, d;
|
|
75
75
|
const r = c.value.split("-")[0], n = {
|
|
76
76
|
left: "right",
|
|
77
77
|
right: "left",
|
|
@@ -80,34 +80,34 @@ const B = ["innerHTML"], N = {
|
|
|
80
80
|
}[r];
|
|
81
81
|
return {
|
|
82
82
|
style: {
|
|
83
|
-
left: (
|
|
84
|
-
top: (
|
|
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
85
|
bottom: "",
|
|
86
86
|
right: "",
|
|
87
87
|
[n]: l.value ? `${l.value.offsetWidth * -1}px` : "",
|
|
88
|
-
transform: `rotate(${
|
|
88
|
+
transform: `rotate(${b(c.value)}deg)`
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
|
-
return (e, r) => (
|
|
92
|
+
return (e, r) => (f(), p("div", {
|
|
93
93
|
ref_key: "wrapperRef",
|
|
94
94
|
ref: i,
|
|
95
|
-
class: "
|
|
95
|
+
class: "rvc-tooltip-wrapper"
|
|
96
96
|
}, [
|
|
97
|
-
|
|
97
|
+
u(e.$slots, "default"),
|
|
98
98
|
g("div", {
|
|
99
99
|
ref_key: "tooltipRef",
|
|
100
100
|
ref: s,
|
|
101
101
|
class: S([
|
|
102
|
-
"rvc-tooltip
|
|
102
|
+
"rvc-tooltip",
|
|
103
103
|
t.tooltipClass,
|
|
104
104
|
`rvc-tooltip-${t.size}`,
|
|
105
105
|
{ "rvc-tooltip-blur": t.blur }
|
|
106
106
|
]),
|
|
107
107
|
style: x(h(y))
|
|
108
108
|
}, [
|
|
109
|
-
|
|
110
|
-
t.content ? (
|
|
109
|
+
u(e.$slots, "content", { content: t.content }, () => [
|
|
110
|
+
t.content ? (f(), p("div", {
|
|
111
111
|
key: 0,
|
|
112
112
|
innerHTML: t.content
|
|
113
113
|
}, null, 8, B)) : $("", !0)
|
|
@@ -115,8 +115,8 @@ const B = ["innerHTML"], N = {
|
|
|
115
115
|
g("div", R({
|
|
116
116
|
ref_key: "arrowRef",
|
|
117
117
|
ref: l,
|
|
118
|
-
class: "
|
|
119
|
-
},
|
|
118
|
+
class: "rvc-tooltip-arrow"
|
|
119
|
+
}, v(h(w))), null, 16)
|
|
120
120
|
], 6)
|
|
121
121
|
], 512));
|
|
122
122
|
}
|