odaptos_design_system 2.0.1 → 2.0.2
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/Atoms/Typography/Text.d.ts +2 -1
- package/dist/odaptos_design_system.cjs.development.js +21 -2
- package/dist/odaptos_design_system.cjs.development.js.map +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js.map +1 -1
- package/dist/odaptos_design_system.esm.js +21 -2
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Atoms/Tag/Tag.tsx +45 -23
- package/src/Atoms/Typography/Text.tsx +3 -0
|
@@ -14893,7 +14893,23 @@ const Tag = ({
|
|
|
14893
14893
|
return 'xs';
|
|
14894
14894
|
} else if (size === 'base') return 'sm';else return 'sm';
|
|
14895
14895
|
};
|
|
14896
|
-
|
|
14896
|
+
const [isEllipsisActive, setIsEllipsisActive] = useState(false);
|
|
14897
|
+
useEffect(() => {
|
|
14898
|
+
const checkEllipsis = () => {
|
|
14899
|
+
const element = document.querySelector('#tag_text');
|
|
14900
|
+
if (element) {
|
|
14901
|
+
setIsEllipsisActive(element.scrollWidth > element.clientWidth);
|
|
14902
|
+
}
|
|
14903
|
+
};
|
|
14904
|
+
checkEllipsis();
|
|
14905
|
+
window.addEventListener('resize', checkEllipsis);
|
|
14906
|
+
return () => window.removeEventListener('resize', checkEllipsis);
|
|
14907
|
+
}, []);
|
|
14908
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14909
|
+
tooltipDescription: text,
|
|
14910
|
+
arrow: true,
|
|
14911
|
+
isTooltipActive: isEllipsisActive
|
|
14912
|
+
}, /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
|
14897
14913
|
style: {
|
|
14898
14914
|
backgroundColor: customColor
|
|
14899
14915
|
},
|
|
@@ -14904,6 +14920,7 @@ const Tag = ({
|
|
|
14904
14920
|
stroke: getTextColor()
|
|
14905
14921
|
}
|
|
14906
14922
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
14923
|
+
id: "tag_text",
|
|
14907
14924
|
size: getTextSize(),
|
|
14908
14925
|
text: text,
|
|
14909
14926
|
color: getTextColor()
|
|
@@ -14917,7 +14934,7 @@ const Tag = ({
|
|
|
14917
14934
|
fill: getTextColor(),
|
|
14918
14935
|
stroke: getTextColor()
|
|
14919
14936
|
}
|
|
14920
|
-
}));
|
|
14937
|
+
})));
|
|
14921
14938
|
};
|
|
14922
14939
|
|
|
14923
14940
|
var css_248z$O = ".TextInput-modules_input__Ky9uR{font-family:var(--sdFontFamilyOpenSans);font-size:var(--sdTypoTextNoDecorationRegularBase);font-style:normal;font-weight:var(--sdFontWeightRegular);letter-spacing:var(--sdLetterSpacingButtons);line-height:var(--sdLineHeight130);margin:unset;text-align:left;width:100%}.TextInput-modules_input__Ky9uR svg{height:1rem;width:1rem}input{font-family:var(--sdFontFamilyOpenSans);font-size:var(--sdTypoTextNoDecorationRegularBase);font-style:normal;font-weight:var(--sdFontWeightRegular);letter-spacing:var(--sdLetterSpacingButtons);line-height:var(--sdLineHeight130);margin:unset;text-align:left}input.TextInput-modules_input__Ky9uR{height:1rem}.TextInput-modules_MuiInputBase-root-MuiOutlinedInput-root__Kq7D9{font-family:var(--sdFontFamilyOpenSans);font-size:var(--sdTypoTextNoDecorationRegularBase);font-style:normal;font-weight:var(--sdFontWeightRegular);letter-spacing:var(--sdLetterSpacingButtons);line-height:var(--sdLineHeight130);margin:unset;text-align:left}.TextInput-modules_input_top_label__Xj8GH{margin-bottom:.625rem}.TextInput-modules_input__Ky9uR .TextInput-modules_MuiInputBase-input__beBli{color:var(--gray-black);font-family:OpenSans;font-size:1rem;padding:.375rem .75rem}.TextInput-modules_text_below__oT18E{margin:.25rem .5rem .25rem .75rem}";
|
|
@@ -16092,6 +16109,7 @@ const Text = ({
|
|
|
16092
16109
|
textDecoration,
|
|
16093
16110
|
className,
|
|
16094
16111
|
required,
|
|
16112
|
+
id,
|
|
16095
16113
|
...props
|
|
16096
16114
|
}) => {
|
|
16097
16115
|
const getTextSize = () => {
|
|
@@ -16104,6 +16122,7 @@ const Text = ({
|
|
|
16104
16122
|
if (textDecoration === 'underline') return styles$Y.text_underline;else if (textDecoration === 'line-through') return styles$Y.text_line_through;else return '';
|
|
16105
16123
|
};
|
|
16106
16124
|
return /*#__PURE__*/React.createElement("p", Object.assign({}, props, {
|
|
16125
|
+
id: id,
|
|
16107
16126
|
style: {
|
|
16108
16127
|
color: color
|
|
16109
16128
|
},
|