@digital-ai/dot-components 1.17.0 → 1.18.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,54 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.18.0](https://github.com/digital-ai/dot-components/tree/1.18.0) (06/21/2022)
4
+
5
+ [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.17.2...1.18.0)
6
+
7
+ **Features:**
8
+
9
+ - S-85256: `Map` component example in demo app [\#1184](https://github.com/digital-ai/dot-components/pull/1184) ([dmiletic85](https://github.com/dmiletic85))
10
+
11
+ **Fixed bugs:**
12
+
13
+ - `DotAutcomplete` loading spinner is in wrong position when `freesolo` is not enabled [\#1188](https://github.com/digital-ai/dot-components/issues/1188)
14
+ - `DotDraggableList` 4 issues in 1 [\#1183](https://github.com/digital-ai/dot-components/issues/1183)
15
+ - D-21609: `DotAutocomplete` allow `null` as value [\#1195](https://github.com/digital-ai/dot-components/pull/1195) ([dmiletic85](https://github.com/dmiletic85))
16
+ - 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))
17
+ - D-21577: `DraggableList` improvements and bug fixes [\#1190](https://github.com/digital-ai/dot-components/pull/1190) ([dmiletic85](https://github.com/dmiletic85))
18
+
19
+ **Closed issues:**
20
+
21
+ - `DotAutocomplete` allow `null` as value [\#1189](https://github.com/digital-ai/dot-components/issues/1189)
22
+
23
+ **Merged pull requests:**
24
+
25
+ - `master` \> `develop` [\#1187](https://github.com/digital-ai/dot-components/pull/1187) ([TheKeithStewart](https://github.com/TheKeithStewart))
26
+
27
+ ## [1.17.2](https://github.com/digital-ai/dot-components/tree/1.17.2) (06/10/2022)
28
+
29
+ [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.17.1...1.17.2)
30
+
31
+ **Features:**
32
+
33
+ - `InlineEdit` component should provide a tooltip out the box [\#1179](https://github.com/digital-ai/dot-components/issues/1179)
34
+ - 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))
35
+ - 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))
36
+
37
+ **Fixed bugs:**
38
+
39
+ - Sidebar drawer/expanded does not have a data-testid prop supplied [\#1162](https://github.com/digital-ai/dot-components/issues/1162)
40
+ - 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))
41
+ - D-21267: adjust color of helper text [\#1174](https://github.com/digital-ai/dot-components/pull/1174) ([CWSites](https://github.com/CWSites))
42
+
43
+ ## [1.17.1](https://github.com/digital-ai/dot-components/tree/1.17.1) (05/19/2022)
44
+
45
+ [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.17.0...1.17.1)
46
+
47
+ **Fixed bugs:**
48
+
49
+ - `DotButtonToggle`: Button size is not respected after tooltip change [\#1170](https://github.com/digital-ai/dot-components/issues/1170)
50
+ - 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))
51
+
3
52
  ## [1.17.0](https://github.com/digital-ai/dot-components/tree/1.17.0) (05/18/2022)
4
53
 
5
54
  [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.16.1...1.17.0)
@@ -87,6 +136,7 @@
87
136
 
88
137
  - `InlineEdit` Support for different text in view/edit modes [\#1103](https://github.com/digital-ai/dot-components/issues/1103)
89
138
  - 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))
139
+ - S-82617: `DotInputText` Expose mouse up event [\#1063](https://github.com/digital-ai/dot-components/pull/1063) ([dmiletic85](https://github.com/dmiletic85))
90
140
 
91
141
  **Fixed bugs:**
92
142
 
@@ -128,7 +178,6 @@
128
178
  - S-82899: `DotCheckbox`: Add more Storybook examples [\#1090](https://github.com/digital-ai/dot-components/pull/1090) ([dmiletic85](https://github.com/dmiletic85))
129
179
  - S-82453: `TruncateWithTooltip`: Create new component [\#1072](https://github.com/digital-ai/dot-components/pull/1072) ([dmiletic85](https://github.com/dmiletic85))
130
180
  - S-82519: `Snackbar` Allow positioning [\#1064](https://github.com/digital-ai/dot-components/pull/1064) ([dmiletic85](https://github.com/dmiletic85))
131
- - S-82617: `DotInputText` Expose mouse up event [\#1063](https://github.com/digital-ai/dot-components/pull/1063) ([dmiletic85](https://github.com/dmiletic85))
132
181
  - S-76904: `InlineEdit` improvements [\#1053](https://github.com/digital-ai/dot-components/pull/1053) ([dmiletic85](https://github.com/dmiletic85))
133
182
  - S-82059: `DraggableList`: Create and export the component [\#1003](https://github.com/digital-ai/dot-components/pull/1003) ([dmiletic85](https://github.com/dmiletic85))
134
183
 
package/index.esm.js CHANGED
@@ -2084,6 +2084,7 @@ const DotListItem = ({
2084
2084
  }, showStartIcon && renderListItemStartIcon(), renderListItemText()), showEndIcon && renderListItemEndIcon())), hasChildren && /*#__PURE__*/React__default.createElement(NestedList, {
2085
2085
  anchorEl: anchorEl,
2086
2086
  ariaLabel: "nested list",
2087
+ "data-testid": "nestedList",
2087
2088
  items: _items2,
2088
2089
  menuPlacement: menuPlacement,
2089
2090
  nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
@@ -2095,6 +2096,7 @@ const DotListItem = ({
2095
2096
  const NestedList = ({
2096
2097
  ariaLabel,
2097
2098
  anchorEl,
2099
+ 'data-testid': dataTestId,
2098
2100
  items,
2099
2101
  menuPlacement,
2100
2102
  nestedDrawerLeftSpacing,
@@ -2121,6 +2123,7 @@ const NestedList = ({
2121
2123
  ariaLabel: ariaLabel,
2122
2124
  className: nestedListClassName,
2123
2125
  component: "div",
2126
+ "data-testid": dataTestId,
2124
2127
  disablePadding: true,
2125
2128
  items: items,
2126
2129
  key: parentItemIndex
@@ -2145,6 +2148,7 @@ const NestedList = ({
2145
2148
  }, /*#__PURE__*/React__default.createElement(StyledListItem, {
2146
2149
  className: flyoutItemClasses,
2147
2150
  component: href && !onClick ? 'a' : null,
2151
+ "data-testid": `${dataTestId}-item-${index}`,
2148
2152
  href: href,
2149
2153
  key: `${parentItemIndex}-${index}`,
2150
2154
  onClick: onClick,
@@ -2162,6 +2166,7 @@ const NestedList = ({
2162
2166
  anchorEl: anchorEl,
2163
2167
  ariaLabel: ariaLabel,
2164
2168
  className: flyoutMenuClassName,
2169
+ "data-testid": dataTestId,
2165
2170
  id: CreateUUID(),
2166
2171
  key: parentItemIndex,
2167
2172
  menuItemHeight: "auto",
@@ -2188,6 +2193,7 @@ const NestedList = ({
2188
2193
  ariaLabel: ariaLabel,
2189
2194
  className: nestedListClassName,
2190
2195
  component: "div",
2196
+ "data-testid": dataTestId,
2191
2197
  disablePadding: true,
2192
2198
  items: items,
2193
2199
  key: parentItemIndex,
@@ -2678,7 +2684,7 @@ const StyledTextField = styled(TextField).withConfig({
2678
2684
  })(["", ""], ({
2679
2685
  theme,
2680
2686
  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));
2687
+ }) => 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[400], theme.palette.product === 'agility' && agilityGreen));
2682
2688
 
2683
2689
  const rootClassName$F = 'dot-button';
2684
2690
  const StyledButton = styled(Button).withConfig({
@@ -3110,10 +3116,10 @@ const DotAutoComplete = ({
3110
3116
  className: useStylesWithRootClass(inputProps.className, 'dot-input')
3111
3117
  }),
3112
3118
  InputProps: Object.assign(Object.assign({}, params.InputProps), {
3113
- endAdornment: loading ? /*#__PURE__*/React__default.createElement(DotProgress, {
3119
+ endAdornment: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, loading && /*#__PURE__*/React__default.createElement(DotProgress, {
3114
3120
  color: "inherit",
3115
3121
  size: 20
3116
- }) : params.InputProps.endAdornment
3122
+ }), params.InputProps.endAdornment)
3117
3123
  }),
3118
3124
  inputRef: textFieldRef,
3119
3125
  label: label,
@@ -3510,13 +3516,50 @@ const DotBreadcrumbs = ({
3510
3516
  }));
3511
3517
  };
3512
3518
 
3519
+ /*! *****************************************************************************
3520
+ Copyright (c) Microsoft Corporation.
3521
+
3522
+ Permission to use, copy, modify, and/or distribute this software for any
3523
+ purpose with or without fee is hereby granted.
3524
+
3525
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
3526
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3527
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
3528
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3529
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
3530
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3531
+ PERFORMANCE OF THIS SOFTWARE.
3532
+ ***************************************************************************** */
3533
+
3534
+ function __rest(s, e) {
3535
+ var t = {};
3536
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
3537
+ t[p] = s[p];
3538
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
3539
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
3540
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
3541
+ t[p[i]] = s[p[i]];
3542
+ }
3543
+ return t;
3544
+ }
3545
+
3546
+ function __awaiter(thisArg, _arguments, P, generator) {
3547
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3548
+ return new (P || (P = Promise))(function (resolve, reject) {
3549
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
3550
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
3551
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
3552
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
3553
+ });
3554
+ }
3555
+
3513
3556
  const rootClassName$C = 'dot-button-toggle';
3514
3557
  const StyledToggleButtonGroup = styled(ToggleButtonGroup).withConfig({
3515
3558
  displayName: "ButtonTogglestyles__StyledToggleButtonGroup",
3516
3559
  componentId: "sc-1oh4ljv-0"
3517
3560
  })(["", ""], ({
3518
3561
  theme
3519
- }) => css(["&.", "{.MuiToggleButton-root{padding:0;}.toggle-button-children-wrapper{display:flex;padding:", "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(1.375), theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]));
3562
+ }) => 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]));
3520
3563
 
3521
3564
  const DotButtonToggle = ({
3522
3565
  ariaLabel,
@@ -3533,22 +3576,34 @@ const DotButtonToggle = ({
3533
3576
  }) => {
3534
3577
  const rootClasses = useStylesWithRootClass(rootClassName$C, className);
3535
3578
 
3536
- const renderToggleButtonChildren = ({
3579
+ const renderToggleButton = ({
3580
+ ariaLabel: optionAriaLabel,
3581
+ className: optionClassName,
3582
+ disabled: optionDisabled,
3537
3583
  iconId: optionIconId,
3538
3584
  text: optionText,
3539
- tooltip: optionTooltip
3540
- }) => {
3541
- const children = /*#__PURE__*/React__default.createElement("div", {
3542
- "data-testid": dataTestId && `${dataTestId}-children-wrapper`,
3543
- className: "toggle-button-children-wrapper"
3544
- }, optionIconId && /*#__PURE__*/React__default.createElement(DotIcon, {
3585
+ tooltip: optionTooltip,
3586
+ value: optionValue
3587
+ }, key) => {
3588
+ const commonProps = {
3589
+ 'aria-label': optionAriaLabel,
3590
+ className: optionClassName,
3591
+ disableFocusRipple: _disableFocusRipple,
3592
+ disableRipple: _disableRipple,
3593
+ disabled: optionDisabled,
3594
+ key,
3595
+ value: optionValue
3596
+ };
3597
+ const children = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, optionIconId && /*#__PURE__*/React__default.createElement(DotIcon, {
3545
3598
  className: "dot-toggle-icon",
3546
3599
  iconId: optionIconId
3547
3600
  }), optionText && /*#__PURE__*/React__default.createElement(DotTypography, null, optionText));
3548
- return optionTooltip ? /*#__PURE__*/React__default.createElement(DotTooltip, {
3549
- className: "toggle-button-tooltip",
3550
- title: optionTooltip
3551
- }, children) : children;
3601
+ return optionTooltip ? /*#__PURE__*/React__default.createElement(TooltipToggleButton, Object.assign({}, commonProps, {
3602
+ CustomTooltipProps: {
3603
+ title: optionTooltip
3604
+ },
3605
+ value: optionValue
3606
+ }), children) : /*#__PURE__*/React__default.createElement(ToggleButton, Object.assign({}, commonProps), children);
3552
3607
  };
3553
3608
 
3554
3609
  return /*#__PURE__*/React__default.createElement(StyledToggleButtonGroup, {
@@ -3563,23 +3618,21 @@ const DotButtonToggle = ({
3563
3618
  size: _size,
3564
3619
  value: value
3565
3620
  }, buttonOptions.map((option, key) => {
3566
- const {
3567
- ariaLabel: optionAriaLabel,
3568
- className: optionClassName,
3569
- disabled: optionDisabled,
3570
- value: optionValue
3571
- } = option;
3572
- return /*#__PURE__*/React__default.createElement(ToggleButton, {
3573
- "aria-label": optionAriaLabel,
3574
- className: optionClassName,
3575
- disableFocusRipple: _disableFocusRipple,
3576
- disableRipple: _disableRipple,
3577
- disabled: optionDisabled,
3578
- key: key,
3579
- value: optionValue
3580
- }, renderToggleButtonChildren(option));
3621
+ return renderToggleButton(option, key);
3581
3622
  }));
3582
3623
  };
3624
+ /** Catch props and forward to ToggleButton */
3625
+
3626
+ const TooltipToggleButton = /*#__PURE__*/forwardRef((_a, ref) => {
3627
+ var {
3628
+ CustomTooltipProps
3629
+ } = _a,
3630
+ props = __rest(_a, ["CustomTooltipProps"]);
3631
+
3632
+ return /*#__PURE__*/React__default.createElement(Tooltip, Object.assign({}, CustomTooltipProps), /*#__PURE__*/React__default.createElement(ToggleButton, Object.assign({
3633
+ ref: ref
3634
+ }, props)));
3635
+ });
3583
3636
 
3584
3637
  const DotCard = ({
3585
3638
  ariaLabel,
@@ -4522,12 +4575,14 @@ const getInitialState = value => ({
4522
4575
  });
4523
4576
 
4524
4577
  const DotInputText = ({
4578
+ autoComplete: _autoComplete = 'off',
4525
4579
  autoFocus,
4526
4580
  className,
4527
4581
  defaultValue,
4528
4582
  'data-testid': dataTestId,
4529
4583
  disabled: _disabled = false,
4530
4584
  error: _error = false,
4585
+ endAdornmentTooltip,
4531
4586
  fullWidth: _fullWidth = true,
4532
4587
  hasDebounce,
4533
4588
  helperText,
@@ -4598,19 +4653,27 @@ const DotInputText = ({
4598
4653
  // in that case component is controlled
4599
4654
 
4600
4655
  const defaultInputValue = hasDebounce ? undefined : defaultValue;
4656
+
4657
+ const renderEndAdornment = () => {
4658
+ const styledAdornment = /*#__PURE__*/React__default.createElement(StyledAdornment, {
4659
+ className: `${adornmentIconClassName} end`,
4660
+ position: "end"
4661
+ }, endAdornmentIcon);
4662
+ return endAdornmentTooltip ? /*#__PURE__*/React__default.createElement(DotTooltip, {
4663
+ title: endAdornmentTooltip
4664
+ }, styledAdornment) : styledAdornment;
4665
+ };
4666
+
4601
4667
  return /*#__PURE__*/React__default.createElement(StyledTextField, {
4602
4668
  InputProps: {
4603
4669
  startAdornment: startIcon && /*#__PURE__*/React__default.createElement(StyledAdornment, {
4604
4670
  className: `${adornmentIconClassName} start`,
4605
4671
  position: "start"
4606
4672
  }, startIcon),
4607
- endAdornment: endAdornmentIcon && /*#__PURE__*/React__default.createElement(StyledAdornment, {
4608
- className: `${adornmentIconClassName} end`,
4609
- position: "end"
4610
- }, endAdornmentIcon)
4673
+ endAdornment: endAdornmentIcon && renderEndAdornment()
4611
4674
  },
4612
4675
  "aria-label": name,
4613
- autoComplete: "off",
4676
+ autoComplete: _autoComplete,
4614
4677
  autoFocus: autoFocus,
4615
4678
  classes: {
4616
4679
  root: rootStyles
@@ -5577,31 +5640,6 @@ const DotDynamicForm = ({
5577
5640
  }, buildFormControls(config.controls));
5578
5641
  };
5579
5642
 
5580
- /*! *****************************************************************************
5581
- Copyright (c) Microsoft Corporation.
5582
-
5583
- Permission to use, copy, modify, and/or distribute this software for any
5584
- purpose with or without fee is hereby granted.
5585
-
5586
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
5587
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
5588
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
5589
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
5590
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
5591
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
5592
- PERFORMANCE OF THIS SOFTWARE.
5593
- ***************************************************************************** */
5594
-
5595
- function __awaiter(thisArg, _arguments, P, generator) {
5596
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5597
- return new (P || (P = Promise))(function (resolve, reject) {
5598
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5599
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
5600
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
5601
- step((generator = generator.apply(thisArg, _arguments || [])).next());
5602
- });
5603
- }
5604
-
5605
5643
  const rootClassName$n = 'dot-inline-edit';
5606
5644
  const editModeClassName = 'dot-edit-mode';
5607
5645
  const viewModeClassName = 'dot-view-mode';
@@ -5704,6 +5742,7 @@ const DotInlineEdit = ({
5704
5742
  onChange,
5705
5743
  onEditStateChange,
5706
5744
  readOnly,
5745
+ tooltip,
5707
5746
  typography: _typography = 'body1',
5708
5747
  value: _value = ''
5709
5748
  }) => {
@@ -5787,10 +5826,7 @@ const DotInlineEdit = ({
5787
5826
 
5788
5827
  const renderViewMode = () => {
5789
5828
  const viewModeClasses = useStylesWithRootClass(viewModeClassName, readOnly ? readOnlyClassName : '');
5790
- return /*#__PURE__*/React__default.createElement("div", {
5791
- className: viewModeClasses,
5792
- "data-testid": dataTestId && `${dataTestId}-view-mode-wrapper`
5793
- }, /*#__PURE__*/React__default.createElement(DotTypography, {
5829
+ const viewModeChildren = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(DotTypography, {
5794
5830
  className: "dot-view-mode-typography",
5795
5831
  "data-testid": dataTestId && `${dataTestId}-view-mode-typography`,
5796
5832
  variant: _typography
@@ -5799,6 +5835,14 @@ const DotInlineEdit = ({
5799
5835
  "data-testid": dataTestId && `${dataTestId}-edit-icon`,
5800
5836
  iconId: "edit"
5801
5837
  }));
5838
+ return tooltip ? /*#__PURE__*/React__default.createElement(DotTooltip, {
5839
+ title: tooltip,
5840
+ className: viewModeClasses,
5841
+ "data-testid": dataTestId && `${dataTestId}-view-mode-tooltip-wrapper`
5842
+ }, viewModeChildren) : /*#__PURE__*/React__default.createElement("div", {
5843
+ className: viewModeClasses,
5844
+ "data-testid": dataTestId && `${dataTestId}-view-mode-wrapper`
5845
+ }, viewModeChildren);
5802
5846
  };
5803
5847
 
5804
5848
  const renderEditMode = () => {
@@ -7692,13 +7736,18 @@ const StyledDraggableList = styled.div.withConfig({
7692
7736
  displayName: "DraggableListstyles__StyledDraggableList",
7693
7737
  componentId: "sc-1nekees-0"
7694
7738
  })(["", ""], ({
7695
- theme
7696
- }) => css(["&.", " .", ".react-draggable-dragging{background-color:", ";}"], rootClassName, listItemClassName, theme.palette.grey[50]));
7739
+ theme,
7740
+ width,
7741
+ draggableHandle
7742
+ }) => 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));
7697
7743
 
7698
7744
  const getOrderedListItems = (layout, listItems) => {
7699
7745
  if (!listItems || !layout) return [];
7700
- listItems.sort((a, b) => layout.find(layoutItem => layoutItem.i === a.id).y - layout.find(layoutItem => layoutItem.i === b.id).y);
7701
- return listItems;
7746
+ return [...listItems].sort((a, b) => layout.find(layoutItem => layoutItem.i === a.id).y - layout.find(layoutItem => layoutItem.i === b.id).y);
7747
+ };
7748
+ const checkIfEqual = (oldList, newList) => {
7749
+ if (oldList.length !== newList.length) return false;
7750
+ return oldList.every((oldListItem, index) => oldListItem.id === newList[index].id);
7702
7751
  };
7703
7752
  const getListItemLayout = listItems => {
7704
7753
  return listItems === null || listItems === void 0 ? void 0 : listItems.map((item, index) => ({
@@ -7710,27 +7759,43 @@ const getListItemLayout = listItems => {
7710
7759
  }));
7711
7760
  };
7712
7761
 
7713
- const DEFAULT_LIST_WIDTH = 240;
7762
+ const DEFAULT_LIST_WIDTH = '100%';
7714
7763
  const DEFAULT_LIST_ITEM_HEIGHT = 36;
7715
7764
  const ListGridLayout = WidthProvider(GridLayout);
7716
7765
  const DotDraggableList = ({
7717
7766
  ariaLabel,
7718
7767
  className,
7719
7768
  'data-testid': dataTestId,
7769
+ disableDrag,
7770
+ draggableHandle,
7720
7771
  items,
7721
7772
  onChange,
7722
- width: _width = DEFAULT_LIST_WIDTH,
7723
- rowHeight: _rowHeight = DEFAULT_LIST_ITEM_HEIGHT
7773
+ rowHeight: _rowHeight = DEFAULT_LIST_ITEM_HEIGHT,
7774
+ width: _width = DEFAULT_LIST_WIDTH
7724
7775
  }) => {
7725
- const rootClasses = useStylesWithRootClass(rootClassName, className);
7726
- const listWidth = typeof _width === 'number' ? `${_width}px` : _width;
7776
+ const rootClasses = useStylesWithRootClass(rootClassName, className, draggableHandle ? 'with-draggable-handle' : '');
7777
+ const listItemClasses = useStylesWithRootClass(listItemClassName, draggableHandle && !disableDrag ? 'with-handle-grab-cursor' : '', draggableHandle || disableDrag ? 'with-default-cursor' : '');
7778
+ const listWidth = isNumber(_width) ? `${_width}px` : _width;
7779
+ const [orderedItems, setOrderedItems] = useState([]);
7780
+ useEffect(() => {
7781
+ setOrderedItems(items);
7782
+ }, [items]);
7783
+
7784
+ const handleLayoutChange = () => layout => {
7785
+ const newList = getOrderedListItems(layout, orderedItems);
7727
7786
 
7728
- const handleLayoutChange = () => layout => onChange(getOrderedListItems(layout, items));
7787
+ if (!checkIfEqual(orderedItems, newList)) {
7788
+ setOrderedItems(newList);
7789
+ onChange(newList);
7790
+ }
7791
+ };
7729
7792
 
7730
7793
  return /*#__PURE__*/React__default.createElement(StyledDraggableList, {
7731
7794
  "aria-label": ariaLabel,
7732
7795
  className: rootClasses,
7733
- "data-testid": dataTestId
7796
+ "data-testid": dataTestId,
7797
+ draggableHandle: draggableHandle,
7798
+ width: listWidth
7734
7799
  }, /*#__PURE__*/React__default.createElement(List, {
7735
7800
  "data-testid": dataTestId && `${dataTestId}-ul`,
7736
7801
  style: {
@@ -7738,23 +7803,26 @@ const DotDraggableList = ({
7738
7803
  }
7739
7804
  }, /*#__PURE__*/React__default.createElement(ListGridLayout, {
7740
7805
  className: "layout",
7741
- layout: getListItemLayout(items),
7806
+ draggableHandle: draggableHandle,
7807
+ isDraggable: !disableDrag,
7808
+ layout: getListItemLayout(orderedItems),
7742
7809
  cols: 1,
7743
7810
  margin: [0, 0],
7744
7811
  onLayoutChange: onChange && handleLayoutChange(),
7745
7812
  rowHeight: _rowHeight
7746
- }, items.map(({
7813
+ }, orderedItems.map(({
7747
7814
  id: itemId,
7748
7815
  children
7749
7816
  }) => {
7750
7817
  return /*#__PURE__*/React__default.createElement(ListItem, {
7818
+ "data-testid": dataTestId && `${dataTestId}-item`,
7751
7819
  key: itemId,
7752
7820
  button: true,
7753
7821
  children: renderNodeOrTypography(children),
7754
- className: listItemClassName,
7822
+ className: listItemClasses,
7755
7823
  disableRipple: true
7756
7824
  });
7757
7825
  }))));
7758
7826
  };
7759
7827
 
7760
- 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 };
7828
+ 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 };
package/index.umd.js CHANGED
@@ -55,6 +55,18 @@
55
55
  return __assign.apply(this, arguments);
56
56
  };
57
57
 
58
+ function __rest(s, e) {
59
+ var t = {};
60
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
61
+ t[p] = s[p];
62
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
63
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
64
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
65
+ t[p[i]] = s[p[i]];
66
+ }
67
+ return t;
68
+ }
69
+
58
70
  function __awaiter(thisArg, _arguments, P, generator) {
59
71
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
60
72
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -2288,6 +2300,7 @@
2288
2300
  }, showStartIcon && renderListItemStartIcon(), renderListItemText()), showEndIcon && renderListItemEndIcon())), hasChildren && /*#__PURE__*/React__default["default"].createElement(NestedList, {
2289
2301
  anchorEl: anchorEl,
2290
2302
  ariaLabel: "nested list",
2303
+ "data-testid": "nestedList",
2291
2304
  items: items,
2292
2305
  menuPlacement: menuPlacement,
2293
2306
  nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
@@ -2299,6 +2312,7 @@
2299
2312
  var NestedList = function NestedList(_a) {
2300
2313
  var ariaLabel = _a.ariaLabel,
2301
2314
  anchorEl = _a.anchorEl,
2315
+ dataTestId = _a["data-testid"],
2302
2316
  items = _a.items,
2303
2317
  menuPlacement = _a.menuPlacement,
2304
2318
  nestedDrawerLeftSpacing = _a.nestedDrawerLeftSpacing,
@@ -2324,6 +2338,7 @@
2324
2338
  ariaLabel: ariaLabel,
2325
2339
  className: nestedListClassName,
2326
2340
  component: "div",
2341
+ "data-testid": dataTestId,
2327
2342
  disablePadding: true,
2328
2343
  items: items,
2329
2344
  key: parentItemIndex
@@ -2346,6 +2361,7 @@
2346
2361
  }, /*#__PURE__*/React__default["default"].createElement(StyledListItem, {
2347
2362
  className: flyoutItemClasses,
2348
2363
  component: href && !onClick ? 'a' : null,
2364
+ "data-testid": dataTestId + "-item-" + index,
2349
2365
  href: href,
2350
2366
  key: parentItemIndex + "-" + index,
2351
2367
  onClick: onClick,
@@ -2363,6 +2379,7 @@
2363
2379
  anchorEl: anchorEl,
2364
2380
  ariaLabel: ariaLabel,
2365
2381
  className: flyoutMenuClassName,
2382
+ "data-testid": dataTestId,
2366
2383
  id: CreateUUID(),
2367
2384
  key: parentItemIndex,
2368
2385
  menuItemHeight: "auto",
@@ -2389,6 +2406,7 @@
2389
2406
  ariaLabel: ariaLabel,
2390
2407
  className: nestedListClassName,
2391
2408
  component: "div",
2409
+ "data-testid": dataTestId,
2392
2410
  disablePadding: true,
2393
2411
  items: items,
2394
2412
  key: parentItemIndex,
@@ -2917,7 +2935,7 @@
2917
2935
  })(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2918
2936
  var theme = _a.theme,
2919
2937
  InputProps = _a.InputProps;
2920
- return styled.css(templateObject_2$H || (templateObject_2$H = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n background: ", "\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 .MuiFormLabel-root.Mui-focused {\n color: ", "\n }\n select.dot-select {\n background: ", ";\n }\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n .Mui-error .", " {\n color: ", ";\n }\n .MuiSelect-icon {\n right: ", ";\n }\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n .", " {\n color: ", ";\n }\n }\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiOutlinedInput-adornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n background: ", "\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 .MuiFormLabel-root.Mui-focused {\n color: ", "\n }\n select.dot-select {\n background: ", ";\n }\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n .Mui-error .", " {\n color: ", ";\n }\n .MuiSelect-icon {\n right: ", ";\n }\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n .", " {\n color: ", ";\n }\n }\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiOutlinedInput-adornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\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[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);
2938
+ return styled.css(templateObject_2$H || (templateObject_2$H = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n background: ", "\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 .MuiFormLabel-root.Mui-focused {\n color: ", "\n }\n select.dot-select {\n background: ", ";\n }\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n .Mui-error .", " {\n color: ", ";\n }\n .MuiSelect-icon {\n right: ", ";\n }\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n .", " {\n color: ", ";\n }\n }\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiOutlinedInput-adornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n background: ", "\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 .MuiFormLabel-root.Mui-focused {\n color: ", "\n }\n select.dot-select {\n background: ", ";\n }\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n .Mui-error .", " {\n color: ", ";\n }\n .MuiSelect-icon {\n right: ", ";\n }\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n .", " {\n color: ", ";\n }\n }\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiOutlinedInput-adornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\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[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);
2921
2939
  });
2922
2940
  var templateObject_1$J, templateObject_2$H, templateObject_3$7;
2923
2941
 
@@ -3410,10 +3428,10 @@
3410
3428
  className: useStylesWithRootClass(inputProps.className, 'dot-input')
3411
3429
  }),
3412
3430
  InputProps: __assign(__assign({}, params.InputProps), {
3413
- endAdornment: loading ? /*#__PURE__*/React__default["default"].createElement(DotProgress, {
3431
+ endAdornment: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, loading && /*#__PURE__*/React__default["default"].createElement(DotProgress, {
3414
3432
  color: "inherit",
3415
3433
  size: 20
3416
- }) : params.InputProps.endAdornment
3434
+ }), params.InputProps.endAdornment)
3417
3435
  }),
3418
3436
  inputRef: textFieldRef,
3419
3437
  label: label,
@@ -3840,7 +3858,7 @@
3840
3858
  componentId: "sc-1oh4ljv-0"
3841
3859
  })(templateObject_2$D || (templateObject_2$D = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
3842
3860
  var theme = _a.theme;
3843
- return styled.css(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n &.", " {\n .MuiToggleButton-root {\n padding: 0;\n }\n\n .toggle-button-children-wrapper {\n display: flex;\n // This will replace default padding from MuiToggleButton-root\n // so that tooltip works when hovering whole button area\n // (instead of just text within the button)\n padding: ", "px;\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 .MuiToggleButton-root {\n padding: 0;\n }\n\n .toggle-button-children-wrapper {\n display: flex;\n // This will replace default padding from MuiToggleButton-root\n // so that tooltip works when hovering whole button area\n // (instead of just text within the button)\n padding: ", "px;\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.375), theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]);
3861
+ 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]);
3844
3862
  });
3845
3863
  var templateObject_1$F, templateObject_2$D;
3846
3864
 
@@ -3864,21 +3882,33 @@
3864
3882
  value = _a.value;
3865
3883
  var rootClasses = useStylesWithRootClass(rootClassName$C, className);
3866
3884
 
3867
- var renderToggleButtonChildren = function renderToggleButtonChildren(_a) {
3868
- var optionIconId = _a.iconId,
3885
+ var renderToggleButton = function renderToggleButton(_a, key) {
3886
+ var optionAriaLabel = _a.ariaLabel,
3887
+ optionClassName = _a.className,
3888
+ optionDisabled = _a.disabled,
3889
+ optionIconId = _a.iconId,
3869
3890
  optionText = _a.text,
3870
- optionTooltip = _a.tooltip;
3871
- var children = /*#__PURE__*/React__default["default"].createElement("div", {
3872
- "data-testid": dataTestId && dataTestId + "-children-wrapper",
3873
- className: "toggle-button-children-wrapper"
3874
- }, optionIconId && /*#__PURE__*/React__default["default"].createElement(DotIcon, {
3891
+ optionTooltip = _a.tooltip,
3892
+ optionValue = _a.value;
3893
+ var commonProps = {
3894
+ 'aria-label': optionAriaLabel,
3895
+ className: optionClassName,
3896
+ disableFocusRipple: disableFocusRipple,
3897
+ disableRipple: disableRipple,
3898
+ disabled: optionDisabled,
3899
+ key: key,
3900
+ value: optionValue
3901
+ };
3902
+ var children = /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, optionIconId && /*#__PURE__*/React__default["default"].createElement(DotIcon, {
3875
3903
  className: "dot-toggle-icon",
3876
3904
  iconId: optionIconId
3877
3905
  }), optionText && /*#__PURE__*/React__default["default"].createElement(DotTypography, null, optionText));
3878
- return optionTooltip ? /*#__PURE__*/React__default["default"].createElement(DotTooltip, {
3879
- className: "toggle-button-tooltip",
3880
- title: optionTooltip
3881
- }, children) : children;
3906
+ return optionTooltip ? /*#__PURE__*/React__default["default"].createElement(TooltipToggleButton, __assign({}, commonProps, {
3907
+ CustomTooltipProps: {
3908
+ title: optionTooltip
3909
+ },
3910
+ value: optionValue
3911
+ }), children) : /*#__PURE__*/React__default["default"].createElement(lab.ToggleButton, __assign({}, commonProps), children);
3882
3912
  };
3883
3913
 
3884
3914
  return /*#__PURE__*/React__default["default"].createElement(StyledToggleButtonGroup, {
@@ -3893,21 +3923,19 @@
3893
3923
  size: size,
3894
3924
  value: value
3895
3925
  }, buttonOptions.map(function (option, key) {
3896
- var optionAriaLabel = option.ariaLabel,
3897
- optionClassName = option.className,
3898
- optionDisabled = option.disabled,
3899
- optionValue = option.value;
3900
- return /*#__PURE__*/React__default["default"].createElement(lab.ToggleButton, {
3901
- "aria-label": optionAriaLabel,
3902
- className: optionClassName,
3903
- disableFocusRipple: disableFocusRipple,
3904
- disableRipple: disableRipple,
3905
- disabled: optionDisabled,
3906
- key: key,
3907
- value: optionValue
3908
- }, renderToggleButtonChildren(option));
3926
+ return renderToggleButton(option, key);
3909
3927
  }));
3910
3928
  };
3929
+ /** Catch props and forward to ToggleButton */
3930
+
3931
+ var TooltipToggleButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
3932
+ var CustomTooltipProps = _a.CustomTooltipProps,
3933
+ props = __rest(_a, ["CustomTooltipProps"]);
3934
+
3935
+ return /*#__PURE__*/React__default["default"].createElement(core.Tooltip, __assign({}, CustomTooltipProps), /*#__PURE__*/React__default["default"].createElement(lab.ToggleButton, __assign({
3936
+ ref: ref
3937
+ }, props)));
3938
+ });
3911
3939
 
3912
3940
  var DotCard = function DotCard(_a) {
3913
3941
  var ariaLabel = _a.ariaLabel,
@@ -4902,24 +4930,27 @@
4902
4930
  };
4903
4931
 
4904
4932
  var DotInputText = function DotInputText(_a) {
4905
- var autoFocus = _a.autoFocus,
4933
+ var _b = _a.autoComplete,
4934
+ autoComplete = _b === void 0 ? 'off' : _b,
4935
+ autoFocus = _a.autoFocus,
4906
4936
  className = _a.className,
4907
4937
  defaultValue = _a.defaultValue,
4908
4938
  dataTestId = _a["data-testid"],
4909
- _b = _a.disabled,
4910
- disabled = _b === void 0 ? false : _b,
4911
- _c = _a.error,
4912
- error = _c === void 0 ? false : _c,
4913
- _d = _a.fullWidth,
4914
- fullWidth = _d === void 0 ? true : _d,
4939
+ _c = _a.disabled,
4940
+ disabled = _c === void 0 ? false : _c,
4941
+ _d = _a.error,
4942
+ error = _d === void 0 ? false : _d,
4943
+ endAdornmentTooltip = _a.endAdornmentTooltip,
4944
+ _e = _a.fullWidth,
4945
+ fullWidth = _e === void 0 ? true : _e,
4915
4946
  hasDebounce = _a.hasDebounce,
4916
4947
  helperText = _a.helperText,
4917
4948
  endIcon = _a.endIcon,
4918
4949
  id = _a.id,
4919
4950
  inputRef = _a.inputRef,
4920
4951
  label = _a.label,
4921
- _e = _a.multiline,
4922
- multiline = _e === void 0 ? false : _e,
4952
+ _f = _a.multiline,
4953
+ multiline = _f === void 0 ? false : _f,
4923
4954
  name = _a.name,
4924
4955
  onBlur = _a.onBlur,
4925
4956
  onChange = _a.onChange,
@@ -4927,25 +4958,25 @@
4927
4958
  onKeyDown = _a.onKeyDown,
4928
4959
  onMouseUp = _a.onMouseUp,
4929
4960
  placeholder = _a.placeholder,
4930
- _f = _a.readOnly,
4931
- readOnly = _f === void 0 ? false : _f,
4932
- _g = _a.required,
4933
- required = _g === void 0 ? false : _g,
4961
+ _g = _a.readOnly,
4962
+ readOnly = _g === void 0 ? false : _g,
4963
+ _h = _a.required,
4964
+ required = _h === void 0 ? false : _h,
4934
4965
  rows = _a.rows,
4935
4966
  rowsMax = _a.rowsMax,
4936
4967
  startIcon = _a.startIcon,
4937
- _h = _a.size,
4938
- size = _h === void 0 ? 'small' : _h,
4939
- _j = _a.type,
4940
- type = _j === void 0 ? 'text' : _j,
4968
+ _j = _a.size,
4969
+ size = _j === void 0 ? 'small' : _j,
4970
+ _k = _a.type,
4971
+ type = _k === void 0 ? 'text' : _k,
4941
4972
  value = _a.value,
4942
- _k = _a.warning,
4943
- warning = _k === void 0 ? false : _k;
4973
+ _l = _a.warning,
4974
+ warning = _l === void 0 ? false : _l;
4944
4975
  var hasWarning = !error && warning ? warningClassName : ''; // This state is used only with debounce feature enabled
4945
4976
 
4946
- var _l = React.useState(hasDebounce && getInitialState(value)),
4947
- inputTextState = _l[0],
4948
- setInputTextState = _l[1];
4977
+ var _m = React.useState(hasDebounce && getInitialState(value)),
4978
+ inputTextState = _m[0],
4979
+ setInputTextState = _m[1];
4949
4980
 
4950
4981
  var renderIcon = function renderIcon(iconType) {
4951
4982
  return /*#__PURE__*/React__default["default"].createElement(DotIcon, {
@@ -4990,19 +5021,27 @@
4990
5021
  // in that case component is controlled
4991
5022
 
4992
5023
  var defaultInputValue = hasDebounce ? undefined : defaultValue;
5024
+
5025
+ var renderEndAdornment = function renderEndAdornment() {
5026
+ var styledAdornment = /*#__PURE__*/React__default["default"].createElement(StyledAdornment, {
5027
+ className: adornmentIconClassName + " end",
5028
+ position: "end"
5029
+ }, endAdornmentIcon);
5030
+ return endAdornmentTooltip ? /*#__PURE__*/React__default["default"].createElement(DotTooltip, {
5031
+ title: endAdornmentTooltip
5032
+ }, styledAdornment) : styledAdornment;
5033
+ };
5034
+
4993
5035
  return /*#__PURE__*/React__default["default"].createElement(StyledTextField, {
4994
5036
  InputProps: {
4995
5037
  startAdornment: startIcon && /*#__PURE__*/React__default["default"].createElement(StyledAdornment, {
4996
5038
  className: adornmentIconClassName + " start",
4997
5039
  position: "start"
4998
5040
  }, startIcon),
4999
- endAdornment: endAdornmentIcon && /*#__PURE__*/React__default["default"].createElement(StyledAdornment, {
5000
- className: adornmentIconClassName + " end",
5001
- position: "end"
5002
- }, endAdornmentIcon)
5041
+ endAdornment: endAdornmentIcon && renderEndAdornment()
5003
5042
  },
5004
5043
  "aria-label": name,
5005
- autoComplete: "off",
5044
+ autoComplete: autoComplete,
5006
5045
  autoFocus: autoFocus,
5007
5046
  classes: {
5008
5047
  root: rootStyles
@@ -6099,6 +6138,7 @@
6099
6138
  onChange = _a.onChange,
6100
6139
  onEditStateChange = _a.onEditStateChange,
6101
6140
  readOnly = _a.readOnly,
6141
+ tooltip = _a.tooltip,
6102
6142
  _c = _a.typography,
6103
6143
  typography = _c === void 0 ? 'body1' : _c,
6104
6144
  _d = _a.value,
@@ -6280,10 +6320,7 @@
6280
6320
 
6281
6321
  var renderViewMode = function renderViewMode() {
6282
6322
  var viewModeClasses = useStylesWithRootClass(viewModeClassName, readOnly ? readOnlyClassName : '');
6283
- return /*#__PURE__*/React__default["default"].createElement("div", {
6284
- className: viewModeClasses,
6285
- "data-testid": dataTestId && dataTestId + "-view-mode-wrapper"
6286
- }, /*#__PURE__*/React__default["default"].createElement(DotTypography, {
6323
+ var viewModeChildren = /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(DotTypography, {
6287
6324
  className: "dot-view-mode-typography",
6288
6325
  "data-testid": dataTestId && dataTestId + "-view-mode-typography",
6289
6326
  variant: typography
@@ -6292,6 +6329,14 @@
6292
6329
  "data-testid": dataTestId && dataTestId + "-edit-icon",
6293
6330
  iconId: "edit"
6294
6331
  }));
6332
+ return tooltip ? /*#__PURE__*/React__default["default"].createElement(DotTooltip, {
6333
+ title: tooltip,
6334
+ className: viewModeClasses,
6335
+ "data-testid": dataTestId && dataTestId + "-view-mode-tooltip-wrapper"
6336
+ }, viewModeChildren) : /*#__PURE__*/React__default["default"].createElement("div", {
6337
+ className: viewModeClasses,
6338
+ "data-testid": dataTestId && dataTestId + "-view-mode-wrapper"
6339
+ }, viewModeChildren);
6295
6340
  };
6296
6341
 
6297
6342
  var renderEditMode = function renderEditMode() {
@@ -8398,21 +8443,28 @@
8398
8443
  displayName: "DraggableListstyles__StyledDraggableList",
8399
8444
  componentId: "sc-1nekees-0"
8400
8445
  })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
8401
- var theme = _a.theme;
8402
- return styled.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.", " .", ".react-draggable-dragging {\n background-color: ", ";\n }\n "], ["\n &.", " .", ".react-draggable-dragging {\n background-color: ", ";\n }\n "])), rootClassName, listItemClassName, theme.palette.grey[50]);
8446
+ var theme = _a.theme,
8447
+ width = _a.width,
8448
+ draggableHandle = _a.draggableHandle;
8449
+ return styled.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.", " .", " {\n &.react-draggable-dragging {\n background-color: ", ";\n }\n width: ", " !important;\n\n &.with-default-cursor {\n cursor: default;\n }\n\n &.with-handle-grab-cursor {\n ", " {\n cursor: grab;\n }\n }\n }\n "], ["\n &.", " .", " {\n &.react-draggable-dragging {\n background-color: ", ";\n }\n width: ", " !important;\n\n &.with-default-cursor {\n cursor: default;\n }\n\n &.with-handle-grab-cursor {\n ", " {\n cursor: grab;\n }\n }\n }\n "])), rootClassName, listItemClassName, theme.palette.grey[50], width, draggableHandle);
8403
8450
  });
8404
8451
  var templateObject_1, templateObject_2;
8405
8452
 
8406
8453
  var getOrderedListItems = function getOrderedListItems(layout, listItems) {
8407
8454
  if (!listItems || !layout) return [];
8408
- listItems.sort(function (a, b) {
8455
+ return __spreadArray([], listItems).sort(function (a, b) {
8409
8456
  return layout.find(function (layoutItem) {
8410
8457
  return layoutItem.i === a.id;
8411
8458
  }).y - layout.find(function (layoutItem) {
8412
8459
  return layoutItem.i === b.id;
8413
8460
  }).y;
8414
8461
  });
8415
- return listItems;
8462
+ };
8463
+ var checkIfEqual = function checkIfEqual(oldList, newList) {
8464
+ if (oldList.length !== newList.length) return false;
8465
+ return oldList.every(function (oldListItem, index) {
8466
+ return oldListItem.id === newList[index].id;
8467
+ });
8416
8468
  };
8417
8469
  var getListItemLayout = function getListItemLayout(listItems) {
8418
8470
  return listItems === null || listItems === void 0 ? void 0 : listItems.map(function (item, index) {
@@ -8426,32 +8478,50 @@
8426
8478
  });
8427
8479
  };
8428
8480
 
8429
- var DEFAULT_LIST_WIDTH = 240;
8481
+ var DEFAULT_LIST_WIDTH = '100%';
8430
8482
  var DEFAULT_LIST_ITEM_HEIGHT = 36;
8431
8483
  var ListGridLayout = GridLayout.WidthProvider(GridLayout__default["default"]);
8432
8484
  var DotDraggableList = function DotDraggableList(_a) {
8433
8485
  var ariaLabel = _a.ariaLabel,
8434
8486
  className = _a.className,
8435
8487
  dataTestId = _a["data-testid"],
8488
+ disableDrag = _a.disableDrag,
8489
+ draggableHandle = _a.draggableHandle,
8436
8490
  items = _a.items,
8437
8491
  onChange = _a.onChange,
8438
- _b = _a.width,
8439
- width = _b === void 0 ? DEFAULT_LIST_WIDTH : _b,
8440
- _c = _a.rowHeight,
8441
- rowHeight = _c === void 0 ? DEFAULT_LIST_ITEM_HEIGHT : _c;
8442
- var rootClasses = useStylesWithRootClass(rootClassName, className);
8443
- var listWidth = typeof width === 'number' ? width + "px" : width;
8492
+ _b = _a.rowHeight,
8493
+ rowHeight = _b === void 0 ? DEFAULT_LIST_ITEM_HEIGHT : _b,
8494
+ _c = _a.width,
8495
+ width = _c === void 0 ? DEFAULT_LIST_WIDTH : _c;
8496
+ var rootClasses = useStylesWithRootClass(rootClassName, className, draggableHandle ? 'with-draggable-handle' : '');
8497
+ var listItemClasses = useStylesWithRootClass(listItemClassName, draggableHandle && !disableDrag ? 'with-handle-grab-cursor' : '', draggableHandle || disableDrag ? 'with-default-cursor' : '');
8498
+ var listWidth = isNumber(width) ? width + "px" : width;
8499
+
8500
+ var _d = React.useState([]),
8501
+ orderedItems = _d[0],
8502
+ setOrderedItems = _d[1];
8503
+
8504
+ React.useEffect(function () {
8505
+ setOrderedItems(items);
8506
+ }, [items]);
8444
8507
 
8445
8508
  var handleLayoutChange = function handleLayoutChange() {
8446
8509
  return function (layout) {
8447
- return onChange(getOrderedListItems(layout, items));
8510
+ var newList = getOrderedListItems(layout, orderedItems);
8511
+
8512
+ if (!checkIfEqual(orderedItems, newList)) {
8513
+ setOrderedItems(newList);
8514
+ onChange(newList);
8515
+ }
8448
8516
  };
8449
8517
  };
8450
8518
 
8451
8519
  return /*#__PURE__*/React__default["default"].createElement(StyledDraggableList, {
8452
8520
  "aria-label": ariaLabel,
8453
8521
  className: rootClasses,
8454
- "data-testid": dataTestId
8522
+ "data-testid": dataTestId,
8523
+ draggableHandle: draggableHandle,
8524
+ width: listWidth
8455
8525
  }, /*#__PURE__*/React__default["default"].createElement(core.List, {
8456
8526
  "data-testid": dataTestId && dataTestId + "-ul",
8457
8527
  style: {
@@ -8459,25 +8529,29 @@
8459
8529
  }
8460
8530
  }, /*#__PURE__*/React__default["default"].createElement(ListGridLayout, {
8461
8531
  className: "layout",
8462
- layout: getListItemLayout(items),
8532
+ draggableHandle: draggableHandle,
8533
+ isDraggable: !disableDrag,
8534
+ layout: getListItemLayout(orderedItems),
8463
8535
  cols: 1,
8464
8536
  margin: [0, 0],
8465
8537
  onLayoutChange: onChange && handleLayoutChange(),
8466
8538
  rowHeight: rowHeight
8467
- }, items.map(function (_a) {
8539
+ }, orderedItems.map(function (_a) {
8468
8540
  var itemId = _a.id,
8469
8541
  children = _a.children;
8470
8542
  return /*#__PURE__*/React__default["default"].createElement(core.ListItem, {
8543
+ "data-testid": dataTestId && dataTestId + "-item",
8471
8544
  key: itemId,
8472
8545
  button: true,
8473
8546
  children: renderNodeOrTypography(children),
8474
- className: listItemClassName,
8547
+ className: listItemClasses,
8475
8548
  disableRipple: true
8476
8549
  });
8477
8550
  }))));
8478
8551
  };
8479
8552
 
8480
8553
  exports.Cell = Cell;
8554
+ exports.CreateUUID = CreateUUID;
8481
8555
  exports.CssCell = CssCell;
8482
8556
  exports.CssGrid = CssGrid;
8483
8557
  exports.CssGridDebug = CssGridDebug;
@@ -13,7 +13,7 @@ export interface ActionItem {
13
13
  text?: string | ReactNode;
14
14
  }
15
15
  export declare type autoCompleteSize = 'medium' | 'small';
16
- export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[];
16
+ export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[] | null;
17
17
  export interface AutoCompleteOption {
18
18
  error?: boolean;
19
19
  group?: string;
@@ -1,4 +1,6 @@
1
1
  export declare const selectedAutocompleteClassName = "dot-selected-autocomplete-items";
2
2
  export declare const autocompleteWithoutChipsClassName = "dot-autocomplete-without-chips";
3
+ export declare const autocompleteWithNullValueClassName = "dot-autocomplete-with-null-value";
3
4
  export declare const StyledSelectedAutocompleteItems: import("styled-components").StyledComponent<"div", any, {}, never>;
4
5
  export declare const StyledAutocompleteWithoutChips: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const StyledAutocompleteWithNullValue: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -37,3 +37,7 @@ export interface AutocompleteWithoutChipsProps extends CommonProps {
37
37
  storyArgs: AutoCompleteProps;
38
38
  }
39
39
  export declare const AutocompleteWithoutChips: ({ className, onChange, onItemRemove, selectedOptions, storyArgs, }: AutocompleteWithoutChipsProps) => JSX.Element;
40
+ export interface AutocompleteWithNullValueProps {
41
+ storyArgs: AutoCompleteProps;
42
+ }
43
+ export declare const AutocompleteWithNullValue: ({ storyArgs, }: AutocompleteWithNullValueProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ButtonToggleProps } from './';
3
+ export declare const CommonButtonToggleStory: (args: ButtonToggleProps) => JSX.Element;
@@ -1,16 +1,24 @@
1
1
  /// <reference types="react" />
2
2
  import { CommonProps } from '../CommonProps';
3
3
  import { DraggableItem, DraggableListChangeHandler } from './utils/models';
4
- export declare const DEFAULT_LIST_WIDTH = 240;
4
+ export declare const DEFAULT_LIST_WIDTH = "100%";
5
5
  export declare const DEFAULT_LIST_ITEM_HEIGHT = 36;
6
6
  export interface DraggableListProps extends CommonProps {
7
+ /** If true, component will prevent items to be dragged. */
8
+ disableDrag?: boolean;
9
+ /**
10
+ * A CSS selector for tags that will act as the draggable handle.
11
+ * For example: `draggableHandle: '.MyDragHandleClassName'`
12
+ * If you forget the leading . it will not work.
13
+ */
14
+ draggableHandle?: string;
7
15
  /** Array of draggable list items displayed */
8
16
  items: DraggableItem[];
9
17
  /** Callback function which gets executed when the list changes */
10
18
  onChange?: DraggableListChangeHandler;
11
19
  /** Height of the list item in pixels, defaults to 36px */
12
20
  rowHeight?: number;
13
- /** Width of the draggable list, defaults to 240px */
21
+ /** Width of the draggable list, defaults to '100%' */
14
22
  width?: number | string;
15
23
  }
16
- export declare const DotDraggableList: ({ ariaLabel, className, "data-testid": dataTestId, items, onChange, width, rowHeight, }: DraggableListProps) => JSX.Element;
24
+ export declare const DotDraggableList: ({ ariaLabel, className, "data-testid": dataTestId, disableDrag, draggableHandle, items, onChange, rowHeight, width, }: DraggableListProps) => JSX.Element;
@@ -5,11 +5,15 @@ export interface DraggableListWithAvatarArgs {
5
5
  secondaryText: string;
6
6
  }
7
7
  export interface DraggableListWithIconsArgs {
8
- id: string;
9
8
  text: string;
10
9
  }
10
+ export interface DraggableListWithHandleArgs extends DraggableListWithIconsArgs {
11
+ id: string;
12
+ }
11
13
  export declare const DraggableListWithAvatar: ({ primaryText, secondaryText, }: DraggableListWithAvatarArgs) => JSX.Element;
12
- export declare const DraggableListWithIcons: ({ id, text, }: DraggableListWithIconsArgs) => JSX.Element;
14
+ export declare const DraggableListWithIcons: ({ text, }: DraggableListWithIconsArgs) => JSX.Element;
15
+ export declare const DraggableListWithHandle: ({ id, text, }: DraggableListWithHandleArgs) => JSX.Element;
13
16
  export declare const draggableListItems: DraggableItem[];
14
17
  export declare const draggableListWithAvatar: DraggableItem[];
15
18
  export declare const draggableListWithIcons: DraggableItem[];
19
+ export declare const draggableListWithHandle: DraggableItem[];
@@ -1,4 +1,6 @@
1
+ export declare const withDefaultContainerClassName = "dot-draggable-list-with-icons";
1
2
  export declare const withIconsClassName = "dot-draggable-list-with-icons";
2
3
  export declare const withAvatarClassName = "dot-draggable-list-with-avatar";
4
+ export declare const StyledDefaultStoryContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
5
  export declare const StyledDraggableListWithAvatar: import("styled-components").StyledComponent<"div", any, {}, never>;
4
6
  export declare const StyledDraggableListWithIcons: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,3 +1,8 @@
1
1
  export declare const rootClassName = "dot-draggable-list";
2
2
  export declare const listItemClassName = "dot-draggable-list-item";
3
- export declare const StyledDraggableList: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ interface StyledDraggableListProps {
4
+ draggableHandle?: string;
5
+ width: string;
6
+ }
7
+ export declare const StyledDraggableList: import("styled-components").StyledComponent<"div", any, StyledDraggableListProps, never>;
8
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { Layout } from 'react-grid-layout';
2
2
  import { DraggableItem } from './models';
3
3
  export declare const getOrderedListItems: (layout: Layout[], listItems: DraggableItem[]) => DraggableItem[];
4
+ export declare const checkIfEqual: (oldList: DraggableItem[], newList: DraggableItem[]) => boolean;
4
5
  export declare const getListItemLayout: (listItems: DraggableItem[]) => Layout[];
@@ -7,3 +7,4 @@ export declare const getAvatarColorForInputText: (value: string) => AvatarColor;
7
7
  export declare const isString: (str: unknown) => boolean;
8
8
  export declare const isNumber: (num: unknown) => boolean;
9
9
  export declare const renderNodeOrTypography: (content: string | ReactNode, typographyVariant?: TypographyVariant) => ReactNode;
10
+ export declare const searchString: (needle: string, haystack: string) => boolean;
@@ -19,7 +19,7 @@ export type { RadioButtonProps } from './radio/RadioButton';
19
19
  export type { RadioGroupProps } from './radio/RadioGroup';
20
20
  export type { BackItemProps, SidebarProps } from './sidebar/Sidebar';
21
21
  export type { SwitchProps, SwitchColor, SwitchSize, SwitchLabelPlacement, } from './switch';
22
- export type { DotColumnHeader, MultiSelect, Order, RowSelectionChangeHandler, RowsPerPageOption, TableDataWithPagination, TableRowProps, TableRowSelectChangeHandler, TextAlignment, SortDirection, } from './table';
22
+ export type { DotColumnHeader, MultiSelect, Order, RowSelectionChangeHandler, RowsPerPageOption, TableActionProps, TableActionsProps, TableDataWithPagination, TableRowProps, TableRowSelectChangeHandler, TextAlignment, SortDirection, } from './table';
23
23
  export type { TabProps } from './tabs/Tabs';
24
24
  export type { TypographyVariant } from './typography/Typography';
25
25
  export type { ProgressButtonProps } from './progress-button/ProgressButton';
@@ -88,3 +88,4 @@ export { DotDivider } from './divider';
88
88
  export { DotPopper } from './popper';
89
89
  export { DotTruncateWithTooltip } from './truncate-with-tooltip';
90
90
  export { DotDraggableList } from './draggable-list';
91
+ export { CreateUUID } from './createUUID';
@@ -19,6 +19,8 @@ export interface InlineEditProps extends CommonProps {
19
19
  onEditStateChange?: (editing: boolean) => void;
20
20
  /** If true, component will behave like a regular text (editing functionality will be disabled). */
21
21
  readOnly?: boolean;
22
+ /** Tooltip text displayed on hover */
23
+ tooltip?: string;
22
24
  /** Typography variant to be used */
23
25
  typography?: TypographyVariant;
24
26
  /** default value that is displayed on load */
@@ -27,4 +29,4 @@ export interface InlineEditProps extends CommonProps {
27
29
  /**
28
30
  * @experimental This component is still in development
29
31
  */
30
- export declare const DotInlineEdit: ({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, typography, value, }: InlineEditProps) => JSX.Element;
32
+ export declare const DotInlineEdit: ({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, tooltip, typography, value, }: InlineEditProps) => JSX.Element;
@@ -2,6 +2,12 @@
2
2
  import { InputProps } from './InputFormFields.propTypes';
3
3
  export declare const DELAY_MS = 300;
4
4
  export interface InputTextProps extends InputProps {
5
+ /** The HTML autocomplete property to pass along to the input tag. Used for
6
+ controlling autofill behavior in forms. This property follows this HTML spec:
7
+ https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
8
+ **/
9
+ autoComplete?: string;
10
+ endAdornmentTooltip?: string;
5
11
  /** If true, the input will use debounce functionality. **/
6
12
  hasDebounce?: boolean;
7
13
  /** if multiline it wil render multiple lines */
@@ -17,4 +23,4 @@ export interface InputTextProps extends InputProps {
17
23
  /** value of the InputText */
18
24
  value?: string;
19
25
  }
20
- export declare const DotInputText: ({ autoFocus, className, defaultValue, "data-testid": dataTestId, disabled, error, fullWidth, hasDebounce, helperText, endIcon, id, inputRef, label, multiline, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, placeholder, readOnly, required, rows, rowsMax, startIcon, size, type, value, warning, }: InputTextProps) => JSX.Element;
26
+ export declare const DotInputText: ({ autoComplete, autoFocus, className, defaultValue, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, helperText, endIcon, id, inputRef, label, multiline, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, placeholder, readOnly, required, rows, rowsMax, startIcon, size, type, value, warning, }: InputTextProps) => JSX.Element;
@@ -2,4 +2,4 @@
2
2
  import { ListItemProps, ListProps, NestedListProps } from './utils/models';
3
3
  export declare const DotList: ({ ariaLabel, children, className, component, "data-testid": dataTestId, dense, disablePadding, items, menuPlacement, nestedDrawerLeftSpacing, nestedListType, width, }: ListProps) => JSX.Element;
4
4
  export declare const DotListItem: ({ ariaLabel, className, component, "data-testid": dataTestId, divider, endIcon, endIconId, href, isOpened, onClick, onMenuLeave, index, items, menuPlacement, nestedDrawerLeftSpacing, nestedListType, primaryText, secondaryText, selected, startIcon, startIconId, target, text, title, tooltip, }: ListItemProps) => JSX.Element;
5
- export declare const NestedList: ({ ariaLabel, anchorEl, items, menuPlacement, nestedDrawerLeftSpacing, onMenuLeave, open, parentItemIndex, type, }: NestedListProps) => JSX.Element;
5
+ export declare const NestedList: ({ ariaLabel, anchorEl, "data-testid": dataTestId, items, menuPlacement, nestedDrawerLeftSpacing, onMenuLeave, open, parentItemIndex, type, }: NestedListProps) => JSX.Element;
@@ -1,4 +1,6 @@
1
1
  export type { TableRowProps } from './Table';
2
+ export type { TableActionProps } from './TableAction';
3
+ export type { TableActionsProps } from './TableActions';
2
4
  export type { TextAlignment } from './TableCell';
3
5
  export type { TableDataWithPagination } from './TableDataWithPagination';
4
6
  export type { DotColumnHeader, Order } from './TableHeader';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [