@digital-ai/dot-components 1.16.1 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGE_LOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.17.0](https://github.com/digital-ai/dot-components/tree/1.17.0) (05/18/2022)
4
+
5
+ [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.16.1...1.17.0)
6
+
7
+ **Features:**
8
+
9
+ - `DotButtonToggle`: Add tooltip support [\#1164](https://github.com/digital-ai/dot-components/issues/1164)
10
+ - S-84947: `DotButtonToggle`: Add tooltip support [\#1166](https://github.com/digital-ai/dot-components/pull/1166) ([dmiletic85](https://github.com/dmiletic85))
11
+
12
+ **Fixed bugs:**
13
+
14
+ - `helperText` on input fields shouldn't be bold [\#1165](https://github.com/digital-ai/dot-components/issues/1165)
15
+ - `DotMenu` popup appears to be flickering on Safari [\#1123](https://github.com/digital-ai/dot-components/issues/1123)
16
+ - D-21265: `helperText` on input fields shouldn't be bold [\#1167](https://github.com/digital-ai/dot-components/pull/1167) ([dmiletic85](https://github.com/dmiletic85))
17
+
18
+ **Merged pull requests:**
19
+
20
+ - update release template with task for marking stories as done [\#1161](https://github.com/digital-ai/dot-components/pull/1161) ([CWSites](https://github.com/CWSites))
21
+
3
22
  ## [1.16.1](https://github.com/digital-ai/dot-components/tree/1.16.1) (05/12/2022)
4
23
 
5
24
  [Full Changelog](https://github.com/digital-ai/dot-components/compare/1.16.0...1.16.1)
package/index.esm.js CHANGED
@@ -2678,7 +2678,7 @@ const StyledTextField = styled(TextField).withConfig({
2678
2678
  })(["", ""], ({
2679
2679
  theme,
2680
2680
  InputProps
2681
- }) => css(["&.", "{.MuiInputBase-root{background:", "}.MuiInputBase-input{box-sizing:content-box;}.MuiOutlinedInput-notchedOutline{border-color:", "}.MuiOutlinedInput-input{padding:", ";}.MuiOutlinedInput-inputMarginDense{padding-top:10.5px;padding-bottom:10.5px;}.MuiOutlinedInput-inputMultiline{padding:0;}}&.", ",&.", "{.dot-adornment-icon .dot-icon i{margin-top:-2px;}.MuiFormLabel-root.Mui-focused{color:", "}select.dot-select{background:", ";}.MuiSelect-select:focus{background-color:transparent;}.Mui-error .", "{color:", ";}.MuiSelect-icon{right:", ";}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", "{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;}.MuiOutlinedInput-adornedEnd{padding-right:12px;}.MuiFormHelperText-root{font-size:", "px;margin:", ";display:flex;align-items:flex-end;&:not(.Mui-error){color:", ";}}.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:", ";}"], rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.palette.product === 'agility' && theme.palette.layer.n100, InputProps.startAdornment ? `18px 12px 18px 0px` : `18px 12px`, rootSelectClassName, rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n700, theme.palette.product === 'agility' && theme.palette.layer.n0, adornmentIconClassName, theme.palette.error[500], InputProps.endAdornment ? `44px` : `12px`, warningClassName, theme.palette.warning[500], theme.palette.grey[700], adornmentIconClassName, theme.palette.warning[500], theme.typography.body2.fontSize, theme.spacing(0, 0, 0, 2), theme.palette.grey[700], theme.palette.product === 'agility' && agilityGreen));
2681
+ }) => css(["&.", "{.MuiInputBase-root{background:", "}.MuiInputBase-input{box-sizing:content-box;}.MuiOutlinedInput-notchedOutline{border-color:", "}.MuiOutlinedInput-input{padding:", ";}.MuiOutlinedInput-inputMarginDense{padding-top:10.5px;padding-bottom:10.5px;}.MuiOutlinedInput-inputMultiline{padding:0;}}&.", ",&.", "{.dot-adornment-icon .dot-icon i{margin-top:-2px;}.MuiFormLabel-root.Mui-focused{color:", "}select.dot-select{background:", ";}.MuiSelect-select:focus{background-color:transparent;}.Mui-error .", "{color:", ";}.MuiSelect-icon{right:", ";}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", "{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;}.MuiOutlinedInput-adornedEnd{padding-right:12px;}.MuiFormHelperText-root{font-family:", ";font-size:", "px;margin:", ";display:flex;align-items:flex-end;&:not(.Mui-error){color:", ";}}.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:", ";}"], rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.palette.product === 'agility' && theme.palette.layer.n100, InputProps.startAdornment ? `18px 12px 18px 0px` : `18px 12px`, rootSelectClassName, rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n700, theme.palette.product === 'agility' && theme.palette.layer.n0, adornmentIconClassName, theme.palette.error[500], InputProps.endAdornment ? `44px` : `12px`, warningClassName, theme.palette.warning[500], theme.palette.grey[700], adornmentIconClassName, theme.palette.warning[500], theme.typography.body2.fontFamily, theme.typography.body2.fontSize, theme.spacing(0, 0, 0, 2), theme.palette.grey[700], theme.palette.product === 'agility' && agilityGreen));
2682
2682
 
2683
2683
  const rootClassName$F = 'dot-button';
2684
2684
  const StyledButton = styled(Button).withConfig({
@@ -3516,7 +3516,7 @@ const StyledToggleButtonGroup = styled(ToggleButtonGroup).withConfig({
3516
3516
  componentId: "sc-1oh4ljv-0"
3517
3517
  })(["", ""], ({
3518
3518
  theme
3519
- }) => css(["&.", "{.dot-icon{+ p{margin-left:", "px;}i{height:auto;}}.MuiToggleButton-label{color:", ";p{margin-bottom:0;}}.MuiToggleButtonGroup-groupedHorizontal{border:1px solid ", ";border-radius:0px;:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;margin-left:0;}:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px;margin-right:0;}}}.MuiButtonBase-root{&.Mui-disabled p,&.Mui-disabled .dot-icon{color:", ";}}"], rootClassName$C, theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]));
3519
+ }) => css(["&.", "{.MuiToggleButton-root{padding:0;}.toggle-button-children-wrapper{display:flex;padding:", "px;}.dot-icon{+ p{margin-left:", "px;}i{height:auto;}}.MuiToggleButton-label{color:", ";p{margin-bottom:0;}}.MuiToggleButtonGroup-groupedHorizontal{border:1px solid ", ";border-radius:0;:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;margin-left:0;}:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px;margin-right:0;}}}.MuiButtonBase-root{&.Mui-disabled p,&.Mui-disabled .dot-icon{color:", ";}}"], rootClassName$C, theme.spacing(1.375), theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]));
3520
3520
 
3521
3521
  const DotButtonToggle = ({
3522
3522
  ariaLabel,
@@ -3532,6 +3532,25 @@ const DotButtonToggle = ({
3532
3532
  value
3533
3533
  }) => {
3534
3534
  const rootClasses = useStylesWithRootClass(rootClassName$C, className);
3535
+
3536
+ const renderToggleButtonChildren = ({
3537
+ iconId: optionIconId,
3538
+ text: optionText,
3539
+ tooltip: optionTooltip
3540
+ }) => {
3541
+ const children = /*#__PURE__*/React__default.createElement("div", {
3542
+ "data-testid": dataTestId && `${dataTestId}-children-wrapper`,
3543
+ className: "toggle-button-children-wrapper"
3544
+ }, optionIconId && /*#__PURE__*/React__default.createElement(DotIcon, {
3545
+ className: "dot-toggle-icon",
3546
+ iconId: optionIconId
3547
+ }), optionText && /*#__PURE__*/React__default.createElement(DotTypography, null, optionText));
3548
+ return optionTooltip ? /*#__PURE__*/React__default.createElement(DotTooltip, {
3549
+ className: "toggle-button-tooltip",
3550
+ title: optionTooltip
3551
+ }, children) : children;
3552
+ };
3553
+
3535
3554
  return /*#__PURE__*/React__default.createElement(StyledToggleButtonGroup, {
3536
3555
  "aria-label": ariaLabel,
3537
3556
  classes: {
@@ -3548,8 +3567,6 @@ const DotButtonToggle = ({
3548
3567
  ariaLabel: optionAriaLabel,
3549
3568
  className: optionClassName,
3550
3569
  disabled: optionDisabled,
3551
- iconId: optionIconId,
3552
- text: optionText,
3553
3570
  value: optionValue
3554
3571
  } = option;
3555
3572
  return /*#__PURE__*/React__default.createElement(ToggleButton, {
@@ -3560,10 +3577,7 @@ const DotButtonToggle = ({
3560
3577
  disabled: optionDisabled,
3561
3578
  key: key,
3562
3579
  value: optionValue
3563
- }, optionIconId && /*#__PURE__*/React__default.createElement(DotIcon, {
3564
- className: "dot-toggle-icon",
3565
- iconId: optionIconId
3566
- }), optionText && /*#__PURE__*/React__default.createElement(DotTypography, null, optionText));
3580
+ }, renderToggleButtonChildren(option));
3567
3581
  }));
3568
3582
  };
3569
3583
 
package/index.umd.js CHANGED
@@ -2917,7 +2917,7 @@
2917
2917
  })(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2918
2918
  var theme = _a.theme,
2919
2919
  InputProps = _a.InputProps;
2920
- return styled.css(templateObject_2$H || (templateObject_2$H = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n background: ", "\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-notchedOutline {\n border-color: ", "\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiOutlinedInput-inputMarginDense {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n .MuiOutlinedInput-inputMultiline {\n padding: 0;\n }\n }\n &.", ", &.", " {\n .dot-adornment-icon .dot-icon i {\n margin-top: -2px;\n }\n .MuiFormLabel-root.Mui-focused {\n color: ", "\n }\n select.dot-select {\n background: ", ";\n }\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n .Mui-error .", " {\n color: ", ";\n }\n .MuiSelect-icon {\n right: ", ";\n }\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n .", " {\n color: ", ";\n }\n }\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiOutlinedInput-adornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n font-size: ", "px;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n background: ", "\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-notchedOutline {\n border-color: ", "\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiOutlinedInput-inputMarginDense {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n .MuiOutlinedInput-inputMultiline {\n padding: 0;\n }\n }\n &.", ", &.", " {\n .dot-adornment-icon .dot-icon i {\n margin-top: -2px;\n }\n .MuiFormLabel-root.Mui-focused {\n color: ", "\n }\n select.dot-select {\n background: ", ";\n }\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n .Mui-error .", " {\n color: ", ";\n }\n .MuiSelect-icon {\n right: ", ";\n }\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n .", " {\n color: ", ";\n }\n }\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiOutlinedInput-adornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n font-size: ", "px;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n "])), rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.palette.product === 'agility' && theme.palette.layer.n100, InputProps.startAdornment ? "18px 12px 18px 0px" : "18px 12px", rootSelectClassName, rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n700, theme.palette.product === 'agility' && theme.palette.layer.n0, adornmentIconClassName, theme.palette.error[500], InputProps.endAdornment ? "44px" : "12px", warningClassName, theme.palette.warning[500], theme.palette.grey[700], adornmentIconClassName, theme.palette.warning[500], theme.typography.body2.fontSize, theme.spacing(0, 0, 0, 2), theme.palette.grey[700], theme.palette.product === 'agility' && agilityGreen);
2920
+ return styled.css(templateObject_2$H || (templateObject_2$H = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n background: ", "\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-notchedOutline {\n border-color: ", "\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiOutlinedInput-inputMarginDense {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n .MuiOutlinedInput-inputMultiline {\n padding: 0;\n }\n }\n &.", ", &.", " {\n .dot-adornment-icon .dot-icon i {\n margin-top: -2px;\n }\n .MuiFormLabel-root.Mui-focused {\n color: ", "\n }\n select.dot-select {\n background: ", ";\n }\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n .Mui-error .", " {\n color: ", ";\n }\n .MuiSelect-icon {\n right: ", ";\n }\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n .", " {\n color: ", ";\n }\n }\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiOutlinedInput-adornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n background: ", "\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-notchedOutline {\n border-color: ", "\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiOutlinedInput-inputMarginDense {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n .MuiOutlinedInput-inputMultiline {\n padding: 0;\n }\n }\n &.", ", &.", " {\n .dot-adornment-icon .dot-icon i {\n margin-top: -2px;\n }\n .MuiFormLabel-root.Mui-focused {\n color: ", "\n }\n select.dot-select {\n background: ", ";\n }\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n .Mui-error .", " {\n color: ", ";\n }\n .MuiSelect-icon {\n right: ", ";\n }\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n .", " {\n color: ", ";\n }\n }\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n }\n .MuiOutlinedInput-adornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", "px;\n margin: ", ";\n display: flex;\n align-items: flex-end;\n &:not(.Mui-error) {\n color: ", ";\n }\n }\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n "])), rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n0, theme.palette.product === 'agility' && theme.palette.layer.n100, InputProps.startAdornment ? "18px 12px 18px 0px" : "18px 12px", rootSelectClassName, rootClassName$G, theme.palette.product === 'agility' && theme.palette.layer.n700, theme.palette.product === 'agility' && theme.palette.layer.n0, adornmentIconClassName, theme.palette.error[500], InputProps.endAdornment ? "44px" : "12px", warningClassName, theme.palette.warning[500], theme.palette.grey[700], adornmentIconClassName, theme.palette.warning[500], theme.typography.body2.fontFamily, theme.typography.body2.fontSize, theme.spacing(0, 0, 0, 2), theme.palette.grey[700], theme.palette.product === 'agility' && agilityGreen);
2921
2921
  });
2922
2922
  var templateObject_1$J, templateObject_2$H, templateObject_3$7;
2923
2923
 
@@ -3840,7 +3840,7 @@
3840
3840
  componentId: "sc-1oh4ljv-0"
3841
3841
  })(templateObject_2$D || (templateObject_2$D = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
3842
3842
  var theme = _a.theme;
3843
- return styled.css(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n &.", " {\n .dot-icon {\n + p {\n margin-left: ", "px;\n }\n i {\n height: auto;\n }\n }\n .MuiToggleButton-label {\n color: ", ";\n p {\n margin-bottom: 0;\n }\n }\n .MuiToggleButtonGroup-groupedHorizontal {\n border: 1px solid ", ";\n border-radius: 0px;\n\n :first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n margin-left: 0;\n }\n :last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-right: 0;\n }\n }\n }\n\n .MuiButtonBase-root {\n &.Mui-disabled p,\n &.Mui-disabled .dot-icon {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n .dot-icon {\n + p {\n margin-left: ", "px;\n }\n i {\n height: auto;\n }\n }\n .MuiToggleButton-label {\n color: ", ";\n p {\n margin-bottom: 0;\n }\n }\n .MuiToggleButtonGroup-groupedHorizontal {\n border: 1px solid ", ";\n border-radius: 0px;\n\n :first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n margin-left: 0;\n }\n :last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-right: 0;\n }\n }\n }\n\n .MuiButtonBase-root {\n &.Mui-disabled p,\n &.Mui-disabled .dot-icon {\n color: ", ";\n }\n }\n "])), rootClassName$C, theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]);
3843
+ return styled.css(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n &.", " {\n .MuiToggleButton-root {\n padding: 0;\n }\n\n .toggle-button-children-wrapper {\n display: flex;\n // This will replace default padding from MuiToggleButton-root\n // so that tooltip works when hovering whole button area\n // (instead of just text within the button)\n padding: ", "px;\n }\n\n .dot-icon {\n + p {\n margin-left: ", "px;\n }\n i {\n height: auto;\n }\n }\n .MuiToggleButton-label {\n color: ", ";\n p {\n margin-bottom: 0;\n }\n }\n .MuiToggleButtonGroup-groupedHorizontal {\n border: 1px solid ", ";\n border-radius: 0;\n\n :first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n margin-left: 0;\n }\n :last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-right: 0;\n }\n }\n }\n\n .MuiButtonBase-root {\n &.Mui-disabled p,\n &.Mui-disabled .dot-icon {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n .MuiToggleButton-root {\n padding: 0;\n }\n\n .toggle-button-children-wrapper {\n display: flex;\n // This will replace default padding from MuiToggleButton-root\n // so that tooltip works when hovering whole button area\n // (instead of just text within the button)\n padding: ", "px;\n }\n\n .dot-icon {\n + p {\n margin-left: ", "px;\n }\n i {\n height: auto;\n }\n }\n .MuiToggleButton-label {\n color: ", ";\n p {\n margin-bottom: 0;\n }\n }\n .MuiToggleButtonGroup-groupedHorizontal {\n border: 1px solid ", ";\n border-radius: 0;\n\n :first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n margin-left: 0;\n }\n :last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n margin-right: 0;\n }\n }\n }\n\n .MuiButtonBase-root {\n &.Mui-disabled p,\n &.Mui-disabled .dot-icon {\n color: ", ";\n }\n }\n "])), rootClassName$C, theme.spacing(1.375), theme.spacing(1), theme.palette.layer.n700, theme.palette.layer.n300, theme.palette.grey[200]);
3844
3844
  });
3845
3845
  var templateObject_1$F, templateObject_2$D;
3846
3846
 
@@ -3863,6 +3863,24 @@
3863
3863
  size = _g === void 0 ? 'medium' : _g,
3864
3864
  value = _a.value;
3865
3865
  var rootClasses = useStylesWithRootClass(rootClassName$C, className);
3866
+
3867
+ var renderToggleButtonChildren = function renderToggleButtonChildren(_a) {
3868
+ var optionIconId = _a.iconId,
3869
+ optionText = _a.text,
3870
+ optionTooltip = _a.tooltip;
3871
+ var children = /*#__PURE__*/React__default["default"].createElement("div", {
3872
+ "data-testid": dataTestId && dataTestId + "-children-wrapper",
3873
+ className: "toggle-button-children-wrapper"
3874
+ }, optionIconId && /*#__PURE__*/React__default["default"].createElement(DotIcon, {
3875
+ className: "dot-toggle-icon",
3876
+ iconId: optionIconId
3877
+ }), optionText && /*#__PURE__*/React__default["default"].createElement(DotTypography, null, optionText));
3878
+ return optionTooltip ? /*#__PURE__*/React__default["default"].createElement(DotTooltip, {
3879
+ className: "toggle-button-tooltip",
3880
+ title: optionTooltip
3881
+ }, children) : children;
3882
+ };
3883
+
3866
3884
  return /*#__PURE__*/React__default["default"].createElement(StyledToggleButtonGroup, {
3867
3885
  "aria-label": ariaLabel,
3868
3886
  classes: {
@@ -3878,8 +3896,6 @@
3878
3896
  var optionAriaLabel = option.ariaLabel,
3879
3897
  optionClassName = option.className,
3880
3898
  optionDisabled = option.disabled,
3881
- optionIconId = option.iconId,
3882
- optionText = option.text,
3883
3899
  optionValue = option.value;
3884
3900
  return /*#__PURE__*/React__default["default"].createElement(lab.ToggleButton, {
3885
3901
  "aria-label": optionAriaLabel,
@@ -3889,10 +3905,7 @@
3889
3905
  disabled: optionDisabled,
3890
3906
  key: key,
3891
3907
  value: optionValue
3892
- }, optionIconId && /*#__PURE__*/React__default["default"].createElement(DotIcon, {
3893
- className: "dot-toggle-icon",
3894
- iconId: optionIconId
3895
- }), optionText && /*#__PURE__*/React__default["default"].createElement(DotTypography, null, optionText));
3908
+ }, renderToggleButtonChildren(option));
3896
3909
  }));
3897
3910
  };
3898
3911
 
@@ -8,5 +8,6 @@ export interface ButtonToggleOption extends CommonProps {
8
8
  disabled?: boolean;
9
9
  iconId?: string;
10
10
  text?: string;
11
+ tooltip?: string;
11
12
  value: ButtonToggleValue;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "1.16.1",
3
+ "version": "1.17.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [