@innovaccer/design-system 2.5.0-2 → 2.5.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/.all-contributorsrc +170 -0
- package/.github/workflows/jira.yml +1 -2
- package/.github/workflows/main.yml +1 -6
- package/.github/workflows/test.yml +22 -0
- package/CHANGELOG.md +21 -54
- package/CONTRIBUTING.md +23 -0
- package/README.md +124 -75
- package/core/components/atoms/button/Button.tsx +56 -55
- package/core/components/atoms/button/__tests__/Button.test.tsx +3 -12
- package/core/components/atoms/checkbox/Checkbox.tsx +3 -6
- package/core/components/atoms/collapsible/__stories__/index.story.tsx +2 -2
- package/core/components/atoms/dropdown/DropdownList.tsx +1 -1
- package/core/components/atoms/dropdown/__stories__/Options.tsx +15 -0
- package/core/components/atoms/dropdown/__tests__/Dropdown.test.tsx +202 -1
- package/core/components/atoms/dropdown/__tests__/Option.test.tsx +3 -0
- package/core/components/atoms/message/__stories__/CustomDescription.tsx +25 -0
- package/core/components/atoms/metaList/Meta.tsx +3 -1
- package/core/components/atoms/metaList/__tests__/MetaList.test.tsx +30 -36
- package/core/components/atoms/metricInput/MetricInput.tsx +2 -2
- package/core/components/atoms/outsideClick/__stories__/index.story.tsx +1 -1
- package/core/components/atoms/radio/Radio.tsx +7 -10
- package/core/components/atoms/radio/__tests__/Radio.test.tsx +13 -7
- package/core/components/css-utilities/Align/Align.story.tsx +1 -1
- package/core/components/css-utilities/Background/Background.story.tsx +1 -1
- package/core/components/css-utilities/Border/Border.story.tsx +128 -0
- package/core/components/css-utilities/Display/Display.story.tsx +1 -1
- package/core/components/css-utilities/Flex/Flex.story.tsx +1 -1
- package/core/components/css-utilities/Miscellaneous/Miscellaneous.story.tsx +1 -1
- package/core/components/css-utilities/Overflow/Overflow.story.tsx +1 -1
- package/core/components/css-utilities/Position/Position.story.tsx +1 -1
- package/core/components/css-utilities/Sizing/Sizing.story.tsx +1 -1
- package/core/components/css-utilities/Spacing/Spacing.story.tsx +1 -1
- package/core/components/molecules/chatMessage/__tests__/ChatMessage.test.tsx +20 -46
- package/core/components/molecules/dropzone/__tests__/Dropzone.test.tsx +47 -111
- package/core/components/molecules/dropzone/__tests__/Utilities.test.tsx +13 -13
- package/core/components/molecules/editableChipInput/EditableChipInput.tsx +3 -1
- package/core/components/molecules/editableInput/EditableInput.tsx +5 -3
- package/core/components/molecules/editableInput/__stories__/variants/Uncontrolled.story.tsx +1 -1
- package/core/components/molecules/editableInput/__tests__/EditableInput.test.tsx +1 -3
- package/core/components/molecules/emptyState/_tests_/EmptyState.test.tsx +3 -7
- package/core/components/molecules/fileUploader/FileUploaderItem.tsx +13 -2
- package/core/components/molecules/fileUploader/__stories__/index.story.tsx +156 -21
- package/core/components/molecules/fileUploader/__tests__/FileUploader.test.tsx +21 -80
- package/core/components/molecules/fileUploader/__tests__/FileUploaderList.test.tsx +9 -40
- package/core/components/molecules/fullscreenModal/FullscreenModal.tsx +7 -13
- package/core/components/molecules/fullscreenModal/__stories__/Layering.story.tsx +2 -2
- package/core/components/molecules/modal/Modal.tsx +18 -17
- package/core/components/molecules/modal/ModalBody.tsx +1 -1
- package/core/components/molecules/modal/__stories__/Layering.story.tsx +1 -1
- package/core/components/molecules/modal/__stories__/NoFooter.story.tsx +0 -1
- package/core/components/molecules/modal/__stories__/Scrolling.story.tsx +20 -38
- package/core/components/molecules/modal/__tests__/Modal.test.tsx +1 -1
- package/core/components/molecules/sidesheet/Sidesheet.tsx +16 -17
- package/core/components/organisms/choiceList/ChoiceList.tsx +212 -0
- package/core/components/organisms/choiceList/__stories__/Alignment.story.tsx +32 -0
- package/core/components/organisms/choiceList/__stories__/AllowMultiple.story.tsx +23 -0
- package/core/components/organisms/choiceList/__stories__/Controlled.story.tsx +34 -0
- package/core/components/organisms/choiceList/__stories__/index.story.tsx +18 -0
- package/core/components/organisms/choiceList/__tests__/ChoiceList.test.tsx +155 -0
- package/core/components/organisms/choiceList/__tests__/__snapshots__/ChoiceList.test.tsx.snap +3393 -0
- package/core/components/organisms/choiceList/index.tsx +2 -0
- package/core/components/organisms/datePicker/__tests__/DatePicker.test.tsx +136 -46
- package/core/components/organisms/datePicker/__tests__/__snapshots__/DatePicker.test.tsx.snap +2594 -102
- package/core/components/organisms/dateRangePicker/DateRangePicker.tsx +5 -0
- package/core/components/organisms/dateRangePicker/__tests__/DateRangePicker.test.tsx +49 -410
- package/core/components/organisms/dateRangePicker/__tests__/Utilities.test.tsx +39 -0
- package/core/components/organisms/dateRangePicker/__tests__/__snapshots__/DateRangePicker.test.tsx.snap +45390 -2679
- package/core/components/organisms/dateRangePicker/utilities.tsx +2 -5
- package/core/components/organisms/grid/Cell.tsx +5 -4
- package/core/components/organisms/grid/Grid.tsx +1 -1
- package/core/components/organisms/grid/GridCell.tsx +18 -7
- package/core/components/organisms/grid/GridHead.tsx +1 -1
- package/core/components/organisms/grid/GridRow.tsx +5 -12
- package/core/components/organisms/grid/__tests__/Grid.test.tsx +179 -1
- package/core/components/organisms/grid/__tests__/GridCell.test.tsx +218 -0
- package/core/components/organisms/grid/__tests__/__snapshots__/Grid.test.tsx.snap +1024 -0
- package/core/components/organisms/grid/__tests__/rowUtility.test.tsx +62 -0
- package/core/components/organisms/inlineMessage/InlineMessage.tsx +10 -14
- package/core/components/organisms/inlineMessage/__stories__/InlineMessageWithinTable.story.tsx +9 -12
- package/core/components/organisms/inlineMessage/__stories__/variants/Default.story.tsx +2 -4
- package/core/components/organisms/inlineMessage/__stories__/variants/Error.story.tsx +2 -5
- package/core/components/organisms/inlineMessage/__stories__/variants/Info.story.tsx +2 -5
- package/core/components/organisms/inlineMessage/__stories__/variants/Success.story.tsx +2 -5
- package/core/components/organisms/inlineMessage/__stories__/variants/Warning.story.tsx +2 -5
- package/core/components/organisms/inlineMessage/__tests__/InlineMessage.test.tsx +4 -20
- package/core/components/organisms/navigation/VerticalNavigation.tsx +14 -3
- package/core/components/organisms/navigation/__tests__/Navigation.test.tsx +179 -0
- package/core/components/organisms/navigation/__tests__/__snapshots__/Navigation.test.tsx.snap +530 -0
- package/core/components/organisms/table/DraggableDropdown.tsx +1 -0
- package/core/components/organisms/table/Header.tsx +11 -2
- package/core/components/organisms/table/Table.tsx +2 -2
- package/core/components/organisms/table/__stories__/NestedTableWithNestedCard.story.tsx +4 -1
- package/core/components/organisms/table/__stories__/variants/nestedRows.story.tsx +5 -2
- package/core/components/organisms/table/__tests__/Table.test.tsx +292 -0
- package/core/components/organisms/table/__tests__/__snapshots__/Table.test.tsx.snap +349041 -0
- package/core/components/organisms/timePicker/__tests__/TimePicker.test.tsx +15 -66
- package/core/components/patterns/dateRangePicker/withCustomPopover.story.tsx +47 -36
- package/core/index.tsx +1 -1
- package/core/index.type.tsx +1 -0
- package/core/utils/OverlayManager.tsx +1 -3
- package/core/utils/__tests__/__snapshots__/TS.test.tsx.snap +4 -0
- package/core/utils/types.tsx +3 -4
- package/css/dist/index.css +78 -8
- package/css/dist/index.css.map +1 -1
- package/css/src/components/button.css +8 -4
- package/css/src/components/choiceList.css +25 -0
- package/css/src/components/modal.css +1 -2
- package/css/src/utils/border.css +39 -0
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +50 -49
- package/dist/core/components/css-utilities/Border/Border.story.d.ts +13 -0
- package/dist/core/components/organisms/choiceList/ChoiceList.d.ts +33 -0
- package/dist/core/components/organisms/choiceList/index.d.ts +2 -0
- package/dist/core/components/organisms/dateRangePicker/utilities.d.ts +2 -2
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.type.d.ts +1 -0
- package/dist/index.esm.js +207 -58
- package/dist/index.js +209 -57
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/jest.config.js +2 -1
- package/package.json +6 -4
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Navigation component
|
|
4
|
+
type: "horizontal", align: "center", menus: [{"name":"tab1","label":"Tab #1","count":1,"icon":"event"},{"name":"tab2","label":"Tab #2","count":2,"subMenu":[{"name":"tab2child1","label":"tab2child1"},{"name":"tab2child2","label":"tab2child2"}]},{"name":"tab3","label":"Tab #3","count":3,"subMenu":[{"name":"tab3child1","label":"tab3child1"}]}], active: true, onClick: "[Function]", onToggle: "[Function]"
|
|
5
|
+
1`] = `
|
|
6
|
+
Object {
|
|
7
|
+
"asFragment": [Function],
|
|
8
|
+
"baseElement": <body>
|
|
9
|
+
<div>
|
|
10
|
+
<div
|
|
11
|
+
class="Navigation Navigation--horizontal justify-content-center"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
class="HorizontalNav"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
class="HorizontalNav-menu"
|
|
18
|
+
data-test="DesignSystem-HorizontalNav"
|
|
19
|
+
>
|
|
20
|
+
<span
|
|
21
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
22
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
23
|
+
>
|
|
24
|
+
1
|
|
25
|
+
</span>
|
|
26
|
+
<span
|
|
27
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
28
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
29
|
+
>
|
|
30
|
+
Tab #1
|
|
31
|
+
</span>
|
|
32
|
+
</div>
|
|
33
|
+
<div
|
|
34
|
+
class="HorizontalNav-menu"
|
|
35
|
+
data-test="DesignSystem-HorizontalNav"
|
|
36
|
+
>
|
|
37
|
+
<span
|
|
38
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
39
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
40
|
+
>
|
|
41
|
+
2
|
|
42
|
+
</span>
|
|
43
|
+
<span
|
|
44
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
45
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
46
|
+
>
|
|
47
|
+
Tab #2
|
|
48
|
+
</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div
|
|
51
|
+
class="HorizontalNav-menu"
|
|
52
|
+
data-test="DesignSystem-HorizontalNav"
|
|
53
|
+
>
|
|
54
|
+
<span
|
|
55
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
56
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
57
|
+
>
|
|
58
|
+
3
|
|
59
|
+
</span>
|
|
60
|
+
<span
|
|
61
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
62
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
63
|
+
>
|
|
64
|
+
Tab #3
|
|
65
|
+
</span>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</body>,
|
|
71
|
+
"container": <div>
|
|
72
|
+
<div
|
|
73
|
+
class="Navigation Navigation--horizontal justify-content-center"
|
|
74
|
+
>
|
|
75
|
+
<div
|
|
76
|
+
class="HorizontalNav"
|
|
77
|
+
>
|
|
78
|
+
<div
|
|
79
|
+
class="HorizontalNav-menu"
|
|
80
|
+
data-test="DesignSystem-HorizontalNav"
|
|
81
|
+
>
|
|
82
|
+
<span
|
|
83
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
84
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
85
|
+
>
|
|
86
|
+
1
|
|
87
|
+
</span>
|
|
88
|
+
<span
|
|
89
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
90
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
91
|
+
>
|
|
92
|
+
Tab #1
|
|
93
|
+
</span>
|
|
94
|
+
</div>
|
|
95
|
+
<div
|
|
96
|
+
class="HorizontalNav-menu"
|
|
97
|
+
data-test="DesignSystem-HorizontalNav"
|
|
98
|
+
>
|
|
99
|
+
<span
|
|
100
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
101
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
102
|
+
>
|
|
103
|
+
2
|
|
104
|
+
</span>
|
|
105
|
+
<span
|
|
106
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
107
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
108
|
+
>
|
|
109
|
+
Tab #2
|
|
110
|
+
</span>
|
|
111
|
+
</div>
|
|
112
|
+
<div
|
|
113
|
+
class="HorizontalNav-menu"
|
|
114
|
+
data-test="DesignSystem-HorizontalNav"
|
|
115
|
+
>
|
|
116
|
+
<span
|
|
117
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
118
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
119
|
+
>
|
|
120
|
+
3
|
|
121
|
+
</span>
|
|
122
|
+
<span
|
|
123
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
124
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
125
|
+
>
|
|
126
|
+
Tab #3
|
|
127
|
+
</span>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>,
|
|
132
|
+
"debug": [Function],
|
|
133
|
+
"findAllByAltText": [Function],
|
|
134
|
+
"findAllByDisplayValue": [Function],
|
|
135
|
+
"findAllByLabelText": [Function],
|
|
136
|
+
"findAllByPlaceholderText": [Function],
|
|
137
|
+
"findAllByRole": [Function],
|
|
138
|
+
"findAllByTestId": [Function],
|
|
139
|
+
"findAllByText": [Function],
|
|
140
|
+
"findAllByTitle": [Function],
|
|
141
|
+
"findByAltText": [Function],
|
|
142
|
+
"findByDisplayValue": [Function],
|
|
143
|
+
"findByLabelText": [Function],
|
|
144
|
+
"findByPlaceholderText": [Function],
|
|
145
|
+
"findByRole": [Function],
|
|
146
|
+
"findByTestId": [Function],
|
|
147
|
+
"findByText": [Function],
|
|
148
|
+
"findByTitle": [Function],
|
|
149
|
+
"getAllByAltText": [Function],
|
|
150
|
+
"getAllByDisplayValue": [Function],
|
|
151
|
+
"getAllByLabelText": [Function],
|
|
152
|
+
"getAllByPlaceholderText": [Function],
|
|
153
|
+
"getAllByRole": [Function],
|
|
154
|
+
"getAllByTestId": [Function],
|
|
155
|
+
"getAllByText": [Function],
|
|
156
|
+
"getAllByTitle": [Function],
|
|
157
|
+
"getByAltText": [Function],
|
|
158
|
+
"getByDisplayValue": [Function],
|
|
159
|
+
"getByLabelText": [Function],
|
|
160
|
+
"getByPlaceholderText": [Function],
|
|
161
|
+
"getByRole": [Function],
|
|
162
|
+
"getByTestId": [Function],
|
|
163
|
+
"getByText": [Function],
|
|
164
|
+
"getByTitle": [Function],
|
|
165
|
+
"queryAllByAltText": [Function],
|
|
166
|
+
"queryAllByDisplayValue": [Function],
|
|
167
|
+
"queryAllByLabelText": [Function],
|
|
168
|
+
"queryAllByPlaceholderText": [Function],
|
|
169
|
+
"queryAllByRole": [Function],
|
|
170
|
+
"queryAllByTestId": [Function],
|
|
171
|
+
"queryAllByText": [Function],
|
|
172
|
+
"queryAllByTitle": [Function],
|
|
173
|
+
"queryByAltText": [Function],
|
|
174
|
+
"queryByDisplayValue": [Function],
|
|
175
|
+
"queryByLabelText": [Function],
|
|
176
|
+
"queryByPlaceholderText": [Function],
|
|
177
|
+
"queryByRole": [Function],
|
|
178
|
+
"queryByTestId": [Function],
|
|
179
|
+
"queryByText": [Function],
|
|
180
|
+
"queryByTitle": [Function],
|
|
181
|
+
"rerender": [Function],
|
|
182
|
+
"unmount": [Function],
|
|
183
|
+
}
|
|
184
|
+
`;
|
|
185
|
+
|
|
186
|
+
exports[`Navigation component
|
|
187
|
+
type: "horizontal", align: "left", menus: [{"name":"tab1","label":"Tab #1","count":1,"icon":"event"},{"name":"tab2","label":"Tab #2","count":2,"subMenu":[{"name":"tab2child1","label":"tab2child1"},{"name":"tab2child2","label":"tab2child2"}]},{"name":"tab3","label":"Tab #3","count":3,"subMenu":[{"name":"tab3child1","label":"tab3child1"}]}], active: true, onClick: "[Function]", onToggle: "[Function]"
|
|
188
|
+
1`] = `
|
|
189
|
+
Object {
|
|
190
|
+
"asFragment": [Function],
|
|
191
|
+
"baseElement": <body>
|
|
192
|
+
<div>
|
|
193
|
+
<div
|
|
194
|
+
class="Navigation Navigation--horizontal justify-content-start"
|
|
195
|
+
>
|
|
196
|
+
<div
|
|
197
|
+
class="HorizontalNav"
|
|
198
|
+
>
|
|
199
|
+
<div
|
|
200
|
+
class="HorizontalNav-menu"
|
|
201
|
+
data-test="DesignSystem-HorizontalNav"
|
|
202
|
+
>
|
|
203
|
+
<span
|
|
204
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
205
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
206
|
+
>
|
|
207
|
+
1
|
|
208
|
+
</span>
|
|
209
|
+
<span
|
|
210
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
211
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
212
|
+
>
|
|
213
|
+
Tab #1
|
|
214
|
+
</span>
|
|
215
|
+
</div>
|
|
216
|
+
<div
|
|
217
|
+
class="HorizontalNav-menu"
|
|
218
|
+
data-test="DesignSystem-HorizontalNav"
|
|
219
|
+
>
|
|
220
|
+
<span
|
|
221
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
222
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
223
|
+
>
|
|
224
|
+
2
|
|
225
|
+
</span>
|
|
226
|
+
<span
|
|
227
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
228
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
229
|
+
>
|
|
230
|
+
Tab #2
|
|
231
|
+
</span>
|
|
232
|
+
</div>
|
|
233
|
+
<div
|
|
234
|
+
class="HorizontalNav-menu"
|
|
235
|
+
data-test="DesignSystem-HorizontalNav"
|
|
236
|
+
>
|
|
237
|
+
<span
|
|
238
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
239
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
240
|
+
>
|
|
241
|
+
3
|
|
242
|
+
</span>
|
|
243
|
+
<span
|
|
244
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
245
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
246
|
+
>
|
|
247
|
+
Tab #3
|
|
248
|
+
</span>
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
</body>,
|
|
254
|
+
"container": <div>
|
|
255
|
+
<div
|
|
256
|
+
class="Navigation Navigation--horizontal justify-content-start"
|
|
257
|
+
>
|
|
258
|
+
<div
|
|
259
|
+
class="HorizontalNav"
|
|
260
|
+
>
|
|
261
|
+
<div
|
|
262
|
+
class="HorizontalNav-menu"
|
|
263
|
+
data-test="DesignSystem-HorizontalNav"
|
|
264
|
+
>
|
|
265
|
+
<span
|
|
266
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
267
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
268
|
+
>
|
|
269
|
+
1
|
|
270
|
+
</span>
|
|
271
|
+
<span
|
|
272
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
273
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
274
|
+
>
|
|
275
|
+
Tab #1
|
|
276
|
+
</span>
|
|
277
|
+
</div>
|
|
278
|
+
<div
|
|
279
|
+
class="HorizontalNav-menu"
|
|
280
|
+
data-test="DesignSystem-HorizontalNav"
|
|
281
|
+
>
|
|
282
|
+
<span
|
|
283
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
284
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
285
|
+
>
|
|
286
|
+
2
|
|
287
|
+
</span>
|
|
288
|
+
<span
|
|
289
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
290
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
291
|
+
>
|
|
292
|
+
Tab #2
|
|
293
|
+
</span>
|
|
294
|
+
</div>
|
|
295
|
+
<div
|
|
296
|
+
class="HorizontalNav-menu"
|
|
297
|
+
data-test="DesignSystem-HorizontalNav"
|
|
298
|
+
>
|
|
299
|
+
<span
|
|
300
|
+
class="Pills Badge--secondary HorizontalNav-pills"
|
|
301
|
+
data-test="DesignSystem-HorizontalNav--Pills"
|
|
302
|
+
>
|
|
303
|
+
3
|
|
304
|
+
</span>
|
|
305
|
+
<span
|
|
306
|
+
class="Text Text--default Text--regular HorizontalNav-menuText"
|
|
307
|
+
data-test="DesignSystem-HorizontalNav--Text"
|
|
308
|
+
>
|
|
309
|
+
Tab #3
|
|
310
|
+
</span>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
</div>,
|
|
315
|
+
"debug": [Function],
|
|
316
|
+
"findAllByAltText": [Function],
|
|
317
|
+
"findAllByDisplayValue": [Function],
|
|
318
|
+
"findAllByLabelText": [Function],
|
|
319
|
+
"findAllByPlaceholderText": [Function],
|
|
320
|
+
"findAllByRole": [Function],
|
|
321
|
+
"findAllByTestId": [Function],
|
|
322
|
+
"findAllByText": [Function],
|
|
323
|
+
"findAllByTitle": [Function],
|
|
324
|
+
"findByAltText": [Function],
|
|
325
|
+
"findByDisplayValue": [Function],
|
|
326
|
+
"findByLabelText": [Function],
|
|
327
|
+
"findByPlaceholderText": [Function],
|
|
328
|
+
"findByRole": [Function],
|
|
329
|
+
"findByTestId": [Function],
|
|
330
|
+
"findByText": [Function],
|
|
331
|
+
"findByTitle": [Function],
|
|
332
|
+
"getAllByAltText": [Function],
|
|
333
|
+
"getAllByDisplayValue": [Function],
|
|
334
|
+
"getAllByLabelText": [Function],
|
|
335
|
+
"getAllByPlaceholderText": [Function],
|
|
336
|
+
"getAllByRole": [Function],
|
|
337
|
+
"getAllByTestId": [Function],
|
|
338
|
+
"getAllByText": [Function],
|
|
339
|
+
"getAllByTitle": [Function],
|
|
340
|
+
"getByAltText": [Function],
|
|
341
|
+
"getByDisplayValue": [Function],
|
|
342
|
+
"getByLabelText": [Function],
|
|
343
|
+
"getByPlaceholderText": [Function],
|
|
344
|
+
"getByRole": [Function],
|
|
345
|
+
"getByTestId": [Function],
|
|
346
|
+
"getByText": [Function],
|
|
347
|
+
"getByTitle": [Function],
|
|
348
|
+
"queryAllByAltText": [Function],
|
|
349
|
+
"queryAllByDisplayValue": [Function],
|
|
350
|
+
"queryAllByLabelText": [Function],
|
|
351
|
+
"queryAllByPlaceholderText": [Function],
|
|
352
|
+
"queryAllByRole": [Function],
|
|
353
|
+
"queryAllByTestId": [Function],
|
|
354
|
+
"queryAllByText": [Function],
|
|
355
|
+
"queryAllByTitle": [Function],
|
|
356
|
+
"queryByAltText": [Function],
|
|
357
|
+
"queryByDisplayValue": [Function],
|
|
358
|
+
"queryByLabelText": [Function],
|
|
359
|
+
"queryByPlaceholderText": [Function],
|
|
360
|
+
"queryByRole": [Function],
|
|
361
|
+
"queryByTestId": [Function],
|
|
362
|
+
"queryByText": [Function],
|
|
363
|
+
"queryByTitle": [Function],
|
|
364
|
+
"rerender": [Function],
|
|
365
|
+
"unmount": [Function],
|
|
366
|
+
}
|
|
367
|
+
`;
|
|
368
|
+
|
|
369
|
+
exports[`Navigation component
|
|
370
|
+
type: "vertical", menus: [{"name":"tab1","label":"Tab #1","count":1,"icon":"event"},{"name":"tab2","label":"Tab #2","count":2,"subMenu":[{"name":"tab2child1","label":"tab2child1"},{"name":"tab2child2","label":"tab2child2"}]},{"name":"tab3","label":"Tab #3","count":3,"subMenu":[{"name":"tab3child1","label":"tab3child1"}]}], autoCollapse: false, expanded: false, rounded: true, onClick: "[Function]", onToggle: "[Function]"
|
|
371
|
+
1`] = `
|
|
372
|
+
Object {
|
|
373
|
+
"asFragment": [Function],
|
|
374
|
+
"baseElement": <body>
|
|
375
|
+
<div>
|
|
376
|
+
<div
|
|
377
|
+
class="Navigation Navigation--vertical Navigation--collapsed"
|
|
378
|
+
>
|
|
379
|
+
<div
|
|
380
|
+
class="Navigation-body"
|
|
381
|
+
>
|
|
382
|
+
<div
|
|
383
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuWrapper"
|
|
384
|
+
>
|
|
385
|
+
<div
|
|
386
|
+
class="Navigation-menu Navigation-menu--vertical"
|
|
387
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuItem"
|
|
388
|
+
>
|
|
389
|
+
<i
|
|
390
|
+
class="material-icons material-icons-round Icon Icon--default Navigation-menuIcon"
|
|
391
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuIcon"
|
|
392
|
+
style="font-size: 16px; width: 16px;"
|
|
393
|
+
>
|
|
394
|
+
event_round
|
|
395
|
+
</i>
|
|
396
|
+
</div>
|
|
397
|
+
<div
|
|
398
|
+
class="Navigation-subMenu"
|
|
399
|
+
/>
|
|
400
|
+
</div>
|
|
401
|
+
<div
|
|
402
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuWrapper"
|
|
403
|
+
>
|
|
404
|
+
<div
|
|
405
|
+
class="Navigation-menu Navigation-menu--vertical"
|
|
406
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuItem"
|
|
407
|
+
/>
|
|
408
|
+
<div
|
|
409
|
+
class="Navigation-subMenu"
|
|
410
|
+
/>
|
|
411
|
+
</div>
|
|
412
|
+
<div
|
|
413
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuWrapper"
|
|
414
|
+
>
|
|
415
|
+
<div
|
|
416
|
+
class="Navigation-menu Navigation-menu--vertical"
|
|
417
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuItem"
|
|
418
|
+
/>
|
|
419
|
+
<div
|
|
420
|
+
class="Navigation-subMenu"
|
|
421
|
+
/>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
</div>
|
|
426
|
+
</body>,
|
|
427
|
+
"container": <div>
|
|
428
|
+
<div
|
|
429
|
+
class="Navigation Navigation--vertical Navigation--collapsed"
|
|
430
|
+
>
|
|
431
|
+
<div
|
|
432
|
+
class="Navigation-body"
|
|
433
|
+
>
|
|
434
|
+
<div
|
|
435
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuWrapper"
|
|
436
|
+
>
|
|
437
|
+
<div
|
|
438
|
+
class="Navigation-menu Navigation-menu--vertical"
|
|
439
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuItem"
|
|
440
|
+
>
|
|
441
|
+
<i
|
|
442
|
+
class="material-icons material-icons-round Icon Icon--default Navigation-menuIcon"
|
|
443
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuIcon"
|
|
444
|
+
style="font-size: 16px; width: 16px;"
|
|
445
|
+
>
|
|
446
|
+
event_round
|
|
447
|
+
</i>
|
|
448
|
+
</div>
|
|
449
|
+
<div
|
|
450
|
+
class="Navigation-subMenu"
|
|
451
|
+
/>
|
|
452
|
+
</div>
|
|
453
|
+
<div
|
|
454
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuWrapper"
|
|
455
|
+
>
|
|
456
|
+
<div
|
|
457
|
+
class="Navigation-menu Navigation-menu--vertical"
|
|
458
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuItem"
|
|
459
|
+
/>
|
|
460
|
+
<div
|
|
461
|
+
class="Navigation-subMenu"
|
|
462
|
+
/>
|
|
463
|
+
</div>
|
|
464
|
+
<div
|
|
465
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuWrapper"
|
|
466
|
+
>
|
|
467
|
+
<div
|
|
468
|
+
class="Navigation-menu Navigation-menu--vertical"
|
|
469
|
+
data-test="DesignSystem-Navigation-VerticalNavigation--menuItem"
|
|
470
|
+
/>
|
|
471
|
+
<div
|
|
472
|
+
class="Navigation-subMenu"
|
|
473
|
+
/>
|
|
474
|
+
</div>
|
|
475
|
+
</div>
|
|
476
|
+
</div>
|
|
477
|
+
</div>,
|
|
478
|
+
"debug": [Function],
|
|
479
|
+
"findAllByAltText": [Function],
|
|
480
|
+
"findAllByDisplayValue": [Function],
|
|
481
|
+
"findAllByLabelText": [Function],
|
|
482
|
+
"findAllByPlaceholderText": [Function],
|
|
483
|
+
"findAllByRole": [Function],
|
|
484
|
+
"findAllByTestId": [Function],
|
|
485
|
+
"findAllByText": [Function],
|
|
486
|
+
"findAllByTitle": [Function],
|
|
487
|
+
"findByAltText": [Function],
|
|
488
|
+
"findByDisplayValue": [Function],
|
|
489
|
+
"findByLabelText": [Function],
|
|
490
|
+
"findByPlaceholderText": [Function],
|
|
491
|
+
"findByRole": [Function],
|
|
492
|
+
"findByTestId": [Function],
|
|
493
|
+
"findByText": [Function],
|
|
494
|
+
"findByTitle": [Function],
|
|
495
|
+
"getAllByAltText": [Function],
|
|
496
|
+
"getAllByDisplayValue": [Function],
|
|
497
|
+
"getAllByLabelText": [Function],
|
|
498
|
+
"getAllByPlaceholderText": [Function],
|
|
499
|
+
"getAllByRole": [Function],
|
|
500
|
+
"getAllByTestId": [Function],
|
|
501
|
+
"getAllByText": [Function],
|
|
502
|
+
"getAllByTitle": [Function],
|
|
503
|
+
"getByAltText": [Function],
|
|
504
|
+
"getByDisplayValue": [Function],
|
|
505
|
+
"getByLabelText": [Function],
|
|
506
|
+
"getByPlaceholderText": [Function],
|
|
507
|
+
"getByRole": [Function],
|
|
508
|
+
"getByTestId": [Function],
|
|
509
|
+
"getByText": [Function],
|
|
510
|
+
"getByTitle": [Function],
|
|
511
|
+
"queryAllByAltText": [Function],
|
|
512
|
+
"queryAllByDisplayValue": [Function],
|
|
513
|
+
"queryAllByLabelText": [Function],
|
|
514
|
+
"queryAllByPlaceholderText": [Function],
|
|
515
|
+
"queryAllByRole": [Function],
|
|
516
|
+
"queryAllByTestId": [Function],
|
|
517
|
+
"queryAllByText": [Function],
|
|
518
|
+
"queryAllByTitle": [Function],
|
|
519
|
+
"queryByAltText": [Function],
|
|
520
|
+
"queryByDisplayValue": [Function],
|
|
521
|
+
"queryByLabelText": [Function],
|
|
522
|
+
"queryByPlaceholderText": [Function],
|
|
523
|
+
"queryByRole": [Function],
|
|
524
|
+
"queryByTestId": [Function],
|
|
525
|
+
"queryByText": [Function],
|
|
526
|
+
"queryByTitle": [Function],
|
|
527
|
+
"rerender": [Function],
|
|
528
|
+
"unmount": [Function],
|
|
529
|
+
}
|
|
530
|
+
`;
|
|
@@ -89,6 +89,7 @@ export const DraggableDropdown = (props: DraggableDropdownProps) => {
|
|
|
89
89
|
{tempOptions.map((option, index) => {
|
|
90
90
|
return (
|
|
91
91
|
<div
|
|
92
|
+
data-test="DesignSystem-Table-Header--draggableDropdownOption"
|
|
92
93
|
key={option.value}
|
|
93
94
|
className="OptionWrapper d-flex flex-space-between align-items-center cursor-pointer"
|
|
94
95
|
draggable={true}
|
|
@@ -149,6 +149,7 @@ export const Header = (props: HeaderProps) => {
|
|
|
149
149
|
{withSearch && (
|
|
150
150
|
<div className="Header-search">
|
|
151
151
|
<Input
|
|
152
|
+
data-test="DesignSystem-Table-Header--withSearch"
|
|
152
153
|
name="GridHeader-search"
|
|
153
154
|
icon="search"
|
|
154
155
|
placeholder={searchPlaceholder}
|
|
@@ -209,11 +210,19 @@ export const Header = (props: HeaderProps) => {
|
|
|
209
210
|
{withPagination && selectAll?.checked && allowSelectAll && (
|
|
210
211
|
<div className="ml-4">
|
|
211
212
|
{!selectAllRecords ? (
|
|
212
|
-
<Button
|
|
213
|
+
<Button
|
|
214
|
+
data-test="DesignSystem-Table-Header--selectAllItemsButton"
|
|
215
|
+
size="tiny"
|
|
216
|
+
onClick={() => setSelectAllRecords(true)}
|
|
217
|
+
>
|
|
213
218
|
{`Select all ${totalRecords} items`}
|
|
214
219
|
</Button>
|
|
215
220
|
) : (
|
|
216
|
-
<Button
|
|
221
|
+
<Button
|
|
222
|
+
data-test="DesignSystem-Table-Header--clearSelectionItemsButton"
|
|
223
|
+
size="tiny"
|
|
224
|
+
onClick={() => setSelectAllRecords(false)}
|
|
225
|
+
>
|
|
217
226
|
Clear Selection
|
|
218
227
|
</Button>
|
|
219
228
|
)}
|
|
@@ -693,9 +693,9 @@ export class Table extends React.Component<TableProps, TableState> {
|
|
|
693
693
|
const totalPages = getTotalPages(totalRecords, pageSize);
|
|
694
694
|
|
|
695
695
|
return (
|
|
696
|
-
<div {...baseProps} className={`Table${classes}`}>
|
|
696
|
+
<div {...baseProps} className={`Table${classes}`} data-test="DesignSystem-Table-wrapper">
|
|
697
697
|
{withHeader && (
|
|
698
|
-
<div className="Table-header">
|
|
698
|
+
<div className="Table-header" data-test="DesignSystem-Table-header">
|
|
699
699
|
<Header
|
|
700
700
|
{...this.state}
|
|
701
701
|
// updateData={updateData}
|
|
@@ -233,8 +233,11 @@ const customCode = `() => {
|
|
|
233
233
|
const nestedRowRenderer = (props) => {
|
|
234
234
|
const {
|
|
235
235
|
data,
|
|
236
|
+
rowIndex
|
|
236
237
|
} = props;
|
|
237
|
-
|
|
238
|
+
if(rowIndex % 2){
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
238
241
|
return (
|
|
239
242
|
<CardSubdued className="ml-7">
|
|
240
243
|
<div className="d-flex flex-row">
|