@digital-ai/dot-components 1.21.2 → 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 +24 -4
- package/index.esm.js +97 -67
- package/index.umd.js +108 -76
- 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/input-form-fields/InputLabel.d.ts +3 -2
- package/package.json +1 -1
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
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
|
+
|
|
3
26
|
## [1.21.2](https://github.com/digital-ai/dot-components/tree/1.21.2) (09/09/2022)
|
|
4
27
|
|
|
5
28
|
[Full Changelog](https://github.com/digital-ai/dot-components/compare/2.0.0-rc.1...1.21.2)
|
|
@@ -161,6 +184,7 @@
|
|
|
161
184
|
|
|
162
185
|
- Sidebar drawer/expanded does not have a data-testid prop supplied [\#1162](https://github.com/digital-ai/dot-components/issues/1162)
|
|
163
186
|
- D-21245: make sure `data-testid` is passed to nested lists [\#1182](https://github.com/digital-ai/dot-components/pull/1182) ([CWSites](https://github.com/CWSites))
|
|
187
|
+
- D-21267: adjust color of helper text [\#1174](https://github.com/digital-ai/dot-components/pull/1174) ([CWSites](https://github.com/CWSites))
|
|
164
188
|
|
|
165
189
|
## [1.17.1](https://github.com/digital-ai/dot-components/tree/1.17.1) (05/19/2022)
|
|
166
190
|
|
|
@@ -171,10 +195,6 @@
|
|
|
171
195
|
- `DotButtonToggle`: Button size is not respected after tooltip change [\#1170](https://github.com/digital-ai/dot-components/issues/1170)
|
|
172
196
|
- D-21287: `DotButtonToggle`: Button size is not respected after tooltip change [\#1171](https://github.com/digital-ai/dot-components/pull/1171) ([dmiletic85](https://github.com/dmiletic85))
|
|
173
197
|
|
|
174
|
-
**Merged pull requests:**
|
|
175
|
-
|
|
176
|
-
- S-84160: `InputText` and `InputSelect` fields e2e [\#1177](https://github.com/digital-ai/dot-components/pull/1177) ([CWSites](https://github.com/CWSites))
|
|
177
|
-
|
|
178
198
|
## [1.17.0](https://github.com/digital-ai/dot-components/tree/1.17.0) (05/18/2022)
|
|
179
199
|
|
|
180
200
|
[Full Changelog](https://github.com/digital-ai/dot-components/compare/1.16.1...1.17.0)
|
package/index.esm.js
CHANGED
|
@@ -2681,11 +2681,11 @@ const StyledAppToolbar = styled.header.withConfig({
|
|
|
2681
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));
|
|
2682
2682
|
|
|
2683
2683
|
const DotAppToolbar = ({
|
|
2684
|
-
|
|
2684
|
+
ariaLabel,
|
|
2685
2685
|
appLogo,
|
|
2686
2686
|
appLogoHref: _appLogoHref = '/',
|
|
2687
2687
|
appLogoSmall,
|
|
2688
|
-
|
|
2688
|
+
appName,
|
|
2689
2689
|
avatar,
|
|
2690
2690
|
borderColor,
|
|
2691
2691
|
children,
|
|
@@ -2694,10 +2694,12 @@ const DotAppToolbar = ({
|
|
|
2694
2694
|
customLogo,
|
|
2695
2695
|
'data-testid': dataTestId,
|
|
2696
2696
|
dense: _dense = true,
|
|
2697
|
-
navItems: _navItems = [],
|
|
2698
2697
|
mainMenu,
|
|
2699
2698
|
mainMenuItems,
|
|
2700
2699
|
mainMenuWidth: _mainMenuWidth = 240,
|
|
2700
|
+
menuCloseOnClickAway: _menuCloseOnClickAway = false,
|
|
2701
|
+
navItems: _navItems = [],
|
|
2702
|
+
onClickAway,
|
|
2701
2703
|
primaryLogoHref: _primaryLogoHref = '/'
|
|
2702
2704
|
}) => {
|
|
2703
2705
|
const [menuOpen, updateMenuOpen] = useState(false);
|
|
@@ -2757,7 +2759,7 @@ const DotAppToolbar = ({
|
|
|
2757
2759
|
}), index);
|
|
2758
2760
|
});
|
|
2759
2761
|
|
|
2760
|
-
|
|
2762
|
+
const appToolbar = jsxs(StyledAppToolbar, Object.assign({
|
|
2761
2763
|
"aria-label": ariaLabel,
|
|
2762
2764
|
className: rootClasses,
|
|
2763
2765
|
"data-testid": dataTestId,
|
|
@@ -2843,6 +2845,21 @@ const DotAppToolbar = ({
|
|
|
2843
2845
|
}), void 0)]
|
|
2844
2846
|
}), void 0)]
|
|
2845
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;
|
|
2846
2863
|
};
|
|
2847
2864
|
|
|
2848
2865
|
const rootClassName$H = 'dot-autocomplete';
|
|
@@ -2853,7 +2870,7 @@ const StyledAutocomplete = styled(Autocomplete).withConfig({
|
|
|
2853
2870
|
componentId: "j2sgjy-0"
|
|
2854
2871
|
})(["", ""], ({
|
|
2855
2872
|
theme
|
|
2856
|
-
}) => 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));
|
|
2857
2874
|
|
|
2858
2875
|
const rootClassName$G = 'dot-text-field';
|
|
2859
2876
|
const rootSelectClassName = 'dot-select-field';
|
|
@@ -2877,7 +2894,7 @@ const StyledTextField = styled(TextField).withConfig({
|
|
|
2877
2894
|
})(["", ""], ({
|
|
2878
2895
|
theme,
|
|
2879
2896
|
InputProps
|
|
2880
|
-
}) => 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));
|
|
2881
2898
|
|
|
2882
2899
|
const rootClassName$F = 'dot-button';
|
|
2883
2900
|
const StyledButton = styled(Button).withConfig({
|
|
@@ -2885,7 +2902,7 @@ const StyledButton = styled(Button).withConfig({
|
|
|
2885
2902
|
componentId: "sx99hh-0"
|
|
2886
2903
|
})(["", ""], ({
|
|
2887
2904
|
theme
|
|
2888
|
-
}) => 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)));
|
|
2889
2906
|
|
|
2890
2907
|
/** This component wraps the Button component from @material-ui. */
|
|
2891
2908
|
|
|
@@ -3077,6 +3094,34 @@ const getChipsFromAutocomplete = ({
|
|
|
3077
3094
|
};
|
|
3078
3095
|
const checkIfDuplicateItem = (itemText, autocompleteOptions) => autocompleteOptions.some(autocompleteOption => autocompleteOption.title === itemText);
|
|
3079
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
|
+
|
|
3080
3125
|
const DEFAULT_ACTION_ITEM_TEXT = 'Add new item';
|
|
3081
3126
|
const DotAutoComplete = ({
|
|
3082
3127
|
actionItem,
|
|
@@ -3107,6 +3152,7 @@ const DotAutoComplete = ({
|
|
|
3107
3152
|
onOpen,
|
|
3108
3153
|
open,
|
|
3109
3154
|
options,
|
|
3155
|
+
persistentLabel,
|
|
3110
3156
|
placeholder,
|
|
3111
3157
|
readOnly: _readOnly = false,
|
|
3112
3158
|
renderOption,
|
|
@@ -3365,39 +3411,49 @@ const DotAutoComplete = ({
|
|
|
3365
3411
|
// at least pick up any styling that is used there. Should additional
|
|
3366
3412
|
// functionality be added to DotInputText we will have to make a
|
|
3367
3413
|
// decision about if/how to expose it here.
|
|
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
|
-
|
|
3400
|
-
|
|
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)
|
|
3401
3457
|
);
|
|
3402
3458
|
},
|
|
3403
3459
|
renderOption: renderOption,
|
|
@@ -3834,7 +3890,7 @@ const StyledToggleButtonGroup = styled(ToggleButtonGroup).withConfig({
|
|
|
3834
3890
|
componentId: "sc-1oh4ljv-0"
|
|
3835
3891
|
})(["", ""], ({
|
|
3836
3892
|
theme
|
|
3837
|
-
}) => 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]));
|
|
3838
3894
|
|
|
3839
3895
|
const DotButtonToggle = ({
|
|
3840
3896
|
ariaLabel,
|
|
@@ -4933,32 +4989,6 @@ const checkIfFormDataValid = formState => {
|
|
|
4933
4989
|
return true;
|
|
4934
4990
|
};
|
|
4935
4991
|
|
|
4936
|
-
const DotInputLabel = ({
|
|
4937
|
-
disabled: _disabled = false,
|
|
4938
|
-
error: _error = false,
|
|
4939
|
-
id,
|
|
4940
|
-
label,
|
|
4941
|
-
required
|
|
4942
|
-
}) => {
|
|
4943
|
-
return jsx(StyledInputLabel, Object.assign({
|
|
4944
|
-
classes: {
|
|
4945
|
-
root: labelClassName
|
|
4946
|
-
},
|
|
4947
|
-
disabled: _disabled,
|
|
4948
|
-
error: _error,
|
|
4949
|
-
htmlFor: id,
|
|
4950
|
-
required: required,
|
|
4951
|
-
shrink: false,
|
|
4952
|
-
variant: "outlined"
|
|
4953
|
-
}, {
|
|
4954
|
-
children: jsx(DotTypography, Object.assign({
|
|
4955
|
-
variant: "subtitle2"
|
|
4956
|
-
}, {
|
|
4957
|
-
children: label
|
|
4958
|
-
}), void 0)
|
|
4959
|
-
}), void 0);
|
|
4960
|
-
};
|
|
4961
|
-
|
|
4962
4992
|
const DELAY_MS = 300;
|
|
4963
4993
|
|
|
4964
4994
|
const EndAdornment = ({
|
package/index.umd.js
CHANGED
|
@@ -2921,12 +2921,12 @@
|
|
|
2921
2921
|
var templateObject_1$L, templateObject_2$J, templateObject_3$8, templateObject_4$6;
|
|
2922
2922
|
|
|
2923
2923
|
var DotAppToolbar = function DotAppToolbar(_a) {
|
|
2924
|
-
var
|
|
2924
|
+
var ariaLabel = _a.ariaLabel,
|
|
2925
2925
|
appLogo = _a.appLogo,
|
|
2926
2926
|
_b = _a.appLogoHref,
|
|
2927
2927
|
appLogoHref = _b === void 0 ? '/' : _b,
|
|
2928
2928
|
appLogoSmall = _a.appLogoSmall,
|
|
2929
|
-
|
|
2929
|
+
appName = _a.appName,
|
|
2930
2930
|
avatar = _a.avatar,
|
|
2931
2931
|
borderColor = _a.borderColor,
|
|
2932
2932
|
children = _a.children,
|
|
@@ -2936,18 +2936,21 @@
|
|
|
2936
2936
|
dataTestId = _a["data-testid"],
|
|
2937
2937
|
_c = _a.dense,
|
|
2938
2938
|
dense = _c === void 0 ? true : _c,
|
|
2939
|
-
_d = _a.navItems,
|
|
2940
|
-
navItems = _d === void 0 ? [] : _d,
|
|
2941
2939
|
mainMenu = _a.mainMenu,
|
|
2942
2940
|
mainMenuItems = _a.mainMenuItems,
|
|
2943
|
-
|
|
2944
|
-
mainMenuWidth =
|
|
2945
|
-
|
|
2946
|
-
|
|
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;
|
|
2947
2950
|
|
|
2948
|
-
var
|
|
2949
|
-
menuOpen =
|
|
2950
|
-
updateMenuOpen =
|
|
2951
|
+
var _h = React.useState(false),
|
|
2952
|
+
menuOpen = _h[0],
|
|
2953
|
+
updateMenuOpen = _h[1];
|
|
2951
2954
|
|
|
2952
2955
|
var showMainMenu = mainMenu || mainMenuItems;
|
|
2953
2956
|
var displayAppLogo = appLogo || appLogoSmall;
|
|
@@ -3007,7 +3010,8 @@
|
|
|
3007
3010
|
}, index)
|
|
3008
3011
|
}), index);
|
|
3009
3012
|
});
|
|
3010
|
-
|
|
3013
|
+
|
|
3014
|
+
var appToolbar = jsxRuntime.jsxs(StyledAppToolbar, __assign({
|
|
3011
3015
|
"aria-label": ariaLabel,
|
|
3012
3016
|
className: rootClasses,
|
|
3013
3017
|
"data-testid": dataTestId,
|
|
@@ -3097,6 +3101,21 @@
|
|
|
3097
3101
|
}), void 0)]
|
|
3098
3102
|
}), void 0)]
|
|
3099
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;
|
|
3100
3119
|
};
|
|
3101
3120
|
|
|
3102
3121
|
var rootClassName$H = 'dot-autocomplete';
|
|
@@ -3107,7 +3126,7 @@
|
|
|
3107
3126
|
componentId: "j2sgjy-0"
|
|
3108
3127
|
})(templateObject_2$I || (templateObject_2$I = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
3109
3128
|
var theme = _a.theme;
|
|
3110
|
-
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);
|
|
3111
3130
|
});
|
|
3112
3131
|
var templateObject_1$K, templateObject_2$I;
|
|
3113
3132
|
|
|
@@ -3134,7 +3153,7 @@
|
|
|
3134
3153
|
})(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
3135
3154
|
var theme = _a.theme,
|
|
3136
3155
|
InputProps = _a.InputProps;
|
|
3137
|
-
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);
|
|
3138
3157
|
});
|
|
3139
3158
|
var templateObject_1$J, templateObject_2$H, templateObject_3$7, templateObject_4$5, templateObject_5$1;
|
|
3140
3159
|
|
|
@@ -3144,7 +3163,7 @@
|
|
|
3144
3163
|
componentId: "sx99hh-0"
|
|
3145
3164
|
})(templateObject_2$G || (templateObject_2$G = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
3146
3165
|
var theme = _a.theme;
|
|
3147
|
-
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));
|
|
3148
3167
|
});
|
|
3149
3168
|
var templateObject_1$I, templateObject_2$G;
|
|
3150
3169
|
|
|
@@ -3362,6 +3381,35 @@
|
|
|
3362
3381
|
});
|
|
3363
3382
|
};
|
|
3364
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
|
+
|
|
3365
3413
|
var DEFAULT_ACTION_ITEM_TEXT = 'Add new item';
|
|
3366
3414
|
var DotAutoComplete = function DotAutoComplete(_a) {
|
|
3367
3415
|
var actionItem = _a.actionItem,
|
|
@@ -3400,6 +3448,7 @@
|
|
|
3400
3448
|
onOpen = _a.onOpen,
|
|
3401
3449
|
open = _a.open,
|
|
3402
3450
|
options = _a.options,
|
|
3451
|
+
persistentLabel = _a.persistentLabel,
|
|
3403
3452
|
placeholder = _a.placeholder,
|
|
3404
3453
|
_k = _a.readOnly,
|
|
3405
3454
|
readOnly = _k === void 0 ? false : _k,
|
|
@@ -3682,39 +3731,49 @@
|
|
|
3682
3731
|
// at least pick up any styling that is used there. Should additional
|
|
3683
3732
|
// functionality be added to DotInputText we will have to make a
|
|
3684
3733
|
// decision about if/how to expose it here.
|
|
3685
|
-
jsxRuntime.
|
|
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
|
-
|
|
3717
|
-
|
|
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)
|
|
3718
3777
|
);
|
|
3719
3778
|
},
|
|
3720
3779
|
renderOption: renderOption,
|
|
@@ -4138,7 +4197,7 @@
|
|
|
4138
4197
|
componentId: "sc-1oh4ljv-0"
|
|
4139
4198
|
})(templateObject_2$D || (templateObject_2$D = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
4140
4199
|
var theme = _a.theme;
|
|
4141
|
-
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]);
|
|
4142
4201
|
});
|
|
4143
4202
|
var templateObject_1$F, templateObject_2$D;
|
|
4144
4203
|
|
|
@@ -5292,33 +5351,6 @@
|
|
|
5292
5351
|
return true;
|
|
5293
5352
|
};
|
|
5294
5353
|
|
|
5295
|
-
var DotInputLabel = function DotInputLabel(_a) {
|
|
5296
|
-
var _b = _a.disabled,
|
|
5297
|
-
disabled = _b === void 0 ? false : _b,
|
|
5298
|
-
_c = _a.error,
|
|
5299
|
-
error = _c === void 0 ? false : _c,
|
|
5300
|
-
id = _a.id,
|
|
5301
|
-
label = _a.label,
|
|
5302
|
-
required = _a.required;
|
|
5303
|
-
return jsxRuntime.jsx(StyledInputLabel, __assign({
|
|
5304
|
-
classes: {
|
|
5305
|
-
root: labelClassName
|
|
5306
|
-
},
|
|
5307
|
-
disabled: disabled,
|
|
5308
|
-
error: error,
|
|
5309
|
-
htmlFor: id,
|
|
5310
|
-
required: required,
|
|
5311
|
-
shrink: false,
|
|
5312
|
-
variant: "outlined"
|
|
5313
|
-
}, {
|
|
5314
|
-
children: jsxRuntime.jsx(DotTypography, __assign({
|
|
5315
|
-
variant: "subtitle2"
|
|
5316
|
-
}, {
|
|
5317
|
-
children: label
|
|
5318
|
-
}), void 0)
|
|
5319
|
-
}), void 0);
|
|
5320
|
-
};
|
|
5321
|
-
|
|
5322
5354
|
var DELAY_MS = 300;
|
|
5323
5355
|
|
|
5324
5356
|
var EndAdornment = function EndAdornment(_a) {
|
|
@@ -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,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;
|