react-native-ui-lib 7.39.1 → 7.40.0-snapshot.6808
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.
- package/package.json +6 -4
- package/scripts/docs/buildDocsCommon.js +16 -83
- package/scripts/release/prReleaseNotesCommon.js +2 -1
- package/src/assets/index.js +2 -5
- package/src/assets/internal/icons/index.js +50 -0
- package/src/assets/internal/icons/index.web.js +50 -0
- package/src/assets/internal/images/index.js +26 -0
- package/src/assets/internal/images/index.web.js +26 -0
- package/src/assets/internal/index.d.ts +4 -0
- package/src/assets/internal/index.js +8 -0
- package/src/commons/Constants.d.ts +1 -0
- package/src/commons/Constants.js +4 -2
- package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.api.json +40 -0
- package/src/components/avatar/avatar.api.json +91 -8
- package/src/components/avatar/index.d.ts +8 -19
- package/src/components/avatar/index.js +4 -2
- package/src/components/button/button.api.json +35 -198
- package/src/components/button/index.d.ts +0 -1
- package/src/components/button/index.js +2 -9
- package/src/components/button/types.d.ts +1 -1
- package/src/components/card/index.js +1 -1
- package/src/components/checkbox/index.d.ts +5 -2
- package/src/components/checkbox/index.js +11 -8
- package/src/components/chip/index.js +1 -1
- package/src/components/chipsInput/index.js +2 -2
- package/src/components/colorPicker/ColorPickerDialog.js +1 -1
- package/src/components/colorPicker/ColorPickerDialogHeader.js +2 -2
- package/src/components/colorPicker/ColorPickerPreview.js +2 -2
- package/src/components/colorPicker/index.js +1 -1
- package/src/components/colorSwatch/index.js +2 -3
- package/src/components/dateTimePicker/index.js +2 -2
- package/src/components/hint/hint.api.json +39 -5
- package/src/components/hint/index.js +2 -3
- package/src/components/icon/index.d.ts +12 -3
- package/src/components/icon/index.js +18 -9
- package/src/components/image/index.d.ts +1 -1
- package/src/components/modal/TopBar.js +1 -1
- package/src/components/modal/api/modalTopBar.api.json +1 -1
- package/src/components/modal/modal.api.json +54 -0
- package/src/components/overlay/index.js +4 -6
- package/src/components/panningViews/panDismissibleView.js +1 -1
- package/src/components/panningViews/panGestureView.js +1 -1
- package/src/components/panningViews/panListenerView.js +1 -1
- package/src/components/panningViews/panResponderView.js +1 -1
- package/src/components/panningViews/panningContext.js +1 -0
- package/src/components/picker/PickerItem.js +1 -1
- package/src/components/picker/PickerItemsList.js +1 -1
- package/src/components/picker/api/picker.api.json +409 -10
- package/src/components/picker/helpers/useFieldType.js +2 -2
- package/src/components/scrollBar/index.js +3 -3
- package/src/components/slider/slider.api.json +2 -2
- package/src/components/sortableList/SortableList.api.json +7 -7
- package/src/components/stepper/index.js +3 -8
- package/src/components/tabController/apis/pageCarousel.api.json +8 -5
- package/src/components/tabController/apis/tabBar.api.json +8 -3
- package/src/components/text/text.api.json +18 -1
- package/src/components/textField/ClearButton.js +1 -1
- package/src/components/textField/Input.js +1 -1
- package/src/components/textField/textField.api.json +26 -9
- package/src/components/textField/useFieldState.js +2 -2
- package/src/components/timeline/timeline.api.json +57 -106
- package/src/components/toast/index.js +1 -1
- package/src/components/touchableOpacity/touchableOpacity.api.json +14 -3
- package/src/components/view/view.api.json +18 -9
- package/src/components/wizard/WizardStates.js +3 -4
- package/src/components/wizard/wizard.api.json +2 -2
- package/src/hooks/useScrollTo/index.js +9 -4
- package/src/incubator/dialog/useDialogContent.js +1 -1
- package/src/incubator/expandableOverlay/index.js +1 -0
- package/src/incubator/panView/index.js +1 -1
- package/src/incubator/slider/Thumb.js +8 -1
- package/src/incubator/toast/toast.api.json +57 -7
- package/src/assets/icons/index.js +0 -26
- package/src/assets/images/index.js +0 -5
- package/src/components/stepper/assets/minusSmall.png +0 -0
- package/src/components/stepper/assets/minusSmall@1.5x.png +0 -0
- package/src/components/stepper/assets/minusSmall@2x.png +0 -0
- package/src/components/stepper/assets/minusSmall@3x.png +0 -0
- package/src/components/stepper/assets/minusSmall@4x.png +0 -0
- package/src/components/stepper/assets/plusSmall.png +0 -0
- package/src/components/stepper/assets/plusSmall@1.5x.png +0 -0
- package/src/components/stepper/assets/plusSmall@2x.png +0 -0
- package/src/components/stepper/assets/plusSmall@3x.png +0 -0
- package/src/components/stepper/assets/plusSmall@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/check.png +0 -0
- /package/src/assets/{icons → internal/icons}/check@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/check@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/check@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/check@4x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@1.5x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@2x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@3x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/checkMarkSmall@4x.png +0 -0
- /package/src/assets/{icons/check-small.png → internal/icons/checkSmall.png} +0 -0
- /package/src/assets/{icons/check-small@1.5x.png → internal/icons/checkSmall@1.5x.png} +0 -0
- /package/src/assets/{icons/check-small@2x.png → internal/icons/checkSmall@2x.png} +0 -0
- /package/src/assets/{icons/check-small@3x.png → internal/icons/checkSmall@3x.png} +0 -0
- /package/src/assets/{icons/check-small@4x.png → internal/icons/checkSmall@4x.png} +0 -0
- /package/src/{components/picker/assets/dropdown.png → assets/internal/icons/chevronDown.png} +0 -0
- /package/src/{components/picker/assets/dropdown@1.5x.png → assets/internal/icons/chevronDown@1.5x.png} +0 -0
- /package/src/{components/picker/assets/dropdown@2x.png → assets/internal/icons/chevronDown@2x.png} +0 -0
- /package/src/{components/picker/assets/dropdown@3x.png → assets/internal/icons/chevronDown@3x.png} +0 -0
- /package/src/{components/picker/assets/dropdown@4x.png → assets/internal/icons/chevronDown@4x.png} +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@1.5x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@2x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@3x.png +0 -0
- /package/src/{components/wizard/assets → assets/internal/icons}/exclamationSmall@4x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@1.5x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@2x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@3x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutline@4x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@1.5x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@2x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@3x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/minusOutlineSmall@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/minusSmall@4x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@1.5x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@2x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@3x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutline@4x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@1.5x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@2x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@3x.png +0 -0
- /package/src/{components/stepper/assets → assets/internal/icons}/plusOutlineSmall@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/plusSmall@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/search.png +0 -0
- /package/src/assets/{icons → internal/icons}/search@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/search@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/search@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/search@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/x.png +0 -0
- /package/src/assets/{icons → internal/icons}/x@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/x@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xFlat@4x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium@1.5x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium@2x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium@3x.png +0 -0
- /package/src/assets/{icons → internal/icons}/xMedium@4x.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@1.5x.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@2x.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@3x.png +0 -0
- /package/src/{components/chipsInput/assets → assets/internal/icons}/xSmall@4x.png +0 -0
- /package/src/assets/{images → internal/images}/gradient.png +0 -0
- /package/src/{components/scrollBar/assets → assets/internal/images}/gradientOverlay.png +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh.png → assets/internal/images/gradientOverlayHigh.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh@1.5x.png → assets/internal/images/gradientOverlayHigh@1.5x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh@2x.png → assets/internal/images/gradientOverlayHigh@2x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh@3x.png → assets/internal/images/gradientOverlayHigh@3x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayHigh@4x.png → assets/internal/images/gradientOverlayHigh@4x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow.png → assets/internal/images/gradientOverlayLow.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow@1.5x.png → assets/internal/images/gradientOverlayLow@1.5x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow@2x.png → assets/internal/images/gradientOverlayLow@2x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow@3x.png → assets/internal/images/gradientOverlayLow@3x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayLow@4x.png → assets/internal/images/gradientOverlayLow@4x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium.png → assets/internal/images/gradientOverlayMedium.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium@1.5x.png → assets/internal/images/gradientOverlayMedium@1.5x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium@2x.png → assets/internal/images/gradientOverlayMedium@2x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium@3x.png → assets/internal/images/gradientOverlayMedium@3x.png} +0 -0
- /package/src/{components/overlay/assets/GradientOverlayMedium@4x.png → assets/internal/images/gradientOverlayMedium@4x.png} +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@1.5x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@2x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@3x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipMiddle@4x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@1.5x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@2x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@3x.png +0 -0
- /package/src/{components/hint/assets → assets/internal/images}/hintTipSide@4x.png +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch.png → assets/internal/images/transparentSwatch.png} +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@1.5x.png → assets/internal/images/transparentSwatch@1.5x.png} +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@2x.png → assets/internal/images/transparentSwatch@2x.png} +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@3x.png → assets/internal/images/transparentSwatch@3x.png} +0 -0
- /package/src/{components/colorSwatch/assets/transparentSwatch/TransparentSwatch@4x.png → assets/internal/images/transparentSwatch@4x.png} +0 -0
|
@@ -2,13 +2,8 @@
|
|
|
2
2
|
"name": "Button",
|
|
3
3
|
"category": "controls",
|
|
4
4
|
"description": "Customizable button component that handles press events",
|
|
5
|
-
"extends": [
|
|
6
|
-
|
|
7
|
-
],
|
|
8
|
-
"modifiers": [
|
|
9
|
-
"margin",
|
|
10
|
-
"background"
|
|
11
|
-
],
|
|
5
|
+
"extends": ["basic/TouchableOpacity"],
|
|
6
|
+
"modifiers": ["margin", "background"],
|
|
12
7
|
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ButtonsScreen.tsx",
|
|
13
8
|
"images": [
|
|
14
9
|
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Button/Button%20Sizes.png?raw=true",
|
|
@@ -140,7 +135,7 @@
|
|
|
140
135
|
{
|
|
141
136
|
"name": "enableShadow",
|
|
142
137
|
"type": "boolean",
|
|
143
|
-
"description": "Control shadow visibility
|
|
138
|
+
"description": "Control shadow visibility"
|
|
144
139
|
},
|
|
145
140
|
{
|
|
146
141
|
"name": "avoidInnerPadding",
|
|
@@ -169,12 +164,21 @@
|
|
|
169
164
|
}
|
|
170
165
|
],
|
|
171
166
|
"snippet": [
|
|
172
|
-
"<
|
|
167
|
+
"<View flex>",
|
|
168
|
+
"<View flex center gap-s5>",
|
|
169
|
+
"<Button label={'Press'} backgroundColor={Colors.red30}/>",
|
|
170
|
+
"<Button label={'Press'} outline size={Button.sizes.medium}/>",
|
|
171
|
+
"<Button label={'Press'} iconSource={Assets.icons.demo.star}/>",
|
|
172
|
+
"</View>",
|
|
173
|
+
"<View flex bottom>",
|
|
174
|
+
"<Button fullWidth label='Full Width Button'/>",
|
|
175
|
+
"</View>",
|
|
176
|
+
"</View>"
|
|
173
177
|
],
|
|
174
178
|
"docs": {
|
|
175
179
|
"hero": {
|
|
176
180
|
"title": "Button",
|
|
177
|
-
"description": "A button triggers an event or action.\n\nPrimary buttons that indicate a call to action, are the most prominent.
|
|
181
|
+
"description": "A button triggers an event or action.\n\nPrimary buttons that indicate a call to action, are the most prominent.
|
|
178
182
|
"type": "hero",
|
|
179
183
|
"layout": "horizontal",
|
|
180
184
|
"content": [
|
|
@@ -189,10 +193,7 @@
|
|
|
189
193
|
"sections": [
|
|
190
194
|
{
|
|
191
195
|
"type": "table",
|
|
192
|
-
"columns": [
|
|
193
|
-
"Type",
|
|
194
|
-
"Component"
|
|
195
|
-
],
|
|
196
|
+
"columns": ["Type", "Component"],
|
|
196
197
|
"items": [
|
|
197
198
|
{
|
|
198
199
|
"title": "Main Button",
|
|
@@ -221,15 +222,6 @@
|
|
|
221
222
|
}
|
|
222
223
|
]
|
|
223
224
|
},
|
|
224
|
-
{
|
|
225
|
-
"title": "Floating Button",
|
|
226
|
-
"description": "The Floating Button is displayed at the bottom of the screen.",
|
|
227
|
-
"content": [
|
|
228
|
-
{
|
|
229
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_types_floatingButton.png"
|
|
230
|
-
}
|
|
231
|
-
]
|
|
232
|
-
},
|
|
233
225
|
{
|
|
234
226
|
"title": "Full-Width Button",
|
|
235
227
|
"description": "Full Width buttons are sticky on the bottom of the screens.",
|
|
@@ -238,15 +230,6 @@
|
|
|
238
230
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_types_fullButton.png"
|
|
239
231
|
}
|
|
240
232
|
]
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"title": "Toggle Button",
|
|
244
|
-
"description": "Toggle Button are mainly used to toggle between a state, f.e- favorite, like.",
|
|
245
|
-
"content": [
|
|
246
|
-
{
|
|
247
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_types_toggleButtons.png"
|
|
248
|
-
}
|
|
249
|
-
]
|
|
250
233
|
}
|
|
251
234
|
],
|
|
252
235
|
"title": "Button Types",
|
|
@@ -259,10 +242,7 @@
|
|
|
259
242
|
},
|
|
260
243
|
{
|
|
261
244
|
"type": "table",
|
|
262
|
-
"columns": [
|
|
263
|
-
"Property",
|
|
264
|
-
"Component"
|
|
265
|
-
],
|
|
245
|
+
"columns": ["Property", "Component"],
|
|
266
246
|
"items": [
|
|
267
247
|
{
|
|
268
248
|
"title": "Primary",
|
|
@@ -289,11 +269,7 @@
|
|
|
289
269
|
},
|
|
290
270
|
{
|
|
291
271
|
"type": "table",
|
|
292
|
-
"columns": [
|
|
293
|
-
"Property",
|
|
294
|
-
"Primary",
|
|
295
|
-
"Secondary"
|
|
296
|
-
],
|
|
272
|
+
"columns": ["Property", "Primary", "Secondary"],
|
|
297
273
|
"items": [
|
|
298
274
|
{
|
|
299
275
|
"title": "Main",
|
|
@@ -320,7 +296,7 @@
|
|
|
320
296
|
]
|
|
321
297
|
},
|
|
322
298
|
{
|
|
323
|
-
"title": "
|
|
299
|
+
"title": "Destructive",
|
|
324
300
|
"description": "Used for destructive actions such as Delete and Log out. ",
|
|
325
301
|
"content": [
|
|
326
302
|
{
|
|
@@ -330,18 +306,6 @@
|
|
|
330
306
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_distructiveSecondary.png"
|
|
331
307
|
}
|
|
332
308
|
]
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
"title": "Premium",
|
|
336
|
-
"description": "Used as a premium upgrade entry point.",
|
|
337
|
-
"content": [
|
|
338
|
-
{
|
|
339
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_premiumPrimary.png"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_premiumSecondary.png"
|
|
343
|
-
}
|
|
344
|
-
]
|
|
345
309
|
}
|
|
346
310
|
],
|
|
347
311
|
"title": "",
|
|
@@ -355,11 +319,7 @@
|
|
|
355
319
|
},
|
|
356
320
|
{
|
|
357
321
|
"type": "table",
|
|
358
|
-
"columns": [
|
|
359
|
-
"Property",
|
|
360
|
-
"Primary",
|
|
361
|
-
"Secondary"
|
|
362
|
-
],
|
|
322
|
+
"columns": ["Property", "Primary", "Secondary"],
|
|
363
323
|
"items": [
|
|
364
324
|
{
|
|
365
325
|
"title": "Active",
|
|
@@ -404,11 +364,7 @@
|
|
|
404
364
|
},
|
|
405
365
|
{
|
|
406
366
|
"type": "table",
|
|
407
|
-
"columns": [
|
|
408
|
-
"Property",
|
|
409
|
-
"Primary",
|
|
410
|
-
"Secondary"
|
|
411
|
-
],
|
|
367
|
+
"columns": ["Property", "Primary", "Secondary"],
|
|
412
368
|
"items": [
|
|
413
369
|
{
|
|
414
370
|
"title": "Active",
|
|
@@ -453,59 +409,7 @@
|
|
|
453
409
|
},
|
|
454
410
|
{
|
|
455
411
|
"type": "table",
|
|
456
|
-
"columns": [
|
|
457
|
-
"Property",
|
|
458
|
-
"Primary",
|
|
459
|
-
"Secondary"
|
|
460
|
-
],
|
|
461
|
-
"items": [
|
|
462
|
-
{
|
|
463
|
-
"title": "Active",
|
|
464
|
-
"description": "",
|
|
465
|
-
"content": [
|
|
466
|
-
{
|
|
467
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumActivePrimary.png"
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumActiveSecondary.png"
|
|
471
|
-
}
|
|
472
|
-
]
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
"title": "Loading",
|
|
476
|
-
"description": "",
|
|
477
|
-
"content": [
|
|
478
|
-
{
|
|
479
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumLoadingPrimary.png"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumLoadingSecondary.png"
|
|
483
|
-
}
|
|
484
|
-
]
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
"title": "Disabled",
|
|
488
|
-
"content": [
|
|
489
|
-
{
|
|
490
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumDisabledPrimary.png"
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumDisabledSecondary.png"
|
|
494
|
-
}
|
|
495
|
-
],
|
|
496
|
-
"description": ""
|
|
497
|
-
}
|
|
498
|
-
],
|
|
499
|
-
"title": "",
|
|
500
|
-
"description": "",
|
|
501
|
-
"name": "Premium"
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"type": "table",
|
|
505
|
-
"columns": [
|
|
506
|
-
"Property",
|
|
507
|
-
"Component"
|
|
508
|
-
],
|
|
412
|
+
"columns": ["Property", "Component"],
|
|
509
413
|
"items": [
|
|
510
414
|
{
|
|
511
415
|
"title": "Large",
|
|
@@ -540,10 +444,7 @@
|
|
|
540
444
|
},
|
|
541
445
|
{
|
|
542
446
|
"type": "table",
|
|
543
|
-
"columns": [
|
|
544
|
-
"Property",
|
|
545
|
-
"Component"
|
|
546
|
-
],
|
|
447
|
+
"columns": ["Property", "Component"],
|
|
547
448
|
"items": [
|
|
548
449
|
{
|
|
549
450
|
"title": "Icon prefix",
|
|
@@ -574,10 +475,7 @@
|
|
|
574
475
|
},
|
|
575
476
|
{
|
|
576
477
|
"type": "table",
|
|
577
|
-
"columns": [
|
|
578
|
-
"Property",
|
|
579
|
-
"Component"
|
|
580
|
-
],
|
|
478
|
+
"columns": ["Property", "Component"],
|
|
581
479
|
"items": [
|
|
582
480
|
{
|
|
583
481
|
"title": "Primary",
|
|
@@ -603,11 +501,7 @@
|
|
|
603
501
|
},
|
|
604
502
|
{
|
|
605
503
|
"type": "table",
|
|
606
|
-
"columns": [
|
|
607
|
-
"Property",
|
|
608
|
-
"Primary",
|
|
609
|
-
"Secondary"
|
|
610
|
-
],
|
|
504
|
+
"columns": ["Property", "Primary", "Secondary"],
|
|
611
505
|
"items": [
|
|
612
506
|
{
|
|
613
507
|
"title": "Main",
|
|
@@ -643,11 +537,7 @@
|
|
|
643
537
|
},
|
|
644
538
|
{
|
|
645
539
|
"type": "table",
|
|
646
|
-
"columns": [
|
|
647
|
-
"Property",
|
|
648
|
-
"Primary",
|
|
649
|
-
"Secondary"
|
|
650
|
-
],
|
|
540
|
+
"columns": ["Property", "Primary", "Secondary"],
|
|
651
541
|
"items": [
|
|
652
542
|
{
|
|
653
543
|
"title": "Active",
|
|
@@ -678,43 +568,6 @@
|
|
|
678
568
|
"description": "",
|
|
679
569
|
"name": "Main"
|
|
680
570
|
},
|
|
681
|
-
{
|
|
682
|
-
"type": "table",
|
|
683
|
-
"columns": [
|
|
684
|
-
"Property",
|
|
685
|
-
"Primary",
|
|
686
|
-
"Secondary"
|
|
687
|
-
],
|
|
688
|
-
"items": [
|
|
689
|
-
{
|
|
690
|
-
"title": "Active",
|
|
691
|
-
"description": "",
|
|
692
|
-
"content": [
|
|
693
|
-
{
|
|
694
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_presets_invertedPrimary.png"
|
|
695
|
-
},
|
|
696
|
-
{
|
|
697
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_states_invertedActiveSecondary.png"
|
|
698
|
-
}
|
|
699
|
-
]
|
|
700
|
-
},
|
|
701
|
-
{
|
|
702
|
-
"title": "Disabled",
|
|
703
|
-
"description": "",
|
|
704
|
-
"content": [
|
|
705
|
-
{
|
|
706
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_states_invertedDisabledPrimary.png"
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_states_invertedDisabledSecondary.png"
|
|
710
|
-
}
|
|
711
|
-
]
|
|
712
|
-
}
|
|
713
|
-
],
|
|
714
|
-
"title": "",
|
|
715
|
-
"description": "",
|
|
716
|
-
"name": "Inverted"
|
|
717
|
-
},
|
|
718
571
|
{
|
|
719
572
|
"type": "section",
|
|
720
573
|
"title": "Usage Examples",
|
|
@@ -732,10 +585,7 @@
|
|
|
732
585
|
},
|
|
733
586
|
{
|
|
734
587
|
"type": "table",
|
|
735
|
-
"columns": [
|
|
736
|
-
"Property",
|
|
737
|
-
"Component"
|
|
738
|
-
],
|
|
588
|
+
"columns": ["Property", "Component"],
|
|
739
589
|
"items": [
|
|
740
590
|
{
|
|
741
591
|
"title": "Main",
|
|
@@ -747,7 +597,7 @@
|
|
|
747
597
|
]
|
|
748
598
|
},
|
|
749
599
|
{
|
|
750
|
-
"title": "
|
|
600
|
+
"title": "Destructive",
|
|
751
601
|
"description": "text style: bodyBold, $textDangerLight",
|
|
752
602
|
"content": [
|
|
753
603
|
{
|
|
@@ -769,10 +619,7 @@
|
|
|
769
619
|
},
|
|
770
620
|
{
|
|
771
621
|
"type": "table",
|
|
772
|
-
"columns": [
|
|
773
|
-
"Property",
|
|
774
|
-
"Component"
|
|
775
|
-
],
|
|
622
|
+
"columns": ["Property", "Component"],
|
|
776
623
|
"items": [
|
|
777
624
|
{
|
|
778
625
|
"title": "Regular",
|
|
@@ -797,11 +644,7 @@
|
|
|
797
644
|
},
|
|
798
645
|
{
|
|
799
646
|
"type": "table",
|
|
800
|
-
"columns": [
|
|
801
|
-
"Property",
|
|
802
|
-
"Regular",
|
|
803
|
-
"Small (bodyBoldSmall)"
|
|
804
|
-
],
|
|
647
|
+
"columns": ["Property", "Regular", "Small (bodyBoldSmall)"],
|
|
805
648
|
"items": [
|
|
806
649
|
{
|
|
807
650
|
"title": "Icon prefix",
|
|
@@ -834,14 +677,11 @@
|
|
|
834
677
|
{
|
|
835
678
|
"type": "section",
|
|
836
679
|
"title": "Full-Width Button",
|
|
837
|
-
"description": "Full-Width buttons are sticky on the bottom of the screens.
|
|
680
|
+
"description": "Full-Width buttons are sticky on the bottom of the screens.
|
|
838
681
|
},
|
|
839
682
|
{
|
|
840
683
|
"type": "table",
|
|
841
|
-
"columns": [
|
|
842
|
-
"Property",
|
|
843
|
-
"Component"
|
|
844
|
-
],
|
|
684
|
+
"columns": ["Property", "Component"],
|
|
845
685
|
"items": [
|
|
846
686
|
{
|
|
847
687
|
"title": "Main",
|
|
@@ -853,7 +693,7 @@
|
|
|
853
693
|
]
|
|
854
694
|
},
|
|
855
695
|
{
|
|
856
|
-
"title": "
|
|
696
|
+
"title": "Destructive ",
|
|
857
697
|
"description": "",
|
|
858
698
|
"content": [
|
|
859
699
|
{
|
|
@@ -876,10 +716,7 @@
|
|
|
876
716
|
},
|
|
877
717
|
{
|
|
878
718
|
"type": "table",
|
|
879
|
-
"columns": [
|
|
880
|
-
"Property",
|
|
881
|
-
"Component"
|
|
882
|
-
],
|
|
719
|
+
"columns": ["Property", "Component"],
|
|
883
720
|
"items": [
|
|
884
721
|
{
|
|
885
722
|
"title": "Active",
|
|
@@ -914,7 +751,7 @@
|
|
|
914
751
|
]
|
|
915
752
|
},
|
|
916
753
|
{
|
|
917
|
-
"title": "UX",
|
|
754
|
+
"title": "UX Guidelines",
|
|
918
755
|
"sections": [
|
|
919
756
|
{
|
|
920
757
|
"type": "list",
|
|
@@ -939,7 +776,7 @@
|
|
|
939
776
|
},
|
|
940
777
|
{
|
|
941
778
|
"title": "Action text truncation/ellipsis",
|
|
942
|
-
"description": "Action text truncation or ellipsis should be avoided at all costs.\nActions should be clear and down to the point.
|
|
779
|
+
"description": "Action text truncation or ellipsis should be avoided at all costs.\nActions should be clear and down to the point.
|
|
943
780
|
"content": [
|
|
944
781
|
{
|
|
945
782
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_UX_dosDonts_truncation.png"
|
|
@@ -359,7 +359,6 @@ declare class Button extends PureComponent<Props, ButtonState> {
|
|
|
359
359
|
};
|
|
360
360
|
componentDidUpdate(prevProps: Props): void;
|
|
361
361
|
onLayout: (event: LayoutChangeEvent) => void;
|
|
362
|
-
get isOutline(): boolean;
|
|
363
362
|
get isLink(): boolean | undefined;
|
|
364
363
|
get isFilled(): boolean;
|
|
365
364
|
get isIconButton(): boolean | "" | 0 | null | undefined;
|
|
@@ -46,13 +46,6 @@ class Button extends PureComponent {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
get isOutline() {
|
|
50
|
-
const {
|
|
51
|
-
outline,
|
|
52
|
-
outlineColor
|
|
53
|
-
} = this.props;
|
|
54
|
-
return Boolean(outline || outlineColor);
|
|
55
|
-
}
|
|
56
49
|
get isLink() {
|
|
57
50
|
const {
|
|
58
51
|
link,
|
|
@@ -61,7 +54,7 @@ class Button extends PureComponent {
|
|
|
61
54
|
return link || hyperlink;
|
|
62
55
|
}
|
|
63
56
|
get isFilled() {
|
|
64
|
-
return
|
|
57
|
+
return this.getBackgroundColor() !== 'transparent';
|
|
65
58
|
}
|
|
66
59
|
get isIconButton() {
|
|
67
60
|
const {
|
|
@@ -119,7 +112,7 @@ class Button extends PureComponent {
|
|
|
119
112
|
} else if (this.isIconButton) {
|
|
120
113
|
color = backgroundColor === 'transparent' ? undefined : Colors.$iconDefaultLight;
|
|
121
114
|
}
|
|
122
|
-
if (disabled &&
|
|
115
|
+
if (disabled && !this.isFilled) {
|
|
123
116
|
return Colors.$textDisabled;
|
|
124
117
|
}
|
|
125
118
|
color = propsColor || modifiersColor || color;
|
|
@@ -22,7 +22,7 @@ const DEFAULT_SELECTION_PROPS = {
|
|
|
22
22
|
borderWidth: 2,
|
|
23
23
|
color: Colors.$backgroundPrimaryHeavy,
|
|
24
24
|
indicatorSize: 20,
|
|
25
|
-
icon: Assets.icons.checkSmall,
|
|
25
|
+
icon: Assets.internal.icons.checkSmall,
|
|
26
26
|
iconColor: Colors.$iconDefaultLight,
|
|
27
27
|
hideIndicator: false
|
|
28
28
|
};
|
|
@@ -103,7 +103,10 @@ declare class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
103
103
|
accessible: boolean;
|
|
104
104
|
accessibilityLabel: string;
|
|
105
105
|
accessibilityRole: string;
|
|
106
|
-
|
|
106
|
+
accessibilityState: {
|
|
107
|
+
disabled: boolean | undefined;
|
|
108
|
+
checked: boolean | undefined;
|
|
109
|
+
};
|
|
107
110
|
};
|
|
108
111
|
animateCheckbox(value: CheckboxProps['value']): void;
|
|
109
112
|
setValidation(newValue: boolean): void;
|
|
@@ -120,7 +123,7 @@ declare class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
120
123
|
getAccessibleHitSlop(size: number): number;
|
|
121
124
|
renderCheckbox(): React.JSX.Element;
|
|
122
125
|
render(): React.JSX.Element;
|
|
123
|
-
validate: () =>
|
|
126
|
+
validate: () => boolean;
|
|
124
127
|
isValid: () => boolean | undefined;
|
|
125
128
|
}
|
|
126
129
|
declare const _default: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<any>>;
|
|
@@ -60,16 +60,18 @@ class Checkbox extends Component {
|
|
|
60
60
|
}
|
|
61
61
|
getAccessibilityProps() {
|
|
62
62
|
const {
|
|
63
|
-
accessibilityLabel,
|
|
63
|
+
accessibilityLabel = 'checkbox',
|
|
64
64
|
disabled,
|
|
65
65
|
value
|
|
66
66
|
} = this.props;
|
|
67
|
-
const checkedState = value ? 'checked' : 'unchecked';
|
|
68
67
|
return {
|
|
69
68
|
accessible: true,
|
|
70
|
-
accessibilityLabel
|
|
69
|
+
accessibilityLabel,
|
|
71
70
|
accessibilityRole: 'checkbox',
|
|
72
|
-
|
|
71
|
+
accessibilityState: {
|
|
72
|
+
disabled,
|
|
73
|
+
checked: value
|
|
74
|
+
}
|
|
73
75
|
};
|
|
74
76
|
}
|
|
75
77
|
animateCheckbox(value) {
|
|
@@ -167,7 +169,7 @@ class Checkbox extends Component {
|
|
|
167
169
|
}]}>
|
|
168
170
|
<AnimatedIcon style={[this.styles.selectedIcon, {
|
|
169
171
|
transform: this.animationStyle.transform
|
|
170
|
-
}]} source={indeterminate ? Assets.icons.minusSmall : selectedIcon || Assets.icons.checkSmall} testID={`${testID}.selected`} tintColor={this.getTintColor()} />
|
|
172
|
+
}]} source={indeterminate ? Assets.internal.icons.minusSmall : selectedIcon || Assets.internal.icons.checkSmall} testID={`${testID}.selected`} tintColor={this.getTintColor()} />
|
|
171
173
|
</Animated.View>}
|
|
172
174
|
</TouchableOpacity>
|
|
173
175
|
);
|
|
@@ -192,12 +194,13 @@ class Checkbox extends Component {
|
|
|
192
194
|
value,
|
|
193
195
|
required
|
|
194
196
|
} = this.props;
|
|
195
|
-
const
|
|
197
|
+
const isValid = !(required && !value);
|
|
196
198
|
this.validationState = true;
|
|
197
199
|
this.setState({
|
|
198
|
-
showError:
|
|
199
|
-
isValid
|
|
200
|
+
showError: !isValid,
|
|
201
|
+
isValid
|
|
200
202
|
});
|
|
203
|
+
return isValid;
|
|
201
204
|
};
|
|
202
205
|
isValid = () => {
|
|
203
206
|
return this.state.isValid;
|
|
@@ -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={
|
|
88
|
+
marginR-s2 marginB-s2 dismissIcon={Assets.internal.icons.xSmall} recorderTag={'mask'} {...defaultChipProps} {...chip.invalid ? invalidChipProps : undefined} {...chip} onPress={onChipPress} onDismiss={isMarkedForRemoval ? removeMarkedChip : undefined} />;
|
|
89
89
|
};
|
|
90
90
|
const chipList = useMemo(() => {
|
|
91
91
|
return <>
|
|
@@ -116,7 +116,7 @@ const ColorPickerDialog = props => {
|
|
|
116
116
|
<ColorPickerDialogSliders keyboardHeight={keyboardHeight} color={color} onSliderValueChange={updateColor} migrate={migrate} />
|
|
117
117
|
</Dialog>;
|
|
118
118
|
};
|
|
119
|
-
ColorPickerDialog.displayName = '
|
|
119
|
+
ColorPickerDialog.displayName = 'ColorPickerDialog';
|
|
120
120
|
export default asBaseComponent(ColorPickerDialog);
|
|
121
121
|
const styles = StyleSheet.create({
|
|
122
122
|
dialog: {
|
|
@@ -16,10 +16,10 @@ const ColorPickerDialogHeader = props => {
|
|
|
16
16
|
onDonePressed
|
|
17
17
|
} = props;
|
|
18
18
|
return <View row spread bg-$backgroundDefault paddingH-20 style={styles.header}>
|
|
19
|
-
<Button link iconSource={Assets.icons.x} iconStyle={{
|
|
19
|
+
<Button link iconSource={Assets.internal.icons.x} iconStyle={{
|
|
20
20
|
tintColor: Colors.$iconDefault
|
|
21
21
|
}} onPress={onDismiss} accessibilityLabel={_get(accessibilityLabels, 'dismissButton')} testID={`${testID}.dialog.cancel`} />
|
|
22
|
-
<Button color={doneButtonColor} disabled={!valid} link iconSource={Assets.icons.check} onPress={onDonePressed} accessibilityLabel={_get(accessibilityLabels, 'doneButton')} testID={`${testID}.dialog.done`} />
|
|
22
|
+
<Button color={doneButtonColor} disabled={!valid} link iconSource={Assets.internal.icons.check} onPress={onDonePressed} accessibilityLabel={_get(accessibilityLabels, 'doneButton')} testID={`${testID}.dialog.done`} />
|
|
23
23
|
</View>;
|
|
24
24
|
};
|
|
25
25
|
export default ColorPickerDialogHeader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import { StyleSheet, TextInput,
|
|
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 =
|
|
22
|
+
const fontScale = Constants.getFontScale();
|
|
23
23
|
const value = Colors.isTransparent(text) ? '000000' : text;
|
|
24
24
|
return <View style={[styles.preview, {
|
|
25
25
|
backgroundColor: hex
|
|
@@ -42,7 +42,7 @@ const ColorPicker = props => {
|
|
|
42
42
|
<View style={[styles.buttonContainer, {
|
|
43
43
|
backgroundColor
|
|
44
44
|
}]}>
|
|
45
|
-
<Button color={Colors.$textDefault} outlineColor={Colors.$textDefault} style={styles.button} round outline iconSource={Assets.icons.plusSmall} onPress={showDialog} testID={`${testID}-button`} accessibilityLabel={accessibilityLabels?.addButton} />
|
|
45
|
+
<Button color={Colors.$textDefault} outlineColor={Colors.$textDefault} style={styles.button} round outline iconSource={Assets.internal.icons.plusSmall} onPress={showDialog} testID={`${testID}-button`} accessibilityLabel={accessibilityLabels?.addButton} />
|
|
46
46
|
</View>
|
|
47
47
|
<ColorPickerDialog {...props} key={initialColor} visible={show} onDismiss={hideDialog} accessibilityLabels={{
|
|
48
48
|
dismissButton: accessibilityLabels?.dismissButton,
|
|
@@ -6,7 +6,6 @@ import { asBaseComponent, Constants } from "../../commons/new";
|
|
|
6
6
|
import View from "../view";
|
|
7
7
|
import TouchableOpacity from "../touchableOpacity";
|
|
8
8
|
import Image from "../image";
|
|
9
|
-
const transparentImage = require("./assets/transparentSwatch/TransparentSwatch.png");
|
|
10
9
|
const DEFAULT_SIZE = Constants.isTablet ? 44 : 36;
|
|
11
10
|
export const SWATCH_MARGIN = 12;
|
|
12
11
|
export const SWATCH_SIZE = DEFAULT_SIZE;
|
|
@@ -141,10 +140,10 @@ class ColorSwatch extends PureComponent {
|
|
|
141
140
|
height: size,
|
|
142
141
|
borderRadius: size / 2
|
|
143
142
|
}, style]} onLayout={this.onLayout} {...this.getAccessibilityInfo()}>
|
|
144
|
-
{Colors.isTransparent(this.color) && <Image source={
|
|
143
|
+
{Colors.isTransparent(this.color) && <Image source={Assets.internal.images.transparentSwatch} style={this.styles.transparentImage} resizeMode={'cover'} />}
|
|
145
144
|
{unavailable ? <View style={[this.styles.unavailable, {
|
|
146
145
|
backgroundColor: tintColor
|
|
147
|
-
}]} /> : <Animated.Image source={Assets.icons.check} style={{
|
|
146
|
+
}]} /> : <Animated.Image source={Assets.internal.icons.check} style={{
|
|
148
147
|
tintColor,
|
|
149
148
|
opacity: isSelected,
|
|
150
149
|
transform: [{
|
|
@@ -137,10 +137,10 @@ const DateTimePicker = forwardRef((props, ref) => {
|
|
|
137
137
|
}, [onDonePressed, toggleExpandableOverlay]);
|
|
138
138
|
const renderHeader = () => {
|
|
139
139
|
return <View row spread bg-$backgroundDefault backgroundColor={backgroundColor} paddingH-20 style={[styles.header, headerStyle]} testID={`${testID}.header`}>
|
|
140
|
-
<Button link iconSource={Assets.icons.x} iconStyle={{
|
|
140
|
+
<Button link iconSource={Assets.internal.icons.x} iconStyle={{
|
|
141
141
|
tintColor: Colors.$iconDefault
|
|
142
142
|
}} testID={`${testID}.cancel`} {...cancelButtonProps} onPress={toggleExpandableOverlay} />
|
|
143
|
-
<Button link iconSource={Assets.icons.check} testID={`${testID}.done`} {...confirmButtonProps} onPress={onDonePressed} />
|
|
143
|
+
<Button link iconSource={Assets.internal.icons.check} testID={`${testID}.done`} {...confirmButtonProps} onPress={onDonePressed} />
|
|
144
144
|
</View>;
|
|
145
145
|
};
|
|
146
146
|
const renderDateTimePicker = useCallback(() => {
|