odaptos_design_system 2.0.69 → 2.0.71
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/Molecules/Interviews/SelfPrortocolTaskContainer.d.ts +1 -1
- package/dist/odaptos_design_system.cjs.development.js +10 -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 +10 -7
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Atoms/Tag/Tag.modules.scss +11 -0
- package/src/Atoms/Tag/Tag.tsx +8 -4
- package/src/Molecules/Interviews/SelfPrortocolTaskContainer.tsx +2 -2
- package/src/Molecules/Interviews/SelfProtocolManager.tsx +0 -1
- package/src/Organisms/MultiSelect/MultiSelect.tsx +6 -1
- package/src/Organisms/MultiSelect/MultiSelectWithCategories.tsx +6 -1
- package/src/Organisms/SingleSelect/SingleSelect.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
.tag {
|
|
2
|
+
display: flex;
|
|
3
|
+
padding: 0rem 0.375rem;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 0.25rem;
|
|
6
|
+
border-radius: 0.25rem;
|
|
7
|
+
width: fit-content;
|
|
8
|
+
p {
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.tag_ellipsis {
|
|
2
13
|
display: flex;
|
|
3
14
|
padding: 0rem 0.375rem;
|
|
4
15
|
align-items: center;
|
package/src/Atoms/Tag/Tag.tsx
CHANGED
|
@@ -26,6 +26,7 @@ interface TagProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
26
26
|
className?: string;
|
|
27
27
|
canBeRemoved?: boolean;
|
|
28
28
|
tooltipText?: string;
|
|
29
|
+
areEllipsisActive?: boolean;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
/** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=1359-33355&mode=dev */
|
|
@@ -41,6 +42,7 @@ export const Tag = ({
|
|
|
41
42
|
className,
|
|
42
43
|
canBeRemoved = false,
|
|
43
44
|
tooltipText,
|
|
45
|
+
areEllipsisActive = true,
|
|
44
46
|
...props
|
|
45
47
|
}: TagProps) => {
|
|
46
48
|
const tagCustomColor = customColor ? colord(customColor) : undefined;
|
|
@@ -105,15 +107,17 @@ export const Tag = ({
|
|
|
105
107
|
<Tooltip
|
|
106
108
|
tooltipDescription={tooltipText ?? text}
|
|
107
109
|
arrow
|
|
108
|
-
isTooltipActive={isEllipsisActive}
|
|
110
|
+
isTooltipActive={areEllipsisActive ? isEllipsisActive : false}
|
|
109
111
|
>
|
|
110
112
|
<div
|
|
111
113
|
{...props}
|
|
112
114
|
id={id}
|
|
113
115
|
style={{ backgroundColor: customColor }}
|
|
114
|
-
className={`${
|
|
115
|
-
|
|
116
|
-
} ${
|
|
116
|
+
className={`${
|
|
117
|
+
areEllipsisActive ? styles.tag_ellipsis : styles.tag
|
|
118
|
+
} ${getTagStatus()} ${getTagSize()} ${className ?? ''} ${
|
|
119
|
+
canBeRemoved && styles.canBeRemoved
|
|
120
|
+
}`}
|
|
117
121
|
>
|
|
118
122
|
{iconLeft &&
|
|
119
123
|
React.cloneElement(iconLeft, {
|
|
@@ -5,7 +5,7 @@ import { Text, Button } from '../..';
|
|
|
5
5
|
interface SelfProtocolTaskContainerProps {
|
|
6
6
|
smallTitle?: string;
|
|
7
7
|
mainTitle: string;
|
|
8
|
-
description
|
|
8
|
+
description?: string;
|
|
9
9
|
ctaText: string;
|
|
10
10
|
buttonIcon?: JSX.Element;
|
|
11
11
|
onClick: () => void;
|
|
@@ -34,7 +34,7 @@ const SelfProtocolTaskContainer: React.FC<SelfProtocolTaskContainerProps> = ({
|
|
|
34
34
|
>
|
|
35
35
|
{smallTitle && <Text text={smallTitle} size="xs" />}
|
|
36
36
|
<Text text={mainTitle} weight="bold" size="base" />
|
|
37
|
-
<Text text={description} size="sm" />
|
|
37
|
+
{description && <Text text={description} size="sm" />}
|
|
38
38
|
<Button
|
|
39
39
|
id={buttonId}
|
|
40
40
|
text={ctaText}
|
|
@@ -254,7 +254,12 @@ export const MultiSelect = ({
|
|
|
254
254
|
}}
|
|
255
255
|
renderOption={(props, option, { selected }) => {
|
|
256
256
|
return (
|
|
257
|
-
<li
|
|
257
|
+
<li
|
|
258
|
+
{...props}
|
|
259
|
+
id={option.value}
|
|
260
|
+
key={`${props.id}`}
|
|
261
|
+
style={{ gap: '0.5rem' }}
|
|
262
|
+
>
|
|
258
263
|
<Checkbox checked={selected} onChange={() => null} />
|
|
259
264
|
<TextForButton text={option.label} size="sm" />
|
|
260
265
|
</li>
|
|
@@ -276,7 +276,12 @@ export const MultiSelectWithCategories = ({
|
|
|
276
276
|
}}
|
|
277
277
|
renderOption={(props, option, { selected }) => {
|
|
278
278
|
return (
|
|
279
|
-
<li
|
|
279
|
+
<li
|
|
280
|
+
{...props}
|
|
281
|
+
id={option.value}
|
|
282
|
+
key={`${props.id}`}
|
|
283
|
+
style={{ gap: '0.5rem' }}
|
|
284
|
+
>
|
|
280
285
|
<Checkbox checked={selected} onChange={() => null} />
|
|
281
286
|
<TextForButton text={option.label} size="sm" />
|
|
282
287
|
</li>
|
|
@@ -227,7 +227,7 @@ export const SingleSelect = ({
|
|
|
227
227
|
className={`${styles.newAutocomplete}`}
|
|
228
228
|
renderOption={(props, option) => {
|
|
229
229
|
return (
|
|
230
|
-
<li {...props} key={option.value}>
|
|
230
|
+
<li {...props} key={option.value} id={option.value}>
|
|
231
231
|
<TextForButton text={option.label} size="sm" />
|
|
232
232
|
</li>
|
|
233
233
|
);
|