@react-ui-org/react-ui 0.60.0 → 0.61.0
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/.env.playwright +9 -0
- package/.env.playwright.dist +9 -0
- package/.eslintrc-ts +40 -0
- package/README.md +18 -1
- package/dist/react-ui.css +1 -1
- package/dist/react-ui.development.css +2 -0
- package/dist/react-ui.development.js +32 -32
- package/dist/react-ui.js +1 -1
- package/jest.config-ts.js +34 -0
- package/package.json +25 -6
- package/playwright-ct.config.ts +68 -0
- package/src/components/Alert/Alert.jsx +2 -2
- package/src/components/Button/Button.jsx +5 -5
- package/src/components/Button/README.md +1 -1
- package/src/components/ButtonGroup/ButtonGroup.jsx +1 -1
- package/src/components/Card/CardFooter.jsx +1 -1
- package/src/components/CheckboxField/CheckboxField.jsx +3 -3
- package/src/components/FileInputField/FileInputField.jsx +13 -5
- package/src/components/FormLayout/FormLayout.jsx +1 -1
- package/src/components/FormLayout/FormLayoutCustomField.jsx +4 -4
- package/src/components/Grid/Grid.jsx +1 -1
- package/src/components/Grid/GridSpan.jsx +1 -1
- package/src/components/InputGroup/InputGroup.jsx +24 -4
- package/src/components/InputGroup/InputGroup.module.scss +2 -1
- package/src/components/InputGroup/README.md +69 -14
- package/src/components/Modal/Modal.jsx +12 -7
- package/src/components/Modal/ModalBody.jsx +1 -1
- package/src/components/Modal/ModalContent.jsx +1 -1
- package/src/components/Popover/Popover.jsx +5 -5
- package/src/components/Radio/Radio.jsx +3 -3
- package/src/components/ScrollView/ScrollView.jsx +3 -3
- package/src/components/SelectField/SelectField.jsx +9 -6
- package/src/components/Table/Table.jsx +1 -1
- package/src/components/Table/_components/TableBodyCell/TableBodyCell.jsx +1 -1
- package/src/components/Table/_components/TableHeaderCell/TableHeaderCell.jsx +1 -1
- package/src/components/Tabs/TabsItem.jsx +3 -3
- package/src/components/Text/Text.jsx +1 -1
- package/src/components/TextArea/TextArea.jsx +3 -3
- package/src/components/TextField/TextField.jsx +11 -8
- package/src/components/Toggle/Toggle.jsx +3 -3
- package/src/components/Toolbar/Toolbar.jsx +1 -1
- package/src/components/Toolbar/ToolbarGroup.jsx +1 -1
- package/src/components/Toolbar/ToolbarItem.jsx +1 -1
- package/src/providers/globalProps/GlobalPropsProvider.jsx +1 -1
- package/src/providers/translations/TranslationsProvider.jsx +1 -1
- package/src/styles/settings/_breakpoints.scss +2 -0
- package/tsconfig.json +27 -0
|
@@ -43,7 +43,7 @@ export const Popover = React.forwardRef((props, ref) => {
|
|
|
43
43
|
getRootAlignmentClassName(placement, styles),
|
|
44
44
|
)}
|
|
45
45
|
ref={ref}
|
|
46
|
-
style={placementStyle ? cleanPlacementStyle(placementStyle) :
|
|
46
|
+
style={placementStyle ? cleanPlacementStyle(placementStyle) : undefined}
|
|
47
47
|
>
|
|
48
48
|
{children}
|
|
49
49
|
<span className={styles.arrow} />
|
|
@@ -51,7 +51,7 @@ export const Popover = React.forwardRef((props, ref) => {
|
|
|
51
51
|
</>
|
|
52
52
|
);
|
|
53
53
|
|
|
54
|
-
if (portalId ===
|
|
54
|
+
if (portalId === undefined) {
|
|
55
55
|
return PopoverEl;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -60,9 +60,9 @@ export const Popover = React.forwardRef((props, ref) => {
|
|
|
60
60
|
|
|
61
61
|
Popover.defaultProps = {
|
|
62
62
|
placement: 'bottom',
|
|
63
|
-
placementStyle:
|
|
64
|
-
popoverTargetId:
|
|
65
|
-
portalId:
|
|
63
|
+
placementStyle: undefined,
|
|
64
|
+
popoverTargetId: undefined,
|
|
65
|
+
portalId: undefined,
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
Popover.propTypes = {
|
|
@@ -113,14 +113,14 @@ export const Radio = ({
|
|
|
113
113
|
|
|
114
114
|
Radio.defaultProps = {
|
|
115
115
|
disabled: false,
|
|
116
|
-
helpText:
|
|
116
|
+
helpText: undefined,
|
|
117
117
|
id: undefined,
|
|
118
118
|
isLabelVisible: true,
|
|
119
119
|
layout: 'vertical',
|
|
120
120
|
renderAsRequired: false,
|
|
121
121
|
required: false,
|
|
122
|
-
validationState:
|
|
123
|
-
validationText:
|
|
122
|
+
validationState: undefined,
|
|
123
|
+
validationText: undefined,
|
|
124
124
|
value: undefined,
|
|
125
125
|
};
|
|
126
126
|
|
|
@@ -297,7 +297,7 @@ ScrollView.defaultProps = {
|
|
|
297
297
|
arrows: false,
|
|
298
298
|
arrowsScrollStep: 200,
|
|
299
299
|
autoScroll: 'off',
|
|
300
|
-
children:
|
|
300
|
+
children: undefined,
|
|
301
301
|
debounce: 50,
|
|
302
302
|
direction: 'vertical',
|
|
303
303
|
endShadowBackground: 'linear-gradient(var(--rui-local-end-shadow-direction), rgba(255 255 255 / 1), rgba(255 255 255 / 0))',
|
|
@@ -305,10 +305,10 @@ ScrollView.defaultProps = {
|
|
|
305
305
|
endShadowSize: '2em',
|
|
306
306
|
id: undefined,
|
|
307
307
|
nextArrowColor: undefined,
|
|
308
|
-
nextArrowElement:
|
|
308
|
+
nextArrowElement: undefined,
|
|
309
309
|
nextArrowInitialOffset: '-0.5rem',
|
|
310
310
|
prevArrowColor: undefined,
|
|
311
|
-
prevArrowElement:
|
|
311
|
+
prevArrowElement: undefined,
|
|
312
312
|
prevArrowInitialOffset: '-0.5rem',
|
|
313
313
|
scrollbar: true,
|
|
314
314
|
shadows: true,
|
|
@@ -109,7 +109,7 @@ export const SelectField = React.forwardRef((props, ref) => {
|
|
|
109
109
|
<div className={styles.bottomLine} />
|
|
110
110
|
)}
|
|
111
111
|
</div>
|
|
112
|
-
{helpText && (
|
|
112
|
+
{(helpText && !inputGroupContext) && (
|
|
113
113
|
<div
|
|
114
114
|
className={styles.helpText}
|
|
115
115
|
id={id && `${id}__helpText`}
|
|
@@ -133,15 +133,15 @@ export const SelectField = React.forwardRef((props, ref) => {
|
|
|
133
133
|
SelectField.defaultProps = {
|
|
134
134
|
disabled: false,
|
|
135
135
|
fullWidth: false,
|
|
136
|
-
helpText:
|
|
136
|
+
helpText: undefined,
|
|
137
137
|
id: undefined,
|
|
138
138
|
isLabelVisible: true,
|
|
139
139
|
layout: 'vertical',
|
|
140
140
|
renderAsRequired: false,
|
|
141
141
|
required: false,
|
|
142
142
|
size: 'medium',
|
|
143
|
-
validationState:
|
|
144
|
-
validationText:
|
|
143
|
+
validationState: undefined,
|
|
144
|
+
validationText: undefined,
|
|
145
145
|
variant: 'outline',
|
|
146
146
|
};
|
|
147
147
|
|
|
@@ -156,6 +156,9 @@ SelectField.propTypes = {
|
|
|
156
156
|
fullWidth: PropTypes.bool,
|
|
157
157
|
/**
|
|
158
158
|
* Optional help text.
|
|
159
|
+
*
|
|
160
|
+
* Help text is never rendered when the component is placed into `InputGroup`.
|
|
161
|
+
* If a help text is needed, it must be defined on the `InputGroup` component instead.
|
|
159
162
|
*/
|
|
160
163
|
helpText: PropTypes.node,
|
|
161
164
|
/**
|
|
@@ -249,8 +252,8 @@ SelectField.propTypes = {
|
|
|
249
252
|
/**
|
|
250
253
|
* Validation message to be displayed.
|
|
251
254
|
*
|
|
252
|
-
* Validation text is never rendered when the component is placed into `InputGroup`.
|
|
253
|
-
*
|
|
255
|
+
* Validation text is never rendered when the component is placed into `InputGroup`.
|
|
256
|
+
* If a validation text is needed, it must be defined on the `InputGroup` component instead.
|
|
254
257
|
*/
|
|
255
258
|
validationText: PropTypes.node,
|
|
256
259
|
/**
|
|
@@ -45,11 +45,11 @@ export const TabsItem = ({
|
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
TabsItem.defaultProps = {
|
|
48
|
-
afterLabel:
|
|
49
|
-
beforeLabel:
|
|
48
|
+
afterLabel: undefined,
|
|
49
|
+
beforeLabel: undefined,
|
|
50
50
|
id: undefined,
|
|
51
51
|
isActive: false,
|
|
52
|
-
onClick:
|
|
52
|
+
onClick: undefined,
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
TabsItem.propTypes = {
|
|
@@ -93,14 +93,14 @@ export const TextArea = React.forwardRef((props, ref) => {
|
|
|
93
93
|
TextArea.defaultProps = {
|
|
94
94
|
disabled: false,
|
|
95
95
|
fullWidth: false,
|
|
96
|
-
helpText:
|
|
96
|
+
helpText: undefined,
|
|
97
97
|
id: undefined,
|
|
98
98
|
isLabelVisible: true,
|
|
99
99
|
layout: 'vertical',
|
|
100
100
|
required: false,
|
|
101
101
|
size: 'medium',
|
|
102
|
-
validationState:
|
|
103
|
-
validationText:
|
|
102
|
+
validationState: undefined,
|
|
103
|
+
validationText: undefined,
|
|
104
104
|
variant: 'outline',
|
|
105
105
|
};
|
|
106
106
|
|
|
@@ -32,7 +32,7 @@ export const TextField = React.forwardRef((props, ref) => {
|
|
|
32
32
|
} = props;
|
|
33
33
|
const formLayoutContext = useContext(FormLayoutContext);
|
|
34
34
|
const inputGroupContext = useContext(InputGroupContext);
|
|
35
|
-
const hasSmallInput = (inputSize !==
|
|
35
|
+
const hasSmallInput = (inputSize !== undefined) && (inputSize <= SMALL_INPUT_SIZE);
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
38
|
<label
|
|
@@ -84,7 +84,7 @@ export const TextField = React.forwardRef((props, ref) => {
|
|
|
84
84
|
<div className={styles.bottomLine} />
|
|
85
85
|
)}
|
|
86
86
|
</div>
|
|
87
|
-
{helpText && (
|
|
87
|
+
{(helpText && !inputGroupContext) && (
|
|
88
88
|
<div
|
|
89
89
|
className={styles.helpText}
|
|
90
90
|
id={id && `${id}__helpText`}
|
|
@@ -108,16 +108,16 @@ export const TextField = React.forwardRef((props, ref) => {
|
|
|
108
108
|
TextField.defaultProps = {
|
|
109
109
|
disabled: false,
|
|
110
110
|
fullWidth: false,
|
|
111
|
-
helpText:
|
|
111
|
+
helpText: undefined,
|
|
112
112
|
id: undefined,
|
|
113
|
-
inputSize:
|
|
113
|
+
inputSize: undefined,
|
|
114
114
|
isLabelVisible: true,
|
|
115
115
|
layout: 'vertical',
|
|
116
116
|
required: false,
|
|
117
117
|
size: 'medium',
|
|
118
118
|
type: 'text',
|
|
119
|
-
validationState:
|
|
120
|
-
validationText:
|
|
119
|
+
validationState: undefined,
|
|
120
|
+
validationText: undefined,
|
|
121
121
|
variant: 'outline',
|
|
122
122
|
};
|
|
123
123
|
|
|
@@ -132,6 +132,9 @@ TextField.propTypes = {
|
|
|
132
132
|
fullWidth: PropTypes.bool,
|
|
133
133
|
/**
|
|
134
134
|
* Optional help text.
|
|
135
|
+
*
|
|
136
|
+
* Help text is never rendered when the component is placed into `InputGroup`.
|
|
137
|
+
* If a help text is needed, it must be defined on the `InputGroup` component instead.
|
|
135
138
|
*/
|
|
136
139
|
helpText: PropTypes.node,
|
|
137
140
|
/**
|
|
@@ -185,8 +188,8 @@ TextField.propTypes = {
|
|
|
185
188
|
/**
|
|
186
189
|
* Validation message to be displayed.
|
|
187
190
|
*
|
|
188
|
-
* Validation text is never rendered when the component is placed into `InputGroup`.
|
|
189
|
-
*
|
|
191
|
+
* Validation text is never rendered when the component is placed into `InputGroup`.
|
|
192
|
+
* If a validation text is needed, it must be defined on the `InputGroup` component instead.
|
|
190
193
|
*/
|
|
191
194
|
validationText: PropTypes.node,
|
|
192
195
|
/**
|
|
@@ -81,14 +81,14 @@ export const Toggle = React.forwardRef((props, ref) => {
|
|
|
81
81
|
|
|
82
82
|
Toggle.defaultProps = {
|
|
83
83
|
disabled: false,
|
|
84
|
-
helpText:
|
|
84
|
+
helpText: undefined,
|
|
85
85
|
id: undefined,
|
|
86
86
|
isLabelVisible: true,
|
|
87
87
|
labelPosition: 'after',
|
|
88
88
|
renderAsRequired: false,
|
|
89
89
|
required: false,
|
|
90
|
-
validationState:
|
|
91
|
-
validationText:
|
|
90
|
+
validationState: undefined,
|
|
91
|
+
validationText: undefined,
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
Toggle.propTypes = {
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
],
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"strict": false,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"module": "esnext",
|
|
17
|
+
"moduleResolution": "node",
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"isolatedModules": true,
|
|
20
|
+
"noEmit": false,
|
|
21
|
+
"jsx": "react-jsx"
|
|
22
|
+
},
|
|
23
|
+
"include": [
|
|
24
|
+
"src",
|
|
25
|
+
"tests"
|
|
26
|
+
]
|
|
27
|
+
}
|