@hexure/ui 1.13.58 → 1.13.60

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/dist/cjs/index.js CHANGED
@@ -139,11 +139,11 @@ Copy.defaultProps = {
139
139
  type: 'default',
140
140
  };
141
141
 
142
- const Wrapper$h = styled.div `
143
- display: inline-block;
144
- position: relative;
145
- height: 16px;
146
- `;
142
+ const Wrapper$h = styled.div(props => ({
143
+ display: 'inline-block',
144
+ position: 'relative',
145
+ height: props.$height || '16px',
146
+ }));
147
147
  const StyledIcon$6 = styled(Icon) `
148
148
  width: 16px;
149
149
  height: 16px;
@@ -182,10 +182,10 @@ const positions = {
182
182
  };
183
183
  const Content$3 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: props.theme.PRIMARY_COLOR.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 9999 }, positions[props.$position])));
184
184
  Content$3.defaultProps = { theme: EditableTheme };
185
- const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, dataItemid, }) => {
185
+ const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, dataItemid, height, }) => {
186
186
  const [show_content, toggleContent] = React.useState(false);
187
187
  const baseId = dataItemid || 'tooltip';
188
- return (React.createElement(Wrapper$h, { "data-itemid": `${baseId}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
188
+ return (React.createElement(Wrapper$h, { "$height": height, "data-itemid": `${baseId}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
189
189
  trigger || React.createElement(StyledIcon$6, { "data-itemid": `${baseId}-icon`, path: js.mdiInformationOutline }),
190
190
  show_content ? (React.createElement(Content$3, { "$position": position, "$width": width, "data-itemid": `${baseId}-content` }, children && (React.createElement(Copy, { "data-itemid": `${baseId}-copy`, type: 'small' }, children)))) : null));
191
191
  };
@@ -945,6 +945,28 @@ const Input$2 = styled.input `
945
945
  display: block;
946
946
  }
947
947
  `;
948
+ const getBackgroundColor$3 = (props) => {
949
+ if (props.$isWarningError) {
950
+ return '#fcf1c9';
951
+ }
952
+ else if (props.$invalid && props.$isInvalidRedBackground) {
953
+ return '#ffe5e5';
954
+ }
955
+ else {
956
+ return '#ffffff';
957
+ }
958
+ };
959
+ const getBorderColor$3 = (props) => {
960
+ if (props.$isWarningError) {
961
+ return 'Orange';
962
+ }
963
+ else if (props.$invalid) {
964
+ return Colors.RED.Hex;
965
+ }
966
+ else {
967
+ return Colors.GRAY.Hex;
968
+ }
969
+ };
948
970
  const Check$1 = styled.span `
949
971
  height: 17px;
950
972
  width: 17px;
@@ -952,8 +974,8 @@ const Check$1 = styled.span `
952
974
  background-color: #fff;
953
975
  border-width: 2px;
954
976
  border-style: solid;
955
- border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
956
- background-color: ${props => props.$invalid && props.$isInvalidRedBackground ? '#ffe5e5' : '#ffffff'};
977
+ border-color: ${props => getBorderColor$3(props)};
978
+ background-color: ${props => getBackgroundColor$3(props)};
957
979
  box-sizing: border-box;
958
980
  position: relative;
959
981
  &:after {
@@ -982,11 +1004,11 @@ const Label$3 = styled.span `
982
1004
  box-sizing: border-box;
983
1005
  `;
984
1006
  const Checkbox = (_a) => {
985
- var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground"]);
1007
+ var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError"]);
986
1008
  const baseId = dataItemid || 'checkbox';
987
1009
  return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
988
1010
  React.createElement(Input$2, { checked: checked, "data-itemid": `${baseId}-input`, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
989
- React.createElement(Check$1, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "data-itemid": `${baseId}-check` }),
1011
+ React.createElement(Check$1, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "data-itemid": `${baseId}-check` }),
990
1012
  children ? (React.createElement(Label$3, { color: color, "data-itemid": `${baseId}-label` },
991
1013
  children,
992
1014
  tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null));
@@ -1040,6 +1062,28 @@ const Checklist = (_a) => {
1040
1062
  }))));
1041
1063
  };
1042
1064
 
1065
+ const getBackgroundColor$2 = (props) => {
1066
+ if (props.$isWarningError) {
1067
+ return '#fcf1c9';
1068
+ }
1069
+ else if (props.$invalid && props.$isInvalidRedBackground) {
1070
+ return '#ffe5e5';
1071
+ }
1072
+ else {
1073
+ return props.$readOnly ? '#f5f5f5' : '#ffffff';
1074
+ }
1075
+ };
1076
+ const getBorderColor$2 = (props) => {
1077
+ if (props.$isWarningError) {
1078
+ return 'Orange';
1079
+ }
1080
+ else if (props.$invalid) {
1081
+ return Colors.RED.Hex;
1082
+ }
1083
+ else {
1084
+ return '#cccccc';
1085
+ }
1086
+ };
1043
1087
  const Wrapper$a = styled.div `
1044
1088
  border-radius: 4px;
1045
1089
  height: 40px;
@@ -1048,8 +1092,8 @@ const Wrapper$a = styled.div `
1048
1092
  cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
1049
1093
  border-width: 1px;
1050
1094
  border-style: solid;
1051
- border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
1052
- background-color: ${props => (props.$invalid && props.$isInvalidRedBackground ? '#ffe5e5' : '#ffffff')};
1095
+ border-color: ${props => getBorderColor$2(props)};
1096
+ background-color: ${props => getBackgroundColor$2(props)};
1053
1097
  border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
1054
1098
  flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
1055
1099
  box-sizing: border-box;
@@ -1105,7 +1149,7 @@ const SearchInput$1 = styled.input `
1105
1149
  white-space: nowrap;
1106
1150
  `;
1107
1151
  const Select = (_a) => {
1108
- var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid, isInvalidRedBackground = false } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid", "isInvalidRedBackground"]);
1152
+ var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError"]);
1109
1153
  const [searchTerm, setSearchTerm] = React.useState('');
1110
1154
  const [value, setValue] = React.useState(propValue || '');
1111
1155
  const baseId = dataItemid || 'select';
@@ -1128,7 +1172,7 @@ const Select = (_a) => {
1128
1172
  const filteredOptionGroups = searchable
1129
1173
  ? optionGroups === null || optionGroups === void 0 ? void 0 : optionGroups.map(group => (Object.assign(Object.assign({}, group), { options: group.options.filter(option => { var _a; return (_a = option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()); }) })))
1130
1174
  : optionGroups;
1131
- return (React.createElement(Wrapper$a, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper` },
1175
+ return (React.createElement(Wrapper$a, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper` },
1132
1176
  searchable && (React.createElement(SearchInput$1, Object.assign({ "data-itemid": `${baseId}-search-input`, onChange: handleSearch, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, type: 'text', value: searchTerm }, accessibleProps))),
1133
1177
  React.createElement(Trigger$1, Object.assign({ "data-itemid": `${baseId}-trigger`, disabled: readOnly, onChange: handleChange, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
1134
1178
  placeholder && !value && (React.createElement("option", { "data-itemid": `${baseId}-placeholder`, disabled: true, value: '' }, placeholder)),
@@ -1293,9 +1337,14 @@ const ButtonBar$1 = styled.div `
1293
1337
  gap: 10px;
1294
1338
  flex-shrink: 0;
1295
1339
  background: #fff;
1340
+ flex-direction: column;
1341
+ `;
1342
+ const ButtonBarNote = styled.div `
1343
+ display: flex;
1344
+ gap: 10px;
1296
1345
  `;
1297
1346
  const Drawer = (_a) => {
1298
- var { children, description, title, onClose, primaryButton, position = 'fixed', secondaryButton, tertiaryButton, scrim = 'dark', width, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "description", "title", "onClose", "primaryButton", "position", "secondaryButton", "tertiaryButton", "scrim", "width", "dataItemid"]);
1347
+ var { children, description, title, onClose, primaryButton, position = 'fixed', secondaryButton, tertiaryButton, scrim = 'dark', width, dataItemid, bottomNotes } = _a, accessibleProps = __rest(_a, ["children", "description", "title", "onClose", "primaryButton", "position", "secondaryButton", "tertiaryButton", "scrim", "width", "dataItemid", "bottomNotes"]);
1299
1348
  React.useEffect(() => {
1300
1349
  document.onkeydown = e => {
1301
1350
  if (e.key === 'Escape') {
@@ -1317,9 +1366,11 @@ const Drawer = (_a) => {
1317
1366
  React.createElement(Button, { dataItemid: `${baseId}-close-button`, format: 'secondary', icon: js.mdiClose, small: true }))),
1318
1367
  React.createElement(ContentWrapper$1, { "data-itemid": `${baseId}-content-wrapper` }, children),
1319
1368
  primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, { "data-itemid": `${baseId}-button-bar` },
1320
- tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { "data-itemid": `${baseId}-tertiary-button`, format: tertiaryButton.format || 'secondary' }))) : null,
1321
- secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { "data-itemid": `${baseId}-secondary-button`, format: secondaryButton.format || 'secondary' }))) : null,
1322
- primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { "data-itemid": `${baseId}-primary-button`, format: primaryButton.format || 'primary' }))) : null)) : null),
1369
+ React.createElement(Copy, { "data-itemid": `${baseId}-button-bar-notes`, type: 'small' }, bottomNotes),
1370
+ React.createElement(ButtonBarNote, null,
1371
+ tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { "data-itemid": `${baseId}-tertiary-button`, format: tertiaryButton.format || 'secondary' }))) : null,
1372
+ secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { "data-itemid": `${baseId}-secondary-button`, format: secondaryButton.format || 'secondary' }))) : null,
1373
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { "data-itemid": `${baseId}-primary-button`, format: primaryButton.format || 'primary' }))) : null))) : null),
1323
1374
  scrim ? (React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, "data-itemid": `${baseId}-scrim`, onClick: onClose })) : null));
1324
1375
  };
1325
1376
 
@@ -1811,6 +1862,28 @@ const StyledSuffix = styled.div `
1811
1862
  font-size: ${FontSizes.DEFAULT};
1812
1863
  color: ${Colors.BLACK.Hex};
1813
1864
  `;
1865
+ const getBackgroundColor$1 = (props) => {
1866
+ if (props.$isWarningError) {
1867
+ return '#fcf1c9';
1868
+ }
1869
+ else if (props.$invalid && props.$isInvalidRedBackground) {
1870
+ return '#ffe5e5';
1871
+ }
1872
+ else {
1873
+ return props.$readOnly ? '#f5f5f5' : '#ffffff';
1874
+ }
1875
+ };
1876
+ const getBorderColor$1 = (props) => {
1877
+ if (props.$isWarningError) {
1878
+ return 'Orange';
1879
+ }
1880
+ else if (props.$invalid) {
1881
+ return Colors.RED.Hex;
1882
+ }
1883
+ else {
1884
+ return '#cccccc';
1885
+ }
1886
+ };
1814
1887
  const StyledWrapper = styled.div `
1815
1888
  display: flex;
1816
1889
  width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
@@ -1818,8 +1891,8 @@ const StyledWrapper = styled.div `
1818
1891
  position: relative;
1819
1892
  border-width: 1px;
1820
1893
  border-style: solid;
1821
- border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
1822
- background-color: ${props => props.$invalid && props.$isInvalidRedBackground ? '#ffe5e5' : '#ffffff'};
1894
+ border-color: ${props => getBorderColor$1(props)};
1895
+ background-color: ${props => getBackgroundColor$1(props)};
1823
1896
  border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
1824
1897
 
1825
1898
  &:focus-within {
@@ -1885,7 +1958,7 @@ const Loader$1 = styled.div `
1885
1958
  const Input$1 = (_a) => {
1886
1959
  var { format, suffix, height, invalid, loading, max, maxLength, min, onBlur, onChange, onFocus, onKeyDown,
1887
1960
  // eslint-disable-next-line @typescript-eslint/no-empty-function
1888
- onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid, mask, onPaste, autoComplete, isInvalidRedBackground = false } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "dataItemid", "mask", "onPaste", "autoComplete", "isInvalidRedBackground"]);
1961
+ onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid, mask, onPaste, autoComplete, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "dataItemid", "mask", "onPaste", "autoComplete", "isInvalidRedBackground", "isWarningError"]);
1889
1962
  const [show_options, setShowOptions] = React.useState(false);
1890
1963
  const [internalValue, setInternalValue] = React.useState(value);
1891
1964
  const [internalSuggestedValues, setInternalSuggestedValues] = React.useState(suggestedValues || []);
@@ -1961,7 +2034,7 @@ const Input$1 = (_a) => {
1961
2034
  formatted_value = formatAsMask(internalValue, mask);
1962
2035
  }
1963
2036
  const baseId = dataItemid || 'input';
1964
- return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
2037
+ return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
1965
2038
  React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, autoComplete: autoComplete, maxLength: maxLength, onBlur: readOnly
1966
2039
  ? e => e.preventDefault()
1967
2040
  : e => {
@@ -1984,7 +2057,7 @@ const Input$1 = (_a) => {
1984
2057
  React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
1985
2058
  showCharCount ? (React.createElement(CharacterCount, { "data-itemid": `${baseId}-char-count` },
1986
2059
  internalValue.length,
1987
- maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
2060
+ maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
1988
2061
  React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, autoComplete: autoComplete, max: max, maxLength: maxLength, min: min, onBlur: readOnly
1989
2062
  ? e => e.preventDefault()
1990
2063
  : e => {
@@ -2531,6 +2604,28 @@ const Input = styled.input `
2531
2604
  background-color: ${Colors.MEDIUM_GRAY.Hex};
2532
2605
  }
2533
2606
  `;
2607
+ const getBackgroundColor = (props) => {
2608
+ if (props.$isWarningError) {
2609
+ return '#fcf1c9';
2610
+ }
2611
+ else if (props.$invalid && props.$isInvalidRedBackground) {
2612
+ return '#ffe5e5';
2613
+ }
2614
+ else {
2615
+ return '#ffffff';
2616
+ }
2617
+ };
2618
+ const getBorderColor = (props) => {
2619
+ if (props.$isWarningError) {
2620
+ return 'Orange';
2621
+ }
2622
+ else if (props.$invalid) {
2623
+ return Colors.RED.Hex;
2624
+ }
2625
+ else {
2626
+ return Colors.GRAY.Hex;
2627
+ }
2628
+ };
2534
2629
  const Check = styled.span `
2535
2630
  height: 17px;
2536
2631
  width: 17px;
@@ -2538,8 +2633,8 @@ const Check = styled.span `
2538
2633
  background-color: #fff;
2539
2634
  border-width: 2px;
2540
2635
  border-style: solid;
2541
- border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
2542
- background-color: ${props => props.$invalid && props.$isInvalidRedBackground ? '#ffe5e5' : '#ffffff'};
2636
+ border-color: ${props => getBorderColor(props)};
2637
+ background-color: ${props => getBackgroundColor(props)};
2543
2638
  box-sizing: border-box;
2544
2639
  position: relative;
2545
2640
  &:after {
@@ -2563,11 +2658,11 @@ const Label = styled.span `
2563
2658
  margin-left: 6px;
2564
2659
  `;
2565
2660
  const Radio = (_a) => {
2566
- var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground"]);
2661
+ var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError"]);
2567
2662
  const baseId = dataItemid || 'radio';
2568
2663
  return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
2569
2664
  React.createElement(Input, { checked: checked, "data-itemid": `${baseId}-input`, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'radio', value: value }),
2570
- React.createElement(Check, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "data-itemid": `${baseId}-check` }),
2665
+ React.createElement(Check, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "data-itemid": `${baseId}-check` }),
2571
2666
  React.createElement(Label, { "data-itemid": `${baseId}-label` },
2572
2667
  children,
2573
2668
  tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)));