@digital-ai/dot-components 2.8.2 → 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 (30) hide show
  1. package/CHANGE_LOG.md +26 -11
  2. package/index.esm.js +54 -32
  3. package/index.umd.js +68 -45
  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/utils/formHelpers.d.ts +1 -1
  18. package/lib/components/file-upload/FileUpload.stories.d.ts +5 -5
  19. package/lib/components/inline-edit/InlineEdit.stories.d.ts +4 -5
  20. package/lib/components/linear-progress/LinearProgress.stories.d.ts +2 -2
  21. package/lib/components/list/List.stories.d.ts +3 -3
  22. package/lib/components/progress/Progress.stories.d.ts +2 -2
  23. package/lib/components/radio/RadioGroup.stories.d.ts +2 -2
  24. package/lib/components/snackbar/Snackbar.stories.d.ts +3 -3
  25. package/lib/components/split-button/SplitButton.stories.d.ts +6 -6
  26. package/lib/components/stepper/Stepper.stories.d.ts +7 -7
  27. package/lib/components/switch/Switch.stories.d.ts +9 -9
  28. package/lib/components/truncate-with-tooltip/TruncateWithTooltip.stories.d.ts +5 -5
  29. package/lib/components/typography/Typography.stories.d.ts +4 -4
  30. package/package.json +1 -1
package/CHANGE_LOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.9.0](https://www.npmjs.com/package/@digital-ai/dot-components) (06/07/2023)
4
+
5
+ [Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.8.2...2.9.0)
6
+
7
+ **Features:**
8
+
9
+ - S-90959: `DotAvatar` support numbers [\#1515](https://github.com/digital-ai/dot-components/pull/1515) ([CWSites](https://github.com/CWSites))
10
+
11
+ **Fixed bugs:**
12
+
13
+ - S-90959: Update breadcrumb separator alignment [\#1517](https://github.com/digital-ai/dot-components/pull/1517) ([CWSites](https://github.com/CWSites))
14
+ - D-25282: parse defaultValue according to multiple true/false [\#1510](https://github.com/digital-ai/dot-components/pull/1510) ([CWSites](https://github.com/CWSites))
15
+ - D-25283: AutoComplete options should default to an empty array [\#1509](https://github.com/digital-ai/dot-components/pull/1509) ([CWSites](https://github.com/CWSites))
16
+
17
+ **Misc:**
18
+
19
+ - S-91984: add default ariaLabel to DotIconButton for a11y [\#1514](https://github.com/digital-ai/dot-components/pull/1514) ([CWSites](https://github.com/CWSites))
20
+ - Refactor Autocomplete Popper to be separate file [\#1513](https://github.com/digital-ai/dot-components/pull/1513) ([CWSites](https://github.com/CWSites))
21
+
3
22
  ## [2.8.2](https://www.npmjs.com/package/@digital-ai/dot-components) (05/26/2023)
4
23
 
5
24
  [Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.21.11...2.8.2)
@@ -76,10 +95,6 @@
76
95
 
77
96
  - D-24626: Add startEditable attribute to InlineEdit [\#1466](https://github.com/digital-ai/dot-components/pull/1466) ([jmcnally](https://github.com/jmcnally))
78
97
 
79
- **Fixed bugs:**
80
-
81
- - D-24807: `Demo app` - fix error when starting demo application [\#1451](https://github.com/digital-ai/dot-components/pull/1451) ([dmiletic85](https://github.com/dmiletic85))
82
-
83
98
  **Misc:**
84
99
 
85
100
  - Updates to deprecated github action `set-output` [\#1465](https://github.com/digital-ai/dot-components/pull/1465) ([CWSites](https://github.com/CWSites))
@@ -109,6 +124,7 @@
109
124
  **Fixed bugs:**
110
125
 
111
126
  - `DotTimePicker`, `DotDatePicker`: fix issues with controlled and uncontrolled states [\#1454](https://github.com/digital-ai/dot-components/pull/1454) ([dmiletic85](https://github.com/dmiletic85))
127
+ - D-24807: `Demo app` - fix error when starting demo application [\#1451](https://github.com/digital-ai/dot-components/pull/1451) ([dmiletic85](https://github.com/dmiletic85))
112
128
 
113
129
  **Misc:**
114
130
 
@@ -220,16 +236,13 @@
220
236
  **Fixed bugs:**
221
237
 
222
238
  - D-24235: Empty table pagination [\#1402](https://github.com/digital-ai/dot-components/pull/1402) ([ryangamble](https://github.com/ryangamble))
239
+ - D-24216: A few minor app-switcher display changes [\#1400](https://github.com/digital-ai/dot-components/pull/1400) ([jmcnally](https://github.com/jmcnally))
223
240
  - Issue \#1271: Updates to `AutoComplete` sizing with `dense` and `size` props [\#1395](https://github.com/digital-ai/dot-components/pull/1395) ([CWSites](https://github.com/CWSites))
224
241
 
225
242
  ## [1.21.9](https://www.npmjs.com/package/@digital-ai/dot-components) (03/03/2023)
226
243
 
227
244
  [Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.4.0...1.21.9)
228
245
 
229
- **Fixed bugs:**
230
-
231
- - D-24216: A few minor app-switcher display changes [\#1400](https://github.com/digital-ai/dot-components/pull/1400) ([jmcnally](https://github.com/jmcnally))
232
-
233
246
  **Misc:**
234
247
 
235
248
  - Setup v1 to use dot-icons library [\#1399](https://github.com/digital-ai/dot-components/pull/1399) ([CWSites](https://github.com/CWSites))
@@ -786,7 +799,6 @@
786
799
  - S-81949: attempting branch name instead of sha [\#1028](https://github.com/digital-ai/dot-components/pull/1028) ([CWSites](https://github.com/CWSites))
787
800
  - S-81949: simplfying wait step, extend interval to 30s [\#1027](https://github.com/digital-ai/dot-components/pull/1027) ([CWSites](https://github.com/CWSites))
788
801
  - S-81949: add release candidate workflow [\#1026](https://github.com/digital-ai/dot-components/pull/1026) ([CWSites](https://github.com/CWSites))
789
- - S-81949: make NPM wait for other jobs to finish pre-rc [\#1019](https://github.com/digital-ai/dot-components/pull/1019) ([CWSites](https://github.com/CWSites))
790
802
 
791
803
  ## [1.9.1](https://www.npmjs.com/package/@digital-ai/dot-components) (02/17/2022)
792
804
 
@@ -939,6 +951,7 @@
939
951
  **Fixed bugs:**
940
952
 
941
953
  - D-19337: `List`: Circular dependency [\#897](https://github.com/digital-ai/dot-components/pull/897) ([dmiletic85](https://github.com/dmiletic85))
954
+ - D-19330: `AppToolbar` shouldn't have grey dividers [\#891](https://github.com/digital-ai/dot-components/pull/891) ([dmiletic85](https://github.com/dmiletic85))
942
955
  - D-19200: `List` Nested list drawer is not rendering correctly [\#869](https://github.com/digital-ai/dot-components/pull/869) ([dmiletic85](https://github.com/dmiletic85))
943
956
 
944
957
  ## [1.5.3](https://www.npmjs.com/package/@digital-ai/dot-components) (12/17/2021)
@@ -981,9 +994,7 @@
981
994
 
982
995
  **Fixed bugs:**
983
996
 
984
- - D-19330: `AppToolbar` shouldn't have grey dividers [\#891](https://github.com/digital-ai/dot-components/pull/891) ([dmiletic85](https://github.com/dmiletic85))
985
997
  - D-19294: Fix broken expand/collapse for uncontrolled accordion [\#866](https://github.com/digital-ai/dot-components/pull/866) ([selsemore](https://github.com/selsemore))
986
- - D-19250: Fix alignment of DotAccordion collapsed/expanded icons [\#859](https://github.com/digital-ai/dot-components/pull/859) ([selsemore](https://github.com/selsemore))
987
998
 
988
999
  **Misc:**
989
1000
 
@@ -998,6 +1009,10 @@
998
1009
 
999
1010
  - S-80740: Expose DotAccordion 'expanded' and 'onChange' props [\#860](https://github.com/digital-ai/dot-components/pull/860) ([selsemore](https://github.com/selsemore))
1000
1011
 
1012
+ **Fixed bugs:**
1013
+
1014
+ - D-19250: Fix alignment of DotAccordion collapsed/expanded icons [\#859](https://github.com/digital-ai/dot-components/pull/859) ([selsemore](https://github.com/selsemore))
1015
+
1001
1016
  **Misc:**
1002
1017
 
1003
1018
  - S-76843: Use digital.ai bot PAT for merging master \> develop [\#862](https://github.com/digital-ai/dot-components/pull/862) ([CWSites](https://github.com/CWSites))
package/index.esm.js CHANGED
@@ -1634,11 +1634,22 @@ const AvatarContent = ({
1634
1634
  'data-testid': dataTestId,
1635
1635
  iconId,
1636
1636
  imageSrc,
1637
+ number,
1637
1638
  size,
1638
1639
  text,
1639
1640
  type
1640
1641
  }) => {
1642
+ const parsedNumber = () => {
1643
+ if (!isNumber(number)) return;
1644
+ const numberArray = number.toString().split('');
1645
+ if (numberArray.length > 1) {
1646
+ return `${numberArray[0]}${numberArray[1]}`;
1647
+ } else {
1648
+ return number;
1649
+ }
1650
+ };
1641
1651
  const parsedText = () => {
1652
+ if (!isString$1(text)) return;
1642
1653
  const textArray = text.split(' ');
1643
1654
  if (textArray.length > 1) {
1644
1655
  const firstInitial = textArray[0].slice(0, 1);
@@ -1661,7 +1672,7 @@ const AvatarContent = ({
1661
1672
  return jsx(DotTypography, Object.assign({
1662
1673
  variant: size === 'small' ? 'caption' : getHeadingFromAvatarSize()
1663
1674
  }, {
1664
- children: parsedText()
1675
+ children: parsedNumber() || parsedText()
1665
1676
  }), void 0);
1666
1677
  }
1667
1678
  return null;
@@ -1677,6 +1688,7 @@ const DotAvatar = ({
1677
1688
  iconId,
1678
1689
  imageSrc,
1679
1690
  onClick,
1691
+ number,
1680
1692
  size: _size = 'medium',
1681
1693
  tabIndex: _tabIndex = 0,
1682
1694
  text: _text = alt,
@@ -1716,6 +1728,7 @@ const DotAvatar = ({
1716
1728
  "data-testid": dataTestId,
1717
1729
  iconId: iconId,
1718
1730
  imageSrc: imageSrc,
1731
+ number: number,
1719
1732
  size: _size,
1720
1733
  text: _text,
1721
1734
  type: _type
@@ -2310,7 +2323,7 @@ const DotIconButton = ({
2310
2323
  title: tooltip
2311
2324
  }, {
2312
2325
  children: jsx(StyledIconButton, Object.assign({
2313
- "aria-label": ariaLabel,
2326
+ "aria-label": ariaLabel || tooltip || `${iconId} icon button`,
2314
2327
  classes: {
2315
2328
  root: rootClasses
2316
2329
  },
@@ -2348,6 +2361,7 @@ const DotDrawerHeader = ({
2348
2361
  role: "heading"
2349
2362
  }, {
2350
2363
  children: [children, variant !== 'permanent' && jsx(DotIconButton, {
2364
+ ariaLabel: "close drawer",
2351
2365
  className: "close-button",
2352
2366
  iconId: "close",
2353
2367
  onClick: onClose
@@ -2379,6 +2393,7 @@ const DotDrawerBody = ({
2379
2393
  role: _ariaRole
2380
2394
  }, {
2381
2395
  children: [children, !headerExists && variant !== 'permanent' && jsx(DotIconButton, {
2396
+ ariaLabel: "close drawer",
2382
2397
  className: "dot-drawer-close-button",
2383
2398
  iconId: "close",
2384
2399
  onClick: onClose
@@ -3059,6 +3074,7 @@ function SearchInput({
3059
3074
  iconId: "search"
3060
3075
  }, void 0);
3061
3076
  const clearSearchIcon = jsx(DotIconButton, {
3077
+ ariaLabel: "clear search text",
3062
3078
  iconId: "close",
3063
3079
  onClick: handleClear,
3064
3080
  size: "small",
@@ -3128,7 +3144,7 @@ const DotCopyButton = ({
3128
3144
  "data-testid": dataTestId
3129
3145
  }, {
3130
3146
  children: [!showCopiedIcon && jsx(DotIconButton, {
3131
- ariaLabel: _ariaLabel,
3147
+ ariaLabel: _ariaLabel || 'copy to clipboard',
3132
3148
  "data-testid": `${dataTestId}-button`,
3133
3149
  iconId: "duplicate",
3134
3150
  onClick: copy,
@@ -3844,7 +3860,7 @@ const Brand = ({
3844
3860
  }), void 0), jsx(DotTooltip, Object.assign({
3845
3861
  title: "digital.ai"
3846
3862
  }, {
3847
- children: theme.palette.mode === "light" ? jsx(ForwardRef$1, {
3863
+ children: theme.palette.mode === 'light' ? jsx(ForwardRef$1, {
3848
3864
  className: "company-name"
3849
3865
  }, void 0) : jsx(ForwardRef, {
3850
3866
  className: "company-name"
@@ -3950,6 +3966,7 @@ const DotSidebar = ({
3950
3966
  className: "go-back"
3951
3967
  }, {
3952
3968
  children: [jsx(DotIconButton, {
3969
+ ariaLabel: "go back",
3953
3970
  className: "go-back-button",
3954
3971
  "data-testid": "back-button",
3955
3972
  iconId: backItem.iconId || 'back',
@@ -4325,7 +4342,9 @@ const getChipsFromAutocomplete = ({
4325
4342
  isReadOnly: _isReadOnly = false,
4326
4343
  values
4327
4344
  }) => {
4345
+ if (values === undefined) return;
4328
4346
  return values.map((option, index) => {
4347
+ if (!option) return null;
4329
4348
  const hasStringValue = isString$1(option);
4330
4349
  const optionAsString = option;
4331
4350
  const optionAsObject = option;
@@ -4380,7 +4399,7 @@ const DotAutoComplete = ({
4380
4399
  onInputChange,
4381
4400
  onOpen,
4382
4401
  open,
4383
- options,
4402
+ options: _options = [],
4384
4403
  persistentLabel,
4385
4404
  placeholder,
4386
4405
  readOnly: _readOnly = false,
@@ -4392,23 +4411,21 @@ const DotAutoComplete = ({
4392
4411
  warning: _warning = false
4393
4412
  }) => {
4394
4413
  const [showPlaceholder, setShowPlaceholder] = useState(!value && !defaultValue);
4395
- const {
4396
- iconId: actionIconId = 'add',
4397
- text: actionItemText,
4398
- onClick: onActionItemClick,
4399
- preventDuplicateInsertion
4400
- } = actionItem || {};
4401
- const isActionItemDefined = onActionItemClick !== undefined;
4402
- let highlightedOption = null;
4403
4414
  const [isOpened, setIsOpened] = useState(false);
4404
4415
  const [inputText, setInputText] = useState('');
4416
+ // Used for focus management while popper is opened
4417
+ const actionItemRef = useRef();
4418
+ const onActionItemClick = actionItem === null || actionItem === void 0 ? void 0 : actionItem.onClick;
4419
+ const allowActionButtonClick = !_freesolo && onActionItemClick;
4420
+ const isActionItemDefined = onActionItemClick !== undefined;
4421
+ const popperOpen = !_readOnly && (open || isOpened);
4422
+ const preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
4405
4423
  const textFieldWarningClassName = !_error && _warning && warningClassName;
4406
4424
  const rootClasses = useStylesWithRootClass(rootClassName$I, _size === 'medium' && inputMediumClassName, className);
4407
- const textFieldRootClasses = useStylesWithRootClass(rootClassName$13, className, _readOnly ? 'read-only' : '', textFieldWarningClassName);
4425
+ const textFieldRootClasses = useStylesWithRootClass(rootClassName$13, _readOnly && 'read-only', textFieldWarningClassName);
4408
4426
  const inputRootClasses = useStylesWithRootClass(inputRootClassName, !_dense && inputMediumClassName);
4427
+ let highlightedOption = null;
4409
4428
  let textFieldInput;
4410
- // Used for focus management while popper is opened
4411
- const actionItemRef = useRef();
4412
4429
  const textFieldRef = element => {
4413
4430
  // We want to use this element in callback function
4414
4431
  textFieldInput = element;
@@ -4432,11 +4449,11 @@ const DotAutoComplete = ({
4432
4449
  setShowPlaceholder(parseAutoCompleteValue(val) === '');
4433
4450
  };
4434
4451
  const sortOptions = () => {
4435
- return _group ? options.sort((a, b) => {
4452
+ return _group ? _options.sort((a, b) => {
4436
4453
  const aGroup = a.group ? a.group : '';
4437
4454
  const bGroup = b.group ? b.group : '';
4438
4455
  return -bGroup.localeCompare(aGroup);
4439
- }) : options;
4456
+ }) : _options;
4440
4457
  };
4441
4458
  const handleBlur = event => {
4442
4459
  event.relatedTarget !== actionItemRef.current && setIsOpened(false);
@@ -4456,16 +4473,15 @@ const DotAutoComplete = ({
4456
4473
  }), void 0);
4457
4474
  // Disable action if customer explicitly enabled duplicate
4458
4475
  // item insertion and input text is found inside the 'options'
4459
- const isActionDisabled = preventDuplicateInsertion && checkIfDuplicateItem(inputText, options);
4476
+ const isActionDisabled = preventDuplicateInsertion && checkIfDuplicateItem(inputText, _options);
4460
4477
  // Display warning icon if disabled
4461
- const actionStartIconId = isActionDisabled ? 'warning-solid' : actionIconId;
4478
+ const actionStartIconId = isActionDisabled ? 'warning-solid' : (actionItem === null || actionItem === void 0 ? void 0 : actionItem.iconId) || 'add';
4462
4479
  const defaultText = inputText ? `Add "${inputText}"` : DEFAULT_ACTION_ITEM_TEXT;
4463
- const nonDisabledText = actionItemText ? actionItemText : defaultText;
4480
+ const nonDisabledText = (actionItem === null || actionItem === void 0 ? void 0 : actionItem.text) || defaultText;
4464
4481
  const itemText = isActionDisabled ? 'Value already exists' : nonDisabledText;
4465
- // If simple text, we need to give it a class so that
4466
- // styling for displaying ellipsis on a long text
4467
- // can be applied. If it is custom node coming from the
4468
- // consumer, then leave it as it is.
4482
+ // If simple text, we need to give it a class so that styling for
4483
+ // displaying ellipsis on a long text can be applied. If it is
4484
+ // custom node coming from the consumer, then leave it as it is.
4469
4485
  const itemTextNode = isString$1(itemText) ? jsx("span", Object.assign({
4470
4486
  className: "dot-action-item-text"
4471
4487
  }, {
@@ -4531,10 +4547,11 @@ const DotAutoComplete = ({
4531
4547
  }) || undefined;
4532
4548
  // Create callback when action item click event handler is defined,
4533
4549
  // free-solo mode is NOT set and 'Enter' key has been pressed
4534
- const handleKeyDown = !_freesolo && onActionItemClick && (event => {
4550
+ const handleKeyDown = allowActionButtonClick && (event => {
4535
4551
  if (event.key === 'Enter') {
4552
+ const isDuplicate = checkIfDuplicateItem(inputText, _options);
4536
4553
  // Do NOT execute callback if duplicate item or have selected an option from the dropdown
4537
- if (preventDuplicateInsertion && checkIfDuplicateItem(inputText, options) || highlightedOption) return;
4554
+ if (preventDuplicateInsertion && isDuplicate || highlightedOption) return;
4538
4555
  onActionButtonClick();
4539
4556
  }
4540
4557
  }) || undefined;
@@ -4545,7 +4562,7 @@ const DotAutoComplete = ({
4545
4562
  values
4546
4563
  });
4547
4564
  const handleTagsRender = () => {
4548
- if (!_multiple) return;
4565
+ if (!_multiple || isString$1(defaultValue)) return;
4549
4566
  return renderTags || handleRenderChips;
4550
4567
  };
4551
4568
  const renderErrorOrWarningIcon = () => {
@@ -4582,7 +4599,7 @@ const DotAutoComplete = ({
4582
4599
  inputRoot: inputRootClasses
4583
4600
  },
4584
4601
  "data-testid": dataTestId,
4585
- defaultValue: defaultValue,
4602
+ defaultValue: _multiple && isString$1(defaultValue) ? [defaultValue] : defaultValue,
4586
4603
  disabled: _disabled,
4587
4604
  filterOptions: filterOptions,
4588
4605
  filterSelectedOptions: _filterSelectedOptions,
@@ -4610,7 +4627,7 @@ const DotAutoComplete = ({
4610
4627
  onKeyDown: handleKeyDown,
4611
4628
  // We want to close the popper each time focus is shifted from the autocomplete
4612
4629
  onOpen: handleOpen,
4613
- open: !_readOnly && (open || isOpened),
4630
+ open: popperOpen,
4614
4631
  options: sortOptions(),
4615
4632
  renderInput: params => {
4616
4633
  // InputBaseComponentProps is used here because that is the base
@@ -4670,7 +4687,7 @@ const DotAutoComplete = ({
4670
4687
  (_a = actionItemRef === null || actionItemRef === void 0 ? void 0 : actionItemRef.current) === null || _a === void 0 ? void 0 : _a.focus();
4671
4688
  }
4672
4689
  },
4673
- placeholder: showPlaceholder ? placeholder : undefined,
4690
+ placeholder: showPlaceholder && placeholder,
4674
4691
  required: _required,
4675
4692
  size: _size,
4676
4693
  variant: "outlined"
@@ -4728,7 +4745,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs).withConfig({
4728
4745
  componentId: "sc-7cg374-1"
4729
4746
  })(["", ""], ({
4730
4747
  theme
4731
- }) => css(["&.", "{margin-bottom:0;.MuiBreadcrumbs-ol{flex-wrap:nowrap;}.MuiBreadcrumbs-li,.separator{color:", ";margin:0;white-space:nowrap;}.separator{font-size:12px;width:20px;height:20px;padding:0;}.MuiBreadcrumbs-separator{margin:0;}.MuiLink-underlineHover{cursor:pointer;}.MuiBreadcrumbs-li:last-child{overflow:hidden;text-overflow:ellipsis;}.breadcrumb{padding:", ";}.current-page{color:", ";cursor:default;}}"], rootClassName$F, theme.palette.grey[300], theme.spacing(0.5, 2), theme.palette.grey[700]));
4748
+ }) => css(["&.", "{margin-bottom:0;.MuiBreadcrumbs-ol{flex-wrap:nowrap;}.MuiBreadcrumbs-li,.separator{color:", ";margin:0;white-space:nowrap;}.separator{font-size:12px;width:20px;height:20px;padding:0;i{line-height:20px;}}.MuiBreadcrumbs-separator{margin:0;}.MuiLink-underlineHover{cursor:pointer;}.MuiBreadcrumbs-li:last-child{overflow:hidden;text-overflow:ellipsis;}.breadcrumb{padding:", ";}.current-page{color:", ";cursor:default;}}"], rootClassName$F, theme.palette.grey[300], theme.spacing(0.5, 2), theme.palette.grey[700]));
4732
4749
 
4733
4750
  const compareWidth = (parentEl, childEl) => {
4734
4751
  return parentEl.getBoundingClientRect().width < childEl.getBoundingClientRect().width;
@@ -5538,6 +5555,7 @@ const DotDialog = ({
5538
5555
  className: "dot-dialog-title"
5539
5556
  }, {
5540
5557
  children: [renderNodeOrTypography(title, 'h2'), closeIconVisible && jsx(DotIconButton, {
5558
+ ariaLabel: "close dialog",
5541
5559
  iconId: "close",
5542
5560
  onClick: handleCancel,
5543
5561
  size: "small"
@@ -8993,6 +9011,7 @@ const DotTableActions = ({
8993
9011
  ref: wrapperRef
8994
9012
  }, {
8995
9013
  children: [!showMenu && renderTableActions(), (showMenu || actions.length > 2) && jsx(DotIconButton, {
9014
+ ariaLabel: "more options",
8996
9015
  className: "dot-table-action-icon",
8997
9016
  iconId: "options",
8998
9017
  iconSize: "small",
@@ -9155,6 +9174,7 @@ const DotFileListItem = ({
9155
9174
  children: errorText
9156
9175
  }), void 0)]
9157
9176
  }), void 0), jsx(DotIconButton, {
9177
+ ariaLabel: "delete file",
9158
9178
  className: `${rootClassName$5}-end-icon`,
9159
9179
  "data-testid": dataTestId && `${dataTestId}-end-icon`,
9160
9180
  disabled: disableDelete,
@@ -9752,6 +9772,7 @@ const DotDatePicker = ({
9752
9772
  "data-testid": "dot-error-icon",
9753
9773
  iconId: "error-solid"
9754
9774
  }, void 0), jsx(DotIconButton, {
9775
+ ariaLabel: "Open date picker",
9755
9776
  "data-testid": "date-picker-open-btn",
9756
9777
  iconId: "calendar",
9757
9778
  onClick: pickerButtonProps.onClick,
@@ -10182,6 +10203,7 @@ const DotTimePicker = ({
10182
10203
  "data-testid": dataTestId && `${dataTestId}-input-error-icon`,
10183
10204
  iconId: "error-solid"
10184
10205
  }, void 0), !_disableOpenPicker && !isComponentReadOnly && !disabled && jsx(DotIconButton, {
10206
+ ariaLabel: "Open time picker",
10185
10207
  "data-testid": dataTestId && `${dataTestId}-open-btn`,
10186
10208
  iconId: "pending-clock",
10187
10209
  onClick: _event => handleTimePickerButtonClick(),
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
@@ -3406,6 +3421,7 @@
3406
3421
  iconId: "search"
3407
3422
  }, void 0);
3408
3423
  var clearSearchIcon = jsxRuntime.jsx(DotIconButton, {
3424
+ ariaLabel: "clear search text",
3409
3425
  iconId: "close",
3410
3426
  onClick: handleClear,
3411
3427
  size: "small",
@@ -3482,7 +3498,7 @@
3482
3498
  "data-testid": dataTestId
3483
3499
  }, {
3484
3500
  children: [!showCopiedIcon && jsxRuntime.jsx(DotIconButton, {
3485
- ariaLabel: ariaLabel,
3501
+ ariaLabel: ariaLabel || 'copy to clipboard',
3486
3502
  "data-testid": dataTestId + "-button",
3487
3503
  iconId: "duplicate",
3488
3504
  onClick: copy,
@@ -4238,7 +4254,7 @@
4238
4254
  }), void 0), jsxRuntime.jsx(DotTooltip, __assign({
4239
4255
  title: "digital.ai"
4240
4256
  }, {
4241
- children: theme.palette.mode === "light" ? jsxRuntime.jsx(ForwardRef$1, {
4257
+ children: theme.palette.mode === 'light' ? jsxRuntime.jsx(ForwardRef$1, {
4242
4258
  className: "company-name"
4243
4259
  }, void 0) : jsxRuntime.jsx(ForwardRef, {
4244
4260
  className: "company-name"
@@ -4359,6 +4375,7 @@
4359
4375
  className: "go-back"
4360
4376
  }, {
4361
4377
  children: [jsxRuntime.jsx(DotIconButton, {
4378
+ ariaLabel: "go back",
4362
4379
  className: "go-back-button",
4363
4380
  "data-testid": "back-button",
4364
4381
  iconId: backItem.iconId || 'back',
@@ -4767,7 +4784,9 @@
4767
4784
  _c = _a.isReadOnly,
4768
4785
  isReadOnly = _c === void 0 ? false : _c,
4769
4786
  values = _a.values;
4787
+ if (values === undefined) return;
4770
4788
  return values.map(function (option, index) {
4789
+ if (!option) return null;
4771
4790
  var hasStringValue = isString$1(option);
4772
4791
  var optionAsString = option;
4773
4792
  var optionAsObject = option;
@@ -4834,44 +4853,43 @@
4834
4853
  onInputChange = _a.onInputChange,
4835
4854
  onOpen = _a.onOpen,
4836
4855
  open = _a.open,
4837
- options = _a.options,
4856
+ _k = _a.options,
4857
+ options = _k === void 0 ? [] : _k,
4838
4858
  persistentLabel = _a.persistentLabel,
4839
4859
  placeholder = _a.placeholder,
4840
- _k = _a.readOnly,
4841
- readOnly = _k === void 0 ? false : _k,
4860
+ _l = _a.readOnly,
4861
+ readOnly = _l === void 0 ? false : _l,
4842
4862
  renderOption = _a.renderOption,
4843
4863
  renderTags = _a.renderTags,
4844
- _l = _a.required,
4845
- required = _l === void 0 ? false : _l,
4846
- _m = _a.size,
4847
- 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,
4848
4868
  value = _a.value,
4849
- _o = _a.warning,
4850
- warning = _o === void 0 ? false : _o;
4851
- var _p = React.useState(!value && !defaultValue),
4852
- showPlaceholder = _p[0],
4853
- setShowPlaceholder = _p[1];
4854
- var _q = actionItem || {},
4855
- _r = _q.iconId,
4856
- actionIconId = _r === void 0 ? 'add' : _r,
4857
- actionItemText = _q.text,
4858
- onActionItemClick = _q.onClick,
4859
- 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;
4860
4884
  var isActionItemDefined = onActionItemClick !== undefined;
4861
- var highlightedOption = null;
4862
- var _s = React.useState(false),
4863
- isOpened = _s[0],
4864
- setIsOpened = _s[1];
4865
- var _t = React.useState(''),
4866
- inputText = _t[0],
4867
- setInputText = _t[1];
4885
+ var popperOpen = !readOnly && (open || isOpened);
4886
+ var preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
4868
4887
  var textFieldWarningClassName = !error && warning && warningClassName;
4869
4888
  var rootClasses = useStylesWithRootClass(rootClassName$I, size === 'medium' && inputMediumClassName, className);
4870
- var textFieldRootClasses = useStylesWithRootClass(rootClassName$13, className, readOnly ? 'read-only' : '', textFieldWarningClassName);
4889
+ var textFieldRootClasses = useStylesWithRootClass(rootClassName$13, readOnly && 'read-only', textFieldWarningClassName);
4871
4890
  var inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
4891
+ var highlightedOption = null;
4872
4892
  var textFieldInput;
4873
- // Used for focus management while popper is opened
4874
- var actionItemRef = React.useRef();
4875
4893
  var textFieldRef = function textFieldRef(element) {
4876
4894
  // We want to use this element in callback function
4877
4895
  textFieldInput = element;
@@ -4920,14 +4938,13 @@
4920
4938
  // item insertion and input text is found inside the 'options'
4921
4939
  var isActionDisabled = preventDuplicateInsertion && checkIfDuplicateItem(inputText, options);
4922
4940
  // Display warning icon if disabled
4923
- var actionStartIconId = isActionDisabled ? 'warning-solid' : actionIconId;
4941
+ var actionStartIconId = isActionDisabled ? 'warning-solid' : (actionItem === null || actionItem === void 0 ? void 0 : actionItem.iconId) || 'add';
4924
4942
  var defaultText = inputText ? "Add \"" + inputText + "\"" : DEFAULT_ACTION_ITEM_TEXT;
4925
- var nonDisabledText = actionItemText ? actionItemText : defaultText;
4943
+ var nonDisabledText = (actionItem === null || actionItem === void 0 ? void 0 : actionItem.text) || defaultText;
4926
4944
  var itemText = isActionDisabled ? 'Value already exists' : nonDisabledText;
4927
- // If simple text, we need to give it a class so that
4928
- // styling for displaying ellipsis on a long text
4929
- // can be applied. If it is custom node coming from the
4930
- // 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.
4931
4948
  var itemTextNode = isString$1(itemText) ? jsxRuntime.jsx("span", __assign({
4932
4949
  className: "dot-action-item-text"
4933
4950
  }, {
@@ -4995,10 +5012,11 @@
4995
5012
  } || undefined;
4996
5013
  // Create callback when action item click event handler is defined,
4997
5014
  // free-solo mode is NOT set and 'Enter' key has been pressed
4998
- var handleKeyDown = !freesolo && onActionItemClick && function (event) {
5015
+ var handleKeyDown = allowActionButtonClick && function (event) {
4999
5016
  if (event.key === 'Enter') {
5017
+ var isDuplicate = checkIfDuplicateItem(inputText, options);
5000
5018
  // Do NOT execute callback if duplicate item or have selected an option from the dropdown
5001
- if (preventDuplicateInsertion && checkIfDuplicateItem(inputText, options) || highlightedOption) return;
5019
+ if (preventDuplicateInsertion && isDuplicate || highlightedOption) return;
5002
5020
  onActionButtonClick();
5003
5021
  }
5004
5022
  } || undefined;
@@ -5011,7 +5029,7 @@
5011
5029
  });
5012
5030
  };
5013
5031
  var handleTagsRender = function handleTagsRender() {
5014
- if (!multiple) return;
5032
+ if (!multiple || isString$1(defaultValue)) return;
5015
5033
  return renderTags || handleRenderChips;
5016
5034
  };
5017
5035
  var renderErrorOrWarningIcon = function renderErrorOrWarningIcon() {
@@ -5048,7 +5066,7 @@
5048
5066
  inputRoot: inputRootClasses
5049
5067
  },
5050
5068
  "data-testid": dataTestId,
5051
- defaultValue: defaultValue,
5069
+ defaultValue: multiple && isString$1(defaultValue) ? [defaultValue] : defaultValue,
5052
5070
  disabled: disabled,
5053
5071
  filterOptions: filterOptions,
5054
5072
  filterSelectedOptions: filterSelectedOptions,
@@ -5082,7 +5100,7 @@
5082
5100
  onKeyDown: handleKeyDown,
5083
5101
  // We want to close the popper each time focus is shifted from the autocomplete
5084
5102
  onOpen: handleOpen,
5085
- open: !readOnly && (open || isOpened),
5103
+ open: popperOpen,
5086
5104
  options: sortOptions(),
5087
5105
  renderInput: function (params) {
5088
5106
  // InputBaseComponentProps is used here because that is the base
@@ -5142,7 +5160,7 @@
5142
5160
  (_a = actionItemRef === null || actionItemRef === void 0 ? void 0 : actionItemRef.current) === null || _a === void 0 ? void 0 : _a.focus();
5143
5161
  }
5144
5162
  },
5145
- placeholder: showPlaceholder ? placeholder : undefined,
5163
+ placeholder: showPlaceholder && placeholder,
5146
5164
  required: required,
5147
5165
  size: size,
5148
5166
  variant: "outlined"
@@ -5207,7 +5225,7 @@
5207
5225
  componentId: "sc-7cg374-1"
5208
5226
  })(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
5209
5227
  var theme = _a.theme;
5210
- 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]);
5211
5229
  });
5212
5230
  var templateObject_1$I, templateObject_2$F, templateObject_3$9, templateObject_4$7;
5213
5231
 
@@ -6059,6 +6077,7 @@
6059
6077
  className: "dot-dialog-title"
6060
6078
  }, {
6061
6079
  children: [renderNodeOrTypography(title, 'h2'), closeIconVisible && jsxRuntime.jsx(DotIconButton, {
6080
+ ariaLabel: "close dialog",
6062
6081
  iconId: "close",
6063
6082
  onClick: handleCancel,
6064
6083
  size: "small"
@@ -9774,6 +9793,7 @@
9774
9793
  ref: wrapperRef
9775
9794
  }, {
9776
9795
  children: [!showMenu && renderTableActions(), (showMenu || actions.length > 2) && jsxRuntime.jsx(DotIconButton, {
9796
+ ariaLabel: "more options",
9777
9797
  className: "dot-table-action-icon",
9778
9798
  iconId: "options",
9779
9799
  iconSize: "small",
@@ -9965,6 +9985,7 @@
9965
9985
  children: errorText
9966
9986
  }), void 0)]
9967
9987
  }), void 0), jsxRuntime.jsx(DotIconButton, {
9988
+ ariaLabel: "delete file",
9968
9989
  className: rootClassName$5 + "-end-icon",
9969
9990
  "data-testid": dataTestId && dataTestId + "-end-icon",
9970
9991
  disabled: disableDelete,
@@ -10618,6 +10639,7 @@
10618
10639
  "data-testid": "dot-error-icon",
10619
10640
  iconId: "error-solid"
10620
10641
  }, void 0), jsxRuntime.jsx(DotIconButton, {
10642
+ ariaLabel: "Open date picker",
10621
10643
  "data-testid": "date-picker-open-btn",
10622
10644
  iconId: "calendar",
10623
10645
  onClick: pickerButtonProps.onClick,
@@ -11110,6 +11132,7 @@
11110
11132
  "data-testid": dataTestId && dataTestId + "-input-error-icon",
11111
11133
  iconId: "error-solid"
11112
11134
  }, void 0), !disableOpenPicker && !isComponentReadOnly && !disabled && jsxRuntime.jsx(DotIconButton, {
11135
+ ariaLabel: "Open time picker",
11113
11136
  "data-testid": dataTestId && dataTestId + "-open-btn",
11114
11137
  iconId: "pending-clock",
11115
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;
@@ -1,7 +1,8 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { AvatarProps } from './Avatar';
3
- declare const _default: ComponentMeta<({ alt, ariaLabel, ariaRole, className, component, color, "data-testid": dataTestId, iconId, imageSrc, onClick, size, tabIndex, text, type, tooltip, variant, style, }: AvatarProps) => JSX.Element>;
3
+ declare const _default: ComponentMeta<({ alt, ariaLabel, ariaRole, className, component, color, "data-testid": dataTestId, iconId, imageSrc, onClick, number, size, tabIndex, text, type, tooltip, variant, style, }: AvatarProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<AvatarProps>;
6
- export declare const AvatarButton: Story<AvatarProps>;
7
- export declare const WithTooltip: Story<AvatarProps>;
5
+ export declare const Default: any;
6
+ export declare const AvatarButton: any;
7
+ export declare const WithNumber: any;
8
+ export declare const WithTooltip: any;
@@ -1,8 +1,8 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { BadgeProps } from './Badge';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, badgeColor, badgeContent, children, className, "data-testid": dataTestId, invisible, max, overlap, variant, }: BadgeProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<BadgeProps>;
6
- export declare const WithNotification: Story<BadgeProps>;
7
- export declare const WithNotificationNumber: Story<BadgeProps>;
8
- export declare const WithMaxNumber: Story<BadgeProps>;
5
+ export declare const Default: any;
6
+ export declare const WithNotification: any;
7
+ export declare const WithNotificationNumber: any;
8
+ export declare const WithMaxNumber: any;
@@ -1,9 +1,9 @@
1
- import { ComponentMeta, Story } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { CheckboxProps, DotCheckbox } from './Checkbox';
3
3
  declare const _default: ComponentMeta<typeof DotCheckbox>;
4
4
  export default _default;
5
- export declare const Default: Story<CheckboxProps>;
6
- export declare const WithSmallSize: Story<CheckboxProps>;
7
- export declare const WithStartLabelPlacement: Story<CheckboxProps>;
8
- export declare const WithBottomLabelPlacement: Story<CheckboxProps>;
9
- export declare const WithIndeterminateOption: Story<CheckboxProps>;
5
+ export declare const Default: any;
6
+ export declare const WithSmallSize: any;
7
+ export declare const WithStartLabelPlacement: any;
8
+ export declare const WithBottomLabelPlacement: any;
9
+ export declare const WithIndeterminateOption: (args: CheckboxProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
2
- import { DotCheckboxGroup, CheckboxGroupProps } from './CheckboxGroup';
1
+ import { ComponentMeta } from '@storybook/react';
2
+ import { DotCheckboxGroup } from './CheckboxGroup';
3
3
  declare const _default: ComponentMeta<typeof DotCheckboxGroup>;
4
4
  export default _default;
5
- export declare const Default: Story<CheckboxGroupProps>;
5
+ export declare const Default: any;
6
6
  export declare const WithHelperText: any;
@@ -1,8 +1,8 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { ChipProps } from './Chip';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, avatar, charactersLimit, children, className, "data-testid": dataTestId, disabled, error, isClickable, isDeletable, onClick, onDelete, size, startIcon, }: ChipProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<ChipProps>;
6
- export declare const ChipWithAvatar: Story<ChipProps>;
7
- export declare const ChipWithIcon: Story<ChipProps>;
8
- export declare const ChipWithLongText: Story<ChipProps>;
5
+ export declare const Default: any;
6
+ export declare const ChipWithAvatar: any;
7
+ export declare const ChipWithIcon: any;
8
+ export declare const ChipWithLongText: any;
@@ -1,6 +1,6 @@
1
1
  import { ChangeEvent } from 'react';
2
2
  import { ControlClickHandler, DynamicFormConfig, DynamicFormControl, DynamicFormControlProps, DynamicFormOutputData, DynamicFormState, DynamicFormStateData, DynamicFormStateItem } from '../models';
3
- import { AutoCompleteValue } from '../../auto-complete/AutoComplete';
3
+ import { AutoCompleteValue } from '../../auto-complete/';
4
4
  import { CheckboxProps } from '../../checkbox/Checkbox';
5
5
  declare type AutoCompleteChangeHandler = (controlName: string) => (e: ChangeEvent<HTMLInputElement>, value: AutoCompleteValue) => void;
6
6
  declare type ChangeHandler = (controlName: string) => (e: ChangeEvent<HTMLInputElement>) => void;
@@ -1,8 +1,8 @@
1
- import { ComponentMeta, Story } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { FileUploadProps } from './';
3
3
  declare const _default: ComponentMeta<({ accept, ariaLabel, ariaRole, buttonOnly, className, "data-testid": dataTestId, disabled, hideFilesList, maxFiles, maxSize, onChange, onDragEnter, onFileClick, }: FileUploadProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<FileUploadProps>;
6
- export declare const WithSingleFileLimit: Story<FileUploadProps>;
7
- export declare const WithCustomFileUploadList: Story<FileUploadProps>;
8
- export declare const WithUploadErrors: Story<FileUploadProps>;
5
+ export declare const Default: any;
6
+ export declare const WithSingleFileLimit: any;
7
+ export declare const WithCustomFileUploadList: (args: FileUploadProps) => JSX.Element;
8
+ export declare const WithUploadErrors: (args: FileUploadProps) => JSX.Element;
@@ -1,16 +1,15 @@
1
- import { ComponentMeta, Story } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { InlineEditProps } from './InlineEdit';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, ariaRole, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<InlineEditProps>;
5
+ export declare const Default: any;
6
6
  export declare const WithCharactersLimit: any;
7
7
  export declare const WithMultipleLines: any;
8
8
  export declare const WithReadOnlyMode: any;
9
9
  export declare const WithoutActionButtons: any;
10
10
  export declare const WithTooltip: any;
11
- export declare const WithSaveError: Story<InlineEditProps>;
12
- export declare const WithCustomTypography: Story<InlineEditProps>;
11
+ export declare const WithSaveError: (args: InlineEditProps) => JSX.Element;
13
12
  export declare const WithStartEditable: any;
14
13
  export declare const WithSingleBinding: any;
15
- export declare const WithMultipleBindings: Story<InlineEditProps>;
14
+ export declare const WithMultipleBindings: (args: InlineEditProps) => JSX.Element;
16
15
  export declare const WithSelectOnEdit: any;
@@ -1,8 +1,8 @@
1
- import { ComponentMeta, Story } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { LinearProgressProps } from './LinearProgress';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, color, className, "data-testid": dataTestId, value, valueBuffer, variant, }: LinearProgressProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<LinearProgressProps>;
5
+ export declare const Default: any;
6
6
  export declare const WithDeterminateVariant: any;
7
7
  export declare const WithBufferVariant: any;
8
8
  export declare const WithQueryVariant: any;
@@ -1,6 +1,6 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { ListProps } from './utils/models';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, ariaRole, children, className, component, "data-testid": dataTestId, dense, disablePadding, items, menuPlacement, nestedDrawerLeftSpacing, nestedListType, width, }: ListProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<ListProps>;
6
- export declare const WithoutIcons: Story<ListProps>;
5
+ export declare const Default: any;
6
+ export declare const WithoutIcons: any;
@@ -1,8 +1,8 @@
1
- import { ComponentMeta, Story } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { ProgressProps } from './Progress';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, color, className, "data-testid": dataTestId, size, thickness, tooltip, value, variant, }: ProgressProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<ProgressProps>;
5
+ export declare const Default: any;
6
6
  export declare const WithPrimaryColor: any;
7
7
  export declare const WithCustomSizeAndThickness: any;
8
8
  export declare const WithDeterminateVariant: any;
@@ -1,7 +1,7 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { RadioGroupProps } from './RadioGroup';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, ariaRole, className, "data-testid": dataTestId, defaultValue, disableGroup, endIcon, error, helperText, groupLabel, name, labelPlacement, onChange, value, options, startIcon, required, row, size, }: RadioGroupProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<RadioGroupProps>;
5
+ export declare const Default: any;
6
6
  export declare const WithHelperText: any;
7
7
  export declare const WithRowAndHelperText: any;
@@ -1,6 +1,6 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { SnackbarProps } from './';
3
3
  declare const _default: ComponentMeta<({ action, anchorOrigin, ariaLabel, children, className, "data-testid": dataTestId, onClose, open, severity, width, }: SnackbarProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<SnackbarProps>;
6
- export declare const WithBottomCenterAnchor: Story<SnackbarProps>;
5
+ export declare const Default: any;
6
+ export declare const WithBottomCenterAnchor: any;
@@ -1,9 +1,9 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { SplitButtonProps } from './SplitButton';
3
3
  declare const _default: ComponentMeta<({ autoFocus, ariaLabel, className, "data-testid": dataTestId, defaultMainOptionKey, disabled, disablePortal, disableRipple, fullWidth, isSubmit, onOptionClick, options, size, tooltip, type, }: SplitButtonProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<SplitButtonProps>;
6
- export declare const WithSelectedKey: Story<SplitButtonProps>;
7
- export declare const WithMainOptionDisabled: Story<SplitButtonProps>;
8
- export declare const WithMenuOptionDisabled: Story<SplitButtonProps>;
9
- export declare const WithMenuButtonDisabled: Story<SplitButtonProps>;
5
+ export declare const Default: any;
6
+ export declare const WithSelectedKey: any;
7
+ export declare const WithMainOptionDisabled: any;
8
+ export declare const WithMenuOptionDisabled: any;
9
+ export declare const WithMenuButtonDisabled: any;
@@ -1,10 +1,10 @@
1
- import { ComponentMeta, Story } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { StepperProps } from './Stepper';
3
3
  declare const _default: ComponentMeta<({ activeStep, ariaLabel, className, "data-testid": dataTestId, finalContent, initialContent, nextButtonText, nextStepDisabled, onBack, onCancel, onSubmit, orientation, disableUncompletedStepNav, steps, stepsPosition, submitButtonText, }: StepperProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<StepperProps>;
6
- export declare const WithStepDescription: Story<StepperProps>;
7
- export declare const WithHorizontalOrientation: Story<StepperProps>;
8
- export declare const WithErrorStep: Story<StepperProps>;
9
- export declare const WithInitialAndFinalContent: Story<StepperProps>;
10
- export declare const WithStepperListOnRightSide: Story<StepperProps>;
5
+ export declare const Default: any;
6
+ export declare const WithStepDescription: any;
7
+ export declare const WithHorizontalOrientation: any;
8
+ export declare const WithErrorStep: any;
9
+ export declare const WithInitialAndFinalContent: any;
10
+ export declare const WithStepperListOnRightSide: any;
@@ -1,12 +1,12 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { SwitchProps } from './';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, checked, className, color, "data-testid": dataTestId, disabled, id, inputRef, label, labelPlacement, onChange, size, }: SwitchProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<SwitchProps>;
6
- export declare const WithSecondaryColor: Story<SwitchProps>;
7
- export declare const WithDisabledState: Story<SwitchProps>;
8
- export declare const WithSmallSize: Story<SwitchProps>;
9
- export declare const WithStartLabelPlacement: Story<SwitchProps>;
10
- export declare const WithBottomLabelPlacement: Story<SwitchProps>;
11
- export declare const WithTopLabelPlacement: Story<SwitchProps>;
12
- export declare const WithoutLabel: Story<SwitchProps>;
5
+ export declare const Default: any;
6
+ export declare const WithSecondaryColor: any;
7
+ export declare const WithSmallSize: any;
8
+ export declare const WithDisabledState: any;
9
+ export declare const WithStartLabelPlacement: any;
10
+ export declare const WithBottomLabelPlacement: any;
11
+ export declare const WithTopLabelPlacement: any;
12
+ export declare const WithoutLabel: any;
@@ -1,8 +1,8 @@
1
- import { ComponentMeta, Story } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { TruncateWithTooltipProps } from './';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, charactersLimit, className, "data-testid": dataTestId, label, width, }: TruncateWithTooltipProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<TruncateWithTooltipProps>;
6
- export declare const WithAutoTruncate: Story<TruncateWithTooltipProps>;
7
- export declare const WithWidthAsNumber: Story<TruncateWithTooltipProps>;
8
- export declare const WithWidthAsString: Story<TruncateWithTooltipProps>;
5
+ export declare const Default: any;
6
+ export declare const WithAutoTruncate: any;
7
+ export declare const WithWidthAsNumber: any;
8
+ export declare const WithWidthAsString: any;
@@ -1,7 +1,7 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
1
+ import { ComponentMeta } from '@storybook/react';
2
2
  import { TypographyProps } from './Typography';
3
3
  declare const _default: ComponentMeta<({ ariaLabel, ariaLevel, ariaRole, className, "data-testid": dataTestId, children, component, noMarginBottom, noWrap, variant, }: TypographyProps) => JSX.Element>;
4
4
  export default _default;
5
- export declare const Default: Story<TypographyProps>;
6
- export declare const WithVariants: Story<TypographyProps>;
7
- export declare const WithWrappingOptions: Story<TypographyProps>;
5
+ export declare const Default: any;
6
+ export declare const WithVariants: (args: TypographyProps) => JSX.Element;
7
+ export declare const WithWrappingOptions: (args: TypographyProps) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "2.8.2",
3
+ "version": "2.9.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [