@digital-ai/dot-components 2.8.1 → 2.9.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.
Files changed (37) hide show
  1. package/CHANGE_LOG.md +49 -8
  2. package/index.esm.js +85 -42
  3. package/index.umd.js +114 -65
  4. package/lib/components/accordion/Accordion.stories.d.ts +5 -5
  5. package/lib/components/auto-complete/AutoComplete.d.ts +1 -16
  6. package/lib/components/auto-complete/AutoComplete.stories.d.ts +2 -1
  7. package/lib/components/auto-complete/Autocomplete.stories.data.d.ts +2 -1
  8. package/lib/components/auto-complete/index.d.ts +1 -0
  9. package/lib/components/auto-complete/utils/helpers.d.ts +1 -1
  10. package/lib/components/auto-complete/utils/interface.d.ts +17 -0
  11. package/lib/components/avatar/Avatar.d.ts +3 -1
  12. package/lib/components/avatar/Avatar.stories.d.ts +6 -5
  13. package/lib/components/badge/Badge.stories.d.ts +5 -5
  14. package/lib/components/checkbox/Checkbox.stories.d.ts +6 -6
  15. package/lib/components/checkbox/CheckboxGroup.stories.d.ts +3 -3
  16. package/lib/components/chip/Chip.stories.d.ts +5 -5
  17. package/lib/components/dynamic-form/models.d.ts +1 -2
  18. package/lib/components/dynamic-form/sample.spec.data.d.ts +22 -0
  19. package/lib/components/dynamic-form/utils/formHelpers.d.ts +1 -1
  20. package/lib/components/file-upload/FileUpload.stories.d.ts +5 -5
  21. package/lib/components/inline-edit/InlineEdit.stories.d.ts +4 -5
  22. package/lib/components/linear-progress/LinearProgress.stories.d.ts +2 -2
  23. package/lib/components/list/List.stories.d.ts +3 -3
  24. package/lib/components/progress/Progress.stories.d.ts +2 -2
  25. package/lib/components/progress-button/ProgressButton.d.ts +1 -1
  26. package/lib/components/progress-button/ProgressButton.stories.d.ts +1 -1
  27. package/lib/components/radio/RadioGroup.stories.d.ts +2 -2
  28. package/lib/components/snackbar/Snackbar.stories.d.ts +3 -3
  29. package/lib/components/split-button/SplitButton.stories.d.ts +6 -6
  30. package/lib/components/stepper/Stepper.d.ts +3 -1
  31. package/lib/components/stepper/Stepper.stories.d.ts +8 -8
  32. package/lib/components/stepper/Stepper.stories.data.d.ts +6 -0
  33. package/lib/components/switch/Switch.stories.d.ts +9 -9
  34. package/lib/components/truncate-with-tooltip/TruncateWithTooltip.stories.d.ts +5 -5
  35. package/lib/components/typography/Typography.stories.d.ts +4 -4
  36. package/package.json +1 -1
  37. package/lib/components/dynamic-form/sample.d.ts +0 -2
package/index.umd.js CHANGED
@@ -1850,10 +1850,21 @@
1850
1850
  var dataTestId = _a["data-testid"],
1851
1851
  iconId = _a.iconId,
1852
1852
  imageSrc = _a.imageSrc,
1853
+ number = _a.number,
1853
1854
  size = _a.size,
1854
1855
  text = _a.text,
1855
1856
  type = _a.type;
1857
+ var parsedNumber = function parsedNumber() {
1858
+ if (!isNumber(number)) return;
1859
+ var numberArray = number.toString().split('');
1860
+ if (numberArray.length > 1) {
1861
+ return "" + numberArray[0] + numberArray[1];
1862
+ } else {
1863
+ return number;
1864
+ }
1865
+ };
1856
1866
  var parsedText = function parsedText() {
1867
+ if (!isString$1(text)) return;
1857
1868
  var textArray = text.split(' ');
1858
1869
  if (textArray.length > 1) {
1859
1870
  var firstInitial = textArray[0].slice(0, 1);
@@ -1880,7 +1891,7 @@
1880
1891
  return jsxRuntime.jsx(DotTypography, __assign({
1881
1892
  variant: size === 'small' ? 'caption' : getHeadingFromAvatarSize()
1882
1893
  }, {
1883
- children: parsedText()
1894
+ children: parsedNumber() || parsedText()
1884
1895
  }), void 0);
1885
1896
  }
1886
1897
  return null;
@@ -1898,6 +1909,7 @@
1898
1909
  iconId = _a.iconId,
1899
1910
  imageSrc = _a.imageSrc,
1900
1911
  onClick = _a.onClick,
1912
+ number = _a.number,
1901
1913
  _d = _a.size,
1902
1914
  size = _d === void 0 ? 'medium' : _d,
1903
1915
  _e = _a.tabIndex,
@@ -1943,6 +1955,7 @@
1943
1955
  "data-testid": dataTestId,
1944
1956
  iconId: iconId,
1945
1957
  imageSrc: imageSrc,
1958
+ number: number,
1946
1959
  size: size,
1947
1960
  text: text,
1948
1961
  type: type
@@ -2601,7 +2614,7 @@
2601
2614
  title: tooltip
2602
2615
  }, {
2603
2616
  children: jsxRuntime.jsx(StyledIconButton, __assign({
2604
- "aria-label": ariaLabel,
2617
+ "aria-label": ariaLabel || tooltip || iconId + " icon button",
2605
2618
  classes: {
2606
2619
  root: rootClasses
2607
2620
  },
@@ -2640,6 +2653,7 @@
2640
2653
  role: "heading"
2641
2654
  }, {
2642
2655
  children: [children, variant !== 'permanent' && jsxRuntime.jsx(DotIconButton, {
2656
+ ariaLabel: "close drawer",
2643
2657
  className: "close-button",
2644
2658
  iconId: "close",
2645
2659
  onClick: onClose
@@ -2674,6 +2688,7 @@
2674
2688
  role: ariaRole
2675
2689
  }, {
2676
2690
  children: [children, !headerExists && variant !== 'permanent' && jsxRuntime.jsx(DotIconButton, {
2691
+ ariaLabel: "close drawer",
2677
2692
  className: "dot-drawer-close-button",
2678
2693
  iconId: "close",
2679
2694
  onClick: onClose
@@ -2714,7 +2729,7 @@
2714
2729
  anchor = _b === void 0 ? 'right' : _b,
2715
2730
  ariaLabel = _a.ariaLabel,
2716
2731
  _c = _a.ariaRole,
2717
- ariaRole = _c === void 0 ? 'presentation' : _c,
2732
+ ariaRole = _c === void 0 ? 'dialog' : _c,
2718
2733
  className = _a.className,
2719
2734
  children = _a.children,
2720
2735
  dataTestId = _a["data-testid"],
@@ -2741,6 +2756,7 @@
2741
2756
  }
2742
2757
  };
2743
2758
  var rootClasses = useStylesWithRootClass(rootClassName$U, className);
2759
+ var backdropEnabled = variant === 'temporary' && !(ModalProps === null || ModalProps === void 0 ? void 0 : ModalProps.hideBackdrop);
2744
2760
  var headerExists = !!drawerHeaderProps;
2745
2761
  var bodyTestId = drawerBodyProps ? drawerBodyProps["data-testid"] : 'drawer-body';
2746
2762
  return jsxRuntime.jsxs(StyledDrawer, __assign({
@@ -2750,6 +2766,7 @@
2750
2766
  }),
2751
2767
  anchor: anchor,
2752
2768
  "aria-label": ariaLabel,
2769
+ "aria-modal": backdropEnabled ? 'true' : 'false',
2753
2770
  classes: {
2754
2771
  root: rootClasses,
2755
2772
  paper: 'dot-drawer-paper'
@@ -3404,6 +3421,7 @@
3404
3421
  iconId: "search"
3405
3422
  }, void 0);
3406
3423
  var clearSearchIcon = jsxRuntime.jsx(DotIconButton, {
3424
+ ariaLabel: "clear search text",
3407
3425
  iconId: "close",
3408
3426
  onClick: handleClear,
3409
3427
  size: "small",
@@ -3480,7 +3498,7 @@
3480
3498
  "data-testid": dataTestId
3481
3499
  }, {
3482
3500
  children: [!showCopiedIcon && jsxRuntime.jsx(DotIconButton, {
3483
- ariaLabel: ariaLabel,
3501
+ ariaLabel: ariaLabel || 'copy to clipboard',
3484
3502
  "data-testid": dataTestId + "-button",
3485
3503
  iconId: "duplicate",
3486
3504
  onClick: copy,
@@ -4236,7 +4254,7 @@
4236
4254
  }), void 0), jsxRuntime.jsx(DotTooltip, __assign({
4237
4255
  title: "digital.ai"
4238
4256
  }, {
4239
- children: theme.palette.mode === "light" ? jsxRuntime.jsx(ForwardRef$1, {
4257
+ children: theme.palette.mode === 'light' ? jsxRuntime.jsx(ForwardRef$1, {
4240
4258
  className: "company-name"
4241
4259
  }, void 0) : jsxRuntime.jsx(ForwardRef, {
4242
4260
  className: "company-name"
@@ -4357,6 +4375,7 @@
4357
4375
  className: "go-back"
4358
4376
  }, {
4359
4377
  children: [jsxRuntime.jsx(DotIconButton, {
4378
+ ariaLabel: "go back",
4360
4379
  className: "go-back-button",
4361
4380
  "data-testid": "back-button",
4362
4381
  iconId: backItem.iconId || 'back',
@@ -4765,7 +4784,9 @@
4765
4784
  _c = _a.isReadOnly,
4766
4785
  isReadOnly = _c === void 0 ? false : _c,
4767
4786
  values = _a.values;
4787
+ if (values === undefined) return;
4768
4788
  return values.map(function (option, index) {
4789
+ if (!option) return null;
4769
4790
  var hasStringValue = isString$1(option);
4770
4791
  var optionAsString = option;
4771
4792
  var optionAsObject = option;
@@ -4832,44 +4853,43 @@
4832
4853
  onInputChange = _a.onInputChange,
4833
4854
  onOpen = _a.onOpen,
4834
4855
  open = _a.open,
4835
- options = _a.options,
4856
+ _k = _a.options,
4857
+ options = _k === void 0 ? [] : _k,
4836
4858
  persistentLabel = _a.persistentLabel,
4837
4859
  placeholder = _a.placeholder,
4838
- _k = _a.readOnly,
4839
- readOnly = _k === void 0 ? false : _k,
4860
+ _l = _a.readOnly,
4861
+ readOnly = _l === void 0 ? false : _l,
4840
4862
  renderOption = _a.renderOption,
4841
4863
  renderTags = _a.renderTags,
4842
- _l = _a.required,
4843
- required = _l === void 0 ? false : _l,
4844
- _m = _a.size,
4845
- size = _m === void 0 ? 'small' : _m,
4864
+ _m = _a.required,
4865
+ required = _m === void 0 ? false : _m,
4866
+ _o = _a.size,
4867
+ size = _o === void 0 ? 'small' : _o,
4846
4868
  value = _a.value,
4847
- _o = _a.warning,
4848
- warning = _o === void 0 ? false : _o;
4849
- var _p = React.useState(!value && !defaultValue),
4850
- showPlaceholder = _p[0],
4851
- setShowPlaceholder = _p[1];
4852
- var _q = actionItem || {},
4853
- _r = _q.iconId,
4854
- actionIconId = _r === void 0 ? 'add' : _r,
4855
- actionItemText = _q.text,
4856
- onActionItemClick = _q.onClick,
4857
- preventDuplicateInsertion = _q.preventDuplicateInsertion;
4869
+ _p = _a.warning,
4870
+ warning = _p === void 0 ? false : _p;
4871
+ var _q = React.useState(!value && !defaultValue),
4872
+ showPlaceholder = _q[0],
4873
+ setShowPlaceholder = _q[1];
4874
+ var _r = React.useState(false),
4875
+ isOpened = _r[0],
4876
+ setIsOpened = _r[1];
4877
+ var _s = React.useState(''),
4878
+ inputText = _s[0],
4879
+ setInputText = _s[1];
4880
+ // Used for focus management while popper is opened
4881
+ var actionItemRef = React.useRef();
4882
+ var onActionItemClick = actionItem === null || actionItem === void 0 ? void 0 : actionItem.onClick;
4883
+ var allowActionButtonClick = !freesolo && onActionItemClick;
4858
4884
  var isActionItemDefined = onActionItemClick !== undefined;
4859
- var highlightedOption = null;
4860
- var _s = React.useState(false),
4861
- isOpened = _s[0],
4862
- setIsOpened = _s[1];
4863
- var _t = React.useState(''),
4864
- inputText = _t[0],
4865
- setInputText = _t[1];
4885
+ var popperOpen = !readOnly && (open || isOpened);
4886
+ var preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
4866
4887
  var textFieldWarningClassName = !error && warning && warningClassName;
4867
4888
  var rootClasses = useStylesWithRootClass(rootClassName$I, size === 'medium' && inputMediumClassName, className);
4868
- var textFieldRootClasses = useStylesWithRootClass(rootClassName$13, className, readOnly ? 'read-only' : '', textFieldWarningClassName);
4889
+ var textFieldRootClasses = useStylesWithRootClass(rootClassName$13, readOnly && 'read-only', textFieldWarningClassName);
4869
4890
  var inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
4891
+ var highlightedOption = null;
4870
4892
  var textFieldInput;
4871
- // Used for focus management while popper is opened
4872
- var actionItemRef = React.useRef();
4873
4893
  var textFieldRef = function textFieldRef(element) {
4874
4894
  // We want to use this element in callback function
4875
4895
  textFieldInput = element;
@@ -4918,14 +4938,13 @@
4918
4938
  // item insertion and input text is found inside the 'options'
4919
4939
  var isActionDisabled = preventDuplicateInsertion && checkIfDuplicateItem(inputText, options);
4920
4940
  // Display warning icon if disabled
4921
- var actionStartIconId = isActionDisabled ? 'warning-solid' : actionIconId;
4941
+ var actionStartIconId = isActionDisabled ? 'warning-solid' : (actionItem === null || actionItem === void 0 ? void 0 : actionItem.iconId) || 'add';
4922
4942
  var defaultText = inputText ? "Add \"" + inputText + "\"" : DEFAULT_ACTION_ITEM_TEXT;
4923
- var nonDisabledText = actionItemText ? actionItemText : defaultText;
4943
+ var nonDisabledText = (actionItem === null || actionItem === void 0 ? void 0 : actionItem.text) || defaultText;
4924
4944
  var itemText = isActionDisabled ? 'Value already exists' : nonDisabledText;
4925
- // If simple text, we need to give it a class so that
4926
- // styling for displaying ellipsis on a long text
4927
- // can be applied. If it is custom node coming from the
4928
- // consumer, then leave it as it is.
4945
+ // If simple text, we need to give it a class so that styling for
4946
+ // displaying ellipsis on a long text can be applied. If it is
4947
+ // custom node coming from the consumer, then leave it as it is.
4929
4948
  var itemTextNode = isString$1(itemText) ? jsxRuntime.jsx("span", __assign({
4930
4949
  className: "dot-action-item-text"
4931
4950
  }, {
@@ -4993,10 +5012,11 @@
4993
5012
  } || undefined;
4994
5013
  // Create callback when action item click event handler is defined,
4995
5014
  // free-solo mode is NOT set and 'Enter' key has been pressed
4996
- var handleKeyDown = !freesolo && onActionItemClick && function (event) {
5015
+ var handleKeyDown = allowActionButtonClick && function (event) {
4997
5016
  if (event.key === 'Enter') {
5017
+ var isDuplicate = checkIfDuplicateItem(inputText, options);
4998
5018
  // Do NOT execute callback if duplicate item or have selected an option from the dropdown
4999
- if (preventDuplicateInsertion && checkIfDuplicateItem(inputText, options) || highlightedOption) return;
5019
+ if (preventDuplicateInsertion && isDuplicate || highlightedOption) return;
5000
5020
  onActionButtonClick();
5001
5021
  }
5002
5022
  } || undefined;
@@ -5009,7 +5029,7 @@
5009
5029
  });
5010
5030
  };
5011
5031
  var handleTagsRender = function handleTagsRender() {
5012
- if (!multiple) return;
5032
+ if (!multiple || isString$1(defaultValue)) return;
5013
5033
  return renderTags || handleRenderChips;
5014
5034
  };
5015
5035
  var renderErrorOrWarningIcon = function renderErrorOrWarningIcon() {
@@ -5046,7 +5066,7 @@
5046
5066
  inputRoot: inputRootClasses
5047
5067
  },
5048
5068
  "data-testid": dataTestId,
5049
- defaultValue: defaultValue,
5069
+ defaultValue: multiple && isString$1(defaultValue) ? [defaultValue] : defaultValue,
5050
5070
  disabled: disabled,
5051
5071
  filterOptions: filterOptions,
5052
5072
  filterSelectedOptions: filterSelectedOptions,
@@ -5080,7 +5100,7 @@
5080
5100
  onKeyDown: handleKeyDown,
5081
5101
  // We want to close the popper each time focus is shifted from the autocomplete
5082
5102
  onOpen: handleOpen,
5083
- open: !readOnly && (open || isOpened),
5103
+ open: popperOpen,
5084
5104
  options: sortOptions(),
5085
5105
  renderInput: function (params) {
5086
5106
  // InputBaseComponentProps is used here because that is the base
@@ -5140,7 +5160,7 @@
5140
5160
  (_a = actionItemRef === null || actionItemRef === void 0 ? void 0 : actionItemRef.current) === null || _a === void 0 ? void 0 : _a.focus();
5141
5161
  }
5142
5162
  },
5143
- placeholder: showPlaceholder ? placeholder : undefined,
5163
+ placeholder: showPlaceholder && placeholder,
5144
5164
  required: required,
5145
5165
  size: size,
5146
5166
  variant: "outlined"
@@ -5205,7 +5225,7 @@
5205
5225
  componentId: "sc-7cg374-1"
5206
5226
  })(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
5207
5227
  var theme = _a.theme;
5208
- return styled.css(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n &.", " {\n margin-bottom: 0;\n\n .MuiBreadcrumbs-ol {\n flex-wrap: nowrap;\n }\n .MuiBreadcrumbs-li,\n .separator {\n color: ", ";\n margin: 0;\n white-space: nowrap;\n }\n .separator {\n font-size: 12px;\n width: 20px;\n height: 20px;\n padding: 0;\n }\n .MuiBreadcrumbs-separator {\n margin: 0;\n }\n .MuiLink-underlineHover {\n cursor: pointer;\n }\n\n .MuiBreadcrumbs-li:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .breadcrumb {\n padding: ", ";\n }\n\n .current-page {\n color: ", ";\n cursor: default;\n }\n }\n "], ["\n &.", " {\n margin-bottom: 0;\n\n .MuiBreadcrumbs-ol {\n flex-wrap: nowrap;\n }\n .MuiBreadcrumbs-li,\n .separator {\n color: ", ";\n margin: 0;\n white-space: nowrap;\n }\n .separator {\n font-size: 12px;\n width: 20px;\n height: 20px;\n padding: 0;\n }\n .MuiBreadcrumbs-separator {\n margin: 0;\n }\n .MuiLink-underlineHover {\n cursor: pointer;\n }\n\n .MuiBreadcrumbs-li:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .breadcrumb {\n padding: ", ";\n }\n\n .current-page {\n color: ", ";\n cursor: default;\n }\n }\n "])), rootClassName$F, theme.palette.grey[300], theme.spacing(0.5, 2), theme.palette.grey[700]);
5228
+ return styled.css(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n &.", " {\n margin-bottom: 0;\n\n .MuiBreadcrumbs-ol {\n flex-wrap: nowrap;\n }\n .MuiBreadcrumbs-li,\n .separator {\n color: ", ";\n margin: 0;\n white-space: nowrap;\n }\n .separator {\n font-size: 12px;\n width: 20px;\n height: 20px;\n padding: 0;\n\n i {\n line-height: 20px;\n }\n }\n .MuiBreadcrumbs-separator {\n margin: 0;\n }\n .MuiLink-underlineHover {\n cursor: pointer;\n }\n\n .MuiBreadcrumbs-li:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .breadcrumb {\n padding: ", ";\n }\n\n .current-page {\n color: ", ";\n cursor: default;\n }\n }\n "], ["\n &.", " {\n margin-bottom: 0;\n\n .MuiBreadcrumbs-ol {\n flex-wrap: nowrap;\n }\n .MuiBreadcrumbs-li,\n .separator {\n color: ", ";\n margin: 0;\n white-space: nowrap;\n }\n .separator {\n font-size: 12px;\n width: 20px;\n height: 20px;\n padding: 0;\n\n i {\n line-height: 20px;\n }\n }\n .MuiBreadcrumbs-separator {\n margin: 0;\n }\n .MuiLink-underlineHover {\n cursor: pointer;\n }\n\n .MuiBreadcrumbs-li:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .breadcrumb {\n padding: ", ";\n }\n\n .current-page {\n color: ", ";\n cursor: default;\n }\n }\n "])), rootClassName$F, theme.palette.grey[300], theme.spacing(0.5, 2), theme.palette.grey[700]);
5209
5229
  });
5210
5230
  var templateObject_1$I, templateObject_2$F, templateObject_3$9, templateObject_4$7;
5211
5231
 
@@ -6057,6 +6077,7 @@
6057
6077
  className: "dot-dialog-title"
6058
6078
  }, {
6059
6079
  children: [renderNodeOrTypography(title, 'h2'), closeIconVisible && jsxRuntime.jsx(DotIconButton, {
6080
+ ariaLabel: "close dialog",
6060
6081
  iconId: "close",
6061
6082
  onClick: handleCancel,
6062
6083
  size: "small"
@@ -6792,6 +6813,7 @@
6792
6813
  onClick = _a.onClick,
6793
6814
  _g = _a.size,
6794
6815
  size = _g === void 0 ? 'medium' : _g,
6816
+ startIcon = _a.startIcon,
6795
6817
  tooltip = _a.tooltip,
6796
6818
  _h = _a.type,
6797
6819
  type = _h === void 0 ? 'primary' : _h;
@@ -6809,6 +6831,7 @@
6809
6831
  isSubmit: isSubmit,
6810
6832
  onClick: onClick,
6811
6833
  size: size,
6834
+ startIcon: startIcon,
6812
6835
  tooltip: tooltip,
6813
6836
  type: type
6814
6837
  }, {
@@ -6981,7 +7004,7 @@
6981
7004
  componentId: "eign2a-0"
6982
7005
  })(templateObject_2$p || (templateObject_2$p = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
6983
7006
  var theme = _a.theme;
6984
- return styled.css(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["{\n &.dot-switch {\n span.Mui-disabled {\n color: ", ";\n }\n\n .MuiSwitch-switchBase\n :not(.Mui-checked)\n :not(.Mui-disabled) {\n color: ", ";\n }\n }\n "], ["{\n &.dot-switch {\n span.Mui-disabled {\n color: ", ";\n }\n\n .MuiSwitch-switchBase\n :not(.Mui-checked)\n :not(.Mui-disabled) {\n color: ", ";\n }\n }\n "])), theme.palette.grey[200], theme.palette.background.default);
7007
+ return styled.css(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["{\n &.dot-switch {\n span.Mui-disabled {\n color: ", ";\n }\n\n .MuiSwitch-switchBase\n :not(.Mui-checked)\n :not(.Mui-disabled) {\n color: ", ";\n\n /* adjusted for a11y */\n &.Mui-focusVisible .MuiTouchRipple-root {\n color: ", ";\n }\n }\n }\n "], ["{\n &.dot-switch {\n span.Mui-disabled {\n color: ", ";\n }\n\n .MuiSwitch-switchBase\n :not(.Mui-checked)\n :not(.Mui-disabled) {\n color: ", ";\n\n /* adjusted for a11y */\n &.Mui-focusVisible .MuiTouchRipple-root {\n color: ", ";\n }\n }\n }\n "])), theme.palette.grey[200], theme.palette.background.default, theme.palette.grey[200]);
6985
7008
  });
6986
7009
  var templateObject_1$q, templateObject_2$p;
6987
7010
 
@@ -7137,14 +7160,31 @@
7137
7160
  handleChange = _a.handleChange,
7138
7161
  index = _a.index;
7139
7162
  var props = controlProps;
7163
+ var isFreeSolo = props.freesolo === undefined || props.freesolo;
7140
7164
  var value = getControlValue(controlName, formData) || [];
7141
7165
  var errorMessage = formData[controlName].errorMessage;
7142
7166
  var handleChangeFn = handleChange;
7167
+ var handleFreeSoloChange = function handleFreeSoloChange(event) {
7168
+ var _a;
7169
+ if (event.key !== 'Enter') return;
7170
+ var typedValue = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value;
7171
+ var currentValue = value;
7172
+ if (typedValue) {
7173
+ checkIfDuplicateItem(typedValue, currentValue);
7174
+ currentValue.push({
7175
+ title: typedValue
7176
+ });
7177
+ handleChangeFn(controlName);
7178
+ }
7179
+ };
7143
7180
  return jsxRuntime.jsx(DotAutoComplete, __assign({}, props, {
7144
7181
  disabled: disabled,
7145
7182
  error: !!errorMessage,
7146
7183
  helperText: errorMessage || props.helperText,
7147
7184
  onChange: handleChangeFn(controlName),
7185
+ onInputChange: isFreeSolo ? function (event) {
7186
+ return handleFreeSoloChange(event);
7187
+ } : null,
7148
7188
  value: value
7149
7189
  }), index);
7150
7190
  };
@@ -7348,12 +7388,11 @@
7348
7388
  var updateFormState = function updateFormState(_a) {
7349
7389
  var controlName = _a.controlName,
7350
7390
  newValue = _a.newValue,
7351
- formConfig = _a.formConfig,
7352
7391
  _b = _a.validate,
7353
7392
  validate = _b === void 0 ? true : _b;
7354
7393
  var fieldValidation = {};
7355
7394
  if (validate && liveValidation) {
7356
- fieldValidation = getControlValidation(controlName, newValue, formConfig);
7395
+ fieldValidation = getControlValidation(controlName, newValue, config);
7357
7396
  }
7358
7397
  setFormState(function (prevFormState) {
7359
7398
  var _a;
@@ -7392,7 +7431,6 @@
7392
7431
  return function (_event, value) {
7393
7432
  updateFormState({
7394
7433
  controlName: controlName,
7395
- formConfig: config,
7396
7434
  newValue: value
7397
7435
  });
7398
7436
  };
@@ -7402,7 +7440,6 @@
7402
7440
  var newValue = e.target.checked;
7403
7441
  updateFormState({
7404
7442
  controlName: controlName,
7405
- formConfig: config,
7406
7443
  newValue: newValue,
7407
7444
  validate: false
7408
7445
  });
@@ -7412,7 +7449,6 @@
7412
7449
  return function (e, value) {
7413
7450
  updateFormState({
7414
7451
  controlName: controlName,
7415
- formConfig: config,
7416
7452
  newValue: value
7417
7453
  });
7418
7454
  };
@@ -7433,7 +7469,6 @@
7433
7469
  var newValue = e.target.value;
7434
7470
  updateFormState({
7435
7471
  controlName: controlName,
7436
- formConfig: config,
7437
7472
  newValue: newValue
7438
7473
  });
7439
7474
  };
@@ -8429,7 +8464,7 @@
8429
8464
  componentId: "sc-1qka0yq-0"
8430
8465
  })(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
8431
8466
  var theme = _a.theme;
8432
- return styled.css(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n &.", " {\n display: flex;\n align-items: flex-start;\n padding: 0;\n width: 100%;\n\n &.left {\n flex-direction: row;\n .", " {\n border-left: 1px solid ", ";\n }\n }\n\n &.right {\n flex-direction: row-reverse;\n .", " {\n border-right: 1px solid ", ";\n }\n }\n\n .", " {\n padding: ", ";\n\n &.MuiStepper-horizontal {\n padding: 0;\n display: flex;\n flex-direction: column;\n }\n\n .MuiStep-root {\n width: 315px;\n\n .dot-icon {\n display: flex;\n background: ", ";\n border-radius: 50%;\n color: ", ";\n height: 28px;\n width: 28px;\n }\n\n .dot-typography {\n color: ", ";\n }\n\n .MuiStepContent-root {\n border-left-color: ", ";\n margin-bottom: ", ";\n }\n\n &.MuiStep-horizontal {\n padding: ", ";\n\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n .horizontal-step-description {\n color: ", ";\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.completed {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.active {\n background: ", ";\n }\n\n &.error {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.in-progress {\n .dot-avatar i:before {\n color: ", ";\n }\n }\n }\n\n &.MuiStep-vertical {\n &.completed {\n .dot-typography,\n .dot-icon {\n color: ", ";\n }\n }\n\n &.active {\n .dot-icon {\n background: ", ";\n color: ", ";\n }\n .step-label.dot-typography {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &.error {\n .dot-typography {\n color: ", ";\n }\n\n .dot-icon {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n }\n }\n }\n\n &.disabled {\n .dot-icon {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &:last-of-type .MuiStepContent-root {\n border-left-color: transparent;\n }\n }\n }\n\n .", " {\n width: 100%;\n height: calc(100vh - 78px);\n overflow-y: auto;\n\n &.center-content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n }\n\n .step-content-container {\n padding: ", ";\n }\n }\n }\n "], ["\n &.", " {\n display: flex;\n align-items: flex-start;\n padding: 0;\n width: 100%;\n\n &.left {\n flex-direction: row;\n .", " {\n border-left: 1px solid ", ";\n }\n }\n\n &.right {\n flex-direction: row-reverse;\n .", " {\n border-right: 1px solid ", ";\n }\n }\n\n .", " {\n padding: ", ";\n\n &.MuiStepper-horizontal {\n padding: 0;\n display: flex;\n flex-direction: column;\n }\n\n .MuiStep-root {\n width: 315px;\n\n .dot-icon {\n display: flex;\n background: ", ";\n border-radius: 50%;\n color: ", ";\n height: 28px;\n width: 28px;\n }\n\n .dot-typography {\n color: ", ";\n }\n\n .MuiStepContent-root {\n border-left-color: ", ";\n margin-bottom: ", ";\n }\n\n &.MuiStep-horizontal {\n padding: ", ";\n\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n .horizontal-step-description {\n color: ", ";\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.completed {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.active {\n background: ", ";\n }\n\n &.error {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.in-progress {\n .dot-avatar i:before {\n color: ", ";\n }\n }\n }\n\n &.MuiStep-vertical {\n &.completed {\n .dot-typography,\n .dot-icon {\n color: ", ";\n }\n }\n\n &.active {\n .dot-icon {\n background: ", ";\n color: ", ";\n }\n .step-label.dot-typography {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &.error {\n .dot-typography {\n color: ", ";\n }\n\n .dot-icon {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n }\n }\n }\n\n &.disabled {\n .dot-icon {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &:last-of-type .MuiStepContent-root {\n border-left-color: transparent;\n }\n }\n }\n\n .", " {\n width: 100%;\n height: calc(100vh - 78px);\n overflow-y: auto;\n\n &.center-content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n }\n\n .step-content-container {\n padding: ", ";\n }\n }\n }\n "])), rootClassName$i, contentClassName, theme.palette.layer.n200, contentClassName, theme.palette.layer.n200, stepListClassName, theme.spacing(3), theme.palette.primary['50'], theme.palette.primary['50'], theme.palette.layer.n300, theme.palette.layer.n300, theme.spacing(1), theme.spacing(1), theme.palette.layer.n300, theme.palette.layer.n100, theme.palette.layer.n500, theme.palette.layer.n400, theme.palette.secondary['500'], theme.palette.secondary['50'], theme.palette.layer['n50'], theme.palette.error['500'], theme.palette.error['50'], theme.palette.primary['400'], theme.palette.layer.n700, theme.palette.primary['400'], theme.palette.layer.n0, theme.palette.primary['500'], theme.palette.layer.n700, theme.palette.error.main, theme.palette.layer.n0, theme.palette.error.main, theme.palette.error.main, theme.palette.primary['50'], theme.palette.layer.n300, contentClassName, theme.spacing(3, 3, 2, 3));
8467
+ return styled.css(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n &.", " {\n display: flex;\n align-items: flex-start;\n padding: 0;\n width: 100%;\n\n &.left {\n flex-direction: row;\n .", " {\n border-left: 1px solid ", ";\n }\n }\n\n &.right {\n flex-direction: row-reverse;\n .", " {\n border-right: 1px solid ", ";\n }\n }\n\n .", " {\n padding: ", ";\n\n &.MuiStepper-horizontal {\n padding: 0;\n display: flex;\n flex-direction: column;\n }\n\n .MuiStep-root {\n width: 315px;\n\n .dot-icon {\n display: flex;\n background: ", ";\n border-radius: 50%;\n color: ", ";\n height: 28px;\n width: 28px;\n }\n\n .dot-typography {\n color: ", ";\n }\n\n .MuiStepContent-root {\n border-left-color: ", ";\n }\n\n &.MuiStep-horizontal {\n padding: ", ";\n\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n .horizontal-step-description {\n color: ", ";\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.completed {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.active {\n background: ", ";\n }\n\n &.error {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.in-progress {\n .dot-avatar i:before {\n color: ", ";\n }\n }\n }\n\n &.MuiStep-vertical {\n &.completed {\n .dot-typography,\n .dot-icon {\n color: ", ";\n }\n }\n\n &.active {\n .dot-icon {\n background: ", ";\n color: ", ";\n }\n .step-label.dot-typography {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &.error {\n .dot-typography {\n color: ", ";\n }\n\n .dot-icon {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n }\n }\n }\n\n &.disabled {\n .dot-icon {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &:last-of-type .MuiStepContent-root {\n border-left-color: transparent;\n }\n }\n }\n\n .", " {\n width: 100%;\n height: calc(100vh - 78px);\n overflow-y: auto;\n\n &.center-content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n }\n\n .step-content-container {\n padding: ", ";\n }\n }\n }\n "], ["\n &.", " {\n display: flex;\n align-items: flex-start;\n padding: 0;\n width: 100%;\n\n &.left {\n flex-direction: row;\n .", " {\n border-left: 1px solid ", ";\n }\n }\n\n &.right {\n flex-direction: row-reverse;\n .", " {\n border-right: 1px solid ", ";\n }\n }\n\n .", " {\n padding: ", ";\n\n &.MuiStepper-horizontal {\n padding: 0;\n display: flex;\n flex-direction: column;\n }\n\n .MuiStep-root {\n width: 315px;\n\n .dot-icon {\n display: flex;\n background: ", ";\n border-radius: 50%;\n color: ", ";\n height: 28px;\n width: 28px;\n }\n\n .dot-typography {\n color: ", ";\n }\n\n .MuiStepContent-root {\n border-left-color: ", ";\n }\n\n &.MuiStep-horizontal {\n padding: ", ";\n\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n .horizontal-step-description {\n color: ", ";\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.completed {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.active {\n background: ", ";\n }\n\n &.error {\n .dot-avatar i:before {\n color: ", ";\n }\n .dot-avatar,\n .dot-icon {\n background: ", ";\n }\n }\n\n &.in-progress {\n .dot-avatar i:before {\n color: ", ";\n }\n }\n }\n\n &.MuiStep-vertical {\n &.completed {\n .dot-typography,\n .dot-icon {\n color: ", ";\n }\n }\n\n &.active {\n .dot-icon {\n background: ", ";\n color: ", ";\n }\n .step-label.dot-typography {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &.error {\n .dot-typography {\n color: ", ";\n }\n\n .dot-icon {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n }\n }\n }\n\n &.disabled {\n .dot-icon {\n color: ", ";\n }\n .dot-typography {\n color: ", ";\n }\n }\n\n &:last-of-type .MuiStepContent-root {\n border-left-color: transparent;\n }\n }\n }\n\n .", " {\n width: 100%;\n height: calc(100vh - 78px);\n overflow-y: auto;\n\n &.center-content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n }\n\n .step-content-container {\n padding: ", ";\n }\n }\n }\n "])), rootClassName$i, contentClassName, theme.palette.layer.n200, contentClassName, theme.palette.layer.n200, stepListClassName, theme.spacing(3), theme.palette.primary['50'], theme.palette.primary['50'], theme.palette.layer.n300, theme.palette.layer.n300, theme.spacing(1), theme.palette.layer.n300, theme.palette.layer.n100, theme.palette.layer.n500, theme.palette.layer.n400, theme.palette.secondary['500'], theme.palette.secondary['50'], theme.palette.layer['n50'], theme.palette.error['500'], theme.palette.error['50'], theme.palette.primary['400'], theme.palette.layer.n700, theme.palette.primary['400'], theme.palette.layer.n0, theme.palette.primary['500'], theme.palette.layer.n700, theme.palette.error.main, theme.palette.layer.n0, theme.palette.error.main, theme.palette.error.main, theme.palette.primary['50'], theme.palette.layer.n300, contentClassName, theme.spacing(3, 3, 2, 3));
8433
8468
  });
8434
8469
  var StepContentWrapper = styled__default["default"].div.withConfig({
8435
8470
  displayName: "Stepperstyles__StepContentWrapper",
@@ -8485,17 +8520,19 @@
8485
8520
  onSubmit = _a.onSubmit,
8486
8521
  _e = _a.orientation,
8487
8522
  orientation = _e === void 0 ? 'vertical' : _e,
8523
+ _f = _a.disableUncompletedStepNav,
8524
+ disableUncompletedStepNav = _f === void 0 ? false : _f,
8488
8525
  steps = _a.steps,
8489
- _f = _a.stepsPosition,
8490
- stepsPosition = _f === void 0 ? 'left' : _f,
8491
- _g = _a.submitButtonText,
8492
- submitButtonText = _g === void 0 ? 'Complete' : _g;
8493
- var _h = React.useState(activeStep),
8494
- currentStep = _h[0],
8495
- setActiveStep = _h[1];
8496
- var _j = React.useState(false),
8497
- isStickyBottom = _j[0],
8498
- setIsStickyBottom = _j[1];
8526
+ _g = _a.stepsPosition,
8527
+ stepsPosition = _g === void 0 ? 'left' : _g,
8528
+ _h = _a.submitButtonText,
8529
+ submitButtonText = _h === void 0 ? 'Complete' : _h;
8530
+ var _j = React.useState(activeStep),
8531
+ currentStep = _j[0],
8532
+ setActiveStep = _j[1];
8533
+ var _k = React.useState(false),
8534
+ isStickyBottom = _k[0],
8535
+ setIsStickyBottom = _k[1];
8499
8536
  var actionsRef = React.useRef(null);
8500
8537
  var stepperContentRef = React.useRef(null);
8501
8538
  var isHorizontal = orientation === 'horizontal';
@@ -8572,6 +8609,14 @@
8572
8609
  };
8573
8610
  var navigateToStep = function navigateToStep(id) {
8574
8611
  if (id !== currentStep) {
8612
+ if (disableUncompletedStepNav) {
8613
+ var previousStep = steps.find(function (step) {
8614
+ return step.id === id - 1;
8615
+ });
8616
+ if (previousStep && !previousStep.completed) {
8617
+ return;
8618
+ }
8619
+ }
8575
8620
  var stepSelected = steps.find(function (step) {
8576
8621
  return step.id === id;
8577
8622
  });
@@ -9157,7 +9202,7 @@
9157
9202
  componentId: "nko9j-0"
9158
9203
  })(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
9159
9204
  var theme = _a.theme;
9160
- return styled.css(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n &.", " {\n &.MuiTableCell-alignCenter > span.MuiTableSortLabel-root {\n padding-left: 26px;\n }\n\n .dot-cell-typography {\n font-family: ", ";\n }\n }\n "], ["\n &.", " {\n &.MuiTableCell-alignCenter > span.MuiTableSortLabel-root {\n padding-left: 26px;\n }\n\n .dot-cell-typography {\n font-family: ", ";\n }\n }\n "])), rootClassName$b, theme.typography.h4.fontFamily);
9205
+ return styled.css(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n &.", " {\n &.MuiTableCell-alignCenter > span.MuiTableSortLabel-root {\n padding-left: 26px;\n }\n\n > span.MuiTableSortLabel-root.Mui-focusVisible {\n .dot-cell-typography {\n color: ", ";\n text-decoration: underline;\n }\n }\n\n .dot-cell-typography {\n font-family: ", ";\n }\n }\n "], ["\n &.", " {\n &.MuiTableCell-alignCenter > span.MuiTableSortLabel-root {\n padding-left: 26px;\n }\n\n > span.MuiTableSortLabel-root.Mui-focusVisible {\n .dot-cell-typography {\n color: ", ";\n text-decoration: underline;\n }\n }\n\n .dot-cell-typography {\n font-family: ", ";\n }\n }\n "])), rootClassName$b, theme.palette.primary.main, theme.typography.h4.fontFamily);
9161
9206
  });
9162
9207
  var templateObject_1$b, templateObject_2$a;
9163
9208
 
@@ -9748,6 +9793,7 @@
9748
9793
  ref: wrapperRef
9749
9794
  }, {
9750
9795
  children: [!showMenu && renderTableActions(), (showMenu || actions.length > 2) && jsxRuntime.jsx(DotIconButton, {
9796
+ ariaLabel: "more options",
9751
9797
  className: "dot-table-action-icon",
9752
9798
  iconId: "options",
9753
9799
  iconSize: "small",
@@ -9939,6 +9985,7 @@
9939
9985
  children: errorText
9940
9986
  }), void 0)]
9941
9987
  }), void 0), jsxRuntime.jsx(DotIconButton, {
9988
+ ariaLabel: "delete file",
9942
9989
  className: rootClassName$5 + "-end-icon",
9943
9990
  "data-testid": dataTestId && dataTestId + "-end-icon",
9944
9991
  disabled: disableDelete,
@@ -10592,6 +10639,7 @@
10592
10639
  "data-testid": "dot-error-icon",
10593
10640
  iconId: "error-solid"
10594
10641
  }, void 0), jsxRuntime.jsx(DotIconButton, {
10642
+ ariaLabel: "Open date picker",
10595
10643
  "data-testid": "date-picker-open-btn",
10596
10644
  iconId: "calendar",
10597
10645
  onClick: pickerButtonProps.onClick,
@@ -11084,6 +11132,7 @@
11084
11132
  "data-testid": dataTestId && dataTestId + "-input-error-icon",
11085
11133
  iconId: "error-solid"
11086
11134
  }, void 0), !disableOpenPicker && !isComponentReadOnly && !disabled && jsxRuntime.jsx(DotIconButton, {
11135
+ ariaLabel: "Open time picker",
11087
11136
  "data-testid": dataTestId && dataTestId + "-open-btn",
11088
11137
  iconId: "pending-clock",
11089
11138
  onClick: function (_event) {
@@ -1,8 +1,8 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { AccordionProps } from './Accordion';
3
3
  declare const _default: ComponentMeta<({ actions, ariaLabel, children, className, "data-testid": dataTestId, disabled, expanded, hasElevation, onChange, square, startIcon, summary, noWrap, }: AccordionProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<AccordionProps>;
6
- export declare const WithExpanded: Story<AccordionProps>;
7
- export declare const WithStartIcons: Story<AccordionProps>;
8
- export declare const WithNoWrap: Story<AccordionProps>;
5
+ export declare const Default: any;
6
+ export declare const WithExpanded: any;
7
+ export declare const WithStartIcons: any;
8
+ export declare const WithNoWrap: any;
@@ -2,23 +2,8 @@ import { ChangeEvent, FocusEvent, HTMLAttributes, JSXElementConstructor, ReactNo
2
2
  import { AutocompleteCloseReason, AutocompleteGetTagProps, AutocompleteRenderOptionState, FilterOptionsState } from '@mui/material';
3
3
  import { CommonProps } from '../CommonProps';
4
4
  import { inputSizeOptions } from '../input-form-fields/InputFormFields.propTypes';
5
+ import { ActionItem, AutoCompleteOption, AutoCompleteValue } from './utils/interface';
5
6
  export declare const DEFAULT_ACTION_ITEM_TEXT = "Add new item";
6
- export interface ActionItem {
7
- /** The icon to display on the button */
8
- iconId?: string;
9
- /** Event callback */
10
- onClick: (inputText?: string) => void;
11
- /** If set to true, it will prevent duplicate item insertion */
12
- preventDuplicateInsertion?: boolean;
13
- /** Text/Node displayed */
14
- text?: string | ReactNode;
15
- }
16
- export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[] | null;
17
- export interface AutoCompleteOption {
18
- error?: boolean;
19
- group?: string;
20
- title: string;
21
- }
22
7
  /**
23
8
  * AutoCompleteOption can be extended for the use case when customizing
24
9
  * autocomplete option rendering by using `renderOption` prop.
@@ -1,5 +1,6 @@
1
1
  import { ComponentMeta, Story } from '@storybook/react';
2
- import { AutoCompleteOption, AutoCompleteProps } from './AutoComplete';
2
+ import { AutoCompleteProps } from './AutoComplete';
3
+ import { AutoCompleteOption } from './utils/interface';
3
4
  import { AutoCompleteWithRenderOption } from './Autocomplete.stories.data';
4
5
  declare const _default: ComponentMeta<(<T extends AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, inputId, inputRef, inputValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, readOnly, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => JSX.Element)>;
5
6
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import { ChangeEvent } from 'react';
2
- import { ActionItem, AutoCompleteOption, AutoCompleteProps, AutoCompleteValue } from './AutoComplete';
2
+ import { AutoCompleteProps } from './AutoComplete';
3
+ import { ActionItem, AutoCompleteOption, AutoCompleteValue } from './utils/interface';
3
4
  import { CommonProps } from '../CommonProps';
4
5
  export declare const movies: AutoCompleteOption[];
5
6
  export declare const handleActionItemClick: (newItem?: string) => void;
@@ -1,3 +1,4 @@
1
1
  export type { AutocompleteRenderOptionState, FilterOptionsState, } from '@mui/material';
2
2
  export * from './AutoComplete';
3
+ export * from './utils/interface';
3
4
  export { parseAutoCompleteValue } from './utils/helpers';
@@ -1,6 +1,6 @@
1
1
  import { AutocompleteGetTagProps } from '@mui/material';
2
2
  import { ChipSize } from '../../chip/Chip';
3
- import { AutoCompleteOption, AutoCompleteValue } from '../AutoComplete';
3
+ import { AutoCompleteOption, AutoCompleteValue } from './interface';
4
4
  export declare const parseAutoCompleteValue: (value: AutoCompleteValue) => string;
5
5
  export interface GetChipsFromAutocompleteProps {
6
6
  chipSize?: ChipSize;
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ActionItem {
3
+ /** The icon to display on the button */
4
+ iconId?: string;
5
+ /** Event callback */
6
+ onClick: (inputText?: string) => void;
7
+ /** If set to true, it will prevent duplicate item insertion */
8
+ preventDuplicateInsertion?: boolean;
9
+ /** Text/Node displayed */
10
+ text?: string | ReactNode;
11
+ }
12
+ export declare type AutoCompleteValue = string | string[] | AutoCompleteOption | AutoCompleteOption[] | null;
13
+ export interface AutoCompleteOption {
14
+ error?: boolean;
15
+ group?: string;
16
+ title: string;
17
+ }
@@ -15,6 +15,8 @@ export interface AvatarProps extends CommonProps {
15
15
  iconId?: string;
16
16
  /** Source for the image used for the avatar */
17
17
  imageSrc?: string;
18
+ /** The number to be displayed. Only the first 2 digits will be displayed */
19
+ number?: number;
18
20
  /** Event callback */
19
21
  onClick?: (event: MouseEvent) => void;
20
22
  /** Size of avatar displayed */
@@ -32,4 +34,4 @@ export interface AvatarProps extends CommonProps {
32
34
  /** The shape of the avatar */
33
35
  variant?: AvatarVariant;
34
36
  }
35
- export declare const DotAvatar: ({ alt, ariaLabel, ariaRole, className, component, color, "data-testid": dataTestId, iconId, imageSrc, onClick, size, tabIndex, text, type, tooltip, variant, style, }: AvatarProps) => JSX.Element;
37
+ export declare const DotAvatar: ({ alt, ariaLabel, ariaRole, className, component, color, "data-testid": dataTestId, iconId, imageSrc, onClick, number, size, tabIndex, text, type, tooltip, variant, style, }: AvatarProps) => JSX.Element;