@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
|
@@ -190,7 +190,7 @@ var useSpacing = function useSpacing(spacingProps, style) {
|
|
|
190
190
|
return style;
|
|
191
191
|
};
|
|
192
192
|
|
|
193
|
-
var _excluded$
|
|
193
|
+
var _excluded$G = ["children", "variant", "tag", "style", "spacing", "className"];
|
|
194
194
|
var validVariants = ['h1', 'h2', 'h3', 'h4', 'body', 'body-bold', 'sub-text', 'code'];
|
|
195
195
|
var Typography = function Typography(_ref) {
|
|
196
196
|
var children = _ref.children,
|
|
@@ -200,7 +200,7 @@ var Typography = function Typography(_ref) {
|
|
|
200
200
|
spacing = _ref.spacing,
|
|
201
201
|
_ref$className = _ref.className,
|
|
202
202
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
203
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
203
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
204
204
|
|
|
205
205
|
if (!validVariants.includes(variant)) {
|
|
206
206
|
throw new Error("You entered an invalid variant. You can choose from: " + validVariants + ", you entered: " + variant);
|
|
@@ -247,13 +247,13 @@ var css$E = ".BaseButton_module_button__82869a4f {\n border-width: var(--button
|
|
|
247
247
|
var modules_3484519b = {"button":"BaseButton_module_button__82869a4f"};
|
|
248
248
|
n(css$E,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
249
249
|
|
|
250
|
-
var _excluded$
|
|
250
|
+
var _excluded$F = ["children", "type", "className"];
|
|
251
251
|
var BaseButton = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
252
252
|
var children = _ref.children,
|
|
253
253
|
_ref$type = _ref.type,
|
|
254
254
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
255
255
|
className = _ref.className,
|
|
256
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
256
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
257
257
|
|
|
258
258
|
var validTypes = ['submit', 'button', 'reset'];
|
|
259
259
|
if (!validTypes.includes(type)) throw new Error("You have entered an invalid button type. Expected 'submit', 'button' or 'reset' got " + type);
|
|
@@ -268,7 +268,7 @@ var css$D = ".Button_module_srOnly__896f6f94 {\n position: absolute;\n width:
|
|
|
268
268
|
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"};
|
|
269
269
|
n(css$D,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
270
270
|
|
|
271
|
-
var _excluded$
|
|
271
|
+
var _excluded$E = ["children", "variant", "color", "startIcon", "endIcon"];
|
|
272
272
|
var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
273
273
|
var children = _ref.children,
|
|
274
274
|
_ref$variant = _ref.variant,
|
|
@@ -279,7 +279,7 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
279
279
|
startIcon = _ref$startIcon === void 0 ? false : _ref$startIcon,
|
|
280
280
|
_ref$endIcon = _ref.endIcon,
|
|
281
281
|
endIcon = _ref$endIcon === void 0 ? false : _ref$endIcon,
|
|
282
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
282
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
283
283
|
|
|
284
284
|
var additionalClasses = [];
|
|
285
285
|
|
|
@@ -305,7 +305,7 @@ var css$C = ".Link_module_link__886f6e1b {\n font-family: var(--font-family);\n
|
|
|
305
305
|
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"};
|
|
306
306
|
n(css$C,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
307
307
|
|
|
308
|
-
var _excluded$
|
|
308
|
+
var _excluded$D = ["children", "className", "disabled", "to", "color", "type", "component"];
|
|
309
309
|
var Link = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
310
310
|
var children = _ref.children,
|
|
311
311
|
className = _ref.className,
|
|
@@ -317,7 +317,7 @@ var Link = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref
|
|
|
317
317
|
_ref$type = _ref.type,
|
|
318
318
|
type = _ref$type === void 0 ? 'internal' : _ref$type,
|
|
319
319
|
component = _ref.component,
|
|
320
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
320
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
321
321
|
|
|
322
322
|
var determineTarget = function determineTarget() {
|
|
323
323
|
if (rest.target) {
|
|
@@ -366,7 +366,7 @@ var css$A = ".readyclasses_module_srOnly__d8b3c82a {\n position: absolute;\n w
|
|
|
366
366
|
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"};
|
|
367
367
|
n(css$A,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
368
368
|
|
|
369
|
-
var _excluded$
|
|
369
|
+
var _excluded$C = ["children", "color", "iconSize", "title"];
|
|
370
370
|
var IconButton = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
371
371
|
var children = _ref.children,
|
|
372
372
|
_ref$color = _ref.color,
|
|
@@ -374,12 +374,16 @@ var IconButton = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
374
374
|
_ref$iconSize = _ref.iconSize,
|
|
375
375
|
iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
|
|
376
376
|
title = _ref.title,
|
|
377
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
377
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
378
|
+
|
|
379
|
+
if (!title) {
|
|
380
|
+
console.error("Please make sure to specify a 'title' prop to your IconButton component! ");
|
|
381
|
+
}
|
|
378
382
|
|
|
379
383
|
return React__default["default"].createElement(BaseButton, _extends({}, rest, {
|
|
380
384
|
ref: ref,
|
|
381
385
|
className: modules_f7edfa2f['icon-button'] + " " + modules_f7edfa2f[color] + " " + modules_f7edfa2f['button-' + iconSize]
|
|
382
|
-
}), React__default["default"].createElement(
|
|
386
|
+
}), React__default["default"].createElement(React.Fragment, null, children, React__default["default"].createElement("span", {
|
|
383
387
|
className: modules_35a251a6['sr-only']
|
|
384
388
|
}, title)));
|
|
385
389
|
});
|
|
@@ -388,7 +392,7 @@ var css$z = "@font-face {\n font-family: \"icomoon\";\n src: url(\"data:applic
|
|
|
388
392
|
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"};
|
|
389
393
|
n(css$z,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
390
394
|
|
|
391
|
-
var _excluded$
|
|
395
|
+
var _excluded$B = ["icon", "color", "className", "style", "size", "tag"];
|
|
392
396
|
exports.Icons = void 0;
|
|
393
397
|
|
|
394
398
|
(function (Icons) {
|
|
@@ -464,7 +468,7 @@ var Icon = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref
|
|
|
464
468
|
size = _ref.size,
|
|
465
469
|
_ref$tag = _ref.tag,
|
|
466
470
|
tag = _ref$tag === void 0 ? 'span' : _ref$tag,
|
|
467
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
471
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
468
472
|
|
|
469
473
|
var Component = tag;
|
|
470
474
|
return React__default["default"].createElement(Component, _extends({}, rest, {
|
|
@@ -491,32 +495,9 @@ var descriptionId = function descriptionId(id) {
|
|
|
491
495
|
return id + "-description";
|
|
492
496
|
};
|
|
493
497
|
|
|
494
|
-
var _excluded$
|
|
498
|
+
var _excluded$A = ["id", "children", "open", "onClose", "className", "containerClassName", "labelledby", "describedby", "disableEscapeKeyDown", "disableBackdrop", "zIndex", "domRoot"];
|
|
495
499
|
var SCROLL_PROPERTY_NAME = 'overflow';
|
|
496
500
|
var SCROLL_PROPERTY_VALUE = 'hidden';
|
|
497
|
-
|
|
498
|
-
var useBackdropOnCloseClick = function useBackdropOnCloseClick(disableBackdrop, onClose) {
|
|
499
|
-
var backdropRef = React.useRef(null);
|
|
500
|
-
|
|
501
|
-
var onBackdropClick = function onBackdropClick() {
|
|
502
|
-
return onClose && onClose();
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
React.useEffect(function () {
|
|
506
|
-
var _backdropRef$current;
|
|
507
|
-
|
|
508
|
-
!disableBackdrop && ((_backdropRef$current = backdropRef.current) == null ? void 0 : _backdropRef$current.addEventListener('click', onBackdropClick));
|
|
509
|
-
return function () {
|
|
510
|
-
var _backdropRef$current2;
|
|
511
|
-
|
|
512
|
-
!disableBackdrop && ((_backdropRef$current2 = backdropRef.current) == null ? void 0 : _backdropRef$current2.removeEventListener('click', onBackdropClick));
|
|
513
|
-
};
|
|
514
|
-
}, []);
|
|
515
|
-
return {
|
|
516
|
-
backdropRef: backdropRef
|
|
517
|
-
};
|
|
518
|
-
};
|
|
519
|
-
|
|
520
501
|
var useSetBodyScroll = function useSetBodyScroll(open) {
|
|
521
502
|
var hideBodyScroll = function hideBodyScroll() {
|
|
522
503
|
document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;
|
|
@@ -554,10 +535,9 @@ var BaseModal = function BaseModal(_ref) {
|
|
|
554
535
|
_ref$disableBackdrop = _ref.disableBackdrop,
|
|
555
536
|
disableBackdrop = _ref$disableBackdrop === void 0 ? false : _ref$disableBackdrop,
|
|
556
537
|
zIndex = _ref.zIndex,
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
backdropRef = _useBackdropOnCloseCl.backdropRef;
|
|
538
|
+
_ref$domRoot = _ref.domRoot,
|
|
539
|
+
domRoot = _ref$domRoot === void 0 ? document.body : _ref$domRoot,
|
|
540
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
561
541
|
|
|
562
542
|
useSetBodyScroll(open);
|
|
563
543
|
|
|
@@ -568,7 +548,11 @@ var BaseModal = function BaseModal(_ref) {
|
|
|
568
548
|
}
|
|
569
549
|
};
|
|
570
550
|
|
|
571
|
-
|
|
551
|
+
var handleBackdropClick = function handleBackdropClick() {
|
|
552
|
+
return !disableBackdrop && onClose && onClose();
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
return reactDom.createPortal(React__default["default"].createElement("div", _extends({}, restProps, {
|
|
572
556
|
id: id,
|
|
573
557
|
className: modules_cf1b230e['modal'] + " " + (open && modules_cf1b230e['visible']) + " " + className,
|
|
574
558
|
role: "dialog",
|
|
@@ -583,21 +567,21 @@ var BaseModal = function BaseModal(_ref) {
|
|
|
583
567
|
zIndex: zIndex
|
|
584
568
|
}
|
|
585
569
|
}), React__default["default"].createElement("div", {
|
|
586
|
-
|
|
587
|
-
|
|
570
|
+
className: modules_cf1b230e['backdrop'],
|
|
571
|
+
onClick: handleBackdropClick
|
|
588
572
|
}), open && React__default["default"].createElement("div", {
|
|
589
573
|
style: {
|
|
590
574
|
zIndex: zIndex && zIndex + 1
|
|
591
575
|
},
|
|
592
576
|
className: modules_cf1b230e['container'] + " " + containerClassName
|
|
593
|
-
}, children));
|
|
577
|
+
}, children)), domRoot);
|
|
594
578
|
};
|
|
595
579
|
|
|
596
580
|
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}";
|
|
597
581
|
var modules_cf7b8d60 = {"content":"BaseModalContent_module_content__544cad31"};
|
|
598
582
|
n(css$x,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
599
583
|
|
|
600
|
-
var _excluded$
|
|
584
|
+
var _excluded$z = ["id", "children", "className", "disableAutoFocus"];
|
|
601
585
|
var BaseModalContent = function BaseModalContent(_ref) {
|
|
602
586
|
var id = _ref.id,
|
|
603
587
|
children = _ref.children,
|
|
@@ -605,7 +589,7 @@ var BaseModalContent = function BaseModalContent(_ref) {
|
|
|
605
589
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
606
590
|
_ref$disableAutoFocus = _ref.disableAutoFocus,
|
|
607
591
|
disableAutoFocus = _ref$disableAutoFocus === void 0 ? false : _ref$disableAutoFocus,
|
|
608
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
592
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
609
593
|
|
|
610
594
|
var contentRef = React.useRef(null);
|
|
611
595
|
React.useEffect(function () {
|
|
@@ -627,12 +611,12 @@ var css$w = ".BaseModalActions_module_actions__382b7c32 {\n margin: 1.875rem 1.
|
|
|
627
611
|
var modules_6b4a9db0 = {"actions":"BaseModalActions_module_actions__382b7c32"};
|
|
628
612
|
n(css$w,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
629
613
|
|
|
630
|
-
var _excluded$
|
|
614
|
+
var _excluded$y = ["children", "className"];
|
|
631
615
|
var BaseModalActions = function BaseModalActions(_ref) {
|
|
632
616
|
var children = _ref.children,
|
|
633
617
|
_ref$className = _ref.className,
|
|
634
618
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
635
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
619
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
636
620
|
|
|
637
621
|
return React__default["default"].createElement("footer", _extends({}, restProps, {
|
|
638
622
|
className: modules_6b4a9db0['actions'] + " " + className
|
|
@@ -643,11 +627,11 @@ var css$v = ".DialogActions_module_actions__63872f8a {\n margin: 1.5rem 1.25rem
|
|
|
643
627
|
var modules_d87e2731 = {"actions":"DialogActions_module_actions__63872f8a","left":"DialogActions_module_left__63872f8a"};
|
|
644
628
|
n(css$v,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
645
629
|
|
|
646
|
-
var _excluded$
|
|
630
|
+
var _excluded$x = ["children", "align"];
|
|
647
631
|
var DialogActions = function DialogActions(_ref) {
|
|
648
632
|
var children = _ref.children,
|
|
649
633
|
align = _ref.align,
|
|
650
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
634
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
651
635
|
|
|
652
636
|
return React__default["default"].createElement(BaseModalActions, _extends({}, restProps, {
|
|
653
637
|
className: "" + modules_d87e2731['actions'] + (align === 'left' ? ' ' + modules_d87e2731['left'] : '')
|
|
@@ -665,7 +649,7 @@ n(css$t,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
|
665
649
|
var DialogTitle = function DialogTitle(_ref) {
|
|
666
650
|
var id = _ref.id,
|
|
667
651
|
title = _ref.title;
|
|
668
|
-
return React__default["default"].createElement("
|
|
652
|
+
return React__default["default"].createElement("div", {
|
|
669
653
|
className: modules_ff1bcd77['header']
|
|
670
654
|
}, React__default["default"].createElement(Typography, {
|
|
671
655
|
id: id,
|
|
@@ -675,7 +659,25 @@ var DialogTitle = function DialogTitle(_ref) {
|
|
|
675
659
|
}, title));
|
|
676
660
|
};
|
|
677
661
|
|
|
678
|
-
var
|
|
662
|
+
var generateID = function generateID(length, stringToWeaveIn) {
|
|
663
|
+
if (length === void 0) {
|
|
664
|
+
length = 15;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/** We will make sure to mesh the generate id and name property together to basically create a unique ID */
|
|
668
|
+
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'];
|
|
669
|
+
var id = '';
|
|
670
|
+
/** Generate an id of x characters in length */
|
|
671
|
+
|
|
672
|
+
for (var i = 0; i < length && id.length < length; i++) {
|
|
673
|
+
var stringCharacter = stringToWeaveIn && stringToWeaveIn[i] !== undefined && !/\s/.test(stringToWeaveIn[i]) ? stringToWeaveIn[i] : '';
|
|
674
|
+
id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
return id.slice(0, length);
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
var _excluded$w = ["id", "open", "children", "alignActions", "onClose", "title", "primaryAction", "secondaryAction", "zIndex", "disableEscapeKeyDown"],
|
|
679
681
|
_excluded2 = ["label"],
|
|
680
682
|
_excluded3 = ["label"];
|
|
681
683
|
var Dialog = function Dialog(_ref) {
|
|
@@ -688,7 +690,12 @@ var Dialog = function Dialog(_ref) {
|
|
|
688
690
|
primaryAction = _ref.primaryAction,
|
|
689
691
|
secondaryAction = _ref.secondaryAction,
|
|
690
692
|
zIndex = _ref.zIndex,
|
|
691
|
-
|
|
693
|
+
_ref$disableEscapeKey = _ref.disableEscapeKeyDown,
|
|
694
|
+
disableEscapeKeyDown = _ref$disableEscapeKey === void 0 ? true : _ref$disableEscapeKey,
|
|
695
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
696
|
+
|
|
697
|
+
var _useState = React.useState(id != null ? id : generateID(20)),
|
|
698
|
+
dialogId = _useState[0];
|
|
692
699
|
|
|
693
700
|
var primaryLabel = primaryAction.label,
|
|
694
701
|
restOfPrimaryAction = _objectWithoutPropertiesLoose(primaryAction, _excluded2);
|
|
@@ -715,30 +722,33 @@ var Dialog = function Dialog(_ref) {
|
|
|
715
722
|
};
|
|
716
723
|
|
|
717
724
|
return React__default["default"].createElement(BaseModal, _extends({}, restProps, {
|
|
718
|
-
id:
|
|
725
|
+
id: dialogId,
|
|
719
726
|
className: modules_c8de1793['dialog'],
|
|
720
727
|
containerClassName: modules_c8de1793['container'],
|
|
721
728
|
open: open,
|
|
722
729
|
disableBackdrop: true,
|
|
723
730
|
onClose: onClose,
|
|
724
|
-
zIndex: zIndex
|
|
731
|
+
zIndex: zIndex,
|
|
732
|
+
disableEscapeKeyDown: disableEscapeKeyDown
|
|
725
733
|
}), React__default["default"].createElement(DialogTitle, {
|
|
726
|
-
id: labelId(
|
|
734
|
+
id: labelId(dialogId),
|
|
727
735
|
title: title
|
|
728
736
|
}), React__default["default"].createElement(BaseModalContent, {
|
|
729
|
-
id: descriptionId(
|
|
737
|
+
id: descriptionId(dialogId),
|
|
730
738
|
className: modules_c8de1793['content'],
|
|
731
739
|
disableAutoFocus: true
|
|
732
740
|
}, children), React__default["default"].createElement(DialogActions, {
|
|
733
741
|
align: alignActions
|
|
734
742
|
}, alignActions === 'left' ? [PrimaryButton, TertiaryButton] : [TertiaryButton, PrimaryButton]), React__default["default"].createElement("input", {
|
|
735
743
|
autoFocus: true,
|
|
744
|
+
"aria-hidden": true,
|
|
736
745
|
style: {
|
|
737
746
|
position: 'absolute',
|
|
738
747
|
width: 0,
|
|
739
748
|
height: 0,
|
|
740
749
|
opacity: 0
|
|
741
750
|
},
|
|
751
|
+
maxLength: 0,
|
|
742
752
|
tabIndex: -1,
|
|
743
753
|
onKeyPress: onHiddenInputKeyPress
|
|
744
754
|
}));
|
|
@@ -748,15 +758,15 @@ var css$s = ".BaseModalHeader_module_header__045bdada {\n min-width: 80px;\n p
|
|
|
748
758
|
var modules_74d5dc9f = {"header":"BaseModalHeader_module_header__045bdada","headline":"BaseModalHeader_module_headline__045bdada","title":"BaseModalHeader_module_title__045bdada"};
|
|
749
759
|
n(css$s,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
750
760
|
|
|
751
|
-
var _excluded$
|
|
761
|
+
var _excluded$v = ["id", "title", "children", "onClose"];
|
|
752
762
|
var BaseModalHeader = function BaseModalHeader(_ref) {
|
|
753
763
|
var id = _ref.id,
|
|
754
764
|
title = _ref.title,
|
|
755
765
|
children = _ref.children,
|
|
756
766
|
onClose = _ref.onClose,
|
|
757
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
767
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
758
768
|
|
|
759
|
-
return React__default["default"].createElement("
|
|
769
|
+
return React__default["default"].createElement("div", _extends({}, restProps, {
|
|
760
770
|
className: modules_74d5dc9f['header']
|
|
761
771
|
}), React__default["default"].createElement("div", {
|
|
762
772
|
className: modules_74d5dc9f['headline']
|
|
@@ -774,28 +784,83 @@ var BaseModalHeader = function BaseModalHeader(_ref) {
|
|
|
774
784
|
}))), children);
|
|
775
785
|
};
|
|
776
786
|
|
|
777
|
-
var
|
|
778
|
-
var
|
|
779
|
-
|
|
787
|
+
var _excluded$u = ["open", "onKeepEditing", "onDiscardChanges", "discardChangesButtonLabel", "keepEditingButtonLabel", "contentLabel", "titleLabel"];
|
|
788
|
+
var DiscardChangesDialog = function DiscardChangesDialog(_ref) {
|
|
789
|
+
var open = _ref.open,
|
|
790
|
+
onKeepEditing = _ref.onKeepEditing,
|
|
791
|
+
onDiscardChanges = _ref.onDiscardChanges,
|
|
792
|
+
discardChangesButtonLabel = _ref.discardChangesButtonLabel,
|
|
793
|
+
keepEditingButtonLabel = _ref.keepEditingButtonLabel,
|
|
794
|
+
contentLabel = _ref.contentLabel,
|
|
795
|
+
titleLabel = _ref.titleLabel,
|
|
796
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
780
797
|
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
798
|
+
return React__default["default"].createElement(Dialog, _extends({}, rest, {
|
|
799
|
+
open: open,
|
|
800
|
+
alignActions: "left",
|
|
801
|
+
title: titleLabel,
|
|
802
|
+
onClose: onKeepEditing,
|
|
803
|
+
primaryAction: {
|
|
804
|
+
label: discardChangesButtonLabel,
|
|
805
|
+
onClick: onDiscardChanges
|
|
806
|
+
},
|
|
807
|
+
secondaryAction: {
|
|
808
|
+
label: keepEditingButtonLabel,
|
|
809
|
+
onClick: onKeepEditing
|
|
810
|
+
},
|
|
811
|
+
disableEscapeKeyDown: false
|
|
812
|
+
}), React__default["default"].createElement(Typography, {
|
|
813
|
+
variant: "body",
|
|
814
|
+
spacing: {
|
|
815
|
+
margin: 0
|
|
816
|
+
}
|
|
817
|
+
}, contentLabel));
|
|
818
|
+
};
|
|
785
819
|
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
var id =
|
|
789
|
-
|
|
820
|
+
var _excluded$t = ["id", "onClose", "children", "hasUnsavedChanges", "headerProps", "discardChangedDialogProps"];
|
|
821
|
+
var DiscardChangesModal = function DiscardChangesModal(_ref) {
|
|
822
|
+
var id = _ref.id,
|
|
823
|
+
onClose = _ref.onClose,
|
|
824
|
+
children = _ref.children,
|
|
825
|
+
hasUnsavedChanges = _ref.hasUnsavedChanges,
|
|
826
|
+
headerProps = _ref.headerProps,
|
|
827
|
+
discardChangedDialogProps = _ref.discardChangedDialogProps,
|
|
828
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
790
829
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
}
|
|
830
|
+
var _useState = React.useState(false),
|
|
831
|
+
openDiscardChangesDialog = _useState[0],
|
|
832
|
+
setOpenDiscardChangesDialog = _useState[1];
|
|
795
833
|
|
|
796
|
-
|
|
834
|
+
var onCloseWrapper = function onCloseWrapper() {
|
|
835
|
+
return hasUnsavedChanges() ? setOpenDiscardChangesDialog(true) : onClose();
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
var onDialogKeepEditing = function onDialogKeepEditing() {
|
|
839
|
+
setOpenDiscardChangesDialog(false);
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
var onDialogDiscardChanges = function onDialogDiscardChanges() {
|
|
843
|
+
setOpenDiscardChangesDialog(false);
|
|
844
|
+
onClose();
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
return React__default["default"].createElement(React.Fragment, null, React__default["default"].createElement(BaseModal, _extends({
|
|
848
|
+
id: id,
|
|
849
|
+
onClose: onCloseWrapper
|
|
850
|
+
}, rest), React__default["default"].createElement(BaseModalHeader, _extends({}, headerProps, {
|
|
851
|
+
id: id + "-label",
|
|
852
|
+
onClose: onCloseWrapper
|
|
853
|
+
})), children), React__default["default"].createElement(DiscardChangesDialog, _extends({}, discardChangedDialogProps, {
|
|
854
|
+
open: openDiscardChangesDialog,
|
|
855
|
+
onKeepEditing: onDialogKeepEditing,
|
|
856
|
+
onDiscardChanges: onDialogDiscardChanges
|
|
857
|
+
})));
|
|
797
858
|
};
|
|
798
859
|
|
|
860
|
+
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}";
|
|
861
|
+
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"};
|
|
862
|
+
n(css$r,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
863
|
+
|
|
799
864
|
var defaultConfigObject = {
|
|
800
865
|
relativeElement: undefined,
|
|
801
866
|
elementToBePositioned: undefined,
|
|
@@ -1153,33 +1218,62 @@ var css$q = ".Tiles_module_tiles__08ec2eda {\n display: grid;\n grid-gap: 1rem
|
|
|
1153
1218
|
var modules_7b7db5f7 = {"tiles":"Tiles_module_tiles__08ec2eda"};
|
|
1154
1219
|
n(css$q,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1155
1220
|
|
|
1156
|
-
var css$p = ".
|
|
1157
|
-
var modules_5f01ab30 = {"sr-only":"
|
|
1221
|
+
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}";
|
|
1222
|
+
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"};
|
|
1158
1223
|
n(css$p,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1159
1224
|
|
|
1160
|
-
var _excluded$r = ["title", "imageProps", "
|
|
1225
|
+
var _excluded$r = ["title", "imageProps", "enabled", "className", "loading", "tileAction"];
|
|
1161
1226
|
var Tile = function Tile(_ref) {
|
|
1162
1227
|
var title = _ref.title,
|
|
1163
1228
|
imageProps = _ref.imageProps,
|
|
1164
|
-
|
|
1229
|
+
enabled = _ref.enabled,
|
|
1165
1230
|
className = _ref.className,
|
|
1166
1231
|
loading = _ref.loading,
|
|
1167
|
-
|
|
1232
|
+
tileAction = _ref.tileAction,
|
|
1168
1233
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
1169
1234
|
|
|
1235
|
+
var _useState = React.useState(generateID(20)),
|
|
1236
|
+
tileDescriptionID = _useState[0];
|
|
1237
|
+
|
|
1170
1238
|
if (!title) {
|
|
1171
1239
|
throw new Error('Please make sure to pass a title prop to your Tile component.');
|
|
1172
1240
|
}
|
|
1173
1241
|
|
|
1174
|
-
|
|
1242
|
+
var statusMessage = function statusMessage() {
|
|
1243
|
+
if (enabled) {
|
|
1244
|
+
return 'Status: enabled';
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
return 'Status: disabled';
|
|
1248
|
+
};
|
|
1249
|
+
|
|
1250
|
+
return React__default["default"].createElement("article", _extends({
|
|
1251
|
+
tabIndex: 0,
|
|
1252
|
+
"aria-labelledby": tileDescriptionID
|
|
1253
|
+
}, rest, {
|
|
1175
1254
|
className: modules_5f01ab30['tile'] + " " + (loading ? modules_5f01ab30['loading'] : '')
|
|
1176
|
-
}), React__default["default"].createElement("header",
|
|
1255
|
+
}), React__default["default"].createElement("header", {
|
|
1256
|
+
style: {
|
|
1257
|
+
justifyContent: enabled === undefined ? 'flex-end' : 'space-between'
|
|
1258
|
+
}
|
|
1259
|
+
}, enabled === true && React__default["default"].createElement(Icon, {
|
|
1260
|
+
color: "var(--success)",
|
|
1261
|
+
icon: exports.Icons.Checkmark,
|
|
1177
1262
|
className: modules_5f01ab30['icon'] + " " + (className != null ? className : '')
|
|
1178
|
-
})
|
|
1263
|
+
}), enabled === false && React__default["default"].createElement(Icon, {
|
|
1264
|
+
color: "var(--greyed-out)",
|
|
1265
|
+
icon: exports.Icons.Forbidden,
|
|
1266
|
+
className: modules_5f01ab30['icon'] + " " + (className != null ? className : '')
|
|
1267
|
+
}), enabled !== undefined && React__default["default"].createElement("span", {
|
|
1268
|
+
id: tileDescriptionID,
|
|
1269
|
+
className: modules_35a251a6['sr-only']
|
|
1270
|
+
}, title + ". " + statusMessage()), tileAction != null ? tileAction : null), React__default["default"].createElement("div", {
|
|
1179
1271
|
className: modules_5f01ab30['content']
|
|
1180
|
-
}, imageProps && imageProps.src
|
|
1272
|
+
}, imageProps && imageProps.src.length > 0 && React__default["default"].createElement("figure", {
|
|
1181
1273
|
className: modules_5f01ab30['image']
|
|
1182
|
-
}, !loading && React__default["default"].createElement("img", _extends({}, imageProps
|
|
1274
|
+
}, !loading && React__default["default"].createElement("img", _extends({}, imageProps, {
|
|
1275
|
+
alt: ""
|
|
1276
|
+
}))), (!imageProps || imageProps.src.length === 0) && React__default["default"].createElement(Icon, {
|
|
1183
1277
|
className: modules_5f01ab30['placeholder'],
|
|
1184
1278
|
icon: exports.Icons.Image
|
|
1185
1279
|
}), React__default["default"].createElement("span", {
|
|
@@ -1201,24 +1295,21 @@ var Tiles = function Tiles(_ref) {
|
|
|
1201
1295
|
key: "placeholder1",
|
|
1202
1296
|
title: "placeholder",
|
|
1203
1297
|
imageProps: {
|
|
1204
|
-
src: 'placeholder'
|
|
1205
|
-
alt: 'placeholder'
|
|
1298
|
+
src: 'placeholder'
|
|
1206
1299
|
},
|
|
1207
1300
|
loading: true
|
|
1208
1301
|
}), React__default["default"].createElement(Tile, {
|
|
1209
1302
|
key: "placeholder2",
|
|
1210
1303
|
title: "placeholder",
|
|
1211
1304
|
imageProps: {
|
|
1212
|
-
src: 'placeholder'
|
|
1213
|
-
alt: 'placeholder'
|
|
1305
|
+
src: 'placeholder'
|
|
1214
1306
|
},
|
|
1215
1307
|
loading: true
|
|
1216
1308
|
}), React__default["default"].createElement(Tile, {
|
|
1217
1309
|
key: "placeholder3",
|
|
1218
1310
|
title: "placeholder",
|
|
1219
1311
|
imageProps: {
|
|
1220
|
-
src: 'placeholder'
|
|
1221
|
-
alt: 'placeholder'
|
|
1312
|
+
src: 'placeholder'
|
|
1222
1313
|
},
|
|
1223
1314
|
loading: true
|
|
1224
1315
|
})];
|
|
@@ -1734,19 +1825,19 @@ var Form = function Form(_ref) {
|
|
|
1734
1825
|
}, rest), children);
|
|
1735
1826
|
};
|
|
1736
1827
|
|
|
1737
|
-
var css$h = ".
|
|
1738
|
-
var modules_76ea8ff8 = {"fieldset":"
|
|
1828
|
+
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}";
|
|
1829
|
+
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"};
|
|
1739
1830
|
n(css$h,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1740
1831
|
|
|
1741
|
-
var _excluded$j = ["children", "className", "
|
|
1832
|
+
var _excluded$j = ["children", "className", "legend", "legendStyle", "hideLegend", "noBackground", "background", "noPadding", "disabled", "required", "error"];
|
|
1742
1833
|
var Fieldset = function Fieldset(_ref) {
|
|
1743
1834
|
var children = _ref.children,
|
|
1744
1835
|
className = _ref.className,
|
|
1745
|
-
|
|
1746
|
-
_ref$
|
|
1747
|
-
|
|
1748
|
-
_ref$
|
|
1749
|
-
|
|
1836
|
+
legend = _ref.legend,
|
|
1837
|
+
_ref$legendStyle = _ref.legendStyle,
|
|
1838
|
+
legendStyle = _ref$legendStyle === void 0 ? 'body' : _ref$legendStyle,
|
|
1839
|
+
_ref$hideLegend = _ref.hideLegend,
|
|
1840
|
+
hideLegend = _ref$hideLegend === void 0 ? false : _ref$hideLegend,
|
|
1750
1841
|
noBackground = _ref.noBackground,
|
|
1751
1842
|
_ref$background = _ref.background,
|
|
1752
1843
|
background = _ref$background === void 0 ? noBackground ? '' : '#FFF' : _ref$background,
|
|
@@ -1754,13 +1845,18 @@ var Fieldset = function Fieldset(_ref) {
|
|
|
1754
1845
|
noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
|
|
1755
1846
|
_ref$disabled = _ref.disabled,
|
|
1756
1847
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1848
|
+
_ref$required = _ref.required,
|
|
1849
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
|
1850
|
+
_ref$error = _ref.error,
|
|
1851
|
+
error = _ref$error === void 0 ? false : _ref$error,
|
|
1757
1852
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
1758
1853
|
|
|
1759
1854
|
var renderChildren = function renderChildren() {
|
|
1760
1855
|
if (!children) return;
|
|
1761
1856
|
return React__default["default"].Children.map(children, function (child) {
|
|
1762
1857
|
return React__default["default"].cloneElement(child, {
|
|
1763
|
-
disabled: child.props.disabled !== undefined ? child.props.disabled : disabled
|
|
1858
|
+
disabled: child.props.disabled !== undefined ? child.props.disabled : disabled,
|
|
1859
|
+
error: child.props.error !== undefined ? child.props.error : error
|
|
1764
1860
|
});
|
|
1765
1861
|
});
|
|
1766
1862
|
};
|
|
@@ -1771,24 +1867,25 @@ var Fieldset = function Fieldset(_ref) {
|
|
|
1771
1867
|
backgroundColor: background
|
|
1772
1868
|
}, rest.style),
|
|
1773
1869
|
className: modules_76ea8ff8.fieldset + " " + (noPadding ? modules_76ea8ff8['no-padding'] : '') + " " + (className != null ? className : '')
|
|
1774
|
-
}),
|
|
1870
|
+
}), legend && React__default["default"].createElement("legend", {
|
|
1775
1871
|
className: modules_35a251a6['sr-only']
|
|
1776
|
-
},
|
|
1777
|
-
variant:
|
|
1872
|
+
}, legend), legend && !hideLegend && React__default["default"].createElement(Typography, {
|
|
1873
|
+
variant: legendStyle,
|
|
1778
1874
|
tag: "span",
|
|
1779
1875
|
"aria-hidden": "true",
|
|
1780
|
-
className: modules_76ea8ff8
|
|
1781
|
-
},
|
|
1876
|
+
className: modules_76ea8ff8['legend'] + " " + (required ? modules_76ea8ff8['required'] : '') + " " + (error ? modules_76ea8ff8['error'] : '')
|
|
1877
|
+
}, legend), renderChildren());
|
|
1782
1878
|
};
|
|
1783
1879
|
|
|
1784
1880
|
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}";
|
|
1785
1881
|
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"};
|
|
1786
1882
|
n(css$g,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1787
1883
|
|
|
1788
|
-
var _excluded$i = ["children", "disabled", "className", "grid", "align"];
|
|
1884
|
+
var _excluded$i = ["children", "disabled", "error", "className", "grid", "align"];
|
|
1789
1885
|
var FormControl = function FormControl(_ref) {
|
|
1790
1886
|
var children = _ref.children,
|
|
1791
1887
|
disabled = _ref.disabled,
|
|
1888
|
+
error = _ref.error,
|
|
1792
1889
|
className = _ref.className,
|
|
1793
1890
|
grid = _ref.grid,
|
|
1794
1891
|
_ref$align = _ref.align,
|
|
@@ -1802,7 +1899,8 @@ var FormControl = function FormControl(_ref) {
|
|
|
1802
1899
|
}
|
|
1803
1900
|
|
|
1804
1901
|
var childElement = React__default["default"].cloneElement(child, {
|
|
1805
|
-
disabled: child.props.disabled !== undefined ? child.props.disabled : disabled
|
|
1902
|
+
disabled: child.props.disabled !== undefined ? child.props.disabled : disabled,
|
|
1903
|
+
error: child.props.error !== undefined ? child.props.error : error
|
|
1806
1904
|
});
|
|
1807
1905
|
|
|
1808
1906
|
if (grid && grid > 1) {
|
|
@@ -2366,7 +2464,7 @@ var CheckboxWrapper = function CheckboxWrapper(_ref) {
|
|
|
2366
2464
|
helperId = _useWrapper.helperId;
|
|
2367
2465
|
|
|
2368
2466
|
React.useEffect(function () {
|
|
2369
|
-
if (fieldsetProps.
|
|
2467
|
+
if (fieldsetProps.legend === undefined) {
|
|
2370
2468
|
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\" }})");
|
|
2371
2469
|
}
|
|
2372
2470
|
}, []);
|
|
@@ -2489,7 +2587,7 @@ var RadioWrapper = function RadioWrapper(_ref) {
|
|
|
2489
2587
|
helperId = _useWrapper.helperId;
|
|
2490
2588
|
|
|
2491
2589
|
React.useEffect(function () {
|
|
2492
|
-
if (fieldsetProps.
|
|
2590
|
+
if (fieldsetProps.legend === undefined) {
|
|
2493
2591
|
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\" }})");
|
|
2494
2592
|
}
|
|
2495
2593
|
}, []);
|
|
@@ -2660,8 +2758,8 @@ var TextareaWrapper = function TextareaWrapper(_ref) {
|
|
|
2660
2758
|
})));
|
|
2661
2759
|
};
|
|
2662
2760
|
|
|
2663
|
-
var css$3 = ".
|
|
2664
|
-
var modules_8fc278f9 = {"radio-wrapper":"
|
|
2761
|
+
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}";
|
|
2762
|
+
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"};
|
|
2665
2763
|
n(css$3,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
2666
2764
|
|
|
2667
2765
|
var useFormSelector = function useFormSelector(configObject) {
|
|
@@ -2814,10 +2912,10 @@ var Radio = function Radio(_ref) {
|
|
|
2814
2912
|
id: identifier + "-radio",
|
|
2815
2913
|
type: "radio"
|
|
2816
2914
|
})), checked && React__default["default"].createElement(Icon, {
|
|
2817
|
-
className: modules_8fc278f9
|
|
2915
|
+
className: modules_8fc278f9['input'] + " " + (disabled ? modules_8fc278f9['disabled'] : ''),
|
|
2818
2916
|
icon: exports.Icons.Radio
|
|
2819
2917
|
}), !checked && React__default["default"].createElement(Icon, {
|
|
2820
|
-
className: modules_8fc278f9
|
|
2918
|
+
className: modules_8fc278f9['input'] + " " + (disabled ? modules_8fc278f9['disabled'] : ''),
|
|
2821
2919
|
icon: exports.Icons.Circle
|
|
2822
2920
|
}), React__default["default"].createElement("label", {
|
|
2823
2921
|
onClick: onChangeHandler,
|
|
@@ -2825,8 +2923,8 @@ var Radio = function Radio(_ref) {
|
|
|
2825
2923
|
}, children));
|
|
2826
2924
|
};
|
|
2827
2925
|
|
|
2828
|
-
var css$1 = ".
|
|
2829
|
-
var modules_6238daf1 = {"checkbox-wrapper":"
|
|
2926
|
+
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}";
|
|
2927
|
+
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"};
|
|
2830
2928
|
n(css$1,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
2831
2929
|
|
|
2832
2930
|
var _excluded$2 = ["children", "name", "helperText", "helperProps", "indeterminate", "parentErrorId", "errorMessage", "disabled", "label", "parentHelperId", "className", "error", "checked", "wrapperProps", "onChange"];
|
|
@@ -2899,7 +2997,8 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
2899
2997
|
return React__default["default"].createElement("li", null, React__default["default"].createElement(Checkbox, _extends({}, child.props, {
|
|
2900
2998
|
parentHelperId: parentHelperId,
|
|
2901
2999
|
parentErrorId: parentErrorId,
|
|
2902
|
-
error: error
|
|
3000
|
+
error: error,
|
|
3001
|
+
disabled: disabled ? disabled : child.disabled
|
|
2903
3002
|
}), child.props.children));
|
|
2904
3003
|
}));
|
|
2905
3004
|
};
|
|
@@ -2915,8 +3014,9 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
2915
3014
|
var renderToggle = function renderToggle() {
|
|
2916
3015
|
return React__default["default"].Children.toArray(children).filter(isToggle);
|
|
2917
3016
|
};
|
|
2918
|
-
/** Default return value is the default checkbox */
|
|
2919
3017
|
|
|
3018
|
+
var iconClasses = [modules_6238daf1['input'], disabled ? modules_6238daf1['disabled'] : ''];
|
|
3019
|
+
/** Default return value is the default checkbox */
|
|
2920
3020
|
|
|
2921
3021
|
return React__default["default"].createElement(FormSelectorWrapper, _extends({}, wrapperProps, {
|
|
2922
3022
|
className: modules_6238daf1['checkbox-wrapper'] + " " + (className ? className : ''),
|
|
@@ -2944,13 +3044,13 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
2944
3044
|
name: name,
|
|
2945
3045
|
type: "checkbox"
|
|
2946
3046
|
})), renderToggle(), indeterminate && React__default["default"].createElement(Icon, {
|
|
2947
|
-
className:
|
|
3047
|
+
className: iconClasses.join(' '),
|
|
2948
3048
|
icon: exports.Icons.MinusSquare
|
|
2949
3049
|
}), checked && !indeterminate && React__default["default"].createElement(Icon, {
|
|
2950
|
-
className:
|
|
3050
|
+
className: iconClasses.join(' '),
|
|
2951
3051
|
icon: exports.Icons.CheckmarkSquare
|
|
2952
3052
|
}), !checked && !indeterminate && React__default["default"].createElement(Icon, {
|
|
2953
|
-
className:
|
|
3053
|
+
className: iconClasses.join(' '),
|
|
2954
3054
|
icon: exports.Icons.Square
|
|
2955
3055
|
}), React__default["default"].createElement("label", {
|
|
2956
3056
|
htmlFor: identifier + "-checkbox"
|
|
@@ -2990,7 +3090,7 @@ var BaseWizardSteps = function BaseWizardSteps(_ref) {
|
|
|
2990
3090
|
icon: exports.Icons.Checkmark
|
|
2991
3091
|
});
|
|
2992
3092
|
} else {
|
|
2993
|
-
return React__default["default"].createElement(
|
|
3093
|
+
return React__default["default"].createElement(React.Fragment, null, React__default["default"].createElement("span", {
|
|
2994
3094
|
className: modules_35a251a6['sr-only']
|
|
2995
3095
|
}, stepScreenReaderLabel, " "), stepNumberString);
|
|
2996
3096
|
}
|
|
@@ -3154,7 +3254,7 @@ var WizardActions = function WizardActions(_ref) {
|
|
|
3154
3254
|
onSaveAndClose(currentStepNo);
|
|
3155
3255
|
};
|
|
3156
3256
|
|
|
3157
|
-
return React__default["default"].createElement(
|
|
3257
|
+
return React__default["default"].createElement(React.Fragment, null, React__default["default"].createElement(Button, {
|
|
3158
3258
|
variant: "text",
|
|
3159
3259
|
onClick: onCancel
|
|
3160
3260
|
}, cancelButtonLabel), hasPreviousStep && React__default["default"].createElement(Button, {
|
|
@@ -3220,7 +3320,7 @@ var WizardContent = function WizardContent(_ref) {
|
|
|
3220
3320
|
children = _ref.children;
|
|
3221
3321
|
useSetWizardState(steps, mode, stepScreenReaderLabel);
|
|
3222
3322
|
useStepChanging(onStepChange);
|
|
3223
|
-
return React__default["default"].createElement(
|
|
3323
|
+
return React__default["default"].createElement(React.Fragment, null, children);
|
|
3224
3324
|
};
|
|
3225
3325
|
|
|
3226
3326
|
var Wizard = function Wizard(props) {
|
|
@@ -3248,6 +3348,7 @@ exports.CheckboxWrapper = CheckboxWrapper;
|
|
|
3248
3348
|
exports.ContextMenu = ContextMenu;
|
|
3249
3349
|
exports.ContextMenuItem = ContextMenuItem;
|
|
3250
3350
|
exports.Dialog = Dialog;
|
|
3351
|
+
exports.DiscardChangesModal = DiscardChangesModal;
|
|
3251
3352
|
exports.Fieldset = Fieldset;
|
|
3252
3353
|
exports.Form = Form;
|
|
3253
3354
|
exports.FormControl = FormControl;
|