@react-ui-org/react-ui 0.60.0 → 0.62.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.
Files changed (52) hide show
  1. package/.env.playwright +9 -0
  2. package/.env.playwright.dist +9 -0
  3. package/.eslintrc-ts +40 -0
  4. package/.nvmrc +1 -1
  5. package/README.md +18 -1
  6. package/dist/react-ui.css +16 -16
  7. package/dist/react-ui.development.css +249 -177
  8. package/dist/react-ui.development.js +477 -477
  9. package/dist/react-ui.js +1 -1
  10. package/jest.config-ts.js +34 -0
  11. package/package.json +53 -37
  12. package/playwright-ct.config.ts +68 -0
  13. package/src/components/Alert/Alert.jsx +2 -2
  14. package/src/components/Button/Button.jsx +5 -5
  15. package/src/components/Button/README.md +1 -1
  16. package/src/components/ButtonGroup/ButtonGroup.jsx +1 -1
  17. package/src/components/Card/CardFooter.jsx +1 -1
  18. package/src/components/CheckboxField/CheckboxField.jsx +3 -3
  19. package/src/components/FileInputField/FileInputField.jsx +13 -5
  20. package/src/components/FormLayout/FormLayout.jsx +1 -1
  21. package/src/components/FormLayout/FormLayoutCustomField.jsx +4 -4
  22. package/src/components/FormLayout/README.md +10 -10
  23. package/src/components/Grid/Grid.jsx +1 -1
  24. package/src/components/Grid/GridSpan.jsx +1 -1
  25. package/src/components/InputGroup/InputGroup.jsx +24 -4
  26. package/src/components/InputGroup/InputGroup.module.scss +2 -1
  27. package/src/components/InputGroup/README.md +69 -14
  28. package/src/components/Modal/Modal.jsx +12 -7
  29. package/src/components/Modal/ModalBody.jsx +1 -1
  30. package/src/components/Modal/ModalContent.jsx +1 -1
  31. package/src/components/Popover/Popover.jsx +5 -5
  32. package/src/components/Radio/README.md +4 -4
  33. package/src/components/Radio/Radio.jsx +3 -3
  34. package/src/components/ScrollView/ScrollView.jsx +3 -3
  35. package/src/components/SelectField/README.md +5 -5
  36. package/src/components/SelectField/SelectField.jsx +9 -6
  37. package/src/components/Table/Table.jsx +1 -1
  38. package/src/components/Table/_components/TableBodyCell/TableBodyCell.jsx +1 -1
  39. package/src/components/Table/_components/TableHeaderCell/TableHeaderCell.jsx +1 -1
  40. package/src/components/Tabs/TabsItem.jsx +3 -3
  41. package/src/components/Text/Text.jsx +1 -1
  42. package/src/components/TextArea/TextArea.jsx +3 -3
  43. package/src/components/TextField/TextField.jsx +11 -8
  44. package/src/components/Toggle/README.md +9 -9
  45. package/src/components/Toggle/Toggle.jsx +3 -3
  46. package/src/components/Toolbar/Toolbar.jsx +1 -1
  47. package/src/components/Toolbar/ToolbarGroup.jsx +1 -1
  48. package/src/components/Toolbar/ToolbarItem.jsx +1 -1
  49. package/src/providers/globalProps/GlobalPropsProvider.jsx +1 -1
  50. package/src/providers/translations/TranslationsProvider.jsx +1 -1
  51. package/src/styles/settings/_breakpoints.scss +2 -0
  52. package/tsconfig.json +27 -0
@@ -60,13 +60,14 @@ See [API](#api) for all available options.
60
60
  Make sure your inputs fit their container, especially on small screens.
61
61
 
62
62
  - In the background, InputGroup uses the [`fieldset`][fieldset] element. Not
63
- only it improves the [accessibility] of the group, it also allows you to make
64
- use of its built-in features like disabling all nested inputs or pairing the
65
- group with a form outside. Consult [the MDN docs][fieldset] to learn more.
63
+ only does it improve the [accessibility] of the group, it also allows you to
64
+ make use of its built-in features like disabling all nested inputs or pairing
65
+ the group with a form outside. Consult [the MDN docs][fieldset] to learn more.
66
66
 
67
67
  - InputGroup currently **supports grouping of**
68
68
  [TextField](/components/TextField), [SelectField](/components/SelectField),
69
- and [Button](/components/Button) components.
69
+ [FileInputField](/components/FileInputField), and [Button](/components/Button)
70
+ components.
70
71
 
71
72
  - To group [Buttons](/components/Button) only, use the
72
73
  [ButtonGroup](/components/ButtonGroup) component which is designed
@@ -104,7 +105,7 @@ You can set the `size` property directly on InputGroup to be shared for all
104
105
  fields and buttons inside the group. This property is then passed over to
105
106
  individual elements. At the same time, it **cannot be overridden** on the
106
107
  fields' or buttons' level. While technically possible, from the design point of
107
- view it's undesirable to group elements of totally different types or sizes.
108
+ view, it's undesirable to group elements of totally different types or sizes.
108
109
 
109
110
  ## Invisible Label
110
111
 
@@ -136,9 +137,9 @@ the input.
136
137
 
137
138
  ## Horizontal layout
138
139
 
139
- The default vertical layout is very easy to use and work with. However, there
140
- are situations where horizontal layout suits better — and that's why React UI
141
- supports this kind of layout as well.
140
+ The default vertical layout is straightforward to use and work with. However,
141
+ there are situations where horizontal layout suits better — and that's why
142
+ React UI supports this kind of layout as well.
142
143
 
143
144
  ```docoff-react-preview
144
145
  <InputGroup
@@ -150,6 +151,57 @@ supports this kind of layout as well.
150
151
  </InputGroup>
151
152
  ```
152
153
 
154
+ ## Help Text
155
+
156
+ You may provide one or more additional help texts to clarify how the input group
157
+ should be filled.
158
+
159
+ These messages are not semantically tied to the `children` elements, the
160
+ connection should be expressed in textual form in the actual message.
161
+
162
+ ⚠️ Help texts passed to input elements' `helpText` prop are ignored within
163
+ InputGroup.
164
+
165
+ ```docoff-react-preview
166
+ React.createElement(() => {
167
+ const [fruit, setFruit] = React.useState('apple');
168
+ const options = [
169
+ {
170
+ label: 'Apple',
171
+ value: 'apple',
172
+ },
173
+ {
174
+ label: 'Pear',
175
+ value: 'pear',
176
+ },
177
+ {
178
+ label: 'Cherry',
179
+ value: 'cherry',
180
+ },
181
+ ];
182
+ return (
183
+ <InputGroup
184
+ label="Your favourite fruit"
185
+ helpTexts={[
186
+ "Choose one or more kinds of fruit to feel happy.",
187
+ ]}
188
+ >
189
+ <SelectField
190
+ label="Your favourite fruit"
191
+ onChange={(e) => setFruit(e.target.value)}
192
+ options={options}
193
+ value={fruit}
194
+ />
195
+ <TextField
196
+ label="Variety"
197
+ placeholder="Eg. Golden delicious"
198
+ />
199
+ <Button label="Submit" />
200
+ </InputGroup>
201
+ );
202
+ })
203
+ ```
204
+
153
205
  ## States
154
206
 
155
207
  ### Disabled State
@@ -169,12 +221,15 @@ Validation states visually present the result of validation of the grouped
169
221
  inputs. Input group's validation state is taken from its child inputs. You
170
222
  should always **provide validation messages for states other than valid**
171
223
  directly through `validationTexts` prop so users know what happened and what
172
- action they should take or what options they have. These messages are not
173
- semantically tied to the `children` elements, the connection should be expressed
174
- in textual form in the actual message. The individual `children` elements must
175
- not show any `validationText`, they only show their respective `validationState`.
176
- Validation messages passed to input elements' `validationText` prop will be
177
- ignored.
224
+ action they should take or what options they have.
225
+
226
+ These messages are not semantically tied to the `children` elements, the
227
+ connection should be expressed in textual form in the actual message. The
228
+ individual `children` elements must not show any `validationText`, they only
229
+ show their respective `validationState`.
230
+
231
+ ⚠️ Validation messages passed to input elements' `validationText` prop are
232
+ ignored within InputGroup.
178
233
 
179
234
  👉 While there is a `required` property to visually denote the whole input group
180
235
  is required, there is no functional effect as there is no such HTML attribute
@@ -76,7 +76,12 @@ export const Modal = ({
76
76
  useModalScrollPrevention(preventScrollUnderneath);
77
77
 
78
78
  const onCancel = useCallback(
79
- (e) => dialogOnCancelHandler(e, closeButtonRef, restProps.onCancel),
79
+ (e) => {
80
+ if (e.target !== internalDialogRef.current) {
81
+ return;
82
+ }
83
+ dialogOnCancelHandler(e, closeButtonRef, restProps.onCancel);
84
+ },
80
85
  [closeButtonRef, restProps.onCancel],
81
86
  );
82
87
  const onClick = useCallback(
@@ -121,7 +126,7 @@ export const Modal = ({
121
126
  onMouseDown,
122
127
  };
123
128
 
124
- if (portalId === null) {
129
+ if (portalId === undefined) {
125
130
  return preRender(
126
131
  children,
127
132
  color,
@@ -152,14 +157,14 @@ Modal.defaultProps = {
152
157
  allowCloseOnEscapeKey: true,
153
158
  allowPrimaryActionOnEnterKey: true,
154
159
  autoFocus: true,
155
- children: null,
156
- closeButtonRef: null,
160
+ children: undefined,
161
+ closeButtonRef: undefined,
157
162
  color: undefined,
158
- dialogRef: null,
159
- portalId: null,
163
+ dialogRef: undefined,
164
+ portalId: undefined,
160
165
  position: 'center',
161
166
  preventScrollUnderneath: window.document.body,
162
- primaryButtonRef: null,
167
+ primaryButtonRef: undefined,
163
168
  size: 'medium',
164
169
  };
165
170
 
@@ -30,7 +30,7 @@ export const ModalBody = ({
30
30
  };
31
31
 
32
32
  ModalBody.defaultProps = {
33
- children: null,
33
+ children: undefined,
34
34
  scrolling: 'auto',
35
35
  };
36
36
 
@@ -24,7 +24,7 @@ export const ModalContent = ({
24
24
  };
25
25
 
26
26
  ModalContent.defaultProps = {
27
- children: null,
27
+ children: undefined,
28
28
  };
29
29
 
30
30
  ModalContent.propTypes = {
@@ -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) : null}
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 === null) {
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: null,
64
- popoverTargetId: null,
65
- portalId: null,
63
+ placementStyle: undefined,
64
+ popoverTargetId: undefined,
65
+ portalId: undefined,
66
66
  };
67
67
 
68
68
  Popover.propTypes = {
@@ -405,10 +405,10 @@ to improve its accessibility.
405
405
  Head to [Forms Theming](/docs/customize/theming/forms) to see shared form theming
406
406
  options. On top of that, the following options are available for Radio.
407
407
 
408
- | Custom Property | Description |
409
- |--------------------------------------------------------------------|------------------------------------------------|
410
- | `--rui-FormField--check__input--radio__border-radius` | Input corner radius |
411
- | `--rui-FormField--check__input--radio--checked__background-image` | Checked input background image (inline, URL, …) |
408
+ | Custom Property | Description |
409
+ |--------------------------------------------------------------------|--------------------------------------------------|
410
+ | `--rui-FormField--check__input--radio__border-radius` | Input corner radius |
411
+ | `--rui-FormField--check__input--radio--checked__background-image` | Checked input background image (inline, URL, …) |
412
412
 
413
413
  [accessibility]: https://www.w3.org/WAI/tutorials/forms/grouping/
414
414
  [fieldset]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset
@@ -113,14 +113,14 @@ export const Radio = ({
113
113
 
114
114
  Radio.defaultProps = {
115
115
  disabled: false,
116
- helpText: null,
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: null,
123
- validationText: null,
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: null,
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: null,
308
+ nextArrowElement: undefined,
309
309
  nextArrowInitialOffset: '-0.5rem',
310
310
  prevArrowColor: undefined,
311
- prevArrowElement: null,
311
+ prevArrowElement: undefined,
312
312
  prevArrowInitialOffset: '-0.5rem',
313
313
  scrollbar: true,
314
314
  shadows: true,
@@ -779,11 +779,11 @@ If you provide [ref], it is forwarded to the native HTML `<select>` element.
779
779
  Head to [Forms Theming](/docs/customize/theming/forms) to see shared form theming
780
780
  options. On top of that, the following options are available for SelectField.
781
781
 
782
- | Custom Property | Description |
783
- |------------------------------------------------------|--------------------------------------------------------------|
784
- | `--rui-FormField--box--select__caret__border-style` | SelectField arrow border style (e.g. `solid`) |
785
- | `--rui-FormField--box--select__caret__background` | SelectField arrow background (including `url()` or gradient) |
786
- | `--rui-FormField--box--select__option--disabled__color` | Text color of disabled SelectField options |
782
+ | Custom Property | Description |
783
+ |---------------------------------------------------------|--------------------------------------------------------------|
784
+ | `--rui-FormField--box--select__caret__border-style` | SelectField arrow border style (e.g. `solid`) |
785
+ | `--rui-FormField--box--select__caret__background` | SelectField arrow background (including `url()` or gradient) |
786
+ | `--rui-FormField--box--select__option--disabled__color` | Text color of disabled SelectField options |
787
787
 
788
788
  [React common props]: https://react.dev/reference/react-dom/components/common#common-props
789
789
  [ref]: https://reactjs.org/docs/refs-and-the-dom.html
@@ -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: null,
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: null,
144
- validationText: null,
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`. Instead, the `InputGroup`
253
- * component itself renders all validation texts of its nested components.
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
  /**
@@ -53,7 +53,7 @@ export const Table = ({
53
53
 
54
54
  Table.defaultProps = {
55
55
  id: undefined,
56
- sort: null,
56
+ sort: undefined,
57
57
  };
58
58
 
59
59
  Table.propTypes = {
@@ -20,7 +20,7 @@ TableBodyCell.defaultProps = {
20
20
  format: undefined,
21
21
  id: undefined,
22
22
  isSortingActive: false,
23
- value: null,
23
+ value: undefined,
24
24
  };
25
25
 
26
26
  TableBodyCell.propTypes = {
@@ -42,7 +42,7 @@ export const TableHeaderCell = ({
42
42
 
43
43
  TableHeaderCell.defaultProps = {
44
44
  id: undefined,
45
- sort: null,
45
+ sort: undefined,
46
46
  };
47
47
 
48
48
  TableHeaderCell.propTypes = {
@@ -45,11 +45,11 @@ export const TabsItem = ({
45
45
  );
46
46
 
47
47
  TabsItem.defaultProps = {
48
- afterLabel: null,
49
- beforeLabel: null,
48
+ afterLabel: undefined,
49
+ beforeLabel: undefined,
50
50
  id: undefined,
51
51
  isActive: false,
52
- onClick: null,
52
+ onClick: undefined,
53
53
  };
54
54
 
55
55
  TabsItem.propTypes = {
@@ -42,7 +42,7 @@ export const Text = ({
42
42
 
43
43
  Text.defaultProps = {
44
44
  blockLevel: false,
45
- children: null,
45
+ children: undefined,
46
46
  hyphens: 'none',
47
47
  lines: undefined,
48
48
  wordWrapping: 'normal',
@@ -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: null,
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: null,
103
- validationText: null,
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 !== null) && (inputSize <= SMALL_INPUT_SIZE);
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: null,
111
+ helpText: undefined,
112
112
  id: undefined,
113
- inputSize: null,
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: null,
120
- validationText: null,
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`. Instead, the `InputGroup`
189
- * component itself renders all validation texts of its nested components.
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
  /**
@@ -277,15 +277,15 @@ If you provide [ref], it is forwarded to the native HTML `<input>` element.
277
277
  Head to [Forms Theming](/docs/customize/theming/forms) to see shared form theming
278
278
  options. On top of that, the following options are available for Toggle.
279
279
 
280
- | Custom Property | Description |
281
- |--------------------------------------------------------------------|------------------------------------------------|
282
- | `--rui-FormField--check__input--toggle__width` | Input width (height is shared with other check fields) |
283
- | `--rui-FormField--check__input--toggle__border-radius` | Input corner radius |
284
- | `--rui-FormField--check__input--toggle__background-size` | Input background size |
285
- | `--rui-FormField--check__input--toggle--default__background-image` | Background image of unchecked input |
286
- | `--rui-FormField--check__input--toggle--default__background-position` | Background position of unchecked input |
287
- | `--rui-FormField--check__input--toggle--checked__background-image` | Background image of checked input |
288
- | `--rui-FormField--check__input--toggle--checked__background-position` | Background position of checked input |
280
+ | Custom Property | Description |
281
+ |-----------------------------------------------------------------------|--------------------------------------------------------|
282
+ | `--rui-FormField--check__input--toggle__width` | Input width (height is shared with other check fields) |
283
+ | `--rui-FormField--check__input--toggle__border-radius` | Input corner radius |
284
+ | `--rui-FormField--check__input--toggle__background-size` | Input background size |
285
+ | `--rui-FormField--check__input--toggle--default__background-image` | Background image of unchecked input |
286
+ | `--rui-FormField--check__input--toggle--default__background-position` | Background position of unchecked input |
287
+ | `--rui-FormField--check__input--toggle--checked__background-image` | Background image of checked input |
288
+ | `--rui-FormField--check__input--toggle--checked__background-position` | Background position of checked input |
289
289
 
290
290
  [checkbox-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#additional_attributes
291
291
  [React common props]: https://react.dev/reference/react-dom/components/common#common-props
@@ -81,14 +81,14 @@ export const Toggle = React.forwardRef((props, ref) => {
81
81
 
82
82
  Toggle.defaultProps = {
83
83
  disabled: false,
84
- helpText: null,
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: null,
91
- validationText: null,
90
+ validationState: undefined,
91
+ validationText: undefined,
92
92
  };
93
93
 
94
94
  Toggle.propTypes = {
@@ -38,7 +38,7 @@ export const Toolbar = ({
38
38
 
39
39
  Toolbar.defaultProps = {
40
40
  align: 'top',
41
- children: null,
41
+ children: undefined,
42
42
  dense: false,
43
43
  justify: 'start',
44
44
  nowrap: false,
@@ -35,7 +35,7 @@ export const ToolbarGroup = ({
35
35
 
36
36
  ToolbarGroup.defaultProps = {
37
37
  align: 'top',
38
- children: null,
38
+ children: undefined,
39
39
  dense: false,
40
40
  nowrap: false,
41
41
  };
@@ -29,7 +29,7 @@ export const ToolbarItem = ({
29
29
  };
30
30
 
31
31
  ToolbarItem.defaultProps = {
32
- children: null,
32
+ children: undefined,
33
33
  flexible: false,
34
34
  };
35
35
 
@@ -21,7 +21,7 @@ const GlobalPropsProvider = ({
21
21
  };
22
22
 
23
23
  GlobalPropsProvider.defaultProps = {
24
- children: null,
24
+ children: undefined,
25
25
  globalProps: {},
26
26
  };
27
27
 
@@ -21,7 +21,7 @@ const TranslationsProvider = ({
21
21
  };
22
22
 
23
23
  TranslationsProvider.defaultProps = {
24
- children: null,
24
+ children: undefined,
25
25
  translations: {},
26
26
  };
27
27
 
@@ -1,3 +1,5 @@
1
+ // Keep this file in sync with values in `tests/playwright/constants/breakpoints.ts`
2
+
1
3
  $values: (
2
4
  xs: 0,
3
5
  sm: 36em,
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
+ }