@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.
- package/README.md +20 -0
- package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/es/Button/__tests__/Button.spec.js +61 -0
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
- package/es/Buttongroup/Buttongroup.js +1 -1
- package/es/DateTime/DateTime.js +2 -2
- package/es/DropBox/DropBox.js +24 -12
- package/es/DropBox/props/defaultProps.js +2 -1
- package/es/DropBox/props/propTypes.js +2 -1
- package/es/ListItem/ListContainer.js +3 -2
- package/es/ListItem/ListItem.js +8 -3
- package/es/ListItem/ListItemWithAvatar.js +8 -3
- package/es/ListItem/ListItemWithCheckBox.js +5 -1
- package/es/ListItem/ListItemWithIcon.js +8 -3
- package/es/ListItem/ListItemWithRadio.js +5 -1
- package/es/MultiSelect/props/propTypes.js +1 -1
- package/es/Select/Select.js +2 -0
- package/lib/Button/__tests__/Button.spec.js +62 -0
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
- package/lib/Buttongroup/Buttongroup.js +1 -1
- package/lib/DateTime/DateTime.js +2 -2
- package/lib/DropBox/DropBox.js +26 -12
- package/lib/DropBox/props/defaultProps.js +2 -1
- package/lib/DropBox/props/propTypes.js +2 -1
- package/lib/ListItem/ListContainer.js +4 -2
- package/lib/ListItem/ListItem.js +14 -3
- package/lib/ListItem/ListItemWithAvatar.js +14 -3
- package/lib/ListItem/ListItemWithCheckBox.js +12 -1
- package/lib/ListItem/ListItemWithIcon.js +14 -3
- package/lib/ListItem/ListItemWithRadio.js +12 -1
- package/lib/MultiSelect/props/propTypes.js +1 -1
- package/lib/Select/Select.js +2 -0
- package/package.json +21 -13
- package/postPublish.js +8 -0
- package/prePublish.js +70 -0
- package/result.json +1 -0
- package/es/Accordion/__tests__/Accordion.spec.js +0 -79
- package/es/Animation/__tests__/Animation.spec.js +0 -17
- package/es/Avatar/__tests__/Avatar.spec.js +0 -161
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -288
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -76
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -226
- package/es/Buttongroup/__test__/Buttongroup.spec.js +0 -73
- package/es/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
- package/es/Card/__tests__/Card.spec.js +0 -36
- package/es/CheckBox/__tests__/CheckBox.spec.js +0 -12
- package/es/DateTime/__tests__/CalendarView.spec.js +0 -33
- package/es/DateTime/__tests__/DateTime.spec.js +0 -115
- package/es/DateTime/__tests__/DateWidget.spec.js +0 -75
- package/es/DropBox/__tests__/DropBox.spec.js +0 -81
- package/es/DropDown/__tests__/DropDown.spec.js +0 -44
- package/es/DropDown/__tests__/DropDownItem.spec.js +0 -45
- package/es/DropDown/__tests__/DropDownSearch.spec.js +0 -11
- package/es/Label/__tests__/Label.spec.js +0 -120
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -101
- package/es/Layout/__tests__/Box.spec.js +0 -114
- package/es/Layout/__tests__/Container.spec.js +0 -120
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -160
- package/es/PopOver/__tests__/PopOver.spec.js +0 -14
- package/es/Popup/__tests__/Popup.spec.js +0 -134
- package/es/Radio/__tests__/Radiospec.js +0 -23
- package/es/Ribbon/__tests__/Ribbon.spec.js +0 -168
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -163
- package/es/Select/__tests__/Select.spec.js +0 -345
- package/es/Stencils/__tests__/Stencils.spec.js +0 -69
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -49
- package/es/Tab/__tests__/Tab.spec.js +0 -117
- package/es/Tab/__tests__/TabContent.spec.js +0 -16
- package/es/Tab/__tests__/TabContentWrapper.spec.js +0 -50
- package/es/Tab/__tests__/TabWrapper.spec.js +0 -86
- package/es/Tab/__tests__/Tabs.spec.js +0 -115
- package/es/Tag/__tests__/Tag.spec.js +0 -28
- package/es/TextBox/__tests__/TextBox.spec.js +0 -189
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -212
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
- package/es/Textarea/__tests__/Textarea.spec.js +0 -171
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
- package/es/Tooltip/__tests__/Tooltip.spec.js +0 -52
- package/es/utils/__tests__/constructFullName.spec.js +0 -9
- package/es/utils/__tests__/debounce.spec.js +0 -37
- package/es/utils/__tests__/getInitial.spec.js +0 -23
- package/lib/Accordion/__tests__/Accordion.spec.js +0 -85
- package/lib/Animation/__tests__/Animation.spec.js +0 -23
- package/lib/Avatar/__tests__/Avatar.spec.js +0 -208
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -288
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -92
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -226
- package/lib/Buttongroup/__test__/Buttongroup.spec.js +0 -86
- package/lib/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
- package/lib/Card/__tests__/Card.spec.js +0 -56
- package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -18
- package/lib/DateTime/__tests__/CalendarView.spec.js +0 -45
- package/lib/DateTime/__tests__/DateTime.spec.js +0 -127
- package/lib/DateTime/__tests__/DateWidget.spec.js +0 -81
- package/lib/DropBox/__tests__/DropBox.spec.js +0 -87
- package/lib/DropDown/__tests__/DropDown.spec.js +0 -50
- package/lib/DropDown/__tests__/DropDownItem.spec.js +0 -51
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -17
- package/lib/Label/__tests__/Label.spec.js +0 -137
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -101
- package/lib/Layout/__tests__/Box.spec.js +0 -121
- package/lib/Layout/__tests__/Container.spec.js +0 -127
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -170
- package/lib/PopOver/__tests__/PopOver.spec.js +0 -20
- package/lib/Popup/__tests__/Popup.spec.js +0 -192
- package/lib/Radio/__tests__/Radiospec.js +0 -29
- package/lib/Ribbon/__tests__/Ribbon.spec.js +0 -193
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -163
- package/lib/Select/__tests__/Select.spec.js +0 -383
- package/lib/Stencils/__tests__/Stencils.spec.js +0 -84
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -49
- package/lib/Tab/__tests__/Tab.spec.js +0 -123
- package/lib/Tab/__tests__/TabContent.spec.js +0 -22
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +0 -59
- package/lib/Tab/__tests__/TabWrapper.spec.js +0 -100
- package/lib/Tab/__tests__/Tabs.spec.js +0 -123
- package/lib/Tag/__tests__/Tag.spec.js +0 -35
- package/lib/TextBox/__tests__/TextBox.spec.js +0 -205
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -228
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
- package/lib/Textarea/__tests__/Textarea.spec.js +0 -186
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
- package/lib/Tooltip/__tests__/Tooltip.spec.js +0 -98
- package/lib/utils/__tests__/constructFullName.spec.js +0 -12
- package/lib/utils/__tests__/debounce.spec.js +0 -40
- package/lib/utils/__tests__/getInitial.spec.js +0 -26
|
@@ -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
|
+
`;
|
|
@@ -16,7 +16,7 @@ export default class Buttongroup extends React.Component {
|
|
|
16
16
|
dataSelectorId
|
|
17
17
|
} = this.props;
|
|
18
18
|
let btnGroup = [];
|
|
19
|
-
children.forEach(child => {
|
|
19
|
+
children && children.forEach(child => {
|
|
20
20
|
let btnRight = /*#__PURE__*/React.createElement("span", {
|
|
21
21
|
className: style[type]
|
|
22
22
|
}, child);
|
package/es/DateTime/DateTime.js
CHANGED
|
@@ -112,8 +112,8 @@ export default class DateTime extends React.PureComponent {
|
|
|
112
112
|
if (timeZone && value) {
|
|
113
113
|
result = datetime.toDate(datetime.tz.utcToTz(value, timeZone));
|
|
114
114
|
} else {
|
|
115
|
-
value = value.replace('Z', '');
|
|
116
|
-
result = new Date(value);
|
|
115
|
+
value = value ? value.replace('Z', '') : null;
|
|
116
|
+
result = value ? new Date(value) : new Date();
|
|
117
117
|
}
|
|
118
118
|
} else {
|
|
119
119
|
if (value) {
|
package/es/DropBox/DropBox.js
CHANGED
|
@@ -12,7 +12,7 @@ import { DropBoxPropTypes } from './props/propTypes';
|
|
|
12
12
|
import { stopPropagation } from './../utils/Common';
|
|
13
13
|
import style from './css/DropBox.module.css';
|
|
14
14
|
export default function DropBox(props) {
|
|
15
|
-
const
|
|
15
|
+
const dropBoxRef = useRef(null);
|
|
16
16
|
const DropBoxContext = useContext(LibraryContext);
|
|
17
17
|
const {
|
|
18
18
|
needResponsive,
|
|
@@ -21,8 +21,19 @@ export default function DropBox(props) {
|
|
|
21
21
|
isAbsolutePositioningNeeded,
|
|
22
22
|
isRestrictScroll,
|
|
23
23
|
needFocusScope,
|
|
24
|
-
onClose
|
|
24
|
+
onClose,
|
|
25
|
+
customProps
|
|
25
26
|
} = props;
|
|
27
|
+
const {
|
|
28
|
+
focusScopeProps = {}
|
|
29
|
+
} = customProps;
|
|
30
|
+
const {
|
|
31
|
+
autoFocus = true,
|
|
32
|
+
restoreFocus = true,
|
|
33
|
+
needArrowLoop = true,
|
|
34
|
+
needTabLoop = false,
|
|
35
|
+
enableEnterAction = true
|
|
36
|
+
} = focusScopeProps;
|
|
26
37
|
const {
|
|
27
38
|
direction
|
|
28
39
|
} = DropBoxContext || {};
|
|
@@ -41,22 +52,23 @@ export default function DropBox(props) {
|
|
|
41
52
|
const {
|
|
42
53
|
zIndexStyle
|
|
43
54
|
} = cssJSLogic(props);
|
|
44
|
-
const dropBoxEle = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope, {
|
|
45
|
-
|
|
46
|
-
elementRef:
|
|
47
|
-
autoFocus:
|
|
48
|
-
restoreFocus:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
const dropBoxEle = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope, _extends({
|
|
56
|
+
onClose: onClose,
|
|
57
|
+
elementRef: dropBoxRef,
|
|
58
|
+
autoFocus: autoFocus,
|
|
59
|
+
restoreFocus: restoreFocus,
|
|
60
|
+
needArrowLoop: needArrowLoop,
|
|
61
|
+
needTabLoop: needTabLoop,
|
|
62
|
+
enableEnterAction: enableEnterAction
|
|
63
|
+
}, focusScopeProps), /*#__PURE__*/React.createElement(DropBoxElement, _extends({
|
|
52
64
|
isModel: isModel,
|
|
53
65
|
direction: direction
|
|
54
66
|
}, props, {
|
|
55
67
|
zIndexStyle: zIndexStyle,
|
|
56
|
-
subContainerRef:
|
|
68
|
+
subContainerRef: dropBoxRef
|
|
57
69
|
}))) : /*#__PURE__*/React.createElement(DropBoxElement, _extends({
|
|
58
70
|
isModel: isModel,
|
|
59
|
-
subContainerRef:
|
|
71
|
+
subContainerRef: dropBoxRef,
|
|
60
72
|
direction: direction
|
|
61
73
|
}, props, {
|
|
62
74
|
zIndexStyle: zIndexStyle
|
|
@@ -6,7 +6,8 @@ export const defaultProps = {
|
|
|
6
6
|
isAbsolutePositioningNeeded: true,
|
|
7
7
|
isRestrictScroll: false,
|
|
8
8
|
needFocusScope: false,
|
|
9
|
-
needAutoZindex: true
|
|
9
|
+
needAutoZindex: true,
|
|
10
|
+
customProps: {}
|
|
10
11
|
};
|
|
11
12
|
export const DropBoxDefaultProps = { ...DropBoxElementDefaultProps,
|
|
12
13
|
...defaultProps
|
|
@@ -7,7 +7,8 @@ export const propTypes = {
|
|
|
7
7
|
isAbsolutePositioningNeeded: PropTypes.bool,
|
|
8
8
|
isRestrictScroll: PropTypes.bool,
|
|
9
9
|
needFocusScope: PropTypes.bool,
|
|
10
|
-
needAutoZindex: PropTypes.bool
|
|
10
|
+
needAutoZindex: PropTypes.bool,
|
|
11
|
+
customProps: PropTypes.object
|
|
11
12
|
};
|
|
12
13
|
export const DropBoxPropTypes = { ...DropBoxElementPropTypes,
|
|
13
14
|
...propTypes
|
|
@@ -54,7 +54,8 @@ const ListContainer = props => {
|
|
|
54
54
|
const {
|
|
55
55
|
role,
|
|
56
56
|
ariaSelected,
|
|
57
|
-
ariaLabel
|
|
57
|
+
ariaLabel,
|
|
58
|
+
insetFocus = true
|
|
58
59
|
} = a11y;
|
|
59
60
|
const options = {};
|
|
60
61
|
|
|
@@ -73,7 +74,7 @@ const ListContainer = props => {
|
|
|
73
74
|
|
|
74
75
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
75
76
|
role: role,
|
|
76
|
-
"data-a11y-
|
|
77
|
+
"data-a11y-inset-focus": insetFocus,
|
|
77
78
|
"aria-selected": ariaSelected,
|
|
78
79
|
"aria-label": ariaLabel,
|
|
79
80
|
isCover: false,
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -82,13 +82,18 @@ export default class ListItem extends React.Component {
|
|
|
82
82
|
customListItem = '',
|
|
83
83
|
customTickIcon = ''
|
|
84
84
|
} = customClass;
|
|
85
|
+
const listA11y = {
|
|
86
|
+
ariaHidden: true,
|
|
87
|
+
role: 'option',
|
|
88
|
+
...a11y
|
|
89
|
+
};
|
|
85
90
|
let {
|
|
86
|
-
ariaHidden
|
|
87
|
-
} =
|
|
91
|
+
ariaHidden
|
|
92
|
+
} = listA11y;
|
|
88
93
|
let tickIconPalette = style[`${palette}Tick`] ? style[`${palette}Tick`] : '';
|
|
89
94
|
let dataIdString = dataId ? dataId : value ? String(value).replace("'", '_') : 'listItem';
|
|
90
95
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
91
|
-
a11y:
|
|
96
|
+
a11y: listA11y,
|
|
92
97
|
size: size,
|
|
93
98
|
palette: palette,
|
|
94
99
|
highlight: highlight,
|
|
@@ -87,13 +87,18 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
87
87
|
customAvatar = '',
|
|
88
88
|
customAvatarTeam = ''
|
|
89
89
|
} = customClass;
|
|
90
|
+
const listA11y = {
|
|
91
|
+
ariaHidden: true,
|
|
92
|
+
role: 'option',
|
|
93
|
+
...a11y
|
|
94
|
+
};
|
|
90
95
|
let {
|
|
91
|
-
ariaHidden
|
|
92
|
-
} =
|
|
96
|
+
ariaHidden
|
|
97
|
+
} = listA11y;
|
|
93
98
|
let isDarkPalette = palette === 'dark';
|
|
94
99
|
let dataIdString = value ? value : dataId;
|
|
95
100
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
96
|
-
a11y:
|
|
101
|
+
a11y: listA11y,
|
|
97
102
|
size: size,
|
|
98
103
|
palette: palette,
|
|
99
104
|
highlight: highlight,
|
|
@@ -63,6 +63,10 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
63
63
|
customProps,
|
|
64
64
|
needMultiLineText
|
|
65
65
|
} = this.props;
|
|
66
|
+
const listA11y = {
|
|
67
|
+
role: 'option',
|
|
68
|
+
...a11y
|
|
69
|
+
};
|
|
66
70
|
let {
|
|
67
71
|
ListItemProps = {},
|
|
68
72
|
ContainerProps = {}
|
|
@@ -73,7 +77,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
73
77
|
customLabel = ''
|
|
74
78
|
} = customClass;
|
|
75
79
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
76
|
-
a11y:
|
|
80
|
+
a11y: listA11y,
|
|
77
81
|
size: size,
|
|
78
82
|
palette: palette,
|
|
79
83
|
highlight: highlight,
|
|
@@ -78,12 +78,17 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
78
78
|
ListItemProps = {},
|
|
79
79
|
ContainerProps = {}
|
|
80
80
|
} = customProps;
|
|
81
|
+
const listA11y = {
|
|
82
|
+
ariaHidden: true,
|
|
83
|
+
role: 'option',
|
|
84
|
+
...a11y
|
|
85
|
+
};
|
|
81
86
|
let {
|
|
82
|
-
ariaHidden
|
|
83
|
-
} =
|
|
87
|
+
ariaHidden
|
|
88
|
+
} = listA11y;
|
|
84
89
|
let dataIdString = dataId ? `${dataId.replace("'", '_')}` : value.toLowerCase().replace("'", '_');
|
|
85
90
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
86
|
-
a11y:
|
|
91
|
+
a11y: listA11y,
|
|
87
92
|
size: size,
|
|
88
93
|
palette: palette,
|
|
89
94
|
highlight: highlight,
|
|
@@ -68,13 +68,17 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
68
68
|
ListItemProps = {},
|
|
69
69
|
ContainerProps = {}
|
|
70
70
|
} = customProps;
|
|
71
|
+
const listA11y = {
|
|
72
|
+
role: 'option',
|
|
73
|
+
...a11y
|
|
74
|
+
};
|
|
71
75
|
let {
|
|
72
76
|
customListItem = '',
|
|
73
77
|
customRadio = '',
|
|
74
78
|
customRadioWrap = ''
|
|
75
79
|
} = customClass;
|
|
76
80
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
77
|
-
a11y:
|
|
81
|
+
a11y: listA11y,
|
|
78
82
|
size: size,
|
|
79
83
|
palette: palette,
|
|
80
84
|
highlight: highlight,
|
|
@@ -10,7 +10,7 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
10
10
|
emptyMessage: PropTypes.string.isRequired,
|
|
11
11
|
getContainerRef: PropTypes.func,
|
|
12
12
|
getFooter: PropTypes.func,
|
|
13
|
-
groupedOptions: PropTypes.array.
|
|
13
|
+
groupedOptions: PropTypes.array.isRequired,
|
|
14
14
|
i18nKeys: PropTypes.shape({
|
|
15
15
|
loadingText: PropTypes.string,
|
|
16
16
|
emptyText: PropTypes.string,
|
package/es/Select/Select.js
CHANGED
|
@@ -953,6 +953,8 @@ SelectComponent.defaultProps = Select_defaultProps;
|
|
|
953
953
|
SelectComponent.displayName = 'Select';
|
|
954
954
|
let Select = Popup(SelectComponent);
|
|
955
955
|
Select.defaultProps = SelectComponent.defaultProps;
|
|
956
|
+
Select.propTypes = Select_propTypes;
|
|
957
|
+
Select.displayName = 'Select';
|
|
956
958
|
export default Select; // if (__DOCS__) {
|
|
957
959
|
// Select.docs = {
|
|
958
960
|
// componentGroup: 'Form Elements',
|