odaptos_design_system 1.4.105 → 1.4.107
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/Interviews/Chat.d.ts +1 -0
- package/dist/NumbersCode/NumbersCode.d.ts +6 -1
- package/dist/odaptos_design_system.cjs.development.js +28 -10
- 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 -10
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Interviews/Chat.modules.scss +4 -1
- package/src/Interviews/Chat.tsx +6 -3
- package/src/NumbersCode/NumbersCode.tsx +30 -7
|
@@ -4,17 +4,22 @@ export interface NumbersCodeProps {
|
|
|
4
4
|
code: string;
|
|
5
5
|
isValid: boolean[];
|
|
6
6
|
setIsValid: (isValid: boolean[]) => void;
|
|
7
|
+
userValue: string[];
|
|
8
|
+
setUserValue: (newValue: string[]) => void;
|
|
7
9
|
placeholder?: string;
|
|
10
|
+
containerClassname?: string;
|
|
8
11
|
className?: string;
|
|
9
12
|
}
|
|
10
13
|
export interface InputElementProps {
|
|
11
14
|
inputNumber: number;
|
|
12
15
|
inputCode: string;
|
|
13
16
|
isValid: boolean[];
|
|
17
|
+
userValue: string[];
|
|
18
|
+
setUserValue: (newValue: string[]) => void;
|
|
14
19
|
setIsValid: (isValid: boolean[]) => void;
|
|
15
20
|
maxElement: number;
|
|
16
21
|
placeholder?: string;
|
|
17
22
|
className?: string;
|
|
18
23
|
}
|
|
19
24
|
/** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=131-253&mode=dev */
|
|
20
|
-
export declare const NumbersCode: ({ className, code, isValid, setIsValid, placeholder, number }: NumbersCodeProps) => React.JSX.Element;
|
|
25
|
+
export declare const NumbersCode: ({ className, code, userValue, setUserValue, isValid, setIsValid, containerClassname, placeholder, number }: NumbersCodeProps) => React.JSX.Element;
|
|
@@ -7953,7 +7953,7 @@ const ControlsBar = ({
|
|
|
7953
7953
|
}));
|
|
7954
7954
|
};
|
|
7955
7955
|
|
|
7956
|
-
var css_248z$b = ".Chat-modules_chatContainer__xzg50{align-items:flex-start;background:#fff;border-radius:.5rem;display:flex;flex-direction:column;gap:.5rem;height:100%;min-width:25rem;padding:1rem}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP{display:flex;flex-direction:column;gap:.5rem;max-width:100%}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh{max-height:
|
|
7956
|
+
var css_248z$b = ".Chat-modules_chatContainer__xzg50{align-items:flex-start;background:#fff;border-radius:.5rem;display:flex;flex-direction:column;gap:.5rem;height:100%;min-width:25rem;padding:1rem}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP{display:flex;flex-direction:column;gap:.5rem;max-width:100%}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh{display:flex;flex-direction:column;gap:1rem;max-height:50%;overflow-x:hidden;overflow-y:scroll}.Chat-modules_no_scrollbar__Ia2bX{-ms-overflow-style:none;scrollbar-width:none}.Chat-modules_no_scrollbar__Ia2bX::-webkit-scrollbar{display:none}";
|
|
7957
7957
|
var styles$b = {"chatContainer":"Chat-modules_chatContainer__xzg50","scrolling_content":"Chat-modules_scrolling_content__urvdP","tasks_container":"Chat-modules_tasks_container__Mg9Oh","no_scrollbar":"Chat-modules_no_scrollbar__Ia2bX"};
|
|
7958
7958
|
styleInject(css_248z$b);
|
|
7959
7959
|
|
|
@@ -7995,10 +7995,10 @@ const Chat = ({
|
|
|
7995
7995
|
text: chatTitle,
|
|
7996
7996
|
weight: "bold",
|
|
7997
7997
|
size: "lg"
|
|
7998
|
-
}), welcomeTitle && welcomeDescription && isInterviewer && /*#__PURE__*/React__default.createElement(WelcomeMessage, {
|
|
7998
|
+
}), welcomeTitle && welcomeDescription && !isInterviewer && /*#__PURE__*/React__default.createElement(WelcomeMessage, {
|
|
7999
7999
|
title: welcomeTitle,
|
|
8000
8000
|
description: welcomeDescription
|
|
8001
|
-
}), startInterviewTitle && startInterview && startInterviewBtnTitle &&
|
|
8001
|
+
}), startInterviewTitle && startInterview && startInterviewBtnTitle && isInterviewer && /*#__PURE__*/React__default.createElement(StartInterview, {
|
|
8002
8002
|
title: startInterviewTitle,
|
|
8003
8003
|
buttonText: startInterviewBtnTitle,
|
|
8004
8004
|
buttonIcon: startInterviewIcon,
|
|
@@ -8010,7 +8010,7 @@ const Chat = ({
|
|
|
8010
8010
|
const isCompletedTask = index < currentTaskIndex;
|
|
8011
8011
|
return /*#__PURE__*/React__default.createElement(Task, {
|
|
8012
8012
|
key: task._id,
|
|
8013
|
-
taskNumber:
|
|
8013
|
+
taskNumber: `${task.type === 'task' ? 'Task' : 'Question'} #${index + 1}`,
|
|
8014
8014
|
taskTitle: task.description,
|
|
8015
8015
|
notes: task.notes,
|
|
8016
8016
|
state: isCompletedTask ? 'disabled' : currentTaskIndex === index ? 'active' : 'idle',
|
|
@@ -8913,6 +8913,8 @@ const NumberInput = ({
|
|
|
8913
8913
|
inputCode,
|
|
8914
8914
|
inputNumber,
|
|
8915
8915
|
isValid,
|
|
8916
|
+
userValue,
|
|
8917
|
+
setUserValue,
|
|
8916
8918
|
setIsValid,
|
|
8917
8919
|
maxElement,
|
|
8918
8920
|
placeholder,
|
|
@@ -8921,11 +8923,22 @@ const NumberInput = ({
|
|
|
8921
8923
|
const [value, setValue] = React.useState('');
|
|
8922
8924
|
return /*#__PURE__*/React__default.createElement(CssTextField$2, Object.assign({
|
|
8923
8925
|
value: value,
|
|
8924
|
-
|
|
8925
|
-
if (
|
|
8926
|
+
onKeyDown: event => {
|
|
8927
|
+
if (event.key === "Backspace") {
|
|
8926
8928
|
let newValidity = [...isValid];
|
|
8927
|
-
setValue(
|
|
8928
|
-
|
|
8929
|
+
setValue("");
|
|
8930
|
+
let newUserValue = [...userValue];
|
|
8931
|
+
newUserValue[inputNumber] = "";
|
|
8932
|
+
setUserValue(newUserValue);
|
|
8933
|
+
setIsValid([...newValidity]);
|
|
8934
|
+
}
|
|
8935
|
+
if (Number(event.key) || Number(event.key) === 0) {
|
|
8936
|
+
let newValidity = [...isValid];
|
|
8937
|
+
setValue(event.key);
|
|
8938
|
+
newValidity[inputNumber] = event.key === inputCode;
|
|
8939
|
+
let newUserValue = [...userValue];
|
|
8940
|
+
newUserValue[inputNumber] = event.key;
|
|
8941
|
+
setUserValue(newUserValue);
|
|
8929
8942
|
setIsValid([...newValidity]);
|
|
8930
8943
|
if (inputNumber < maxElement - 1) {
|
|
8931
8944
|
const nextInput = document.getElementById(`NumberInput#${inputNumber + 1}`);
|
|
@@ -8944,17 +8957,22 @@ const NumberInput = ({
|
|
|
8944
8957
|
const NumbersCode = ({
|
|
8945
8958
|
className,
|
|
8946
8959
|
code,
|
|
8960
|
+
userValue,
|
|
8961
|
+
setUserValue,
|
|
8947
8962
|
isValid,
|
|
8948
8963
|
setIsValid,
|
|
8964
|
+
containerClassname,
|
|
8949
8965
|
placeholder = "_",
|
|
8950
8966
|
number = 6
|
|
8951
8967
|
}) => {
|
|
8952
8968
|
const children = [];
|
|
8953
8969
|
for (let i = 0; i < number; i += 1) {
|
|
8954
8970
|
children.push( /*#__PURE__*/React__default.createElement(NumberInput, {
|
|
8971
|
+
userValue: userValue,
|
|
8972
|
+
setUserValue: setUserValue,
|
|
8955
8973
|
setIsValid: setIsValid,
|
|
8956
8974
|
isValid: isValid,
|
|
8957
|
-
inputCode: code.charAt(i),
|
|
8975
|
+
inputCode: code ? code.charAt(i) : '',
|
|
8958
8976
|
className: className,
|
|
8959
8977
|
inputNumber: i,
|
|
8960
8978
|
placeholder: placeholder,
|
|
@@ -8962,7 +8980,7 @@ const NumbersCode = ({
|
|
|
8962
8980
|
}));
|
|
8963
8981
|
}
|
|
8964
8982
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8965
|
-
className: `${styles$o.blockList}`
|
|
8983
|
+
className: `${containerClassname ?? ''} ${styles$o.blockList}`
|
|
8966
8984
|
}, children);
|
|
8967
8985
|
};
|
|
8968
8986
|
|