@povio/ui 2.1.8 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -80,7 +80,7 @@ const BottomSheetBase = ({
|
|
|
80
80
|
/* @__PURE__ */ jsx(
|
|
81
81
|
motion.div,
|
|
82
82
|
{
|
|
83
|
-
className: "pointer-events-none absolute inset-0 bg-
|
|
83
|
+
className: "pointer-events-none absolute inset-0 bg-support-overlay",
|
|
84
84
|
animate: { opacity: 1 },
|
|
85
85
|
initial: { opacity: 0 },
|
|
86
86
|
exit: { opacity: 0 }
|
|
@@ -4,8 +4,9 @@ import { ModalOverlay, Modal as Modal$1, Dialog } from "react-aria-components";
|
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
6
6
|
import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
|
|
7
|
-
import {
|
|
7
|
+
import { modalMain, modalContent, modalOverlay } from "./modal.cva.js";
|
|
8
8
|
import { ns } from "../../../config/i18n.js";
|
|
9
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
9
10
|
const Modal = ({
|
|
10
11
|
isOpen,
|
|
11
12
|
portalContainerRef,
|
|
@@ -18,11 +19,15 @@ const Modal = ({
|
|
|
18
19
|
isDismissable = true
|
|
19
20
|
}) => {
|
|
20
21
|
const { t } = useTranslation(ns);
|
|
22
|
+
const uiStyle = UIStyle.useConfig();
|
|
23
|
+
const modalMainCva = uiStyle?.modal?.mainCva ?? modalMain;
|
|
24
|
+
const modalContentCva = uiStyle?.modal?.contentCva ?? modalContent;
|
|
25
|
+
const modalOverlayCva = uiStyle?.modal?.overlayCva ?? modalOverlay;
|
|
21
26
|
return /* @__PURE__ */ jsx(
|
|
22
27
|
ModalOverlay,
|
|
23
28
|
{
|
|
24
29
|
UNSTABLE_portalContainer: portalContainerRef?.current,
|
|
25
|
-
className:
|
|
30
|
+
className: modalOverlayCva({ aside }),
|
|
26
31
|
isDismissable,
|
|
27
32
|
isOpen,
|
|
28
33
|
shouldCloseOnInteractOutside: () => {
|
|
@@ -33,7 +38,7 @@ const Modal = ({
|
|
|
33
38
|
onClose();
|
|
34
39
|
}
|
|
35
40
|
},
|
|
36
|
-
children: /* @__PURE__ */ jsx(Modal$1, { className:
|
|
41
|
+
children: /* @__PURE__ */ jsx(Modal$1, { className: modalMainCva({ aside }), children: /* @__PURE__ */ jsxs(Dialog, { className: modalContentCva({ aside, className: modalClassName }), children: [
|
|
37
42
|
showCloseIcon && /* @__PURE__ */ jsx(
|
|
38
43
|
InlineIconButton,
|
|
39
44
|
{
|
|
@@ -20,7 +20,7 @@ const modalContent = cva(
|
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
const modalOverlay = cva(
|
|
23
|
-
["fixed inset-0 z-10 flex h-(--visual-viewport-height) w-screen overflow-y-auto bg-
|
|
23
|
+
["fixed inset-0 z-10 flex h-(--visual-viewport-height) w-screen overflow-y-auto bg-support-overlay"],
|
|
24
24
|
{
|
|
25
25
|
variants: {
|
|
26
26
|
aside: {
|
|
@@ -7,6 +7,7 @@ import { RadioVariantProps } from '../components/inputs/RadioGroup/radio.cva';
|
|
|
7
7
|
import { InputBaseProps, InputSideProps, InputSizeProps } from '../components/inputs/shared/input.cva';
|
|
8
8
|
import { LabelBaseProps } from '../components/inputs/shared/label.cva';
|
|
9
9
|
import { ToggleVariantProps } from '../components/inputs/Toggle/toggle.cva';
|
|
10
|
+
import { ModalVariantProps } from '../components/overlays/Modal/modal.cva';
|
|
10
11
|
import { TooltipPointerHorizontalVariantProps, TooltipPointerVerticalVariantProps, TooltipTextVariantProps, TooltipVariantProps } from '../components/overlays/Tooltip/tooltip.cva';
|
|
11
12
|
import { AlertVariantProps } from '../components/status/Alert/alert.cva';
|
|
12
13
|
import { ToastVariantProps } from '../components/status/Toast/toast.cva';
|
|
@@ -82,6 +83,11 @@ export declare namespace UIStyle {
|
|
|
82
83
|
pointerVerticalCva?: Cva<TooltipPointerVerticalVariantProps>;
|
|
83
84
|
textCva?: Cva<TooltipTextVariantProps>;
|
|
84
85
|
};
|
|
86
|
+
modal: {
|
|
87
|
+
contentCva?: Cva<ModalVariantProps>;
|
|
88
|
+
overlayCva?: Cva<ModalVariantProps>;
|
|
89
|
+
mainCva?: Cva<ModalVariantProps>;
|
|
90
|
+
};
|
|
85
91
|
}
|
|
86
92
|
interface ProviderProps {
|
|
87
93
|
config?: Partial<Options>;
|