@oliasoft-open-source/react-ui-library 2.4.7 → 2.4.8

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "2.4.7",
3
+ "version": "2.4.8",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -76,44 +76,46 @@ const LinkCell = (props) => {
76
76
  const { cell, testId } = props;
77
77
  const { error, warning, tooltip, maxTooltipWidth } = cell;
78
78
  return (
79
- <Tooltip
80
- error={!!error}
81
- warning={!!warning}
82
- text={tooltip || error || warning}
83
- enabled={
84
- (tooltip && isStringNumberOrNode(tooltip)) ||
85
- (error && isStringNumberOrNode(error)) ||
86
- (warning && isStringNumberOrNode(warning)) ||
87
- false
88
- }
89
- maxWidth={maxTooltipWidth}
90
- placement="bottom-center"
91
- >
92
- <div
93
- className={cx(
94
- styles.staticCell,
95
- error ? styles.error : warning ? styles.warning : '',
96
- )}
79
+ <div className={styles.inputWrapper}>
80
+ <Tooltip
81
+ error={!!error}
82
+ warning={!!warning}
83
+ text={tooltip || error || warning}
84
+ enabled={
85
+ (tooltip && isStringNumberOrNode(tooltip)) ||
86
+ (error && isStringNumberOrNode(error)) ||
87
+ (warning && isStringNumberOrNode(warning)) ||
88
+ false
89
+ }
90
+ maxWidth={maxTooltipWidth}
91
+ placement="bottom-center"
97
92
  >
98
- {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
99
- <a
93
+ <div
100
94
  className={cx(
101
- (cell.disabled || disabledContext) && styles.disabledLink,
95
+ styles.staticCellContent,
96
+ error ? styles.error : warning ? styles.warning : '',
102
97
  )}
103
- onClick={
104
- cell.disabled || disabledContext
105
- ? () => {}
106
- : (evt) => {
107
- evt.stopPropagation();
108
- cell.onClick(evt);
109
- }
110
- }
111
- data-testid={testId}
112
98
  >
113
- {cell.value}
114
- </a>
115
- </div>
116
- </Tooltip>
99
+ {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
100
+ <a
101
+ className={cx(
102
+ (cell.disabled || disabledContext) && styles.disabledLink,
103
+ )}
104
+ onClick={
105
+ cell.disabled || disabledContext
106
+ ? () => {}
107
+ : (evt) => {
108
+ evt.stopPropagation();
109
+ cell.onClick(evt);
110
+ }
111
+ }
112
+ data-testid={testId}
113
+ >
114
+ {cell.value}
115
+ </a>
116
+ </div>
117
+ </Tooltip>
118
+ </div>
117
119
  );
118
120
  };
119
121
 
@@ -366,7 +368,9 @@ export const Cell = (props) => {
366
368
  cell.type === 'CheckBox' ? styles.checkBoxCell : '',
367
369
  cell.type === 'Actions' ? styles.actionsCell : '',
368
370
  cell.type === 'Icon' ? styles.iconCell : '',
369
- cell.type === 'Static' || !cell.type ? styles.staticCell : '',
371
+ cell.type === 'Static' || cell.type === 'Link' || !cell.type
372
+ ? styles.staticCell
373
+ : '',
370
374
  cell.hasSort ? styles.sortingCell : null,
371
375
  cellAlignmentStyle,
372
376
  cell.breakWord ? styles.breakWord : '',
@@ -865,7 +865,8 @@ export const tableOverflowing = {
865
865
  testId: 'table-tbody-cell-brown-rice',
866
866
  },
867
867
  {
868
- value: 'Static error',
868
+ type: 'Link',
869
+ value: 'Static error link',
869
870
  error: 'Error message',
870
871
  },
871
872
  ],