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
|
@@ -159,13 +159,37 @@
|
|
|
159
159
|
],
|
|
160
160
|
"items": [
|
|
161
161
|
{
|
|
162
|
-
"title": "Left"
|
|
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
|
+
]
|
|
163
171
|
},
|
|
164
172
|
{
|
|
165
|
-
"title": "Center"
|
|
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
|
+
]
|
|
166
182
|
},
|
|
167
183
|
{
|
|
168
|
-
"title": "Right"
|
|
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
|
+
]
|
|
169
193
|
}
|
|
170
194
|
],
|
|
171
195
|
"title": "Alignment",
|
|
@@ -179,10 +203,20 @@
|
|
|
179
203
|
],
|
|
180
204
|
"items": [
|
|
181
205
|
{
|
|
182
|
-
"title": "None"
|
|
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
|
+
]
|
|
183
212
|
},
|
|
184
213
|
{
|
|
185
|
-
"title": "Icon"
|
|
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
|
+
]
|
|
186
220
|
}
|
|
187
221
|
],
|
|
188
222
|
"title": "Accessories"
|
|
@@ -6,6 +6,7 @@ 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";
|
|
9
10
|
import { HintPositions, HintProps, TargetAlignments } from "./types";
|
|
10
11
|
import useHintVisibility from "./hooks/useHintVisibility";
|
|
11
12
|
import useHintLayout from "./hooks/useHintLayout";
|
|
@@ -14,8 +15,6 @@ import useHintPosition from "./hooks/useHintPosition";
|
|
|
14
15
|
import HintMockChildren from "./HintMockChildren";
|
|
15
16
|
import HintAnchor from "./HintAnchor";
|
|
16
17
|
import HintBubble from "./HintBubble";
|
|
17
|
-
const sideTip = require("./assets/hintTipSide.png");
|
|
18
|
-
const middleTip = require("./assets/hintTipMiddle.png");
|
|
19
18
|
const DEFAULT_COLOR = Colors.$backgroundPrimaryHeavy;
|
|
20
19
|
const DEFAULT_HINT_OFFSET = Spacings.s4;
|
|
21
20
|
const DEFAULT_EDGE_MARGINS = Spacings.s5;
|
|
@@ -125,7 +124,7 @@ const Hint = props => {
|
|
|
125
124
|
}
|
|
126
125
|
};
|
|
127
126
|
const renderHintTip = () => {
|
|
128
|
-
const source = useSideTip ?
|
|
127
|
+
const source = useSideTip ? Assets.internal.images.hintTipSide : Assets.internal.images.hintTipMiddle;
|
|
129
128
|
const flipVertically = position === HintPositions.TOP;
|
|
130
129
|
const flipHorizontally = targetAlignmentOnScreen === TargetAlignments.RIGHT;
|
|
131
130
|
const flipStyle = {
|
|
@@ -25,7 +25,10 @@ export type IconProps = Omit<RNImageProps, 'source' | 'tintColor'> & MarginModif
|
|
|
25
25
|
/**
|
|
26
26
|
* the icon size
|
|
27
27
|
*/
|
|
28
|
-
size?: number
|
|
28
|
+
size?: number | {
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
};
|
|
29
32
|
/**
|
|
30
33
|
* whether the icon should flip horizontally on RTL
|
|
31
34
|
*/
|
|
@@ -52,7 +55,10 @@ declare const _default: React.ForwardRefExoticComponent<Omit<RNImageProps, "sour
|
|
|
52
55
|
/**
|
|
53
56
|
* the icon size
|
|
54
57
|
*/
|
|
55
|
-
size?: number |
|
|
58
|
+
size?: number | {
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
} | undefined;
|
|
56
62
|
/**
|
|
57
63
|
* whether the icon should flip horizontally on RTL
|
|
58
64
|
*/
|
|
@@ -78,7 +84,10 @@ declare const _default: React.ForwardRefExoticComponent<Omit<RNImageProps, "sour
|
|
|
78
84
|
/**
|
|
79
85
|
* the icon size
|
|
80
86
|
*/
|
|
81
|
-
size?: number |
|
|
87
|
+
size?: number | {
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
} | undefined;
|
|
82
91
|
/**
|
|
83
92
|
* whether the icon should flip horizontally on RTL
|
|
84
93
|
*/
|
|
@@ -12,10 +12,9 @@ import SvgImage from "../svgImage";
|
|
|
12
12
|
* @extendsLink: https://reactnative.dev/docs/image
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
const DEFAULT_WEB_ICON_SIZE = 16;
|
|
16
15
|
const Icon = forwardRef((props, ref) => {
|
|
17
16
|
const {
|
|
18
|
-
size
|
|
17
|
+
size,
|
|
19
18
|
tintColor,
|
|
20
19
|
style,
|
|
21
20
|
supportRTL,
|
|
@@ -30,10 +29,6 @@ const Icon = forwardRef((props, ref) => {
|
|
|
30
29
|
const {
|
|
31
30
|
margins
|
|
32
31
|
} = modifiers;
|
|
33
|
-
const iconSize = size ? {
|
|
34
|
-
width: size,
|
|
35
|
-
height: size
|
|
36
|
-
} : undefined;
|
|
37
32
|
const shouldFlipRTL = supportRTL && Constants.isRTL;
|
|
38
33
|
const getBadgeStyling = () => {
|
|
39
34
|
const containerStyle = badgeProps?.containerStyle;
|
|
@@ -46,15 +41,29 @@ const Icon = forwardRef((props, ref) => {
|
|
|
46
41
|
badgePosition.top = position;
|
|
47
42
|
return [badgePosition, containerStyle];
|
|
48
43
|
};
|
|
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]);
|
|
49
56
|
const iconSource = useMemo(() => {
|
|
50
57
|
if (!isUndefined(assetName)) {
|
|
51
58
|
return getAsset(assetName, assetGroup);
|
|
52
59
|
}
|
|
53
60
|
return source;
|
|
54
61
|
}, [source, assetGroup, assetName]);
|
|
55
|
-
const renderImage = () =>
|
|
56
|
-
tintColor
|
|
57
|
-
|
|
62
|
+
const renderImage = () => {
|
|
63
|
+
return <Image accessible={false} accessibilityRole={'image'} fsTagName={recorderTag} {...others} ref={ref} source={iconSource} style={[margins, iconSize, shouldFlipRTL && styles.rtlFlipped, !!tintColor && {
|
|
64
|
+
tintColor
|
|
65
|
+
}, style]} />;
|
|
66
|
+
};
|
|
58
67
|
const renderSvg = () => <SvgImage fsTagName={recorderTag} data={source} {...iconSize} {...props} />;
|
|
59
68
|
if (typeof source === 'string' && isBase64ImageContent(source) && Constants.isWeb) {
|
|
60
69
|
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';
|
|
4
5
|
import { RecorderProps } from '../../typings/recorderTypes';
|
|
5
6
|
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.icons.x,
|
|
24
|
+
cancelIcon: Assets.internal.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.icons.x"
|
|
32
|
+
"default": "Assets.internal.icons.x"
|
|
33
33
|
},
|
|
34
34
|
{"name": "onCancel", "type": "(props?: any) => void", "description": "Cancel action callback"},
|
|
35
35
|
{
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Modal",
|
|
3
|
+
"category": "overlays",
|
|
4
|
+
"description": "Component that present content on top of the invoking screen",
|
|
5
|
+
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ModalScreen.tsx",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "enableModalBlur",
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"description": "Blurs the modal background when transparent (iOS only)"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "blurView",
|
|
14
|
+
"type": "JSX.Element",
|
|
15
|
+
"description": "A custom view to use as a BlueView instead of the default one"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "onBackgroundPress",
|
|
19
|
+
"type": "function",
|
|
20
|
+
"description": "Allow dismissing a modal when clicking on its background"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "overlayBackgroundColor",
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The background color of the overlay"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "useGestureHandlerRootView",
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Should add a GestureHandlerRootView"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "useKeyboardAvoidingView",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"description": "Should add a KeyboardAvoidingView (iOS only)"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "keyboardAvoidingViewProps",
|
|
39
|
+
"type": "object",
|
|
40
|
+
"description": "Send additional props to the KeyboardAvoidingView (iOS only)"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"snippet": [
|
|
44
|
+
"<Modal",
|
|
45
|
+
" visible={visible}",
|
|
46
|
+
" onBackgroundPress={() => setVisible(false)}",
|
|
47
|
+
" overlayBackgroundColor=\"rgba(0, 0, 0, 0.7)\"",
|
|
48
|
+
">",
|
|
49
|
+
" <View>",
|
|
50
|
+
" <Text>Modal Content</Text>",
|
|
51
|
+
" </View>",
|
|
52
|
+
"</Modal>"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -3,9 +3,7 @@ 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
|
-
|
|
7
|
-
const gradientImageMed = require("./assets/GradientOverlayMedium.png");
|
|
8
|
-
const gradientImageHigh = require("./assets/GradientOverlayHigh.png");
|
|
6
|
+
import Assets from "../../assets";
|
|
9
7
|
const OVERLY_TYPES = {
|
|
10
8
|
VERTICAL: 'vertical',
|
|
11
9
|
TOP: 'top',
|
|
@@ -77,11 +75,11 @@ class Overlay extends PureComponent {
|
|
|
77
75
|
getImageSource = (type, intensity) => {
|
|
78
76
|
if (type !== OVERLY_TYPES.SOLID) {
|
|
79
77
|
if (intensity === OverlayIntensityType.MEDIUM) {
|
|
80
|
-
return
|
|
78
|
+
return Assets.internal.images.gradientOverlayMedium;
|
|
81
79
|
} else if (intensity === OverlayIntensityType.HIGH) {
|
|
82
|
-
return
|
|
80
|
+
return Assets.internal.images.gradientOverlayHigh;
|
|
83
81
|
} else {
|
|
84
|
-
return
|
|
82
|
+
return Assets.internal.images.gradientOverlayLow;
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
85
|
};
|
|
@@ -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 = 'IGNORE';
|
|
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 = 'IGNORE';
|
|
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 = 'IGNORE';
|
|
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 = 'IGNORE';
|
|
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.icons.search} />
|
|
50
|
+
<Icon style={styles.searchIcon} tintColor={Colors.$iconDefault} source={searchStyle.icon || Assets.internal.icons.search} />
|
|
51
51
|
<TextInput testID={testID}
|
|
52
52
|
// ref={r => (this.search = r)}
|
|
53
53
|
style={[styles.searchInput, {
|