odaptos_design_system 2.0.61 → 2.0.63

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.
@@ -12600,7 +12600,7 @@ const ControlsBar = ({
12600
12600
  disabled: disabledEndInterview,
12601
12601
  onClick: () => endInterview(),
12602
12602
  icon: /*#__PURE__*/React__default.createElement(HangUpIcon, null)
12603
- }), !isInterviewer && screenShareText && enableScreenSharing && /*#__PURE__*/React__default.createElement(InterviewButton, {
12603
+ }), (!isInterviewer || !isModerated) && screenShareText && enableScreenSharing && /*#__PURE__*/React__default.createElement(InterviewButton, {
12604
12604
  id: "odaptos_screen_share",
12605
12605
  text: screenShareText,
12606
12606
  variant: "screenshare",
@@ -15992,6 +15992,33 @@ const TextInput = props => {
15992
15992
  const InputLabelProps = label === undefined ? {
15993
15993
  shrink: false
15994
15994
  } : {};
15995
+ const handleKeyDown = e => {
15996
+ if (e.key === 'Enter') {
15997
+ if (e.shiftKey && multiline) {
15998
+ // Ajouter un saut de ligne
15999
+ const target = e.target;
16000
+ const start = target.selectionStart;
16001
+ const end = target.selectionEnd;
16002
+ const value = target.value;
16003
+ const newValue = value.substring(0, start) + '\n' + value.substring(end);
16004
+ console.log('newValue', newValue);
16005
+ e.preventDefault();
16006
+ onChange({
16007
+ target: {
16008
+ value: newValue,
16009
+ name: props.name
16010
+ }
16011
+ });
16012
+ // Mettre à jour la position du curseur
16013
+ setTimeout(() => {
16014
+ target.selectionStart = target.selectionEnd = start + 1;
16015
+ }, 0);
16016
+ } else if (onKeyDown) {
16017
+ e.preventDefault();
16018
+ onKeyDown();
16019
+ }
16020
+ }
16021
+ };
15995
16022
  return /*#__PURE__*/React__default.createElement("div", {
15996
16023
  className: `${className} ${styles$U.input}`,
15997
16024
  id: id
@@ -16035,11 +16062,7 @@ const TextInput = props => {
16035
16062
  rows: rows,
16036
16063
  maxRows: maxRows,
16037
16064
  minRows: minRows,
16038
- onKeyUp: e => {
16039
- if (e.key === 'Enter' && onKeyDown) {
16040
- onKeyDown();
16041
- }
16042
- }
16065
+ onKeyDown: handleKeyDown
16043
16066
  }), errorText && error && /*#__PURE__*/React__default.createElement(Text, {
16044
16067
  size: "xs",
16045
16068
  color: "#F54C4C",
@@ -16948,7 +16971,7 @@ const TextWithLink = ({
16948
16971
  }));
16949
16972
  };
16950
16973
 
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 p{padding:0}";
16974
+ 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
16975
  var styles$14 = {"user_indicator":"UserIndicator-module_user_indicator__hOQbF"};
16953
16976
  styleInject(css_248z$14);
16954
16977