@spothero/ui 25.11.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 -6
- package/dist/components/Modal/styles/header.d.ts +4 -6
- package/dist/components/Modal/styles/index.d.ts +4 -227
- 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 -528
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +75 -11
- package/dist/index.esm.js +387 -529
- 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'|'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', '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'|'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', '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,80 +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
|
-
|
|
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' },
|
|
3709
3634
|
};
|
|
3710
3635
|
|
|
3711
|
-
const baseStyle$4 = props => ({
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
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,
|
|
3719
3644
|
});
|
|
3720
3645
|
const sizes$3 = {
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
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
|
+
},
|
|
3743
3675
|
};
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3676
|
+
const modalStyle = merge(theme$2.components.Modal, {
|
|
3677
|
+
baseStyle: baseStyle$4,
|
|
3678
|
+
sizes: sizes$3,
|
|
3747
3679
|
});
|
|
3748
3680
|
|
|
3749
3681
|
const parts = ['control', 'label'];
|
|
@@ -4247,19 +4179,19 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
4247
4179
|
Accordion: theme$1,
|
|
4248
4180
|
Badge: badgeStyle,
|
|
4249
4181
|
Button: buttonStyle,
|
|
4250
|
-
ButtonRefreshed: index
|
|
4182
|
+
ButtonRefreshed: index,
|
|
4251
4183
|
Checkbox: checkboxStyle,
|
|
4252
4184
|
Divider: dividerStyle,
|
|
4253
4185
|
Drawer: drawerStyle,
|
|
4254
4186
|
GridItem: styles$1,
|
|
4255
4187
|
Heading: Heading_styles,
|
|
4256
4188
|
Input: inputStyle,
|
|
4257
|
-
InputRefreshed: index$
|
|
4189
|
+
InputRefreshed: index$1,
|
|
4258
4190
|
Link: linkStyle,
|
|
4259
4191
|
List: listStyle,
|
|
4260
4192
|
Menu: Menu_styles,
|
|
4261
|
-
Modal:
|
|
4262
|
-
Popover:
|
|
4193
|
+
Modal: modalStyle,
|
|
4194
|
+
Popover: popoverStyle,
|
|
4263
4195
|
Progress: progressStyle,
|
|
4264
4196
|
Radio: radioStyle,
|
|
4265
4197
|
Select: selectStyle,
|
|
@@ -4290,32 +4222,8 @@ const baseConfig = {
|
|
|
4290
4222
|
};
|
|
4291
4223
|
var THEME = extendTheme(extendedTheme, baseConfig);
|
|
4292
4224
|
|
|
4293
|
-
const
|
|
4294
|
-
|
|
4295
|
-
let {
|
|
4296
|
-
theme,
|
|
4297
|
-
useLegacyOverrides,
|
|
4298
|
-
disableExternalFonts = false,
|
|
4299
|
-
children
|
|
4300
|
-
} = _ref,
|
|
4301
|
-
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
4302
|
-
return /*#__PURE__*/React__default.createElement(ChakraProvider, _extends$6({}, props, {
|
|
4303
|
-
ref: ref,
|
|
4304
|
-
theme: merge({}, THEME, theme)
|
|
4305
|
-
}), disableExternalFonts ? null : /*#__PURE__*/React__default.createElement(Fonts, null), /*#__PURE__*/React__default.createElement(LegacyOverrides, {
|
|
4306
|
-
useLegacyOverrides: useLegacyOverrides
|
|
4307
|
-
}), children);
|
|
4308
|
-
});
|
|
4309
|
-
ThemeProvider.propTypes = {
|
|
4310
|
-
/** If true, this will use the old `spothero-html` base styles */
|
|
4311
|
-
useLegacyOverrides: PropTypes.bool,
|
|
4312
|
-
/** If true, this will not load the `Fonts` global styles */
|
|
4313
|
-
disableExternalFonts: PropTypes.bool,
|
|
4314
|
-
/** The React node (generally your entire App) that will be provided the theme */
|
|
4315
|
-
children: PropTypes.node,
|
|
4316
|
-
/** Adds additional themeing on top of SpotHero's default configuration */
|
|
4317
|
-
theme: PropTypes.object
|
|
4318
|
-
};
|
|
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';
|
|
4319
4227
|
|
|
4320
4228
|
const Card = forwardRef((props, ref) => (jsxRuntimeExports.jsx(Box, { position: "relative", padding: 4, bgColor: "background.white", borderRadius: "lg", boxShadow: "md", ...props, ref: ref })));
|
|
4321
4229
|
Card.displayName = 'Card';
|
|
@@ -4417,7 +4325,7 @@ const Input$1 = forwardRef(({ label, helperText, errorMessage, isInvalid, isDisa
|
|
|
4417
4325
|
});
|
|
4418
4326
|
Input$1.displayName = 'Input';
|
|
4419
4327
|
|
|
4420
|
-
const _excluded$
|
|
4328
|
+
const _excluded$6 = ["label", "helperText", "errorMessage", "id", "children", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles"];
|
|
4421
4329
|
|
|
4422
4330
|
// No clue how to move these into the style file so just co-located to keep from slowing down
|
|
4423
4331
|
// Chakra V2 will heavily impact this component
|
|
@@ -4442,7 +4350,6 @@ const activeLabelStyles = {
|
|
|
4442
4350
|
fontSize: '0.85em',
|
|
4443
4351
|
transform: 'translateY(-.75rem)',
|
|
4444
4352
|
_invalid: {
|
|
4445
|
-
color: 'error',
|
|
4446
4353
|
'& .chakra-form__required-indicator': {
|
|
4447
4354
|
display: 'none'
|
|
4448
4355
|
}
|
|
@@ -4541,10 +4448,10 @@ const FormControl = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4541
4448
|
rightElementStyles,
|
|
4542
4449
|
leftElementStyles
|
|
4543
4450
|
} = _ref,
|
|
4544
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4545
|
-
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, {
|
|
4546
4453
|
ref: ref
|
|
4547
|
-
}, 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({
|
|
4548
4455
|
pointerEvents: "none",
|
|
4549
4456
|
top: "52%",
|
|
4550
4457
|
left: "1.3rem",
|
|
@@ -4555,7 +4462,7 @@ const FormControl = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4555
4462
|
position: "relative"
|
|
4556
4463
|
}, children, label && /*#__PURE__*/React__default.createElement(FormLabel, {
|
|
4557
4464
|
htmlFor: id
|
|
4558
|
-
}, label)), rightElement && /*#__PURE__*/React__default.createElement(InputRightElement, _extends$
|
|
4465
|
+
}, label)), rightElement && /*#__PURE__*/React__default.createElement(InputRightElement, _extends$2({
|
|
4559
4466
|
top: "50%",
|
|
4560
4467
|
right: "-1rem",
|
|
4561
4468
|
transform: "translate(-50%,-50%)"
|
|
@@ -4583,7 +4490,7 @@ FormControl.propTypes = {
|
|
|
4583
4490
|
isInvalid: PropTypes.bool
|
|
4584
4491
|
};
|
|
4585
4492
|
|
|
4586
|
-
const _excluded$
|
|
4493
|
+
const _excluded$5 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "placeholder"];
|
|
4587
4494
|
|
|
4588
4495
|
/**
|
|
4589
4496
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4604,7 +4511,7 @@ const Input = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4604
4511
|
leftElementStyles,
|
|
4605
4512
|
placeholder = ' '
|
|
4606
4513
|
} = _ref,
|
|
4607
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4514
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
4608
4515
|
const classes = cn({
|
|
4609
4516
|
'FormElement-contains-error': isInvalid
|
|
4610
4517
|
}); //Historic carry over
|
|
@@ -4622,7 +4529,7 @@ const Input = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4622
4529
|
rightElementStyles: rightElementStyles,
|
|
4623
4530
|
leftElementStyles: leftElementStyles,
|
|
4624
4531
|
variant: "refreshed"
|
|
4625
|
-
}, /*#__PURE__*/React__default.createElement(Input$2, _extends$
|
|
4532
|
+
}, /*#__PURE__*/React__default.createElement(Input$2, _extends$2({
|
|
4626
4533
|
placeholder: placeholder,
|
|
4627
4534
|
ref: ref,
|
|
4628
4535
|
className: classes,
|
|
@@ -4647,7 +4554,7 @@ Input.propTypes = {
|
|
|
4647
4554
|
leftElementStyles: PropTypes.object
|
|
4648
4555
|
};
|
|
4649
4556
|
|
|
4650
|
-
const _excluded$
|
|
4557
|
+
const _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "formControlStyles"];
|
|
4651
4558
|
|
|
4652
4559
|
//For select left is static arrow,
|
|
4653
4560
|
/**
|
|
@@ -4671,7 +4578,7 @@ const Select = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4671
4578
|
leftElementStyles,
|
|
4672
4579
|
formControlStyles
|
|
4673
4580
|
} = _ref,
|
|
4674
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4581
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
4675
4582
|
const classes = cn({
|
|
4676
4583
|
'FormElement-contains-error': isInvalid
|
|
4677
4584
|
});
|
|
@@ -4688,7 +4595,7 @@ const Select = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4688
4595
|
rightElementStyles: rightElementStyles,
|
|
4689
4596
|
leftElementStyles: leftElementStyles,
|
|
4690
4597
|
sx: formControlStyles
|
|
4691
|
-
}, /*#__PURE__*/React__default.createElement(Select$2, _extends$
|
|
4598
|
+
}, /*#__PURE__*/React__default.createElement(Select$2, _extends$2({
|
|
4692
4599
|
icon: /*#__PURE__*/React__default.createElement(Icon, {
|
|
4693
4600
|
as: ForwardRef$1
|
|
4694
4601
|
}),
|
|
@@ -4712,7 +4619,7 @@ Select.propTypes = {
|
|
|
4712
4619
|
rightElementStyles: PropTypes.object
|
|
4713
4620
|
};
|
|
4714
4621
|
|
|
4715
|
-
const _excluded$
|
|
4622
|
+
const _excluded$3 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
|
|
4716
4623
|
|
|
4717
4624
|
/**
|
|
4718
4625
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4736,7 +4643,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4736
4643
|
leftElementStyles,
|
|
4737
4644
|
buttonValue
|
|
4738
4645
|
} = _ref,
|
|
4739
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4646
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
4740
4647
|
const classes = cn({
|
|
4741
4648
|
'FormElement-contains-error': isInvalid
|
|
4742
4649
|
}); //Historic carry over
|
|
@@ -4754,7 +4661,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4754
4661
|
rightElementStyles: rightElementStyles,
|
|
4755
4662
|
leftElementStyles: leftElementStyles,
|
|
4756
4663
|
variant: "refreshed"
|
|
4757
|
-
}, /*#__PURE__*/React__default.createElement(Button$2, _extends$
|
|
4664
|
+
}, /*#__PURE__*/React__default.createElement(Button$2, _extends$2({
|
|
4758
4665
|
ref: ref,
|
|
4759
4666
|
className: classes,
|
|
4760
4667
|
variant: "refreshed",
|
|
@@ -4907,7 +4814,7 @@ const AutoSuggestSelect$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4907
4814
|
innerRef,
|
|
4908
4815
|
innerProps
|
|
4909
4816
|
} = _ref2;
|
|
4910
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$
|
|
4817
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$2({
|
|
4911
4818
|
style: clearIndicatorStyles,
|
|
4912
4819
|
ref: innerRef
|
|
4913
4820
|
}, innerProps), /*#__PURE__*/React__default.createElement(ForwardRef, null));
|
|
@@ -4991,7 +4898,7 @@ const RadioGroup = forwardRef(({ label, errorMessage, defaultValue, isDisabled,
|
|
|
4991
4898
|
});
|
|
4992
4899
|
RadioGroup.displayName = 'RadioGroup';
|
|
4993
4900
|
|
|
4994
|
-
const _excluded$
|
|
4901
|
+
const _excluded$2 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size", "expandableChildrenStyles", "topChild", "expandableContentKey"];
|
|
4995
4902
|
const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4996
4903
|
let {
|
|
4997
4904
|
isChecked,
|
|
@@ -5008,7 +4915,7 @@ const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5008
4915
|
topChild,
|
|
5009
4916
|
expandableContentKey = 'selection-card-content'
|
|
5010
4917
|
} = _ref,
|
|
5011
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4918
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
5012
4919
|
const Component = isRadio ? Radio : Checkbox;
|
|
5013
4920
|
const expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
5014
4921
|
const hasExpandableContent = isExpandable && isChecked && expandableChildren;
|
|
@@ -5032,7 +4939,7 @@ const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5032
4939
|
}, topChild, /*#__PURE__*/React__default.createElement(Box, {
|
|
5033
4940
|
borderColor: "gray.medium",
|
|
5034
4941
|
borderBottomWidth: hasExpandableContent ? '1px' : 0
|
|
5035
|
-
}, /*#__PURE__*/React__default.createElement(Component, _extends$
|
|
4942
|
+
}, /*#__PURE__*/React__default.createElement(Component, _extends$2({
|
|
5036
4943
|
ref: ref,
|
|
5037
4944
|
isChecked: isChecked,
|
|
5038
4945
|
isDisabled: isDisabled,
|
|
@@ -5066,7 +4973,7 @@ const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5066
4973
|
ease: 'easeOut'
|
|
5067
4974
|
},
|
|
5068
4975
|
overflow: "hidden"
|
|
5069
|
-
}, /*#__PURE__*/React__default.createElement(Box, _extends$
|
|
4976
|
+
}, /*#__PURE__*/React__default.createElement(Box, _extends$2({
|
|
5070
4977
|
color: "gray.600",
|
|
5071
4978
|
fontSize: expandableTextSize,
|
|
5072
4979
|
paddingTop: 3,
|
|
@@ -5101,50 +5008,36 @@ const Textarea = forwardRef(({ label, helperText, errorMessage, isInvalid, isDis
|
|
|
5101
5008
|
});
|
|
5102
5009
|
Textarea.displayName = 'Textarea';
|
|
5103
5010
|
|
|
5104
|
-
const
|
|
5105
|
-
const Popover =
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
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
|
+
}) }));
|
|
5117
5024
|
});
|
|
5118
|
-
Popover.
|
|
5119
|
-
/** React children */
|
|
5120
|
-
children: PropTypes.node,
|
|
5121
|
-
/** Styles the Popover */
|
|
5122
|
-
variant: PropTypes.oneOf(['light', 'dark'])
|
|
5123
|
-
};
|
|
5025
|
+
Popover.displayName = 'Popover';
|
|
5124
5026
|
|
|
5125
|
-
const arrowStyles =
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
} = _ref;
|
|
5129
|
-
return {
|
|
5130
|
-
backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
|
|
5131
|
-
};
|
|
5132
|
-
};
|
|
5027
|
+
const arrowStyles = ({ variant }) => ({
|
|
5028
|
+
backgroundColor: variant === 'dark' ? 'secondary.default' : 'white',
|
|
5029
|
+
});
|
|
5133
5030
|
|
|
5134
|
-
const
|
|
5135
|
-
|
|
5136
|
-
ref: ref
|
|
5137
|
-
}, props, arrowStyles(props)));
|
|
5031
|
+
const ChakraPopoverArrowWithRef = PopoverArrow$1;
|
|
5032
|
+
const PopoverArrow = forwardRef((props, ref) => {
|
|
5033
|
+
return (jsxRuntimeExports.jsx(ChakraPopoverArrowWithRef, { ref: ref, ...props, ...arrowStyles(props) }));
|
|
5138
5034
|
});
|
|
5035
|
+
PopoverArrow.displayName = 'PopoverArrow';
|
|
5139
5036
|
|
|
5140
|
-
const pseudoStyles = variant => ({
|
|
5141
|
-
|
|
5037
|
+
const pseudoStyles = (variant) => ({
|
|
5038
|
+
bgColor: variant === 'dark' ? 'gray.600' : 'gray.50',
|
|
5142
5039
|
});
|
|
5143
|
-
const closeButtonStyles =
|
|
5144
|
-
let {
|
|
5145
|
-
variant
|
|
5146
|
-
} = _ref;
|
|
5147
|
-
return {
|
|
5040
|
+
const closeButtonStyles = ({ variant }) => ({
|
|
5148
5041
|
color: variant === 'dark' ? 'white' : 'black',
|
|
5149
5042
|
fontSize: '0.5rem',
|
|
5150
5043
|
position: 'absolute',
|
|
@@ -5153,56 +5046,21 @@ const closeButtonStyles = _ref => {
|
|
|
5153
5046
|
padding: 4,
|
|
5154
5047
|
borderTopRightRadius: 4,
|
|
5155
5048
|
_hover: pseudoStyles(variant),
|
|
5156
|
-
_focus:
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
};
|
|
5049
|
+
_focus: {
|
|
5050
|
+
...pseudoStyles(variant),
|
|
5051
|
+
boxShadow: 'outline',
|
|
5052
|
+
},
|
|
5053
|
+
});
|
|
5161
5054
|
|
|
5162
|
-
const PopoverCloseButton =
|
|
5163
|
-
|
|
5164
|
-
ref: ref
|
|
5165
|
-
}, props, closeButtonStyles(props)));
|
|
5055
|
+
const PopoverCloseButton = forwardRef((props, ref) => {
|
|
5056
|
+
return (jsxRuntimeExports.jsx(PopoverCloseButton$1, { ref: ref, ...props, ...closeButtonStyles(props) }));
|
|
5166
5057
|
});
|
|
5058
|
+
PopoverCloseButton.displayName = 'PopoverCloseButton';
|
|
5167
5059
|
|
|
5168
|
-
const
|
|
5169
|
-
|
|
5170
|
-
const {
|
|
5171
|
-
header,
|
|
5172
|
-
variant,
|
|
5173
|
-
children,
|
|
5174
|
-
hideCloseButton,
|
|
5175
|
-
hideArrow,
|
|
5176
|
-
popoverBodyProps
|
|
5177
|
-
} = props,
|
|
5178
|
-
rest = _objectWithoutProperties(props, _excluded$2);
|
|
5179
|
-
return /*#__PURE__*/React__default.createElement(PopoverContent$1, _extends$6({}, rest, {
|
|
5180
|
-
ref: ref
|
|
5181
|
-
}), hideArrow ? null : /*#__PURE__*/React__default.createElement(PopoverArrow, {
|
|
5182
|
-
variant: variant
|
|
5183
|
-
}), hideCloseButton ? null : /*#__PURE__*/React__default.createElement(PopoverCloseButton, {
|
|
5184
|
-
variant: variant
|
|
5185
|
-
}), 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 })] }));
|
|
5186
5062
|
});
|
|
5187
|
-
PopoverContent.
|
|
5188
|
-
/** React children */
|
|
5189
|
-
children: PropTypes.node,
|
|
5190
|
-
/** Whether or not to hide the close button */
|
|
5191
|
-
hideCloseButton: PropTypes.bool,
|
|
5192
|
-
/** Whether or not to hide the arrow */
|
|
5193
|
-
hideArrow: PropTypes.bool,
|
|
5194
|
-
/** Styles the Popover */
|
|
5195
|
-
variant: PropTypes.oneOf(['light', 'dark']),
|
|
5196
|
-
/** The string or node for the header (optional) */
|
|
5197
|
-
header: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
5198
|
-
/** Props to pass to the PopoverBody */
|
|
5199
|
-
popoverBodyProps: PropTypes.object
|
|
5200
|
-
};
|
|
5201
|
-
PopoverContent.defaultProps = {
|
|
5202
|
-
variant: 'light',
|
|
5203
|
-
hideCloseButton: false,
|
|
5204
|
-
hideArrow: false
|
|
5205
|
-
};
|
|
5063
|
+
PopoverContent.displayName = 'PopoverContent';
|
|
5206
5064
|
|
|
5207
5065
|
const AutoSuggestSelect = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5208
5066
|
let {
|
|
@@ -5297,7 +5155,7 @@ const AutoSuggestSelect = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5297
5155
|
innerRef,
|
|
5298
5156
|
innerProps
|
|
5299
5157
|
} = _ref2;
|
|
5300
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$
|
|
5158
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$2({
|
|
5301
5159
|
style: clearIndicatorStyles,
|
|
5302
5160
|
ref: innerRef
|
|
5303
5161
|
}, innerProps), /*#__PURE__*/React__default.createElement(ForwardRef, null));
|
|
@@ -5466,7 +5324,7 @@ const FilterSelectNode = _ref => {
|
|
|
5466
5324
|
label: label,
|
|
5467
5325
|
inputId: id,
|
|
5468
5326
|
isInvalid: isInvalid
|
|
5469
|
-
}, /*#__PURE__*/React__default.createElement(Select$3, _extends$
|
|
5327
|
+
}, /*#__PURE__*/React__default.createElement(Select$3, _extends$2({
|
|
5470
5328
|
ref: innerRef,
|
|
5471
5329
|
classNamePrefix: "fe-ui-filter-select",
|
|
5472
5330
|
closeMenuOnSelect: true,
|
|
@@ -5485,7 +5343,7 @@ const FilterSelectNode = _ref => {
|
|
|
5485
5343
|
noOptionsMessage: () => noOptionsMessage
|
|
5486
5344
|
}, props)));
|
|
5487
5345
|
};
|
|
5488
|
-
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({
|
|
5489
5347
|
innerRef: ref
|
|
5490
5348
|
}, props)));
|
|
5491
5349
|
FilterSelect.propTypes = {
|
|
@@ -5609,7 +5467,7 @@ const ToggleButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
5609
5467
|
if (!children) throw new Error('Children required');
|
|
5610
5468
|
|
|
5611
5469
|
// iterate over array of child nodes to apply extended props
|
|
5612
|
-
return /*#__PURE__*/React__default.createElement(ButtonGroup, _extends$
|
|
5470
|
+
return /*#__PURE__*/React__default.createElement(ButtonGroup, _extends$2({
|
|
5613
5471
|
ref: ref,
|
|
5614
5472
|
sx: _objectSpread2(_objectSpread2({}, buttonGroupStyles), _buttonGroupStyles)
|
|
5615
5473
|
}, groupProps), React__default.Children.map(children, CHILD => {
|
|
@@ -5697,7 +5555,7 @@ const CreatableSelectNode = _ref => {
|
|
|
5697
5555
|
helperText: helperText,
|
|
5698
5556
|
label: label,
|
|
5699
5557
|
inputId: id
|
|
5700
|
-
}, /*#__PURE__*/React__default.createElement(Creatable, _extends$
|
|
5558
|
+
}, /*#__PURE__*/React__default.createElement(Creatable, _extends$2({
|
|
5701
5559
|
id: id,
|
|
5702
5560
|
components: {
|
|
5703
5561
|
DropdownIndicator
|
|
@@ -5721,7 +5579,7 @@ const CreatableSelect = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
5721
5579
|
helperText
|
|
5722
5580
|
} = props,
|
|
5723
5581
|
additionalProps = _objectWithoutProperties(props, _excluded2);
|
|
5724
|
-
return /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$
|
|
5582
|
+
return /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$2({
|
|
5725
5583
|
id: id,
|
|
5726
5584
|
innerRef: ref,
|
|
5727
5585
|
label: label,
|
|
@@ -5759,12 +5617,12 @@ CreatableSelectNode.propTypes = {
|
|
|
5759
5617
|
current: PropTypes.instanceOf(Creatable)
|
|
5760
5618
|
})
|
|
5761
5619
|
};
|
|
5762
|
-
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({
|
|
5763
5621
|
ref: ref
|
|
5764
5622
|
}, props)));
|
|
5765
5623
|
|
|
5766
5624
|
const Menu = forwardRef$1((props, ref) => {
|
|
5767
|
-
return /*#__PURE__*/React__default.createElement(Menu$1, _extends$
|
|
5625
|
+
return /*#__PURE__*/React__default.createElement(Menu$1, _extends$2({}, props, {
|
|
5768
5626
|
ref: ref
|
|
5769
5627
|
}));
|
|
5770
5628
|
});
|