@zohodesk/components 1.0.0-temp-166 → 1.0.0-temp-167

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 (142) hide show
  1. package/README.md +20 -0
  2. package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +24 -24
  3. package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +24 -24
  4. package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +24 -24
  5. package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +24 -24
  6. package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +24 -24
  7. package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +24 -24
  8. package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +24 -24
  9. package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +24 -24
  10. package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +24 -24
  11. package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +24 -24
  12. package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +24 -24
  13. package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +24 -24
  14. package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +24 -24
  15. package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +24 -24
  16. package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +24 -24
  17. package/es/Button/__tests__/Button.spec.js +61 -0
  18. package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
  19. package/es/Buttongroup/Buttongroup.js +1 -1
  20. package/es/DateTime/DateTime.js +2 -2
  21. package/es/DropBox/DropBox.js +24 -12
  22. package/es/DropBox/props/defaultProps.js +2 -1
  23. package/es/DropBox/props/propTypes.js +2 -1
  24. package/es/ListItem/ListContainer.js +3 -2
  25. package/es/ListItem/ListItem.js +8 -3
  26. package/es/ListItem/ListItemWithAvatar.js +8 -3
  27. package/es/ListItem/ListItemWithCheckBox.js +5 -1
  28. package/es/ListItem/ListItemWithIcon.js +8 -3
  29. package/es/ListItem/ListItemWithRadio.js +5 -1
  30. package/es/MultiSelect/props/propTypes.js +1 -1
  31. package/es/Select/Select.js +2 -0
  32. package/lib/Button/__tests__/Button.spec.js +62 -0
  33. package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
  34. package/lib/Buttongroup/Buttongroup.js +1 -1
  35. package/lib/DateTime/DateTime.js +2 -2
  36. package/lib/DropBox/DropBox.js +26 -12
  37. package/lib/DropBox/props/defaultProps.js +2 -1
  38. package/lib/DropBox/props/propTypes.js +2 -1
  39. package/lib/ListItem/ListContainer.js +4 -2
  40. package/lib/ListItem/ListItem.js +14 -3
  41. package/lib/ListItem/ListItemWithAvatar.js +14 -3
  42. package/lib/ListItem/ListItemWithCheckBox.js +12 -1
  43. package/lib/ListItem/ListItemWithIcon.js +14 -3
  44. package/lib/ListItem/ListItemWithRadio.js +12 -1
  45. package/lib/MultiSelect/props/propTypes.js +1 -1
  46. package/lib/Select/Select.js +2 -0
  47. package/package.json +21 -13
  48. package/postPublish.js +8 -0
  49. package/prePublish.js +70 -0
  50. package/result.json +1 -0
  51. package/es/Accordion/__tests__/Accordion.spec.js +0 -79
  52. package/es/Animation/__tests__/Animation.spec.js +0 -17
  53. package/es/Avatar/__tests__/Avatar.spec.js +0 -161
  54. package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -288
  55. package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -76
  56. package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -226
  57. package/es/Buttongroup/__test__/Buttongroup.spec.js +0 -73
  58. package/es/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
  59. package/es/Card/__tests__/Card.spec.js +0 -36
  60. package/es/CheckBox/__tests__/CheckBox.spec.js +0 -12
  61. package/es/DateTime/__tests__/CalendarView.spec.js +0 -33
  62. package/es/DateTime/__tests__/DateTime.spec.js +0 -115
  63. package/es/DateTime/__tests__/DateWidget.spec.js +0 -75
  64. package/es/DropBox/__tests__/DropBox.spec.js +0 -81
  65. package/es/DropDown/__tests__/DropDown.spec.js +0 -44
  66. package/es/DropDown/__tests__/DropDownItem.spec.js +0 -45
  67. package/es/DropDown/__tests__/DropDownSearch.spec.js +0 -11
  68. package/es/Label/__tests__/Label.spec.js +0 -120
  69. package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -101
  70. package/es/Layout/__tests__/Box.spec.js +0 -114
  71. package/es/Layout/__tests__/Container.spec.js +0 -120
  72. package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -160
  73. package/es/PopOver/__tests__/PopOver.spec.js +0 -14
  74. package/es/Popup/__tests__/Popup.spec.js +0 -134
  75. package/es/Radio/__tests__/Radiospec.js +0 -23
  76. package/es/Ribbon/__tests__/Ribbon.spec.js +0 -168
  77. package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -163
  78. package/es/Select/__tests__/Select.spec.js +0 -345
  79. package/es/Stencils/__tests__/Stencils.spec.js +0 -69
  80. package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -49
  81. package/es/Tab/__tests__/Tab.spec.js +0 -117
  82. package/es/Tab/__tests__/TabContent.spec.js +0 -16
  83. package/es/Tab/__tests__/TabContentWrapper.spec.js +0 -50
  84. package/es/Tab/__tests__/TabWrapper.spec.js +0 -86
  85. package/es/Tab/__tests__/Tabs.spec.js +0 -115
  86. package/es/Tag/__tests__/Tag.spec.js +0 -28
  87. package/es/TextBox/__tests__/TextBox.spec.js +0 -189
  88. package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
  89. package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -212
  90. package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
  91. package/es/Textarea/__tests__/Textarea.spec.js +0 -171
  92. package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
  93. package/es/Tooltip/__tests__/Tooltip.spec.js +0 -52
  94. package/es/utils/__tests__/constructFullName.spec.js +0 -9
  95. package/es/utils/__tests__/debounce.spec.js +0 -37
  96. package/es/utils/__tests__/getInitial.spec.js +0 -23
  97. package/lib/Accordion/__tests__/Accordion.spec.js +0 -85
  98. package/lib/Animation/__tests__/Animation.spec.js +0 -23
  99. package/lib/Avatar/__tests__/Avatar.spec.js +0 -208
  100. package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -288
  101. package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -92
  102. package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -226
  103. package/lib/Buttongroup/__test__/Buttongroup.spec.js +0 -86
  104. package/lib/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
  105. package/lib/Card/__tests__/Card.spec.js +0 -56
  106. package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -18
  107. package/lib/DateTime/__tests__/CalendarView.spec.js +0 -45
  108. package/lib/DateTime/__tests__/DateTime.spec.js +0 -127
  109. package/lib/DateTime/__tests__/DateWidget.spec.js +0 -81
  110. package/lib/DropBox/__tests__/DropBox.spec.js +0 -87
  111. package/lib/DropDown/__tests__/DropDown.spec.js +0 -50
  112. package/lib/DropDown/__tests__/DropDownItem.spec.js +0 -51
  113. package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -17
  114. package/lib/Label/__tests__/Label.spec.js +0 -137
  115. package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -101
  116. package/lib/Layout/__tests__/Box.spec.js +0 -121
  117. package/lib/Layout/__tests__/Container.spec.js +0 -127
  118. package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -170
  119. package/lib/PopOver/__tests__/PopOver.spec.js +0 -20
  120. package/lib/Popup/__tests__/Popup.spec.js +0 -192
  121. package/lib/Radio/__tests__/Radiospec.js +0 -29
  122. package/lib/Ribbon/__tests__/Ribbon.spec.js +0 -193
  123. package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -163
  124. package/lib/Select/__tests__/Select.spec.js +0 -383
  125. package/lib/Stencils/__tests__/Stencils.spec.js +0 -84
  126. package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -49
  127. package/lib/Tab/__tests__/Tab.spec.js +0 -123
  128. package/lib/Tab/__tests__/TabContent.spec.js +0 -22
  129. package/lib/Tab/__tests__/TabContentWrapper.spec.js +0 -59
  130. package/lib/Tab/__tests__/TabWrapper.spec.js +0 -100
  131. package/lib/Tab/__tests__/Tabs.spec.js +0 -123
  132. package/lib/Tag/__tests__/Tag.spec.js +0 -35
  133. package/lib/TextBox/__tests__/TextBox.spec.js +0 -205
  134. package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
  135. package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -228
  136. package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
  137. package/lib/Textarea/__tests__/Textarea.spec.js +0 -186
  138. package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
  139. package/lib/Tooltip/__tests__/Tooltip.spec.js +0 -98
  140. package/lib/utils/__tests__/constructFullName.spec.js +0 -12
  141. package/lib/utils/__tests__/debounce.spec.js +0 -40
  142. package/lib/utils/__tests__/getInitial.spec.js +0 -26
@@ -0,0 +1,62 @@
1
+ // import React from 'react';
2
+ // import Button from '../Button';
3
+ // import {render} from "@testing-library/react"
4
+ // describe('Button component', () => {
5
+ // test('Should be render with the basic set of default props', () => {
6
+ // const { asFragment } = render(<Button />);
7
+ // expect(asFragment()).toMatchSnapshot();
8
+ // });
9
+ // const palette = ['plainPrimary', 'plainSecondary', 'primary', 'primaryFilled', 'dangerFilled', 'secondary', 'secondaryFilled', 'successFilled', 'info', 'tertiaryFilled'];
10
+ // test.each(palette)('Should render palette of buttons - %s', (palette) => {
11
+ // const { asFragment } = render(<Button palette={palette} />);
12
+ // expect(asFragment()).toMatchSnapshot();
13
+ // });
14
+ // const size = ['small', 'medium', 'large', 'xlarge'];
15
+ // test.each(size)('Should render Sizes of buttons - %s', (size) => {
16
+ // const { asFragment } = render(<Button size={size} />);
17
+ // expect(asFragment()).toMatchSnapshot();
18
+ // });
19
+ // const status = ['loading', 'success', 'none'];
20
+ // test.each(status)('Should render Status of buttons - %s', (status) => {
21
+ // const { asFragment } = render(<Button status={status} />);
22
+ // expect(asFragment()).toMatchSnapshot();
23
+ // });
24
+ // const customStatus = ['loading', 'success'];
25
+ // test.each(customStatus)('Should render CustomStatusclassname of buttons - %s', (customStatus) => {
26
+ // const { asFragment } = render(<Button status={customStatus} customClass={{customStatus:"customStautusClassName"}} />);
27
+ // expect(asFragment()).toMatchSnapshot();
28
+ // });
29
+ // test('Should be render with the basic set of default props with disabled is true', () => {
30
+ // const { asFragment } = render(<Button disabled />);
31
+ // expect(asFragment()).toMatchSnapshot();
32
+ // });
33
+ // test('Should be render with the basic set of default props with isBold is false', () => {
34
+ // const { asFragment } = render(<Button isBold={false} />);
35
+ // expect(asFragment()).toMatchSnapshot();
36
+ // });
37
+ // test('Should be render with the basic set of default props with rounded is true', () => {
38
+ // const { asFragment } = render(<Button rounded />);
39
+ // expect(asFragment()).toMatchSnapshot();
40
+ // });
41
+ // test('Should be render with the basic set of default props with needAppearance is false', () => {
42
+ // const { asFragment } = render(<Button needAppearance={false} />);
43
+ // expect(asFragment()).toMatchSnapshot();
44
+ // });
45
+ // test('Should be render with the basic set customButtonclass with buttonClass ', () => {
46
+ // const { asFragment } = render(<Button customClass={{customButton:"customButtonClass"}} />);
47
+ // expect(asFragment()).toMatchSnapshot();
48
+ // });
49
+ // test('Should be render with the basic set customstatusSize props with buttonClass ', () => {
50
+ // const { asFragment } = render(<Button customClass={{customStatusSize:"customButtonClass"}} />);
51
+ // expect(asFragment()).toMatchSnapshot();
52
+ // });
53
+ // test('Should be render with the basic set customstyle ', () => {
54
+ // const { asFragment } = render(<Button customStyle={{bold: "buttonBold"}} />);
55
+ // expect(asFragment()).toMatchSnapshot();
56
+ // });
57
+ // test('Should be render with the customstyle with medium ', () => {
58
+ // const { asFragment } = render(<Button customStyle={{$medium: "buttonMedium"}} />);
59
+ // expect(asFragment()).toMatchSnapshot();
60
+ // });
61
+ // });
62
+ "use strict";
@@ -0,0 +1,440 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Button component Should be render with the basic set customButtonclass with buttonClass 1`] = `
4
+ <DocumentFragment>
5
+ <button
6
+ class="customButtonClass bold primary medium"
7
+ data-id="buttonComp"
8
+ data-selector-id="button"
9
+ data-test-id="buttonComp"
10
+ type="button"
11
+ >
12
+ Button
13
+ </button>
14
+ </DocumentFragment>
15
+ `;
16
+
17
+ exports[`Button component Should be render with the basic set customstatusSize props with buttonClass 1`] = `
18
+ <DocumentFragment>
19
+ <button
20
+ class="bold primary medium"
21
+ data-id="buttonComp"
22
+ data-selector-id="button"
23
+ data-test-id="buttonComp"
24
+ type="button"
25
+ >
26
+ Button
27
+ </button>
28
+ </DocumentFragment>
29
+ `;
30
+
31
+ exports[`Button component Should be render with the basic set customstyle 1`] = `
32
+ <DocumentFragment>
33
+ <button
34
+ class="bold buttonBold primary medium"
35
+ data-id="buttonComp"
36
+ data-selector-id="button"
37
+ data-test-id="buttonComp"
38
+ type="button"
39
+ >
40
+ Button
41
+ </button>
42
+ </DocumentFragment>
43
+ `;
44
+
45
+ exports[`Button component Should be render with the basic set of default props 1`] = `
46
+ <DocumentFragment>
47
+ <button
48
+ class="bold primary medium"
49
+ data-id="buttonComp"
50
+ data-selector-id="button"
51
+ data-test-id="buttonComp"
52
+ type="button"
53
+ >
54
+ Button
55
+ </button>
56
+ </DocumentFragment>
57
+ `;
58
+
59
+ exports[`Button component Should be render with the basic set of default props with disabled is true 1`] = `
60
+ <DocumentFragment>
61
+ <button
62
+ class="bold primary medium"
63
+ data-id="buttonComp_disabled"
64
+ data-selector-id="button"
65
+ data-test-id="buttonComp_disabled"
66
+ disabled=""
67
+ type="button"
68
+ >
69
+ Button
70
+ </button>
71
+ </DocumentFragment>
72
+ `;
73
+
74
+ exports[`Button component Should be render with the basic set of default props with isBold is false 1`] = `
75
+ <DocumentFragment>
76
+ <button
77
+ class="primary medium"
78
+ data-id="buttonComp"
79
+ data-selector-id="button"
80
+ data-test-id="buttonComp"
81
+ type="button"
82
+ >
83
+ Button
84
+ </button>
85
+ </DocumentFragment>
86
+ `;
87
+
88
+ exports[`Button component Should be render with the basic set of default props with needAppearance is false 1`] = `
89
+ <DocumentFragment>
90
+ <button
91
+ class="bold"
92
+ data-id="buttonComp"
93
+ data-selector-id="button"
94
+ data-test-id="buttonComp"
95
+ type="button"
96
+ >
97
+ Button
98
+ </button>
99
+ </DocumentFragment>
100
+ `;
101
+
102
+ exports[`Button component Should be render with the basic set of default props with rounded is true 1`] = `
103
+ <DocumentFragment>
104
+ <button
105
+ class="bold primary rounded medium"
106
+ data-id="buttonComp"
107
+ data-selector-id="button"
108
+ data-test-id="buttonComp"
109
+ type="button"
110
+ >
111
+ Button
112
+ </button>
113
+ </DocumentFragment>
114
+ `;
115
+
116
+ exports[`Button component Should be render with the customstyle with medium 1`] = `
117
+ <DocumentFragment>
118
+ <button
119
+ class="bold primary buttonMedium"
120
+ data-id="buttonComp"
121
+ data-selector-id="button"
122
+ data-test-id="buttonComp"
123
+ type="button"
124
+ >
125
+ Button
126
+ </button>
127
+ </DocumentFragment>
128
+ `;
129
+
130
+ exports[`Button component Should render CustomStatusclassname of buttons - loading 1`] = `
131
+ <DocumentFragment>
132
+ <button
133
+ class="bold primary medium loader"
134
+ data-id="buttonComp"
135
+ data-selector-id="button"
136
+ data-test-id="buttonComp"
137
+ disabled=""
138
+ type="button"
139
+ >
140
+ Button
141
+ <div
142
+ class="overlay"
143
+ >
144
+ <div
145
+ class="loading mediumloading"
146
+ >
147
+ <div
148
+ class="customStautusClassName loadingelement primaryelement"
149
+ />
150
+ </div>
151
+ </div>
152
+ </button>
153
+ </DocumentFragment>
154
+ `;
155
+
156
+ exports[`Button component Should render CustomStatusclassname of buttons - success 1`] = `
157
+ <DocumentFragment>
158
+ <button
159
+ class="bold primary medium loader"
160
+ data-id="buttonComp"
161
+ data-selector-id="button"
162
+ data-test-id="buttonComp"
163
+ type="button"
164
+ >
165
+ Button
166
+ <div
167
+ class="overlay"
168
+ >
169
+ <div
170
+ class="success"
171
+ >
172
+ <div
173
+ class="customStautusClassName successelement primarysuccess"
174
+ />
175
+ </div>
176
+ </div>
177
+ </button>
178
+ </DocumentFragment>
179
+ `;
180
+
181
+ exports[`Button component Should render Sizes of buttons - large 1`] = `
182
+ <DocumentFragment>
183
+ <button
184
+ class="bold primary large"
185
+ data-id="buttonComp"
186
+ data-selector-id="button"
187
+ data-test-id="buttonComp"
188
+ type="button"
189
+ >
190
+ Button
191
+ </button>
192
+ </DocumentFragment>
193
+ `;
194
+
195
+ exports[`Button component Should render Sizes of buttons - medium 1`] = `
196
+ <DocumentFragment>
197
+ <button
198
+ class="bold primary medium"
199
+ data-id="buttonComp"
200
+ data-selector-id="button"
201
+ data-test-id="buttonComp"
202
+ type="button"
203
+ >
204
+ Button
205
+ </button>
206
+ </DocumentFragment>
207
+ `;
208
+
209
+ exports[`Button component Should render Sizes of buttons - small 1`] = `
210
+ <DocumentFragment>
211
+ <button
212
+ class="bold primary small"
213
+ data-id="buttonComp"
214
+ data-selector-id="button"
215
+ data-test-id="buttonComp"
216
+ type="button"
217
+ >
218
+ Button
219
+ </button>
220
+ </DocumentFragment>
221
+ `;
222
+
223
+ exports[`Button component Should render Sizes of buttons - xlarge 1`] = `
224
+ <DocumentFragment>
225
+ <button
226
+ class="bold primary xlarge"
227
+ data-id="buttonComp"
228
+ data-selector-id="button"
229
+ data-test-id="buttonComp"
230
+ type="button"
231
+ >
232
+ Button
233
+ </button>
234
+ </DocumentFragment>
235
+ `;
236
+
237
+ exports[`Button component Should render Status of buttons - loading 1`] = `
238
+ <DocumentFragment>
239
+ <button
240
+ class="bold primary medium loader"
241
+ data-id="buttonComp"
242
+ data-selector-id="button"
243
+ data-test-id="buttonComp"
244
+ disabled=""
245
+ type="button"
246
+ >
247
+ Button
248
+ <div
249
+ class="overlay"
250
+ >
251
+ <div
252
+ class="loading mediumloading"
253
+ >
254
+ <div
255
+ class="loadingelement primaryelement"
256
+ />
257
+ </div>
258
+ </div>
259
+ </button>
260
+ </DocumentFragment>
261
+ `;
262
+
263
+ exports[`Button component Should render Status of buttons - none 1`] = `
264
+ <DocumentFragment>
265
+ <button
266
+ class="bold primary medium"
267
+ data-id="buttonComp"
268
+ data-selector-id="button"
269
+ data-test-id="buttonComp"
270
+ type="button"
271
+ >
272
+ Button
273
+ </button>
274
+ </DocumentFragment>
275
+ `;
276
+
277
+ exports[`Button component Should render Status of buttons - success 1`] = `
278
+ <DocumentFragment>
279
+ <button
280
+ class="bold primary medium loader"
281
+ data-id="buttonComp"
282
+ data-selector-id="button"
283
+ data-test-id="buttonComp"
284
+ type="button"
285
+ >
286
+ Button
287
+ <div
288
+ class="overlay"
289
+ >
290
+ <div
291
+ class="success"
292
+ >
293
+ <div
294
+ class="successelement primarysuccess"
295
+ />
296
+ </div>
297
+ </div>
298
+ </button>
299
+ </DocumentFragment>
300
+ `;
301
+
302
+ exports[`Button component Should render palette of buttons - dangerFilled 1`] = `
303
+ <DocumentFragment>
304
+ <button
305
+ class="bold dangerfilled medium"
306
+ data-id="buttonComp"
307
+ data-selector-id="button"
308
+ data-test-id="buttonComp"
309
+ type="button"
310
+ >
311
+ Button
312
+ </button>
313
+ </DocumentFragment>
314
+ `;
315
+
316
+ exports[`Button component Should render palette of buttons - info 1`] = `
317
+ <DocumentFragment>
318
+ <button
319
+ class="bold medium"
320
+ data-id="buttonComp"
321
+ data-selector-id="button"
322
+ data-test-id="buttonComp"
323
+ type="button"
324
+ >
325
+ Button
326
+ </button>
327
+ </DocumentFragment>
328
+ `;
329
+
330
+ exports[`Button component Should render palette of buttons - plainPrimary 1`] = `
331
+ <DocumentFragment>
332
+ <button
333
+ class="bold plainprimary medium"
334
+ data-id="buttonComp"
335
+ data-selector-id="button"
336
+ data-test-id="buttonComp"
337
+ type="button"
338
+ >
339
+ Button
340
+ </button>
341
+ </DocumentFragment>
342
+ `;
343
+
344
+ exports[`Button component Should render palette of buttons - plainSecondary 1`] = `
345
+ <DocumentFragment>
346
+ <button
347
+ class="bold plainsecondary medium"
348
+ data-id="buttonComp"
349
+ data-selector-id="button"
350
+ data-test-id="buttonComp"
351
+ type="button"
352
+ >
353
+ Button
354
+ </button>
355
+ </DocumentFragment>
356
+ `;
357
+
358
+ exports[`Button component Should render palette of buttons - primary 1`] = `
359
+ <DocumentFragment>
360
+ <button
361
+ class="bold primary medium"
362
+ data-id="buttonComp"
363
+ data-selector-id="button"
364
+ data-test-id="buttonComp"
365
+ type="button"
366
+ >
367
+ Button
368
+ </button>
369
+ </DocumentFragment>
370
+ `;
371
+
372
+ exports[`Button component Should render palette of buttons - primaryFilled 1`] = `
373
+ <DocumentFragment>
374
+ <button
375
+ class="bold primaryfilled medium"
376
+ data-id="buttonComp"
377
+ data-selector-id="button"
378
+ data-test-id="buttonComp"
379
+ type="button"
380
+ >
381
+ Button
382
+ </button>
383
+ </DocumentFragment>
384
+ `;
385
+
386
+ exports[`Button component Should render palette of buttons - secondary 1`] = `
387
+ <DocumentFragment>
388
+ <button
389
+ class="bold secondary medium"
390
+ data-id="buttonComp"
391
+ data-selector-id="button"
392
+ data-test-id="buttonComp"
393
+ type="button"
394
+ >
395
+ Button
396
+ </button>
397
+ </DocumentFragment>
398
+ `;
399
+
400
+ exports[`Button component Should render palette of buttons - secondaryFilled 1`] = `
401
+ <DocumentFragment>
402
+ <button
403
+ class="bold secondaryfilled medium"
404
+ data-id="buttonComp"
405
+ data-selector-id="button"
406
+ data-test-id="buttonComp"
407
+ type="button"
408
+ >
409
+ Button
410
+ </button>
411
+ </DocumentFragment>
412
+ `;
413
+
414
+ exports[`Button component Should render palette of buttons - successFilled 1`] = `
415
+ <DocumentFragment>
416
+ <button
417
+ class="bold successfilled medium"
418
+ data-id="buttonComp"
419
+ data-selector-id="button"
420
+ data-test-id="buttonComp"
421
+ type="button"
422
+ >
423
+ Button
424
+ </button>
425
+ </DocumentFragment>
426
+ `;
427
+
428
+ exports[`Button component Should render palette of buttons - tertiaryFilled 1`] = `
429
+ <DocumentFragment>
430
+ <button
431
+ class="bold tertiaryfilled medium"
432
+ data-id="buttonComp"
433
+ data-selector-id="button"
434
+ data-test-id="buttonComp"
435
+ type="button"
436
+ >
437
+ Button
438
+ </button>
439
+ </DocumentFragment>
440
+ `;
@@ -61,7 +61,7 @@ var Buttongroup = /*#__PURE__*/function (_React$Component) {
61
61
  dataId = _this$props.dataId,
62
62
  dataSelectorId = _this$props.dataSelectorId;
63
63
  var btnGroup = [];
64
- children.forEach(function (child) {
64
+ children && children.forEach(function (child) {
65
65
  var btnRight = /*#__PURE__*/_react["default"].createElement("span", {
66
66
  className: _ButtongroupModule["default"][type]
67
67
  }, child);
@@ -182,8 +182,8 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
182
182
  if (timeZone && value) {
183
183
  result = _datetimejs["default"].toDate(_datetimejs["default"].tz.utcToTz(value, timeZone));
184
184
  } else {
185
- value = value.replace('Z', '');
186
- result = new Date(value);
185
+ value = value ? value.replace('Z', '') : null;
186
+ result = value ? new Date(value) : new Date();
187
187
  }
188
188
  } else {
189
189
  if (value) {
@@ -38,7 +38,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
38
38
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
39
39
 
40
40
  function DropBox(props) {
41
- var focusRef = (0, _react.useRef)(null);
41
+ var dropBoxRef = (0, _react.useRef)(null);
42
42
  var DropBoxContext = (0, _react.useContext)(_LibraryContextInit["default"]);
43
43
  var needResponsive = props.needResponsive,
44
44
  portalId = props.portalId,
@@ -46,7 +46,20 @@ function DropBox(props) {
46
46
  isAbsolutePositioningNeeded = props.isAbsolutePositioningNeeded,
47
47
  isRestrictScroll = props.isRestrictScroll,
48
48
  needFocusScope = props.needFocusScope,
49
- onClose = props.onClose;
49
+ onClose = props.onClose,
50
+ customProps = props.customProps;
51
+ var _customProps$focusSco = customProps.focusScopeProps,
52
+ focusScopeProps = _customProps$focusSco === void 0 ? {} : _customProps$focusSco;
53
+ var _focusScopeProps$auto = focusScopeProps.autoFocus,
54
+ autoFocus = _focusScopeProps$auto === void 0 ? true : _focusScopeProps$auto,
55
+ _focusScopeProps$rest = focusScopeProps.restoreFocus,
56
+ restoreFocus = _focusScopeProps$rest === void 0 ? true : _focusScopeProps$rest,
57
+ _focusScopeProps$need = focusScopeProps.needArrowLoop,
58
+ needArrowLoop = _focusScopeProps$need === void 0 ? true : _focusScopeProps$need,
59
+ _focusScopeProps$need2 = focusScopeProps.needTabLoop,
60
+ needTabLoop = _focusScopeProps$need2 === void 0 ? false : _focusScopeProps$need2,
61
+ _focusScopeProps$enab = focusScopeProps.enableEnterAction,
62
+ enableEnterAction = _focusScopeProps$enab === void 0 ? true : _focusScopeProps$enab;
50
63
 
51
64
  var _ref = DropBoxContext || {},
52
65
  direction = _ref.direction;
@@ -66,22 +79,23 @@ function DropBox(props) {
66
79
  var _cssJSLogic = (0, _cssJSLogic2["default"])(props),
67
80
  zIndexStyle = _cssJSLogic.zIndexStyle;
68
81
 
69
- var dropBoxEle = needFocusScope ? /*#__PURE__*/_react["default"].createElement(_FocusScope["default"], {
70
- focusClose: onClose,
71
- elementRef: focusRef,
72
- autoFocus: true,
73
- restoreFocus: true,
74
- focusArrowLoop: true,
75
- enableEnterAction: true
76
- }, /*#__PURE__*/_react["default"].createElement(_DropBoxElement["default"], _extends({
82
+ var dropBoxEle = needFocusScope ? /*#__PURE__*/_react["default"].createElement(_FocusScope["default"], _extends({
83
+ onClose: onClose,
84
+ elementRef: dropBoxRef,
85
+ autoFocus: autoFocus,
86
+ restoreFocus: restoreFocus,
87
+ needArrowLoop: needArrowLoop,
88
+ needTabLoop: needTabLoop,
89
+ enableEnterAction: enableEnterAction
90
+ }, focusScopeProps), /*#__PURE__*/_react["default"].createElement(_DropBoxElement["default"], _extends({
77
91
  isModel: isModel,
78
92
  direction: direction
79
93
  }, props, {
80
94
  zIndexStyle: zIndexStyle,
81
- subContainerRef: focusRef
95
+ subContainerRef: dropBoxRef
82
96
  }))) : /*#__PURE__*/_react["default"].createElement(_DropBoxElement["default"], _extends({
83
97
  isModel: isModel,
84
- subContainerRef: focusRef,
98
+ subContainerRef: dropBoxRef,
85
99
  direction: direction
86
100
  }, props, {
87
101
  zIndexStyle: zIndexStyle
@@ -20,7 +20,8 @@ var defaultProps = {
20
20
  isAbsolutePositioningNeeded: true,
21
21
  isRestrictScroll: false,
22
22
  needFocusScope: false,
23
- needAutoZindex: true
23
+ needAutoZindex: true,
24
+ customProps: {}
24
25
  };
25
26
  exports.defaultProps = defaultProps;
26
27
 
@@ -24,7 +24,8 @@ var propTypes = {
24
24
  isAbsolutePositioningNeeded: _propTypes["default"].bool,
25
25
  isRestrictScroll: _propTypes["default"].bool,
26
26
  needFocusScope: _propTypes["default"].bool,
27
- needAutoZindex: _propTypes["default"].bool
27
+ needAutoZindex: _propTypes["default"].bool,
28
+ customProps: _propTypes["default"].object
28
29
  };
29
30
  exports.propTypes = propTypes;
30
31
 
@@ -70,7 +70,9 @@ var ListContainer = function ListContainer(props) {
70
70
 
71
71
  var role = a11y.role,
72
72
  ariaSelected = a11y.ariaSelected,
73
- ariaLabel = a11y.ariaLabel;
73
+ ariaLabel = a11y.ariaLabel,
74
+ _a11y$insetFocus = a11y.insetFocus,
75
+ insetFocus = _a11y$insetFocus === void 0 ? true : _a11y$insetFocus;
74
76
  var options = {};
75
77
 
76
78
  if (isLink) {
@@ -88,7 +90,7 @@ var ListContainer = function ListContainer(props) {
88
90
 
89
91
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, _extends({
90
92
  role: role,
91
- "data-a11y-inside-focus": true,
93
+ "data-a11y-inset-focus": insetFocus,
92
94
  "aria-selected": ariaSelected,
93
95
  "aria-label": ariaLabel,
94
96
  isCover: false,
@@ -25,6 +25,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
25
25
 
26
26
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
27
 
28
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
29
+
30
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
31
+
32
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
33
+
28
34
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
35
 
30
36
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -125,12 +131,17 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
125
131
  customListItem = _customClass$customLi === void 0 ? '' : _customClass$customLi,
126
132
  _customClass$customTi = customClass.customTickIcon,
127
133
  customTickIcon = _customClass$customTi === void 0 ? '' : _customClass$customTi;
128
- var _a11y$ariaHidden = a11y.ariaHidden,
129
- ariaHidden = _a11y$ariaHidden === void 0 ? true : _a11y$ariaHidden;
134
+
135
+ var listA11y = _objectSpread({
136
+ ariaHidden: true,
137
+ role: 'option'
138
+ }, a11y);
139
+
140
+ var ariaHidden = listA11y.ariaHidden;
130
141
  var tickIconPalette = _ListItemModule["default"]["".concat(palette, "Tick")] ? _ListItemModule["default"]["".concat(palette, "Tick")] : '';
131
142
  var dataIdString = dataId ? dataId : value ? String(value).replace("'", '_') : 'listItem';
132
143
  return /*#__PURE__*/_react["default"].createElement(_ListContainer["default"], _extends({
133
- a11y: a11y,
144
+ a11y: listA11y,
134
145
  size: size,
135
146
  palette: palette,
136
147
  highlight: highlight,