@digital-ai/dot-components 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -466,7 +466,7 @@ const lightFigmaColors = {
466
466
  }
467
467
  },
468
468
  icon: {
469
- black: n700,
469
+ gray: n400,
470
470
  disabled: n300,
471
471
  white: n0
472
472
  },
@@ -628,7 +628,7 @@ const darkFigmaColors = {
628
628
  }
629
629
  },
630
630
  icon: {
631
- black: n100,
631
+ gray: n100,
632
632
  disabled: n400,
633
633
  white: n700
634
634
  },
@@ -871,7 +871,7 @@ const avatarColors = {
871
871
  backgroundColor: lightFigmaColors.typography.gray
872
872
  },
873
873
  default: {
874
- color: lightFigmaColors.icon.black,
874
+ color: lightFigmaColors.icon.gray,
875
875
  backgroundColor: lightFigmaColors.background.level1.deep
876
876
  },
877
877
  green: {
@@ -926,7 +926,7 @@ const darkTheme = createTheme({
926
926
  backgroundColor: darkFigmaColors.typography.gray
927
927
  },
928
928
  default: {
929
- color: darkFigmaColors.icon.black,
929
+ color: darkFigmaColors.icon.gray,
930
930
  backgroundColor: darkFigmaColors.background.level1.deep
931
931
  },
932
932
  green: {
@@ -1493,22 +1493,27 @@ const StyledTextField = styled(TextField)`
1493
1493
  &.MuiInputBase-adornedStart {
1494
1494
  padding-left: ${theme.spacing(1.5)};
1495
1495
  }
1496
+
1496
1497
  &.MuiInputBase-adornedEnd {
1497
1498
  padding-right: ${theme.spacing(1)};
1498
1499
  }
1499
1500
  }
1500
1501
  }
1502
+
1501
1503
  .MuiInputBase-input {
1502
1504
  box-sizing: content-box;
1503
1505
  }
1506
+
1504
1507
  .MuiOutlinedInput-input {
1505
1508
  padding: 18px ${InputProps.endAdornment ? '0px' : '12px'} 18px
1506
1509
  ${InputProps.startAdornment ? '0px' : '12px'};
1510
+
1507
1511
  &::placeholder {
1508
1512
  opacity: 1;
1509
1513
  color: ${theme.palette.figma.typography.gray};
1510
1514
  }
1511
1515
  }
1516
+
1512
1517
  .MuiInputBase-inputSizeSmall {
1513
1518
  padding-top: 10.5px;
1514
1519
  padding-bottom: 10.5px;
@@ -1571,7 +1576,8 @@ const StyledTextField = styled(TextField)`
1571
1576
 
1572
1577
  &.${rootSelectClassName}, &.${rootClassName$1q} {
1573
1578
  .${adornmentIconClassName} {
1574
- color: ${theme.palette.figma.icon.black};
1579
+ color: ${theme.palette.figma.icon.gray};
1580
+
1575
1581
  p {
1576
1582
  font-size: ${theme.typography.body2.fontSize}px;
1577
1583
  margin: 0;
@@ -1614,8 +1620,12 @@ const StyledTextField = styled(TextField)`
1614
1620
  right: ${InputProps.endAdornment ? `44px` : `12px`};
1615
1621
  }
1616
1622
 
1623
+ &.${inputAiClassName$1} .${fieldsetClassName} {
1624
+ border-color: ${theme.palette.figma.aiPink.elevated};
1625
+ }
1626
+
1617
1627
  &.${successClassName} {
1618
- .MuiOutlinedInput-notchedOutline {
1628
+ .${fieldsetClassName} {
1619
1629
  border-color: ${theme.palette.figma.success.normal};
1620
1630
  }
1621
1631
 
@@ -1625,7 +1635,7 @@ const StyledTextField = styled(TextField)`
1625
1635
  }
1626
1636
 
1627
1637
  &.${errorClassName} {
1628
- .MuiOutlinedInput-notchedOutline {
1638
+ .${fieldsetClassName} {
1629
1639
  border-color: ${theme.palette.figma.destructive.normal};
1630
1640
  }
1631
1641
 
@@ -1635,7 +1645,7 @@ const StyledTextField = styled(TextField)`
1635
1645
  }
1636
1646
 
1637
1647
  &.${warningClassName} {
1638
- .MuiOutlinedInput-notchedOutline {
1648
+ .${fieldsetClassName} {
1639
1649
  border-color: ${theme.palette.figma.warning.normal};
1640
1650
  }
1641
1651
 
@@ -1644,21 +1654,6 @@ const StyledTextField = styled(TextField)`
1644
1654
  }
1645
1655
  }
1646
1656
 
1647
- &.${inputAiClassName$1} {
1648
- color: ${theme.palette.figma.typography.white};
1649
- background: ${theme.palette.figma.gradient.normal};
1650
- border: 1px solid transparent;
1651
- border-radius: 4px;
1652
-
1653
- .MuiOutlinedInput-root .${fieldsetClassName} {
1654
- border: none;
1655
- }
1656
- }
1657
-
1658
- .ai-text-clear-icon {
1659
- right: 36px;
1660
- position: relative;
1661
- }
1662
1657
  .MuiOutlinedInput-adornedStart {
1663
1658
  padding-left: 12px;
1664
1659
 
@@ -1681,7 +1676,7 @@ const StyledIcon = styled(Icon)`
1681
1676
  theme
1682
1677
  }) => css`
1683
1678
  &.${rootClassName$1p} {
1684
- color: ${theme.palette.figma.icon.black};
1679
+ color: ${theme.palette.figma.icon.gray};
1685
1680
  font-size: 20px;
1686
1681
 
1687
1682
  i {
@@ -2689,7 +2684,7 @@ const StyledAvatar = styled(Avatar)`
2689
2684
  border: 0px;
2690
2685
  &:focus-visible {
2691
2686
  box-shadow: 0px 0px 0px 3px ${theme.palette.figma.icon.white},
2692
- 0px 0px 0px 5px ${theme.palette.figma.icon.black};
2687
+ 0px 0px 0px 5px ${theme.palette.figma.icon.gray};
2693
2688
  outline: 0;
2694
2689
  }
2695
2690
 
@@ -2881,7 +2876,7 @@ const StyledButton = styled(Button)`
2881
2876
  }
2882
2877
 
2883
2878
  .dot-icon {
2884
- color: ${theme.palette.figma.icon.black};
2879
+ color: ${theme.palette.figma.icon.gray};
2885
2880
  }
2886
2881
  }
2887
2882
 
@@ -3173,7 +3168,7 @@ const StyledList = styled(List)`
3173
3168
  background: ${theme.palette.figma.background.level0.componentsBackground};
3174
3169
 
3175
3170
  .dot-icon {
3176
- color: ${theme.palette.figma.icon.black};
3171
+ color: ${theme.palette.figma.icon.gray};
3177
3172
  }
3178
3173
 
3179
3174
  &.${nestedListClassName} .${listItemRootClass} {
@@ -3935,13 +3930,13 @@ const StyledIconButton = styled(IconButton)`
3935
3930
  color: inherit;
3936
3931
  ` : ''}
3937
3932
  ${color === 'default' ? css`
3938
- color: ${theme.palette.figma.icon.black};
3933
+ color: ${theme.palette.figma.icon.gray};
3939
3934
  ` : ''}
3940
3935
 
3941
3936
  &.MuiIconButton-colorAi{
3942
3937
  color: ${theme.palette.figma.icon.white};
3943
3938
  background: ${theme.palette.figma.gradient.normal};
3944
-
3939
+
3945
3940
  &:hover {
3946
3941
  background: ${theme.palette.figma.gradient.elevated};
3947
3942
  }
@@ -3993,7 +3988,7 @@ const StyledIconButton = styled(IconButton)`
3993
3988
  &:active {
3994
3989
  ${color !== 'ai' ? css`
3995
3990
  background: ${theme.palette.figma.toggleTabs.bckg};
3996
- ` : ''}
3991
+ ` : ''}
3997
3992
  }
3998
3993
  }
3999
3994
 
@@ -4317,7 +4312,7 @@ const styledListItemElement = elementType => {
4317
4312
  }
4318
4313
 
4319
4314
  .dot-icon i:before {
4320
- color: ${theme.palette.figma.icon.black};
4315
+ color: ${theme.palette.figma.icon.gray};
4321
4316
  }
4322
4317
 
4323
4318
  .left-border-with-arrow {
@@ -4986,7 +4981,7 @@ const DotInputText = ({
4986
4981
  const hasError = error && errorClassName;
4987
4982
  const hasWarning = !error && warning && warningClassName;
4988
4983
  const hasSuccess = !error && !warning && success && successClassName;
4989
- const isAiEnabled = ai && inputAiClassName$1;
4984
+ const isAiEnabled = !error && !warning && !success && ai && inputAiClassName$1;
4990
4985
  const hasEndAdornmentIcon = endIcon || error || hasWarning || hasSuccess;
4991
4986
  const internalInputRef = useRef(null);
4992
4987
  const textFieldInputRef = inputRef || internalInputRef;
@@ -5965,7 +5960,7 @@ const StyledSidebar = styled.aside`
5965
5960
 
5966
5961
  &:focus-visible {
5967
5962
  box-shadow: 0 0 0 2px ${theme.palette.figma.icon.white},
5968
- 0 0 0 4px ${theme.palette.figma.icon.black};
5963
+ 0 0 0 4px ${theme.palette.figma.icon.gray};
5969
5964
  }
5970
5965
  }
5971
5966
 
@@ -6043,7 +6038,7 @@ const StyledSidebar = styled.aside`
6043
6038
  margin: 0;
6044
6039
 
6045
6040
  i:before {
6046
- color: ${theme.palette.figma.typography.gray};
6041
+ color: ${theme.palette.figma.icon.gray};
6047
6042
  }
6048
6043
  }
6049
6044
  }
@@ -6412,6 +6407,7 @@ const DotSidebar = ({
6412
6407
  placement: "right",
6413
6408
  children: jsx(DotIconButton, {
6414
6409
  ariaLabel: "collapse sidebar navigation",
6410
+ color: "default",
6415
6411
  "data-testid": "toggle-nav",
6416
6412
  iconId: isOpen ? 'push-left' : 'push-right',
6417
6413
  iconSize: "small",
@@ -6622,7 +6618,7 @@ const StyledAppToolbar = styled.header`
6622
6618
  height: 40px;
6623
6619
  button.dot-avatar:focus-visible {
6624
6620
  box-shadow: 0px 0px 0px 3px ${theme.palette.figma.icon.white},
6625
- 0px 0px 0px 5px ${theme.palette.figma.icon.black};
6621
+ 0px 0px 0px 5px ${theme.palette.figma.icon.gray};
6626
6622
  }
6627
6623
  }
6628
6624
  }
@@ -6819,7 +6815,7 @@ const StyledChip = styled(Chip)`
6819
6815
  color: ${theme.palette.figma.typography.black};
6820
6816
 
6821
6817
  .dot-icon i {
6822
- color: ${theme.palette.figma.icon.black};
6818
+ color: ${theme.palette.figma.icon.gray};
6823
6819
  height: auto;
6824
6820
  }
6825
6821
 
@@ -6891,7 +6887,7 @@ const StyledChip = styled(Chip)`
6891
6887
  }
6892
6888
 
6893
6889
  .MuiChip-deleteIcon:hover {
6894
- color: ${theme.palette.figma.icon.black};
6890
+ color: ${theme.palette.figma.icon.gray};
6895
6891
  }
6896
6892
  }
6897
6893
 
@@ -7013,15 +7009,8 @@ const StyledAutocomplete = styled(Autocomplete)`
7013
7009
  }
7014
7010
 
7015
7011
  &.${inputAiClassName} {
7016
- color: ${theme.palette.figma.typography.white};
7017
- background: ${theme.palette.figma.gradient.ai};
7018
- border: 2px solid transparent;
7019
- border-radius: 4px;
7020
- .MuiOutlinedInput-root {
7021
- padding: 8px;
7022
- }
7023
7012
  .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline {
7024
- border: none;
7013
+ border-color: ${theme.palette.figma.aiPink.elevated};
7025
7014
  }
7026
7015
  }
7027
7016
  `}
@@ -7172,7 +7161,8 @@ const DotAutoComplete = ({
7172
7161
  const isActionItemDefined = onActionItemClick !== undefined;
7173
7162
  const popperOpen = !readOnly && (open || isOpened);
7174
7163
  const textFieldWarningClassName = !error && warning && warningClassName;
7175
- const rootClasses = useStylesWithRootClass(getRootClassNames(className, size), ai ? inputAiClassName : '');
7164
+ const isAiEnabled = !error && !warning && ai;
7165
+ const rootClasses = useStylesWithRootClass(getRootClassNames(className, size), isAiEnabled ? inputAiClassName : '');
7176
7166
  const textFieldRootClasses = getTextFieldRootClassNames(textFieldWarningClassName, readOnly);
7177
7167
  const inputRootClasses = getInputRootClassNames(dense);
7178
7168
  const popperClasses = useStylesWithRootClass(rootClassName$1f, popperClassName);
@@ -7298,7 +7288,7 @@ const DotAutoComplete = ({
7298
7288
  // Create handler only if 'onInputChange' or 'actionItem' prop is defined
7299
7289
  // Custom input change handler for AI mode
7300
7290
  const handleInputChange = (event, currentInputValue, reason) => {
7301
- if (isActionItemDefined || ai) {
7291
+ if (isActionItemDefined || isAiEnabled) {
7302
7292
  setInputText(currentInputValue); // fallback for action item
7303
7293
  }
7304
7294
  onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(event, currentInputValue, reason);
@@ -7389,7 +7379,7 @@ const DotAutoComplete = ({
7389
7379
  return renderOption ? renderOption(props, option, state) : renderTrimmedLongOptions(props, option);
7390
7380
  };
7391
7381
  const getEndAdornment = params => {
7392
- if (ai) {
7382
+ if (isAiEnabled) {
7393
7383
  return renderAISendAdornment;
7394
7384
  }
7395
7385
  if (!readOnly) {
@@ -7410,6 +7400,7 @@ const DotAutoComplete = ({
7410
7400
  defaultValue: getDefaultAutoCompleteValue(multiple, defaultValue),
7411
7401
  disableCloseOnSelect: disableCloseOnSelect,
7412
7402
  disabled: disabled,
7403
+ disableClearable: isAiEnabled,
7413
7404
  filterOptions: filterOptions,
7414
7405
  filterSelectedOptions: filterSelectedOptions,
7415
7406
  freeSolo: freesolo,
@@ -7482,7 +7473,7 @@ const DotAutoComplete = ({
7482
7473
  id: inputId,
7483
7474
  className: useStylesWithRootClass(inputProps.className, 'dot-input'),
7484
7475
  readOnly,
7485
- value: ai ? inputText : inputProps.value
7476
+ value: isAiEnabled ? inputText : inputProps.value
7486
7477
  }),
7487
7478
  InputLabelProps: {
7488
7479
  htmlFor: inputId
@@ -7500,7 +7491,7 @@ const DotAutoComplete = ({
7500
7491
  event.preventDefault();
7501
7492
  (_a = actionItemRef === null || actionItemRef === void 0 ? void 0 : actionItemRef.current) === null || _a === void 0 ? void 0 : _a.focus();
7502
7493
  }
7503
- if (event.key === 'Enter' && ai) {
7494
+ if (event.key === 'Enter' && isAiEnabled) {
7504
7495
  event.stopPropagation();
7505
7496
  event.preventDefault();
7506
7497
  handleAiAction(inputText);
@@ -7678,7 +7669,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs)`
7678
7669
  }
7679
7670
  .MuiBreadcrumbs-li,
7680
7671
  .separator {
7681
- color: ${theme.palette.figma.icon.black};
7672
+ color: ${theme.palette.figma.typography.black};
7682
7673
  margin: 0;
7683
7674
  white-space: nowrap;
7684
7675
  }
@@ -8048,7 +8039,7 @@ const StyledToggleButtonGroup = styled(ToggleButtonGroup)`
8048
8039
  }
8049
8040
 
8050
8041
  .dot-icon {
8051
- color: ${theme.palette.figma.icon.black};
8042
+ color: ${theme.palette.figma.icon.gray};
8052
8043
  display: flex;
8053
8044
 
8054
8045
  + p {
@@ -15569,7 +15560,7 @@ const StyledNavigationRail = styled.div`
15569
15560
  border-right: 3px solid transparent;
15570
15561
 
15571
15562
  .dot-icon {
15572
- color: ${theme.palette.figma.icon.black};
15563
+ color: ${theme.palette.figma.icon.gray};
15573
15564
  }
15574
15565
 
15575
15566
  &.selected,
@@ -15704,7 +15695,7 @@ const StyledSplitButtonGroup = styled(ButtonGroup)`
15704
15695
  border-left: none;
15705
15696
 
15706
15697
  .dot-icon {
15707
- color: ${theme.palette.figma.icon.black};
15698
+ color: ${theme.palette.figma.icon.gray};
15708
15699
  }
15709
15700
  }
15710
15701
  }
@@ -15924,7 +15915,7 @@ const StyledStepper = styled.div`
15924
15915
 
15925
15916
  &.active:not(&.completed):not(&.in-progress) {
15926
15917
  .dot-avatar i:before {
15927
- color: ${theme.palette.figma.icon.black};
15918
+ color: ${theme.palette.figma.icon.gray};
15928
15919
  }
15929
15920
  }
15930
15921
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -95,8 +95,8 @@ export interface FigmaTheme {
95
95
  };
96
96
  };
97
97
  icon: {
98
- black: string;
99
98
  disabled: string;
99
+ gray: string;
100
100
  white: string;
101
101
  };
102
102
  illustrations: {