@digital-ai/dot-components 1.21.1 → 1.21.3
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 +53 -0
- package/index.esm.js +139 -77
- package/index.umd.js +190 -104
- package/lib/components/app-toolbar/AppToolbar.d.ts +6 -2
- package/lib/components/app-toolbar/AppToolbar.data.d.ts +8 -0
- package/lib/components/auto-complete/AutoComplete.d.ts +3 -1
- package/lib/components/file-upload/FileListItem.d.ts +4 -2
- package/lib/components/file-upload/FileUpload.stories.data.d.ts +3 -2
- package/lib/components/file-upload/utils/helpers.d.ts +2 -1
- package/lib/components/inline-edit/InlineEdit.d.ts +3 -1
- package/lib/components/input-form-fields/InputLabel.d.ts +3 -2
- package/package.json +1 -1
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.21.3](https://github.com/digital-ai/dot-components/tree/1.21.3) (09/28/2022)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/digital-ai/dot-components/compare/2.0.0-rc.2...1.21.3)
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- Helper text for InputSelect and AutoComplete components should be aligned with their content [\#1264](https://github.com/digital-ai/dot-components/issues/1264)
|
|
10
|
+
- Toggle button should have the same height as the input field [\#1260](https://github.com/digital-ai/dot-components/issues/1260)
|
|
11
|
+
- Align helper text with the content of the input [\#1259](https://github.com/digital-ai/dot-components/issues/1259)
|
|
12
|
+
- S-87726 Align input content with helper text [\#1265](https://github.com/digital-ai/dot-components/pull/1265) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
13
|
+
- S-87620 Adjust height for inputs and for medium sized buttons [\#1263](https://github.com/digital-ai/dot-components/pull/1263) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
14
|
+
- S-87616 Adjust left margin for helper text [\#1262](https://github.com/digital-ai/dot-components/pull/1262) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
15
|
+
- S-87599: `DotAutocomplete` Add optional `persistentLabel` prop [\#1258](https://github.com/digital-ai/dot-components/pull/1258) ([dmiletic85](https://github.com/dmiletic85))
|
|
16
|
+
|
|
17
|
+
**Fixed bugs:**
|
|
18
|
+
|
|
19
|
+
- DotSideBar sub-menu doesnt close unless clicked on the menu again [\#1158](https://github.com/digital-ai/dot-components/issues/1158)
|
|
20
|
+
- S-85900: Optional behavior for app toolbar click away to close main menu [\#1256](https://github.com/digital-ai/dot-components/pull/1256) ([ray-jonathan](https://github.com/ray-jonathan))
|
|
21
|
+
|
|
22
|
+
## [2.0.0-rc.2](https://github.com/digital-ai/dot-components/tree/2.0.0-rc.2) (09/15/2022)
|
|
23
|
+
|
|
24
|
+
[Full Changelog](https://github.com/digital-ai/dot-components/compare/1.21.2...2.0.0-rc.2)
|
|
25
|
+
|
|
26
|
+
## [1.21.2](https://github.com/digital-ai/dot-components/tree/1.21.2) (09/09/2022)
|
|
27
|
+
|
|
28
|
+
[Full Changelog](https://github.com/digital-ai/dot-components/compare/2.0.0-rc.1...1.21.2)
|
|
29
|
+
|
|
30
|
+
**Features:**
|
|
31
|
+
|
|
32
|
+
- Add focus state for Inline Edit component [\#1253](https://github.com/digital-ai/dot-components/issues/1253)
|
|
33
|
+
- Support React 18 [\#1173](https://github.com/digital-ai/dot-components/issues/1173)
|
|
34
|
+
- S-87316 Add focus state for Inline Edit [\#1255](https://github.com/digital-ai/dot-components/pull/1255) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
35
|
+
|
|
36
|
+
**Fixed bugs:**
|
|
37
|
+
|
|
38
|
+
- Use of `release-2.0` branch causes `Typography` to use default styling [\#1151](https://github.com/digital-ai/dot-components/issues/1151)
|
|
39
|
+
- D-22241: `DotFileListItem`: fix focus states and expose `onKeyPress` [\#1254](https://github.com/digital-ai/dot-components/pull/1254) ([dmiletic85](https://github.com/dmiletic85))
|
|
40
|
+
|
|
41
|
+
## [2.0.0-rc.1](https://github.com/digital-ai/dot-components/tree/2.0.0-rc.1) (08/31/2022)
|
|
42
|
+
|
|
43
|
+
[Full Changelog](https://github.com/digital-ai/dot-components/compare/1.21.1...2.0.0-rc.1)
|
|
44
|
+
|
|
45
|
+
**Fixed bugs:**
|
|
46
|
+
|
|
47
|
+
- S-86692: component cleanup [\#1238](https://github.com/digital-ai/dot-components/pull/1238) ([CWSites](https://github.com/CWSites))
|
|
48
|
+
- S-84151: fix e2e tests for Release 2.0 [\#1146](https://github.com/digital-ai/dot-components/pull/1146) ([CWSites](https://github.com/CWSites))
|
|
49
|
+
|
|
50
|
+
**Merged pull requests:**
|
|
51
|
+
|
|
52
|
+
- Release Candidate Workflow [\#1251](https://github.com/digital-ai/dot-components/pull/1251) ([CWSites](https://github.com/CWSites))
|
|
53
|
+
- S-85001: add support for react 18 [\#1244](https://github.com/digital-ai/dot-components/pull/1244) ([CWSites](https://github.com/CWSites))
|
|
54
|
+
- S-86694: Extract agility theme [\#1242](https://github.com/digital-ai/dot-components/pull/1242) ([CWSites](https://github.com/CWSites))
|
|
55
|
+
|
|
3
56
|
## [1.21.1](https://github.com/digital-ai/dot-components/tree/1.21.1) (08/31/2022)
|
|
4
57
|
|
|
5
58
|
[Full Changelog](https://github.com/digital-ai/dot-components/compare/1.21.0...1.21.1)
|
package/index.esm.js
CHANGED
|
@@ -83,7 +83,8 @@ const DotIcon = ({
|
|
|
83
83
|
fontSize: _fontSize === 'small' ? _fontSize : 'medium'
|
|
84
84
|
}, {
|
|
85
85
|
children: jsx("i", {
|
|
86
|
-
className: `icon-${iconId} dot-i
|
|
86
|
+
className: `icon-${iconId} dot-i`,
|
|
87
|
+
"data-testid": dataTestId && `${dataTestId}-i`
|
|
87
88
|
}, void 0)
|
|
88
89
|
}), void 0)
|
|
89
90
|
}), void 0);
|
|
@@ -2680,11 +2681,11 @@ const StyledAppToolbar = styled.header.withConfig({
|
|
|
2680
2681
|
}) => css(["&.", "{align-items:center;background:", ";border-bottom:4px solid ", ";box-sizing:border-box;color:", ";display:flex;height:64px;padding:", ";position:fixed;width:100%;z-index:", ";top:0;left:0;right:0;&.without-menu-icon{padding-left:", "px;}&.", "{height:48px;}.dot-main-menu-btn,.dot-right-side{.dot-icon-btn{border:", ";color:", ";&:hover,&:active,&:focus{background:", ";}}}.dot-main-menu-btn{text-align:center;}.dot-branding{align-items:center;display:flex;padding:", ";.primary-logo,.app-logo{margin-right:", "px;}.primary-logo,.dot-app-logo{display:flex;max-width:200px;svg,img{max-height:36px;max-width:200px;}}a{line-height:0;}.dot-product-name{color:", ";font-size:18px;margin:", ";}.divider{margin-left:", "px;}}div.dot-right-side{display:flex;flex-grow:2;justify-content:flex-end;.dot-badge .MuiBadge-anchorOriginTopRightRectangle{top:", "px;right:", "px;}}.avatar-wrapper{display:flex;align-items:center;justify-content:center;width:40px;button.dot-avatar:focus-visible{box-shadow:0px 0px 0px 3px ", ",0px 0px 0px 5px ", ";}}}"], rootClassName$I, theme.palette.product === 'agility' ? theme.palette.agilityInterface.headerBg : theme.palette.grey[700], theme.palette.grey[100], theme.palette.grey[0], theme.spacing(1.5, 2, 1.5, 1), levelFourth, theme.spacing(1.5), denseClassName, theme.palette.product === 'agility' && 'none', theme.palette.grey[100], theme.palette.product === 'agility' && theme.palette.agilityInterface.topBarIconHoverBg, theme.spacing(0, 4, 0, 0.75), theme.spacing(1.5), theme.palette.grey[100], theme.spacing(0, 1.5), theme.spacing(2), theme.spacing(1.5), theme.spacing(1.5), theme.palette.layer.n900, theme.palette.layer.n0));
|
|
2681
2682
|
|
|
2682
2683
|
const DotAppToolbar = ({
|
|
2683
|
-
|
|
2684
|
+
ariaLabel,
|
|
2684
2685
|
appLogo,
|
|
2685
2686
|
appLogoHref: _appLogoHref = '/',
|
|
2686
2687
|
appLogoSmall,
|
|
2687
|
-
|
|
2688
|
+
appName,
|
|
2688
2689
|
avatar,
|
|
2689
2690
|
borderColor,
|
|
2690
2691
|
children,
|
|
@@ -2693,10 +2694,12 @@ const DotAppToolbar = ({
|
|
|
2693
2694
|
customLogo,
|
|
2694
2695
|
'data-testid': dataTestId,
|
|
2695
2696
|
dense: _dense = true,
|
|
2696
|
-
navItems: _navItems = [],
|
|
2697
2697
|
mainMenu,
|
|
2698
2698
|
mainMenuItems,
|
|
2699
2699
|
mainMenuWidth: _mainMenuWidth = 240,
|
|
2700
|
+
menuCloseOnClickAway: _menuCloseOnClickAway = false,
|
|
2701
|
+
navItems: _navItems = [],
|
|
2702
|
+
onClickAway,
|
|
2700
2703
|
primaryLogoHref: _primaryLogoHref = '/'
|
|
2701
2704
|
}) => {
|
|
2702
2705
|
const [menuOpen, updateMenuOpen] = useState(false);
|
|
@@ -2756,7 +2759,7 @@ const DotAppToolbar = ({
|
|
|
2756
2759
|
}), index);
|
|
2757
2760
|
});
|
|
2758
2761
|
|
|
2759
|
-
|
|
2762
|
+
const appToolbar = jsxs(StyledAppToolbar, Object.assign({
|
|
2760
2763
|
"aria-label": ariaLabel,
|
|
2761
2764
|
className: rootClasses,
|
|
2762
2765
|
"data-testid": dataTestId,
|
|
@@ -2842,6 +2845,21 @@ const DotAppToolbar = ({
|
|
|
2842
2845
|
}), void 0)]
|
|
2843
2846
|
}), void 0)]
|
|
2844
2847
|
}), void 0);
|
|
2848
|
+
|
|
2849
|
+
const handleClickAway = event => {
|
|
2850
|
+
if (_menuCloseOnClickAway && onClickAway) {
|
|
2851
|
+
updateMenuOpen(false);
|
|
2852
|
+
onClickAway(event);
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
|
|
2856
|
+
return _menuCloseOnClickAway ? jsx(ClickAwayListener, Object.assign({
|
|
2857
|
+
onClickAway: handleClickAway
|
|
2858
|
+
}, {
|
|
2859
|
+
children: jsx("div", {
|
|
2860
|
+
children: appToolbar
|
|
2861
|
+
}, void 0)
|
|
2862
|
+
}), void 0) : appToolbar;
|
|
2845
2863
|
};
|
|
2846
2864
|
|
|
2847
2865
|
const rootClassName$H = 'dot-autocomplete';
|
|
@@ -2852,7 +2870,7 @@ const StyledAutocomplete = styled(Autocomplete).withConfig({
|
|
|
2852
2870
|
componentId: "j2sgjy-0"
|
|
2853
2871
|
})(["", ""], ({
|
|
2854
2872
|
theme
|
|
2855
|
-
}) => css(["&.", "{.", "
|
|
2873
|
+
}) => css(["&.", "{.", "{padding-top:", ";padding-bottom:", ";}.dot-chip:first-child{margin-left:", ";}.dot-text-field{.MuiOutlinedInput-inputMarginDense{height:31px;}.warning-icon{color:", ";}.error-icon{color:", ";}}}"], rootClassName$H, inputRootClassName, theme.spacing(0), theme.spacing(0), theme.spacing(0), theme.palette.warning.main, theme.palette.error.main));
|
|
2856
2874
|
|
|
2857
2875
|
const rootClassName$G = 'dot-text-field';
|
|
2858
2876
|
const rootSelectClassName = 'dot-select-field';
|
|
@@ -2876,7 +2894,7 @@ const StyledTextField = styled(TextField).withConfig({
|
|
|
2876
2894
|
})(["", ""], ({
|
|
2877
2895
|
theme,
|
|
2878
2896
|
InputProps
|
|
2879
|
-
}) => css(["&.", "{.MuiInputBase-root{background:", ";margin-bottom:0;}.MuiInputBase-input{box-sizing:content-box;}.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiOutlinedInput-input{padding:", ";}.MuiOutlinedInput-inputMarginDense{padding-top:10.5px;padding-bottom:10.5px;}.MuiOutlinedInput-inputMultiline{padding:0;}}&.", ",&.", "{.dot-adornment-icon .dot-icon i{margin-top:-2px;}.MuiFormLabel-root.Mui-focused{color:", ";}select.dot-select{background:", ";}.MuiSelect-select:focus{background-color:transparent;}.Mui-error .", "{color:", ";}.MuiSelect-icon{right:", ";}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiFormLabel-root.Mui-focused{color:", ";}.", "{color:", ";}}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", "{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;}.MuiFormHelperText-root{font-family:", ";font-size:", "px;font-weight:400;margin:", ";display:flex;align-items:flex-end;&:not(.Mui-error){color:", ";}}.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:", ";}&.read-only .MuiOutlinedInput-root:hover > fieldset{border-color:", ";}}"], rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.palette.product === 'agility' && theme.palette.layer.n100, InputProps.startAdornment ? `18px 12px 18px 0px` : `18px 12px`, rootSelectClassName, rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n700, theme.palette.product === 'agility' && theme.palette.layer.n0, adornmentIconClassName, theme.palette.error.main, InputProps.endAdornment ? `44px` : `12px`, successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, theme.typography.body2.fontFamily, theme.typography.body2.fontSize, theme.spacing(0.5, 0, 0,
|
|
2897
|
+
}) => css(["&.", "{.MuiInputBase-root{background:", ";margin-bottom:0;}.MuiInputBase-input{box-sizing:content-box;}.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiOutlinedInput-input{padding:", ";}.MuiOutlinedInput-inputMarginDense{padding-top:10.5px;padding-bottom:10.5px;height:19px;}.MuiOutlinedInput-inputMultiline{padding:0;}}&.", ",&.", "{.dot-adornment-icon .dot-icon i{margin-top:-2px;}.MuiFormLabel-root.Mui-focused{color:", ";}.MuiOutlinedInput-inputMarginDense{height:19px;}select.dot-select{background:", ";padding-left:", "px;}.MuiSelect-select:focus{background-color:transparent;}.Mui-error .", "{color:", ";}.MuiSelect-icon{right:", ";}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiFormLabel-root.Mui-focused{color:", ";}.", "{color:", ";}}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", "{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;}.MuiFormHelperText-root{font-family:", ";font-size:", "px;font-weight:400;margin:", ";display:flex;align-items:flex-end;&:not(.Mui-error){color:", ";}}.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:", ";}&.read-only .MuiOutlinedInput-root:hover > fieldset{border-color:", ";}}"], rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.palette.product === 'agility' && theme.palette.layer.n100, InputProps.startAdornment ? `18px 12px 18px 0px` : `18px 12px`, rootSelectClassName, rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n700, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.spacing(1.5), adornmentIconClassName, theme.palette.error.main, InputProps.endAdornment ? `44px` : `12px`, successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, theme.typography.body2.fontFamily, theme.typography.body2.fontSize, theme.spacing(0.5, 0, 0, 1.5), theme.palette.grey[400], theme.palette.product === 'agility' && agilityGreen, theme.palette.layer.n200));
|
|
2880
2898
|
|
|
2881
2899
|
const rootClassName$F = 'dot-button';
|
|
2882
2900
|
const StyledButton = styled(Button).withConfig({
|
|
@@ -2884,7 +2902,7 @@ const StyledButton = styled(Button).withConfig({
|
|
|
2884
2902
|
componentId: "sx99hh-0"
|
|
2885
2903
|
})(["", ""], ({
|
|
2886
2904
|
theme
|
|
2887
|
-
}) => css(["&.", "{margin:", "px;min-width:auto;white-space:nowrap
|
|
2905
|
+
}) => css(["&.", "{margin:", "px;min-width:auto;white-space:nowrap;&:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall){height:", "px;}&.MuiButton-containedPrimary{background-color:", ";}&.MuiButton-containedSecondary{background-color:", ";&:hover,&:active{background-color:", ";}}&.MuiButton-text{padding:6px 16px;}span.dot-icon{padding:0;i{height:auto;}}}"], rootClassName$F, theme.spacing(0.5), theme.spacing(5), theme.palette.product === 'agility' && agilityGreen, theme.palette.error.main, darken(theme.palette.error.main, 0.2)));
|
|
2888
2906
|
|
|
2889
2907
|
/** This component wraps the Button component from @material-ui. */
|
|
2890
2908
|
|
|
@@ -3076,6 +3094,34 @@ const getChipsFromAutocomplete = ({
|
|
|
3076
3094
|
};
|
|
3077
3095
|
const checkIfDuplicateItem = (itemText, autocompleteOptions) => autocompleteOptions.some(autocompleteOption => autocompleteOption.title === itemText);
|
|
3078
3096
|
|
|
3097
|
+
const DotInputLabel = ({
|
|
3098
|
+
'data-testid': dataTestId,
|
|
3099
|
+
disabled: _disabled = false,
|
|
3100
|
+
error: _error = false,
|
|
3101
|
+
id,
|
|
3102
|
+
label,
|
|
3103
|
+
required
|
|
3104
|
+
}) => {
|
|
3105
|
+
return jsx(StyledInputLabel, Object.assign({
|
|
3106
|
+
"data-testid": dataTestId,
|
|
3107
|
+
classes: {
|
|
3108
|
+
root: labelClassName
|
|
3109
|
+
},
|
|
3110
|
+
disabled: _disabled,
|
|
3111
|
+
error: _error,
|
|
3112
|
+
htmlFor: id,
|
|
3113
|
+
required: required,
|
|
3114
|
+
shrink: false,
|
|
3115
|
+
variant: "outlined"
|
|
3116
|
+
}, {
|
|
3117
|
+
children: jsx(DotTypography, Object.assign({
|
|
3118
|
+
variant: "subtitle2"
|
|
3119
|
+
}, {
|
|
3120
|
+
children: label
|
|
3121
|
+
}), void 0)
|
|
3122
|
+
}), void 0);
|
|
3123
|
+
};
|
|
3124
|
+
|
|
3079
3125
|
const DEFAULT_ACTION_ITEM_TEXT = 'Add new item';
|
|
3080
3126
|
const DotAutoComplete = ({
|
|
3081
3127
|
actionItem,
|
|
@@ -3106,6 +3152,7 @@ const DotAutoComplete = ({
|
|
|
3106
3152
|
onOpen,
|
|
3107
3153
|
open,
|
|
3108
3154
|
options,
|
|
3155
|
+
persistentLabel,
|
|
3109
3156
|
placeholder,
|
|
3110
3157
|
readOnly: _readOnly = false,
|
|
3111
3158
|
renderOption,
|
|
@@ -3364,39 +3411,49 @@ const DotAutoComplete = ({
|
|
|
3364
3411
|
// at least pick up any styling that is used there. Should additional
|
|
3365
3412
|
// functionality be added to DotInputText we will have to make a
|
|
3366
3413
|
// decision about if/how to expose it here.
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
},
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3414
|
+
jsxs(Fragment$1, {
|
|
3415
|
+
children: [persistentLabel && jsx(DotInputLabel, Object.assign({
|
|
3416
|
+
"data-testid": dataTestId && `${dataTestId}-persistent-label`,
|
|
3417
|
+
id: inputId
|
|
3418
|
+
}, {
|
|
3419
|
+
disabled: _disabled,
|
|
3420
|
+
error: _error,
|
|
3421
|
+
label,
|
|
3422
|
+
required: _required
|
|
3423
|
+
}), void 0), jsx(StyledTextField, Object.assign({}, params, {
|
|
3424
|
+
autoFocus: autoFocus,
|
|
3425
|
+
classes: {
|
|
3426
|
+
root: textFieldRootClasses
|
|
3427
|
+
},
|
|
3428
|
+
error: _error,
|
|
3429
|
+
focused: _readOnly ? false : undefined,
|
|
3430
|
+
helperText: helperText,
|
|
3431
|
+
inputProps: Object.assign(Object.assign({}, inputProps), {
|
|
3432
|
+
id: inputId,
|
|
3433
|
+
className: useStylesWithRootClass(inputProps.className, 'dot-input')
|
|
3434
|
+
}),
|
|
3435
|
+
InputProps: Object.assign(Object.assign({}, params.InputProps), {
|
|
3436
|
+
endAdornment: !_readOnly ? renderEndAdornment(params.InputProps.endAdornment) : undefined,
|
|
3437
|
+
readOnly: _readOnly
|
|
3438
|
+
}),
|
|
3439
|
+
inputRef: textFieldRef,
|
|
3440
|
+
label: persistentLabel ? null : label,
|
|
3441
|
+
name: label,
|
|
3442
|
+
onKeyDown: event => {
|
|
3443
|
+
var _a; // Intercept 'tab' key press while action item element exists
|
|
3444
|
+
|
|
3445
|
+
|
|
3446
|
+
if (event.key === 'Tab' && actionItemRef.current) {
|
|
3447
|
+
event.preventDefault();
|
|
3448
|
+
(_a = actionItemRef === null || actionItemRef === void 0 ? void 0 : actionItemRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3449
|
+
}
|
|
3450
|
+
},
|
|
3451
|
+
placeholder: showPlaceholder ? placeholder : undefined,
|
|
3452
|
+
required: _required,
|
|
3453
|
+
size: _dense ? 'small' : 'medium',
|
|
3454
|
+
variant: "outlined"
|
|
3455
|
+
}), void 0)]
|
|
3456
|
+
}, void 0)
|
|
3400
3457
|
);
|
|
3401
3458
|
},
|
|
3402
3459
|
renderOption: renderOption,
|
|
@@ -3833,7 +3890,7 @@ const StyledToggleButtonGroup = styled(ToggleButtonGroup).withConfig({
|
|
|
3833
3890
|
componentId: "sc-1oh4ljv-0"
|
|
3834
3891
|
})(["", ""], ({
|
|
3835
3892
|
theme
|
|
3836
|
-
}) => css(["&.", "{.dot-icon{+ p{margin-left:", "px;}i{height:auto;}}.MuiToggleButton-label{color:", ";p{margin-bottom:0;}}.MuiToggleButtonGroup-groupedHorizontal{border:1px solid ", ";border-radius:0;:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;margin-left:0;}:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px;margin-right:0;}}}.MuiButtonBase-root{&.Mui-disabled p,&.Mui-disabled .dot-icon{color:", ";}}"], rootClassName$C, theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]));
|
|
3893
|
+
}) => css(["&.", "{button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall){height:", "px;.dot-icon{width:", "px;}}.dot-icon{+ p{margin-left:", "px;}i{height:auto;}}.MuiToggleButton-label{color:", ";p{margin-bottom:0;}}.MuiToggleButtonGroup-groupedHorizontal{border:1px solid ", ";border-radius:0;:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;margin-left:0;}:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px;margin-right:0;}}}.MuiButtonBase-root{&.Mui-disabled p,&.Mui-disabled .dot-icon{color:", ";}}"], rootClassName$C, theme.spacing(5), theme.spacing(2), theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]));
|
|
3837
3894
|
|
|
3838
3895
|
const DotButtonToggle = ({
|
|
3839
3896
|
ariaLabel,
|
|
@@ -4932,32 +4989,6 @@ const checkIfFormDataValid = formState => {
|
|
|
4932
4989
|
return true;
|
|
4933
4990
|
};
|
|
4934
4991
|
|
|
4935
|
-
const DotInputLabel = ({
|
|
4936
|
-
disabled: _disabled = false,
|
|
4937
|
-
error: _error = false,
|
|
4938
|
-
id,
|
|
4939
|
-
label,
|
|
4940
|
-
required
|
|
4941
|
-
}) => {
|
|
4942
|
-
return jsx(StyledInputLabel, Object.assign({
|
|
4943
|
-
classes: {
|
|
4944
|
-
root: labelClassName
|
|
4945
|
-
},
|
|
4946
|
-
disabled: _disabled,
|
|
4947
|
-
error: _error,
|
|
4948
|
-
htmlFor: id,
|
|
4949
|
-
required: required,
|
|
4950
|
-
shrink: false,
|
|
4951
|
-
variant: "outlined"
|
|
4952
|
-
}, {
|
|
4953
|
-
children: jsx(DotTypography, Object.assign({
|
|
4954
|
-
variant: "subtitle2"
|
|
4955
|
-
}, {
|
|
4956
|
-
children: label
|
|
4957
|
-
}), void 0)
|
|
4958
|
-
}), void 0);
|
|
4959
|
-
};
|
|
4960
|
-
|
|
4961
4992
|
const DELAY_MS = 300;
|
|
4962
4993
|
|
|
4963
4994
|
const EndAdornment = ({
|
|
@@ -6105,7 +6136,7 @@ const StyledInlineEdit = styled.div.withConfig({
|
|
|
6105
6136
|
})(["", ""], ({
|
|
6106
6137
|
theme,
|
|
6107
6138
|
fullWidth
|
|
6108
|
-
}) => css(["&.dot-inline-edit{display:", ";align-items:center;color:", ";min-width:", "px;.", "{display:flex;width:100%;position:relative;.dot-edit-icon{height:100%;position:absolute;right:0;width:40px;background-color:", ";border-radius:", ";display:none;.dot-i{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);}}&:not(.", "):hover{border-radius:", "px;background-color:", ";cursor:pointer;.dot-edit-icon{display:block;}}.dot-view-mode-typography{padding:", ";margin-bottom:0;}}.dot-empty-value fieldset{border-color:", ";}.dot-adornment-error{color:", ";}.MuiInputBase-input{height:auto;}.MuiInputBase-root{margin-bottom:", "px;}", " .", " .dot-input{padding-left:", "px;}.MuiOutlinedInput-input:focus{cursor:auto;}.dot-counter-adornment{.dot-counter-max-length{color:", ";}.dot-counter-length,.dot-counter-max-length{&.dot-counter-limit{color:", ";}}}.dot-read-only-adornment{display:none;}.", "{display:flex;align-items:center;margin:", ";.dot-button{padding:", "px;margin-top:", ";margin-bottom:", ";}}}"], fullWidth ? 'flex' : 'inline-flex', theme.palette.grey[700], theme.spacing(32), viewModeClassName, theme.palette.layer.n50, theme.spacing(0, 0.5, 0.5, 0), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, theme.spacing(1.3125, 1), theme.palette.error[500], theme.palette.error[500], theme.spacing(0), ({
|
|
6139
|
+
}) => css(["&.dot-inline-edit{display:", ";align-items:center;color:", ";min-width:", "px;&:not(.", "):focus-visible{border-radius:", "px;background-color:", ";cursor:pointer;outline:0;.dot-edit-icon{display:block;}}.", "{display:flex;width:100%;position:relative;.dot-edit-icon{height:100%;position:absolute;right:0;width:40px;background-color:", ";border-radius:", ";display:none;.dot-i{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);}}&:not(.", "):hover{border-radius:", "px;background-color:", ";cursor:pointer;.dot-edit-icon{display:block;}}.dot-view-mode-typography{padding:", ";margin-bottom:0;}}.dot-empty-value fieldset{border-color:", ";}.dot-adornment-error{color:", ";}.MuiInputBase-input{height:auto;}.MuiInputBase-root{margin-bottom:", "px;}", " .", " .dot-input{padding-left:", "px;}.MuiOutlinedInput-input:focus{cursor:auto;}.dot-counter-adornment{.dot-counter-max-length{color:", ";}.dot-counter-length,.dot-counter-max-length{&.dot-counter-limit{color:", ";}}}.dot-read-only-adornment{display:none;}.", "{display:flex;align-items:center;margin:", ";.dot-button{padding:", "px;margin-top:", ";margin-bottom:", ";}}}"], fullWidth ? 'flex' : 'inline-flex', theme.palette.grey[700], theme.spacing(32), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, viewModeClassName, theme.palette.layer.n50, theme.spacing(0, 0.5, 0.5, 0), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, theme.spacing(1.3125, 1), theme.palette.error[500], theme.palette.error[500], theme.spacing(0), ({
|
|
6109
6140
|
typography
|
|
6110
6141
|
}) => typography && `
|
|
6111
6142
|
.MuiInputBase-root {
|
|
@@ -6207,18 +6238,27 @@ const DotInlineEdit = ({
|
|
|
6207
6238
|
onEditStateChange,
|
|
6208
6239
|
readOnly,
|
|
6209
6240
|
selectTextOnEdit,
|
|
6241
|
+
tabIndex: _tabIndex = 0,
|
|
6210
6242
|
tooltip,
|
|
6211
6243
|
typography: _typography = 'body1',
|
|
6212
6244
|
value: _value = ''
|
|
6213
6245
|
}) => {
|
|
6214
6246
|
const [editing, setEditing] = useState(false);
|
|
6247
|
+
const [showTooltip, setShowTooltip] = useState(false);
|
|
6215
6248
|
const [originalValue, setOriginalValue] = useState('');
|
|
6216
6249
|
const [inputValue, setInputValue] = useState(_value);
|
|
6250
|
+
const isNotReadOnlyOrEditing = !readOnly && !editing;
|
|
6217
6251
|
const inputRef = useRef();
|
|
6218
6252
|
const inlineEditRef = useRef();
|
|
6219
6253
|
const isSaveDisabled = checkIfEmptyValue(inputValue);
|
|
6220
6254
|
const rootClasses = useStylesWithRootClass(rootClassName$n, className, editing ? editModeClassName : '');
|
|
6221
6255
|
|
|
6256
|
+
const handleShowTooltip = visible => {
|
|
6257
|
+
if (isNotReadOnlyOrEditing) {
|
|
6258
|
+
setShowTooltip(visible);
|
|
6259
|
+
}
|
|
6260
|
+
};
|
|
6261
|
+
|
|
6222
6262
|
const handleInlineEditClick = () => {
|
|
6223
6263
|
if (editing) return;
|
|
6224
6264
|
setOriginalValue(inputValue);
|
|
@@ -6232,6 +6272,7 @@ const DotInlineEdit = ({
|
|
|
6232
6272
|
const handleSave = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
6233
6273
|
var _a;
|
|
6234
6274
|
|
|
6275
|
+
setShowTooltip(false);
|
|
6235
6276
|
if (isSaveDisabled) return;
|
|
6236
6277
|
|
|
6237
6278
|
if (onChange) {
|
|
@@ -6251,6 +6292,7 @@ const DotInlineEdit = ({
|
|
|
6251
6292
|
});
|
|
6252
6293
|
|
|
6253
6294
|
const handleCancel = () => {
|
|
6295
|
+
setShowTooltip(false);
|
|
6254
6296
|
setEditing(false);
|
|
6255
6297
|
setInputValue(originalValue);
|
|
6256
6298
|
|
|
@@ -6262,7 +6304,12 @@ const DotInlineEdit = ({
|
|
|
6262
6304
|
const handleKeyPress = event => __awaiter(void 0, void 0, void 0, function* () {
|
|
6263
6305
|
switch (event.key) {
|
|
6264
6306
|
case 'Enter':
|
|
6265
|
-
|
|
6307
|
+
if (!editing) {
|
|
6308
|
+
handleInlineEditClick();
|
|
6309
|
+
return;
|
|
6310
|
+
} // Save only when Enter is pressed within input field
|
|
6311
|
+
|
|
6312
|
+
|
|
6266
6313
|
if (inputRef.current !== event.target) return;
|
|
6267
6314
|
yield handleSave();
|
|
6268
6315
|
break;
|
|
@@ -6274,8 +6321,12 @@ const DotInlineEdit = ({
|
|
|
6274
6321
|
});
|
|
6275
6322
|
|
|
6276
6323
|
const handleBlur = event => __awaiter(void 0, void 0, void 0, function* () {
|
|
6277
|
-
if (!
|
|
6278
|
-
|
|
6324
|
+
if (!editing) {
|
|
6325
|
+
setShowTooltip(false);
|
|
6326
|
+
} else {
|
|
6327
|
+
if (!event.relatedTarget || !inlineEditRef.current.contains(event.relatedTarget)) {
|
|
6328
|
+
yield handleSave();
|
|
6329
|
+
}
|
|
6279
6330
|
}
|
|
6280
6331
|
});
|
|
6281
6332
|
|
|
@@ -6309,7 +6360,8 @@ const DotInlineEdit = ({
|
|
|
6309
6360
|
return tooltip ? jsx(DotTooltip, Object.assign({
|
|
6310
6361
|
title: tooltip,
|
|
6311
6362
|
className: viewModeClasses,
|
|
6312
|
-
"data-testid": dataTestId && `${dataTestId}-view-mode-tooltip-wrapper
|
|
6363
|
+
"data-testid": dataTestId && `${dataTestId}-view-mode-tooltip-wrapper`,
|
|
6364
|
+
open: showTooltip
|
|
6313
6365
|
}, {
|
|
6314
6366
|
children: viewModeChildren
|
|
6315
6367
|
}), void 0) : jsx("div", Object.assign({
|
|
@@ -6381,10 +6433,14 @@ const DotInlineEdit = ({
|
|
|
6381
6433
|
className: rootClasses,
|
|
6382
6434
|
"data-testid": dataTestId,
|
|
6383
6435
|
fullWidth: _fullWidth,
|
|
6384
|
-
onBlur: !readOnly
|
|
6436
|
+
onBlur: !readOnly ? handleBlur : undefined,
|
|
6385
6437
|
onClick: !readOnly ? handleInlineEditClick : undefined,
|
|
6438
|
+
onFocus: () => handleShowTooltip(true),
|
|
6439
|
+
onMouseOver: () => handleShowTooltip(true),
|
|
6440
|
+
onMouseOut: () => handleShowTooltip(false),
|
|
6386
6441
|
onKeyDown: !readOnly ? event => handleKeyPress(event) : undefined,
|
|
6387
6442
|
ref: inlineEditRef,
|
|
6443
|
+
tabIndex: !readOnly ? _tabIndex : undefined,
|
|
6388
6444
|
typography: _typography
|
|
6389
6445
|
}, {
|
|
6390
6446
|
children: editing ? renderEditMode() : renderViewMode()
|
|
@@ -7993,7 +8049,7 @@ const StyledFileListItem = styled(StyledListItem).withConfig({
|
|
|
7993
8049
|
componentId: "sc-6mp1tz-0"
|
|
7994
8050
|
})(["", ""], ({
|
|
7995
8051
|
theme
|
|
7996
|
-
}) => css(["&.", "{border-bottom:1px solid ", ";&:hover{cursor:pointer;background:", ";}&.file-success:not(:hover)
|
|
8052
|
+
}) => css(["&.", "{border-bottom:1px solid ", ";&:hover{cursor:pointer;background:", ";}&:focus-visible{background-color:", ";outline:none;}&.file-success:not(:hover,:focus-visible) .", "-end-icon{i:before{color:", ";}&:focus-visible i:before{color:unset;}}&.file-error:not(:hover,:focus-visible) .", "-end-icon{i:before,.MuiListItemText-secondary{color:", ";}&:focus-visible i:before{color:unset;}}.dot-typography,.file-item-text{flex-grow:2;padding-left:", "px;}.file-item-text{display:flex;flex-direction:column;.MuiTypography-body2{color:", ";}}}"], rootClassName$4, theme.palette.layer.n100, theme.palette.layer.n50, theme.palette.layer.n100, rootClassName$4, theme.palette.secondary.main, rootClassName$4, theme.palette.error.main, theme.spacing(1), theme.palette.error.main));
|
|
7997
8053
|
|
|
7998
8054
|
const DotFileListItem = ({
|
|
7999
8055
|
ariaLabel,
|
|
@@ -8004,7 +8060,9 @@ const DotFileListItem = ({
|
|
|
8004
8060
|
error: _error = false,
|
|
8005
8061
|
errorText,
|
|
8006
8062
|
file,
|
|
8007
|
-
onClick
|
|
8063
|
+
onClick,
|
|
8064
|
+
onKeyPress,
|
|
8065
|
+
tabIndex: _tabIndex = 0
|
|
8008
8066
|
}) => {
|
|
8009
8067
|
const rootClasses = useStylesWithRootClass(rootClassName$4, className, _error ? 'file-error' : 'file-success');
|
|
8010
8068
|
const defaultIcon = _error ? 'error-solid' : 'check-solid';
|
|
@@ -8021,9 +8079,13 @@ const DotFileListItem = ({
|
|
|
8021
8079
|
"aria-label": ariaLabel,
|
|
8022
8080
|
className: rootClasses,
|
|
8023
8081
|
"data-testid": dataTestId,
|
|
8082
|
+
onBlur: () => setEndIcon(defaultIcon),
|
|
8024
8083
|
onClick: handleItemClick(file),
|
|
8084
|
+
onFocus: () => setEndIcon('delete'),
|
|
8025
8085
|
onMouseEnter: () => setEndIcon('delete'),
|
|
8026
|
-
onMouseLeave: () => setEndIcon(defaultIcon)
|
|
8086
|
+
onMouseLeave: () => setEndIcon(defaultIcon),
|
|
8087
|
+
onKeyPress: onKeyPress,
|
|
8088
|
+
tabIndex: _tabIndex
|
|
8027
8089
|
}, {
|
|
8028
8090
|
children: [jsx(DotIcon, {
|
|
8029
8091
|
"data-testid": dataTestId && `${dataTestId}-start-icon`,
|
package/index.umd.js
CHANGED
|
@@ -202,7 +202,8 @@
|
|
|
202
202
|
fontSize: fontSize === 'small' ? fontSize : 'medium'
|
|
203
203
|
}, {
|
|
204
204
|
children: jsxRuntime.jsx("i", {
|
|
205
|
-
className: "icon-" + iconId + " dot-i"
|
|
205
|
+
className: "icon-" + iconId + " dot-i",
|
|
206
|
+
"data-testid": dataTestId && dataTestId + "-i"
|
|
206
207
|
}, void 0)
|
|
207
208
|
}), void 0)
|
|
208
209
|
}), void 0);
|
|
@@ -2920,12 +2921,12 @@
|
|
|
2920
2921
|
var templateObject_1$L, templateObject_2$J, templateObject_3$8, templateObject_4$6;
|
|
2921
2922
|
|
|
2922
2923
|
var DotAppToolbar = function DotAppToolbar(_a) {
|
|
2923
|
-
var
|
|
2924
|
+
var ariaLabel = _a.ariaLabel,
|
|
2924
2925
|
appLogo = _a.appLogo,
|
|
2925
2926
|
_b = _a.appLogoHref,
|
|
2926
2927
|
appLogoHref = _b === void 0 ? '/' : _b,
|
|
2927
2928
|
appLogoSmall = _a.appLogoSmall,
|
|
2928
|
-
|
|
2929
|
+
appName = _a.appName,
|
|
2929
2930
|
avatar = _a.avatar,
|
|
2930
2931
|
borderColor = _a.borderColor,
|
|
2931
2932
|
children = _a.children,
|
|
@@ -2935,18 +2936,21 @@
|
|
|
2935
2936
|
dataTestId = _a["data-testid"],
|
|
2936
2937
|
_c = _a.dense,
|
|
2937
2938
|
dense = _c === void 0 ? true : _c,
|
|
2938
|
-
_d = _a.navItems,
|
|
2939
|
-
navItems = _d === void 0 ? [] : _d,
|
|
2940
2939
|
mainMenu = _a.mainMenu,
|
|
2941
2940
|
mainMenuItems = _a.mainMenuItems,
|
|
2942
|
-
|
|
2943
|
-
mainMenuWidth =
|
|
2944
|
-
|
|
2945
|
-
|
|
2941
|
+
_d = _a.mainMenuWidth,
|
|
2942
|
+
mainMenuWidth = _d === void 0 ? 240 : _d,
|
|
2943
|
+
_e = _a.menuCloseOnClickAway,
|
|
2944
|
+
menuCloseOnClickAway = _e === void 0 ? false : _e,
|
|
2945
|
+
_f = _a.navItems,
|
|
2946
|
+
navItems = _f === void 0 ? [] : _f,
|
|
2947
|
+
onClickAway = _a.onClickAway,
|
|
2948
|
+
_g = _a.primaryLogoHref,
|
|
2949
|
+
primaryLogoHref = _g === void 0 ? '/' : _g;
|
|
2946
2950
|
|
|
2947
|
-
var
|
|
2948
|
-
menuOpen =
|
|
2949
|
-
updateMenuOpen =
|
|
2951
|
+
var _h = React.useState(false),
|
|
2952
|
+
menuOpen = _h[0],
|
|
2953
|
+
updateMenuOpen = _h[1];
|
|
2950
2954
|
|
|
2951
2955
|
var showMainMenu = mainMenu || mainMenuItems;
|
|
2952
2956
|
var displayAppLogo = appLogo || appLogoSmall;
|
|
@@ -3006,7 +3010,8 @@
|
|
|
3006
3010
|
}, index)
|
|
3007
3011
|
}), index);
|
|
3008
3012
|
});
|
|
3009
|
-
|
|
3013
|
+
|
|
3014
|
+
var appToolbar = jsxRuntime.jsxs(StyledAppToolbar, __assign({
|
|
3010
3015
|
"aria-label": ariaLabel,
|
|
3011
3016
|
className: rootClasses,
|
|
3012
3017
|
"data-testid": dataTestId,
|
|
@@ -3096,6 +3101,21 @@
|
|
|
3096
3101
|
}), void 0)]
|
|
3097
3102
|
}), void 0)]
|
|
3098
3103
|
}), void 0);
|
|
3104
|
+
|
|
3105
|
+
var handleClickAway = function handleClickAway(event) {
|
|
3106
|
+
if (menuCloseOnClickAway && onClickAway) {
|
|
3107
|
+
updateMenuOpen(false);
|
|
3108
|
+
onClickAway(event);
|
|
3109
|
+
}
|
|
3110
|
+
};
|
|
3111
|
+
|
|
3112
|
+
return menuCloseOnClickAway ? jsxRuntime.jsx(core.ClickAwayListener, __assign({
|
|
3113
|
+
onClickAway: handleClickAway
|
|
3114
|
+
}, {
|
|
3115
|
+
children: jsxRuntime.jsx("div", {
|
|
3116
|
+
children: appToolbar
|
|
3117
|
+
}, void 0)
|
|
3118
|
+
}), void 0) : appToolbar;
|
|
3099
3119
|
};
|
|
3100
3120
|
|
|
3101
3121
|
var rootClassName$H = 'dot-autocomplete';
|
|
@@ -3106,7 +3126,7 @@
|
|
|
3106
3126
|
componentId: "j2sgjy-0"
|
|
3107
3127
|
})(templateObject_2$I || (templateObject_2$I = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
3108
3128
|
var theme = _a.theme;
|
|
3109
|
-
return styled.css(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n &.", " {\n .", "
|
|
3129
|
+
return styled.css(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n &.", " {\n .", " {\n /* Override only top/bottom, but preserve left/right padding */\n padding-top: ", ";\n padding-bottom: ", ";\n }\n\n .dot-chip:first-child {\n margin-left: ", ";\n }\n\n .dot-text-field {\n .MuiOutlinedInput-inputMarginDense {\n /* padding above and below together is 9px, and total height should be 40px */\n height: 31px;\n }\n\n .warning-icon {\n color: ", ";\n }\n .error-icon {\n color: ", ";\n }\n }\n }\n "], ["\n &.", " {\n .", " {\n /* Override only top/bottom, but preserve left/right padding */\n padding-top: ", ";\n padding-bottom: ", ";\n }\n\n .dot-chip:first-child {\n margin-left: ", ";\n }\n\n .dot-text-field {\n .MuiOutlinedInput-inputMarginDense {\n /* padding above and below together is 9px, and total height should be 40px */\n height: 31px;\n }\n\n .warning-icon {\n color: ", ";\n }\n .error-icon {\n color: ", ";\n }\n }\n }\n "])), rootClassName$H, inputRootClassName, theme.spacing(0), theme.spacing(0), theme.spacing(0), theme.palette.warning.main, theme.palette.error.main);
|
|
3110
3130
|
});
|
|
3111
3131
|
var templateObject_1$K, templateObject_2$I;
|
|
3112
3132
|
|
|
@@ -3133,7 +3153,7 @@
|
|
|
3133
3153
|
})(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
3134
3154
|
var theme = _a.theme,
|
|
3135
3155
|
InputProps = _a.InputProps;
|
|
3136
|
-
return styled.css(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n background: ", ";\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiOutlinedInput-inputMarginDense {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n .MuiOutlinedInput-inputMultiline {\n padding: 0;\n }\n }\n &.", ", &.", " {\n .dot-adornment-icon .dot-icon i {\n margin-top: -2px;\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n select.dot-select {\n background: ", ";\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .Mui-error .", " {\n color: ", ";\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n font-weight: 400;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n &.read-only .MuiOutlinedInput-root:hover > fieldset {\n border-color: ", ";\n }\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n background: ", ";\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiOutlinedInput-inputMarginDense {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n .MuiOutlinedInput-inputMultiline {\n padding: 0;\n }\n }\n &.", ", &.", " {\n .dot-adornment-icon .dot-icon i {\n margin-top: -2px;\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n select.dot-select {\n background: ", ";\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .Mui-error .", " {\n color: ", ";\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n font-weight: 400;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n &.read-only .MuiOutlinedInput-root:hover > fieldset {\n border-color: ", ";\n }\n }\n "])), rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.palette.product === 'agility' && theme.palette.layer.n100, InputProps.startAdornment ? "18px 12px 18px 0px" : "18px 12px", rootSelectClassName, rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n700, theme.palette.product === 'agility' && theme.palette.layer.n0, adornmentIconClassName, theme.palette.error.main, InputProps.endAdornment ? "44px" : "12px", successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, theme.typography.body2.fontFamily, theme.typography.body2.fontSize, theme.spacing(0.5, 0, 0,
|
|
3156
|
+
return styled.css(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n background: ", ";\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiOutlinedInput-inputMarginDense {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n .MuiOutlinedInput-inputMultiline {\n padding: 0;\n }\n }\n &.", ", &.", " {\n .dot-adornment-icon .dot-icon i {\n margin-top: -2px;\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .MuiOutlinedInput-inputMarginDense {\n height: 19px;\n }\n\n select.dot-select {\n background: ", ";\n\n padding-left: ", "px;\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .Mui-error .", " {\n color: ", ";\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n font-weight: 400;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n &.read-only .MuiOutlinedInput-root:hover > fieldset {\n border-color: ", ";\n }\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n background: ", ";\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiOutlinedInput-inputMarginDense {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n .MuiOutlinedInput-inputMultiline {\n padding: 0;\n }\n }\n &.", ", &.", " {\n .dot-adornment-icon .dot-icon i {\n margin-top: -2px;\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .MuiOutlinedInput-inputMarginDense {\n height: 19px;\n }\n\n select.dot-select {\n background: ", ";\n\n padding-left: ", "px;\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .Mui-error .", " {\n color: ", ";\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n font-weight: 400;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n &.read-only .MuiOutlinedInput-root:hover > fieldset {\n border-color: ", ";\n }\n }\n "])), rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.palette.product === 'agility' && theme.palette.layer.n100, InputProps.startAdornment ? "18px 12px 18px 0px" : "18px 12px", rootSelectClassName, rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n700, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.spacing(1.5), adornmentIconClassName, theme.palette.error.main, InputProps.endAdornment ? "44px" : "12px", successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, theme.typography.body2.fontFamily, theme.typography.body2.fontSize, theme.spacing(0.5, 0, 0, 1.5), theme.palette.grey[400], theme.palette.product === 'agility' && agilityGreen, theme.palette.layer.n200);
|
|
3137
3157
|
});
|
|
3138
3158
|
var templateObject_1$J, templateObject_2$H, templateObject_3$7, templateObject_4$5, templateObject_5$1;
|
|
3139
3159
|
|
|
@@ -3143,7 +3163,7 @@
|
|
|
3143
3163
|
componentId: "sx99hh-0"
|
|
3144
3164
|
})(templateObject_2$G || (templateObject_2$G = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
3145
3165
|
var theme = _a.theme;
|
|
3146
|
-
return styled.css(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n &.", " {\n margin: ", "px;\n min-width: auto;\n white-space: nowrap;\n\n &.MuiButton-containedPrimary {\n background-color: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover,\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-text {\n padding: 6px 16px;\n }\n\n span.dot-icon {\n padding: 0;\n\n i {\n height: auto;\n }\n }\n }\n "], ["\n &.", " {\n margin: ", "px;\n min-width: auto;\n white-space: nowrap;\n\n &.MuiButton-containedPrimary {\n background-color: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover,\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-text {\n padding: 6px 16px;\n }\n\n span.dot-icon {\n padding: 0;\n\n i {\n height: auto;\n }\n }\n }\n "])), rootClassName$F, theme.spacing(0.5), theme.palette.product === 'agility' && agilityGreen, theme.palette.error.main, core.darken(theme.palette.error.main, 0.2));
|
|
3166
|
+
return styled.css(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n &.", " {\n margin: ", "px;\n min-width: auto;\n white-space: nowrap;\n\n &:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall) {\n /* Override height for medium size */\n height: ", "px;\n }\n\n &.MuiButton-containedPrimary {\n background-color: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover,\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-text {\n padding: 6px 16px;\n }\n\n span.dot-icon {\n padding: 0;\n\n i {\n height: auto;\n }\n }\n }\n "], ["\n &.", " {\n margin: ", "px;\n min-width: auto;\n white-space: nowrap;\n\n &:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall) {\n /* Override height for medium size */\n height: ", "px;\n }\n\n &.MuiButton-containedPrimary {\n background-color: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover,\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-text {\n padding: 6px 16px;\n }\n\n span.dot-icon {\n padding: 0;\n\n i {\n height: auto;\n }\n }\n }\n "])), rootClassName$F, theme.spacing(0.5), theme.spacing(5), theme.palette.product === 'agility' && agilityGreen, theme.palette.error.main, core.darken(theme.palette.error.main, 0.2));
|
|
3147
3167
|
});
|
|
3148
3168
|
var templateObject_1$I, templateObject_2$G;
|
|
3149
3169
|
|
|
@@ -3361,6 +3381,35 @@
|
|
|
3361
3381
|
});
|
|
3362
3382
|
};
|
|
3363
3383
|
|
|
3384
|
+
var DotInputLabel = function DotInputLabel(_a) {
|
|
3385
|
+
var dataTestId = _a["data-testid"],
|
|
3386
|
+
_b = _a.disabled,
|
|
3387
|
+
disabled = _b === void 0 ? false : _b,
|
|
3388
|
+
_c = _a.error,
|
|
3389
|
+
error = _c === void 0 ? false : _c,
|
|
3390
|
+
id = _a.id,
|
|
3391
|
+
label = _a.label,
|
|
3392
|
+
required = _a.required;
|
|
3393
|
+
return jsxRuntime.jsx(StyledInputLabel, __assign({
|
|
3394
|
+
"data-testid": dataTestId,
|
|
3395
|
+
classes: {
|
|
3396
|
+
root: labelClassName
|
|
3397
|
+
},
|
|
3398
|
+
disabled: disabled,
|
|
3399
|
+
error: error,
|
|
3400
|
+
htmlFor: id,
|
|
3401
|
+
required: required,
|
|
3402
|
+
shrink: false,
|
|
3403
|
+
variant: "outlined"
|
|
3404
|
+
}, {
|
|
3405
|
+
children: jsxRuntime.jsx(DotTypography, __assign({
|
|
3406
|
+
variant: "subtitle2"
|
|
3407
|
+
}, {
|
|
3408
|
+
children: label
|
|
3409
|
+
}), void 0)
|
|
3410
|
+
}), void 0);
|
|
3411
|
+
};
|
|
3412
|
+
|
|
3364
3413
|
var DEFAULT_ACTION_ITEM_TEXT = 'Add new item';
|
|
3365
3414
|
var DotAutoComplete = function DotAutoComplete(_a) {
|
|
3366
3415
|
var actionItem = _a.actionItem,
|
|
@@ -3399,6 +3448,7 @@
|
|
|
3399
3448
|
onOpen = _a.onOpen,
|
|
3400
3449
|
open = _a.open,
|
|
3401
3450
|
options = _a.options,
|
|
3451
|
+
persistentLabel = _a.persistentLabel,
|
|
3402
3452
|
placeholder = _a.placeholder,
|
|
3403
3453
|
_k = _a.readOnly,
|
|
3404
3454
|
readOnly = _k === void 0 ? false : _k,
|
|
@@ -3681,39 +3731,49 @@
|
|
|
3681
3731
|
// at least pick up any styling that is used there. Should additional
|
|
3682
3732
|
// functionality be added to DotInputText we will have to make a
|
|
3683
3733
|
// decision about if/how to expose it here.
|
|
3684
|
-
jsxRuntime.
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
},
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3734
|
+
jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3735
|
+
children: [persistentLabel && jsxRuntime.jsx(DotInputLabel, __assign({
|
|
3736
|
+
"data-testid": dataTestId && dataTestId + "-persistent-label",
|
|
3737
|
+
id: inputId
|
|
3738
|
+
}, {
|
|
3739
|
+
disabled: disabled,
|
|
3740
|
+
error: error,
|
|
3741
|
+
label: label,
|
|
3742
|
+
required: required
|
|
3743
|
+
}), void 0), jsxRuntime.jsx(StyledTextField, __assign({}, params, {
|
|
3744
|
+
autoFocus: autoFocus,
|
|
3745
|
+
classes: {
|
|
3746
|
+
root: textFieldRootClasses
|
|
3747
|
+
},
|
|
3748
|
+
error: error,
|
|
3749
|
+
focused: readOnly ? false : undefined,
|
|
3750
|
+
helperText: helperText,
|
|
3751
|
+
inputProps: __assign(__assign({}, inputProps), {
|
|
3752
|
+
id: inputId,
|
|
3753
|
+
className: useStylesWithRootClass(inputProps.className, 'dot-input')
|
|
3754
|
+
}),
|
|
3755
|
+
InputProps: __assign(__assign({}, params.InputProps), {
|
|
3756
|
+
endAdornment: !readOnly ? renderEndAdornment(params.InputProps.endAdornment) : undefined,
|
|
3757
|
+
readOnly: readOnly
|
|
3758
|
+
}),
|
|
3759
|
+
inputRef: textFieldRef,
|
|
3760
|
+
label: persistentLabel ? null : label,
|
|
3761
|
+
name: label,
|
|
3762
|
+
onKeyDown: function (event) {
|
|
3763
|
+
var _a; // Intercept 'tab' key press while action item element exists
|
|
3764
|
+
|
|
3765
|
+
|
|
3766
|
+
if (event.key === 'Tab' && actionItemRef.current) {
|
|
3767
|
+
event.preventDefault();
|
|
3768
|
+
(_a = actionItemRef === null || actionItemRef === void 0 ? void 0 : actionItemRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3769
|
+
}
|
|
3770
|
+
},
|
|
3771
|
+
placeholder: showPlaceholder ? placeholder : undefined,
|
|
3772
|
+
required: required,
|
|
3773
|
+
size: dense ? 'small' : 'medium',
|
|
3774
|
+
variant: "outlined"
|
|
3775
|
+
}), void 0)]
|
|
3776
|
+
}, void 0)
|
|
3717
3777
|
);
|
|
3718
3778
|
},
|
|
3719
3779
|
renderOption: renderOption,
|
|
@@ -4137,7 +4197,7 @@
|
|
|
4137
4197
|
componentId: "sc-1oh4ljv-0"
|
|
4138
4198
|
})(templateObject_2$D || (templateObject_2$D = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
4139
4199
|
var theme = _a.theme;
|
|
4140
|
-
return styled.css(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n &.", " {\n .dot-icon {\n + p {\n margin-left: ", "px;\n }\n i {\n height: auto;\n }\n }\n .MuiToggleButton-label {\n color: ", ";\n p {\n margin-bottom: 0;\n }\n }\n .MuiToggleButtonGroup-groupedHorizontal {\n border: 1px solid ", ";\n border-radius: 0;\n\n :first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n margin-left: 0;\n }\n :last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-right: 0;\n }\n }\n }\n\n .MuiButtonBase-root {\n &.Mui-disabled p,\n &.Mui-disabled .dot-icon {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n .dot-icon {\n + p {\n margin-left: ", "px;\n }\n i {\n height: auto;\n }\n }\n .MuiToggleButton-label {\n color: ", ";\n p {\n margin-bottom: 0;\n }\n }\n .MuiToggleButtonGroup-groupedHorizontal {\n border: 1px solid ", ";\n border-radius: 0;\n\n :first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n margin-left: 0;\n }\n :last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-right: 0;\n }\n }\n }\n\n .MuiButtonBase-root {\n &.Mui-disabled p,\n &.Mui-disabled .dot-icon {\n color: ", ";\n }\n }\n "])), rootClassName$C, theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]);
|
|
4200
|
+
return styled.css(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n &.", " {\n button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall) {\n /* Override height for medium size */\n height: ", "px;\n\n .dot-icon {\n /* With this, the width of the medium size button matches its height (40px) */\n width: ", "px;\n }\n }\n\n .dot-icon {\n + p {\n margin-left: ", "px;\n }\n i {\n height: auto;\n }\n }\n .MuiToggleButton-label {\n color: ", ";\n p {\n margin-bottom: 0;\n }\n }\n .MuiToggleButtonGroup-groupedHorizontal {\n border: 1px solid ", ";\n border-radius: 0;\n\n :first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n margin-left: 0;\n }\n :last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-right: 0;\n }\n }\n }\n\n .MuiButtonBase-root {\n &.Mui-disabled p,\n &.Mui-disabled .dot-icon {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall) {\n /* Override height for medium size */\n height: ", "px;\n\n .dot-icon {\n /* With this, the width of the medium size button matches its height (40px) */\n width: ", "px;\n }\n }\n\n .dot-icon {\n + p {\n margin-left: ", "px;\n }\n i {\n height: auto;\n }\n }\n .MuiToggleButton-label {\n color: ", ";\n p {\n margin-bottom: 0;\n }\n }\n .MuiToggleButtonGroup-groupedHorizontal {\n border: 1px solid ", ";\n border-radius: 0;\n\n :first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n margin-left: 0;\n }\n :last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-right: 0;\n }\n }\n }\n\n .MuiButtonBase-root {\n &.Mui-disabled p,\n &.Mui-disabled .dot-icon {\n color: ", ";\n }\n }\n "])), rootClassName$C, theme.spacing(5), theme.spacing(2), theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]);
|
|
4141
4201
|
});
|
|
4142
4202
|
var templateObject_1$F, templateObject_2$D;
|
|
4143
4203
|
|
|
@@ -5291,33 +5351,6 @@
|
|
|
5291
5351
|
return true;
|
|
5292
5352
|
};
|
|
5293
5353
|
|
|
5294
|
-
var DotInputLabel = function DotInputLabel(_a) {
|
|
5295
|
-
var _b = _a.disabled,
|
|
5296
|
-
disabled = _b === void 0 ? false : _b,
|
|
5297
|
-
_c = _a.error,
|
|
5298
|
-
error = _c === void 0 ? false : _c,
|
|
5299
|
-
id = _a.id,
|
|
5300
|
-
label = _a.label,
|
|
5301
|
-
required = _a.required;
|
|
5302
|
-
return jsxRuntime.jsx(StyledInputLabel, __assign({
|
|
5303
|
-
classes: {
|
|
5304
|
-
root: labelClassName
|
|
5305
|
-
},
|
|
5306
|
-
disabled: disabled,
|
|
5307
|
-
error: error,
|
|
5308
|
-
htmlFor: id,
|
|
5309
|
-
required: required,
|
|
5310
|
-
shrink: false,
|
|
5311
|
-
variant: "outlined"
|
|
5312
|
-
}, {
|
|
5313
|
-
children: jsxRuntime.jsx(DotTypography, __assign({
|
|
5314
|
-
variant: "subtitle2"
|
|
5315
|
-
}, {
|
|
5316
|
-
children: label
|
|
5317
|
-
}), void 0)
|
|
5318
|
-
}), void 0);
|
|
5319
|
-
};
|
|
5320
|
-
|
|
5321
5354
|
var DELAY_MS = 300;
|
|
5322
5355
|
|
|
5323
5356
|
var EndAdornment = function EndAdornment(_a) {
|
|
@@ -6516,7 +6549,7 @@
|
|
|
6516
6549
|
})(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
6517
6550
|
var theme = _a.theme,
|
|
6518
6551
|
fullWidth = _a.fullWidth;
|
|
6519
|
-
return styled.css(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n &.dot-inline-edit {\n display: ", ";\n align-items: center;\n color: ", ";\n min-width: ", "px;\n\n .", " {\n display: flex;\n width: 100%;\n position: relative;\n\n .dot-edit-icon {\n height: 100%;\n position: absolute;\n right: 0;\n width: 40px;\n background-color: ", ";\n border-radius: ", ";\n display: none;\n\n .dot-i {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n // Display pointer and edit icon only when NOT in read only mode\n &:not(.", "):hover {\n border-radius: ", "px;\n background-color: ", ";\n cursor: pointer;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .dot-view-mode-typography {\n padding: ", ";\n margin-bottom: 0;\n }\n }\n\n .dot-empty-value fieldset {\n border-color: ", ";\n }\n\n .dot-adornment-error {\n color: ", ";\n }\n\n .MuiInputBase-input {\n height: auto;\n }\n\n .MuiInputBase-root {\n margin-bottom: ", "px;\n }\n\n /* Conditionally setting font related props */\n ", "\n\n .", " .dot-input {\n padding-left: ", "px;\n }\n\n .MuiOutlinedInput-input:focus {\n cursor: auto;\n }\n\n .dot-counter-adornment {\n .dot-counter-max-length {\n color: ", ";\n }\n\n .dot-counter-length,\n .dot-counter-max-length {\n &.dot-counter-limit {\n color: ", ";\n }\n }\n }\n\n .dot-read-only-adornment {\n display: none;\n }\n\n .", " {\n display: flex;\n align-items: center;\n margin: ", ";\n\n .dot-button {\n padding: ", "px;\n margin-top: ", ";\n margin-bottom: ", ";\n }\n }\n }\n "], ["\n &.dot-inline-edit {\n display: ", ";\n align-items: center;\n color: ", ";\n min-width: ", "px;\n\n .", " {\n display: flex;\n width: 100%;\n position: relative;\n\n .dot-edit-icon {\n height: 100%;\n position: absolute;\n right: 0;\n width: 40px;\n background-color: ", ";\n border-radius: ", ";\n display: none;\n\n .dot-i {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n // Display pointer and edit icon only when NOT in read only mode\n &:not(.", "):hover {\n border-radius: ", "px;\n background-color: ", ";\n cursor: pointer;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .dot-view-mode-typography {\n padding: ", ";\n margin-bottom: 0;\n }\n }\n\n .dot-empty-value fieldset {\n border-color: ", ";\n }\n\n .dot-adornment-error {\n color: ", ";\n }\n\n .MuiInputBase-input {\n height: auto;\n }\n\n .MuiInputBase-root {\n margin-bottom: ", "px;\n }\n\n /* Conditionally setting font related props */\n ", "\n\n .", " .dot-input {\n padding-left: ", "px;\n }\n\n .MuiOutlinedInput-input:focus {\n cursor: auto;\n }\n\n .dot-counter-adornment {\n .dot-counter-max-length {\n color: ", ";\n }\n\n .dot-counter-length,\n .dot-counter-max-length {\n &.dot-counter-limit {\n color: ", ";\n }\n }\n }\n\n .dot-read-only-adornment {\n display: none;\n }\n\n .", " {\n display: flex;\n align-items: center;\n margin: ", ";\n\n .dot-button {\n padding: ", "px;\n margin-top: ", ";\n margin-bottom: ", ";\n }\n }\n }\n "])), fullWidth ? 'flex' : 'inline-flex', theme.palette.grey[700], theme.spacing(32), viewModeClassName, theme.palette.layer.n50, theme.spacing(0, 0.5, 0.5, 0), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, theme.spacing(1.3125, 1), theme.palette.error[500], theme.palette.error[500], theme.spacing(0), function (_a) {
|
|
6552
|
+
return styled.css(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n &.dot-inline-edit {\n display: ", ";\n align-items: center;\n color: ", ";\n min-width: ", "px;\n\n &:not(.", "):focus-visible {\n border-radius: ", "px;\n background-color: ", ";\n cursor: pointer;\n outline: 0;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .", " {\n display: flex;\n width: 100%;\n position: relative;\n\n .dot-edit-icon {\n height: 100%;\n position: absolute;\n right: 0;\n width: 40px;\n background-color: ", ";\n border-radius: ", ";\n display: none;\n\n .dot-i {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n // Display pointer and edit icon only when NOT in read only mode\n &:not(.", "):hover {\n border-radius: ", "px;\n background-color: ", ";\n cursor: pointer;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .dot-view-mode-typography {\n padding: ", ";\n margin-bottom: 0;\n }\n }\n\n .dot-empty-value fieldset {\n border-color: ", ";\n }\n\n .dot-adornment-error {\n color: ", ";\n }\n\n .MuiInputBase-input {\n height: auto;\n }\n\n .MuiInputBase-root {\n margin-bottom: ", "px;\n }\n\n /* Conditionally setting font related props */\n ", "\n\n .", " .dot-input {\n padding-left: ", "px;\n }\n\n .MuiOutlinedInput-input:focus {\n cursor: auto;\n }\n\n .dot-counter-adornment {\n .dot-counter-max-length {\n color: ", ";\n }\n\n .dot-counter-length,\n .dot-counter-max-length {\n &.dot-counter-limit {\n color: ", ";\n }\n }\n }\n\n .dot-read-only-adornment {\n display: none;\n }\n\n .", " {\n display: flex;\n align-items: center;\n margin: ", ";\n\n .dot-button {\n padding: ", "px;\n margin-top: ", ";\n margin-bottom: ", ";\n }\n }\n }\n "], ["\n &.dot-inline-edit {\n display: ", ";\n align-items: center;\n color: ", ";\n min-width: ", "px;\n\n &:not(.", "):focus-visible {\n border-radius: ", "px;\n background-color: ", ";\n cursor: pointer;\n outline: 0;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .", " {\n display: flex;\n width: 100%;\n position: relative;\n\n .dot-edit-icon {\n height: 100%;\n position: absolute;\n right: 0;\n width: 40px;\n background-color: ", ";\n border-radius: ", ";\n display: none;\n\n .dot-i {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n // Display pointer and edit icon only when NOT in read only mode\n &:not(.", "):hover {\n border-radius: ", "px;\n background-color: ", ";\n cursor: pointer;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .dot-view-mode-typography {\n padding: ", ";\n margin-bottom: 0;\n }\n }\n\n .dot-empty-value fieldset {\n border-color: ", ";\n }\n\n .dot-adornment-error {\n color: ", ";\n }\n\n .MuiInputBase-input {\n height: auto;\n }\n\n .MuiInputBase-root {\n margin-bottom: ", "px;\n }\n\n /* Conditionally setting font related props */\n ", "\n\n .", " .dot-input {\n padding-left: ", "px;\n }\n\n .MuiOutlinedInput-input:focus {\n cursor: auto;\n }\n\n .dot-counter-adornment {\n .dot-counter-max-length {\n color: ", ";\n }\n\n .dot-counter-length,\n .dot-counter-max-length {\n &.dot-counter-limit {\n color: ", ";\n }\n }\n }\n\n .dot-read-only-adornment {\n display: none;\n }\n\n .", " {\n display: flex;\n align-items: center;\n margin: ", ";\n\n .dot-button {\n padding: ", "px;\n margin-top: ", ";\n margin-bottom: ", ";\n }\n }\n }\n "])), fullWidth ? 'flex' : 'inline-flex', theme.palette.grey[700], theme.spacing(32), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, viewModeClassName, theme.palette.layer.n50, theme.spacing(0, 0.5, 0.5, 0), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, theme.spacing(1.3125, 1), theme.palette.error[500], theme.palette.error[500], theme.spacing(0), function (_a) {
|
|
6520
6553
|
var typography = _a.typography;
|
|
6521
6554
|
return typography && "\n .MuiInputBase-root {\n font-family: " + (theme.typography[typography].fontFamily || 'inherit') + ";\n font-size: " + theme.typography[typography].fontSize + "px;\n line-height: " + (theme.typography[typography].lineHeight || 'normal') + ";\n letter-spacing: " + (theme.typography[typography].letterSpacing || 'normal') + ";\n text-transform: " + (theme.typography[typography].textTransform || 'none') + ";\n }\n ";
|
|
6522
6555
|
}, editTextFieldClassName, theme.spacing(1), theme.palette.layer.n400, theme.palette.error[500], editActionsClassName, theme.spacing(0, 0, 0, 0.5), theme.spacing(0.75), theme.spacing(0), theme.spacing(0));
|
|
@@ -6615,29 +6648,42 @@
|
|
|
6615
6648
|
onEditStateChange = _a.onEditStateChange,
|
|
6616
6649
|
readOnly = _a.readOnly,
|
|
6617
6650
|
selectTextOnEdit = _a.selectTextOnEdit,
|
|
6651
|
+
_c = _a.tabIndex,
|
|
6652
|
+
tabIndex = _c === void 0 ? 0 : _c,
|
|
6618
6653
|
tooltip = _a.tooltip,
|
|
6619
|
-
|
|
6620
|
-
typography =
|
|
6621
|
-
|
|
6622
|
-
value =
|
|
6654
|
+
_d = _a.typography,
|
|
6655
|
+
typography = _d === void 0 ? 'body1' : _d,
|
|
6656
|
+
_e = _a.value,
|
|
6657
|
+
value = _e === void 0 ? '' : _e;
|
|
6623
6658
|
|
|
6624
|
-
var
|
|
6625
|
-
editing =
|
|
6626
|
-
setEditing =
|
|
6659
|
+
var _f = React.useState(false),
|
|
6660
|
+
editing = _f[0],
|
|
6661
|
+
setEditing = _f[1];
|
|
6662
|
+
|
|
6663
|
+
var _g = React.useState(false),
|
|
6664
|
+
showTooltip = _g[0],
|
|
6665
|
+
setShowTooltip = _g[1];
|
|
6627
6666
|
|
|
6628
|
-
var
|
|
6629
|
-
originalValue =
|
|
6630
|
-
setOriginalValue =
|
|
6667
|
+
var _h = React.useState(''),
|
|
6668
|
+
originalValue = _h[0],
|
|
6669
|
+
setOriginalValue = _h[1];
|
|
6631
6670
|
|
|
6632
|
-
var
|
|
6633
|
-
inputValue =
|
|
6634
|
-
setInputValue =
|
|
6671
|
+
var _j = React.useState(value),
|
|
6672
|
+
inputValue = _j[0],
|
|
6673
|
+
setInputValue = _j[1];
|
|
6635
6674
|
|
|
6675
|
+
var isNotReadOnlyOrEditing = !readOnly && !editing;
|
|
6636
6676
|
var inputRef = React.useRef();
|
|
6637
6677
|
var inlineEditRef = React.useRef();
|
|
6638
6678
|
var isSaveDisabled = checkIfEmptyValue(inputValue);
|
|
6639
6679
|
var rootClasses = useStylesWithRootClass(rootClassName$n, className, editing ? editModeClassName : '');
|
|
6640
6680
|
|
|
6681
|
+
var handleShowTooltip = function handleShowTooltip(visible) {
|
|
6682
|
+
if (isNotReadOnlyOrEditing) {
|
|
6683
|
+
setShowTooltip(visible);
|
|
6684
|
+
}
|
|
6685
|
+
};
|
|
6686
|
+
|
|
6641
6687
|
var handleInlineEditClick = function handleInlineEditClick() {
|
|
6642
6688
|
if (editing) return;
|
|
6643
6689
|
setOriginalValue(inputValue);
|
|
@@ -6657,6 +6703,7 @@
|
|
|
6657
6703
|
return __generator(this, function (_b) {
|
|
6658
6704
|
switch (_b.label) {
|
|
6659
6705
|
case 0:
|
|
6706
|
+
setShowTooltip(false);
|
|
6660
6707
|
if (isSaveDisabled) return [2
|
|
6661
6708
|
/*return*/
|
|
6662
6709
|
];
|
|
@@ -6695,6 +6742,7 @@
|
|
|
6695
6742
|
};
|
|
6696
6743
|
|
|
6697
6744
|
var handleCancel = function handleCancel() {
|
|
6745
|
+
setShowTooltip(false);
|
|
6698
6746
|
setEditing(false);
|
|
6699
6747
|
setInputValue(originalValue);
|
|
6700
6748
|
|
|
@@ -6729,7 +6777,14 @@
|
|
|
6729
6777
|
, 4];
|
|
6730
6778
|
|
|
6731
6779
|
case 1:
|
|
6732
|
-
|
|
6780
|
+
if (!editing) {
|
|
6781
|
+
handleInlineEditClick();
|
|
6782
|
+
return [2
|
|
6783
|
+
/*return*/
|
|
6784
|
+
];
|
|
6785
|
+
} // Save only when Enter is pressed within input field
|
|
6786
|
+
|
|
6787
|
+
|
|
6733
6788
|
if (inputRef.current !== event.target) return [2
|
|
6734
6789
|
/*return*/
|
|
6735
6790
|
];
|
|
@@ -6764,19 +6819,28 @@
|
|
|
6764
6819
|
return __generator(this, function (_a) {
|
|
6765
6820
|
switch (_a.label) {
|
|
6766
6821
|
case 0:
|
|
6822
|
+
if (!!editing) return [3
|
|
6823
|
+
/*break*/
|
|
6824
|
+
, 1];
|
|
6825
|
+
setShowTooltip(false);
|
|
6826
|
+
return [3
|
|
6827
|
+
/*break*/
|
|
6828
|
+
, 3];
|
|
6829
|
+
|
|
6830
|
+
case 1:
|
|
6767
6831
|
if (!(!event.relatedTarget || !inlineEditRef.current.contains(event.relatedTarget))) return [3
|
|
6768
6832
|
/*break*/
|
|
6769
|
-
,
|
|
6833
|
+
, 3];
|
|
6770
6834
|
return [4
|
|
6771
6835
|
/*yield*/
|
|
6772
6836
|
, handleSave()];
|
|
6773
6837
|
|
|
6774
|
-
case
|
|
6838
|
+
case 2:
|
|
6775
6839
|
_a.sent();
|
|
6776
6840
|
|
|
6777
|
-
_a.label =
|
|
6841
|
+
_a.label = 3;
|
|
6778
6842
|
|
|
6779
|
-
case
|
|
6843
|
+
case 3:
|
|
6780
6844
|
return [2
|
|
6781
6845
|
/*return*/
|
|
6782
6846
|
];
|
|
@@ -6815,7 +6879,8 @@
|
|
|
6815
6879
|
return tooltip ? jsxRuntime.jsx(DotTooltip, __assign({
|
|
6816
6880
|
title: tooltip,
|
|
6817
6881
|
className: viewModeClasses,
|
|
6818
|
-
"data-testid": dataTestId && dataTestId + "-view-mode-tooltip-wrapper"
|
|
6882
|
+
"data-testid": dataTestId && dataTestId + "-view-mode-tooltip-wrapper",
|
|
6883
|
+
open: showTooltip
|
|
6819
6884
|
}, {
|
|
6820
6885
|
children: viewModeChildren
|
|
6821
6886
|
}), void 0) : jsxRuntime.jsx("div", __assign({
|
|
@@ -6891,12 +6956,22 @@
|
|
|
6891
6956
|
className: rootClasses,
|
|
6892
6957
|
"data-testid": dataTestId,
|
|
6893
6958
|
fullWidth: fullWidth,
|
|
6894
|
-
onBlur: !readOnly
|
|
6959
|
+
onBlur: !readOnly ? handleBlur : undefined,
|
|
6895
6960
|
onClick: !readOnly ? handleInlineEditClick : undefined,
|
|
6961
|
+
onFocus: function () {
|
|
6962
|
+
return handleShowTooltip(true);
|
|
6963
|
+
},
|
|
6964
|
+
onMouseOver: function () {
|
|
6965
|
+
return handleShowTooltip(true);
|
|
6966
|
+
},
|
|
6967
|
+
onMouseOut: function () {
|
|
6968
|
+
return handleShowTooltip(false);
|
|
6969
|
+
},
|
|
6896
6970
|
onKeyDown: !readOnly ? function (event) {
|
|
6897
6971
|
return handleKeyPress(event);
|
|
6898
6972
|
} : undefined,
|
|
6899
6973
|
ref: inlineEditRef,
|
|
6974
|
+
tabIndex: !readOnly ? tabIndex : undefined,
|
|
6900
6975
|
typography: typography
|
|
6901
6976
|
}, {
|
|
6902
6977
|
children: editing ? renderEditMode() : renderViewMode()
|
|
@@ -8674,7 +8749,7 @@
|
|
|
8674
8749
|
componentId: "sc-6mp1tz-0"
|
|
8675
8750
|
})(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
8676
8751
|
var theme = _a.theme;
|
|
8677
|
-
return styled.css(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n &.", " {\n border-bottom: 1px solid ", ";\n &:hover {\n cursor: pointer;\n background: ", ";\n }\n\n &.file-success:not(:hover)
|
|
8752
|
+
return styled.css(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n &.", " {\n border-bottom: 1px solid ", ";\n &:hover {\n cursor: pointer;\n background: ", ";\n }\n\n &:focus-visible {\n background-color: ", ";\n outline: none;\n }\n\n &.file-success:not(:hover, :focus-visible) .", "-end-icon {\n i:before {\n color: ", ";\n }\n\n &:focus-visible i:before {\n color: unset;\n }\n }\n\n &.file-error:not(:hover, :focus-visible) .", "-end-icon {\n i:before,\n .MuiListItemText-secondary {\n color: ", ";\n }\n\n &:focus-visible i:before {\n color: unset;\n }\n }\n\n .dot-typography,\n .file-item-text {\n flex-grow: 2;\n padding-left: ", "px;\n }\n\n .file-item-text {\n display: flex;\n flex-direction: column;\n\n .MuiTypography-body2 {\n color: ", ";\n }\n }\n }\n "], ["\n &.", " {\n border-bottom: 1px solid ", ";\n &:hover {\n cursor: pointer;\n background: ", ";\n }\n\n &:focus-visible {\n background-color: ", ";\n outline: none;\n }\n\n &.file-success:not(:hover, :focus-visible) .", "-end-icon {\n i:before {\n color: ", ";\n }\n\n &:focus-visible i:before {\n color: unset;\n }\n }\n\n &.file-error:not(:hover, :focus-visible) .", "-end-icon {\n i:before,\n .MuiListItemText-secondary {\n color: ", ";\n }\n\n &:focus-visible i:before {\n color: unset;\n }\n }\n\n .dot-typography,\n .file-item-text {\n flex-grow: 2;\n padding-left: ", "px;\n }\n\n .file-item-text {\n display: flex;\n flex-direction: column;\n\n .MuiTypography-body2 {\n color: ", ";\n }\n }\n }\n "])), rootClassName$4, theme.palette.layer.n100, theme.palette.layer.n50, theme.palette.layer.n100, rootClassName$4, theme.palette.secondary.main, rootClassName$4, theme.palette.error.main, theme.spacing(1), theme.palette.error.main);
|
|
8678
8753
|
});
|
|
8679
8754
|
var templateObject_1$4, templateObject_2$4;
|
|
8680
8755
|
|
|
@@ -8688,13 +8763,16 @@
|
|
|
8688
8763
|
error = _b === void 0 ? false : _b,
|
|
8689
8764
|
errorText = _a.errorText,
|
|
8690
8765
|
file = _a.file,
|
|
8691
|
-
onClick = _a.onClick
|
|
8766
|
+
onClick = _a.onClick,
|
|
8767
|
+
onKeyPress = _a.onKeyPress,
|
|
8768
|
+
_c = _a.tabIndex,
|
|
8769
|
+
tabIndex = _c === void 0 ? 0 : _c;
|
|
8692
8770
|
var rootClasses = useStylesWithRootClass(rootClassName$4, className, error ? 'file-error' : 'file-success');
|
|
8693
8771
|
var defaultIcon = error ? 'error-solid' : 'check-solid';
|
|
8694
8772
|
|
|
8695
|
-
var
|
|
8696
|
-
endIcon =
|
|
8697
|
-
setEndIcon =
|
|
8773
|
+
var _d = React.useState(defaultIcon),
|
|
8774
|
+
endIcon = _d[0],
|
|
8775
|
+
setEndIcon = _d[1];
|
|
8698
8776
|
|
|
8699
8777
|
var handleItemClick = function handleItemClick(clickedFile) {
|
|
8700
8778
|
return function (_event) {
|
|
@@ -8713,13 +8791,21 @@
|
|
|
8713
8791
|
"aria-label": ariaLabel,
|
|
8714
8792
|
className: rootClasses,
|
|
8715
8793
|
"data-testid": dataTestId,
|
|
8794
|
+
onBlur: function () {
|
|
8795
|
+
return setEndIcon(defaultIcon);
|
|
8796
|
+
},
|
|
8716
8797
|
onClick: handleItemClick(file),
|
|
8798
|
+
onFocus: function () {
|
|
8799
|
+
return setEndIcon('delete');
|
|
8800
|
+
},
|
|
8717
8801
|
onMouseEnter: function () {
|
|
8718
8802
|
return setEndIcon('delete');
|
|
8719
8803
|
},
|
|
8720
8804
|
onMouseLeave: function () {
|
|
8721
8805
|
return setEndIcon(defaultIcon);
|
|
8722
|
-
}
|
|
8806
|
+
},
|
|
8807
|
+
onKeyPress: onKeyPress,
|
|
8808
|
+
tabIndex: tabIndex
|
|
8723
8809
|
}, {
|
|
8724
8810
|
children: [jsxRuntime.jsx(DotIcon, {
|
|
8725
8811
|
"data-testid": dataTestId && dataTestId + "-start-icon",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ReactNode, MouseEvent } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
import { IconButtonProps } from '../button/IconButton';
|
|
4
4
|
import { ListItemProps } from '../list';
|
|
@@ -39,9 +39,13 @@ export interface AppToolbarProps extends CommonProps {
|
|
|
39
39
|
mainMenuItems?: Array<ListItemProps>;
|
|
40
40
|
/** Width of main menu drawer if mainMenu provided, defaults to 240px */
|
|
41
41
|
mainMenuWidth?: number;
|
|
42
|
+
/** If true, the main menu will close if click detected off app toolbar children*/
|
|
43
|
+
menuCloseOnClickAway?: boolean;
|
|
42
44
|
/** Array of nav items to be displayed on the right side */
|
|
43
45
|
navItems?: Array<AppToolbarIconButtons>;
|
|
46
|
+
/** Event callback when leaving menu via tab or clicking away */
|
|
47
|
+
onClickAway?: (event: KeyboardEvent | MouseEvent) => void;
|
|
44
48
|
/** URL of the page the primary logo link will go to */
|
|
45
49
|
primaryLogoHref?: string;
|
|
46
50
|
}
|
|
47
|
-
export declare const DotAppToolbar: ({
|
|
51
|
+
export declare const DotAppToolbar: ({ ariaLabel, appLogo, appLogoHref, appLogoSmall, appName, avatar, borderColor, children, className, closeMenuOnItemClick, customLogo, "data-testid": dataTestId, dense, mainMenu, mainMenuItems, mainMenuWidth, menuCloseOnClickAway, navItems, onClickAway, primaryLogoHref, }: AppToolbarProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ListItemProps } from '../list';
|
|
3
|
+
export interface AppToolbarWrapperProps {
|
|
4
|
+
mainMenuItems?: Array<ListItemProps>;
|
|
5
|
+
menuCloseOnClickAway?: boolean;
|
|
6
|
+
onClickAway?: (event: globalThis.KeyboardEvent | React.MouseEvent<Element, globalThis.MouseEvent>) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const AppToolbarTestWrapper: (props: AppToolbarWrapperProps) => JSX.Element;
|
|
@@ -73,6 +73,8 @@ export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOp
|
|
|
73
73
|
open?: boolean;
|
|
74
74
|
/** pre-defined options available to the user */
|
|
75
75
|
options?: Array<T>;
|
|
76
|
+
/** If true, the label will be persistently displayed outside of the field */
|
|
77
|
+
persistentLabel?: boolean;
|
|
76
78
|
/** Placeholder text always displayed inside the input field */
|
|
77
79
|
placeholder?: string;
|
|
78
80
|
/** If true: popper cannot be opened, TextField is in read only mode, change is not allowed */
|
|
@@ -90,4 +92,4 @@ export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOp
|
|
|
90
92
|
/** If true, the label will be displayed in a warning state. */
|
|
91
93
|
warning?: boolean;
|
|
92
94
|
}
|
|
93
|
-
export declare const DotAutoComplete: <T extends AutoCompleteOption>({ actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterSelectedOptions, freesolo, group, helperText, inputId, inputRef, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, placeholder, readOnly, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => JSX.Element;
|
|
95
|
+
export declare const DotAutoComplete: <T extends AutoCompleteOption>({ actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterSelectedOptions, freesolo, group, helperText, inputId, inputRef, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, readOnly, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { KeyboardEvent } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export interface ListItemFile {
|
|
4
4
|
id: string | number;
|
|
@@ -11,5 +11,7 @@ export interface FileItemProps extends CommonProps {
|
|
|
11
11
|
errorText?: string;
|
|
12
12
|
file: ListItemFile;
|
|
13
13
|
onClick?: (file: ListItemFile) => void;
|
|
14
|
+
onKeyPress?: (event: KeyboardEvent<Element>) => void;
|
|
15
|
+
tabIndex?: number;
|
|
14
16
|
}
|
|
15
|
-
export declare const DotFileListItem: ({ ariaLabel, className, "data-testid": dataTestId, deleteFile, disableDelete, error, errorText, file, onClick, }: FileItemProps) => JSX.Element;
|
|
17
|
+
export declare const DotFileListItem: ({ ariaLabel, className, "data-testid": dataTestId, deleteFile, disableDelete, error, errorText, file, onClick, onKeyPress, tabIndex, }: FileItemProps) => JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FileUploadProps } from './';
|
|
2
|
+
import { FileUploadProps, MappedListItemFile } from './';
|
|
3
3
|
export interface CustomFileUploadArgs {
|
|
4
|
+
alreadyUploadedFiles?: MappedListItemFile[];
|
|
4
5
|
args: FileUploadProps;
|
|
5
6
|
}
|
|
6
|
-
export declare const CustomFileUpload: ({ args }: CustomFileUploadArgs) => JSX.Element;
|
|
7
|
+
export declare const CustomFileUpload: ({ args, alreadyUploadedFiles, }: CustomFileUploadArgs) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { FileRejection } from 'react-dropzone';
|
|
3
|
-
import { DropzoneContentArgs, ParseListItemArgs, UploadedFilesListArgs } from './models';
|
|
3
|
+
import { DropzoneContentArgs, FileUploadError, ParseListItemArgs, UploadedFilesListArgs } from './models';
|
|
4
4
|
export declare const renderMaxSizeMessage: (maxSizeMB: number) => ReactNode;
|
|
5
5
|
export declare const renderMaxFilesMessage: (maxFiles: number, maxFilesClasses: string) => ReactNode;
|
|
6
6
|
export declare const renderSelectFilesButton: (isUploadDisabled: boolean, onButtonClick: () => void) => ReactNode;
|
|
@@ -21,3 +21,4 @@ export declare const joinAcceptedAndRejectedFiles: (filesAccepted: File[], files
|
|
|
21
21
|
file: File;
|
|
22
22
|
errors: any[];
|
|
23
23
|
}[];
|
|
24
|
+
export declare const getErrorMessagesForDisplay: (errors: FileUploadError[]) => string;
|
|
@@ -21,6 +21,8 @@ export interface InlineEditProps extends CommonProps {
|
|
|
21
21
|
readOnly?: boolean;
|
|
22
22
|
/** If true, when starting edit it will select all text in the input */
|
|
23
23
|
selectTextOnEdit?: boolean;
|
|
24
|
+
/** tab order for the inline edit */
|
|
25
|
+
tabIndex?: number;
|
|
24
26
|
/** Tooltip text displayed on hover */
|
|
25
27
|
tooltip?: string;
|
|
26
28
|
/** Typography variant to be used */
|
|
@@ -31,4 +33,4 @@ export interface InlineEditProps extends CommonProps {
|
|
|
31
33
|
/**
|
|
32
34
|
* @experimental This component is still in development
|
|
33
35
|
*/
|
|
34
|
-
export declare const DotInlineEdit: ({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, tooltip, typography, value, }: InlineEditProps) => JSX.Element;
|
|
36
|
+
export declare const DotInlineEdit: ({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
export interface InputLabelProps extends CommonProps {
|
|
3
4
|
/** If true, the input will be disabled. */
|
|
4
5
|
disabled?: boolean;
|
|
5
6
|
/** If true, the label will be displayed in an error state. */
|
|
@@ -14,4 +15,4 @@ export interface InputLabelProps {
|
|
|
14
15
|
/** If true, the label is displayed as required and the input element` will be required. */
|
|
15
16
|
required?: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare const DotInputLabel: ({ disabled, error, id, label, required, }: InputLabelProps) => JSX.Element;
|
|
18
|
+
export declare const DotInputLabel: ({ "data-testid": dataTestId, disabled, error, id, label, required, }: InputLabelProps) => JSX.Element;
|