@zohodesk/components 1.0.0-temp-211.2 → 1.0.0-temp-217

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 (128) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +118 -31
  3. package/es/AvatarTeam/props/propTypes.js +2 -1
  4. package/es/CheckBox/CheckBox.js +6 -5
  5. package/es/CheckBox/CheckBox.module.css +5 -2
  6. package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +64 -64
  7. package/es/DateTime/CalendarView.js +17 -12
  8. package/es/DateTime/DateTime.js +26 -8
  9. package/es/DateTime/DateTime.module.css +5 -5
  10. package/es/DateTime/DateWidget.js +13 -2
  11. package/es/DateTime/DaysRow.js +3 -2
  12. package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
  13. package/es/DateTime/props/defaultProps.js +9 -3
  14. package/es/DateTime/props/propTypes.js +16 -4
  15. package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -1
  16. package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +1 -0
  17. package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +1 -0
  18. package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -0
  19. package/es/ListItem/ListItemWithAvatar.js +7 -3
  20. package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
  21. package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +1 -1
  22. package/es/ListItem/props/propTypes.js +6 -1
  23. package/es/MultiSelect/AdvancedGroupMultiSelect.js +4 -2
  24. package/es/MultiSelect/AdvancedMultiSelect.js +4 -2
  25. package/es/MultiSelect/MultiSelect.js +11 -3
  26. package/es/MultiSelect/props/propTypes.js +6 -3
  27. package/es/Popup/Popup.js +125 -7
  28. package/es/Popup/intersectionObserver.js +49 -0
  29. package/es/Popup/props/propTypes.js +30 -0
  30. package/es/Radio/Radio.js +9 -7
  31. package/es/Radio/Radio.module.css +1 -1
  32. package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +77 -77
  33. package/es/Responsive/ResizeObserver.js +21 -85
  34. package/es/Responsive/ResizeObserverWithPolyfill.js +140 -0
  35. package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1 -0
  36. package/es/Select/GroupSelect.js +15 -3
  37. package/es/Select/props/defaultProps.js +2 -1
  38. package/es/Select/props/propTypes.js +5 -1
  39. package/es/Tag/Tag.js +10 -3
  40. package/es/Tag/props/defaultProps.js +2 -1
  41. package/es/Tag/props/propTypes.js +7 -1
  42. package/es/TextBox/TextBox.js +1 -1
  43. package/es/Textarea/Textarea.js +4 -2
  44. package/es/Textarea/Textarea.module.css +1 -1
  45. package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +41 -41
  46. package/es/Textarea/props/propTypes.js +2 -1
  47. package/es/Typography/Typography.js +38 -0
  48. package/es/Typography/css/Typography.module.css +489 -0
  49. package/es/Typography/css/cssJSLogic.js +56 -0
  50. package/es/Typography/props/defaultProps.js +8 -0
  51. package/es/Typography/props/propTypes.js +27 -0
  52. package/es/Typography/utils/index.js +50 -0
  53. package/es/index.js +1 -1
  54. package/es/v1/AppContainer/AppContainer.js +0 -6
  55. package/es/v1/DateTime/CalendarView.js +9 -6
  56. package/es/v1/DateTime/DateTime.js +18 -4
  57. package/es/v1/DateTime/DateWidget.js +5 -1
  58. package/es/v1/DateTime/DaysRow.js +3 -2
  59. package/es/v1/DateTime/props/defaultProps.js +9 -3
  60. package/es/v1/DateTime/props/propTypes.js +11 -4
  61. package/es/v1/MultiSelect/MultiSelect.js +7 -1
  62. package/es/v1/Select/GroupSelect.js +5 -0
  63. package/es/v1/Typography/Typography.js +1 -1
  64. package/lib/AvatarTeam/props/propTypes.js +3 -1
  65. package/lib/CheckBox/CheckBox.js +5 -4
  66. package/lib/CheckBox/CheckBox.module.css +5 -2
  67. package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +64 -64
  68. package/lib/DateTime/CalendarView.js +17 -12
  69. package/lib/DateTime/DateTime.js +38 -9
  70. package/lib/DateTime/DateTime.module.css +5 -5
  71. package/lib/DateTime/DateWidget.js +13 -2
  72. package/lib/DateTime/DaysRow.js +3 -2
  73. package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
  74. package/lib/DateTime/props/defaultProps.js +9 -3
  75. package/lib/DateTime/props/propTypes.js +16 -4
  76. package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -1
  77. package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +1 -0
  78. package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +1 -0
  79. package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -0
  80. package/lib/ListItem/ListItemWithAvatar.js +8 -4
  81. package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
  82. package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +1 -1
  83. package/lib/ListItem/props/propTypes.js +8 -1
  84. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +4 -2
  85. package/lib/MultiSelect/AdvancedMultiSelect.js +4 -2
  86. package/lib/MultiSelect/MultiSelect.js +11 -3
  87. package/lib/MultiSelect/props/propTypes.js +8 -6
  88. package/lib/Popup/Popup.js +135 -8
  89. package/lib/Popup/intersectionObserver.js +72 -0
  90. package/lib/Popup/props/propTypes.js +51 -0
  91. package/lib/Radio/Radio.js +10 -7
  92. package/lib/Radio/Radio.module.css +1 -1
  93. package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +77 -77
  94. package/lib/Responsive/ResizeObserver.js +20 -88
  95. package/lib/Responsive/ResizeObserverWithPolyfill.js +168 -0
  96. package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1 -0
  97. package/lib/Select/GroupSelect.js +17 -5
  98. package/lib/Select/props/defaultProps.js +2 -1
  99. package/lib/Select/props/propTypes.js +5 -1
  100. package/lib/Tag/Tag.js +10 -5
  101. package/lib/Tag/props/defaultProps.js +2 -1
  102. package/lib/Tag/props/propTypes.js +9 -1
  103. package/lib/TextBox/TextBox.js +1 -1
  104. package/lib/Textarea/Textarea.js +4 -2
  105. package/lib/Textarea/Textarea.module.css +1 -1
  106. package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +41 -41
  107. package/lib/Textarea/props/propTypes.js +2 -1
  108. package/lib/Typography/Typography.js +56 -0
  109. package/lib/Typography/css/Typography.module.css +489 -0
  110. package/lib/Typography/css/cssJSLogic.js +48 -0
  111. package/lib/Typography/props/defaultProps.js +15 -0
  112. package/lib/Typography/props/propTypes.js +38 -0
  113. package/lib/Typography/utils/index.js +59 -0
  114. package/lib/index.js +1 -1
  115. package/lib/v1/AppContainer/AppContainer.js +0 -12
  116. package/lib/v1/DateTime/CalendarView.js +9 -6
  117. package/lib/v1/DateTime/DateTime.js +27 -4
  118. package/lib/v1/DateTime/DateWidget.js +5 -1
  119. package/lib/v1/DateTime/DaysRow.js +3 -2
  120. package/lib/v1/DateTime/props/defaultProps.js +9 -3
  121. package/lib/v1/DateTime/props/propTypes.js +11 -4
  122. package/lib/v1/MultiSelect/MultiSelect.js +7 -1
  123. package/lib/v1/Select/GroupSelect.js +5 -0
  124. package/lib/v1/Typography/Typography.js +2 -2
  125. package/package.json +8 -8
  126. package/propValidationArg.json +1 -1
  127. /package/es/v1/Typography/css/{Typography.module.css → v1_Typography.module.css} +0 -0
  128. /package/lib/v1/Typography/css/{Typography.module.css → v1_Typography.module.css} +0 -0
@@ -0,0 +1,489 @@
1
+ .reset {
2
+ font-weight: initial;
3
+ margin: initial ;
4
+ padding: initial ;
5
+ }
6
+
7
+ .dotted {
8
+ composes: dotted from '../../common/common.module.css';
9
+ }
10
+
11
+ .display_block {
12
+ display: block;
13
+ }
14
+
15
+ .display_inlineBlock {
16
+ display: inline-block;
17
+ }
18
+
19
+ .display_inline {
20
+ display: inline;
21
+ }
22
+
23
+ .display_initial {
24
+ display: initial;
25
+ }
26
+
27
+ .font_regular {
28
+ font-family: var(--zd_regular);
29
+ }
30
+
31
+ .font_light {
32
+ font-family: var(--zd_light);
33
+ }
34
+
35
+ .font_semibold {
36
+ font-family: var(--zd_semibold);
37
+ composes: ftsmooth from '../../common/common.module.css';
38
+ }
39
+
40
+ .font_bold {
41
+ font-family: var(--zd_bold);
42
+ composes: ftsmooth from '../../common/common.module.css';
43
+ }
44
+
45
+ .fontStyles_normal {
46
+ font-style: normal;
47
+ }
48
+
49
+ .fontStyles_italic {
50
+ font-style: italic;
51
+ }
52
+
53
+ .decoration_default {
54
+ text-decoration: none;
55
+ }
56
+
57
+ .decoration_underline {
58
+ text-decoration: underline;
59
+ }
60
+
61
+ .decoration_strike {
62
+ text-decoration: line-through;
63
+ }
64
+
65
+ .decoration_overline {
66
+ text-decoration: overline;
67
+ }
68
+
69
+ [dir=ltr] .textalign_left {
70
+ text-align: left;
71
+ }
72
+
73
+ [dir=rtl] .textalign_left {
74
+ text-align: right;
75
+ }
76
+
77
+ [dir=ltr] .textalign_right {
78
+ text-align: right;
79
+ }
80
+
81
+ [dir=rtl] .textalign_right {
82
+ text-align: left;
83
+ }
84
+
85
+ .textalign_center {
86
+ text-align: center;
87
+ }
88
+
89
+ .textalign_justify {
90
+ text-align: justify;
91
+ }
92
+
93
+ .transform_default {
94
+ text-transform: none;
95
+ }
96
+
97
+ .transform_upper {
98
+ text-transform: uppercase;
99
+ }
100
+
101
+ .transform_lower {
102
+ text-transform: lowercase;
103
+ }
104
+
105
+ .transform_capital {
106
+ text-transform: capitalize;
107
+ }
108
+
109
+ .dotted_clamp {
110
+ display: -webkit-box;
111
+ -webkit-box-orient: vertical;
112
+ overflow: hidden;
113
+ }
114
+
115
+ .lineclamp_1 {
116
+ -webkit-line-clamp: 1;
117
+ composes: dotted_clamp;
118
+ }
119
+
120
+ .lineclamp_2 {
121
+ -webkit-line-clamp: 2;
122
+ composes: dotted_clamp;
123
+ }
124
+
125
+ .lineclamp_3 {
126
+ -webkit-line-clamp: 3;
127
+ composes: dotted_clamp;
128
+ }
129
+
130
+ .lineclamp_4 {
131
+ -webkit-line-clamp: 4;
132
+ composes: dotted_clamp;
133
+ }
134
+
135
+ .lineclamp_5 {
136
+ -webkit-line-clamp: 5;
137
+ composes: dotted_clamp;
138
+ }
139
+
140
+ .wordBreak_breakAll {
141
+ word-break: break-all
142
+ }
143
+
144
+ .wordBreak_keepAll {
145
+ word-break: keep-all
146
+ }
147
+
148
+ .wordBreak_breakWord {
149
+ word-break: break-word
150
+ }
151
+
152
+ .wordWrap_normal {
153
+ word-wrap: normal;
154
+ }
155
+
156
+ .wordWrap_break {
157
+ word-wrap: break-word
158
+ }
159
+
160
+ .whiteSpace_normal {
161
+ white-space: normal
162
+ }
163
+
164
+ .whiteSpace_noWrap {
165
+ white-space: nowrap
166
+ }
167
+
168
+ .whiteSpace_pre {
169
+ white-space: pre
170
+ }
171
+
172
+ .whiteSpace_preLine {
173
+ white-space: pre-line
174
+ }
175
+
176
+ .whiteSpace_preWrap {
177
+ white-space: pre-wrap
178
+ }
179
+
180
+
181
+
182
+ /*...............Font Size Start.........*/
183
+
184
+ .size7 {
185
+ font-size: var(--zd_font_size7) ;
186
+ }
187
+
188
+ .size8 {
189
+ font-size: var(--zd_font_size8) ;
190
+ }
191
+
192
+ .size9 {
193
+ font-size: var(--zd_font_size9) ;
194
+ }
195
+
196
+ .size10 {
197
+ font-size: var(--zd_font_size10) ;
198
+ }
199
+
200
+ .size11 {
201
+ font-size: var(--zd_font_size11) ;
202
+ }
203
+
204
+ .size12 {
205
+ font-size: var(--zd_font_size12) ;
206
+ }
207
+
208
+ .size13 {
209
+ font-size: var(--zd_font_size13) ;
210
+ }
211
+
212
+ .size14 {
213
+ font-size: var(--zd_font_size14) ;
214
+ }
215
+
216
+ .size15 {
217
+ font-size: var(--zd_font_size15) ;
218
+ }
219
+
220
+ .size16 {
221
+ font-size: var(--zd_font_size16) ;
222
+ }
223
+
224
+ .size17 {
225
+ font-size: var(--zd_font_size17) ;
226
+ }
227
+
228
+ .size18 {
229
+ font-size: var(--zd_font_size18) ;
230
+ }
231
+
232
+ .size19 {
233
+ font-size: var(--zd_font_size19) ;
234
+ }
235
+
236
+ .size20 {
237
+ font-size: var(--zd_font_size20) ;
238
+ }
239
+
240
+ .size21 {
241
+ font-size: var(--zd_font_size21) ;
242
+ }
243
+
244
+ .size22 {
245
+ font-size: var(--zd_font_size22) ;
246
+ }
247
+
248
+ .size24 {
249
+ font-size: var(--zd_font_size24) ;
250
+ }
251
+
252
+ .size25 {
253
+ font-size: var(--zd_font_size25) ;
254
+ }
255
+
256
+ .size26 {
257
+ font-size: var(--zd_font_size26) ;
258
+ }
259
+
260
+ .size28 {
261
+ font-size: var(--zd_font_size28) ;
262
+ }
263
+
264
+ .size29 {
265
+ font-size: var(--zd_font_size29) ;
266
+ }
267
+
268
+ .size30 {
269
+ font-size: var(--zd_font_size30) ;
270
+ }
271
+
272
+ .size32 {
273
+ font-size: var(--zd_font_size32) ;
274
+ }
275
+
276
+ .size34 {
277
+ font-size: var(--zd_font_size34) ;
278
+ }
279
+
280
+ .size35 {
281
+ font-size: var(--zd_font_size35) ;
282
+ }
283
+
284
+ .size36 {
285
+ font-size: var(--zd_font_size36) ;
286
+ }
287
+
288
+ .size40 {
289
+ font-size: var(--zd_font_size40) ;
290
+ }
291
+
292
+ .size50 {
293
+ font-size: var(--zd_font_size50) ;
294
+ }
295
+
296
+ .sizeinherit {
297
+ font-size: inherit ;
298
+ }
299
+
300
+ /*...............Font Size End.........*/
301
+
302
+ /*............... Lineheight Start.........*/
303
+
304
+ .lineheight_inherit {
305
+ line-height: inherit;
306
+ }
307
+
308
+ .lineheight_initial {
309
+ line-height: initial;
310
+ }
311
+
312
+ .lineheight_normal {
313
+ line-height: normal;
314
+ }
315
+
316
+ .lineheight_0 {
317
+ line-height: 0;
318
+ }
319
+
320
+ .lineheight_0_1 {
321
+ line-height: 0.1;
322
+ }
323
+
324
+ .lineheight_0_2 {
325
+ line-height: 0.2;
326
+ }
327
+
328
+ .lineheight_0_3 {
329
+ line-height: 0.3;
330
+ }
331
+
332
+ .lineheight_0_4 {
333
+ line-height: 0.4;
334
+ }
335
+
336
+ .lineheight_0_5 {
337
+ line-height: 0.5;
338
+ }
339
+
340
+ .lineheight_0_6 {
341
+ line-height: 0.6;
342
+ }
343
+
344
+ .lineheight_0_7 {
345
+ line-height: 0.7;
346
+ }
347
+
348
+ .lineheight_0_8 {
349
+ line-height: 0.8;
350
+ }
351
+
352
+ .lineheight_0_9 {
353
+ line-height: 0.9;
354
+ }
355
+
356
+ .lineheight_1 {
357
+ line-height: 1;
358
+ }
359
+
360
+ .lineheight_1_1 {
361
+ line-height: 1.1;
362
+ }
363
+
364
+ .lineheight_1_2 {
365
+ line-height: 1.2;
366
+ }
367
+
368
+ .lineheight_1_3 {
369
+ line-height: 1.3;
370
+ }
371
+
372
+ .lineheight_1_4 {
373
+ line-height: 1.4;
374
+ }
375
+
376
+ .lineheight_1_5 {
377
+ line-height: 1.5;
378
+ }
379
+
380
+ .lineheight_1_6 {
381
+ line-height: 1.6;
382
+ }
383
+
384
+ .lineheight_1_7 {
385
+ line-height: 1.7;
386
+ }
387
+
388
+ .lineheight_1_8 {
389
+ line-height: 1.8;
390
+ }
391
+
392
+ .lineheight_1_9 {
393
+ line-height: 1.9;
394
+ }
395
+
396
+ .lineheight_2 {
397
+ line-height: 2;
398
+ }
399
+
400
+
401
+ /*............... Lineheight End.........*/
402
+
403
+ /*............... Letterspacing Start.........*/
404
+
405
+ .letterspacing_inherit {
406
+ letter-spacing: inherit;
407
+ }
408
+
409
+ .letterspacing_0_1 {
410
+ letter-spacing: 0.1px;
411
+ }
412
+
413
+ .letterspacing_0_2 {
414
+ letter-spacing: 0.2px;
415
+ }
416
+
417
+ .letterspacing_0_3 {
418
+ letter-spacing: 0.3px;
419
+ }
420
+
421
+ .letterspacing_0_4 {
422
+ letter-spacing: 0.4px;
423
+ }
424
+
425
+ .letterspacing_0_5 {
426
+ letter-spacing: 0.5px;
427
+ }
428
+
429
+ .letterspacing_0_6 {
430
+ letter-spacing: 0.6px;
431
+ }
432
+
433
+ .letterspacing_0_7 {
434
+ letter-spacing: 0.7px;
435
+ }
436
+
437
+ .letterspacing_0_8 {
438
+ letter-spacing: 0.8px;
439
+ }
440
+
441
+ .letterspacing_0_9 {
442
+ letter-spacing: 0.9px;
443
+ }
444
+
445
+ .letterspacing_1 {
446
+ letter-spacing: 1px;
447
+ }
448
+
449
+ .letterspacing_1_1 {
450
+ letter-spacing: 1.1px;
451
+ }
452
+
453
+ .letterspacing_1_2 {
454
+ letter-spacing: 1.2px;
455
+ }
456
+
457
+ .letterspacing_1_3 {
458
+ letter-spacing: 1.3px;
459
+ }
460
+
461
+ .letterspacing_1_4 {
462
+ letter-spacing: 1.4px;
463
+ }
464
+
465
+ .letterspacing_1_5 {
466
+ letter-spacing: 1.5px;
467
+ }
468
+
469
+ .letterspacing_1_6 {
470
+ letter-spacing: 1.6px;
471
+ }
472
+
473
+ .letterspacing_1_7 {
474
+ letter-spacing: 1.7px;
475
+ }
476
+
477
+ .letterspacing_1_8 {
478
+ letter-spacing: 1.8px;
479
+ }
480
+
481
+ .letterspacing_1_9 {
482
+ letter-spacing: 1.9px;
483
+ }
484
+
485
+ .letterspacing_2 {
486
+ letter-spacing: 2px;
487
+ }
488
+
489
+ /*............... Letterspacing End.........*/
@@ -0,0 +1,56 @@
1
+ import { compileClassNames } from '@zohodesk/utils';
2
+ import { letterspacingMapping, lineheightMapping } from '../utils';
3
+ export default function cssJSLogic(_ref) {
4
+ let {
5
+ props,
6
+ style
7
+ } = _ref;
8
+ let {
9
+ $flag_reset,
10
+ $flag_dotted,
11
+ $ui_size,
12
+ $ui_lineClamp,
13
+ $ui_lineHeight,
14
+ $ui_display,
15
+ $ui_weight,
16
+ $ui_typeFace,
17
+ $ui_textAlign,
18
+ $ui_letterSpacing,
19
+ $ui_transform,
20
+ $ui_decoration,
21
+ $ui_className,
22
+ $ui_wordBreak,
23
+ $ui_wordWrap,
24
+ $ui_whiteSpace
25
+ } = props;
26
+
27
+ if ($ui_letterSpacing) {
28
+ $ui_letterSpacing = letterspacingMapping[$ui_letterSpacing];
29
+ }
30
+
31
+ if ($ui_lineHeight) {
32
+ $ui_lineHeight = lineheightMapping[$ui_lineHeight];
33
+ }
34
+
35
+ let typographyClass = compileClassNames({
36
+ [style.reset]: $flag_reset,
37
+ [style.dotted]: $flag_dotted,
38
+ [style[`size${$ui_size}`]]: !!$ui_size,
39
+ [style[`lineclamp_${$ui_lineClamp}`]]: !!$ui_lineClamp,
40
+ [style[`lineheight_${$ui_lineHeight}`]]: !!$ui_lineHeight,
41
+ [style[`display_${$ui_display}`]]: !!$ui_display,
42
+ [style[`font_${$ui_weight}`]]: !!$ui_weight,
43
+ [style[`fontStyles_${$ui_typeFace}`]]: !!$ui_typeFace,
44
+ [style[`textalign_${$ui_textAlign}`]]: !!$ui_textAlign,
45
+ [style[`letterspacing_${$ui_letterSpacing}`]]: !!$ui_letterSpacing,
46
+ [style[`transform_${$ui_transform}`]]: !!$ui_transform,
47
+ [style[`decoration_${$ui_decoration}`]]: !!$ui_decoration,
48
+ [$ui_className]: !!$ui_className,
49
+ [style[`wordBreak_${$ui_wordBreak}`]]: !!$ui_wordBreak,
50
+ [style[`wordWrap_${$ui_wordWrap}`]]: !!$ui_wordWrap,
51
+ [style[`whiteSpace_${$ui_whiteSpace}`]]: !!$ui_whiteSpace
52
+ });
53
+ return {
54
+ typographyClass
55
+ };
56
+ }
@@ -0,0 +1,8 @@
1
+ export const defaultProps = {
2
+ $ui_className: '',
3
+ $ui_tagName: 'div',
4
+ $flag_reset: false,
5
+ $flag_dotted: false,
6
+ $tagAttributes_text: {},
7
+ $a11yAttributes_text: {}
8
+ };
@@ -0,0 +1,27 @@
1
+ import PropTypes from 'prop-types';
2
+ export const propTypes = {
3
+ children: PropTypes.node,
4
+ $ui_className: PropTypes.string,
5
+ $ui_tagName: PropTypes.string,
6
+ $flag_reset: PropTypes.bool,
7
+ $flag_dotted: PropTypes.bool,
8
+ $ui_display: PropTypes.oneOf(['block', 'inlineBlock', 'inline', 'initial']),
9
+ $ui_weight: PropTypes.oneOf(['regular', 'light', 'semibold', 'bold']),
10
+ $ui_textAlign: PropTypes.oneOf(['left', 'right', 'center', 'justify']),
11
+ $ui_transform: PropTypes.oneOf(['default', 'upper', 'lower', 'capital']),
12
+ $ui_lineClamp: PropTypes.oneOf(['1', '2', '3', '4', '5']),
13
+ $ui_typeFace: PropTypes.oneOf(['normal', 'italic']),
14
+ $ui_decoration: PropTypes.oneOf(['default', 'underline', 'strike', 'overline']),
15
+ $ui_size: PropTypes.oneOf(['7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '24', '25', '26', '28', '29', '30', '32', '34', '35', '36', '40', '50', 'inherit']),
16
+ $ui_lineHeight: PropTypes.oneOf(['0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2', 'normal', 'initial', 'inherit']),
17
+ $ui_letterSpacing: PropTypes.oneOf(['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2', 'inherit']),
18
+ $ui_wordBreak: PropTypes.oneOf(['breakAll', 'keepAll', 'breakWord']),
19
+ $ui_wordWrap: PropTypes.oneOf(['normal', 'break']),
20
+ $ui_whiteSpace: PropTypes.oneOf(['normal', 'noWrap', 'pre', 'preLine', 'preWrap']),
21
+ $i18n_dataTitle: PropTypes.string,
22
+ testId: PropTypes.string,
23
+ customId: PropTypes.string,
24
+ customStyle: PropTypes.object,
25
+ $a11yAttributes_text: PropTypes.object,
26
+ $tagAttributes_text: PropTypes.object
27
+ };
@@ -0,0 +1,50 @@
1
+ /* eslint-disable */
2
+ export const letterspacingMapping = {
3
+ 'inherit': 'inherit',
4
+ '0.1': '0_1',
5
+ '0.2': '0_2',
6
+ '0.3': '0_3',
7
+ '0.4': '0_4',
8
+ '0.5': '0_5',
9
+ '0.6': '0_6',
10
+ '0.7': '0_7',
11
+ '0.8': '0_8',
12
+ '0.9': '0_9',
13
+ '1': '1',
14
+ '1.1': '1_1',
15
+ '1.2': '1_2',
16
+ '1.3': '1_3',
17
+ '1.4': '1_4',
18
+ '1.5': '1_5',
19
+ '1.6': '1_6',
20
+ '1.7': '1_7',
21
+ '1.8': '1_8',
22
+ '1.9': '1_9',
23
+ '2': '2'
24
+ };
25
+ export const lineheightMapping = {
26
+ 'inherit': 'inherit',
27
+ 'initial': 'initial',
28
+ 'normal': 'normal',
29
+ '0': '0',
30
+ '0.1': '0_1',
31
+ '0.2': '0_2',
32
+ '0.3': '0_3',
33
+ '0.4': '0_4',
34
+ '0.5': '0_5',
35
+ '0.6': '0_6',
36
+ '0.7': '0_7',
37
+ '0.8': '0_8',
38
+ '0.9': '0_9',
39
+ '1': '1',
40
+ '1.1': '1_1',
41
+ '1.2': '1_2',
42
+ '1.3': '1_3',
43
+ '1.4': '1_4',
44
+ '1.5': '1_5',
45
+ '1.6': '1_6',
46
+ '1.7': '1_7',
47
+ '1.8': '1_8',
48
+ '1.9': '1_9',
49
+ '2': '2'
50
+ };
package/es/index.js CHANGED
@@ -40,4 +40,4 @@ import * as _utils from './utils';
40
40
  export { _utils as utils };
41
41
  export * from './VelocityAnimation';
42
42
  export * from './semantic';
43
- export { default as Typography } from './v1/Typography/Typography';
43
+ export { default as Typography } from './Typography/Typography';
@@ -3,12 +3,6 @@ import { defaultProps } from './props/defaultProps';
3
3
  import { propTypes } from './props/propTypes';
4
4
  import { Container, Box } from '../Layout';
5
5
  import Tooltip from '../Tooltip/Tooltip';
6
- import '../../common/basic.module.css';
7
- import '@zohodesk/variables/assets/colorVariables.module.css';
8
- import '@zohodesk/variables/assets/dotVariables.module.css';
9
- import '@zohodesk/variables/assets/sizeVariables.module.css';
10
- import '@zohodesk/variables/assets/fontsizeVariables.module.css';
11
- import '@zohodesk/variables/lib/fontFamilyVariables.module.css';
12
6
  import '@zohodesk/variables/assets/transitionVariables.module.css';
13
7
  import '@zohodesk/variables/assets/no_transitionVariables.module.css';
14
8
  import '../../common/a11y.module.css';
@@ -34,10 +34,12 @@ export default class CalendarView extends React.PureComponent {
34
34
  todayDate,
35
35
  todayYear,
36
36
  startDate,
37
- endDate
37
+ endDate,
38
+ weekStartDay,
39
+ holidays
38
40
  } = this.props;
39
41
  const userSeeDate = new Date(year, month, 1);
40
- const userSeeDay = userSeeDate.getDay() + 1;
42
+ const userSeeDay = (userSeeDate.getDay() - weekStartDay + dayNames.length) % dayNames.length + 1;
41
43
  const userSeeYear = userSeeDate.getFullYear();
42
44
  const userSeeMonth = userSeeDate.getMonth();
43
45
  const monthEnd = getMonthEnd(month, year);
@@ -65,10 +67,10 @@ export default class CalendarView extends React.PureComponent {
65
67
  let output = null;
66
68
 
67
69
  for (let i = 1; i <= 7; i++) {
68
- let tdclass = `${style.datesStr} ${style.grid}`;
70
+ let tdclass = `${style.datesStr} ${style.grid}`; // if (i === 1) {
69
71
 
70
- if (i === 1) {
71
- tdclass += ` ${style.sunday}`;
72
+ if (holidays.includes(i - 1)) {
73
+ tdclass += ` ${style.holiday}`;
72
74
  }
73
75
 
74
76
  if (incremleti >= userSeeDay && incremday <= monthEnd) {
@@ -177,7 +179,8 @@ export default class CalendarView extends React.PureComponent {
177
179
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DaysRow, {
178
180
  dayNames: dayNames,
179
181
  dayNamesShort: dayNamesShort,
180
- ariaLabel: dayNamesShort
182
+ ariaLabel: dayNamesShort,
183
+ holidays: holidays
181
184
  }), /*#__PURE__*/React.createElement("div", {
182
185
  "data-id": `${dataId}_dateContainer`,
183
186
  "data-test-id": `${dataId}_dateContainer`,