@conveyorhq/arrow-ds 1.93.0 → 1.95.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/package.json +1 -1
- package/public/components/Icon/Icon.d.ts +5 -0
- package/public/components/Icon/Icon.js +15 -5
- package/public/components/Modal/Modal.d.ts +45 -1
- package/public/components/Modal/Modal.js +104 -30
- package/public/components/Modal/context.d.ts +2 -0
- package/public/css/styles.css +41 -2
- package/public/css/styles.min.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/src/components/Icon/Icon.tsx +23 -8
- package/src/components/Modal/Modal.story.mdx +57 -2
- package/src/components/Modal/Modal.tsx +270 -72
- package/src/components/Modal/context.ts +2 -0
- package/src/components/Modal/index.css +22 -5
package/package.json
CHANGED
|
@@ -24,10 +24,12 @@ export declare enum ICON_TYPE {
|
|
|
24
24
|
ARROWS_ALT = "arrows-alt",
|
|
25
25
|
BACKWARD = "backward",
|
|
26
26
|
BAN = "ban",
|
|
27
|
+
BANDAID = "band-aid",
|
|
27
28
|
BARS = "bars",
|
|
28
29
|
BATTERY_HALF = "battery-half",
|
|
29
30
|
BED = "bed",
|
|
30
31
|
BELL = "bell",
|
|
32
|
+
BIOHAZARD = "biohazard",
|
|
31
33
|
BIRTHDAY_CAKE = "birthday-cake",
|
|
32
34
|
BOLT = "bolt",
|
|
33
35
|
BOOK = "book",
|
|
@@ -53,6 +55,7 @@ export declare enum ICON_TYPE {
|
|
|
53
55
|
CLOCK = "clock",
|
|
54
56
|
CLIPBOARD = "clipboard",
|
|
55
57
|
CLOUD_DOWNLOAD_ALT = "cloud-download-alt",
|
|
58
|
+
CLOUD_UPLOAD_ALT = "cloud-upload-alt",
|
|
56
59
|
COG = "cog",
|
|
57
60
|
COINS = "coins",
|
|
58
61
|
COLUMNS = "columns",
|
|
@@ -96,6 +99,7 @@ export declare enum ICON_TYPE {
|
|
|
96
99
|
INFO_CIRCLE = "info-circle",
|
|
97
100
|
KEY = "key",
|
|
98
101
|
KEYBOARD = "keyboard",
|
|
102
|
+
LAPTOP = "laptop",
|
|
99
103
|
LAYER_GROUP = "layer-group",
|
|
100
104
|
LEVEL_UP_ALT = "level-up-alt",
|
|
101
105
|
LIFE_RING = "life-ring",
|
|
@@ -129,6 +133,7 @@ export declare enum ICON_TYPE {
|
|
|
129
133
|
SIGN_OUT_ALT = "sign-out-alt",
|
|
130
134
|
SIGNAL = "signal",
|
|
131
135
|
SIGNATURE = "signature",
|
|
136
|
+
SITEMAP = "sitemap",
|
|
132
137
|
SLIDERS_H = "sliders-h",
|
|
133
138
|
SORT = "sort",
|
|
134
139
|
SORT_DOWN = "sort-down",
|
|
@@ -42,14 +42,16 @@ const faArchive_1 = require("@fortawesome/free-solid-svg-icons/faArchive");
|
|
|
42
42
|
const faArrowDown_1 = require("@fortawesome/free-solid-svg-icons/faArrowDown");
|
|
43
43
|
const faArrowLeft_1 = require("@fortawesome/free-solid-svg-icons/faArrowLeft");
|
|
44
44
|
const faArrowRight_1 = require("@fortawesome/free-solid-svg-icons/faArrowRight");
|
|
45
|
-
const faArrowUp_1 = require("@fortawesome/free-solid-svg-icons/faArrowUp");
|
|
46
45
|
const faArrowsAlt_1 = require("@fortawesome/free-solid-svg-icons/faArrowsAlt");
|
|
46
|
+
const faArrowUp_1 = require("@fortawesome/free-solid-svg-icons/faArrowUp");
|
|
47
47
|
const faBackward_1 = require("@fortawesome/free-solid-svg-icons/faBackward");
|
|
48
48
|
const faBan_1 = require("@fortawesome/free-solid-svg-icons/faBan");
|
|
49
|
+
const faBandAid_1 = require("@fortawesome/free-solid-svg-icons/faBandAid");
|
|
49
50
|
const faBars_1 = require("@fortawesome/free-solid-svg-icons/faBars");
|
|
50
51
|
const faBatteryHalf_1 = require("@fortawesome/free-solid-svg-icons/faBatteryHalf");
|
|
51
52
|
const faBed_1 = require("@fortawesome/free-solid-svg-icons/faBed");
|
|
52
53
|
const faBell_1 = require("@fortawesome/free-solid-svg-icons/faBell");
|
|
54
|
+
const faBiohazard_1 = require("@fortawesome/free-solid-svg-icons/faBiohazard");
|
|
53
55
|
const faBirthdayCake_1 = require("@fortawesome/free-solid-svg-icons/faBirthdayCake");
|
|
54
56
|
const faBolt_1 = require("@fortawesome/free-solid-svg-icons/faBolt");
|
|
55
57
|
const faBook_1 = require("@fortawesome/free-solid-svg-icons/faBook");
|
|
@@ -75,11 +77,14 @@ const faCircleNotch_1 = require("@fortawesome/free-solid-svg-icons/faCircleNotch
|
|
|
75
77
|
const faClipboard_1 = require("@fortawesome/free-solid-svg-icons/faClipboard");
|
|
76
78
|
const faClock_2 = require("@fortawesome/free-solid-svg-icons/faClock");
|
|
77
79
|
const faCloudDownloadAlt_1 = require("@fortawesome/free-solid-svg-icons/faCloudDownloadAlt");
|
|
80
|
+
const faCloudUploadAlt_1 = require("@fortawesome/free-solid-svg-icons/faCloudUploadAlt");
|
|
78
81
|
const faCog_1 = require("@fortawesome/free-solid-svg-icons/faCog");
|
|
82
|
+
const faCoins_1 = require("@fortawesome/free-solid-svg-icons/faCoins");
|
|
79
83
|
const faColumns_1 = require("@fortawesome/free-solid-svg-icons/faColumns");
|
|
80
84
|
const faCommentAlt_1 = require("@fortawesome/free-solid-svg-icons/faCommentAlt");
|
|
81
85
|
const faCompass_1 = require("@fortawesome/free-solid-svg-icons/faCompass");
|
|
82
86
|
const faCompress_1 = require("@fortawesome/free-solid-svg-icons/faCompress");
|
|
87
|
+
const faCopy_1 = require("@fortawesome/free-solid-svg-icons/faCopy");
|
|
83
88
|
const faCrown_1 = require("@fortawesome/free-solid-svg-icons/faCrown");
|
|
84
89
|
const faDoorClosed_1 = require("@fortawesome/free-solid-svg-icons/faDoorClosed");
|
|
85
90
|
const faEdit_1 = require("@fortawesome/free-solid-svg-icons/faEdit");
|
|
@@ -115,6 +120,7 @@ const faIdBadge_1 = require("@fortawesome/free-solid-svg-icons/faIdBadge");
|
|
|
115
120
|
const faImage_1 = require("@fortawesome/free-solid-svg-icons/faImage");
|
|
116
121
|
const faInfoCircle_1 = require("@fortawesome/free-solid-svg-icons/faInfoCircle");
|
|
117
122
|
const faKey_1 = require("@fortawesome/free-solid-svg-icons/faKey");
|
|
123
|
+
const faLaptop_1 = require("@fortawesome/free-solid-svg-icons/faLaptop");
|
|
118
124
|
const faLayerGroup_1 = require("@fortawesome/free-solid-svg-icons/faLayerGroup");
|
|
119
125
|
const faLevelUpAlt_1 = require("@fortawesome/free-solid-svg-icons/faLevelUpAlt");
|
|
120
126
|
const faLifeRing_1 = require("@fortawesome/free-solid-svg-icons/faLifeRing");
|
|
@@ -128,8 +134,8 @@ const faMapSigns_1 = require("@fortawesome/free-solid-svg-icons/faMapSigns");
|
|
|
128
134
|
const faMinus_1 = require("@fortawesome/free-solid-svg-icons/faMinus");
|
|
129
135
|
const faMousePointer_1 = require("@fortawesome/free-solid-svg-icons/faMousePointer");
|
|
130
136
|
const faPalette_1 = require("@fortawesome/free-solid-svg-icons/faPalette");
|
|
131
|
-
const faPaperPlane_1 = require("@fortawesome/free-solid-svg-icons/faPaperPlane");
|
|
132
137
|
const faPaperclip_1 = require("@fortawesome/free-solid-svg-icons/faPaperclip");
|
|
138
|
+
const faPaperPlane_1 = require("@fortawesome/free-solid-svg-icons/faPaperPlane");
|
|
133
139
|
const faPause_1 = require("@fortawesome/free-solid-svg-icons/faPause");
|
|
134
140
|
const faPen_1 = require("@fortawesome/free-solid-svg-icons/faPen");
|
|
135
141
|
const faPlay_1 = require("@fortawesome/free-solid-svg-icons/faPlay");
|
|
@@ -147,6 +153,7 @@ const faShieldAlt_1 = require("@fortawesome/free-solid-svg-icons/faShieldAlt");
|
|
|
147
153
|
const faSignal_1 = require("@fortawesome/free-solid-svg-icons/faSignal");
|
|
148
154
|
const faSignature_1 = require("@fortawesome/free-solid-svg-icons/faSignature");
|
|
149
155
|
const faSignOutAlt_1 = require("@fortawesome/free-solid-svg-icons/faSignOutAlt");
|
|
156
|
+
const faSitemap_1 = require("@fortawesome/free-solid-svg-icons/faSitemap");
|
|
150
157
|
const faSlidersH_1 = require("@fortawesome/free-solid-svg-icons/faSlidersH");
|
|
151
158
|
const faSort_1 = require("@fortawesome/free-solid-svg-icons/faSort");
|
|
152
159
|
const faSortDown_1 = require("@fortawesome/free-solid-svg-icons/faSortDown");
|
|
@@ -176,15 +183,13 @@ const faUsers_1 = require("@fortawesome/free-solid-svg-icons/faUsers");
|
|
|
176
183
|
const faUserSecret_1 = require("@fortawesome/free-solid-svg-icons/faUserSecret");
|
|
177
184
|
const faUserShield_1 = require("@fortawesome/free-solid-svg-icons/faUserShield");
|
|
178
185
|
const faWrench_1 = require("@fortawesome/free-solid-svg-icons/faWrench");
|
|
179
|
-
const faCopy_1 = require("@fortawesome/free-solid-svg-icons/faCopy");
|
|
180
|
-
const faCoins_1 = require("@fortawesome/free-solid-svg-icons/faCoins");
|
|
181
186
|
const svg_1 = require("./svg");
|
|
182
187
|
const status_1 = require("../../contexts/status");
|
|
183
188
|
const types_1 = require("../../types");
|
|
184
189
|
const utilities_1 = require("../../utilities");
|
|
185
190
|
const ShieldCheck_1 = require("./svg/ShieldCheck");
|
|
186
191
|
const cn = utilities_1.bemHOF("Icon");
|
|
187
|
-
fontawesome_svg_core_1.library.add(faArchive_1.faArchive, faArrowDown_1.faArrowDown, faArrowLeft_1.faArrowLeft, faArrowRight_1.faArrowRight,
|
|
192
|
+
fontawesome_svg_core_1.library.add(faArchive_1.faArchive, faArrowDown_1.faArrowDown, faArrowLeft_1.faArrowLeft, faArrowRight_1.faArrowRight, faArrowsAlt_1.faArrowsAlt, faArrowUp_1.faArrowUp, faBackward_1.faBackward, faBan_1.faBan, faBandAid_1.faBandAid, faBars_1.faBars, faBatteryHalf_1.faBatteryHalf, faBed_1.faBed, faBell_1.faBell, faBiohazard_1.faBiohazard, faBirthdayCake_1.faBirthdayCake, faBolt_1.faBolt, faBook_1.faBook, faBug_1.faBug, faBullhorn_1.faBullhorn, faCalculator_1.faCalculator, faCalendar_1.faCalendar, faCaretDown_1.faCaretDown, faCaretLeft_1.faCaretLeft, faCaretRight_1.faCaretRight, faCaretUp_1.faCaretUp, faChartBar_1.faChartBar, faChartLine_1.faChartLine, faCheck_1.faCheck, faCheckCircle_2.faCheckCircle, faCheckCircle_1.faCheckCircle, faCheckSquare_1.faCheckSquare, faChevronDown_1.faChevronDown, faChevronLeft_1.faChevronLeft, faChevronRight_1.faChevronRight, faChevronUp_1.faChevronUp, faCircle_2.faCircle, faCircleNotch_1.faCircleNotch, faCircle_1.faCircle, faClipboard_1.faClipboard, faClock_1.faClock, faClock_2.faClock, faCloudDownloadAlt_1.faCloudDownloadAlt, faCloudUploadAlt_1.faCloudUploadAlt, faCog_1.faCog, faCoins_1.faCoins, faColumns_1.faColumns, faCommentAlt_1.faCommentAlt, faCompass_1.faCompass, faCompress_1.faCompress, faCopy_1.faCopy, faCrown_1.faCrown, faDoorClosed_1.faDoorClosed, faEdit_1.faEdit, faEllipsisH_1.faEllipsisH, faEllipsisV_1.faEllipsisV, faEnvelope_1.faEnvelope, faExchangeAlt_1.faExchangeAlt, faExclamation_1.faExclamation, faExclamationCircle_1.faExclamationCircle, faExclamationTriangle_1.faExclamationTriangle, faExpand_1.faExpand, faExternalLinkAlt_1.faExternalLinkAlt, faExternalLinkSquareAlt_1.faExternalLinkSquareAlt, faEye_1.faEye, faEyeSlash_1.faEyeSlash, faFastBackward_1.faFastBackward, faFastForward_1.faFastForward, faFile_1.faFile, faFileAlt_1.faFileAlt, faFileAlt_2.faFileAlt, faFileImport_1.faFileImport, faFileSignature_1.faFileSignature, faFilter_1.faFilter, faFlag_1.faFlag, faFolder_1.faFolder, faForward_1.faForward, faGlobeEurope_1.faGlobeEurope, faGripLines_1.faGripLines, faGripLinesVertical_1.faGripLinesVertical, faHandshake_1.faHandshake, faHashtag_1.faHashtag, faHighlighter_1.faHighlighter, faIdBadge_1.faIdBadge, faImage_1.faImage, faInfoCircle_1.faInfoCircle, faKey_1.faKey, faKeyboard_1.faKeyboard, faLaptop_1.faLaptop, faLayerGroup_1.faLayerGroup, faLevelUpAlt_1.faLevelUpAlt, faLifeRing_1.faLifeRing, faLink_1.faLink, faListUl_1.faListUl, faLock_1.faLock, faLongArrowAltRight_1.faLongArrowAltRight, faMagic_1.faMagic, faMapMarkerAlt_1.faMapMarkerAlt, faMapSigns_1.faMapSigns, faMinus_1.faMinus, faMousePointer_1.faMousePointer, faPalette_1.faPalette, faPaperclip_1.faPaperclip, faPaperPlane_1.faPaperPlane, faPause_1.faPause, faPen_1.faPen, faPlay_1.faPlay, faPlus_1.faPlus, faPlusCircle_1.faPlusCircle, faPooStorm_1.faPooStorm, faQuestion_1.faQuestion, faQuestionCircle_2.faQuestionCircle, faQuestionCircle_1.faQuestionCircle, faRandom_1.faRandom, faScroll_1.faScroll, faSearch_1.faSearch, faServer_1.faServer, faShareAlt_1.faShareAlt, faShieldAlt_1.faShieldAlt, faSignal_1.faSignal, faSignature_1.faSignature, faSignOutAlt_1.faSignOutAlt, faSitemap_1.faSitemap, faSlidersH_1.faSlidersH, faSort_1.faSort, faSortDown_1.faSortDown, faSortUp_1.faSortUp, faSpinner_1.faSpinner, faSquare_1.faSquare, faStamp_1.faStamp, faStar_1.faStar, faStar_2.faStar, faSuitcaseRolling_1.faSuitcaseRolling, faSync_1.faSync, faTasks_1.faTasks, faThLarge_1.faThLarge, faThumbsDown_1.faThumbsDown, faThumbsDown_2.faThumbsDown, faThumbsUp_1.faThumbsUp, faThumbsUp_2.faThumbsUp, faTicketAlt_1.faTicketAlt, faTimes_1.faTimes, faTimesCircle_1.faTimesCircle, faTimesCircle_2.faTimesCircle, faTools_1.faTools, faTrash_1.faTrash, faUnlock_1.faUnlock, faUser_2.faUser, faUserAstronaut_1.faUserAstronaut, faUserFriends_1.faUserFriends, faUserLock_1.faUserLock, faUserPlus_1.faUserPlus, faUser_1.faUser, faUsers_1.faUsers, faUserSecret_1.faUserSecret, faUserShield_1.faUserShield, faWrench_1.faWrench);
|
|
188
193
|
var CUSTOM_ICON_TYPE;
|
|
189
194
|
(function (CUSTOM_ICON_TYPE) {
|
|
190
195
|
CUSTOM_ICON_TYPE["ARROW_TO_BOTTOM"] = "arrow-to-bottom";
|
|
@@ -224,10 +229,12 @@ var ICON_TYPE;
|
|
|
224
229
|
ICON_TYPE["ARROWS_ALT"] = "arrows-alt";
|
|
225
230
|
ICON_TYPE["BACKWARD"] = "backward";
|
|
226
231
|
ICON_TYPE["BAN"] = "ban";
|
|
232
|
+
ICON_TYPE["BANDAID"] = "band-aid";
|
|
227
233
|
ICON_TYPE["BARS"] = "bars";
|
|
228
234
|
ICON_TYPE["BATTERY_HALF"] = "battery-half";
|
|
229
235
|
ICON_TYPE["BED"] = "bed";
|
|
230
236
|
ICON_TYPE["BELL"] = "bell";
|
|
237
|
+
ICON_TYPE["BIOHAZARD"] = "biohazard";
|
|
231
238
|
ICON_TYPE["BIRTHDAY_CAKE"] = "birthday-cake";
|
|
232
239
|
ICON_TYPE["BOLT"] = "bolt";
|
|
233
240
|
ICON_TYPE["BOOK"] = "book";
|
|
@@ -253,6 +260,7 @@ var ICON_TYPE;
|
|
|
253
260
|
ICON_TYPE["CLOCK"] = "clock";
|
|
254
261
|
ICON_TYPE["CLIPBOARD"] = "clipboard";
|
|
255
262
|
ICON_TYPE["CLOUD_DOWNLOAD_ALT"] = "cloud-download-alt";
|
|
263
|
+
ICON_TYPE["CLOUD_UPLOAD_ALT"] = "cloud-upload-alt";
|
|
256
264
|
ICON_TYPE["COG"] = "cog";
|
|
257
265
|
ICON_TYPE["COINS"] = "coins";
|
|
258
266
|
ICON_TYPE["COLUMNS"] = "columns";
|
|
@@ -296,6 +304,7 @@ var ICON_TYPE;
|
|
|
296
304
|
ICON_TYPE["INFO_CIRCLE"] = "info-circle";
|
|
297
305
|
ICON_TYPE["KEY"] = "key";
|
|
298
306
|
ICON_TYPE["KEYBOARD"] = "keyboard";
|
|
307
|
+
ICON_TYPE["LAPTOP"] = "laptop";
|
|
299
308
|
ICON_TYPE["LAYER_GROUP"] = "layer-group";
|
|
300
309
|
ICON_TYPE["LEVEL_UP_ALT"] = "level-up-alt";
|
|
301
310
|
ICON_TYPE["LIFE_RING"] = "life-ring";
|
|
@@ -329,6 +338,7 @@ var ICON_TYPE;
|
|
|
329
338
|
ICON_TYPE["SIGN_OUT_ALT"] = "sign-out-alt";
|
|
330
339
|
ICON_TYPE["SIGNAL"] = "signal";
|
|
331
340
|
ICON_TYPE["SIGNATURE"] = "signature";
|
|
341
|
+
ICON_TYPE["SITEMAP"] = "sitemap";
|
|
332
342
|
ICON_TYPE["SLIDERS_H"] = "sliders-h";
|
|
333
343
|
ICON_TYPE["SORT"] = "sort";
|
|
334
344
|
ICON_TYPE["SORT_DOWN"] = "sort-down";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React, { HTMLAttributes, ReactNode } from "react";
|
|
1
2
|
import { BoxProps } from "../Box";
|
|
2
3
|
import { CloseButtonProps } from "../CloseButton";
|
|
3
4
|
import { StackProps } from "../Stack";
|
|
@@ -13,6 +14,7 @@ export interface ModalProps extends BoxProps {
|
|
|
13
14
|
isOpen?: boolean;
|
|
14
15
|
onClose?: () => void;
|
|
15
16
|
autoFocus?: boolean;
|
|
17
|
+
lockScroll?: boolean;
|
|
16
18
|
disableOutsideClick?: boolean;
|
|
17
19
|
disableEscClose?: boolean;
|
|
18
20
|
hideCloseButton?: boolean;
|
|
@@ -35,12 +37,54 @@ export declare const ModalTabs: (props: StackProps) => JSX.Element;
|
|
|
35
37
|
export declare const ModalFooter: (props: BoxProps) => JSX.Element;
|
|
36
38
|
export declare const ModalFooterMultiStep: ({ steps, currentStep, leftButtonLabel, rightButtonLabel, children, className, ...rest }: ModalFooterMultiStepProps) => JSX.Element;
|
|
37
39
|
export declare const ModalCloseButton: ({ className, ...rest }: CloseButtonProps) => JSX.Element;
|
|
40
|
+
interface ModalCloseProps {
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
asChild?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare const ModalClose: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & ModalCloseProps & React.RefAttributes<HTMLElement>>;
|
|
45
|
+
export interface ModalRootProps {
|
|
46
|
+
children: ReactNode;
|
|
47
|
+
isOpen?: boolean;
|
|
48
|
+
onClose?: () => void;
|
|
49
|
+
disableOutsideClick?: boolean;
|
|
50
|
+
disableEscClose?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export declare const ModalRoot: ({ children, isOpen, onClose, disableOutsideClick, disableEscClose, }: ModalRootProps) => JSX.Element;
|
|
53
|
+
export interface ModalPortalProps {
|
|
54
|
+
children: ReactNode;
|
|
55
|
+
}
|
|
56
|
+
export declare const ModalPortal: ({ children }: ModalPortalProps) => JSX.Element;
|
|
57
|
+
export interface ModalOverlayProps {
|
|
58
|
+
children: ReactNode;
|
|
59
|
+
className?: string;
|
|
60
|
+
lockScroll?: boolean;
|
|
61
|
+
autoFocus?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export declare const ModalOverlay: ({ children, className, lockScroll, autoFocus, }: ModalOverlayProps) => JSX.Element;
|
|
64
|
+
export interface ModalContainerProps extends BoxProps {
|
|
65
|
+
children: ReactNode;
|
|
66
|
+
className?: string;
|
|
67
|
+
}
|
|
68
|
+
export declare const ModalContainer: ({ children, className, ...rest }: ModalContainerProps) => JSX.Element;
|
|
69
|
+
export interface ModalContentProps extends BoxProps {
|
|
70
|
+
children: ReactNode;
|
|
71
|
+
}
|
|
72
|
+
export declare const ModalContent: React.ForwardRefExoticComponent<Pick<ModalContentProps, "as" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
export declare const ModalScreen: ({ className, style, ...rest }: HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
38
74
|
export declare const Modal: {
|
|
39
|
-
(props: ModalProps): JSX.Element
|
|
75
|
+
(props: ModalProps): JSX.Element;
|
|
76
|
+
Root: ({ children, isOpen, onClose, disableOutsideClick, disableEscClose, }: ModalRootProps) => JSX.Element;
|
|
77
|
+
Portal: ({ children }: ModalPortalProps) => JSX.Element;
|
|
78
|
+
Overlay: ({ children, className, lockScroll, autoFocus, }: ModalOverlayProps) => JSX.Element;
|
|
79
|
+
Container: ({ children, className, ...rest }: ModalContainerProps) => JSX.Element;
|
|
80
|
+
Content: React.ForwardRefExoticComponent<Pick<ModalContentProps, "as" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
81
|
+
Screen: ({ className, style, ...rest }: HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
40
82
|
Tabs: (props: StackProps) => JSX.Element;
|
|
41
83
|
Header: (props: BoxProps) => JSX.Element;
|
|
42
84
|
Body: (props: ModalBodyProps) => JSX.Element;
|
|
43
85
|
Footer: (props: BoxProps) => JSX.Element;
|
|
44
86
|
FooterMultiStep: ({ steps, currentStep, leftButtonLabel, rightButtonLabel, children, className, ...rest }: ModalFooterMultiStepProps) => JSX.Element;
|
|
45
87
|
CloseButton: ({ className, ...rest }: CloseButtonProps) => JSX.Element;
|
|
88
|
+
Close: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & ModalCloseProps & React.RefAttributes<HTMLElement>>;
|
|
46
89
|
};
|
|
90
|
+
export {};
|
|
@@ -22,11 +22,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
22
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.Modal = exports.ModalCloseButton = exports.ModalFooterMultiStep = exports.ModalFooter = exports.ModalTabs = exports.ModalBody = exports.ModalHeader = exports.MODAL_SIZE = void 0;
|
|
25
|
+
exports.Modal = exports.ModalScreen = exports.ModalContent = exports.ModalContainer = exports.ModalOverlay = exports.ModalPortal = exports.ModalRoot = exports.ModalClose = exports.ModalCloseButton = exports.ModalFooterMultiStep = exports.ModalFooter = exports.ModalTabs = exports.ModalBody = exports.ModalHeader = exports.MODAL_SIZE = void 0;
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
27
|
const classnames_1 = __importDefault(require("classnames"));
|
|
28
28
|
const react_focus_lock_1 = __importDefault(require("react-focus-lock"));
|
|
29
29
|
const react_remove_scroll_1 = require("react-remove-scroll");
|
|
30
|
+
const react_merge_refs_1 = __importDefault(require("react-merge-refs"));
|
|
30
31
|
const Box_1 = require("../Box");
|
|
31
32
|
const Flex_1 = require("../Flex");
|
|
32
33
|
const Portal_1 = require("../Portal");
|
|
@@ -90,25 +91,60 @@ const ModalCloseButton = ({ className, ...rest }) => {
|
|
|
90
91
|
return (react_1.default.createElement(CloseButton_1.CloseButton, Object.assign({ className: classnames_1.default(bem_1.bem(cn, { e: "close" }), className), onClick: onClose }, rest)));
|
|
91
92
|
};
|
|
92
93
|
exports.ModalCloseButton = ModalCloseButton;
|
|
93
|
-
|
|
94
|
-
const {
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
|
|
94
|
+
exports.ModalClose = react_1.forwardRef(function ModalClose({ children, onClick, asChild = false, ...rest }, forwardedRef) {
|
|
95
|
+
const { onClose } = context_1.useModalContext();
|
|
96
|
+
const childrenRef = children.ref;
|
|
97
|
+
const ref = react_1.useMemo(() => react_merge_refs_1.default([forwardedRef, childrenRef]), [
|
|
98
|
+
forwardedRef,
|
|
99
|
+
childrenRef,
|
|
100
|
+
]);
|
|
101
|
+
const mergedOnClick = (event) => {
|
|
102
|
+
if (onClose) {
|
|
103
|
+
onClose();
|
|
104
|
+
}
|
|
105
|
+
if (onClick) {
|
|
106
|
+
onClick(event);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
if (asChild && react_1.isValidElement(children)) {
|
|
110
|
+
return react_1.cloneElement(children, {
|
|
111
|
+
ref,
|
|
112
|
+
...rest,
|
|
113
|
+
...children.props,
|
|
114
|
+
onClick: mergedOnClick,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return (react_1.default.createElement("button", Object.assign({ ref: ref, type: "button", onClick: mergedOnClick }, rest), children));
|
|
118
|
+
});
|
|
119
|
+
const ModalRoot = ({ children, isOpen, onClose, disableOutsideClick = true, disableEscClose = false, }) => {
|
|
98
120
|
const [isSelectOpen, setIsSelectOpen] = react_1.useState(false);
|
|
121
|
+
const [esc, setEsc] = react_1.useState(disableEscClose);
|
|
99
122
|
react_1.useEffect(() => {
|
|
100
123
|
setEsc(disableEscClose);
|
|
101
124
|
}, [disableEscClose]);
|
|
102
125
|
hooks_1.useKeyPress(types_1.KEY_CODE.ESC, () => {
|
|
103
|
-
if (!esc && onClose) {
|
|
104
|
-
onClose();
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
hooks_1.useOutsideClick(modalElement, () => {
|
|
108
|
-
if (!disableOutsideClick && onClose) {
|
|
126
|
+
if (!esc && onClose && isOpen) {
|
|
109
127
|
onClose();
|
|
110
128
|
}
|
|
111
129
|
});
|
|
130
|
+
const context = react_1.useMemo(() => {
|
|
131
|
+
return {
|
|
132
|
+
isOpen,
|
|
133
|
+
onClose,
|
|
134
|
+
isSelectOpen,
|
|
135
|
+
setIsSelectOpen,
|
|
136
|
+
disableOutsideClick,
|
|
137
|
+
};
|
|
138
|
+
}, [isOpen, onClose, isSelectOpen, disableOutsideClick]);
|
|
139
|
+
return (react_1.default.createElement(context_1.ModalContext.Provider, { value: context }, children));
|
|
140
|
+
};
|
|
141
|
+
exports.ModalRoot = ModalRoot;
|
|
142
|
+
const ModalPortal = ({ children }) => {
|
|
143
|
+
return react_1.default.createElement(Portal_1.Portal, null, children);
|
|
144
|
+
};
|
|
145
|
+
exports.ModalPortal = ModalPortal;
|
|
146
|
+
const ModalOverlay = ({ children, className, lockScroll = true, autoFocus = false, }) => {
|
|
147
|
+
const { isOpen } = context_1.useModalContext();
|
|
112
148
|
react_1.useEffect(() => {
|
|
113
149
|
if (isOpen) {
|
|
114
150
|
document.body.classList.add("modal-open");
|
|
@@ -118,29 +154,67 @@ const Modal = (props) => {
|
|
|
118
154
|
}
|
|
119
155
|
return () => document.body.classList.remove("modal-open");
|
|
120
156
|
}, [isOpen]);
|
|
121
|
-
return isOpen
|
|
122
|
-
react_1.default.createElement(
|
|
123
|
-
react_1.default.createElement(
|
|
124
|
-
react_1.default.createElement(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
157
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, isOpen && (react_1.default.createElement(Box_1.Box, { className: classnames_1.default(bem_1.bem(cn, { e: "overlay" }), className) },
|
|
158
|
+
react_1.default.createElement(react_focus_lock_1.default, { autoFocus: autoFocus, returnFocus: true },
|
|
159
|
+
react_1.default.createElement(react_remove_scroll_1.RemoveScroll, { enabled: lockScroll },
|
|
160
|
+
react_1.default.createElement(react_1.default.Fragment, null, children)))))));
|
|
161
|
+
};
|
|
162
|
+
exports.ModalOverlay = ModalOverlay;
|
|
163
|
+
const ModalContainer = ({ children, className, ...rest }) => {
|
|
164
|
+
return (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default(bem_1.bem(`${cn}Container`), className) }, rest), children));
|
|
165
|
+
};
|
|
166
|
+
exports.ModalContainer = ModalContainer;
|
|
167
|
+
exports.ModalContent = react_1.forwardRef(function ModalContent({ children, className, ...rest }, forwardedRef) {
|
|
168
|
+
const { onClose, disableOutsideClick } = context_1.useModalContext();
|
|
169
|
+
const modalElement = react_1.useRef(null);
|
|
170
|
+
hooks_1.useOutsideClick(modalElement, () => {
|
|
171
|
+
if (!disableOutsideClick && onClose) {
|
|
172
|
+
onClose();
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
const ref = react_1.useMemo(() => react_merge_refs_1.default([modalElement, forwardedRef]), [
|
|
176
|
+
modalElement,
|
|
177
|
+
forwardedRef,
|
|
178
|
+
]);
|
|
179
|
+
return (react_1.default.createElement(Box_1.Box, Object.assign({ ref: ref, className: classnames_1.default(bem_1.bem(cn, { e: "content" }), className) }, rest), children));
|
|
180
|
+
});
|
|
181
|
+
const ModalScreen = ({ className, style, ...rest }) => {
|
|
182
|
+
return (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default(bem_1.bem(cn, { e: "screen" }), className) }, rest)));
|
|
183
|
+
};
|
|
184
|
+
exports.ModalScreen = ModalScreen;
|
|
185
|
+
const Modal = (props) => {
|
|
186
|
+
const { title, secondaryTitle, description, children, isOpen, onClose, autoFocus = false, lockScroll = true, disableOutsideClick = true, disableEscClose = false, hideCloseButton = false, size = MODAL_SIZE.DEFAULT, center = false, noHeader = false, className, ...rest } = props;
|
|
187
|
+
const showHeader = title || secondaryTitle || !hideCloseButton;
|
|
188
|
+
return (react_1.default.createElement(exports.ModalRoot, { isOpen: isOpen, onClose: onClose, disableOutsideClick: disableOutsideClick, disableEscClose: disableEscClose },
|
|
189
|
+
react_1.default.createElement(exports.ModalPortal, null,
|
|
190
|
+
react_1.default.createElement(exports.ModalOverlay, { autoFocus: autoFocus, lockScroll: lockScroll },
|
|
191
|
+
react_1.default.createElement(exports.ModalContainer, null,
|
|
192
|
+
react_1.default.createElement(exports.ModalContent, Object.assign({ className: classnames_1.default([
|
|
193
|
+
bem_1.bem(cn),
|
|
194
|
+
bem_1.bem(cn, { m: size }),
|
|
195
|
+
center && bem_1.bem(cn, { m: "center" }),
|
|
196
|
+
className,
|
|
197
|
+
]) }, rest),
|
|
198
|
+
!noHeader && showHeader && (react_1.default.createElement(exports.ModalHeader, null,
|
|
199
|
+
title && react_1.default.createElement(Heading_1.Heading.H2, null, title),
|
|
200
|
+
react_1.default.createElement(Stack_1.Stack, { className: "flex-shrink-0", spacing: 5 },
|
|
201
|
+
secondaryTitle && (react_1.default.createElement(Heading_1.Heading.H5, { className: "text-gray-600" }, secondaryTitle)),
|
|
202
|
+
!hideCloseButton && react_1.default.createElement(exports.ModalCloseButton, null)))),
|
|
203
|
+
description && (react_1.default.createElement(Description_1.Description, { className: bem_1.bem(cn, { e: "description" }) }, description)),
|
|
204
|
+
children)),
|
|
205
|
+
react_1.default.createElement(exports.ModalScreen, null)))));
|
|
139
206
|
};
|
|
140
207
|
exports.Modal = Modal;
|
|
208
|
+
exports.Modal.Root = exports.ModalRoot;
|
|
209
|
+
exports.Modal.Portal = exports.ModalPortal;
|
|
210
|
+
exports.Modal.Overlay = exports.ModalOverlay;
|
|
211
|
+
exports.Modal.Container = exports.ModalContainer;
|
|
212
|
+
exports.Modal.Content = exports.ModalContent;
|
|
213
|
+
exports.Modal.Screen = exports.ModalScreen;
|
|
141
214
|
exports.Modal.Tabs = exports.ModalTabs;
|
|
142
215
|
exports.Modal.Header = exports.ModalHeader;
|
|
143
216
|
exports.Modal.Body = exports.ModalBody;
|
|
144
217
|
exports.Modal.Footer = exports.ModalFooter;
|
|
145
218
|
exports.Modal.FooterMultiStep = exports.ModalFooterMultiStep;
|
|
146
219
|
exports.Modal.CloseButton = exports.ModalCloseButton;
|
|
220
|
+
exports.Modal.Close = exports.ModalClose;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from "react";
|
|
2
2
|
export declare type ModalContextProps = {
|
|
3
|
+
isOpen?: boolean;
|
|
3
4
|
onClose?(): void;
|
|
4
5
|
isSelectOpen?: boolean;
|
|
5
6
|
setIsSelectOpen?: Dispatch<SetStateAction<boolean>>;
|
|
7
|
+
disableOutsideClick?: boolean;
|
|
6
8
|
};
|
|
7
9
|
export declare const ModalContext: import("react").Context<ModalContextProps | undefined>;
|
|
8
10
|
export declare function useModalContext(): ModalContextProps;
|
package/public/css/styles.css
CHANGED
|
@@ -4651,9 +4651,34 @@ override built-in Image component classes */
|
|
|
4651
4651
|
--modal-max-width: calc(100vw - 88px);
|
|
4652
4652
|
}
|
|
4653
4653
|
|
|
4654
|
-
.ads-
|
|
4654
|
+
.ads-Modal-overlay {
|
|
4655
4655
|
position: fixed;
|
|
4656
4656
|
top: 0;
|
|
4657
|
+
right: 0;
|
|
4658
|
+
bottom: 0;
|
|
4659
|
+
left: 0;
|
|
4660
|
+
z-index: 700;
|
|
4661
|
+
overflow: auto;
|
|
4662
|
+
}
|
|
4663
|
+
|
|
4664
|
+
.ads-Modal-screen {
|
|
4665
|
+
position: absolute;
|
|
4666
|
+
top: 0;
|
|
4667
|
+
right: 0;
|
|
4668
|
+
bottom: 0;
|
|
4669
|
+
left: 0;
|
|
4670
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
4671
|
+
|
|
4672
|
+
-webkit-backdrop-filter: blur(4px);
|
|
4673
|
+
|
|
4674
|
+
backdrop-filter: blur(4px);
|
|
4675
|
+
}
|
|
4676
|
+
|
|
4677
|
+
.ads-ModalContainer {
|
|
4678
|
+
position: absolute;
|
|
4679
|
+
top: 0;
|
|
4680
|
+
right: 0;
|
|
4681
|
+
bottom: 0;
|
|
4657
4682
|
left: 0;
|
|
4658
4683
|
z-index: 900;
|
|
4659
4684
|
display: flex;
|
|
@@ -4661,7 +4686,10 @@ override built-in Image component classes */
|
|
|
4661
4686
|
width: 100vw;
|
|
4662
4687
|
align-items: center;
|
|
4663
4688
|
justify-content: center;
|
|
4664
|
-
|
|
4689
|
+
}
|
|
4690
|
+
|
|
4691
|
+
.ads-Modal-content {
|
|
4692
|
+
z-index: 1;
|
|
4665
4693
|
}
|
|
4666
4694
|
|
|
4667
4695
|
.ads-Modal {
|
|
@@ -7987,6 +8015,13 @@ override built-in Image component classes */
|
|
|
7987
8015
|
position: sticky;
|
|
7988
8016
|
}
|
|
7989
8017
|
|
|
8018
|
+
.inset-0 {
|
|
8019
|
+
top: 0;
|
|
8020
|
+
right: 0;
|
|
8021
|
+
bottom: 0;
|
|
8022
|
+
left: 0;
|
|
8023
|
+
}
|
|
8024
|
+
|
|
7990
8025
|
.top-0 {
|
|
7991
8026
|
top: 0;
|
|
7992
8027
|
}
|
|
@@ -8315,6 +8350,10 @@ override built-in Image component classes */
|
|
|
8315
8350
|
width: 48px;
|
|
8316
8351
|
}
|
|
8317
8352
|
|
|
8353
|
+
.w-2\/5 {
|
|
8354
|
+
width: 40%;
|
|
8355
|
+
}
|
|
8356
|
+
|
|
8318
8357
|
.w-40 {
|
|
8319
8358
|
width: 160px;
|
|
8320
8359
|
}
|