@spothero/ui 25.12.0 → 25.15.0-beta.1
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/Button/Button.styles.d.ts +46 -0
- package/dist/components/Modal/AlwaysMountedModal.d.ts +7 -0
- package/dist/components/Modal/Modal.d.ts +17 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/styles/body.d.ts +3 -6
- package/dist/components/Modal/styles/closeButton.d.ts +3 -4
- package/dist/components/Modal/styles/dialog.d.ts +3 -4
- package/dist/components/Modal/styles/dialogContainer.d.ts +12 -12
- package/dist/components/Modal/styles/footer.d.ts +12 -12
- package/dist/components/Modal/styles/header.d.ts +4 -6
- package/dist/components/Modal/styles/index.d.ts +4 -240
- package/dist/components/Modal/styles/overlay.d.ts +5 -5
- package/dist/components/Modal/types.d.ts +6 -0
- package/dist/components/Popover/Popover.d.ts +10 -0
- package/dist/components/Popover/PopoverArrow.d.ts +7 -0
- package/dist/components/Popover/PopoverCloseButton.d.ts +7 -0
- package/dist/components/Popover/PopoverContent.d.ts +15 -0
- package/dist/components/Popover/index.d.ts +4 -0
- package/dist/components/Popover/styles/index.d.ts +4 -100
- package/dist/components/Popover/styles/popover-arrow.d.ts +5 -0
- package/dist/components/Popover/styles/popover-body.d.ts +3 -2
- package/dist/components/Popover/styles/popover-close-button.d.ts +18 -0
- package/dist/components/Popover/styles/popover-content.d.ts +8 -5
- package/dist/components/Popover/styles/popover-header.d.ts +4 -4
- package/dist/components/Popover/styles/popper.d.ts +3 -3
- package/dist/components/Popover/types.d.ts +4 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +17 -0
- package/dist/index.cjs.js +386 -541
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +75 -11
- package/dist/index.esm.js +387 -542
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/Spaces.d.ts +8 -0
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React__default, { forwardRef, useState, useEffect, Children, cloneElement } from 'react';
|
|
3
|
-
import { Modal as Modal$1, ModalOverlay, ModalContent, Box, ModalCloseButton, keyframes, theme as theme$2, Button as Button$2, Drawer as Drawer$1, DrawerOverlay, DrawerContent, DrawerHeader, DrawerCloseButton, Alert as Alert$1, Icon, AlertTitle, AlertDescription, forwardRef as forwardRef$1, Tabs as Tabs$1, FormControl as FormControl$2, FormLabel, Text as Text$1, FormHelperText, FormErrorMessage, Select as Select$2, Switch as Switch$1, Grid as Grid$1, GridItem as GridItem$1, List as List$1, Spinner as Spinner$1, Heading as Heading$1, Container as Container$1, createMultiStyleConfigHelpers, extendTheme, ChakraProvider, Img, Image as Image$1, CircularProgress, Progress as Progress$1, Checkbox as Checkbox$1, Input as Input$2, InputGroup, InputLeftElement, InputRightElement, useTheme, Radio as Radio$1, RadioGroup as RadioGroup$1, Stack, usePrefersReducedMotion, Divider as Divider$1, Textarea as Textarea$1, Popover as Popover$1, PopoverArrow as PopoverArrow$1, PopoverCloseButton as PopoverCloseButton$1, PopoverContent as PopoverContent$1, PopoverHeader, PopoverBody, ButtonGroup, Menu as Menu$1 } from '@chakra-ui/react';
|
|
1
|
+
import { ModalOverlay, ModalContent, Box, ModalCloseButton, Modal as Modal$1, keyframes, theme as theme$2, Button as Button$2, Drawer as Drawer$1, DrawerOverlay, DrawerContent, DrawerHeader, DrawerCloseButton, Alert as Alert$1, Icon, AlertTitle, AlertDescription, forwardRef as forwardRef$1, Tabs as Tabs$1, FormControl as FormControl$2, FormLabel, Text as Text$1, FormHelperText, FormErrorMessage, Select as Select$2, Switch as Switch$1, Grid as Grid$1, GridItem as GridItem$1, List as List$1, Spinner as Spinner$1, Heading as Heading$1, Container as Container$1, createMultiStyleConfigHelpers, extendTheme, ChakraProvider, Img, Image as Image$1, CircularProgress, Progress as Progress$1, Checkbox as Checkbox$1, Input as Input$2, InputGroup, InputLeftElement, InputRightElement, useTheme, Radio as Radio$1, RadioGroup as RadioGroup$1, Stack, usePrefersReducedMotion, Divider as Divider$1, Textarea as Textarea$1, Popover as Popover$1, PopoverArrow as PopoverArrow$1, PopoverCloseButton as PopoverCloseButton$1, PopoverContent as PopoverContent$1, PopoverHeader, PopoverBody, ButtonGroup, Menu as Menu$1 } from '@chakra-ui/react';
|
|
4
2
|
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AspectRatio, Badge, Input as BasicInput, Textarea as BasicTextarea, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, ButtonGroup, Center, CheckboxGroup, Circle, Code, Collapse, DrawerBody, DrawerCloseButton, Drawer as DrawerContainer, DrawerContent, DrawerFooter, DrawerHeader, DrawerOverlay, Fade, Flex, HStack, Icon, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Kbd, Link, LinkBox, LinkOverlay, ListItem, MenuButton, MenuDivider, MenuGroup, MenuItem, MenuItemOption, MenuList, MenuOptionGroup, ModalBody, ModalFooter, ModalHeader, PopoverAnchor, PopoverTrigger, Portal, ScaleFade, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, Slide, SlideFade, Square, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, TableContainer, Tbody, Td, Tfoot, Th, Thead, Tooltip, Tr, VStack, createIcon, extendTheme, keyframes, useBreakpointValue, useClipboard, useControllableProp, useControllableState, useDisclosure, useMediaQuery, usePopper, usePrefersReducedMotion, useStyleConfig, useTheme, useToast, useToken } from '@chakra-ui/react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import React__default, { forwardRef, useState, useRef, useEffect, Children, isValidElement, cloneElement } from 'react';
|
|
5
|
+
import { motion, AnimatePresence } from 'framer-motion';
|
|
5
6
|
import merge from 'lodash/merge';
|
|
6
7
|
import PropTypes from 'prop-types';
|
|
7
8
|
import cn from 'classnames';
|
|
@@ -9,252 +10,9 @@ import { Global } from '@emotion/react';
|
|
|
9
10
|
import { accordionAnatomy, selectAnatomy } from '@chakra-ui/anatomy';
|
|
10
11
|
import template from 'lodash/template';
|
|
11
12
|
import AsyncSelect from 'react-select/async';
|
|
12
|
-
import { motion, AnimatePresence } from 'framer-motion';
|
|
13
13
|
import Select$3, { components as components$1 } from 'react-select';
|
|
14
14
|
import Creatable from 'react-select/creatable';
|
|
15
15
|
|
|
16
|
-
function _defineProperty(e, r, t) {
|
|
17
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
18
|
-
value: t,
|
|
19
|
-
enumerable: !0,
|
|
20
|
-
configurable: !0,
|
|
21
|
-
writable: !0
|
|
22
|
-
}) : e[r] = t, e;
|
|
23
|
-
}
|
|
24
|
-
function _extends$6() {
|
|
25
|
-
return _extends$6 = Object.assign ? Object.assign.bind() : function (n) {
|
|
26
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
27
|
-
var t = arguments[e];
|
|
28
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
29
|
-
}
|
|
30
|
-
return n;
|
|
31
|
-
}, _extends$6.apply(null, arguments);
|
|
32
|
-
}
|
|
33
|
-
function ownKeys(e, r) {
|
|
34
|
-
var t = Object.keys(e);
|
|
35
|
-
if (Object.getOwnPropertySymbols) {
|
|
36
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
37
|
-
r && (o = o.filter(function (r) {
|
|
38
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
39
|
-
})), t.push.apply(t, o);
|
|
40
|
-
}
|
|
41
|
-
return t;
|
|
42
|
-
}
|
|
43
|
-
function _objectSpread2(e) {
|
|
44
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
45
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
46
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
47
|
-
_defineProperty(e, r, t[r]);
|
|
48
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
49
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
return e;
|
|
53
|
-
}
|
|
54
|
-
function _objectWithoutProperties(e, t) {
|
|
55
|
-
if (null == e) return {};
|
|
56
|
-
var o,
|
|
57
|
-
r,
|
|
58
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
59
|
-
if (Object.getOwnPropertySymbols) {
|
|
60
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
61
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
62
|
-
}
|
|
63
|
-
return i;
|
|
64
|
-
}
|
|
65
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
66
|
-
if (null == r) return {};
|
|
67
|
-
var t = {};
|
|
68
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
69
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
70
|
-
t[n] = r[n];
|
|
71
|
-
}
|
|
72
|
-
return t;
|
|
73
|
-
}
|
|
74
|
-
function _taggedTemplateLiteral(e, t) {
|
|
75
|
-
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
76
|
-
raw: {
|
|
77
|
-
value: Object.freeze(t)
|
|
78
|
-
}
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
function _toPrimitive(t, r) {
|
|
82
|
-
if ("object" != typeof t || !t) return t;
|
|
83
|
-
var e = t[Symbol.toPrimitive];
|
|
84
|
-
if (void 0 !== e) {
|
|
85
|
-
var i = e.call(t, r || "default");
|
|
86
|
-
if ("object" != typeof i) return i;
|
|
87
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
88
|
-
}
|
|
89
|
-
return ("string" === r ? String : Number)(t);
|
|
90
|
-
}
|
|
91
|
-
function _toPropertyKey(t) {
|
|
92
|
-
var i = _toPrimitive(t, "string");
|
|
93
|
-
return "symbol" == typeof i ? i : i + "";
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
var header$1 = _ref => {
|
|
97
|
-
let {
|
|
98
|
-
hideCloseButton,
|
|
99
|
-
hasHeader
|
|
100
|
-
} = _ref;
|
|
101
|
-
return {
|
|
102
|
-
padding: !hideCloseButton || hasHeader ? 4 : 2,
|
|
103
|
-
fontSize: 'xl',
|
|
104
|
-
fontWeight: 'semibold',
|
|
105
|
-
// If just close button, still have 'header' section at top
|
|
106
|
-
minHeight: hasHeader || hideCloseButton ? null : 12
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @param {boolean} isMobile - Whether or not the Modal is opened in a mobile viewport
|
|
112
|
-
* @param {boolean} isOpen - Whether or not the Modal is open
|
|
113
|
-
* @param {React.ReactNode} children - The header text of the modal
|
|
114
|
-
* @param {()=>void} [onClose] - Callback invoked to close the Modal. Not required, but strongly suggested.
|
|
115
|
-
* @param {('sm'|'sm-md'|'md'|'lg')} [size] - The size of the modal. If unspecified, uses "md" styles.
|
|
116
|
-
* @param {object} [contentStyling] - Style props to be passed into the modal content
|
|
117
|
-
* @param {object} [overlayProps] - Props to be passed into the ModalOverlay component. See: https://github.com/chakra-ui/chakra-ui/blob/main/packages/components/modal/src/modal-overlay.tsx
|
|
118
|
-
* @param {boolean} [hasHeader] - Whether or not ModalHeader is a child. Will change the styling
|
|
119
|
-
* @param {boolean} [hasFooter] - Whether or not ModalFooter is a child. Will change the styling
|
|
120
|
-
* @param {React.ReactNode} [hideCloseButton] - Whether or not to show the close button
|
|
121
|
-
* @returns {React.ReactElement} - The Modal component
|
|
122
|
-
*/
|
|
123
|
-
const Modal = /*#__PURE__*/forwardRef((props, ref) => {
|
|
124
|
-
const {
|
|
125
|
-
children,
|
|
126
|
-
hideCloseButton,
|
|
127
|
-
hasHeader,
|
|
128
|
-
isMobile = false,
|
|
129
|
-
contentStyling = {},
|
|
130
|
-
overlayProps = {}
|
|
131
|
-
} = props;
|
|
132
|
-
return /*#__PURE__*/React__default.createElement(Modal$1, _extends$6({
|
|
133
|
-
motionPreset: isMobile ? 'slideInBottom' : 'scale'
|
|
134
|
-
}, props, {
|
|
135
|
-
ref: ref
|
|
136
|
-
}), /*#__PURE__*/React__default.createElement(ModalOverlay, overlayProps), /*#__PURE__*/React__default.createElement(ModalContent, _extends$6({
|
|
137
|
-
"data-testid": "ModalContent"
|
|
138
|
-
}, contentStyling), !hasHeader ? /*#__PURE__*/React__default.createElement(Box, header$1(props)) : null, hideCloseButton ? null : /*#__PURE__*/React__default.createElement(ModalCloseButton, {
|
|
139
|
-
"data-testid": "ModalClose-button"
|
|
140
|
-
}), children));
|
|
141
|
-
});
|
|
142
|
-
Modal.propTypes = {
|
|
143
|
-
/** Whether or not the Modal is opened in a mobile viewport */
|
|
144
|
-
isMobile: PropTypes.bool,
|
|
145
|
-
/** Whether or not the Modal is open */
|
|
146
|
-
isOpen: PropTypes.bool.isRequired,
|
|
147
|
-
/** React children. Body of the Modal. */
|
|
148
|
-
children: PropTypes.node.isRequired,
|
|
149
|
-
/** Whether or not ModalHeader is a child. Will change the styling */
|
|
150
|
-
hasHeader: PropTypes.bool.isRequired,
|
|
151
|
-
/** Whether or not ModalFooter is a child. Will change the styling */
|
|
152
|
-
hasFooter: PropTypes.bool.isRequired,
|
|
153
|
-
/** Callback invoked to close the Modal. Not required, but strongly suggested. */
|
|
154
|
-
onClose: PropTypes.func,
|
|
155
|
-
/** The size of the modal. If unspecified, uses md styles. */
|
|
156
|
-
size: PropTypes.oneOf(['sm', 'sm-md', 'md', 'lg']),
|
|
157
|
-
/** Whether or not to show the close button (optional) */
|
|
158
|
-
hideCloseButton: PropTypes.bool,
|
|
159
|
-
/** Objects containing css-in-js styling*/
|
|
160
|
-
contentStyling: PropTypes.object,
|
|
161
|
-
/** Objects containing props to apply to ModalOverlay component */
|
|
162
|
-
overlayProps: PropTypes.object
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
166
|
-
const fadeIn = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { opacity: 0%; }\n 100% { opacity: 100%; }\n\n"])));
|
|
167
|
-
const fadeOut = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% { opacity: 100%; }\n 100% { opacity: 0% }\n"])));
|
|
168
|
-
const fadeInAndEnlarge = keyframes(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% { opacity: 0%; transform: scale(0.9);}\n 100% { opacity: 100%; transform: scale(1);}\n"])));
|
|
169
|
-
const fadeOutAndShrink = keyframes(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% { opacity: 100%; transform: scale(1); }\n 100% { opacity: 0%; transform: scale(0.9); }\n"])));
|
|
170
|
-
const fadeInAndSlideUp = keyframes(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n 0% { opacity: 0%; transform: translateY(2rem) scale(1);}\n 100% { opacity: 100%; transform: translateY(0) scale(1);}\n"])));
|
|
171
|
-
const fadeOutAndSlideDown = keyframes(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n 0% { opacity: 100%; transform: translateY(0) scale(1); }\n 100% { opacity: 0%; transform: translateY(2rem) scale(1); }\n"])));
|
|
172
|
-
|
|
173
|
-
// This is a modified version of our Modal that will always be mounted, even when it is closed.
|
|
174
|
-
// We need this for things like Stripe where payment Elements need to be mounted to get a token on checkout
|
|
175
|
-
/**
|
|
176
|
-
* @param {boolean} isMobile - Whether or not the Modal is opened in a mobile viewport
|
|
177
|
-
* @param {boolean} isOpen - Whether or not the Modal is open
|
|
178
|
-
* @param {React.ReactNode} children - The header text of the modal
|
|
179
|
-
* @param {()=>void} [onClose] - Callback invoked to close the Modal. Not required, but strongly suggested.
|
|
180
|
-
* @param {('sm'|'sm-md'|'md'|'lg')} [size] - The size of the modal. If unspecified, uses "md" styles.
|
|
181
|
-
* @param {object} [contentStyling] - Style props to be passed into the modal content
|
|
182
|
-
* @param {object} [overlayProps] - Props to be passed into the ModalOverlay component. See: https://github.com/chakra-ui/chakra-ui/blob/main/packages/components/modal/src/modal-overlay.tsx
|
|
183
|
-
* @param {boolean} [hasHeader] - Whether or not ModalHeader is a child. Will change the styling
|
|
184
|
-
* @param {boolean} [hasFooter] - Whether or not ModalFooter is a child. Will change the styling
|
|
185
|
-
* @param {React.ReactNode} [hideCloseButton] - Whether or not to show the close button
|
|
186
|
-
* @returns {React.ReactElement} - The Modal component
|
|
187
|
-
*/
|
|
188
|
-
const AlwaysMountedModal = /*#__PURE__*/forwardRef((props, ref) => {
|
|
189
|
-
const {
|
|
190
|
-
children,
|
|
191
|
-
hideCloseButton,
|
|
192
|
-
onCloseComplete,
|
|
193
|
-
hasHeader,
|
|
194
|
-
isOpen,
|
|
195
|
-
isMobile = false,
|
|
196
|
-
contentStyling = {},
|
|
197
|
-
overlayProps = {}
|
|
198
|
-
} = props;
|
|
199
|
-
const [internalOpen, setInternalOpen] = useState(isOpen);
|
|
200
|
-
useEffect(() => {
|
|
201
|
-
if (!isOpen) {
|
|
202
|
-
setTimeout(() => {
|
|
203
|
-
setInternalOpen(false);
|
|
204
|
-
onCloseComplete();
|
|
205
|
-
// Want this to be a bit shorter than fade out animation
|
|
206
|
-
}, 175);
|
|
207
|
-
} else {
|
|
208
|
-
setInternalOpen(true);
|
|
209
|
-
}
|
|
210
|
-
}, [isOpen]);
|
|
211
|
-
const fadeInAnimation = isMobile ? fadeInAndSlideUp : fadeInAndEnlarge;
|
|
212
|
-
const fadeOutAnimation = isMobile ? fadeOutAndSlideDown : fadeOutAndShrink;
|
|
213
|
-
return /*#__PURE__*/React__default.createElement(Modal$1, _extends$6({
|
|
214
|
-
motionPreset: isMobile ? 'slideInBottom' : 'scale'
|
|
215
|
-
}, props, {
|
|
216
|
-
blockScrollOnMount: isOpen,
|
|
217
|
-
isOpen: true,
|
|
218
|
-
ref: ref
|
|
219
|
-
}), /*#__PURE__*/React__default.createElement(Box, {
|
|
220
|
-
visibility: internalOpen ? 'visible' : 'hidden',
|
|
221
|
-
animation: "".concat(isOpen ? fadeIn : fadeOut, " 0.2s ease-in-out"),
|
|
222
|
-
zIndex: 3,
|
|
223
|
-
as: motion.div,
|
|
224
|
-
position: "relative"
|
|
225
|
-
}, /*#__PURE__*/React__default.createElement(ModalOverlay, overlayProps)), /*#__PURE__*/React__default.createElement(Box, {
|
|
226
|
-
visibility: internalOpen ? 'visible' : 'hidden',
|
|
227
|
-
animation: "".concat(isOpen ? fadeIn : fadeOut, " 0.2s ease-in-out"),
|
|
228
|
-
zIndex: 4,
|
|
229
|
-
as: motion.div,
|
|
230
|
-
position: "relative"
|
|
231
|
-
}, /*#__PURE__*/React__default.createElement(ModalContent, _extends$6({}, contentStyling, {
|
|
232
|
-
animation: "".concat(isOpen ? fadeInAnimation : fadeOutAnimation, " 0.2s ease-in-out")
|
|
233
|
-
}), !hasHeader ? /*#__PURE__*/React__default.createElement(Box, header$1(props)) : null, hideCloseButton ? null : /*#__PURE__*/React__default.createElement(ModalCloseButton, null), children)));
|
|
234
|
-
});
|
|
235
|
-
AlwaysMountedModal.propTypes = {
|
|
236
|
-
/** Whether or not the Modal is opened in a mobile viewport */
|
|
237
|
-
isMobile: PropTypes.bool,
|
|
238
|
-
/** Whether or not the Modal is open */
|
|
239
|
-
isOpen: PropTypes.bool.isRequired,
|
|
240
|
-
/** React children. Body of the Modal. */
|
|
241
|
-
children: PropTypes.node.isRequired,
|
|
242
|
-
/** Whether or not ModalHeader is a child. Will change the styling */
|
|
243
|
-
hasHeader: PropTypes.bool.isRequired,
|
|
244
|
-
/** Whether or not ModalFooter is a child. Will change the styling */
|
|
245
|
-
hasFooter: PropTypes.bool.isRequired,
|
|
246
|
-
/** Callback invoked to close the Modal. Not required, but strongly suggested. */
|
|
247
|
-
onClose: PropTypes.func,
|
|
248
|
-
/** The size of the modal. If unspecified, uses md styles. */
|
|
249
|
-
size: PropTypes.oneOf(['sm', 'sm-md', 'md', 'lg']),
|
|
250
|
-
/** Whether or not to show the close button (optional) */
|
|
251
|
-
hideCloseButton: PropTypes.bool,
|
|
252
|
-
/** Objects containing css-in-js styling*/
|
|
253
|
-
contentStyling: PropTypes.object,
|
|
254
|
-
/** Objects containing props to apply to ModalOverlay component */
|
|
255
|
-
overlayProps: PropTypes.object
|
|
256
|
-
};
|
|
257
|
-
|
|
258
16
|
var jsxRuntime = {exports: {}};
|
|
259
17
|
|
|
260
18
|
var reactJsxRuntime_production_min = {};
|
|
@@ -1451,6 +1209,80 @@ function requireJsxRuntime() {
|
|
|
1451
1209
|
|
|
1452
1210
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
1453
1211
|
|
|
1212
|
+
const header$1 = ({ hideCloseButton, hasHeader }) => ({
|
|
1213
|
+
padding: !hideCloseButton || hasHeader ? 4 : 2,
|
|
1214
|
+
fontSize: 'xl',
|
|
1215
|
+
fontWeight: 'semibold',
|
|
1216
|
+
// If just close button, still have 'header' section at top
|
|
1217
|
+
minHeight: hasHeader || hideCloseButton ? undefined : 12,
|
|
1218
|
+
});
|
|
1219
|
+
|
|
1220
|
+
const ChakraModalWithRef$1 = Modal$1;
|
|
1221
|
+
const Modal = forwardRef(({ children, isMobile = false, contentStyling = {}, overlayProps = {}, ...props }, ref) => {
|
|
1222
|
+
const { hasHeader, hideCloseButton } = props;
|
|
1223
|
+
return (jsxRuntimeExports.jsxs(ChakraModalWithRef$1, { motionPreset: isMobile ? 'slideInBottom' : 'scale', ...props, ref: ref, children: [jsxRuntimeExports.jsx(ModalOverlay, { ...overlayProps }), jsxRuntimeExports.jsxs(ModalContent, { "data-testid": "ModalContent", ...contentStyling, children: [!hasHeader ? (jsxRuntimeExports.jsx(Box, { ...header$1({
|
|
1224
|
+
hasHeader,
|
|
1225
|
+
hideCloseButton,
|
|
1226
|
+
}) })) : null, hideCloseButton ? null : (jsxRuntimeExports.jsx(ModalCloseButton, { "data-testid": "ModalClose-button" })), children] })] }));
|
|
1227
|
+
});
|
|
1228
|
+
Modal.displayName = 'Modal';
|
|
1229
|
+
|
|
1230
|
+
const ChakraModalWithRef = Modal$1;
|
|
1231
|
+
const fadeIn = keyframes `
|
|
1232
|
+
0% { opacity: 0%; }
|
|
1233
|
+
100% { opacity: 100%; }
|
|
1234
|
+
|
|
1235
|
+
`;
|
|
1236
|
+
const fadeOut = keyframes `
|
|
1237
|
+
0% { opacity: 100%; }
|
|
1238
|
+
100% { opacity: 0% }
|
|
1239
|
+
`;
|
|
1240
|
+
const fadeInAndEnlarge = keyframes `
|
|
1241
|
+
0% { opacity: 0%; transform: scale(0.9);}
|
|
1242
|
+
100% { opacity: 100%; transform: scale(1);}
|
|
1243
|
+
`;
|
|
1244
|
+
const fadeOutAndShrink = keyframes `
|
|
1245
|
+
0% { opacity: 100%; transform: scale(1); }
|
|
1246
|
+
100% { opacity: 0%; transform: scale(0.9); }
|
|
1247
|
+
`;
|
|
1248
|
+
const fadeInAndSlideUp = keyframes `
|
|
1249
|
+
0% { opacity: 0%; transform: translateY(2rem) scale(1);}
|
|
1250
|
+
100% { opacity: 100%; transform: translateY(0) scale(1);}
|
|
1251
|
+
`;
|
|
1252
|
+
const fadeOutAndSlideDown = keyframes `
|
|
1253
|
+
0% { opacity: 100%; transform: translateY(0) scale(1); }
|
|
1254
|
+
100% { opacity: 0%; transform: translateY(2rem) scale(1); }
|
|
1255
|
+
`;
|
|
1256
|
+
const AlwaysMountedModal = forwardRef(({ children, onCloseComplete, isOpen, isMobile = false, contentStyling = {}, overlayProps = {}, ...props }, ref) => {
|
|
1257
|
+
const { hasHeader, hideCloseButton } = props;
|
|
1258
|
+
const [internalOpen, setInternalOpen] = useState(isOpen);
|
|
1259
|
+
const onCloseCompleteRef = useRef(onCloseComplete);
|
|
1260
|
+
useEffect(() => {
|
|
1261
|
+
onCloseCompleteRef.current = onCloseComplete;
|
|
1262
|
+
});
|
|
1263
|
+
useEffect(() => {
|
|
1264
|
+
if (!isOpen) {
|
|
1265
|
+
const timeoutId = setTimeout(() => {
|
|
1266
|
+
setInternalOpen(false);
|
|
1267
|
+
onCloseCompleteRef.current?.();
|
|
1268
|
+
// Want this to be a bit shorter than fade out animation
|
|
1269
|
+
}, 175);
|
|
1270
|
+
return () => clearTimeout(timeoutId);
|
|
1271
|
+
}
|
|
1272
|
+
setInternalOpen(true);
|
|
1273
|
+
return undefined;
|
|
1274
|
+
}, [isOpen]);
|
|
1275
|
+
const fadeInAnimation = isMobile ? fadeInAndSlideUp : fadeInAndEnlarge;
|
|
1276
|
+
const fadeOutAnimation = isMobile
|
|
1277
|
+
? fadeOutAndSlideDown
|
|
1278
|
+
: fadeOutAndShrink;
|
|
1279
|
+
return (jsxRuntimeExports.jsxs(ChakraModalWithRef, { motionPreset: isMobile ? 'slideInBottom' : 'scale', ...props, blockScrollOnMount: isOpen, isOpen: true, ref: ref, children: [jsxRuntimeExports.jsx(Box, { visibility: internalOpen ? 'visible' : 'hidden', animation: `${isOpen ? fadeIn : fadeOut} 0.2s ease-in-out`, zIndex: 3, as: motion.div, position: "relative", children: jsxRuntimeExports.jsx(ModalOverlay, { ...overlayProps }) }), jsxRuntimeExports.jsx(Box, { visibility: internalOpen ? 'visible' : 'hidden', animation: `${isOpen ? fadeIn : fadeOut} 0.2s ease-in-out`, zIndex: 4, as: motion.div, position: "relative", children: jsxRuntimeExports.jsxs(ModalContent, { ...contentStyling, animation: `${isOpen ? fadeInAnimation : fadeOutAnimation} 0.2s ease-in-out`, children: [!hasHeader ? (jsxRuntimeExports.jsx(Box, { ...header$1({
|
|
1280
|
+
hasHeader,
|
|
1281
|
+
hideCloseButton,
|
|
1282
|
+
}) })) : null, hideCloseButton ? null : jsxRuntimeExports.jsx(ModalCloseButton, {}), children] }) })] }));
|
|
1283
|
+
});
|
|
1284
|
+
AlwaysMountedModal.displayName = 'AlwaysMountedModal';
|
|
1285
|
+
|
|
1454
1286
|
const container = {
|
|
1455
1287
|
base: '100%', // 640px
|
|
1456
1288
|
tablet: '45rem', // 720px
|
|
@@ -2177,6 +2009,22 @@ const variants$c = {
|
|
|
2177
2009
|
bg: activeSecondaryColor,
|
|
2178
2010
|
},
|
|
2179
2011
|
},
|
|
2012
|
+
iconSecondary: {
|
|
2013
|
+
bg: 'white',
|
|
2014
|
+
borderColor: 'gray.medium',
|
|
2015
|
+
color: 'black',
|
|
2016
|
+
minW: 'unset',
|
|
2017
|
+
px: 3,
|
|
2018
|
+
py: 3,
|
|
2019
|
+
_hover: {
|
|
2020
|
+
bg: hoverSecondaryColor,
|
|
2021
|
+
color: 'black',
|
|
2022
|
+
...disabledButtonHoverStyle,
|
|
2023
|
+
},
|
|
2024
|
+
_active: {
|
|
2025
|
+
bg: activeSecondaryColor,
|
|
2026
|
+
},
|
|
2027
|
+
},
|
|
2180
2028
|
secondaryOnDark: {
|
|
2181
2029
|
bg: 'none',
|
|
2182
2030
|
borderColor: 'white',
|
|
@@ -2215,6 +2063,32 @@ const variants$c = {
|
|
|
2215
2063
|
},
|
|
2216
2064
|
},
|
|
2217
2065
|
},
|
|
2066
|
+
iconTertiary: {
|
|
2067
|
+
bg: 'none',
|
|
2068
|
+
borderWidth: 'none',
|
|
2069
|
+
borderRadius: 'unset',
|
|
2070
|
+
color: 'black',
|
|
2071
|
+
h: 'unset',
|
|
2072
|
+
m: 'unset',
|
|
2073
|
+
minW: 'unset',
|
|
2074
|
+
px: 2,
|
|
2075
|
+
py: 2,
|
|
2076
|
+
lineHeight: 1,
|
|
2077
|
+
_disabled: {
|
|
2078
|
+
bg: 'none',
|
|
2079
|
+
color: 'gray.dark',
|
|
2080
|
+
},
|
|
2081
|
+
_hover: {
|
|
2082
|
+
_disabled: {
|
|
2083
|
+
color: 'gray.dark',
|
|
2084
|
+
},
|
|
2085
|
+
},
|
|
2086
|
+
_active: {
|
|
2087
|
+
_disabled: {
|
|
2088
|
+
color: 'gray.dark',
|
|
2089
|
+
},
|
|
2090
|
+
},
|
|
2091
|
+
},
|
|
2218
2092
|
tertiaryOnDark: {
|
|
2219
2093
|
bg: 'none',
|
|
2220
2094
|
borderRadius: 'unset',
|
|
@@ -2298,7 +2172,7 @@ const anchorProps = (isExternal = false) => ({
|
|
|
2298
2172
|
rel: 'noopener noreferrer',
|
|
2299
2173
|
}),
|
|
2300
2174
|
});
|
|
2301
|
-
const Button$1 = forwardRef(({ asAnchor, isExternal, height = 'md', type = 'button', variant = 'primary', ...props }, ref) => (jsxRuntimeExports.jsx(Button$2, { iconSpacing: 2, type: type, variant: variant, ...props, ...heightProps(height), ...((asAnchor || props.as === 'a') && anchorProps(isExternal)), ref: ref })));
|
|
2175
|
+
const Button$1 = forwardRef(({ asAnchor, isExternal, height = 'md', type = 'button', variant = 'primary', ...props }, ref) => (jsxRuntimeExports.jsx(Button$2, { iconSpacing: variant === 'iconSecondary' || variant === 'iconTertiary' ? 0 : 2, type: type, variant: variant, ...props, ...heightProps(height), ...((asAnchor || props.as === 'a') && anchorProps(isExternal)), ref: ref })));
|
|
2302
2176
|
Button$1.displayName = 'Button';
|
|
2303
2177
|
|
|
2304
2178
|
const Drawer = ({ header, drawerCloseButton, children, headerProps, ...props }) => {
|
|
@@ -2330,17 +2204,17 @@ AccordionActionButton.propTypes = {
|
|
|
2330
2204
|
};
|
|
2331
2205
|
|
|
2332
2206
|
var _path$5;
|
|
2333
|
-
function _extends$
|
|
2334
|
-
return _extends$
|
|
2207
|
+
function _extends$6() {
|
|
2208
|
+
return _extends$6 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2335
2209
|
for (var e = 1; e < arguments.length; e++) {
|
|
2336
2210
|
var t = arguments[e];
|
|
2337
2211
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2338
2212
|
}
|
|
2339
2213
|
return n;
|
|
2340
|
-
}, _extends$
|
|
2214
|
+
}, _extends$6.apply(null, arguments);
|
|
2341
2215
|
}
|
|
2342
2216
|
var SvgX = function SvgX(props, ref) {
|
|
2343
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
2217
|
+
return /*#__PURE__*/React.createElement("svg", _extends$6({}, props, {
|
|
2344
2218
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2345
2219
|
fill: "currentColor",
|
|
2346
2220
|
viewBox: "0 0 24 24",
|
|
@@ -2354,17 +2228,17 @@ var SvgX = function SvgX(props, ref) {
|
|
|
2354
2228
|
var ForwardRef$5 = /*#__PURE__*/forwardRef(SvgX);
|
|
2355
2229
|
|
|
2356
2230
|
var _path$4;
|
|
2357
|
-
function _extends$
|
|
2358
|
-
return _extends$
|
|
2231
|
+
function _extends$5() {
|
|
2232
|
+
return _extends$5 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2359
2233
|
for (var e = 1; e < arguments.length; e++) {
|
|
2360
2234
|
var t = arguments[e];
|
|
2361
2235
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2362
2236
|
}
|
|
2363
2237
|
return n;
|
|
2364
|
-
}, _extends$
|
|
2238
|
+
}, _extends$5.apply(null, arguments);
|
|
2365
2239
|
}
|
|
2366
2240
|
var SvgInfoCircleFilled = function SvgInfoCircleFilled(props, ref) {
|
|
2367
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
2241
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({}, props, {
|
|
2368
2242
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2369
2243
|
fill: "currentColor",
|
|
2370
2244
|
viewBox: "0 0 24 24",
|
|
@@ -2378,17 +2252,17 @@ var SvgInfoCircleFilled = function SvgInfoCircleFilled(props, ref) {
|
|
|
2378
2252
|
var ForwardRef$4 = /*#__PURE__*/forwardRef(SvgInfoCircleFilled);
|
|
2379
2253
|
|
|
2380
2254
|
var _path$3;
|
|
2381
|
-
function _extends$
|
|
2382
|
-
return _extends$
|
|
2255
|
+
function _extends$4() {
|
|
2256
|
+
return _extends$4 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2383
2257
|
for (var e = 1; e < arguments.length; e++) {
|
|
2384
2258
|
var t = arguments[e];
|
|
2385
2259
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2386
2260
|
}
|
|
2387
2261
|
return n;
|
|
2388
|
-
}, _extends$
|
|
2262
|
+
}, _extends$4.apply(null, arguments);
|
|
2389
2263
|
}
|
|
2390
2264
|
var SvgExclamationTriangleFilled = function SvgExclamationTriangleFilled(props, ref) {
|
|
2391
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
2265
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({}, props, {
|
|
2392
2266
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2393
2267
|
fill: "currentColor",
|
|
2394
2268
|
viewBox: "0 0 24 24",
|
|
@@ -2402,17 +2276,17 @@ var SvgExclamationTriangleFilled = function SvgExclamationTriangleFilled(props,
|
|
|
2402
2276
|
var ForwardRef$3 = /*#__PURE__*/forwardRef(SvgExclamationTriangleFilled);
|
|
2403
2277
|
|
|
2404
2278
|
var _path$2;
|
|
2405
|
-
function _extends$
|
|
2406
|
-
return _extends$
|
|
2279
|
+
function _extends$3() {
|
|
2280
|
+
return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2407
2281
|
for (var e = 1; e < arguments.length; e++) {
|
|
2408
2282
|
var t = arguments[e];
|
|
2409
2283
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2410
2284
|
}
|
|
2411
2285
|
return n;
|
|
2412
|
-
}, _extends$
|
|
2286
|
+
}, _extends$3.apply(null, arguments);
|
|
2413
2287
|
}
|
|
2414
2288
|
var SvgCheckmarkCircleFilled = function SvgCheckmarkCircleFilled(props, ref) {
|
|
2415
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
2289
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({}, props, {
|
|
2416
2290
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2417
2291
|
fill: "currentColor",
|
|
2418
2292
|
viewBox: "0 0 24 24",
|
|
@@ -2458,6 +2332,79 @@ const Alert = forwardRef(({ status = 'neutral', title = null, buttonProps = null
|
|
|
2458
2332
|
});
|
|
2459
2333
|
Alert.displayName = 'Alert';
|
|
2460
2334
|
|
|
2335
|
+
function _defineProperty(e, r, t) {
|
|
2336
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
2337
|
+
value: t,
|
|
2338
|
+
enumerable: !0,
|
|
2339
|
+
configurable: !0,
|
|
2340
|
+
writable: !0
|
|
2341
|
+
}) : e[r] = t, e;
|
|
2342
|
+
}
|
|
2343
|
+
function _extends$2() {
|
|
2344
|
+
return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2345
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
2346
|
+
var t = arguments[e];
|
|
2347
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2348
|
+
}
|
|
2349
|
+
return n;
|
|
2350
|
+
}, _extends$2.apply(null, arguments);
|
|
2351
|
+
}
|
|
2352
|
+
function ownKeys(e, r) {
|
|
2353
|
+
var t = Object.keys(e);
|
|
2354
|
+
if (Object.getOwnPropertySymbols) {
|
|
2355
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
2356
|
+
r && (o = o.filter(function (r) {
|
|
2357
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
2358
|
+
})), t.push.apply(t, o);
|
|
2359
|
+
}
|
|
2360
|
+
return t;
|
|
2361
|
+
}
|
|
2362
|
+
function _objectSpread2(e) {
|
|
2363
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
2364
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
2365
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
2366
|
+
_defineProperty(e, r, t[r]);
|
|
2367
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
2368
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2371
|
+
return e;
|
|
2372
|
+
}
|
|
2373
|
+
function _objectWithoutProperties(e, t) {
|
|
2374
|
+
if (null == e) return {};
|
|
2375
|
+
var o,
|
|
2376
|
+
r,
|
|
2377
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
2378
|
+
if (Object.getOwnPropertySymbols) {
|
|
2379
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
2380
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
2381
|
+
}
|
|
2382
|
+
return i;
|
|
2383
|
+
}
|
|
2384
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
2385
|
+
if (null == r) return {};
|
|
2386
|
+
var t = {};
|
|
2387
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
2388
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
2389
|
+
t[n] = r[n];
|
|
2390
|
+
}
|
|
2391
|
+
return t;
|
|
2392
|
+
}
|
|
2393
|
+
function _toPrimitive(t, r) {
|
|
2394
|
+
if ("object" != typeof t || !t) return t;
|
|
2395
|
+
var e = t[Symbol.toPrimitive];
|
|
2396
|
+
if (void 0 !== e) {
|
|
2397
|
+
var i = e.call(t, r || "default");
|
|
2398
|
+
if ("object" != typeof i) return i;
|
|
2399
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2400
|
+
}
|
|
2401
|
+
return ("string" === r ? String : Number)(t);
|
|
2402
|
+
}
|
|
2403
|
+
function _toPropertyKey(t) {
|
|
2404
|
+
var i = _toPrimitive(t, "string");
|
|
2405
|
+
return "symbol" == typeof i ? i : i + "";
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2461
2408
|
const variants$b = {
|
|
2462
2409
|
line: {
|
|
2463
2410
|
tablist: {
|
|
@@ -2551,7 +2498,7 @@ const combineSizeWithVariant = _ref => {
|
|
|
2551
2498
|
return styleProps;
|
|
2552
2499
|
};
|
|
2553
2500
|
|
|
2554
|
-
const _excluded$
|
|
2501
|
+
const _excluded$7 = ["size"];
|
|
2555
2502
|
const sizeMapping = {
|
|
2556
2503
|
[SIZE_SMALL]: 'sm',
|
|
2557
2504
|
[SIZE_BODY]: 'md',
|
|
@@ -2561,8 +2508,8 @@ const Tabs = forwardRef$1((_ref, ref) => {
|
|
|
2561
2508
|
let {
|
|
2562
2509
|
size
|
|
2563
2510
|
} = _ref,
|
|
2564
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2565
|
-
return /*#__PURE__*/React__default.createElement(Tabs$1, _extends$
|
|
2511
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
2512
|
+
return /*#__PURE__*/React__default.createElement(Tabs$1, _extends$2({
|
|
2566
2513
|
size: sizeMapping[size]
|
|
2567
2514
|
}, props, combineSizeWithVariant({
|
|
2568
2515
|
size
|
|
@@ -3478,23 +3425,19 @@ const switchStyle = {
|
|
|
3478
3425
|
};
|
|
3479
3426
|
|
|
3480
3427
|
const popperStyles = {
|
|
3481
|
-
|
|
3428
|
+
borderRadius: 'base',
|
|
3482
3429
|
};
|
|
3483
3430
|
|
|
3484
|
-
const body$2 =
|
|
3485
|
-
|
|
3431
|
+
const body$2 = (_props) => ({
|
|
3432
|
+
fontSize: 'sm',
|
|
3486
3433
|
});
|
|
3487
3434
|
|
|
3488
3435
|
const headerStyles = {
|
|
3489
|
-
|
|
3490
|
-
|
|
3436
|
+
marginBottom: 2,
|
|
3437
|
+
fontWeight: 'semibold',
|
|
3491
3438
|
};
|
|
3492
3439
|
|
|
3493
|
-
const popoverContentStyles =
|
|
3494
|
-
let {
|
|
3495
|
-
variant
|
|
3496
|
-
} = _ref;
|
|
3497
|
-
return {
|
|
3440
|
+
const popoverContentStyles = ({ variant }) => ({
|
|
3498
3441
|
padding: 4,
|
|
3499
3442
|
marginBottom: 0,
|
|
3500
3443
|
maxWidth: '20rem',
|
|
@@ -3505,24 +3448,23 @@ const popoverContentStyles = _ref => {
|
|
|
3505
3448
|
borderColor: 'gray.100',
|
|
3506
3449
|
borderWidth: '1px',
|
|
3507
3450
|
borderStyle: 'solid',
|
|
3508
|
-
'--popper-arrow-shadow-color': t => t.colors.gray['100'],
|
|
3451
|
+
'--popper-arrow-shadow-color': (t) => t.colors.gray['100'],
|
|
3509
3452
|
zIndex: 'layer10',
|
|
3510
3453
|
_focusVisible: {
|
|
3511
|
-
|
|
3512
|
-
}
|
|
3513
|
-
|
|
3514
|
-
};
|
|
3454
|
+
outline: '3px solid rgba(91, 170, 250, 0.7)',
|
|
3455
|
+
},
|
|
3456
|
+
});
|
|
3515
3457
|
|
|
3516
3458
|
const parts$1 = ['popper', 'content', 'header', 'body'];
|
|
3517
|
-
const baseStyle$6 = props => ({
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3459
|
+
const baseStyle$6 = (props) => ({
|
|
3460
|
+
header: headerStyles,
|
|
3461
|
+
content: popoverContentStyles(props),
|
|
3462
|
+
body: body$2(),
|
|
3463
|
+
popper: popperStyles,
|
|
3522
3464
|
});
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3465
|
+
const popoverStyle = merge(theme$2.components.Popover, {
|
|
3466
|
+
parts: parts$1,
|
|
3467
|
+
baseStyle: baseStyle$6,
|
|
3526
3468
|
});
|
|
3527
3469
|
|
|
3528
3470
|
const baseStyle$5 = {
|
|
@@ -3581,7 +3523,7 @@ const variants$4 = {
|
|
|
3581
3523
|
})
|
|
3582
3524
|
}
|
|
3583
3525
|
};
|
|
3584
|
-
var index$
|
|
3526
|
+
var index$1 = merge(inputStyle, {
|
|
3585
3527
|
variants: variants$4
|
|
3586
3528
|
});
|
|
3587
3529
|
|
|
@@ -3615,53 +3557,36 @@ const variants$3 = {
|
|
|
3615
3557
|
minHeight: "14"
|
|
3616
3558
|
})
|
|
3617
3559
|
};
|
|
3618
|
-
var index
|
|
3560
|
+
var index = merge(buttonStyle, {
|
|
3619
3561
|
variants: variants$3
|
|
3620
3562
|
});
|
|
3621
3563
|
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3564
|
+
const overlay = {
|
|
3565
|
+
background: 'modalOverlay',
|
|
3566
|
+
zIndex: 'layer8',
|
|
3625
3567
|
};
|
|
3626
3568
|
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
},
|
|
3635
|
-
height: '100%',
|
|
3636
|
-
minHeight: '-moz-available',
|
|
3637
|
-
minHeight: '-webkit-fill-available',
|
|
3638
|
-
minHeight: 'fill-available'
|
|
3569
|
+
const dialogContainer$1 = {
|
|
3570
|
+
display: 'flex',
|
|
3571
|
+
zIndex: 'layer8',
|
|
3572
|
+
justifyContent: 'center',
|
|
3573
|
+
alignItems: { base: 'flex-end', tablet: 'center' },
|
|
3574
|
+
height: '100%',
|
|
3575
|
+
minHeight: 'fill-available',
|
|
3639
3576
|
};
|
|
3640
3577
|
|
|
3641
|
-
|
|
3642
|
-
let {
|
|
3643
|
-
hasFooter
|
|
3644
|
-
} = _ref;
|
|
3645
|
-
return {
|
|
3578
|
+
const dialog$1 = ({ hasFooter }) => ({
|
|
3646
3579
|
borderRadius: 'md',
|
|
3647
|
-
borderBottomRadius: {
|
|
3648
|
-
base: '0',
|
|
3649
|
-
tablet: 'md'
|
|
3650
|
-
},
|
|
3580
|
+
borderBottomRadius: { base: '0', tablet: 'md' },
|
|
3651
3581
|
background: 'white',
|
|
3652
3582
|
color: 'inherit',
|
|
3653
3583
|
marginY: 0,
|
|
3654
3584
|
zIndex: 'layer8',
|
|
3655
3585
|
boxShadow: 'lg',
|
|
3656
|
-
paddingBottom: hasFooter ? 0 : 4
|
|
3657
|
-
|
|
3658
|
-
};
|
|
3586
|
+
paddingBottom: hasFooter ? 0 : 4,
|
|
3587
|
+
});
|
|
3659
3588
|
|
|
3660
|
-
|
|
3661
|
-
let {
|
|
3662
|
-
hasHeader
|
|
3663
|
-
} = _ref;
|
|
3664
|
-
return {
|
|
3589
|
+
const closeButton$1 = ({ hasHeader }) => ({
|
|
3665
3590
|
position: 'absolute',
|
|
3666
3591
|
top: hasHeader ? 4 : 2,
|
|
3667
3592
|
insetEnd: hasHeader ? 4 : 2,
|
|
@@ -3670,93 +3595,87 @@ var closeButton$1 = _ref => {
|
|
|
3670
3595
|
width: 8,
|
|
3671
3596
|
height: 8,
|
|
3672
3597
|
_focus: {
|
|
3673
|
-
|
|
3598
|
+
boxShadow: 'outline',
|
|
3674
3599
|
},
|
|
3675
3600
|
_hover: {
|
|
3676
|
-
|
|
3677
|
-
}
|
|
3678
|
-
|
|
3679
|
-
};
|
|
3601
|
+
bg: 'gray.50',
|
|
3602
|
+
},
|
|
3603
|
+
});
|
|
3680
3604
|
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
display: 'flex'
|
|
3702
|
-
}, scrollingHeaderStyles);
|
|
3605
|
+
const body$1 = ({ hasFooter, hasHeader, hideCloseButton }) => {
|
|
3606
|
+
const scrollingHeaderStyles = hasHeader || !hideCloseButton
|
|
3607
|
+
? {
|
|
3608
|
+
// The following adapted from https://lea.verou.me/2012/04/background-attachment-local/
|
|
3609
|
+
background: 'linear-gradient(white 30%, white), linear-gradient(rgb(0 0 0 / 10%) 0%, white)',
|
|
3610
|
+
backgroundRepeat: 'no-repeat',
|
|
3611
|
+
backgroundColor: 'white',
|
|
3612
|
+
backgroundSize: '100% 30px, 100% 10px',
|
|
3613
|
+
backgroundAttachment: 'local, scroll',
|
|
3614
|
+
}
|
|
3615
|
+
: {};
|
|
3616
|
+
return {
|
|
3617
|
+
borderBottomRadius: hasFooter ? null : 'md',
|
|
3618
|
+
paddingX: 4,
|
|
3619
|
+
paddingBottom: 4,
|
|
3620
|
+
flex: 1,
|
|
3621
|
+
overflow: 'auto',
|
|
3622
|
+
display: 'flex',
|
|
3623
|
+
...scrollingHeaderStyles,
|
|
3624
|
+
};
|
|
3703
3625
|
};
|
|
3704
3626
|
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
base: 'column',
|
|
3713
|
-
desktop: 'row-reverse'
|
|
3714
|
-
}
|
|
3627
|
+
const footer$1 = {
|
|
3628
|
+
borderTop: '1px',
|
|
3629
|
+
borderColor: 'gray.100',
|
|
3630
|
+
padding: 4,
|
|
3631
|
+
gap: 4,
|
|
3632
|
+
justifyContent: 'flex-start',
|
|
3633
|
+
flexDirection: { base: 'column', desktop: 'row-reverse' },
|
|
3715
3634
|
};
|
|
3716
3635
|
|
|
3717
|
-
const baseStyle$4 = props => ({
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3636
|
+
const baseStyle$4 = (props) => ({
|
|
3637
|
+
overlay,
|
|
3638
|
+
dialogContainer: dialogContainer$1,
|
|
3639
|
+
header: header$1(props),
|
|
3640
|
+
dialog: dialog$1(props),
|
|
3641
|
+
closeButton: closeButton$1(props),
|
|
3642
|
+
body: body$1(props),
|
|
3643
|
+
footer: footer$1,
|
|
3725
3644
|
});
|
|
3726
3645
|
const sizes$3 = {
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3646
|
+
sm: {
|
|
3647
|
+
dialog: {
|
|
3648
|
+
// Would have preferred object syntax here and below, but wasn't working for whatever reason
|
|
3649
|
+
maxWidth: ['100%', '100%', '48%', '32%', '24%'],
|
|
3650
|
+
maxHeight: ['100%', '100%', '60%', '48%', '32%'],
|
|
3651
|
+
minHeight: ['auto', 'auto', '32%', '32%', '24%'],
|
|
3652
|
+
},
|
|
3653
|
+
},
|
|
3654
|
+
'sm-md': {
|
|
3655
|
+
dialog: {
|
|
3656
|
+
maxHeight: ['100%', '100%', '65%', '65%', '65%'],
|
|
3657
|
+
minWidth: ['100%', '100%', 96, 96, 96],
|
|
3658
|
+
maxWidth: ['100%', '100%', '55%', '42%', '30%'],
|
|
3659
|
+
},
|
|
3660
|
+
},
|
|
3661
|
+
md: {
|
|
3662
|
+
dialog: {
|
|
3663
|
+
maxWidth: ['100%', '100%', '84%', '60%', '48%'],
|
|
3664
|
+
maxHeight: ['100%', '100%', '96%', '84%', '60%'],
|
|
3665
|
+
minHeight: ['auto', 'auto', '84%', '60%', '48%'],
|
|
3666
|
+
},
|
|
3667
|
+
},
|
|
3668
|
+
lg: {
|
|
3669
|
+
dialog: {
|
|
3670
|
+
maxWidth: ['100%', '100%', '96%', '84%', '72%'],
|
|
3671
|
+
maxHeight: ['100%', '100%', '96%', '96%', '84%'],
|
|
3672
|
+
minHeight: ['auto', 'auto', '96%', '84%', '72%'],
|
|
3673
|
+
},
|
|
3674
|
+
},
|
|
3756
3675
|
};
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3676
|
+
const modalStyle = merge(theme$2.components.Modal, {
|
|
3677
|
+
baseStyle: baseStyle$4,
|
|
3678
|
+
sizes: sizes$3,
|
|
3760
3679
|
});
|
|
3761
3680
|
|
|
3762
3681
|
const parts = ['control', 'label'];
|
|
@@ -4260,19 +4179,19 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
4260
4179
|
Accordion: theme$1,
|
|
4261
4180
|
Badge: badgeStyle,
|
|
4262
4181
|
Button: buttonStyle,
|
|
4263
|
-
ButtonRefreshed: index
|
|
4182
|
+
ButtonRefreshed: index,
|
|
4264
4183
|
Checkbox: checkboxStyle,
|
|
4265
4184
|
Divider: dividerStyle,
|
|
4266
4185
|
Drawer: drawerStyle,
|
|
4267
4186
|
GridItem: styles$1,
|
|
4268
4187
|
Heading: Heading_styles,
|
|
4269
4188
|
Input: inputStyle,
|
|
4270
|
-
InputRefreshed: index$
|
|
4189
|
+
InputRefreshed: index$1,
|
|
4271
4190
|
Link: linkStyle,
|
|
4272
4191
|
List: listStyle,
|
|
4273
4192
|
Menu: Menu_styles,
|
|
4274
|
-
Modal:
|
|
4275
|
-
Popover:
|
|
4193
|
+
Modal: modalStyle,
|
|
4194
|
+
Popover: popoverStyle,
|
|
4276
4195
|
Progress: progressStyle,
|
|
4277
4196
|
Radio: radioStyle,
|
|
4278
4197
|
Select: selectStyle,
|
|
@@ -4303,32 +4222,8 @@ const baseConfig = {
|
|
|
4303
4222
|
};
|
|
4304
4223
|
var THEME = extendTheme(extendedTheme, baseConfig);
|
|
4305
4224
|
|
|
4306
|
-
const
|
|
4307
|
-
|
|
4308
|
-
let {
|
|
4309
|
-
theme,
|
|
4310
|
-
useLegacyOverrides,
|
|
4311
|
-
disableExternalFonts = false,
|
|
4312
|
-
children
|
|
4313
|
-
} = _ref,
|
|
4314
|
-
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
4315
|
-
return /*#__PURE__*/React__default.createElement(ChakraProvider, _extends$6({}, props, {
|
|
4316
|
-
ref: ref,
|
|
4317
|
-
theme: merge({}, THEME, theme)
|
|
4318
|
-
}), disableExternalFonts ? null : /*#__PURE__*/React__default.createElement(Fonts, null), /*#__PURE__*/React__default.createElement(LegacyOverrides, {
|
|
4319
|
-
useLegacyOverrides: useLegacyOverrides
|
|
4320
|
-
}), children);
|
|
4321
|
-
});
|
|
4322
|
-
ThemeProvider.propTypes = {
|
|
4323
|
-
/** If true, this will use the old `spothero-html` base styles */
|
|
4324
|
-
useLegacyOverrides: PropTypes.bool,
|
|
4325
|
-
/** If true, this will not load the `Fonts` global styles */
|
|
4326
|
-
disableExternalFonts: PropTypes.bool,
|
|
4327
|
-
/** The React node (generally your entire App) that will be provided the theme */
|
|
4328
|
-
children: PropTypes.node,
|
|
4329
|
-
/** Adds additional themeing on top of SpotHero's default configuration */
|
|
4330
|
-
theme: PropTypes.object
|
|
4331
|
-
};
|
|
4225
|
+
const ThemeProvider = ({ theme, useLegacyOverrides, disableExternalFonts = false, children, ...props }) => (jsxRuntimeExports.jsxs(ChakraProvider, { ...props, theme: merge({}, THEME, theme), children: [disableExternalFonts ? null : jsxRuntimeExports.jsx(Fonts, {}), jsxRuntimeExports.jsx(LegacyOverrides, { useLegacyOverrides: useLegacyOverrides }), children] }));
|
|
4226
|
+
ThemeProvider.displayName = 'ThemeProvider';
|
|
4332
4227
|
|
|
4333
4228
|
const Card = forwardRef((props, ref) => (jsxRuntimeExports.jsx(Box, { position: "relative", padding: 4, bgColor: "background.white", borderRadius: "lg", boxShadow: "md", ...props, ref: ref })));
|
|
4334
4229
|
Card.displayName = 'Card';
|
|
@@ -4430,7 +4325,7 @@ const Input$1 = forwardRef(({ label, helperText, errorMessage, isInvalid, isDisa
|
|
|
4430
4325
|
});
|
|
4431
4326
|
Input$1.displayName = 'Input';
|
|
4432
4327
|
|
|
4433
|
-
const _excluded$
|
|
4328
|
+
const _excluded$6 = ["label", "helperText", "errorMessage", "id", "children", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles"];
|
|
4434
4329
|
|
|
4435
4330
|
// No clue how to move these into the style file so just co-located to keep from slowing down
|
|
4436
4331
|
// Chakra V2 will heavily impact this component
|
|
@@ -4455,7 +4350,6 @@ const activeLabelStyles = {
|
|
|
4455
4350
|
fontSize: '0.85em',
|
|
4456
4351
|
transform: 'translateY(-.75rem)',
|
|
4457
4352
|
_invalid: {
|
|
4458
|
-
color: 'error',
|
|
4459
4353
|
'& .chakra-form__required-indicator': {
|
|
4460
4354
|
display: 'none'
|
|
4461
4355
|
}
|
|
@@ -4554,10 +4448,10 @@ const FormControl = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4554
4448
|
rightElementStyles,
|
|
4555
4449
|
leftElementStyles
|
|
4556
4450
|
} = _ref,
|
|
4557
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4558
|
-
return /*#__PURE__*/React__default.createElement(FormControl$2, _extends$
|
|
4451
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
4452
|
+
return /*#__PURE__*/React__default.createElement(FormControl$2, _extends$2({}, props, {
|
|
4559
4453
|
ref: ref
|
|
4560
|
-
}, controlStyles), /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && /*#__PURE__*/React__default.createElement(InputLeftElement, _extends$
|
|
4454
|
+
}, controlStyles), /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && /*#__PURE__*/React__default.createElement(InputLeftElement, _extends$2({
|
|
4561
4455
|
pointerEvents: "none",
|
|
4562
4456
|
top: "52%",
|
|
4563
4457
|
left: "1.3rem",
|
|
@@ -4568,7 +4462,7 @@ const FormControl = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4568
4462
|
position: "relative"
|
|
4569
4463
|
}, children, label && /*#__PURE__*/React__default.createElement(FormLabel, {
|
|
4570
4464
|
htmlFor: id
|
|
4571
|
-
}, label)), rightElement && /*#__PURE__*/React__default.createElement(InputRightElement, _extends$
|
|
4465
|
+
}, label)), rightElement && /*#__PURE__*/React__default.createElement(InputRightElement, _extends$2({
|
|
4572
4466
|
top: "50%",
|
|
4573
4467
|
right: "-1rem",
|
|
4574
4468
|
transform: "translate(-50%,-50%)"
|
|
@@ -4596,7 +4490,7 @@ FormControl.propTypes = {
|
|
|
4596
4490
|
isInvalid: PropTypes.bool
|
|
4597
4491
|
};
|
|
4598
4492
|
|
|
4599
|
-
const _excluded$
|
|
4493
|
+
const _excluded$5 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "placeholder"];
|
|
4600
4494
|
|
|
4601
4495
|
/**
|
|
4602
4496
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4617,7 +4511,7 @@ const Input = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4617
4511
|
leftElementStyles,
|
|
4618
4512
|
placeholder = ' '
|
|
4619
4513
|
} = _ref,
|
|
4620
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4514
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
4621
4515
|
const classes = cn({
|
|
4622
4516
|
'FormElement-contains-error': isInvalid
|
|
4623
4517
|
}); //Historic carry over
|
|
@@ -4635,7 +4529,7 @@ const Input = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4635
4529
|
rightElementStyles: rightElementStyles,
|
|
4636
4530
|
leftElementStyles: leftElementStyles,
|
|
4637
4531
|
variant: "refreshed"
|
|
4638
|
-
}, /*#__PURE__*/React__default.createElement(Input$2, _extends$
|
|
4532
|
+
}, /*#__PURE__*/React__default.createElement(Input$2, _extends$2({
|
|
4639
4533
|
placeholder: placeholder,
|
|
4640
4534
|
ref: ref,
|
|
4641
4535
|
className: classes,
|
|
@@ -4660,7 +4554,7 @@ Input.propTypes = {
|
|
|
4660
4554
|
leftElementStyles: PropTypes.object
|
|
4661
4555
|
};
|
|
4662
4556
|
|
|
4663
|
-
const _excluded$
|
|
4557
|
+
const _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "formControlStyles"];
|
|
4664
4558
|
|
|
4665
4559
|
//For select left is static arrow,
|
|
4666
4560
|
/**
|
|
@@ -4684,7 +4578,7 @@ const Select = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4684
4578
|
leftElementStyles,
|
|
4685
4579
|
formControlStyles
|
|
4686
4580
|
} = _ref,
|
|
4687
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4581
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
4688
4582
|
const classes = cn({
|
|
4689
4583
|
'FormElement-contains-error': isInvalid
|
|
4690
4584
|
});
|
|
@@ -4701,7 +4595,7 @@ const Select = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4701
4595
|
rightElementStyles: rightElementStyles,
|
|
4702
4596
|
leftElementStyles: leftElementStyles,
|
|
4703
4597
|
sx: formControlStyles
|
|
4704
|
-
}, /*#__PURE__*/React__default.createElement(Select$2, _extends$
|
|
4598
|
+
}, /*#__PURE__*/React__default.createElement(Select$2, _extends$2({
|
|
4705
4599
|
icon: /*#__PURE__*/React__default.createElement(Icon, {
|
|
4706
4600
|
as: ForwardRef$1
|
|
4707
4601
|
}),
|
|
@@ -4725,7 +4619,7 @@ Select.propTypes = {
|
|
|
4725
4619
|
rightElementStyles: PropTypes.object
|
|
4726
4620
|
};
|
|
4727
4621
|
|
|
4728
|
-
const _excluded$
|
|
4622
|
+
const _excluded$3 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
|
|
4729
4623
|
|
|
4730
4624
|
/**
|
|
4731
4625
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4749,7 +4643,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4749
4643
|
leftElementStyles,
|
|
4750
4644
|
buttonValue
|
|
4751
4645
|
} = _ref,
|
|
4752
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4646
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
4753
4647
|
const classes = cn({
|
|
4754
4648
|
'FormElement-contains-error': isInvalid
|
|
4755
4649
|
}); //Historic carry over
|
|
@@ -4767,7 +4661,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4767
4661
|
rightElementStyles: rightElementStyles,
|
|
4768
4662
|
leftElementStyles: leftElementStyles,
|
|
4769
4663
|
variant: "refreshed"
|
|
4770
|
-
}, /*#__PURE__*/React__default.createElement(Button$2, _extends$
|
|
4664
|
+
}, /*#__PURE__*/React__default.createElement(Button$2, _extends$2({
|
|
4771
4665
|
ref: ref,
|
|
4772
4666
|
className: classes,
|
|
4773
4667
|
variant: "refreshed",
|
|
@@ -4920,7 +4814,7 @@ const AutoSuggestSelect$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4920
4814
|
innerRef,
|
|
4921
4815
|
innerProps
|
|
4922
4816
|
} = _ref2;
|
|
4923
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$
|
|
4817
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$2({
|
|
4924
4818
|
style: clearIndicatorStyles,
|
|
4925
4819
|
ref: innerRef
|
|
4926
4820
|
}, innerProps), /*#__PURE__*/React__default.createElement(ForwardRef, null));
|
|
@@ -5004,7 +4898,7 @@ const RadioGroup = forwardRef(({ label, errorMessage, defaultValue, isDisabled,
|
|
|
5004
4898
|
});
|
|
5005
4899
|
RadioGroup.displayName = 'RadioGroup';
|
|
5006
4900
|
|
|
5007
|
-
const _excluded$
|
|
4901
|
+
const _excluded$2 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size", "expandableChildrenStyles", "topChild", "expandableContentKey"];
|
|
5008
4902
|
const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5009
4903
|
let {
|
|
5010
4904
|
isChecked,
|
|
@@ -5021,7 +4915,7 @@ const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5021
4915
|
topChild,
|
|
5022
4916
|
expandableContentKey = 'selection-card-content'
|
|
5023
4917
|
} = _ref,
|
|
5024
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4918
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
5025
4919
|
const Component = isRadio ? Radio : Checkbox;
|
|
5026
4920
|
const expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
5027
4921
|
const hasExpandableContent = isExpandable && isChecked && expandableChildren;
|
|
@@ -5045,7 +4939,7 @@ const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5045
4939
|
}, topChild, /*#__PURE__*/React__default.createElement(Box, {
|
|
5046
4940
|
borderColor: "gray.medium",
|
|
5047
4941
|
borderBottomWidth: hasExpandableContent ? '1px' : 0
|
|
5048
|
-
}, /*#__PURE__*/React__default.createElement(Component, _extends$
|
|
4942
|
+
}, /*#__PURE__*/React__default.createElement(Component, _extends$2({
|
|
5049
4943
|
ref: ref,
|
|
5050
4944
|
isChecked: isChecked,
|
|
5051
4945
|
isDisabled: isDisabled,
|
|
@@ -5079,7 +4973,7 @@ const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5079
4973
|
ease: 'easeOut'
|
|
5080
4974
|
},
|
|
5081
4975
|
overflow: "hidden"
|
|
5082
|
-
}, /*#__PURE__*/React__default.createElement(Box, _extends$
|
|
4976
|
+
}, /*#__PURE__*/React__default.createElement(Box, _extends$2({
|
|
5083
4977
|
color: "gray.600",
|
|
5084
4978
|
fontSize: expandableTextSize,
|
|
5085
4979
|
paddingTop: 3,
|
|
@@ -5114,50 +5008,36 @@ const Textarea = forwardRef(({ label, helperText, errorMessage, isInvalid, isDis
|
|
|
5114
5008
|
});
|
|
5115
5009
|
Textarea.displayName = 'Textarea';
|
|
5116
5010
|
|
|
5117
|
-
const
|
|
5118
|
-
const Popover =
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5011
|
+
const ChakraPopoverWithRef = Popover$1;
|
|
5012
|
+
const Popover = forwardRef(({ children, ...rest }, ref) => {
|
|
5013
|
+
const { variant } = rest;
|
|
5014
|
+
return (jsxRuntimeExports.jsx(ChakraPopoverWithRef, { ...rest, ref: ref, children: Children.map(children, (child, index) => {
|
|
5015
|
+
if (!isValidElement(child)) {
|
|
5016
|
+
return child;
|
|
5017
|
+
}
|
|
5018
|
+
return cloneElement(child, {
|
|
5019
|
+
ref,
|
|
5020
|
+
variant,
|
|
5021
|
+
key: child.key ?? `Popover-child-${index}`,
|
|
5022
|
+
});
|
|
5023
|
+
}) }));
|
|
5130
5024
|
});
|
|
5131
|
-
Popover.
|
|
5132
|
-
/** React children */
|
|
5133
|
-
children: PropTypes.node,
|
|
5134
|
-
/** Styles the Popover */
|
|
5135
|
-
variant: PropTypes.oneOf(['light', 'dark'])
|
|
5136
|
-
};
|
|
5025
|
+
Popover.displayName = 'Popover';
|
|
5137
5026
|
|
|
5138
|
-
const arrowStyles =
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
} = _ref;
|
|
5142
|
-
return {
|
|
5143
|
-
backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
|
|
5144
|
-
};
|
|
5145
|
-
};
|
|
5027
|
+
const arrowStyles = ({ variant }) => ({
|
|
5028
|
+
backgroundColor: variant === 'dark' ? 'secondary.default' : 'white',
|
|
5029
|
+
});
|
|
5146
5030
|
|
|
5147
|
-
const
|
|
5148
|
-
|
|
5149
|
-
ref: ref
|
|
5150
|
-
}, props, arrowStyles(props)));
|
|
5031
|
+
const ChakraPopoverArrowWithRef = PopoverArrow$1;
|
|
5032
|
+
const PopoverArrow = forwardRef((props, ref) => {
|
|
5033
|
+
return (jsxRuntimeExports.jsx(ChakraPopoverArrowWithRef, { ref: ref, ...props, ...arrowStyles(props) }));
|
|
5151
5034
|
});
|
|
5035
|
+
PopoverArrow.displayName = 'PopoverArrow';
|
|
5152
5036
|
|
|
5153
|
-
const pseudoStyles = variant => ({
|
|
5154
|
-
|
|
5037
|
+
const pseudoStyles = (variant) => ({
|
|
5038
|
+
bgColor: variant === 'dark' ? 'gray.600' : 'gray.50',
|
|
5155
5039
|
});
|
|
5156
|
-
const closeButtonStyles =
|
|
5157
|
-
let {
|
|
5158
|
-
variant
|
|
5159
|
-
} = _ref;
|
|
5160
|
-
return {
|
|
5040
|
+
const closeButtonStyles = ({ variant }) => ({
|
|
5161
5041
|
color: variant === 'dark' ? 'white' : 'black',
|
|
5162
5042
|
fontSize: '0.5rem',
|
|
5163
5043
|
position: 'absolute',
|
|
@@ -5166,56 +5046,21 @@ const closeButtonStyles = _ref => {
|
|
|
5166
5046
|
padding: 4,
|
|
5167
5047
|
borderTopRightRadius: 4,
|
|
5168
5048
|
_hover: pseudoStyles(variant),
|
|
5169
|
-
_focus:
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
};
|
|
5049
|
+
_focus: {
|
|
5050
|
+
...pseudoStyles(variant),
|
|
5051
|
+
boxShadow: 'outline',
|
|
5052
|
+
},
|
|
5053
|
+
});
|
|
5174
5054
|
|
|
5175
|
-
const PopoverCloseButton =
|
|
5176
|
-
|
|
5177
|
-
ref: ref
|
|
5178
|
-
}, props, closeButtonStyles(props)));
|
|
5055
|
+
const PopoverCloseButton = forwardRef((props, ref) => {
|
|
5056
|
+
return (jsxRuntimeExports.jsx(PopoverCloseButton$1, { ref: ref, ...props, ...closeButtonStyles(props) }));
|
|
5179
5057
|
});
|
|
5058
|
+
PopoverCloseButton.displayName = 'PopoverCloseButton';
|
|
5180
5059
|
|
|
5181
|
-
const
|
|
5182
|
-
|
|
5183
|
-
const {
|
|
5184
|
-
header,
|
|
5185
|
-
variant,
|
|
5186
|
-
children,
|
|
5187
|
-
hideCloseButton,
|
|
5188
|
-
hideArrow,
|
|
5189
|
-
popoverBodyProps
|
|
5190
|
-
} = props,
|
|
5191
|
-
rest = _objectWithoutProperties(props, _excluded$2);
|
|
5192
|
-
return /*#__PURE__*/React__default.createElement(PopoverContent$1, _extends$6({}, rest, {
|
|
5193
|
-
ref: ref
|
|
5194
|
-
}), hideArrow ? null : /*#__PURE__*/React__default.createElement(PopoverArrow, {
|
|
5195
|
-
variant: variant
|
|
5196
|
-
}), hideCloseButton ? null : /*#__PURE__*/React__default.createElement(PopoverCloseButton, {
|
|
5197
|
-
variant: variant
|
|
5198
|
-
}), header ? /*#__PURE__*/React__default.createElement(PopoverHeader, null, header) : null, /*#__PURE__*/React__default.createElement(PopoverBody, popoverBodyProps, children));
|
|
5060
|
+
const PopoverContent = forwardRef(({ header, variant = 'light', children, hideCloseButton = false, hideArrow = false, popoverBodyProps, ...rest }, ref) => {
|
|
5061
|
+
return (jsxRuntimeExports.jsxs(PopoverContent$1, { ...rest, ref: ref, children: [hideArrow ? null : jsxRuntimeExports.jsx(PopoverArrow, { variant: variant }), hideCloseButton ? null : (jsxRuntimeExports.jsx(PopoverCloseButton, { variant: variant })), header ? jsxRuntimeExports.jsx(PopoverHeader, { children: header }) : null, jsxRuntimeExports.jsx(PopoverBody, { ...popoverBodyProps, children: children })] }));
|
|
5199
5062
|
});
|
|
5200
|
-
PopoverContent.
|
|
5201
|
-
/** React children */
|
|
5202
|
-
children: PropTypes.node,
|
|
5203
|
-
/** Whether or not to hide the close button */
|
|
5204
|
-
hideCloseButton: PropTypes.bool,
|
|
5205
|
-
/** Whether or not to hide the arrow */
|
|
5206
|
-
hideArrow: PropTypes.bool,
|
|
5207
|
-
/** Styles the Popover */
|
|
5208
|
-
variant: PropTypes.oneOf(['light', 'dark']),
|
|
5209
|
-
/** The string or node for the header (optional) */
|
|
5210
|
-
header: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
5211
|
-
/** Props to pass to the PopoverBody */
|
|
5212
|
-
popoverBodyProps: PropTypes.object
|
|
5213
|
-
};
|
|
5214
|
-
PopoverContent.defaultProps = {
|
|
5215
|
-
variant: 'light',
|
|
5216
|
-
hideCloseButton: false,
|
|
5217
|
-
hideArrow: false
|
|
5218
|
-
};
|
|
5063
|
+
PopoverContent.displayName = 'PopoverContent';
|
|
5219
5064
|
|
|
5220
5065
|
const AutoSuggestSelect = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5221
5066
|
let {
|
|
@@ -5310,7 +5155,7 @@ const AutoSuggestSelect = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5310
5155
|
innerRef,
|
|
5311
5156
|
innerProps
|
|
5312
5157
|
} = _ref2;
|
|
5313
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$
|
|
5158
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$2({
|
|
5314
5159
|
style: clearIndicatorStyles,
|
|
5315
5160
|
ref: innerRef
|
|
5316
5161
|
}, innerProps), /*#__PURE__*/React__default.createElement(ForwardRef, null));
|
|
@@ -5479,7 +5324,7 @@ const FilterSelectNode = _ref => {
|
|
|
5479
5324
|
label: label,
|
|
5480
5325
|
inputId: id,
|
|
5481
5326
|
isInvalid: isInvalid
|
|
5482
|
-
}, /*#__PURE__*/React__default.createElement(Select$3, _extends$
|
|
5327
|
+
}, /*#__PURE__*/React__default.createElement(Select$3, _extends$2({
|
|
5483
5328
|
ref: innerRef,
|
|
5484
5329
|
classNamePrefix: "fe-ui-filter-select",
|
|
5485
5330
|
closeMenuOnSelect: true,
|
|
@@ -5498,7 +5343,7 @@ const FilterSelectNode = _ref => {
|
|
|
5498
5343
|
noOptionsMessage: () => noOptionsMessage
|
|
5499
5344
|
}, props)));
|
|
5500
5345
|
};
|
|
5501
|
-
const FilterSelect = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(FilterSelectNode, _extends$
|
|
5346
|
+
const FilterSelect = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(FilterSelectNode, _extends$2({
|
|
5502
5347
|
innerRef: ref
|
|
5503
5348
|
}, props)));
|
|
5504
5349
|
FilterSelect.propTypes = {
|
|
@@ -5622,7 +5467,7 @@ const ToggleButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
5622
5467
|
if (!children) throw new Error('Children required');
|
|
5623
5468
|
|
|
5624
5469
|
// iterate over array of child nodes to apply extended props
|
|
5625
|
-
return /*#__PURE__*/React__default.createElement(ButtonGroup, _extends$
|
|
5470
|
+
return /*#__PURE__*/React__default.createElement(ButtonGroup, _extends$2({
|
|
5626
5471
|
ref: ref,
|
|
5627
5472
|
sx: _objectSpread2(_objectSpread2({}, buttonGroupStyles), _buttonGroupStyles)
|
|
5628
5473
|
}, groupProps), React__default.Children.map(children, CHILD => {
|
|
@@ -5710,7 +5555,7 @@ const CreatableSelectNode = _ref => {
|
|
|
5710
5555
|
helperText: helperText,
|
|
5711
5556
|
label: label,
|
|
5712
5557
|
inputId: id
|
|
5713
|
-
}, /*#__PURE__*/React__default.createElement(Creatable, _extends$
|
|
5558
|
+
}, /*#__PURE__*/React__default.createElement(Creatable, _extends$2({
|
|
5714
5559
|
id: id,
|
|
5715
5560
|
components: {
|
|
5716
5561
|
DropdownIndicator
|
|
@@ -5734,7 +5579,7 @@ const CreatableSelect = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
5734
5579
|
helperText
|
|
5735
5580
|
} = props,
|
|
5736
5581
|
additionalProps = _objectWithoutProperties(props, _excluded2);
|
|
5737
|
-
return /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$
|
|
5582
|
+
return /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$2({
|
|
5738
5583
|
id: id,
|
|
5739
5584
|
innerRef: ref,
|
|
5740
5585
|
label: label,
|
|
@@ -5772,12 +5617,12 @@ CreatableSelectNode.propTypes = {
|
|
|
5772
5617
|
current: PropTypes.instanceOf(Creatable)
|
|
5773
5618
|
})
|
|
5774
5619
|
};
|
|
5775
|
-
var CreatableSelect$1 = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$
|
|
5620
|
+
var CreatableSelect$1 = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$2({
|
|
5776
5621
|
ref: ref
|
|
5777
5622
|
}, props)));
|
|
5778
5623
|
|
|
5779
5624
|
const Menu = forwardRef$1((props, ref) => {
|
|
5780
|
-
return /*#__PURE__*/React__default.createElement(Menu$1, _extends$
|
|
5625
|
+
return /*#__PURE__*/React__default.createElement(Menu$1, _extends$2({}, props, {
|
|
5781
5626
|
ref: ref
|
|
5782
5627
|
}));
|
|
5783
5628
|
});
|