react-native-ui-lib 7.39.1 → 7.40.0-snapshot.6818

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 (195) hide show
  1. package/package.json +6 -4
  2. package/scripts/docs/buildDocsCommon.js +16 -83
  3. package/scripts/release/prReleaseNotesCommon.js +2 -1
  4. package/src/assets/index.js +2 -5
  5. package/src/assets/internal/icons/index.js +50 -0
  6. package/src/assets/internal/icons/index.web.js +50 -0
  7. package/src/assets/internal/images/index.js +26 -0
  8. package/src/assets/internal/images/index.web.js +26 -0
  9. package/src/assets/internal/index.d.ts +4 -0
  10. package/src/assets/internal/index.js +8 -0
  11. package/src/commons/Constants.d.ts +1 -0
  12. package/src/commons/Constants.js +4 -2
  13. package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.api.json +40 -0
  14. package/src/components/avatar/avatar.api.json +91 -8
  15. package/src/components/avatar/index.d.ts +8 -19
  16. package/src/components/avatar/index.js +4 -2
  17. package/src/components/button/button.api.json +35 -198
  18. package/src/components/button/index.d.ts +0 -1
  19. package/src/components/button/index.js +2 -9
  20. package/src/components/button/types.d.ts +1 -1
  21. package/src/components/card/index.js +1 -1
  22. package/src/components/checkbox/index.d.ts +5 -2
  23. package/src/components/checkbox/index.js +11 -8
  24. package/src/components/chip/index.js +1 -1
  25. package/src/components/chipsInput/index.js +2 -2
  26. package/src/components/colorPicker/ColorPickerDialog.js +1 -1
  27. package/src/components/colorPicker/ColorPickerDialogHeader.js +2 -2
  28. package/src/components/colorPicker/ColorPickerPreview.js +2 -2
  29. package/src/components/colorPicker/index.js +1 -1
  30. package/src/components/colorSwatch/index.js +2 -3
  31. package/src/components/dateTimePicker/index.js +2 -2
  32. package/src/components/hint/hint.api.json +39 -5
  33. package/src/components/hint/index.js +2 -3
  34. package/src/components/icon/index.d.ts +12 -3
  35. package/src/components/icon/index.js +18 -9
  36. package/src/components/image/index.d.ts +1 -1
  37. package/src/components/modal/TopBar.js +1 -1
  38. package/src/components/modal/api/modalTopBar.api.json +1 -1
  39. package/src/components/modal/modal.api.json +54 -0
  40. package/src/components/overlay/index.js +4 -6
  41. package/src/components/panningViews/panDismissibleView.js +1 -1
  42. package/src/components/panningViews/panGestureView.js +1 -1
  43. package/src/components/panningViews/panListenerView.js +1 -1
  44. package/src/components/panningViews/panResponderView.js +1 -1
  45. package/src/components/panningViews/panningContext.js +1 -0
  46. package/src/components/picker/PickerItem.js +1 -1
  47. package/src/components/picker/PickerItemsList.js +1 -1
  48. package/src/components/picker/api/picker.api.json +409 -10
  49. package/src/components/picker/helpers/useFieldType.js +2 -2
  50. package/src/components/scrollBar/index.js +3 -3
  51. package/src/components/slider/slider.api.json +2 -2
  52. package/src/components/sortableList/SortableList.api.json +7 -7
  53. package/src/components/stepper/index.js +3 -8
  54. package/src/components/tabController/apis/pageCarousel.api.json +8 -5
  55. package/src/components/tabController/apis/tabBar.api.json +8 -3
  56. package/src/components/tabController/useScrollToItem.js +1 -1
  57. package/src/components/text/text.api.json +18 -1
  58. package/src/components/textField/ClearButton.js +1 -1
  59. package/src/components/textField/Input.js +1 -1
  60. package/src/components/textField/textField.api.json +26 -9
  61. package/src/components/textField/useFieldState.js +2 -2
  62. package/src/components/timeline/timeline.api.json +57 -106
  63. package/src/components/toast/index.js +1 -1
  64. package/src/components/touchableOpacity/touchableOpacity.api.json +14 -3
  65. package/src/components/view/view.api.json +18 -9
  66. package/src/components/wizard/WizardStates.js +3 -4
  67. package/src/components/wizard/wizard.api.json +2 -2
  68. package/src/hooks/useScrollTo/index.js +9 -4
  69. package/src/incubator/dialog/useDialogContent.js +1 -1
  70. package/src/incubator/expandableOverlay/index.js +1 -0
  71. package/src/incubator/panView/index.js +1 -1
  72. package/src/incubator/slider/Thumb.js +8 -1
  73. package/src/incubator/toast/toast.api.json +57 -7
  74. package/src/assets/icons/index.js +0 -26
  75. package/src/assets/images/index.js +0 -5
  76. package/src/components/stepper/assets/minusSmall.png +0 -0
  77. package/src/components/stepper/assets/minusSmall@1.5x.png +0 -0
  78. package/src/components/stepper/assets/minusSmall@2x.png +0 -0
  79. package/src/components/stepper/assets/minusSmall@3x.png +0 -0
  80. package/src/components/stepper/assets/minusSmall@4x.png +0 -0
  81. package/src/components/stepper/assets/plusSmall.png +0 -0
  82. package/src/components/stepper/assets/plusSmall@1.5x.png +0 -0
  83. package/src/components/stepper/assets/plusSmall@2x.png +0 -0
  84. package/src/components/stepper/assets/plusSmall@3x.png +0 -0
  85. package/src/components/stepper/assets/plusSmall@4x.png +0 -0
  86. /package/src/assets/{icons → internal/icons}/check.png +0 -0
  87. /package/src/assets/{icons → internal/icons}/check@1.5x.png +0 -0
  88. /package/src/assets/{icons → internal/icons}/check@2x.png +0 -0
  89. /package/src/assets/{icons → internal/icons}/check@3x.png +0 -0
  90. /package/src/assets/{icons → internal/icons}/check@4x.png +0 -0
  91. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall.png +0 -0
  92. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@1.5x.png +0 -0
  93. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@2x.png +0 -0
  94. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@3x.png +0 -0
  95. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@4x.png +0 -0
  96. /package/src/assets/{icons/check-small.png → internal/icons/checkSmall.png} +0 -0
  97. /package/src/assets/{icons/check-small@1.5x.png → internal/icons/checkSmall@1.5x.png} +0 -0
  98. /package/src/assets/{icons/check-small@2x.png → internal/icons/checkSmall@2x.png} +0 -0
  99. /package/src/assets/{icons/check-small@3x.png → internal/icons/checkSmall@3x.png} +0 -0
  100. /package/src/assets/{icons/check-small@4x.png → internal/icons/checkSmall@4x.png} +0 -0
  101. /package/src/{components/picker/assets/dropdown.png → assets/internal/icons/chevronDown.png} +0 -0
  102. /package/src/{components/picker/assets/dropdown@1.5x.png → assets/internal/icons/chevronDown@1.5x.png} +0 -0
  103. /package/src/{components/picker/assets/dropdown@2x.png → assets/internal/icons/chevronDown@2x.png} +0 -0
  104. /package/src/{components/picker/assets/dropdown@3x.png → assets/internal/icons/chevronDown@3x.png} +0 -0
  105. /package/src/{components/picker/assets/dropdown@4x.png → assets/internal/icons/chevronDown@4x.png} +0 -0
  106. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall.png +0 -0
  107. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@1.5x.png +0 -0
  108. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@2x.png +0 -0
  109. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@3x.png +0 -0
  110. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@4x.png +0 -0
  111. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline.png +0 -0
  112. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@1.5x.png +0 -0
  113. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@2x.png +0 -0
  114. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@3x.png +0 -0
  115. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@4x.png +0 -0
  116. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall.png +0 -0
  117. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@1.5x.png +0 -0
  118. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@2x.png +0 -0
  119. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@3x.png +0 -0
  120. /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@4x.png +0 -0
  121. /package/src/assets/{icons → internal/icons}/minusSmall.png +0 -0
  122. /package/src/assets/{icons → internal/icons}/minusSmall@1.5x.png +0 -0
  123. /package/src/assets/{icons → internal/icons}/minusSmall@2x.png +0 -0
  124. /package/src/assets/{icons → internal/icons}/minusSmall@3x.png +0 -0
  125. /package/src/assets/{icons → internal/icons}/minusSmall@4x.png +0 -0
  126. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline.png +0 -0
  127. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@1.5x.png +0 -0
  128. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@2x.png +0 -0
  129. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@3x.png +0 -0
  130. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@4x.png +0 -0
  131. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall.png +0 -0
  132. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@1.5x.png +0 -0
  133. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@2x.png +0 -0
  134. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@3x.png +0 -0
  135. /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@4x.png +0 -0
  136. /package/src/assets/{icons → internal/icons}/plusSmall.png +0 -0
  137. /package/src/assets/{icons → internal/icons}/plusSmall@1.5x.png +0 -0
  138. /package/src/assets/{icons → internal/icons}/plusSmall@2x.png +0 -0
  139. /package/src/assets/{icons → internal/icons}/plusSmall@3x.png +0 -0
  140. /package/src/assets/{icons → internal/icons}/plusSmall@4x.png +0 -0
  141. /package/src/assets/{icons → internal/icons}/search.png +0 -0
  142. /package/src/assets/{icons → internal/icons}/search@1.5x.png +0 -0
  143. /package/src/assets/{icons → internal/icons}/search@2x.png +0 -0
  144. /package/src/assets/{icons → internal/icons}/search@3x.png +0 -0
  145. /package/src/assets/{icons → internal/icons}/search@4x.png +0 -0
  146. /package/src/assets/{icons → internal/icons}/x.png +0 -0
  147. /package/src/assets/{icons → internal/icons}/x@2x.png +0 -0
  148. /package/src/assets/{icons → internal/icons}/x@3x.png +0 -0
  149. /package/src/assets/{icons → internal/icons}/xFlat.png +0 -0
  150. /package/src/assets/{icons → internal/icons}/xFlat@1.5x.png +0 -0
  151. /package/src/assets/{icons → internal/icons}/xFlat@2x.png +0 -0
  152. /package/src/assets/{icons → internal/icons}/xFlat@3x.png +0 -0
  153. /package/src/assets/{icons → internal/icons}/xFlat@4x.png +0 -0
  154. /package/src/assets/{icons → internal/icons}/xMedium.png +0 -0
  155. /package/src/assets/{icons → internal/icons}/xMedium@1.5x.png +0 -0
  156. /package/src/assets/{icons → internal/icons}/xMedium@2x.png +0 -0
  157. /package/src/assets/{icons → internal/icons}/xMedium@3x.png +0 -0
  158. /package/src/assets/{icons → internal/icons}/xMedium@4x.png +0 -0
  159. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall.png +0 -0
  160. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@1.5x.png +0 -0
  161. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@2x.png +0 -0
  162. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@3x.png +0 -0
  163. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@4x.png +0 -0
  164. /package/src/assets/{images → internal/images}/gradient.png +0 -0
  165. /package/src/{components/scrollBar/assets → assets/internal/images}/gradientOverlay.png +0 -0
  166. /package/src/{components/overlay/assets/GradientOverlayHigh.png → assets/internal/images/gradientOverlayHigh.png} +0 -0
  167. /package/src/{components/overlay/assets/GradientOverlayHigh@1.5x.png → assets/internal/images/gradientOverlayHigh@1.5x.png} +0 -0
  168. /package/src/{components/overlay/assets/GradientOverlayHigh@2x.png → assets/internal/images/gradientOverlayHigh@2x.png} +0 -0
  169. /package/src/{components/overlay/assets/GradientOverlayHigh@3x.png → assets/internal/images/gradientOverlayHigh@3x.png} +0 -0
  170. /package/src/{components/overlay/assets/GradientOverlayHigh@4x.png → assets/internal/images/gradientOverlayHigh@4x.png} +0 -0
  171. /package/src/{components/overlay/assets/GradientOverlayLow.png → assets/internal/images/gradientOverlayLow.png} +0 -0
  172. /package/src/{components/overlay/assets/GradientOverlayLow@1.5x.png → assets/internal/images/gradientOverlayLow@1.5x.png} +0 -0
  173. /package/src/{components/overlay/assets/GradientOverlayLow@2x.png → assets/internal/images/gradientOverlayLow@2x.png} +0 -0
  174. /package/src/{components/overlay/assets/GradientOverlayLow@3x.png → assets/internal/images/gradientOverlayLow@3x.png} +0 -0
  175. /package/src/{components/overlay/assets/GradientOverlayLow@4x.png → assets/internal/images/gradientOverlayLow@4x.png} +0 -0
  176. /package/src/{components/overlay/assets/GradientOverlayMedium.png → assets/internal/images/gradientOverlayMedium.png} +0 -0
  177. /package/src/{components/overlay/assets/GradientOverlayMedium@1.5x.png → assets/internal/images/gradientOverlayMedium@1.5x.png} +0 -0
  178. /package/src/{components/overlay/assets/GradientOverlayMedium@2x.png → assets/internal/images/gradientOverlayMedium@2x.png} +0 -0
  179. /package/src/{components/overlay/assets/GradientOverlayMedium@3x.png → assets/internal/images/gradientOverlayMedium@3x.png} +0 -0
  180. /package/src/{components/overlay/assets/GradientOverlayMedium@4x.png → assets/internal/images/gradientOverlayMedium@4x.png} +0 -0
  181. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle.png +0 -0
  182. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@1.5x.png +0 -0
  183. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@2x.png +0 -0
  184. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@3x.png +0 -0
  185. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@4x.png +0 -0
  186. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide.png +0 -0
  187. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@1.5x.png +0 -0
  188. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@2x.png +0 -0
  189. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@3x.png +0 -0
  190. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@4x.png +0 -0
  191. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch.png → assets/internal/images/transparentSwatch.png} +0 -0
  192. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@1.5x.png → assets/internal/images/transparentSwatch@1.5x.png} +0 -0
  193. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@2x.png → assets/internal/images/transparentSwatch@2x.png} +0 -0
  194. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@3x.png → assets/internal/images/transparentSwatch@3x.png} +0 -0
  195. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@4x.png → assets/internal/images/transparentSwatch@4x.png} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "7.39.1",
3
+ "version": "7.40.0-snapshot.6818",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -32,13 +32,15 @@
32
32
  "pre-push": "npm run build:dev && npm run test",
33
33
  "docs:deploy": "./scripts/docs/deployDocs.sh",
34
34
  "docs:build": "node scripts/docs/buildDocs.js",
35
+ "docs:start": "(cd docuilib && yarn start)",
35
36
  "calendar:createMocks": "node scripts/createCalendarMockData.js",
36
37
  "snippets:build": "node scripts/generateSnippets.js",
37
38
  "release": "node ./scripts/release/release.js",
38
39
  "releaseDemo": "./scripts/release/releaseDemo.sh",
39
40
  "releaseDocs": "./scripts/release/releaseDocs.sh",
40
41
  "releaseEslint": "./scripts/release/releaseEslint.sh",
41
- "releaseNative": "./scripts/release/releaseNative.sh"
42
+ "releaseNative": "./scripts/release/releaseNative.sh",
43
+ "updateWebAssets": "node scripts/assets/extractDimensions.js"
42
44
  },
43
45
  "dependencies": {
44
46
  "babel-plugin-transform-inline-environment-variables": "^0.0.2",
@@ -77,7 +79,7 @@
77
79
  "@react-native/eslint-config": "0.73.2",
78
80
  "@react-native/metro-config": "0.73.5",
79
81
  "@react-native/typescript-config": "0.73.1",
80
- "@shopify/flash-list": "^1.2.1",
82
+ "@shopify/flash-list": "1.7.6",
81
83
  "@testing-library/react-hooks": "^8.0.1",
82
84
  "@testing-library/react-native": "^11.5.1",
83
85
  "@types/hoist-non-react-statics": "^3.3.1",
@@ -119,7 +121,7 @@
119
121
  "react-native-linear-gradient": "2.6.2",
120
122
  "react-native-mmkv": "2.11.0",
121
123
  "react-native-navigation": "7.40.1",
122
- "react-native-reanimated": "3.8.1",
124
+ "react-native-reanimated": "3.16.7",
123
125
  "react-native-shimmer-placeholder": "^2.0.6",
124
126
  "react-native-svg": "15.2.0",
125
127
  "react-native-svg-transformer": "1.5.0",
@@ -31,6 +31,9 @@ const VALID_COMPONENTS_CATEGORIES = [
31
31
 
32
32
  function buildDocs(apiFolders, componentsPreProcess) {
33
33
  let components = readComponentsFromApiFiles(apiFolders);
34
+
35
+ logStatistics(components);
36
+
34
37
  components = componentsPreProcess?.(components) ?? components;
35
38
  resetDocsDir();
36
39
  processComponents(components);
@@ -85,13 +88,9 @@ function processComponents(components) {
85
88
  content += `sidebar_label: ${componentName}\n`;
86
89
  content += '---\n\n';
87
90
 
88
- if (component.docs) {
89
- content += `import ComponentPage from '@site/src/components/ComponentPage';\n\n`;
90
- const componentObject = JSON.stringify(component);
91
- content += `<ComponentPage component={${componentObject}}/>\n`;
92
- } else {
93
- content += `${buildOldDocs(component)}\n`;
94
- }
91
+ content += `import ComponentPage from '@site/src/components/ComponentPage';\n\n`;
92
+ const componentObject = JSON.stringify(component);
93
+ content += `<ComponentPage component={${componentObject}}/>\n`;
95
94
 
96
95
  let dirPath;
97
96
  switch (component.category) {
@@ -134,86 +133,20 @@ function generateExtendsLink(extendsLink) {
134
133
  return extendsText;
135
134
  }
136
135
 
137
- function buildOldDocs(component) {
138
- let content = '';
139
- content += `import UILivePreview from '@site/src/components/UILivePreview';\n\n`;
140
-
141
- /* General Info */
142
- content += `${component.description} \n`;
143
- if (typeof component.example === 'string') {
144
- content += `[(code example)](${component.example})\n`;
145
- } else if (Array.isArray(component.example)) {
146
- content += '(code examples: ';
147
- component.example.forEach((example, index) => {
148
- const slashIndex = example.lastIndexOf('/');
149
- const dotIndex = example.lastIndexOf('.');
150
- content += `${index > 0 ? ', ' : ''}[${example.slice(slashIndex + 1, dotIndex)}](${example})`;
151
- });
152
- content += ')\n';
153
- }
154
-
155
- if (component.extends) {
156
- let extendsText = component.extends?.join(', ');
157
- if (component.extendsLink) {
158
- extendsText = `[${extendsText}](${component.extendsLink})`;
159
- } else {
160
- extendsText = _.map(component.extends, generateExtendsLink).join(', ');
161
- }
162
- content += ':::info\n';
163
- content += `This component extends **${extendsText}** props.\n`;
164
- content += ':::\n';
165
- }
166
-
167
- if (component.modifiers) {
168
- content += ':::tip\n';
169
- content += `This component support **${component.modifiers?.join(', ')}** modifiers.\n`;
170
- content += ':::\n';
171
- }
136
+ function logStatistics(components) {
137
+ const groupedComponents = _.countBy(components, 'name');
138
+ const duplicateComponents = Object.entries(groupedComponents)
139
+ .filter(([_, count]) => count > 1)
140
+ .map(([name, count]) => `${name} (${count} times)`);
172
141
 
173
- if (component.caution) {
174
- content += ':::caution\n';
175
- content += `${component.caution}\n`;
176
- content += ':::\n';
142
+ if (duplicateComponents.length > 0) {
143
+ console.log('Components with multiple occurrences:\n-', duplicateComponents.join('\n- '));
177
144
  }
178
145
 
179
- if (component.note) {
180
- content += ':::note\n';
181
- content += `${component.note}\n`;
182
- content += ':::\n';
146
+ const componentsWithoutSnippet = components.filter(c => !c.snippet).map(c => c.name);
147
+ if (componentsWithoutSnippet.length > 0) {
148
+ console.log('Components missing snippet:\n-', componentsWithoutSnippet.join('\n- '));
183
149
  }
184
-
185
- /* Images */
186
- content += `<div style={{display: 'flex', flexDirection: 'row', overflowX: 'auto', maxHeight: '500px', alignItems: 'center'}}>`;
187
- component.images?.forEach(image => {
188
- content += `<img style={{maxHeight: '420px'}} src={'${image}'}/>`;
189
- content += '\n\n';
190
- });
191
- content += '</div>\n\n';
192
-
193
- /* Snippet */
194
- if (component.snippet) {
195
- content += `### Usage\n`;
196
- content += `<UILivePreview componentName={"${component.name}"} code={\`${component.snippet
197
- ?.map(item => _.replace(item, new RegExp(/\$[1-9]/, 'g'), ''))
198
- .join('\n')
199
- .toString()}\`}/>\n\n`;
200
- } else {
201
- console.warn(`${component.name} does not have a snippet`);
202
- }
203
-
204
- /* Props */
205
- content += '## API\n';
206
- _.sortBy(component.props, p => p.name)?.forEach(prop => {
207
- content += `### ${prop.name}\n`;
208
- if (prop.note) {
209
- content += `#### ${prop.note}\n`;
210
- }
211
- content += `${prop.description}\n`;
212
- // content += `<span style={{color: 'grey'}}>${_.escape(prop.type)}</span>\n\n`;
213
- content += `\`${prop.type} \` \n\n`;
214
- });
215
-
216
- return content;
217
150
  }
218
151
 
219
152
  module.exports = {buildDocs};
@@ -196,7 +196,7 @@ async function generateReleaseNotes(latestVersion,
196
196
  newVersion,
197
197
  fileNamePrefix,
198
198
  repo,
199
- header = '',
199
+ getHeader = () => '',
200
200
  tagPrefix = '',
201
201
  categories = []) {
202
202
  let latestVer, newVer;
@@ -214,6 +214,7 @@ async function generateReleaseNotes(latestVersion,
214
214
  });
215
215
 
216
216
  rl.on('close', () => {
217
+ const header = getHeader(newVer);
217
218
  console.info(`Current latest version is v${latestVer}`);
218
219
  console.info(`Generating release notes out or PRs for v${newVer}`);
219
220
  _generateReleaseNotes(latestVer, newVer, fileNamePrefix, repo, header, tagPrefix, categories);
@@ -1,12 +1,9 @@
1
1
  import { Assets } from "./Assets";
2
2
  export default new Assets().loadAssetsGroup('', {
3
- get icons() {
4
- return require("./icons").icons;
5
- },
6
3
  get emojis() {
7
4
  return require("./emojis").emojis;
8
5
  },
9
- get images() {
10
- return require("./images").images;
6
+ get internal() {
7
+ return require("./internal").internal;
11
8
  }
12
9
  });
@@ -0,0 +1,50 @@
1
+ export const icons = {
2
+ get check() {
3
+ return require('./check.png');
4
+ },
5
+ get checkMarkSmall() {
6
+ return require('./checkMarkSmall.png');
7
+ },
8
+ get checkSmall() {
9
+ return require('./checkSmall.png');
10
+ },
11
+ get chevronDown() {
12
+ return require('./chevronDown.png');
13
+ },
14
+ get exclamationSmall() {
15
+ return require('./exclamationSmall.png');
16
+ },
17
+ get minusOutline() {
18
+ return require('./minusOutline.png');
19
+ },
20
+ get minusOutlineSmall() {
21
+ return require('./minusOutlineSmall.png');
22
+ },
23
+ get minusSmall() {
24
+ return require('./minusSmall.png');
25
+ },
26
+ get plusOutline() {
27
+ return require('./plusOutline.png');
28
+ },
29
+ get plusOutlineSmall() {
30
+ return require('./plusOutlineSmall.png');
31
+ },
32
+ get plusSmall() {
33
+ return require('./plusSmall.png');
34
+ },
35
+ get search() {
36
+ return require('./search.png');
37
+ },
38
+ get x() {
39
+ return require('./x.png');
40
+ },
41
+ get xFlat() {
42
+ return require('./xFlat.png');
43
+ },
44
+ get xMedium() {
45
+ return require('./xMedium.png');
46
+ },
47
+ get xSmall() {
48
+ return require('./xSmall.png');
49
+ }
50
+ };
@@ -0,0 +1,50 @@
1
+ export const icons = {
2
+ get check() {
3
+ return {uri: require('./check.png'), width: 21, height: 15};
4
+ },
5
+ get checkMarkSmall() {
6
+ return {uri: require('./checkMarkSmall.png'), width: 16, height: 16};
7
+ },
8
+ get checkSmall() {
9
+ return {uri: require('./checkSmall.png'), width: 24, height: 24};
10
+ },
11
+ get chevronDown() {
12
+ return {uri: require('./chevronDown.png'), width: 16, height: 16};
13
+ },
14
+ get exclamationSmall() {
15
+ return {uri: require('./exclamationSmall.png'), width: 16, height: 16};
16
+ },
17
+ get minusOutline() {
18
+ return {uri: require('./minusOutline.png'), width: 32, height: 32};
19
+ },
20
+ get minusOutlineSmall() {
21
+ return {uri: require('./minusOutlineSmall.png'), width: 24, height: 24};
22
+ },
23
+ get minusSmall() {
24
+ return {uri: require('./minusSmall.png'), width: 16, height: 16};
25
+ },
26
+ get plusOutline() {
27
+ return {uri: require('./plusOutline.png'), width: 32, height: 32};
28
+ },
29
+ get plusOutlineSmall() {
30
+ return {uri: require('./plusOutlineSmall.png'), width: 24, height: 24};
31
+ },
32
+ get plusSmall() {
33
+ return {uri: require('./plusSmall.png'), width: 16, height: 16};
34
+ },
35
+ get search() {
36
+ return {uri: require('./search.png'), width: 24, height: 24};
37
+ },
38
+ get x() {
39
+ return {uri: require('./x.png'), width: 17, height: 16};
40
+ },
41
+ get xFlat() {
42
+ return {uri: require('./xFlat.png'), width: 16, height: 16};
43
+ },
44
+ get xMedium() {
45
+ return {uri: require('./xMedium.png'), width: 24, height: 24};
46
+ },
47
+ get xSmall() {
48
+ return {uri: require('./xSmall.png'), width: 16, height: 16};
49
+ }
50
+ };
@@ -0,0 +1,26 @@
1
+ export const images = {
2
+ get gradient() {
3
+ return require('./gradient.png');
4
+ },
5
+ get gradientOverlay() {
6
+ return require('./gradientOverlay.png');
7
+ },
8
+ get gradientOverlayHigh() {
9
+ return require('./gradientOverlayHigh.png');
10
+ },
11
+ get gradientOverlayLow() {
12
+ return require('./gradientOverlayLow.png');
13
+ },
14
+ get gradientOverlayMedium() {
15
+ return require('./gradientOverlayMedium.png');
16
+ },
17
+ get hintTipMiddle() {
18
+ return require('./hintTipMiddle.png');
19
+ },
20
+ get hintTipSide() {
21
+ return require('./hintTipSide.png');
22
+ },
23
+ get transparentSwatch() {
24
+ return require('./transparentSwatch.png');
25
+ }
26
+ };
@@ -0,0 +1,26 @@
1
+ export const images = {
2
+ get gradient() {
3
+ return {uri: require('./gradient.png'), width: 56, height: 2};
4
+ },
5
+ get gradientOverlay() {
6
+ return {uri: require('./gradientOverlay.png'), width: 76, height: 48};
7
+ },
8
+ get gradientOverlayHigh() {
9
+ return {uri: require('./gradientOverlayHigh.png'), width: 1, height: 297};
10
+ },
11
+ get gradientOverlayLow() {
12
+ return {uri: require('./gradientOverlayLow.png'), width: 1, height: 297};
13
+ },
14
+ get gradientOverlayMedium() {
15
+ return {uri: require('./gradientOverlayMedium.png'), width: 1, height: 297};
16
+ },
17
+ get hintTipMiddle() {
18
+ return {uri: require('./hintTipMiddle.png'), width: 20, height: 7};
19
+ },
20
+ get hintTipSide() {
21
+ return {uri: require('./hintTipSide.png'), width: 20, height: 24};
22
+ },
23
+ get transparentSwatch() {
24
+ return {uri: require('./transparentSwatch.png'), width: 100, height: 100};
25
+ }
26
+ };
@@ -0,0 +1,4 @@
1
+ export declare const internal: {
2
+ readonly icons: any;
3
+ readonly images: any;
4
+ };
@@ -0,0 +1,8 @@
1
+ export const internal = {
2
+ get icons() {
3
+ return require("./icons").icons;
4
+ },
5
+ get images() {
6
+ return require("./images").images;
7
+ }
8
+ };
@@ -47,6 +47,7 @@ declare const constants: {
47
47
  };
48
48
  backspaceKey: string;
49
49
  enterKey: string;
50
+ getFontScale: () => number;
50
51
  };
51
52
  export default constants;
52
53
  export declare const _reset: () => void;
@@ -1,4 +1,4 @@
1
- import { Platform, Dimensions, NativeModules, I18nManager, AccessibilityInfo, StatusBar } from 'react-native';
1
+ import { Platform, Dimensions, NativeModules, I18nManager, AccessibilityInfo, StatusBar, PixelRatio } from 'react-native';
2
2
  export let orientations = /*#__PURE__*/function (orientations) {
3
3
  orientations["PORTRAIT"] = "portrait";
4
4
  orientations["LANDSCAPE"] = "landscape";
@@ -166,7 +166,9 @@ const constants = {
166
166
  },
167
167
  /* Keyboard */
168
168
  backspaceKey: 'Backspace',
169
- enterKey: 'Enter'
169
+ enterKey: 'Enter',
170
+ /* Font scale */
171
+ getFontScale: PixelRatio.getFontScale
170
172
  };
171
173
  setStatusBarHeight();
172
174
  Dimensions.addEventListener('change', updateConstants);
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "KeyboardAwareScrollView",
3
+ "category": "form",
4
+ "description": "A wrapper component which handles the ScrollView insets properly when the keyboard is shown and hides the content, scrolling content above the keybaord.",
5
+ "example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/KeyboardAwareScrollViewScreen.js",
6
+ "props": [
7
+ {
8
+ "name": "getTextInputRefs",
9
+ "type": "function",
10
+ "description": "Function that returns an array of TextInput refs"
11
+ },
12
+ {
13
+ "name": "onScroll",
14
+ "type": "function",
15
+ "description": "Callback for scroll events"
16
+ },
17
+ {
18
+ "name": "startScrolledToBottom",
19
+ "type": "boolean",
20
+ "description": "Whether to start scrolled to bottom"
21
+ },
22
+ {
23
+ "name": "scrollToBottomOnKBShow",
24
+ "type": "boolean",
25
+ "description": "Whether to scroll to bottom when keyboard shows"
26
+ },
27
+ {
28
+ "name": "scrollToInputAdditionalOffset",
29
+ "type": "number",
30
+ "description": "Additional offset when scrolling to input"
31
+ }
32
+ ],
33
+ "snippet": [
34
+ "<KeyboardAwareScrollView>",
35
+ " <View>",
36
+ " <TextField placeholder=\"Input with scrolling\" />",
37
+ " </View>",
38
+ "</KeyboardAwareScrollView>"
39
+ ]
40
+ }
@@ -72,17 +72,100 @@
72
72
  {"name": "ribbonStyle", "type": "ViewStyle", "description": "Ribbon custom style"},
73
73
  {"name": "ribbonLabelStyle", "type": "TextStyle", "description": "Ribbon label custom style"},
74
74
  {"name": "customRibbon", "type": "JSX.Element", "description": "Custom ribbon"},
75
- {"name": "isOnline", "type": "boolean", "description": "Determine if to show online badge"},
76
- {
77
- "name": "status",
78
- "type": "StatusModes",
79
- "description": "AWAY, ONLINE, OFFLINE or NONE mode (if set to a value other then 'NONE' will override isOnline prop)"
80
- },
81
75
  {"name": "size", "type": " number", "description": "Custom size for the Avatar", "default": "50"},
82
76
  {"name": "onPress", "type": "(props: any) => void", "description": "Press handler"},
83
77
  {"name": "testID", "type": "string", "description": "Test identifier"}
84
78
  ],
85
79
  "snippet": [
86
- "<Avatar source={{uri: 'https://lh3.googleusercontent.com/-cw77lUnOvmI/AAAAAAAAAAI/AAAAAAAAAAA/WMNck32dKbc/s181-c/104220521160525129167.jpg'$1}} label={IT$2}/>"
87
- ]
80
+ "<View flex center row gap-s5>",
81
+ "<Avatar",
82
+ " size={60$2}",
83
+ " source={{uri: 'https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/icons/icon%20examples%20for%20docs/avatar_1.jpg'}$3}",
84
+ " badgeProps={{label: '2'}$4}",
85
+ " badgePosition={'BOTTOM_RIGHT'}",
86
+ " onPress={() => {}}",
87
+ "/>",
88
+ "<Avatar",
89
+ " size={60}",
90
+ " source={{uri: 'https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/icons/icon%20examples%20for%20docs/avatar_1.jpg'}}",
91
+ " ribbonLabel='NEW'",
92
+ "/>",
93
+ "</View>"
94
+ ],
95
+ "docs": {
96
+ "hero": {
97
+ "title": "Avatar",
98
+ "description": "An Avatar component is a visual representation of a user or entity, often displayed as a circular image, icon, or placeholder with initials. In mobile app design systems, it is used to personalize the interface by representing users in profiles, chats, notifications, or lists. Avatars help users quickly recognize people, accounts, or items, enhancing both engagement and navigational clarity.",
99
+ "type": "hero",
100
+ "layout": "horizontal",
101
+ "content": [
102
+ {
103
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatar_hero.png"
104
+ }
105
+ ]
106
+ },
107
+ "tabs": [
108
+ {
109
+ "title": "Overview",
110
+ "sections": [
111
+ {
112
+ "type": "table",
113
+ "columns": ["Property", "Component"],
114
+ "items": [
115
+ {
116
+ "title": "Image",
117
+ "description": "",
118
+ "content": [
119
+ {
120
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatar_table01.png"
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "title": "Initials",
126
+ "description": "",
127
+ "content": [
128
+ {
129
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatar_table04.png"
130
+ }
131
+ ]
132
+ }
133
+ ]
134
+ },
135
+ {
136
+ "type": "table",
137
+ "columns": ["Property", "Component"],
138
+ "items": [
139
+ {
140
+ "title": "Badge (online indication)",
141
+ "content": [
142
+ {
143
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatarPlaceholder_overview_table.png"
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "title": "Badge with icon",
149
+ "description": "Not supported in XXSmall and 3Xsmall.",
150
+ "content": [
151
+ {
152
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatarPlaceholder_overview_table02.png"
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ "title": "Label",
158
+ "description": "Supported only in XLarge, Large and Medium.",
159
+ "content": [
160
+ {
161
+ "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatarPlaceholder_overview_table03.png"
162
+ }
163
+ ]
164
+ }
165
+ ]
166
+ }
167
+ ]
168
+ }
169
+ ]
170
+ }
88
171
  }
@@ -1,5 +1,5 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { StyleProp, ViewStyle, ImagePropsBase, ImageStyle, TextStyle, AccessibilityProps } from 'react-native';
2
+ import { StyleProp, ViewStyle, ImagePropsBase, ImageStyle, TextStyle, TextProps, AccessibilityProps } from 'react-native';
3
3
  import { BadgeProps } from '../badge';
4
4
  import { ImageProps } from '../image';
5
5
  import { AnimatedImageProps } from '../animatedImage';
@@ -95,6 +95,7 @@ export type AvatarProps = Pick<AccessibilityProps, 'accessibilityLabel'> & Props
95
95
  * The label color
96
96
  */
97
97
  labelColor?: string;
98
+ labelEllipsizeMode?: TextProps['ellipsizeMode'];
98
99
  /**
99
100
  * ribbon label to display on the avatar
100
101
  */
@@ -162,21 +163,14 @@ declare const Avatar: React.ForwardRefExoticComponent<Pick<AccessibilityProps, "
162
163
  * Image props object
163
164
  */
164
165
  imageProps?: Partial<Omit<import("react-native").ImageProps, "source"> & Pick<import("react-native").ImageBackgroundProps, "imageStyle"> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & import("../..").RecorderProps & {
165
- /**
166
- * Avatar colors to be used when useAutoColors is true
167
- */
168
166
  sourceTransformer?: ((props: any) => import("../image").ImageSourceType) | undefined;
169
167
  assetName?: string | undefined;
170
168
  assetGroup?: string | undefined;
171
169
  tintColor?: string | undefined;
172
- supportRTL?: boolean | undefined; /**
173
- * Background color for Avatar
174
- */
170
+ supportRTL?: boolean | undefined;
175
171
  cover?: boolean | undefined;
176
172
  aspectRatio?: number | undefined;
177
- overlayType?: string | undefined; /**
178
- * Image props object
179
- */
173
+ overlayType?: string | undefined;
180
174
  overlayIntensity?: import("../overlay").OverlayIntensityType | undefined;
181
175
  overlayColor?: string | undefined;
182
176
  customOverlayContent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
@@ -230,6 +224,7 @@ declare const Avatar: React.ForwardRefExoticComponent<Pick<AccessibilityProps, "
230
224
  * The label color
231
225
  */
232
226
  labelColor?: string | undefined;
227
+ labelEllipsizeMode?: TextProps['ellipsizeMode'];
233
228
  /**
234
229
  * ribbon label to display on the avatar
235
230
  */
@@ -291,21 +286,14 @@ declare const _default: React.ForwardRefExoticComponent<Pick<AccessibilityProps,
291
286
  * Image props object
292
287
  */
293
288
  imageProps?: Partial<Omit<import("react-native").ImageProps, "source"> & Pick<import("react-native").ImageBackgroundProps, "imageStyle"> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & import("../..").RecorderProps & {
294
- /**
295
- * Avatar colors to be used when useAutoColors is true
296
- */
297
289
  sourceTransformer?: ((props: any) => import("../image").ImageSourceType) | undefined;
298
290
  assetName?: string | undefined;
299
291
  assetGroup?: string | undefined;
300
292
  tintColor?: string | undefined;
301
- supportRTL?: boolean | undefined; /**
302
- * Background color for Avatar
303
- */
293
+ supportRTL?: boolean | undefined;
304
294
  cover?: boolean | undefined;
305
295
  aspectRatio?: number | undefined;
306
- overlayType?: string | undefined; /**
307
- * Image props object
308
- */
296
+ overlayType?: string | undefined;
309
297
  overlayIntensity?: import("../overlay").OverlayIntensityType | undefined;
310
298
  overlayColor?: string | undefined;
311
299
  customOverlayContent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
@@ -359,6 +347,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<AccessibilityProps,
359
347
  * The label color
360
348
  */
361
349
  labelColor?: string | undefined;
350
+ labelEllipsizeMode?: "middle" | "head" | "tail" | "clip" | undefined;
362
351
  /**
363
352
  * ribbon label to display on the avatar
364
353
  */
@@ -56,6 +56,7 @@ const Avatar = forwardRef((props, ref) => {
56
56
  useAutoColors,
57
57
  autoColorsConfig,
58
58
  containerStyle,
59
+ labelEllipsizeMode = 'clip',
59
60
  onPress,
60
61
  children
61
62
  } = themeProps;
@@ -178,7 +179,7 @@ const Avatar = forwardRef((props, ref) => {
178
179
  const Container = onPress ? TouchableOpacity : View;
179
180
  return <Container style={_containerStyle} ref={ref} testID={testID} onPress={onPress} accessible={!_isUndefined(onPress)} accessibilityLabel={'Avatar'} accessibilityRole={onPress ? 'button' : 'image'} hitSlop={onPress ? hitTargetPadding : undefined} {...accessibilityProps}>
180
181
  <View testID={`${testID}.container`} style={textContainerStyle}>
181
- {!_isUndefined(text) && <Text numberOfLines={1} style={textStyle} testID={`${testID}.label`}>
182
+ {!_isUndefined(text) && <Text numberOfLines={1} ellipsizeMode={labelEllipsizeMode} style={textStyle} testID={`${testID}.label`}>
182
183
  {text}
183
184
  </Text>}
184
185
  </View>
@@ -194,7 +195,8 @@ const styles = StyleSheet.create({
194
195
  ...StyleSheet.absoluteFillObject,
195
196
  alignItems: 'center',
196
197
  justifyContent: 'center',
197
- borderRadius: BorderRadiuses.br100
198
+ borderRadius: BorderRadiuses.br100,
199
+ overflow: 'hidden'
198
200
  },
199
201
  initialsContainerWithInset: {
200
202
  top: 1,