odaptos_design_system 2.0.63 → 2.0.65

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.63",
2
+ "version": "2.0.65",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -24,6 +24,7 @@ interface TagProps extends HTMLAttributes<HTMLDivElement> {
24
24
  customColor?: string;
25
25
  className?: string;
26
26
  canBeRemoved?: boolean;
27
+ tooltipText?: string;
27
28
  }
28
29
 
29
30
  /** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=1359-33355&mode=dev */
@@ -37,6 +38,7 @@ export const Tag = ({
37
38
  customColor,
38
39
  className,
39
40
  canBeRemoved = false,
41
+ tooltipText,
40
42
  ...props
41
43
  }: TagProps) => {
42
44
  const tagCustomColor = customColor ? colord(customColor) : undefined;
@@ -98,7 +100,11 @@ export const Tag = ({
98
100
  }, []);
99
101
 
100
102
  return (
101
- <Tooltip tooltipDescription={text} arrow isTooltipActive={isEllipsisActive}>
103
+ <Tooltip
104
+ tooltipDescription={tooltipText ?? text}
105
+ arrow
106
+ isTooltipActive={isEllipsisActive}
107
+ >
102
108
  <div
103
109
  {...props}
104
110
  style={{ backgroundColor: customColor }}
@@ -11,7 +11,6 @@
11
11
  margin: unset;
12
12
  a {
13
13
  color: var(--color-primary-500, #07f);
14
- margin-left: 0.5rem;
15
14
  }
16
15
  }
17
16
 
@@ -10,8 +10,6 @@ interface TextWithLinkProps extends HTMLAttributes<HTMLParagraphElement> {
10
10
  italic?: boolean;
11
11
  textDecoration?: 'underline' | 'line-through';
12
12
  className?: string;
13
- textLink: string;
14
- link: string;
15
13
  isExternalLink?: boolean;
16
14
  }
17
15
 
@@ -24,8 +22,6 @@ export const TextWithLink = ({
24
22
  italic = false,
25
23
  textDecoration,
26
24
  className,
27
- textLink,
28
- link,
29
25
  isExternalLink = true,
30
26
  ...props
31
27
  }: TextWithLinkProps) => {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { InputAdornment, TextField } from '@mui/material';
3
3
  import styles from './TextInput.modules.scss';
4
4
  import { styled } from '@mui/material/styles';
5
- import { Text, colors } from '../../';
5
+ import { Text, TextWithLink, colors } from '../../';
6
6
 
7
7
  const CssTextField = styled(TextField)({
8
8
  '& .MuiInputBase-input': {
@@ -244,7 +244,11 @@ export const TextInput = (props: InputProps) => {
244
244
  />
245
245
  )}
246
246
  {helperText && (
247
- <Text size="xs" text={helperText} className={styles.text_below} />
247
+ <TextWithLink
248
+ size="xs"
249
+ text={helperText}
250
+ className={styles.text_below}
251
+ />
248
252
  )}
249
253
  </div>
250
254
  );
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { TextInput, Text } from '../../';
2
+ import { TextInput, Text, TextWithLink } from '../../';
3
3
 
4
4
  import styles from './Textarea.module.scss';
5
5
 
@@ -91,7 +91,9 @@ export const Textarea = ({
91
91
  minRows={minRows}
92
92
  />
93
93
  <div className={styles.helperTexts}>
94
- {helperText && <Text text={helperText} size="xs" weight="regular" />}
94
+ {helperText && (
95
+ <TextWithLink text={helperText} size="xs" weight="regular" />
96
+ )}
95
97
  {errorText && error && (
96
98
  <Text text={errorText} size="xs" weight="regular" color="#F54C4C" />
97
99
  )}