react-native-ui-lib 7.39.1 → 7.40.0

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 (193) hide show
  1. package/package.json +6 -4
  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/avatar.api.json +91 -8
  14. package/src/components/avatar/index.d.ts +8 -19
  15. package/src/components/avatar/index.js +4 -2
  16. package/src/components/button/button.api.json +35 -198
  17. package/src/components/button/index.d.ts +0 -1
  18. package/src/components/button/index.js +2 -9
  19. package/src/components/button/types.d.ts +1 -1
  20. package/src/components/card/index.js +1 -1
  21. package/src/components/checkbox/index.d.ts +5 -2
  22. package/src/components/checkbox/index.js +11 -8
  23. package/src/components/chip/index.js +1 -1
  24. package/src/components/chipsInput/index.js +2 -2
  25. package/src/components/colorPicker/ColorPickerDialog.js +1 -1
  26. package/src/components/colorPicker/ColorPickerDialogHeader.js +2 -2
  27. package/src/components/colorPicker/ColorPickerPreview.js +2 -2
  28. package/src/components/colorPicker/index.js +1 -1
  29. package/src/components/colorSwatch/index.js +2 -3
  30. package/src/components/dateTimePicker/index.js +2 -2
  31. package/src/components/hint/hint.api.json +39 -5
  32. package/src/components/hint/index.js +2 -3
  33. package/src/components/icon/index.d.ts +12 -3
  34. package/src/components/icon/index.js +18 -9
  35. package/src/components/image/index.d.ts +1 -1
  36. package/src/components/modal/TopBar.js +1 -1
  37. package/src/components/modal/api/modalTopBar.api.json +1 -1
  38. package/src/components/modal/modal.api.json +54 -0
  39. package/src/components/overlay/index.js +4 -6
  40. package/src/components/panningViews/panDismissibleView.js +1 -1
  41. package/src/components/panningViews/panGestureView.js +1 -1
  42. package/src/components/panningViews/panListenerView.js +1 -1
  43. package/src/components/panningViews/panResponderView.js +1 -1
  44. package/src/components/panningViews/panningContext.js +1 -0
  45. package/src/components/picker/PickerItem.js +1 -1
  46. package/src/components/picker/PickerItemsList.js +1 -1
  47. package/src/components/picker/api/picker.api.json +409 -10
  48. package/src/components/picker/helpers/useFieldType.js +2 -2
  49. package/src/components/scrollBar/index.js +3 -3
  50. package/src/components/slider/slider.api.json +2 -2
  51. package/src/components/sortableList/SortableList.api.json +7 -7
  52. package/src/components/stepper/index.js +3 -8
  53. package/src/components/tabController/apis/pageCarousel.api.json +8 -5
  54. package/src/components/tabController/apis/tabBar.api.json +8 -3
  55. package/src/components/text/text.api.json +18 -1
  56. package/src/components/textField/ClearButton.js +1 -1
  57. package/src/components/textField/Input.js +1 -1
  58. package/src/components/textField/textField.api.json +26 -9
  59. package/src/components/textField/useFieldState.js +2 -2
  60. package/src/components/timeline/timeline.api.json +57 -106
  61. package/src/components/toast/index.js +1 -1
  62. package/src/components/touchableOpacity/touchableOpacity.api.json +14 -3
  63. package/src/components/view/view.api.json +18 -9
  64. package/src/components/wizard/WizardStates.js +3 -4
  65. package/src/components/wizard/wizard.api.json +2 -2
  66. package/src/hooks/useScrollTo/index.js +9 -4
  67. package/src/incubator/dialog/useDialogContent.js +1 -1
  68. package/src/incubator/expandableOverlay/index.js +1 -0
  69. package/src/incubator/panView/index.js +1 -1
  70. package/src/incubator/slider/Thumb.js +8 -1
  71. package/src/incubator/toast/toast.api.json +57 -7
  72. package/src/assets/icons/index.js +0 -26
  73. package/src/assets/images/index.js +0 -5
  74. package/src/components/stepper/assets/minusSmall.png +0 -0
  75. package/src/components/stepper/assets/minusSmall@1.5x.png +0 -0
  76. package/src/components/stepper/assets/minusSmall@2x.png +0 -0
  77. package/src/components/stepper/assets/minusSmall@3x.png +0 -0
  78. package/src/components/stepper/assets/minusSmall@4x.png +0 -0
  79. package/src/components/stepper/assets/plusSmall.png +0 -0
  80. package/src/components/stepper/assets/plusSmall@1.5x.png +0 -0
  81. package/src/components/stepper/assets/plusSmall@2x.png +0 -0
  82. package/src/components/stepper/assets/plusSmall@3x.png +0 -0
  83. package/src/components/stepper/assets/plusSmall@4x.png +0 -0
  84. /package/src/assets/{icons → internal/icons}/check.png +0 -0
  85. /package/src/assets/{icons → internal/icons}/check@1.5x.png +0 -0
  86. /package/src/assets/{icons → internal/icons}/check@2x.png +0 -0
  87. /package/src/assets/{icons → internal/icons}/check@3x.png +0 -0
  88. /package/src/assets/{icons → internal/icons}/check@4x.png +0 -0
  89. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall.png +0 -0
  90. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@1.5x.png +0 -0
  91. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@2x.png +0 -0
  92. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@3x.png +0 -0
  93. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@4x.png +0 -0
  94. /package/src/assets/{icons/check-small.png → internal/icons/checkSmall.png} +0 -0
  95. /package/src/assets/{icons/check-small@1.5x.png → internal/icons/checkSmall@1.5x.png} +0 -0
  96. /package/src/assets/{icons/check-small@2x.png → internal/icons/checkSmall@2x.png} +0 -0
  97. /package/src/assets/{icons/check-small@3x.png → internal/icons/checkSmall@3x.png} +0 -0
  98. /package/src/assets/{icons/check-small@4x.png → internal/icons/checkSmall@4x.png} +0 -0
  99. /package/src/{components/picker/assets/dropdown.png → assets/internal/icons/chevronDown.png} +0 -0
  100. /package/src/{components/picker/assets/dropdown@1.5x.png → assets/internal/icons/chevronDown@1.5x.png} +0 -0
  101. /package/src/{components/picker/assets/dropdown@2x.png → assets/internal/icons/chevronDown@2x.png} +0 -0
  102. /package/src/{components/picker/assets/dropdown@3x.png → assets/internal/icons/chevronDown@3x.png} +0 -0
  103. /package/src/{components/picker/assets/dropdown@4x.png → assets/internal/icons/chevronDown@4x.png} +0 -0
  104. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall.png +0 -0
  105. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@1.5x.png +0 -0
  106. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@2x.png +0 -0
  107. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@3x.png +0 -0
  108. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@4x.png +0 -0
  109. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline.png +0 -0
  110. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@1.5x.png +0 -0
  111. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@2x.png +0 -0
  112. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@3x.png +0 -0
  113. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@4x.png +0 -0
  114. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall.png +0 -0
  115. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@1.5x.png +0 -0
  116. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@2x.png +0 -0
  117. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@3x.png +0 -0
  118. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@4x.png +0 -0
  119. /package/src/assets/{icons → internal/icons}/minusSmall.png +0 -0
  120. /package/src/assets/{icons → internal/icons}/minusSmall@1.5x.png +0 -0
  121. /package/src/assets/{icons → internal/icons}/minusSmall@2x.png +0 -0
  122. /package/src/assets/{icons → internal/icons}/minusSmall@3x.png +0 -0
  123. /package/src/assets/{icons → internal/icons}/minusSmall@4x.png +0 -0
  124. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline.png +0 -0
  125. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@1.5x.png +0 -0
  126. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@2x.png +0 -0
  127. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@3x.png +0 -0
  128. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@4x.png +0 -0
  129. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall.png +0 -0
  130. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@1.5x.png +0 -0
  131. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@2x.png +0 -0
  132. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@3x.png +0 -0
  133. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@4x.png +0 -0
  134. /package/src/assets/{icons → internal/icons}/plusSmall.png +0 -0
  135. /package/src/assets/{icons → internal/icons}/plusSmall@1.5x.png +0 -0
  136. /package/src/assets/{icons → internal/icons}/plusSmall@2x.png +0 -0
  137. /package/src/assets/{icons → internal/icons}/plusSmall@3x.png +0 -0
  138. /package/src/assets/{icons → internal/icons}/plusSmall@4x.png +0 -0
  139. /package/src/assets/{icons → internal/icons}/search.png +0 -0
  140. /package/src/assets/{icons → internal/icons}/search@1.5x.png +0 -0
  141. /package/src/assets/{icons → internal/icons}/search@2x.png +0 -0
  142. /package/src/assets/{icons → internal/icons}/search@3x.png +0 -0
  143. /package/src/assets/{icons → internal/icons}/search@4x.png +0 -0
  144. /package/src/assets/{icons → internal/icons}/x.png +0 -0
  145. /package/src/assets/{icons → internal/icons}/x@2x.png +0 -0
  146. /package/src/assets/{icons → internal/icons}/x@3x.png +0 -0
  147. /package/src/assets/{icons → internal/icons}/xFlat.png +0 -0
  148. /package/src/assets/{icons → internal/icons}/xFlat@1.5x.png +0 -0
  149. /package/src/assets/{icons → internal/icons}/xFlat@2x.png +0 -0
  150. /package/src/assets/{icons → internal/icons}/xFlat@3x.png +0 -0
  151. /package/src/assets/{icons → internal/icons}/xFlat@4x.png +0 -0
  152. /package/src/assets/{icons → internal/icons}/xMedium.png +0 -0
  153. /package/src/assets/{icons → internal/icons}/xMedium@1.5x.png +0 -0
  154. /package/src/assets/{icons → internal/icons}/xMedium@2x.png +0 -0
  155. /package/src/assets/{icons → internal/icons}/xMedium@3x.png +0 -0
  156. /package/src/assets/{icons → internal/icons}/xMedium@4x.png +0 -0
  157. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall.png +0 -0
  158. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@1.5x.png +0 -0
  159. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@2x.png +0 -0
  160. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@3x.png +0 -0
  161. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@4x.png +0 -0
  162. /package/src/assets/{images → internal/images}/gradient.png +0 -0
  163. /package/src/{components/scrollBar/assets → assets/internal/images}/gradientOverlay.png +0 -0
  164. /package/src/{components/overlay/assets/GradientOverlayHigh.png → assets/internal/images/gradientOverlayHigh.png} +0 -0
  165. /package/src/{components/overlay/assets/GradientOverlayHigh@1.5x.png → assets/internal/images/gradientOverlayHigh@1.5x.png} +0 -0
  166. /package/src/{components/overlay/assets/GradientOverlayHigh@2x.png → assets/internal/images/gradientOverlayHigh@2x.png} +0 -0
  167. /package/src/{components/overlay/assets/GradientOverlayHigh@3x.png → assets/internal/images/gradientOverlayHigh@3x.png} +0 -0
  168. /package/src/{components/overlay/assets/GradientOverlayHigh@4x.png → assets/internal/images/gradientOverlayHigh@4x.png} +0 -0
  169. /package/src/{components/overlay/assets/GradientOverlayLow.png → assets/internal/images/gradientOverlayLow.png} +0 -0
  170. /package/src/{components/overlay/assets/GradientOverlayLow@1.5x.png → assets/internal/images/gradientOverlayLow@1.5x.png} +0 -0
  171. /package/src/{components/overlay/assets/GradientOverlayLow@2x.png → assets/internal/images/gradientOverlayLow@2x.png} +0 -0
  172. /package/src/{components/overlay/assets/GradientOverlayLow@3x.png → assets/internal/images/gradientOverlayLow@3x.png} +0 -0
  173. /package/src/{components/overlay/assets/GradientOverlayLow@4x.png → assets/internal/images/gradientOverlayLow@4x.png} +0 -0
  174. /package/src/{components/overlay/assets/GradientOverlayMedium.png → assets/internal/images/gradientOverlayMedium.png} +0 -0
  175. /package/src/{components/overlay/assets/GradientOverlayMedium@1.5x.png → assets/internal/images/gradientOverlayMedium@1.5x.png} +0 -0
  176. /package/src/{components/overlay/assets/GradientOverlayMedium@2x.png → assets/internal/images/gradientOverlayMedium@2x.png} +0 -0
  177. /package/src/{components/overlay/assets/GradientOverlayMedium@3x.png → assets/internal/images/gradientOverlayMedium@3x.png} +0 -0
  178. /package/src/{components/overlay/assets/GradientOverlayMedium@4x.png → assets/internal/images/gradientOverlayMedium@4x.png} +0 -0
  179. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle.png +0 -0
  180. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@1.5x.png +0 -0
  181. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@2x.png +0 -0
  182. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@3x.png +0 -0
  183. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@4x.png +0 -0
  184. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide.png +0 -0
  185. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@1.5x.png +0 -0
  186. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@2x.png +0 -0
  187. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@3x.png +0 -0
  188. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@4x.png +0 -0
  189. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch.png → assets/internal/images/transparentSwatch.png} +0 -0
  190. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@1.5x.png → assets/internal/images/transparentSwatch@1.5x.png} +0 -0
  191. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@2x.png → assets/internal/images/transparentSwatch@2x.png} +0 -0
  192. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@3x.png → assets/internal/images/transparentSwatch@3x.png} +0 -0
  193. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@4x.png → assets/internal/images/transparentSwatch@4x.png} +0 -0
@@ -2,9 +2,17 @@
2
2
  "name": "TextField",
3
3
  "category": "form",
4
4
  "description": "An enhanced customizable TextField with validation support",
5
- "extends": ["TextInput"],
6
- "extendsLink": ["https://reactnative.dev/docs/textinput"],
7
- "modifiers": ["margin", "color", "typography"],
5
+ "extends": [
6
+ "TextInput"
7
+ ],
8
+ "extendsLink": [
9
+ "https://reactnative.dev/docs/textinput"
10
+ ],
11
+ "modifiers": [
12
+ "margin",
13
+ "color",
14
+ "typography"
15
+ ],
8
16
  "example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/TextFieldScreen.tsx",
9
17
  "images": [
10
18
  "https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Incubator.TextField/FloatingPlaceholder.gif?raw=true, https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Incubator.TextField/Validation.gif?raw=true, https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Incubator.TextField/ColorByState.gif?raw=true, https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Incubator.TextField/CharCounter.gif?raw=true, https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Incubator.TextField/Hint.gif?raw=true"
@@ -276,7 +284,7 @@
276
284
  "type": "section",
277
285
  "layout": "horizontal",
278
286
  "title": "Structure",
279
- "description": "1. **Label**\nDescribes the information that the user needs to enter. The label should be short and clear, preferably a noun. \n2. **Placeholder** (optional) \nPlaceholders can serve as an assistive text that can provide additional aid or context to the user. Don’t use it to display critical information - as it disappears when the users starts typing. \n3. **Helper text** (optional) \nUse this to provide a hint or a disclaimer about the content of the field. For example, “Passwords must contain at least 8 characters” \n4. **Clear button** \nLets the user to easily clear the input value. Appears only when value was typed. \n5. **Character count** \nShould be used if there is a character limit. Displays the amount of typed characters out of total allowed. If the limit is reached, the counter will become red and further typing is disabled. \n6. **Validation message** \nDemonstrates that a required input is missing something or the entry was invalid.",
287
+ "description": "Markdown:\n\n1. **Label**\nDescribes the information that the user needs to enter. The label should be short and clear, preferably a noun. \n2. **Placeholder** (optional) \nPlaceholders can serve as an assistive text that can provide additional aid or context to the user. Don’t use it to display critical information - as it disappears when the users starts typing. \n3. **Helper text** (optional) \nUse this to provide a hint or a disclaimer about the content of the field. For example, “Passwords must contain at least 8 characters” \n4. **Clear button** \nLets the user to easily clear the input value. Appears only when value was typed. \n5. **Character count** \nShould be used if there is a character limit. Displays the amount of typed characters out of total allowed. If the limit is reached, the counter will become red and further typing is disabled. \n6. **Validation message** \nDemonstrates that a required input is missing something or the entry was invalid.",
280
288
  "content": [
281
289
  {
282
290
  "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/textField/textField_overview_section_03.png"
@@ -285,7 +293,10 @@
285
293
  },
286
294
  {
287
295
  "type": "table",
288
- "columns": ["Property", "Component", "New Column"],
296
+ "columns": [
297
+ "Property",
298
+ "Component"
299
+ ],
289
300
  "items": [
290
301
  {
291
302
  "title": "Inactive (default)",
@@ -334,7 +345,7 @@
334
345
  },
335
346
  {
336
347
  "title": "Warning",
337
- "description": "",
348
+ "description": "(WIP)",
338
349
  "content": [
339
350
  {
340
351
  "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/textField/textField_overview_table_warning.png"
@@ -374,7 +385,10 @@
374
385
  },
375
386
  {
376
387
  "type": "table",
377
- "columns": ["Property", "Component"],
388
+ "columns": [
389
+ "Property",
390
+ "Component"
391
+ ],
378
392
  "items": [
379
393
  {
380
394
  "title": "Outline (Default)",
@@ -400,7 +414,10 @@
400
414
  },
401
415
  {
402
416
  "type": "table",
403
- "columns": ["Property", "Component"],
417
+ "columns": [
418
+ "Property",
419
+ "Component"
420
+ ],
404
421
  "items": [
405
422
  {
406
423
  "title": "Leading Accessory (Prefix)",
@@ -458,7 +475,7 @@
458
475
  }
459
476
  ],
460
477
  "title": "Spec",
461
- "description": "**Label**\nbodySmall, $textNeutralHeavy \n**Placeholder**\nbody, $textNeutralLight \n**Value** \nbody, $textDefault \n**Helper Text** \nsubtext, $textNeutralHeavy \n**Character Count** \nbodySmall, $textNeutralHeavy \n**Validation message** \nMessage - bodySmall, $textDangerLight\nIcon - exclamationFillSmall, $iconDangerLight \n**Prefix & Suffix** \nbody, $textNeutral \n**Clear Button** \nxFlat, $textNeutralLight \n**Warning Message** \nMessage - bodySmall, $textDefault\nIcon - exclamationFillSmall, $iconDefault \n**Validation Success** \nIcon - checkmarkFlatSmall, $iconSuccess \n**Outline - Default/unfocused** \n1p, $outlineNeutral \n**Outline - Focused, typing** \n1p, $outlinePrimary \n**Outline - Validation** \n1p, $outlineDanger \n**Outline - Disabled** \n1p, $outlineDisabled \n**Outline - Read only** \nfill background- $backgroundNeutralLight"
478
+ "description": "Markdown:\n\n**Label**\nbodySmall, $textNeutralHeavy \n**Placeholder**\nbody, $textNeutralLight \n**Value** \nbody, $textDefault \n**Helper Text** \nsubtext, $textNeutralHeavy \n**Character Count** \nbodySmall, $textNeutralHeavy \n**Validation message** \nMessage - bodySmall, $textDangerLight\nIcon - exclamationFillSmall, $iconDangerLight \n**Prefix & Suffix** \nbody, $textNeutral \n**Clear Button** \nxFlat, $textNeutralLight \n**Warning Message** \nMessage - bodySmall, $textDefault\nIcon - exclamationFillSmall, $iconDefault \n**Validation Success** \nIcon - checkmarkFlatSmall, $iconSuccess \n**Outline - Default/unfocused** \n1p, $outlineNeutral \n**Outline - Focused, typing** \n1p, $outlinePrimary \n**Outline - Validation** \n1p, $outlineDanger \n**Outline - Disabled** \n1p, $outlineDisabled \n**Outline - Read only** \nfill background- $backgroundNeutralLight"
462
479
  }
463
480
  ]
464
481
  },
@@ -52,9 +52,9 @@ export default function useFieldState({
52
52
  setValue(propsValue);
53
53
  if (validateOnChange) {
54
54
  if (validationDebounceTime) {
55
- debouncedValidateField(propsValue);
55
+ debouncedValidateField(propsValue ?? '');
56
56
  } else {
57
- validateField(propsValue);
57
+ validateField(propsValue ?? '');
58
58
  }
59
59
  }
60
60
  }
@@ -29,30 +29,18 @@
29
29
  }
30
30
  ],
31
31
  "snippet": [
32
- "<Timeline ",
33
- " topLine={{",
34
- " state: Timeline.states.ERROR",
35
- " }$1}",
36
- " bottomLine={{",
37
- " type: Timeline.lineTypes.DASHED,",
38
- " color: Colors.orange40",
39
- " }$2}",
40
- " point={{",
41
- " type: Timeline.pointTypes.OUTLINE,",
42
- " color: Colors.orange40,",
43
- " icon: Assets.icons.demo.camera,",
44
- " anchorRef: alignToTitle ? titleRef : undefined",
45
- " }$3}",
32
+ "<Timeline",
33
+ " topLine={{type: Timeline.lineTypes.DASHED}}",
34
+ " bottomLine={{state: Timeline.states.SUCCESS}}",
35
+ " point={{state: Timeline.states.SUCCESS}}",
46
36
  ">",
47
- " <View flex centerH paddingH-20>",
48
- " <Text text70 dark10 ref={titleRef}>",
49
- " {title}",
50
- " </Text>",
51
- " <Text dark40>",
52
- " {description}",
53
- " </Text>",
54
- " </View>",
55
- "</Timeline>"
37
+ " <View padding-20 bg-grey60 br30>",
38
+ " <Text text70BO>Title</Text>",
39
+ " <View marginT-5 padding-8 bg-white br30>",
40
+ " <Text>Description</Text>",
41
+ " </View>",
42
+ " </View>",
43
+ " </Timeline>"
56
44
  ],
57
45
  "docs": {
58
46
  "hero": {
@@ -138,29 +126,7 @@
138
126
  "title": "Current",
139
127
  "content": [
140
128
  {
141
- "props": {
142
- "state": "current",
143
- "point": {
144
- "type": {
145
- "type": "bullet"
146
- }
147
- },
148
- "bottomLine": {
149
- "type": {
150
- "type": "solid"
151
- }
152
- }
153
- }
154
- },
155
- {
156
- "props": {
157
- "point": {
158
- "type": {
159
- "type": "bullet",
160
- "color": "#116DFF"
161
- }
162
- }
163
- }
129
+ "snippet": "<Timeline topLine={{state: Timeline.states.CURRENT}} bottomLine={{state: Timeline.states.CURRENT}} point={{state: Timeline.states.CURRENT}}><View style={{height: 88}}/></Timeline>"
164
130
  }
165
131
  ],
166
132
  "description": "state: current"
@@ -169,19 +135,7 @@
169
135
  "title": "Next",
170
136
  "content": [
171
137
  {
172
- "props": {
173
- "state": "next",
174
- "point": {
175
- "type": {
176
- "type": "bullet"
177
- }
178
- },
179
- "bottomLine": {
180
- "type": {
181
- "type": "solid"
182
- }
183
- }
184
- }
138
+ "snippet": "<Timeline topLine={{state: Timeline.states.NEXT}} bottomLine={{state: Timeline.states.NEXT}} point={{state: Timeline.states.NEXT, type: Timeline.pointTypes.CIRCLE}}><View style={{height: 88}}/></Timeline>"
185
139
  }
186
140
  ],
187
141
  "description": "state: next"
@@ -190,19 +144,7 @@
190
144
  "title": "Error",
191
145
  "content": [
192
146
  {
193
- "props": {
194
- "state": "error",
195
- "point": {
196
- "type": {
197
- "type": "bullet"
198
- }
199
- },
200
- "bottomLine": {
201
- "type": {
202
- "type": "solid"
203
- }
204
- }
205
- }
147
+ "snippet": "<Timeline topLine={{state: Timeline.states.ERROR}} bottomLine={{state: Timeline.states.ERROR}} point={{state: Timeline.states.ERROR}}><View style={{height: 88}}/></Timeline>"
206
148
  }
207
149
  ],
208
150
  "description": "state: error"
@@ -211,19 +153,7 @@
211
153
  "title": "Success",
212
154
  "content": [
213
155
  {
214
- "props": {
215
- "state": "success",
216
- "point": {
217
- "type": {
218
- "type": "bullet"
219
- }
220
- },
221
- "bottomLine": {
222
- "type": {
223
- "type": "solid"
224
- }
225
- }
226
- }
156
+ "snippet": "<Timeline topLine={{state: Timeline.states.SUCCESS}} bottomLine={{state: Timeline.states.SUCCESS}} point={{state: Timeline.states.SUCCESS}}><View style={{height: 88}}/></Timeline>"
227
157
  }
228
158
  ],
229
159
  "description": "state: success"
@@ -238,15 +168,30 @@
238
168
  "items": [
239
169
  {
240
170
  "title": "Bullet",
241
- "description": "type: bullet"
171
+ "description": "type: bullet",
172
+ "content": [
173
+ {
174
+ "snippet": "<Timeline point={{type: Timeline.pointTypes.BULLET}}><View style={{height: 88}}/></Timeline>"
175
+ }
176
+ ]
242
177
  },
243
178
  {
244
179
  "title": "Circle",
245
- "description": "type: circle"
180
+ "description": "type: circle",
181
+ "content": [
182
+ {
183
+ "snippet": "<Timeline point={{state: Timeline.states.NEXT, type: Timeline.pointTypes.CIRCLE}}><View style={{height: 88}}/></Timeline>"
184
+ }
185
+ ]
246
186
  },
247
187
  {
248
188
  "title": "Outline",
249
- "description": "type: outline"
189
+ "description": "type: outline",
190
+ "content": [
191
+ {
192
+ "snippet": "<Timeline point={{type: Timeline.pointTypes.OUTLINE}}><View style={{height: 88}}/></Timeline>"
193
+ }
194
+ ]
250
195
  }
251
196
  ],
252
197
  "title": "Point",
@@ -260,14 +205,7 @@
260
205
  "title": "Text",
261
206
  "content": [
262
207
  {
263
- "props": {
264
- "state": "current",
265
- "bottomLine": {
266
- "type": {
267
- "type": "solid"
268
- }
269
- }
270
- }
208
+ "snippet": "<Timeline point={{label: '1'}}><View style={{height: 88}}/></Timeline>"
271
209
  }
272
210
  ],
273
211
  "description": "text: “1”"
@@ -276,21 +214,19 @@
276
214
  "title": "Icon",
277
215
  "content": [
278
216
  {
279
- "props": {
280
- "state": "current",
281
- "bottomLine": {
282
- "type": {
283
- "type": "dashed"
284
- }
285
- }
286
- }
217
+ "snippet": "<Timeline point={{state: Timeline.states.SUCCESS, icon: Assets.internal.icons.checkSmall}}><View style={{height: 88}}/></Timeline>"
287
218
  }
288
219
  ],
289
- "description": "icon: Assets.icons.general.checkmarkSmall"
220
+ "description": "icon: Assets.internal.icons.general.checkmarkSmall"
290
221
  },
291
222
  {
292
223
  "title": "Icon without background",
293
- "description": "icon: Assets.icons.general.favorite, removeIconBackground: true"
224
+ "content": [
225
+ {
226
+ "snippet": "<Timeline point={{state: Timeline.states.SUCCESS, icon: Assets.internal.icons.search, removeIconBackground: true}}><View style={{height: 88}}/></Timeline>"
227
+ }
228
+ ],
229
+ "description": "icon: Assets.internal.icons.general.favorite, removeIconBackground: true"
294
230
  }
295
231
  ],
296
232
  "name": "Point Accessories"
@@ -301,10 +237,20 @@
301
237
  "items": [
302
238
  {
303
239
  "title": "Solid",
240
+ "content": [
241
+ {
242
+ "snippet": "<Timeline topLine={{state: Timeline.states.CURRENT}} point={{removeIconBackground: true}}><View style={{height: 88}}/></Timeline>"
243
+ }
244
+ ],
304
245
  "description": "type: solid"
305
246
  },
306
247
  {
307
248
  "title": "Dashed",
249
+ "content": [
250
+ {
251
+ "snippet": "<Timeline topLine={{state: Timeline.states.CURRENT, type: Timeline.lineTypes.DASHED}} point={{removeIconBackground: true}}><View style={{height: 88}}/></Timeline>"
252
+ }
253
+ ],
308
254
  "description": "type: dashed"
309
255
  }
310
256
  ],
@@ -317,6 +263,11 @@
317
263
  "items": [
318
264
  {
319
265
  "title": "Entry",
266
+ "content": [
267
+ {
268
+ "snippet": "<Timeline topLine={{state: Timeline.states.NEXT, entry: true}} bottomLine={{state: Timeline.states.NEXT, entry: true}} point={{removeIconBackground: true}}><View style={{height: 88}}/></Timeline>"
269
+ }
270
+ ],
320
271
  "description": "entry: true"
321
272
  }
322
273
  ],
@@ -239,7 +239,7 @@ export default class Toast extends PureBaseComponent {
239
239
  <Button
240
240
  link
241
241
  iconStyle={{tintColor: textColor}}
242
- iconSource={Assets.icons.x}
242
+ iconSource={Assets.internal.icons.x}
243
243
  onPress={this.onDismiss}
244
244
  paddingR-20
245
245
  accessibilityLabel={'dismiss'}
@@ -35,8 +35,19 @@
35
35
  }
36
36
  ],
37
37
  "snippet": [
38
+ "<View flex center>",
38
39
  "<TouchableOpacity onPress={() => console.log('pressed')$1}>",
39
- " <Text text40>Click Me!</Text>",
40
- "</TouchableOpacity>"
41
- ]
40
+ " <Text text40>Touchable</Text>",
41
+ "</TouchableOpacity>",
42
+ "</View>"
43
+ ],
44
+ "docs": {
45
+ "hero": {
46
+ "title": "TouchableOpacity",
47
+ "description": "An enhanced version of React Native's TouchableOpacity component providing additional features and modifiers support",
48
+ "type": "hero",
49
+ "layout": "horizontal",
50
+ "content": [{}]
51
+ }
52
+ }
42
53
  }
@@ -26,13 +26,22 @@
26
26
  {"name": "style", "type": "ViewStyle", "description": "Custom style"}
27
27
  ],
28
28
  "snippet": [
29
- "<View row gap-s5 centerV>",
30
- " <View style={{width: 200, height: 200}} bg-purple40 centerH>",
31
- " <View style={{width: 60, height: 60}} bg-green20/>",
32
- " </View>",
33
- " <View style={{width: 150, height: 150}} bg-orange30 bottom right>",
34
- " <View style={{width: 50, height: 50}} bg-yellow40 br100 margin-s2/>",
35
- " </View>",
36
- "</View>"
37
- ]
29
+ "<View row gap-s5 centerV>",
30
+ " <View style={{width: 200, height: 200}} bg-purple40 centerH>",
31
+ " <View style={{width: 60, height: 60}} bg-green20/>",
32
+ " </View>",
33
+ " <View style={{width: 150, height: 150}} bg-orange30 bottom right>",
34
+ " <View style={{width: 50, height: 50}} bg-yellow40 br100 margin-s2/>",
35
+ " </View>",
36
+ "</View>"
37
+ ],
38
+ "docs": {
39
+ "hero": {
40
+ "title": "View",
41
+ "description": "An enhanced version of React Native's View component providing additional features and modifiers support",
42
+ "type": "hero",
43
+ "layout": "horizontal",
44
+ "content": [{}]
45
+ }
46
+ }
38
47
  }
@@ -1,6 +1,5 @@
1
1
  import Colors from "../../style/colors";
2
- const checkMarkSmall = require("./assets/checkMarkSmall.png");
3
- const exclamationSmall = require("./assets/exclamationSmall.png");
2
+ import Assets from "../../assets";
4
3
  export const StatesConfig = {
5
4
  enabled: {
6
5
  color: Colors.$textNeutralHeavy,
@@ -14,7 +13,7 @@ export const StatesConfig = {
14
13
  error: {
15
14
  color: Colors.$iconDangerLight,
16
15
  circleColor: Colors.$outlineDanger,
17
- icon: exclamationSmall,
16
+ icon: Assets.internal.icons.exclamationSmall,
18
17
  enabled: true,
19
18
  accessibilityInfo: 'Validation Error'
20
19
  },
@@ -27,7 +26,7 @@ export const StatesConfig = {
27
26
  completed: {
28
27
  color: Colors.$iconNeutral,
29
28
  circleColor: Colors.$outlineDisabled,
30
- icon: checkMarkSmall,
29
+ icon: Assets.internal.icons.checkMarkSmall,
31
30
  enabled: true,
32
31
  accessibilityInfo: 'Completed'
33
32
  },
@@ -62,7 +62,7 @@
62
62
  "type": "section",
63
63
  "content": [
64
64
  {
65
- "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Wizard/wizard_overview_section_01.png"
65
+ "value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=10116-50439&embed-host=share"
66
66
  }
67
67
  ],
68
68
  "title": "Product Examples",
@@ -73,7 +73,7 @@
73
73
  "layout": "horizontal",
74
74
  "content": [
75
75
  {
76
- "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Wizard/wizard_overview_section_02.png"
76
+ "value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Guidelines-to-Docs?node-id=10116-104277&embed-host=share"
77
77
  }
78
78
  ],
79
79
  "title": "Wizard Alternative",
@@ -1,7 +1,5 @@
1
1
  import _isFunction from "lodash/isFunction";
2
- import _isUndefined from "lodash/isUndefined";
3
2
  import { useCallback, useRef } from 'react';
4
- import { Constants } from "../../commons/new";
5
3
  const useScrollTo = props => {
6
4
  const {
7
5
  scrollViewRef: propsScrollViewRef,
@@ -26,10 +24,17 @@ const useScrollTo = props => {
26
24
  containerSize.current = horizontal ? width : height;
27
25
  }, [horizontal]);
28
26
  const scrollTo = useCallback((offset, animated = true) => {
29
- if (horizontal && Constants.isRTL && Constants.isAndroid && !_isUndefined(contentSize.current) && !_isUndefined(containerSize.current)) {
27
+ // Fix that was for Android RTL. Scrolling is now aligned between IOS and Android and offset is ok.
28
+ /* if (
29
+ horizontal &&
30
+ Constants.isRTL &&
31
+ Constants.isAndroid &&
32
+ !_.isUndefined(contentSize.current) &&
33
+ !_.isUndefined(containerSize.current)
34
+ ) {
30
35
  const scrollingWidth = Math.max(0, contentSize.current - containerSize.current);
31
36
  offset = scrollingWidth - offset;
32
- }
37
+ } */
33
38
 
34
39
  // @ts-ignore
35
40
  if (_isFunction(scrollViewRef.current?.scrollToOffset)) {
@@ -23,7 +23,7 @@ const useDialogContent = props => {
23
23
  }
24
24
  return <View left centerV pointerEvents={'box-none'}>
25
25
  <TouchableOpacity paddingB-s2 row onPress={close}>
26
- <Icon source={Assets.icons.xMedium} tintColor={Colors.white} {...closeButtonProps?.iconProps} />
26
+ <Icon source={Assets.internal.icons.xMedium} tintColor={Colors.white} {...closeButtonProps?.iconProps} />
27
27
  <Text recorderTag={'unmask'} text70BO white {...closeButtonProps?.labelProps}>
28
28
  {closeButtonProps?.label || 'Close'}
29
29
  </Text>
@@ -75,4 +75,5 @@ const ExpandableOverlay = (props, ref) => {
75
75
  {renderOverlay()}
76
76
  </TouchableOpacity>;
77
77
  };
78
+ ExpandableOverlay.displayName = 'IGNORE';
78
79
  export default forwardRef(ExpandableOverlay);
@@ -53,6 +53,6 @@ const PanView = props => {
53
53
  </GestureDetector>
54
54
  </View>;
55
55
  };
56
- PanView.displayName = 'PanView';
56
+ PanView.displayName = 'IGNORE';
57
57
  PanView.directions = PanViewDirectionsEnum;
58
58
  export default asBaseComponent(gestureHandlerRootHOC(PanView));
@@ -7,13 +7,20 @@ import View from "../../components/view";
7
7
  import { Constants } from "../../commons/new";
8
8
  const SHADOW_RADIUS = 4;
9
9
  const THUMB_SIZE = 24;
10
+ const THUMB_ACCESSIBLE_HITSLOP = Math.max(0, 48 - THUMB_SIZE) / 2;
11
+ const DEFAULT_THUMB_HIT_SLOP = {
12
+ top: THUMB_ACCESSIBLE_HITSLOP,
13
+ bottom: THUMB_ACCESSIBLE_HITSLOP,
14
+ left: THUMB_ACCESSIBLE_HITSLOP,
15
+ right: THUMB_ACCESSIBLE_HITSLOP
16
+ };
10
17
  const Thumb = props => {
11
18
  const {
12
19
  disabled,
13
20
  disableActiveStyling,
14
21
  activeStyle,
15
22
  defaultStyle,
16
- hitSlop,
23
+ hitSlop = DEFAULT_THUMB_HIT_SLOP,
17
24
  onSeekStart,
18
25
  onSeekEnd,
19
26
  start,
@@ -104,19 +104,47 @@
104
104
  {
105
105
  "props": {
106
106
  "visible": true,
107
- "message": "\"Mika Or\" was saved to contacts."
107
+ "message": "Mika Or was saved to contacts.",
108
+ "preset": "general"
108
109
  }
109
110
  }
110
111
  ]
111
112
  },
112
113
  {
113
- "title": "Success"
114
+ "title": "Success",
115
+ "content": [
116
+ {
117
+ "props": {
118
+ "visible": true,
119
+ "message": "Post published.",
120
+ "preset": "success"
121
+ }
122
+ }
123
+ ]
114
124
  },
115
125
  {
116
- "title": "Validation"
126
+ "title": "Validation",
127
+ "content": [
128
+ {
129
+ "props": {
130
+ "visible": true,
131
+ "message": "Enter a card number.",
132
+ "preset": "failure"
133
+ }
134
+ }
135
+ ]
117
136
  },
118
137
  {
119
- "title": "Offline Error"
138
+ "title": "Offline Error",
139
+ "content": [
140
+ {
141
+ "props": {
142
+ "visible": true,
143
+ "message": "This action is not available offline.",
144
+ "preset": "offline"
145
+ }
146
+ }
147
+ ]
120
148
  }
121
149
  ],
122
150
  "title": "Types"
@@ -126,13 +154,35 @@
126
154
  "columns": ["Prop", "Preview"],
127
155
  "items": [
128
156
  {
129
- "title": "None"
157
+ "title": "None",
158
+ "content": [
159
+ {
160
+ "props": {
161
+ "visible": true,
162
+ "message": "Action completed."
163
+ }
164
+ }
165
+ ]
130
166
  },
131
167
  {
132
- "title": "With action"
168
+ "title": "With action",
169
+ "content": [
170
+ {
171
+ "snippet": "<Incubator.Toast visible message=\"Action completed.\" action={{label: 'Undo', onPress: () => {}}}/>"
172
+ }
173
+ ]
133
174
  },
134
175
  {
135
- "title": "With loader"
176
+ "title": "With loader",
177
+ "content": [
178
+ {
179
+ "props": {
180
+ "visible": true,
181
+ "message": "Action completed.",
182
+ "showLoader": true
183
+ }
184
+ }
185
+ ]
136
186
  }
137
187
  ],
138
188
  "title": "Accessories"
@@ -1,26 +0,0 @@
1
- export const icons = {
2
- get check() {
3
- return require('./check.png');
4
- },
5
- get checkSmall() {
6
- return require('./check-small.png');
7
- },
8
- get minusSmall() {
9
- return require('./minusSmall.png');
10
- },
11
- get plusSmall() {
12
- return require('./plusSmall.png');
13
- },
14
- get search() {
15
- return require('./search.png');
16
- },
17
- get x() {
18
- return require('./x.png');
19
- },
20
- get xMedium() {
21
- return require('./xMedium.png');
22
- },
23
- get xFlat() {
24
- return require('./xFlat.png');
25
- }
26
- };
@@ -1,5 +0,0 @@
1
- export const images = {
2
- get gradient() {
3
- return require('./gradient.png');
4
- }
5
- };