@onewelcome/react-lib-components 0.1.0-alpha → 0.1.1-alpha
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/Button/IconButton.d.ts +1 -1
- package/dist/Form/Fieldset/Fieldset.d.ts +6 -4
- package/dist/Form/FormControl/FormControl.d.ts +2 -1
- package/dist/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +2 -1
- package/dist/{BaseModal → Notifications/BaseModal}/BaseModal.d.ts +4 -2
- package/dist/{BaseModal → Notifications/BaseModal}/BaseModalActions/BaseModalActions.d.ts +0 -0
- package/dist/{BaseModal → Notifications/BaseModal}/BaseModalContent/BaseModalContent.d.ts +0 -0
- package/dist/{BaseModal → Notifications/BaseModal}/BaseModalContext.d.ts +0 -0
- package/dist/{BaseModal → Notifications/BaseModal}/BaseModalHeader/BaseModalHeader.d.ts +1 -1
- package/dist/{Dialog → Notifications/Dialog}/Dialog.d.ts +4 -3
- package/dist/{Dialog → Notifications/Dialog}/DialogActions/DialogActions.d.ts +0 -0
- package/dist/{Dialog → Notifications/Dialog}/DialogTitle/DialogTitle.d.ts +0 -0
- package/dist/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.d.ts +12 -0
- package/dist/Notifications/DiscardChangesModal/DiscardChangesModal.d.ts +11 -0
- package/dist/{Modal → Notifications/Modal}/Modal.d.ts +0 -0
- package/dist/{Modal → Notifications/Modal}/ModalActions/ModalActions.d.ts +0 -0
- package/dist/{Modal → Notifications/Modal}/ModalContent/ModalContent.d.ts +0 -0
- package/dist/{Modal → Notifications/Modal}/ModalHeader/ModalHeader.d.ts +0 -0
- package/dist/{Snackbar → Notifications/Snackbar}/SnackbarContainer/SnackbarContainer.d.ts +0 -0
- package/dist/{Snackbar → Notifications/Snackbar}/SnackbarItem/SnackbarItem.d.ts +0 -0
- package/dist/{Snackbar → Notifications/Snackbar}/SnackbarProvider/SnackbarProvider.d.ts +1 -1
- package/dist/{Snackbar → Notifications/Snackbar}/SnackbarProvider/SnackbarStateProvider.d.ts +0 -0
- package/dist/{Snackbar → Notifications/Snackbar}/interfaces.d.ts +0 -0
- package/dist/{Snackbar → Notifications/Snackbar}/useSnackbar.d.ts +0 -0
- package/dist/Tiles/Tile.d.ts +4 -5
- package/dist/index.d.ts +8 -7
- package/dist/react-lib-components.cjs.development.js +226 -125
- package/dist/react-lib-components.cjs.development.js.map +1 -1
- package/dist/react-lib-components.cjs.production.min.js +1 -1
- package/dist/react-lib-components.cjs.production.min.js.map +1 -1
- package/dist/react-lib-components.esm.js +226 -126
- package/dist/react-lib-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Button/IconButton.tsx +8 -4
- package/src/Form/Checkbox/Checkbox.module.scss +4 -0
- package/src/Form/Checkbox/Checkbox.tsx +11 -6
- package/src/Form/Fieldset/Fieldset.module.scss +11 -1
- package/src/Form/Fieldset/Fieldset.test.tsx +2 -2
- package/src/Form/Fieldset/Fieldset.tsx +22 -10
- package/src/Form/FormControl/FormControl.tsx +3 -0
- package/src/Form/Radio/Radio.module.scss +4 -0
- package/src/Form/Radio/Radio.tsx +12 -2
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.tsx +1 -1
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx +1 -1
- package/src/Form/Wrapper/RadioWrapper/RadioWrapper.test.tsx +1 -1
- package/src/Form/Wrapper/RadioWrapper/RadioWrapper.tsx +1 -1
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +2 -1
- package/src/{BaseModal → Notifications/BaseModal}/BaseModal.module.scss +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModal.test.tsx +8 -15
- package/src/{BaseModal → Notifications/BaseModal}/BaseModal.tsx +11 -24
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalActions/BaseModalActions.module.scss +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalActions/BaseModalActions.test.tsx +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalActions/BaseModalActions.tsx +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalContent/BaseModalContent.module.scss +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalContent/BaseModalContent.test.tsx +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalContent/BaseModalContent.tsx +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalContext.ts +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalHeader/BaseModalHeader.module.scss +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalHeader/BaseModalHeader.test.tsx +0 -0
- package/src/{BaseModal → Notifications/BaseModal}/BaseModalHeader/BaseModalHeader.tsx +6 -6
- package/src/{Dialog → Notifications/Dialog}/Dialog.module.scss +0 -0
- package/src/{Dialog → Notifications/Dialog}/Dialog.test.tsx +13 -16
- package/src/{Dialog → Notifications/Dialog}/Dialog.tsx +17 -6
- package/src/{Dialog → Notifications/Dialog}/DialogActions/DialogActions.module.scss +0 -0
- package/src/{Dialog → Notifications/Dialog}/DialogActions/DialogActions.test.tsx +0 -0
- package/src/{Dialog → Notifications/Dialog}/DialogActions/DialogActions.tsx +0 -0
- package/src/{Dialog → Notifications/Dialog}/DialogTitle/DialogTitle.module.scss +0 -0
- package/src/{Dialog → Notifications/Dialog}/DialogTitle/DialogTitle.test.tsx +0 -0
- package/src/{Dialog → Notifications/Dialog}/DialogTitle/DialogTitle.tsx +3 -3
- package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.test.tsx +55 -0
- package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +48 -0
- package/src/Notifications/DiscardChangesModal/DiscardChangesModal.test.tsx +111 -0
- package/src/Notifications/DiscardChangesModal/DiscardChangesModal.tsx +56 -0
- package/src/{Modal → Notifications/Modal}/Modal.test.tsx +0 -0
- package/src/{Modal → Notifications/Modal}/Modal.tsx +0 -0
- package/src/{Modal → Notifications/Modal}/ModalActions/ModalActions.tsx +0 -0
- package/src/{Modal → Notifications/Modal}/ModalContent/ModalContent.tsx +0 -0
- package/src/{Modal → Notifications/Modal}/ModalHeader/ModalHeader.tsx +0 -0
- package/src/{Snackbar → Notifications/Snackbar}/SnackbarContainer/SnackbarContainer.module.scss +0 -0
- package/src/{Snackbar → Notifications/Snackbar}/SnackbarContainer/SnackbarContainer.test.tsx +0 -0
- package/src/{Snackbar → Notifications/Snackbar}/SnackbarContainer/SnackbarContainer.tsx +0 -0
- package/src/{Snackbar → Notifications/Snackbar}/SnackbarItem/SnackbarItem.module.scss +1 -1
- package/src/{Snackbar → Notifications/Snackbar}/SnackbarItem/SnackbarItem.test.tsx +0 -0
- package/src/{Snackbar → Notifications/Snackbar}/SnackbarItem/SnackbarItem.tsx +5 -6
- package/src/{Snackbar → Notifications/Snackbar}/SnackbarProvider/SnackbarProvider.test.tsx +0 -0
- package/src/{Snackbar → Notifications/Snackbar}/SnackbarProvider/SnackbarProvider.tsx +2 -2
- package/src/{Snackbar → Notifications/Snackbar}/SnackbarProvider/SnackbarStateProvider.tsx +0 -0
- package/src/{Snackbar → Notifications/Snackbar}/interfaces.ts +0 -0
- package/src/{Snackbar → Notifications/Snackbar}/useSnackbar.ts +0 -0
- package/src/Popover/Popover.test.tsx +3 -3
- package/src/Tiles/Tile.module.scss +1 -1
- package/src/Tiles/Tile.test.tsx +21 -11
- package/src/Tiles/Tile.tsx +52 -15
- package/src/Tiles/Tiles.test.tsx +11 -9
- package/src/Tiles/Tiles.tsx +3 -3
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.tsx +3 -3
- package/src/Wizard/Wizard.tsx +2 -2
- package/src/Wizard/WizardActions/WizardActions.tsx +3 -3
- package/src/hooks/usePosition.test.tsx +3 -3
- package/src/index.ts +8 -7
|
@@ -182,7 +182,7 @@ var useSpacing = function useSpacing(spacingProps, style) {
|
|
|
182
182
|
return style;
|
|
183
183
|
};
|
|
184
184
|
|
|
185
|
-
var _excluded$
|
|
185
|
+
var _excluded$G = ["children", "variant", "tag", "style", "spacing", "className"];
|
|
186
186
|
var validVariants = ['h1', 'h2', 'h3', 'h4', 'body', 'body-bold', 'sub-text', 'code'];
|
|
187
187
|
var Typography = function Typography(_ref) {
|
|
188
188
|
var children = _ref.children,
|
|
@@ -192,7 +192,7 @@ var Typography = function Typography(_ref) {
|
|
|
192
192
|
spacing = _ref.spacing,
|
|
193
193
|
_ref$className = _ref.className,
|
|
194
194
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
195
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
195
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
196
196
|
|
|
197
197
|
if (!validVariants.includes(variant)) {
|
|
198
198
|
throw new Error("You entered an invalid variant. You can choose from: " + validVariants + ", you entered: " + variant);
|
|
@@ -239,13 +239,13 @@ var css$E = ".BaseButton_module_button__82869a4f {\n border-width: var(--button
|
|
|
239
239
|
var modules_3484519b = {"button":"BaseButton_module_button__82869a4f"};
|
|
240
240
|
n(css$E,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
241
241
|
|
|
242
|
-
var _excluded$
|
|
242
|
+
var _excluded$F = ["children", "type", "className"];
|
|
243
243
|
var BaseButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
244
244
|
var children = _ref.children,
|
|
245
245
|
_ref$type = _ref.type,
|
|
246
246
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
247
247
|
className = _ref.className,
|
|
248
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
248
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
249
249
|
|
|
250
250
|
var validTypes = ['submit', 'button', 'reset'];
|
|
251
251
|
if (!validTypes.includes(type)) throw new Error("You have entered an invalid button type. Expected 'submit', 'button' or 'reset' got " + type);
|
|
@@ -260,7 +260,7 @@ var css$D = ".Button_module_srOnly__896f6f94 {\n position: absolute;\n width:
|
|
|
260
260
|
var modules_79b43374 = {"sr-only":"Button_module_srOnly__896f6f94","hidden":"Button_module_hidden__896f6f94","slide-in":"Button_module_slideIn__896f6f94","slide-out":"Button_module_slideOut__896f6f94","fill":"Button_module_fill__896f6f94","primary":"Button_module_primary__896f6f94","secondary":"Button_module_secondary__896f6f94","tertiary":"Button_module_tertiary__896f6f94","default":"Button_module_default__896f6f94","outline":"Button_module_outline__896f6f94","text":"Button_module_text__896f6f94","has-icon":"Button_module_hasIcon__896f6f94","start-icon":"Button_module_startIcon__896f6f94","end-icon":"Button_module_endIcon__896f6f94"};
|
|
261
261
|
n(css$D,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
262
262
|
|
|
263
|
-
var _excluded$
|
|
263
|
+
var _excluded$E = ["children", "variant", "color", "startIcon", "endIcon"];
|
|
264
264
|
var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
265
265
|
var children = _ref.children,
|
|
266
266
|
_ref$variant = _ref.variant,
|
|
@@ -271,7 +271,7 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
271
271
|
startIcon = _ref$startIcon === void 0 ? false : _ref$startIcon,
|
|
272
272
|
_ref$endIcon = _ref.endIcon,
|
|
273
273
|
endIcon = _ref$endIcon === void 0 ? false : _ref$endIcon,
|
|
274
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
274
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
275
275
|
|
|
276
276
|
var additionalClasses = [];
|
|
277
277
|
|
|
@@ -297,7 +297,7 @@ var css$C = ".Link_module_link__886f6e1b {\n font-family: var(--font-family);\n
|
|
|
297
297
|
var modules_e20967e9 = {"link":"Link_module_link__886f6e1b","disabled":"Link_module_disabled__886f6e1b","primary":"Link_module_primary__886f6e1b","secondary":"Link_module_secondary__886f6e1b","tertiary":"Link_module_tertiary__886f6e1b"};
|
|
298
298
|
n(css$C,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
299
299
|
|
|
300
|
-
var _excluded$
|
|
300
|
+
var _excluded$D = ["children", "className", "disabled", "to", "color", "type", "component"];
|
|
301
301
|
var Link = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
302
302
|
var children = _ref.children,
|
|
303
303
|
className = _ref.className,
|
|
@@ -309,7 +309,7 @@ var Link = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
309
309
|
_ref$type = _ref.type,
|
|
310
310
|
type = _ref$type === void 0 ? 'internal' : _ref$type,
|
|
311
311
|
component = _ref.component,
|
|
312
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
312
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
313
313
|
|
|
314
314
|
var determineTarget = function determineTarget() {
|
|
315
315
|
if (rest.target) {
|
|
@@ -358,7 +358,7 @@ var css$A = ".readyclasses_module_srOnly__d8b3c82a {\n position: absolute;\n w
|
|
|
358
358
|
var modules_35a251a6 = {"sr-only":"readyclasses_module_srOnly__d8b3c82a","hidden":"readyclasses_module_hidden__d8b3c82a","slide-in":"readyclasses_module_slideIn__d8b3c82a","slide-out":"readyclasses_module_slideOut__d8b3c82a"};
|
|
359
359
|
n(css$A,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
360
360
|
|
|
361
|
-
var _excluded$
|
|
361
|
+
var _excluded$C = ["children", "color", "iconSize", "title"];
|
|
362
362
|
var IconButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
363
363
|
var children = _ref.children,
|
|
364
364
|
_ref$color = _ref.color,
|
|
@@ -366,12 +366,16 @@ var IconButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
366
366
|
_ref$iconSize = _ref.iconSize,
|
|
367
367
|
iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
|
|
368
368
|
title = _ref.title,
|
|
369
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
369
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
370
|
+
|
|
371
|
+
if (!title) {
|
|
372
|
+
console.error("Please make sure to specify a 'title' prop to your IconButton component! ");
|
|
373
|
+
}
|
|
370
374
|
|
|
371
375
|
return React.createElement(BaseButton, _extends({}, rest, {
|
|
372
376
|
ref: ref,
|
|
373
377
|
className: modules_f7edfa2f['icon-button'] + " " + modules_f7edfa2f[color] + " " + modules_f7edfa2f['button-' + iconSize]
|
|
374
|
-
}), React.createElement(
|
|
378
|
+
}), React.createElement(Fragment, null, children, React.createElement("span", {
|
|
375
379
|
className: modules_35a251a6['sr-only']
|
|
376
380
|
}, title)));
|
|
377
381
|
});
|
|
@@ -380,7 +384,7 @@ var css$z = "@font-face {\n font-family: \"icomoon\";\n src: url(\"data:applic
|
|
|
380
384
|
var modules_c4937a59 = {"icon":"Icon_module_icon__58a0eca5","icon-image":"Icon_module_iconImage__58a0eca5","icon-bookmark":"Icon_module_iconBookmark__58a0eca5","icon-bookmark-alt":"Icon_module_iconBookmarkAlt__58a0eca5","icon-equal":"Icon_module_iconEqual__58a0eca5","icon-build":"Icon_module_iconBuild__58a0eca5","icon-refresh":"Icon_module_iconRefresh__58a0eca5","icon-calendar":"Icon_module_iconCalendar__58a0eca5","icon-checkmark-circle":"Icon_module_iconCheckmarkCircle__58a0eca5","icon-checkmark-circle-alt":"Icon_module_iconCheckmarkCircleAlt__58a0eca5","icon-clock":"Icon_module_iconClock__58a0eca5","icon-trash":"Icon_module_iconTrash__58a0eca5","icon-heart":"Icon_module_iconHeart__58a0eca5","icon-search":"Icon_module_iconSearch__58a0eca5","icon-gearwheel":"Icon_module_iconGearwheel__58a0eca5","icon-star":"Icon_module_iconStar__58a0eca5","icon-star-alt":"Icon_module_iconStarAlt__58a0eca5","icon-undo":"Icon_module_iconUndo__58a0eca5","icon-eye":"Icon_module_iconEye__58a0eca5","icon-times-circle-alt":"Icon_module_iconTimesCircleAlt__58a0eca5","icon-info-circle":"Icon_module_iconInfoCircle__58a0eca5","icon-info-bell":"Icon_module_iconInfoBell__58a0eca5","icon-checkmark-circle-breakout":"Icon_module_iconCheckmarkCircleBreakout__58a0eca5","icon-warning":"Icon_module_iconWarning__58a0eca5","icon-plus":"Icon_module_iconPlus__58a0eca5","icon-copy":"Icon_module_iconCopy__58a0eca5","icon-edit":"Icon_module_iconEdit__58a0eca5","icon-filter":"Icon_module_iconFilter__58a0eca5","icon-link":"Icon_module_iconLink__58a0eca5","icon-change":"Icon_module_iconChange__58a0eca5","icon-filter-alt-arrow":"Icon_module_iconFilterAltArrow__58a0eca5","icon-filter-alt":"Icon_module_iconFilterAlt__58a0eca5","icon-filter-alt-times":"Icon_module_iconFilterAltTimes__58a0eca5","icon-grid":"Icon_module_iconGrid__58a0eca5","icon-triangle-down":"Icon_module_iconTriangleDown__58a0eca5","icon-triangle-down-circle":"Icon_module_iconTriangleDownCircle__58a0eca5","icon-triangle-up":"Icon_module_iconTriangleUp__58a0eca5","icon-triangle-right":"Icon_module_iconTriangleRight__58a0eca5","icon-chevron-left":"Icon_module_iconChevronLeft__58a0eca5","icon-chevron-right":"Icon_module_iconChevronRight__58a0eca5","icon-times":"Icon_module_iconTimes__58a0eca5","icon-times-circle":"Icon_module_iconTimesCircle__58a0eca5","icon-times-thin":"Icon_module_iconTimesThin__58a0eca5","icon-chevron-up":"Icon_module_iconChevronUp__58a0eca5","icon-chevron-down":"Icon_module_iconChevronDown__58a0eca5","icon-navigation-first":"Icon_module_iconNavigationFirst__58a0eca5","icon-fullscreen":"Icon_module_iconFullscreen__58a0eca5","icon-fullscreen-exit":"Icon_module_iconFullscreenExit__58a0eca5","icon-navigation-last":"Icon_module_iconNavigationLast__58a0eca5","icon-hamburger":"Icon_module_iconHamburger__58a0eca5","icon-ellipsis":"Icon_module_iconEllipsis__58a0eca5","icon-triangle-left":"Icon_module_iconTriangleLeft__58a0eca5","icon-ellipsis-alt":"Icon_module_iconEllipsisAlt__58a0eca5","icon-bell":"Icon_module_iconBell__58a0eca5","icon-bell-alt":"Icon_module_iconBellAlt__58a0eca5","icon-share":"Icon_module_iconShare__58a0eca5","icon-forbidden":"Icon_module_iconForbidden__58a0eca5","icon-checkmark":"Icon_module_iconCheckmark__58a0eca5","icon-checkmark-square":"Icon_module_iconCheckmarkSquare__58a0eca5","icon-square":"Icon_module_iconSquare__58a0eca5","icon-minus-square":"Icon_module_iconMinusSquare__58a0eca5","icon-radio":"Icon_module_iconRadio__58a0eca5","icon-circle":"Icon_module_iconCircle__58a0eca5"};
|
|
381
385
|
n(css$z,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
382
386
|
|
|
383
|
-
var _excluded$
|
|
387
|
+
var _excluded$B = ["icon", "color", "className", "style", "size", "tag"];
|
|
384
388
|
var Icons;
|
|
385
389
|
|
|
386
390
|
(function (Icons) {
|
|
@@ -456,7 +460,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
456
460
|
size = _ref.size,
|
|
457
461
|
_ref$tag = _ref.tag,
|
|
458
462
|
tag = _ref$tag === void 0 ? 'span' : _ref$tag,
|
|
459
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
463
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
460
464
|
|
|
461
465
|
var Component = tag;
|
|
462
466
|
return React.createElement(Component, _extends({}, rest, {
|
|
@@ -483,32 +487,9 @@ var descriptionId = function descriptionId(id) {
|
|
|
483
487
|
return id + "-description";
|
|
484
488
|
};
|
|
485
489
|
|
|
486
|
-
var _excluded$
|
|
490
|
+
var _excluded$A = ["id", "children", "open", "onClose", "className", "containerClassName", "labelledby", "describedby", "disableEscapeKeyDown", "disableBackdrop", "zIndex", "domRoot"];
|
|
487
491
|
var SCROLL_PROPERTY_NAME = 'overflow';
|
|
488
492
|
var SCROLL_PROPERTY_VALUE = 'hidden';
|
|
489
|
-
|
|
490
|
-
var useBackdropOnCloseClick = function useBackdropOnCloseClick(disableBackdrop, onClose) {
|
|
491
|
-
var backdropRef = useRef(null);
|
|
492
|
-
|
|
493
|
-
var onBackdropClick = function onBackdropClick() {
|
|
494
|
-
return onClose && onClose();
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
useEffect(function () {
|
|
498
|
-
var _backdropRef$current;
|
|
499
|
-
|
|
500
|
-
!disableBackdrop && ((_backdropRef$current = backdropRef.current) == null ? void 0 : _backdropRef$current.addEventListener('click', onBackdropClick));
|
|
501
|
-
return function () {
|
|
502
|
-
var _backdropRef$current2;
|
|
503
|
-
|
|
504
|
-
!disableBackdrop && ((_backdropRef$current2 = backdropRef.current) == null ? void 0 : _backdropRef$current2.removeEventListener('click', onBackdropClick));
|
|
505
|
-
};
|
|
506
|
-
}, []);
|
|
507
|
-
return {
|
|
508
|
-
backdropRef: backdropRef
|
|
509
|
-
};
|
|
510
|
-
};
|
|
511
|
-
|
|
512
493
|
var useSetBodyScroll = function useSetBodyScroll(open) {
|
|
513
494
|
var hideBodyScroll = function hideBodyScroll() {
|
|
514
495
|
document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;
|
|
@@ -546,10 +527,9 @@ var BaseModal = function BaseModal(_ref) {
|
|
|
546
527
|
_ref$disableBackdrop = _ref.disableBackdrop,
|
|
547
528
|
disableBackdrop = _ref$disableBackdrop === void 0 ? false : _ref$disableBackdrop,
|
|
548
529
|
zIndex = _ref.zIndex,
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
backdropRef = _useBackdropOnCloseCl.backdropRef;
|
|
530
|
+
_ref$domRoot = _ref.domRoot,
|
|
531
|
+
domRoot = _ref$domRoot === void 0 ? document.body : _ref$domRoot,
|
|
532
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
553
533
|
|
|
554
534
|
useSetBodyScroll(open);
|
|
555
535
|
|
|
@@ -560,7 +540,11 @@ var BaseModal = function BaseModal(_ref) {
|
|
|
560
540
|
}
|
|
561
541
|
};
|
|
562
542
|
|
|
563
|
-
|
|
543
|
+
var handleBackdropClick = function handleBackdropClick() {
|
|
544
|
+
return !disableBackdrop && onClose && onClose();
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
return createPortal(React.createElement("div", _extends({}, restProps, {
|
|
564
548
|
id: id,
|
|
565
549
|
className: modules_cf1b230e['modal'] + " " + (open && modules_cf1b230e['visible']) + " " + className,
|
|
566
550
|
role: "dialog",
|
|
@@ -575,21 +559,21 @@ var BaseModal = function BaseModal(_ref) {
|
|
|
575
559
|
zIndex: zIndex
|
|
576
560
|
}
|
|
577
561
|
}), React.createElement("div", {
|
|
578
|
-
|
|
579
|
-
|
|
562
|
+
className: modules_cf1b230e['backdrop'],
|
|
563
|
+
onClick: handleBackdropClick
|
|
580
564
|
}), open && React.createElement("div", {
|
|
581
565
|
style: {
|
|
582
566
|
zIndex: zIndex && zIndex + 1
|
|
583
567
|
},
|
|
584
568
|
className: modules_cf1b230e['container'] + " " + containerClassName
|
|
585
|
-
}, children));
|
|
569
|
+
}, children)), domRoot);
|
|
586
570
|
};
|
|
587
571
|
|
|
588
572
|
var css$x = ".BaseModalContent_module_content__544cad31 {\n padding: 1.5rem 1.25rem 0;\n overflow-y: auto;\n flex: 1;\n outline: none;\n}";
|
|
589
573
|
var modules_cf7b8d60 = {"content":"BaseModalContent_module_content__544cad31"};
|
|
590
574
|
n(css$x,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
591
575
|
|
|
592
|
-
var _excluded$
|
|
576
|
+
var _excluded$z = ["id", "children", "className", "disableAutoFocus"];
|
|
593
577
|
var BaseModalContent = function BaseModalContent(_ref) {
|
|
594
578
|
var id = _ref.id,
|
|
595
579
|
children = _ref.children,
|
|
@@ -597,7 +581,7 @@ var BaseModalContent = function BaseModalContent(_ref) {
|
|
|
597
581
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
598
582
|
_ref$disableAutoFocus = _ref.disableAutoFocus,
|
|
599
583
|
disableAutoFocus = _ref$disableAutoFocus === void 0 ? false : _ref$disableAutoFocus,
|
|
600
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
584
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
601
585
|
|
|
602
586
|
var contentRef = useRef(null);
|
|
603
587
|
useEffect(function () {
|
|
@@ -619,12 +603,12 @@ var css$w = ".BaseModalActions_module_actions__382b7c32 {\n margin: 1.875rem 1.
|
|
|
619
603
|
var modules_6b4a9db0 = {"actions":"BaseModalActions_module_actions__382b7c32"};
|
|
620
604
|
n(css$w,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
621
605
|
|
|
622
|
-
var _excluded$
|
|
606
|
+
var _excluded$y = ["children", "className"];
|
|
623
607
|
var BaseModalActions = function BaseModalActions(_ref) {
|
|
624
608
|
var children = _ref.children,
|
|
625
609
|
_ref$className = _ref.className,
|
|
626
610
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
627
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
611
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
628
612
|
|
|
629
613
|
return React.createElement("footer", _extends({}, restProps, {
|
|
630
614
|
className: modules_6b4a9db0['actions'] + " " + className
|
|
@@ -635,11 +619,11 @@ var css$v = ".DialogActions_module_actions__63872f8a {\n margin: 1.5rem 1.25rem
|
|
|
635
619
|
var modules_d87e2731 = {"actions":"DialogActions_module_actions__63872f8a","left":"DialogActions_module_left__63872f8a"};
|
|
636
620
|
n(css$v,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
637
621
|
|
|
638
|
-
var _excluded$
|
|
622
|
+
var _excluded$x = ["children", "align"];
|
|
639
623
|
var DialogActions = function DialogActions(_ref) {
|
|
640
624
|
var children = _ref.children,
|
|
641
625
|
align = _ref.align,
|
|
642
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
626
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
643
627
|
|
|
644
628
|
return React.createElement(BaseModalActions, _extends({}, restProps, {
|
|
645
629
|
className: "" + modules_d87e2731['actions'] + (align === 'left' ? ' ' + modules_d87e2731['left'] : '')
|
|
@@ -657,7 +641,7 @@ n(css$t,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
|
657
641
|
var DialogTitle = function DialogTitle(_ref) {
|
|
658
642
|
var id = _ref.id,
|
|
659
643
|
title = _ref.title;
|
|
660
|
-
return React.createElement("
|
|
644
|
+
return React.createElement("div", {
|
|
661
645
|
className: modules_ff1bcd77['header']
|
|
662
646
|
}, React.createElement(Typography, {
|
|
663
647
|
id: id,
|
|
@@ -667,7 +651,25 @@ var DialogTitle = function DialogTitle(_ref) {
|
|
|
667
651
|
}, title));
|
|
668
652
|
};
|
|
669
653
|
|
|
670
|
-
var
|
|
654
|
+
var generateID = function generateID(length, stringToWeaveIn) {
|
|
655
|
+
if (length === void 0) {
|
|
656
|
+
length = 15;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/** We will make sure to mesh the generate id and name property together to basically create a unique ID */
|
|
660
|
+
var hashCharacters = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
|
|
661
|
+
var id = '';
|
|
662
|
+
/** Generate an id of x characters in length */
|
|
663
|
+
|
|
664
|
+
for (var i = 0; i < length && id.length < length; i++) {
|
|
665
|
+
var stringCharacter = stringToWeaveIn && stringToWeaveIn[i] !== undefined && !/\s/.test(stringToWeaveIn[i]) ? stringToWeaveIn[i] : '';
|
|
666
|
+
id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
return id.slice(0, length);
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
var _excluded$w = ["id", "open", "children", "alignActions", "onClose", "title", "primaryAction", "secondaryAction", "zIndex", "disableEscapeKeyDown"],
|
|
671
673
|
_excluded2 = ["label"],
|
|
672
674
|
_excluded3 = ["label"];
|
|
673
675
|
var Dialog = function Dialog(_ref) {
|
|
@@ -680,7 +682,12 @@ var Dialog = function Dialog(_ref) {
|
|
|
680
682
|
primaryAction = _ref.primaryAction,
|
|
681
683
|
secondaryAction = _ref.secondaryAction,
|
|
682
684
|
zIndex = _ref.zIndex,
|
|
683
|
-
|
|
685
|
+
_ref$disableEscapeKey = _ref.disableEscapeKeyDown,
|
|
686
|
+
disableEscapeKeyDown = _ref$disableEscapeKey === void 0 ? true : _ref$disableEscapeKey,
|
|
687
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
688
|
+
|
|
689
|
+
var _useState = useState(id != null ? id : generateID(20)),
|
|
690
|
+
dialogId = _useState[0];
|
|
684
691
|
|
|
685
692
|
var primaryLabel = primaryAction.label,
|
|
686
693
|
restOfPrimaryAction = _objectWithoutPropertiesLoose(primaryAction, _excluded2);
|
|
@@ -707,30 +714,33 @@ var Dialog = function Dialog(_ref) {
|
|
|
707
714
|
};
|
|
708
715
|
|
|
709
716
|
return React.createElement(BaseModal, _extends({}, restProps, {
|
|
710
|
-
id:
|
|
717
|
+
id: dialogId,
|
|
711
718
|
className: modules_c8de1793['dialog'],
|
|
712
719
|
containerClassName: modules_c8de1793['container'],
|
|
713
720
|
open: open,
|
|
714
721
|
disableBackdrop: true,
|
|
715
722
|
onClose: onClose,
|
|
716
|
-
zIndex: zIndex
|
|
723
|
+
zIndex: zIndex,
|
|
724
|
+
disableEscapeKeyDown: disableEscapeKeyDown
|
|
717
725
|
}), React.createElement(DialogTitle, {
|
|
718
|
-
id: labelId(
|
|
726
|
+
id: labelId(dialogId),
|
|
719
727
|
title: title
|
|
720
728
|
}), React.createElement(BaseModalContent, {
|
|
721
|
-
id: descriptionId(
|
|
729
|
+
id: descriptionId(dialogId),
|
|
722
730
|
className: modules_c8de1793['content'],
|
|
723
731
|
disableAutoFocus: true
|
|
724
732
|
}, children), React.createElement(DialogActions, {
|
|
725
733
|
align: alignActions
|
|
726
734
|
}, alignActions === 'left' ? [PrimaryButton, TertiaryButton] : [TertiaryButton, PrimaryButton]), React.createElement("input", {
|
|
727
735
|
autoFocus: true,
|
|
736
|
+
"aria-hidden": true,
|
|
728
737
|
style: {
|
|
729
738
|
position: 'absolute',
|
|
730
739
|
width: 0,
|
|
731
740
|
height: 0,
|
|
732
741
|
opacity: 0
|
|
733
742
|
},
|
|
743
|
+
maxLength: 0,
|
|
734
744
|
tabIndex: -1,
|
|
735
745
|
onKeyPress: onHiddenInputKeyPress
|
|
736
746
|
}));
|
|
@@ -740,15 +750,15 @@ var css$s = ".BaseModalHeader_module_header__045bdada {\n min-width: 80px;\n p
|
|
|
740
750
|
var modules_74d5dc9f = {"header":"BaseModalHeader_module_header__045bdada","headline":"BaseModalHeader_module_headline__045bdada","title":"BaseModalHeader_module_title__045bdada"};
|
|
741
751
|
n(css$s,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
742
752
|
|
|
743
|
-
var _excluded$
|
|
753
|
+
var _excluded$v = ["id", "title", "children", "onClose"];
|
|
744
754
|
var BaseModalHeader = function BaseModalHeader(_ref) {
|
|
745
755
|
var id = _ref.id,
|
|
746
756
|
title = _ref.title,
|
|
747
757
|
children = _ref.children,
|
|
748
758
|
onClose = _ref.onClose,
|
|
749
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
759
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
750
760
|
|
|
751
|
-
return React.createElement("
|
|
761
|
+
return React.createElement("div", _extends({}, restProps, {
|
|
752
762
|
className: modules_74d5dc9f['header']
|
|
753
763
|
}), React.createElement("div", {
|
|
754
764
|
className: modules_74d5dc9f['headline']
|
|
@@ -766,28 +776,83 @@ var BaseModalHeader = function BaseModalHeader(_ref) {
|
|
|
766
776
|
}))), children);
|
|
767
777
|
};
|
|
768
778
|
|
|
769
|
-
var
|
|
770
|
-
var
|
|
771
|
-
|
|
779
|
+
var _excluded$u = ["open", "onKeepEditing", "onDiscardChanges", "discardChangesButtonLabel", "keepEditingButtonLabel", "contentLabel", "titleLabel"];
|
|
780
|
+
var DiscardChangesDialog = function DiscardChangesDialog(_ref) {
|
|
781
|
+
var open = _ref.open,
|
|
782
|
+
onKeepEditing = _ref.onKeepEditing,
|
|
783
|
+
onDiscardChanges = _ref.onDiscardChanges,
|
|
784
|
+
discardChangesButtonLabel = _ref.discardChangesButtonLabel,
|
|
785
|
+
keepEditingButtonLabel = _ref.keepEditingButtonLabel,
|
|
786
|
+
contentLabel = _ref.contentLabel,
|
|
787
|
+
titleLabel = _ref.titleLabel,
|
|
788
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
772
789
|
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
790
|
+
return React.createElement(Dialog, _extends({}, rest, {
|
|
791
|
+
open: open,
|
|
792
|
+
alignActions: "left",
|
|
793
|
+
title: titleLabel,
|
|
794
|
+
onClose: onKeepEditing,
|
|
795
|
+
primaryAction: {
|
|
796
|
+
label: discardChangesButtonLabel,
|
|
797
|
+
onClick: onDiscardChanges
|
|
798
|
+
},
|
|
799
|
+
secondaryAction: {
|
|
800
|
+
label: keepEditingButtonLabel,
|
|
801
|
+
onClick: onKeepEditing
|
|
802
|
+
},
|
|
803
|
+
disableEscapeKeyDown: false
|
|
804
|
+
}), React.createElement(Typography, {
|
|
805
|
+
variant: "body",
|
|
806
|
+
spacing: {
|
|
807
|
+
margin: 0
|
|
808
|
+
}
|
|
809
|
+
}, contentLabel));
|
|
810
|
+
};
|
|
777
811
|
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
var id =
|
|
781
|
-
|
|
812
|
+
var _excluded$t = ["id", "onClose", "children", "hasUnsavedChanges", "headerProps", "discardChangedDialogProps"];
|
|
813
|
+
var DiscardChangesModal = function DiscardChangesModal(_ref) {
|
|
814
|
+
var id = _ref.id,
|
|
815
|
+
onClose = _ref.onClose,
|
|
816
|
+
children = _ref.children,
|
|
817
|
+
hasUnsavedChanges = _ref.hasUnsavedChanges,
|
|
818
|
+
headerProps = _ref.headerProps,
|
|
819
|
+
discardChangedDialogProps = _ref.discardChangedDialogProps,
|
|
820
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
782
821
|
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}
|
|
822
|
+
var _useState = useState(false),
|
|
823
|
+
openDiscardChangesDialog = _useState[0],
|
|
824
|
+
setOpenDiscardChangesDialog = _useState[1];
|
|
787
825
|
|
|
788
|
-
|
|
826
|
+
var onCloseWrapper = function onCloseWrapper() {
|
|
827
|
+
return hasUnsavedChanges() ? setOpenDiscardChangesDialog(true) : onClose();
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
var onDialogKeepEditing = function onDialogKeepEditing() {
|
|
831
|
+
setOpenDiscardChangesDialog(false);
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
var onDialogDiscardChanges = function onDialogDiscardChanges() {
|
|
835
|
+
setOpenDiscardChangesDialog(false);
|
|
836
|
+
onClose();
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
return React.createElement(Fragment, null, React.createElement(BaseModal, _extends({
|
|
840
|
+
id: id,
|
|
841
|
+
onClose: onCloseWrapper
|
|
842
|
+
}, rest), React.createElement(BaseModalHeader, _extends({}, headerProps, {
|
|
843
|
+
id: id + "-label",
|
|
844
|
+
onClose: onCloseWrapper
|
|
845
|
+
})), children), React.createElement(DiscardChangesDialog, _extends({}, discardChangedDialogProps, {
|
|
846
|
+
open: openDiscardChangesDialog,
|
|
847
|
+
onKeepEditing: onDialogKeepEditing,
|
|
848
|
+
onDiscardChanges: onDialogDiscardChanges
|
|
849
|
+
})));
|
|
789
850
|
};
|
|
790
851
|
|
|
852
|
+
var css$r = ".Tooltip_module_wrapper__2acdb93b {\n display: flex;\n align-items: center;\n}\n\n.Tooltip_module_tooltipWrapper__2acdb93b .Tooltip_module_icon__2acdb93b {\n margin-left: 0.5rem;\n transition: all 0.2s ease-in-out;\n color: var(--greyed-out);\n}\n.Tooltip_module_tooltipWrapper__2acdb93b .Tooltip_module_icon__2acdb93b:hover {\n color: var(--default);\n}\n\n.Tooltip_module_tooltip__2acdb93b {\n position: fixed;\n background-color: var(--default);\n padding: 0.1875rem 0.5rem;\n color: #fff;\n max-width: 330px;\n opacity: 0;\n transform: scale(0);\n transition-duration: 0.2s;\n transition-timing-function: ease-in-out;\n transition-property: opacity, transform;\n transform-origin: center left;\n pointer-events: none;\n}\n.Tooltip_module_tooltip__2acdb93b.Tooltip_module_visible__2acdb93b {\n opacity: 1;\n transform: scale(1);\n}\n\n.Tooltip_module_label__2acdb93b:focus-visible {\n outline: 0.5px dashed var(--color-primary);\n}";
|
|
853
|
+
var modules_16974fb0 = {"wrapper":"Tooltip_module_wrapper__2acdb93b","tooltip-wrapper":"Tooltip_module_tooltipWrapper__2acdb93b","icon":"Tooltip_module_icon__2acdb93b","tooltip":"Tooltip_module_tooltip__2acdb93b","visible":"Tooltip_module_visible__2acdb93b","label":"Tooltip_module_label__2acdb93b"};
|
|
854
|
+
n(css$r,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
855
|
+
|
|
791
856
|
var defaultConfigObject = {
|
|
792
857
|
relativeElement: undefined,
|
|
793
858
|
elementToBePositioned: undefined,
|
|
@@ -1145,33 +1210,62 @@ var css$q = ".Tiles_module_tiles__08ec2eda {\n display: grid;\n grid-gap: 1rem
|
|
|
1145
1210
|
var modules_7b7db5f7 = {"tiles":"Tiles_module_tiles__08ec2eda"};
|
|
1146
1211
|
n(css$q,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1147
1212
|
|
|
1148
|
-
var css$p = ".
|
|
1149
|
-
var modules_5f01ab30 = {"sr-only":"
|
|
1213
|
+
var css$p = ".Tile_module_srOnly__f07fe9a3 {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n.Tile_module_hidden__f07fe9a3 {\n display: none;\n}\n\n.Tile_module_slideIn__f07fe9a3 {\n animation: Tile_module_slideIn__f07fe9a3 0.5s forwards;\n}\n\n.Tile_module_slideOut__f07fe9a3 {\n animation: Tile_module_slideOut__f07fe9a3 0.5s forwards;\n}\n\n@keyframes Tile_module_slideIn__f07fe9a3 {\n 0% {\n transform: translateY(100vh);\n }\n 100% {\n transform: translateY(0%);\n }\n}\n@keyframes Tile_module_slideOut__f07fe9a3 {\n 0% {\n transform: translateY(0%);\n }\n 100% {\n transform: translateY(100vh);\n }\n}\n.Tile_module_tile__f07fe9a3 {\n border: 1px solid #e9e9eb;\n border-radius: 8px;\n box-sizing: border-box;\n padding: 0 0 2rem;\n background-color: #fff;\n transition: box-shadow 0.2s ease-in-out;\n font-family: var(--font-family);\n}\n.Tile_module_tile__f07fe9a3:hover {\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.29);\n}\n.Tile_module_tile__f07fe9a3 header {\n display: flex;\n align-items: center;\n}\n.Tile_module_tile__f07fe9a3 header .Tile_module_icon__f07fe9a3 {\n padding: 0 1rem;\n}\n.Tile_module_tile__f07fe9a3 figure {\n margin: 0 0 1rem;\n height: 3rem;\n}\n.Tile_module_tile__f07fe9a3 figure img {\n vertical-align: top;\n height: 3rem;\n width: auto;\n}\n.Tile_module_tile__f07fe9a3 .Tile_module_placeholder__f07fe9a3 {\n font-size: 3rem;\n margin: 0 0 1rem;\n color: var(--greyed-out);\n}\n.Tile_module_tile__f07fe9a3 .Tile_module_content__f07fe9a3 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n cursor: default;\n padding: 0 1rem;\n}\n.Tile_module_tile__f07fe9a3.Tile_module_loading__f07fe9a3 header {\n display: none;\n}\n.Tile_module_tile__f07fe9a3.Tile_module_loading__f07fe9a3 .Tile_module_image__f07fe9a3 {\n margin-top: 2.5rem;\n position: relative;\n overflow: hidden;\n background-color: var(--disabled);\n border-radius: 0.5rem;\n width: 3rem;\n height: 3rem;\n}\n.Tile_module_tile__f07fe9a3.Tile_module_loading__f07fe9a3 .Tile_module_image__f07fe9a3::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0));\n animation: Tile_module_shimmer__f07fe9a3 2s infinite;\n content: \"\";\n}\n@keyframes Tile_module_shimmer__f07fe9a3 {\n 100% {\n transform: translateX(100%);\n }\n}\n.Tile_module_tile__f07fe9a3.Tile_module_loading__f07fe9a3 .Tile_module_title__f07fe9a3 {\n position: relative;\n overflow: hidden;\n background-color: var(--disabled);\n color: transparent;\n display: inline-block;\n width: 70%;\n border-radius: 0.5rem;\n}\n.Tile_module_tile__f07fe9a3.Tile_module_loading__f07fe9a3 .Tile_module_title__f07fe9a3::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0));\n animation: Tile_module_shimmer__f07fe9a3 2s infinite;\n content: \"\";\n}\n@keyframes Tile_module_shimmer__f07fe9a3 {\n 100% {\n transform: translateX(100%);\n }\n}";
|
|
1214
|
+
var modules_5f01ab30 = {"sr-only":"Tile_module_srOnly__f07fe9a3","hidden":"Tile_module_hidden__f07fe9a3","slide-in":"Tile_module_slideIn__f07fe9a3","slide-out":"Tile_module_slideOut__f07fe9a3","tile":"Tile_module_tile__f07fe9a3","icon":"Tile_module_icon__f07fe9a3","placeholder":"Tile_module_placeholder__f07fe9a3","content":"Tile_module_content__f07fe9a3","loading":"Tile_module_loading__f07fe9a3","image":"Tile_module_image__f07fe9a3","shimmer":"Tile_module_shimmer__f07fe9a3","title":"Tile_module_title__f07fe9a3"};
|
|
1150
1215
|
n(css$p,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1151
1216
|
|
|
1152
|
-
var _excluded$r = ["title", "imageProps", "
|
|
1217
|
+
var _excluded$r = ["title", "imageProps", "enabled", "className", "loading", "tileAction"];
|
|
1153
1218
|
var Tile = function Tile(_ref) {
|
|
1154
1219
|
var title = _ref.title,
|
|
1155
1220
|
imageProps = _ref.imageProps,
|
|
1156
|
-
|
|
1221
|
+
enabled = _ref.enabled,
|
|
1157
1222
|
className = _ref.className,
|
|
1158
1223
|
loading = _ref.loading,
|
|
1159
|
-
|
|
1224
|
+
tileAction = _ref.tileAction,
|
|
1160
1225
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
1161
1226
|
|
|
1227
|
+
var _useState = useState(generateID(20)),
|
|
1228
|
+
tileDescriptionID = _useState[0];
|
|
1229
|
+
|
|
1162
1230
|
if (!title) {
|
|
1163
1231
|
throw new Error('Please make sure to pass a title prop to your Tile component.');
|
|
1164
1232
|
}
|
|
1165
1233
|
|
|
1166
|
-
|
|
1234
|
+
var statusMessage = function statusMessage() {
|
|
1235
|
+
if (enabled) {
|
|
1236
|
+
return 'Status: enabled';
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
return 'Status: disabled';
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
return React.createElement("article", _extends({
|
|
1243
|
+
tabIndex: 0,
|
|
1244
|
+
"aria-labelledby": tileDescriptionID
|
|
1245
|
+
}, rest, {
|
|
1167
1246
|
className: modules_5f01ab30['tile'] + " " + (loading ? modules_5f01ab30['loading'] : '')
|
|
1168
|
-
}), React.createElement("header",
|
|
1247
|
+
}), React.createElement("header", {
|
|
1248
|
+
style: {
|
|
1249
|
+
justifyContent: enabled === undefined ? 'flex-end' : 'space-between'
|
|
1250
|
+
}
|
|
1251
|
+
}, enabled === true && React.createElement(Icon, {
|
|
1252
|
+
color: "var(--success)",
|
|
1253
|
+
icon: Icons.Checkmark,
|
|
1169
1254
|
className: modules_5f01ab30['icon'] + " " + (className != null ? className : '')
|
|
1170
|
-
})
|
|
1255
|
+
}), enabled === false && React.createElement(Icon, {
|
|
1256
|
+
color: "var(--greyed-out)",
|
|
1257
|
+
icon: Icons.Forbidden,
|
|
1258
|
+
className: modules_5f01ab30['icon'] + " " + (className != null ? className : '')
|
|
1259
|
+
}), enabled !== undefined && React.createElement("span", {
|
|
1260
|
+
id: tileDescriptionID,
|
|
1261
|
+
className: modules_35a251a6['sr-only']
|
|
1262
|
+
}, title + ". " + statusMessage()), tileAction != null ? tileAction : null), React.createElement("div", {
|
|
1171
1263
|
className: modules_5f01ab30['content']
|
|
1172
|
-
}, imageProps && imageProps.src
|
|
1264
|
+
}, imageProps && imageProps.src.length > 0 && React.createElement("figure", {
|
|
1173
1265
|
className: modules_5f01ab30['image']
|
|
1174
|
-
}, !loading && React.createElement("img", _extends({}, imageProps
|
|
1266
|
+
}, !loading && React.createElement("img", _extends({}, imageProps, {
|
|
1267
|
+
alt: ""
|
|
1268
|
+
}))), (!imageProps || imageProps.src.length === 0) && React.createElement(Icon, {
|
|
1175
1269
|
className: modules_5f01ab30['placeholder'],
|
|
1176
1270
|
icon: Icons.Image
|
|
1177
1271
|
}), React.createElement("span", {
|
|
@@ -1193,24 +1287,21 @@ var Tiles = function Tiles(_ref) {
|
|
|
1193
1287
|
key: "placeholder1",
|
|
1194
1288
|
title: "placeholder",
|
|
1195
1289
|
imageProps: {
|
|
1196
|
-
src: 'placeholder'
|
|
1197
|
-
alt: 'placeholder'
|
|
1290
|
+
src: 'placeholder'
|
|
1198
1291
|
},
|
|
1199
1292
|
loading: true
|
|
1200
1293
|
}), React.createElement(Tile, {
|
|
1201
1294
|
key: "placeholder2",
|
|
1202
1295
|
title: "placeholder",
|
|
1203
1296
|
imageProps: {
|
|
1204
|
-
src: 'placeholder'
|
|
1205
|
-
alt: 'placeholder'
|
|
1297
|
+
src: 'placeholder'
|
|
1206
1298
|
},
|
|
1207
1299
|
loading: true
|
|
1208
1300
|
}), React.createElement(Tile, {
|
|
1209
1301
|
key: "placeholder3",
|
|
1210
1302
|
title: "placeholder",
|
|
1211
1303
|
imageProps: {
|
|
1212
|
-
src: 'placeholder'
|
|
1213
|
-
alt: 'placeholder'
|
|
1304
|
+
src: 'placeholder'
|
|
1214
1305
|
},
|
|
1215
1306
|
loading: true
|
|
1216
1307
|
})];
|
|
@@ -1726,19 +1817,19 @@ var Form = function Form(_ref) {
|
|
|
1726
1817
|
}, rest), children);
|
|
1727
1818
|
};
|
|
1728
1819
|
|
|
1729
|
-
var css$h = ".
|
|
1730
|
-
var modules_76ea8ff8 = {"fieldset":"
|
|
1820
|
+
var css$h = ".Fieldset_module_fieldset__eb41ac07 {\n border: 0;\n padding: 1rem 1.25rem;\n border-radius: 0.5rem;\n margin: 0;\n}\n.Fieldset_module_fieldset__eb41ac07.Fieldset_module_noPadding__eb41ac07 {\n padding: 0;\n}\n.Fieldset_module_fieldset__eb41ac07 + .Fieldset_module_wrapper__eb41ac07,\n.Fieldset_module_fieldset__eb41ac07 + .Fieldset_module_fieldset__eb41ac07 {\n margin-top: 1rem;\n}\n.Fieldset_module_fieldset__eb41ac07 .Fieldset_module_legend__eb41ac07 {\n display: block;\n}\n.Fieldset_module_fieldset__eb41ac07 .Fieldset_module_legend__eb41ac07.Fieldset_module_required__eb41ac07:after {\n content: \" *\";\n}\n.Fieldset_module_fieldset__eb41ac07 .Fieldset_module_legend__eb41ac07.Fieldset_module_error__eb41ac07 {\n color: var(--error);\n}";
|
|
1821
|
+
var modules_76ea8ff8 = {"fieldset":"Fieldset_module_fieldset__eb41ac07","no-padding":"Fieldset_module_noPadding__eb41ac07","wrapper":"Fieldset_module_wrapper__eb41ac07","legend":"Fieldset_module_legend__eb41ac07","required":"Fieldset_module_required__eb41ac07","error":"Fieldset_module_error__eb41ac07"};
|
|
1731
1822
|
n(css$h,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1732
1823
|
|
|
1733
|
-
var _excluded$j = ["children", "className", "
|
|
1824
|
+
var _excluded$j = ["children", "className", "legend", "legendStyle", "hideLegend", "noBackground", "background", "noPadding", "disabled", "required", "error"];
|
|
1734
1825
|
var Fieldset = function Fieldset(_ref) {
|
|
1735
1826
|
var children = _ref.children,
|
|
1736
1827
|
className = _ref.className,
|
|
1737
|
-
|
|
1738
|
-
_ref$
|
|
1739
|
-
|
|
1740
|
-
_ref$
|
|
1741
|
-
|
|
1828
|
+
legend = _ref.legend,
|
|
1829
|
+
_ref$legendStyle = _ref.legendStyle,
|
|
1830
|
+
legendStyle = _ref$legendStyle === void 0 ? 'body' : _ref$legendStyle,
|
|
1831
|
+
_ref$hideLegend = _ref.hideLegend,
|
|
1832
|
+
hideLegend = _ref$hideLegend === void 0 ? false : _ref$hideLegend,
|
|
1742
1833
|
noBackground = _ref.noBackground,
|
|
1743
1834
|
_ref$background = _ref.background,
|
|
1744
1835
|
background = _ref$background === void 0 ? noBackground ? '' : '#FFF' : _ref$background,
|
|
@@ -1746,13 +1837,18 @@ var Fieldset = function Fieldset(_ref) {
|
|
|
1746
1837
|
noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
|
|
1747
1838
|
_ref$disabled = _ref.disabled,
|
|
1748
1839
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1840
|
+
_ref$required = _ref.required,
|
|
1841
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
|
1842
|
+
_ref$error = _ref.error,
|
|
1843
|
+
error = _ref$error === void 0 ? false : _ref$error,
|
|
1749
1844
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
1750
1845
|
|
|
1751
1846
|
var renderChildren = function renderChildren() {
|
|
1752
1847
|
if (!children) return;
|
|
1753
1848
|
return React.Children.map(children, function (child) {
|
|
1754
1849
|
return React.cloneElement(child, {
|
|
1755
|
-
disabled: child.props.disabled !== undefined ? child.props.disabled : disabled
|
|
1850
|
+
disabled: child.props.disabled !== undefined ? child.props.disabled : disabled,
|
|
1851
|
+
error: child.props.error !== undefined ? child.props.error : error
|
|
1756
1852
|
});
|
|
1757
1853
|
});
|
|
1758
1854
|
};
|
|
@@ -1763,24 +1859,25 @@ var Fieldset = function Fieldset(_ref) {
|
|
|
1763
1859
|
backgroundColor: background
|
|
1764
1860
|
}, rest.style),
|
|
1765
1861
|
className: modules_76ea8ff8.fieldset + " " + (noPadding ? modules_76ea8ff8['no-padding'] : '') + " " + (className != null ? className : '')
|
|
1766
|
-
}),
|
|
1862
|
+
}), legend && React.createElement("legend", {
|
|
1767
1863
|
className: modules_35a251a6['sr-only']
|
|
1768
|
-
},
|
|
1769
|
-
variant:
|
|
1864
|
+
}, legend), legend && !hideLegend && React.createElement(Typography, {
|
|
1865
|
+
variant: legendStyle,
|
|
1770
1866
|
tag: "span",
|
|
1771
1867
|
"aria-hidden": "true",
|
|
1772
|
-
className: modules_76ea8ff8
|
|
1773
|
-
},
|
|
1868
|
+
className: modules_76ea8ff8['legend'] + " " + (required ? modules_76ea8ff8['required'] : '') + " " + (error ? modules_76ea8ff8['error'] : '')
|
|
1869
|
+
}, legend), renderChildren());
|
|
1774
1870
|
};
|
|
1775
1871
|
|
|
1776
1872
|
var css$g = ".FormControl_module_formControl__f69240d3 + .FormControl_module_formControl__f69240d3 {\n margin-top: 1rem;\n}\n.FormControl_module_formControl__f69240d3.FormControl_module_grid__f69240d3 {\n display: flex;\n flex-wrap: wrap;\n}\n.FormControl_module_formControl__f69240d3.FormControl_module_grid__f69240d3.FormControl_module_center__f69240d3, .FormControl_module_formControl__f69240d3.FormControl_module_grid__f69240d3.FormControl_module_middle__f69240d3 {\n align-items: center;\n}\n.FormControl_module_formControl__f69240d3.FormControl_module_grid__f69240d3.FormControl_module_start__f69240d3, .FormControl_module_formControl__f69240d3.FormControl_module_grid__f69240d3.FormControl_module_top__f69240d3 {\n align-items: flex-start;\n}\n.FormControl_module_formControl__f69240d3.FormControl_module_grid__f69240d3.FormControl_module_end__f69240d3, .FormControl_module_formControl__f69240d3.FormControl_module_grid__f69240d3.FormControl_module_bottom__f69240d3 {\n align-items: flex-end;\n}\n.FormControl_module_formControl__f69240d3.FormControl_module_grid__f69240d3.FormControl_module_stretch__f69240d3 {\n align-items: stretch;\n}\n.FormControl_module_formControl__f69240d3.FormControl_module_grid__f69240d3.FormControl_module_stretch__f69240d3 > * > * {\n box-sizing: border-box;\n height: 100%;\n}\n\n.FormControl_module_column__f69240d3 {\n flex-grow: 1;\n flex-shrink: 0;\n}\n\n.FormControl_module_grid2__f69240d3 .FormControl_module_column__f69240d3:nth-child(even) {\n margin-left: 1rem;\n}\n.FormControl_module_grid2__f69240d3 .FormControl_module_column__f69240d3:nth-child(n+3) {\n margin-top: 1rem;\n}\n\n.FormControl_module_grid3__f69240d3 .FormControl_module_column__f69240d3:not(:nth-child(3n+1)) {\n margin-left: 1rem;\n}\n.FormControl_module_grid3__f69240d3 .FormControl_module_column__f69240d3:nth-child(n+4) {\n margin-top: 1rem;\n}\n\n.FormControl_module_col2__f69240d3 {\n flex-basis: calc((100% - 1rem) / 2);\n}\n\n.FormControl_module_col3__f69240d3 {\n flex-basis: calc((100% - 2rem) / 3);\n}";
|
|
1777
1873
|
var modules_1d54e29e = {"form-control":"FormControl_module_formControl__f69240d3","grid":"FormControl_module_grid__f69240d3","center":"FormControl_module_center__f69240d3","middle":"FormControl_module_middle__f69240d3","start":"FormControl_module_start__f69240d3","top":"FormControl_module_top__f69240d3","end":"FormControl_module_end__f69240d3","bottom":"FormControl_module_bottom__f69240d3","stretch":"FormControl_module_stretch__f69240d3","column":"FormControl_module_column__f69240d3","grid-2":"FormControl_module_grid2__f69240d3","grid-3":"FormControl_module_grid3__f69240d3","col-2":"FormControl_module_col2__f69240d3","col-3":"FormControl_module_col3__f69240d3"};
|
|
1778
1874
|
n(css$g,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1779
1875
|
|
|
1780
|
-
var _excluded$i = ["children", "disabled", "className", "grid", "align"];
|
|
1876
|
+
var _excluded$i = ["children", "disabled", "error", "className", "grid", "align"];
|
|
1781
1877
|
var FormControl = function FormControl(_ref) {
|
|
1782
1878
|
var children = _ref.children,
|
|
1783
1879
|
disabled = _ref.disabled,
|
|
1880
|
+
error = _ref.error,
|
|
1784
1881
|
className = _ref.className,
|
|
1785
1882
|
grid = _ref.grid,
|
|
1786
1883
|
_ref$align = _ref.align,
|
|
@@ -1794,7 +1891,8 @@ var FormControl = function FormControl(_ref) {
|
|
|
1794
1891
|
}
|
|
1795
1892
|
|
|
1796
1893
|
var childElement = React.cloneElement(child, {
|
|
1797
|
-
disabled: child.props.disabled !== undefined ? child.props.disabled : disabled
|
|
1894
|
+
disabled: child.props.disabled !== undefined ? child.props.disabled : disabled,
|
|
1895
|
+
error: child.props.error !== undefined ? child.props.error : error
|
|
1798
1896
|
});
|
|
1799
1897
|
|
|
1800
1898
|
if (grid && grid > 1) {
|
|
@@ -2358,7 +2456,7 @@ var CheckboxWrapper = function CheckboxWrapper(_ref) {
|
|
|
2358
2456
|
helperId = _useWrapper.helperId;
|
|
2359
2457
|
|
|
2360
2458
|
useEffect(function () {
|
|
2361
|
-
if (fieldsetProps.
|
|
2459
|
+
if (fieldsetProps.legend === undefined) {
|
|
2362
2460
|
console.error("You should give your Fieldset component a title prop so a legend element is rendered. This error was thrown in CheckboxWrapper. You can add this title prop through the fieldsetProps prop by passing an object (fieldsetProps={{ title: \"title here\" }})");
|
|
2363
2461
|
}
|
|
2364
2462
|
}, []);
|
|
@@ -2481,7 +2579,7 @@ var RadioWrapper = function RadioWrapper(_ref) {
|
|
|
2481
2579
|
helperId = _useWrapper.helperId;
|
|
2482
2580
|
|
|
2483
2581
|
useEffect(function () {
|
|
2484
|
-
if (fieldsetProps.
|
|
2582
|
+
if (fieldsetProps.legend === undefined) {
|
|
2485
2583
|
console.error("You should give your Fieldset component a title prop so a legend element is rendered. This error was thrown in RadioWrapper. You can add this title prop through the fieldsetProps prop by passing an object (fieldsetProps={{ title: \"title here\" }})");
|
|
2486
2584
|
}
|
|
2487
2585
|
}, []);
|
|
@@ -2652,8 +2750,8 @@ var TextareaWrapper = function TextareaWrapper(_ref) {
|
|
|
2652
2750
|
})));
|
|
2653
2751
|
};
|
|
2654
2752
|
|
|
2655
|
-
var css$3 = ".
|
|
2656
|
-
var modules_8fc278f9 = {"radio-wrapper":"
|
|
2753
|
+
var css$3 = ".Radio_module_radioWrapper__0c70e5a2 {\n position: relative;\n}\n.Radio_module_radioWrapper__0c70e5a2 + .Radio_module_radioWrapper__0c70e5a2 {\n margin-top: 1.25rem;\n}\n\n.Radio_module_error__0c70e5a2 {\n color: var(--error);\n}\n\n.Radio_module_helperText__0c70e5a2 {\n margin-top: 0.25rem;\n margin-left: 1.75rem;\n}\n\n.Radio_module_errorMessage__0c70e5a2 {\n margin-top: 1.25rem;\n display: flex;\n align-items: bottom;\n}\n\n.Radio_module_errorIcon__0c70e5a2 {\n margin-right: 0.5rem;\n font-size: 1.25rem;\n}\n\n.Radio_module_radioContainer__0c70e5a2 {\n display: flex;\n align-items: center;\n}\n.Radio_module_radioContainer__0c70e5a2 label {\n display: inline-block;\n margin-left: 0.5rem;\n user-select: none;\n font-size: var(--font-size);\n}\n.Radio_module_disabled__0c70e5a2 .Radio_module_radioContainer__0c70e5a2 label {\n cursor: not-allowed;\n}\n\n.Radio_module_radioList__0c70e5a2 {\n padding: 0;\n margin: 1.25rem 0 0 1.75rem;\n list-style: none;\n}\n.Radio_module_radioList__0c70e5a2 li + li {\n margin-top: 1.75rem;\n}\n\n.Radio_module_nativeInput__0c70e5a2 {\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n margin: 0;\n width: 1.75rem;\n height: 1.75rem;\n}\n.Radio_module_nativeInput__0c70e5a2:not(.Radio_module_error__0c70e5a2):not(:disabled):focus + *, .Radio_module_nativeInput__0c70e5a2:not(.Radio_module_error__0c70e5a2):not(:disabled):active + * {\n color: var(--color-primary);\n}\n.Radio_module_nativeInput__0c70e5a2:disabled {\n cursor: not-allowed;\n}\n.Radio_module_nativeInput__0c70e5a2:focus-visible + * {\n border-radius: 2px;\n outline: 1px solid var(--color-primary);\n outline-offset: 1px;\n}\n.Radio_module_nativeInput__0c70e5a2.Radio_module_error__0c70e5a2:focus-visible + * {\n outline-color: var(--color-error);\n}\n\n.Radio_module_input__0c70e5a2 {\n font-size: 1.25rem;\n pointer-events: none;\n width: 1.25rem;\n height: 1.25rem;\n /** The & behind disabled means parent selector (so in reality this means .disabled .input) */\n}\n.Radio_module_disabled__0c70e5a2 .Radio_module_input__0c70e5a2 {\n color: var(--disabled);\n}\n\n.Radio_module_disabled__0c70e5a2 {\n color: var(--disabled);\n}";
|
|
2754
|
+
var modules_8fc278f9 = {"radio-wrapper":"Radio_module_radioWrapper__0c70e5a2","error":"Radio_module_error__0c70e5a2","helper-text":"Radio_module_helperText__0c70e5a2","error-message":"Radio_module_errorMessage__0c70e5a2","error-icon":"Radio_module_errorIcon__0c70e5a2","radio-container":"Radio_module_radioContainer__0c70e5a2","disabled":"Radio_module_disabled__0c70e5a2","radio-list":"Radio_module_radioList__0c70e5a2","native-input":"Radio_module_nativeInput__0c70e5a2","input":"Radio_module_input__0c70e5a2"};
|
|
2657
2755
|
n(css$3,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
2658
2756
|
|
|
2659
2757
|
var useFormSelector = function useFormSelector(configObject) {
|
|
@@ -2806,10 +2904,10 @@ var Radio = function Radio(_ref) {
|
|
|
2806
2904
|
id: identifier + "-radio",
|
|
2807
2905
|
type: "radio"
|
|
2808
2906
|
})), checked && React.createElement(Icon, {
|
|
2809
|
-
className: modules_8fc278f9
|
|
2907
|
+
className: modules_8fc278f9['input'] + " " + (disabled ? modules_8fc278f9['disabled'] : ''),
|
|
2810
2908
|
icon: Icons.Radio
|
|
2811
2909
|
}), !checked && React.createElement(Icon, {
|
|
2812
|
-
className: modules_8fc278f9
|
|
2910
|
+
className: modules_8fc278f9['input'] + " " + (disabled ? modules_8fc278f9['disabled'] : ''),
|
|
2813
2911
|
icon: Icons.Circle
|
|
2814
2912
|
}), React.createElement("label", {
|
|
2815
2913
|
onClick: onChangeHandler,
|
|
@@ -2817,8 +2915,8 @@ var Radio = function Radio(_ref) {
|
|
|
2817
2915
|
}, children));
|
|
2818
2916
|
};
|
|
2819
2917
|
|
|
2820
|
-
var css$1 = ".
|
|
2821
|
-
var modules_6238daf1 = {"checkbox-wrapper":"
|
|
2918
|
+
var css$1 = ".Checkbox_module_checkboxWrapper__cb754ef1 {\n position: relative;\n}\n.Checkbox_module_checkboxWrapper__cb754ef1 + .Checkbox_module_checkboxWrapper__cb754ef1 {\n margin-top: 1.25rem;\n}\n\n.Checkbox_module_checkboxContainer__cb754ef1 {\n display: flex;\n align-items: center;\n}\n.Checkbox_module_checkboxContainer__cb754ef1 label {\n display: inline-block;\n margin-left: 0.5rem;\n user-select: none;\n font-size: var(--font-size);\n}\n\n.Checkbox_module_checkboxList__cb754ef1 {\n padding: 0;\n margin: 1.25rem 0 0 1.75rem;\n list-style: none;\n}\n.Checkbox_module_checkboxList__cb754ef1 li + li {\n margin-top: 1.25rem;\n}\n\n.Checkbox_module_nativeInput__cb754ef1 {\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n margin: 0;\n width: 1.25rem;\n height: 1.25rem;\n}\n.Checkbox_module_nativeInput__cb754ef1:not(.Checkbox_module_error__cb754ef1):not(:disabled):focus + *, .Checkbox_module_nativeInput__cb754ef1:not(.Checkbox_module_error__cb754ef1):not(:disabled):active + * {\n color: var(--color-primary);\n}\n.Checkbox_module_nativeInput__cb754ef1:focus-visible + * {\n border-radius: 2px;\n outline: 1px solid var(--color-primary);\n outline-offset: 1px;\n}\n.Checkbox_module_nativeInput__cb754ef1.Checkbox_module_error__cb754ef1:focus-visible + * {\n outline-color: var(--color-error);\n}\n\n.Checkbox_module_input__cb754ef1 {\n font-size: 1.25rem;\n pointer-events: none;\n}\n\n.Checkbox_module_disabled__cb754ef1 {\n color: var(--disabled);\n}";
|
|
2919
|
+
var modules_6238daf1 = {"checkbox-wrapper":"Checkbox_module_checkboxWrapper__cb754ef1","checkbox-container":"Checkbox_module_checkboxContainer__cb754ef1","checkbox-list":"Checkbox_module_checkboxList__cb754ef1","native-input":"Checkbox_module_nativeInput__cb754ef1","error":"Checkbox_module_error__cb754ef1","input":"Checkbox_module_input__cb754ef1","disabled":"Checkbox_module_disabled__cb754ef1"};
|
|
2822
2920
|
n(css$1,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
2823
2921
|
|
|
2824
2922
|
var _excluded$2 = ["children", "name", "helperText", "helperProps", "indeterminate", "parentErrorId", "errorMessage", "disabled", "label", "parentHelperId", "className", "error", "checked", "wrapperProps", "onChange"];
|
|
@@ -2891,7 +2989,8 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
2891
2989
|
return React.createElement("li", null, React.createElement(Checkbox, _extends({}, child.props, {
|
|
2892
2990
|
parentHelperId: parentHelperId,
|
|
2893
2991
|
parentErrorId: parentErrorId,
|
|
2894
|
-
error: error
|
|
2992
|
+
error: error,
|
|
2993
|
+
disabled: disabled ? disabled : child.disabled
|
|
2895
2994
|
}), child.props.children));
|
|
2896
2995
|
}));
|
|
2897
2996
|
};
|
|
@@ -2907,8 +3006,9 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
2907
3006
|
var renderToggle = function renderToggle() {
|
|
2908
3007
|
return React.Children.toArray(children).filter(isToggle);
|
|
2909
3008
|
};
|
|
2910
|
-
/** Default return value is the default checkbox */
|
|
2911
3009
|
|
|
3010
|
+
var iconClasses = [modules_6238daf1['input'], disabled ? modules_6238daf1['disabled'] : ''];
|
|
3011
|
+
/** Default return value is the default checkbox */
|
|
2912
3012
|
|
|
2913
3013
|
return React.createElement(FormSelectorWrapper, _extends({}, wrapperProps, {
|
|
2914
3014
|
className: modules_6238daf1['checkbox-wrapper'] + " " + (className ? className : ''),
|
|
@@ -2936,13 +3036,13 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
2936
3036
|
name: name,
|
|
2937
3037
|
type: "checkbox"
|
|
2938
3038
|
})), renderToggle(), indeterminate && React.createElement(Icon, {
|
|
2939
|
-
className:
|
|
3039
|
+
className: iconClasses.join(' '),
|
|
2940
3040
|
icon: Icons.MinusSquare
|
|
2941
3041
|
}), checked && !indeterminate && React.createElement(Icon, {
|
|
2942
|
-
className:
|
|
3042
|
+
className: iconClasses.join(' '),
|
|
2943
3043
|
icon: Icons.CheckmarkSquare
|
|
2944
3044
|
}), !checked && !indeterminate && React.createElement(Icon, {
|
|
2945
|
-
className:
|
|
3045
|
+
className: iconClasses.join(' '),
|
|
2946
3046
|
icon: Icons.Square
|
|
2947
3047
|
}), React.createElement("label", {
|
|
2948
3048
|
htmlFor: identifier + "-checkbox"
|
|
@@ -2982,7 +3082,7 @@ var BaseWizardSteps = function BaseWizardSteps(_ref) {
|
|
|
2982
3082
|
icon: Icons.Checkmark
|
|
2983
3083
|
});
|
|
2984
3084
|
} else {
|
|
2985
|
-
return React.createElement(
|
|
3085
|
+
return React.createElement(Fragment, null, React.createElement("span", {
|
|
2986
3086
|
className: modules_35a251a6['sr-only']
|
|
2987
3087
|
}, stepScreenReaderLabel, " "), stepNumberString);
|
|
2988
3088
|
}
|
|
@@ -3146,7 +3246,7 @@ var WizardActions = function WizardActions(_ref) {
|
|
|
3146
3246
|
onSaveAndClose(currentStepNo);
|
|
3147
3247
|
};
|
|
3148
3248
|
|
|
3149
|
-
return React.createElement(
|
|
3249
|
+
return React.createElement(Fragment, null, React.createElement(Button, {
|
|
3150
3250
|
variant: "text",
|
|
3151
3251
|
onClick: onCancel
|
|
3152
3252
|
}, cancelButtonLabel), hasPreviousStep && React.createElement(Button, {
|
|
@@ -3212,7 +3312,7 @@ var WizardContent = function WizardContent(_ref) {
|
|
|
3212
3312
|
children = _ref.children;
|
|
3213
3313
|
useSetWizardState(steps, mode, stepScreenReaderLabel);
|
|
3214
3314
|
useStepChanging(onStepChange);
|
|
3215
|
-
return React.createElement(
|
|
3315
|
+
return React.createElement(Fragment, null, children);
|
|
3216
3316
|
};
|
|
3217
3317
|
|
|
3218
3318
|
var Wizard = function Wizard(props) {
|
|
@@ -3231,5 +3331,5 @@ var Wizard = function Wizard(props) {
|
|
|
3231
3331
|
}, React.createElement(WizardContent, _extends({}, props)));
|
|
3232
3332
|
};
|
|
3233
3333
|
|
|
3234
|
-
export { BaseStyling, BaseWizardSteps, Breadcrumbs, Button, Checkbox, CheckboxWrapper, ContextMenu, ContextMenuItem, Dialog, Fieldset, Form, FormControl, FormGroup, FormHelperText, Icon, IconButton, Icons, Input, InputWrapper, Label, Link, BaseModal as Modal, BaseModalActions as ModalActions, BaseModalContent as ModalContent, BaseModalHeader as ModalHeader, Option, Radio, RadioWrapper, Select, SelectWrapper, SnackbarProvider, Textarea, TextareaWrapper, Tile, Tiles, Tooltip, Typography, Wizard, WizardActions, WizardSteps, useSnackbar };
|
|
3334
|
+
export { BaseStyling, BaseWizardSteps, Breadcrumbs, Button, Checkbox, CheckboxWrapper, ContextMenu, ContextMenuItem, Dialog, DiscardChangesModal, Fieldset, Form, FormControl, FormGroup, FormHelperText, Icon, IconButton, Icons, Input, InputWrapper, Label, Link, BaseModal as Modal, BaseModalActions as ModalActions, BaseModalContent as ModalContent, BaseModalHeader as ModalHeader, Option, Radio, RadioWrapper, Select, SelectWrapper, SnackbarProvider, Textarea, TextareaWrapper, Tile, Tiles, Tooltip, Typography, Wizard, WizardActions, WizardSteps, useSnackbar };
|
|
3235
3335
|
//# sourceMappingURL=react-lib-components.esm.js.map
|