@digital-ai/dot-components 2.10.1 → 2.11.0
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/CHANGE_LOG.md +57 -13
- package/README.md +0 -1
- package/index.esm.js +129 -93
- package/index.umd.js +151 -113
- package/lib/components/button/IconButton.d.ts +4 -1
- package/lib/components/button/IconButton.stories.d.ts +2 -1
- package/lib/components/dialog/Dialog.d.ts +4 -2
- package/lib/components/dialog/Dialog.stories.d.ts +1 -1
- package/lib/components/popper/Popper.d.ts +16 -1
- package/lib/components/popper/Popper.stories.d.ts +1 -1
- package/lib/components/stepper/Stepper.d.ts +3 -1
- package/lib/components/stepper/Stepper.stories.d.ts +1 -1
- package/lib/components/stepper/Stepper.styles.d.ts +4 -0
- package/lib/components/table/Table.data.d.ts +2 -2
- package/lib/components/typography/Typography.d.ts +1 -1
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -239,6 +239,9 @@
|
|
|
239
239
|
if (ariaRole === 'heading' && !ariaLevel) {
|
|
240
240
|
console.warn('please include ariaLevel when using ariaRole="heading"');
|
|
241
241
|
}
|
|
242
|
+
if (noMarginBottom) {
|
|
243
|
+
console.warn('`noMarginBottom` is deprecated, typography no longer has bottom margin included');
|
|
244
|
+
}
|
|
242
245
|
}, []);
|
|
243
246
|
return jsxRuntime.jsx(material.Typography, __assign({
|
|
244
247
|
"aria-label": ariaLabel,
|
|
@@ -376,7 +379,7 @@
|
|
|
376
379
|
componentId: "sc-1mbn9f0-1"
|
|
377
380
|
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
378
381
|
var theme = _a.theme;
|
|
379
|
-
return styled.css(templateObject_2$14 || (templateObject_2$14 = __makeTemplateObject(["\n &.", " {\n transform: none;\n\n &.Mui-disabled .dot-typography {\n color: rgba(0, 0, 0, 0.38);\n }\n\n &.Mui-error .dot-typography {\n color: ", ";\n }\n\n .dot-typography {\n display: inline;\n }\n }\n "], ["\n &.", " {\n transform: none;\n\n &.Mui-disabled .dot-typography {\n color: rgba(0, 0, 0, 0.38);\n }\n\n &.Mui-error .dot-typography {\n color: ", ";\n }\n\n .dot-typography {\n display: inline;\n }\n }\n "])), labelClassName, theme.palette.error.main);
|
|
382
|
+
return styled.css(templateObject_2$14 || (templateObject_2$14 = __makeTemplateObject(["\n &.", " {\n margin-bottom: ", ";\n transform: none;\n\n &.Mui-disabled .dot-typography {\n color: rgba(0, 0, 0, 0.38);\n }\n\n &.Mui-error .dot-typography {\n color: ", ";\n }\n\n .dot-typography {\n display: inline;\n }\n }\n "], ["\n &.", " {\n margin-bottom: ", ";\n transform: none;\n\n &.Mui-disabled .dot-typography {\n color: rgba(0, 0, 0, 0.38);\n }\n\n &.Mui-error .dot-typography {\n color: ", ";\n }\n\n .dot-typography {\n display: inline;\n }\n }\n "])), labelClassName, theme.spacing(0.5), theme.palette.error.main);
|
|
380
383
|
});
|
|
381
384
|
var StyledTextFieldContainer = styled__default["default"].div.withConfig({
|
|
382
385
|
displayName: "InputFormFieldsstyles__StyledTextFieldContainer",
|
|
@@ -723,42 +726,35 @@
|
|
|
723
726
|
fontFamily: 'LatoBold, sans-serif',
|
|
724
727
|
fontSize: 17,
|
|
725
728
|
lineHeight: '23px',
|
|
726
|
-
letterSpacing: '0.03em'
|
|
727
|
-
marginBottom: 1
|
|
729
|
+
letterSpacing: '0.03em'
|
|
728
730
|
},
|
|
729
731
|
subtitle2: {
|
|
730
732
|
fontFamily: 'LatoBold, sans-serif',
|
|
731
733
|
fontSize: 14,
|
|
732
734
|
lineHeight: '20px',
|
|
733
|
-
letterSpacing: '0.03em'
|
|
734
|
-
marginBottom: 1
|
|
735
|
+
letterSpacing: '0.03em'
|
|
735
736
|
},
|
|
736
737
|
body1: {
|
|
737
738
|
fontSize: 14,
|
|
738
739
|
lineHeight: '20px',
|
|
739
|
-
letterSpacing: '0.03em'
|
|
740
|
-
marginBottom: 4
|
|
740
|
+
letterSpacing: '0.03em'
|
|
741
741
|
},
|
|
742
742
|
body2: {
|
|
743
743
|
fontSize: 12,
|
|
744
744
|
lineHeight: '16px',
|
|
745
|
-
letterSpacing: '0.02em'
|
|
746
|
-
marginBottom: 3
|
|
745
|
+
letterSpacing: '0.02em'
|
|
747
746
|
},
|
|
748
747
|
caption: {
|
|
749
748
|
fontSize: 10,
|
|
750
749
|
fontFamily: 'LatoBold, sans-serif',
|
|
751
|
-
fontWeight: 700,
|
|
752
750
|
lineHeight: '16px',
|
|
753
|
-
letterSpacing: '0.03em'
|
|
754
|
-
marginBottom: 3
|
|
751
|
+
letterSpacing: '0.03em'
|
|
755
752
|
},
|
|
756
753
|
overline: {
|
|
757
754
|
fontSize: 11,
|
|
758
755
|
lineHeight: '14px',
|
|
759
756
|
letterSpacing: '0.05em',
|
|
760
|
-
textTransform: 'uppercase'
|
|
761
|
-
marginBottom: 3
|
|
757
|
+
textTransform: 'uppercase'
|
|
762
758
|
},
|
|
763
759
|
button: {
|
|
764
760
|
fontSize: 14,
|
|
@@ -2064,7 +2060,7 @@
|
|
|
2064
2060
|
displayName: "Linkstyles__StyledLink",
|
|
2065
2061
|
componentId: "sc-1lpmaww-0"
|
|
2066
2062
|
})(templateObject_2$$ || (templateObject_2$$ = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function () {
|
|
2067
|
-
return styled.css(templateObject_1$13 || (templateObject_1$13 = __makeTemplateObject(["\n &.", " {\n cursor: pointer;\n\n &:hover
|
|
2063
|
+
return styled.css(templateObject_1$13 || (templateObject_1$13 = __makeTemplateObject(["\n &.", " {\n cursor: pointer;\n\n &:hover.MuiLink-underlineHover {\n text-decoration: none;\n }\n }\n "], ["\n &.", " {\n cursor: pointer;\n\n &:hover.MuiLink-underlineHover {\n text-decoration: none;\n }\n }\n "])), rootClassName$_);
|
|
2068
2064
|
});
|
|
2069
2065
|
var templateObject_1$13, templateObject_2$$;
|
|
2070
2066
|
|
|
@@ -2087,8 +2083,15 @@
|
|
|
2087
2083
|
tabIndex = _e === void 0 ? 0 : _e,
|
|
2088
2084
|
target = _a.target,
|
|
2089
2085
|
tooltip = _a.tooltip,
|
|
2090
|
-
|
|
2086
|
+
_f = _a.underline,
|
|
2087
|
+
underline = _f === void 0 ? 'always' : _f;
|
|
2091
2088
|
var rootClasses = useStylesWithRootClass(rootClassName$_, className);
|
|
2089
|
+
React.useEffect(function () {
|
|
2090
|
+
// Include a console warning if the link is not a string and no ariaLabel is provided
|
|
2091
|
+
if (!isString$1(children) && !ariaLabel) {
|
|
2092
|
+
console.warn("a11y: Consider adding an 'ariaLabel' to 'DotLink' when used without text");
|
|
2093
|
+
}
|
|
2094
|
+
}, []);
|
|
2092
2095
|
var handleKeyPress = function handleKeyPress(event) {
|
|
2093
2096
|
if (onClick && event.key === 'Enter') {
|
|
2094
2097
|
event.preventDefault();
|
|
@@ -2588,8 +2591,9 @@
|
|
|
2588
2591
|
var StyledIconButton = styled__default["default"](material.IconButton).withConfig({
|
|
2589
2592
|
displayName: "IconButtonstyles__StyledIconButton",
|
|
2590
2593
|
componentId: "eko0kb-0"
|
|
2591
|
-
})(templateObject_2$T || (templateObject_2$T = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function () {
|
|
2592
|
-
|
|
2594
|
+
})(templateObject_2$T || (templateObject_2$T = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
2595
|
+
var theme = _a.theme;
|
|
2596
|
+
return styled.css(templateObject_1$W || (templateObject_1$W = __makeTemplateObject(["\n &.", " {\n font-size: inherit;\n padding: 10px;\n\n &.shape-square {\n border-radius: 4px;\n border: 1px solid ", ";\n padding: ", ";\n }\n\n .dot-icon.MuiIcon-fontSizeSmall {\n padding: 1px;\n }\n\n &.MuiIconButton-sizeSmall {\n padding: 3px;\n }\n\n &.ripple-disabled {\n &:hover, &:active, &:focus {\n background: ", ";\n }\n }\n "], ["\n &.", " {\n font-size: inherit;\n padding: 10px;\n\n &.shape-square {\n border-radius: 4px;\n border: 1px solid ", ";\n padding: ", ";\n }\n\n .dot-icon.MuiIcon-fontSizeSmall {\n padding: 1px;\n }\n\n &.MuiIconButton-sizeSmall {\n padding: 3px;\n }\n\n &.ripple-disabled {\n &:hover, &:active, &:focus {\n background: ", ";\n }\n }\n "])), rootClassName$S, theme.palette.grey[300], theme.spacing(1), hoverGray);
|
|
2593
2597
|
});
|
|
2594
2598
|
var templateObject_1$W, templateObject_2$T;
|
|
2595
2599
|
|
|
@@ -2610,10 +2614,12 @@
|
|
|
2610
2614
|
iconSize = _f === void 0 ? 'small' : _f,
|
|
2611
2615
|
onClick = _a.onClick,
|
|
2612
2616
|
tooltip = _a.tooltip,
|
|
2613
|
-
_g = _a.
|
|
2614
|
-
|
|
2617
|
+
_g = _a.shape,
|
|
2618
|
+
shape = _g === void 0 ? 'circle' : _g,
|
|
2619
|
+
_h = _a.size,
|
|
2620
|
+
size = _h === void 0 ? 'medium' : _h;
|
|
2615
2621
|
var rippleClassName = disableRipple ? 'ripple-disabled' : '';
|
|
2616
|
-
var rootClasses = useStylesWithRootClass(rootClassName$S, rippleClassName, className);
|
|
2622
|
+
var rootClasses = useStylesWithRootClass(rootClassName$S, rippleClassName, "shape-" + shape, className);
|
|
2617
2623
|
return jsxRuntime.jsx(DotTooltip, __assign({
|
|
2618
2624
|
"data-testid": "icon-button-tooltip",
|
|
2619
2625
|
title: tooltip
|
|
@@ -4637,6 +4643,7 @@
|
|
|
4637
4643
|
className: "dot-branding"
|
|
4638
4644
|
}, {
|
|
4639
4645
|
children: [jsxRuntime.jsx(DotLink, __assign({
|
|
4646
|
+
ariaLabel: "Digital.ai Logo",
|
|
4640
4647
|
className: "primary-logo",
|
|
4641
4648
|
"data-testid": "primary-logo",
|
|
4642
4649
|
href: primaryLogoHref
|
|
@@ -4648,6 +4655,7 @@
|
|
|
4648
4655
|
children: jsxRuntime.jsx(ForwardRef, {}, void 0)
|
|
4649
4656
|
}), void 0)
|
|
4650
4657
|
}), void 0), displayAppLogo && jsxRuntime.jsx(DotLink, __assign({
|
|
4658
|
+
ariaLabel: "Application Logo",
|
|
4651
4659
|
href: appLogoHref,
|
|
4652
4660
|
"data-testid": "app-logo"
|
|
4653
4661
|
}, {
|
|
@@ -5239,7 +5247,7 @@
|
|
|
5239
5247
|
componentId: "sc-7cg374-1"
|
|
5240
5248
|
})(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
5241
5249
|
var theme = _a.theme;
|
|
5242
|
-
return styled.css(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n &.", " {\n margin-bottom: 0;\n\n .MuiBreadcrumbs-ol {\n flex-wrap: nowrap;\n }\n .MuiBreadcrumbs-li,\n .separator {\n color: ", ";\n margin: 0;\n white-space: nowrap;\n }\n .separator {\n font-size: 12px;\n width: 20px;\n height: 20px;\n padding: 0;\n\n i {\n line-height: 20px;\n }\n }\n .MuiBreadcrumbs-separator {\n margin: 0;\n }\n .MuiLink-underlineHover {\n cursor: pointer;\n }\n\n .MuiBreadcrumbs-li:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .breadcrumb {\n padding: ", ";\n }\n\n .current-page {\n color: ", ";\n cursor: default;\n }\n }\n "], ["\n &.", " {\n margin-bottom: 0;\n\n .MuiBreadcrumbs-ol {\n flex-wrap: nowrap;\n }\n .MuiBreadcrumbs-li,\n .separator {\n color: ", ";\n margin: 0;\n white-space: nowrap;\n }\n .separator {\n font-size: 12px;\n width: 20px;\n height: 20px;\n padding: 0;\n\n i {\n line-height: 20px;\n }\n }\n .MuiBreadcrumbs-separator {\n margin: 0;\n }\n .MuiLink-underlineHover {\n cursor: pointer;\n }\n\n .MuiBreadcrumbs-li:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .breadcrumb {\n padding: ", ";\n }\n\n .current-page {\n color: ", ";\n cursor: default;\n }\n }\n "])), rootClassName$F, theme.palette.grey[
|
|
5250
|
+
return styled.css(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n &.", " {\n margin-bottom: 0;\n\n .MuiBreadcrumbs-ol {\n flex-wrap: nowrap;\n }\n .MuiBreadcrumbs-li,\n .separator {\n color: ", ";\n margin: 0;\n white-space: nowrap;\n }\n .separator {\n font-size: 12px;\n width: 20px;\n height: 20px;\n padding: 0;\n\n i {\n line-height: 20px;\n }\n }\n .MuiBreadcrumbs-separator {\n margin: 0;\n }\n .MuiLink-underlineHover {\n cursor: pointer;\n }\n\n .MuiBreadcrumbs-li:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .breadcrumb {\n padding: ", ";\n }\n\n .current-page {\n color: ", ";\n cursor: default;\n }\n }\n "], ["\n &.", " {\n margin-bottom: 0;\n\n .MuiBreadcrumbs-ol {\n flex-wrap: nowrap;\n }\n .MuiBreadcrumbs-li,\n .separator {\n color: ", ";\n margin: 0;\n white-space: nowrap;\n }\n .separator {\n font-size: 12px;\n width: 20px;\n height: 20px;\n padding: 0;\n\n i {\n line-height: 20px;\n }\n }\n .MuiBreadcrumbs-separator {\n margin: 0;\n }\n .MuiLink-underlineHover {\n cursor: pointer;\n }\n\n .MuiBreadcrumbs-li:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .breadcrumb {\n padding: ", ";\n }\n\n .current-page {\n color: ", ";\n cursor: default;\n }\n }\n "])), rootClassName$F, theme.palette.grey[700], theme.spacing(0.5, 2), theme.palette.grey[700]);
|
|
5243
5251
|
});
|
|
5244
5252
|
var templateObject_1$I, templateObject_2$F, templateObject_3$9, templateObject_4$7;
|
|
5245
5253
|
|
|
@@ -6047,8 +6055,10 @@
|
|
|
6047
6055
|
closeIconVisible = _a.closeIconVisible,
|
|
6048
6056
|
_c = _a.closeOnClickAway,
|
|
6049
6057
|
closeOnClickAway = _c === void 0 ? true : _c,
|
|
6050
|
-
_d = _a.
|
|
6051
|
-
|
|
6058
|
+
_d = _a.closeOnSubmit,
|
|
6059
|
+
closeOnSubmit = _d === void 0 ? true : _d,
|
|
6060
|
+
_e = _a.hasPrimaryAction,
|
|
6061
|
+
hasPrimaryAction = _e === void 0 ? true : _e,
|
|
6052
6062
|
onCancel = _a.onCancel,
|
|
6053
6063
|
onSubmit = _a.onSubmit,
|
|
6054
6064
|
open = _a.open,
|
|
@@ -6056,9 +6066,9 @@
|
|
|
6056
6066
|
title = _a.title;
|
|
6057
6067
|
var rootClasses = useStylesWithRootClass(rootClassName$x, className);
|
|
6058
6068
|
var cancelClasses = useStylesWithRootClass(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, 'cancel-button');
|
|
6059
|
-
var
|
|
6060
|
-
isOpen =
|
|
6061
|
-
setIsOpen =
|
|
6069
|
+
var _f = React.useState(open),
|
|
6070
|
+
isOpen = _f[0],
|
|
6071
|
+
setIsOpen = _f[1];
|
|
6062
6072
|
React.useEffect(function () {
|
|
6063
6073
|
setIsOpen(open);
|
|
6064
6074
|
}, [open]);
|
|
@@ -6080,7 +6090,7 @@
|
|
|
6080
6090
|
if (onSubmit) {
|
|
6081
6091
|
onSubmit(event);
|
|
6082
6092
|
}
|
|
6083
|
-
handleClose();
|
|
6093
|
+
closeOnSubmit && handleClose();
|
|
6084
6094
|
};
|
|
6085
6095
|
return jsxRuntime.jsxs(StyledDialog, __assign({
|
|
6086
6096
|
"aria-label": ariaLabel,
|
|
@@ -6898,7 +6908,6 @@
|
|
|
6898
6908
|
};
|
|
6899
6909
|
// a11y: role doesn't need to be specified because it is done so automatically by the MUI component
|
|
6900
6910
|
var radioControl = jsxRuntime.jsx(StyledRadioButton, {
|
|
6901
|
-
"aria-checked": checked,
|
|
6902
6911
|
"aria-label": ariaLabel || label,
|
|
6903
6912
|
checked: checked,
|
|
6904
6913
|
classes: {
|
|
@@ -8493,28 +8502,36 @@
|
|
|
8493
8502
|
componentId: "sc-1qka0yq-0"
|
|
8494
8503
|
})(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
8495
8504
|
var theme = _a.theme;
|
|
8496
|
-
return styled.css(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n &.", " {\n display: flex;\n align-items: flex-start;\n padding: 0;\n width: 100%;\n\n &.left {\n flex-direction: row;\n .", " {\n border-left: 1px solid ", ";\n }\n }\n\n &.right {\n flex-direction: row-reverse;\n .", " {\n border-right: 1px solid ", ";\n }\n }\n\n .", " {\n padding: ", ";\n\n &.MuiStepper-horizontal {\n padding: 0;\n display: flex;\n flex-direction: column;\n }\n\n .MuiStep-root {\n width: 315px;\n\n .dot-icon {\n display: flex;\n background: ", ";\n border-radius: 50%;\n color: ", ";\n height: 28px;\n width: 28px;\n }\n\n .dot-typography {\n color: ", ";\n }\n\n .MuiStepContent-root {\n border-left-color: ", ";\n }\n\n &.MuiStep-horizontal {\n padding: ", ";\n\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n .horizontal-step-description {\n color: ", ";\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.completed {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.active {\n background: ", ";\n }\n\n &.error {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.in-progress {\n .dot-avatar i:before {\n color: ", ";\n }\n }\n }\n\n &.MuiStep-vertical {\n &.completed {\n .dot-typography,\n .dot-icon {\n color: ", ";\n }\n }\n\n &.active {\n .dot-icon {\n background: ", ";\n color: ", ";\n }\n .step-label.dot-typography {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &.error {\n .dot-typography {\n color: ", ";\n }\n\n .dot-icon {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n }\n }\n }\n\n &.disabled {\n .dot-icon {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &:last-of-type .MuiStepContent-root {\n border-left-color: transparent;\n }\n }\n }\n\n .", " {\n width: 100%;\n
|
|
8505
|
+
return styled.css(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n &.", " {\n display: flex;\n align-items: flex-start;\n padding: 0;\n width: 100%;\n\n &.left {\n flex-direction: row;\n .", " {\n border-left: 1px solid ", ";\n }\n }\n\n &.right {\n flex-direction: row-reverse;\n .", " {\n border-right: 1px solid ", ";\n }\n }\n\n .", " {\n padding: ", ";\n\n &.MuiStepper-horizontal {\n padding: 0;\n display: flex;\n flex-direction: column;\n }\n\n .MuiStep-root {\n width: 315px;\n\n .dot-icon {\n display: flex;\n background: ", ";\n border-radius: 50%;\n color: ", ";\n height: 28px;\n width: 28px;\n }\n\n .dot-typography {\n color: ", ";\n }\n\n .MuiStepContent-root {\n border-left-color: ", ";\n }\n\n &.MuiStep-horizontal {\n padding: ", ";\n\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n .horizontal-step-description {\n color: ", ";\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.completed {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.active {\n background: ", ";\n }\n\n &.error {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.in-progress {\n .dot-avatar i:before {\n color: ", ";\n }\n }\n }\n\n &.MuiStep-vertical {\n &.completed {\n .dot-typography,\n .dot-icon {\n color: ", ";\n }\n }\n\n &.active {\n .dot-icon {\n background: ", ";\n color: ", ";\n }\n .step-label.dot-typography {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &.error {\n .dot-typography {\n color: ", ";\n }\n\n .dot-icon {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n }\n }\n }\n\n &.disabled {\n .dot-icon {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &:last-of-type .MuiStepContent-root {\n border-left-color: transparent;\n }\n }\n }\n\n .", " {\n width: 100%;\n\n .step-content-container {\n padding: ", ";\n }\n }\n }\n "], ["\n &.", " {\n display: flex;\n align-items: flex-start;\n padding: 0;\n width: 100%;\n\n &.left {\n flex-direction: row;\n .", " {\n border-left: 1px solid ", ";\n }\n }\n\n &.right {\n flex-direction: row-reverse;\n .", " {\n border-right: 1px solid ", ";\n }\n }\n\n .", " {\n padding: ", ";\n\n &.MuiStepper-horizontal {\n padding: 0;\n display: flex;\n flex-direction: column;\n }\n\n .MuiStep-root {\n width: 315px;\n\n .dot-icon {\n display: flex;\n background: ", ";\n border-radius: 50%;\n color: ", ";\n height: 28px;\n width: 28px;\n }\n\n .dot-typography {\n color: ", ";\n }\n\n .MuiStepContent-root {\n border-left-color: ", ";\n }\n\n &.MuiStep-horizontal {\n padding: ", ";\n\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n .horizontal-step-description {\n color: ", ";\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.completed {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.active {\n background: ", ";\n }\n\n &.error {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.in-progress {\n .dot-avatar i:before {\n color: ", ";\n }\n }\n }\n\n &.MuiStep-vertical {\n &.completed {\n .dot-typography,\n .dot-icon {\n color: ", ";\n }\n }\n\n &.active {\n .dot-icon {\n background: ", ";\n color: ", ";\n }\n .step-label.dot-typography {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &.error {\n .dot-typography {\n color: ", ";\n }\n\n .dot-icon {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n }\n }\n }\n\n &.disabled {\n .dot-icon {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &:last-of-type .MuiStepContent-root {\n border-left-color: transparent;\n }\n }\n }\n\n .", " {\n width: 100%;\n\n .step-content-container {\n padding: ", ";\n }\n }\n }\n "])), rootClassName$i, contentClassName, theme.palette.layer.n200, contentClassName, theme.palette.layer.n200, stepListClassName, theme.spacing(3), theme.palette.primary['50'], theme.palette.primary['50'], theme.palette.layer.n300, theme.palette.layer.n300, theme.spacing(1), theme.palette.layer.n300, theme.palette.layer.n100, theme.palette.layer.n500, theme.palette.layer.n400, theme.palette.secondary['500'], theme.palette.secondary['50'], theme.palette.layer['n50'], theme.palette.error['500'], theme.palette.error['50'], theme.palette.primary['400'], theme.palette.layer.n700, theme.palette.primary['400'], theme.palette.layer.n0, theme.palette.primary['500'], theme.palette.layer.n700, theme.palette.error.main, theme.palette.layer.n0, theme.palette.error.main, theme.palette.error.main, theme.palette.primary['50'], theme.palette.layer.n300, contentClassName, theme.spacing(3, 3, 2, 3));
|
|
8506
|
+
});
|
|
8507
|
+
var ScrollbarContainer = styled__default["default"].div.withConfig({
|
|
8508
|
+
displayName: "Stepperstyles__ScrollbarContainer",
|
|
8509
|
+
componentId: "sc-1qka0yq-1"
|
|
8510
|
+
})(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
8511
|
+
_a.theme;
|
|
8512
|
+
var offset = _a.offset;
|
|
8513
|
+
return styled.css(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n height: ", ";\n overflow-y: auto;\n\n &.center-content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n }\n "], ["\n height: ", ";\n overflow-y: auto;\n\n &.center-content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n }\n "])), "calc(100vh - " + offset + "px)");
|
|
8497
8514
|
});
|
|
8498
8515
|
var StepContentWrapper = styled__default["default"].div.withConfig({
|
|
8499
8516
|
displayName: "Stepperstyles__StepContentWrapper",
|
|
8500
|
-
componentId: "sc-1qka0yq-
|
|
8501
|
-
})(
|
|
8517
|
+
componentId: "sc-1qka0yq-2"
|
|
8518
|
+
})(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n flex: 1;\n display: flex;\n justify-content: center;\n"], ["\n flex: 1;\n display: flex;\n justify-content: center;\n"])));
|
|
8502
8519
|
var StepDescription = styled__default["default"](DotTypography).withConfig({
|
|
8503
8520
|
displayName: "Stepperstyles__StepDescription",
|
|
8504
|
-
componentId: "sc-1qka0yq-
|
|
8505
|
-
})(
|
|
8521
|
+
componentId: "sc-1qka0yq-3"
|
|
8522
|
+
})(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
8506
8523
|
var theme = _a.theme;
|
|
8507
|
-
return styled.css(
|
|
8524
|
+
return styled.css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin-bottom: ", ";\n "], ["\n margin-bottom: ", ";\n "])), theme.spacing(6));
|
|
8508
8525
|
});
|
|
8509
8526
|
var StepActionsContainer = styled__default["default"].div.withConfig({
|
|
8510
8527
|
displayName: "Stepperstyles__StepActionsContainer",
|
|
8511
|
-
componentId: "sc-1qka0yq-
|
|
8512
|
-
})(
|
|
8528
|
+
componentId: "sc-1qka0yq-4"
|
|
8529
|
+
})(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
8513
8530
|
var theme = _a.theme,
|
|
8514
8531
|
displayCancelButton = _a.displayCancelButton;
|
|
8515
|
-
return styled.css(
|
|
8532
|
+
return styled.css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n padding: ", ";\n position: sticky;\n position: -webkit-sticky;\n bottom: 0;\n background-color: ", ";\n z-index: 2;\n\n &.with-top-border {\n border-top: 1px solid ", ";\n }\n\n .actions {\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n\n &.center-actions {\n justify-content: center;\n }\n\n .cancel-stepper {\n justify-self: flex-start;\n }\n\n .navigation-buttons {\n justify-self: flex-end;\n }\n }\n "], ["\n padding: ", ";\n position: sticky;\n position: -webkit-sticky;\n bottom: 0;\n background-color: ", ";\n z-index: 2;\n\n &.with-top-border {\n border-top: 1px solid ", ";\n }\n\n .actions {\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n\n &.center-actions {\n justify-content: center;\n }\n\n .cancel-stepper {\n justify-self: flex-start;\n }\n\n .navigation-buttons {\n justify-self: flex-end;\n }\n }\n "])), theme.spacing(2), theme.palette.layer['n0'], theme.palette.layer['n100'], displayCancelButton ? 'space-between' : 'flex-end');
|
|
8516
8533
|
});
|
|
8517
|
-
var templateObject_1$i, templateObject_2$h, templateObject_3$5, templateObject_4$4, templateObject_5$2, templateObject_6, templateObject_7;
|
|
8534
|
+
var templateObject_1$i, templateObject_2$h, templateObject_3$5, templateObject_4$4, templateObject_5$2, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
8518
8535
|
|
|
8519
8536
|
var defaultCellProps = {
|
|
8520
8537
|
center: false,
|
|
@@ -8544,24 +8561,26 @@
|
|
|
8544
8561
|
nextButtonText = _c === void 0 ? 'Next' : _c,
|
|
8545
8562
|
_d = _a.nextStepDisabled,
|
|
8546
8563
|
nextStepDisabled = _d === void 0 ? false : _d,
|
|
8564
|
+
_e = _a.offset,
|
|
8565
|
+
offset = _e === void 0 ? 0 : _e,
|
|
8547
8566
|
onBack = _a.onBack,
|
|
8548
8567
|
onCancel = _a.onCancel,
|
|
8549
8568
|
onSubmit = _a.onSubmit,
|
|
8550
|
-
|
|
8551
|
-
orientation =
|
|
8552
|
-
|
|
8553
|
-
disableUncompletedStepNav =
|
|
8569
|
+
_f = _a.orientation,
|
|
8570
|
+
orientation = _f === void 0 ? 'vertical' : _f,
|
|
8571
|
+
_g = _a.disableUncompletedStepNav,
|
|
8572
|
+
disableUncompletedStepNav = _g === void 0 ? false : _g,
|
|
8554
8573
|
steps = _a.steps,
|
|
8555
|
-
|
|
8556
|
-
stepsPosition =
|
|
8557
|
-
|
|
8558
|
-
submitButtonText =
|
|
8559
|
-
var
|
|
8560
|
-
currentStep =
|
|
8561
|
-
setActiveStep =
|
|
8562
|
-
var
|
|
8563
|
-
isStickyBottom =
|
|
8564
|
-
setIsStickyBottom =
|
|
8574
|
+
_h = _a.stepsPosition,
|
|
8575
|
+
stepsPosition = _h === void 0 ? 'left' : _h,
|
|
8576
|
+
_j = _a.submitButtonText,
|
|
8577
|
+
submitButtonText = _j === void 0 ? 'Complete' : _j;
|
|
8578
|
+
var _k = React.useState(activeStep),
|
|
8579
|
+
currentStep = _k[0],
|
|
8580
|
+
setActiveStep = _k[1];
|
|
8581
|
+
var _l = React.useState(false),
|
|
8582
|
+
isStickyBottom = _l[0],
|
|
8583
|
+
setIsStickyBottom = _l[1];
|
|
8565
8584
|
var actionsRef = React.useRef(null);
|
|
8566
8585
|
var stepperContentRef = React.useRef(null);
|
|
8567
8586
|
var isHorizontal = orientation === 'horizontal';
|
|
@@ -8570,7 +8589,7 @@
|
|
|
8570
8589
|
var displayCancelButton = !!(!displayInitialContent && !displayFinalContent && onCancel);
|
|
8571
8590
|
var isLastStep = currentStep === steps.length && !finalContent || currentStep > steps.length && finalContent;
|
|
8572
8591
|
var rootClasses = useStylesWithRootClass(rootClassName$i, stepsPosition, className);
|
|
8573
|
-
var
|
|
8592
|
+
var centerContentClass = displayInitialContent || displayFinalContent ? 'center-content' : '';
|
|
8574
8593
|
var stickyBottomClasses = useStylesWithRootClass(isStickyBottom ? 'with-top-border' : '');
|
|
8575
8594
|
var actionsClasses = useStylesWithRootClass('actions', displayInitialContent || displayFinalContent ? 'center-actions' : '');
|
|
8576
8595
|
React.useEffect(function () {
|
|
@@ -8671,16 +8690,21 @@
|
|
|
8671
8690
|
};
|
|
8672
8691
|
var renderContent = function renderContent() {
|
|
8673
8692
|
return jsxRuntime.jsxs("div", __assign({
|
|
8674
|
-
className:
|
|
8693
|
+
className: contentClassName,
|
|
8675
8694
|
ref: stepperContentRef
|
|
8676
8695
|
}, {
|
|
8677
|
-
children: [jsxRuntime.jsx(
|
|
8678
|
-
|
|
8696
|
+
children: [jsxRuntime.jsx(ScrollbarContainer, __assign({
|
|
8697
|
+
offset: offset + 81,
|
|
8698
|
+
className: centerContentClass
|
|
8679
8699
|
}, {
|
|
8680
|
-
children: jsxRuntime.jsx(
|
|
8681
|
-
|
|
8700
|
+
children: jsxRuntime.jsx(CssGrid, __assign({
|
|
8701
|
+
className: "step-content-container"
|
|
8682
8702
|
}, {
|
|
8683
|
-
children:
|
|
8703
|
+
children: jsxRuntime.jsx(CssCell, __assign({}, defaultCellProps, {
|
|
8704
|
+
lg: getStepCellSize(currentStep)
|
|
8705
|
+
}, {
|
|
8706
|
+
children: getStepContent(currentStep)
|
|
8707
|
+
}), void 0)
|
|
8684
8708
|
}), void 0)
|
|
8685
8709
|
}), void 0), jsxRuntime.jsx(StepActionsContainer, __assign({
|
|
8686
8710
|
className: stickyBottomClasses,
|
|
@@ -8729,60 +8753,64 @@
|
|
|
8729
8753
|
return jsxRuntime.jsxs(StyledStepper, __assign({
|
|
8730
8754
|
className: rootClasses
|
|
8731
8755
|
}, {
|
|
8732
|
-
children: [jsxRuntime.jsx(
|
|
8733
|
-
|
|
8734
|
-
"aria-label": ariaLabel,
|
|
8735
|
-
className: stepListClassName,
|
|
8736
|
-
"data-testid": dataTestId,
|
|
8737
|
-
orientation: orientation
|
|
8756
|
+
children: [jsxRuntime.jsx(ScrollbarContainer, __assign({
|
|
8757
|
+
offset: offset
|
|
8738
8758
|
}, {
|
|
8739
|
-
children:
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
}
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8759
|
+
children: jsxRuntime.jsx(material.Stepper, __assign({
|
|
8760
|
+
activeStep: currentStep,
|
|
8761
|
+
"aria-label": ariaLabel,
|
|
8762
|
+
className: stepListClassName,
|
|
8763
|
+
"data-testid": dataTestId,
|
|
8764
|
+
orientation: orientation
|
|
8765
|
+
}, {
|
|
8766
|
+
children: steps.map(function (step, index) {
|
|
8767
|
+
var isActive = currentStep === step.id;
|
|
8768
|
+
// TODO: use useStylesWithRootClass here
|
|
8769
|
+
var stepClasses = function stepClasses() {
|
|
8770
|
+
return [step.className, isActive ? 'active' : '', step.completed ? 'completed' : '', step.disabled ? 'disabled' : '', step.error ? 'error' : '', step.inProgress ? 'in-progress' : ''].concat().join(' ').trim();
|
|
8771
|
+
};
|
|
8772
|
+
var getContent = function getContent() {
|
|
8773
|
+
return isString$1(step.description) ? jsxRuntime.jsx(StepDescription, __assign({
|
|
8774
|
+
variant: "body2"
|
|
8775
|
+
}, {
|
|
8776
|
+
children: step.description
|
|
8777
|
+
}), void 0) : step.description;
|
|
8778
|
+
};
|
|
8779
|
+
var getHorizontalDescription = function getHorizontalDescription() {
|
|
8780
|
+
return isString$1(step.description) ? jsxRuntime.jsx(DotTypography, __assign({
|
|
8781
|
+
variant: "body2",
|
|
8782
|
+
className: "horizontal-step-description"
|
|
8783
|
+
}, {
|
|
8784
|
+
children: step.description
|
|
8785
|
+
}), void 0) : null;
|
|
8786
|
+
};
|
|
8787
|
+
return jsxRuntime.jsxs(material.Step, __assign({
|
|
8788
|
+
active: isActive,
|
|
8789
|
+
classes: {
|
|
8790
|
+
root: stepClasses()
|
|
8791
|
+
},
|
|
8792
|
+
completed: step.completed,
|
|
8793
|
+
disabled: step.disabled,
|
|
8794
|
+
expanded: true
|
|
8774
8795
|
}, {
|
|
8775
|
-
children: [jsxRuntime.
|
|
8776
|
-
|
|
8777
|
-
|
|
8796
|
+
children: [jsxRuntime.jsxs(material.StepLabel, __assign({
|
|
8797
|
+
icon: getStepIcon(step.iconId, step.completed, step.error),
|
|
8798
|
+
onClick: function () {
|
|
8799
|
+
return navigateToStep(step.id);
|
|
8800
|
+
}
|
|
8778
8801
|
}, {
|
|
8779
|
-
children:
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8802
|
+
children: [jsxRuntime.jsx(DotTypography, __assign({
|
|
8803
|
+
className: "step-label",
|
|
8804
|
+
variant: isHorizontal ? 'body1' : 'subtitle1'
|
|
8805
|
+
}, {
|
|
8806
|
+
children: step.label
|
|
8807
|
+
}), void 0), orientation === 'horizontal' && getHorizontalDescription()]
|
|
8808
|
+
}), void 0), orientation === 'vertical' && jsxRuntime.jsx(material.StepContent, {
|
|
8809
|
+
children: getContent()
|
|
8810
|
+
}, void 0)]
|
|
8811
|
+
}), index);
|
|
8812
|
+
})
|
|
8813
|
+
}), void 0)
|
|
8786
8814
|
}), void 0), jsxRuntime.jsx(StepContentWrapper, {
|
|
8787
8815
|
children: renderContent()
|
|
8788
8816
|
}, void 0)]
|
|
@@ -8995,13 +9023,16 @@
|
|
|
8995
9023
|
},
|
|
8996
9024
|
size: "small"
|
|
8997
9025
|
}, void 0) : value.map(function (item, index) {
|
|
9026
|
+
if (item.onclick) {
|
|
9027
|
+
console.warn('The onclick property is deprecated, please use onClick instead');
|
|
9028
|
+
}
|
|
8998
9029
|
return jsxRuntime.jsx(DotIconButton, {
|
|
8999
9030
|
className: "dot-table-action-icon",
|
|
9000
9031
|
"data-testid": item.dataTestId,
|
|
9001
9032
|
disabled: item.disabled,
|
|
9002
9033
|
iconId: item.iconId,
|
|
9003
9034
|
iconSize: "small",
|
|
9004
|
-
onClick: item.onclick,
|
|
9035
|
+
onClick: item.onClick || item.onclick,
|
|
9005
9036
|
size: "small",
|
|
9006
9037
|
tooltip: item.tooltip
|
|
9007
9038
|
}, cellKey + "-icon-" + index);
|
|
@@ -10210,7 +10241,7 @@
|
|
|
10210
10241
|
var _f = reactDropzone.useDropzone({
|
|
10211
10242
|
accept: accept,
|
|
10212
10243
|
disabled: isUploadDisabled,
|
|
10213
|
-
maxSize: maxSize *
|
|
10244
|
+
maxSize: maxSize * 1024 * 1024,
|
|
10214
10245
|
multiple: allowMultiple,
|
|
10215
10246
|
noClick: true,
|
|
10216
10247
|
onDragEnter: onDragEnter,
|
|
@@ -10294,6 +10325,7 @@
|
|
|
10294
10325
|
className = _a.className,
|
|
10295
10326
|
dataTestId = _a["data-testid"],
|
|
10296
10327
|
disablePortal = _a.disablePortal,
|
|
10328
|
+
modifiers = _a.modifiers,
|
|
10297
10329
|
onClickAway = _a.onClickAway,
|
|
10298
10330
|
open = _a.open,
|
|
10299
10331
|
placement = _a.placement;
|
|
@@ -10310,6 +10342,7 @@
|
|
|
10310
10342
|
className: rootClasses,
|
|
10311
10343
|
"data-testid": dataTestId,
|
|
10312
10344
|
disablePortal: disablePortal,
|
|
10345
|
+
modifiers: modifiers,
|
|
10313
10346
|
open: open,
|
|
10314
10347
|
placement: placement,
|
|
10315
10348
|
role: "presentation",
|
|
@@ -10467,6 +10500,11 @@
|
|
|
10467
10500
|
_b = _a.variant,
|
|
10468
10501
|
variant = _b === void 0 ? 'indeterminate' : _b;
|
|
10469
10502
|
var rootClasses = useStylesWithRootClass(rootClassName$2, className);
|
|
10503
|
+
React.useEffect(function () {
|
|
10504
|
+
if (!ariaLabel) {
|
|
10505
|
+
console.warn('a11y: DotLinearProgress must have an ariaLabel to describe the progress bar');
|
|
10506
|
+
}
|
|
10507
|
+
}, []);
|
|
10470
10508
|
return jsxRuntime.jsx(StyledLinearProgress, {
|
|
10471
10509
|
"aria-label": ariaLabel,
|
|
10472
10510
|
classes: {
|
|
@@ -3,6 +3,7 @@ import { CommonProps } from '../CommonProps';
|
|
|
3
3
|
import { IconFontSize } from '../icon/Icon';
|
|
4
4
|
export declare type IconButtonColor = 'default' | 'inherit' | 'primary' | 'secondary';
|
|
5
5
|
export declare type IconButtonSize = 'small' | 'medium';
|
|
6
|
+
export declare type IconButtonShape = 'circle' | 'square';
|
|
6
7
|
export interface IconButtonProps extends CommonProps {
|
|
7
8
|
/** 'default', 'inherit', 'primary', 'secondary' */
|
|
8
9
|
color?: IconButtonColor;
|
|
@@ -16,9 +17,11 @@ export interface IconButtonProps extends CommonProps {
|
|
|
16
17
|
iconSize?: IconFontSize;
|
|
17
18
|
/** Event callback */
|
|
18
19
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
20
|
+
/** Controls the shape of icon, can be 'circle' or 'square' */
|
|
21
|
+
shape?: IconButtonShape;
|
|
19
22
|
/** Determines the size of the button and padding around the icon */
|
|
20
23
|
size?: IconButtonSize;
|
|
21
24
|
/** Help text to be displayed on icon hover */
|
|
22
25
|
tooltip?: string;
|
|
23
26
|
}
|
|
24
|
-
export declare const DotIconButton: ({ ariaLabel, ariaRole, className, color, "data-testid": dataTestId, disabled, disableRipple, iconId, iconSize, onClick, tooltip, size, }: IconButtonProps) => JSX.Element;
|
|
27
|
+
export declare const DotIconButton: ({ ariaLabel, ariaRole, className, color, "data-testid": dataTestId, disabled, disableRipple, iconId, iconSize, onClick, tooltip, shape, size, }: IconButtonProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta } from '@storybook/react';
|
|
2
2
|
import { IconButtonProps } from './IconButton';
|
|
3
|
-
declare const _default: ComponentMeta<({ ariaLabel, ariaRole, className, color, "data-testid": dataTestId, disabled, disableRipple, iconId, iconSize, onClick, tooltip, size, }: IconButtonProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ariaLabel, ariaRole, className, color, "data-testid": dataTestId, disabled, disableRipple, iconId, iconSize, onClick, tooltip, shape, size, }: IconButtonProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: any;
|
|
6
6
|
export declare const WithPrimaryColor: any;
|
|
@@ -8,3 +8,4 @@ export declare const WithSecondaryColor: any;
|
|
|
8
8
|
export declare const WithSmallSize: any;
|
|
9
9
|
export declare const WithDisabledState: any;
|
|
10
10
|
export declare const WithDisabledRipple: any;
|
|
11
|
+
export declare const WithSquare: any;
|
|
@@ -22,8 +22,10 @@ export interface DialogProps extends CommonProps {
|
|
|
22
22
|
children?: ReactNode;
|
|
23
23
|
/** boolean that toggles visibility of close icon on top right of dialog header*/
|
|
24
24
|
closeIconVisible?: boolean;
|
|
25
|
-
/** boolean if true then the dialog will
|
|
25
|
+
/** boolean if true then the dialog will close*/
|
|
26
26
|
closeOnClickAway?: boolean;
|
|
27
|
+
/** boolean if true then the dialog will be closed on submit **/
|
|
28
|
+
closeOnSubmit?: boolean;
|
|
27
29
|
/** boolean that toggles existence of primary action button */
|
|
28
30
|
hasPrimaryAction?: boolean;
|
|
29
31
|
/** The callback to be executed when the action is cancelled */
|
|
@@ -37,4 +39,4 @@ export interface DialogProps extends CommonProps {
|
|
|
37
39
|
/** dialog heading */
|
|
38
40
|
title: ReactNode;
|
|
39
41
|
}
|
|
40
|
-
export declare const DotDialog: ({ ariaLabel, cancelButtonProps, cancelButtonVisible, className, "data-testid": dataTestId, children, closeIconVisible, closeOnClickAway, hasPrimaryAction, onCancel, onSubmit, open, submitButtonProps, title, }: DialogProps) => JSX.Element;
|
|
42
|
+
export declare const DotDialog: ({ ariaLabel, cancelButtonProps, cancelButtonVisible, className, "data-testid": dataTestId, children, closeIconVisible, closeOnClickAway, closeOnSubmit, hasPrimaryAction, onCancel, onSubmit, open, submitButtonProps, title, }: DialogProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Story, ComponentMeta } from '@storybook/react';
|
|
2
2
|
import { DialogProps } from './Dialog';
|
|
3
|
-
declare const _default: ComponentMeta<({ ariaLabel, cancelButtonProps, cancelButtonVisible, className, "data-testid": dataTestId, children, closeIconVisible, closeOnClickAway, hasPrimaryAction, onCancel, onSubmit, open, submitButtonProps, title, }: DialogProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ariaLabel, cancelButtonProps, cancelButtonVisible, className, "data-testid": dataTestId, children, closeIconVisible, closeOnClickAway, closeOnSubmit, hasPrimaryAction, onCancel, onSubmit, open, submitButtonProps, title, }: DialogProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: Story<DialogProps>;
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { PopperPlacementType } from '@mui/material';
|
|
3
3
|
import { CommonProps } from '../CommonProps';
|
|
4
|
+
declare type ModifiersPhase = 'afterMain' | 'afterRead' | 'afterWrite' | 'beforeMain' | 'beforeRead' | 'beforeWrite' | 'main' | 'read' | 'write';
|
|
5
|
+
export interface ModifersProps {
|
|
6
|
+
data?: Record<string, unknown>;
|
|
7
|
+
effect?: () => void;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
fn?: () => void;
|
|
10
|
+
name?: string;
|
|
11
|
+
options?: Record<string, unknown>;
|
|
12
|
+
phase?: ModifiersPhase;
|
|
13
|
+
requires?: Array<string>;
|
|
14
|
+
requiresIfExists?: Array<string>;
|
|
15
|
+
}
|
|
4
16
|
export interface PopperProps extends CommonProps {
|
|
5
17
|
/** Element that popper is attached to */
|
|
6
18
|
anchorEl?: Element;
|
|
@@ -8,6 +20,8 @@ export interface PopperProps extends CommonProps {
|
|
|
8
20
|
children: ReactNode;
|
|
9
21
|
/** Disable the portal behavior. If `true`, children stay within parent DOM hierarchy. */
|
|
10
22
|
disablePortal?: boolean;
|
|
23
|
+
/** Used to specify the position more indepth, https://popper.js.org/docs/v2/modifiers/ */
|
|
24
|
+
modifiers?: ModifersProps[];
|
|
11
25
|
/** Event callback when leaving popper by clicking away */
|
|
12
26
|
onClickAway?: (event: KeyboardEvent | MouseEvent<Document>) => void;
|
|
13
27
|
/** If `true`, the popper is visible. */
|
|
@@ -15,4 +29,5 @@ export interface PopperProps extends CommonProps {
|
|
|
15
29
|
/** Popper placement. */
|
|
16
30
|
placement?: PopperPlacementType;
|
|
17
31
|
}
|
|
18
|
-
export declare const DotPopper: ({ ariaLabel, anchorEl, children, className, "data-testid": dataTestId, disablePortal, onClickAway, open, placement, }: PopperProps) => JSX.Element;
|
|
32
|
+
export declare const DotPopper: ({ ariaLabel, anchorEl, children, className, "data-testid": dataTestId, disablePortal, modifiers, onClickAway, open, placement, }: PopperProps) => JSX.Element;
|
|
33
|
+
export {};
|