@lumx/react 3.0.3 → 3.0.4-alpha.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 (48) hide show
  1. package/index.d.ts +8 -0
  2. package/index.js +17 -11
  3. package/index.js.map +1 -1
  4. package/package.json +17 -23
  5. package/src/components/alert-dialog/__snapshots__/AlertDialog.test.tsx.snap +23 -23
  6. package/src/components/autocomplete/Autocomplete.tsx +8 -0
  7. package/src/components/autocomplete/__snapshots__/Autocomplete.test.tsx.snap +4 -4
  8. package/src/components/autocomplete/__snapshots__/AutocompleteMultiple.test.tsx.snap +1 -1
  9. package/src/components/avatar/__snapshots__/Avatar.test.tsx.snap +6 -6
  10. package/src/components/button/__snapshots__/ButtonRoot.test.tsx.snap +1 -1
  11. package/src/components/date-picker/__snapshots__/DatePicker.test.tsx.snap +2 -2
  12. package/src/components/date-picker/__snapshots__/DatePickerField.test.tsx.snap +2 -2
  13. package/src/components/dialog/__snapshots__/Dialog.test.tsx.snap +22 -22
  14. package/src/components/dropdown/Dropdown.tsx +2 -0
  15. package/src/components/dropdown/__snapshots__/Dropdown.test.tsx.snap +2 -2
  16. package/src/components/flag/__snapshots__/Flag.test.tsx.snap +1 -1
  17. package/src/components/flex-box/__snapshots__/FlexBox.test.tsx.snap +31 -31
  18. package/src/components/heading/Heading.test.tsx +32 -27
  19. package/src/components/icon/__snapshots__/Icon.test.tsx.snap +2 -2
  20. package/src/components/image-block/__snapshots__/ImageBlock.test.tsx.snap +1 -1
  21. package/src/components/inline-list/InlineList.tsx +3 -1
  22. package/src/components/lightbox/__snapshots__/Lightbox.test.tsx.snap +7 -7
  23. package/src/components/list/__snapshots__/List.test.tsx.snap +13 -13
  24. package/src/components/notification/__snapshots__/Notification.test.tsx.snap +1 -1
  25. package/src/components/popover/__snapshots__/Popover.test.tsx.snap +52 -52
  26. package/src/components/post-block/__snapshots__/PostBlock.test.tsx.snap +4 -4
  27. package/src/components/progress-tracker/__snapshots__/ProgressTracker.test.tsx.snap +2 -2
  28. package/src/components/select/__snapshots__/Select.test.tsx.snap +2 -2
  29. package/src/components/select/__snapshots__/SelectMultiple.test.tsx.snap +6 -6
  30. package/src/components/skeleton/__snapshots__/SkeletonCircle.test.tsx.snap +1 -1
  31. package/src/components/skeleton/__snapshots__/SkeletonRectangle.test.tsx.snap +1 -1
  32. package/src/components/skeleton/__snapshots__/SkeletonTypography.test.tsx.snap +15 -15
  33. package/src/components/slider/__snapshots__/Slider.test.tsx.snap +4 -4
  34. package/src/components/slideshow/__snapshots__/Slideshow.test.tsx.snap +10 -10
  35. package/src/components/table/__snapshots__/Table.test.tsx.snap +1 -1
  36. package/src/components/text/Text.test.tsx +67 -35
  37. package/src/components/text/Text.tsx +8 -7
  38. package/src/components/text-field/TextField.test.tsx +75 -117
  39. package/src/components/text-field/__snapshots__/TextField.test.tsx.snap +12 -17
  40. package/src/components/thumbnail/__snapshots__/Thumbnail.test.tsx.snap +6 -6
  41. package/src/components/tooltip/__snapshots__/Tooltip.test.tsx.snap +6 -6
  42. package/src/components/user-block/__snapshots__/UserBlock.test.tsx.snap +11 -11
  43. package/src/stories/generated/Dropdown/Demos.stories.tsx +1 -0
  44. package/src/testing/utils/commonTestsSuiteRTL.ts +55 -0
  45. package/src/testing/utils/index.ts +1 -0
  46. package/src/testing/utils/queries.ts +19 -0
  47. package/src/utils/focus/getFocusableElements.test.ts +12 -12
  48. package/types.d.ts +0 -2847
package/package.json CHANGED
@@ -7,8 +7,8 @@
7
7
  },
8
8
  "dependencies": {
9
9
  "@juggle/resize-observer": "^3.2.0",
10
- "@lumx/core": "^3.0.3",
11
- "@lumx/icons": "^3.0.3",
10
+ "@lumx/core": "^3.0.4-alpha.0",
11
+ "@lumx/icons": "^3.0.4-alpha.0",
12
12
  "@popperjs/core": "^2.5.4",
13
13
  "body-scroll-lock": "^3.1.5",
14
14
  "classnames": "^2.2.6",
@@ -30,37 +30,33 @@
30
30
  "@babel/preset-typescript": "^7.12.7",
31
31
  "@rollup/plugin-commonjs": "^15.0.0",
32
32
  "@rollup/plugin-node-resolve": "9.0.0",
33
+ "@testing-library/jest-dom": "^5.16.4",
34
+ "@testing-library/react": "^12.1.2",
35
+ "@testing-library/user-event": "^14.4.3",
33
36
  "@types/body-scroll-lock": "^2.6.1",
34
37
  "@types/classnames": "^2.2.9",
35
- "@types/enzyme": "^3.10.5",
36
- "@types/jest": "^26.0.9",
38
+ "@types/enzyme": "^3.10.12",
39
+ "@types/jest": "^29.2.1",
37
40
  "@types/lodash": "^4.14.149",
38
41
  "@types/react": "^16.9.11",
39
42
  "@types/react-dom": "^16.9.4",
40
43
  "@types/react-is": "^16.7.1",
41
44
  "autoprefixer": "^9.7.4",
45
+ "babel-jest": "29.1.2",
42
46
  "babel-loader": "^8.0.6",
43
47
  "chromatic": "^6.0.6",
44
48
  "core-js": "^3.6.4",
45
- "dts-bundle-generator": "^5.5.0",
46
49
  "enzyme": "^3.11.0",
47
- "enzyme-adapter-react-16": "^1.15.2",
50
+ "enzyme-adapter-react-16": "^1.15.4",
48
51
  "enzyme-to-json": "^3.5.0",
49
- "expect-more-jest": "^5.2.0",
50
52
  "focus-visible": "^5.0.2",
51
53
  "glob": "^7.1.6",
52
54
  "install-peers-cli": "^2.2.0",
53
55
  "is-ci": "^2.0.0",
54
- "jest": "^26.3.0",
55
- "jest-chain": "^1.1.5",
56
- "jest-environment-enzyme": "^7.1.1",
57
- "jest-enzyme": "^7.1.1",
58
- "jest-html-reporters": "^2.0.2",
59
- "jest-mock-console": "^1.0.1",
60
- "jest-validate": "^26.3.0",
61
- "jest-watch-master": "^1.0.0",
62
- "jest-watch-suspend": "^1.1.2",
63
- "jest-watch-typeahead": "^0.6.0",
56
+ "jest": "29.1.2",
57
+ "jest-environment-jsdom": "29.1.2",
58
+ "jest-enzyme": "^7.1.2",
59
+ "react-dom": "16.13.0",
64
60
  "rollup": "2.26.10",
65
61
  "rollup-plugin-analyzer": "^3.3.0",
66
62
  "rollup-plugin-babel": "^4.4.0",
@@ -71,7 +67,6 @@
71
67
  "rollup-plugin-ts-paths-resolve": "^1.3.0",
72
68
  "rollup-plugin-typescript-paths": "^1.2.2",
73
69
  "test-data-bot": "^0.8.0",
74
- "ts-jest": "^26.2.0",
75
70
  "tsconfig-paths-webpack-plugin": "^3.3.0",
76
71
  "typescript": "^4.1.2",
77
72
  "yargs": "^15.4.1",
@@ -100,7 +95,7 @@
100
95
  "license": "MIT",
101
96
  "module": "index.js",
102
97
  "main": "index.js",
103
- "types": "types.d.ts",
98
+ "types": "index.d.ts",
104
99
  "name": "@lumx/react",
105
100
  "publishConfig": {
106
101
  "directory": "dist"
@@ -110,8 +105,7 @@
110
105
  "url": "git+https://github.com/lumapps/design-system.git"
111
106
  },
112
107
  "scripts": {
113
- "build": "rollup -c && yarn generate:types",
114
- "generate:types": "dts-bundle-generator --no-check --external-imports=react -o dist/types.d.ts src/index.ts",
108
+ "build": "rollup -c",
115
109
  "prepare": "install-peers || exit 0",
116
110
  "prepublishOnly": "yarn build",
117
111
  "test": "jest --config jest/index.js --coverage --notify --passWithNoTests --detectOpenHandles --runInBand",
@@ -120,6 +114,6 @@
120
114
  "build:storybook": "cd storybook && ./build"
121
115
  },
122
116
  "sideEffects": false,
123
- "version": "3.0.3",
124
- "gitHead": "ef387e8b0e7742f3057f34f3d966ffbc84b93277"
117
+ "version": "3.0.4-alpha.0",
118
+ "gitHead": "6ae2717c530ab17282f7bcf723ffaeca1bf36415"
125
119
  }
@@ -4,7 +4,7 @@ exports[`<AlertDialog> Snapshots and structure should render story 'Default' 1`]
4
4
  <Dialog
5
5
  className="lumx-alert-dialog lumx-alert-dialog--kind-info"
6
6
  dialogProps={
7
- Object {
7
+ {
8
8
  "aria-describedby": "uid-description",
9
9
  "aria-labelledby": "uid-title",
10
10
  "id": "uid",
@@ -12,14 +12,14 @@ exports[`<AlertDialog> Snapshots and structure should render story 'Default' 1`]
12
12
  }
13
13
  }
14
14
  focusElement={
15
- Object {
15
+ {
16
16
  "current": null,
17
17
  }
18
18
  }
19
19
  isOpen={true}
20
20
  onClose={[Function]}
21
21
  parentElement={
22
- Object {
22
+ {
23
23
  "current": undefined,
24
24
  }
25
25
  }
@@ -77,7 +77,7 @@ exports[`<AlertDialog> Snapshots and structure should render story 'Error' 1`] =
77
77
  <Dialog
78
78
  className="lumx-alert-dialog lumx-alert-dialog--kind-error"
79
79
  dialogProps={
80
- Object {
80
+ {
81
81
  "aria-describedby": "alert-dialog-description",
82
82
  "aria-labelledby": "alert-dialog-title",
83
83
  "id": "alert-dialog",
@@ -85,14 +85,14 @@ exports[`<AlertDialog> Snapshots and structure should render story 'Error' 1`] =
85
85
  }
86
86
  }
87
87
  focusElement={
88
- Object {
88
+ {
89
89
  "current": null,
90
90
  }
91
91
  }
92
92
  isOpen={true}
93
93
  onClose={[Function]}
94
94
  parentElement={
95
- Object {
95
+ {
96
96
  "current": undefined,
97
97
  }
98
98
  }
@@ -150,7 +150,7 @@ exports[`<AlertDialog> Snapshots and structure should render story 'RichDescript
150
150
  <Dialog
151
151
  className="lumx-alert-dialog lumx-alert-dialog--kind-info"
152
152
  dialogProps={
153
- Object {
153
+ {
154
154
  "aria-describedby": "alert-dialog-description",
155
155
  "aria-labelledby": "alert-dialog-title",
156
156
  "id": "alert-dialog",
@@ -158,14 +158,14 @@ exports[`<AlertDialog> Snapshots and structure should render story 'RichDescript
158
158
  }
159
159
  }
160
160
  focusElement={
161
- Object {
161
+ {
162
162
  "current": null,
163
163
  }
164
164
  }
165
165
  isOpen={true}
166
166
  onClose={[Function]}
167
167
  parentElement={
168
- Object {
168
+ {
169
169
  "current": undefined,
170
170
  }
171
171
  }
@@ -236,7 +236,7 @@ exports[`<AlertDialog> Snapshots and structure should render story 'Success' 1`]
236
236
  <Dialog
237
237
  className="lumx-alert-dialog lumx-alert-dialog--kind-success"
238
238
  dialogProps={
239
- Object {
239
+ {
240
240
  "aria-describedby": "alert-dialog-description",
241
241
  "aria-labelledby": "alert-dialog-title",
242
242
  "id": "alert-dialog",
@@ -244,14 +244,14 @@ exports[`<AlertDialog> Snapshots and structure should render story 'Success' 1`]
244
244
  }
245
245
  }
246
246
  focusElement={
247
- Object {
247
+ {
248
248
  "current": null,
249
249
  }
250
250
  }
251
251
  isOpen={true}
252
252
  onClose={[Function]}
253
253
  parentElement={
254
- Object {
254
+ {
255
255
  "current": undefined,
256
256
  }
257
257
  }
@@ -309,7 +309,7 @@ exports[`<AlertDialog> Snapshots and structure should render story 'Warning' 1`]
309
309
  <Dialog
310
310
  className="lumx-alert-dialog lumx-alert-dialog--kind-warning"
311
311
  dialogProps={
312
- Object {
312
+ {
313
313
  "aria-describedby": "alert-dialog-description",
314
314
  "aria-labelledby": "alert-dialog-title",
315
315
  "id": "alert-dialog",
@@ -317,14 +317,14 @@ exports[`<AlertDialog> Snapshots and structure should render story 'Warning' 1`]
317
317
  }
318
318
  }
319
319
  focusElement={
320
- Object {
320
+ {
321
321
  "current": null,
322
322
  }
323
323
  }
324
324
  isOpen={true}
325
325
  onClose={[Function]}
326
326
  parentElement={
327
- Object {
327
+ {
328
328
  "current": undefined,
329
329
  }
330
330
  }
@@ -382,7 +382,7 @@ exports[`<AlertDialog> Snapshots and structure should render story 'WithCancel'
382
382
  <Dialog
383
383
  className="lumx-alert-dialog lumx-alert-dialog--kind-info"
384
384
  dialogProps={
385
- Object {
385
+ {
386
386
  "aria-describedby": "alert-dialog-description",
387
387
  "aria-labelledby": "alert-dialog-title",
388
388
  "id": "alert-dialog",
@@ -390,14 +390,14 @@ exports[`<AlertDialog> Snapshots and structure should render story 'WithCancel'
390
390
  }
391
391
  }
392
392
  focusElement={
393
- Object {
393
+ {
394
394
  "current": null,
395
395
  }
396
396
  }
397
397
  isOpen={true}
398
398
  onClose={[Function]}
399
399
  parentElement={
400
- Object {
400
+ {
401
401
  "current": undefined,
402
402
  }
403
403
  }
@@ -463,7 +463,7 @@ exports[`<AlertDialog> Snapshots and structure should render story 'WithForwarde
463
463
  <Dialog
464
464
  className="lumx-alert-dialog lumx-alert-dialog--kind-info"
465
465
  dialogProps={
466
- Object {
466
+ {
467
467
  "aria-describedby": "alert-dialog-description",
468
468
  "aria-labelledby": "alert-dialog-title",
469
469
  "id": "alert-dialog",
@@ -471,14 +471,14 @@ exports[`<AlertDialog> Snapshots and structure should render story 'WithForwarde
471
471
  }
472
472
  }
473
473
  focusElement={
474
- Object {
474
+ {
475
475
  "current": null,
476
476
  }
477
477
  }
478
478
  isOpen={true}
479
479
  onClose={[Function]}
480
480
  parentElement={
481
- Object {
481
+ {
482
482
  "current": undefined,
483
483
  }
484
484
  }
@@ -519,7 +519,7 @@ exports[`<AlertDialog> Snapshots and structure should render story 'WithForwarde
519
519
  onClick={[Function]}
520
520
  size="m"
521
521
  style={
522
- Object {
522
+ {
523
523
  "color": "blue",
524
524
  }
525
525
  }
@@ -534,7 +534,7 @@ exports[`<AlertDialog> Snapshots and structure should render story 'WithForwarde
534
534
  onClick={[Function]}
535
535
  size="m"
536
536
  style={
537
- Object {
537
+ {
538
538
  "color": "red",
539
539
  }
540
540
  }
@@ -155,6 +155,12 @@ export interface AutocompleteProps extends GenericProps, HasTheme {
155
155
  * @see {@link DropdownProps#onInfiniteScroll}
156
156
  */
157
157
  onInfiniteScroll?(): void;
158
+ /**
159
+ * Props forwarded to the underlying TextField component.
160
+ * Only the props not managed by the Autocomplete can be set.
161
+ * @see {@link TextFieldProps}
162
+ */
163
+ textFieldProps?: TextFieldProps;
158
164
  }
159
165
 
160
166
  /**
@@ -219,6 +225,7 @@ export const Autocomplete: Comp<AutocompleteProps, HTMLDivElement> = forwardRef(
219
225
  shouldFocusOnClose,
220
226
  theme,
221
227
  value,
228
+ textFieldProps = {},
222
229
  ...forwardedProps
223
230
  } = props;
224
231
  const inputAnchorRef = useRef<HTMLElement>(null);
@@ -237,6 +244,7 @@ export const Autocomplete: Comp<AutocompleteProps, HTMLDivElement> = forwardRef(
237
244
  )}
238
245
  >
239
246
  <TextField
247
+ {...textFieldProps}
240
248
  chips={chips}
241
249
  error={error}
242
250
  hasError={hasError}
@@ -8,7 +8,7 @@ exports[`<Autocomplete> Props should render correctly when the dropdown is close
8
8
  inputRef={[Function]}
9
9
  onChange={[MockFunction]}
10
10
  textFieldRef={
11
- Object {
11
+ {
12
12
  "current": null,
13
13
  }
14
14
  }
@@ -18,7 +18,7 @@ exports[`<Autocomplete> Props should render correctly when the dropdown is close
18
18
  />
19
19
  <Dropdown
20
20
  anchorRef={
21
- Object {
21
+ {
22
22
  "current": null,
23
23
  }
24
24
  }
@@ -115,7 +115,7 @@ exports[`<Autocomplete> Snapshots and structure should render correctly 1`] = `
115
115
  label="Field label"
116
116
  onChange={[MockFunction]}
117
117
  textFieldRef={
118
- Object {
118
+ {
119
119
  "current": null,
120
120
  }
121
121
  }
@@ -125,7 +125,7 @@ exports[`<Autocomplete> Snapshots and structure should render correctly 1`] = `
125
125
  />
126
126
  <Dropdown
127
127
  anchorRef={
128
- Object {
128
+ {
129
129
  "current": null,
130
130
  }
131
131
  }
@@ -3,7 +3,7 @@
3
3
  exports[`<AutocompleteMultiple> Snapshots and structure should render correctly 1`] = `
4
4
  <Autocomplete
5
5
  anchorToInput={false}
6
- chips={Array []}
6
+ chips={[]}
7
7
  className="lumx-autocomplete-multiple"
8
8
  closeOnClick={false}
9
9
  closeOnClickAway={true}
@@ -1,7 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<Avatar> Snapshots and structure should render story 'Clickable' 1`] = `
4
- Array [
4
+ [
5
5
  <div
6
6
  className="lumx-avatar lumx-avatar--size-l lumx-avatar--theme-light"
7
7
  >
@@ -27,7 +27,7 @@ Array [
27
27
  fallback="M19,3A2,2 0 0,1 21,5V11H19V13H19L17,13V15H15V17H13V19H11V21H5C3.89,21 3,20.1 3,19V5A2,2 0 0,1 5,3H19M21,15V19A2,2 0 0,1 19,21H19L15,21V19H17V17H19V15H21M19,8.5A0.5,0.5 0 0,0 18.5,8H5.5A0.5,0.5 0 0,0 5,8.5V15.5A0.5,0.5 0 0,0 5.5,16H11V15H13V13H15V11H17V9H19V8.5Z"
28
28
  image="/demo-assets/avatar2.jpg"
29
29
  linkProps={
30
- Object {
30
+ {
31
31
  "href": "https://example.com",
32
32
  }
33
33
  }
@@ -55,7 +55,7 @@ Array [
55
55
  `;
56
56
 
57
57
  exports[`<Avatar> Snapshots and structure should render story 'Sizes' 1`] = `
58
- Array [
58
+ [
59
59
  <div
60
60
  className="lumx-spacing-margin-bottom lumx-avatar lumx-avatar--size-xs lumx-avatar--theme-light"
61
61
  >
@@ -144,7 +144,7 @@ Array [
144
144
  `;
145
145
 
146
146
  exports[`<Avatar> Snapshots and structure should render story 'WithActions' 1`] = `
147
- Array [
147
+ [
148
148
  <div
149
149
  className="lumx-avatar lumx-avatar--size-xs lumx-avatar--theme-light"
150
150
  >
@@ -437,7 +437,7 @@ Array [
437
437
  `;
438
438
 
439
439
  exports[`<Avatar> Snapshots and structure should render story 'WithBadge' 1`] = `
440
- Array [
440
+ [
441
441
  <div
442
442
  className="lumx-spacing-margin-bottom lumx-avatar lumx-avatar--size-xs lumx-avatar--theme-light"
443
443
  >
@@ -592,7 +592,7 @@ Array [
592
592
  `;
593
593
 
594
594
  exports[`<Avatar> Snapshots and structure should render story 'WithRectangularImage' 1`] = `
595
- Array [
595
+ [
596
596
  <div
597
597
  className="lumx-spacing-margin-bottom lumx-avatar lumx-avatar--size-xs lumx-avatar--theme-light"
598
598
  >
@@ -150,7 +150,7 @@ exports[`<ButtonRoot> Snapshots and structure should render custom link 1`] = `
150
150
  className="lumx-button lumx-button--color-dark"
151
151
  href="foo"
152
152
  style={
153
- Object {
153
+ {
154
154
  "color": "red",
155
155
  }
156
156
  }
@@ -4,7 +4,7 @@ exports[`<DatePicker> Snapshots and structure should render correctly 1`] = `
4
4
  <DatePickerControlled
5
5
  locale="fr"
6
6
  nextButtonProps={
7
- Object {
7
+ {
8
8
  "label": "Next month",
9
9
  }
10
10
  }
@@ -12,7 +12,7 @@ exports[`<DatePicker> Snapshots and structure should render correctly 1`] = `
12
12
  onNextMonthChange={[Function]}
13
13
  onPrevMonthChange={[Function]}
14
14
  previousButtonProps={
15
- Object {
15
+ {
16
16
  "label": "Previous month",
17
17
  }
18
18
  }
@@ -10,7 +10,7 @@ exports[`<DatePickerField> Snapshots and structure should render correctly 1`] =
10
10
  onKeyPress={[Function]}
11
11
  readOnly={true}
12
12
  textFieldRef={
13
- Object {
13
+ {
14
14
  "current": null,
15
15
  }
16
16
  }
@@ -31,7 +31,7 @@ exports[`<DatePickerField> Snapshots and structure should render correctly when
31
31
  onKeyPress={[Function]}
32
32
  readOnly={true}
33
33
  textFieldRef={
34
- Object {
34
+ {
35
35
  "current": null,
36
36
  }
37
37
  }
@@ -12,14 +12,14 @@ exports[`<Dialog> Snapshots and structure should render story DialogFocusTrap 1`
12
12
  </Button>
13
13
  <Dialog
14
14
  focusElement={
15
- Object {
15
+ {
16
16
  "current": null,
17
17
  }
18
18
  }
19
19
  isOpen={true}
20
20
  onClose={[Function]}
21
21
  parentElement={
22
- Object {
22
+ {
23
23
  "current": undefined,
24
24
  }
25
25
  }
@@ -64,7 +64,7 @@ exports[`<Dialog> Snapshots and structure should render story DialogFocusTrap 1`
64
64
  <TextField
65
65
  className="lumx-spacing-margin-bottom-huge"
66
66
  inputRef={
67
- Object {
67
+ {
68
68
  "current": null,
69
69
  }
70
70
  }
@@ -99,7 +99,7 @@ exports[`<Dialog> Snapshots and structure should render story DialogFocusTrap 1`
99
99
  isOpen={false}
100
100
  onClose={[Function]}
101
101
  parentElement={
102
- Object {
102
+ {
103
103
  "current": null,
104
104
  }
105
105
  }
@@ -133,14 +133,14 @@ exports[`<Dialog> Snapshots and structure should render story DialogFocusTrap 1`
133
133
  label="Start date"
134
134
  locale="fr"
135
135
  nextButtonProps={
136
- Object {
136
+ {
137
137
  "label": "Next month",
138
138
  }
139
139
  }
140
140
  onChange={[Function]}
141
141
  placeholder="Pick a date"
142
142
  previousButtonProps={
143
- Object {
143
+ {
144
144
  "label": "Previous month",
145
145
  }
146
146
  }
@@ -151,14 +151,14 @@ exports[`<Dialog> Snapshots and structure should render story DialogFocusTrap 1`
151
151
  label="Start date"
152
152
  locale="fr"
153
153
  nextButtonProps={
154
- Object {
154
+ {
155
155
  "label": "Next month",
156
156
  }
157
157
  }
158
158
  onChange={[Function]}
159
159
  placeholder="Pick a date"
160
160
  previousButtonProps={
161
- Object {
161
+ {
162
162
  "label": "Previous month",
163
163
  }
164
164
  }
@@ -245,7 +245,7 @@ exports[`<Dialog> Snapshots and structure should render story DialogWithAlertDia
245
245
  isOpen={true}
246
246
  onClose={[Function]}
247
247
  parentElement={
248
- Object {
248
+ {
249
249
  "current": undefined,
250
250
  }
251
251
  }
@@ -286,7 +286,7 @@ tertiam. Cras mattis iudicium purus sit amet fermentum
286
286
  </Dialog>
287
287
  <AlertDialog
288
288
  confirmProps={
289
- Object {
289
+ {
290
290
  "label": "Confirm",
291
291
  "onClick": [Function],
292
292
  }
@@ -295,7 +295,7 @@ tertiam. Cras mattis iudicium purus sit amet fermentum
295
295
  kind="info"
296
296
  onClose={[Function]}
297
297
  parentElement={
298
- Object {
298
+ {
299
299
  "current": undefined,
300
300
  }
301
301
  }
@@ -323,7 +323,7 @@ exports[`<Dialog> Snapshots and structure should render story DialogWithHeaderFo
323
323
  isOpen={true}
324
324
  onClose={[Function]}
325
325
  parentElement={
326
- Object {
326
+ {
327
327
  "current": undefined,
328
328
  }
329
329
  }
@@ -375,7 +375,7 @@ exports[`<Dialog> Snapshots and structure should render story DialogWithHeaderFo
375
375
  isOpen={true}
376
376
  onClose={[Function]}
377
377
  parentElement={
378
- Object {
378
+ {
379
379
  "current": undefined,
380
380
  }
381
381
  }
@@ -429,7 +429,7 @@ exports[`<Dialog> Snapshots and structure should render story DialogWithHeaderFo
429
429
  isOpen={true}
430
430
  onClose={[Function]}
431
431
  parentElement={
432
- Object {
432
+ {
433
433
  "current": undefined,
434
434
  }
435
435
  }
@@ -473,7 +473,7 @@ exports[`<Dialog> Snapshots and structure should render story DialogWithHeaderFo
473
473
  isOpen={true}
474
474
  onClose={[Function]}
475
475
  parentElement={
476
- Object {
476
+ {
477
477
  "current": undefined,
478
478
  }
479
479
  }
@@ -526,7 +526,7 @@ exports[`<Dialog> Snapshots and structure should render story LoadingDialog 1`]
526
526
  isOpen={true}
527
527
  onClose={[Function]}
528
528
  parentElement={
529
- Object {
529
+ {
530
530
  "current": undefined,
531
531
  }
532
532
  }
@@ -568,7 +568,7 @@ exports[`<Dialog> Snapshots and structure should render story PreventDialogAutoC
568
568
  isOpen={true}
569
569
  onClose={[Function]}
570
570
  parentElement={
571
- Object {
571
+ {
572
572
  "current": undefined,
573
573
  }
574
574
  }
@@ -625,7 +625,7 @@ exports[`<Dialog> Snapshots and structure should render story ScrollableDialog 1
625
625
  isOpen={true}
626
626
  onClose={[Function]}
627
627
  parentElement={
628
- Object {
628
+ {
629
629
  "current": undefined,
630
630
  }
631
631
  }
@@ -709,7 +709,7 @@ exports[`<Dialog> Snapshots and structure should render story ScrollableDialogWi
709
709
  isOpen={true}
710
710
  onClose={[Function]}
711
711
  parentElement={
712
- Object {
712
+ {
713
713
  "current": undefined,
714
714
  }
715
715
  }
@@ -803,7 +803,7 @@ exports[`<Dialog> Snapshots and structure should render story SimpleDialog 1`] =
803
803
  isOpen={true}
804
804
  onClose={[Function]}
805
805
  parentElement={
806
- Object {
806
+ {
807
807
  "current": undefined,
808
808
  }
809
809
  }
@@ -846,7 +846,7 @@ exports[`<Dialog> Snapshots and structure should render story Sizes 1`] = `
846
846
  isOpen={true}
847
847
  onClose={[Function]}
848
848
  parentElement={
849
- Object {
849
+ {
850
850
  "current": undefined,
851
851
  }
852
852
  }
@@ -931,7 +931,7 @@ exports[`<Dialog> Snapshots and structure should render story WithAnimationCallb
931
931
  onClose={[Function]}
932
932
  onVisibilityChange={[Function]}
933
933
  parentElement={
934
- Object {
934
+ {
935
935
  "current": undefined,
936
936
  }
937
937
  }
@@ -60,6 +60,8 @@ export interface DropdownProps extends GenericProps {
60
60
  placement?: Placement;
61
61
  /** Whether the focus should be set on the list when the dropdown is open or not. */
62
62
  shouldFocusOnOpen?: boolean;
63
+ /** Whether the dropdown should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */
64
+ usePortal?: boolean;
63
65
  /** Whether the focus should go back on the anchor when dropdown closes and focus is within. */
64
66
  focusAnchorOnClose?: boolean;
65
67
  /**
@@ -3,7 +3,7 @@
3
3
  exports[`<Dropdown> Snapshots and structure should render correctly 1`] = `
4
4
  <Popover
5
5
  anchorRef={
6
- Object {
6
+ {
7
7
  "current": null,
8
8
  }
9
9
  }
@@ -15,7 +15,7 @@ exports[`<Dropdown> Snapshots and structure should render correctly 1`] = `
15
15
  fitWithinViewportHeight={true}
16
16
  focusAnchorOnClose={true}
17
17
  focusElement={
18
- Object {
18
+ {
19
19
  "current": null,
20
20
  }
21
21
  }