@spothero/ui 25.12.0 → 25.16.0-beta.2
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/Accordion/AccordionActionButton.d.ts +6 -2
- package/dist/components/Button/Button.styles.d.ts +46 -0
- package/dist/components/Menu/Menu.d.ts +6 -0
- package/dist/components/Menu/Menu.styles.d.ts +4 -258
- package/dist/components/Menu/index.d.ts +2 -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 +13 -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/SelectionCard/SelectionCard.d.ts +20 -0
- package/dist/components/SelectionCard/index.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +1 -0
- package/dist/components/Table/Table.styles.d.ts +73 -65
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +10 -0
- package/dist/components/Tabs/combineSizeWithVariant.d.ts +120 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/styles/index.d.ts +52 -298
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +17 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +27 -0
- package/dist/components/ToggleButtonGroup/index.d.ts +1 -0
- package/dist/components/ToggleButtonGroup/styles/index.d.ts +5 -0
- package/dist/index.cjs.js +743 -1039
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +143 -29
- package/dist/index.esm.js +743 -1039
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/Spaces.d.ts +8 -0
- package/package.json +7 -5
package/dist/index.esm.js
CHANGED
|
@@ -1,260 +1,18 @@
|
|
|
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, 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
|
-
import PropTypes from 'prop-types';
|
|
7
7
|
import cn from 'classnames';
|
|
8
8
|
import { Global } from '@emotion/react';
|
|
9
9
|
import { accordionAnatomy, selectAnatomy } from '@chakra-ui/anatomy';
|
|
10
10
|
import template from 'lodash/template';
|
|
11
|
+
import PropTypes from 'prop-types';
|
|
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,49 +2172,36 @@ 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 }) => {
|
|
2305
2179
|
return (jsxRuntimeExports.jsxs(Drawer$1, { placement: "right", ...props, children: [jsxRuntimeExports.jsx(DrawerOverlay, {}), jsxRuntimeExports.jsxs(DrawerContent, { children: [jsxRuntimeExports.jsxs(DrawerHeader, { ...headerProps, children: [header, drawerCloseButton || jsxRuntimeExports.jsx(DrawerCloseButton, {})] }), children] })] }));
|
|
2306
2180
|
};
|
|
2307
2181
|
|
|
2308
|
-
const AccordionActionButton =
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
}
|
|
2317
|
-
onClick === null || onClick === void 0 || onClick();
|
|
2318
|
-
};
|
|
2319
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
2320
|
-
ref: ref,
|
|
2321
|
-
fontSize: "sm",
|
|
2322
|
-
role: "button",
|
|
2323
|
-
onClick: handleOnClick,
|
|
2324
|
-
color: "primary.default"
|
|
2325
|
-
}, children);
|
|
2182
|
+
const AccordionActionButton = forwardRef(({ children, onClick }, ref) => {
|
|
2183
|
+
const handleOnClick = (e) => {
|
|
2184
|
+
if (onClick) {
|
|
2185
|
+
e.preventDefault();
|
|
2186
|
+
}
|
|
2187
|
+
onClick?.();
|
|
2188
|
+
};
|
|
2189
|
+
return (jsxRuntimeExports.jsx(Box, { ref: ref, fontSize: "sm", role: "button", onClick: handleOnClick, color: "primary.default", children: children }));
|
|
2326
2190
|
});
|
|
2327
|
-
AccordionActionButton.
|
|
2328
|
-
onClick: PropTypes.func,
|
|
2329
|
-
children: PropTypes.node.isRequired
|
|
2330
|
-
};
|
|
2191
|
+
AccordionActionButton.displayName = 'AccordionActionButton';
|
|
2331
2192
|
|
|
2332
2193
|
var _path$5;
|
|
2333
|
-
function _extends$
|
|
2334
|
-
return _extends$
|
|
2194
|
+
function _extends$6() {
|
|
2195
|
+
return _extends$6 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2335
2196
|
for (var e = 1; e < arguments.length; e++) {
|
|
2336
2197
|
var t = arguments[e];
|
|
2337
2198
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2338
2199
|
}
|
|
2339
2200
|
return n;
|
|
2340
|
-
}, _extends$
|
|
2201
|
+
}, _extends$6.apply(null, arguments);
|
|
2341
2202
|
}
|
|
2342
2203
|
var SvgX = function SvgX(props, ref) {
|
|
2343
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
2204
|
+
return /*#__PURE__*/React.createElement("svg", _extends$6({}, props, {
|
|
2344
2205
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2345
2206
|
fill: "currentColor",
|
|
2346
2207
|
viewBox: "0 0 24 24",
|
|
@@ -2354,17 +2215,17 @@ var SvgX = function SvgX(props, ref) {
|
|
|
2354
2215
|
var ForwardRef$5 = /*#__PURE__*/forwardRef(SvgX);
|
|
2355
2216
|
|
|
2356
2217
|
var _path$4;
|
|
2357
|
-
function _extends$
|
|
2358
|
-
return _extends$
|
|
2218
|
+
function _extends$5() {
|
|
2219
|
+
return _extends$5 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2359
2220
|
for (var e = 1; e < arguments.length; e++) {
|
|
2360
2221
|
var t = arguments[e];
|
|
2361
2222
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2362
2223
|
}
|
|
2363
2224
|
return n;
|
|
2364
|
-
}, _extends$
|
|
2225
|
+
}, _extends$5.apply(null, arguments);
|
|
2365
2226
|
}
|
|
2366
2227
|
var SvgInfoCircleFilled = function SvgInfoCircleFilled(props, ref) {
|
|
2367
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
2228
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({}, props, {
|
|
2368
2229
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2369
2230
|
fill: "currentColor",
|
|
2370
2231
|
viewBox: "0 0 24 24",
|
|
@@ -2378,17 +2239,17 @@ var SvgInfoCircleFilled = function SvgInfoCircleFilled(props, ref) {
|
|
|
2378
2239
|
var ForwardRef$4 = /*#__PURE__*/forwardRef(SvgInfoCircleFilled);
|
|
2379
2240
|
|
|
2380
2241
|
var _path$3;
|
|
2381
|
-
function _extends$
|
|
2382
|
-
return _extends$
|
|
2242
|
+
function _extends$4() {
|
|
2243
|
+
return _extends$4 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2383
2244
|
for (var e = 1; e < arguments.length; e++) {
|
|
2384
2245
|
var t = arguments[e];
|
|
2385
2246
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2386
2247
|
}
|
|
2387
2248
|
return n;
|
|
2388
|
-
}, _extends$
|
|
2249
|
+
}, _extends$4.apply(null, arguments);
|
|
2389
2250
|
}
|
|
2390
2251
|
var SvgExclamationTriangleFilled = function SvgExclamationTriangleFilled(props, ref) {
|
|
2391
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
2252
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({}, props, {
|
|
2392
2253
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2393
2254
|
fill: "currentColor",
|
|
2394
2255
|
viewBox: "0 0 24 24",
|
|
@@ -2402,17 +2263,17 @@ var SvgExclamationTriangleFilled = function SvgExclamationTriangleFilled(props,
|
|
|
2402
2263
|
var ForwardRef$3 = /*#__PURE__*/forwardRef(SvgExclamationTriangleFilled);
|
|
2403
2264
|
|
|
2404
2265
|
var _path$2;
|
|
2405
|
-
function _extends$
|
|
2406
|
-
return _extends$
|
|
2266
|
+
function _extends$3() {
|
|
2267
|
+
return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2407
2268
|
for (var e = 1; e < arguments.length; e++) {
|
|
2408
2269
|
var t = arguments[e];
|
|
2409
2270
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2410
2271
|
}
|
|
2411
2272
|
return n;
|
|
2412
|
-
}, _extends$
|
|
2273
|
+
}, _extends$3.apply(null, arguments);
|
|
2413
2274
|
}
|
|
2414
2275
|
var SvgCheckmarkCircleFilled = function SvgCheckmarkCircleFilled(props, ref) {
|
|
2415
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
2276
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({}, props, {
|
|
2416
2277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2417
2278
|
fill: "currentColor",
|
|
2418
2279
|
viewBox: "0 0 24 24",
|
|
@@ -2459,139 +2320,107 @@ const Alert = forwardRef(({ status = 'neutral', title = null, buttonProps = null
|
|
|
2459
2320
|
Alert.displayName = 'Alert';
|
|
2460
2321
|
|
|
2461
2322
|
const variants$b = {
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2323
|
+
line: {
|
|
2324
|
+
tablist: {
|
|
2325
|
+
borderBottom: '2px solid',
|
|
2326
|
+
borderColor: 'inherit',
|
|
2327
|
+
},
|
|
2328
|
+
tab: {
|
|
2329
|
+
color: 'gray.600',
|
|
2330
|
+
borderBottom: '2px solid',
|
|
2331
|
+
borderColor: 'transparent',
|
|
2332
|
+
marginBottom: '-2px',
|
|
2333
|
+
_selected: {
|
|
2334
|
+
color: 'primary.default',
|
|
2335
|
+
borderColor: 'primary.default',
|
|
2336
|
+
fontWeight: 'semibold',
|
|
2337
|
+
},
|
|
2338
|
+
_active: {
|
|
2339
|
+
color: 'black',
|
|
2340
|
+
bg: 'transparent',
|
|
2341
|
+
},
|
|
2342
|
+
_disabled: {
|
|
2343
|
+
opacity: 0.4,
|
|
2344
|
+
cursor: 'not-allowed',
|
|
2345
|
+
},
|
|
2346
|
+
_hover: {
|
|
2347
|
+
color: 'black',
|
|
2348
|
+
},
|
|
2349
|
+
},
|
|
2350
|
+
},
|
|
2351
|
+
enclosed: {
|
|
2352
|
+
tablist: {
|
|
2353
|
+
backgroundColor: 'white',
|
|
2354
|
+
borderRadius: '8px',
|
|
2355
|
+
borderColor: 'gray.200',
|
|
2356
|
+
borderWidth: '1px',
|
|
2357
|
+
paddingY: 1,
|
|
2358
|
+
},
|
|
2359
|
+
tab: {
|
|
2360
|
+
borderRadius: '6px',
|
|
2361
|
+
marginX: 1,
|
|
2362
|
+
_selected: {
|
|
2363
|
+
fontWeight: 'semibold',
|
|
2364
|
+
color: 'white',
|
|
2365
|
+
backgroundColor: 'primary.default',
|
|
2366
|
+
_hover: {
|
|
2367
|
+
backgroundColor: 'primary.600',
|
|
2368
|
+
},
|
|
2369
|
+
},
|
|
2370
|
+
_active: {
|
|
2371
|
+
backgroundColor: 'gray.200',
|
|
2372
|
+
},
|
|
2373
|
+
_disabled: {
|
|
2374
|
+
opacity: 0.4,
|
|
2375
|
+
cursor: 'not-allowed',
|
|
2376
|
+
},
|
|
2377
|
+
},
|
|
2497
2378
|
},
|
|
2498
|
-
tab: {
|
|
2499
|
-
borderRadius: '6px',
|
|
2500
|
-
marginX: 1,
|
|
2501
|
-
_selected: {
|
|
2502
|
-
fontWeight: 'semibold',
|
|
2503
|
-
color: 'white',
|
|
2504
|
-
backgroundColor: 'primary.default',
|
|
2505
|
-
_hover: {
|
|
2506
|
-
backgroundColor: 'primary.600'
|
|
2507
|
-
}
|
|
2508
|
-
},
|
|
2509
|
-
_active: {
|
|
2510
|
-
backgroundColor: 'gray.200'
|
|
2511
|
-
},
|
|
2512
|
-
_disabled: {
|
|
2513
|
-
opacity: 0.4,
|
|
2514
|
-
cursor: 'not-allowed'
|
|
2515
|
-
}
|
|
2516
|
-
}
|
|
2517
|
-
}
|
|
2518
2379
|
};
|
|
2519
|
-
|
|
2520
|
-
|
|
2380
|
+
const tabsStyle = merge(theme$2.components.Tabs, {
|
|
2381
|
+
variants: variants$b,
|
|
2521
2382
|
});
|
|
2522
2383
|
|
|
2523
2384
|
const SIZE_SMALL = 'small';
|
|
2524
2385
|
const SIZE_BODY = 'body';
|
|
2525
2386
|
const SIZE_HEADING = 'heading';
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
let {
|
|
2541
|
-
size,
|
|
2542
|
-
variant = 'line'
|
|
2543
|
-
} = _ref;
|
|
2544
|
-
const fontSizeMapping = {
|
|
2545
|
-
[SIZE_SMALL]: fontSizes.xs,
|
|
2546
|
-
[SIZE_BODY]: fontSizes.base,
|
|
2547
|
-
[SIZE_HEADING]: fontSizes.lg
|
|
2548
|
-
};
|
|
2549
|
-
const styleProps = styles$2.variants["".concat(variant)];
|
|
2550
|
-
styleProps.tab.fontSize = fontSizeMapping[size];
|
|
2551
|
-
return styleProps;
|
|
2387
|
+
const combineSizeWithVariant = ({ size, variant = 'line', }) => {
|
|
2388
|
+
const fontSizeMapping = {
|
|
2389
|
+
[SIZE_SMALL]: fontSizes.xs,
|
|
2390
|
+
[SIZE_BODY]: fontSizes.base,
|
|
2391
|
+
[SIZE_HEADING]: fontSizes.lg,
|
|
2392
|
+
};
|
|
2393
|
+
const styleProps = variants$b[variant];
|
|
2394
|
+
return {
|
|
2395
|
+
...styleProps,
|
|
2396
|
+
tab: {
|
|
2397
|
+
...styleProps.tab,
|
|
2398
|
+
fontSize: fontSizeMapping[size],
|
|
2399
|
+
},
|
|
2400
|
+
};
|
|
2552
2401
|
};
|
|
2553
2402
|
|
|
2554
|
-
const _excluded$a = ["size"];
|
|
2555
2403
|
const sizeMapping = {
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2404
|
+
[SIZE_SMALL]: 'sm',
|
|
2405
|
+
[SIZE_BODY]: 'md',
|
|
2406
|
+
[SIZE_HEADING]: 'lg',
|
|
2559
2407
|
};
|
|
2560
|
-
const Tabs = forwardRef
|
|
2561
|
-
|
|
2562
|
-
size
|
|
2563
|
-
} = _ref,
|
|
2564
|
-
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
2565
|
-
return /*#__PURE__*/React__default.createElement(Tabs$1, _extends$6({
|
|
2566
|
-
size: sizeMapping[size]
|
|
2567
|
-
}, props, combineSizeWithVariant({
|
|
2568
|
-
size
|
|
2569
|
-
}), {
|
|
2570
|
-
ref: ref
|
|
2571
|
-
}));
|
|
2408
|
+
const Tabs = React__default.forwardRef(({ size = SIZE_BODY, ...props }, ref) => {
|
|
2409
|
+
return (jsxRuntimeExports.jsx(Tabs$1, { size: sizeMapping[size], ...props, ...combineSizeWithVariant({ size }), ref: ref }));
|
|
2572
2410
|
});
|
|
2573
|
-
Tabs.defaultProps = {
|
|
2574
|
-
size: SIZE_BODY
|
|
2575
|
-
};
|
|
2576
|
-
Tabs.propTypes = {
|
|
2577
|
-
/** The React node that will render inside the element */
|
|
2578
|
-
children: PropTypes.node,
|
|
2579
|
-
/** Controls the size of Tabs */
|
|
2580
|
-
size: PropTypes.oneOf([SIZE_SMALL, SIZE_BODY, SIZE_HEADING])
|
|
2581
|
-
};
|
|
2582
2411
|
|
|
2583
2412
|
var _path$1;
|
|
2584
|
-
function _extends$
|
|
2585
|
-
return _extends$
|
|
2413
|
+
function _extends$2() {
|
|
2414
|
+
return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2586
2415
|
for (var e = 1; e < arguments.length; e++) {
|
|
2587
2416
|
var t = arguments[e];
|
|
2588
2417
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2589
2418
|
}
|
|
2590
2419
|
return n;
|
|
2591
|
-
}, _extends$
|
|
2420
|
+
}, _extends$2.apply(null, arguments);
|
|
2592
2421
|
}
|
|
2593
2422
|
var SvgChevronDown = function SvgChevronDown(props, ref) {
|
|
2594
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
2423
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({}, props, {
|
|
2595
2424
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2596
2425
|
fill: "currentColor",
|
|
2597
2426
|
viewBox: "0 0 24 24",
|
|
@@ -3045,61 +2874,62 @@ var Heading_styles = {
|
|
|
3045
2874
|
|
|
3046
2875
|
const parts$2 = ['table', 'thead', 'tbody', 'tr', 'th', 'td', 'caption'];
|
|
3047
2876
|
const baseStyle$b = {
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
2877
|
+
table: {
|
|
2878
|
+
borderCollapse: 'collapse',
|
|
2879
|
+
color: 'text.primary.light',
|
|
2880
|
+
width: '100%',
|
|
2881
|
+
},
|
|
2882
|
+
thead: {
|
|
2883
|
+
borderBottom: '1px',
|
|
2884
|
+
borderColor: 'gray.medium',
|
|
2885
|
+
},
|
|
2886
|
+
th: {
|
|
2887
|
+
fontFamily: 'heading',
|
|
2888
|
+
fontSize: variants$9.h4.fontSize,
|
|
2889
|
+
fontWeight: 'semibold',
|
|
2890
|
+
letterSpacing: 'unset',
|
|
2891
|
+
padding: 4,
|
|
2892
|
+
textAlign: 'start',
|
|
2893
|
+
textTransform: 'none',
|
|
2894
|
+
},
|
|
2895
|
+
tr: {
|
|
2896
|
+
borderBottom: '1px',
|
|
2897
|
+
borderColor: 'gray.medium',
|
|
2898
|
+
_last: {
|
|
2899
|
+
border: 'none',
|
|
2900
|
+
},
|
|
2901
|
+
},
|
|
2902
|
+
td: {
|
|
2903
|
+
padding: 4,
|
|
2904
|
+
textAlign: 'start',
|
|
2905
|
+
},
|
|
3077
2906
|
};
|
|
3078
2907
|
const roundedWhiteVariant = {
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
2908
|
+
table: {
|
|
2909
|
+
backgroundColor: 'background.white',
|
|
2910
|
+
borderRadius: 6,
|
|
2911
|
+
boxShadow: 'md',
|
|
2912
|
+
marginBottom: 1,
|
|
2913
|
+
},
|
|
3085
2914
|
};
|
|
3086
2915
|
const roundedGrayVariant = {
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
2916
|
+
table: {
|
|
2917
|
+
...roundedWhiteVariant.table,
|
|
2918
|
+
backgroundColor: 'background.gray',
|
|
2919
|
+
},
|
|
3090
2920
|
};
|
|
3091
2921
|
const variants$8 = {
|
|
3092
|
-
|
|
3093
|
-
|
|
2922
|
+
rounded: roundedWhiteVariant,
|
|
2923
|
+
roundedGray: roundedGrayVariant,
|
|
3094
2924
|
};
|
|
3095
2925
|
const defaultProps$6 = {
|
|
3096
|
-
|
|
2926
|
+
variant: 'rounded',
|
|
3097
2927
|
};
|
|
3098
2928
|
var Table_styles = {
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
2929
|
+
parts: parts$2,
|
|
2930
|
+
variants: variants$8,
|
|
2931
|
+
baseStyle: baseStyle$b,
|
|
2932
|
+
defaultProps: defaultProps$6,
|
|
3103
2933
|
};
|
|
3104
2934
|
|
|
3105
2935
|
const chakraLinkStyle = theme$2.components.Link;
|
|
@@ -3478,23 +3308,19 @@ const switchStyle = {
|
|
|
3478
3308
|
};
|
|
3479
3309
|
|
|
3480
3310
|
const popperStyles = {
|
|
3481
|
-
|
|
3311
|
+
borderRadius: 'base',
|
|
3482
3312
|
};
|
|
3483
3313
|
|
|
3484
|
-
const body$2 =
|
|
3485
|
-
|
|
3314
|
+
const body$2 = (_props) => ({
|
|
3315
|
+
fontSize: 'sm',
|
|
3486
3316
|
});
|
|
3487
3317
|
|
|
3488
3318
|
const headerStyles = {
|
|
3489
|
-
|
|
3490
|
-
|
|
3319
|
+
marginBottom: 2,
|
|
3320
|
+
fontWeight: 'semibold',
|
|
3491
3321
|
};
|
|
3492
3322
|
|
|
3493
|
-
const popoverContentStyles =
|
|
3494
|
-
let {
|
|
3495
|
-
variant
|
|
3496
|
-
} = _ref;
|
|
3497
|
-
return {
|
|
3323
|
+
const popoverContentStyles = ({ variant }) => ({
|
|
3498
3324
|
padding: 4,
|
|
3499
3325
|
marginBottom: 0,
|
|
3500
3326
|
maxWidth: '20rem',
|
|
@@ -3505,24 +3331,23 @@ const popoverContentStyles = _ref => {
|
|
|
3505
3331
|
borderColor: 'gray.100',
|
|
3506
3332
|
borderWidth: '1px',
|
|
3507
3333
|
borderStyle: 'solid',
|
|
3508
|
-
'--popper-arrow-shadow-color': t => t.colors.gray['100'],
|
|
3334
|
+
'--popper-arrow-shadow-color': (t) => t.colors.gray['100'],
|
|
3509
3335
|
zIndex: 'layer10',
|
|
3510
3336
|
_focusVisible: {
|
|
3511
|
-
|
|
3512
|
-
}
|
|
3513
|
-
|
|
3514
|
-
};
|
|
3337
|
+
outline: '3px solid rgba(91, 170, 250, 0.7)',
|
|
3338
|
+
},
|
|
3339
|
+
});
|
|
3515
3340
|
|
|
3516
3341
|
const parts$1 = ['popper', 'content', 'header', 'body'];
|
|
3517
|
-
const baseStyle$6 = props => ({
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3342
|
+
const baseStyle$6 = (props) => ({
|
|
3343
|
+
header: headerStyles,
|
|
3344
|
+
content: popoverContentStyles(props),
|
|
3345
|
+
body: body$2(),
|
|
3346
|
+
popper: popperStyles,
|
|
3522
3347
|
});
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3348
|
+
const popoverStyle = merge(theme$2.components.Popover, {
|
|
3349
|
+
parts: parts$1,
|
|
3350
|
+
baseStyle: baseStyle$6,
|
|
3526
3351
|
});
|
|
3527
3352
|
|
|
3528
3353
|
const baseStyle$5 = {
|
|
@@ -3571,6 +3396,79 @@ const inputStyle = merge(theme$2.components.Input, {
|
|
|
3571
3396
|
variants: variants$5,
|
|
3572
3397
|
});
|
|
3573
3398
|
|
|
3399
|
+
function _defineProperty(e, r, t) {
|
|
3400
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
3401
|
+
value: t,
|
|
3402
|
+
enumerable: !0,
|
|
3403
|
+
configurable: !0,
|
|
3404
|
+
writable: !0
|
|
3405
|
+
}) : e[r] = t, e;
|
|
3406
|
+
}
|
|
3407
|
+
function _extends$1() {
|
|
3408
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
|
|
3409
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
3410
|
+
var t = arguments[e];
|
|
3411
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
3412
|
+
}
|
|
3413
|
+
return n;
|
|
3414
|
+
}, _extends$1.apply(null, arguments);
|
|
3415
|
+
}
|
|
3416
|
+
function ownKeys(e, r) {
|
|
3417
|
+
var t = Object.keys(e);
|
|
3418
|
+
if (Object.getOwnPropertySymbols) {
|
|
3419
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
3420
|
+
r && (o = o.filter(function (r) {
|
|
3421
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
3422
|
+
})), t.push.apply(t, o);
|
|
3423
|
+
}
|
|
3424
|
+
return t;
|
|
3425
|
+
}
|
|
3426
|
+
function _objectSpread2(e) {
|
|
3427
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
3428
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
3429
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
3430
|
+
_defineProperty(e, r, t[r]);
|
|
3431
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
3432
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
3433
|
+
});
|
|
3434
|
+
}
|
|
3435
|
+
return e;
|
|
3436
|
+
}
|
|
3437
|
+
function _objectWithoutProperties(e, t) {
|
|
3438
|
+
if (null == e) return {};
|
|
3439
|
+
var o,
|
|
3440
|
+
r,
|
|
3441
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
3442
|
+
if (Object.getOwnPropertySymbols) {
|
|
3443
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
3444
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
3445
|
+
}
|
|
3446
|
+
return i;
|
|
3447
|
+
}
|
|
3448
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
3449
|
+
if (null == r) return {};
|
|
3450
|
+
var t = {};
|
|
3451
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
3452
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
3453
|
+
t[n] = r[n];
|
|
3454
|
+
}
|
|
3455
|
+
return t;
|
|
3456
|
+
}
|
|
3457
|
+
function _toPrimitive(t, r) {
|
|
3458
|
+
if ("object" != typeof t || !t) return t;
|
|
3459
|
+
var e = t[Symbol.toPrimitive];
|
|
3460
|
+
if (void 0 !== e) {
|
|
3461
|
+
var i = e.call(t, r || "default");
|
|
3462
|
+
if ("object" != typeof i) return i;
|
|
3463
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3464
|
+
}
|
|
3465
|
+
return ("string" === r ? String : Number)(t);
|
|
3466
|
+
}
|
|
3467
|
+
function _toPropertyKey(t) {
|
|
3468
|
+
var i = _toPrimitive(t, "string");
|
|
3469
|
+
return "symbol" == typeof i ? i : i + "";
|
|
3470
|
+
}
|
|
3471
|
+
|
|
3574
3472
|
//Below isn't being used in build for some reason
|
|
3575
3473
|
const variants$4 = {
|
|
3576
3474
|
refreshed: {
|
|
@@ -3581,7 +3479,7 @@ const variants$4 = {
|
|
|
3581
3479
|
})
|
|
3582
3480
|
}
|
|
3583
3481
|
};
|
|
3584
|
-
var index$
|
|
3482
|
+
var index$1 = merge(inputStyle, {
|
|
3585
3483
|
variants: variants$4
|
|
3586
3484
|
});
|
|
3587
3485
|
|
|
@@ -3615,53 +3513,36 @@ const variants$3 = {
|
|
|
3615
3513
|
minHeight: "14"
|
|
3616
3514
|
})
|
|
3617
3515
|
};
|
|
3618
|
-
var index
|
|
3516
|
+
var index = merge(buttonStyle, {
|
|
3619
3517
|
variants: variants$3
|
|
3620
3518
|
});
|
|
3621
3519
|
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3520
|
+
const overlay = {
|
|
3521
|
+
background: 'modalOverlay',
|
|
3522
|
+
zIndex: 'layer8',
|
|
3625
3523
|
};
|
|
3626
3524
|
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
},
|
|
3635
|
-
height: '100%',
|
|
3636
|
-
minHeight: '-moz-available',
|
|
3637
|
-
minHeight: '-webkit-fill-available',
|
|
3638
|
-
minHeight: 'fill-available'
|
|
3525
|
+
const dialogContainer$1 = {
|
|
3526
|
+
display: 'flex',
|
|
3527
|
+
zIndex: 'layer8',
|
|
3528
|
+
justifyContent: 'center',
|
|
3529
|
+
alignItems: { base: 'flex-end', tablet: 'center' },
|
|
3530
|
+
height: '100%',
|
|
3531
|
+
minHeight: 'fill-available',
|
|
3639
3532
|
};
|
|
3640
3533
|
|
|
3641
|
-
|
|
3642
|
-
let {
|
|
3643
|
-
hasFooter
|
|
3644
|
-
} = _ref;
|
|
3645
|
-
return {
|
|
3534
|
+
const dialog$1 = ({ hasFooter }) => ({
|
|
3646
3535
|
borderRadius: 'md',
|
|
3647
|
-
borderBottomRadius: {
|
|
3648
|
-
base: '0',
|
|
3649
|
-
tablet: 'md'
|
|
3650
|
-
},
|
|
3536
|
+
borderBottomRadius: { base: '0', tablet: 'md' },
|
|
3651
3537
|
background: 'white',
|
|
3652
3538
|
color: 'inherit',
|
|
3653
3539
|
marginY: 0,
|
|
3654
3540
|
zIndex: 'layer8',
|
|
3655
3541
|
boxShadow: 'lg',
|
|
3656
|
-
paddingBottom: hasFooter ? 0 : 4
|
|
3657
|
-
|
|
3658
|
-
};
|
|
3542
|
+
paddingBottom: hasFooter ? 0 : 4,
|
|
3543
|
+
});
|
|
3659
3544
|
|
|
3660
|
-
|
|
3661
|
-
let {
|
|
3662
|
-
hasHeader
|
|
3663
|
-
} = _ref;
|
|
3664
|
-
return {
|
|
3545
|
+
const closeButton$1 = ({ hasHeader }) => ({
|
|
3665
3546
|
position: 'absolute',
|
|
3666
3547
|
top: hasHeader ? 4 : 2,
|
|
3667
3548
|
insetEnd: hasHeader ? 4 : 2,
|
|
@@ -3670,93 +3551,88 @@ var closeButton$1 = _ref => {
|
|
|
3670
3551
|
width: 8,
|
|
3671
3552
|
height: 8,
|
|
3672
3553
|
_focus: {
|
|
3673
|
-
|
|
3554
|
+
boxShadow: 'outline',
|
|
3674
3555
|
},
|
|
3675
3556
|
_hover: {
|
|
3676
|
-
|
|
3677
|
-
}
|
|
3678
|
-
|
|
3679
|
-
};
|
|
3557
|
+
bg: 'gray.50',
|
|
3558
|
+
},
|
|
3559
|
+
});
|
|
3680
3560
|
|
|
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);
|
|
3703
|
-
};
|
|
3704
|
-
|
|
3705
|
-
var footer$1 = {
|
|
3706
|
-
borderTop: '1px',
|
|
3707
|
-
borderColor: 'gray.100',
|
|
3708
|
-
padding: 4,
|
|
3709
|
-
gap: 4,
|
|
3710
|
-
justifyContent: 'flex-start',
|
|
3711
|
-
flexDirection: {
|
|
3712
|
-
base: 'column',
|
|
3713
|
-
desktop: 'row-reverse'
|
|
3714
|
-
}
|
|
3561
|
+
const body$1 = ({ hasFooter, hasHeader, hideCloseButton }) => {
|
|
3562
|
+
const scrollingHeaderStyles = hasHeader || !hideCloseButton
|
|
3563
|
+
? {
|
|
3564
|
+
// The following adapted from https://lea.verou.me/2012/04/background-attachment-local/
|
|
3565
|
+
background: 'linear-gradient(white 30%, white), linear-gradient(rgb(0 0 0 / 10%) 0%, white)',
|
|
3566
|
+
backgroundRepeat: 'no-repeat',
|
|
3567
|
+
backgroundColor: 'white',
|
|
3568
|
+
backgroundSize: '100% 30px, 100% 10px',
|
|
3569
|
+
backgroundAttachment: 'local, scroll',
|
|
3570
|
+
}
|
|
3571
|
+
: {};
|
|
3572
|
+
return {
|
|
3573
|
+
borderBottomRadius: hasFooter ? null : 'md',
|
|
3574
|
+
paddingX: 4,
|
|
3575
|
+
paddingBottom: 4,
|
|
3576
|
+
flex: 1,
|
|
3577
|
+
overflow: 'auto',
|
|
3578
|
+
display: 'flex',
|
|
3579
|
+
...scrollingHeaderStyles,
|
|
3580
|
+
};
|
|
3715
3581
|
};
|
|
3716
3582
|
|
|
3717
|
-
const
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3583
|
+
const footer$1 = {
|
|
3584
|
+
borderTop: '1px',
|
|
3585
|
+
borderColor: 'gray.100',
|
|
3586
|
+
padding: 4,
|
|
3587
|
+
gap: 4,
|
|
3588
|
+
justifyContent: 'flex-start',
|
|
3589
|
+
alignItems: 'normal',
|
|
3590
|
+
flexDirection: { base: 'column', desktop: 'row-reverse' },
|
|
3591
|
+
};
|
|
3592
|
+
|
|
3593
|
+
const baseStyle$4 = (props) => ({
|
|
3594
|
+
overlay,
|
|
3595
|
+
dialogContainer: dialogContainer$1,
|
|
3596
|
+
header: header$1(props),
|
|
3597
|
+
dialog: dialog$1(props),
|
|
3598
|
+
closeButton: closeButton$1(props),
|
|
3599
|
+
body: body$1(props),
|
|
3600
|
+
footer: footer$1,
|
|
3725
3601
|
});
|
|
3726
3602
|
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
|
-
|
|
3603
|
+
sm: {
|
|
3604
|
+
dialog: {
|
|
3605
|
+
// Would have preferred object syntax here and below, but wasn't working for whatever reason
|
|
3606
|
+
maxWidth: ['100%', '100%', '48%', '32%', '24%'],
|
|
3607
|
+
maxHeight: ['100%', '100%', '60%', '48%', '32%'],
|
|
3608
|
+
minHeight: ['auto', 'auto', '32%', '32%', '24%'],
|
|
3609
|
+
},
|
|
3610
|
+
},
|
|
3611
|
+
'sm-md': {
|
|
3612
|
+
dialog: {
|
|
3613
|
+
maxHeight: ['100%', '100%', '65%', '65%', '65%'],
|
|
3614
|
+
minWidth: ['100%', '100%', 96, 96, 96],
|
|
3615
|
+
maxWidth: ['100%', '100%', '55%', '42%', '30%'],
|
|
3616
|
+
},
|
|
3617
|
+
},
|
|
3618
|
+
md: {
|
|
3619
|
+
dialog: {
|
|
3620
|
+
maxWidth: ['100%', '100%', '84%', '60%', '48%'],
|
|
3621
|
+
maxHeight: ['100%', '100%', '96%', '84%', '60%'],
|
|
3622
|
+
minHeight: ['auto', 'auto', '84%', '60%', '48%'],
|
|
3623
|
+
},
|
|
3624
|
+
},
|
|
3625
|
+
lg: {
|
|
3626
|
+
dialog: {
|
|
3627
|
+
maxWidth: ['100%', '100%', '96%', '84%', '72%'],
|
|
3628
|
+
maxHeight: ['100%', '100%', '96%', '96%', '84%'],
|
|
3629
|
+
minHeight: ['auto', 'auto', '96%', '84%', '72%'],
|
|
3630
|
+
},
|
|
3631
|
+
},
|
|
3756
3632
|
};
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3633
|
+
const modalStyle = merge(theme$2.components.Modal, {
|
|
3634
|
+
baseStyle: baseStyle$4,
|
|
3635
|
+
sizes: sizes$3,
|
|
3760
3636
|
});
|
|
3761
3637
|
|
|
3762
3638
|
const parts = ['control', 'label'];
|
|
@@ -4091,168 +3967,168 @@ const progressStyle = {
|
|
|
4091
3967
|
};
|
|
4092
3968
|
|
|
4093
3969
|
const baseStyle = {
|
|
4094
|
-
button: {
|
|
4095
|
-
px: 8,
|
|
4096
|
-
py: 3,
|
|
4097
|
-
fontSize: 'base',
|
|
4098
|
-
fontFamily: 'body',
|
|
4099
|
-
lineHeight: 0.875,
|
|
4100
|
-
fontWeight: 'semibold',
|
|
4101
|
-
borderWidth: '1px',
|
|
4102
|
-
borderStyle: 'solid',
|
|
4103
|
-
borderRadius: 'base',
|
|
4104
|
-
textTransform: 'capitalize',
|
|
4105
|
-
transition: 'all normal ease',
|
|
4106
|
-
_hover: {
|
|
4107
|
-
bg: 'gray.50',
|
|
4108
|
-
borderColor: 'gray.200'
|
|
4109
|
-
},
|
|
4110
|
-
_disabled: {
|
|
4111
|
-
cursor: 'not-allowed',
|
|
4112
|
-
opacity: 1,
|
|
4113
|
-
bg: 'gray.200',
|
|
4114
|
-
borderColor: 'gray.200',
|
|
4115
|
-
color: 'gray.600'
|
|
4116
|
-
},
|
|
4117
|
-
_focus: {
|
|
4118
|
-
zIndex: 1,
|
|
4119
|
-
boxShadow: 'outline'
|
|
4120
|
-
}
|
|
4121
|
-
},
|
|
4122
|
-
list: {
|
|
4123
|
-
bg: 'white',
|
|
4124
|
-
boxShadow: 'base',
|
|
4125
|
-
padding: 6,
|
|
4126
|
-
zIndex: 'layer1',
|
|
4127
|
-
width: 64
|
|
4128
|
-
},
|
|
4129
|
-
item: {
|
|
4130
|
-
paddingX: 2,
|
|
4131
|
-
paddingY: 1.5,
|
|
4132
|
-
_focus: {
|
|
4133
|
-
zIndex: 1,
|
|
4134
|
-
boxShadow: 'outline'
|
|
4135
|
-
}
|
|
4136
|
-
},
|
|
4137
|
-
groupTitle: {
|
|
4138
|
-
fontWeight: 'semibold',
|
|
4139
|
-
color: 'gray.600',
|
|
4140
|
-
padding: 2
|
|
4141
|
-
},
|
|
4142
|
-
command: {
|
|
4143
|
-
// this will style the text defined by the command
|
|
4144
|
-
// prop in the MenuItem and MenuItemOption components
|
|
4145
|
-
opacity: '0.8',
|
|
4146
|
-
fontFamily: 'mono',
|
|
4147
|
-
fontSize: 'sm',
|
|
4148
|
-
letterSpacing: 'tighter',
|
|
4149
|
-
paddingL: 4
|
|
4150
|
-
},
|
|
4151
|
-
divider: {
|
|
4152
|
-
marginY: 2,
|
|
4153
|
-
borderColor: 'gray.200'
|
|
4154
|
-
}
|
|
4155
|
-
};
|
|
4156
|
-
const variants = {
|
|
4157
|
-
basic: {
|
|
4158
3970
|
button: {
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
3971
|
+
px: 8,
|
|
3972
|
+
py: 3,
|
|
3973
|
+
fontSize: 'base',
|
|
3974
|
+
fontFamily: 'body',
|
|
3975
|
+
lineHeight: 0.875,
|
|
3976
|
+
fontWeight: 'semibold',
|
|
3977
|
+
borderWidth: '1px',
|
|
3978
|
+
borderStyle: 'solid',
|
|
3979
|
+
borderRadius: 'base',
|
|
3980
|
+
textTransform: 'capitalize',
|
|
3981
|
+
transition: 'all normal ease',
|
|
3982
|
+
_hover: {
|
|
3983
|
+
bg: 'gray.50',
|
|
3984
|
+
borderColor: 'gray.200',
|
|
3985
|
+
},
|
|
4166
3986
|
_disabled: {
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
3987
|
+
cursor: 'not-allowed',
|
|
3988
|
+
opacity: 1,
|
|
3989
|
+
bg: 'gray.200',
|
|
3990
|
+
borderColor: 'gray.200',
|
|
3991
|
+
color: 'gray.600',
|
|
3992
|
+
},
|
|
3993
|
+
_focus: {
|
|
3994
|
+
zIndex: 1,
|
|
3995
|
+
boxShadow: 'outline',
|
|
3996
|
+
},
|
|
4172
3997
|
},
|
|
4173
3998
|
list: {
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
3999
|
+
bg: 'white',
|
|
4000
|
+
boxShadow: 'base',
|
|
4001
|
+
padding: 6,
|
|
4002
|
+
zIndex: 'layer1',
|
|
4003
|
+
width: 64,
|
|
4004
|
+
},
|
|
4005
|
+
item: {
|
|
4006
|
+
paddingX: 2,
|
|
4007
|
+
paddingY: 1.5,
|
|
4008
|
+
_focus: {
|
|
4009
|
+
zIndex: 1,
|
|
4010
|
+
boxShadow: 'outline',
|
|
4011
|
+
},
|
|
4183
4012
|
},
|
|
4184
4013
|
groupTitle: {
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
padding: 2
|
|
4014
|
+
fontWeight: 'semibold',
|
|
4015
|
+
color: 'gray.600',
|
|
4016
|
+
padding: 2,
|
|
4189
4017
|
},
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
button: {
|
|
4199
|
-
height: 8,
|
|
4200
|
-
fontSize: 'sm',
|
|
4201
|
-
fontWeight: 'semibold',
|
|
4202
|
-
color: 'black',
|
|
4203
|
-
borderColor: 'white',
|
|
4204
|
-
backgroundColor: 'white',
|
|
4205
|
-
borderRadius: 'base',
|
|
4206
|
-
paddingX: 3,
|
|
4207
|
-
paddingY: 'auto',
|
|
4208
|
-
_hover: {
|
|
4209
|
-
color: 'black',
|
|
4210
|
-
backgroundColor: 'gray.50',
|
|
4211
|
-
borderColor: 'gray.50'
|
|
4212
|
-
},
|
|
4213
|
-
_active: {
|
|
4214
|
-
color: 'primary.default',
|
|
4215
|
-
backgroundColor: 'gray.50',
|
|
4216
|
-
borderColor: 'gray.50',
|
|
4217
|
-
_hover: {
|
|
4218
|
-
color: 'primary.600',
|
|
4219
|
-
backgroundColor: 'gray.50',
|
|
4220
|
-
borderColor: 'gray.50'
|
|
4221
|
-
}
|
|
4222
|
-
}
|
|
4018
|
+
command: {
|
|
4019
|
+
// this will style the text defined by the command
|
|
4020
|
+
// prop in the MenuItem and MenuItemOption components
|
|
4021
|
+
opacity: '0.8',
|
|
4022
|
+
fontFamily: 'mono',
|
|
4023
|
+
fontSize: 'sm',
|
|
4024
|
+
letterSpacing: 'tighter',
|
|
4025
|
+
paddingLeft: 4,
|
|
4223
4026
|
},
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
padding: 8,
|
|
4228
|
-
backgroundColor: 'white'
|
|
4027
|
+
divider: {
|
|
4028
|
+
marginY: 2,
|
|
4029
|
+
borderColor: 'gray.200',
|
|
4229
4030
|
},
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4031
|
+
};
|
|
4032
|
+
const variants = {
|
|
4033
|
+
basic: {
|
|
4034
|
+
button: {
|
|
4035
|
+
bg: 'primary.default',
|
|
4036
|
+
borderColor: 'primary.default',
|
|
4037
|
+
color: 'white',
|
|
4038
|
+
_hover: {
|
|
4039
|
+
bg: 'primary.600',
|
|
4040
|
+
borderColor: 'primary.600',
|
|
4041
|
+
color: 'white',
|
|
4042
|
+
_disabled: {
|
|
4043
|
+
bg: 'gray.200',
|
|
4044
|
+
borderColor: 'gray.200',
|
|
4045
|
+
color: 'gray.600',
|
|
4046
|
+
},
|
|
4047
|
+
},
|
|
4048
|
+
},
|
|
4049
|
+
list: {
|
|
4050
|
+
bg: 'white',
|
|
4051
|
+
boxShadow: 'base',
|
|
4052
|
+
zIndex: 'layer1',
|
|
4053
|
+
borderColor: 'gray.100',
|
|
4054
|
+
borderWidth: '1px',
|
|
4055
|
+
borderStyle: 'solid',
|
|
4056
|
+
borderRadius: 'base',
|
|
4057
|
+
padding: 4,
|
|
4058
|
+
width: 64,
|
|
4059
|
+
},
|
|
4060
|
+
groupTitle: {
|
|
4061
|
+
fontWeight: 'semibold',
|
|
4062
|
+
fontSize: 'md',
|
|
4063
|
+
color: 'gray.600',
|
|
4064
|
+
padding: 2,
|
|
4065
|
+
},
|
|
4066
|
+
item: {
|
|
4067
|
+
fontWeight: 'semibold',
|
|
4068
|
+
_hover: {
|
|
4069
|
+
color: 'gray.600',
|
|
4070
|
+
},
|
|
4071
|
+
},
|
|
4072
|
+
},
|
|
4073
|
+
full: {
|
|
4074
|
+
button: {
|
|
4075
|
+
height: 8,
|
|
4076
|
+
fontSize: 'sm',
|
|
4077
|
+
fontWeight: 'semibold',
|
|
4078
|
+
color: 'black',
|
|
4079
|
+
borderColor: 'white',
|
|
4080
|
+
backgroundColor: 'white',
|
|
4081
|
+
borderRadius: 'base',
|
|
4082
|
+
paddingX: 3,
|
|
4083
|
+
paddingY: 'auto',
|
|
4084
|
+
_hover: {
|
|
4085
|
+
color: 'black',
|
|
4086
|
+
backgroundColor: 'gray.50',
|
|
4087
|
+
borderColor: 'gray.50',
|
|
4088
|
+
},
|
|
4089
|
+
_active: {
|
|
4090
|
+
color: 'primary.default',
|
|
4091
|
+
backgroundColor: 'gray.50',
|
|
4092
|
+
borderColor: 'gray.50',
|
|
4093
|
+
_hover: {
|
|
4094
|
+
color: 'primary.600',
|
|
4095
|
+
backgroundColor: 'gray.50',
|
|
4096
|
+
borderColor: 'gray.50',
|
|
4097
|
+
},
|
|
4098
|
+
},
|
|
4099
|
+
},
|
|
4100
|
+
list: {
|
|
4101
|
+
height: '30rem',
|
|
4102
|
+
width: '100vw',
|
|
4103
|
+
padding: 8,
|
|
4104
|
+
backgroundColor: 'white',
|
|
4105
|
+
},
|
|
4106
|
+
groupTitle: {
|
|
4107
|
+
fontSize: 'sm',
|
|
4108
|
+
weight: 'normal',
|
|
4109
|
+
color: 'gray.600',
|
|
4110
|
+
},
|
|
4111
|
+
item: {
|
|
4112
|
+
display: 'block',
|
|
4113
|
+
paddingX: 3.5,
|
|
4114
|
+
paddingY: 2.5,
|
|
4115
|
+
marginBottom: 2,
|
|
4116
|
+
_last: {
|
|
4117
|
+
marginBottom: 0,
|
|
4118
|
+
},
|
|
4119
|
+
_hover: {
|
|
4120
|
+
backgroundColor: 'gray.50',
|
|
4121
|
+
},
|
|
4122
|
+
_focus: {
|
|
4123
|
+
boxShadow: 'none',
|
|
4124
|
+
backgroundColor: 'gray.50',
|
|
4125
|
+
},
|
|
4126
|
+
},
|
|
4234
4127
|
},
|
|
4235
|
-
item: {
|
|
4236
|
-
display: 'block',
|
|
4237
|
-
paddingX: 3.5,
|
|
4238
|
-
paddingY: 2.5,
|
|
4239
|
-
marginBottom: 2,
|
|
4240
|
-
_last: {
|
|
4241
|
-
marginBottom: 0
|
|
4242
|
-
},
|
|
4243
|
-
_hover: {
|
|
4244
|
-
backgroundColor: 'gray.50'
|
|
4245
|
-
},
|
|
4246
|
-
_focus: {
|
|
4247
|
-
boxShadow: 'none',
|
|
4248
|
-
backgroundColor: 'gray.50'
|
|
4249
|
-
}
|
|
4250
|
-
}
|
|
4251
|
-
}
|
|
4252
4128
|
};
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4129
|
+
const menuStyle = merge(theme$2.components.Menu, {
|
|
4130
|
+
baseStyle,
|
|
4131
|
+
variants,
|
|
4256
4132
|
});
|
|
4257
4133
|
|
|
4258
4134
|
var components = /*#__PURE__*/Object.freeze({
|
|
@@ -4260,19 +4136,19 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
4260
4136
|
Accordion: theme$1,
|
|
4261
4137
|
Badge: badgeStyle,
|
|
4262
4138
|
Button: buttonStyle,
|
|
4263
|
-
ButtonRefreshed: index
|
|
4139
|
+
ButtonRefreshed: index,
|
|
4264
4140
|
Checkbox: checkboxStyle,
|
|
4265
4141
|
Divider: dividerStyle,
|
|
4266
4142
|
Drawer: drawerStyle,
|
|
4267
4143
|
GridItem: styles$1,
|
|
4268
4144
|
Heading: Heading_styles,
|
|
4269
4145
|
Input: inputStyle,
|
|
4270
|
-
InputRefreshed: index$
|
|
4146
|
+
InputRefreshed: index$1,
|
|
4271
4147
|
Link: linkStyle,
|
|
4272
4148
|
List: listStyle,
|
|
4273
|
-
Menu:
|
|
4274
|
-
Modal:
|
|
4275
|
-
Popover:
|
|
4149
|
+
Menu: menuStyle,
|
|
4150
|
+
Modal: modalStyle,
|
|
4151
|
+
Popover: popoverStyle,
|
|
4276
4152
|
Progress: progressStyle,
|
|
4277
4153
|
Radio: radioStyle,
|
|
4278
4154
|
Select: selectStyle,
|
|
@@ -4281,7 +4157,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
4281
4157
|
Spinner: Spinner_styles,
|
|
4282
4158
|
Switch: switchStyle,
|
|
4283
4159
|
Table: Table_styles,
|
|
4284
|
-
Tabs:
|
|
4160
|
+
Tabs: tabsStyle,
|
|
4285
4161
|
Text: textStyle
|
|
4286
4162
|
});
|
|
4287
4163
|
|
|
@@ -4303,32 +4179,8 @@ const baseConfig = {
|
|
|
4303
4179
|
};
|
|
4304
4180
|
var THEME = extendTheme(extendedTheme, baseConfig);
|
|
4305
4181
|
|
|
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
|
-
};
|
|
4182
|
+
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] }));
|
|
4183
|
+
ThemeProvider.displayName = 'ThemeProvider';
|
|
4332
4184
|
|
|
4333
4185
|
const Card = forwardRef((props, ref) => (jsxRuntimeExports.jsx(Box, { position: "relative", padding: 4, bgColor: "background.white", borderRadius: "lg", boxShadow: "md", ...props, ref: ref })));
|
|
4334
4186
|
Card.displayName = 'Card';
|
|
@@ -4430,7 +4282,7 @@ const Input$1 = forwardRef(({ label, helperText, errorMessage, isInvalid, isDisa
|
|
|
4430
4282
|
});
|
|
4431
4283
|
Input$1.displayName = 'Input';
|
|
4432
4284
|
|
|
4433
|
-
const _excluded$
|
|
4285
|
+
const _excluded$5 = ["label", "helperText", "errorMessage", "id", "children", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles"];
|
|
4434
4286
|
|
|
4435
4287
|
// No clue how to move these into the style file so just co-located to keep from slowing down
|
|
4436
4288
|
// Chakra V2 will heavily impact this component
|
|
@@ -4455,7 +4307,6 @@ const activeLabelStyles = {
|
|
|
4455
4307
|
fontSize: '0.85em',
|
|
4456
4308
|
transform: 'translateY(-.75rem)',
|
|
4457
4309
|
_invalid: {
|
|
4458
|
-
color: 'error',
|
|
4459
4310
|
'& .chakra-form__required-indicator': {
|
|
4460
4311
|
display: 'none'
|
|
4461
4312
|
}
|
|
@@ -4554,10 +4405,10 @@ const FormControl = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4554
4405
|
rightElementStyles,
|
|
4555
4406
|
leftElementStyles
|
|
4556
4407
|
} = _ref,
|
|
4557
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4558
|
-
return /*#__PURE__*/React__default.createElement(FormControl$2, _extends$
|
|
4408
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
4409
|
+
return /*#__PURE__*/React__default.createElement(FormControl$2, _extends$1({}, props, {
|
|
4559
4410
|
ref: ref
|
|
4560
|
-
}, controlStyles), /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && /*#__PURE__*/React__default.createElement(InputLeftElement, _extends$
|
|
4411
|
+
}, controlStyles), /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && /*#__PURE__*/React__default.createElement(InputLeftElement, _extends$1({
|
|
4561
4412
|
pointerEvents: "none",
|
|
4562
4413
|
top: "52%",
|
|
4563
4414
|
left: "1.3rem",
|
|
@@ -4568,7 +4419,7 @@ const FormControl = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4568
4419
|
position: "relative"
|
|
4569
4420
|
}, children, label && /*#__PURE__*/React__default.createElement(FormLabel, {
|
|
4570
4421
|
htmlFor: id
|
|
4571
|
-
}, label)), rightElement && /*#__PURE__*/React__default.createElement(InputRightElement, _extends$
|
|
4422
|
+
}, label)), rightElement && /*#__PURE__*/React__default.createElement(InputRightElement, _extends$1({
|
|
4572
4423
|
top: "50%",
|
|
4573
4424
|
right: "-1rem",
|
|
4574
4425
|
transform: "translate(-50%,-50%)"
|
|
@@ -4596,7 +4447,7 @@ FormControl.propTypes = {
|
|
|
4596
4447
|
isInvalid: PropTypes.bool
|
|
4597
4448
|
};
|
|
4598
4449
|
|
|
4599
|
-
const _excluded$
|
|
4450
|
+
const _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "placeholder"];
|
|
4600
4451
|
|
|
4601
4452
|
/**
|
|
4602
4453
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4617,7 +4468,7 @@ const Input = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4617
4468
|
leftElementStyles,
|
|
4618
4469
|
placeholder = ' '
|
|
4619
4470
|
} = _ref,
|
|
4620
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4471
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
4621
4472
|
const classes = cn({
|
|
4622
4473
|
'FormElement-contains-error': isInvalid
|
|
4623
4474
|
}); //Historic carry over
|
|
@@ -4635,7 +4486,7 @@ const Input = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4635
4486
|
rightElementStyles: rightElementStyles,
|
|
4636
4487
|
leftElementStyles: leftElementStyles,
|
|
4637
4488
|
variant: "refreshed"
|
|
4638
|
-
}, /*#__PURE__*/React__default.createElement(Input$2, _extends$
|
|
4489
|
+
}, /*#__PURE__*/React__default.createElement(Input$2, _extends$1({
|
|
4639
4490
|
placeholder: placeholder,
|
|
4640
4491
|
ref: ref,
|
|
4641
4492
|
className: classes,
|
|
@@ -4660,7 +4511,7 @@ Input.propTypes = {
|
|
|
4660
4511
|
leftElementStyles: PropTypes.object
|
|
4661
4512
|
};
|
|
4662
4513
|
|
|
4663
|
-
const _excluded$
|
|
4514
|
+
const _excluded$3 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "formControlStyles"];
|
|
4664
4515
|
|
|
4665
4516
|
//For select left is static arrow,
|
|
4666
4517
|
/**
|
|
@@ -4684,7 +4535,7 @@ const Select = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4684
4535
|
leftElementStyles,
|
|
4685
4536
|
formControlStyles
|
|
4686
4537
|
} = _ref,
|
|
4687
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4538
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
4688
4539
|
const classes = cn({
|
|
4689
4540
|
'FormElement-contains-error': isInvalid
|
|
4690
4541
|
});
|
|
@@ -4701,7 +4552,7 @@ const Select = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4701
4552
|
rightElementStyles: rightElementStyles,
|
|
4702
4553
|
leftElementStyles: leftElementStyles,
|
|
4703
4554
|
sx: formControlStyles
|
|
4704
|
-
}, /*#__PURE__*/React__default.createElement(Select$2, _extends$
|
|
4555
|
+
}, /*#__PURE__*/React__default.createElement(Select$2, _extends$1({
|
|
4705
4556
|
icon: /*#__PURE__*/React__default.createElement(Icon, {
|
|
4706
4557
|
as: ForwardRef$1
|
|
4707
4558
|
}),
|
|
@@ -4725,7 +4576,7 @@ Select.propTypes = {
|
|
|
4725
4576
|
rightElementStyles: PropTypes.object
|
|
4726
4577
|
};
|
|
4727
4578
|
|
|
4728
|
-
const _excluded$
|
|
4579
|
+
const _excluded$2 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
|
|
4729
4580
|
|
|
4730
4581
|
/**
|
|
4731
4582
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4749,7 +4600,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4749
4600
|
leftElementStyles,
|
|
4750
4601
|
buttonValue
|
|
4751
4602
|
} = _ref,
|
|
4752
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4603
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
4753
4604
|
const classes = cn({
|
|
4754
4605
|
'FormElement-contains-error': isInvalid
|
|
4755
4606
|
}); //Historic carry over
|
|
@@ -4767,7 +4618,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4767
4618
|
rightElementStyles: rightElementStyles,
|
|
4768
4619
|
leftElementStyles: leftElementStyles,
|
|
4769
4620
|
variant: "refreshed"
|
|
4770
|
-
}, /*#__PURE__*/React__default.createElement(Button$2, _extends$
|
|
4621
|
+
}, /*#__PURE__*/React__default.createElement(Button$2, _extends$1({
|
|
4771
4622
|
ref: ref,
|
|
4772
4623
|
className: classes,
|
|
4773
4624
|
variant: "refreshed",
|
|
@@ -4920,7 +4771,7 @@ const AutoSuggestSelect$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4920
4771
|
innerRef,
|
|
4921
4772
|
innerProps
|
|
4922
4773
|
} = _ref2;
|
|
4923
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$
|
|
4774
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
4924
4775
|
style: clearIndicatorStyles,
|
|
4925
4776
|
ref: innerRef
|
|
4926
4777
|
}, innerProps), /*#__PURE__*/React__default.createElement(ForwardRef, null));
|
|
@@ -5004,104 +4855,31 @@ const RadioGroup = forwardRef(({ label, errorMessage, defaultValue, isDisabled,
|
|
|
5004
4855
|
});
|
|
5005
4856
|
RadioGroup.displayName = 'RadioGroup';
|
|
5006
4857
|
|
|
5007
|
-
const
|
|
5008
|
-
const SelectionCard =
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
}
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
// Create a unique key based on the content to force re-animation
|
|
5031
|
-
const contentKey = React__default.useMemo(() => {
|
|
5032
|
-
if (typeof expandableChildren === 'string') {
|
|
5033
|
-
return expandableChildren;
|
|
5034
|
-
}
|
|
5035
|
-
return expandableContentKey || JSON.stringify(expandableChildren === null || expandableChildren === void 0 ? void 0 : expandableChildren.props) || Math.random();
|
|
5036
|
-
}, [expandableChildren, expandableContentKey]);
|
|
5037
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
5038
|
-
borderRadius: "lg",
|
|
5039
|
-
borderColor: isChecked ? 'primary.default' : 'gray.medium',
|
|
5040
|
-
borderWidth: "1px",
|
|
5041
|
-
_hover: {
|
|
5042
|
-
borderColor: isDisabled ? 'gray.medium' : 'primary.default'
|
|
5043
|
-
},
|
|
5044
|
-
overflow: topChild ? 'hidden' : 'auto'
|
|
5045
|
-
}, topChild, /*#__PURE__*/React__default.createElement(Box, {
|
|
5046
|
-
borderColor: "gray.medium",
|
|
5047
|
-
borderBottomWidth: hasExpandableContent ? '1px' : 0
|
|
5048
|
-
}, /*#__PURE__*/React__default.createElement(Component, _extends$6({
|
|
5049
|
-
ref: ref,
|
|
5050
|
-
isChecked: isChecked,
|
|
5051
|
-
isDisabled: isDisabled,
|
|
5052
|
-
isFocusable: !isDisabled,
|
|
5053
|
-
value: value,
|
|
5054
|
-
defaultChecked: defaultChecked,
|
|
5055
|
-
helperText: helperText,
|
|
5056
|
-
size: size,
|
|
5057
|
-
width: "100%",
|
|
5058
|
-
paddingX: 4,
|
|
5059
|
-
paddingY: 3
|
|
5060
|
-
}, props), label)), /*#__PURE__*/React__default.createElement(AnimatePresence, {
|
|
5061
|
-
mode: "wait"
|
|
5062
|
-
}, hasExpandableContent && /*#__PURE__*/React__default.createElement(Box, {
|
|
5063
|
-
as: motion.div,
|
|
5064
|
-
key: contentKey,
|
|
5065
|
-
initial: {
|
|
5066
|
-
height: 0,
|
|
5067
|
-
opacity: 0
|
|
5068
|
-
},
|
|
5069
|
-
animate: {
|
|
5070
|
-
height: 'auto',
|
|
5071
|
-
opacity: 1
|
|
5072
|
-
},
|
|
5073
|
-
exit: {
|
|
5074
|
-
height: 0,
|
|
5075
|
-
opacity: 0
|
|
5076
|
-
},
|
|
5077
|
-
transition: {
|
|
5078
|
-
duration: prefersReducedMotion ? 0 : 0.15,
|
|
5079
|
-
ease: 'easeOut'
|
|
5080
|
-
},
|
|
5081
|
-
overflow: "hidden"
|
|
5082
|
-
}, /*#__PURE__*/React__default.createElement(Box, _extends$6({
|
|
5083
|
-
color: "gray.600",
|
|
5084
|
-
fontSize: expandableTextSize,
|
|
5085
|
-
paddingTop: 3,
|
|
5086
|
-
paddingX: 4,
|
|
5087
|
-
paddingBottom: 3
|
|
5088
|
-
}, expandableChildrenStyles), expandableChildren))));
|
|
4858
|
+
const MotionBox = motion(Box);
|
|
4859
|
+
const SelectionCard = forwardRef(({ isChecked, isDisabled, value, helperText, expandableChildren, defaultChecked, isRadio, label, isExpandable, size = 'md', expandableChildrenStyles = {}, topChild, expandableContentKey = 'selection-card-content', ...props }, ref) => {
|
|
4860
|
+
const Component = isRadio ? Radio : Checkbox;
|
|
4861
|
+
const expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
4862
|
+
const hasExpandableContent = isExpandable && isChecked && expandableChildren;
|
|
4863
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
4864
|
+
// Create a unique key based on the content to force re-animation
|
|
4865
|
+
const contentKey = React__default.useMemo(() => {
|
|
4866
|
+
if (typeof expandableChildren === 'string') {
|
|
4867
|
+
return expandableChildren;
|
|
4868
|
+
}
|
|
4869
|
+
return (expandableContentKey ||
|
|
4870
|
+
(React__default.isValidElement(expandableChildren)
|
|
4871
|
+
? JSON.stringify(expandableChildren.props)
|
|
4872
|
+
: undefined) ||
|
|
4873
|
+
Math.random());
|
|
4874
|
+
}, [expandableChildren, expandableContentKey]);
|
|
4875
|
+
return (jsxRuntimeExports.jsxs(Box, { borderRadius: "lg", borderColor: isChecked ? 'primary.default' : 'gray.medium', borderWidth: "1px", _hover: {
|
|
4876
|
+
borderColor: isDisabled ? 'gray.medium' : 'primary.default',
|
|
4877
|
+
}, overflow: topChild ? 'hidden' : 'auto', children: [topChild, jsxRuntimeExports.jsx(Box, { borderColor: "gray.medium", borderBottomWidth: hasExpandableContent ? '1px' : 0, children: jsxRuntimeExports.jsx(Component, { ref: ref, isChecked: isChecked, isDisabled: isDisabled, isFocusable: !isDisabled, value: value, defaultChecked: defaultChecked, helperText: helperText, size: size, width: "100%", paddingX: 4, paddingY: 3, ...props, children: label }) }), jsxRuntimeExports.jsx(AnimatePresence, { mode: "wait", children: hasExpandableContent && (jsxRuntimeExports.jsx(MotionBox, { initial: { height: 0, opacity: 0 }, animate: { height: 'auto', opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: {
|
|
4878
|
+
duration: prefersReducedMotion ? 0 : 0.15,
|
|
4879
|
+
ease: 'easeOut',
|
|
4880
|
+
}, overflow: "hidden", children: jsxRuntimeExports.jsx(Box, { color: "gray.600", fontSize: expandableTextSize, paddingTop: 3, paddingX: 4, paddingBottom: 3, ...expandableChildrenStyles, children: expandableChildren }) }, contentKey)) })] }));
|
|
5089
4881
|
});
|
|
5090
|
-
SelectionCard.
|
|
5091
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
|
|
5092
|
-
expandableChildren: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
5093
|
-
defaultChecked: PropTypes.bool,
|
|
5094
|
-
isChecked: PropTypes.bool,
|
|
5095
|
-
isDisabled: PropTypes.bool,
|
|
5096
|
-
value: PropTypes.string.isRequired,
|
|
5097
|
-
helperText: PropTypes.string,
|
|
5098
|
-
isRadio: PropTypes.bool,
|
|
5099
|
-
isExpandable: PropTypes.bool,
|
|
5100
|
-
expandableChildrenStyles: PropTypes.object,
|
|
5101
|
-
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
5102
|
-
topChild: PropTypes.element,
|
|
5103
|
-
expandableContentKey: PropTypes.string
|
|
5104
|
-
};
|
|
4882
|
+
SelectionCard.displayName = 'SelectionCard';
|
|
5105
4883
|
|
|
5106
4884
|
const Divider = forwardRef(({ variant = 'solid', colorScheme: borderColor = 'medium', ...props }, ref) => {
|
|
5107
4885
|
return (jsxRuntimeExports.jsx(Divider$1, { ...colorScheme[borderColor], variant: variant, ...props, ref: ref }));
|
|
@@ -5114,50 +4892,36 @@ const Textarea = forwardRef(({ label, helperText, errorMessage, isInvalid, isDis
|
|
|
5114
4892
|
});
|
|
5115
4893
|
Textarea.displayName = 'Textarea';
|
|
5116
4894
|
|
|
5117
|
-
const
|
|
5118
|
-
const Popover =
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
4895
|
+
const ChakraPopoverWithRef = Popover$1;
|
|
4896
|
+
const Popover = forwardRef(({ children, ...rest }, ref) => {
|
|
4897
|
+
const { variant } = rest;
|
|
4898
|
+
return (jsxRuntimeExports.jsx(ChakraPopoverWithRef, { ...rest, ref: ref, children: Children.map(children, (child, index) => {
|
|
4899
|
+
if (!isValidElement(child)) {
|
|
4900
|
+
return child;
|
|
4901
|
+
}
|
|
4902
|
+
return cloneElement(child, {
|
|
4903
|
+
ref,
|
|
4904
|
+
variant,
|
|
4905
|
+
key: child.key ?? `Popover-child-${index}`,
|
|
4906
|
+
});
|
|
4907
|
+
}) }));
|
|
5130
4908
|
});
|
|
5131
|
-
Popover.
|
|
5132
|
-
/** React children */
|
|
5133
|
-
children: PropTypes.node,
|
|
5134
|
-
/** Styles the Popover */
|
|
5135
|
-
variant: PropTypes.oneOf(['light', 'dark'])
|
|
5136
|
-
};
|
|
4909
|
+
Popover.displayName = 'Popover';
|
|
5137
4910
|
|
|
5138
|
-
const arrowStyles =
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
} = _ref;
|
|
5142
|
-
return {
|
|
5143
|
-
backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
|
|
5144
|
-
};
|
|
5145
|
-
};
|
|
4911
|
+
const arrowStyles = ({ variant }) => ({
|
|
4912
|
+
backgroundColor: variant === 'dark' ? 'secondary.default' : 'white',
|
|
4913
|
+
});
|
|
5146
4914
|
|
|
5147
|
-
const
|
|
5148
|
-
|
|
5149
|
-
ref: ref
|
|
5150
|
-
}, props, arrowStyles(props)));
|
|
4915
|
+
const ChakraPopoverArrowWithRef = PopoverArrow$1;
|
|
4916
|
+
const PopoverArrow = forwardRef((props, ref) => {
|
|
4917
|
+
return (jsxRuntimeExports.jsx(ChakraPopoverArrowWithRef, { ref: ref, ...props, ...arrowStyles(props) }));
|
|
5151
4918
|
});
|
|
4919
|
+
PopoverArrow.displayName = 'PopoverArrow';
|
|
5152
4920
|
|
|
5153
|
-
const pseudoStyles = variant => ({
|
|
5154
|
-
|
|
4921
|
+
const pseudoStyles = (variant) => ({
|
|
4922
|
+
bgColor: variant === 'dark' ? 'gray.600' : 'gray.50',
|
|
5155
4923
|
});
|
|
5156
|
-
const closeButtonStyles =
|
|
5157
|
-
let {
|
|
5158
|
-
variant
|
|
5159
|
-
} = _ref;
|
|
5160
|
-
return {
|
|
4924
|
+
const closeButtonStyles = ({ variant }) => ({
|
|
5161
4925
|
color: variant === 'dark' ? 'white' : 'black',
|
|
5162
4926
|
fontSize: '0.5rem',
|
|
5163
4927
|
position: 'absolute',
|
|
@@ -5166,56 +4930,21 @@ const closeButtonStyles = _ref => {
|
|
|
5166
4930
|
padding: 4,
|
|
5167
4931
|
borderTopRightRadius: 4,
|
|
5168
4932
|
_hover: pseudoStyles(variant),
|
|
5169
|
-
_focus:
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
};
|
|
4933
|
+
_focus: {
|
|
4934
|
+
...pseudoStyles(variant),
|
|
4935
|
+
boxShadow: 'outline',
|
|
4936
|
+
},
|
|
4937
|
+
});
|
|
5174
4938
|
|
|
5175
|
-
const PopoverCloseButton =
|
|
5176
|
-
|
|
5177
|
-
ref: ref
|
|
5178
|
-
}, props, closeButtonStyles(props)));
|
|
4939
|
+
const PopoverCloseButton = forwardRef((props, ref) => {
|
|
4940
|
+
return (jsxRuntimeExports.jsx(PopoverCloseButton$1, { ref: ref, ...props, ...closeButtonStyles(props) }));
|
|
5179
4941
|
});
|
|
4942
|
+
PopoverCloseButton.displayName = 'PopoverCloseButton';
|
|
5180
4943
|
|
|
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));
|
|
4944
|
+
const PopoverContent = forwardRef(({ header, variant = 'light', children, hideCloseButton = false, hideArrow = false, popoverBodyProps, ...rest }, ref) => {
|
|
4945
|
+
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
4946
|
});
|
|
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
|
-
};
|
|
4947
|
+
PopoverContent.displayName = 'PopoverContent';
|
|
5219
4948
|
|
|
5220
4949
|
const AutoSuggestSelect = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5221
4950
|
let {
|
|
@@ -5310,7 +5039,7 @@ const AutoSuggestSelect = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5310
5039
|
innerRef,
|
|
5311
5040
|
innerProps
|
|
5312
5041
|
} = _ref2;
|
|
5313
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$
|
|
5042
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
5314
5043
|
style: clearIndicatorStyles,
|
|
5315
5044
|
ref: innerRef
|
|
5316
5045
|
}, innerProps), /*#__PURE__*/React__default.createElement(ForwardRef, null));
|
|
@@ -5479,7 +5208,7 @@ const FilterSelectNode = _ref => {
|
|
|
5479
5208
|
label: label,
|
|
5480
5209
|
inputId: id,
|
|
5481
5210
|
isInvalid: isInvalid
|
|
5482
|
-
}, /*#__PURE__*/React__default.createElement(Select$3, _extends$
|
|
5211
|
+
}, /*#__PURE__*/React__default.createElement(Select$3, _extends$1({
|
|
5483
5212
|
ref: innerRef,
|
|
5484
5213
|
classNamePrefix: "fe-ui-filter-select",
|
|
5485
5214
|
closeMenuOnSelect: true,
|
|
@@ -5498,7 +5227,7 @@ const FilterSelectNode = _ref => {
|
|
|
5498
5227
|
noOptionsMessage: () => noOptionsMessage
|
|
5499
5228
|
}, props)));
|
|
5500
5229
|
};
|
|
5501
|
-
const FilterSelect = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(FilterSelectNode, _extends$
|
|
5230
|
+
const FilterSelect = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(FilterSelectNode, _extends$1({
|
|
5502
5231
|
innerRef: ref
|
|
5503
5232
|
}, props)));
|
|
5504
5233
|
FilterSelect.propTypes = {
|
|
@@ -5559,45 +5288,33 @@ FilterSelectNode.propTypes = {
|
|
|
5559
5288
|
};
|
|
5560
5289
|
|
|
5561
5290
|
const defaultStyles = {
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
boxShadow: '0 0 0 2px rgba(158, 202, 237, 1)'
|
|
5569
|
-
},
|
|
5570
|
-
_focus: {
|
|
5571
|
-
boxShadow: '0 0 0 2px rgba(158, 202, 237, 1)'
|
|
5572
|
-
}
|
|
5291
|
+
border: 0,
|
|
5292
|
+
borderRadius: '4px',
|
|
5293
|
+
fontWeight: 'normal',
|
|
5294
|
+
paddingX: 4,
|
|
5295
|
+
paddingY: 1,
|
|
5296
|
+
_hover: { boxShadow: '0 0 0 2px rgba(158, 202, 237, 1)' },
|
|
5297
|
+
_focus: { boxShadow: '0 0 0 2px rgba(158, 202, 237, 1)' },
|
|
5573
5298
|
};
|
|
5574
5299
|
const inactiveStyles = {
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
bg: 'gray.100'
|
|
5580
|
-
},
|
|
5581
|
-
_active: {
|
|
5582
|
-
bg: 'gray.100'
|
|
5583
|
-
}
|
|
5300
|
+
color: 'black',
|
|
5301
|
+
borderColor: 'gray.100',
|
|
5302
|
+
bg: 'gray.100',
|
|
5303
|
+
_hover: { bg: 'gray.100' },
|
|
5304
|
+
_active: { bg: 'gray.100' },
|
|
5584
5305
|
};
|
|
5585
5306
|
const activeStyles = {
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
bg: 'white'
|
|
5592
|
-
},
|
|
5593
|
-
_active: {
|
|
5594
|
-
bg: 'white'
|
|
5595
|
-
}
|
|
5307
|
+
color: 'black',
|
|
5308
|
+
fontWeight: 'semibold',
|
|
5309
|
+
boxShadow: 'sm',
|
|
5310
|
+
bg: 'white',
|
|
5311
|
+
_hover: { bg: 'white' },
|
|
5312
|
+
_active: { bg: 'white' },
|
|
5596
5313
|
};
|
|
5597
5314
|
const buttonGroupStyles = {
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5315
|
+
borderRadius: '4px',
|
|
5316
|
+
backgroundColor: 'gray.100',
|
|
5317
|
+
padding: 1,
|
|
5601
5318
|
};
|
|
5602
5319
|
|
|
5603
5320
|
/**
|
|
@@ -5610,40 +5327,32 @@ const buttonGroupStyles = {
|
|
|
5610
5327
|
* @note
|
|
5611
5328
|
* must have multiple child elements
|
|
5612
5329
|
*/
|
|
5613
|
-
const ToggleButtonGroup =
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
groupProps,
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
sx: _objectSpread2(_objectSpread2(_objectSpread2({}, defaultStyles), value !== (CHILD === null || CHILD === void 0 || (_CHILD$props3 = CHILD.props) === null || _CHILD$props3 === void 0 ? void 0 : _CHILD$props3.value) ? inactiveStyles : activeStyles), childrenStyles)
|
|
5638
|
-
}));
|
|
5639
|
-
}));
|
|
5330
|
+
const ToggleButtonGroup = forwardRef((props, ref) => {
|
|
5331
|
+
const { onChange, value, children, groupProps, buttonGroupStyles: _buttonGroupStyles = {}, childrenStyles = {}, } = props;
|
|
5332
|
+
if (!children)
|
|
5333
|
+
throw new Error('Children required');
|
|
5334
|
+
// iterate over array of child nodes to apply extended props
|
|
5335
|
+
return (jsxRuntimeExports.jsx(ButtonGroup, { ref: ref, sx: { ...buttonGroupStyles, ..._buttonGroupStyles }, ...groupProps, children: React__default.Children.map(children, child => {
|
|
5336
|
+
const CHILD = child;
|
|
5337
|
+
return React__default.cloneElement(CHILD, {
|
|
5338
|
+
onClick: () => {
|
|
5339
|
+
if (value === CHILD?.props?.value)
|
|
5340
|
+
return;
|
|
5341
|
+
onChange(CHILD?.props?.value);
|
|
5342
|
+
},
|
|
5343
|
+
...{
|
|
5344
|
+
sx: {
|
|
5345
|
+
...defaultStyles,
|
|
5346
|
+
...(value !== CHILD?.props?.value
|
|
5347
|
+
? inactiveStyles
|
|
5348
|
+
: activeStyles),
|
|
5349
|
+
...childrenStyles,
|
|
5350
|
+
},
|
|
5351
|
+
},
|
|
5352
|
+
});
|
|
5353
|
+
}) }));
|
|
5640
5354
|
});
|
|
5641
|
-
ToggleButtonGroup.
|
|
5642
|
-
onChange: PropTypes.func.isRequired,
|
|
5643
|
-
value: PropTypes.string.isRequired,
|
|
5644
|
-
children: PropTypes.node.isRequired,
|
|
5645
|
-
groupProps: PropTypes.object
|
|
5646
|
-
};
|
|
5355
|
+
ToggleButtonGroup.displayName = 'ToggleButtonGroup';
|
|
5647
5356
|
|
|
5648
5357
|
const _excluded = ["id", "label", "isInvalid", "isLoading", "isRequired", "options", "placeholder", "errorMessage", "helperText", "innerRef"],
|
|
5649
5358
|
_excluded2 = ["id", "label", "isInvalid", "isLoading", "isRequired", "options", "placeholder", "errorMessage", "helperText"];
|
|
@@ -5710,7 +5419,7 @@ const CreatableSelectNode = _ref => {
|
|
|
5710
5419
|
helperText: helperText,
|
|
5711
5420
|
label: label,
|
|
5712
5421
|
inputId: id
|
|
5713
|
-
}, /*#__PURE__*/React__default.createElement(Creatable, _extends$
|
|
5422
|
+
}, /*#__PURE__*/React__default.createElement(Creatable, _extends$1({
|
|
5714
5423
|
id: id,
|
|
5715
5424
|
components: {
|
|
5716
5425
|
DropdownIndicator
|
|
@@ -5734,7 +5443,7 @@ const CreatableSelect = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
5734
5443
|
helperText
|
|
5735
5444
|
} = props,
|
|
5736
5445
|
additionalProps = _objectWithoutProperties(props, _excluded2);
|
|
5737
|
-
return /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$
|
|
5446
|
+
return /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$1({
|
|
5738
5447
|
id: id,
|
|
5739
5448
|
innerRef: ref,
|
|
5740
5449
|
label: label,
|
|
@@ -5772,19 +5481,14 @@ CreatableSelectNode.propTypes = {
|
|
|
5772
5481
|
current: PropTypes.instanceOf(Creatable)
|
|
5773
5482
|
})
|
|
5774
5483
|
};
|
|
5775
|
-
var CreatableSelect$1 = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$
|
|
5484
|
+
var CreatableSelect$1 = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(CreatableSelectNode, _extends$1({
|
|
5776
5485
|
ref: ref
|
|
5777
5486
|
}, props)));
|
|
5778
5487
|
|
|
5779
|
-
const
|
|
5780
|
-
|
|
5781
|
-
ref: ref
|
|
5782
|
-
}));
|
|
5488
|
+
const ChakraMenuWithRef = Menu$1;
|
|
5489
|
+
const Menu = React__default.forwardRef((props, ref) => {
|
|
5490
|
+
return jsxRuntimeExports.jsx(ChakraMenuWithRef, { ...props, ref: ref });
|
|
5783
5491
|
});
|
|
5784
|
-
Menu.propTypes = {
|
|
5785
|
-
/** The React node that will render inside the element */
|
|
5786
|
-
children: PropTypes.node
|
|
5787
|
-
};
|
|
5788
5492
|
|
|
5789
5493
|
export { ANIMATION_TOKENS, AccordionActionButton, Alert, AlwaysMountedModal, AutoSuggestSelect, Button$1 as Button, Card, Checkbox, Container, CreatableSelect$1 as CreatableSelect, Divider, Drawer, FilterSelect, Grid, GridItem, Heading, Image, Input$1 as Input, List, Loader, Menu, Modal, Popover, PopoverArrow, PopoverContent, Progress, Radio, RadioGroup, AutoSuggestSelect$1 as RefreshedAutoSuggestSelect, Button as RefreshedButtonInput, FormControl as RefreshedFormControl, Input as RefreshedInput, Select as RefreshedSelectInput, Select$1 as Select, SelectionCard, Spinner, Switch, Tabs, Text, Textarea, ThemeProvider, ToggleButtonGroup };
|
|
5790
5494
|
//# sourceMappingURL=index.esm.js.map
|