ropav 0.0.6 → 0.0.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/dist/_plugin-vue_export-helper.js +1 -11
- package/dist/accordion.css +112 -0
- package/dist/accordion.js +360 -0
- package/dist/accordion.js.map +1 -0
- package/dist/badge.css +169 -0
- package/dist/badge.js +103 -0
- package/dist/badge.js.map +1 -0
- package/dist/bem.js +11 -0
- package/dist/bem.js.map +1 -0
- package/dist/button-group.css +8 -8
- package/dist/button-group.js +2 -1
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +3 -2
- package/dist/button.js.map +1 -1
- package/dist/card.js +2 -1
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +2 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/collapse.css +32 -0
- package/dist/collapse.js +68 -0
- package/dist/collapse.js.map +1 -0
- package/dist/components/accordion/accordion-item.d.ts +40 -0
- package/dist/components/accordion/accordion.d.ts +23 -0
- package/dist/components/accordion/index.d.ts +4 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/accordion/types.d.ts +100 -0
- package/dist/components/accordion/useAccordion.d.ts +3 -0
- package/dist/components/badge/badge.d.ts +25 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/badge/types.d.ts +16 -0
- package/dist/components/badge/useBadgeColor.d.ts +8 -0
- package/dist/components/collapse/collapse.d.ts +36 -0
- package/dist/components/collapse/index.d.ts +3 -0
- package/dist/components/collapse/index.js +3 -0
- package/dist/components/collapse/types.d.ts +76 -0
- package/dist/components/collapse/useCollapse.d.ts +2 -0
- package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +16 -0
- package/dist/components/dropdown-menu/dropdown-menu-utils.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +26 -0
- package/dist/components/dropdown-menu/index.d.ts +3 -0
- package/dist/components/dropdown-menu/index.js +2 -0
- package/dist/components/dropdown-menu/types.d.ts +104 -0
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +32 -0
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +30 -0
- package/dist/components/dropdown-menu/useDropdownMenuDom.d.ts +28 -0
- package/dist/components/dropdown-menu/useDropdownMenuHoverIntent.d.ts +24 -0
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +51 -0
- package/dist/components/dropdown-menu/useDropdownMenuNavigation.d.ts +16 -0
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +25 -0
- package/dist/components/dropdown-menu/useDropdownSubmenus.d.ts +18 -0
- package/dist/components/field/field.d.ts +2 -2
- package/dist/components/field/useField.d.ts +16 -0
- package/dist/components/input/useInput.d.ts +8 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +2 -0
- package/dist/components/modal/modal.d.ts +42 -0
- package/dist/components/modal/types.d.ts +32 -0
- package/dist/components/modal/useModal.d.ts +29 -0
- package/dist/components/overlay/index.d.ts +2 -0
- package/dist/components/overlay/index.js +2 -0
- package/dist/components/overlay/overlay.d.ts +19 -0
- package/dist/components/overlay/types.d.ts +12 -0
- package/dist/components/overlay/useOverlay.d.ts +7 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.js +2 -0
- package/dist/components/popover/popover.d.ts +43 -0
- package/dist/components/popover/types.d.ts +40 -0
- package/dist/components/popover/usePopover.d.ts +20 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/tabs/tabs-content.d.ts +24 -0
- package/dist/components/tabs/tabs-list.d.ts +26 -0
- package/dist/components/tabs/tabs-trigger.d.ts +29 -0
- package/dist/components/tabs/tabs.d.ts +31 -0
- package/dist/components/tabs/types.d.ts +160 -0
- package/dist/components/tabs/useTabs.d.ts +5 -0
- package/dist/dropdown-menu.css +159 -0
- package/dist/dropdown-menu.js +903 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/field.css +8 -8
- package/dist/field.js +68 -50
- package/dist/field.js.map +1 -1
- package/dist/icon-button.css +1 -1
- package/dist/icon-button.js +3 -2
- package/dist/icon-button.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +12 -1
- package/dist/input.css +25 -25
- package/dist/input.js +57 -38
- package/dist/input.js.map +1 -1
- package/dist/modal.css +134 -0
- package/dist/modal.js +433 -0
- package/dist/modal.js.map +1 -0
- package/dist/overlay.css +28 -0
- package/dist/overlay.js +84 -0
- package/dist/overlay.js.map +1 -0
- package/dist/popover.css +75 -0
- package/dist/popover.js +367 -0
- package/dist/popover.js.map +1 -0
- package/dist/progress.js +2 -1
- package/dist/progress.js.map +1 -1
- package/dist/radio.js +4 -9
- package/dist/radio.js.map +1 -1
- package/dist/select.js +8 -37
- package/dist/select.js.map +1 -1
- package/dist/slider.js +2 -1
- package/dist/slider.js.map +1 -1
- package/dist/switch.js +2 -1
- package/dist/switch.js.map +1 -1
- package/dist/tabs.css +279 -0
- package/dist/tabs.js +515 -0
- package/dist/tabs.js.map +1 -0
- package/dist/textarea.js +2 -1
- package/dist/textarea.js.map +1 -1
- package/dist/tooltip.js +2 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/useClickOutside.js +26 -0
- package/dist/useClickOutside.js.map +1 -0
- package/dist/useCollapse.js +94 -0
- package/dist/useCollapse.js.map +1 -0
- package/dist/useRequiredInject.js +11 -0
- package/dist/useRequiredInject.js.map +1 -0
- package/dist/x.js +14 -0
- package/dist/x.js.map +1 -0
- package/package.json +35 -3
- package/dist/_plugin-vue_export-helper.js.map +0 -1
package/dist/modal.js
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import './modal.css';
|
|
2
|
+
import { t as bem } from "./bem.js";
|
|
3
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
4
|
+
import { t as icon_button_default } from "./icon-button.js";
|
|
5
|
+
import { t as x_default } from "./x.js";
|
|
6
|
+
import { t as overlay_default } from "./overlay.js";
|
|
7
|
+
import { VaporTransition, applyVShow, child, computed, createComponent, createIf, createSlot, createTemplateRefSetter, defineVaporComponent, extend, isRef, nextTick, onBeforeUnmount, onMounted, ref, renderEffect, setAttr, setClass, setInsertionState, setProp, setStyle, setText, template, toDisplayString, txt, unref, useId, useSlots, watch } from "vue";
|
|
8
|
+
//#region src/components/modal/useModal.ts
|
|
9
|
+
var bodyScrollLockCount = 0;
|
|
10
|
+
var previousBodyOverflow = "";
|
|
11
|
+
var activeModalStack = [];
|
|
12
|
+
var DEFAULT_ROLE = "dialog";
|
|
13
|
+
var DEFAULT_SIZE = "md";
|
|
14
|
+
var FOCUSABLE_SELECTOR = [
|
|
15
|
+
"a[href]",
|
|
16
|
+
"button:not([disabled])",
|
|
17
|
+
"textarea:not([disabled])",
|
|
18
|
+
"input:not([disabled])",
|
|
19
|
+
"select:not([disabled])",
|
|
20
|
+
"[tabindex]:not([tabindex=\"-1\"])"
|
|
21
|
+
].join(",");
|
|
22
|
+
var MODAL_PRESET_SIZES = /* @__PURE__ */ new Set([
|
|
23
|
+
"sm",
|
|
24
|
+
"md",
|
|
25
|
+
"lg",
|
|
26
|
+
"xl",
|
|
27
|
+
"full"
|
|
28
|
+
]);
|
|
29
|
+
function isHTMLElement(value) {
|
|
30
|
+
return typeof HTMLElement !== "undefined" && value instanceof HTMLElement;
|
|
31
|
+
}
|
|
32
|
+
function isModalPresetSize(size) {
|
|
33
|
+
return MODAL_PRESET_SIZES.has(size);
|
|
34
|
+
}
|
|
35
|
+
function isFocusable(element) {
|
|
36
|
+
if (element.getAttribute("aria-hidden") === "true") return false;
|
|
37
|
+
if (element.hasAttribute("disabled")) return false;
|
|
38
|
+
return element.tabIndex >= 0;
|
|
39
|
+
}
|
|
40
|
+
function getFocusableElements(panel) {
|
|
41
|
+
if (!panel) return [];
|
|
42
|
+
return [...panel.querySelectorAll(FOCUSABLE_SELECTOR)].filter(isFocusable);
|
|
43
|
+
}
|
|
44
|
+
function focusElement(element) {
|
|
45
|
+
if (!element) return;
|
|
46
|
+
try {
|
|
47
|
+
element.focus({ preventScroll: true });
|
|
48
|
+
} catch {
|
|
49
|
+
element.focus();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function lockBodyScroll() {
|
|
53
|
+
if (typeof document === "undefined") return void 0;
|
|
54
|
+
if (bodyScrollLockCount === 0) {
|
|
55
|
+
previousBodyOverflow = document.body.style.overflow;
|
|
56
|
+
document.body.style.overflow = "hidden";
|
|
57
|
+
}
|
|
58
|
+
bodyScrollLockCount += 1;
|
|
59
|
+
return () => {
|
|
60
|
+
bodyScrollLockCount = Math.max(0, bodyScrollLockCount - 1);
|
|
61
|
+
if (bodyScrollLockCount === 0) document.body.style.overflow = previousBodyOverflow;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function readInitialFocus(initialFocus) {
|
|
65
|
+
return isRef(initialFocus) ? initialFocus.value : initialFocus;
|
|
66
|
+
}
|
|
67
|
+
function queryPanelElement(panel, selector) {
|
|
68
|
+
try {
|
|
69
|
+
const element = panel.querySelector(selector);
|
|
70
|
+
return isHTMLElement(element) ? element : null;
|
|
71
|
+
} catch {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function useModal(props, emitOpenChange) {
|
|
76
|
+
const slots = useSlots();
|
|
77
|
+
const generatedId = useId();
|
|
78
|
+
const panelRef = ref(null);
|
|
79
|
+
const uncontrolledOpen = ref(Boolean(props.defaultOpen));
|
|
80
|
+
const modalToken = Symbol("modal");
|
|
81
|
+
let isMounted = false;
|
|
82
|
+
let isActiveModal = false;
|
|
83
|
+
let previousActiveElement = null;
|
|
84
|
+
let removeDocumentListeners;
|
|
85
|
+
let unlockScroll;
|
|
86
|
+
const modalId = computed(() => props.id ?? `${generatedId}-modal`);
|
|
87
|
+
const titleId = computed(() => `${modalId.value}-title`);
|
|
88
|
+
const descriptionId = computed(() => `${modalId.value}-description`);
|
|
89
|
+
const role = computed(() => props.role ?? DEFAULT_ROLE);
|
|
90
|
+
const size = computed(() => props.size || DEFAULT_SIZE);
|
|
91
|
+
const isPresetSize = computed(() => isModalPresetSize(size.value));
|
|
92
|
+
const isOpen = computed(() => props.open ?? uncontrolledOpen.value);
|
|
93
|
+
const shouldRender = computed(() => Boolean(props.keepMounted || isOpen.value));
|
|
94
|
+
const hasCustomHeader = computed(() => Boolean(slots.header));
|
|
95
|
+
const hasHeader = computed(() => Boolean(hasCustomHeader.value || props.title || props.description));
|
|
96
|
+
const hasFooter = computed(() => Boolean(slots.footer));
|
|
97
|
+
const showCloseButton = computed(() => props.showCloseButton);
|
|
98
|
+
const headerId = computed(() => hasCustomHeader.value && !props.ariaLabel ? titleId.value : void 0);
|
|
99
|
+
const ariaLabelledby = computed(() => {
|
|
100
|
+
if (props.ariaLabel) return void 0;
|
|
101
|
+
return hasCustomHeader.value || props.title ? titleId.value : void 0;
|
|
102
|
+
});
|
|
103
|
+
const ariaDescribedby = computed(() => props.description && !hasCustomHeader.value ? descriptionId.value : void 0);
|
|
104
|
+
const ariaLabel = computed(() => ariaLabelledby.value ? void 0 : props.ariaLabel || void 0);
|
|
105
|
+
const rootClass = computed(() => bem("rp-modal", {
|
|
106
|
+
[`size-${size.value}`]: isPresetSize.value,
|
|
107
|
+
"size-custom": !isPresetSize.value,
|
|
108
|
+
open: isOpen.value
|
|
109
|
+
}));
|
|
110
|
+
const rootStyle = computed(() => {
|
|
111
|
+
if (isPresetSize.value) return void 0;
|
|
112
|
+
return { "--_rp-modal-width": size.value };
|
|
113
|
+
});
|
|
114
|
+
const stateClass = computed(() => ({
|
|
115
|
+
"rp-modal--closable": showCloseButton.value,
|
|
116
|
+
"rp-modal--headerless": !hasHeader.value
|
|
117
|
+
}));
|
|
118
|
+
const slotProps = computed(() => ({
|
|
119
|
+
isOpen: isOpen.value,
|
|
120
|
+
open: openModal,
|
|
121
|
+
close: closeModal,
|
|
122
|
+
toggle: toggleModal
|
|
123
|
+
}));
|
|
124
|
+
function setOpen(nextOpen) {
|
|
125
|
+
if (nextOpen === isOpen.value) return;
|
|
126
|
+
if (props.open === void 0) uncontrolledOpen.value = nextOpen;
|
|
127
|
+
emitOpenChange?.(nextOpen);
|
|
128
|
+
}
|
|
129
|
+
function openModal() {
|
|
130
|
+
setOpen(true);
|
|
131
|
+
}
|
|
132
|
+
function closeModal() {
|
|
133
|
+
setOpen(false);
|
|
134
|
+
}
|
|
135
|
+
function toggleModal() {
|
|
136
|
+
setOpen(!isOpen.value);
|
|
137
|
+
}
|
|
138
|
+
function resolveInitialFocus() {
|
|
139
|
+
const initialFocus = readInitialFocus(props.initialFocus);
|
|
140
|
+
const panel = panelRef.value;
|
|
141
|
+
if (!initialFocus || !panel) return null;
|
|
142
|
+
if (typeof initialFocus === "string") return queryPanelElement(panel, initialFocus);
|
|
143
|
+
return panel.contains(initialFocus) ? initialFocus : null;
|
|
144
|
+
}
|
|
145
|
+
function focusInitialElement() {
|
|
146
|
+
const firstFocusable = getFocusableElements(panelRef.value)[0];
|
|
147
|
+
focusElement(resolveInitialFocus() ?? firstFocusable ?? panelRef.value);
|
|
148
|
+
}
|
|
149
|
+
function addToStack() {
|
|
150
|
+
if (!activeModalStack.includes(modalToken)) activeModalStack.push(modalToken);
|
|
151
|
+
}
|
|
152
|
+
function removeFromStack() {
|
|
153
|
+
const index = activeModalStack.indexOf(modalToken);
|
|
154
|
+
if (index !== -1) activeModalStack.splice(index, 1);
|
|
155
|
+
}
|
|
156
|
+
function isTopModal() {
|
|
157
|
+
return activeModalStack[activeModalStack.length - 1] === modalToken;
|
|
158
|
+
}
|
|
159
|
+
function trapFocus(event) {
|
|
160
|
+
const panel = panelRef.value;
|
|
161
|
+
if (!panel) return;
|
|
162
|
+
const focusableElements = getFocusableElements(panel);
|
|
163
|
+
if (focusableElements.length === 0) {
|
|
164
|
+
event.preventDefault();
|
|
165
|
+
focusElement(panel);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const firstElement = focusableElements[0];
|
|
169
|
+
const lastElement = focusableElements[focusableElements.length - 1];
|
|
170
|
+
const activeElement = document.activeElement;
|
|
171
|
+
if (!(activeElement instanceof Node && panel.contains(activeElement))) {
|
|
172
|
+
event.preventDefault();
|
|
173
|
+
focusElement(firstElement);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (event.shiftKey && activeElement === firstElement) {
|
|
177
|
+
event.preventDefault();
|
|
178
|
+
focusElement(lastElement);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (!event.shiftKey && activeElement === lastElement) {
|
|
182
|
+
event.preventDefault();
|
|
183
|
+
focusElement(firstElement);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function onDocumentKeydown(event) {
|
|
187
|
+
if (!isOpen.value || !isTopModal()) return;
|
|
188
|
+
if (event.key === "Escape") {
|
|
189
|
+
if (props.closeOnEscape === false) return;
|
|
190
|
+
event.preventDefault();
|
|
191
|
+
closeModal();
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (event.key === "Tab") trapFocus(event);
|
|
195
|
+
}
|
|
196
|
+
function bindDocumentListeners() {
|
|
197
|
+
if (typeof document === "undefined" || removeDocumentListeners) return;
|
|
198
|
+
document.addEventListener("keydown", onDocumentKeydown);
|
|
199
|
+
removeDocumentListeners = () => {
|
|
200
|
+
document.removeEventListener("keydown", onDocumentKeydown);
|
|
201
|
+
removeDocumentListeners = void 0;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function restoreFocus() {
|
|
205
|
+
if (props.returnFocus === false) {
|
|
206
|
+
previousActiveElement = null;
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (previousActiveElement?.isConnected) focusElement(previousActiveElement);
|
|
210
|
+
previousActiveElement = null;
|
|
211
|
+
}
|
|
212
|
+
function activateModal() {
|
|
213
|
+
if (isActiveModal) return;
|
|
214
|
+
isActiveModal = true;
|
|
215
|
+
addToStack();
|
|
216
|
+
if (typeof document !== "undefined") {
|
|
217
|
+
const activeElement = document.activeElement;
|
|
218
|
+
previousActiveElement = isHTMLElement(activeElement) ? activeElement : null;
|
|
219
|
+
}
|
|
220
|
+
bindDocumentListeners();
|
|
221
|
+
if (props.preventScroll !== false) unlockScroll = lockBodyScroll();
|
|
222
|
+
nextTick(() => {
|
|
223
|
+
if (isActiveModal) focusInitialElement();
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function deactivateModal() {
|
|
227
|
+
if (!isActiveModal) return;
|
|
228
|
+
isActiveModal = false;
|
|
229
|
+
removeFromStack();
|
|
230
|
+
removeDocumentListeners?.();
|
|
231
|
+
unlockScroll?.();
|
|
232
|
+
unlockScroll = void 0;
|
|
233
|
+
restoreFocus();
|
|
234
|
+
}
|
|
235
|
+
function onOverlayClick(event) {
|
|
236
|
+
if (props.closeOnOverlayClick === false || event.target !== event.currentTarget) return;
|
|
237
|
+
closeModal();
|
|
238
|
+
}
|
|
239
|
+
onMounted(() => {
|
|
240
|
+
isMounted = true;
|
|
241
|
+
if (isOpen.value) activateModal();
|
|
242
|
+
});
|
|
243
|
+
onBeforeUnmount(() => {
|
|
244
|
+
deactivateModal();
|
|
245
|
+
});
|
|
246
|
+
watch(isOpen, (nextOpen) => {
|
|
247
|
+
if (!isMounted) return;
|
|
248
|
+
if (nextOpen) activateModal();
|
|
249
|
+
else deactivateModal();
|
|
250
|
+
});
|
|
251
|
+
return {
|
|
252
|
+
panelRef,
|
|
253
|
+
modalId,
|
|
254
|
+
titleId,
|
|
255
|
+
descriptionId,
|
|
256
|
+
role,
|
|
257
|
+
isOpen,
|
|
258
|
+
shouldRender,
|
|
259
|
+
hasHeader,
|
|
260
|
+
hasFooter,
|
|
261
|
+
showCloseButton,
|
|
262
|
+
headerId,
|
|
263
|
+
ariaLabelledby,
|
|
264
|
+
ariaDescribedby,
|
|
265
|
+
ariaLabel,
|
|
266
|
+
rootClass,
|
|
267
|
+
rootStyle,
|
|
268
|
+
stateClass,
|
|
269
|
+
slotProps,
|
|
270
|
+
openModal,
|
|
271
|
+
closeModal,
|
|
272
|
+
toggleModal,
|
|
273
|
+
onOverlayClick
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region src/components/modal/modal.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
278
|
+
var t0 = template("<h2 data-v-fe44cbf7 class=rp-modal__title> ");
|
|
279
|
+
var t1 = template("<p data-v-fe44cbf7 class=rp-modal__description> ");
|
|
280
|
+
var t2 = template("<div data-v-fe44cbf7 class=rp-modal__heading>");
|
|
281
|
+
var t3 = template("<div data-v-fe44cbf7 class=rp-modal__header>");
|
|
282
|
+
var t4 = template("<div data-v-fe44cbf7 class=rp-modal__body>");
|
|
283
|
+
var t5 = template("<div data-v-fe44cbf7 class=rp-modal__footer>");
|
|
284
|
+
var t6 = template("<div data-v-fe44cbf7><section data-v-fe44cbf7 class=rp-modal__panel aria-modal=true tabindex=-1>");
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/components/modal/modal.vue
|
|
287
|
+
var modal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
288
|
+
name: "RpModal",
|
|
289
|
+
__name: "modal",
|
|
290
|
+
props: {
|
|
291
|
+
id: {},
|
|
292
|
+
open: {
|
|
293
|
+
type: Boolean,
|
|
294
|
+
default: void 0
|
|
295
|
+
},
|
|
296
|
+
defaultOpen: {
|
|
297
|
+
type: Boolean,
|
|
298
|
+
default: false
|
|
299
|
+
},
|
|
300
|
+
title: { default: "" },
|
|
301
|
+
description: { default: "" },
|
|
302
|
+
ariaLabel: { default: "" },
|
|
303
|
+
closeLabel: { default: "Close modal" },
|
|
304
|
+
role: { default: "dialog" },
|
|
305
|
+
size: { default: "md" },
|
|
306
|
+
initialFocus: { default: null },
|
|
307
|
+
closeOnOverlayClick: {
|
|
308
|
+
type: Boolean,
|
|
309
|
+
default: true
|
|
310
|
+
},
|
|
311
|
+
closeOnEscape: {
|
|
312
|
+
type: Boolean,
|
|
313
|
+
default: true
|
|
314
|
+
},
|
|
315
|
+
showCloseButton: {
|
|
316
|
+
type: Boolean,
|
|
317
|
+
default: true
|
|
318
|
+
},
|
|
319
|
+
overlayProps: { default: () => ({}) },
|
|
320
|
+
preventScroll: {
|
|
321
|
+
type: Boolean,
|
|
322
|
+
default: true
|
|
323
|
+
},
|
|
324
|
+
returnFocus: {
|
|
325
|
+
type: Boolean,
|
|
326
|
+
default: true
|
|
327
|
+
},
|
|
328
|
+
keepMounted: {
|
|
329
|
+
type: Boolean,
|
|
330
|
+
default: false
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
emits: ["update:open"],
|
|
334
|
+
setup(__props, { emit: __emit, slots: $slots }) {
|
|
335
|
+
const props = __props;
|
|
336
|
+
const emit = __emit;
|
|
337
|
+
const { panelRef, modalId, titleId, descriptionId, role, isOpen, shouldRender, hasHeader, hasFooter, showCloseButton, headerId, ariaLabelledby, ariaDescribedby, ariaLabel, rootClass, rootStyle, stateClass, slotProps, closeModal, onOverlayClick } = useModal(props, (open) => {
|
|
338
|
+
emit("update:open", open);
|
|
339
|
+
});
|
|
340
|
+
const _setTemplateRef = createTemplateRefSetter();
|
|
341
|
+
return createComponent(VaporTransition, {
|
|
342
|
+
name: "rp-modal",
|
|
343
|
+
persisted: ""
|
|
344
|
+
}, extend(() => {
|
|
345
|
+
return createIf(() => unref(shouldRender), () => {
|
|
346
|
+
const n28 = t6();
|
|
347
|
+
const n27 = child(n28, 1);
|
|
348
|
+
renderEffect(() => {
|
|
349
|
+
setClass(n28, [unref(rootClass), unref(stateClass)]);
|
|
350
|
+
setStyle(n28, unref(rootStyle));
|
|
351
|
+
});
|
|
352
|
+
setInsertionState(n28, 0, 0);
|
|
353
|
+
createComponent(overlay_default, { $: [() => __props.overlayProps, {
|
|
354
|
+
class: "rp-modal__overlay",
|
|
355
|
+
"z-index": 0,
|
|
356
|
+
interactive: "",
|
|
357
|
+
onClick: () => unref(onOverlayClick)
|
|
358
|
+
}] });
|
|
359
|
+
renderEffect(() => {
|
|
360
|
+
setProp(n27, "id", unref(modalId));
|
|
361
|
+
setProp(n27, "role", unref(role));
|
|
362
|
+
setAttr(n27, "aria-label", unref(ariaLabel));
|
|
363
|
+
setAttr(n27, "aria-labelledby", unref(ariaLabelledby));
|
|
364
|
+
setAttr(n27, "aria-describedby", unref(ariaDescribedby));
|
|
365
|
+
});
|
|
366
|
+
setInsertionState(n27, null, 0);
|
|
367
|
+
createIf(() => unref(hasHeader), () => {
|
|
368
|
+
const n14 = t3();
|
|
369
|
+
renderEffect(() => setProp(n14, "id", unref(headerId)));
|
|
370
|
+
setInsertionState(n14, null, 0);
|
|
371
|
+
createSlot("header", { $: [() => unref(slotProps)] }, () => {
|
|
372
|
+
const n13 = t2();
|
|
373
|
+
setInsertionState(n13, null, 0);
|
|
374
|
+
createIf(() => __props.title, () => {
|
|
375
|
+
const n9 = t0();
|
|
376
|
+
const x9 = txt(n9);
|
|
377
|
+
renderEffect(() => {
|
|
378
|
+
setProp(n9, "id", unref(titleId));
|
|
379
|
+
setText(x9, toDisplayString(__props.title));
|
|
380
|
+
});
|
|
381
|
+
return n9;
|
|
382
|
+
});
|
|
383
|
+
setInsertionState(n13, null, 1);
|
|
384
|
+
createIf(() => __props.description, () => {
|
|
385
|
+
const n12 = t1();
|
|
386
|
+
const x12 = txt(n12);
|
|
387
|
+
renderEffect(() => {
|
|
388
|
+
setProp(n12, "id", unref(descriptionId));
|
|
389
|
+
setText(x12, toDisplayString(__props.description));
|
|
390
|
+
});
|
|
391
|
+
return n12;
|
|
392
|
+
});
|
|
393
|
+
return n13;
|
|
394
|
+
}, 1);
|
|
395
|
+
return n14;
|
|
396
|
+
});
|
|
397
|
+
setInsertionState(n27, null, 1);
|
|
398
|
+
createIf(() => unref(showCloseButton), () => {
|
|
399
|
+
return createComponent(icon_button_default, {
|
|
400
|
+
class: "rp-modal__close",
|
|
401
|
+
ariaLabel: () => __props.closeLabel,
|
|
402
|
+
variant: "ghost",
|
|
403
|
+
size: "sm",
|
|
404
|
+
onClick: () => unref(closeModal)
|
|
405
|
+
}, () => {
|
|
406
|
+
return createComponent(unref(x_default));
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
setInsertionState(n27, null, 2);
|
|
410
|
+
createIf(() => $slots.default, () => {
|
|
411
|
+
const n22 = t4();
|
|
412
|
+
setInsertionState(n22, null, 0);
|
|
413
|
+
createSlot("default", { $: [() => unref(slotProps)] }, null, 1);
|
|
414
|
+
return n22;
|
|
415
|
+
});
|
|
416
|
+
setInsertionState(n27, null, 3);
|
|
417
|
+
createIf(() => unref(hasFooter), () => {
|
|
418
|
+
const n26 = t5();
|
|
419
|
+
setInsertionState(n26, null, 0);
|
|
420
|
+
createSlot("footer", { $: [() => unref(slotProps)] }, null, 1);
|
|
421
|
+
return n26;
|
|
422
|
+
});
|
|
423
|
+
_setTemplateRef(n27, panelRef, null, "panelRef");
|
|
424
|
+
applyVShow(n28, () => unref(isOpen));
|
|
425
|
+
return n28;
|
|
426
|
+
}, null, 129);
|
|
427
|
+
}, { _: 8 }), true);
|
|
428
|
+
}
|
|
429
|
+
}), [["__scopeId", "data-v-fe44cbf7"]]);
|
|
430
|
+
//#endregion
|
|
431
|
+
export { modal_default as t };
|
|
432
|
+
|
|
433
|
+
//# sourceMappingURL=modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.js","names":[],"sources":["../src/components/modal/useModal.ts","../src/components/modal/modal.vue","../src/components/modal/modal.vue"],"sourcesContent":["import {\n computed,\n isRef,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n useSlots,\n useId,\n watch,\n type CSSProperties,\n} from 'vue';\nimport { bem } from '@/utils/bem';\nimport type {\n ModalInitialFocus,\n ModalPresetSize,\n ModalProps,\n ModalRole,\n ModalSize,\n ModalSlotProps,\n} from './types';\n\nlet bodyScrollLockCount = 0;\nlet previousBodyOverflow = '';\nconst activeModalStack: symbol[] = [];\n\ntype Cleanup = () => void;\n\nconst DEFAULT_ROLE: ModalRole = 'dialog';\nconst DEFAULT_SIZE: ModalSize = 'md';\n\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'textarea:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\nconst MODAL_PRESET_SIZES = new Set<ModalPresetSize>(['sm', 'md', 'lg', 'xl', 'full']);\n\nfunction isHTMLElement(value: unknown): value is HTMLElement {\n return typeof HTMLElement !== 'undefined' && value instanceof HTMLElement;\n}\n\nfunction isModalPresetSize(size: string): size is ModalPresetSize {\n return MODAL_PRESET_SIZES.has(size as ModalPresetSize);\n}\n\nfunction isFocusable(element: HTMLElement) {\n if (element.getAttribute('aria-hidden') === 'true') return false;\n if (element.hasAttribute('disabled')) return false;\n return element.tabIndex >= 0;\n}\n\nfunction getFocusableElements(panel: HTMLElement | null) {\n if (!panel) return [];\n return [...panel.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)].filter(isFocusable);\n}\n\nfunction focusElement(element: HTMLElement | null | undefined) {\n if (!element) return;\n\n try {\n element.focus({ preventScroll: true });\n } catch {\n element.focus();\n }\n}\n\nfunction lockBodyScroll(): Cleanup | undefined {\n if (typeof document === 'undefined') return undefined;\n\n if (bodyScrollLockCount === 0) {\n previousBodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n\n bodyScrollLockCount += 1;\n\n return () => {\n bodyScrollLockCount = Math.max(0, bodyScrollLockCount - 1);\n if (bodyScrollLockCount === 0) document.body.style.overflow = previousBodyOverflow;\n };\n}\n\nfunction readInitialFocus(initialFocus: ModalInitialFocus | null | undefined) {\n return isRef(initialFocus) ? initialFocus.value : initialFocus;\n}\n\nfunction queryPanelElement(panel: HTMLElement, selector: string) {\n try {\n const element = panel.querySelector(selector);\n return isHTMLElement(element) ? element : null;\n } catch {\n return null;\n }\n}\n\nexport function useModal(props: Readonly<ModalProps>, emitOpenChange?: (open: boolean) => void) {\n const slots = useSlots();\n const generatedId = useId();\n const panelRef = ref<HTMLElement | null>(null);\n const uncontrolledOpen = ref(Boolean(props.defaultOpen));\n const modalToken = Symbol('modal');\n\n let isMounted = false;\n let isActiveModal = false;\n let previousActiveElement: HTMLElement | null = null;\n let removeDocumentListeners: Cleanup | undefined;\n let unlockScroll: Cleanup | undefined;\n\n const modalId = computed(() => props.id ?? `${generatedId}-modal`);\n const titleId = computed(() => `${modalId.value}-title`);\n const descriptionId = computed(() => `${modalId.value}-description`);\n const role = computed(() => props.role ?? DEFAULT_ROLE);\n const size = computed(() => props.size || DEFAULT_SIZE);\n const isPresetSize = computed(() => isModalPresetSize(size.value));\n const isOpen = computed(() => props.open ?? uncontrolledOpen.value);\n const shouldRender = computed(() => Boolean(props.keepMounted || isOpen.value));\n const hasCustomHeader = computed(() => Boolean(slots.header));\n const hasHeader = computed(() =>\n Boolean(hasCustomHeader.value || props.title || props.description),\n );\n const hasFooter = computed(() => Boolean(slots.footer));\n const showCloseButton = computed(() => props.showCloseButton);\n\n const headerId = computed(() =>\n hasCustomHeader.value && !props.ariaLabel ? titleId.value : undefined,\n );\n const ariaLabelledby = computed(() => {\n if (props.ariaLabel) return undefined;\n return hasCustomHeader.value || props.title ? titleId.value : undefined;\n });\n const ariaDescribedby = computed(() =>\n props.description && !hasCustomHeader.value ? descriptionId.value : undefined,\n );\n const ariaLabel = computed(() =>\n ariaLabelledby.value ? undefined : props.ariaLabel || undefined,\n );\n\n const rootClass = computed(() =>\n bem('rp-modal', {\n [`size-${size.value}`]: isPresetSize.value,\n 'size-custom': !isPresetSize.value,\n open: isOpen.value,\n }),\n );\n\n const rootStyle = computed<CSSProperties | undefined>(() => {\n if (isPresetSize.value) return undefined;\n\n return {\n '--_rp-modal-width': size.value,\n };\n });\n\n const stateClass = computed(() => ({\n 'rp-modal--closable': showCloseButton.value,\n 'rp-modal--headerless': !hasHeader.value,\n }));\n\n const slotProps = computed<ModalSlotProps>(() => ({\n isOpen: isOpen.value,\n open: openModal,\n close: closeModal,\n toggle: toggleModal,\n }));\n\n function setOpen(nextOpen: boolean) {\n if (nextOpen === isOpen.value) return;\n if (props.open === undefined) uncontrolledOpen.value = nextOpen;\n emitOpenChange?.(nextOpen);\n }\n\n function openModal() {\n setOpen(true);\n }\n\n function closeModal() {\n setOpen(false);\n }\n\n function toggleModal() {\n setOpen(!isOpen.value);\n }\n\n function resolveInitialFocus() {\n const initialFocus = readInitialFocus(props.initialFocus);\n const panel = panelRef.value;\n if (!initialFocus || !panel) return null;\n\n if (typeof initialFocus === 'string') {\n return queryPanelElement(panel, initialFocus);\n }\n\n return panel.contains(initialFocus) ? initialFocus : null;\n }\n\n function focusInitialElement() {\n const firstFocusable = getFocusableElements(panelRef.value)[0];\n focusElement(resolveInitialFocus() ?? firstFocusable ?? panelRef.value);\n }\n\n function addToStack() {\n if (!activeModalStack.includes(modalToken)) activeModalStack.push(modalToken);\n }\n\n function removeFromStack() {\n const index = activeModalStack.indexOf(modalToken);\n if (index !== -1) activeModalStack.splice(index, 1);\n }\n\n function isTopModal() {\n return activeModalStack[activeModalStack.length - 1] === modalToken;\n }\n\n function trapFocus(event: KeyboardEvent) {\n const panel = panelRef.value;\n if (!panel) return;\n\n const focusableElements = getFocusableElements(panel);\n if (focusableElements.length === 0) {\n event.preventDefault();\n focusElement(panel);\n return;\n }\n\n const firstElement = focusableElements[0];\n const lastElement = focusableElements[focusableElements.length - 1];\n const activeElement = document.activeElement;\n const isInsidePanel = activeElement instanceof Node && panel.contains(activeElement);\n\n if (!isInsidePanel) {\n event.preventDefault();\n focusElement(firstElement);\n return;\n }\n\n if (event.shiftKey && activeElement === firstElement) {\n event.preventDefault();\n focusElement(lastElement);\n return;\n }\n\n if (!event.shiftKey && activeElement === lastElement) {\n event.preventDefault();\n focusElement(firstElement);\n }\n }\n\n function onDocumentKeydown(event: KeyboardEvent) {\n if (!isOpen.value || !isTopModal()) return;\n\n if (event.key === 'Escape') {\n if (props.closeOnEscape === false) return;\n event.preventDefault();\n closeModal();\n return;\n }\n\n if (event.key === 'Tab') trapFocus(event);\n }\n\n function bindDocumentListeners() {\n if (typeof document === 'undefined' || removeDocumentListeners) return;\n\n document.addEventListener('keydown', onDocumentKeydown);\n\n removeDocumentListeners = () => {\n document.removeEventListener('keydown', onDocumentKeydown);\n removeDocumentListeners = undefined;\n };\n }\n\n function restoreFocus() {\n if (props.returnFocus === false) {\n previousActiveElement = null;\n return;\n }\n\n if (previousActiveElement?.isConnected) focusElement(previousActiveElement);\n previousActiveElement = null;\n }\n\n function activateModal() {\n if (isActiveModal) return;\n\n isActiveModal = true;\n addToStack();\n\n if (typeof document !== 'undefined') {\n const activeElement = document.activeElement;\n previousActiveElement = isHTMLElement(activeElement) ? activeElement : null;\n }\n\n bindDocumentListeners();\n if (props.preventScroll !== false) unlockScroll = lockBodyScroll();\n void nextTick(() => {\n if (isActiveModal) focusInitialElement();\n });\n }\n\n function deactivateModal() {\n if (!isActiveModal) return;\n\n isActiveModal = false;\n removeFromStack();\n removeDocumentListeners?.();\n unlockScroll?.();\n unlockScroll = undefined;\n restoreFocus();\n }\n\n function onOverlayClick(event: MouseEvent) {\n if (props.closeOnOverlayClick === false || event.target !== event.currentTarget) return;\n closeModal();\n }\n\n onMounted(() => {\n isMounted = true;\n if (isOpen.value) activateModal();\n });\n\n onBeforeUnmount(() => {\n deactivateModal();\n });\n\n watch(isOpen, (nextOpen) => {\n if (!isMounted) return;\n if (nextOpen) activateModal();\n else deactivateModal();\n });\n\n return {\n panelRef,\n modalId,\n titleId,\n descriptionId,\n role,\n isOpen,\n shouldRender,\n hasHeader,\n hasFooter,\n showCloseButton,\n headerId,\n ariaLabelledby,\n ariaDescribedby,\n ariaLabel,\n rootClass,\n rootStyle,\n stateClass,\n slotProps,\n openModal,\n closeModal,\n toggleModal,\n onOverlayClick,\n };\n}\n","<template>\n <Transition name=\"rp-modal\">\n <div\n v-if=\"shouldRender\"\n v-show=\"isOpen\"\n :class=\"[rootClass, stateClass]\"\n :style=\"rootStyle\"\n >\n <Overlay\n v-bind=\"overlayProps\"\n class=\"rp-modal__overlay\"\n :z-index=\"0\"\n interactive\n @click=\"onOverlayClick\"\n />\n\n <section\n :id=\"modalId\"\n ref=\"panelRef\"\n class=\"rp-modal__panel\"\n :role=\"role\"\n aria-modal=\"true\"\n :aria-label=\"ariaLabel\"\n :aria-labelledby=\"ariaLabelledby\"\n :aria-describedby=\"ariaDescribedby\"\n tabindex=\"-1\"\n >\n <div v-if=\"hasHeader\" class=\"rp-modal__header\" :id=\"headerId\">\n <slot name=\"header\" v-bind=\"slotProps\">\n <div class=\"rp-modal__heading\">\n <h2 v-if=\"title\" :id=\"titleId\" class=\"rp-modal__title\">\n {{ title }}\n </h2>\n <p v-if=\"description\" :id=\"descriptionId\" class=\"rp-modal__description\">\n {{ description }}\n </p>\n </div>\n </slot>\n </div>\n\n <IconButton\n v-if=\"showCloseButton\"\n class=\"rp-modal__close\"\n :ariaLabel=\"closeLabel\"\n variant=\"ghost\"\n size=\"sm\"\n @click=\"closeModal\"\n >\n <IconX />\n </IconButton>\n\n <div v-if=\"$slots.default\" class=\"rp-modal__body\">\n <slot v-bind=\"slotProps\" />\n </div>\n\n <div v-if=\"hasFooter\" class=\"rp-modal__footer\">\n <slot name=\"footer\" v-bind=\"slotProps\" />\n </div>\n </section>\n </div>\n </Transition>\n</template>\n\n<script lang=\"ts\" setup vapor>\nimport IconX from '~icons/lucide/x';\nimport IconButton from '../icon-button/icon-button.vue';\nimport Overlay from '../overlay/overlay.vue';\nimport { useModal } from './useModal';\nimport type { ModalProps } from './types';\n\ndefineOptions({ name: 'RpModal' });\n\nconst props = withDefaults(defineProps<ModalProps>(), {\n open: undefined,\n defaultOpen: false,\n title: '',\n description: '',\n ariaLabel: '',\n closeLabel: 'Close modal',\n role: 'dialog',\n size: 'md',\n initialFocus: null,\n closeOnOverlayClick: true,\n closeOnEscape: true,\n showCloseButton: true,\n overlayProps: () => ({}),\n preventScroll: true,\n returnFocus: true,\n keepMounted: false,\n});\n\nconst emit = defineEmits<{\n 'update:open': [value: boolean];\n}>();\n\nconst {\n panelRef,\n modalId,\n titleId,\n descriptionId,\n role,\n isOpen,\n shouldRender,\n hasHeader,\n hasFooter,\n showCloseButton,\n headerId,\n ariaLabelledby,\n ariaDescribedby,\n ariaLabel,\n rootClass,\n rootStyle,\n stateClass,\n slotProps,\n closeModal,\n onOverlayClick,\n} = useModal(props, (open) => {\n emit('update:open', open);\n});\n\nvoid panelRef;\n</script>\n\n<style src=\"./modal.scss\" lang=\"scss\" scoped></style>\n","<template>\n <Transition name=\"rp-modal\">\n <div\n v-if=\"shouldRender\"\n v-show=\"isOpen\"\n :class=\"[rootClass, stateClass]\"\n :style=\"rootStyle\"\n >\n <Overlay\n v-bind=\"overlayProps\"\n class=\"rp-modal__overlay\"\n :z-index=\"0\"\n interactive\n @click=\"onOverlayClick\"\n />\n\n <section\n :id=\"modalId\"\n ref=\"panelRef\"\n class=\"rp-modal__panel\"\n :role=\"role\"\n aria-modal=\"true\"\n :aria-label=\"ariaLabel\"\n :aria-labelledby=\"ariaLabelledby\"\n :aria-describedby=\"ariaDescribedby\"\n tabindex=\"-1\"\n >\n <div v-if=\"hasHeader\" class=\"rp-modal__header\" :id=\"headerId\">\n <slot name=\"header\" v-bind=\"slotProps\">\n <div class=\"rp-modal__heading\">\n <h2 v-if=\"title\" :id=\"titleId\" class=\"rp-modal__title\">\n {{ title }}\n </h2>\n <p v-if=\"description\" :id=\"descriptionId\" class=\"rp-modal__description\">\n {{ description }}\n </p>\n </div>\n </slot>\n </div>\n\n <IconButton\n v-if=\"showCloseButton\"\n class=\"rp-modal__close\"\n :ariaLabel=\"closeLabel\"\n variant=\"ghost\"\n size=\"sm\"\n @click=\"closeModal\"\n >\n <IconX />\n </IconButton>\n\n <div v-if=\"$slots.default\" class=\"rp-modal__body\">\n <slot v-bind=\"slotProps\" />\n </div>\n\n <div v-if=\"hasFooter\" class=\"rp-modal__footer\">\n <slot name=\"footer\" v-bind=\"slotProps\" />\n </div>\n </section>\n </div>\n </Transition>\n</template>\n\n<script lang=\"ts\" setup vapor>\nimport IconX from '~icons/lucide/x';\nimport IconButton from '../icon-button/icon-button.vue';\nimport Overlay from '../overlay/overlay.vue';\nimport { useModal } from './useModal';\nimport type { ModalProps } from './types';\n\ndefineOptions({ name: 'RpModal' });\n\nconst props = withDefaults(defineProps<ModalProps>(), {\n open: undefined,\n defaultOpen: false,\n title: '',\n description: '',\n ariaLabel: '',\n closeLabel: 'Close modal',\n role: 'dialog',\n size: 'md',\n initialFocus: null,\n closeOnOverlayClick: true,\n closeOnEscape: true,\n showCloseButton: true,\n overlayProps: () => ({}),\n preventScroll: true,\n returnFocus: true,\n keepMounted: false,\n});\n\nconst emit = defineEmits<{\n 'update:open': [value: boolean];\n}>();\n\nconst {\n panelRef,\n modalId,\n titleId,\n descriptionId,\n role,\n isOpen,\n shouldRender,\n hasHeader,\n hasFooter,\n showCloseButton,\n headerId,\n ariaLabelledby,\n ariaDescribedby,\n ariaLabel,\n rootClass,\n rootStyle,\n stateClass,\n slotProps,\n closeModal,\n onOverlayClick,\n} = useModal(props, (open) => {\n emit('update:open', open);\n});\n\nvoid panelRef;\n</script>\n\n<style src=\"./modal.scss\" lang=\"scss\" scoped></style>\n"],"mappings":";;;;;;;AAsBA,IAAI,sBAAsB;AAC1B,IAAI,uBAAuB;AAC3B,IAAM,mBAA6B,CAAC;AAIpC,IAAM,eAA0B;AAChC,IAAM,eAA0B;AAEhC,IAAM,qBAAqB;CACvB;CACA;CACA;CACA;CACA;CACA;AACJ,CAAC,CAAC,KAAK,GAAG;AAEV,IAAM,qCAAqB,IAAI,IAAqB;CAAC;CAAM;CAAM;CAAM;CAAM;AAAM,CAAC;AAEpF,SAAS,cAAc,OAAsC;CACzD,OAAO,OAAO,gBAAgB,eAAe,iBAAiB;AAClE;AAEA,SAAS,kBAAkB,MAAuC;CAC9D,OAAO,mB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X,QAAM,MAAA,IAAA,CAAI;kBAEV,cAAY,MAAA,SAAA,CAAS;kBACrB,mBAAiB,MAAA,cAAA,CAAc;kBAC/B,oBAAkB,MAAA,eAAA,CAAe;;;mBAGvB,MAAA,SAAA,SAAS;;qCAA4B,MAAI,MAAA,QAAA,CAAQ,CAAA;;gBAClD,UAAa,EAAA,GAAA,OAAS,MAAA,SAAA,CAAA,EAAA,SAAA;;;qBAEV,QAAA,aAAK;;;;oBAAG,MAAI,MAAA,OAAA,CAAO;oCACtB,QAAA,KAAK,CAAA;;;;;qBAEH,QAAA,mBAAW;;;;qBAAG,MAAI,MAAA,aAAA,CAAa;qCACjC,QAAA,WAAW,CAAA;;;;;;;;;mBAOpB,MAAA,eAAA,SAAe;;MACrB,OAAM;MACL,iBAAW,QAAA;MACZ,SAAQ;MACR,MAAK;MACJ,eAAO,MAAA,UAAA;;;;;;mBAKD,OAAM,eAAA;;;uCACC,MAAA,SAAA,CAAA,EAAA,GAAA,MAAA,CAAA;;;;mBAGP,MAAA,SAAA,SAAS;;;gBACV,UAAa,EAAA,GAAA,OAAS,MAAA,SAAA,CAAA,EAAA,GAAA,MAAA,CAAA;;;;0BApD5B,MAAA,MAAA,CAAM"}
|
package/dist/overlay.css
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.rp-overlay[data-v-4a733439] {
|
|
2
|
+
--_rp-overlay-color: var(--rp-color-overlay);
|
|
3
|
+
--_rp-overlay-opacity: 1;
|
|
4
|
+
--_rp-overlay-blur: 0px;
|
|
5
|
+
--_rp-overlay-z-index: 1;
|
|
6
|
+
position: absolute;
|
|
7
|
+
inset: 0;
|
|
8
|
+
z-index: var(--_rp-overlay-z-index);
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
display: block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
background-color: var(--_rp-overlay-color);
|
|
14
|
+
border-radius: inherit;
|
|
15
|
+
opacity: var(--_rp-overlay-opacity);
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
}
|
|
18
|
+
.rp-overlay--gradient[data-v-4a733439] {
|
|
19
|
+
background-color: transparent;
|
|
20
|
+
opacity: 1;
|
|
21
|
+
}
|
|
22
|
+
.rp-overlay--blurred[data-v-4a733439] {
|
|
23
|
+
backdrop-filter: blur(var(--_rp-overlay-blur));
|
|
24
|
+
-webkit-backdrop-filter: blur(var(--_rp-overlay-blur));
|
|
25
|
+
}
|
|
26
|
+
.rp-overlay--interactive[data-v-4a733439] {
|
|
27
|
+
pointer-events: auto;
|
|
28
|
+
}
|
package/dist/overlay.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import './overlay.css';
|
|
2
|
+
import { t as bem } from "./bem.js";
|
|
3
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
4
|
+
import { computed, createIf, defineVaporComponent, renderEffect, setClass, setStyle, template, unref } from "vue";
|
|
5
|
+
//#region src/components/overlay/useOverlay.ts
|
|
6
|
+
function getBlurValue(blur) {
|
|
7
|
+
if (blur == null || blur === "") return void 0;
|
|
8
|
+
if (typeof blur === "number") {
|
|
9
|
+
if (!Number.isFinite(blur) || blur < 0) return void 0;
|
|
10
|
+
return `${blur}px`;
|
|
11
|
+
}
|
|
12
|
+
return blur;
|
|
13
|
+
}
|
|
14
|
+
function useOverlay(props) {
|
|
15
|
+
const isRendered = computed(() => !props.disabled);
|
|
16
|
+
const hasGradient = computed(() => Boolean(props.gradient));
|
|
17
|
+
const normalizedOpacity = computed(() => {
|
|
18
|
+
const opacity = props.opacity;
|
|
19
|
+
if (opacity === void 0 || !Number.isFinite(opacity)) return 1;
|
|
20
|
+
return Math.min(1, Math.max(0, opacity));
|
|
21
|
+
});
|
|
22
|
+
const blurValue = computed(() => getBlurValue(props.blur));
|
|
23
|
+
const hasBlur = computed(() => Boolean(blurValue.value));
|
|
24
|
+
return {
|
|
25
|
+
isRendered,
|
|
26
|
+
rootClass: computed(() => bem("rp-overlay", {
|
|
27
|
+
gradient: hasGradient.value,
|
|
28
|
+
blurred: hasBlur.value,
|
|
29
|
+
interactive: props.interactive
|
|
30
|
+
})),
|
|
31
|
+
rootStyle: computed(() => {
|
|
32
|
+
const style = { "--_rp-overlay-z-index": props.zIndex };
|
|
33
|
+
if (blurValue.value) style["--_rp-overlay-blur"] = blurValue.value;
|
|
34
|
+
if (hasGradient.value) return {
|
|
35
|
+
...style,
|
|
36
|
+
backgroundImage: props.gradient
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
...style,
|
|
40
|
+
"--_rp-overlay-color": props.color,
|
|
41
|
+
"--_rp-overlay-opacity": normalizedOpacity.value
|
|
42
|
+
};
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/overlay/overlay.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
48
|
+
var t0 = template("<div data-v-4a733439 aria-hidden=true>", 1);
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/overlay/overlay.vue
|
|
51
|
+
var overlay_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
52
|
+
name: "RpOverlay",
|
|
53
|
+
__name: "overlay",
|
|
54
|
+
props: {
|
|
55
|
+
color: { default: "var(--rp-color-overlay)" },
|
|
56
|
+
opacity: { default: 1 },
|
|
57
|
+
gradient: { default: "" },
|
|
58
|
+
blur: {},
|
|
59
|
+
zIndex: { default: 1 },
|
|
60
|
+
interactive: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
64
|
+
disabled: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
setup(__props) {
|
|
70
|
+
const { isRendered, rootClass, rootStyle } = useOverlay(__props);
|
|
71
|
+
return createIf(() => unref(isRendered), () => {
|
|
72
|
+
const n2 = t0();
|
|
73
|
+
renderEffect(() => {
|
|
74
|
+
setClass(n2, unref(rootClass));
|
|
75
|
+
setStyle(n2, unref(rootStyle));
|
|
76
|
+
});
|
|
77
|
+
return n2;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}), [["__scopeId", "data-v-4a733439"]]);
|
|
81
|
+
//#endregion
|
|
82
|
+
export { overlay_default as t };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay.js","names":[],"sources":["../src/components/overlay/useOverlay.ts","../src/components/overlay/overlay.vue","../src/components/overlay/overlay.vue"],"sourcesContent":["import { computed, type CSSProperties } from 'vue';\nimport { bem } from '@/utils/bem';\nimport type { OverlayProps } from './types';\n\nfunction getBlurValue(blur: OverlayProps['blur']) {\n if (blur == null || blur === '') return undefined;\n\n if (typeof blur === 'number') {\n if (!Number.isFinite(blur) || blur < 0) return undefined;\n\n return `${blur}px`;\n }\n\n return blur;\n}\n\nexport function useOverlay(props: Readonly<OverlayProps>) {\n const isRendered = computed(() => !props.disabled);\n const hasGradient = computed(() => Boolean(props.gradient));\n\n const normalizedOpacity = computed(() => {\n const opacity = props.opacity;\n if (opacity === undefined || !Number.isFinite(opacity)) return 1;\n\n return Math.min(1, Math.max(0, opacity));\n });\n\n const blurValue = computed(() => getBlurValue(props.blur));\n const hasBlur = computed(() => Boolean(blurValue.value));\n\n const rootClass = computed(() =>\n bem('rp-overlay', {\n gradient: hasGradient.value,\n blurred: hasBlur.value,\n interactive: props.interactive,\n }),\n );\n\n const rootStyle = computed<CSSProperties>(() => {\n const style: CSSProperties = {\n '--_rp-overlay-z-index': props.zIndex,\n };\n\n if (blurValue.value) {\n style['--_rp-overlay-blur'] = blurValue.value;\n }\n\n if (hasGradient.value) {\n return {\n ...style,\n backgroundImage: props.gradient,\n };\n }\n\n return {\n ...style,\n '--_rp-overlay-color': props.color,\n '--_rp-overlay-opacity': normalizedOpacity.value,\n };\n });\n\n return {\n isRendered,\n rootClass,\n rootStyle,\n };\n}\n","<template>\n <div v-if=\"isRendered\" :class=\"rootClass\" :style=\"rootStyle\" aria-hidden=\"true\" />\n</template>\n\n<script lang=\"ts\" setup vapor>\nimport { useOverlay } from './useOverlay';\nimport type { OverlayProps } from './types';\n\ndefineOptions({ name: 'RpOverlay' });\n\nconst props = withDefaults(defineProps<OverlayProps>(), {\n color: 'var(--rp-color-overlay)',\n opacity: 1,\n gradient: '',\n zIndex: 1,\n interactive: false,\n disabled: false,\n});\n\nconst { isRendered, rootClass, rootStyle } = useOverlay(props);\n</script>\n\n<style src=\"./overlay.scss\" lang=\"scss\" scoped></style>\n","<template>\n <div v-if=\"isRendered\" :class=\"rootClass\" :style=\"rootStyle\" aria-hidden=\"true\" />\n</template>\n\n<script lang=\"ts\" setup vapor>\nimport { useOverlay } from './useOverlay';\nimport type { OverlayProps } from './types';\n\ndefineOptions({ name: 'RpOverlay' });\n\nconst props = withDefaults(defineProps<OverlayProps>(), {\n color: 'var(--rp-color-overlay)',\n opacity: 1,\n gradient: '',\n zIndex: 1,\n interactive: false,\n disabled: false,\n});\n\nconst { isRendered, rootClass, rootStyle } = useOverlay(props);\n</script>\n\n<style src=\"./overlay.scss\" lang=\"scss\" scoped></style>\n"],"mappings":";;;;AAIA,SAAS,aAAa,MAA4B;CAC9C,IAAI,QAAQ,QAAQ,SAAS,IAAI,OAAO,KAAA;CAExC,IAAI,OAAO,SAAS,UAAU;EAC1B,IAAI,CAAC,OAAO,SAAS,IAAI,KAAK,OAAO,GAAG,OAAO,KAAA;EAE/C,OAAO,GAAG,KAAK;CACnB;CAEA,OAAO;AACX;AAEA,SAAgB,WAAW,OAA+B;CACtD,MAAM,aAAa,eAAe,CAAC,MAAM,QAAQ;CACjD,MAAM,cAAc,eAAe,QAAQ,MAAM,QAAQ,CAAC;CAE1D,MAAM,oBAAoB,eAAe;EACrC,MAAM,UAAU,MAAM;EACtB,IAAI,YAAY,KAAA,KAAa,CAAC,OAAO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