@zohodesk/dot 1.9.14 → 1.9.16
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 +22 -0
- package/es/Drawer/Drawer.js +5 -1
- package/es/Drawer/props/propTypes.js +2 -0
- package/es/FormAction/FormAction.js +18 -5
- package/es/FormAction/__tests__/FormAction.spec.js +97 -3
- package/es/FormAction/__tests__/__snapshots__/FormAction.spec.js.snap +536 -1
- package/es/FormAction/props/propTypes.js +2 -0
- package/es/lookup/Lookup/Lookup.js +47 -18
- package/es/lookup/Lookup/Lookup.module.css +19 -0
- package/es/lookup/Lookup/__tests__/Lookup.spec.js +120 -4
- package/es/lookup/Lookup/__tests__/__snapshots__/Lookup.spec.js.snap +284 -2
- package/es/lookup/Lookup/props/defaultProps.js +3 -2
- package/es/lookup/Lookup/props/propTypes.js +12 -2
- package/es/lookup/Section/Section.js +14 -5
- package/es/lookup/Section/__tests__/Section.spec.js +41 -2
- package/es/lookup/Section/__tests__/__snapshots__/Section.spec.js.snap +131 -1
- package/es/lookup/Section/props/defaultProps.js +4 -0
- package/es/lookup/Section/props/propTypes.js +5 -0
- package/es/lookup/header/ModuleHeader/ModuleHeader.js +47 -18
- package/es/lookup/header/ModuleHeader/__tests__/ModuleHeader.spec.js +172 -3
- package/es/lookup/header/ModuleHeader/__tests__/__snapshots__/ModuleHeader.spec.js.snap +779 -3
- package/es/lookup/header/ModuleHeader/props/defaultProps.js +4 -0
- package/es/lookup/header/ModuleHeader/props/propTypes.js +21 -1
- package/es/lookup/header/Title/Title.js +3 -1
- package/es/lookup/header/Title/props/propTypes.js +1 -0
- package/es/version2/lookup/AlertHeader/AlertHeader.js +16 -7
- package/es/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +114 -3
- package/es/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +1695 -8
- package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +8 -3
- package/es/version2/lookup/AlertHeader/props/defaultProps.js +3 -0
- package/es/version2/lookup/AlertHeader/props/propTypes.js +9 -0
- package/es/version2/lookup/AlertLookup/AlertLookup.js +11 -5
- package/es/version2/lookup/AlertLookup/props/defaultProps.js +1 -0
- package/es/version2/lookup/AlertLookup/props/propTypes.js +1 -0
- package/lib/Drawer/Drawer.js +5 -1
- package/lib/Drawer/props/propTypes.js +2 -0
- package/lib/FormAction/FormAction.js +18 -5
- package/lib/FormAction/__tests__/FormAction.spec.js +102 -2
- package/lib/FormAction/__tests__/__snapshots__/FormAction.spec.js.snap +536 -1
- package/lib/FormAction/props/propTypes.js +2 -0
- package/lib/lookup/Lookup/Lookup.js +50 -18
- package/lib/lookup/Lookup/Lookup.module.css +19 -0
- package/lib/lookup/Lookup/__tests__/Lookup.spec.js +120 -4
- package/lib/lookup/Lookup/__tests__/__snapshots__/Lookup.spec.js.snap +284 -2
- package/lib/lookup/Lookup/props/defaultProps.js +3 -2
- package/lib/lookup/Lookup/props/propTypes.js +15 -2
- package/lib/lookup/Section/Section.js +13 -5
- package/lib/lookup/Section/__tests__/Section.spec.js +40 -1
- package/lib/lookup/Section/__tests__/__snapshots__/Section.spec.js.snap +131 -1
- package/lib/lookup/Section/props/defaultProps.js +13 -0
- package/lib/lookup/Section/props/propTypes.js +6 -0
- package/lib/lookup/header/ModuleHeader/ModuleHeader.js +46 -24
- package/lib/lookup/header/ModuleHeader/__tests__/ModuleHeader.spec.js +177 -2
- package/lib/lookup/header/ModuleHeader/__tests__/__snapshots__/ModuleHeader.spec.js.snap +779 -3
- package/lib/lookup/header/ModuleHeader/props/defaultProps.js +6 -0
- package/lib/lookup/header/ModuleHeader/props/propTypes.js +25 -1
- package/lib/lookup/header/Title/Title.js +3 -1
- package/lib/lookup/header/Title/props/propTypes.js +1 -0
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +18 -8
- package/lib/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +113 -2
- package/lib/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +1695 -8
- package/lib/version2/lookup/AlertHeader/css/cssJSLogic.js +7 -3
- package/lib/version2/lookup/AlertHeader/props/defaultProps.js +5 -0
- package/lib/version2/lookup/AlertHeader/props/propTypes.js +9 -0
- package/lib/version2/lookup/AlertLookup/AlertLookup.js +11 -8
- package/lib/version2/lookup/AlertLookup/props/defaultProps.js +1 -0
- package/lib/version2/lookup/AlertLookup/props/propTypes.js +1 -0
- package/package.json +8 -8
|
@@ -1,6 +1,307 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`FormAction
|
|
3
|
+
exports[`FormAction Render with Center children 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="wrapperDiv"
|
|
7
|
+
data-selector-id="formAction"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="footerParent
|
|
11
|
+
|
|
12
|
+
mediumFooter
|
|
13
|
+
flex rowdir around"
|
|
14
|
+
data-id="containerComponent"
|
|
15
|
+
data-selector-id="container"
|
|
16
|
+
data-test-id="containerComponent"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
class="shrinkOff"
|
|
20
|
+
data-id="boxComponent"
|
|
21
|
+
data-selector-id="box"
|
|
22
|
+
data-test-id="boxComponent"
|
|
23
|
+
>
|
|
24
|
+
<button>
|
|
25
|
+
Submit
|
|
26
|
+
</button>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</DocumentFragment>
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
exports[`FormAction Render with LeftSide children 1`] = `
|
|
34
|
+
<DocumentFragment>
|
|
35
|
+
<div
|
|
36
|
+
class="wrapperDiv"
|
|
37
|
+
data-selector-id="formAction"
|
|
38
|
+
>
|
|
39
|
+
<div
|
|
40
|
+
class="footerParent mediumPadding
|
|
41
|
+
|
|
42
|
+
mediumFooter
|
|
43
|
+
flex rowdir"
|
|
44
|
+
data-id="containerComponent"
|
|
45
|
+
data-selector-id="container"
|
|
46
|
+
data-test-id="containerComponent"
|
|
47
|
+
>
|
|
48
|
+
<div
|
|
49
|
+
class="shrinkOn"
|
|
50
|
+
data-id="boxComponent"
|
|
51
|
+
data-selector-id="box"
|
|
52
|
+
data-test-id="boxComponent"
|
|
53
|
+
>
|
|
54
|
+
<button>
|
|
55
|
+
Save
|
|
56
|
+
</button>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</DocumentFragment>
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
exports[`FormAction Render with LeftSide, Center and RightSide children 1`] = `
|
|
64
|
+
<DocumentFragment>
|
|
65
|
+
<div
|
|
66
|
+
class="wrapperDiv"
|
|
67
|
+
data-selector-id="formAction"
|
|
68
|
+
>
|
|
69
|
+
<div
|
|
70
|
+
class="footerParent
|
|
71
|
+
|
|
72
|
+
mediumFooter
|
|
73
|
+
flex rowdir around"
|
|
74
|
+
data-id="containerComponent"
|
|
75
|
+
data-selector-id="container"
|
|
76
|
+
data-test-id="containerComponent"
|
|
77
|
+
>
|
|
78
|
+
<div
|
|
79
|
+
class="grow basis shrinkOff"
|
|
80
|
+
data-id="boxComponent"
|
|
81
|
+
data-selector-id="box"
|
|
82
|
+
data-test-id="boxComponent"
|
|
83
|
+
>
|
|
84
|
+
<button>
|
|
85
|
+
Save
|
|
86
|
+
</button>
|
|
87
|
+
</div>
|
|
88
|
+
<div
|
|
89
|
+
class="shrinkOff"
|
|
90
|
+
data-id="boxComponent"
|
|
91
|
+
data-selector-id="box"
|
|
92
|
+
data-test-id="boxComponent"
|
|
93
|
+
>
|
|
94
|
+
<button>
|
|
95
|
+
Cancel
|
|
96
|
+
</button>
|
|
97
|
+
</div>
|
|
98
|
+
<div
|
|
99
|
+
class="shrinkOff"
|
|
100
|
+
data-id="boxComponent"
|
|
101
|
+
data-selector-id="box"
|
|
102
|
+
data-test-id="boxComponent"
|
|
103
|
+
>
|
|
104
|
+
<button>
|
|
105
|
+
Preview
|
|
106
|
+
</button>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</DocumentFragment>
|
|
111
|
+
`;
|
|
112
|
+
|
|
113
|
+
exports[`FormAction Render with RightSide children 1`] = `
|
|
114
|
+
<DocumentFragment>
|
|
115
|
+
<div
|
|
116
|
+
class="wrapperDiv"
|
|
117
|
+
data-selector-id="formAction"
|
|
118
|
+
>
|
|
119
|
+
<div
|
|
120
|
+
class="footerParent mediumPadding
|
|
121
|
+
|
|
122
|
+
mediumFooter
|
|
123
|
+
flex rowdir right"
|
|
124
|
+
data-id="containerComponent"
|
|
125
|
+
data-selector-id="container"
|
|
126
|
+
data-test-id="containerComponent"
|
|
127
|
+
>
|
|
128
|
+
<div
|
|
129
|
+
class="shrinkOn"
|
|
130
|
+
data-id="boxComponent"
|
|
131
|
+
data-selector-id="box"
|
|
132
|
+
data-test-id="boxComponent"
|
|
133
|
+
>
|
|
134
|
+
<button>
|
|
135
|
+
Cancel
|
|
136
|
+
</button>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</DocumentFragment>
|
|
141
|
+
`;
|
|
142
|
+
|
|
143
|
+
exports[`FormAction Render with customId and testId 1`] = `
|
|
144
|
+
<DocumentFragment>
|
|
145
|
+
<div
|
|
146
|
+
class="wrapperDiv"
|
|
147
|
+
data-id="form-action-customId"
|
|
148
|
+
data-selector-id="formAction"
|
|
149
|
+
data-test-id="form-action-testId"
|
|
150
|
+
>
|
|
151
|
+
<div
|
|
152
|
+
class="footerParent
|
|
153
|
+
|
|
154
|
+
mediumFooter
|
|
155
|
+
flex rowdir around"
|
|
156
|
+
data-id="form-action-customId_container"
|
|
157
|
+
data-selector-id="container"
|
|
158
|
+
data-test-id="form-action-testId_container"
|
|
159
|
+
>
|
|
160
|
+
<div
|
|
161
|
+
class="grow basis shrinkOff"
|
|
162
|
+
data-id="form-action-customId_leftElement"
|
|
163
|
+
data-selector-id="box"
|
|
164
|
+
data-test-id="form-action-testId_leftElement"
|
|
165
|
+
>
|
|
166
|
+
<button>
|
|
167
|
+
Save
|
|
168
|
+
</button>
|
|
169
|
+
</div>
|
|
170
|
+
<div
|
|
171
|
+
class="shrinkOff"
|
|
172
|
+
data-id="form-action-customId_rightElement"
|
|
173
|
+
data-selector-id="box"
|
|
174
|
+
data-test-id="form-action-testId_rightElement"
|
|
175
|
+
>
|
|
176
|
+
<button>
|
|
177
|
+
Cancel
|
|
178
|
+
</button>
|
|
179
|
+
</div>
|
|
180
|
+
<div
|
|
181
|
+
class="shrinkOff"
|
|
182
|
+
data-id="form-action-customId_centerElement"
|
|
183
|
+
data-selector-id="box"
|
|
184
|
+
data-test-id="form-action-testId_centerElement"
|
|
185
|
+
>
|
|
186
|
+
<button>
|
|
187
|
+
Preview
|
|
188
|
+
</button>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
</DocumentFragment>
|
|
193
|
+
`;
|
|
194
|
+
|
|
195
|
+
exports[`FormAction Render with dataSelectorId 1`] = `
|
|
196
|
+
<DocumentFragment>
|
|
197
|
+
<div
|
|
198
|
+
class="wrapperDiv"
|
|
199
|
+
data-selector-id="form-action-dataSelectorId"
|
|
200
|
+
>
|
|
201
|
+
<div
|
|
202
|
+
class="footerParent mediumPadding
|
|
203
|
+
|
|
204
|
+
mediumFooter
|
|
205
|
+
flex rowdir"
|
|
206
|
+
data-id="containerComponent"
|
|
207
|
+
data-selector-id="container"
|
|
208
|
+
data-test-id="containerComponent"
|
|
209
|
+
/>
|
|
210
|
+
</div>
|
|
211
|
+
</DocumentFragment>
|
|
212
|
+
`;
|
|
213
|
+
|
|
214
|
+
exports[`FormAction Render with default props 1`] = `
|
|
215
|
+
<DocumentFragment>
|
|
216
|
+
<div
|
|
217
|
+
class="wrapperDiv"
|
|
218
|
+
data-selector-id="formAction"
|
|
219
|
+
>
|
|
220
|
+
<div
|
|
221
|
+
class="footerParent mediumPadding
|
|
222
|
+
|
|
223
|
+
mediumFooter
|
|
224
|
+
flex rowdir"
|
|
225
|
+
data-id="containerComponent"
|
|
226
|
+
data-selector-id="container"
|
|
227
|
+
data-test-id="containerComponent"
|
|
228
|
+
/>
|
|
229
|
+
</div>
|
|
230
|
+
</DocumentFragment>
|
|
231
|
+
`;
|
|
232
|
+
|
|
233
|
+
exports[`FormAction Render with direct child (defaults to left group) 1`] = `
|
|
234
|
+
<DocumentFragment>
|
|
235
|
+
<div
|
|
236
|
+
class="wrapperDiv"
|
|
237
|
+
data-selector-id="formAction"
|
|
238
|
+
>
|
|
239
|
+
<div
|
|
240
|
+
class="footerParent mediumPadding
|
|
241
|
+
|
|
242
|
+
mediumFooter
|
|
243
|
+
flex rowdir"
|
|
244
|
+
data-id="containerComponent"
|
|
245
|
+
data-selector-id="container"
|
|
246
|
+
data-test-id="containerComponent"
|
|
247
|
+
>
|
|
248
|
+
<div
|
|
249
|
+
class="shrinkOn"
|
|
250
|
+
data-id="boxComponent"
|
|
251
|
+
data-selector-id="box"
|
|
252
|
+
data-test-id="boxComponent"
|
|
253
|
+
>
|
|
254
|
+
<button>
|
|
255
|
+
Standalone
|
|
256
|
+
</button>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
</DocumentFragment>
|
|
261
|
+
`;
|
|
262
|
+
|
|
263
|
+
exports[`FormAction Render with multiple children in Center 1`] = `
|
|
264
|
+
<DocumentFragment>
|
|
265
|
+
<div
|
|
266
|
+
class="wrapperDiv"
|
|
267
|
+
data-selector-id="formAction"
|
|
268
|
+
>
|
|
269
|
+
<div
|
|
270
|
+
class="footerParent
|
|
271
|
+
|
|
272
|
+
mediumFooter
|
|
273
|
+
flex rowdir around"
|
|
274
|
+
data-id="containerComponent"
|
|
275
|
+
data-selector-id="container"
|
|
276
|
+
data-test-id="containerComponent"
|
|
277
|
+
>
|
|
278
|
+
<div
|
|
279
|
+
class="shrinkOff"
|
|
280
|
+
data-id="boxComponent"
|
|
281
|
+
data-selector-id="box"
|
|
282
|
+
data-test-id="boxComponent"
|
|
283
|
+
>
|
|
284
|
+
<div
|
|
285
|
+
class="marginRight"
|
|
286
|
+
>
|
|
287
|
+
<button>
|
|
288
|
+
Submit
|
|
289
|
+
</button>
|
|
290
|
+
</div>
|
|
291
|
+
<div
|
|
292
|
+
class="marginRight"
|
|
293
|
+
>
|
|
294
|
+
<button>
|
|
295
|
+
Preview
|
|
296
|
+
</button>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</DocumentFragment>
|
|
302
|
+
`;
|
|
303
|
+
|
|
304
|
+
exports[`FormAction Render with multiple children in LeftSide 1`] = `
|
|
4
305
|
<DocumentFragment>
|
|
5
306
|
<div
|
|
6
307
|
class="wrapperDiv"
|
|
@@ -14,6 +315,240 @@ exports[`FormAction rendering the defult props 1`] = `
|
|
|
14
315
|
data-id="containerComponent"
|
|
15
316
|
data-selector-id="container"
|
|
16
317
|
data-test-id="containerComponent"
|
|
318
|
+
>
|
|
319
|
+
<div
|
|
320
|
+
class="shrinkOn"
|
|
321
|
+
data-id="boxComponent"
|
|
322
|
+
data-selector-id="box"
|
|
323
|
+
data-test-id="boxComponent"
|
|
324
|
+
>
|
|
325
|
+
<div
|
|
326
|
+
class="marginRight"
|
|
327
|
+
>
|
|
328
|
+
<button>
|
|
329
|
+
Save
|
|
330
|
+
</button>
|
|
331
|
+
</div>
|
|
332
|
+
<div
|
|
333
|
+
class="marginRight"
|
|
334
|
+
>
|
|
335
|
+
<button>
|
|
336
|
+
Draft
|
|
337
|
+
</button>
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
</DocumentFragment>
|
|
343
|
+
`;
|
|
344
|
+
|
|
345
|
+
exports[`FormAction Render with multiple children in RightSide 1`] = `
|
|
346
|
+
<DocumentFragment>
|
|
347
|
+
<div
|
|
348
|
+
class="wrapperDiv"
|
|
349
|
+
data-selector-id="formAction"
|
|
350
|
+
>
|
|
351
|
+
<div
|
|
352
|
+
class="footerParent mediumPadding
|
|
353
|
+
|
|
354
|
+
mediumFooter
|
|
355
|
+
flex rowdir right"
|
|
356
|
+
data-id="containerComponent"
|
|
357
|
+
data-selector-id="container"
|
|
358
|
+
data-test-id="containerComponent"
|
|
359
|
+
>
|
|
360
|
+
<div
|
|
361
|
+
class="shrinkOn"
|
|
362
|
+
data-id="boxComponent"
|
|
363
|
+
data-selector-id="box"
|
|
364
|
+
data-test-id="boxComponent"
|
|
365
|
+
>
|
|
366
|
+
<div
|
|
367
|
+
class="marginRight"
|
|
368
|
+
>
|
|
369
|
+
<button>
|
|
370
|
+
Cancel
|
|
371
|
+
</button>
|
|
372
|
+
</div>
|
|
373
|
+
<div
|
|
374
|
+
class="marginRight"
|
|
375
|
+
>
|
|
376
|
+
<button>
|
|
377
|
+
Reset
|
|
378
|
+
</button>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</DocumentFragment>
|
|
384
|
+
`;
|
|
385
|
+
|
|
386
|
+
exports[`FormAction Render with paddingLeftSize as large 1`] = `
|
|
387
|
+
<DocumentFragment>
|
|
388
|
+
<div
|
|
389
|
+
class="wrapperDiv"
|
|
390
|
+
data-selector-id="formAction"
|
|
391
|
+
>
|
|
392
|
+
<div
|
|
393
|
+
class="footerParent largePadding
|
|
394
|
+
|
|
395
|
+
mediumFooter
|
|
396
|
+
flex rowdir"
|
|
397
|
+
data-id="containerComponent"
|
|
398
|
+
data-selector-id="container"
|
|
399
|
+
data-test-id="containerComponent"
|
|
400
|
+
/>
|
|
401
|
+
</div>
|
|
402
|
+
</DocumentFragment>
|
|
403
|
+
`;
|
|
404
|
+
|
|
405
|
+
exports[`FormAction Render with paddingLeftSize as medium 1`] = `
|
|
406
|
+
<DocumentFragment>
|
|
407
|
+
<div
|
|
408
|
+
class="wrapperDiv"
|
|
409
|
+
data-selector-id="formAction"
|
|
410
|
+
>
|
|
411
|
+
<div
|
|
412
|
+
class="footerParent mediumPadding
|
|
413
|
+
|
|
414
|
+
mediumFooter
|
|
415
|
+
flex rowdir"
|
|
416
|
+
data-id="containerComponent"
|
|
417
|
+
data-selector-id="container"
|
|
418
|
+
data-test-id="containerComponent"
|
|
419
|
+
/>
|
|
420
|
+
</div>
|
|
421
|
+
</DocumentFragment>
|
|
422
|
+
`;
|
|
423
|
+
|
|
424
|
+
exports[`FormAction Render with paddingLeftSize as small 1`] = `
|
|
425
|
+
<DocumentFragment>
|
|
426
|
+
<div
|
|
427
|
+
class="wrapperDiv"
|
|
428
|
+
data-selector-id="formAction"
|
|
429
|
+
>
|
|
430
|
+
<div
|
|
431
|
+
class="footerParent smallPadding
|
|
432
|
+
|
|
433
|
+
mediumFooter
|
|
434
|
+
flex rowdir"
|
|
435
|
+
data-id="containerComponent"
|
|
436
|
+
data-selector-id="container"
|
|
437
|
+
data-test-id="containerComponent"
|
|
438
|
+
/>
|
|
439
|
+
</div>
|
|
440
|
+
</DocumentFragment>
|
|
441
|
+
`;
|
|
442
|
+
|
|
443
|
+
exports[`FormAction Render with paddingLeftSize as xmedium 1`] = `
|
|
444
|
+
<DocumentFragment>
|
|
445
|
+
<div
|
|
446
|
+
class="wrapperDiv"
|
|
447
|
+
data-selector-id="formAction"
|
|
448
|
+
>
|
|
449
|
+
<div
|
|
450
|
+
class="footerParent xmediumPadding
|
|
451
|
+
|
|
452
|
+
mediumFooter
|
|
453
|
+
flex rowdir"
|
|
454
|
+
data-id="containerComponent"
|
|
455
|
+
data-selector-id="container"
|
|
456
|
+
data-test-id="containerComponent"
|
|
457
|
+
/>
|
|
458
|
+
</div>
|
|
459
|
+
</DocumentFragment>
|
|
460
|
+
`;
|
|
461
|
+
|
|
462
|
+
exports[`FormAction Render with paddingLeftSize as xsmall 1`] = `
|
|
463
|
+
<DocumentFragment>
|
|
464
|
+
<div
|
|
465
|
+
class="wrapperDiv"
|
|
466
|
+
data-selector-id="formAction"
|
|
467
|
+
>
|
|
468
|
+
<div
|
|
469
|
+
class="footerParent xsmallPadding
|
|
470
|
+
|
|
471
|
+
mediumFooter
|
|
472
|
+
flex rowdir"
|
|
473
|
+
data-id="containerComponent"
|
|
474
|
+
data-selector-id="container"
|
|
475
|
+
data-test-id="containerComponent"
|
|
476
|
+
/>
|
|
477
|
+
</div>
|
|
478
|
+
</DocumentFragment>
|
|
479
|
+
`;
|
|
480
|
+
|
|
481
|
+
exports[`FormAction Render with paddingRightClass 1`] = `
|
|
482
|
+
<DocumentFragment>
|
|
483
|
+
<div
|
|
484
|
+
class="wrapperDiv"
|
|
485
|
+
data-selector-id="formAction"
|
|
486
|
+
>
|
|
487
|
+
<div
|
|
488
|
+
class="footerParent mediumPadding customPaddingRight
|
|
489
|
+
|
|
490
|
+
mediumFooter
|
|
491
|
+
flex rowdir"
|
|
492
|
+
data-id="containerComponent"
|
|
493
|
+
data-selector-id="container"
|
|
494
|
+
data-test-id="containerComponent"
|
|
495
|
+
/>
|
|
496
|
+
</div>
|
|
497
|
+
</DocumentFragment>
|
|
498
|
+
`;
|
|
499
|
+
|
|
500
|
+
exports[`FormAction Render with size as large 1`] = `
|
|
501
|
+
<DocumentFragment>
|
|
502
|
+
<div
|
|
503
|
+
class="wrapperDiv"
|
|
504
|
+
data-selector-id="formAction"
|
|
505
|
+
>
|
|
506
|
+
<div
|
|
507
|
+
class="footerParent largePadding
|
|
508
|
+
|
|
509
|
+
largeFooter
|
|
510
|
+
flex rowdir"
|
|
511
|
+
data-id="containerComponent"
|
|
512
|
+
data-selector-id="container"
|
|
513
|
+
data-test-id="containerComponent"
|
|
514
|
+
/>
|
|
515
|
+
</div>
|
|
516
|
+
</DocumentFragment>
|
|
517
|
+
`;
|
|
518
|
+
|
|
519
|
+
exports[`FormAction Render with size as medium 1`] = `
|
|
520
|
+
<DocumentFragment>
|
|
521
|
+
<div
|
|
522
|
+
class="wrapperDiv"
|
|
523
|
+
data-selector-id="formAction"
|
|
524
|
+
>
|
|
525
|
+
<div
|
|
526
|
+
class="footerParent mediumPadding
|
|
527
|
+
|
|
528
|
+
mediumFooter
|
|
529
|
+
flex rowdir"
|
|
530
|
+
data-id="containerComponent"
|
|
531
|
+
data-selector-id="container"
|
|
532
|
+
data-test-id="containerComponent"
|
|
533
|
+
/>
|
|
534
|
+
</div>
|
|
535
|
+
</DocumentFragment>
|
|
536
|
+
`;
|
|
537
|
+
|
|
538
|
+
exports[`FormAction Render with size as small 1`] = `
|
|
539
|
+
<DocumentFragment>
|
|
540
|
+
<div
|
|
541
|
+
class="wrapperDiv"
|
|
542
|
+
data-selector-id="formAction"
|
|
543
|
+
>
|
|
544
|
+
<div
|
|
545
|
+
class="footerParent smallPadding
|
|
546
|
+
|
|
547
|
+
smallFooter
|
|
548
|
+
flex rowdir"
|
|
549
|
+
data-id="containerComponent"
|
|
550
|
+
data-selector-id="container"
|
|
551
|
+
data-test-id="containerComponent"
|
|
17
552
|
/>
|
|
18
553
|
</div>
|
|
19
554
|
</DocumentFragment>
|
|
@@ -4,5 +4,7 @@ export const propTypes = {
|
|
|
4
4
|
paddingLeftSize: PropTypes.oneOf(['large', 'medium', 'xmedium', 'small', 'xsmall']),
|
|
5
5
|
paddingRightClass: PropTypes.string,
|
|
6
6
|
size: PropTypes.oneOf(['large', 'medium', 'small']),
|
|
7
|
+
testId: PropTypes.string,
|
|
8
|
+
customId: PropTypes.string,
|
|
7
9
|
dataSelectorId: PropTypes.string
|
|
8
10
|
};
|
|
@@ -8,12 +8,21 @@ import { propTypes } from "./props/propTypes";
|
|
|
8
8
|
|
|
9
9
|
import FreezeLayer from "../../FreezeLayer/FreezeLayer";
|
|
10
10
|
import { Container } from '@zohodesk/components/es/Layout';
|
|
11
|
+
import VelocityAnimationGroup from '@zohodesk/components/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup';
|
|
11
12
|
/*** CSS ***/
|
|
12
13
|
|
|
13
14
|
import style from "./Lookup.module.css";
|
|
14
15
|
import FocusScope from '@zohodesk/a11y/es/FocusScope/FocusScope';
|
|
15
16
|
/*eslint-disable react/forbid-component-props */
|
|
16
17
|
|
|
18
|
+
const placementToAlignMap = {
|
|
19
|
+
topCenter: 'horizontal',
|
|
20
|
+
center: 'both'
|
|
21
|
+
};
|
|
22
|
+
const defaultAnimationMap = {
|
|
23
|
+
topCenter: 'flyDown',
|
|
24
|
+
center: 'expand'
|
|
25
|
+
};
|
|
17
26
|
export default class Lookup extends Component {
|
|
18
27
|
constructor(props) {
|
|
19
28
|
super(props);
|
|
@@ -47,13 +56,15 @@ export default class Lookup extends Component {
|
|
|
47
56
|
isActive,
|
|
48
57
|
children,
|
|
49
58
|
size,
|
|
59
|
+
hasFreezeLayer,
|
|
60
|
+
placement,
|
|
50
61
|
dataId,
|
|
51
62
|
forwardRef,
|
|
52
63
|
onClick,
|
|
53
64
|
customClass,
|
|
54
65
|
htmlId,
|
|
55
66
|
a11y,
|
|
56
|
-
childAnimationName,
|
|
67
|
+
childAnimationName = defaultAnimationMap[placement],
|
|
57
68
|
onClose,
|
|
58
69
|
needFocusScope,
|
|
59
70
|
customProps,
|
|
@@ -70,7 +81,9 @@ export default class Lookup extends Component {
|
|
|
70
81
|
...a11yAttributes
|
|
71
82
|
} = a11y;
|
|
72
83
|
const {
|
|
73
|
-
focusScopeProps = {}
|
|
84
|
+
focusScopeProps = {},
|
|
85
|
+
freezeLayerProps,
|
|
86
|
+
velocityAnimationProps
|
|
74
87
|
} = customProps;
|
|
75
88
|
const {
|
|
76
89
|
needAutoFocus = true,
|
|
@@ -89,7 +102,7 @@ export default class Lookup extends Component {
|
|
|
89
102
|
"aria-label": ariaLabel,
|
|
90
103
|
"aria-modal": ariaModal,
|
|
91
104
|
id: htmlId,
|
|
92
|
-
className: `${style.box} ${style[`${size}Size`]} ${lookupClass ? lookupClass : ''}`,
|
|
105
|
+
className: `${style.box} ${style[`${size}Size`]} ${style[`${placement}Box`]} ${lookupClass ? lookupClass : ''}`,
|
|
93
106
|
"data-id": dataId,
|
|
94
107
|
"data-test-id": dataId
|
|
95
108
|
}, a11yAttributes), /*#__PURE__*/React.createElement(Container, {
|
|
@@ -97,20 +110,7 @@ export default class Lookup extends Component {
|
|
|
97
110
|
isCover: false,
|
|
98
111
|
className: `${isMinHeight ? style.wrapper : style.coverwrap} ${style.containerWidth} ${containerClass}`
|
|
99
112
|
}, children));
|
|
100
|
-
|
|
101
|
-
align: "horizontal",
|
|
102
|
-
animationName: "fade",
|
|
103
|
-
childAnimationName: childAnimationName,
|
|
104
|
-
isActive: isActive,
|
|
105
|
-
palette: "snow",
|
|
106
|
-
forwardRef: forwardRef,
|
|
107
|
-
onClick: onClick,
|
|
108
|
-
customClass: customClass
|
|
109
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
110
|
-
alignBox: "row",
|
|
111
|
-
className: style.container,
|
|
112
|
-
dataId: "fldValue"
|
|
113
|
-
}, needFocusScope ? /*#__PURE__*/React.createElement(FocusScope, {
|
|
113
|
+
const childrenElement = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope, {
|
|
114
114
|
needFocusLoop: needFocusLoop,
|
|
115
115
|
needListNavigation: needListNavigation,
|
|
116
116
|
elementRef: this.createRef,
|
|
@@ -118,7 +118,36 @@ export default class Lookup extends Component {
|
|
|
118
118
|
needRestoreFocus: needRestoreFocus,
|
|
119
119
|
onClose: onClose,
|
|
120
120
|
needEnterAction: needEnterAction
|
|
121
|
-
}, content) : content
|
|
121
|
+
}, content) : content;
|
|
122
|
+
|
|
123
|
+
if (hasFreezeLayer) {
|
|
124
|
+
return /*#__PURE__*/React.createElement(FreezeLayer, _extends({
|
|
125
|
+
animationName: "fade",
|
|
126
|
+
palette: "snow"
|
|
127
|
+
}, freezeLayerProps, {
|
|
128
|
+
align: placementToAlignMap[placement],
|
|
129
|
+
childAnimationName: childAnimationName,
|
|
130
|
+
isActive: isActive,
|
|
131
|
+
forwardRef: forwardRef,
|
|
132
|
+
onClick: onClick,
|
|
133
|
+
customClass: customClass
|
|
134
|
+
}), /*#__PURE__*/React.createElement(Container, {
|
|
135
|
+
alignBox: "row",
|
|
136
|
+
className: style.container,
|
|
137
|
+
dataId: "fldValue"
|
|
138
|
+
}, childrenElement));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return /*#__PURE__*/React.createElement(VelocityAnimationGroup, _extends({}, velocityAnimationProps, {
|
|
142
|
+
name: childAnimationName,
|
|
143
|
+
isActive: isActive
|
|
144
|
+
}), /*#__PURE__*/React.createElement(Container, {
|
|
145
|
+
alignBox: "row",
|
|
146
|
+
align: placementToAlignMap[placement],
|
|
147
|
+
eleRef: forwardRef,
|
|
148
|
+
className: `${style.overlayLayer} ${customClass}`,
|
|
149
|
+
dataId: "fldValue"
|
|
150
|
+
}, childrenElement));
|
|
122
151
|
}
|
|
123
152
|
|
|
124
153
|
}
|
|
@@ -12,13 +12,32 @@
|
|
|
12
12
|
font-size: var(--zd_font_size16) ;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.overlayLayer {
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset: 0 ;
|
|
18
|
+
composes: blockEvent from '~@zohodesk/components/es/common/common.module.css';
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
.box {
|
|
16
22
|
position: relative;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.topCenterBox {
|
|
17
26
|
height: 100% ;
|
|
18
27
|
width: 100% ;
|
|
19
28
|
margin: auto ;
|
|
20
29
|
}
|
|
21
30
|
|
|
31
|
+
.centerBox {
|
|
32
|
+
max-height: 100% ;
|
|
33
|
+
width: 100% ;
|
|
34
|
+
margin: auto ;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.overlayLayer > .box {
|
|
38
|
+
pointer-events: initial;
|
|
39
|
+
}
|
|
40
|
+
|
|
22
41
|
.containerWidth {
|
|
23
42
|
width: 100% ;
|
|
24
43
|
}
|