@digital-ai/dot-components 2.26.0 → 2.26.1
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 +5 -1
- package/index.esm.mjs +5 -1
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1671,7 +1671,10 @@ const getAvatarColorForInputText = value => {
|
|
|
1671
1671
|
const colorOptions = [...Object.keys(avatarColors)];
|
|
1672
1672
|
if (!value || !colorOptions || colorOptions.length <= 0) return 'default';
|
|
1673
1673
|
const numberFromValue = calculateNumberFromText(value);
|
|
1674
|
-
|
|
1674
|
+
const index = numberFromValue % colorOptions.length;
|
|
1675
|
+
// if number is 9 (transparent), return default color
|
|
1676
|
+
if (index === 9) return 'default';
|
|
1677
|
+
return colorOptions[index];
|
|
1675
1678
|
};
|
|
1676
1679
|
const isString$1 = str => typeof str === 'string';
|
|
1677
1680
|
const isLowerCase = str => str === str.toLowerCase();
|
|
@@ -12515,6 +12518,7 @@ const DotTableActions = ({
|
|
|
12515
12518
|
return actions && actions.map((action, index) => index < 2 && jsx(DotTableAction, {
|
|
12516
12519
|
iconId: action.iconId,
|
|
12517
12520
|
label: action.label,
|
|
12521
|
+
disabled: action.disabled,
|
|
12518
12522
|
tooltip: action.tooltip || action.label,
|
|
12519
12523
|
onClick: e => handleTableActionClick(e, action)
|
|
12520
12524
|
}, `action-${index}`));
|
package/index.esm.mjs
CHANGED
|
@@ -1671,7 +1671,10 @@ const getAvatarColorForInputText = value => {
|
|
|
1671
1671
|
const colorOptions = [...Object.keys(avatarColors)];
|
|
1672
1672
|
if (!value || !colorOptions || colorOptions.length <= 0) return 'default';
|
|
1673
1673
|
const numberFromValue = calculateNumberFromText(value);
|
|
1674
|
-
|
|
1674
|
+
const index = numberFromValue % colorOptions.length;
|
|
1675
|
+
// if number is 9 (transparent), return default color
|
|
1676
|
+
if (index === 9) return 'default';
|
|
1677
|
+
return colorOptions[index];
|
|
1675
1678
|
};
|
|
1676
1679
|
const isString$1 = str => typeof str === 'string';
|
|
1677
1680
|
const isLowerCase = str => str === str.toLowerCase();
|
|
@@ -12515,6 +12518,7 @@ const DotTableActions = ({
|
|
|
12515
12518
|
return actions && actions.map((action, index) => index < 2 && jsx(DotTableAction, {
|
|
12516
12519
|
iconId: action.iconId,
|
|
12517
12520
|
label: action.label,
|
|
12521
|
+
disabled: action.disabled,
|
|
12518
12522
|
tooltip: action.tooltip || action.label,
|
|
12519
12523
|
onClick: e => handleTableActionClick(e, action)
|
|
12520
12524
|
}, `action-${index}`));
|