odaptos_design_system 2.0.39 → 2.0.41

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.39",
2
+ "version": "2.0.41",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -0,0 +1,84 @@
1
+ .button {
2
+ display: inline-flex;
3
+ justify-content: center;
4
+ align-items: center;
5
+ gap: 0.5rem;
6
+ cursor: pointer;
7
+ height: 3.125rem;
8
+ }
9
+
10
+ .button_primary {
11
+ background: var(--Color-Neutral-Dark-Shades-950, #26292e);
12
+ border: 1px solid var(--Color-Neutral-Dark-Shades-950, #26292e);
13
+ border-radius: 0.3125rem;
14
+ padding: var(--space-spacing-none, 0rem) var(--scale-s-20, 1.25rem);
15
+
16
+ &:hover {
17
+ background: var(--Color-Neutral-Dark-Shades-950, #26292e);
18
+ border: 1px solid var(--Color-Neutral-Dark-Shades-950, #26292e);
19
+ }
20
+
21
+ &:active {
22
+ background: var(--Color-Neutral-Dark-Shades-950, #26292e);
23
+ border: 1px solid var(--Color-Neutral-Dark-Shades-950, #26292e);
24
+ }
25
+
26
+ &:disabled {
27
+ background: var(--Color-Neutral-Dark-Shades-950, #26292e);
28
+ border: 1px solid var(--Color-Neutral-Dark-Shades-950, #26292e);
29
+ cursor: not-allowed !important;
30
+ opacity: 0.5;
31
+ }
32
+
33
+ p {
34
+ color: white !important;
35
+ }
36
+
37
+ svg {
38
+ stroke: white !important;
39
+ fill: white !important;
40
+ }
41
+ }
42
+
43
+ .button_secondary {
44
+ background: var(--White, #fff);
45
+ border: 1px solid var(--color-neutral-basics-black, #00040a);
46
+ padding: var(--space-spacing-none, 0rem) var(--scale-s-20, 1.25rem)
47
+ var(--space-spacing-none, 0rem) 0.9375rem;
48
+ border-radius: 0.3125rem;
49
+
50
+ &:hover {
51
+ border: 1px solid var(--color-neutral-basics-black, #00040a);
52
+ background: var(--White, #fff);
53
+ }
54
+
55
+ &:active {
56
+ border: 1px solid var(--color-neutral-basics-black, #00040a);
57
+ background: var(--White, #fff);
58
+ }
59
+
60
+ &:disabled {
61
+ border: 1px solid var(--color-neutral-basics-black, #00040a);
62
+ background: var(--White, #fff);
63
+ opacity: 0.5;
64
+ cursor: not-allowed !important;
65
+
66
+ p {
67
+ color: var(--color-neutral-basics-black, #00040a) !important;
68
+ }
69
+
70
+ svg {
71
+ stroke: var(--color-neutral-basics-black, #00040a) !important;
72
+ fill: var(--color-neutral-basics-black, #00040a) !important;
73
+ }
74
+ }
75
+
76
+ p {
77
+ color: var(--color-neutral-basics-black, #00040a) !important;
78
+ }
79
+
80
+ svg {
81
+ stroke: var(--color-neutral-basics-black, #00040a) !important;
82
+ fill: var(--color-neutral-basics-black, #00040a) !important;
83
+ }
84
+ }
@@ -0,0 +1,41 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { TextForButton } from '../../';
3
+ import styles from './MksiteButton.modules.scss';
4
+
5
+ export interface MksiteButtonProps extends HTMLAttributes<HTMLButtonElement> {
6
+ variant?: 'primary' | 'secondary';
7
+ iconLeft?: JSX.Element;
8
+ iconRight?: JSX.Element;
9
+ disabled?: boolean;
10
+ text: string;
11
+ className?: string;
12
+ }
13
+
14
+ /** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=131-253&mode=dev */
15
+ export const MksiteButton = ({
16
+ variant = 'primary',
17
+ iconLeft,
18
+ iconRight,
19
+ text,
20
+ disabled,
21
+ className,
22
+ ...props
23
+ }: MksiteButtonProps) => {
24
+ const getStylesByVariant = (): string => {
25
+ if (variant === 'primary') return styles.button_primary;
26
+ else if (variant === 'secondary') return styles.button_secondary;
27
+ else return styles.button_primary;
28
+ };
29
+
30
+ return (
31
+ <button
32
+ className={`${styles.button} ${getStylesByVariant()} ${className ?? ''}`}
33
+ disabled={disabled}
34
+ {...props}
35
+ >
36
+ {iconLeft && iconLeft}
37
+ <TextForButton text={text} bold />
38
+ {iconRight && iconRight}
39
+ </button>
40
+ );
41
+ };
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { SvgIcon, SvgIconProps } from '@mui/material';
3
+ import { getIconSize } from '../../../utils/getIconSize';
4
+
5
+ interface CustomSvgProps {
6
+ size?: 'sm' | 'base' | 'lg' | 'xl';
7
+ }
8
+
9
+ export default function AccountIconMksite({
10
+ stroke,
11
+ strokeWidth,
12
+ fill,
13
+ size = 'base',
14
+ ...rest
15
+ }: SvgIconProps & CustomSvgProps) {
16
+ return (
17
+ <SvgIcon
18
+ strokeWidth={strokeWidth ?? 0.1}
19
+ stroke={stroke ? stroke : 'currentColor'}
20
+ sx={{ height: getIconSize(size), width: getIconSize(size) }}
21
+ {...rest}
22
+ >
23
+ <svg
24
+ xmlns="http://www.w3.org/2000/svg"
25
+ width="20"
26
+ height="20"
27
+ viewBox="0 0 20 20"
28
+ fill="none"
29
+ >
30
+ <path
31
+ d="M10 10C8.88889 10 7.94444 9.61111 7.16667 8.83333C6.38889 8.05556 6 7.11111 6 6C6 4.88889 6.38889 3.94444 7.16667 3.16667C7.94444 2.38889 8.88889 2 10 2C11.1111 2 12.0556 2.38889 12.8333 3.16667C13.6111 3.94444 14 4.88889 14 6C14 7.11111 13.6111 8.05556 12.8333 8.83333C12.0556 9.61111 11.1111 10 10 10ZM2 18V15.3333C2 14.9074 2.11574 14.5046 2.34722 14.125C2.5787 13.7454 2.89815 13.4259 3.30556 13.1667C4.32407 12.5741 5.40278 12.1204 6.54167 11.8056C7.68056 11.4907 8.83333 11.3333 10 11.3333C11.1667 11.3333 12.3194 11.4907 13.4583 11.8056C14.5972 12.1204 15.6759 12.5741 16.6944 13.1667C17.1019 13.4074 17.4213 13.7222 17.6528 14.1111C17.8843 14.5 18 14.9074 18 15.3333V18H2Z"
32
+ fill={fill}
33
+ />
34
+ </svg>
35
+ </SvgIcon>
36
+ );
37
+ }
@@ -61,6 +61,7 @@ export { default as VideoFlag2 } from './Illustrations/VideoFlag2';
61
61
  export { default as VideoFlagGreen } from './Illustrations/VideoFlagGreen';
62
62
  export { default as WaitingMen } from './Illustrations/WaitingMen';
63
63
  export { default as AccountIcon } from './Interaction/AccountIcon';
64
+ export { default as AccountIconMksite } from './Interaction/AccountIconMksite';
64
65
  export { default as AddIcon } from './Interaction/AddIcon';
65
66
  export { default as AddTagIcon } from './Interaction/AddTagIcon';
66
67
  export { default as AgendaIcon } from './Interaction/AgendaIcon';
@@ -41,7 +41,7 @@ export interface SelfProtocolManagerProps
41
41
  areAllTasksSend?: boolean;
42
42
  isLastScenario?: boolean;
43
43
  isRecordingFinished?: boolean;
44
- isUserSharingScreen: boolean;
44
+ isUserSharingScreen?: boolean;
45
45
  isScreenShareMessageDisplayed?: boolean;
46
46
  disabledStopRecording?: boolean;
47
47
  isExtensionDownloaded?: boolean;
@@ -161,7 +161,9 @@ export const SelfProtocolManager = ({
161
161
  ctaText={texts.nextTaskCTA}
162
162
  buttonIcon={<SendIcon />}
163
163
  onClick={() => sendTask(task)}
164
- isDisabled={getIsTaskDisabled(task)}
164
+ isDisabled={
165
+ getIsTaskDisabled(task) || isUserSharingScreen === false
166
+ }
165
167
  isDisplay={task.isDisplay}
166
168
  />
167
169
  );
@@ -179,7 +181,9 @@ export const SelfProtocolManager = ({
179
181
  buttonId={'start_scenario'}
180
182
  onClick={() => sendTask(task)}
181
183
  isDisplay={task.isDisplay}
182
- isDisabled={getIsTaskDisabled(task) || !isUserSharingScreen}
184
+ isDisabled={
185
+ getIsTaskDisabled(task) || isUserSharingScreen === false
186
+ }
183
187
  />
184
188
  );
185
189
  } else return <></>;
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@ export * from './Atoms/Avatar/Avatar';
3
3
  export * from './Atoms/Badge/Badge';
4
4
  export * from './Atoms/Box/Box';
5
5
  export * from './Atoms/Buttons/Button';
6
+ export * from './Atoms/Buttons/MksiteButton';
6
7
  export * from './Atoms/Buttons/IconButton';
7
8
  export * from './Atoms/Cards/Card';
8
9
  export * from './Atoms/Cards/CardButton';