odaptos_design_system 2.0.62 → 2.0.64
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/odaptos_design_system.cjs.development.js +31 -7
- 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 +31 -7
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Atoms/Tag/Tag.tsx +7 -1
- package/src/Molecules/UserIndicator/UserIndicator.module.scss +2 -1
- package/src/Organisms/TextInput/TextInput.tsx +31 -5
package/dist/Atoms/Tag/Tag.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ interface TagProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
customColor?: string;
|
|
10
10
|
className?: string;
|
|
11
11
|
canBeRemoved?: boolean;
|
|
12
|
+
tooltipText?: string;
|
|
12
13
|
}
|
|
13
14
|
/** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=1359-33355&mode=dev */
|
|
14
|
-
export declare const Tag: ({ text, status, size, iconLeft, iconRight, amountNumber, customColor, className, canBeRemoved, ...props }: TagProps) => React.JSX.Element;
|
|
15
|
+
export declare const Tag: ({ text, status, size, iconLeft, iconRight, amountNumber, customColor, className, canBeRemoved, tooltipText, ...props }: TagProps) => React.JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -15793,6 +15793,7 @@ const Tag = ({
|
|
|
15793
15793
|
customColor,
|
|
15794
15794
|
className,
|
|
15795
15795
|
canBeRemoved = false,
|
|
15796
|
+
tooltipText,
|
|
15796
15797
|
...props
|
|
15797
15798
|
}) => {
|
|
15798
15799
|
const tagCustomColor = customColor ? colord.colord(customColor) : undefined;
|
|
@@ -15831,7 +15832,7 @@ const Tag = ({
|
|
|
15831
15832
|
return () => window.removeEventListener('resize', checkEllipsis);
|
|
15832
15833
|
}, []);
|
|
15833
15834
|
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
15834
|
-
tooltipDescription: text,
|
|
15835
|
+
tooltipDescription: tooltipText ?? text,
|
|
15835
15836
|
arrow: true,
|
|
15836
15837
|
isTooltipActive: isEllipsisActive
|
|
15837
15838
|
}, /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
|
@@ -15992,6 +15993,33 @@ const TextInput = props => {
|
|
|
15992
15993
|
const InputLabelProps = label === undefined ? {
|
|
15993
15994
|
shrink: false
|
|
15994
15995
|
} : {};
|
|
15996
|
+
const handleKeyDown = e => {
|
|
15997
|
+
if (e.key === 'Enter') {
|
|
15998
|
+
if (e.shiftKey && multiline) {
|
|
15999
|
+
// Ajouter un saut de ligne
|
|
16000
|
+
const target = e.target;
|
|
16001
|
+
const start = target.selectionStart;
|
|
16002
|
+
const end = target.selectionEnd;
|
|
16003
|
+
const value = target.value;
|
|
16004
|
+
const newValue = value.substring(0, start) + '\n' + value.substring(end);
|
|
16005
|
+
console.log('newValue', newValue);
|
|
16006
|
+
e.preventDefault();
|
|
16007
|
+
onChange({
|
|
16008
|
+
target: {
|
|
16009
|
+
value: newValue,
|
|
16010
|
+
name: props.name
|
|
16011
|
+
}
|
|
16012
|
+
});
|
|
16013
|
+
// Mettre à jour la position du curseur
|
|
16014
|
+
setTimeout(() => {
|
|
16015
|
+
target.selectionStart = target.selectionEnd = start + 1;
|
|
16016
|
+
}, 0);
|
|
16017
|
+
} else if (onKeyDown) {
|
|
16018
|
+
e.preventDefault();
|
|
16019
|
+
onKeyDown();
|
|
16020
|
+
}
|
|
16021
|
+
}
|
|
16022
|
+
};
|
|
15995
16023
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15996
16024
|
className: `${className} ${styles$U.input}`,
|
|
15997
16025
|
id: id
|
|
@@ -16035,11 +16063,7 @@ const TextInput = props => {
|
|
|
16035
16063
|
rows: rows,
|
|
16036
16064
|
maxRows: maxRows,
|
|
16037
16065
|
minRows: minRows,
|
|
16038
|
-
|
|
16039
|
-
if (e.key === 'Enter' && onKeyDown) {
|
|
16040
|
-
onKeyDown();
|
|
16041
|
-
}
|
|
16042
|
-
}
|
|
16066
|
+
onKeyDown: handleKeyDown
|
|
16043
16067
|
}), errorText && error && /*#__PURE__*/React__default.createElement(Text, {
|
|
16044
16068
|
size: "xs",
|
|
16045
16069
|
color: "#F54C4C",
|
|
@@ -16948,7 +16972,7 @@ const TextWithLink = ({
|
|
|
16948
16972
|
}));
|
|
16949
16973
|
};
|
|
16950
16974
|
|
|
16951
|
-
var css_248z$14 = ".UserIndicator-module_user_indicator__hOQbF{align-items:center;background:var(--color-gradients-003,linear-gradient(135deg,#07f 0,#9024f6 100%));border-radius:.5rem;display:flex;height:2.75rem;justify-content:center;padding:.625rem .5625rem;width:2.75rem}.UserIndicator-module_user_indicator__hOQbF
|
|
16975
|
+
var css_248z$14 = ".UserIndicator-module_user_indicator__hOQbF{align-items:center;background:var(--color-gradients-003,linear-gradient(135deg,#07f 0,#9024f6 100%));border-radius:.5rem;display:flex;height:2.75rem;justify-content:center;padding:.625rem .5625rem;width:2.75rem}.UserIndicator-module_user_indicator__hOQbF h2{padding:0;text-transform:uppercase}";
|
|
16952
16976
|
var styles$14 = {"user_indicator":"UserIndicator-module_user_indicator__hOQbF"};
|
|
16953
16977
|
styleInject(css_248z$14);
|
|
16954
16978
|
|