@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.cjs.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var React = require('react');
|
|
4
3
|
var react = require('@chakra-ui/react');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var framerMotion = require('framer-motion');
|
|
5
6
|
var merge = require('lodash/merge');
|
|
6
|
-
var PropTypes = require('prop-types');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var react$1 = require('@emotion/react');
|
|
9
9
|
var anatomy = require('@chakra-ui/anatomy');
|
|
10
10
|
var template = require('lodash/template');
|
|
11
|
+
var PropTypes = require('prop-types');
|
|
11
12
|
var AsyncSelect = require('react-select/async');
|
|
12
|
-
var framerMotion = require('framer-motion');
|
|
13
13
|
var Select$2 = require('react-select');
|
|
14
14
|
var Creatable = require('react-select/creatable');
|
|
15
15
|
|
|
@@ -35,255 +35,13 @@ function _interopNamespace(e) {
|
|
|
35
35
|
|
|
36
36
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
37
37
|
var merge__default = /*#__PURE__*/_interopDefault(merge);
|
|
38
|
-
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
39
38
|
var cn__default = /*#__PURE__*/_interopDefault(cn);
|
|
40
39
|
var template__default = /*#__PURE__*/_interopDefault(template);
|
|
40
|
+
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
41
41
|
var AsyncSelect__default = /*#__PURE__*/_interopDefault(AsyncSelect);
|
|
42
42
|
var Select__default = /*#__PURE__*/_interopDefault(Select$2);
|
|
43
43
|
var Creatable__default = /*#__PURE__*/_interopDefault(Creatable);
|
|
44
44
|
|
|
45
|
-
function _defineProperty(e, r, t) {
|
|
46
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
47
|
-
value: t,
|
|
48
|
-
enumerable: !0,
|
|
49
|
-
configurable: !0,
|
|
50
|
-
writable: !0
|
|
51
|
-
}) : e[r] = t, e;
|
|
52
|
-
}
|
|
53
|
-
function _extends$6() {
|
|
54
|
-
return _extends$6 = Object.assign ? Object.assign.bind() : function (n) {
|
|
55
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
56
|
-
var t = arguments[e];
|
|
57
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
58
|
-
}
|
|
59
|
-
return n;
|
|
60
|
-
}, _extends$6.apply(null, arguments);
|
|
61
|
-
}
|
|
62
|
-
function ownKeys(e, r) {
|
|
63
|
-
var t = Object.keys(e);
|
|
64
|
-
if (Object.getOwnPropertySymbols) {
|
|
65
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
66
|
-
r && (o = o.filter(function (r) {
|
|
67
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
68
|
-
})), t.push.apply(t, o);
|
|
69
|
-
}
|
|
70
|
-
return t;
|
|
71
|
-
}
|
|
72
|
-
function _objectSpread2(e) {
|
|
73
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
74
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
75
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
76
|
-
_defineProperty(e, r, t[r]);
|
|
77
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
78
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
return e;
|
|
82
|
-
}
|
|
83
|
-
function _objectWithoutProperties(e, t) {
|
|
84
|
-
if (null == e) return {};
|
|
85
|
-
var o,
|
|
86
|
-
r,
|
|
87
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
88
|
-
if (Object.getOwnPropertySymbols) {
|
|
89
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
90
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
91
|
-
}
|
|
92
|
-
return i;
|
|
93
|
-
}
|
|
94
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
95
|
-
if (null == r) return {};
|
|
96
|
-
var t = {};
|
|
97
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
98
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
99
|
-
t[n] = r[n];
|
|
100
|
-
}
|
|
101
|
-
return t;
|
|
102
|
-
}
|
|
103
|
-
function _taggedTemplateLiteral(e, t) {
|
|
104
|
-
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
105
|
-
raw: {
|
|
106
|
-
value: Object.freeze(t)
|
|
107
|
-
}
|
|
108
|
-
}));
|
|
109
|
-
}
|
|
110
|
-
function _toPrimitive(t, r) {
|
|
111
|
-
if ("object" != typeof t || !t) return t;
|
|
112
|
-
var e = t[Symbol.toPrimitive];
|
|
113
|
-
if (void 0 !== e) {
|
|
114
|
-
var i = e.call(t, r || "default");
|
|
115
|
-
if ("object" != typeof i) return i;
|
|
116
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
117
|
-
}
|
|
118
|
-
return ("string" === r ? String : Number)(t);
|
|
119
|
-
}
|
|
120
|
-
function _toPropertyKey(t) {
|
|
121
|
-
var i = _toPrimitive(t, "string");
|
|
122
|
-
return "symbol" == typeof i ? i : i + "";
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
var header$1 = _ref => {
|
|
126
|
-
let {
|
|
127
|
-
hideCloseButton,
|
|
128
|
-
hasHeader
|
|
129
|
-
} = _ref;
|
|
130
|
-
return {
|
|
131
|
-
padding: !hideCloseButton || hasHeader ? 4 : 2,
|
|
132
|
-
fontSize: 'xl',
|
|
133
|
-
fontWeight: 'semibold',
|
|
134
|
-
// If just close button, still have 'header' section at top
|
|
135
|
-
minHeight: hasHeader || hideCloseButton ? null : 12
|
|
136
|
-
};
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @param {boolean} isMobile - Whether or not the Modal is opened in a mobile viewport
|
|
141
|
-
* @param {boolean} isOpen - Whether or not the Modal is open
|
|
142
|
-
* @param {React.ReactNode} children - The header text of the modal
|
|
143
|
-
* @param {()=>void} [onClose] - Callback invoked to close the Modal. Not required, but strongly suggested.
|
|
144
|
-
* @param {('sm'|'sm-md'|'md'|'lg')} [size] - The size of the modal. If unspecified, uses "md" styles.
|
|
145
|
-
* @param {object} [contentStyling] - Style props to be passed into the modal content
|
|
146
|
-
* @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
|
|
147
|
-
* @param {boolean} [hasHeader] - Whether or not ModalHeader is a child. Will change the styling
|
|
148
|
-
* @param {boolean} [hasFooter] - Whether or not ModalFooter is a child. Will change the styling
|
|
149
|
-
* @param {React.ReactNode} [hideCloseButton] - Whether or not to show the close button
|
|
150
|
-
* @returns {React.ReactElement} - The Modal component
|
|
151
|
-
*/
|
|
152
|
-
const Modal = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
153
|
-
const {
|
|
154
|
-
children,
|
|
155
|
-
hideCloseButton,
|
|
156
|
-
hasHeader,
|
|
157
|
-
isMobile = false,
|
|
158
|
-
contentStyling = {},
|
|
159
|
-
overlayProps = {}
|
|
160
|
-
} = props;
|
|
161
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.Modal, _extends$6({
|
|
162
|
-
motionPreset: isMobile ? 'slideInBottom' : 'scale'
|
|
163
|
-
}, props, {
|
|
164
|
-
ref: ref
|
|
165
|
-
}), /*#__PURE__*/React__namespace.default.createElement(react.ModalOverlay, overlayProps), /*#__PURE__*/React__namespace.default.createElement(react.ModalContent, _extends$6({
|
|
166
|
-
"data-testid": "ModalContent"
|
|
167
|
-
}, contentStyling), !hasHeader ? /*#__PURE__*/React__namespace.default.createElement(react.Box, header$1(props)) : null, hideCloseButton ? null : /*#__PURE__*/React__namespace.default.createElement(react.ModalCloseButton, {
|
|
168
|
-
"data-testid": "ModalClose-button"
|
|
169
|
-
}), children));
|
|
170
|
-
});
|
|
171
|
-
Modal.propTypes = {
|
|
172
|
-
/** Whether or not the Modal is opened in a mobile viewport */
|
|
173
|
-
isMobile: PropTypes__default.default.bool,
|
|
174
|
-
/** Whether or not the Modal is open */
|
|
175
|
-
isOpen: PropTypes__default.default.bool.isRequired,
|
|
176
|
-
/** React children. Body of the Modal. */
|
|
177
|
-
children: PropTypes__default.default.node.isRequired,
|
|
178
|
-
/** Whether or not ModalHeader is a child. Will change the styling */
|
|
179
|
-
hasHeader: PropTypes__default.default.bool.isRequired,
|
|
180
|
-
/** Whether or not ModalFooter is a child. Will change the styling */
|
|
181
|
-
hasFooter: PropTypes__default.default.bool.isRequired,
|
|
182
|
-
/** Callback invoked to close the Modal. Not required, but strongly suggested. */
|
|
183
|
-
onClose: PropTypes__default.default.func,
|
|
184
|
-
/** The size of the modal. If unspecified, uses md styles. */
|
|
185
|
-
size: PropTypes__default.default.oneOf(['sm', 'sm-md', 'md', 'lg']),
|
|
186
|
-
/** Whether or not to show the close button (optional) */
|
|
187
|
-
hideCloseButton: PropTypes__default.default.bool,
|
|
188
|
-
/** Objects containing css-in-js styling*/
|
|
189
|
-
contentStyling: PropTypes__default.default.object,
|
|
190
|
-
/** Objects containing props to apply to ModalOverlay component */
|
|
191
|
-
overlayProps: PropTypes__default.default.object
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
195
|
-
const fadeIn = react.keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { opacity: 0%; }\n 100% { opacity: 100%; }\n\n"])));
|
|
196
|
-
const fadeOut = react.keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% { opacity: 100%; }\n 100% { opacity: 0% }\n"])));
|
|
197
|
-
const fadeInAndEnlarge = react.keyframes(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% { opacity: 0%; transform: scale(0.9);}\n 100% { opacity: 100%; transform: scale(1);}\n"])));
|
|
198
|
-
const fadeOutAndShrink = react.keyframes(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% { opacity: 100%; transform: scale(1); }\n 100% { opacity: 0%; transform: scale(0.9); }\n"])));
|
|
199
|
-
const fadeInAndSlideUp = react.keyframes(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n 0% { opacity: 0%; transform: translateY(2rem) scale(1);}\n 100% { opacity: 100%; transform: translateY(0) scale(1);}\n"])));
|
|
200
|
-
const fadeOutAndSlideDown = react.keyframes(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n 0% { opacity: 100%; transform: translateY(0) scale(1); }\n 100% { opacity: 0%; transform: translateY(2rem) scale(1); }\n"])));
|
|
201
|
-
|
|
202
|
-
// This is a modified version of our Modal that will always be mounted, even when it is closed.
|
|
203
|
-
// We need this for things like Stripe where payment Elements need to be mounted to get a token on checkout
|
|
204
|
-
/**
|
|
205
|
-
* @param {boolean} isMobile - Whether or not the Modal is opened in a mobile viewport
|
|
206
|
-
* @param {boolean} isOpen - Whether or not the Modal is open
|
|
207
|
-
* @param {React.ReactNode} children - The header text of the modal
|
|
208
|
-
* @param {()=>void} [onClose] - Callback invoked to close the Modal. Not required, but strongly suggested.
|
|
209
|
-
* @param {('sm'|'sm-md'|'md'|'lg')} [size] - The size of the modal. If unspecified, uses "md" styles.
|
|
210
|
-
* @param {object} [contentStyling] - Style props to be passed into the modal content
|
|
211
|
-
* @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
|
|
212
|
-
* @param {boolean} [hasHeader] - Whether or not ModalHeader is a child. Will change the styling
|
|
213
|
-
* @param {boolean} [hasFooter] - Whether or not ModalFooter is a child. Will change the styling
|
|
214
|
-
* @param {React.ReactNode} [hideCloseButton] - Whether or not to show the close button
|
|
215
|
-
* @returns {React.ReactElement} - The Modal component
|
|
216
|
-
*/
|
|
217
|
-
const AlwaysMountedModal = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
218
|
-
const {
|
|
219
|
-
children,
|
|
220
|
-
hideCloseButton,
|
|
221
|
-
onCloseComplete,
|
|
222
|
-
hasHeader,
|
|
223
|
-
isOpen,
|
|
224
|
-
isMobile = false,
|
|
225
|
-
contentStyling = {},
|
|
226
|
-
overlayProps = {}
|
|
227
|
-
} = props;
|
|
228
|
-
const [internalOpen, setInternalOpen] = React.useState(isOpen);
|
|
229
|
-
React.useEffect(() => {
|
|
230
|
-
if (!isOpen) {
|
|
231
|
-
setTimeout(() => {
|
|
232
|
-
setInternalOpen(false);
|
|
233
|
-
onCloseComplete();
|
|
234
|
-
// Want this to be a bit shorter than fade out animation
|
|
235
|
-
}, 175);
|
|
236
|
-
} else {
|
|
237
|
-
setInternalOpen(true);
|
|
238
|
-
}
|
|
239
|
-
}, [isOpen]);
|
|
240
|
-
const fadeInAnimation = isMobile ? fadeInAndSlideUp : fadeInAndEnlarge;
|
|
241
|
-
const fadeOutAnimation = isMobile ? fadeOutAndSlideDown : fadeOutAndShrink;
|
|
242
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.Modal, _extends$6({
|
|
243
|
-
motionPreset: isMobile ? 'slideInBottom' : 'scale'
|
|
244
|
-
}, props, {
|
|
245
|
-
blockScrollOnMount: isOpen,
|
|
246
|
-
isOpen: true,
|
|
247
|
-
ref: ref
|
|
248
|
-
}), /*#__PURE__*/React__namespace.default.createElement(react.Box, {
|
|
249
|
-
visibility: internalOpen ? 'visible' : 'hidden',
|
|
250
|
-
animation: "".concat(isOpen ? fadeIn : fadeOut, " 0.2s ease-in-out"),
|
|
251
|
-
zIndex: 3,
|
|
252
|
-
as: framerMotion.motion.div,
|
|
253
|
-
position: "relative"
|
|
254
|
-
}, /*#__PURE__*/React__namespace.default.createElement(react.ModalOverlay, overlayProps)), /*#__PURE__*/React__namespace.default.createElement(react.Box, {
|
|
255
|
-
visibility: internalOpen ? 'visible' : 'hidden',
|
|
256
|
-
animation: "".concat(isOpen ? fadeIn : fadeOut, " 0.2s ease-in-out"),
|
|
257
|
-
zIndex: 4,
|
|
258
|
-
as: framerMotion.motion.div,
|
|
259
|
-
position: "relative"
|
|
260
|
-
}, /*#__PURE__*/React__namespace.default.createElement(react.ModalContent, _extends$6({}, contentStyling, {
|
|
261
|
-
animation: "".concat(isOpen ? fadeInAnimation : fadeOutAnimation, " 0.2s ease-in-out")
|
|
262
|
-
}), !hasHeader ? /*#__PURE__*/React__namespace.default.createElement(react.Box, header$1(props)) : null, hideCloseButton ? null : /*#__PURE__*/React__namespace.default.createElement(react.ModalCloseButton, null), children)));
|
|
263
|
-
});
|
|
264
|
-
AlwaysMountedModal.propTypes = {
|
|
265
|
-
/** Whether or not the Modal is opened in a mobile viewport */
|
|
266
|
-
isMobile: PropTypes__default.default.bool,
|
|
267
|
-
/** Whether or not the Modal is open */
|
|
268
|
-
isOpen: PropTypes__default.default.bool.isRequired,
|
|
269
|
-
/** React children. Body of the Modal. */
|
|
270
|
-
children: PropTypes__default.default.node.isRequired,
|
|
271
|
-
/** Whether or not ModalHeader is a child. Will change the styling */
|
|
272
|
-
hasHeader: PropTypes__default.default.bool.isRequired,
|
|
273
|
-
/** Whether or not ModalFooter is a child. Will change the styling */
|
|
274
|
-
hasFooter: PropTypes__default.default.bool.isRequired,
|
|
275
|
-
/** Callback invoked to close the Modal. Not required, but strongly suggested. */
|
|
276
|
-
onClose: PropTypes__default.default.func,
|
|
277
|
-
/** The size of the modal. If unspecified, uses md styles. */
|
|
278
|
-
size: PropTypes__default.default.oneOf(['sm', 'sm-md', 'md', 'lg']),
|
|
279
|
-
/** Whether or not to show the close button (optional) */
|
|
280
|
-
hideCloseButton: PropTypes__default.default.bool,
|
|
281
|
-
/** Objects containing css-in-js styling*/
|
|
282
|
-
contentStyling: PropTypes__default.default.object,
|
|
283
|
-
/** Objects containing props to apply to ModalOverlay component */
|
|
284
|
-
overlayProps: PropTypes__default.default.object
|
|
285
|
-
};
|
|
286
|
-
|
|
287
45
|
var jsxRuntime = {exports: {}};
|
|
288
46
|
|
|
289
47
|
var reactJsxRuntime_production_min = {};
|
|
@@ -1480,6 +1238,80 @@ function requireJsxRuntime() {
|
|
|
1480
1238
|
|
|
1481
1239
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
1482
1240
|
|
|
1241
|
+
const header$1 = ({ hideCloseButton, hasHeader }) => ({
|
|
1242
|
+
padding: !hideCloseButton || hasHeader ? 4 : 2,
|
|
1243
|
+
fontSize: 'xl',
|
|
1244
|
+
fontWeight: 'semibold',
|
|
1245
|
+
// If just close button, still have 'header' section at top
|
|
1246
|
+
minHeight: hasHeader || hideCloseButton ? undefined : 12,
|
|
1247
|
+
});
|
|
1248
|
+
|
|
1249
|
+
const ChakraModalWithRef$1 = react.Modal;
|
|
1250
|
+
const Modal = React.forwardRef(({ children, isMobile = false, contentStyling = {}, overlayProps = {}, ...props }, ref) => {
|
|
1251
|
+
const { hasHeader, hideCloseButton } = props;
|
|
1252
|
+
return (jsxRuntimeExports.jsxs(ChakraModalWithRef$1, { motionPreset: isMobile ? 'slideInBottom' : 'scale', ...props, ref: ref, children: [jsxRuntimeExports.jsx(react.ModalOverlay, { ...overlayProps }), jsxRuntimeExports.jsxs(react.ModalContent, { "data-testid": "ModalContent", ...contentStyling, children: [!hasHeader ? (jsxRuntimeExports.jsx(react.Box, { ...header$1({
|
|
1253
|
+
hasHeader,
|
|
1254
|
+
hideCloseButton,
|
|
1255
|
+
}) })) : null, hideCloseButton ? null : (jsxRuntimeExports.jsx(react.ModalCloseButton, { "data-testid": "ModalClose-button" })), children] })] }));
|
|
1256
|
+
});
|
|
1257
|
+
Modal.displayName = 'Modal';
|
|
1258
|
+
|
|
1259
|
+
const ChakraModalWithRef = react.Modal;
|
|
1260
|
+
const fadeIn = react.keyframes `
|
|
1261
|
+
0% { opacity: 0%; }
|
|
1262
|
+
100% { opacity: 100%; }
|
|
1263
|
+
|
|
1264
|
+
`;
|
|
1265
|
+
const fadeOut = react.keyframes `
|
|
1266
|
+
0% { opacity: 100%; }
|
|
1267
|
+
100% { opacity: 0% }
|
|
1268
|
+
`;
|
|
1269
|
+
const fadeInAndEnlarge = react.keyframes `
|
|
1270
|
+
0% { opacity: 0%; transform: scale(0.9);}
|
|
1271
|
+
100% { opacity: 100%; transform: scale(1);}
|
|
1272
|
+
`;
|
|
1273
|
+
const fadeOutAndShrink = react.keyframes `
|
|
1274
|
+
0% { opacity: 100%; transform: scale(1); }
|
|
1275
|
+
100% { opacity: 0%; transform: scale(0.9); }
|
|
1276
|
+
`;
|
|
1277
|
+
const fadeInAndSlideUp = react.keyframes `
|
|
1278
|
+
0% { opacity: 0%; transform: translateY(2rem) scale(1);}
|
|
1279
|
+
100% { opacity: 100%; transform: translateY(0) scale(1);}
|
|
1280
|
+
`;
|
|
1281
|
+
const fadeOutAndSlideDown = react.keyframes `
|
|
1282
|
+
0% { opacity: 100%; transform: translateY(0) scale(1); }
|
|
1283
|
+
100% { opacity: 0%; transform: translateY(2rem) scale(1); }
|
|
1284
|
+
`;
|
|
1285
|
+
const AlwaysMountedModal = React.forwardRef(({ children, onCloseComplete, isOpen, isMobile = false, contentStyling = {}, overlayProps = {}, ...props }, ref) => {
|
|
1286
|
+
const { hasHeader, hideCloseButton } = props;
|
|
1287
|
+
const [internalOpen, setInternalOpen] = React.useState(isOpen);
|
|
1288
|
+
const onCloseCompleteRef = React.useRef(onCloseComplete);
|
|
1289
|
+
React.useEffect(() => {
|
|
1290
|
+
onCloseCompleteRef.current = onCloseComplete;
|
|
1291
|
+
});
|
|
1292
|
+
React.useEffect(() => {
|
|
1293
|
+
if (!isOpen) {
|
|
1294
|
+
const timeoutId = setTimeout(() => {
|
|
1295
|
+
setInternalOpen(false);
|
|
1296
|
+
onCloseCompleteRef.current?.();
|
|
1297
|
+
// Want this to be a bit shorter than fade out animation
|
|
1298
|
+
}, 175);
|
|
1299
|
+
return () => clearTimeout(timeoutId);
|
|
1300
|
+
}
|
|
1301
|
+
setInternalOpen(true);
|
|
1302
|
+
return undefined;
|
|
1303
|
+
}, [isOpen]);
|
|
1304
|
+
const fadeInAnimation = isMobile ? fadeInAndSlideUp : fadeInAndEnlarge;
|
|
1305
|
+
const fadeOutAnimation = isMobile
|
|
1306
|
+
? fadeOutAndSlideDown
|
|
1307
|
+
: fadeOutAndShrink;
|
|
1308
|
+
return (jsxRuntimeExports.jsxs(ChakraModalWithRef, { motionPreset: isMobile ? 'slideInBottom' : 'scale', ...props, blockScrollOnMount: isOpen, isOpen: true, ref: ref, children: [jsxRuntimeExports.jsx(react.Box, { visibility: internalOpen ? 'visible' : 'hidden', animation: `${isOpen ? fadeIn : fadeOut} 0.2s ease-in-out`, zIndex: 3, as: framerMotion.motion.div, position: "relative", children: jsxRuntimeExports.jsx(react.ModalOverlay, { ...overlayProps }) }), jsxRuntimeExports.jsx(react.Box, { visibility: internalOpen ? 'visible' : 'hidden', animation: `${isOpen ? fadeIn : fadeOut} 0.2s ease-in-out`, zIndex: 4, as: framerMotion.motion.div, position: "relative", children: jsxRuntimeExports.jsxs(react.ModalContent, { ...contentStyling, animation: `${isOpen ? fadeInAnimation : fadeOutAnimation} 0.2s ease-in-out`, children: [!hasHeader ? (jsxRuntimeExports.jsx(react.Box, { ...header$1({
|
|
1309
|
+
hasHeader,
|
|
1310
|
+
hideCloseButton,
|
|
1311
|
+
}) })) : null, hideCloseButton ? null : jsxRuntimeExports.jsx(react.ModalCloseButton, {}), children] }) })] }));
|
|
1312
|
+
});
|
|
1313
|
+
AlwaysMountedModal.displayName = 'AlwaysMountedModal';
|
|
1314
|
+
|
|
1483
1315
|
const container = {
|
|
1484
1316
|
base: '100%', // 640px
|
|
1485
1317
|
tablet: '45rem', // 720px
|
|
@@ -2206,6 +2038,22 @@ const variants$c = {
|
|
|
2206
2038
|
bg: activeSecondaryColor,
|
|
2207
2039
|
},
|
|
2208
2040
|
},
|
|
2041
|
+
iconSecondary: {
|
|
2042
|
+
bg: 'white',
|
|
2043
|
+
borderColor: 'gray.medium',
|
|
2044
|
+
color: 'black',
|
|
2045
|
+
minW: 'unset',
|
|
2046
|
+
px: 3,
|
|
2047
|
+
py: 3,
|
|
2048
|
+
_hover: {
|
|
2049
|
+
bg: hoverSecondaryColor,
|
|
2050
|
+
color: 'black',
|
|
2051
|
+
...disabledButtonHoverStyle,
|
|
2052
|
+
},
|
|
2053
|
+
_active: {
|
|
2054
|
+
bg: activeSecondaryColor,
|
|
2055
|
+
},
|
|
2056
|
+
},
|
|
2209
2057
|
secondaryOnDark: {
|
|
2210
2058
|
bg: 'none',
|
|
2211
2059
|
borderColor: 'white',
|
|
@@ -2244,6 +2092,32 @@ const variants$c = {
|
|
|
2244
2092
|
},
|
|
2245
2093
|
},
|
|
2246
2094
|
},
|
|
2095
|
+
iconTertiary: {
|
|
2096
|
+
bg: 'none',
|
|
2097
|
+
borderWidth: 'none',
|
|
2098
|
+
borderRadius: 'unset',
|
|
2099
|
+
color: 'black',
|
|
2100
|
+
h: 'unset',
|
|
2101
|
+
m: 'unset',
|
|
2102
|
+
minW: 'unset',
|
|
2103
|
+
px: 2,
|
|
2104
|
+
py: 2,
|
|
2105
|
+
lineHeight: 1,
|
|
2106
|
+
_disabled: {
|
|
2107
|
+
bg: 'none',
|
|
2108
|
+
color: 'gray.dark',
|
|
2109
|
+
},
|
|
2110
|
+
_hover: {
|
|
2111
|
+
_disabled: {
|
|
2112
|
+
color: 'gray.dark',
|
|
2113
|
+
},
|
|
2114
|
+
},
|
|
2115
|
+
_active: {
|
|
2116
|
+
_disabled: {
|
|
2117
|
+
color: 'gray.dark',
|
|
2118
|
+
},
|
|
2119
|
+
},
|
|
2120
|
+
},
|
|
2247
2121
|
tertiaryOnDark: {
|
|
2248
2122
|
bg: 'none',
|
|
2249
2123
|
borderRadius: 'unset',
|
|
@@ -2327,49 +2201,36 @@ const anchorProps = (isExternal = false) => ({
|
|
|
2327
2201
|
rel: 'noopener noreferrer',
|
|
2328
2202
|
}),
|
|
2329
2203
|
});
|
|
2330
|
-
const Button$1 = React.forwardRef(({ asAnchor, isExternal, height = 'md', type = 'button', variant = 'primary', ...props }, ref) => (jsxRuntimeExports.jsx(react.Button, { iconSpacing: 2, type: type, variant: variant, ...props, ...heightProps(height), ...((asAnchor || props.as === 'a') && anchorProps(isExternal)), ref: ref })));
|
|
2204
|
+
const Button$1 = React.forwardRef(({ asAnchor, isExternal, height = 'md', type = 'button', variant = 'primary', ...props }, ref) => (jsxRuntimeExports.jsx(react.Button, { iconSpacing: variant === 'iconSecondary' || variant === 'iconTertiary' ? 0 : 2, type: type, variant: variant, ...props, ...heightProps(height), ...((asAnchor || props.as === 'a') && anchorProps(isExternal)), ref: ref })));
|
|
2331
2205
|
Button$1.displayName = 'Button';
|
|
2332
2206
|
|
|
2333
2207
|
const Drawer = ({ header, drawerCloseButton, children, headerProps, ...props }) => {
|
|
2334
2208
|
return (jsxRuntimeExports.jsxs(react.Drawer, { placement: "right", ...props, children: [jsxRuntimeExports.jsx(react.DrawerOverlay, {}), jsxRuntimeExports.jsxs(react.DrawerContent, { children: [jsxRuntimeExports.jsxs(react.DrawerHeader, { ...headerProps, children: [header, drawerCloseButton || jsxRuntimeExports.jsx(react.DrawerCloseButton, {})] }), children] })] }));
|
|
2335
2209
|
};
|
|
2336
2210
|
|
|
2337
|
-
const AccordionActionButton =
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
}
|
|
2346
|
-
onClick === null || onClick === void 0 || onClick();
|
|
2347
|
-
};
|
|
2348
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.Box, {
|
|
2349
|
-
ref: ref,
|
|
2350
|
-
fontSize: "sm",
|
|
2351
|
-
role: "button",
|
|
2352
|
-
onClick: handleOnClick,
|
|
2353
|
-
color: "primary.default"
|
|
2354
|
-
}, children);
|
|
2211
|
+
const AccordionActionButton = React.forwardRef(({ children, onClick }, ref) => {
|
|
2212
|
+
const handleOnClick = (e) => {
|
|
2213
|
+
if (onClick) {
|
|
2214
|
+
e.preventDefault();
|
|
2215
|
+
}
|
|
2216
|
+
onClick?.();
|
|
2217
|
+
};
|
|
2218
|
+
return (jsxRuntimeExports.jsx(react.Box, { ref: ref, fontSize: "sm", role: "button", onClick: handleOnClick, color: "primary.default", children: children }));
|
|
2355
2219
|
});
|
|
2356
|
-
AccordionActionButton.
|
|
2357
|
-
onClick: PropTypes__default.default.func,
|
|
2358
|
-
children: PropTypes__default.default.node.isRequired
|
|
2359
|
-
};
|
|
2220
|
+
AccordionActionButton.displayName = 'AccordionActionButton';
|
|
2360
2221
|
|
|
2361
2222
|
var _path$5;
|
|
2362
|
-
function _extends$
|
|
2363
|
-
return _extends$
|
|
2223
|
+
function _extends$6() {
|
|
2224
|
+
return _extends$6 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2364
2225
|
for (var e = 1; e < arguments.length; e++) {
|
|
2365
2226
|
var t = arguments[e];
|
|
2366
2227
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2367
2228
|
}
|
|
2368
2229
|
return n;
|
|
2369
|
-
}, _extends$
|
|
2230
|
+
}, _extends$6.apply(null, arguments);
|
|
2370
2231
|
}
|
|
2371
2232
|
var SvgX = function SvgX(props, ref) {
|
|
2372
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2233
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({}, props, {
|
|
2373
2234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2374
2235
|
fill: "currentColor",
|
|
2375
2236
|
viewBox: "0 0 24 24",
|
|
@@ -2383,17 +2244,17 @@ var SvgX = function SvgX(props, ref) {
|
|
|
2383
2244
|
var ForwardRef$5 = /*#__PURE__*/React.forwardRef(SvgX);
|
|
2384
2245
|
|
|
2385
2246
|
var _path$4;
|
|
2386
|
-
function _extends$
|
|
2387
|
-
return _extends$
|
|
2247
|
+
function _extends$5() {
|
|
2248
|
+
return _extends$5 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2388
2249
|
for (var e = 1; e < arguments.length; e++) {
|
|
2389
2250
|
var t = arguments[e];
|
|
2390
2251
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2391
2252
|
}
|
|
2392
2253
|
return n;
|
|
2393
|
-
}, _extends$
|
|
2254
|
+
}, _extends$5.apply(null, arguments);
|
|
2394
2255
|
}
|
|
2395
2256
|
var SvgInfoCircleFilled = function SvgInfoCircleFilled(props, ref) {
|
|
2396
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2257
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({}, props, {
|
|
2397
2258
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2398
2259
|
fill: "currentColor",
|
|
2399
2260
|
viewBox: "0 0 24 24",
|
|
@@ -2407,17 +2268,17 @@ var SvgInfoCircleFilled = function SvgInfoCircleFilled(props, ref) {
|
|
|
2407
2268
|
var ForwardRef$4 = /*#__PURE__*/React.forwardRef(SvgInfoCircleFilled);
|
|
2408
2269
|
|
|
2409
2270
|
var _path$3;
|
|
2410
|
-
function _extends$
|
|
2411
|
-
return _extends$
|
|
2271
|
+
function _extends$4() {
|
|
2272
|
+
return _extends$4 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2412
2273
|
for (var e = 1; e < arguments.length; e++) {
|
|
2413
2274
|
var t = arguments[e];
|
|
2414
2275
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2415
2276
|
}
|
|
2416
2277
|
return n;
|
|
2417
|
-
}, _extends$
|
|
2278
|
+
}, _extends$4.apply(null, arguments);
|
|
2418
2279
|
}
|
|
2419
2280
|
var SvgExclamationTriangleFilled = function SvgExclamationTriangleFilled(props, ref) {
|
|
2420
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2281
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({}, props, {
|
|
2421
2282
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2422
2283
|
fill: "currentColor",
|
|
2423
2284
|
viewBox: "0 0 24 24",
|
|
@@ -2431,17 +2292,17 @@ var SvgExclamationTriangleFilled = function SvgExclamationTriangleFilled(props,
|
|
|
2431
2292
|
var ForwardRef$3 = /*#__PURE__*/React.forwardRef(SvgExclamationTriangleFilled);
|
|
2432
2293
|
|
|
2433
2294
|
var _path$2;
|
|
2434
|
-
function _extends$
|
|
2435
|
-
return _extends$
|
|
2295
|
+
function _extends$3() {
|
|
2296
|
+
return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2436
2297
|
for (var e = 1; e < arguments.length; e++) {
|
|
2437
2298
|
var t = arguments[e];
|
|
2438
2299
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2439
2300
|
}
|
|
2440
2301
|
return n;
|
|
2441
|
-
}, _extends$
|
|
2302
|
+
}, _extends$3.apply(null, arguments);
|
|
2442
2303
|
}
|
|
2443
2304
|
var SvgCheckmarkCircleFilled = function SvgCheckmarkCircleFilled(props, ref) {
|
|
2444
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2305
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({}, props, {
|
|
2445
2306
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2446
2307
|
fill: "currentColor",
|
|
2447
2308
|
viewBox: "0 0 24 24",
|
|
@@ -2488,139 +2349,107 @@ const Alert = React.forwardRef(({ status = 'neutral', title = null, buttonProps
|
|
|
2488
2349
|
Alert.displayName = 'Alert';
|
|
2489
2350
|
|
|
2490
2351
|
const variants$b = {
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2352
|
+
line: {
|
|
2353
|
+
tablist: {
|
|
2354
|
+
borderBottom: '2px solid',
|
|
2355
|
+
borderColor: 'inherit',
|
|
2356
|
+
},
|
|
2357
|
+
tab: {
|
|
2358
|
+
color: 'gray.600',
|
|
2359
|
+
borderBottom: '2px solid',
|
|
2360
|
+
borderColor: 'transparent',
|
|
2361
|
+
marginBottom: '-2px',
|
|
2362
|
+
_selected: {
|
|
2363
|
+
color: 'primary.default',
|
|
2364
|
+
borderColor: 'primary.default',
|
|
2365
|
+
fontWeight: 'semibold',
|
|
2366
|
+
},
|
|
2367
|
+
_active: {
|
|
2368
|
+
color: 'black',
|
|
2369
|
+
bg: 'transparent',
|
|
2370
|
+
},
|
|
2371
|
+
_disabled: {
|
|
2372
|
+
opacity: 0.4,
|
|
2373
|
+
cursor: 'not-allowed',
|
|
2374
|
+
},
|
|
2375
|
+
_hover: {
|
|
2376
|
+
color: 'black',
|
|
2377
|
+
},
|
|
2378
|
+
},
|
|
2379
|
+
},
|
|
2380
|
+
enclosed: {
|
|
2381
|
+
tablist: {
|
|
2382
|
+
backgroundColor: 'white',
|
|
2383
|
+
borderRadius: '8px',
|
|
2384
|
+
borderColor: 'gray.200',
|
|
2385
|
+
borderWidth: '1px',
|
|
2386
|
+
paddingY: 1,
|
|
2387
|
+
},
|
|
2388
|
+
tab: {
|
|
2389
|
+
borderRadius: '6px',
|
|
2390
|
+
marginX: 1,
|
|
2391
|
+
_selected: {
|
|
2392
|
+
fontWeight: 'semibold',
|
|
2393
|
+
color: 'white',
|
|
2394
|
+
backgroundColor: 'primary.default',
|
|
2395
|
+
_hover: {
|
|
2396
|
+
backgroundColor: 'primary.600',
|
|
2397
|
+
},
|
|
2398
|
+
},
|
|
2399
|
+
_active: {
|
|
2400
|
+
backgroundColor: 'gray.200',
|
|
2401
|
+
},
|
|
2402
|
+
_disabled: {
|
|
2403
|
+
opacity: 0.4,
|
|
2404
|
+
cursor: 'not-allowed',
|
|
2405
|
+
},
|
|
2406
|
+
},
|
|
2526
2407
|
},
|
|
2527
|
-
tab: {
|
|
2528
|
-
borderRadius: '6px',
|
|
2529
|
-
marginX: 1,
|
|
2530
|
-
_selected: {
|
|
2531
|
-
fontWeight: 'semibold',
|
|
2532
|
-
color: 'white',
|
|
2533
|
-
backgroundColor: 'primary.default',
|
|
2534
|
-
_hover: {
|
|
2535
|
-
backgroundColor: 'primary.600'
|
|
2536
|
-
}
|
|
2537
|
-
},
|
|
2538
|
-
_active: {
|
|
2539
|
-
backgroundColor: 'gray.200'
|
|
2540
|
-
},
|
|
2541
|
-
_disabled: {
|
|
2542
|
-
opacity: 0.4,
|
|
2543
|
-
cursor: 'not-allowed'
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
}
|
|
2547
2408
|
};
|
|
2548
|
-
|
|
2549
|
-
|
|
2409
|
+
const tabsStyle = merge__default.default(react.theme.components.Tabs, {
|
|
2410
|
+
variants: variants$b,
|
|
2550
2411
|
});
|
|
2551
2412
|
|
|
2552
2413
|
const SIZE_SMALL = 'small';
|
|
2553
2414
|
const SIZE_BODY = 'body';
|
|
2554
2415
|
const SIZE_HEADING = 'heading';
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
let {
|
|
2570
|
-
size,
|
|
2571
|
-
variant = 'line'
|
|
2572
|
-
} = _ref;
|
|
2573
|
-
const fontSizeMapping = {
|
|
2574
|
-
[SIZE_SMALL]: fontSizes.xs,
|
|
2575
|
-
[SIZE_BODY]: fontSizes.base,
|
|
2576
|
-
[SIZE_HEADING]: fontSizes.lg
|
|
2577
|
-
};
|
|
2578
|
-
const styleProps = styles$2.variants["".concat(variant)];
|
|
2579
|
-
styleProps.tab.fontSize = fontSizeMapping[size];
|
|
2580
|
-
return styleProps;
|
|
2416
|
+
const combineSizeWithVariant = ({ size, variant = 'line', }) => {
|
|
2417
|
+
const fontSizeMapping = {
|
|
2418
|
+
[SIZE_SMALL]: fontSizes.xs,
|
|
2419
|
+
[SIZE_BODY]: fontSizes.base,
|
|
2420
|
+
[SIZE_HEADING]: fontSizes.lg,
|
|
2421
|
+
};
|
|
2422
|
+
const styleProps = variants$b[variant];
|
|
2423
|
+
return {
|
|
2424
|
+
...styleProps,
|
|
2425
|
+
tab: {
|
|
2426
|
+
...styleProps.tab,
|
|
2427
|
+
fontSize: fontSizeMapping[size],
|
|
2428
|
+
},
|
|
2429
|
+
};
|
|
2581
2430
|
};
|
|
2582
2431
|
|
|
2583
|
-
const _excluded$a = ["size"];
|
|
2584
2432
|
const sizeMapping = {
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2433
|
+
[SIZE_SMALL]: 'sm',
|
|
2434
|
+
[SIZE_BODY]: 'md',
|
|
2435
|
+
[SIZE_HEADING]: 'lg',
|
|
2588
2436
|
};
|
|
2589
|
-
const Tabs =
|
|
2590
|
-
|
|
2591
|
-
size
|
|
2592
|
-
} = _ref,
|
|
2593
|
-
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
2594
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.Tabs, _extends$6({
|
|
2595
|
-
size: sizeMapping[size]
|
|
2596
|
-
}, props, combineSizeWithVariant({
|
|
2597
|
-
size
|
|
2598
|
-
}), {
|
|
2599
|
-
ref: ref
|
|
2600
|
-
}));
|
|
2437
|
+
const Tabs = React__namespace.default.forwardRef(({ size = SIZE_BODY, ...props }, ref) => {
|
|
2438
|
+
return (jsxRuntimeExports.jsx(react.Tabs, { size: sizeMapping[size], ...props, ...combineSizeWithVariant({ size }), ref: ref }));
|
|
2601
2439
|
});
|
|
2602
|
-
Tabs.defaultProps = {
|
|
2603
|
-
size: SIZE_BODY
|
|
2604
|
-
};
|
|
2605
|
-
Tabs.propTypes = {
|
|
2606
|
-
/** The React node that will render inside the element */
|
|
2607
|
-
children: PropTypes__default.default.node,
|
|
2608
|
-
/** Controls the size of Tabs */
|
|
2609
|
-
size: PropTypes__default.default.oneOf([SIZE_SMALL, SIZE_BODY, SIZE_HEADING])
|
|
2610
|
-
};
|
|
2611
2440
|
|
|
2612
2441
|
var _path$1;
|
|
2613
|
-
function _extends$
|
|
2614
|
-
return _extends$
|
|
2442
|
+
function _extends$2() {
|
|
2443
|
+
return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2615
2444
|
for (var e = 1; e < arguments.length; e++) {
|
|
2616
2445
|
var t = arguments[e];
|
|
2617
2446
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2618
2447
|
}
|
|
2619
2448
|
return n;
|
|
2620
|
-
}, _extends$
|
|
2449
|
+
}, _extends$2.apply(null, arguments);
|
|
2621
2450
|
}
|
|
2622
2451
|
var SvgChevronDown = function SvgChevronDown(props, ref) {
|
|
2623
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2452
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({}, props, {
|
|
2624
2453
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2625
2454
|
fill: "currentColor",
|
|
2626
2455
|
viewBox: "0 0 24 24",
|
|
@@ -3074,61 +2903,62 @@ var Heading_styles = {
|
|
|
3074
2903
|
|
|
3075
2904
|
const parts$2 = ['table', 'thead', 'tbody', 'tr', 'th', 'td', 'caption'];
|
|
3076
2905
|
const baseStyle$b = {
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
2906
|
+
table: {
|
|
2907
|
+
borderCollapse: 'collapse',
|
|
2908
|
+
color: 'text.primary.light',
|
|
2909
|
+
width: '100%',
|
|
2910
|
+
},
|
|
2911
|
+
thead: {
|
|
2912
|
+
borderBottom: '1px',
|
|
2913
|
+
borderColor: 'gray.medium',
|
|
2914
|
+
},
|
|
2915
|
+
th: {
|
|
2916
|
+
fontFamily: 'heading',
|
|
2917
|
+
fontSize: variants$9.h4.fontSize,
|
|
2918
|
+
fontWeight: 'semibold',
|
|
2919
|
+
letterSpacing: 'unset',
|
|
2920
|
+
padding: 4,
|
|
2921
|
+
textAlign: 'start',
|
|
2922
|
+
textTransform: 'none',
|
|
2923
|
+
},
|
|
2924
|
+
tr: {
|
|
2925
|
+
borderBottom: '1px',
|
|
2926
|
+
borderColor: 'gray.medium',
|
|
2927
|
+
_last: {
|
|
2928
|
+
border: 'none',
|
|
2929
|
+
},
|
|
2930
|
+
},
|
|
2931
|
+
td: {
|
|
2932
|
+
padding: 4,
|
|
2933
|
+
textAlign: 'start',
|
|
2934
|
+
},
|
|
3106
2935
|
};
|
|
3107
2936
|
const roundedWhiteVariant = {
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
2937
|
+
table: {
|
|
2938
|
+
backgroundColor: 'background.white',
|
|
2939
|
+
borderRadius: 6,
|
|
2940
|
+
boxShadow: 'md',
|
|
2941
|
+
marginBottom: 1,
|
|
2942
|
+
},
|
|
3114
2943
|
};
|
|
3115
2944
|
const roundedGrayVariant = {
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
2945
|
+
table: {
|
|
2946
|
+
...roundedWhiteVariant.table,
|
|
2947
|
+
backgroundColor: 'background.gray',
|
|
2948
|
+
},
|
|
3119
2949
|
};
|
|
3120
2950
|
const variants$8 = {
|
|
3121
|
-
|
|
3122
|
-
|
|
2951
|
+
rounded: roundedWhiteVariant,
|
|
2952
|
+
roundedGray: roundedGrayVariant,
|
|
3123
2953
|
};
|
|
3124
2954
|
const defaultProps$6 = {
|
|
3125
|
-
|
|
2955
|
+
variant: 'rounded',
|
|
3126
2956
|
};
|
|
3127
2957
|
var Table_styles = {
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
2958
|
+
parts: parts$2,
|
|
2959
|
+
variants: variants$8,
|
|
2960
|
+
baseStyle: baseStyle$b,
|
|
2961
|
+
defaultProps: defaultProps$6,
|
|
3132
2962
|
};
|
|
3133
2963
|
|
|
3134
2964
|
const chakraLinkStyle = react.theme.components.Link;
|
|
@@ -3507,23 +3337,19 @@ const switchStyle = {
|
|
|
3507
3337
|
};
|
|
3508
3338
|
|
|
3509
3339
|
const popperStyles = {
|
|
3510
|
-
|
|
3340
|
+
borderRadius: 'base',
|
|
3511
3341
|
};
|
|
3512
3342
|
|
|
3513
|
-
const body$2 =
|
|
3514
|
-
|
|
3343
|
+
const body$2 = (_props) => ({
|
|
3344
|
+
fontSize: 'sm',
|
|
3515
3345
|
});
|
|
3516
3346
|
|
|
3517
3347
|
const headerStyles = {
|
|
3518
|
-
|
|
3519
|
-
|
|
3348
|
+
marginBottom: 2,
|
|
3349
|
+
fontWeight: 'semibold',
|
|
3520
3350
|
};
|
|
3521
3351
|
|
|
3522
|
-
const popoverContentStyles =
|
|
3523
|
-
let {
|
|
3524
|
-
variant
|
|
3525
|
-
} = _ref;
|
|
3526
|
-
return {
|
|
3352
|
+
const popoverContentStyles = ({ variant }) => ({
|
|
3527
3353
|
padding: 4,
|
|
3528
3354
|
marginBottom: 0,
|
|
3529
3355
|
maxWidth: '20rem',
|
|
@@ -3534,24 +3360,23 @@ const popoverContentStyles = _ref => {
|
|
|
3534
3360
|
borderColor: 'gray.100',
|
|
3535
3361
|
borderWidth: '1px',
|
|
3536
3362
|
borderStyle: 'solid',
|
|
3537
|
-
'--popper-arrow-shadow-color': t => t.colors.gray['100'],
|
|
3363
|
+
'--popper-arrow-shadow-color': (t) => t.colors.gray['100'],
|
|
3538
3364
|
zIndex: 'layer10',
|
|
3539
3365
|
_focusVisible: {
|
|
3540
|
-
|
|
3541
|
-
}
|
|
3542
|
-
|
|
3543
|
-
};
|
|
3366
|
+
outline: '3px solid rgba(91, 170, 250, 0.7)',
|
|
3367
|
+
},
|
|
3368
|
+
});
|
|
3544
3369
|
|
|
3545
3370
|
const parts$1 = ['popper', 'content', 'header', 'body'];
|
|
3546
|
-
const baseStyle$6 = props => ({
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3371
|
+
const baseStyle$6 = (props) => ({
|
|
3372
|
+
header: headerStyles,
|
|
3373
|
+
content: popoverContentStyles(props),
|
|
3374
|
+
body: body$2(),
|
|
3375
|
+
popper: popperStyles,
|
|
3551
3376
|
});
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3377
|
+
const popoverStyle = merge__default.default(react.theme.components.Popover, {
|
|
3378
|
+
parts: parts$1,
|
|
3379
|
+
baseStyle: baseStyle$6,
|
|
3555
3380
|
});
|
|
3556
3381
|
|
|
3557
3382
|
const baseStyle$5 = {
|
|
@@ -3600,6 +3425,79 @@ const inputStyle = merge__default.default(react.theme.components.Input, {
|
|
|
3600
3425
|
variants: variants$5,
|
|
3601
3426
|
});
|
|
3602
3427
|
|
|
3428
|
+
function _defineProperty(e, r, t) {
|
|
3429
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
3430
|
+
value: t,
|
|
3431
|
+
enumerable: !0,
|
|
3432
|
+
configurable: !0,
|
|
3433
|
+
writable: !0
|
|
3434
|
+
}) : e[r] = t, e;
|
|
3435
|
+
}
|
|
3436
|
+
function _extends$1() {
|
|
3437
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
|
|
3438
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
3439
|
+
var t = arguments[e];
|
|
3440
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
3441
|
+
}
|
|
3442
|
+
return n;
|
|
3443
|
+
}, _extends$1.apply(null, arguments);
|
|
3444
|
+
}
|
|
3445
|
+
function ownKeys(e, r) {
|
|
3446
|
+
var t = Object.keys(e);
|
|
3447
|
+
if (Object.getOwnPropertySymbols) {
|
|
3448
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
3449
|
+
r && (o = o.filter(function (r) {
|
|
3450
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
3451
|
+
})), t.push.apply(t, o);
|
|
3452
|
+
}
|
|
3453
|
+
return t;
|
|
3454
|
+
}
|
|
3455
|
+
function _objectSpread2(e) {
|
|
3456
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
3457
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
3458
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
3459
|
+
_defineProperty(e, r, t[r]);
|
|
3460
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
3461
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
3462
|
+
});
|
|
3463
|
+
}
|
|
3464
|
+
return e;
|
|
3465
|
+
}
|
|
3466
|
+
function _objectWithoutProperties(e, t) {
|
|
3467
|
+
if (null == e) return {};
|
|
3468
|
+
var o,
|
|
3469
|
+
r,
|
|
3470
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
3471
|
+
if (Object.getOwnPropertySymbols) {
|
|
3472
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
3473
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
3474
|
+
}
|
|
3475
|
+
return i;
|
|
3476
|
+
}
|
|
3477
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
3478
|
+
if (null == r) return {};
|
|
3479
|
+
var t = {};
|
|
3480
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
3481
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
3482
|
+
t[n] = r[n];
|
|
3483
|
+
}
|
|
3484
|
+
return t;
|
|
3485
|
+
}
|
|
3486
|
+
function _toPrimitive(t, r) {
|
|
3487
|
+
if ("object" != typeof t || !t) return t;
|
|
3488
|
+
var e = t[Symbol.toPrimitive];
|
|
3489
|
+
if (void 0 !== e) {
|
|
3490
|
+
var i = e.call(t, r || "default");
|
|
3491
|
+
if ("object" != typeof i) return i;
|
|
3492
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3493
|
+
}
|
|
3494
|
+
return ("string" === r ? String : Number)(t);
|
|
3495
|
+
}
|
|
3496
|
+
function _toPropertyKey(t) {
|
|
3497
|
+
var i = _toPrimitive(t, "string");
|
|
3498
|
+
return "symbol" == typeof i ? i : i + "";
|
|
3499
|
+
}
|
|
3500
|
+
|
|
3603
3501
|
//Below isn't being used in build for some reason
|
|
3604
3502
|
const variants$4 = {
|
|
3605
3503
|
refreshed: {
|
|
@@ -3610,7 +3508,7 @@ const variants$4 = {
|
|
|
3610
3508
|
})
|
|
3611
3509
|
}
|
|
3612
3510
|
};
|
|
3613
|
-
var index$
|
|
3511
|
+
var index$1 = merge__default.default(inputStyle, {
|
|
3614
3512
|
variants: variants$4
|
|
3615
3513
|
});
|
|
3616
3514
|
|
|
@@ -3644,53 +3542,36 @@ const variants$3 = {
|
|
|
3644
3542
|
minHeight: "14"
|
|
3645
3543
|
})
|
|
3646
3544
|
};
|
|
3647
|
-
var index
|
|
3545
|
+
var index = merge__default.default(buttonStyle, {
|
|
3648
3546
|
variants: variants$3
|
|
3649
3547
|
});
|
|
3650
3548
|
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3549
|
+
const overlay = {
|
|
3550
|
+
background: 'modalOverlay',
|
|
3551
|
+
zIndex: 'layer8',
|
|
3654
3552
|
};
|
|
3655
3553
|
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
},
|
|
3664
|
-
height: '100%',
|
|
3665
|
-
minHeight: '-moz-available',
|
|
3666
|
-
minHeight: '-webkit-fill-available',
|
|
3667
|
-
minHeight: 'fill-available'
|
|
3554
|
+
const dialogContainer$1 = {
|
|
3555
|
+
display: 'flex',
|
|
3556
|
+
zIndex: 'layer8',
|
|
3557
|
+
justifyContent: 'center',
|
|
3558
|
+
alignItems: { base: 'flex-end', tablet: 'center' },
|
|
3559
|
+
height: '100%',
|
|
3560
|
+
minHeight: 'fill-available',
|
|
3668
3561
|
};
|
|
3669
3562
|
|
|
3670
|
-
|
|
3671
|
-
let {
|
|
3672
|
-
hasFooter
|
|
3673
|
-
} = _ref;
|
|
3674
|
-
return {
|
|
3563
|
+
const dialog$1 = ({ hasFooter }) => ({
|
|
3675
3564
|
borderRadius: 'md',
|
|
3676
|
-
borderBottomRadius: {
|
|
3677
|
-
base: '0',
|
|
3678
|
-
tablet: 'md'
|
|
3679
|
-
},
|
|
3565
|
+
borderBottomRadius: { base: '0', tablet: 'md' },
|
|
3680
3566
|
background: 'white',
|
|
3681
3567
|
color: 'inherit',
|
|
3682
3568
|
marginY: 0,
|
|
3683
3569
|
zIndex: 'layer8',
|
|
3684
3570
|
boxShadow: 'lg',
|
|
3685
|
-
paddingBottom: hasFooter ? 0 : 4
|
|
3686
|
-
|
|
3687
|
-
};
|
|
3571
|
+
paddingBottom: hasFooter ? 0 : 4,
|
|
3572
|
+
});
|
|
3688
3573
|
|
|
3689
|
-
|
|
3690
|
-
let {
|
|
3691
|
-
hasHeader
|
|
3692
|
-
} = _ref;
|
|
3693
|
-
return {
|
|
3574
|
+
const closeButton$1 = ({ hasHeader }) => ({
|
|
3694
3575
|
position: 'absolute',
|
|
3695
3576
|
top: hasHeader ? 4 : 2,
|
|
3696
3577
|
insetEnd: hasHeader ? 4 : 2,
|
|
@@ -3699,93 +3580,88 @@ var closeButton$1 = _ref => {
|
|
|
3699
3580
|
width: 8,
|
|
3700
3581
|
height: 8,
|
|
3701
3582
|
_focus: {
|
|
3702
|
-
|
|
3583
|
+
boxShadow: 'outline',
|
|
3703
3584
|
},
|
|
3704
3585
|
_hover: {
|
|
3705
|
-
|
|
3706
|
-
}
|
|
3707
|
-
|
|
3586
|
+
bg: 'gray.50',
|
|
3587
|
+
},
|
|
3588
|
+
});
|
|
3589
|
+
|
|
3590
|
+
const body$1 = ({ hasFooter, hasHeader, hideCloseButton }) => {
|
|
3591
|
+
const scrollingHeaderStyles = hasHeader || !hideCloseButton
|
|
3592
|
+
? {
|
|
3593
|
+
// The following adapted from https://lea.verou.me/2012/04/background-attachment-local/
|
|
3594
|
+
background: 'linear-gradient(white 30%, white), linear-gradient(rgb(0 0 0 / 10%) 0%, white)',
|
|
3595
|
+
backgroundRepeat: 'no-repeat',
|
|
3596
|
+
backgroundColor: 'white',
|
|
3597
|
+
backgroundSize: '100% 30px, 100% 10px',
|
|
3598
|
+
backgroundAttachment: 'local, scroll',
|
|
3599
|
+
}
|
|
3600
|
+
: {};
|
|
3601
|
+
return {
|
|
3602
|
+
borderBottomRadius: hasFooter ? null : 'md',
|
|
3603
|
+
paddingX: 4,
|
|
3604
|
+
paddingBottom: 4,
|
|
3605
|
+
flex: 1,
|
|
3606
|
+
overflow: 'auto',
|
|
3607
|
+
display: 'flex',
|
|
3608
|
+
...scrollingHeaderStyles,
|
|
3609
|
+
};
|
|
3708
3610
|
};
|
|
3709
3611
|
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
background: 'linear-gradient(white 30%, white), linear-gradient(rgb(0 0 0 / 10%) 0%, white)',
|
|
3719
|
-
backgroundRepeat: 'no-repeat',
|
|
3720
|
-
backgroundColor: 'white',
|
|
3721
|
-
backgroundSize: '100% 30px, 100% 10px',
|
|
3722
|
-
backgroundAttachment: 'local, scroll'
|
|
3723
|
-
} : {};
|
|
3724
|
-
return _objectSpread2({
|
|
3725
|
-
borderBottomRadius: hasFooter ? null : 'md',
|
|
3726
|
-
paddingX: 4,
|
|
3727
|
-
paddingBottom: 4,
|
|
3728
|
-
flex: 1,
|
|
3729
|
-
overflow: 'auto',
|
|
3730
|
-
display: 'flex'
|
|
3731
|
-
}, scrollingHeaderStyles);
|
|
3732
|
-
};
|
|
3733
|
-
|
|
3734
|
-
var footer$1 = {
|
|
3735
|
-
borderTop: '1px',
|
|
3736
|
-
borderColor: 'gray.100',
|
|
3737
|
-
padding: 4,
|
|
3738
|
-
gap: 4,
|
|
3739
|
-
justifyContent: 'flex-start',
|
|
3740
|
-
flexDirection: {
|
|
3741
|
-
base: 'column',
|
|
3742
|
-
desktop: 'row-reverse'
|
|
3743
|
-
}
|
|
3612
|
+
const footer$1 = {
|
|
3613
|
+
borderTop: '1px',
|
|
3614
|
+
borderColor: 'gray.100',
|
|
3615
|
+
padding: 4,
|
|
3616
|
+
gap: 4,
|
|
3617
|
+
justifyContent: 'flex-start',
|
|
3618
|
+
alignItems: 'normal',
|
|
3619
|
+
flexDirection: { base: 'column', desktop: 'row-reverse' },
|
|
3744
3620
|
};
|
|
3745
3621
|
|
|
3746
|
-
const baseStyle$4 = props => ({
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3622
|
+
const baseStyle$4 = (props) => ({
|
|
3623
|
+
overlay,
|
|
3624
|
+
dialogContainer: dialogContainer$1,
|
|
3625
|
+
header: header$1(props),
|
|
3626
|
+
dialog: dialog$1(props),
|
|
3627
|
+
closeButton: closeButton$1(props),
|
|
3628
|
+
body: body$1(props),
|
|
3629
|
+
footer: footer$1,
|
|
3754
3630
|
});
|
|
3755
3631
|
const sizes$3 = {
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3632
|
+
sm: {
|
|
3633
|
+
dialog: {
|
|
3634
|
+
// Would have preferred object syntax here and below, but wasn't working for whatever reason
|
|
3635
|
+
maxWidth: ['100%', '100%', '48%', '32%', '24%'],
|
|
3636
|
+
maxHeight: ['100%', '100%', '60%', '48%', '32%'],
|
|
3637
|
+
minHeight: ['auto', 'auto', '32%', '32%', '24%'],
|
|
3638
|
+
},
|
|
3639
|
+
},
|
|
3640
|
+
'sm-md': {
|
|
3641
|
+
dialog: {
|
|
3642
|
+
maxHeight: ['100%', '100%', '65%', '65%', '65%'],
|
|
3643
|
+
minWidth: ['100%', '100%', 96, 96, 96],
|
|
3644
|
+
maxWidth: ['100%', '100%', '55%', '42%', '30%'],
|
|
3645
|
+
},
|
|
3646
|
+
},
|
|
3647
|
+
md: {
|
|
3648
|
+
dialog: {
|
|
3649
|
+
maxWidth: ['100%', '100%', '84%', '60%', '48%'],
|
|
3650
|
+
maxHeight: ['100%', '100%', '96%', '84%', '60%'],
|
|
3651
|
+
minHeight: ['auto', 'auto', '84%', '60%', '48%'],
|
|
3652
|
+
},
|
|
3653
|
+
},
|
|
3654
|
+
lg: {
|
|
3655
|
+
dialog: {
|
|
3656
|
+
maxWidth: ['100%', '100%', '96%', '84%', '72%'],
|
|
3657
|
+
maxHeight: ['100%', '100%', '96%', '96%', '84%'],
|
|
3658
|
+
minHeight: ['auto', 'auto', '96%', '84%', '72%'],
|
|
3659
|
+
},
|
|
3660
|
+
},
|
|
3785
3661
|
};
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3662
|
+
const modalStyle = merge__default.default(react.theme.components.Modal, {
|
|
3663
|
+
baseStyle: baseStyle$4,
|
|
3664
|
+
sizes: sizes$3,
|
|
3789
3665
|
});
|
|
3790
3666
|
|
|
3791
3667
|
const parts = ['control', 'label'];
|
|
@@ -4120,168 +3996,168 @@ const progressStyle = {
|
|
|
4120
3996
|
};
|
|
4121
3997
|
|
|
4122
3998
|
const baseStyle = {
|
|
4123
|
-
button: {
|
|
4124
|
-
px: 8,
|
|
4125
|
-
py: 3,
|
|
4126
|
-
fontSize: 'base',
|
|
4127
|
-
fontFamily: 'body',
|
|
4128
|
-
lineHeight: 0.875,
|
|
4129
|
-
fontWeight: 'semibold',
|
|
4130
|
-
borderWidth: '1px',
|
|
4131
|
-
borderStyle: 'solid',
|
|
4132
|
-
borderRadius: 'base',
|
|
4133
|
-
textTransform: 'capitalize',
|
|
4134
|
-
transition: 'all normal ease',
|
|
4135
|
-
_hover: {
|
|
4136
|
-
bg: 'gray.50',
|
|
4137
|
-
borderColor: 'gray.200'
|
|
4138
|
-
},
|
|
4139
|
-
_disabled: {
|
|
4140
|
-
cursor: 'not-allowed',
|
|
4141
|
-
opacity: 1,
|
|
4142
|
-
bg: 'gray.200',
|
|
4143
|
-
borderColor: 'gray.200',
|
|
4144
|
-
color: 'gray.600'
|
|
4145
|
-
},
|
|
4146
|
-
_focus: {
|
|
4147
|
-
zIndex: 1,
|
|
4148
|
-
boxShadow: 'outline'
|
|
4149
|
-
}
|
|
4150
|
-
},
|
|
4151
|
-
list: {
|
|
4152
|
-
bg: 'white',
|
|
4153
|
-
boxShadow: 'base',
|
|
4154
|
-
padding: 6,
|
|
4155
|
-
zIndex: 'layer1',
|
|
4156
|
-
width: 64
|
|
4157
|
-
},
|
|
4158
|
-
item: {
|
|
4159
|
-
paddingX: 2,
|
|
4160
|
-
paddingY: 1.5,
|
|
4161
|
-
_focus: {
|
|
4162
|
-
zIndex: 1,
|
|
4163
|
-
boxShadow: 'outline'
|
|
4164
|
-
}
|
|
4165
|
-
},
|
|
4166
|
-
groupTitle: {
|
|
4167
|
-
fontWeight: 'semibold',
|
|
4168
|
-
color: 'gray.600',
|
|
4169
|
-
padding: 2
|
|
4170
|
-
},
|
|
4171
|
-
command: {
|
|
4172
|
-
// this will style the text defined by the command
|
|
4173
|
-
// prop in the MenuItem and MenuItemOption components
|
|
4174
|
-
opacity: '0.8',
|
|
4175
|
-
fontFamily: 'mono',
|
|
4176
|
-
fontSize: 'sm',
|
|
4177
|
-
letterSpacing: 'tighter',
|
|
4178
|
-
paddingL: 4
|
|
4179
|
-
},
|
|
4180
|
-
divider: {
|
|
4181
|
-
marginY: 2,
|
|
4182
|
-
borderColor: 'gray.200'
|
|
4183
|
-
}
|
|
4184
|
-
};
|
|
4185
|
-
const variants = {
|
|
4186
|
-
basic: {
|
|
4187
3999
|
button: {
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4000
|
+
px: 8,
|
|
4001
|
+
py: 3,
|
|
4002
|
+
fontSize: 'base',
|
|
4003
|
+
fontFamily: 'body',
|
|
4004
|
+
lineHeight: 0.875,
|
|
4005
|
+
fontWeight: 'semibold',
|
|
4006
|
+
borderWidth: '1px',
|
|
4007
|
+
borderStyle: 'solid',
|
|
4008
|
+
borderRadius: 'base',
|
|
4009
|
+
textTransform: 'capitalize',
|
|
4010
|
+
transition: 'all normal ease',
|
|
4011
|
+
_hover: {
|
|
4012
|
+
bg: 'gray.50',
|
|
4013
|
+
borderColor: 'gray.200',
|
|
4014
|
+
},
|
|
4195
4015
|
_disabled: {
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4016
|
+
cursor: 'not-allowed',
|
|
4017
|
+
opacity: 1,
|
|
4018
|
+
bg: 'gray.200',
|
|
4019
|
+
borderColor: 'gray.200',
|
|
4020
|
+
color: 'gray.600',
|
|
4021
|
+
},
|
|
4022
|
+
_focus: {
|
|
4023
|
+
zIndex: 1,
|
|
4024
|
+
boxShadow: 'outline',
|
|
4025
|
+
},
|
|
4201
4026
|
},
|
|
4202
4027
|
list: {
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4028
|
+
bg: 'white',
|
|
4029
|
+
boxShadow: 'base',
|
|
4030
|
+
padding: 6,
|
|
4031
|
+
zIndex: 'layer1',
|
|
4032
|
+
width: 64,
|
|
4033
|
+
},
|
|
4034
|
+
item: {
|
|
4035
|
+
paddingX: 2,
|
|
4036
|
+
paddingY: 1.5,
|
|
4037
|
+
_focus: {
|
|
4038
|
+
zIndex: 1,
|
|
4039
|
+
boxShadow: 'outline',
|
|
4040
|
+
},
|
|
4212
4041
|
},
|
|
4213
4042
|
groupTitle: {
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
padding: 2
|
|
4043
|
+
fontWeight: 'semibold',
|
|
4044
|
+
color: 'gray.600',
|
|
4045
|
+
padding: 2,
|
|
4218
4046
|
},
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
button: {
|
|
4228
|
-
height: 8,
|
|
4229
|
-
fontSize: 'sm',
|
|
4230
|
-
fontWeight: 'semibold',
|
|
4231
|
-
color: 'black',
|
|
4232
|
-
borderColor: 'white',
|
|
4233
|
-
backgroundColor: 'white',
|
|
4234
|
-
borderRadius: 'base',
|
|
4235
|
-
paddingX: 3,
|
|
4236
|
-
paddingY: 'auto',
|
|
4237
|
-
_hover: {
|
|
4238
|
-
color: 'black',
|
|
4239
|
-
backgroundColor: 'gray.50',
|
|
4240
|
-
borderColor: 'gray.50'
|
|
4241
|
-
},
|
|
4242
|
-
_active: {
|
|
4243
|
-
color: 'primary.default',
|
|
4244
|
-
backgroundColor: 'gray.50',
|
|
4245
|
-
borderColor: 'gray.50',
|
|
4246
|
-
_hover: {
|
|
4247
|
-
color: 'primary.600',
|
|
4248
|
-
backgroundColor: 'gray.50',
|
|
4249
|
-
borderColor: 'gray.50'
|
|
4250
|
-
}
|
|
4251
|
-
}
|
|
4047
|
+
command: {
|
|
4048
|
+
// this will style the text defined by the command
|
|
4049
|
+
// prop in the MenuItem and MenuItemOption components
|
|
4050
|
+
opacity: '0.8',
|
|
4051
|
+
fontFamily: 'mono',
|
|
4052
|
+
fontSize: 'sm',
|
|
4053
|
+
letterSpacing: 'tighter',
|
|
4054
|
+
paddingLeft: 4,
|
|
4252
4055
|
},
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
padding: 8,
|
|
4257
|
-
backgroundColor: 'white'
|
|
4056
|
+
divider: {
|
|
4057
|
+
marginY: 2,
|
|
4058
|
+
borderColor: 'gray.200',
|
|
4258
4059
|
},
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4060
|
+
};
|
|
4061
|
+
const variants = {
|
|
4062
|
+
basic: {
|
|
4063
|
+
button: {
|
|
4064
|
+
bg: 'primary.default',
|
|
4065
|
+
borderColor: 'primary.default',
|
|
4066
|
+
color: 'white',
|
|
4067
|
+
_hover: {
|
|
4068
|
+
bg: 'primary.600',
|
|
4069
|
+
borderColor: 'primary.600',
|
|
4070
|
+
color: 'white',
|
|
4071
|
+
_disabled: {
|
|
4072
|
+
bg: 'gray.200',
|
|
4073
|
+
borderColor: 'gray.200',
|
|
4074
|
+
color: 'gray.600',
|
|
4075
|
+
},
|
|
4076
|
+
},
|
|
4077
|
+
},
|
|
4078
|
+
list: {
|
|
4079
|
+
bg: 'white',
|
|
4080
|
+
boxShadow: 'base',
|
|
4081
|
+
zIndex: 'layer1',
|
|
4082
|
+
borderColor: 'gray.100',
|
|
4083
|
+
borderWidth: '1px',
|
|
4084
|
+
borderStyle: 'solid',
|
|
4085
|
+
borderRadius: 'base',
|
|
4086
|
+
padding: 4,
|
|
4087
|
+
width: 64,
|
|
4088
|
+
},
|
|
4089
|
+
groupTitle: {
|
|
4090
|
+
fontWeight: 'semibold',
|
|
4091
|
+
fontSize: 'md',
|
|
4092
|
+
color: 'gray.600',
|
|
4093
|
+
padding: 2,
|
|
4094
|
+
},
|
|
4095
|
+
item: {
|
|
4096
|
+
fontWeight: 'semibold',
|
|
4097
|
+
_hover: {
|
|
4098
|
+
color: 'gray.600',
|
|
4099
|
+
},
|
|
4100
|
+
},
|
|
4101
|
+
},
|
|
4102
|
+
full: {
|
|
4103
|
+
button: {
|
|
4104
|
+
height: 8,
|
|
4105
|
+
fontSize: 'sm',
|
|
4106
|
+
fontWeight: 'semibold',
|
|
4107
|
+
color: 'black',
|
|
4108
|
+
borderColor: 'white',
|
|
4109
|
+
backgroundColor: 'white',
|
|
4110
|
+
borderRadius: 'base',
|
|
4111
|
+
paddingX: 3,
|
|
4112
|
+
paddingY: 'auto',
|
|
4113
|
+
_hover: {
|
|
4114
|
+
color: 'black',
|
|
4115
|
+
backgroundColor: 'gray.50',
|
|
4116
|
+
borderColor: 'gray.50',
|
|
4117
|
+
},
|
|
4118
|
+
_active: {
|
|
4119
|
+
color: 'primary.default',
|
|
4120
|
+
backgroundColor: 'gray.50',
|
|
4121
|
+
borderColor: 'gray.50',
|
|
4122
|
+
_hover: {
|
|
4123
|
+
color: 'primary.600',
|
|
4124
|
+
backgroundColor: 'gray.50',
|
|
4125
|
+
borderColor: 'gray.50',
|
|
4126
|
+
},
|
|
4127
|
+
},
|
|
4128
|
+
},
|
|
4129
|
+
list: {
|
|
4130
|
+
height: '30rem',
|
|
4131
|
+
width: '100vw',
|
|
4132
|
+
padding: 8,
|
|
4133
|
+
backgroundColor: 'white',
|
|
4134
|
+
},
|
|
4135
|
+
groupTitle: {
|
|
4136
|
+
fontSize: 'sm',
|
|
4137
|
+
weight: 'normal',
|
|
4138
|
+
color: 'gray.600',
|
|
4139
|
+
},
|
|
4140
|
+
item: {
|
|
4141
|
+
display: 'block',
|
|
4142
|
+
paddingX: 3.5,
|
|
4143
|
+
paddingY: 2.5,
|
|
4144
|
+
marginBottom: 2,
|
|
4145
|
+
_last: {
|
|
4146
|
+
marginBottom: 0,
|
|
4147
|
+
},
|
|
4148
|
+
_hover: {
|
|
4149
|
+
backgroundColor: 'gray.50',
|
|
4150
|
+
},
|
|
4151
|
+
_focus: {
|
|
4152
|
+
boxShadow: 'none',
|
|
4153
|
+
backgroundColor: 'gray.50',
|
|
4154
|
+
},
|
|
4155
|
+
},
|
|
4263
4156
|
},
|
|
4264
|
-
item: {
|
|
4265
|
-
display: 'block',
|
|
4266
|
-
paddingX: 3.5,
|
|
4267
|
-
paddingY: 2.5,
|
|
4268
|
-
marginBottom: 2,
|
|
4269
|
-
_last: {
|
|
4270
|
-
marginBottom: 0
|
|
4271
|
-
},
|
|
4272
|
-
_hover: {
|
|
4273
|
-
backgroundColor: 'gray.50'
|
|
4274
|
-
},
|
|
4275
|
-
_focus: {
|
|
4276
|
-
boxShadow: 'none',
|
|
4277
|
-
backgroundColor: 'gray.50'
|
|
4278
|
-
}
|
|
4279
|
-
}
|
|
4280
|
-
}
|
|
4281
4157
|
};
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4158
|
+
const menuStyle = merge__default.default(react.theme.components.Menu, {
|
|
4159
|
+
baseStyle,
|
|
4160
|
+
variants,
|
|
4285
4161
|
});
|
|
4286
4162
|
|
|
4287
4163
|
var components = /*#__PURE__*/Object.freeze({
|
|
@@ -4289,19 +4165,19 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
4289
4165
|
Accordion: theme$1,
|
|
4290
4166
|
Badge: badgeStyle,
|
|
4291
4167
|
Button: buttonStyle,
|
|
4292
|
-
ButtonRefreshed: index
|
|
4168
|
+
ButtonRefreshed: index,
|
|
4293
4169
|
Checkbox: checkboxStyle,
|
|
4294
4170
|
Divider: dividerStyle,
|
|
4295
4171
|
Drawer: drawerStyle,
|
|
4296
4172
|
GridItem: styles$1,
|
|
4297
4173
|
Heading: Heading_styles,
|
|
4298
4174
|
Input: inputStyle,
|
|
4299
|
-
InputRefreshed: index$
|
|
4175
|
+
InputRefreshed: index$1,
|
|
4300
4176
|
Link: linkStyle,
|
|
4301
4177
|
List: listStyle,
|
|
4302
|
-
Menu:
|
|
4303
|
-
Modal:
|
|
4304
|
-
Popover:
|
|
4178
|
+
Menu: menuStyle,
|
|
4179
|
+
Modal: modalStyle,
|
|
4180
|
+
Popover: popoverStyle,
|
|
4305
4181
|
Progress: progressStyle,
|
|
4306
4182
|
Radio: radioStyle,
|
|
4307
4183
|
Select: selectStyle,
|
|
@@ -4310,7 +4186,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
4310
4186
|
Spinner: Spinner_styles,
|
|
4311
4187
|
Switch: switchStyle,
|
|
4312
4188
|
Table: Table_styles,
|
|
4313
|
-
Tabs:
|
|
4189
|
+
Tabs: tabsStyle,
|
|
4314
4190
|
Text: textStyle
|
|
4315
4191
|
});
|
|
4316
4192
|
|
|
@@ -4332,32 +4208,8 @@ const baseConfig = {
|
|
|
4332
4208
|
};
|
|
4333
4209
|
var THEME = react.extendTheme(extendedTheme, baseConfig);
|
|
4334
4210
|
|
|
4335
|
-
const
|
|
4336
|
-
|
|
4337
|
-
let {
|
|
4338
|
-
theme,
|
|
4339
|
-
useLegacyOverrides,
|
|
4340
|
-
disableExternalFonts = false,
|
|
4341
|
-
children
|
|
4342
|
-
} = _ref,
|
|
4343
|
-
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
4344
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.ChakraProvider, _extends$6({}, props, {
|
|
4345
|
-
ref: ref,
|
|
4346
|
-
theme: merge__default.default({}, THEME, theme)
|
|
4347
|
-
}), disableExternalFonts ? null : /*#__PURE__*/React__namespace.default.createElement(Fonts, null), /*#__PURE__*/React__namespace.default.createElement(LegacyOverrides, {
|
|
4348
|
-
useLegacyOverrides: useLegacyOverrides
|
|
4349
|
-
}), children);
|
|
4350
|
-
});
|
|
4351
|
-
ThemeProvider.propTypes = {
|
|
4352
|
-
/** If true, this will use the old `spothero-html` base styles */
|
|
4353
|
-
useLegacyOverrides: PropTypes__default.default.bool,
|
|
4354
|
-
/** If true, this will not load the `Fonts` global styles */
|
|
4355
|
-
disableExternalFonts: PropTypes__default.default.bool,
|
|
4356
|
-
/** The React node (generally your entire App) that will be provided the theme */
|
|
4357
|
-
children: PropTypes__default.default.node,
|
|
4358
|
-
/** Adds additional themeing on top of SpotHero's default configuration */
|
|
4359
|
-
theme: PropTypes__default.default.object
|
|
4360
|
-
};
|
|
4211
|
+
const ThemeProvider = ({ theme, useLegacyOverrides, disableExternalFonts = false, children, ...props }) => (jsxRuntimeExports.jsxs(react.ChakraProvider, { ...props, theme: merge__default.default({}, THEME, theme), children: [disableExternalFonts ? null : jsxRuntimeExports.jsx(Fonts, {}), jsxRuntimeExports.jsx(LegacyOverrides, { useLegacyOverrides: useLegacyOverrides }), children] }));
|
|
4212
|
+
ThemeProvider.displayName = 'ThemeProvider';
|
|
4361
4213
|
|
|
4362
4214
|
const Card = React.forwardRef((props, ref) => (jsxRuntimeExports.jsx(react.Box, { position: "relative", padding: 4, bgColor: "background.white", borderRadius: "lg", boxShadow: "md", ...props, ref: ref })));
|
|
4363
4215
|
Card.displayName = 'Card';
|
|
@@ -4459,7 +4311,7 @@ const Input$1 = React.forwardRef(({ label, helperText, errorMessage, isInvalid,
|
|
|
4459
4311
|
});
|
|
4460
4312
|
Input$1.displayName = 'Input';
|
|
4461
4313
|
|
|
4462
|
-
const _excluded$
|
|
4314
|
+
const _excluded$5 = ["label", "helperText", "errorMessage", "id", "children", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles"];
|
|
4463
4315
|
|
|
4464
4316
|
// No clue how to move these into the style file so just co-located to keep from slowing down
|
|
4465
4317
|
// Chakra V2 will heavily impact this component
|
|
@@ -4484,7 +4336,6 @@ const activeLabelStyles = {
|
|
|
4484
4336
|
fontSize: '0.85em',
|
|
4485
4337
|
transform: 'translateY(-.75rem)',
|
|
4486
4338
|
_invalid: {
|
|
4487
|
-
color: 'error',
|
|
4488
4339
|
'& .chakra-form__required-indicator': {
|
|
4489
4340
|
display: 'none'
|
|
4490
4341
|
}
|
|
@@ -4583,10 +4434,10 @@ const FormControl = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4583
4434
|
rightElementStyles,
|
|
4584
4435
|
leftElementStyles
|
|
4585
4436
|
} = _ref,
|
|
4586
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4587
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.FormControl, _extends$
|
|
4437
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
4438
|
+
return /*#__PURE__*/React__namespace.default.createElement(react.FormControl, _extends$1({}, props, {
|
|
4588
4439
|
ref: ref
|
|
4589
|
-
}, controlStyles), /*#__PURE__*/React__namespace.default.createElement(react.InputGroup, null, leftElement && /*#__PURE__*/React__namespace.default.createElement(react.InputLeftElement, _extends$
|
|
4440
|
+
}, controlStyles), /*#__PURE__*/React__namespace.default.createElement(react.InputGroup, null, leftElement && /*#__PURE__*/React__namespace.default.createElement(react.InputLeftElement, _extends$1({
|
|
4590
4441
|
pointerEvents: "none",
|
|
4591
4442
|
top: "52%",
|
|
4592
4443
|
left: "1.3rem",
|
|
@@ -4597,7 +4448,7 @@ const FormControl = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4597
4448
|
position: "relative"
|
|
4598
4449
|
}, children, label && /*#__PURE__*/React__namespace.default.createElement(react.FormLabel, {
|
|
4599
4450
|
htmlFor: id
|
|
4600
|
-
}, label)), rightElement && /*#__PURE__*/React__namespace.default.createElement(react.InputRightElement, _extends$
|
|
4451
|
+
}, label)), rightElement && /*#__PURE__*/React__namespace.default.createElement(react.InputRightElement, _extends$1({
|
|
4601
4452
|
top: "50%",
|
|
4602
4453
|
right: "-1rem",
|
|
4603
4454
|
transform: "translate(-50%,-50%)"
|
|
@@ -4625,7 +4476,7 @@ FormControl.propTypes = {
|
|
|
4625
4476
|
isInvalid: PropTypes__default.default.bool
|
|
4626
4477
|
};
|
|
4627
4478
|
|
|
4628
|
-
const _excluded$
|
|
4479
|
+
const _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "placeholder"];
|
|
4629
4480
|
|
|
4630
4481
|
/**
|
|
4631
4482
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4646,7 +4497,7 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4646
4497
|
leftElementStyles,
|
|
4647
4498
|
placeholder = ' '
|
|
4648
4499
|
} = _ref,
|
|
4649
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4500
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
4650
4501
|
const classes = cn__default.default({
|
|
4651
4502
|
'FormElement-contains-error': isInvalid
|
|
4652
4503
|
}); //Historic carry over
|
|
@@ -4664,7 +4515,7 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4664
4515
|
rightElementStyles: rightElementStyles,
|
|
4665
4516
|
leftElementStyles: leftElementStyles,
|
|
4666
4517
|
variant: "refreshed"
|
|
4667
|
-
}, /*#__PURE__*/React__namespace.default.createElement(react.Input, _extends$
|
|
4518
|
+
}, /*#__PURE__*/React__namespace.default.createElement(react.Input, _extends$1({
|
|
4668
4519
|
placeholder: placeholder,
|
|
4669
4520
|
ref: ref,
|
|
4670
4521
|
className: classes,
|
|
@@ -4689,7 +4540,7 @@ Input.propTypes = {
|
|
|
4689
4540
|
leftElementStyles: PropTypes__default.default.object
|
|
4690
4541
|
};
|
|
4691
4542
|
|
|
4692
|
-
const _excluded$
|
|
4543
|
+
const _excluded$3 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "formControlStyles"];
|
|
4693
4544
|
|
|
4694
4545
|
//For select left is static arrow,
|
|
4695
4546
|
/**
|
|
@@ -4713,7 +4564,7 @@ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4713
4564
|
leftElementStyles,
|
|
4714
4565
|
formControlStyles
|
|
4715
4566
|
} = _ref,
|
|
4716
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4567
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
4717
4568
|
const classes = cn__default.default({
|
|
4718
4569
|
'FormElement-contains-error': isInvalid
|
|
4719
4570
|
});
|
|
@@ -4730,7 +4581,7 @@ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4730
4581
|
rightElementStyles: rightElementStyles,
|
|
4731
4582
|
leftElementStyles: leftElementStyles,
|
|
4732
4583
|
sx: formControlStyles
|
|
4733
|
-
}, /*#__PURE__*/React__namespace.default.createElement(react.Select, _extends$
|
|
4584
|
+
}, /*#__PURE__*/React__namespace.default.createElement(react.Select, _extends$1({
|
|
4734
4585
|
icon: /*#__PURE__*/React__namespace.default.createElement(react.Icon, {
|
|
4735
4586
|
as: ForwardRef$1
|
|
4736
4587
|
}),
|
|
@@ -4754,7 +4605,7 @@ Select.propTypes = {
|
|
|
4754
4605
|
rightElementStyles: PropTypes__default.default.object
|
|
4755
4606
|
};
|
|
4756
4607
|
|
|
4757
|
-
const _excluded$
|
|
4608
|
+
const _excluded$2 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
|
|
4758
4609
|
|
|
4759
4610
|
/**
|
|
4760
4611
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4778,7 +4629,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4778
4629
|
leftElementStyles,
|
|
4779
4630
|
buttonValue
|
|
4780
4631
|
} = _ref,
|
|
4781
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4632
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
4782
4633
|
const classes = cn__default.default({
|
|
4783
4634
|
'FormElement-contains-error': isInvalid
|
|
4784
4635
|
}); //Historic carry over
|
|
@@ -4796,7 +4647,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4796
4647
|
rightElementStyles: rightElementStyles,
|
|
4797
4648
|
leftElementStyles: leftElementStyles,
|
|
4798
4649
|
variant: "refreshed"
|
|
4799
|
-
}, /*#__PURE__*/React__namespace.default.createElement(react.Button, _extends$
|
|
4650
|
+
}, /*#__PURE__*/React__namespace.default.createElement(react.Button, _extends$1({
|
|
4800
4651
|
ref: ref,
|
|
4801
4652
|
className: classes,
|
|
4802
4653
|
variant: "refreshed",
|
|
@@ -4949,7 +4800,7 @@ const AutoSuggestSelect$1 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4949
4800
|
innerRef,
|
|
4950
4801
|
innerProps
|
|
4951
4802
|
} = _ref2;
|
|
4952
|
-
return /*#__PURE__*/React__namespace.default.createElement("div", _extends$
|
|
4803
|
+
return /*#__PURE__*/React__namespace.default.createElement("div", _extends$1({
|
|
4953
4804
|
style: clearIndicatorStyles,
|
|
4954
4805
|
ref: innerRef
|
|
4955
4806
|
}, innerProps), /*#__PURE__*/React__namespace.default.createElement(ForwardRef, null));
|
|
@@ -5033,104 +4884,31 @@ const RadioGroup = React.forwardRef(({ label, errorMessage, defaultValue, isDisa
|
|
|
5033
4884
|
});
|
|
5034
4885
|
RadioGroup.displayName = 'RadioGroup';
|
|
5035
4886
|
|
|
5036
|
-
const
|
|
5037
|
-
const SelectionCard =
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
}
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
if (typeof expandableChildren === 'string') {
|
|
5062
|
-
return expandableChildren;
|
|
5063
|
-
}
|
|
5064
|
-
return expandableContentKey || JSON.stringify(expandableChildren === null || expandableChildren === void 0 ? void 0 : expandableChildren.props) || Math.random();
|
|
5065
|
-
}, [expandableChildren, expandableContentKey]);
|
|
5066
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.Box, {
|
|
5067
|
-
borderRadius: "lg",
|
|
5068
|
-
borderColor: isChecked ? 'primary.default' : 'gray.medium',
|
|
5069
|
-
borderWidth: "1px",
|
|
5070
|
-
_hover: {
|
|
5071
|
-
borderColor: isDisabled ? 'gray.medium' : 'primary.default'
|
|
5072
|
-
},
|
|
5073
|
-
overflow: topChild ? 'hidden' : 'auto'
|
|
5074
|
-
}, topChild, /*#__PURE__*/React__namespace.default.createElement(react.Box, {
|
|
5075
|
-
borderColor: "gray.medium",
|
|
5076
|
-
borderBottomWidth: hasExpandableContent ? '1px' : 0
|
|
5077
|
-
}, /*#__PURE__*/React__namespace.default.createElement(Component, _extends$6({
|
|
5078
|
-
ref: ref,
|
|
5079
|
-
isChecked: isChecked,
|
|
5080
|
-
isDisabled: isDisabled,
|
|
5081
|
-
isFocusable: !isDisabled,
|
|
5082
|
-
value: value,
|
|
5083
|
-
defaultChecked: defaultChecked,
|
|
5084
|
-
helperText: helperText,
|
|
5085
|
-
size: size,
|
|
5086
|
-
width: "100%",
|
|
5087
|
-
paddingX: 4,
|
|
5088
|
-
paddingY: 3
|
|
5089
|
-
}, props), label)), /*#__PURE__*/React__namespace.default.createElement(framerMotion.AnimatePresence, {
|
|
5090
|
-
mode: "wait"
|
|
5091
|
-
}, hasExpandableContent && /*#__PURE__*/React__namespace.default.createElement(react.Box, {
|
|
5092
|
-
as: framerMotion.motion.div,
|
|
5093
|
-
key: contentKey,
|
|
5094
|
-
initial: {
|
|
5095
|
-
height: 0,
|
|
5096
|
-
opacity: 0
|
|
5097
|
-
},
|
|
5098
|
-
animate: {
|
|
5099
|
-
height: 'auto',
|
|
5100
|
-
opacity: 1
|
|
5101
|
-
},
|
|
5102
|
-
exit: {
|
|
5103
|
-
height: 0,
|
|
5104
|
-
opacity: 0
|
|
5105
|
-
},
|
|
5106
|
-
transition: {
|
|
5107
|
-
duration: prefersReducedMotion ? 0 : 0.15,
|
|
5108
|
-
ease: 'easeOut'
|
|
5109
|
-
},
|
|
5110
|
-
overflow: "hidden"
|
|
5111
|
-
}, /*#__PURE__*/React__namespace.default.createElement(react.Box, _extends$6({
|
|
5112
|
-
color: "gray.600",
|
|
5113
|
-
fontSize: expandableTextSize,
|
|
5114
|
-
paddingTop: 3,
|
|
5115
|
-
paddingX: 4,
|
|
5116
|
-
paddingBottom: 3
|
|
5117
|
-
}, expandableChildrenStyles), expandableChildren))));
|
|
5118
|
-
});
|
|
5119
|
-
SelectionCard.propTypes = {
|
|
5120
|
-
label: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]).isRequired,
|
|
5121
|
-
expandableChildren: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]),
|
|
5122
|
-
defaultChecked: PropTypes__default.default.bool,
|
|
5123
|
-
isChecked: PropTypes__default.default.bool,
|
|
5124
|
-
isDisabled: PropTypes__default.default.bool,
|
|
5125
|
-
value: PropTypes__default.default.string.isRequired,
|
|
5126
|
-
helperText: PropTypes__default.default.string,
|
|
5127
|
-
isRadio: PropTypes__default.default.bool,
|
|
5128
|
-
isExpandable: PropTypes__default.default.bool,
|
|
5129
|
-
expandableChildrenStyles: PropTypes__default.default.object,
|
|
5130
|
-
size: PropTypes__default.default.oneOf(['sm', 'md', 'lg']),
|
|
5131
|
-
topChild: PropTypes__default.default.element,
|
|
5132
|
-
expandableContentKey: PropTypes__default.default.string
|
|
5133
|
-
};
|
|
4887
|
+
const MotionBox = framerMotion.motion(react.Box);
|
|
4888
|
+
const SelectionCard = React.forwardRef(({ isChecked, isDisabled, value, helperText, expandableChildren, defaultChecked, isRadio, label, isExpandable, size = 'md', expandableChildrenStyles = {}, topChild, expandableContentKey = 'selection-card-content', ...props }, ref) => {
|
|
4889
|
+
const Component = isRadio ? Radio : Checkbox;
|
|
4890
|
+
const expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
4891
|
+
const hasExpandableContent = isExpandable && isChecked && expandableChildren;
|
|
4892
|
+
const prefersReducedMotion = react.usePrefersReducedMotion();
|
|
4893
|
+
// Create a unique key based on the content to force re-animation
|
|
4894
|
+
const contentKey = React__namespace.default.useMemo(() => {
|
|
4895
|
+
if (typeof expandableChildren === 'string') {
|
|
4896
|
+
return expandableChildren;
|
|
4897
|
+
}
|
|
4898
|
+
return (expandableContentKey ||
|
|
4899
|
+
(React__namespace.default.isValidElement(expandableChildren)
|
|
4900
|
+
? JSON.stringify(expandableChildren.props)
|
|
4901
|
+
: undefined) ||
|
|
4902
|
+
Math.random());
|
|
4903
|
+
}, [expandableChildren, expandableContentKey]);
|
|
4904
|
+
return (jsxRuntimeExports.jsxs(react.Box, { borderRadius: "lg", borderColor: isChecked ? 'primary.default' : 'gray.medium', borderWidth: "1px", _hover: {
|
|
4905
|
+
borderColor: isDisabled ? 'gray.medium' : 'primary.default',
|
|
4906
|
+
}, overflow: topChild ? 'hidden' : 'auto', children: [topChild, jsxRuntimeExports.jsx(react.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(framerMotion.AnimatePresence, { mode: "wait", children: hasExpandableContent && (jsxRuntimeExports.jsx(MotionBox, { initial: { height: 0, opacity: 0 }, animate: { height: 'auto', opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: {
|
|
4907
|
+
duration: prefersReducedMotion ? 0 : 0.15,
|
|
4908
|
+
ease: 'easeOut',
|
|
4909
|
+
}, overflow: "hidden", children: jsxRuntimeExports.jsx(react.Box, { color: "gray.600", fontSize: expandableTextSize, paddingTop: 3, paddingX: 4, paddingBottom: 3, ...expandableChildrenStyles, children: expandableChildren }) }, contentKey)) })] }));
|
|
4910
|
+
});
|
|
4911
|
+
SelectionCard.displayName = 'SelectionCard';
|
|
5134
4912
|
|
|
5135
4913
|
const Divider = React.forwardRef(({ variant = 'solid', colorScheme: borderColor = 'medium', ...props }, ref) => {
|
|
5136
4914
|
return (jsxRuntimeExports.jsx(react.Divider, { ...colorScheme[borderColor], variant: variant, ...props, ref: ref }));
|
|
@@ -5143,50 +4921,36 @@ const Textarea = React.forwardRef(({ label, helperText, errorMessage, isInvalid,
|
|
|
5143
4921
|
});
|
|
5144
4922
|
Textarea.displayName = 'Textarea';
|
|
5145
4923
|
|
|
5146
|
-
const
|
|
5147
|
-
const Popover =
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
4924
|
+
const ChakraPopoverWithRef = react.Popover;
|
|
4925
|
+
const Popover = React.forwardRef(({ children, ...rest }, ref) => {
|
|
4926
|
+
const { variant } = rest;
|
|
4927
|
+
return (jsxRuntimeExports.jsx(ChakraPopoverWithRef, { ...rest, ref: ref, children: React.Children.map(children, (child, index) => {
|
|
4928
|
+
if (!React.isValidElement(child)) {
|
|
4929
|
+
return child;
|
|
4930
|
+
}
|
|
4931
|
+
return React.cloneElement(child, {
|
|
4932
|
+
ref,
|
|
4933
|
+
variant,
|
|
4934
|
+
key: child.key ?? `Popover-child-${index}`,
|
|
4935
|
+
});
|
|
4936
|
+
}) }));
|
|
5159
4937
|
});
|
|
5160
|
-
Popover.
|
|
5161
|
-
/** React children */
|
|
5162
|
-
children: PropTypes__default.default.node,
|
|
5163
|
-
/** Styles the Popover */
|
|
5164
|
-
variant: PropTypes__default.default.oneOf(['light', 'dark'])
|
|
5165
|
-
};
|
|
4938
|
+
Popover.displayName = 'Popover';
|
|
5166
4939
|
|
|
5167
|
-
const arrowStyles =
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
} = _ref;
|
|
5171
|
-
return {
|
|
5172
|
-
backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
|
|
5173
|
-
};
|
|
5174
|
-
};
|
|
4940
|
+
const arrowStyles = ({ variant }) => ({
|
|
4941
|
+
backgroundColor: variant === 'dark' ? 'secondary.default' : 'white',
|
|
4942
|
+
});
|
|
5175
4943
|
|
|
5176
|
-
const
|
|
5177
|
-
|
|
5178
|
-
ref: ref
|
|
5179
|
-
}, props, arrowStyles(props)));
|
|
4944
|
+
const ChakraPopoverArrowWithRef = react.PopoverArrow;
|
|
4945
|
+
const PopoverArrow = React.forwardRef((props, ref) => {
|
|
4946
|
+
return (jsxRuntimeExports.jsx(ChakraPopoverArrowWithRef, { ref: ref, ...props, ...arrowStyles(props) }));
|
|
5180
4947
|
});
|
|
4948
|
+
PopoverArrow.displayName = 'PopoverArrow';
|
|
5181
4949
|
|
|
5182
|
-
const pseudoStyles = variant => ({
|
|
5183
|
-
|
|
4950
|
+
const pseudoStyles = (variant) => ({
|
|
4951
|
+
bgColor: variant === 'dark' ? 'gray.600' : 'gray.50',
|
|
5184
4952
|
});
|
|
5185
|
-
const closeButtonStyles =
|
|
5186
|
-
let {
|
|
5187
|
-
variant
|
|
5188
|
-
} = _ref;
|
|
5189
|
-
return {
|
|
4953
|
+
const closeButtonStyles = ({ variant }) => ({
|
|
5190
4954
|
color: variant === 'dark' ? 'white' : 'black',
|
|
5191
4955
|
fontSize: '0.5rem',
|
|
5192
4956
|
position: 'absolute',
|
|
@@ -5195,56 +4959,21 @@ const closeButtonStyles = _ref => {
|
|
|
5195
4959
|
padding: 4,
|
|
5196
4960
|
borderTopRightRadius: 4,
|
|
5197
4961
|
_hover: pseudoStyles(variant),
|
|
5198
|
-
_focus:
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
};
|
|
4962
|
+
_focus: {
|
|
4963
|
+
...pseudoStyles(variant),
|
|
4964
|
+
boxShadow: 'outline',
|
|
4965
|
+
},
|
|
4966
|
+
});
|
|
5203
4967
|
|
|
5204
|
-
const PopoverCloseButton =
|
|
5205
|
-
|
|
5206
|
-
ref: ref
|
|
5207
|
-
}, props, closeButtonStyles(props)));
|
|
4968
|
+
const PopoverCloseButton = React.forwardRef((props, ref) => {
|
|
4969
|
+
return (jsxRuntimeExports.jsx(react.PopoverCloseButton, { ref: ref, ...props, ...closeButtonStyles(props) }));
|
|
5208
4970
|
});
|
|
4971
|
+
PopoverCloseButton.displayName = 'PopoverCloseButton';
|
|
5209
4972
|
|
|
5210
|
-
const
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
variant,
|
|
5215
|
-
children,
|
|
5216
|
-
hideCloseButton,
|
|
5217
|
-
hideArrow,
|
|
5218
|
-
popoverBodyProps
|
|
5219
|
-
} = props,
|
|
5220
|
-
rest = _objectWithoutProperties(props, _excluded$2);
|
|
5221
|
-
return /*#__PURE__*/React__namespace.default.createElement(react.PopoverContent, _extends$6({}, rest, {
|
|
5222
|
-
ref: ref
|
|
5223
|
-
}), hideArrow ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverArrow, {
|
|
5224
|
-
variant: variant
|
|
5225
|
-
}), hideCloseButton ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverCloseButton, {
|
|
5226
|
-
variant: variant
|
|
5227
|
-
}), header ? /*#__PURE__*/React__namespace.default.createElement(react.PopoverHeader, null, header) : null, /*#__PURE__*/React__namespace.default.createElement(react.PopoverBody, popoverBodyProps, children));
|
|
5228
|
-
});
|
|
5229
|
-
PopoverContent.propTypes = {
|
|
5230
|
-
/** React children */
|
|
5231
|
-
children: PropTypes__default.default.node,
|
|
5232
|
-
/** Whether or not to hide the close button */
|
|
5233
|
-
hideCloseButton: PropTypes__default.default.bool,
|
|
5234
|
-
/** Whether or not to hide the arrow */
|
|
5235
|
-
hideArrow: PropTypes__default.default.bool,
|
|
5236
|
-
/** Styles the Popover */
|
|
5237
|
-
variant: PropTypes__default.default.oneOf(['light', 'dark']),
|
|
5238
|
-
/** The string or node for the header (optional) */
|
|
5239
|
-
header: PropTypes__default.default.oneOfType([PropTypes__default.default.node, PropTypes__default.default.string]),
|
|
5240
|
-
/** Props to pass to the PopoverBody */
|
|
5241
|
-
popoverBodyProps: PropTypes__default.default.object
|
|
5242
|
-
};
|
|
5243
|
-
PopoverContent.defaultProps = {
|
|
5244
|
-
variant: 'light',
|
|
5245
|
-
hideCloseButton: false,
|
|
5246
|
-
hideArrow: false
|
|
5247
|
-
};
|
|
4973
|
+
const PopoverContent = React.forwardRef(({ header, variant = 'light', children, hideCloseButton = false, hideArrow = false, popoverBodyProps, ...rest }, ref) => {
|
|
4974
|
+
return (jsxRuntimeExports.jsxs(react.PopoverContent, { ...rest, ref: ref, children: [hideArrow ? null : jsxRuntimeExports.jsx(PopoverArrow, { variant: variant }), hideCloseButton ? null : (jsxRuntimeExports.jsx(PopoverCloseButton, { variant: variant })), header ? jsxRuntimeExports.jsx(react.PopoverHeader, { children: header }) : null, jsxRuntimeExports.jsx(react.PopoverBody, { ...popoverBodyProps, children: children })] }));
|
|
4975
|
+
});
|
|
4976
|
+
PopoverContent.displayName = 'PopoverContent';
|
|
5248
4977
|
|
|
5249
4978
|
const AutoSuggestSelect = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5250
4979
|
let {
|
|
@@ -5339,7 +5068,7 @@ const AutoSuggestSelect = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
5339
5068
|
innerRef,
|
|
5340
5069
|
innerProps
|
|
5341
5070
|
} = _ref2;
|
|
5342
|
-
return /*#__PURE__*/React__namespace.default.createElement("div", _extends$
|
|
5071
|
+
return /*#__PURE__*/React__namespace.default.createElement("div", _extends$1({
|
|
5343
5072
|
style: clearIndicatorStyles,
|
|
5344
5073
|
ref: innerRef
|
|
5345
5074
|
}, innerProps), /*#__PURE__*/React__namespace.default.createElement(ForwardRef, null));
|
|
@@ -5508,7 +5237,7 @@ const FilterSelectNode = _ref => {
|
|
|
5508
5237
|
label: label,
|
|
5509
5238
|
inputId: id,
|
|
5510
5239
|
isInvalid: isInvalid
|
|
5511
|
-
}, /*#__PURE__*/React__namespace.default.createElement(Select__default.default, _extends$
|
|
5240
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Select__default.default, _extends$1({
|
|
5512
5241
|
ref: innerRef,
|
|
5513
5242
|
classNamePrefix: "fe-ui-filter-select",
|
|
5514
5243
|
closeMenuOnSelect: true,
|
|
@@ -5527,7 +5256,7 @@ const FilterSelectNode = _ref => {
|
|
|
5527
5256
|
noOptionsMessage: () => noOptionsMessage
|
|
5528
5257
|
}, props)));
|
|
5529
5258
|
};
|
|
5530
|
-
const FilterSelect = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__namespace.default.createElement(FilterSelectNode, _extends$
|
|
5259
|
+
const FilterSelect = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__namespace.default.createElement(FilterSelectNode, _extends$1({
|
|
5531
5260
|
innerRef: ref
|
|
5532
5261
|
}, props)));
|
|
5533
5262
|
FilterSelect.propTypes = {
|
|
@@ -5588,45 +5317,33 @@ FilterSelectNode.propTypes = {
|
|
|
5588
5317
|
};
|
|
5589
5318
|
|
|
5590
5319
|
const defaultStyles = {
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
boxShadow: '0 0 0 2px rgba(158, 202, 237, 1)'
|
|
5598
|
-
},
|
|
5599
|
-
_focus: {
|
|
5600
|
-
boxShadow: '0 0 0 2px rgba(158, 202, 237, 1)'
|
|
5601
|
-
}
|
|
5320
|
+
border: 0,
|
|
5321
|
+
borderRadius: '4px',
|
|
5322
|
+
fontWeight: 'normal',
|
|
5323
|
+
paddingX: 4,
|
|
5324
|
+
paddingY: 1,
|
|
5325
|
+
_hover: { boxShadow: '0 0 0 2px rgba(158, 202, 237, 1)' },
|
|
5326
|
+
_focus: { boxShadow: '0 0 0 2px rgba(158, 202, 237, 1)' },
|
|
5602
5327
|
};
|
|
5603
5328
|
const inactiveStyles = {
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
bg: 'gray.100'
|
|
5609
|
-
},
|
|
5610
|
-
_active: {
|
|
5611
|
-
bg: 'gray.100'
|
|
5612
|
-
}
|
|
5329
|
+
color: 'black',
|
|
5330
|
+
borderColor: 'gray.100',
|
|
5331
|
+
bg: 'gray.100',
|
|
5332
|
+
_hover: { bg: 'gray.100' },
|
|
5333
|
+
_active: { bg: 'gray.100' },
|
|
5613
5334
|
};
|
|
5614
5335
|
const activeStyles = {
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
bg: 'white'
|
|
5621
|
-
},
|
|
5622
|
-
_active: {
|
|
5623
|
-
bg: 'white'
|
|
5624
|
-
}
|
|
5336
|
+
color: 'black',
|
|
5337
|
+
fontWeight: 'semibold',
|
|
5338
|
+
boxShadow: 'sm',
|
|
5339
|
+
bg: 'white',
|
|
5340
|
+
_hover: { bg: 'white' },
|
|
5341
|
+
_active: { bg: 'white' },
|
|
5625
5342
|
};
|
|
5626
5343
|
const buttonGroupStyles = {
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5344
|
+
borderRadius: '4px',
|
|
5345
|
+
backgroundColor: 'gray.100',
|
|
5346
|
+
padding: 1,
|
|
5630
5347
|
};
|
|
5631
5348
|
|
|
5632
5349
|
/**
|
|
@@ -5639,40 +5356,32 @@ const buttonGroupStyles = {
|
|
|
5639
5356
|
* @note
|
|
5640
5357
|
* must have multiple child elements
|
|
5641
5358
|
*/
|
|
5642
|
-
const ToggleButtonGroup =
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
groupProps,
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
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)
|
|
5667
|
-
}));
|
|
5668
|
-
}));
|
|
5359
|
+
const ToggleButtonGroup = React.forwardRef((props, ref) => {
|
|
5360
|
+
const { onChange, value, children, groupProps, buttonGroupStyles: _buttonGroupStyles = {}, childrenStyles = {}, } = props;
|
|
5361
|
+
if (!children)
|
|
5362
|
+
throw new Error('Children required');
|
|
5363
|
+
// iterate over array of child nodes to apply extended props
|
|
5364
|
+
return (jsxRuntimeExports.jsx(react.ButtonGroup, { ref: ref, sx: { ...buttonGroupStyles, ..._buttonGroupStyles }, ...groupProps, children: React__namespace.default.Children.map(children, child => {
|
|
5365
|
+
const CHILD = child;
|
|
5366
|
+
return React__namespace.default.cloneElement(CHILD, {
|
|
5367
|
+
onClick: () => {
|
|
5368
|
+
if (value === CHILD?.props?.value)
|
|
5369
|
+
return;
|
|
5370
|
+
onChange(CHILD?.props?.value);
|
|
5371
|
+
},
|
|
5372
|
+
...{
|
|
5373
|
+
sx: {
|
|
5374
|
+
...defaultStyles,
|
|
5375
|
+
...(value !== CHILD?.props?.value
|
|
5376
|
+
? inactiveStyles
|
|
5377
|
+
: activeStyles),
|
|
5378
|
+
...childrenStyles,
|
|
5379
|
+
},
|
|
5380
|
+
},
|
|
5381
|
+
});
|
|
5382
|
+
}) }));
|
|
5669
5383
|
});
|
|
5670
|
-
ToggleButtonGroup.
|
|
5671
|
-
onChange: PropTypes__default.default.func.isRequired,
|
|
5672
|
-
value: PropTypes__default.default.string.isRequired,
|
|
5673
|
-
children: PropTypes__default.default.node.isRequired,
|
|
5674
|
-
groupProps: PropTypes__default.default.object
|
|
5675
|
-
};
|
|
5384
|
+
ToggleButtonGroup.displayName = 'ToggleButtonGroup';
|
|
5676
5385
|
|
|
5677
5386
|
const _excluded = ["id", "label", "isInvalid", "isLoading", "isRequired", "options", "placeholder", "errorMessage", "helperText", "innerRef"],
|
|
5678
5387
|
_excluded2 = ["id", "label", "isInvalid", "isLoading", "isRequired", "options", "placeholder", "errorMessage", "helperText"];
|
|
@@ -5739,7 +5448,7 @@ const CreatableSelectNode = _ref => {
|
|
|
5739
5448
|
helperText: helperText,
|
|
5740
5449
|
label: label,
|
|
5741
5450
|
inputId: id
|
|
5742
|
-
}, /*#__PURE__*/React__namespace.default.createElement(Creatable__default.default, _extends$
|
|
5451
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Creatable__default.default, _extends$1({
|
|
5743
5452
|
id: id,
|
|
5744
5453
|
components: {
|
|
5745
5454
|
DropdownIndicator
|
|
@@ -5763,7 +5472,7 @@ const CreatableSelect = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
5763
5472
|
helperText
|
|
5764
5473
|
} = props,
|
|
5765
5474
|
additionalProps = _objectWithoutProperties(props, _excluded2);
|
|
5766
|
-
return /*#__PURE__*/React__namespace.default.createElement(CreatableSelectNode, _extends$
|
|
5475
|
+
return /*#__PURE__*/React__namespace.default.createElement(CreatableSelectNode, _extends$1({
|
|
5767
5476
|
id: id,
|
|
5768
5477
|
innerRef: ref,
|
|
5769
5478
|
label: label,
|
|
@@ -5801,19 +5510,14 @@ CreatableSelectNode.propTypes = {
|
|
|
5801
5510
|
current: PropTypes__default.default.instanceOf(Creatable__default.default)
|
|
5802
5511
|
})
|
|
5803
5512
|
};
|
|
5804
|
-
var CreatableSelect$1 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__namespace.default.createElement(CreatableSelectNode, _extends$
|
|
5513
|
+
var CreatableSelect$1 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__namespace.default.createElement(CreatableSelectNode, _extends$1({
|
|
5805
5514
|
ref: ref
|
|
5806
5515
|
}, props)));
|
|
5807
5516
|
|
|
5808
|
-
const
|
|
5809
|
-
|
|
5810
|
-
ref: ref
|
|
5811
|
-
}));
|
|
5517
|
+
const ChakraMenuWithRef = react.Menu;
|
|
5518
|
+
const Menu = React__namespace.default.forwardRef((props, ref) => {
|
|
5519
|
+
return jsxRuntimeExports.jsx(ChakraMenuWithRef, { ...props, ref: ref });
|
|
5812
5520
|
});
|
|
5813
|
-
Menu.propTypes = {
|
|
5814
|
-
/** The React node that will render inside the element */
|
|
5815
|
-
children: PropTypes__default.default.node
|
|
5816
|
-
};
|
|
5817
5521
|
|
|
5818
5522
|
Object.defineProperty(exports, "Accordion", {
|
|
5819
5523
|
enumerable: true,
|