react-native-ui-lib 7.39.0-snapshot.6519 → 7.39.0-snapshot.6530

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 (144) hide show
  1. package/package.json +5 -1
  2. package/scripts/docs/buildDocsCommon.js +36 -10
  3. package/src/assets/index.js +2 -5
  4. package/src/assets/index.web.d.ts +3 -0
  5. package/src/assets/index.web.js +9 -0
  6. package/src/assets/{icons → internal/icons}/index.js +15 -3
  7. package/src/assets/internal/icons/index.web.d.ts +107 -0
  8. package/src/assets/internal/icons/index.web.js +137 -0
  9. package/src/assets/internal/images/index.js +26 -0
  10. package/src/assets/internal/images/index.web.d.ts +37 -0
  11. package/src/assets/internal/images/index.web.js +47 -0
  12. package/src/assets/internal/index.d.ts +4 -0
  13. package/src/assets/internal/index.js +8 -0
  14. package/src/assets/internal/index.web.d.ts +4 -0
  15. package/src/assets/internal/index.web.js +8 -0
  16. package/src/commons/Constants.d.ts +1 -0
  17. package/src/commons/Constants.js +4 -2
  18. package/src/components/card/index.js +1 -1
  19. package/src/components/checkbox/index.js +1 -1
  20. package/src/components/chip/index.js +1 -1
  21. package/src/components/chipsInput/index.js +2 -2
  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/index.js +2 -3
  28. package/src/components/image/index.js +1 -1
  29. package/src/components/modal/TopBar.js +1 -1
  30. package/src/components/modal/api/modalTopBar.api.json +1 -1
  31. package/src/components/overlay/index.js +4 -6
  32. package/src/components/picker/PickerItem.js +1 -1
  33. package/src/components/picker/PickerItemsList.js +2 -8
  34. package/src/components/picker/helpers/useFieldType.js +2 -2
  35. package/src/components/picker/helpers/usePickerSelection.d.ts +1 -4
  36. package/src/components/picker/helpers/usePickerSelection.js +3 -13
  37. package/src/components/picker/index.d.ts +2 -3
  38. package/src/components/picker/index.js +7 -15
  39. package/src/components/picker/types.d.ts +1 -56
  40. package/src/components/picker/types.js +0 -5
  41. package/src/components/scrollBar/index.js +2 -2
  42. package/src/components/test.api.json +0 -32
  43. package/src/components/textField/ClearButton.js +1 -1
  44. package/src/components/timeline/timeline.api.json +57 -106
  45. package/src/components/toast/index.js +1 -1
  46. package/src/components/wizard/WizardStates.js +3 -4
  47. package/src/incubator/dialog/useDialogContent.js +1 -1
  48. package/src/incubator/slider/Thumb.js +8 -1
  49. package/src/incubator/toast/toast.api.json +1 -1
  50. package/src/index.d.ts +1 -1
  51. package/src/index.js +0 -7
  52. package/src/assets/images/index.js +0 -5
  53. package/src/components/picker/PickerSelectionStatusToolbar.d.ts +0 -8
  54. package/src/components/picker/PickerSelectionStatusToolbar.js +0 -57
  55. /package/src/assets/{icons → internal/icons}/check.png +0 -0
  56. /package/src/assets/{icons → internal/icons}/check@1.5x.png +0 -0
  57. /package/src/assets/{icons → internal/icons}/check@2x.png +0 -0
  58. /package/src/assets/{icons → internal/icons}/check@3x.png +0 -0
  59. /package/src/assets/{icons → internal/icons}/check@4x.png +0 -0
  60. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall.png +0 -0
  61. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@1.5x.png +0 -0
  62. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@2x.png +0 -0
  63. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@3x.png +0 -0
  64. /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@4x.png +0 -0
  65. /package/src/assets/{icons/check-small.png → internal/icons/checkSmall.png} +0 -0
  66. /package/src/assets/{icons/check-small@1.5x.png → internal/icons/checkSmall@1.5x.png} +0 -0
  67. /package/src/assets/{icons/check-small@2x.png → internal/icons/checkSmall@2x.png} +0 -0
  68. /package/src/assets/{icons/check-small@3x.png → internal/icons/checkSmall@3x.png} +0 -0
  69. /package/src/assets/{icons/check-small@4x.png → internal/icons/checkSmall@4x.png} +0 -0
  70. /package/src/{components/picker/assets/dropdown.png → assets/internal/icons/chevronDown.png} +0 -0
  71. /package/src/{components/picker/assets/dropdown@1.5x.png → assets/internal/icons/chevronDown@1.5x.png} +0 -0
  72. /package/src/{components/picker/assets/dropdown@2x.png → assets/internal/icons/chevronDown@2x.png} +0 -0
  73. /package/src/{components/picker/assets/dropdown@3x.png → assets/internal/icons/chevronDown@3x.png} +0 -0
  74. /package/src/{components/picker/assets/dropdown@4x.png → assets/internal/icons/chevronDown@4x.png} +0 -0
  75. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall.png +0 -0
  76. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@1.5x.png +0 -0
  77. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@2x.png +0 -0
  78. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@3x.png +0 -0
  79. /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@4x.png +0 -0
  80. /package/src/assets/{icons → internal/icons}/minusSmall.png +0 -0
  81. /package/src/assets/{icons → internal/icons}/minusSmall@1.5x.png +0 -0
  82. /package/src/assets/{icons → internal/icons}/minusSmall@2x.png +0 -0
  83. /package/src/assets/{icons → internal/icons}/minusSmall@3x.png +0 -0
  84. /package/src/assets/{icons → internal/icons}/minusSmall@4x.png +0 -0
  85. /package/src/assets/{icons → internal/icons}/plusSmall.png +0 -0
  86. /package/src/assets/{icons → internal/icons}/plusSmall@1.5x.png +0 -0
  87. /package/src/assets/{icons → internal/icons}/plusSmall@2x.png +0 -0
  88. /package/src/assets/{icons → internal/icons}/plusSmall@3x.png +0 -0
  89. /package/src/assets/{icons → internal/icons}/plusSmall@4x.png +0 -0
  90. /package/src/assets/{icons → internal/icons}/search.png +0 -0
  91. /package/src/assets/{icons → internal/icons}/search@1.5x.png +0 -0
  92. /package/src/assets/{icons → internal/icons}/search@2x.png +0 -0
  93. /package/src/assets/{icons → internal/icons}/search@3x.png +0 -0
  94. /package/src/assets/{icons → internal/icons}/search@4x.png +0 -0
  95. /package/src/assets/{icons → internal/icons}/x.png +0 -0
  96. /package/src/assets/{icons → internal/icons}/x@2x.png +0 -0
  97. /package/src/assets/{icons → internal/icons}/x@3x.png +0 -0
  98. /package/src/assets/{icons → internal/icons}/xFlat.png +0 -0
  99. /package/src/assets/{icons → internal/icons}/xFlat@1.5x.png +0 -0
  100. /package/src/assets/{icons → internal/icons}/xFlat@2x.png +0 -0
  101. /package/src/assets/{icons → internal/icons}/xFlat@3x.png +0 -0
  102. /package/src/assets/{icons → internal/icons}/xFlat@4x.png +0 -0
  103. /package/src/assets/{icons → internal/icons}/xMedium.png +0 -0
  104. /package/src/assets/{icons → internal/icons}/xMedium@1.5x.png +0 -0
  105. /package/src/assets/{icons → internal/icons}/xMedium@2x.png +0 -0
  106. /package/src/assets/{icons → internal/icons}/xMedium@3x.png +0 -0
  107. /package/src/assets/{icons → internal/icons}/xMedium@4x.png +0 -0
  108. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall.png +0 -0
  109. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@1.5x.png +0 -0
  110. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@2x.png +0 -0
  111. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@3x.png +0 -0
  112. /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@4x.png +0 -0
  113. /package/src/assets/{images → internal/images}/gradient.png +0 -0
  114. /package/src/{components/scrollBar/assets → assets/internal/images}/gradientOverlay.png +0 -0
  115. /package/src/{components/overlay/assets/GradientOverlayHigh.png → assets/internal/images/gradientOverlayHigh.png} +0 -0
  116. /package/src/{components/overlay/assets/GradientOverlayHigh@1.5x.png → assets/internal/images/gradientOverlayHigh@1.5x.png} +0 -0
  117. /package/src/{components/overlay/assets/GradientOverlayHigh@2x.png → assets/internal/images/gradientOverlayHigh@2x.png} +0 -0
  118. /package/src/{components/overlay/assets/GradientOverlayHigh@3x.png → assets/internal/images/gradientOverlayHigh@3x.png} +0 -0
  119. /package/src/{components/overlay/assets/GradientOverlayHigh@4x.png → assets/internal/images/gradientOverlayHigh@4x.png} +0 -0
  120. /package/src/{components/overlay/assets/GradientOverlayLow.png → assets/internal/images/gradientOverlayLow.png} +0 -0
  121. /package/src/{components/overlay/assets/GradientOverlayLow@1.5x.png → assets/internal/images/gradientOverlayLow@1.5x.png} +0 -0
  122. /package/src/{components/overlay/assets/GradientOverlayLow@2x.png → assets/internal/images/gradientOverlayLow@2x.png} +0 -0
  123. /package/src/{components/overlay/assets/GradientOverlayLow@3x.png → assets/internal/images/gradientOverlayLow@3x.png} +0 -0
  124. /package/src/{components/overlay/assets/GradientOverlayLow@4x.png → assets/internal/images/gradientOverlayLow@4x.png} +0 -0
  125. /package/src/{components/overlay/assets/GradientOverlayMedium.png → assets/internal/images/gradientOverlayMedium.png} +0 -0
  126. /package/src/{components/overlay/assets/GradientOverlayMedium@1.5x.png → assets/internal/images/gradientOverlayMedium@1.5x.png} +0 -0
  127. /package/src/{components/overlay/assets/GradientOverlayMedium@2x.png → assets/internal/images/gradientOverlayMedium@2x.png} +0 -0
  128. /package/src/{components/overlay/assets/GradientOverlayMedium@3x.png → assets/internal/images/gradientOverlayMedium@3x.png} +0 -0
  129. /package/src/{components/overlay/assets/GradientOverlayMedium@4x.png → assets/internal/images/gradientOverlayMedium@4x.png} +0 -0
  130. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle.png +0 -0
  131. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@1.5x.png +0 -0
  132. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@2x.png +0 -0
  133. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@3x.png +0 -0
  134. /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@4x.png +0 -0
  135. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide.png +0 -0
  136. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@1.5x.png +0 -0
  137. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@2x.png +0 -0
  138. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@3x.png +0 -0
  139. /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@4x.png +0 -0
  140. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch.png → assets/internal/images/transparentSwatch.png} +0 -0
  141. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@1.5x.png → assets/internal/images/transparentSwatch@1.5x.png} +0 -0
  142. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@2x.png → assets/internal/images/transparentSwatch@2x.png} +0 -0
  143. /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@3x.png → assets/internal/images/transparentSwatch@3x.png} +0 -0
  144. /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.0-snapshot.6519",
3
+ "version": "7.39.0-snapshot.6530",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -14,6 +14,7 @@
14
14
  "url": "https://github.com/wix/react-native-ui-lib"
15
15
  },
16
16
  "scripts": {
17
+ "update-web-assets": "node scripts/assets/extract-dimensions.ts",
17
18
  "start": "watchman watch-del-all && react-native start",
18
19
  "start:web": "npm --prefix webDemo run start",
19
20
  "ios": "react-native run-ios",
@@ -83,6 +84,7 @@
83
84
  "@types/hoist-non-react-statics": "^3.3.1",
84
85
  "@types/jest": "^29.2.1",
85
86
  "@types/lodash": "^4.0.0",
87
+ "@types/mime-types": "^2.1.4",
86
88
  "@types/prop-types": "^15.5.3",
87
89
  "@types/react": "18.3.7",
88
90
  "@types/react-native": "0.73.0",
@@ -100,9 +102,11 @@
100
102
  "eslint-plugin-react": "^7.24.0",
101
103
  "eslint-plugin-react-hooks": "^4.0.4",
102
104
  "eslint-plugin-react-native": "^4.0.0",
105
+ "image-size": "^2.0.1",
103
106
  "jest": "^29.6.3",
104
107
  "light-date": "^1.2.0",
105
108
  "metro-react-native-babel-preset": "0.73.10",
109
+ "mime-types": "^2.1.35",
106
110
  "moment": "^2.24.0",
107
111
  "object-hash": "^3.0.0",
108
112
  "postcss": "^8.4.21",
@@ -7,6 +7,7 @@ const fs = require('fs');
7
7
 
8
8
  const COMPONENTS_DOCS_DIR = './docs/components';
9
9
  const SERVICES_DOCS_DIR = './docs/services';
10
+ const FOUNDATION_DOCS_DIR = './docs/foundation';
10
11
 
11
12
  const VALID_COMPONENTS_CATEGORIES = [
12
13
  'foundation',
@@ -30,6 +31,9 @@ const VALID_COMPONENTS_CATEGORIES = [
30
31
 
31
32
  function buildDocs(apiFolders, componentsPreProcess) {
32
33
  let components = readComponentsFromApiFiles(apiFolders);
34
+
35
+ logStatistics(components);
36
+
33
37
  components = componentsPreProcess?.(components) ?? components;
34
38
  resetDocsDir();
35
39
  processComponents(components);
@@ -92,14 +96,22 @@ function processComponents(components) {
92
96
  content += `${buildOldDocs(component)}\n`;
93
97
  }
94
98
 
95
-
96
99
  let dirPath;
97
- if (component.category === 'services') {
98
- dirPath = `${SERVICES_DOCS_DIR}`;
99
- } else {
100
- const componentParentDir =
101
- componentParentName || isParentComponent ? `/${componentParentName || componentName}` : '';
102
- dirPath = `${COMPONENTS_DOCS_DIR}/${component.category}${componentParentDir}`;
100
+ switch (component.category) {
101
+ case 'services': {
102
+ dirPath = `${SERVICES_DOCS_DIR}`;
103
+ break;
104
+ }
105
+ case 'foundation': {
106
+ dirPath = `${FOUNDATION_DOCS_DIR}`;
107
+ break;
108
+ }
109
+ default: {
110
+ const componentParentDir =
111
+ componentParentName || isParentComponent ? `/${componentParentName || componentName}` : '';
112
+ dirPath = `${COMPONENTS_DOCS_DIR}/${component.category}${componentParentDir}`;
113
+ break;
114
+ }
103
115
  }
104
116
 
105
117
  if (!fs.existsSync(dirPath)) {
@@ -125,6 +137,22 @@ function generateExtendsLink(extendsLink) {
125
137
  return extendsText;
126
138
  }
127
139
 
140
+ function logStatistics(components) {
141
+ const groupedComponents = _.countBy(components, 'name');
142
+ const duplicateComponents = Object.entries(groupedComponents)
143
+ .filter(([_, count]) => count > 1)
144
+ .map(([name, count]) => `${name} (${count} times)`);
145
+
146
+ if (duplicateComponents.length > 0) {
147
+ console.log('Components with multiple occurrences:\n-', duplicateComponents.join('\n- '));
148
+ }
149
+
150
+ const componentsWithoutSnippet = components.filter(c => !c.snippet).map(c => c.name);
151
+ if (componentsWithoutSnippet.length > 0) {
152
+ console.log('Components missing snippet:\n-', componentsWithoutSnippet.join('\n- '));
153
+ }
154
+ }
155
+
128
156
  function buildOldDocs(component) {
129
157
  let content = '';
130
158
  content += `import UILivePreview from '@site/src/components/UILivePreview';\n\n`;
@@ -184,12 +212,10 @@ function buildOldDocs(component) {
184
212
  /* Snippet */
185
213
  if (component.snippet) {
186
214
  content += `### Usage\n`;
187
- content += `<UILivePreview code={\`${component.snippet
215
+ content += `<UILivePreview componentName={"${component.name}"} code={\`${component.snippet
188
216
  ?.map(item => _.replace(item, new RegExp(/\$[1-9]/, 'g'), ''))
189
217
  .join('\n')
190
218
  .toString()}\`}/>\n\n`;
191
- } else {
192
- console.warn(`${component.name} does not have a snippet`);
193
219
  }
194
220
 
195
221
  /* Props */
@@ -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,3 @@
1
+ import { Assets } from './Assets';
2
+ declare const _default: Assets;
3
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { Assets } from "./Assets";
2
+ export default new Assets().loadAssetsGroup('', {
3
+ get emojis() {
4
+ return require("./emojis").emojis;
5
+ },
6
+ get internal() {
7
+ return require("./internal").internal;
8
+ }
9
+ });
@@ -2,8 +2,17 @@ export const icons = {
2
2
  get check() {
3
3
  return require('./check.png');
4
4
  },
5
+ get checkMarkSmall() {
6
+ return require('./checkMarkSmall.png');
7
+ },
5
8
  get checkSmall() {
6
- return require('./check-small.png');
9
+ return require('./checkSmall.png');
10
+ },
11
+ get chevronDown() {
12
+ return require('./chevronDown.png');
13
+ },
14
+ get exclamationSmall() {
15
+ return require('./exclamationSmall.png');
7
16
  },
8
17
  get minusSmall() {
9
18
  return require('./minusSmall.png');
@@ -17,10 +26,13 @@ export const icons = {
17
26
  get x() {
18
27
  return require('./x.png');
19
28
  },
29
+ get xFlat() {
30
+ return require('./xFlat.png');
31
+ },
20
32
  get xMedium() {
21
33
  return require('./xMedium.png');
22
34
  },
23
- get xFlat() {
24
- return require('./xFlat.png');
35
+ get xSmall() {
36
+ return require('./xSmall.png');
25
37
  }
26
38
  };
@@ -0,0 +1,107 @@
1
+ export declare const icons: {
2
+ readonly checkSmall: {
3
+ uri: any;
4
+ dimensions: {
5
+ width: number;
6
+ height: number;
7
+ };
8
+ };
9
+ readonly check: {
10
+ uri: any;
11
+ dimensions: {
12
+ width: number;
13
+ height: number;
14
+ };
15
+ };
16
+ readonly checkMarkSmall: {
17
+ uri: any;
18
+ dimensions: {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ };
23
+ readonly dropdown: {
24
+ uri: any;
25
+ dimensions: {
26
+ width: number;
27
+ height: number;
28
+ };
29
+ };
30
+ readonly exclamationSmall: {
31
+ uri: any;
32
+ dimensions: {
33
+ width: number;
34
+ height: number;
35
+ };
36
+ };
37
+ readonly hintTipMiddle: {
38
+ uri: any;
39
+ dimensions: {
40
+ width: number;
41
+ height: number;
42
+ };
43
+ };
44
+ readonly hintTipSide: {
45
+ uri: any;
46
+ dimensions: {
47
+ width: number;
48
+ height: number;
49
+ };
50
+ };
51
+ readonly minusSmall: {
52
+ uri: any;
53
+ dimensions: {
54
+ width: number;
55
+ height: number;
56
+ };
57
+ };
58
+ readonly plusSmall: {
59
+ uri: any;
60
+ dimensions: {
61
+ width: number;
62
+ height: number;
63
+ };
64
+ };
65
+ readonly search: {
66
+ uri: any;
67
+ dimensions: {
68
+ width: number;
69
+ height: number;
70
+ };
71
+ };
72
+ readonly transparentSwatch: {
73
+ uri: any;
74
+ dimensions: {
75
+ width: number;
76
+ height: number;
77
+ };
78
+ };
79
+ readonly x: {
80
+ uri: any;
81
+ dimensions: {
82
+ width: number;
83
+ height: number;
84
+ };
85
+ };
86
+ readonly xFlat: {
87
+ uri: any;
88
+ dimensions: {
89
+ width: number;
90
+ height: number;
91
+ };
92
+ };
93
+ readonly xMedium: {
94
+ uri: any;
95
+ dimensions: {
96
+ width: number;
97
+ height: number;
98
+ };
99
+ };
100
+ readonly xSmall: {
101
+ uri: any;
102
+ dimensions: {
103
+ width: number;
104
+ height: number;
105
+ };
106
+ };
107
+ };
@@ -0,0 +1,137 @@
1
+ export const icons = {
2
+ get checkSmall() {
3
+ return {
4
+ uri: require("./check-small.png"),
5
+ dimensions: {
6
+ width: 24,
7
+ height: 24
8
+ }
9
+ };
10
+ },
11
+ get check() {
12
+ return {
13
+ uri: require("./check.png"),
14
+ dimensions: {
15
+ width: 24,
16
+ height: 24
17
+ }
18
+ };
19
+ },
20
+ get checkMarkSmall() {
21
+ return {
22
+ uri: require("./checkMarkSmall.png"),
23
+ dimensions: {
24
+ width: 24,
25
+ height: 24
26
+ }
27
+ };
28
+ },
29
+ get dropdown() {
30
+ return {
31
+ uri: require("./dropdown.png"),
32
+ dimensions: {
33
+ width: 24,
34
+ height: 24
35
+ }
36
+ };
37
+ },
38
+ get exclamationSmall() {
39
+ return {
40
+ uri: require("./exclamationSmall.png"),
41
+ dimensions: {
42
+ width: 24,
43
+ height: 24
44
+ }
45
+ };
46
+ },
47
+ get hintTipMiddle() {
48
+ return {
49
+ uri: require("./hintTipMiddle.png"),
50
+ dimensions: {
51
+ width: 24,
52
+ height: 24
53
+ }
54
+ };
55
+ },
56
+ get hintTipSide() {
57
+ return {
58
+ uri: require("./hintTipSide.png"),
59
+ dimensions: {
60
+ width: 24,
61
+ height: 24
62
+ }
63
+ };
64
+ },
65
+ get minusSmall() {
66
+ return {
67
+ uri: require("./minusSmall.png"),
68
+ dimensions: {
69
+ width: 16,
70
+ height: 16
71
+ }
72
+ };
73
+ },
74
+ get plusSmall() {
75
+ return {
76
+ uri: require("./plusSmall.png"),
77
+ dimensions: {
78
+ width: 16,
79
+ height: 16
80
+ }
81
+ };
82
+ },
83
+ get search() {
84
+ return {
85
+ uri: require("./search.png"),
86
+ dimensions: {
87
+ width: 24,
88
+ height: 24
89
+ }
90
+ };
91
+ },
92
+ get transparentSwatch() {
93
+ return {
94
+ uri: require("./transparentSwatch.png"),
95
+ dimensions: {
96
+ width: 20,
97
+ height: 20
98
+ }
99
+ };
100
+ },
101
+ get x() {
102
+ return {
103
+ uri: require("./x.png"),
104
+ dimensions: {
105
+ width: 24,
106
+ height: 24
107
+ }
108
+ };
109
+ },
110
+ get xFlat() {
111
+ return {
112
+ uri: require("./xFlat.png"),
113
+ dimensions: {
114
+ width: 24,
115
+ height: 24
116
+ }
117
+ };
118
+ },
119
+ get xMedium() {
120
+ return {
121
+ uri: require("./xMedium.png"),
122
+ dimensions: {
123
+ width: 20,
124
+ height: 20
125
+ }
126
+ };
127
+ },
128
+ get xSmall() {
129
+ return {
130
+ uri: require("./xSmall.png"),
131
+ dimensions: {
132
+ width: 16,
133
+ height: 16
134
+ }
135
+ };
136
+ }
137
+ };
@@ -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,37 @@
1
+ export declare const images: {
2
+ readonly gradient: {
3
+ uri: any;
4
+ dimensions: {
5
+ width: number;
6
+ height: number;
7
+ };
8
+ };
9
+ readonly gradientOverlay: {
10
+ uri: any;
11
+ dimensions: {
12
+ width: number;
13
+ height: number;
14
+ };
15
+ };
16
+ readonly gradientOverlayHigh: {
17
+ uri: any;
18
+ dimensions: {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ };
23
+ readonly gradientOverlayLow: {
24
+ uri: any;
25
+ dimensions: {
26
+ width: number;
27
+ height: number;
28
+ };
29
+ };
30
+ readonly gradientOverlayMedium: {
31
+ uri: any;
32
+ dimensions: {
33
+ width: number;
34
+ height: number;
35
+ };
36
+ };
37
+ };
@@ -0,0 +1,47 @@
1
+ export const images = {
2
+ get gradient() {
3
+ return {
4
+ uri: require("./gradient.png"),
5
+ dimensions: {
6
+ width: 1,
7
+ height: 24
8
+ }
9
+ };
10
+ },
11
+ get gradientOverlay() {
12
+ return {
13
+ uri: require("./gradientOverlay.png"),
14
+ dimensions: {
15
+ width: 1,
16
+ height: 50
17
+ }
18
+ };
19
+ },
20
+ get gradientOverlayHigh() {
21
+ return {
22
+ uri: require("./gradientOverlayHigh.png"),
23
+ dimensions: {
24
+ width: 1,
25
+ height: 100
26
+ }
27
+ };
28
+ },
29
+ get gradientOverlayLow() {
30
+ return {
31
+ uri: require("./gradientOverlayLow.png"),
32
+ dimensions: {
33
+ width: 1,
34
+ height: 25
35
+ }
36
+ };
37
+ },
38
+ get gradientOverlayMedium() {
39
+ return {
40
+ uri: require("./gradientOverlayMedium.png"),
41
+ dimensions: {
42
+ width: 1,
43
+ height: 75
44
+ }
45
+ };
46
+ }
47
+ };
@@ -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
+ };
@@ -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);
@@ -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
  };
@@ -167,7 +167,7 @@ class Checkbox extends Component {
167
167
  }]}>
168
168
  <AnimatedIcon style={[this.styles.selectedIcon, {
169
169
  transform: this.animationStyle.transform
170
- }]} source={indeterminate ? Assets.icons.minusSmall : selectedIcon || Assets.icons.checkSmall} testID={`${testID}.selected`} tintColor={this.getTintColor()} />
170
+ }]} source={indeterminate ? Assets.internal.icons.minusSmall : selectedIcon || Assets.internal.icons.checkSmall} testID={`${testID}.selected`} tintColor={this.getTintColor()} />
171
171
  </Animated.View>}
172
172
  </TouchableOpacity>
173
173
  );
@@ -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 <>
@@ -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