@digital-ai/dot-components 1.17.1 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGE_LOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.19.0](https://github.com/digital-ai/dot-components/tree/1.19.0) (07/11/2022)
4
+
5
+ [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.18.0...1.19.0)
6
+
7
+ **Features:**
8
+
9
+ - `SplitButton` Improvements [\#1180](https://github.com/digital-ai/dot-components/issues/1180)
10
+ - S-85293: `SplitButton` Improvements [\#1201](https://github.com/digital-ai/dot-components/pull/1201) ([dmiletic85](https://github.com/dmiletic85))
11
+
12
+ **Fixed bugs:**
13
+
14
+ - `DotAutocomplete` with action item, on enter key if no option is selected should trigger the action AND close it [\#1203](https://github.com/digital-ai/dot-components/issues/1203)
15
+ - `Typography` Lato 700 is not rendered correctly on Safari with dot-components [\#818](https://github.com/digital-ai/dot-components/issues/818)
16
+ - D-21935 `DotAutocomplete` with action item, on enter key if no option is selected should trigger the action AND close it [\#1204](https://github.com/digital-ai/dot-components/pull/1204) ([angel-git](https://github.com/angel-git))
17
+ - D-19158: safari font weight [\#1175](https://github.com/digital-ai/dot-components/pull/1175) ([CWSites](https://github.com/CWSites))
18
+
19
+ ## [1.18.0](https://github.com/digital-ai/dot-components/tree/1.18.0) (06/21/2022)
20
+
21
+ [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.17.2...1.18.0)
22
+
23
+ **Features:**
24
+
25
+ - S-85256: `Map` component example in demo app [\#1184](https://github.com/digital-ai/dot-components/pull/1184) ([dmiletic85](https://github.com/dmiletic85))
26
+
27
+ **Fixed bugs:**
28
+
29
+ - `DotAutcomplete` loading spinner is in wrong position when `freesolo` is not enabled [\#1188](https://github.com/digital-ai/dot-components/issues/1188)
30
+ - `DotDraggableList` 4 issues in 1 [\#1183](https://github.com/digital-ai/dot-components/issues/1183)
31
+ - D-21609: `DotAutocomplete` allow `null` as value [\#1195](https://github.com/digital-ai/dot-components/pull/1195) ([dmiletic85](https://github.com/dmiletic85))
32
+ - D-21606 `DotAutcomplete` loading spinner is in wrong position when `freesolo` is not enabled [\#1194](https://github.com/digital-ai/dot-components/pull/1194) ([angel-git](https://github.com/angel-git))
33
+ - D-21577: `DraggableList` improvements and bug fixes [\#1190](https://github.com/digital-ai/dot-components/pull/1190) ([dmiletic85](https://github.com/dmiletic85))
34
+
35
+ **Closed issues:**
36
+
37
+ - `DotAutocomplete` allow `null` as value [\#1189](https://github.com/digital-ai/dot-components/issues/1189)
38
+
39
+ **Merged pull requests:**
40
+
41
+ - `master` \> `develop` [\#1187](https://github.com/digital-ai/dot-components/pull/1187) ([TheKeithStewart](https://github.com/TheKeithStewart))
42
+
43
+ ## [1.17.2](https://github.com/digital-ai/dot-components/tree/1.17.2) (06/10/2022)
44
+
45
+ [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.17.1...1.17.2)
46
+
47
+ **Features:**
48
+
49
+ - `InlineEdit` component should provide a tooltip out the box [\#1179](https://github.com/digital-ai/dot-components/issues/1179)
50
+ - S-84117: As a customer admin, I want the IdP creation flow to be more intuitive, as I find the existing user flow a little overwhelming [\#1185](https://github.com/digital-ai/dot-components/pull/1185) ([ryangamble](https://github.com/ryangamble))
51
+ - S-85283: `InlineEdit` component should provide a tooltip out the box [\#1181](https://github.com/digital-ai/dot-components/pull/1181) ([dmiletic85](https://github.com/dmiletic85))
52
+
53
+ **Fixed bugs:**
54
+
55
+ - Sidebar drawer/expanded does not have a data-testid prop supplied [\#1162](https://github.com/digital-ai/dot-components/issues/1162)
56
+ - 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))
57
+ - D-21267: adjust color of helper text [\#1174](https://github.com/digital-ai/dot-components/pull/1174) ([CWSites](https://github.com/CWSites))
58
+
3
59
  ## [1.17.1](https://github.com/digital-ai/dot-components/tree/1.17.1) (05/19/2022)
4
60
 
5
61
  [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.17.0...1.17.1)
@@ -96,6 +152,7 @@
96
152
 
97
153
  - `InlineEdit` Support for different text in view/edit modes [\#1103](https://github.com/digital-ai/dot-components/issues/1103)
98
154
  - S-83748: `InlineEdit`: Support for different text in view/edit modes [\#1105](https://github.com/digital-ai/dot-components/pull/1105) ([dmiletic85](https://github.com/dmiletic85))
155
+ - S-76904: `InlineEdit` improvements [\#1053](https://github.com/digital-ai/dot-components/pull/1053) ([dmiletic85](https://github.com/dmiletic85))
99
156
 
100
157
  **Fixed bugs:**
101
158
 
@@ -138,7 +195,7 @@
138
195
  - S-82453: `TruncateWithTooltip`: Create new component [\#1072](https://github.com/digital-ai/dot-components/pull/1072) ([dmiletic85](https://github.com/dmiletic85))
139
196
  - S-82519: `Snackbar` Allow positioning [\#1064](https://github.com/digital-ai/dot-components/pull/1064) ([dmiletic85](https://github.com/dmiletic85))
140
197
  - S-82617: `DotInputText` Expose mouse up event [\#1063](https://github.com/digital-ai/dot-components/pull/1063) ([dmiletic85](https://github.com/dmiletic85))
141
- - S-76904: `InlineEdit` improvements [\#1053](https://github.com/digital-ai/dot-components/pull/1053) ([dmiletic85](https://github.com/dmiletic85))
198
+ - S-82059: `DraggableList`: Create and export the component [\#1003](https://github.com/digital-ai/dot-components/pull/1003) ([dmiletic85](https://github.com/dmiletic85))
142
199
 
143
200
  **Fixed bugs:**
144
201
 
@@ -270,7 +327,6 @@
270
327
  - Add class prop into `ButtonToggleProps` [\#990](https://github.com/digital-ai/dot-components/issues/990)
271
328
  - Expose `Divider` [\#989](https://github.com/digital-ai/dot-components/issues/989)
272
329
  - Expose `Popper` [\#975](https://github.com/digital-ai/dot-components/issues/975)
273
- - S-82059: `DraggableList`: Create and export the component [\#1003](https://github.com/digital-ai/dot-components/pull/1003) ([dmiletic85](https://github.com/dmiletic85))
274
330
  - S-81968: `ButtonToggle`: Add class prop into `ButtonToggleProps` and export relevant types and interfaces [\#993](https://github.com/digital-ai/dot-components/pull/993) ([dmiletic85](https://github.com/dmiletic85))
275
331
  - S-81966: `Divider`: Create and expose `Divider` component [\#992](https://github.com/digital-ai/dot-components/pull/992) ([dmiletic85](https://github.com/dmiletic85))
276
332
  - S-81656: `Popper`: Create and expose `Popper` component [\#988](https://github.com/digital-ai/dot-components/pull/988) ([dmiletic85](https://github.com/dmiletic85))
@@ -782,7 +838,6 @@
782
838
  - S-79291: update nested dependencies [\#700](https://github.com/digital-ai/dot-components/pull/700) ([CWSites](https://github.com/CWSites))
783
839
  - S-78832: Agility icon & badge updates [\#698](https://github.com/digital-ai/dot-components/pull/698) ([CWSites](https://github.com/CWSites))
784
840
  - S-79251: add workflow for sonarqube scan when code merged to develop [\#697](https://github.com/digital-ai/dot-components/pull/697) ([CWSites](https://github.com/CWSites))
785
- - pass value to tab [\#694](https://github.com/digital-ai/dot-components/pull/694) ([kmmarsh](https://github.com/kmmarsh))
786
841
  - S-76906: table action column [\#692](https://github.com/digital-ai/dot-components/pull/692) ([monapatel91](https://github.com/monapatel91))
787
842
 
788
843
  ## [1.1.0](https://github.com/digital-ai/dot-components/tree/1.1.0) (09/29/2021)
@@ -796,6 +851,7 @@
796
851
  **Merged pull requests:**
797
852
 
798
853
  - MINOR release [\#695](https://github.com/digital-ai/dot-components/pull/695) ([CWSites](https://github.com/CWSites))
854
+ - pass value to tab [\#694](https://github.com/digital-ai/dot-components/pull/694) ([kmmarsh](https://github.com/kmmarsh))
799
855
  - S-78831: update AppToolbar component for Agility [\#691](https://github.com/digital-ai/dot-components/pull/691) ([CWSites](https://github.com/CWSites))
800
856
 
801
857
  ## [1.0.12](https://github.com/digital-ai/dot-components/tree/1.0.12) (09/23/2021)
package/fonts/fonts.ts CHANGED
@@ -12,7 +12,7 @@ export const GlobalFonts = createGlobalStyle`
12
12
  }
13
13
 
14
14
  @font-face {
15
- font-family: 'LatoBold';
15
+ font-family: 'Lato';
16
16
  font-weight: 700;
17
17
  src: url(${LatoBold}) format('woff');
18
18
  }
package/index.esm.js CHANGED
@@ -128,7 +128,7 @@ const GlobalFonts = createGlobalStyle(_t || (_t = _`
128
128
  }
129
129
 
130
130
  @font-face {
131
- font-family: 'LatoBold';
131
+ font-family: 'Lato';
132
132
  font-weight: 700;
133
133
  src: url(${0}) format('woff');
134
134
  }
@@ -416,42 +416,49 @@ const typographyOptions = {
416
416
  },
417
417
  h1: {
418
418
  fontSize: 24,
419
- fontFamily: 'LatoBold, sans-serif',
419
+ fontFamily: 'Lato, sans-serif',
420
+ fontWeight: 700,
420
421
  lineHeight: '30px'
421
422
  },
422
423
  h2: {
423
424
  fontSize: 20,
424
- fontFamily: 'LatoBold, sans-serif',
425
+ fontFamily: 'Lato, sans-serif',
426
+ fontWeight: 700,
425
427
  lineHeight: '26px',
426
428
  letterSpacing: '0.02em'
427
429
  },
428
430
  h3: {
429
431
  fontSize: 17,
430
- fontFamily: 'LatoBold, sans-serif',
432
+ fontFamily: 'Lato, sans-serif',
433
+ fontWeight: 700,
431
434
  lineHeight: '24px',
432
435
  letterSpacing: '0.02em'
433
436
  },
434
437
  h4: {
435
438
  fontSize: 14,
436
- fontFamily: 'LatoBold, sans-serif',
439
+ fontFamily: 'Lato, sans-serif',
440
+ fontWeight: 700,
437
441
  lineHeight: '18px',
438
442
  letterSpacing: '0.03em'
439
443
  },
440
444
  h5: {
441
445
  fontSize: 12,
442
- fontFamily: 'LatoBold, sans-serif',
446
+ fontFamily: 'Lato, sans-serif',
447
+ fontWeight: 700,
443
448
  lineHeight: '18px',
444
449
  letterSpacing: '0.03em'
445
450
  },
446
451
  subtitle1: {
447
- fontFamily: 'LatoBold, sans-serif',
452
+ fontFamily: 'Lato, sans-serif',
453
+ fontWeight: 700,
448
454
  fontSize: 17,
449
455
  lineHeight: '23px',
450
456
  letterSpacing: '0.03em',
451
457
  marginBottom: 1
452
458
  },
453
459
  subtitle2: {
454
- fontFamily: 'LatoBold, sans-serif',
460
+ fontFamily: 'Lato, sans-serif',
461
+ fontWeight: 700,
455
462
  fontSize: 14,
456
463
  lineHeight: '20px',
457
464
  letterSpacing: '0.03em',
@@ -471,7 +478,8 @@ const typographyOptions = {
471
478
  },
472
479
  caption: {
473
480
  fontSize: 10,
474
- fontFamily: 'LatoBold, sans-serif',
481
+ fontFamily: 'Lato, sans-serif',
482
+ fontWeight: 700,
475
483
  lineHeight: '16px',
476
484
  letterSpacing: '0.03em',
477
485
  marginBottom: 3
@@ -2084,6 +2092,7 @@ const DotListItem = ({
2084
2092
  }, showStartIcon && renderListItemStartIcon(), renderListItemText()), showEndIcon && renderListItemEndIcon())), hasChildren && /*#__PURE__*/React__default.createElement(NestedList, {
2085
2093
  anchorEl: anchorEl,
2086
2094
  ariaLabel: "nested list",
2095
+ "data-testid": "nestedList",
2087
2096
  items: _items2,
2088
2097
  menuPlacement: menuPlacement,
2089
2098
  nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
@@ -2095,6 +2104,7 @@ const DotListItem = ({
2095
2104
  const NestedList = ({
2096
2105
  ariaLabel,
2097
2106
  anchorEl,
2107
+ 'data-testid': dataTestId,
2098
2108
  items,
2099
2109
  menuPlacement,
2100
2110
  nestedDrawerLeftSpacing,
@@ -2121,6 +2131,7 @@ const NestedList = ({
2121
2131
  ariaLabel: ariaLabel,
2122
2132
  className: nestedListClassName,
2123
2133
  component: "div",
2134
+ "data-testid": dataTestId,
2124
2135
  disablePadding: true,
2125
2136
  items: items,
2126
2137
  key: parentItemIndex
@@ -2145,6 +2156,7 @@ const NestedList = ({
2145
2156
  }, /*#__PURE__*/React__default.createElement(StyledListItem, {
2146
2157
  className: flyoutItemClasses,
2147
2158
  component: href && !onClick ? 'a' : null,
2159
+ "data-testid": `${dataTestId}-item-${index}`,
2148
2160
  href: href,
2149
2161
  key: `${parentItemIndex}-${index}`,
2150
2162
  onClick: onClick,
@@ -2162,6 +2174,7 @@ const NestedList = ({
2162
2174
  anchorEl: anchorEl,
2163
2175
  ariaLabel: ariaLabel,
2164
2176
  className: flyoutMenuClassName,
2177
+ "data-testid": dataTestId,
2165
2178
  id: CreateUUID(),
2166
2179
  key: parentItemIndex,
2167
2180
  menuItemHeight: "auto",
@@ -2188,6 +2201,7 @@ const NestedList = ({
2188
2201
  ariaLabel: ariaLabel,
2189
2202
  className: nestedListClassName,
2190
2203
  component: "div",
2204
+ "data-testid": dataTestId,
2191
2205
  disablePadding: true,
2192
2206
  items: items,
2193
2207
  key: parentItemIndex,
@@ -2678,7 +2692,7 @@ const StyledTextField = styled(TextField).withConfig({
2678
2692
  })(["", ""], ({
2679
2693
  theme,
2680
2694
  InputProps
2681
- }) => css(["&.", "{.MuiInputBase-root{background:", "}.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:", ";}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", "{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;}.MuiOutlinedInput-adornedEnd{padding-right:12px;}.MuiFormHelperText-root{font-family:", ";font-size:", "px;margin:", ";display:flex;align-items:flex-end;&:not(.Mui-error){color:", ";}}.Mui-focused .MuiOutlinedInput-notchedOutline{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[500], InputProps.endAdornment ? `44px` : `12px`, warningClassName, theme.palette.warning[500], theme.palette.grey[700], adornmentIconClassName, theme.palette.warning[500], theme.typography.body2.fontFamily, theme.typography.body2.fontSize, theme.spacing(0, 0, 0, 2), theme.palette.grey[700], theme.palette.product === 'agility' && agilityGreen));
2695
+ }) => css(["&.", "{.MuiInputBase-root{background:", "}.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:", ";}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", "{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;}.MuiOutlinedInput-adornedEnd{padding-right: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:", ";}"], 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[500], InputProps.endAdornment ? `44px` : `12px`, warningClassName, theme.palette.warning[500], theme.palette.grey[700], adornmentIconClassName, theme.palette.warning[500], theme.typography.body2.fontFamily, theme.typography.body2.fontSize, theme.spacing(0, 0, 0, 2), theme.palette.grey[400], theme.palette.product === 'agility' && agilityGreen));
2682
2696
 
2683
2697
  const rootClassName$F = 'dot-button';
2684
2698
  const StyledButton = styled(Button).withConfig({
@@ -2905,6 +2919,7 @@ const DotAutoComplete = ({
2905
2919
  preventDuplicateInsertion
2906
2920
  } = actionItem || {};
2907
2921
  const isActionItemDefined = onActionItemClick !== undefined;
2922
+ let highlightedOption = null;
2908
2923
  const [isOpened, setIsOpened] = useState(false);
2909
2924
  const [inputText, setInputText] = useState('');
2910
2925
  const rootClasses = useStylesWithRootClass(rootClassName$H, className);
@@ -2946,7 +2961,13 @@ const DotAutoComplete = ({
2946
2961
  }) : options;
2947
2962
  };
2948
2963
 
2949
- const handleBlur = event => event.relatedTarget !== actionItemRef.current && setIsOpened(false); // eslint-disable-next-line @typescript-eslint/no-explicit-any
2964
+ const handleBlur = event => event.relatedTarget !== actionItemRef.current && setIsOpened(false);
2965
+
2966
+ const onActionButtonClick = () => {
2967
+ setIsOpened(false);
2968
+ textFieldInput.focus();
2969
+ onActionItemClick(inputText);
2970
+ }; // eslint-disable-next-line @typescript-eslint/no-explicit-any
2950
2971
 
2951
2972
 
2952
2973
  const DotPopper = props => {
@@ -2972,13 +2993,6 @@ const DotAutoComplete = ({
2972
2993
  }, itemText) : itemText;
2973
2994
  const paperProps = props.children.props;
2974
2995
  const paperChildren = paperProps.children;
2975
-
2976
- const onActionButtonClick = () => {
2977
- setIsOpened(false);
2978
- textFieldInput.focus();
2979
- onActionItemClick(inputText);
2980
- };
2981
-
2982
2996
  return /*#__PURE__*/React__default.createElement(StyledPopper$1, Object.assign({}, props, {
2983
2997
  className: popperClassName,
2984
2998
  disablePortal: _disablePortal,
@@ -3036,9 +3050,9 @@ const DotAutoComplete = ({
3036
3050
 
3037
3051
  const handleKeyDown = !_freesolo && onActionItemClick && (event => {
3038
3052
  if (event.key === 'Enter') {
3039
- // Do NOT execute callback if duplicate item
3040
- if (preventDuplicateInsertion && checkIfDuplicateItem(inputText, options)) return;
3041
- onActionItemClick(inputText);
3053
+ // Do NOT execute callback if duplicate item or have selected an option from the dropdown
3054
+ if (preventDuplicateInsertion && checkIfDuplicateItem(inputText, options) || highlightedOption) return;
3055
+ onActionButtonClick();
3042
3056
  }
3043
3057
  }) || undefined;
3044
3058
 
@@ -3075,6 +3089,7 @@ const DotAutoComplete = ({
3075
3089
  setIsOpened(false);
3076
3090
  },
3077
3091
  onClose: handleClose,
3092
+ onHighlightChange: (_event, v) => highlightedOption = v,
3078
3093
  onInputChange: handleInputChange,
3079
3094
  onKeyDown: handleKeyDown,
3080
3095
  // We want to close the popper each time focus is shifted from the autocomplete
@@ -3110,10 +3125,10 @@ const DotAutoComplete = ({
3110
3125
  className: useStylesWithRootClass(inputProps.className, 'dot-input')
3111
3126
  }),
3112
3127
  InputProps: Object.assign(Object.assign({}, params.InputProps), {
3113
- endAdornment: loading ? /*#__PURE__*/React__default.createElement(DotProgress, {
3128
+ endAdornment: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, loading && /*#__PURE__*/React__default.createElement(DotProgress, {
3114
3129
  color: "inherit",
3115
3130
  size: 20
3116
- }) : params.InputProps.endAdornment
3131
+ }), params.InputProps.endAdornment)
3117
3132
  }),
3118
3133
  inputRef: textFieldRef,
3119
3134
  label: label,
@@ -4569,12 +4584,14 @@ const getInitialState = value => ({
4569
4584
  });
4570
4585
 
4571
4586
  const DotInputText = ({
4587
+ autoComplete: _autoComplete = 'off',
4572
4588
  autoFocus,
4573
4589
  className,
4574
4590
  defaultValue,
4575
4591
  'data-testid': dataTestId,
4576
4592
  disabled: _disabled = false,
4577
4593
  error: _error = false,
4594
+ endAdornmentTooltip,
4578
4595
  fullWidth: _fullWidth = true,
4579
4596
  hasDebounce,
4580
4597
  helperText,
@@ -4645,19 +4662,27 @@ const DotInputText = ({
4645
4662
  // in that case component is controlled
4646
4663
 
4647
4664
  const defaultInputValue = hasDebounce ? undefined : defaultValue;
4665
+
4666
+ const renderEndAdornment = () => {
4667
+ const styledAdornment = /*#__PURE__*/React__default.createElement(StyledAdornment, {
4668
+ className: `${adornmentIconClassName} end`,
4669
+ position: "end"
4670
+ }, endAdornmentIcon);
4671
+ return endAdornmentTooltip ? /*#__PURE__*/React__default.createElement(DotTooltip, {
4672
+ title: endAdornmentTooltip
4673
+ }, styledAdornment) : styledAdornment;
4674
+ };
4675
+
4648
4676
  return /*#__PURE__*/React__default.createElement(StyledTextField, {
4649
4677
  InputProps: {
4650
4678
  startAdornment: startIcon && /*#__PURE__*/React__default.createElement(StyledAdornment, {
4651
4679
  className: `${adornmentIconClassName} start`,
4652
4680
  position: "start"
4653
4681
  }, startIcon),
4654
- endAdornment: endAdornmentIcon && /*#__PURE__*/React__default.createElement(StyledAdornment, {
4655
- className: `${adornmentIconClassName} end`,
4656
- position: "end"
4657
- }, endAdornmentIcon)
4682
+ endAdornment: endAdornmentIcon && renderEndAdornment()
4658
4683
  },
4659
4684
  "aria-label": name,
4660
- autoComplete: "off",
4685
+ autoComplete: _autoComplete,
4661
4686
  autoFocus: autoFocus,
4662
4687
  classes: {
4663
4688
  root: rootStyles
@@ -5726,6 +5751,7 @@ const DotInlineEdit = ({
5726
5751
  onChange,
5727
5752
  onEditStateChange,
5728
5753
  readOnly,
5754
+ tooltip,
5729
5755
  typography: _typography = 'body1',
5730
5756
  value: _value = ''
5731
5757
  }) => {
@@ -5809,10 +5835,7 @@ const DotInlineEdit = ({
5809
5835
 
5810
5836
  const renderViewMode = () => {
5811
5837
  const viewModeClasses = useStylesWithRootClass(viewModeClassName, readOnly ? readOnlyClassName : '');
5812
- return /*#__PURE__*/React__default.createElement("div", {
5813
- className: viewModeClasses,
5814
- "data-testid": dataTestId && `${dataTestId}-view-mode-wrapper`
5815
- }, /*#__PURE__*/React__default.createElement(DotTypography, {
5838
+ const viewModeChildren = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(DotTypography, {
5816
5839
  className: "dot-view-mode-typography",
5817
5840
  "data-testid": dataTestId && `${dataTestId}-view-mode-typography`,
5818
5841
  variant: _typography
@@ -5821,6 +5844,14 @@ const DotInlineEdit = ({
5821
5844
  "data-testid": dataTestId && `${dataTestId}-edit-icon`,
5822
5845
  iconId: "edit"
5823
5846
  }));
5847
+ return tooltip ? /*#__PURE__*/React__default.createElement(DotTooltip, {
5848
+ title: tooltip,
5849
+ className: viewModeClasses,
5850
+ "data-testid": dataTestId && `${dataTestId}-view-mode-tooltip-wrapper`
5851
+ }, viewModeChildren) : /*#__PURE__*/React__default.createElement("div", {
5852
+ className: viewModeClasses,
5853
+ "data-testid": dataTestId && `${dataTestId}-view-mode-wrapper`
5854
+ }, viewModeChildren);
5824
5855
  };
5825
5856
 
5826
5857
  const renderEditMode = () => {
@@ -6171,25 +6202,30 @@ const StyledSplitButtonGroup = styled(ButtonGroup).withConfig({
6171
6202
  componentId: "ild520-0"
6172
6203
  })(["", ""], ({
6173
6204
  theme
6174
- }) => css(["&.", "{box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);&.disabled{box-shadow:none;.dot-button{background:", ";border:1px solid ", ";}}&.outlined,&.text{box-shadow:none;.expand-button{border-left:none;}}&.outlined .dot-button{border-color:", ";}&.destructive .expand-button{border-left-color:", ";}.dot-button{box-shadow:none;margin:0;padding:", ";}.expand-button{border-left:1px solid ", ";&.Mui-disabled{border-left:0;}.MuiButton-label,.dot-icon{width:14px;height:14px;}}}"], rootClassName$h, theme.palette.grey['50'], theme.palette.grey['200'], theme.palette.grey['300'], theme.palette.error['800'], theme.spacing(0.75, 1.5), theme.palette.primary['800']));
6205
+ }) => css(["&.", "{box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);&.disabled{box-shadow:none;.dot-button{background:", ";border:1px solid ", ";}}&.outlined,&.text{box-shadow:none;.expand-button{border-left:none;}}&.outlined .dot-button{border-color:", ";}&.destructive .expand-button{border-left-color:", ";}.dot-button{box-shadow:none;margin:0;padding:", ";}.label-button{border-top-right-radius:0;border-bottom-right-radius:0;}.expand-button{border-left:1px solid ", ";&.Mui-disabled{border-left:0;}.MuiButton-label,.dot-icon{width:14px;height:14px;}}}"], rootClassName$h, theme.palette.grey['50'], theme.palette.grey['200'], theme.palette.grey['300'], theme.palette.error['800'], theme.spacing(0.75, 1.5), theme.palette.primary['800']));
6175
6206
  const StyledMenu$2 = styled(DotMenu).withConfig({
6176
6207
  displayName: "SplitButtonstyles__StyledMenu",
6177
6208
  componentId: "ild520-1"
6178
6209
  })(["&.dot-menu{z-index:", ";}"], levelTop);
6179
6210
 
6211
+ const getMainOptionIndex = (options, mainOptionKey) => {
6212
+ if (!options || options.length <= 0) return null;
6213
+ if (mainOptionKey) return options.findIndex(option => option.key === mainOptionKey);
6214
+ return 0;
6215
+ };
6216
+
6180
6217
  const DotSplitButton = ({
6181
6218
  autoFocus: _autoFocus = false,
6182
6219
  ariaLabel,
6183
- children,
6184
6220
  className,
6185
6221
  'data-testid': dataTestId,
6222
+ defaultMainOptionKey,
6186
6223
  disabled: _disabled = false,
6187
6224
  disablePortal,
6188
6225
  disableRipple: _disableRipple = false,
6189
6226
  fullWidth: _fullWidth = false,
6190
6227
  isSubmit: _isSubmit = false,
6191
- onClick,
6192
- onSelect,
6228
+ onOptionClick,
6193
6229
  options: _options = [],
6194
6230
  size: _size = 'medium',
6195
6231
 
@@ -6201,20 +6237,23 @@ const DotSplitButton = ({
6201
6237
  const rootClasses = useStylesWithRootClass(rootClassName$h, className, _type, _disabled ? 'disabled' : '');
6202
6238
  const [open, setOpen] = useState(false);
6203
6239
  const anchorRef = useRef(null);
6204
- const optionIndexMap = {};
6240
+ const hasEmptyOptions = _options.length === 0;
6241
+ const mainOptionIndex = getMainOptionIndex(_options, defaultMainOptionKey);
6242
+ const mainOption = _options[mainOptionIndex];
6205
6243
 
6206
- _options.forEach((option, index) => {
6207
- optionIndexMap[option.key] = index;
6208
- });
6244
+ const dropdownOptions = _options.filter((_option, index) => index !== mainOptionIndex);
6245
+
6246
+ const {
6247
+ children: mainOptionChildren = 'Empty button',
6248
+ disabled: mainOptionDisabled = false,
6249
+ key: mainOptionKey = ''
6250
+ } = mainOption || {};
6251
+ const isMainOptionDisabled = _disabled || hasEmptyOptions || mainOptionDisabled;
6252
+ const isMenuButtonDisabled = _disabled || hasEmptyOptions || _options.length === 1;
6209
6253
 
6210
6254
  const handleClick = (event, menuId, itemKey) => {
6211
6255
  setOpen(false);
6212
-
6213
- if (menuId || itemKey) {
6214
- onSelect && onSelect(event, menuId, itemKey);
6215
- } else {
6216
- onClick && onClick(event);
6217
- }
6256
+ onOptionClick(itemKey);
6218
6257
  };
6219
6258
 
6220
6259
  useEffect(() => {
@@ -6233,17 +6272,17 @@ const DotSplitButton = ({
6233
6272
  className: "label-button",
6234
6273
  "data-testid": dataTestId,
6235
6274
  disableRipple: _disableRipple,
6236
- disabled: _disabled,
6275
+ disabled: isMainOptionDisabled,
6237
6276
  isSubmit: _isSubmit,
6238
- onClick: event => handleClick(event),
6277
+ onClick: event => handleClick(event, null, mainOptionKey),
6239
6278
  size: _size,
6240
6279
  tooltip: tooltip,
6241
6280
  type: _type
6242
- }, children), /*#__PURE__*/React__default.createElement(DotButton, {
6281
+ }, mainOptionChildren), /*#__PURE__*/React__default.createElement(DotButton, {
6243
6282
  className: "expand-button",
6244
6283
  "data-testid": dataTestId && `${dataTestId}-expand`,
6245
6284
  disableRipple: _disableRipple,
6246
- disabled: _disabled,
6285
+ disabled: isMenuButtonDisabled,
6247
6286
  onClick: () => setOpen(!open),
6248
6287
  size: _size,
6249
6288
  type: _type
@@ -6255,7 +6294,7 @@ const DotSplitButton = ({
6255
6294
  anchorEl: anchorRef.current,
6256
6295
  disablePortal: disablePortal,
6257
6296
  id: "dot-menu-id",
6258
- menuItems: _options,
6297
+ menuItems: dropdownOptions,
6259
6298
  menuPlacement: "bottom-end",
6260
6299
  onLeave: () => setOpen(false),
6261
6300
  onSelect: handleClick,
@@ -7714,13 +7753,18 @@ const StyledDraggableList = styled.div.withConfig({
7714
7753
  displayName: "DraggableListstyles__StyledDraggableList",
7715
7754
  componentId: "sc-1nekees-0"
7716
7755
  })(["", ""], ({
7717
- theme
7718
- }) => css(["&.", " .", ".react-draggable-dragging{background-color:", ";}"], rootClassName, listItemClassName, theme.palette.grey[50]));
7756
+ theme,
7757
+ width,
7758
+ draggableHandle
7759
+ }) => css(["&.", " .", "{&.react-draggable-dragging{background-color:", ";}width:", " !important;&.with-default-cursor{cursor:default;}&.with-handle-grab-cursor{", "{cursor:grab;}}}"], rootClassName, listItemClassName, theme.palette.grey[50], width, draggableHandle));
7719
7760
 
7720
7761
  const getOrderedListItems = (layout, listItems) => {
7721
7762
  if (!listItems || !layout) return [];
7722
- listItems.sort((a, b) => layout.find(layoutItem => layoutItem.i === a.id).y - layout.find(layoutItem => layoutItem.i === b.id).y);
7723
- return listItems;
7763
+ return [...listItems].sort((a, b) => layout.find(layoutItem => layoutItem.i === a.id).y - layout.find(layoutItem => layoutItem.i === b.id).y);
7764
+ };
7765
+ const checkIfEqual = (oldList, newList) => {
7766
+ if (oldList.length !== newList.length) return false;
7767
+ return oldList.every((oldListItem, index) => oldListItem.id === newList[index].id);
7724
7768
  };
7725
7769
  const getListItemLayout = listItems => {
7726
7770
  return listItems === null || listItems === void 0 ? void 0 : listItems.map((item, index) => ({
@@ -7732,27 +7776,43 @@ const getListItemLayout = listItems => {
7732
7776
  }));
7733
7777
  };
7734
7778
 
7735
- const DEFAULT_LIST_WIDTH = 240;
7779
+ const DEFAULT_LIST_WIDTH = '100%';
7736
7780
  const DEFAULT_LIST_ITEM_HEIGHT = 36;
7737
7781
  const ListGridLayout = WidthProvider(GridLayout);
7738
7782
  const DotDraggableList = ({
7739
7783
  ariaLabel,
7740
7784
  className,
7741
7785
  'data-testid': dataTestId,
7786
+ disableDrag,
7787
+ draggableHandle,
7742
7788
  items,
7743
7789
  onChange,
7744
- width: _width = DEFAULT_LIST_WIDTH,
7745
- rowHeight: _rowHeight = DEFAULT_LIST_ITEM_HEIGHT
7790
+ rowHeight: _rowHeight = DEFAULT_LIST_ITEM_HEIGHT,
7791
+ width: _width = DEFAULT_LIST_WIDTH
7746
7792
  }) => {
7747
- const rootClasses = useStylesWithRootClass(rootClassName, className);
7748
- const listWidth = typeof _width === 'number' ? `${_width}px` : _width;
7793
+ const rootClasses = useStylesWithRootClass(rootClassName, className, draggableHandle ? 'with-draggable-handle' : '');
7794
+ const listItemClasses = useStylesWithRootClass(listItemClassName, draggableHandle && !disableDrag ? 'with-handle-grab-cursor' : '', draggableHandle || disableDrag ? 'with-default-cursor' : '');
7795
+ const listWidth = isNumber(_width) ? `${_width}px` : _width;
7796
+ const [orderedItems, setOrderedItems] = useState([]);
7797
+ useEffect(() => {
7798
+ setOrderedItems(items);
7799
+ }, [items]);
7800
+
7801
+ const handleLayoutChange = () => layout => {
7802
+ const newList = getOrderedListItems(layout, orderedItems);
7749
7803
 
7750
- const handleLayoutChange = () => layout => onChange(getOrderedListItems(layout, items));
7804
+ if (!checkIfEqual(orderedItems, newList)) {
7805
+ setOrderedItems(newList);
7806
+ onChange(newList);
7807
+ }
7808
+ };
7751
7809
 
7752
7810
  return /*#__PURE__*/React__default.createElement(StyledDraggableList, {
7753
7811
  "aria-label": ariaLabel,
7754
7812
  className: rootClasses,
7755
- "data-testid": dataTestId
7813
+ "data-testid": dataTestId,
7814
+ draggableHandle: draggableHandle,
7815
+ width: listWidth
7756
7816
  }, /*#__PURE__*/React__default.createElement(List, {
7757
7817
  "data-testid": dataTestId && `${dataTestId}-ul`,
7758
7818
  style: {
@@ -7760,23 +7820,26 @@ const DotDraggableList = ({
7760
7820
  }
7761
7821
  }, /*#__PURE__*/React__default.createElement(ListGridLayout, {
7762
7822
  className: "layout",
7763
- layout: getListItemLayout(items),
7823
+ draggableHandle: draggableHandle,
7824
+ isDraggable: !disableDrag,
7825
+ layout: getListItemLayout(orderedItems),
7764
7826
  cols: 1,
7765
7827
  margin: [0, 0],
7766
7828
  onLayoutChange: onChange && handleLayoutChange(),
7767
7829
  rowHeight: _rowHeight
7768
- }, items.map(({
7830
+ }, orderedItems.map(({
7769
7831
  id: itemId,
7770
7832
  children
7771
7833
  }) => {
7772
7834
  return /*#__PURE__*/React__default.createElement(ListItem, {
7835
+ "data-testid": dataTestId && `${dataTestId}-item`,
7773
7836
  key: itemId,
7774
7837
  button: true,
7775
7838
  children: renderNodeOrTypography(children),
7776
- className: listItemClassName,
7839
+ className: listItemClasses,
7777
7840
  disableRipple: true
7778
7841
  });
7779
7842
  }))));
7780
7843
  };
7781
7844
 
7782
- export { Cell, CssCell, CssGrid, CssGridDebug, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotBadge, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCheckbox, DotCheckboxGroup, DotChip, DotConfirmationDialog, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotInlineEdit, DotInputSelect, DotInputText, DotLink, DotList, DotMenu, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, lightThemeColors as lightColors, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useDotSnackbarContext };
7845
+ export { Cell, CreateUUID, CssCell, CssGrid, CssGridDebug, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotBadge, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCheckbox, DotCheckboxGroup, DotChip, DotConfirmationDialog, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotInlineEdit, DotInputSelect, DotInputText, DotLink, DotList, DotMenu, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, lightThemeColors as lightColors, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useDotSnackbarContext };