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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.69",
2
+ "version": "2.0.71",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -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;
@@ -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={`${styles.tag} ${getTagStatus()} ${getTagSize()} ${
115
- className ?? ''
116
- } ${canBeRemoved && styles.canBeRemoved}`}
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: string;
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}
@@ -155,7 +155,6 @@ export const SelfProtocolManager = ({
155
155
  key={task._id}
156
156
  smallTitle={getTaskTitle(task)}
157
157
  mainTitle={task.description}
158
- description={task.notes}
159
158
  ctaText={texts.nextTaskCTA}
160
159
  buttonIcon={<SendIcon />}
161
160
  onClick={() => sendTask(task)}
@@ -254,7 +254,12 @@ export const MultiSelect = ({
254
254
  }}
255
255
  renderOption={(props, option, { selected }) => {
256
256
  return (
257
- <li {...props} key={`${props.id}`} style={{ gap: '0.5rem' }}>
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 {...props} key={`${props.id}`} style={{ gap: '0.5rem' }}>
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
  );