@axinom/mosaic-ui 0.56.0-rc.6 → 0.56.1
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/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/dist/components/FormElements/BooleanView/BooleanViewField.d.ts.map +1 -1
- package/dist/components/FormElements/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/FormElements/CustomTags/CustomTags.d.ts.map +1 -1
- package/dist/components/FormElements/DateTimeField/DateTimeText.d.ts.map +1 -1
- package/dist/components/FormElements/DynamicDataListControl/DynamicDataListControl.d.ts.map +1 -1
- package/dist/components/FormElements/FileUploadControl/FileUploadControl.d.ts.map +1 -1
- package/dist/components/FormElements/FormElementContainer/FormElementContainer.d.ts +2 -0
- package/dist/components/FormElements/FormElementContainer/FormElementContainer.d.ts.map +1 -1
- package/dist/components/FormElements/ReadOnlyText/ReadOnlyTextField.d.ts +1 -1
- package/dist/components/FormElements/ReadOnlyText/ReadOnlyTextField.d.ts.map +1 -1
- package/dist/components/FormElements/Select/Select.d.ts.map +1 -1
- package/dist/components/FormElements/SingleLineText/SingleLineText.d.ts.map +1 -1
- package/dist/components/FormElements/Tags/Tags.d.ts.map +1 -1
- package/dist/components/FormElements/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/FormElements/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/index.es.js +4 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/components/Accordion/Accordion.scss +5 -0
- package/src/components/Accordion/Accordion.spec.tsx +5 -2
- package/src/components/Accordion/Accordion.tsx +4 -6
- package/src/components/Accordion/AccordionItem/AccordionItem.scss +7 -2
- package/src/components/Accordion/AccordionItem/AccordionItem.tsx +4 -2
- package/src/components/FormElements/BooleanView/BooleanViewField.spec.tsx +4 -4
- package/src/components/FormElements/BooleanView/BooleanViewField.tsx +1 -5
- package/src/components/FormElements/Checkbox/Checkbox.stories.tsx +2 -2
- package/src/components/FormElements/Checkbox/Checkbox.tsx +2 -1
- package/src/components/FormElements/CustomTags/CustomTags.scss +2 -1
- package/src/components/FormElements/CustomTags/CustomTags.tsx +5 -2
- package/src/components/FormElements/DateTimeField/DateTimeText.stories.tsx +2 -2
- package/src/components/FormElements/DateTimeField/DateTimeText.tsx +2 -1
- package/src/components/FormElements/DynamicDataListControl/DynamicDataListControl.tsx +1 -0
- package/src/components/FormElements/FileUploadControl/FileUploadControl.tsx +3 -2
- package/src/components/FormElements/FormElementContainer/FormElementContainer.tsx +5 -1
- package/src/components/FormElements/ReadOnlyText/ReadOnlyTextField.tsx +3 -0
- package/src/components/FormElements/Select/Select.tsx +2 -1
- package/src/components/FormElements/SingleLineText/SingleLineText.tsx +2 -1
- package/src/components/FormElements/Tags/Tags.tsx +2 -1
- package/src/components/FormElements/TextArea/TextArea.tsx +2 -1
- package/src/components/FormElements/ToggleButton/ToggleButton.stories.tsx +1 -1
- package/src/components/FormElements/ToggleButton/ToggleButton.tsx +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-ui",
|
|
3
|
-
"version": "0.56.
|
|
3
|
+
"version": "0.56.1",
|
|
4
4
|
"description": "UI components for building Axinom Mosaic applications",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"build-storybook": "storybook build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@axinom/mosaic-core": "^0.4.29
|
|
35
|
+
"@axinom/mosaic-core": "^0.4.29",
|
|
36
36
|
"@faker-js/faker": "^7.4.0",
|
|
37
37
|
"@geoffcox/react-splitter": "^2.1.2",
|
|
38
38
|
"@mui/base": "5.0.0-beta.40",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"clsx": "^1.1.0",
|
|
41
41
|
"lodash": "^4.17.21",
|
|
42
42
|
"luxon": "^3.3.0",
|
|
43
|
+
"postcss": "^8.4.4",
|
|
43
44
|
"react-beautiful-dnd": "^13.1.1",
|
|
44
45
|
"react-calendar": "^3.3.1",
|
|
45
46
|
"react-content-loader": "^6.0.3",
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
"rimraf": "^3.0.2",
|
|
94
95
|
"rollup": "^2.28.1",
|
|
95
96
|
"rollup-plugin-peer-deps-external": "^2.2.3",
|
|
96
|
-
"rollup-plugin-postcss": "^
|
|
97
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
97
98
|
"rollup-plugin-terser": "^5.3.1",
|
|
98
99
|
"rollup-plugin-typescript2": "^0.29.0",
|
|
99
100
|
"rollup-plugin-visualizer": "^5.8.3",
|
|
@@ -107,5 +108,5 @@
|
|
|
107
108
|
"publishConfig": {
|
|
108
109
|
"access": "public"
|
|
109
110
|
},
|
|
110
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "179ebcd8c0224b20999faaa92ca2078958e8e2cc"
|
|
111
112
|
}
|
|
@@ -85,7 +85,7 @@ describe('Accordion', () => {
|
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
it('displays
|
|
88
|
+
it('displays rotated ChevronRight icon when one or more children are expanded', () => {
|
|
89
89
|
const wrapper = mount(
|
|
90
90
|
<Accordion header={<b>Header</b>}>
|
|
91
91
|
<AccordionItem header={<b>Item 1</b>}>
|
|
@@ -103,6 +103,7 @@ describe('Accordion', () => {
|
|
|
103
103
|
let button = wrapper.find(Button).first();
|
|
104
104
|
|
|
105
105
|
expect(button.prop('icon')).toBe(IconName.ChevronRight);
|
|
106
|
+
expect(button.hasClass('rotated')).toBe(false);
|
|
106
107
|
|
|
107
108
|
const item = wrapper.find(AccordionItem).last();
|
|
108
109
|
|
|
@@ -110,12 +111,14 @@ describe('Accordion', () => {
|
|
|
110
111
|
|
|
111
112
|
button = wrapper.find(Button).first();
|
|
112
113
|
|
|
113
|
-
expect(button.prop('icon')).toBe(IconName.
|
|
114
|
+
expect(button.prop('icon')).toBe(IconName.ChevronRight);
|
|
115
|
+
expect(button.hasClass('rotated')).toBe(true);
|
|
114
116
|
|
|
115
117
|
item.find('button').simulate('click');
|
|
116
118
|
|
|
117
119
|
button = wrapper.find(Button).first();
|
|
118
120
|
|
|
119
121
|
expect(button.prop('icon')).toBe(IconName.ChevronRight);
|
|
122
|
+
expect(button.hasClass('rotated')).toBe(false);
|
|
120
123
|
});
|
|
121
124
|
});
|
|
@@ -95,11 +95,7 @@ export const Accordion: React.FC<AccordionProps> = ({
|
|
|
95
95
|
{header && (
|
|
96
96
|
<div className={clsx(classes.header)} data-test-id="accordion-header">
|
|
97
97
|
<Button
|
|
98
|
-
icon={
|
|
99
|
-
expandAll.isExpanded
|
|
100
|
-
? IconName.ChevronDown
|
|
101
|
-
: IconName.ChevronRight
|
|
102
|
-
}
|
|
98
|
+
icon={IconName.ChevronRight}
|
|
103
99
|
onButtonClicked={() => {
|
|
104
100
|
const updatedState = { ...expanded };
|
|
105
101
|
|
|
@@ -110,7 +106,9 @@ export const Accordion: React.FC<AccordionProps> = ({
|
|
|
110
106
|
setExpanded(updatedState);
|
|
111
107
|
expandAll.toggleExpanded();
|
|
112
108
|
}}
|
|
113
|
-
className={clsx(classes.button
|
|
109
|
+
className={clsx(classes.button, {
|
|
110
|
+
[classes.rotated]: expandAll.isExpanded,
|
|
111
|
+
})}
|
|
114
112
|
buttonContext={ButtonContext.None}
|
|
115
113
|
></Button>
|
|
116
114
|
{header}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
align-items: center;
|
|
7
7
|
background-color: $light-gray;
|
|
8
8
|
margin-top: 4px;
|
|
9
|
-
transition: box-shadow 0.15s ease-in-out 0s;
|
|
10
9
|
height: 50px;
|
|
11
10
|
cursor: pointer;
|
|
12
11
|
color: var(--accordion-item-text-color, $accordion-item-text-color);
|
|
12
|
+
transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0s;
|
|
13
13
|
|
|
14
14
|
&:hover {
|
|
15
15
|
background-color: var(
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
.container {
|
|
32
32
|
overflow: hidden;
|
|
33
|
-
transition: max-height
|
|
33
|
+
transition: max-height 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.expanded {
|
|
@@ -52,9 +52,14 @@
|
|
|
52
52
|
.button {
|
|
53
53
|
svg {
|
|
54
54
|
height: 40%;
|
|
55
|
+
transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
svg * {
|
|
58
59
|
stroke: var(--accordion-item-arrow-color, $accordion-item-arrow-color);
|
|
59
60
|
}
|
|
61
|
+
|
|
62
|
+
&.rotated > svg {
|
|
63
|
+
transform: rotate(90deg);
|
|
64
|
+
}
|
|
60
65
|
}
|
|
@@ -62,8 +62,10 @@ export const AccordionItem: React.FC<AccordionItemProps> = ({
|
|
|
62
62
|
onClick={toggleExpanded}
|
|
63
63
|
>
|
|
64
64
|
<Button
|
|
65
|
-
icon={
|
|
66
|
-
className={classes.button
|
|
65
|
+
icon={IconName.ChevronRight}
|
|
66
|
+
className={clsx(classes.button, {
|
|
67
|
+
[classes.rotated]: isExpanded,
|
|
68
|
+
})}
|
|
67
69
|
buttonContext={ButtonContext.None}
|
|
68
70
|
/>
|
|
69
71
|
{header}
|
|
@@ -20,11 +20,11 @@ describe('BooleanViewField', () => {
|
|
|
20
20
|
|
|
21
21
|
it('displays default true, false label values', () => {
|
|
22
22
|
const wrapper1 = shallow(<BooleanViewField value={true} />);
|
|
23
|
-
const text1 = wrapper1.find('
|
|
23
|
+
const text1 = wrapper1.find('[data-test-id="form-field-value"]');
|
|
24
24
|
expect(text1.text()).toBe('True');
|
|
25
25
|
|
|
26
26
|
const wrapper2 = shallow(<BooleanViewField value={false} />);
|
|
27
|
-
const text2 = wrapper2.find('
|
|
27
|
+
const text2 = wrapper2.find('[data-test-id="form-field-value"]');
|
|
28
28
|
expect(text2.text()).toBe('False');
|
|
29
29
|
});
|
|
30
30
|
|
|
@@ -42,7 +42,7 @@ describe('BooleanViewField', () => {
|
|
|
42
42
|
|
|
43
43
|
const green = wrapper.find('.true');
|
|
44
44
|
const red = wrapper.find('.false');
|
|
45
|
-
const text = wrapper.find('
|
|
45
|
+
const text = wrapper.find('[data-test-id="form-field-value"]');
|
|
46
46
|
|
|
47
47
|
expect(green.exists()).toBe(true);
|
|
48
48
|
expect(red.exists()).toBe(false);
|
|
@@ -63,7 +63,7 @@ describe('BooleanViewField', () => {
|
|
|
63
63
|
|
|
64
64
|
const green = wrapper.find('.true');
|
|
65
65
|
const red = wrapper.find('.false');
|
|
66
|
-
const text = wrapper.find('
|
|
66
|
+
const text = wrapper.find('[data-test-id="form-field-value"]');
|
|
67
67
|
|
|
68
68
|
expect(green.exists()).toBe(false);
|
|
69
69
|
expect(red.exists()).toBe(true);
|
|
@@ -32,11 +32,7 @@ export const BooleanViewField: React.FC<BooleanViewFieldProps> = ({
|
|
|
32
32
|
>
|
|
33
33
|
<div className={clsx(classes.value)}>
|
|
34
34
|
<div className={clsx(value ? classes.true : classes.false)}></div>
|
|
35
|
-
<div
|
|
36
|
-
className={clsx(classes.text)}
|
|
37
|
-
data-test-id="form-field-value"
|
|
38
|
-
data-test-value={value}
|
|
39
|
-
>
|
|
35
|
+
<div data-test-id="form-field-value" data-test-value={value}>
|
|
40
36
|
{value ? trueLabel : falseLabel}
|
|
41
37
|
</div>
|
|
42
38
|
</div>
|
|
@@ -31,9 +31,9 @@ export default meta;
|
|
|
31
31
|
|
|
32
32
|
export const Main: StoryObj<typeof Checkbox> = {
|
|
33
33
|
args: {
|
|
34
|
-
label: '
|
|
34
|
+
label: 'Is Active?',
|
|
35
35
|
tooltipContent: faker.lorem.paragraph(2),
|
|
36
|
-
name: '
|
|
36
|
+
name: 'isActive',
|
|
37
37
|
},
|
|
38
38
|
render: (args) =>
|
|
39
39
|
React.createElement(() => {
|
|
@@ -65,9 +65,10 @@ export const Checkbox: React.FC<CheckboxProps> = ({
|
|
|
65
65
|
className={clsx(classes.container, 'checkbox-container', className)}
|
|
66
66
|
error={errorMsg}
|
|
67
67
|
dataTestFieldType="Checkbox"
|
|
68
|
+
htmlFor={id ?? name}
|
|
68
69
|
>
|
|
69
70
|
<input
|
|
70
|
-
id={id}
|
|
71
|
+
id={id ?? name}
|
|
71
72
|
name={name}
|
|
72
73
|
ref={setReferenceElement as React.LegacyRef<HTMLInputElement>}
|
|
73
74
|
type="checkbox"
|
|
@@ -295,6 +295,7 @@ export const CustomTags: React.FC<CustomTagsProps> = ({
|
|
|
295
295
|
className={clsx(classes.container, 'custom-tags-container', className)}
|
|
296
296
|
error={errorMessage}
|
|
297
297
|
dataTestFieldType="CustomTags"
|
|
298
|
+
htmlFor={id ?? name}
|
|
298
299
|
>
|
|
299
300
|
<div className={clsx(classes.tagsWrapper)} style={styles}>
|
|
300
301
|
<div className={clsx(classes.inputWrapper)}>
|
|
@@ -302,7 +303,7 @@ export const CustomTags: React.FC<CustomTagsProps> = ({
|
|
|
302
303
|
className={clsx({
|
|
303
304
|
[classes.hasError]: errorMessage !== undefined,
|
|
304
305
|
})}
|
|
305
|
-
id={id}
|
|
306
|
+
id={id ?? name}
|
|
306
307
|
name={name}
|
|
307
308
|
ref={textInput}
|
|
308
309
|
value={val}
|
|
@@ -324,7 +325,9 @@ export const CustomTags: React.FC<CustomTagsProps> = ({
|
|
|
324
325
|
onMouseDown={(event) =>
|
|
325
326
|
onSuggestionClickedHandler(event, suggestion)
|
|
326
327
|
}
|
|
327
|
-
className={clsx({
|
|
328
|
+
className={clsx({
|
|
329
|
+
[classes.selected]: cursorPos === idx,
|
|
330
|
+
})}
|
|
328
331
|
>
|
|
329
332
|
{suggestion}
|
|
330
333
|
</li>
|
|
@@ -89,11 +89,12 @@ export const DateTimeText: React.FC<DateTimeTextProps> = ({
|
|
|
89
89
|
className={clsx(classes.container, 'datetime-container', className)}
|
|
90
90
|
error={errorMsg}
|
|
91
91
|
dataTestFieldType="DateTime"
|
|
92
|
+
htmlFor={id ?? name}
|
|
92
93
|
>
|
|
93
94
|
<div className={clsx(classes.inputbutton)} ref={container}>
|
|
94
95
|
<input
|
|
95
96
|
className={clsx({ [classes.hasError]: errorMsg })}
|
|
96
|
-
id={id}
|
|
97
|
+
id={id ?? name}
|
|
97
98
|
name={name}
|
|
98
99
|
type={'text'}
|
|
99
100
|
value={display}
|
|
@@ -30,6 +30,7 @@ export const DynamicDataListControl = <T extends Data>({
|
|
|
30
30
|
{...rest}
|
|
31
31
|
className={clsx('dynamic-data-list-control-container', className)}
|
|
32
32
|
dataTestFieldType="DynamicDataListControl"
|
|
33
|
+
htmlFor={rest.id ?? rest.name}
|
|
33
34
|
>
|
|
34
35
|
<DynamicDataList {...rest} />
|
|
35
36
|
</FormElementContainer>
|
|
@@ -134,6 +134,7 @@ export const FileUploadControl: React.FC<FileUploadProps> = ({
|
|
|
134
134
|
)}
|
|
135
135
|
error={error}
|
|
136
136
|
dataTestFieldType="FileUpload"
|
|
137
|
+
htmlFor={id ?? name}
|
|
137
138
|
>
|
|
138
139
|
<div className={clsx(classes.content)}>
|
|
139
140
|
{dragging && !disabled ? (
|
|
@@ -157,12 +158,12 @@ export const FileUploadControl: React.FC<FileUploadProps> = ({
|
|
|
157
158
|
[classes.fileuploadbutton]: true,
|
|
158
159
|
[classes.disabled]: disabled,
|
|
159
160
|
})}
|
|
160
|
-
htmlFor={id}
|
|
161
|
+
htmlFor={id ?? name}
|
|
161
162
|
>
|
|
162
163
|
<Icons icon={IconName.File} />
|
|
163
164
|
</label>
|
|
164
165
|
<input
|
|
165
|
-
id={id}
|
|
166
|
+
id={id ?? name}
|
|
166
167
|
type="file"
|
|
167
168
|
accept={accept}
|
|
168
169
|
disabled={disabled}
|
|
@@ -16,6 +16,9 @@ export type FormElementContainerProps = BaseFormElement & {
|
|
|
16
16
|
|
|
17
17
|
/** Stick to the top option */
|
|
18
18
|
stickyLabel?: boolean;
|
|
19
|
+
|
|
20
|
+
/** The value of the 'for' attribute of the label */
|
|
21
|
+
htmlFor?: string;
|
|
19
22
|
};
|
|
20
23
|
|
|
21
24
|
/**
|
|
@@ -35,6 +38,7 @@ export const FormElementContainer: React.FC<FormElementContainerProps> = ({
|
|
|
35
38
|
dataTestFieldType,
|
|
36
39
|
inlineMode = false,
|
|
37
40
|
stickyLabel = true,
|
|
41
|
+
htmlFor,
|
|
38
42
|
}) => {
|
|
39
43
|
const heightStyles: CSSProperties = {};
|
|
40
44
|
|
|
@@ -63,7 +67,7 @@ export const FormElementContainer: React.FC<FormElementContainerProps> = ({
|
|
|
63
67
|
)}
|
|
64
68
|
style={heightStyles}
|
|
65
69
|
>
|
|
66
|
-
<label data-test-id="form-field-label">
|
|
70
|
+
<label data-test-id="form-field-label" htmlFor={htmlFor}>
|
|
67
71
|
{label}
|
|
68
72
|
{tooltipContent && (
|
|
69
73
|
<InfoTooltip className={clsx(classes.tooltip)}>
|
|
@@ -27,6 +27,7 @@ export const ReadOnlyTextField = <T,>({
|
|
|
27
27
|
transform,
|
|
28
28
|
className = '',
|
|
29
29
|
hideCopyButton = false,
|
|
30
|
+
id,
|
|
30
31
|
...rest
|
|
31
32
|
}: PropsWithChildren<ReadOnlyTextFieldProps<T>>): JSX.Element => {
|
|
32
33
|
const nonNullableValue = value === null ? '' : value;
|
|
@@ -42,12 +43,14 @@ export const ReadOnlyTextField = <T,>({
|
|
|
42
43
|
{...rest}
|
|
43
44
|
className={clsx('read-only-field-container', className)}
|
|
44
45
|
dataTestFieldType="ReadOnlyText"
|
|
46
|
+
htmlFor={id}
|
|
45
47
|
>
|
|
46
48
|
<div className={clsx(classes.container)}>
|
|
47
49
|
<input
|
|
48
50
|
value={displayValue}
|
|
49
51
|
onChange={noop}
|
|
50
52
|
data-test-id="form-field-value"
|
|
53
|
+
id={id}
|
|
51
54
|
/>
|
|
52
55
|
{!hideCopyButton && (
|
|
53
56
|
<Button
|
|
@@ -86,13 +86,13 @@ export const Select: React.FC<SelectProps> = (props) => {
|
|
|
86
86
|
|
|
87
87
|
return (
|
|
88
88
|
<FormElementContainer
|
|
89
|
-
id={id}
|
|
90
89
|
label={label}
|
|
91
90
|
tooltipContent={tooltipContent}
|
|
92
91
|
inlineMode={inlineMode}
|
|
93
92
|
className={clsx(classes.container, 'select-container', className)}
|
|
94
93
|
error={error}
|
|
95
94
|
dataTestFieldType="Select"
|
|
95
|
+
htmlFor={id ?? name}
|
|
96
96
|
>
|
|
97
97
|
<div
|
|
98
98
|
ref={setAnchorEl}
|
|
@@ -101,6 +101,7 @@ export const Select: React.FC<SelectProps> = (props) => {
|
|
|
101
101
|
>
|
|
102
102
|
<input
|
|
103
103
|
{...getInputProps()}
|
|
104
|
+
id={id ?? name}
|
|
104
105
|
name={name}
|
|
105
106
|
className={clsx({ [classes.hasError]: Boolean(error) })}
|
|
106
107
|
autoFocus={autoFocus}
|
|
@@ -121,11 +121,12 @@ export const SingleLineText: React.FC<SingleLineTextProps> = ({
|
|
|
121
121
|
)}
|
|
122
122
|
error={errorMsg}
|
|
123
123
|
dataTestFieldType="SingleLineText"
|
|
124
|
+
htmlFor={id ?? name}
|
|
124
125
|
>
|
|
125
126
|
<input
|
|
126
127
|
{...inputProps}
|
|
127
128
|
className={clsx({ [classes.hasError]: errorMsg !== undefined })}
|
|
128
|
-
id={id}
|
|
129
|
+
id={id ?? name}
|
|
129
130
|
name={name}
|
|
130
131
|
type={type}
|
|
131
132
|
ref={innerRef}
|
|
@@ -144,11 +144,12 @@ export const Tags = <T,>({
|
|
|
144
144
|
className={clsx(classes.container, 'tags-container', className)}
|
|
145
145
|
error={error}
|
|
146
146
|
dataTestFieldType="Tags"
|
|
147
|
+
htmlFor={id ?? name}
|
|
147
148
|
>
|
|
148
149
|
<div className={clsx(classes.tagsWrapper)}>
|
|
149
150
|
{currentTags.length < tagsOptions.length ? (
|
|
150
151
|
<Select
|
|
151
|
-
id={id}
|
|
152
|
+
id={id ?? name}
|
|
152
153
|
name={`tags-select-${name}`}
|
|
153
154
|
className={clsx({
|
|
154
155
|
[classes.hasError]: error !== undefined,
|
|
@@ -49,10 +49,11 @@ export const TextArea: React.FC<TextAreaProps> = ({
|
|
|
49
49
|
className={clsx(classes.container, 'text-area-container', className)}
|
|
50
50
|
error={errorMsg}
|
|
51
51
|
dataTestFieldType="TextArea"
|
|
52
|
+
htmlFor={id ?? name}
|
|
52
53
|
>
|
|
53
54
|
<textarea
|
|
54
55
|
className={clsx({ [classes.hasError]: errorMsg !== undefined })}
|
|
55
|
-
id={id}
|
|
56
|
+
id={id ?? name}
|
|
56
57
|
name={name}
|
|
57
58
|
value={value ?? ''}
|
|
58
59
|
disabled={disabled}
|
|
@@ -104,8 +104,10 @@ export const ToggleButton: React.FC<ToggleButtonProps> = ({
|
|
|
104
104
|
className,
|
|
105
105
|
)}
|
|
106
106
|
dataTestFieldType="ToggleButton"
|
|
107
|
+
htmlFor={rest.id ?? rest.name}
|
|
107
108
|
>
|
|
108
109
|
<button
|
|
110
|
+
id={rest.id ?? rest.name}
|
|
109
111
|
className={clsx(classes.toggle, {
|
|
110
112
|
[classes.hasConfirm]: confirmation,
|
|
111
113
|
})}
|