@react-ui-org/react-ui 0.55.1 → 0.56.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/.nvmrc +1 -1
  2. package/dist/react-ui.css +16 -21
  3. package/dist/react-ui.development.css +18 -37
  4. package/dist/react-ui.development.js +101 -91
  5. package/dist/react-ui.js +1 -1
  6. package/package.json +41 -39
  7. package/src/components/Alert/Alert.jsx +1 -1
  8. package/src/components/Alert/README.md +5 -4
  9. package/src/components/Badge/Badge.jsx +1 -1
  10. package/src/components/Badge/README.md +5 -4
  11. package/src/components/Button/Button.jsx +1 -1
  12. package/src/components/Button/README.md +20 -18
  13. package/src/components/Button/_base.scss +1 -4
  14. package/src/components/ButtonGroup/ButtonGroup.jsx +1 -1
  15. package/src/components/ButtonGroup/README.md +5 -4
  16. package/src/components/Card/Card.jsx +1 -1
  17. package/src/components/Card/CardBody.jsx +1 -1
  18. package/src/components/Card/CardFooter.jsx +1 -1
  19. package/src/components/Card/README.md +5 -4
  20. package/src/components/CheckboxField/CheckboxField.jsx +2 -2
  21. package/src/components/CheckboxField/README.md +8 -4
  22. package/src/components/FileInputField/FileInputField.jsx +3 -3
  23. package/src/components/FileInputField/README.md +8 -4
  24. package/src/components/FormLayout/FormLayout.jsx +1 -1
  25. package/src/components/FormLayout/FormLayoutCustomField.jsx +1 -1
  26. package/src/components/FormLayout/README.md +5 -4
  27. package/src/components/Grid/Grid.jsx +1 -1
  28. package/src/components/Grid/Grid.module.scss +2 -4
  29. package/src/components/Grid/GridSpan.jsx +1 -1
  30. package/src/components/Grid/README.md +6 -4
  31. package/src/components/Grid/_settings.scss +2 -2
  32. package/src/components/InputGroup/InputGroup.jsx +2 -2
  33. package/src/components/InputGroup/README.md +5 -4
  34. package/src/components/Modal/Modal.jsx +1 -1
  35. package/src/components/Modal/Modal.module.scss +1 -1
  36. package/src/components/Modal/ModalBody.jsx +1 -1
  37. package/src/components/Modal/ModalCloseButton.jsx +1 -1
  38. package/src/components/Modal/ModalContent.jsx +1 -1
  39. package/src/components/Modal/ModalFooter.jsx +1 -1
  40. package/src/components/Modal/ModalHeader.jsx +2 -4
  41. package/src/components/Modal/ModalTitle.jsx +2 -4
  42. package/src/components/Modal/README.md +3 -2
  43. package/src/components/Paper/Paper.jsx +1 -1
  44. package/src/components/Paper/README.md +5 -4
  45. package/src/components/Popover/Popover.jsx +1 -1
  46. package/src/components/Popover/PopoverWrapper.jsx +1 -1
  47. package/src/components/Popover/README.md +5 -4
  48. package/src/components/Radio/README.md +8 -4
  49. package/src/components/Radio/Radio.jsx +2 -2
  50. package/src/components/ScrollView/README.md +5 -4
  51. package/src/components/ScrollView/ScrollView.jsx +1 -1
  52. package/src/components/ScrollView/ScrollView.module.scss +2 -4
  53. package/src/components/SelectField/README.md +8 -4
  54. package/src/components/SelectField/SelectField.jsx +2 -2
  55. package/src/components/Table/README.md +5 -4
  56. package/src/components/Table/Table.jsx +1 -1
  57. package/src/components/Tabs/README.md +3 -2
  58. package/src/components/Tabs/Tabs.jsx +1 -1
  59. package/src/components/Tabs/TabsItem.jsx +1 -1
  60. package/src/components/Text/README.md +3 -2
  61. package/src/components/Text/Text.jsx +1 -1
  62. package/src/components/TextArea/README.md +8 -4
  63. package/src/components/TextArea/TextArea.jsx +2 -2
  64. package/src/components/TextField/README.md +8 -4
  65. package/src/components/TextField/TextField.jsx +2 -2
  66. package/src/components/TextLink/README.md +5 -4
  67. package/src/components/TextLink/TextLink.jsx +1 -1
  68. package/src/components/Toggle/README.md +8 -4
  69. package/src/components/Toggle/Toggle.jsx +2 -2
  70. package/src/components/Toolbar/README.md +5 -4
  71. package/src/components/Toolbar/Toolbar.jsx +1 -1
  72. package/src/components/Toolbar/ToolbarGroup.jsx +1 -1
  73. package/src/components/Toolbar/ToolbarItem.jsx +1 -1
  74. package/src/index.js +1 -0
  75. package/src/provider/RUIProvider.jsx +6 -3
  76. package/src/styles/tools/form-fields/_box-field-layout.scss +1 -2
  77. package/src/styles/tools/form-fields/_inline-field-layout.scss +1 -0
  78. package/src/utils/mergeDeep.js +28 -0
  79. package/src/{components/_helpers → utils}/transferProps.js +0 -8
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-ui-org/react-ui",
3
3
  "description": "React UI is a themeable UI library for React apps.",
4
- "version": "0.55.1",
4
+ "version": "0.56.0",
5
5
  "keywords": [
6
6
  "react",
7
7
  "ui",
@@ -29,8 +29,7 @@
29
29
  "url": "https://github.com/react-ui-org/react-ui"
30
30
  },
31
31
  "engines": {
32
- "node": ">=18",
33
- "npm": ">=9"
32
+ "node": ">=20"
34
33
  },
35
34
  "scripts": {
36
35
  "build": "webpack --mode=production && webpack --mode=development",
@@ -54,54 +53,57 @@
54
53
  },
55
54
  "peerDependencies": {
56
55
  "prop-types": "^15.8.0",
57
- "react": "^18.0.0",
58
- "react-dom": "^18.0.0"
56
+ "react": "~18.2.0",
57
+ "react-dom": "~18.2.0"
59
58
  },
60
59
  "devDependencies": {
61
- "@babel/cli": "^7.22.10",
62
- "@babel/core": "^7.22.11",
63
- "@babel/eslint-parser": "^7.22.11",
60
+ "@babel/cli": "^7.24.7",
61
+ "@babel/core": "^7.24.7",
62
+ "@babel/eslint-parser": "^7.24.7",
64
63
  "@babel/plugin-proposal-class-properties": "^7.18.6",
65
- "@babel/plugin-transform-spread": "^7.22.5",
66
- "@babel/preset-env": "^7.22.14",
67
- "@babel/preset-react": "^7.22.5",
68
- "@babel/register": "^7.22.5",
64
+ "@babel/plugin-transform-spread": "^7.24.7",
65
+ "@babel/preset-env": "^7.24.7",
66
+ "@babel/preset-react": "^7.24.7",
67
+ "@babel/register": "^7.24.6",
68
+ "@stylistic/stylelint-config": "^1.0.1",
69
69
  "@svgr/webpack": "^8.1.0",
70
- "@testing-library/jest-dom": "^6.1.2",
71
- "@testing-library/react": "^14.0.0",
72
- "@testing-library/user-event": "^14.4.3",
70
+ "@testing-library/jest-dom": "^6.4.6",
71
+ "@testing-library/react": "^16.0.0",
72
+ "@testing-library/user-event": "^14.5.2",
73
73
  "@visionappscz/eslint-config-visionapps": "^1.7.0",
74
- "@visionappscz/stylelint-config": "^3.0.0",
75
- "autoprefixer": "^10.4.15",
76
- "babel-jest": "^29.6.4",
74
+ "@visionappscz/stylelint-config": "^4.0.0-beta1",
75
+ "autoprefixer": "^10.4.19",
76
+ "babel-jest": "^29.7.0",
77
77
  "babel-loader": "^9.1.3",
78
- "core-js": "^3.32.1",
79
- "css-loader": "^6.10.0",
80
- "eslint": "^8.48.0",
78
+ "core-js": "^3.37.1",
79
+ "css-loader": "^7.1.2",
80
+ "eslint": "^8.57.0",
81
81
  "eslint-config-airbnb": "^19.0.4",
82
- "eslint-plugin-import": "^2.28.1",
83
- "eslint-plugin-jsx-a11y": "^6.7.1",
82
+ "eslint-plugin-import": "^2.29.1",
83
+ "eslint-plugin-jsx-a11y": "^6.9.0",
84
84
  "eslint-plugin-markdown": "^3.0.1",
85
- "eslint-plugin-react": "^7.33.2",
86
- "eslint-plugin-react-hooks": "^4.6.0",
85
+ "eslint-plugin-react": "^7.34.3",
86
+ "eslint-plugin-react-hooks": "^4.6.2",
87
87
  "identity-obj-proxy": "^3.0.0",
88
- "jest": "^29.6.4",
89
- "jest-environment-jsdom": "^29.6.4",
90
- "markdownlint-cli2": "~0.9.2",
91
- "mini-css-extract-plugin": "^2.7.6",
92
- "postcss": "^8.4.29",
93
- "postcss-loader": "^7.3.3",
88
+ "jest": "^29.7.0",
89
+ "jest-environment-jsdom": "^29.7.0",
90
+ "markdownlint-cli2": "^0.13.0",
91
+ "mini-css-extract-plugin": "^2.9.0",
92
+ "postcss": "^8.4.39",
93
+ "postcss-loader": "^8.1.1",
94
94
  "prop-types": "^15.8.1",
95
- "sass": "^1.66.1",
96
- "sass-loader": "^13.3.2",
97
- "stylelint": "^14.16.1",
98
- "stylelint-webpack-plugin": "^4.1.1",
99
- "terser-webpack-plugin": "^5.3.9",
100
- "webpack": "^5.69.1",
95
+ "react": "~18.2.0",
96
+ "react-dom": "~18.2.0",
97
+ "sass": "^1.77.6",
98
+ "sass-loader": "^14.2.1",
99
+ "stylelint": "^16.7.0",
100
+ "stylelint-webpack-plugin": "^5.0.1",
101
+ "terser-webpack-plugin": "^5.3.10",
102
+ "webpack": "^5.92.1",
101
103
  "webpack-cli": "^5.1.4",
102
- "webpack-visualizer-plugin2": "^1.0.0"
104
+ "webpack-visualizer-plugin2": "^1.1.0"
103
105
  },
104
106
  "resolutions": {
105
- "@babel/plugin-transform-spread": "7.12.1"
107
+ "@babel/plugin-transform-spread": "7.24.7"
106
108
  }
107
109
  }
@@ -4,8 +4,8 @@ import {
4
4
  RUIContext,
5
5
  withGlobalProps,
6
6
  } from '../../provider';
7
- import { transferProps } from '../_helpers/transferProps';
8
7
  import { classNames } from '../../utils/classNames';
8
+ import { transferProps } from '../../utils/transferProps';
9
9
  import { getRootColorClassName } from '../_helpers/getRootColorClassName';
10
10
  import styles from './Alert.module.scss';
11
11
 
@@ -171,10 +171,11 @@ React.createElement(() => {
171
171
  ## Forwarding HTML Attributes
172
172
 
173
173
  In addition to the options below in the [component's API](#api) section, you
174
- can specify **any HTML attribute you like.** All attributes that don't interfere
175
- with the API of the React component are forwarded to the root `<div>` HTML
176
- element. This enables making the component interactive and helps to improve
177
- its accessibility.
174
+ can specify **any HTML attribute you like.** All attributes that don't
175
+ interfere with the API of the React component and that aren't filtered out by
176
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
177
+ root `<div>` HTML element. This enables making the component interactive and
178
+ helps to improve its accessibility.
178
179
 
179
180
  👉 For the full list of supported attributes refer to:
180
181
 
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
- import { transferProps } from '../_helpers/transferProps';
5
4
  import { classNames } from '../../utils/classNames';
5
+ import { transferProps } from '../../utils/transferProps';
6
6
  import { getRootColorClassName } from '../_helpers/getRootColorClassName';
7
7
  import styles from './Badge.module.scss';
8
8
 
@@ -87,10 +87,11 @@ Medium-emphasis priority to provide additional context in an unobtrusive way.
87
87
  ## Forwarding HTML Attributes
88
88
 
89
89
  In addition to the options below in the [component's API](#api) section, you
90
- can specify **any HTML attribute you like.** All attributes that don't interfere
91
- with the API of the React component are forwarded to the root `<div>` HTML
92
- element. This enables making the component interactive and helps to improve
93
- its accessibility.
90
+ can specify **any HTML attribute you like.** All attributes that don't
91
+ interfere with the API of the React component and that aren't filtered out by
92
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
93
+ root `<div>` HTML element. This enables making the component interactive and
94
+ helps to improve its accessibility.
94
95
 
95
96
  👉 For the full list of supported attributes refer to:
96
97
 
@@ -2,10 +2,10 @@ import PropTypes from 'prop-types';
2
2
  import React, { useContext } from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
4
  import { classNames } from '../../utils/classNames';
5
+ import { transferProps } from '../../utils/transferProps';
5
6
  import { getRootColorClassName } from '../_helpers/getRootColorClassName';
6
7
  import { getRootSizeClassName } from '../_helpers/getRootSizeClassName';
7
8
  import { resolveContextOrProp } from '../_helpers/resolveContextOrProp';
8
- import { transferProps } from '../_helpers/transferProps';
9
9
  import { ButtonGroupContext } from '../ButtonGroup';
10
10
  import { InputGroupContext } from '../InputGroup/InputGroupContext';
11
11
  import getRootPriorityClassName from '../_helpers/getRootPriorityClassName';
@@ -23,10 +23,13 @@ See [API](#api) for all available options.
23
23
  - Use **short yet comprehensible labels** to make buttons fit small screens.
24
24
 
25
25
  - Since buttons are there to take actions, **use a verb** to make it obvious
26
- what your buttons do.
26
+ what your buttons do.
27
27
 
28
28
  - **Don't overwhelm your UI** with too many high-emphasis actions. There should
29
- always be one but chances are that having more of them is not necessary.
29
+ always be one but chances are that having more of them is not necessary.
30
+
31
+ - Ensure the **button action is well recognazible** across your target audience.
32
+ This is especially important when using the button [with an icon only](#icon-buttons).
30
33
 
31
34
  ## Priorities
32
35
 
@@ -144,8 +147,11 @@ before or after the button's label.
144
147
 
145
148
  ### Icon Buttons
146
149
 
147
- For clear and simple actions, buttons can visually consist just of an icon.
148
- Label remains mandatory to keep the button accessible.
150
+ With a common and well-known icon, buttons can visually consist just of an icon.
151
+ Label remains mandatory to keep the button accessible when using assistive
152
+ technologies.
153
+
154
+ 👉 Use `labelVisibility="xs"` to make label always visible.
149
155
 
150
156
  ```docoff-react-preview
151
157
  <Button
@@ -161,6 +167,11 @@ of your choice and display label once you know there is enough room for it.
161
167
  📐 Try resizing your browser to see how label visibility changes.
162
168
 
163
169
  ```docoff-react-preview
170
+ <Button
171
+ label="Label always visible"
172
+ labelVisibility="xs"
173
+ beforeLabel={<rui-icon icon="pencil" />}
174
+ />
164
175
  <Button
165
176
  label="Label visible from sm up"
166
177
  labelVisibility="sm"
@@ -181,16 +192,6 @@ of your choice and display label once you know there is enough room for it.
181
192
  labelVisibility="xl"
182
193
  beforeLabel={<rui-icon icon="pencil" />}
183
194
  />
184
- <Button
185
- label="Label visible from x2l up"
186
- labelVisibility="x2l"
187
- beforeLabel={<rui-icon icon="pencil" />}
188
- />
189
- <Button
190
- label="Label visible from x3l up"
191
- labelVisibility="x3l"
192
- beforeLabel={<rui-icon icon="pencil" />}
193
- />
194
195
  ```
195
196
 
196
197
  ## Buttons with Badges
@@ -388,10 +389,11 @@ animation is made.
388
389
  ## Forwarding HTML Attributes
389
390
 
390
391
  In addition to the options below in the [component's API](#api) section, you
391
- can specify **any HTML attribute you like.** All attributes that don't interfere
392
- with the API of the React component are forwarded to the root `<button>` HTML
393
- element. This enables making the component interactive and helps to improve
394
- its accessibility.
392
+ can specify **any HTML attribute you like.** All attributes that don't
393
+ interfere with the API of the React component and that aren't filtered out by
394
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
395
+ root `<button>` HTML element. This enables making the component interactive and
396
+ helps to improve its accessibility.
395
397
 
396
398
  👉 For the full list of supported attributes refer to:
397
399
 
@@ -45,10 +45,7 @@
45
45
 
46
46
  .feedbackIcon {
47
47
  position: absolute;
48
- top: 0;
49
- right: 0;
50
- bottom: 0;
51
- left: 0;
48
+ inset: 0;
52
49
  z-index: 1;
53
50
  align-items: center;
54
51
  }
@@ -4,9 +4,9 @@ import React, {
4
4
  } from 'react';
5
5
  import { withGlobalProps } from '../../provider';
6
6
  import { classNames } from '../../utils/classNames';
7
+ import { transferProps } from '../../utils/transferProps';
7
8
  import getRootPriorityClassName from '../_helpers/getRootPriorityClassName';
8
9
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
9
- import { transferProps } from '../_helpers/transferProps';
10
10
  import styles from './ButtonGroup.module.scss';
11
11
  import { ButtonGroupContext } from './ButtonGroupContext';
12
12
 
@@ -249,10 +249,11 @@ and communicating the state of individual options.
249
249
  ## Forwarding HTML Attributes
250
250
 
251
251
  In addition to the options below in the [component's API](#api) section, you
252
- can specify **any HTML attribute you like.** All attributes that don't interfere
253
- with the API of the React component are forwarded to the root `<div>` HTML
254
- element. This enables making the component interactive and helps to improve
255
- its accessibility.
252
+ can specify **any HTML attribute you like.** All attributes that don't
253
+ interfere with the API of the React component and that aren't filtered out by
254
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
255
+ root `<div>` HTML element. This enables making the component interactive and
256
+ helps to improve its accessibility.
256
257
 
257
258
  👉 For the full list of supported attributes refer to:
258
259
 
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
- import { transferProps } from '../_helpers/transferProps';
5
4
  import { classNames } from '../../utils/classNames';
5
+ import { transferProps } from '../../utils/transferProps';
6
6
  import { getRootColorClassName } from '../_helpers/getRootColorClassName';
7
7
  import styles from './Card.module.scss';
8
8
 
@@ -1,7 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
- import { transferProps } from '../_helpers/transferProps';
4
+ import { transferProps } from '../../utils/transferProps';
5
5
  import styles from './Card.module.scss';
6
6
 
7
7
  export const CardBody = ({
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
+ import { transferProps } from '../../utils/transferProps';
4
5
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
5
- import { transferProps } from '../_helpers/transferProps';
6
6
  import styles from './Card.module.scss';
7
7
 
8
8
  export const CardFooter = ({
@@ -255,10 +255,11 @@ its interactive elements to disallow user's interaction.
255
255
  ## Forwarding HTML Attributes
256
256
 
257
257
  In addition to the options below in the [component's API](#api) section, you
258
- can specify **any HTML attribute you like.** All attributes that don't interfere
259
- with the API of the React component are forwarded to the root `<div>` HTML
260
- element. This enables making the component interactive and helps to improve
261
- its accessibility.
258
+ can specify **any HTML attribute you like.** All attributes that don't
259
+ interfere with the API of the React component and that aren't filtered out by
260
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
261
+ root `<div>` HTML element. This enables making the component interactive and
262
+ helps to improve its accessibility.
262
263
 
263
264
  👉 For the full list of supported attributes refer to:
264
265
 
@@ -2,8 +2,8 @@ import PropTypes from 'prop-types';
2
2
  import React, { useContext } from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
4
  import { classNames } from '../../utils/classNames';
5
+ import { transferProps } from '../../utils/transferProps';
5
6
  import { getRootValidationStateClassName } from '../_helpers/getRootValidationStateClassName';
6
- import { transferProps } from '../_helpers/transferProps';
7
7
  import { FormLayoutContext } from '../FormLayout';
8
8
  import styles from './CheckboxField.module.scss';
9
9
 
@@ -114,7 +114,7 @@ CheckboxField.propTypes = {
114
114
  /**
115
115
  * Checkbox field label.
116
116
  */
117
- label: PropTypes.string.isRequired,
117
+ label: PropTypes.node.isRequired,
118
118
  /**
119
119
  * Placement of the label relative to the input.
120
120
  */
@@ -45,6 +45,9 @@ See [API](#api) for all available options.
45
45
  send me any emails” which would mean that the user needs to turn the
46
46
  checkbox **on** in order for something **not** to happen.
47
47
 
48
+ - **Use text labels** unless it is necessary to wrap text label into
49
+ Popover-like to component to provide additional info about the field.
50
+
48
51
  - Only make the CheckboxField's label invisible when there is **another visual
49
52
  clue** to guide users through toggling the input.
50
53
 
@@ -172,10 +175,11 @@ Disabled state makes the input unavailable.
172
175
  ## Forwarding HTML Attributes
173
176
 
174
177
  In addition to the options below in the [component's API](#api) section, you
175
- can specify **any HTML attribute you like.** All attributes that don't interfere
176
- with the API of the React component are forwarded to the root `<input>` HTML
177
- element. This enables making the component interactive and helps to improve
178
- its accessibility.
178
+ can specify **any HTML attribute you like.** All attributes that don't
179
+ interfere with the API of the React component and that aren't filtered out by
180
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
181
+ `<input>` HTML element. This enables making the component interactive and helps
182
+ to improve its accessibility.
179
183
 
180
184
  👉 For the full list of supported attributes refer to:
181
185
 
@@ -2,9 +2,9 @@ import PropTypes from 'prop-types';
2
2
  import React, { useContext } from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
4
  import { classNames } from '../../utils/classNames';
5
+ import { transferProps } from '../../utils/transferProps';
5
6
  import { getRootValidationStateClassName } from '../_helpers/getRootValidationStateClassName';
6
7
  import { resolveContextOrProp } from '../_helpers/resolveContextOrProp';
7
- import { transferProps } from '../_helpers/transferProps';
8
8
  import { FormLayoutContext } from '../FormLayout';
9
9
  import styles from './FileInputField.module.scss';
10
10
 
@@ -123,9 +123,9 @@ FileInputField.propTypes = {
123
123
  */
124
124
  isLabelVisible: PropTypes.bool,
125
125
  /**
126
- * Text field label.
126
+ * File input field label.
127
127
  */
128
- label: PropTypes.string.isRequired,
128
+ label: PropTypes.node.isRequired,
129
129
  /**
130
130
  * Layout of the field.
131
131
  *
@@ -27,6 +27,9 @@ See [API](#api) for all available options.
27
27
  polite phrases like _Please attach your file here_. Short labels will help
28
28
  your users accomplish their task faster.
29
29
 
30
+ - **Use text labels** unless it is necessary to wrap text label into
31
+ Popover-like to component to provide additional info about the field.
32
+
30
33
  - Only make the FileInputField's label invisible when there is **another visual
31
34
  clue** to guide users through filling the input.
32
35
 
@@ -156,10 +159,11 @@ It's possible to disable the whole input.
156
159
  ## Forwarding HTML Attributes
157
160
 
158
161
  In addition to the options below in the [component's API](#api) section, you
159
- can specify **any HTML attribute you like.** All attributes that don't interfere
160
- with the API of the React component are forwarded to the root `<input>` HTML
161
- element. This enables making the component interactive and helps to improve
162
- its accessibility.
162
+ can specify **any HTML attribute you like.** All attributes that don't
163
+ interfere with the API of the React component and that aren't filtered out by
164
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
165
+ `<input>` HTML element. This enables making the component interactive and helps
166
+ to improve its accessibility.
163
167
 
164
168
  ```docoff-react-preview
165
169
  <FileInputField
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React, { useMemo } from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
- import { transferProps } from '../_helpers/transferProps';
5
4
  import { classNames } from '../../utils/classNames';
5
+ import { transferProps } from '../../utils/transferProps';
6
6
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
7
7
  import { FormLayoutContext } from './FormLayoutContext';
8
8
  import styles from './FormLayout.module.scss';
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React, { useContext } from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
- import { transferProps } from '../_helpers/transferProps';
5
4
  import { classNames } from '../../utils/classNames';
5
+ import { transferProps } from '../../utils/transferProps';
6
6
  import { getRootSizeClassName } from '../_helpers/getRootSizeClassName';
7
7
  import { getRootValidationStateClassName } from '../_helpers/getRootValidationStateClassName';
8
8
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
@@ -416,10 +416,11 @@ React.createElement(() => {
416
416
  ## Forwarding HTML Attributes
417
417
 
418
418
  In addition to the options below in the [component's API](#api) section, you
419
- can specify **any HTML attribute you like.** All attributes that don't interfere
420
- with the API of the React component are forwarded to the root `<div>` HTML
421
- element. This enables making the component interactive and helps to improve
422
- its accessibility.
419
+ can specify **any HTML attribute you like.** All attributes that don't
420
+ interfere with the API of the React component and that aren't filtered out by
421
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
422
+ root `<div>` HTML element. This enables making the component interactive and
423
+ helps to improve its accessibility.
423
424
 
424
425
  👉 For the full list of supported attributes refer to:
425
426
 
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
+ import { transferProps } from '../../utils/transferProps';
4
5
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
5
- import { transferProps } from '../_helpers/transferProps';
6
6
  import { generateResponsiveCustomProperties } from './_helpers/generateResponsiveCustomProperties';
7
7
  import styles from './Grid.module.scss';
8
8
 
@@ -35,10 +35,8 @@
35
35
  grid-template-rows: var(--rui-local-rows); // 2.
36
36
  grid-auto-flow: var(--rui-local-auto-flow); // 2.
37
37
  grid-gap: var(--rui-local-row-gap) var(--rui-local-column-gap); // 2.
38
- align-content: var(--rui-local-align-content); // 2.
39
- align-items: var(--rui-local-align-items); // 2.
40
- justify-content: var(--rui-local-justify-content); // 2.
41
- justify-items: var(--rui-local-justify-items); // 2.
38
+ place-content: var(--rui-local-align-content) var(--rui-local-justify-content); // 2.
39
+ place-items: var(--rui-local-align-items) var(--rui-local-justify-items); // 2.
42
40
  }
43
41
 
44
42
  // stylelint-disable-next-line selector-max-universal -- Reset any previously added margins.
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
+ import { transferProps } from '../../utils/transferProps';
4
5
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
5
- import { transferProps } from '../_helpers/transferProps';
6
6
  import { generateResponsiveCustomProperties } from './_helpers/generateResponsiveCustomProperties';
7
7
  import styles from './Grid.module.scss';
8
8
 
@@ -248,10 +248,12 @@ property. Check [MDN][grid-auto-flow] to fully understand available options.
248
248
  ## Forwarding HTML Attributes
249
249
 
250
250
  In addition to the options below in the [component's API](#api) section, you
251
- can specify **any HTML attribute you like.** All attributes that don't interfere
252
- with the API of the React component are forwarded to the root HTML element
253
- of your choice provided by `tag`, which is `<div>` by default. This enables
254
- making the component interactive and helps to improve its accessibility.
251
+ can specify **any HTML attribute you like.** All attributes that don't
252
+ interfere with the API of the React component and that aren't filtered out by
253
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
254
+ root HTML element of your choice provided by `tag`, which is `<div>` by
255
+ default. This enables making the component interactive and helps to improve its
256
+ accessibility.
255
257
 
256
258
  👉 For the full list of supported attributes refer to:
257
259
 
@@ -8,11 +8,11 @@ $grid-responsive-properties: [
8
8
  align-items,
9
9
  justify-content,
10
10
  justify-items,
11
- ]; // stylelint-disable-line indentation -- Broken rule?
11
+ ]; // stylelint-disable-line @stylistic/indentation -- Broken rule?
12
12
 
13
13
  $grid-span-responsive-properties: [
14
14
  column-span,
15
15
  row-span,
16
- ]; // stylelint-disable-line indentation -- Broken rule?
16
+ ]; // stylelint-disable-line @stylistic/indentation -- Broken rule?
17
17
 
18
18
  $initial-fallback-value: initial;
@@ -6,11 +6,11 @@ import React, {
6
6
  import { Text } from '../Text';
7
7
  import { withGlobalProps } from '../../provider';
8
8
  import { classNames } from '../../utils/classNames';
9
+ import { transferProps } from '../../utils/transferProps';
9
10
  import { getRootSizeClassName } from '../_helpers/getRootSizeClassName';
10
11
  import { getRootValidationStateClassName } from '../_helpers/getRootValidationStateClassName';
11
12
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
12
13
  import { resolveContextOrProp } from '../_helpers/resolveContextOrProp';
13
- import { transferProps } from '../_helpers/transferProps';
14
14
  import { FormLayoutContext } from '../FormLayout';
15
15
  import { InputGroupContext } from './InputGroupContext';
16
16
  import styles from './InputGroup.module.scss';
@@ -151,7 +151,7 @@ InputGroup.propTypes = {
151
151
  /**
152
152
  * Input group label.
153
153
  */
154
- label: PropTypes.string.isRequired,
154
+ label: PropTypes.node.isRequired,
155
155
  /**
156
156
  * Layout of the group.
157
157
  *
@@ -250,10 +250,11 @@ for the underlying `<fieldset>` element.
250
250
  ## Forwarding HTML Attributes
251
251
 
252
252
  In addition to the options below in the [component's API](#api) section, you
253
- can specify **any HTML attribute you like.** All attributes that don't interfere
254
- with the API of the React component are forwarded to the root `<fieldset>` HTML
255
- element. This enables making the component interactive and helps to improve
256
- its accessibility.
253
+ can specify **any HTML attribute you like.** All attributes that don't
254
+ interfere with the API of the React component and that aren't filtered out by
255
+ [`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the
256
+ root `<fieldset>` HTML element. This enables making the component interactive
257
+ and helps to improve its accessibility.
257
258
 
258
259
  👉 For the full list of supported attributes refer to:
259
260
 
@@ -2,8 +2,8 @@ import PropTypes from 'prop-types';
2
2
  import React, { useRef } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { withGlobalProps } from '../../provider';
5
- import { transferProps } from '../_helpers/transferProps';
6
5
  import { classNames } from '../../utils/classNames';
6
+ import { transferProps } from '../../utils/transferProps';
7
7
  import { getPositionClassName } from './_helpers/getPositionClassName';
8
8
  import { getSizeClassName } from './_helpers/getSizeClassName';
9
9
  import { useModalFocus } from './_hooks/useModalFocus';
@@ -21,11 +21,11 @@
21
21
  max-width: var(--rui-local-max-width);
22
22
  max-height: var(--rui-local-max-height);
23
23
  overflow-y: auto;
24
- overscroll-behavior: contain;
25
24
  border-radius: settings.$border-radius;
26
25
  background: theme.$background;
27
26
  box-shadow: theme.$box-shadow;
28
27
  transform: translateX(-50%);
28
+ overscroll-behavior: contain;
29
29
 
30
30
  @include breakpoint.up(sm) {
31
31
  --rui-local-outer-spacing: #{theme.$outer-spacing-sm};