@ultraviolet/ui 3.8.1 → 3.9.0
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/components/Checkbox/styles.css.js +1 -1
- package/dist/components/CheckboxGroup/index.js +1 -1
- package/dist/components/DateInput/index.d.ts.map +1 -1
- package/dist/components/DateInput/index.js +17 -16
- package/dist/components/Drawer/DrawerContent.d.ts +5 -0
- package/dist/components/Drawer/DrawerContent.d.ts.map +1 -0
- package/dist/components/Drawer/DrawerContent.js +6 -0
- package/dist/components/Drawer/index.d.ts +5 -7
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +44 -5
- package/dist/components/Drawer/styles.css.d.ts +10 -3
- package/dist/components/Drawer/styles.css.d.ts.map +1 -1
- package/dist/components/Drawer/styles.css.js +5 -1
- package/dist/components/FileInput/helpers.d.ts +1 -0
- package/dist/components/FileInput/helpers.d.ts.map +1 -1
- package/dist/components/FileInput/helpers.js +21 -0
- package/dist/components/FileInput/index.d.ts.map +1 -1
- package/dist/components/FileInput/index.js +25 -26
- package/dist/components/InfiniteScroll/index.d.ts +1 -1
- package/dist/components/InfiniteScroll/index.d.ts.map +1 -1
- package/dist/components/InfiniteScroll/index.js +2 -2
- package/dist/components/LineChart/helpers.js +3 -3
- package/dist/components/Link/index.js +1 -1
- package/dist/components/List/styles.css.js +0 -1
- package/dist/components/Menu/MenuContent.d.ts.map +1 -1
- package/dist/components/Menu/components/Group.js +1 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Modal/ModalContent.d.ts +1 -1
- package/dist/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/components/Modal/ModalContent.js +3 -1
- package/dist/components/Modal/components/Dialog.d.ts +1 -1
- package/dist/components/Modal/components/Dialog.d.ts.map +1 -1
- package/dist/components/Modal/components/Dialog.js +41 -36
- package/dist/components/Modal/index.d.ts +4 -2
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +7 -2
- package/dist/components/Modal/styles.css.d.ts.map +1 -1
- package/dist/components/Modal/types.d.ts +1 -0
- package/dist/components/Modal/types.d.ts.map +1 -1
- package/dist/components/NumberInput/index.js +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popup/helpers.d.ts.map +1 -1
- package/dist/components/Popup/helpers.js +15 -0
- package/dist/components/Popup/index.d.ts.map +1 -1
- package/dist/components/Popup/index.js +1 -1
- package/dist/components/Popup/styles.css.js +1 -0
- package/dist/components/Popup/variables.css.js +0 -1
- package/dist/components/ProgressBar/styles.css.js +1 -0
- package/dist/components/ProgressBar/variables.css.js +0 -1
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/Radio/styles.css.js +1 -0
- package/dist/components/SearchInput/index.d.ts.map +1 -1
- package/dist/components/SearchInput/index.js +1 -4
- package/dist/components/SelectInput/SelectInputProvider.d.ts +4 -1
- package/dist/components/SelectInput/SelectInputProvider.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInputProvider.js +14 -7
- package/dist/components/SelectInput/components/Dropdown.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown.js +81 -33
- package/dist/components/SelectInput/components/DropdownOption.d.ts +2 -1
- package/dist/components/SelectInput/components/DropdownOption.d.ts.map +1 -1
- package/dist/components/SelectInput/components/DropdownOption.js +20 -9
- package/dist/components/SelectInput/components/SearchBarDropdown.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SearchBarDropdown.js +10 -3
- package/dist/components/SelectInput/components/SelectBar.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectBar.js +14 -5
- package/dist/components/SelectInput/components/dropdown.css.d.ts +14 -1
- package/dist/components/SelectInput/components/dropdown.css.d.ts.map +1 -1
- package/dist/components/SelectInput/components/dropdown.css.js +13 -13
- package/dist/components/SelectInput/index.d.ts.map +1 -1
- package/dist/components/SelectInput/index.js +7 -4
- package/dist/components/SelectableCard/IllustrationContainer.js +1 -1
- package/dist/components/SelectableCardOptionGroup/SelectableCardOptionGroup.js +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Option.d.ts.map +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Option.js +7 -6
- package/dist/components/Separator/styles.css.d.ts +6 -0
- package/dist/components/Separator/styles.css.d.ts.map +1 -1
- package/dist/components/Separator/styles.css.js +1 -0
- package/dist/components/Slider/components/DoubleSlider.js +2 -2
- package/dist/components/Stack/index.js +1 -1
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/TagList/index.js +3 -3
- package/dist/components/Text/style.css.js +1 -0
- package/dist/components/Text/variables.css.js +0 -1
- package/dist/components/TextInput/index.js +1 -1
- package/dist/components/ToggleGroup/index.js +1 -1
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/UnitInput/index.d.ts.map +1 -1
- package/dist/components/UnitInput/index.js +4 -3
- package/dist/components/VerificationCode/index.js +2 -2
- package/dist/components/compositions/OptionSelector/index.d.ts.map +1 -1
- package/dist/components/compositions/OptionSelector/index.js +12 -0
- package/dist/components/compositions/OptionSelector/types.d.ts +1 -1
- package/dist/components/compositions/OptionSelector/types.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +7 -1
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -1
- package/dist/ui.css +1 -1
- package/package.json +12 -11
|
@@ -32,7 +32,7 @@ const CheckboxGroupCheckbox = ({
|
|
|
32
32
|
}
|
|
33
33
|
const { groupName, onChange, groupValues, error: errorContext } = context;
|
|
34
34
|
const checkboxName = `${groupName}.${name ?? ""}`;
|
|
35
|
-
const checkboxValue =
|
|
35
|
+
const checkboxValue = value.toString();
|
|
36
36
|
return /* @__PURE__ */ jsx(
|
|
37
37
|
Checkbox,
|
|
38
38
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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,GAAG,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,SAAS,IAAI,GAC3B,CACE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,EACzC,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,KACzB,IAAI,GACT,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAA;CAC9D,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,SAAS,GAAG,OAAO,EAAE,6UAiC5D,cAAc,CAAC,OAAO,CAAC,4CAuSzB,CAAA"}
|
|
@@ -147,34 +147,35 @@ const DateInput = ({
|
|
|
147
147
|
]
|
|
148
148
|
);
|
|
149
149
|
useEffect(() => {
|
|
150
|
-
if (
|
|
151
|
-
setValue(
|
|
150
|
+
if (!selectsRange) {
|
|
151
|
+
setValue(value ?? null);
|
|
152
152
|
setInputValue(
|
|
153
153
|
formatValue(
|
|
154
|
-
new Date(value),
|
|
154
|
+
value ? new Date(value) : null,
|
|
155
155
|
null,
|
|
156
156
|
showMonthYearPicker,
|
|
157
157
|
selectsRange,
|
|
158
158
|
format
|
|
159
|
-
)
|
|
159
|
+
) ?? ""
|
|
160
|
+
// Text Input which will use this value, won't update value if value is undefined, so we need force empty string is there is no date
|
|
160
161
|
);
|
|
161
162
|
}
|
|
162
163
|
if (selectsRange) {
|
|
163
164
|
setRange({
|
|
164
|
-
end: endDate ??
|
|
165
|
-
start: startDate ??
|
|
165
|
+
end: endDate ?? null,
|
|
166
|
+
start: startDate ?? null
|
|
166
167
|
});
|
|
168
|
+
setInputValue(
|
|
169
|
+
formatValue(
|
|
170
|
+
null,
|
|
171
|
+
{ start: startDate ?? null, end: endDate ?? null },
|
|
172
|
+
showMonthYearPicker,
|
|
173
|
+
true,
|
|
174
|
+
format
|
|
175
|
+
)
|
|
176
|
+
);
|
|
167
177
|
}
|
|
168
|
-
}, [
|
|
169
|
-
endDate,
|
|
170
|
-
startDate,
|
|
171
|
-
value,
|
|
172
|
-
computedRange.start,
|
|
173
|
-
computedRange.end,
|
|
174
|
-
selectsRange,
|
|
175
|
-
format,
|
|
176
|
-
showMonthYearPicker
|
|
177
|
-
]);
|
|
178
|
+
}, [endDate, startDate, value, selectsRange, format, showMonthYearPicker]);
|
|
178
179
|
const manageOnChange = (event) => {
|
|
179
180
|
const newValue = event.currentTarget.value;
|
|
180
181
|
if (!newValue) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/DrawerContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,eAAO,MAAM,aAAa,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAElE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentProps,
|
|
1
|
+
import type { ComponentProps, RefObject } from 'react';
|
|
2
2
|
import type { ModalProps } from '../Modal';
|
|
3
3
|
import { Modal } from '../Modal';
|
|
4
4
|
import type { SizeProp } from './styles.css';
|
|
@@ -11,14 +11,12 @@ type DrawerProps = Pick<ComponentProps<typeof Modal>, 'ariaLabel' | 'children' |
|
|
|
11
11
|
footer?: ModalProps['children'];
|
|
12
12
|
separator?: boolean;
|
|
13
13
|
noPadding?: boolean;
|
|
14
|
+
push?: RefObject<HTMLDivElement | null> | 'body';
|
|
14
15
|
};
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare const BaseDrawer: ({ size, onClose, open, header, footer, disclosure, children, ariaLabel, className, "data-testid": dataTestId, hideOnClickOutside, hideOnEsc, id, isClosable, separator, noPadding, style, }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare const Drawer: (({ size, onClose, open, header, footer, disclosure, children, ariaLabel, className, "data-testid": dataTestId, hideOnClickOutside, hideOnEsc, id, isClosable, separator, noPadding, style, }: DrawerProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
16
|
+
export declare const BaseDrawer: ({ size, onClose, open, header, footer, disclosure, children, ariaLabel, className, "data-testid": dataTestId, hideOnClickOutside, hideOnEsc, id, isClosable, push, separator, noPadding, style, }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const Drawer: (({ size, onClose, open, header, footer, disclosure, children, ariaLabel, className, "data-testid": dataTestId, hideOnClickOutside, hideOnEsc, id, isClosable, push, separator, noPadding, style, }: DrawerProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
20
18
|
Content: ({ children }: {
|
|
21
|
-
children: ReactNode;
|
|
19
|
+
children: import("react").ReactNode;
|
|
22
20
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
21
|
};
|
|
24
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAMhC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAY5C,KAAK,WAAW,GAAG,IAAI,CACrB,cAAc,CAAC,OAAO,KAAK,CAAC,EAC1B,WAAW,GACX,UAAU,GACV,WAAW,GACX,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,WAAW,GACX,IAAI,GACJ,SAAS,GACT,MAAM,GACN,YAAY,GACZ,OAAO,CACV,GAAG;IACF,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAA;IAC/B,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAA;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,MAAM,CAAA;CACjD,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,mMAmBxB,WAAW,4CAmHb,CAAA;AAED,eAAO,MAAM,MAAM,uMArHhB,WAAW;;;;CAuHZ,CAAA"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "@ultraviolet/utils";
|
|
4
|
+
import { useRef, useCallback, useLayoutEffect } from "react";
|
|
4
5
|
import { Modal } from "../Modal/index.js";
|
|
5
6
|
import { Separator } from "../Separator/index.js";
|
|
6
7
|
import { Stack } from "../Stack/index.js";
|
|
7
8
|
import { Text } from "../Text/index.js";
|
|
8
|
-
import {
|
|
9
|
-
|
|
9
|
+
import { DrawerContent } from "./DrawerContent.js";
|
|
10
|
+
import { contentToPushStyle, drawerContentWrapper, drawerChildrenWrapper, drawerFooter, drawer, drawerBase, drawerPush, drawerHeader } from "./styles.css.js";
|
|
10
11
|
const BaseDrawer = ({
|
|
11
12
|
size = "medium",
|
|
12
13
|
onClose,
|
|
@@ -22,10 +23,33 @@ const BaseDrawer = ({
|
|
|
22
23
|
hideOnEsc,
|
|
23
24
|
id,
|
|
24
25
|
isClosable,
|
|
26
|
+
push,
|
|
25
27
|
separator = true,
|
|
26
28
|
noPadding = false,
|
|
27
29
|
style
|
|
28
30
|
}) => {
|
|
31
|
+
const modalRef = useRef(null);
|
|
32
|
+
const onOpenPush = useCallback(() => {
|
|
33
|
+
const targetElement = push === "body" ? document?.body : push?.current;
|
|
34
|
+
if (targetElement && push) {
|
|
35
|
+
targetElement.dataset["drawer"] = size;
|
|
36
|
+
if (!targetElement.classList.contains(contentToPushStyle)) {
|
|
37
|
+
targetElement.classList.add(contentToPushStyle);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, [size, push]);
|
|
41
|
+
const onClosePush = useCallback(() => {
|
|
42
|
+
const targetElement = push === "body" ? document?.body : push?.current;
|
|
43
|
+
if (targetElement && push) {
|
|
44
|
+
targetElement.dataset["drawer"] = "none";
|
|
45
|
+
targetElement.classList.remove(contentToPushStyle);
|
|
46
|
+
}
|
|
47
|
+
}, [push]);
|
|
48
|
+
useLayoutEffect(() => {
|
|
49
|
+
if (modalRef.current) {
|
|
50
|
+
onOpenPush();
|
|
51
|
+
}
|
|
52
|
+
}, [onOpenPush, onClosePush]);
|
|
29
53
|
const computeHeader = (modalProps) => {
|
|
30
54
|
if (typeof header === "string") {
|
|
31
55
|
return /* @__PURE__ */ jsx(
|
|
@@ -55,12 +79,25 @@ const BaseDrawer = ({
|
|
|
55
79
|
}
|
|
56
80
|
return header;
|
|
57
81
|
};
|
|
82
|
+
useLayoutEffect(() => {
|
|
83
|
+
const targetElement = push === "body" ? document?.body : push?.current;
|
|
84
|
+
return () => {
|
|
85
|
+
if (targetElement && push) {
|
|
86
|
+
targetElement.classList.remove(contentToPushStyle);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}, [open, push, size]);
|
|
58
90
|
return /* @__PURE__ */ jsx(
|
|
59
91
|
Modal,
|
|
60
92
|
{
|
|
61
93
|
ariaLabel,
|
|
62
94
|
backdropClassName: "backdrop-drawer",
|
|
63
|
-
className: cn(
|
|
95
|
+
className: cn(
|
|
96
|
+
className,
|
|
97
|
+
drawer[size],
|
|
98
|
+
drawerBase,
|
|
99
|
+
push ? drawerPush : ""
|
|
100
|
+
),
|
|
64
101
|
"data-size": size,
|
|
65
102
|
"data-testid": dataTestId,
|
|
66
103
|
disclosure,
|
|
@@ -68,9 +105,12 @@ const BaseDrawer = ({
|
|
|
68
105
|
hideOnEsc,
|
|
69
106
|
id,
|
|
70
107
|
isClosable,
|
|
108
|
+
onBeforeClose: onClosePush,
|
|
71
109
|
onClose,
|
|
110
|
+
onOpen: onOpenPush,
|
|
72
111
|
open,
|
|
73
112
|
placement: "top-right",
|
|
113
|
+
ref: modalRef,
|
|
74
114
|
size,
|
|
75
115
|
style,
|
|
76
116
|
children: (modalProps) => {
|
|
@@ -90,6 +130,5 @@ const Drawer = Object.assign(BaseDrawer, {
|
|
|
90
130
|
});
|
|
91
131
|
export {
|
|
92
132
|
BaseDrawer,
|
|
93
|
-
Drawer
|
|
94
|
-
DrawerContent
|
|
133
|
+
Drawer
|
|
95
134
|
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export declare const SIZES: {
|
|
2
|
-
large:
|
|
3
|
-
medium:
|
|
4
|
-
small:
|
|
2
|
+
readonly large: 75.5;
|
|
3
|
+
readonly medium: 49;
|
|
4
|
+
readonly small: 22.25;
|
|
5
|
+
};
|
|
6
|
+
export declare const DURATION: {
|
|
7
|
+
readonly large: 0.3;
|
|
8
|
+
readonly medium: 0.25;
|
|
9
|
+
readonly small: 0.15;
|
|
5
10
|
};
|
|
6
11
|
export type SizeProp = keyof typeof SIZES;
|
|
7
12
|
export declare const drawer: Record<"small" | "large" | "medium", string>;
|
|
@@ -11,4 +16,6 @@ export declare const drawerContent: string;
|
|
|
11
16
|
export declare const drawerHeader: string;
|
|
12
17
|
export declare const drawerFooter: string;
|
|
13
18
|
export declare const drawerBase: string;
|
|
19
|
+
export declare const drawerPush: string;
|
|
20
|
+
export declare const contentToPushStyle: string;
|
|
14
21
|
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/styles.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/styles.css.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,KAAK;;;;CAIR,CAAA;AAEV,eAAO,MAAM,QAAQ;;;;CAIX,CAAA;AAYV,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAA;AASzC,eAAO,MAAM,MAAM,8CAIjB,CAAA;AAEF,eAAO,MAAM,oBAAoB,QAG/B,CAAA;AAEF,eAAO,MAAM,qBAAqB,QAGhC,CAAA;AAEF,eAAO,MAAM,aAAa,QAExB,CAAA;AAEF,eAAO,MAAM,YAAY,QAGvB,CAAA;AAEF,eAAO,MAAM,YAAY,QAGvB,CAAA;AAEF,eAAO,MAAM,UAAU,QAAY,CAAA;AAEnC,eAAO,MAAM,UAAU,QAAY,CAAA;AAEnC,eAAO,MAAM,kBAAkB,QAAY,CAAA"}
|
|
@@ -6,12 +6,16 @@ var drawerContent = "uv_1iezf7y8";
|
|
|
6
6
|
var drawerHeader = "uv_1iezf7y9";
|
|
7
7
|
var drawerFooter = "uv_1iezf7ya";
|
|
8
8
|
var drawerBase = "uv_1iezf7yb";
|
|
9
|
+
var drawerPush = "uv_1iezf7yc";
|
|
10
|
+
var contentToPushStyle = "uv_1iezf7yd";
|
|
9
11
|
export {
|
|
12
|
+
contentToPushStyle,
|
|
10
13
|
drawer,
|
|
11
14
|
drawerBase,
|
|
12
15
|
drawerChildrenWrapper,
|
|
13
16
|
drawerContent,
|
|
14
17
|
drawerContentWrapper,
|
|
15
18
|
drawerFooter,
|
|
16
|
-
drawerHeader
|
|
19
|
+
drawerHeader,
|
|
20
|
+
drawerPush
|
|
17
21
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MimeType } from './types';
|
|
2
2
|
export declare const getMimeTypeType: (mimeType: string) => MimeType;
|
|
3
3
|
export declare const formatFileSize: (bytes: number) => string;
|
|
4
|
+
export declare const fileIsAccepted: (fileType: string, accept?: string) => boolean;
|
|
4
5
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,QACiB,CAAA;AAEpE,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAoB9C,CAAA"}
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,QACiB,CAAA;AAEpE,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAoB9C,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,SAAS,MAAM,YA0B/D,CAAA"}
|
|
@@ -13,7 +13,28 @@ const formatFileSize = (bytes) => {
|
|
|
13
13
|
const formattedSize = size % 1 === 0 ? size : Number.parseFloat(size.toFixed(2));
|
|
14
14
|
return `${formattedSize} ${units[unitIndex]}`;
|
|
15
15
|
};
|
|
16
|
+
const fileIsAccepted = (fileType, accept) => {
|
|
17
|
+
if (!accept) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
const acceptItems = accept.split(",").map((a) => a.trim()).filter(Boolean);
|
|
21
|
+
if (acceptItems.length === 0) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
for (const item of acceptItems) {
|
|
25
|
+
if (item.endsWith("/*")) {
|
|
26
|
+
const prefix = item.slice(0, item.indexOf("/"));
|
|
27
|
+
if (fileType.startsWith(`${prefix}/`)) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
} else if (fileType === item) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
};
|
|
16
36
|
export {
|
|
37
|
+
fileIsAccepted,
|
|
17
38
|
formatFileSize,
|
|
18
39
|
getMimeTypeType
|
|
19
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,SAAS,CAAA;AAkTxD,eAAO,MAAM,SAAS,0OAxRnB,cAAc;;;CA2Rf,CAAA"}
|
|
@@ -8,6 +8,7 @@ import { Text } from "../Text/index.js";
|
|
|
8
8
|
import { FileInputButton } from "./components/Button.js";
|
|
9
9
|
import { ListFiles } from "./components/List.js";
|
|
10
10
|
import { FileInputContext } from "./FileInputProvider.js";
|
|
11
|
+
import { fileIsAccepted } from "./helpers.js";
|
|
11
12
|
import { fileInput, overlayWrapper, dropzoneOverlayDisabled, dropzoneOverlay, dropzone, titleSmall } from "./styles.css.js";
|
|
12
13
|
const FileInputBase = ({
|
|
13
14
|
style,
|
|
@@ -67,39 +68,37 @@ const FileInputBase = ({
|
|
|
67
68
|
setFiles(defaultFiles);
|
|
68
69
|
}
|
|
69
70
|
}, [defaultFiles]);
|
|
71
|
+
const addFiles = (addedFiles) => {
|
|
72
|
+
const droppedFiles = [...addedFiles ?? []];
|
|
73
|
+
const acceptedDropped = droppedFiles.filter(
|
|
74
|
+
(file) => fileIsAccepted(file.type, accept)
|
|
75
|
+
);
|
|
76
|
+
const newFiles = acceptedDropped.map((file) => ({
|
|
77
|
+
file: URL.createObjectURL(file),
|
|
78
|
+
fileName: file.name,
|
|
79
|
+
lastModified: file.lastModified,
|
|
80
|
+
size: file.size,
|
|
81
|
+
type: file.type
|
|
82
|
+
}));
|
|
83
|
+
const formattedFiles = multiple ? [...files, ...newFiles] : [newFiles[0]];
|
|
84
|
+
setFiles(formattedFiles);
|
|
85
|
+
onChangeFiles?.(formattedFiles);
|
|
86
|
+
};
|
|
70
87
|
const manageDrop = (event) => {
|
|
71
88
|
event.preventDefault();
|
|
72
89
|
if (!disabled) {
|
|
73
|
-
|
|
74
|
-
const newFiles = droppedFiles.map((file) => ({
|
|
75
|
-
file: URL.createObjectURL(file),
|
|
76
|
-
fileName: file.name,
|
|
77
|
-
lastModified: file.lastModified,
|
|
78
|
-
size: file.size,
|
|
79
|
-
type: file.type
|
|
80
|
-
}));
|
|
81
|
-
const formattedFiles = multiple ? [...files, ...newFiles] : newFiles;
|
|
82
|
-
setFiles(formattedFiles);
|
|
90
|
+
addFiles(event.dataTransfer?.files);
|
|
83
91
|
onDrop?.(event);
|
|
84
|
-
onChangeFiles?.(formattedFiles);
|
|
85
92
|
}
|
|
86
93
|
};
|
|
87
94
|
const onChange = (event) => {
|
|
88
95
|
event.preventDefault();
|
|
89
96
|
if (!disabled) {
|
|
90
|
-
|
|
91
|
-
const newFiles = addedFiles.map((file) => ({
|
|
92
|
-
file: URL.createObjectURL(file),
|
|
93
|
-
fileName: file.name,
|
|
94
|
-
lastModified: file.lastModified,
|
|
95
|
-
size: file.size,
|
|
96
|
-
type: file.type
|
|
97
|
-
}));
|
|
98
|
-
const formattedFiles = multiple ? [...files, ...newFiles] : newFiles;
|
|
99
|
-
setFiles(formattedFiles);
|
|
100
|
-
onChangeFiles?.(formattedFiles);
|
|
97
|
+
addFiles(event.target.files);
|
|
101
98
|
}
|
|
102
99
|
};
|
|
100
|
+
const computedChildren = typeof children === "function" ? children(inputId, inputRef) : children;
|
|
101
|
+
const computedError = error && typeof error === "string" ? /* @__PURE__ */ jsx(Text, { as: "p", sentiment: "danger", variant: "bodySmall", children: error }) : null;
|
|
103
102
|
if (variant === "overlay") {
|
|
104
103
|
return /* @__PURE__ */ jsx(
|
|
105
104
|
FileInputContext.Provider,
|
|
@@ -136,7 +135,7 @@ const FileInputBase = ({
|
|
|
136
135
|
}
|
|
137
136
|
),
|
|
138
137
|
/* @__PURE__ */ jsxs("div", { className: overlayWrapper, children: [
|
|
139
|
-
|
|
138
|
+
computedChildren,
|
|
140
139
|
/* @__PURE__ */ jsx(
|
|
141
140
|
"div",
|
|
142
141
|
{
|
|
@@ -176,7 +175,7 @@ const FileInputBase = ({
|
|
|
176
175
|
children: bottom
|
|
177
176
|
}
|
|
178
177
|
) : null,
|
|
179
|
-
|
|
178
|
+
computedError
|
|
180
179
|
] })
|
|
181
180
|
}
|
|
182
181
|
);
|
|
@@ -258,7 +257,7 @@ const FileInputBase = ({
|
|
|
258
257
|
children: typeof title === "function" ? title(inputId, inputRef) : title
|
|
259
258
|
}
|
|
260
259
|
),
|
|
261
|
-
|
|
260
|
+
computedChildren
|
|
262
261
|
]
|
|
263
262
|
}
|
|
264
263
|
) }),
|
|
@@ -273,7 +272,7 @@ const FileInputBase = ({
|
|
|
273
272
|
}
|
|
274
273
|
) : null
|
|
275
274
|
] }),
|
|
276
|
-
|
|
275
|
+
computedError,
|
|
277
276
|
bottom ? /* @__PURE__ */ jsx(
|
|
278
277
|
Text,
|
|
279
278
|
{
|
|
@@ -35,6 +35,6 @@ type InfiniteScrollProps = {
|
|
|
35
35
|
* You can add it at the end of a list of items and it will call the `onLoadMore` function when the user scrolls to the bottom of the list.
|
|
36
36
|
* The component will take the first parent that has as the scroll to listen on it. In some rare cases, if you need to change the scroll listener, you can use the `scrollParentRef` prop.
|
|
37
37
|
*/
|
|
38
|
-
export declare const InfiniteScroll: ({ className, "data-testid": dataTestId, onLoadMore, scrollParentRef, height, loader, id, as: Component, hasMore, heightThreshold, style, }: InfiniteScrollProps) => string | number | bigint |
|
|
38
|
+
export declare const InfiniteScroll: ({ className, "data-testid": dataTestId, onLoadMore, scrollParentRef, height, loader, id, as: Component, hasMore, heightThreshold, style, }: InfiniteScrollProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
export {};
|
|
40
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteScroll/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQ7E,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;IAC7D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,4IAY5B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteScroll/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQ7E,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;IAC7D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,4IAY5B,mBAAmB,yTA8FrB,CAAA"}
|
|
@@ -57,7 +57,7 @@ const InfiniteScroll = ({
|
|
|
57
57
|
if (!hasMore) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
let scrollableContainer = scrollParentRef?.current
|
|
60
|
+
let scrollableContainer = scrollParentRef?.current ?? containerRef.current?.parentElement;
|
|
61
61
|
while (scrollableContainer && scrollableContainer !== document.body) {
|
|
62
62
|
const { overflowY } = window.getComputedStyle(scrollableContainer);
|
|
63
63
|
if (overflowY === "auto" || overflowY === "scroll") {
|
|
@@ -77,7 +77,7 @@ const InfiniteScroll = ({
|
|
|
77
77
|
scrollableContainer.removeEventListener("scroll", debouncedHandleScroll);
|
|
78
78
|
};
|
|
79
79
|
}, [debounce, handleScroll, hasMore, onLoadMore, scrollParentRef]);
|
|
80
|
-
const localLoader = useMemo(() => loader
|
|
80
|
+
const localLoader = useMemo(() => loader ?? /* @__PURE__ */ jsx(Loader, { active: true }), [loader]);
|
|
81
81
|
if (isLoading) {
|
|
82
82
|
return localLoader;
|
|
83
83
|
}
|
|
@@ -20,7 +20,7 @@ const getMaxChartValue = (preppedData) => {
|
|
|
20
20
|
return 0;
|
|
21
21
|
}
|
|
22
22
|
const maximum = Math.max(
|
|
23
|
-
...preppedData.map(({ data }) => getMax(data.map(({ y }) => y
|
|
23
|
+
...preppedData.map(({ data }) => getMax(data.map(({ y }) => y ?? 0)))
|
|
24
24
|
);
|
|
25
25
|
return Math.ceil(maximum + maximum * 0.1);
|
|
26
26
|
};
|
|
@@ -29,13 +29,13 @@ const getMinChartValue = (preppedData) => {
|
|
|
29
29
|
return 0;
|
|
30
30
|
}
|
|
31
31
|
const minimum = Math.min(
|
|
32
|
-
...preppedData.map(({ data }) => getMin(data.map(({ y }) => y
|
|
32
|
+
...preppedData.map(({ data }) => getMin(data.map(({ y }) => y ?? 0)))
|
|
33
33
|
);
|
|
34
34
|
return Math.floor(minimum - minimum * 0.1);
|
|
35
35
|
};
|
|
36
36
|
const getCurrent = (values = []) => {
|
|
37
37
|
const val = values.at(-1);
|
|
38
|
-
return val
|
|
38
|
+
return val ?? 0;
|
|
39
39
|
};
|
|
40
40
|
const getSelected = (label, index, selected = []) => {
|
|
41
41
|
const labelIndexed = label + index.toString();
|
|
@@ -33,7 +33,7 @@ const Link = forwardRef(
|
|
|
33
33
|
render
|
|
34
34
|
}, ref) => {
|
|
35
35
|
const isBlank = target === "_blank";
|
|
36
|
-
const computedRel = rel
|
|
36
|
+
const computedRel = rel ?? (isBlank ? "noopener noreferrer" : void 0);
|
|
37
37
|
const [isTruncated, setIsTruncated] = useState(false);
|
|
38
38
|
const elementRef = useRef(null);
|
|
39
39
|
const usedRef = ref ?? elementRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuContent.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,oBAAoB,EAGpB,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAA;AAad,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAkBhC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MenuContent.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,oBAAoB,EAGpB,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAA;AAad,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAkBhC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;iBAuCC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iJAgNlB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAqBhC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAqBhC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;iBAC8kC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CADniC,CAAA"}
|
|
@@ -14,6 +14,6 @@ type ModalContentProps = ComponentProps<typeof Modal> & {
|
|
|
14
14
|
image?: string;
|
|
15
15
|
style?: CSSProperties;
|
|
16
16
|
};
|
|
17
|
-
export declare const ModalContent: ({ visible, open, placement, finalSize, ariaLabel, hideOnClickOutside, hideOnEsc, preventBodyScroll, handleClose, className, backdropClassName, dataTestId, isClosable, children, handleOpen, handleToggle, finalId, image, style, }: ModalContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export declare const ModalContent: ({ visible, open, placement, finalSize, ariaLabel, hideOnClickOutside, hideOnEsc, preventBodyScroll, handleClose, className, backdropClassName, dataTestId, isClosable, children, handleOpen, handleToggle, finalId, image, style, ref, }: ModalContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
18
|
export {};
|
|
19
19
|
//# sourceMappingURL=ModalContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalContent.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalContent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAA;AAG9B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExD,KAAK,iBAAiB,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,GAAG;IACtD,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,EAAE,cAAc,CAAA;IACzB,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,
|
|
1
|
+
{"version":3,"file":"ModalContent.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalContent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAA;AAG9B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExD,KAAK,iBAAiB,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,GAAG;IACtD,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,EAAE,cAAc,CAAA;IACzB,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,0OAqB1B,iBAAiB,mDA+CV,CAAA"}
|
|
@@ -23,7 +23,8 @@ const ModalContent = ({
|
|
|
23
23
|
handleToggle,
|
|
24
24
|
finalId,
|
|
25
25
|
image,
|
|
26
|
-
style
|
|
26
|
+
style,
|
|
27
|
+
ref
|
|
27
28
|
}) => visible || open ? /* @__PURE__ */ jsx(
|
|
28
29
|
Dialog,
|
|
29
30
|
{
|
|
@@ -39,6 +40,7 @@ const ModalContent = ({
|
|
|
39
40
|
open: visible || open,
|
|
40
41
|
placement,
|
|
41
42
|
preventBodyScroll,
|
|
43
|
+
ref,
|
|
42
44
|
size: finalSize,
|
|
43
45
|
style,
|
|
44
46
|
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DialogProps } from '../types';
|
|
2
|
-
export declare const Dialog: ({ children, placement, onClose, hideOnClickOutside, size, id, ariaLabel, className, "data-testid": dataTestId, preventBodyScroll, hideOnEsc, backdropClassName, image, style, }: DialogProps) => import("react").ReactPortal;
|
|
2
|
+
export declare const Dialog: ({ children, placement, onClose, hideOnClickOutside, size, id, ariaLabel, className, "data-testid": dataTestId, preventBodyScroll, hideOnEsc, backdropClassName, image, style, ref, }: DialogProps) => import("react").ReactPortal;
|
|
3
3
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/components/Dialog.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAQ3C,eAAO,MAAM,MAAM,GAAI,
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/components/Dialog.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAQ3C,eAAO,MAAM,MAAM,GAAI,sLAgBpB,WAAW,gCAqPb,CAAA"}
|