react-native-ui-lib 7.39.0 → 7.39.1-snapshot.6732

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 (189) hide show
  1. package/package.json +4 -2
  2. package/scripts/docs/buildDocsCommon.js +16 -83
  3. package/src/assets/index.js +2 -5
  4. package/src/assets/internal/icons/index.js +50 -0
  5. package/src/assets/internal/icons/index.web.js +50 -0
  6. package/src/assets/internal/images/index.js +26 -0
  7. package/src/assets/internal/images/index.web.js +26 -0
  8. package/src/assets/internal/index.d.ts +4 -0
  9. package/src/assets/internal/index.js +8 -0
  10. package/src/commons/Constants.d.ts +1 -0
  11. package/src/commons/Constants.js +4 -2
  12. package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.api.json +40 -0
  13. package/src/components/avatar/index.d.ts +8 -19
  14. package/src/components/avatar/index.js +4 -2
  15. package/src/components/button/button.api.json +25 -85
  16. package/src/components/card/index.js +1 -1
  17. package/src/components/checkbox/index.d.ts +4 -1
  18. package/src/components/checkbox/index.js +7 -5
  19. package/src/components/chip/index.js +1 -1
  20. package/src/components/chipsInput/index.js +2 -2
  21. package/src/components/colorPicker/ColorPickerDialog.js +1 -1
  22. package/src/components/colorPicker/ColorPickerDialogHeader.js +2 -2
  23. package/src/components/colorPicker/ColorPickerPreview.js +2 -2
  24. package/src/components/colorPicker/index.js +1 -1
  25. package/src/components/colorSwatch/index.js +2 -3
  26. package/src/components/dateTimePicker/index.js +2 -2
  27. package/src/components/hint/hint.api.json +39 -5
  28. package/src/components/hint/index.js +2 -3
  29. package/src/components/icon/index.d.ts +12 -3
  30. package/src/components/icon/index.js +18 -9
  31. package/src/components/image/index.d.ts +1 -1
  32. package/src/components/modal/TopBar.js +1 -1
  33. package/src/components/modal/api/modalTopBar.api.json +1 -1
  34. package/src/components/modal/modal.api.json +54 -0
  35. package/src/components/overlay/index.js +4 -6
  36. package/src/components/panningViews/panDismissibleView.js +1 -1
  37. package/src/components/panningViews/panGestureView.js +1 -1
  38. package/src/components/panningViews/panListenerView.js +1 -1
  39. package/src/components/panningViews/panResponderView.js +1 -1
  40. package/src/components/panningViews/panningContext.js +1 -0
  41. package/src/components/picker/PickerItem.js +1 -1
  42. package/src/components/picker/PickerItemsList.js +6 -2
  43. package/src/components/picker/PickerSelectionStatusBar.d.ts +3 -0
  44. package/src/components/picker/PickerSelectionStatusBar.js +60 -0
  45. package/src/components/picker/api/picker.api.json +387 -5
  46. package/src/components/picker/helpers/useFieldType.js +2 -2
  47. package/src/components/picker/helpers/usePickerSelection.d.ts +4 -1
  48. package/src/components/picker/helpers/usePickerSelection.js +19 -3
  49. package/src/components/picker/index.d.ts +2 -2
  50. package/src/components/picker/index.js +15 -7
  51. package/src/components/picker/types.d.ts +48 -1
  52. package/src/components/scrollBar/index.js +3 -3
  53. package/src/components/sortableList/SortableList.api.json +7 -7
  54. package/src/components/stepper/index.js +3 -8
  55. package/src/components/tabController/apis/pageCarousel.api.json +8 -5
  56. package/src/components/textField/ClearButton.js +1 -1
  57. package/src/components/timeline/timeline.api.json +57 -106
  58. package/src/components/toast/index.js +1 -1
  59. package/src/components/wizard/WizardStates.js +3 -4
  60. package/src/hooks/useScrollTo/index.js +9 -4
  61. package/src/incubator/dialog/useDialogContent.js +1 -1
  62. package/src/incubator/expandableOverlay/index.js +1 -0
  63. package/src/incubator/panView/index.js +1 -1
  64. package/src/incubator/slider/Thumb.js +8 -1
  65. package/src/incubator/toast/toast.api.json +57 -7
  66. package/src/index.d.ts +1 -1
  67. package/src/index.js +7 -0
  68. package/src/assets/icons/index.js +0 -26
  69. package/src/assets/images/index.js +0 -5
  70. package/src/components/stepper/assets/minusSmall.png +0 -0
  71. package/src/components/stepper/assets/minusSmall@1.5x.png +0 -0
  72. package/src/components/stepper/assets/minusSmall@2x.png +0 -0
  73. package/src/components/stepper/assets/minusSmall@3x.png +0 -0
  74. package/src/components/stepper/assets/minusSmall@4x.png +0 -0
  75. package/src/components/stepper/assets/plusSmall.png +0 -0
  76. package/src/components/stepper/assets/plusSmall@1.5x.png +0 -0
  77. package/src/components/stepper/assets/plusSmall@2x.png +0 -0
  78. package/src/components/stepper/assets/plusSmall@3x.png +0 -0
  79. package/src/components/stepper/assets/plusSmall@4x.png +0 -0
  80. /package/src/assets/{icons → internal/icons}/check.png +0 -0
  81. /package/src/assets/{icons → internal/icons}/check@1.5x.png +0 -0
  82. /package/src/assets/{icons → internal/icons}/check@2x.png +0 -0
  83. /package/src/assets/{icons → internal/icons}/check@3x.png +0 -0
  84. /package/src/assets/{icons → internal/icons}/check@4x.png +0 -0
  85. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall.png +0 -0
  86. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@1.5x.png +0 -0
  87. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@2x.png +0 -0
  88. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@3x.png +0 -0
  89. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@4x.png +0 -0
  90. /package/src/assets/{icons/check-small.png → internal/icons/checkSmall.png} +0 -0
  91. /package/src/assets/{icons/check-small@1.5x.png → internal/icons/checkSmall@1.5x.png} +0 -0
  92. /package/src/assets/{icons/check-small@2x.png → internal/icons/checkSmall@2x.png} +0 -0
  93. /package/src/assets/{icons/check-small@3x.png → internal/icons/checkSmall@3x.png} +0 -0
  94. /package/src/assets/{icons/check-small@4x.png → internal/icons/checkSmall@4x.png} +0 -0
  95. /package/src/{components/picker/assets/dropdown.png → assets/internal/icons/chevronDown.png} +0 -0
  96. /package/src/{components/picker/assets/dropdown@1.5x.png → assets/internal/icons/chevronDown@1.5x.png} +0 -0
  97. /package/src/{components/picker/assets/dropdown@2x.png → assets/internal/icons/chevronDown@2x.png} +0 -0
  98. /package/src/{components/picker/assets/dropdown@3x.png → assets/internal/icons/chevronDown@3x.png} +0 -0
  99. /package/src/{components/picker/assets/dropdown@4x.png → assets/internal/icons/chevronDown@4x.png} +0 -0
  100. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall.png +0 -0
  101. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@1.5x.png +0 -0
  102. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@2x.png +0 -0
  103. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@3x.png +0 -0
  104. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@4x.png +0 -0
  105. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline.png +0 -0
  106. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@1.5x.png +0 -0
  107. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@2x.png +0 -0
  108. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@3x.png +0 -0
  109. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@4x.png +0 -0
  110. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall.png +0 -0
  111. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@1.5x.png +0 -0
  112. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@2x.png +0 -0
  113. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@3x.png +0 -0
  114. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@4x.png +0 -0
  115. /package/src/assets/{icons → internal/icons}/minusSmall.png +0 -0
  116. /package/src/assets/{icons → internal/icons}/minusSmall@1.5x.png +0 -0
  117. /package/src/assets/{icons → internal/icons}/minusSmall@2x.png +0 -0
  118. /package/src/assets/{icons → internal/icons}/minusSmall@3x.png +0 -0
  119. /package/src/assets/{icons → internal/icons}/minusSmall@4x.png +0 -0
  120. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline.png +0 -0
  121. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@1.5x.png +0 -0
  122. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@2x.png +0 -0
  123. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@3x.png +0 -0
  124. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@4x.png +0 -0
  125. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall.png +0 -0
  126. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@1.5x.png +0 -0
  127. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@2x.png +0 -0
  128. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@3x.png +0 -0
  129. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@4x.png +0 -0
  130. /package/src/assets/{icons → internal/icons}/plusSmall.png +0 -0
  131. /package/src/assets/{icons → internal/icons}/plusSmall@1.5x.png +0 -0
  132. /package/src/assets/{icons → internal/icons}/plusSmall@2x.png +0 -0
  133. /package/src/assets/{icons → internal/icons}/plusSmall@3x.png +0 -0
  134. /package/src/assets/{icons → internal/icons}/plusSmall@4x.png +0 -0
  135. /package/src/assets/{icons → internal/icons}/search.png +0 -0
  136. /package/src/assets/{icons → internal/icons}/search@1.5x.png +0 -0
  137. /package/src/assets/{icons → internal/icons}/search@2x.png +0 -0
  138. /package/src/assets/{icons → internal/icons}/search@3x.png +0 -0
  139. /package/src/assets/{icons → internal/icons}/search@4x.png +0 -0
  140. /package/src/assets/{icons → internal/icons}/x.png +0 -0
  141. /package/src/assets/{icons → internal/icons}/x@2x.png +0 -0
  142. /package/src/assets/{icons → internal/icons}/x@3x.png +0 -0
  143. /package/src/assets/{icons → internal/icons}/xFlat.png +0 -0
  144. /package/src/assets/{icons → internal/icons}/xFlat@1.5x.png +0 -0
  145. /package/src/assets/{icons → internal/icons}/xFlat@2x.png +0 -0
  146. /package/src/assets/{icons → internal/icons}/xFlat@3x.png +0 -0
  147. /package/src/assets/{icons → internal/icons}/xFlat@4x.png +0 -0
  148. /package/src/assets/{icons → internal/icons}/xMedium.png +0 -0
  149. /package/src/assets/{icons → internal/icons}/xMedium@1.5x.png +0 -0
  150. /package/src/assets/{icons → internal/icons}/xMedium@2x.png +0 -0
  151. /package/src/assets/{icons → internal/icons}/xMedium@3x.png +0 -0
  152. /package/src/assets/{icons → internal/icons}/xMedium@4x.png +0 -0
  153. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall.png +0 -0
  154. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@1.5x.png +0 -0
  155. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@2x.png +0 -0
  156. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@3x.png +0 -0
  157. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@4x.png +0 -0
  158. /package/src/assets/{images → internal/images}/gradient.png +0 -0
  159. /package/src/{components/scrollBar/assets → assets/internal/images}/gradientOverlay.png +0 -0
  160. /package/src/{components/overlay/assets/GradientOverlayHigh.png → assets/internal/images/gradientOverlayHigh.png} +0 -0
  161. /package/src/{components/overlay/assets/GradientOverlayHigh@1.5x.png → assets/internal/images/gradientOverlayHigh@1.5x.png} +0 -0
  162. /package/src/{components/overlay/assets/GradientOverlayHigh@2x.png → assets/internal/images/gradientOverlayHigh@2x.png} +0 -0
  163. /package/src/{components/overlay/assets/GradientOverlayHigh@3x.png → assets/internal/images/gradientOverlayHigh@3x.png} +0 -0
  164. /package/src/{components/overlay/assets/GradientOverlayHigh@4x.png → assets/internal/images/gradientOverlayHigh@4x.png} +0 -0
  165. /package/src/{components/overlay/assets/GradientOverlayLow.png → assets/internal/images/gradientOverlayLow.png} +0 -0
  166. /package/src/{components/overlay/assets/GradientOverlayLow@1.5x.png → assets/internal/images/gradientOverlayLow@1.5x.png} +0 -0
  167. /package/src/{components/overlay/assets/GradientOverlayLow@2x.png → assets/internal/images/gradientOverlayLow@2x.png} +0 -0
  168. /package/src/{components/overlay/assets/GradientOverlayLow@3x.png → assets/internal/images/gradientOverlayLow@3x.png} +0 -0
  169. /package/src/{components/overlay/assets/GradientOverlayLow@4x.png → assets/internal/images/gradientOverlayLow@4x.png} +0 -0
  170. /package/src/{components/overlay/assets/GradientOverlayMedium.png → assets/internal/images/gradientOverlayMedium.png} +0 -0
  171. /package/src/{components/overlay/assets/GradientOverlayMedium@1.5x.png → assets/internal/images/gradientOverlayMedium@1.5x.png} +0 -0
  172. /package/src/{components/overlay/assets/GradientOverlayMedium@2x.png → assets/internal/images/gradientOverlayMedium@2x.png} +0 -0
  173. /package/src/{components/overlay/assets/GradientOverlayMedium@3x.png → assets/internal/images/gradientOverlayMedium@3x.png} +0 -0
  174. /package/src/{components/overlay/assets/GradientOverlayMedium@4x.png → assets/internal/images/gradientOverlayMedium@4x.png} +0 -0
  175. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle.png +0 -0
  176. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@1.5x.png +0 -0
  177. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@2x.png +0 -0
  178. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@3x.png +0 -0
  179. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@4x.png +0 -0
  180. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide.png +0 -0
  181. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@1.5x.png +0 -0
  182. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@2x.png +0 -0
  183. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@3x.png +0 -0
  184. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@4x.png +0 -0
  185. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch.png → assets/internal/images/transparentSwatch.png} +0 -0
  186. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@1.5x.png → assets/internal/images/transparentSwatch@1.5x.png} +0 -0
  187. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@2x.png → assets/internal/images/transparentSwatch@2x.png} +0 -0
  188. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@3x.png → assets/internal/images/transparentSwatch@3x.png} +0 -0
  189. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@4x.png → assets/internal/images/transparentSwatch@4x.png} +0 -0
@@ -2,13 +2,8 @@
2
2
  "name": "Button",
3
3
  "category": "controls",
4
4
  "description": "Customizable button component that handles press events",
5
- "extends": [
6
- "basic/TouchableOpacity"
7
- ],
8
- "modifiers": [
9
- "margin",
10
- "background"
11
- ],
5
+ "extends": ["basic/TouchableOpacity"],
6
+ "modifiers": ["margin", "background"],
12
7
  "example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ButtonsScreen.tsx",
13
8
  "images": [
14
9
  "https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Button/Button%20Sizes.png?raw=true",
@@ -169,7 +164,11 @@
169
164
  }
170
165
  ],
171
166
  "snippet": [
172
- "<Button label={'Press'$1} size={Button.sizes.medium$2} backgroundColor={Colors.red30$3}/>"
167
+ "<View flex center gap-s5>",
168
+ "<Button label={'Press'} backgroundColor={Colors.red30}/>",
169
+ "<Button label={'Press'} outline size={Button.sizes.medium}/>",
170
+ "<Button label={'Press'} iconSource={Assets.icons.demo.star}/>",
171
+ "</View>"
173
172
  ],
174
173
  "docs": {
175
174
  "hero": {
@@ -189,10 +188,7 @@
189
188
  "sections": [
190
189
  {
191
190
  "type": "table",
192
- "columns": [
193
- "Type",
194
- "Component"
195
- ],
191
+ "columns": ["Type", "Component"],
196
192
  "items": [
197
193
  {
198
194
  "title": "Main Button",
@@ -259,10 +255,7 @@
259
255
  },
260
256
  {
261
257
  "type": "table",
262
- "columns": [
263
- "Property",
264
- "Component"
265
- ],
258
+ "columns": ["Property", "Component"],
266
259
  "items": [
267
260
  {
268
261
  "title": "Primary",
@@ -289,11 +282,7 @@
289
282
  },
290
283
  {
291
284
  "type": "table",
292
- "columns": [
293
- "Property",
294
- "Primary",
295
- "Secondary"
296
- ],
285
+ "columns": ["Property", "Primary", "Secondary"],
297
286
  "items": [
298
287
  {
299
288
  "title": "Main",
@@ -355,11 +344,7 @@
355
344
  },
356
345
  {
357
346
  "type": "table",
358
- "columns": [
359
- "Property",
360
- "Primary",
361
- "Secondary"
362
- ],
347
+ "columns": ["Property", "Primary", "Secondary"],
363
348
  "items": [
364
349
  {
365
350
  "title": "Active",
@@ -404,11 +389,7 @@
404
389
  },
405
390
  {
406
391
  "type": "table",
407
- "columns": [
408
- "Property",
409
- "Primary",
410
- "Secondary"
411
- ],
392
+ "columns": ["Property", "Primary", "Secondary"],
412
393
  "items": [
413
394
  {
414
395
  "title": "Active",
@@ -453,11 +434,7 @@
453
434
  },
454
435
  {
455
436
  "type": "table",
456
- "columns": [
457
- "Property",
458
- "Primary",
459
- "Secondary"
460
- ],
437
+ "columns": ["Property", "Primary", "Secondary"],
461
438
  "items": [
462
439
  {
463
440
  "title": "Active",
@@ -502,10 +479,7 @@
502
479
  },
503
480
  {
504
481
  "type": "table",
505
- "columns": [
506
- "Property",
507
- "Component"
508
- ],
482
+ "columns": ["Property", "Component"],
509
483
  "items": [
510
484
  {
511
485
  "title": "Large",
@@ -540,10 +514,7 @@
540
514
  },
541
515
  {
542
516
  "type": "table",
543
- "columns": [
544
- "Property",
545
- "Component"
546
- ],
517
+ "columns": ["Property", "Component"],
547
518
  "items": [
548
519
  {
549
520
  "title": "Icon prefix",
@@ -574,10 +545,7 @@
574
545
  },
575
546
  {
576
547
  "type": "table",
577
- "columns": [
578
- "Property",
579
- "Component"
580
- ],
548
+ "columns": ["Property", "Component"],
581
549
  "items": [
582
550
  {
583
551
  "title": "Primary",
@@ -603,11 +571,7 @@
603
571
  },
604
572
  {
605
573
  "type": "table",
606
- "columns": [
607
- "Property",
608
- "Primary",
609
- "Secondary"
610
- ],
574
+ "columns": ["Property", "Primary", "Secondary"],
611
575
  "items": [
612
576
  {
613
577
  "title": "Main",
@@ -643,11 +607,7 @@
643
607
  },
644
608
  {
645
609
  "type": "table",
646
- "columns": [
647
- "Property",
648
- "Primary",
649
- "Secondary"
650
- ],
610
+ "columns": ["Property", "Primary", "Secondary"],
651
611
  "items": [
652
612
  {
653
613
  "title": "Active",
@@ -680,11 +640,7 @@
680
640
  },
681
641
  {
682
642
  "type": "table",
683
- "columns": [
684
- "Property",
685
- "Primary",
686
- "Secondary"
687
- ],
643
+ "columns": ["Property", "Primary", "Secondary"],
688
644
  "items": [
689
645
  {
690
646
  "title": "Active",
@@ -732,10 +688,7 @@
732
688
  },
733
689
  {
734
690
  "type": "table",
735
- "columns": [
736
- "Property",
737
- "Component"
738
- ],
691
+ "columns": ["Property", "Component"],
739
692
  "items": [
740
693
  {
741
694
  "title": "Main",
@@ -769,10 +722,7 @@
769
722
  },
770
723
  {
771
724
  "type": "table",
772
- "columns": [
773
- "Property",
774
- "Component"
775
- ],
725
+ "columns": ["Property", "Component"],
776
726
  "items": [
777
727
  {
778
728
  "title": "Regular",
@@ -797,11 +747,7 @@
797
747
  },
798
748
  {
799
749
  "type": "table",
800
- "columns": [
801
- "Property",
802
- "Regular",
803
- "Small (bodyBoldSmall)"
804
- ],
750
+ "columns": ["Property", "Regular", "Small (bodyBoldSmall)"],
805
751
  "items": [
806
752
  {
807
753
  "title": "Icon prefix",
@@ -838,10 +784,7 @@
838
784
  },
839
785
  {
840
786
  "type": "table",
841
- "columns": [
842
- "Property",
843
- "Component"
844
- ],
787
+ "columns": ["Property", "Component"],
845
788
  "items": [
846
789
  {
847
790
  "title": "Main",
@@ -876,10 +819,7 @@
876
819
  },
877
820
  {
878
821
  "type": "table",
879
- "columns": [
880
- "Property",
881
- "Component"
882
- ],
822
+ "columns": ["Property", "Component"],
883
823
  "items": [
884
824
  {
885
825
  "title": "Active",
@@ -914,7 +854,7 @@
914
854
  ]
915
855
  },
916
856
  {
917
- "title": "UX",
857
+ "title": "UX Guidelines",
918
858
  "sections": [
919
859
  {
920
860
  "type": "list",
@@ -22,7 +22,7 @@ const DEFAULT_SELECTION_PROPS = {
22
22
  borderWidth: 2,
23
23
  color: Colors.$backgroundPrimaryHeavy,
24
24
  indicatorSize: 20,
25
- icon: Assets.icons.checkSmall,
25
+ icon: Assets.internal.icons.checkSmall,
26
26
  iconColor: Colors.$iconDefaultLight,
27
27
  hideIndicator: false
28
28
  };
@@ -103,7 +103,10 @@ declare class Checkbox extends Component<CheckboxProps, CheckboxState> {
103
103
  accessible: boolean;
104
104
  accessibilityLabel: string;
105
105
  accessibilityRole: string;
106
- accessibilityStates: string[] | undefined;
106
+ accessibilityState: {
107
+ disabled: boolean | undefined;
108
+ checked: boolean | undefined;
109
+ };
107
110
  };
108
111
  animateCheckbox(value: CheckboxProps['value']): void;
109
112
  setValidation(newValue: boolean): void;
@@ -60,16 +60,18 @@ class Checkbox extends Component {
60
60
  }
61
61
  getAccessibilityProps() {
62
62
  const {
63
- accessibilityLabel,
63
+ accessibilityLabel = 'checkbox',
64
64
  disabled,
65
65
  value
66
66
  } = this.props;
67
- const checkedState = value ? 'checked' : 'unchecked';
68
67
  return {
69
68
  accessible: true,
70
- accessibilityLabel: accessibilityLabel ? `${accessibilityLabel} ${checkedState}` : `${checkedState}`,
69
+ accessibilityLabel,
71
70
  accessibilityRole: 'checkbox',
72
- accessibilityStates: disabled ? ['disabled'] : undefined
71
+ accessibilityState: {
72
+ disabled,
73
+ checked: value
74
+ }
73
75
  };
74
76
  }
75
77
  animateCheckbox(value) {
@@ -167,7 +169,7 @@ class Checkbox extends Component {
167
169
  }]}>
168
170
  <AnimatedIcon style={[this.styles.selectedIcon, {
169
171
  transform: this.animationStyle.transform
170
- }]} source={indeterminate ? Assets.icons.minusSmall : selectedIcon || Assets.icons.checkSmall} testID={`${testID}.selected`} tintColor={this.getTintColor()} />
172
+ }]} source={indeterminate ? Assets.internal.icons.minusSmall : selectedIcon || Assets.internal.icons.checkSmall} testID={`${testID}.selected`} tintColor={this.getTintColor()} />
171
173
  </Animated.View>}
172
174
  </TouchableOpacity>
173
175
  );
@@ -27,7 +27,7 @@ const Chip = ({
27
27
  containerStyle,
28
28
  onDismiss,
29
29
  dismissColor = Colors.$iconDefault,
30
- dismissIcon = Assets.icons.x,
30
+ dismissIcon = Assets.internal.icons.x,
31
31
  dismissIconStyle,
32
32
  dismissContainerStyle,
33
33
  iconProps,
@@ -5,8 +5,8 @@ import { StyleSheet } from 'react-native';
5
5
  import { Constants } from "../../commons/new";
6
6
  import { useCombinedRefs, useDidUpdate } from "../../hooks";
7
7
  import TextField from "../textField";
8
+ import Assets from "../../assets";
8
9
  import Chip from "../chip";
9
- const removeIcon = require("./assets/xSmall.png");
10
10
  export let ChipsInputChangeReason = /*#__PURE__*/function (ChipsInputChangeReason) {
11
11
  ChipsInputChangeReason["Added"] = "added";
12
12
  ChipsInputChangeReason["Removed"] = "removed";
@@ -85,7 +85,7 @@ const ChipsInput = forwardRef((props, refToForward) => {
85
85
  return <Chip key={index} customValue={index}
86
86
  // resetSpacings
87
87
  // paddingH-s2
88
- marginR-s2 marginB-s2 dismissIcon={removeIcon} recorderTag={'mask'} {...defaultChipProps} {...chip.invalid ? invalidChipProps : undefined} {...chip} onPress={onChipPress} onDismiss={isMarkedForRemoval ? removeMarkedChip : undefined} />;
88
+ marginR-s2 marginB-s2 dismissIcon={Assets.internal.icons.xSmall} recorderTag={'mask'} {...defaultChipProps} {...chip.invalid ? invalidChipProps : undefined} {...chip} onPress={onChipPress} onDismiss={isMarkedForRemoval ? removeMarkedChip : undefined} />;
89
89
  };
90
90
  const chipList = useMemo(() => {
91
91
  return <>
@@ -116,7 +116,7 @@ const ColorPickerDialog = props => {
116
116
  <ColorPickerDialogSliders keyboardHeight={keyboardHeight} color={color} onSliderValueChange={updateColor} migrate={migrate} />
117
117
  </Dialog>;
118
118
  };
119
- ColorPickerDialog.displayName = 'ColorPicker';
119
+ ColorPickerDialog.displayName = 'ColorPickerDialog';
120
120
  export default asBaseComponent(ColorPickerDialog);
121
121
  const styles = StyleSheet.create({
122
122
  dialog: {
@@ -16,10 +16,10 @@ const ColorPickerDialogHeader = props => {
16
16
  onDonePressed
17
17
  } = props;
18
18
  return <View row spread bg-$backgroundDefault paddingH-20 style={styles.header}>
19
- <Button link iconSource={Assets.icons.x} iconStyle={{
19
+ <Button link iconSource={Assets.internal.icons.x} iconStyle={{
20
20
  tintColor: Colors.$iconDefault
21
21
  }} onPress={onDismiss} accessibilityLabel={_get(accessibilityLabels, 'dismissButton')} testID={`${testID}.dialog.cancel`} />
22
- <Button color={doneButtonColor} disabled={!valid} link iconSource={Assets.icons.check} onPress={onDonePressed} accessibilityLabel={_get(accessibilityLabels, 'doneButton')} testID={`${testID}.dialog.done`} />
22
+ <Button color={doneButtonColor} disabled={!valid} link iconSource={Assets.internal.icons.check} onPress={onDonePressed} accessibilityLabel={_get(accessibilityLabels, 'doneButton')} testID={`${testID}.dialog.done`} />
23
23
  </View>;
24
24
  };
25
25
  export default ColorPickerDialogHeader;
@@ -1,5 +1,5 @@
1
1
  import React, { useRef } from 'react';
2
- import { StyleSheet, TextInput, PixelRatio, I18nManager } from 'react-native';
2
+ import { StyleSheet, TextInput, I18nManager } from 'react-native';
3
3
  import { Colors, Typography } from "../../style";
4
4
  import { BORDER_RADIUS, getHexString, getTextColor } from "./ColorPickerPresenter";
5
5
  import View from "../view";
@@ -19,7 +19,7 @@ const ColorPickerPreview = props => {
19
19
  const textInput = useRef(null);
20
20
  const hex = getHexString(color);
21
21
  const textColor = getTextColor(hex);
22
- const fontScale = PixelRatio.getFontScale();
22
+ const fontScale = Constants.getFontScale();
23
23
  const value = Colors.isTransparent(text) ? '000000' : text;
24
24
  return <View style={[styles.preview, {
25
25
  backgroundColor: hex
@@ -42,7 +42,7 @@ const ColorPicker = props => {
42
42
  <View style={[styles.buttonContainer, {
43
43
  backgroundColor
44
44
  }]}>
45
- <Button color={Colors.$textDefault} outlineColor={Colors.$textDefault} style={styles.button} round outline iconSource={Assets.icons.plusSmall} onPress={showDialog} testID={`${testID}-button`} accessibilityLabel={accessibilityLabels?.addButton} />
45
+ <Button color={Colors.$textDefault} outlineColor={Colors.$textDefault} style={styles.button} round outline iconSource={Assets.internal.icons.plusSmall} onPress={showDialog} testID={`${testID}-button`} accessibilityLabel={accessibilityLabels?.addButton} />
46
46
  </View>
47
47
  <ColorPickerDialog {...props} key={initialColor} visible={show} onDismiss={hideDialog} accessibilityLabels={{
48
48
  dismissButton: accessibilityLabels?.dismissButton,
@@ -6,7 +6,6 @@ import { asBaseComponent, Constants } from "../../commons/new";
6
6
  import View from "../view";
7
7
  import TouchableOpacity from "../touchableOpacity";
8
8
  import Image from "../image";
9
- const transparentImage = require("./assets/transparentSwatch/TransparentSwatch.png");
10
9
  const DEFAULT_SIZE = Constants.isTablet ? 44 : 36;
11
10
  export const SWATCH_MARGIN = 12;
12
11
  export const SWATCH_SIZE = DEFAULT_SIZE;
@@ -141,10 +140,10 @@ class ColorSwatch extends PureComponent {
141
140
  height: size,
142
141
  borderRadius: size / 2
143
142
  }, style]} onLayout={this.onLayout} {...this.getAccessibilityInfo()}>
144
- {Colors.isTransparent(this.color) && <Image source={transparentImage} style={this.styles.transparentImage} resizeMode={'cover'} />}
143
+ {Colors.isTransparent(this.color) && <Image source={Assets.internal.images.transparentSwatch} style={this.styles.transparentImage} resizeMode={'cover'} />}
145
144
  {unavailable ? <View style={[this.styles.unavailable, {
146
145
  backgroundColor: tintColor
147
- }]} /> : <Animated.Image source={Assets.icons.check} style={{
146
+ }]} /> : <Animated.Image source={Assets.internal.icons.check} style={{
148
147
  tintColor,
149
148
  opacity: isSelected,
150
149
  transform: [{
@@ -137,10 +137,10 @@ const DateTimePicker = forwardRef((props, ref) => {
137
137
  }, [onDonePressed, toggleExpandableOverlay]);
138
138
  const renderHeader = () => {
139
139
  return <View row spread bg-$backgroundDefault backgroundColor={backgroundColor} paddingH-20 style={[styles.header, headerStyle]} testID={`${testID}.header`}>
140
- <Button link iconSource={Assets.icons.x} iconStyle={{
140
+ <Button link iconSource={Assets.internal.icons.x} iconStyle={{
141
141
  tintColor: Colors.$iconDefault
142
142
  }} testID={`${testID}.cancel`} {...cancelButtonProps} onPress={toggleExpandableOverlay} />
143
- <Button link iconSource={Assets.icons.check} testID={`${testID}.done`} {...confirmButtonProps} onPress={onDonePressed} />
143
+ <Button link iconSource={Assets.internal.icons.check} testID={`${testID}.done`} {...confirmButtonProps} onPress={onDonePressed} />
144
144
  </View>;
145
145
  };
146
146
  const renderDateTimePicker = useCallback(() => {
@@ -159,13 +159,37 @@
159
159
  ],
160
160
  "items": [
161
161
  {
162
- "title": "Left"
162
+ "title": "Left",
163
+ "content": [
164
+ {
165
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_left_top.png"
166
+ },
167
+ {
168
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_left_bottom.png"
169
+ }
170
+ ]
163
171
  },
164
172
  {
165
- "title": "Center"
173
+ "title": "Center",
174
+ "content": [
175
+ {
176
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_center_top.png"
177
+ },
178
+ {
179
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_center_bottom.png"
180
+ }
181
+ ]
166
182
  },
167
183
  {
168
- "title": "Right"
184
+ "title": "Right",
185
+ "content": [
186
+ {
187
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_right_top.png"
188
+ },
189
+ {
190
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_right_bottom.png"
191
+ }
192
+ ]
169
193
  }
170
194
  ],
171
195
  "title": "Alignment",
@@ -179,10 +203,20 @@
179
203
  ],
180
204
  "items": [
181
205
  {
182
- "title": "None"
206
+ "title": "None",
207
+ "content": [
208
+ {
209
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_accessories_none.png"
210
+ }
211
+ ]
183
212
  },
184
213
  {
185
- "title": "Icon"
214
+ "title": "Icon",
215
+ "content": [
216
+ {
217
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_accessories_icon.png"
218
+ }
219
+ ]
186
220
  }
187
221
  ],
188
222
  "title": "Accessories"
@@ -6,6 +6,7 @@ import View from "../view";
6
6
  import Image from "../image";
7
7
  import Modal from "../modal";
8
8
  import TouchableOpacity from "../touchableOpacity";
9
+ import Assets from "../../assets";
9
10
  import { HintPositions, HintProps, TargetAlignments } from "./types";
10
11
  import useHintVisibility from "./hooks/useHintVisibility";
11
12
  import useHintLayout from "./hooks/useHintLayout";
@@ -14,8 +15,6 @@ import useHintPosition from "./hooks/useHintPosition";
14
15
  import HintMockChildren from "./HintMockChildren";
15
16
  import HintAnchor from "./HintAnchor";
16
17
  import HintBubble from "./HintBubble";
17
- const sideTip = require("./assets/hintTipSide.png");
18
- const middleTip = require("./assets/hintTipMiddle.png");
19
18
  const DEFAULT_COLOR = Colors.$backgroundPrimaryHeavy;
20
19
  const DEFAULT_HINT_OFFSET = Spacings.s4;
21
20
  const DEFAULT_EDGE_MARGINS = Spacings.s5;
@@ -125,7 +124,7 @@ const Hint = props => {
125
124
  }
126
125
  };
127
126
  const renderHintTip = () => {
128
- const source = useSideTip ? sideTip : middleTip;
127
+ const source = useSideTip ? Assets.internal.images.hintTipSide : Assets.internal.images.hintTipMiddle;
129
128
  const flipVertically = position === HintPositions.TOP;
130
129
  const flipHorizontally = targetAlignmentOnScreen === TargetAlignments.RIGHT;
131
130
  const flipStyle = {
@@ -25,7 +25,10 @@ export type IconProps = Omit<RNImageProps, 'source' | 'tintColor'> & MarginModif
25
25
  /**
26
26
  * the icon size
27
27
  */
28
- size?: number;
28
+ size?: number | {
29
+ width: number;
30
+ height: number;
31
+ };
29
32
  /**
30
33
  * whether the icon should flip horizontally on RTL
31
34
  */
@@ -52,7 +55,10 @@ declare const _default: React.ForwardRefExoticComponent<Omit<RNImageProps, "sour
52
55
  /**
53
56
  * the icon size
54
57
  */
55
- size?: number | undefined;
58
+ size?: number | {
59
+ width: number;
60
+ height: number;
61
+ } | undefined;
56
62
  /**
57
63
  * whether the icon should flip horizontally on RTL
58
64
  */
@@ -78,7 +84,10 @@ declare const _default: React.ForwardRefExoticComponent<Omit<RNImageProps, "sour
78
84
  /**
79
85
  * the icon size
80
86
  */
81
- size?: number | undefined;
87
+ size?: number | {
88
+ width: number;
89
+ height: number;
90
+ } | undefined;
82
91
  /**
83
92
  * whether the icon should flip horizontally on RTL
84
93
  */
@@ -12,10 +12,9 @@ import SvgImage from "../svgImage";
12
12
  * @extendsLink: https://reactnative.dev/docs/image
13
13
  */
14
14
 
15
- const DEFAULT_WEB_ICON_SIZE = 16;
16
15
  const Icon = forwardRef((props, ref) => {
17
16
  const {
18
- size = Constants.isWeb ? DEFAULT_WEB_ICON_SIZE : undefined,
17
+ size,
19
18
  tintColor,
20
19
  style,
21
20
  supportRTL,
@@ -30,10 +29,6 @@ const Icon = forwardRef((props, ref) => {
30
29
  const {
31
30
  margins
32
31
  } = modifiers;
33
- const iconSize = size ? {
34
- width: size,
35
- height: size
36
- } : undefined;
37
32
  const shouldFlipRTL = supportRTL && Constants.isRTL;
38
33
  const getBadgeStyling = () => {
39
34
  const containerStyle = badgeProps?.containerStyle;
@@ -46,15 +41,29 @@ const Icon = forwardRef((props, ref) => {
46
41
  badgePosition.top = position;
47
42
  return [badgePosition, containerStyle];
48
43
  };
44
+ const iconSize = useMemo(() => {
45
+ if (typeof size === 'number') {
46
+ return {
47
+ width: size,
48
+ height: size
49
+ };
50
+ }
51
+ if (typeof size === 'object') {
52
+ return size;
53
+ }
54
+ return undefined;
55
+ }, [size]);
49
56
  const iconSource = useMemo(() => {
50
57
  if (!isUndefined(assetName)) {
51
58
  return getAsset(assetName, assetGroup);
52
59
  }
53
60
  return source;
54
61
  }, [source, assetGroup, assetName]);
55
- const renderImage = () => <Image accessible={false} accessibilityRole={'image'} fsTagName={recorderTag} {...others} ref={ref} source={iconSource} style={[margins, iconSize, shouldFlipRTL && styles.rtlFlipped, !!tintColor && {
56
- tintColor
57
- }, style]} />;
62
+ const renderImage = () => {
63
+ return <Image accessible={false} accessibilityRole={'image'} fsTagName={recorderTag} {...others} ref={ref} source={iconSource} style={[margins, iconSize, shouldFlipRTL && styles.rtlFlipped, !!tintColor && {
64
+ tintColor
65
+ }, style]} />;
66
+ };
58
67
  const renderSvg = () => <SvgImage fsTagName={recorderTag} data={source} {...iconSize} {...props} />;
59
68
  if (typeof source === 'string' && isBase64ImageContent(source) && Constants.isWeb) {
60
69
  return renderImage();
@@ -1,9 +1,9 @@
1
1
  import React, { PureComponent } from 'react';
2
2
  import { Image as RNImage, ImageProps as RNImageProps, ImageBackgroundProps, NativeSyntheticEvent, ImageErrorEventData } from 'react-native';
3
3
  import { ForwardRefInjectedProps, BaseComponentInjectedProps, MarginModifiers } from '../../commons/new';
4
+ import { ComponentStatics } from '../../typings/common';
4
5
  import { RecorderProps } from '../../typings/recorderTypes';
5
6
  import { OverlayTypeType, OverlayIntensityType } from '../overlay';
6
- import { ComponentStatics } from 'src/typings/common';
7
7
  export type ImageSourceType = string | RNImageProps['source'];
8
8
  export type ImageProps = Omit<RNImageProps, 'source'> & Pick<ImageBackgroundProps, 'imageStyle'> & MarginModifiers & RecorderProps & {
9
9
  /**
@@ -21,7 +21,7 @@ class TopBar extends Component {
21
21
  static displayName = 'Modal.TopBar';
22
22
  static defaultProps = {
23
23
  doneLabel: 'Save',
24
- cancelIcon: Assets.icons.x,
24
+ cancelIcon: Assets.internal.icons.x,
25
25
  doneButtonProps: {},
26
26
  cancelButtonProps: {},
27
27
  includeStatusBar: Constants.isIOS
@@ -29,7 +29,7 @@
29
29
  "name": "cancelIcon",
30
30
  "type": "ImageSource",
31
31
  "description": "Cancel action icon",
32
- "default": "Assets.icons.x"
32
+ "default": "Assets.internal.icons.x"
33
33
  },
34
34
  {"name": "onCancel", "type": "(props?: any) => void", "description": "Cancel action callback"},
35
35
  {