odaptos_design_system 2.0.0 → 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/Tag/Tag.d.ts +2 -1
- package/dist/Atoms/Typography/Text.d.ts +2 -1
- package/dist/odaptos_design_system.cjs.development.js +28 -6
- 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 +28 -6
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Atoms/Tag/Tag.modules.scss +5 -0
- package/src/Atoms/Tag/Tag.tsx +47 -23
- package/src/Atoms/Typography/Text.tsx +3 -0
- package/src/Organisms/MultiSelect/MultiSelect.tsx +2 -1
- package/src/Organisms/MultiSelect/MultiSelectWithCategories.tsx +1 -0
|
@@ -12599,10 +12599,11 @@ const MultiSelect = ({
|
|
|
12599
12599
|
size: "sm",
|
|
12600
12600
|
status: "info",
|
|
12601
12601
|
key: `chipt-option-${index}`,
|
|
12602
|
+
canBeRemoved: true,
|
|
12602
12603
|
iconRight: /*#__PURE__*/React.createElement(RemoveCircledIcon, {
|
|
12603
12604
|
fill: colors.blue_700,
|
|
12604
12605
|
style: {
|
|
12605
|
-
cursor: 'pointer'
|
|
12606
|
+
cursor: 'pointer !important'
|
|
12606
12607
|
},
|
|
12607
12608
|
onClick: () => deleteOption(option)
|
|
12608
12609
|
})
|
|
@@ -12868,6 +12869,7 @@ const MultiSelectWithCategories = ({
|
|
|
12868
12869
|
size: "sm",
|
|
12869
12870
|
status: "info",
|
|
12870
12871
|
key: `chipt-option-${index}`,
|
|
12872
|
+
canBeRemoved: true,
|
|
12871
12873
|
iconRight: /*#__PURE__*/React.createElement(RemoveCircledIcon, {
|
|
12872
12874
|
fill: colors.blue_700,
|
|
12873
12875
|
style: {
|
|
@@ -14850,8 +14852,8 @@ const TabsUnderline = ({
|
|
|
14850
14852
|
})));
|
|
14851
14853
|
};
|
|
14852
14854
|
|
|
14853
|
-
var css_248z$N = ".Tag-modules_tag__sYiD6{align-items:center;border-radius:.25rem;display:flex;gap:.25rem;padding:0 .375rem;width:-moz-fit-content;width:fit-content}.Tag-modules_tag__sYiD6 p{max-width:95%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important;width:100%}.Tag-modules_tag_idle__ym-G7{background:var(--color-neutral-dark-shades-600,#717376)}.Tag-modules_tag_idle__ym-G7 svg{stroke:#fff!important;fill:#fff!important}.Tag-modules_tag_info__Q6-WL{background:var(--color-primary-100,#e5f1ff)}.Tag-modules_tag_info__Q6-WL svg{stroke:#004799!important;fill:#004799!important}.Tag-modules_tag_violet__CgNel{background:var(--Color-Extended-Purple-100,#e9d3fd)}.Tag-modules_tag_violet__CgNel svg{stroke:#5c1994!important;fill:#5c1994!important}.Tag-modules_tag_light__RqIr6{background:var(--Color-Neutral-Clear-Shades-150,#eee)}.Tag-modules_tag_light__RqIr6 svg{stroke:#32353a!important;fill:#32353a!important}.Tag-modules_tag_success__yANfh{background:var(--color-extended-green-100,#e8f5ea)}.Tag-modules_tag_success__yANfh svg{stroke:#3c743d!important;fill:#3c743d!important}.Tag-modules_tag_warning__C-O5t{background:var(--color-extended-yellow-100,#fff3d6)}.Tag-modules_tag_warning__C-O5t svg{stroke:#6e4f00!important;fill:#6e4f00!important}.Tag-modules_tag_critical__v79so{background:var(--color-extended-red-100,#fddbdb)}.Tag-modules_tag_critical__v79so svg{stroke:#98312e!important;fill:#98312e!important}.Tag-modules_tag_sm__KQwsr{height:1.25rem}.Tag-modules_tag_sm__KQwsr svg{height:.75rem;width:.75rem}.Tag-modules_tag_base__omYEM{height:1.75rem}.Tag-modules_tag_base__omYEM svg{height:1rem;width:1rem}";
|
|
14854
|
-
var styles$N = {"tag":"Tag-modules_tag__sYiD6","tag_idle":"Tag-modules_tag_idle__ym-G7","tag_info":"Tag-modules_tag_info__Q6-WL","tag_violet":"Tag-modules_tag_violet__CgNel","tag_light":"Tag-modules_tag_light__RqIr6","tag_success":"Tag-modules_tag_success__yANfh","tag_warning":"Tag-modules_tag_warning__C-O5t","tag_critical":"Tag-modules_tag_critical__v79so","tag_sm":"Tag-modules_tag_sm__KQwsr","tag_base":"Tag-modules_tag_base__omYEM"};
|
|
14855
|
+
var css_248z$N = ".Tag-modules_tag__sYiD6{align-items:center;border-radius:.25rem;display:flex;gap:.25rem;padding:0 .375rem;width:-moz-fit-content;width:fit-content}.Tag-modules_tag__sYiD6 p{max-width:95%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important;width:100%}.Tag-modules_tag_idle__ym-G7{background:var(--color-neutral-dark-shades-600,#717376)}.Tag-modules_tag_idle__ym-G7 svg{stroke:#fff!important;fill:#fff!important}.Tag-modules_tag_info__Q6-WL{background:var(--color-primary-100,#e5f1ff)}.Tag-modules_tag_info__Q6-WL svg{stroke:#004799!important;fill:#004799!important}.Tag-modules_tag_violet__CgNel{background:var(--Color-Extended-Purple-100,#e9d3fd)}.Tag-modules_tag_violet__CgNel svg{stroke:#5c1994!important;fill:#5c1994!important}.Tag-modules_tag_light__RqIr6{background:var(--Color-Neutral-Clear-Shades-150,#eee)}.Tag-modules_tag_light__RqIr6 svg{stroke:#32353a!important;fill:#32353a!important}.Tag-modules_tag_success__yANfh{background:var(--color-extended-green-100,#e8f5ea)}.Tag-modules_tag_success__yANfh svg{stroke:#3c743d!important;fill:#3c743d!important}.Tag-modules_tag_warning__C-O5t{background:var(--color-extended-yellow-100,#fff3d6)}.Tag-modules_tag_warning__C-O5t svg{stroke:#6e4f00!important;fill:#6e4f00!important}.Tag-modules_tag_critical__v79so{background:var(--color-extended-red-100,#fddbdb)}.Tag-modules_tag_critical__v79so svg{stroke:#98312e!important;fill:#98312e!important}.Tag-modules_tag_sm__KQwsr{height:1.25rem}.Tag-modules_tag_sm__KQwsr svg{height:.75rem;width:.75rem}.Tag-modules_tag_base__omYEM{height:1.75rem}.Tag-modules_tag_base__omYEM svg{height:1rem;width:1rem}.Tag-modules_canBeRemoved__ei-3U svg{cursor:pointer}";
|
|
14856
|
+
var styles$N = {"tag":"Tag-modules_tag__sYiD6","tag_idle":"Tag-modules_tag_idle__ym-G7","tag_info":"Tag-modules_tag_info__Q6-WL","tag_violet":"Tag-modules_tag_violet__CgNel","tag_light":"Tag-modules_tag_light__RqIr6","tag_success":"Tag-modules_tag_success__yANfh","tag_warning":"Tag-modules_tag_warning__C-O5t","tag_critical":"Tag-modules_tag_critical__v79so","tag_sm":"Tag-modules_tag_sm__KQwsr","tag_base":"Tag-modules_tag_base__omYEM","canBeRemoved":"Tag-modules_canBeRemoved__ei-3U"};
|
|
14855
14857
|
styleInject(css_248z$N);
|
|
14856
14858
|
|
|
14857
14859
|
extend([mixPlugin]); //Used for the .tints() method of colord
|
|
@@ -14865,6 +14867,7 @@ const Tag = ({
|
|
|
14865
14867
|
amountNumber,
|
|
14866
14868
|
customColor,
|
|
14867
14869
|
className,
|
|
14870
|
+
canBeRemoved = false,
|
|
14868
14871
|
...props
|
|
14869
14872
|
}) => {
|
|
14870
14873
|
const tagCustomColor = customColor ? colord(customColor) : undefined;
|
|
@@ -14890,17 +14893,34 @@ const Tag = ({
|
|
|
14890
14893
|
return 'xs';
|
|
14891
14894
|
} else if (size === 'base') return 'sm';else return 'sm';
|
|
14892
14895
|
};
|
|
14893
|
-
|
|
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, {
|
|
14894
14913
|
style: {
|
|
14895
14914
|
backgroundColor: customColor
|
|
14896
14915
|
},
|
|
14897
|
-
className: `${styles$N.tag} ${getTagStatus()} ${getTagSize()} ${className ?? ''}`
|
|
14916
|
+
className: `${styles$N.tag} ${getTagStatus()} ${getTagSize()} ${className ?? ''} ${canBeRemoved && styles$N.canBeRemoved}`
|
|
14898
14917
|
}), iconLeft && /*#__PURE__*/React.cloneElement(iconLeft, {
|
|
14899
14918
|
style: {
|
|
14900
14919
|
fill: getTextColor(),
|
|
14901
14920
|
stroke: getTextColor()
|
|
14902
14921
|
}
|
|
14903
14922
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
14923
|
+
id: "tag_text",
|
|
14904
14924
|
size: getTextSize(),
|
|
14905
14925
|
text: text,
|
|
14906
14926
|
color: getTextColor()
|
|
@@ -14914,7 +14934,7 @@ const Tag = ({
|
|
|
14914
14934
|
fill: getTextColor(),
|
|
14915
14935
|
stroke: getTextColor()
|
|
14916
14936
|
}
|
|
14917
|
-
}));
|
|
14937
|
+
})));
|
|
14918
14938
|
};
|
|
14919
14939
|
|
|
14920
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}";
|
|
@@ -16089,6 +16109,7 @@ const Text = ({
|
|
|
16089
16109
|
textDecoration,
|
|
16090
16110
|
className,
|
|
16091
16111
|
required,
|
|
16112
|
+
id,
|
|
16092
16113
|
...props
|
|
16093
16114
|
}) => {
|
|
16094
16115
|
const getTextSize = () => {
|
|
@@ -16101,6 +16122,7 @@ const Text = ({
|
|
|
16101
16122
|
if (textDecoration === 'underline') return styles$Y.text_underline;else if (textDecoration === 'line-through') return styles$Y.text_line_through;else return '';
|
|
16102
16123
|
};
|
|
16103
16124
|
return /*#__PURE__*/React.createElement("p", Object.assign({}, props, {
|
|
16125
|
+
id: id,
|
|
16104
16126
|
style: {
|
|
16105
16127
|
color: color
|
|
16106
16128
|
},
|