@lumx/react 3.3.1-alpha.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_internal/ClickAwayProvider.js.map +1 -1
- package/_internal/types.d.ts +0 -2
- package/index.d.ts +2 -0
- package/index.js +347 -75
- package/index.js.map +1 -1
- package/package.json +23 -19
- package/src/components/autocomplete/Autocomplete.test.tsx +55 -142
- package/src/components/autocomplete/AutocompleteMultiple.test.tsx +37 -75
- package/src/components/autocomplete/__mockData__/index.ts +6 -1
- package/src/components/badge/Badge.test.tsx +20 -64
- package/src/components/button/Button.test.tsx +44 -121
- package/src/components/button/ButtonGroup.test.tsx +16 -39
- package/src/components/button/IconButton.stories.tsx +7 -0
- package/src/components/button/IconButton.test.tsx +37 -78
- package/src/components/button/IconButton.tsx +8 -1
- package/src/components/checkbox/Checkbox.test.tsx +62 -67
- package/src/components/chip/Chip.test.tsx +89 -139
- package/src/components/chip/ChipGroup.test.tsx +27 -10
- package/src/components/date-picker/DatePicker.test.tsx +15 -23
- package/src/components/date-picker/DatePickerControlled.test.tsx +24 -20
- package/src/components/date-picker/DatePickerField.test.tsx +43 -27
- package/src/components/dialog/Dialog.test.tsx +36 -35
- package/src/components/divider/Divider.test.tsx +23 -69
- package/src/components/dropdown/Dropdown.test.tsx +30 -61
- package/src/components/expansion-panel/ExpansionPanel.test.tsx +12 -8
- package/src/components/flag/Flag.test.tsx +28 -53
- package/src/components/generic-block/GenericBlock.test.tsx +93 -89
- package/src/components/grid-column/GridColumn.stories.tsx +3 -3
- package/src/components/icon/Icon.test.tsx +80 -64
- package/src/components/index.ts +0 -2
- package/src/components/inline-list/InlineList.test.tsx +30 -17
- package/src/components/input-helper/InputHelper.test.tsx +21 -81
- package/src/components/input-label/InputLabel.test.tsx +19 -61
- package/src/components/lightbox/Lightbox.test.tsx +3 -2
- package/src/components/link/Link.test.tsx +47 -31
- package/src/components/link-preview/LinkPreview.test.tsx +51 -51
- package/src/components/message/Message.test.tsx +31 -52
- package/src/components/mosaic/Mosaic.test.tsx +56 -72
- package/src/components/notification/Notification.test.tsx +51 -82
- package/src/components/popover/Popover.tsx +7 -9
- package/src/components/progress-tracker/ProgressTracker.test.tsx +20 -33
- package/src/components/progress-tracker/ProgressTrackerProvider.test.tsx +61 -36
- package/src/components/progress-tracker/ProgressTrackerStep.test.tsx +19 -109
- package/src/components/progress-tracker/ProgressTrackerStepPanel.test.tsx +21 -58
- package/src/components/progress-tracker/ProgressTrackerStepPanel.tsx +1 -1
- package/src/components/radio-button/RadioButton.test.tsx +78 -92
- package/src/components/radio-button/RadioGroup.test.tsx +13 -59
- package/src/components/select/Select.test.tsx +115 -284
- package/src/components/select/SelectMultiple.stories.tsx +105 -2
- package/src/components/select/SelectMultiple.test.tsx +126 -322
- package/src/components/select/WithSelectContext.tsx +10 -4
- package/src/components/side-navigation/SideNavigation.test.tsx +22 -35
- package/src/components/side-navigation/SideNavigationItem.test.tsx +72 -139
- package/src/components/switch/Switch.test.tsx +70 -149
- package/src/components/table/Table.test.tsx +2 -0
- package/src/components/table/TableBody.test.tsx +18 -8
- package/src/components/table/TableCell.test.tsx +34 -9
- package/src/components/table/TableHeader.test.tsx +18 -8
- package/src/components/table/TableRow.test.tsx +28 -8
- package/src/components/tabs/Tab.test.tsx +27 -96
- package/src/components/tabs/TabList.test.tsx +21 -56
- package/src/components/tabs/TabPanel.test.tsx +20 -55
- package/src/components/tabs/TabPanel.tsx +1 -1
- package/src/components/tabs/TabProvider.test.tsx +158 -37
- package/src/components/tabs/test-utils.ts +39 -0
- package/src/components/text-field/TextField.stories.tsx +14 -5
- package/src/components/text-field/TextField.test.tsx +54 -8
- package/src/components/text-field/TextField.tsx +49 -5
- package/src/components/tooltip/Tooltip.test.tsx +134 -75
- package/src/components/tooltip/useInjectTooltipRef.tsx +9 -2
- package/src/components/uploader/Uploader.test.tsx +60 -48
- package/src/components/user-block/UserBlock.test.tsx +69 -13
- package/src/hooks/useFocusTrap.ts +2 -2
- package/src/testing/utils/commonTestsSuiteRTL.ts +18 -8
- package/src/testing/utils/index.ts +0 -1
- package/src/utils/flattenChildren.ts +5 -0
- package/src/components/autocomplete/__snapshots__/Autocomplete.test.tsx.snap +0 -213
- package/src/components/autocomplete/__snapshots__/AutocompleteMultiple.test.tsx.snap +0 -88
- package/src/components/badge/__snapshots__/Badge.test.tsx.snap +0 -11
- package/src/components/button/ButtonRoot.test.tsx +0 -203
- package/src/components/button/__snapshots__/Button.test.tsx.snap +0 -96
- package/src/components/button/__snapshots__/ButtonGroup.test.tsx.snap +0 -22
- package/src/components/button/__snapshots__/ButtonRoot.test.tsx.snap +0 -160
- package/src/components/button/__snapshots__/IconButton.test.tsx.snap +0 -83
- package/src/components/checkbox/__snapshots__/Checkbox.test.tsx.snap +0 -141
- package/src/components/chip/__snapshots__/Chip.test.tsx.snap +0 -12
- package/src/components/chip/__snapshots__/ChipGroup.test.tsx.snap +0 -29
- package/src/components/date-picker/__snapshots__/DatePicker.test.tsx.snap +0 -22
- package/src/components/date-picker/__snapshots__/DatePickerControlled.test.tsx.snap +0 -597
- package/src/components/date-picker/__snapshots__/DatePickerField.test.tsx.snap +0 -43
- package/src/components/divider/__snapshots__/Divider.test.tsx.snap +0 -9
- package/src/components/dropdown/__snapshots__/Dropdown.test.tsx.snap +0 -35
- package/src/components/icon/__snapshots__/Icon.test.tsx.snap +0 -49
- package/src/components/input-helper/__snapshots__/InputHelper.test.tsx.snap +0 -9
- package/src/components/input-label/__snapshots__/InputLabel.test.tsx.snap +0 -10
- package/src/components/link/__snapshots__/Link.test.tsx.snap +0 -29
- package/src/components/message/__snapshots__/Message.test.tsx.snap +0 -15
- package/src/components/notification/__snapshots__/Notification.test.tsx.snap +0 -34
- package/src/components/progress-tracker/__snapshots__/ProgressTracker.test.tsx.snap +0 -41
- package/src/components/progress-tracker/__snapshots__/ProgressTrackerStep.test.tsx.snap +0 -141
- package/src/components/progress-tracker/__snapshots__/ProgressTrackerStepPanel.test.tsx.snap +0 -25
- package/src/components/radio-button/__snapshots__/RadioButton.test.tsx.snap +0 -113
- package/src/components/radio-button/__snapshots__/RadioGroup.test.tsx.snap +0 -26
- package/src/components/select/__snapshots__/Select.test.tsx.snap +0 -43
- package/src/components/select/__snapshots__/SelectMultiple.test.tsx.snap +0 -87
- package/src/components/side-navigation/__snapshots__/SideNavigation.test.tsx.snap +0 -7
- package/src/components/side-navigation/__snapshots__/SideNavigationItem.test.tsx.snap +0 -30
- package/src/components/switch/__snapshots__/Switch.test.tsx.snap +0 -179
- package/src/components/tabs/__snapshots__/Tab.test.tsx.snap +0 -62
- package/src/components/tabs/__snapshots__/TabList.test.tsx.snap +0 -22
- package/src/components/tabs/__snapshots__/TabPanel.test.tsx.snap +0 -25
- package/src/components/tabs/test.mocks.ts +0 -33
- package/src/components/text-field/__snapshots__/TextField.test.tsx.snap +0 -42
- package/src/components/tooltip/__snapshots__/Tooltip.test.tsx.snap +0 -233
- package/src/components/uploader/__snapshots__/Uploader.test.tsx.snap +0 -14
- package/src/testing/utils/commonTestsSuite.ts +0 -71
- package/src/utils/flattenChildren.test.tsx +0 -58
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<SideNavigationItem> Snapshots and structure should render correctly 1`] = `
|
|
4
|
-
<li
|
|
5
|
-
className="lumx-side-navigation-item lumx-side-navigation-item--emphasis-high"
|
|
6
|
-
>
|
|
7
|
-
<a
|
|
8
|
-
className="lumx-side-navigation-item__link"
|
|
9
|
-
tabIndex={0}
|
|
10
|
-
>
|
|
11
|
-
<span />
|
|
12
|
-
</a>
|
|
13
|
-
</li>
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
exports[`<SideNavigationItem> Snapshots and structure should render correctly with split actions 1`] = `
|
|
17
|
-
<li
|
|
18
|
-
className="lumx-side-navigation-item lumx-side-navigation-item--emphasis-high"
|
|
19
|
-
>
|
|
20
|
-
<a
|
|
21
|
-
className="lumx-side-navigation-item__link"
|
|
22
|
-
href="http://toto.com"
|
|
23
|
-
onClick={[Function]}
|
|
24
|
-
onKeyDown={[Function]}
|
|
25
|
-
tabIndex={0}
|
|
26
|
-
>
|
|
27
|
-
<span />
|
|
28
|
-
</a>
|
|
29
|
-
</li>
|
|
30
|
-
`;
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<Switch> Conditions should not display the \`helper\` if no \`label\` is given 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
className="lumx-switch lumx-switch--position-left lumx-switch--theme-light lumx-switch--is-unchecked"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
className="lumx-switch__input-wrapper"
|
|
9
|
-
>
|
|
10
|
-
<input
|
|
11
|
-
aria-checked={false}
|
|
12
|
-
aria-describedby="switch-uid-helper"
|
|
13
|
-
className="lumx-switch__input-native"
|
|
14
|
-
id="switch-uid"
|
|
15
|
-
onChange={[Function]}
|
|
16
|
-
role="switch"
|
|
17
|
-
type="checkbox"
|
|
18
|
-
/>
|
|
19
|
-
<div
|
|
20
|
-
className="lumx-switch__input-placeholder"
|
|
21
|
-
>
|
|
22
|
-
<div
|
|
23
|
-
className="lumx-switch__input-background"
|
|
24
|
-
/>
|
|
25
|
-
<div
|
|
26
|
-
className="lumx-switch__input-indicator"
|
|
27
|
-
/>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
exports[`<Switch> Props should use the given props while passing custom props to input 1`] = `
|
|
34
|
-
<div
|
|
35
|
-
className="lumx-switch lumx-switch--position-left lumx-switch--theme-light lumx-switch--is-unchecked"
|
|
36
|
-
>
|
|
37
|
-
<div
|
|
38
|
-
className="lumx-switch__input-wrapper"
|
|
39
|
-
>
|
|
40
|
-
<input
|
|
41
|
-
aria-checked={false}
|
|
42
|
-
aria-labelledby="labelledby-id"
|
|
43
|
-
className="lumx-switch__input-native"
|
|
44
|
-
id="switch-uid"
|
|
45
|
-
onChange={[Function]}
|
|
46
|
-
role="switch"
|
|
47
|
-
type="checkbox"
|
|
48
|
-
/>
|
|
49
|
-
<div
|
|
50
|
-
className="lumx-switch__input-placeholder"
|
|
51
|
-
>
|
|
52
|
-
<div
|
|
53
|
-
className="lumx-switch__input-background"
|
|
54
|
-
/>
|
|
55
|
-
<div
|
|
56
|
-
className="lumx-switch__input-indicator"
|
|
57
|
-
/>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
`;
|
|
62
|
-
|
|
63
|
-
exports[`<Switch> Snapshots and structure should render correctly with a \`label\` and a \`helper\` 1`] = `
|
|
64
|
-
<div
|
|
65
|
-
className="lumx-switch lumx-switch--position-left lumx-switch--theme-light lumx-switch--is-unchecked"
|
|
66
|
-
>
|
|
67
|
-
<div
|
|
68
|
-
className="lumx-switch__input-wrapper"
|
|
69
|
-
>
|
|
70
|
-
<input
|
|
71
|
-
aria-checked={false}
|
|
72
|
-
aria-describedby="switch-uid-helper"
|
|
73
|
-
className="lumx-switch__input-native"
|
|
74
|
-
id="switch-uid"
|
|
75
|
-
onChange={[Function]}
|
|
76
|
-
role="switch"
|
|
77
|
-
type="checkbox"
|
|
78
|
-
/>
|
|
79
|
-
<div
|
|
80
|
-
className="lumx-switch__input-placeholder"
|
|
81
|
-
>
|
|
82
|
-
<div
|
|
83
|
-
className="lumx-switch__input-background"
|
|
84
|
-
/>
|
|
85
|
-
<div
|
|
86
|
-
className="lumx-switch__input-indicator"
|
|
87
|
-
/>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
<div
|
|
91
|
-
className="lumx-switch__content"
|
|
92
|
-
>
|
|
93
|
-
<InputLabel
|
|
94
|
-
className="lumx-switch__label"
|
|
95
|
-
htmlFor="switch-uid"
|
|
96
|
-
theme="light"
|
|
97
|
-
>
|
|
98
|
-
Label
|
|
99
|
-
</InputLabel>
|
|
100
|
-
<InputHelper
|
|
101
|
-
className="lumx-switch__helper"
|
|
102
|
-
id="switch-uid-helper"
|
|
103
|
-
kind="info"
|
|
104
|
-
theme="light"
|
|
105
|
-
>
|
|
106
|
-
Helper
|
|
107
|
-
</InputHelper>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
`;
|
|
111
|
-
|
|
112
|
-
exports[`<Switch> Snapshots and structure should render correctly with only a \`label\` 1`] = `
|
|
113
|
-
<div
|
|
114
|
-
className="lumx-switch lumx-switch--position-left lumx-switch--theme-light lumx-switch--is-unchecked"
|
|
115
|
-
>
|
|
116
|
-
<div
|
|
117
|
-
className="lumx-switch__input-wrapper"
|
|
118
|
-
>
|
|
119
|
-
<input
|
|
120
|
-
aria-checked={false}
|
|
121
|
-
className="lumx-switch__input-native"
|
|
122
|
-
id="switch-uid"
|
|
123
|
-
onChange={[Function]}
|
|
124
|
-
role="switch"
|
|
125
|
-
type="checkbox"
|
|
126
|
-
/>
|
|
127
|
-
<div
|
|
128
|
-
className="lumx-switch__input-placeholder"
|
|
129
|
-
>
|
|
130
|
-
<div
|
|
131
|
-
className="lumx-switch__input-background"
|
|
132
|
-
/>
|
|
133
|
-
<div
|
|
134
|
-
className="lumx-switch__input-indicator"
|
|
135
|
-
/>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
<div
|
|
139
|
-
className="lumx-switch__content"
|
|
140
|
-
>
|
|
141
|
-
<InputLabel
|
|
142
|
-
className="lumx-switch__label"
|
|
143
|
-
htmlFor="switch-uid"
|
|
144
|
-
theme="light"
|
|
145
|
-
>
|
|
146
|
-
Label
|
|
147
|
-
</InputLabel>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
`;
|
|
151
|
-
|
|
152
|
-
exports[`<Switch> Snapshots and structure should render correctly without any label 1`] = `
|
|
153
|
-
<div
|
|
154
|
-
className="lumx-switch lumx-switch--position-left lumx-switch--theme-light lumx-switch--is-unchecked"
|
|
155
|
-
>
|
|
156
|
-
<div
|
|
157
|
-
className="lumx-switch__input-wrapper"
|
|
158
|
-
>
|
|
159
|
-
<input
|
|
160
|
-
aria-checked={false}
|
|
161
|
-
className="lumx-switch__input-native"
|
|
162
|
-
id="switch-uid"
|
|
163
|
-
onChange={[Function]}
|
|
164
|
-
role="switch"
|
|
165
|
-
type="checkbox"
|
|
166
|
-
/>
|
|
167
|
-
<div
|
|
168
|
-
className="lumx-switch__input-placeholder"
|
|
169
|
-
>
|
|
170
|
-
<div
|
|
171
|
-
className="lumx-switch__input-background"
|
|
172
|
-
/>
|
|
173
|
-
<div
|
|
174
|
-
className="lumx-switch__input-indicator"
|
|
175
|
-
/>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
`;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<Tab> Snapshots and structure should render 1`] = `
|
|
4
|
-
<button
|
|
5
|
-
aria-controls="tab-panel-1"
|
|
6
|
-
aria-selected={false}
|
|
7
|
-
className="lumx-tabs__link"
|
|
8
|
-
id="tab-1"
|
|
9
|
-
onClick={[Function]}
|
|
10
|
-
onFocus={[Function]}
|
|
11
|
-
onKeyPress={[Function]}
|
|
12
|
-
role="tab"
|
|
13
|
-
tabIndex={-1}
|
|
14
|
-
type="button"
|
|
15
|
-
>
|
|
16
|
-
<span>
|
|
17
|
-
Test Tab Label
|
|
18
|
-
</span>
|
|
19
|
-
</button>
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
exports[`<Tab> Snapshots and structure should render active state 1`] = `
|
|
23
|
-
<button
|
|
24
|
-
aria-controls="tab-panel-3"
|
|
25
|
-
aria-selected={true}
|
|
26
|
-
className="lumx-tabs__link lumx-tabs__link--is-active"
|
|
27
|
-
id="tab-3"
|
|
28
|
-
onClick={[Function]}
|
|
29
|
-
onFocus={[Function]}
|
|
30
|
-
onKeyPress={[Function]}
|
|
31
|
-
role="tab"
|
|
32
|
-
tabIndex={0}
|
|
33
|
-
type="button"
|
|
34
|
-
>
|
|
35
|
-
<span>
|
|
36
|
-
Test Tab Label
|
|
37
|
-
</span>
|
|
38
|
-
</button>
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
exports[`<Tab> Snapshots and structure should render icon 1`] = `
|
|
42
|
-
<button
|
|
43
|
-
aria-controls="tab-panel-2"
|
|
44
|
-
aria-selected={false}
|
|
45
|
-
className="lumx-tabs__link"
|
|
46
|
-
id="tab-2"
|
|
47
|
-
onClick={[Function]}
|
|
48
|
-
onFocus={[Function]}
|
|
49
|
-
onKeyPress={[Function]}
|
|
50
|
-
role="tab"
|
|
51
|
-
tabIndex={-1}
|
|
52
|
-
type="button"
|
|
53
|
-
>
|
|
54
|
-
<Icon
|
|
55
|
-
icon="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"
|
|
56
|
-
size="xs"
|
|
57
|
-
/>
|
|
58
|
-
<span>
|
|
59
|
-
Test Tab Label
|
|
60
|
-
</span>
|
|
61
|
-
</button>
|
|
62
|
-
`;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<TabList> Snapshots and structure should render correctly 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
className="lumx-tabs lumx-tabs--layout-fixed lumx-tabs--position-left lumx-tabs--theme-light"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
aria-label="Tab list"
|
|
9
|
-
className="lumx-tabs__links"
|
|
10
|
-
role="tablist"
|
|
11
|
-
>
|
|
12
|
-
<Tab
|
|
13
|
-
key="0"
|
|
14
|
-
label="Tab 0"
|
|
15
|
-
/>
|
|
16
|
-
<Tab
|
|
17
|
-
key="1"
|
|
18
|
-
label="Tab 1"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
`;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<TabPanel> Snapshots and structure should render correctly 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
aria-labelledby="tab-1"
|
|
6
|
-
className="lumx-tab-panel"
|
|
7
|
-
id="tab-panel-1"
|
|
8
|
-
role="tabpanel"
|
|
9
|
-
tabIndex={0}
|
|
10
|
-
>
|
|
11
|
-
Tab panel content
|
|
12
|
-
</div>
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`<TabPanel> Snapshots and structure should render isActive state 1`] = `
|
|
16
|
-
<div
|
|
17
|
-
aria-labelledby="tab-2"
|
|
18
|
-
className="lumx-tab-panel lumx-tab-panel--is-active"
|
|
19
|
-
id="tab-panel-2"
|
|
20
|
-
role="tabpanel"
|
|
21
|
-
tabIndex={0}
|
|
22
|
-
>
|
|
23
|
-
Tab panel content
|
|
24
|
-
</div>
|
|
25
|
-
`;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { TabState, useTabProviderContext, useTabProviderContextState } from './state';
|
|
2
|
-
|
|
3
|
-
export function setupTabProviderMocks(options: any = {}) {
|
|
4
|
-
const changeToTab = jest.fn();
|
|
5
|
-
const mockedHook = jest.fn(
|
|
6
|
-
(): TabState => {
|
|
7
|
-
const index = options.index || 0;
|
|
8
|
-
const isLazy = options.isLazy as any;
|
|
9
|
-
const shouldActivateOnFocus = options.shouldActivateOnFocus as any;
|
|
10
|
-
const isActive = options.isActive || false;
|
|
11
|
-
return {
|
|
12
|
-
isLazy,
|
|
13
|
-
shouldActivateOnFocus,
|
|
14
|
-
changeToTab,
|
|
15
|
-
tabId: `tab-${index}`,
|
|
16
|
-
tabPanelId: `tab-panel-${index}`,
|
|
17
|
-
isActive,
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
(useTabProviderContext as jest.Mock).mockImplementationOnce(mockedHook);
|
|
22
|
-
|
|
23
|
-
const mockedHook2 = jest.fn((): any => {
|
|
24
|
-
const index = options.index || 0;
|
|
25
|
-
const numberOfSteps = options.numberOfSteps || 2;
|
|
26
|
-
return {
|
|
27
|
-
ids: { tab: { length: numberOfSteps } },
|
|
28
|
-
activeTabIndex: index,
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
(useTabProviderContextState as jest.Mock).mockImplementationOnce(mockedHook2);
|
|
32
|
-
return { mockedHook, changeToTab };
|
|
33
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<TextField> Render should render defaults 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
class="lumx-text-field lumx-text-field--has-input lumx-text-field--theme-light"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
class="lumx-text-field__wrapper"
|
|
9
|
-
>
|
|
10
|
-
<div
|
|
11
|
-
class="lumx-text-field__input-wrapper"
|
|
12
|
-
>
|
|
13
|
-
<input
|
|
14
|
-
class="lumx-text-field__input-native lumx-text-field__input-native--text"
|
|
15
|
-
id="fixedId"
|
|
16
|
-
type="text"
|
|
17
|
-
value=""
|
|
18
|
-
/>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
exports[`<TextField> Render should render textarea 1`] = `
|
|
25
|
-
<div
|
|
26
|
-
class="lumx-text-field lumx-text-field--has-textarea lumx-text-field--theme-light"
|
|
27
|
-
>
|
|
28
|
-
<div
|
|
29
|
-
class="lumx-text-field__wrapper"
|
|
30
|
-
>
|
|
31
|
-
<div
|
|
32
|
-
class="lumx-text-field__input-wrapper"
|
|
33
|
-
>
|
|
34
|
-
<textarea
|
|
35
|
-
class="lumx-text-field__input-native lumx-text-field__input-native--textarea"
|
|
36
|
-
id="fixedId"
|
|
37
|
-
rows="2"
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<Tooltip> Snapshots and structure should not wrap Button 1`] = `
|
|
4
|
-
<Fragment>
|
|
5
|
-
<Button
|
|
6
|
-
aria-describedby="tooltip-uid"
|
|
7
|
-
emphasis="high"
|
|
8
|
-
size="m"
|
|
9
|
-
theme="light"
|
|
10
|
-
>
|
|
11
|
-
button
|
|
12
|
-
</Button>
|
|
13
|
-
<Portal
|
|
14
|
-
containerInfo={<body />}
|
|
15
|
-
>
|
|
16
|
-
<div
|
|
17
|
-
aria-label="tooltip1"
|
|
18
|
-
className="lumx-tooltip lumx-tooltip--position-bottom"
|
|
19
|
-
id="tooltip-uid"
|
|
20
|
-
role="tooltip"
|
|
21
|
-
style={
|
|
22
|
-
{
|
|
23
|
-
"left": "0",
|
|
24
|
-
"position": "absolute",
|
|
25
|
-
"top": "0",
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
>
|
|
29
|
-
<div
|
|
30
|
-
className="lumx-tooltip__arrow"
|
|
31
|
-
/>
|
|
32
|
-
<div
|
|
33
|
-
className="lumx-tooltip__inner"
|
|
34
|
-
>
|
|
35
|
-
tooltip1
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</Portal>
|
|
39
|
-
</Fragment>
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
exports[`<Tooltip> Snapshots and structure should not wrap Icon 1`] = `
|
|
43
|
-
<Fragment>
|
|
44
|
-
<Icon
|
|
45
|
-
aria-describedby="tooltip-uid"
|
|
46
|
-
icon="icon"
|
|
47
|
-
/>
|
|
48
|
-
<Portal
|
|
49
|
-
containerInfo={<body />}
|
|
50
|
-
>
|
|
51
|
-
<div
|
|
52
|
-
aria-label="tooltip1"
|
|
53
|
-
className="lumx-tooltip lumx-tooltip--position-bottom"
|
|
54
|
-
id="tooltip-uid"
|
|
55
|
-
role="tooltip"
|
|
56
|
-
style={
|
|
57
|
-
{
|
|
58
|
-
"left": "0",
|
|
59
|
-
"position": "absolute",
|
|
60
|
-
"top": "0",
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
>
|
|
64
|
-
<div
|
|
65
|
-
className="lumx-tooltip__arrow"
|
|
66
|
-
/>
|
|
67
|
-
<div
|
|
68
|
-
className="lumx-tooltip__inner"
|
|
69
|
-
>
|
|
70
|
-
tooltip1
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</Portal>
|
|
74
|
-
</Fragment>
|
|
75
|
-
`;
|
|
76
|
-
|
|
77
|
-
exports[`<Tooltip> Snapshots and structure should render correctly 1`] = `
|
|
78
|
-
<Fragment>
|
|
79
|
-
<div
|
|
80
|
-
aria-describedby="tooltip-uid"
|
|
81
|
-
className="lumx-tooltip-anchor-wrapper"
|
|
82
|
-
>
|
|
83
|
-
Anchor
|
|
84
|
-
</div>
|
|
85
|
-
<Portal
|
|
86
|
-
containerInfo={<body />}
|
|
87
|
-
>
|
|
88
|
-
<div
|
|
89
|
-
aria-label="Tooltip"
|
|
90
|
-
className="lumx-tooltip lumx-tooltip--position-bottom"
|
|
91
|
-
id="tooltip-uid"
|
|
92
|
-
role="tooltip"
|
|
93
|
-
style={
|
|
94
|
-
{
|
|
95
|
-
"left": "0",
|
|
96
|
-
"position": "absolute",
|
|
97
|
-
"top": "0",
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
>
|
|
101
|
-
<div
|
|
102
|
-
className="lumx-tooltip__arrow"
|
|
103
|
-
/>
|
|
104
|
-
<div
|
|
105
|
-
className="lumx-tooltip__inner"
|
|
106
|
-
>
|
|
107
|
-
Tooltip
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
</Portal>
|
|
111
|
-
</Fragment>
|
|
112
|
-
`;
|
|
113
|
-
|
|
114
|
-
exports[`<Tooltip> Snapshots and structure should return children when empty label 1`] = `
|
|
115
|
-
<Fragment>
|
|
116
|
-
<Icon
|
|
117
|
-
icon="icon"
|
|
118
|
-
/>
|
|
119
|
-
</Fragment>
|
|
120
|
-
`;
|
|
121
|
-
|
|
122
|
-
exports[`<Tooltip> Snapshots and structure should work on disabled elements 1`] = `
|
|
123
|
-
<Fragment>
|
|
124
|
-
<div
|
|
125
|
-
aria-describedby="tooltip-uid"
|
|
126
|
-
className="lumx-tooltip-anchor-wrapper"
|
|
127
|
-
>
|
|
128
|
-
<Button
|
|
129
|
-
emphasis="high"
|
|
130
|
-
isDisabled={true}
|
|
131
|
-
size="m"
|
|
132
|
-
theme="light"
|
|
133
|
-
>
|
|
134
|
-
Empty
|
|
135
|
-
</Button>
|
|
136
|
-
</div>
|
|
137
|
-
<Portal
|
|
138
|
-
containerInfo={<body />}
|
|
139
|
-
>
|
|
140
|
-
<div
|
|
141
|
-
aria-label="Tooltip on disabled button"
|
|
142
|
-
className="lumx-tooltip lumx-tooltip--position-bottom"
|
|
143
|
-
id="tooltip-uid"
|
|
144
|
-
role="tooltip"
|
|
145
|
-
style={
|
|
146
|
-
{
|
|
147
|
-
"left": "0",
|
|
148
|
-
"position": "absolute",
|
|
149
|
-
"top": "0",
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
>
|
|
153
|
-
<div
|
|
154
|
-
className="lumx-tooltip__arrow"
|
|
155
|
-
/>
|
|
156
|
-
<div
|
|
157
|
-
className="lumx-tooltip__inner"
|
|
158
|
-
>
|
|
159
|
-
Tooltip on disabled button
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
</Portal>
|
|
163
|
-
</Fragment>
|
|
164
|
-
`;
|
|
165
|
-
|
|
166
|
-
exports[`<Tooltip> Snapshots and structure should wrap children 1`] = `
|
|
167
|
-
<Fragment>
|
|
168
|
-
<div
|
|
169
|
-
aria-describedby="tooltip-uid"
|
|
170
|
-
className="lumx-tooltip-anchor-wrapper"
|
|
171
|
-
>
|
|
172
|
-
children
|
|
173
|
-
</div>
|
|
174
|
-
<Portal
|
|
175
|
-
containerInfo={<body />}
|
|
176
|
-
>
|
|
177
|
-
<div
|
|
178
|
-
aria-label="tooltip1"
|
|
179
|
-
className="lumx-tooltip lumx-tooltip--position-bottom"
|
|
180
|
-
id="tooltip-uid"
|
|
181
|
-
role="tooltip"
|
|
182
|
-
style={
|
|
183
|
-
{
|
|
184
|
-
"left": "0",
|
|
185
|
-
"position": "absolute",
|
|
186
|
-
"top": "0",
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
>
|
|
190
|
-
<div
|
|
191
|
-
className="lumx-tooltip__arrow"
|
|
192
|
-
/>
|
|
193
|
-
<div
|
|
194
|
-
className="lumx-tooltip__inner"
|
|
195
|
-
>
|
|
196
|
-
tooltip1
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
</Portal>
|
|
200
|
-
</Fragment>
|
|
201
|
-
`;
|
|
202
|
-
|
|
203
|
-
exports[`<Tooltip> Snapshots and structure should wrap children 2`] = `
|
|
204
|
-
<Fragment>
|
|
205
|
-
children
|
|
206
|
-
<Portal
|
|
207
|
-
containerInfo={<body />}
|
|
208
|
-
>
|
|
209
|
-
<div
|
|
210
|
-
aria-label="tooltip1"
|
|
211
|
-
className="lumx-tooltip lumx-tooltip--position-bottom"
|
|
212
|
-
id="tooltip-uid"
|
|
213
|
-
role="tooltip"
|
|
214
|
-
style={
|
|
215
|
-
{
|
|
216
|
-
"left": "0",
|
|
217
|
-
"position": "absolute",
|
|
218
|
-
"top": "0",
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
>
|
|
222
|
-
<div
|
|
223
|
-
className="lumx-tooltip__arrow"
|
|
224
|
-
/>
|
|
225
|
-
<div
|
|
226
|
-
className="lumx-tooltip__inner"
|
|
227
|
-
>
|
|
228
|
-
tooltip1
|
|
229
|
-
</div>
|
|
230
|
-
</div>
|
|
231
|
-
</Portal>
|
|
232
|
-
</Fragment>
|
|
233
|
-
`;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<Uploader> Snapshots and structure should render correctly 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
className="lumx-uploader lumx-uploader--aspect-ratio-horizontal lumx-uploader--size-xl lumx-uploader--theme-light lumx-uploader--variant-square"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
className="lumx-uploader__background"
|
|
9
|
-
/>
|
|
10
|
-
<div
|
|
11
|
-
className="lumx-uploader__wrapper"
|
|
12
|
-
/>
|
|
13
|
-
</div>
|
|
14
|
-
`;
|