react-native-ui-lib 7.39.0-snapshot.6728 → 7.39.1
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 +2 -4
- package/scripts/docs/buildDocsCommon.js +83 -16
- package/src/assets/icons/index.js +26 -0
- package/src/assets/images/index.js +5 -0
- package/src/assets/index.js +5 -2
- package/src/commons/Constants.d.ts +0 -1
- package/src/commons/Constants.js +2 -4
- package/src/components/avatar/index.d.ts +19 -8
- package/src/components/avatar/index.js +2 -4
- package/src/components/button/button.api.json +85 -25
- package/src/components/card/index.js +1 -1
- package/src/components/checkbox/index.d.ts +1 -4
- package/src/components/checkbox/index.js +5 -7
- 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 +3 -2
- package/src/components/dateTimePicker/index.js +2 -2
- package/src/components/hint/hint.api.json +5 -39
- package/src/components/hint/index.js +3 -2
- package/src/components/icon/index.d.ts +3 -12
- package/src/components/icon/index.js +9 -18
- 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/overlay/index.js +6 -4
- 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 +0 -1
- package/src/components/picker/PickerItem.js +1 -1
- package/src/components/picker/PickerItemsList.js +1 -1
- package/src/components/picker/api/picker.api.json +5 -387
- package/src/components/picker/helpers/useFieldType.js +2 -2
- package/src/components/scrollBar/index.js +3 -3
- package/src/components/sortableList/SortableList.api.json +7 -7
- 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/components/stepper/index.js +8 -3
- package/src/components/tabController/apis/pageCarousel.api.json +5 -8
- package/src/components/textField/ClearButton.js +1 -1
- package/src/components/timeline/timeline.api.json +106 -57
- package/src/components/toast/index.js +1 -1
- package/src/components/wizard/WizardStates.js +4 -3
- package/src/hooks/useScrollTo/index.js +4 -9
- package/src/incubator/dialog/useDialogContent.js +1 -1
- package/src/incubator/expandableOverlay/index.js +0 -1
- package/src/incubator/panView/index.js +1 -1
- package/src/incubator/slider/Thumb.js +1 -8
- package/src/incubator/toast/toast.api.json +7 -57
- package/src/assets/internal/icons/index.js +0 -50
- package/src/assets/internal/icons/index.web.js +0 -50
- package/src/assets/internal/images/index.js +0 -26
- package/src/assets/internal/images/index.web.js +0 -26
- package/src/assets/internal/index.d.ts +0 -4
- package/src/assets/internal/index.js +0 -8
- package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.api.json +0 -40
- package/src/components/modal/modal.api.json +0 -54
- /package/src/assets/{internal/icons/checkSmall.png → icons/check-small.png} +0 -0
- /package/src/assets/{internal/icons/checkSmall@1.5x.png → icons/check-small@1.5x.png} +0 -0
- /package/src/assets/{internal/icons/checkSmall@2x.png → icons/check-small@2x.png} +0 -0
- /package/src/assets/{internal/icons/checkSmall@3x.png → icons/check-small@3x.png} +0 -0
- /package/src/assets/{internal/icons/checkSmall@4x.png → icons/check-small@4x.png} +0 -0
- /package/src/assets/{internal/icons → icons}/check.png +0 -0
- /package/src/assets/{internal/icons → icons}/check@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/check@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/check@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/check@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/minusSmall@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/plusSmall@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/search.png +0 -0
- /package/src/assets/{internal/icons → icons}/search@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/search@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/search@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/search@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/x.png +0 -0
- /package/src/assets/{internal/icons → icons}/x@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/x@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xFlat@4x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium@1.5x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium@2x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium@3x.png +0 -0
- /package/src/assets/{internal/icons → icons}/xMedium@4x.png +0 -0
- /package/src/assets/{internal/images → images}/gradient.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/chipsInput/assets}/xSmall@4x.png +0 -0
- /package/src/{assets/internal/images/transparentSwatch.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch.png} +0 -0
- /package/src/{assets/internal/images/transparentSwatch@1.5x.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch@1.5x.png} +0 -0
- /package/src/{assets/internal/images/transparentSwatch@2x.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch@2x.png} +0 -0
- /package/src/{assets/internal/images/transparentSwatch@3x.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch@3x.png} +0 -0
- /package/src/{assets/internal/images/transparentSwatch@4x.png → components/colorSwatch/assets/transparentSwatch/TransparentSwatch@4x.png} +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle@1.5x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle@2x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle@3x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipMiddle@4x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide@1.5x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide@2x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide@3x.png +0 -0
- /package/src/{assets/internal/images → components/hint/assets}/hintTipSide@4x.png +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh.png → components/overlay/assets/GradientOverlayHigh.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh@1.5x.png → components/overlay/assets/GradientOverlayHigh@1.5x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh@2x.png → components/overlay/assets/GradientOverlayHigh@2x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh@3x.png → components/overlay/assets/GradientOverlayHigh@3x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayHigh@4x.png → components/overlay/assets/GradientOverlayHigh@4x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow.png → components/overlay/assets/GradientOverlayLow.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow@1.5x.png → components/overlay/assets/GradientOverlayLow@1.5x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow@2x.png → components/overlay/assets/GradientOverlayLow@2x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow@3x.png → components/overlay/assets/GradientOverlayLow@3x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayLow@4x.png → components/overlay/assets/GradientOverlayLow@4x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium.png → components/overlay/assets/GradientOverlayMedium.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium@1.5x.png → components/overlay/assets/GradientOverlayMedium@1.5x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium@2x.png → components/overlay/assets/GradientOverlayMedium@2x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium@3x.png → components/overlay/assets/GradientOverlayMedium@3x.png} +0 -0
- /package/src/{assets/internal/images/gradientOverlayMedium@4x.png → components/overlay/assets/GradientOverlayMedium@4x.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown.png → components/picker/assets/dropdown.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown@1.5x.png → components/picker/assets/dropdown@1.5x.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown@2x.png → components/picker/assets/dropdown@2x.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown@3x.png → components/picker/assets/dropdown@3x.png} +0 -0
- /package/src/{assets/internal/icons/chevronDown@4x.png → components/picker/assets/dropdown@4x.png} +0 -0
- /package/src/{assets/internal/images → components/scrollBar/assets}/gradientOverlay.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline@2x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline@3x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutline@4x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/minusOutlineSmall@4x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline@2x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline@3x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutline@4x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/stepper/assets}/plusOutlineSmall@4x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/checkMarkSmall@4x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall@1.5x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall@2x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall@3x.png +0 -0
- /package/src/{assets/internal/icons → components/wizard/assets}/exclamationSmall@4x.png +0 -0
|
@@ -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.
|
|
19
|
+
<Button link iconSource={Assets.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.
|
|
22
|
+
<Button color={doneButtonColor} disabled={!valid} link iconSource={Assets.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, I18nManager } from 'react-native';
|
|
2
|
+
import { StyleSheet, TextInput, PixelRatio, 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 = PixelRatio.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.
|
|
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} />
|
|
46
46
|
</View>
|
|
47
47
|
<ColorPickerDialog {...props} key={initialColor} visible={show} onDismiss={hideDialog} accessibilityLabels={{
|
|
48
48
|
dismissButton: accessibilityLabels?.dismissButton,
|
|
@@ -6,6 +6,7 @@ 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");
|
|
9
10
|
const DEFAULT_SIZE = Constants.isTablet ? 44 : 36;
|
|
10
11
|
export const SWATCH_MARGIN = 12;
|
|
11
12
|
export const SWATCH_SIZE = DEFAULT_SIZE;
|
|
@@ -140,10 +141,10 @@ class ColorSwatch extends PureComponent {
|
|
|
140
141
|
height: size,
|
|
141
142
|
borderRadius: size / 2
|
|
142
143
|
}, style]} onLayout={this.onLayout} {...this.getAccessibilityInfo()}>
|
|
143
|
-
{Colors.isTransparent(this.color) && <Image source={
|
|
144
|
+
{Colors.isTransparent(this.color) && <Image source={transparentImage} style={this.styles.transparentImage} resizeMode={'cover'} />}
|
|
144
145
|
{unavailable ? <View style={[this.styles.unavailable, {
|
|
145
146
|
backgroundColor: tintColor
|
|
146
|
-
}]} /> : <Animated.Image source={Assets.
|
|
147
|
+
}]} /> : <Animated.Image source={Assets.icons.check} style={{
|
|
147
148
|
tintColor,
|
|
148
149
|
opacity: isSelected,
|
|
149
150
|
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.
|
|
140
|
+
<Button link iconSource={Assets.icons.x} iconStyle={{
|
|
141
141
|
tintColor: Colors.$iconDefault
|
|
142
142
|
}} testID={`${testID}.cancel`} {...cancelButtonProps} onPress={toggleExpandableOverlay} />
|
|
143
|
-
<Button link iconSource={Assets.
|
|
143
|
+
<Button link iconSource={Assets.icons.check} testID={`${testID}.done`} {...confirmButtonProps} onPress={onDonePressed} />
|
|
144
144
|
</View>;
|
|
145
145
|
};
|
|
146
146
|
const renderDateTimePicker = useCallback(() => {
|
|
@@ -159,37 +159,13 @@
|
|
|
159
159
|
],
|
|
160
160
|
"items": [
|
|
161
161
|
{
|
|
162
|
-
"title": "Left"
|
|
163
|
-
"content": [
|
|
164
|
-
{
|
|
165
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_left_top.png"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_left_bottom.png"
|
|
169
|
-
}
|
|
170
|
-
]
|
|
162
|
+
"title": "Left"
|
|
171
163
|
},
|
|
172
164
|
{
|
|
173
|
-
"title": "Center"
|
|
174
|
-
"content": [
|
|
175
|
-
{
|
|
176
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_center_top.png"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_center_bottom.png"
|
|
180
|
-
}
|
|
181
|
-
]
|
|
165
|
+
"title": "Center"
|
|
182
166
|
},
|
|
183
167
|
{
|
|
184
|
-
"title": "Right"
|
|
185
|
-
"content": [
|
|
186
|
-
{
|
|
187
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_right_top.png"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_alignment_right_bottom.png"
|
|
191
|
-
}
|
|
192
|
-
]
|
|
168
|
+
"title": "Right"
|
|
193
169
|
}
|
|
194
170
|
],
|
|
195
171
|
"title": "Alignment",
|
|
@@ -203,20 +179,10 @@
|
|
|
203
179
|
],
|
|
204
180
|
"items": [
|
|
205
181
|
{
|
|
206
|
-
"title": "None"
|
|
207
|
-
"content": [
|
|
208
|
-
{
|
|
209
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_accessories_none.png"
|
|
210
|
-
}
|
|
211
|
-
]
|
|
182
|
+
"title": "None"
|
|
212
183
|
},
|
|
213
184
|
{
|
|
214
|
-
"title": "Icon"
|
|
215
|
-
"content": [
|
|
216
|
-
{
|
|
217
|
-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Hint/hint_accessories_icon.png"
|
|
218
|
-
}
|
|
219
|
-
]
|
|
185
|
+
"title": "Icon"
|
|
220
186
|
}
|
|
221
187
|
],
|
|
222
188
|
"title": "Accessories"
|
|
@@ -6,7 +6,6 @@ import View from "../view";
|
|
|
6
6
|
import Image from "../image";
|
|
7
7
|
import Modal from "../modal";
|
|
8
8
|
import TouchableOpacity from "../touchableOpacity";
|
|
9
|
-
import Assets from "../../assets";
|
|
10
9
|
import { HintPositions, HintProps, TargetAlignments } from "./types";
|
|
11
10
|
import useHintVisibility from "./hooks/useHintVisibility";
|
|
12
11
|
import useHintLayout from "./hooks/useHintLayout";
|
|
@@ -15,6 +14,8 @@ import useHintPosition from "./hooks/useHintPosition";
|
|
|
15
14
|
import HintMockChildren from "./HintMockChildren";
|
|
16
15
|
import HintAnchor from "./HintAnchor";
|
|
17
16
|
import HintBubble from "./HintBubble";
|
|
17
|
+
const sideTip = require("./assets/hintTipSide.png");
|
|
18
|
+
const middleTip = require("./assets/hintTipMiddle.png");
|
|
18
19
|
const DEFAULT_COLOR = Colors.$backgroundPrimaryHeavy;
|
|
19
20
|
const DEFAULT_HINT_OFFSET = Spacings.s4;
|
|
20
21
|
const DEFAULT_EDGE_MARGINS = Spacings.s5;
|
|
@@ -124,7 +125,7 @@ const Hint = props => {
|
|
|
124
125
|
}
|
|
125
126
|
};
|
|
126
127
|
const renderHintTip = () => {
|
|
127
|
-
const source = useSideTip ?
|
|
128
|
+
const source = useSideTip ? sideTip : middleTip;
|
|
128
129
|
const flipVertically = position === HintPositions.TOP;
|
|
129
130
|
const flipHorizontally = targetAlignmentOnScreen === TargetAlignments.RIGHT;
|
|
130
131
|
const flipStyle = {
|
|
@@ -25,10 +25,7 @@ export type IconProps = Omit<RNImageProps, 'source' | 'tintColor'> & MarginModif
|
|
|
25
25
|
/**
|
|
26
26
|
* the icon size
|
|
27
27
|
*/
|
|
28
|
-
size?: number
|
|
29
|
-
width: number;
|
|
30
|
-
height: number;
|
|
31
|
-
};
|
|
28
|
+
size?: number;
|
|
32
29
|
/**
|
|
33
30
|
* whether the icon should flip horizontally on RTL
|
|
34
31
|
*/
|
|
@@ -55,10 +52,7 @@ declare const _default: React.ForwardRefExoticComponent<Omit<RNImageProps, "sour
|
|
|
55
52
|
/**
|
|
56
53
|
* the icon size
|
|
57
54
|
*/
|
|
58
|
-
size?: number |
|
|
59
|
-
width: number;
|
|
60
|
-
height: number;
|
|
61
|
-
} | undefined;
|
|
55
|
+
size?: number | undefined;
|
|
62
56
|
/**
|
|
63
57
|
* whether the icon should flip horizontally on RTL
|
|
64
58
|
*/
|
|
@@ -84,10 +78,7 @@ declare const _default: React.ForwardRefExoticComponent<Omit<RNImageProps, "sour
|
|
|
84
78
|
/**
|
|
85
79
|
* the icon size
|
|
86
80
|
*/
|
|
87
|
-
size?: number |
|
|
88
|
-
width: number;
|
|
89
|
-
height: number;
|
|
90
|
-
} | undefined;
|
|
81
|
+
size?: number | undefined;
|
|
91
82
|
/**
|
|
92
83
|
* whether the icon should flip horizontally on RTL
|
|
93
84
|
*/
|
|
@@ -12,9 +12,10 @@ import SvgImage from "../svgImage";
|
|
|
12
12
|
* @extendsLink: https://reactnative.dev/docs/image
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
const DEFAULT_WEB_ICON_SIZE = 16;
|
|
15
16
|
const Icon = forwardRef((props, ref) => {
|
|
16
17
|
const {
|
|
17
|
-
size,
|
|
18
|
+
size = Constants.isWeb ? DEFAULT_WEB_ICON_SIZE : undefined,
|
|
18
19
|
tintColor,
|
|
19
20
|
style,
|
|
20
21
|
supportRTL,
|
|
@@ -29,6 +30,10 @@ const Icon = forwardRef((props, ref) => {
|
|
|
29
30
|
const {
|
|
30
31
|
margins
|
|
31
32
|
} = modifiers;
|
|
33
|
+
const iconSize = size ? {
|
|
34
|
+
width: size,
|
|
35
|
+
height: size
|
|
36
|
+
} : undefined;
|
|
32
37
|
const shouldFlipRTL = supportRTL && Constants.isRTL;
|
|
33
38
|
const getBadgeStyling = () => {
|
|
34
39
|
const containerStyle = badgeProps?.containerStyle;
|
|
@@ -41,29 +46,15 @@ const Icon = forwardRef((props, ref) => {
|
|
|
41
46
|
badgePosition.top = position;
|
|
42
47
|
return [badgePosition, containerStyle];
|
|
43
48
|
};
|
|
44
|
-
const iconSize = useMemo(() => {
|
|
45
|
-
if (typeof size === 'number') {
|
|
46
|
-
return {
|
|
47
|
-
width: size,
|
|
48
|
-
height: size
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
if (typeof size === 'object') {
|
|
52
|
-
return size;
|
|
53
|
-
}
|
|
54
|
-
return undefined;
|
|
55
|
-
}, [size]);
|
|
56
49
|
const iconSource = useMemo(() => {
|
|
57
50
|
if (!isUndefined(assetName)) {
|
|
58
51
|
return getAsset(assetName, assetGroup);
|
|
59
52
|
}
|
|
60
53
|
return source;
|
|
61
54
|
}, [source, assetGroup, assetName]);
|
|
62
|
-
const renderImage = () => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, style]} />;
|
|
66
|
-
};
|
|
55
|
+
const renderImage = () => <Image accessible={false} accessibilityRole={'image'} fsTagName={recorderTag} {...others} ref={ref} source={iconSource} style={[margins, iconSize, shouldFlipRTL && styles.rtlFlipped, !!tintColor && {
|
|
56
|
+
tintColor
|
|
57
|
+
}, style]} />;
|
|
67
58
|
const renderSvg = () => <SvgImage fsTagName={recorderTag} data={source} {...iconSize} {...props} />;
|
|
68
59
|
if (typeof source === 'string' && isBase64ImageContent(source) && Constants.isWeb) {
|
|
69
60
|
return renderImage();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import { Image as RNImage, ImageProps as RNImageProps, ImageBackgroundProps, NativeSyntheticEvent, ImageErrorEventData } from 'react-native';
|
|
3
3
|
import { ForwardRefInjectedProps, BaseComponentInjectedProps, MarginModifiers } from '../../commons/new';
|
|
4
|
-
import { ComponentStatics } from '../../typings/common';
|
|
5
4
|
import { RecorderProps } from '../../typings/recorderTypes';
|
|
6
5
|
import { OverlayTypeType, OverlayIntensityType } from '../overlay';
|
|
6
|
+
import { ComponentStatics } from 'src/typings/common';
|
|
7
7
|
export type ImageSourceType = string | RNImageProps['source'];
|
|
8
8
|
export type ImageProps = Omit<RNImageProps, 'source'> & Pick<ImageBackgroundProps, 'imageStyle'> & MarginModifiers & RecorderProps & {
|
|
9
9
|
/**
|
|
@@ -21,7 +21,7 @@ class TopBar extends Component {
|
|
|
21
21
|
static displayName = 'Modal.TopBar';
|
|
22
22
|
static defaultProps = {
|
|
23
23
|
doneLabel: 'Save',
|
|
24
|
-
cancelIcon: Assets.
|
|
24
|
+
cancelIcon: Assets.icons.x,
|
|
25
25
|
doneButtonProps: {},
|
|
26
26
|
cancelButtonProps: {},
|
|
27
27
|
includeStatusBar: Constants.isIOS
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"name": "cancelIcon",
|
|
30
30
|
"type": "ImageSource",
|
|
31
31
|
"description": "Cancel action icon",
|
|
32
|
-
"default": "Assets.
|
|
32
|
+
"default": "Assets.icons.x"
|
|
33
33
|
},
|
|
34
34
|
{"name": "onCancel", "type": "(props?: any) => void", "description": "Cancel action callback"},
|
|
35
35
|
{
|
|
@@ -3,7 +3,9 @@ import React, { PureComponent } from 'react';
|
|
|
3
3
|
import { StyleSheet, Image } from 'react-native';
|
|
4
4
|
import { Colors } from "../../style";
|
|
5
5
|
import View from "../view";
|
|
6
|
-
|
|
6
|
+
const gradientImageLow = require("./assets/GradientOverlayLow.png");
|
|
7
|
+
const gradientImageMed = require("./assets/GradientOverlayMedium.png");
|
|
8
|
+
const gradientImageHigh = require("./assets/GradientOverlayHigh.png");
|
|
7
9
|
const OVERLY_TYPES = {
|
|
8
10
|
VERTICAL: 'vertical',
|
|
9
11
|
TOP: 'top',
|
|
@@ -75,11 +77,11 @@ class Overlay extends PureComponent {
|
|
|
75
77
|
getImageSource = (type, intensity) => {
|
|
76
78
|
if (type !== OVERLY_TYPES.SOLID) {
|
|
77
79
|
if (intensity === OverlayIntensityType.MEDIUM) {
|
|
78
|
-
return
|
|
80
|
+
return gradientImageMed;
|
|
79
81
|
} else if (intensity === OverlayIntensityType.HIGH) {
|
|
80
|
-
return
|
|
82
|
+
return gradientImageHigh;
|
|
81
83
|
} else {
|
|
82
|
-
return
|
|
84
|
+
return gradientImageLow;
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
};
|
|
@@ -23,7 +23,7 @@ const MAXIMUM_DRAGS_AFTER_SWIPE = 2;
|
|
|
23
23
|
* @gif: https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/PanDismissibleView/PanDismissibleView.gif?raw=true
|
|
24
24
|
*/
|
|
25
25
|
class PanDismissibleView extends PureComponent {
|
|
26
|
-
static displayName = '
|
|
26
|
+
static displayName = 'PanDismissibleView';
|
|
27
27
|
static defaultProps = {
|
|
28
28
|
directions: DEFAULT_DIRECTIONS,
|
|
29
29
|
animationOptions: DEFAULT_ANIMATION_OPTIONS,
|
|
@@ -13,7 +13,7 @@ const BOUNCINESS = 6;
|
|
|
13
13
|
* @description: PanGestureView component for drag and swipe gestures (supports only vertical gestures at the moment)
|
|
14
14
|
*/
|
|
15
15
|
class PanGestureView extends Component {
|
|
16
|
-
static displayName = '
|
|
16
|
+
static displayName = 'PanGestureView';
|
|
17
17
|
static defaultProps = {
|
|
18
18
|
direction: GestureDirections.DOWN
|
|
19
19
|
};
|
|
@@ -14,7 +14,7 @@ const DEFAULT_SWIPE_VELOCITY = 1.8;
|
|
|
14
14
|
* @gif: https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/PanListenerView/PanListenerView.gif?raw=true
|
|
15
15
|
*/
|
|
16
16
|
class PanListenerView extends PureComponent {
|
|
17
|
-
static displayName = '
|
|
17
|
+
static displayName = 'PanListenerView';
|
|
18
18
|
static defaultProps = {
|
|
19
19
|
directions: DEFAULT_DIRECTIONS,
|
|
20
20
|
panSensitivity: DEFAULT_PAN_SENSITIVITY,
|
|
@@ -9,7 +9,7 @@ import asPanViewConsumer from "./asPanViewConsumer";
|
|
|
9
9
|
* @gif: https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/PanResponderView/PanResponderView.gif?raw=true
|
|
10
10
|
*/
|
|
11
11
|
class PanResponderView extends PureComponent {
|
|
12
|
-
static displayName = '
|
|
12
|
+
static displayName = 'PanResponderView';
|
|
13
13
|
static defaultProps = {
|
|
14
14
|
isAnimated: false
|
|
15
15
|
};
|
|
@@ -47,7 +47,7 @@ const PickerItemsList = props => {
|
|
|
47
47
|
return renderCustomSearch(props);
|
|
48
48
|
}
|
|
49
49
|
return <View style={styles.searchInputContainer}>
|
|
50
|
-
<Icon style={styles.searchIcon} tintColor={Colors.$iconDefault} source={searchStyle.icon || Assets.
|
|
50
|
+
<Icon style={styles.searchIcon} tintColor={Colors.$iconDefault} source={searchStyle.icon || Assets.icons.search} />
|
|
51
51
|
<TextInput testID={testID}
|
|
52
52
|
// ref={r => (this.search = r)}
|
|
53
53
|
style={[styles.searchInput, {
|