@shoutem/ui 4.7.0 → 4.8.0
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/LICENSE +1 -1
- package/README.md +1 -2
- package/components/ActionSheet/ActionSheet.js +6 -6
- package/components/DateTimePicker.js +2 -2
- package/components/DropDownMenu/DropDownMenu.js +1 -1
- package/components/DropDownMenu/DropDownModal.js +2 -2
- package/components/EmptyListImage.js +9 -5
- package/components/FormGroup.js +0 -1
- package/components/GridRow.js +2 -2
- package/components/HorizontalPager/HorizontalPager.js +2 -2
- package/components/Icon/services/icons.js +0 -2
- package/components/Icon/services/index.js +1 -1
- package/components/Image.js +1 -1
- package/components/ImageBackground.js +1 -1
- package/components/ImageGallery/ImageGallery.android.js +1 -0
- package/components/ImageGallery/ImageGallery.ios.js +2 -1
- package/components/ImageGalleryOverlay.js +1 -1
- package/components/ImagePreview.js +2 -2
- package/components/InlineDropDownMenu/InlineDropDownMenu.js +24 -27
- package/components/InlineDropDownMenu/InlineDropDownMenuItem.js +13 -14
- package/components/ListView.js +71 -32
- package/components/LoadingIndicator.js +1 -1
- package/components/NavigationBar/NavigationBar.js +3 -7
- package/components/NavigationBar/NavigationBarAnimations.js +1 -1
- package/components/ScrollView/ScrollDriverProvider.js +1 -1
- package/components/ScrollView/ScrollView.js +3 -3
- package/components/ShareButton.js +1 -1
- package/components/Spinner.js +1 -1
- package/components/Switch.js +2 -2
- package/components/TabMenu/TabMenu.js +2 -2
- package/components/TabMenu/TabMenuItem.js +7 -4
- package/components/Text.js +2 -2
- package/components/TextInput.js +2 -2
- package/components/Tile.js +1 -1
- package/components/Touchable.js +2 -2
- package/components/TouchableNativeFeedback.js +2 -2
- package/components/TouchableOpacity.js +1 -1
- package/components/Video/Video.js +1 -1
- package/components/Video/VideoSourceReader.js +2 -1
- package/components/View.js +1 -1
- package/components/YearRangePicker/YearRangePicker.js +2 -2
- package/components/YearRangePicker/YearRangePickerButton.js +2 -2
- package/components/YearRangePicker/YearRangePickerModal.js +11 -11
- package/examples/components/Cards.js +1 -1
- package/examples/components/DropDownMenus.js +8 -8
- package/examples/components/Examples.js +1 -1
- package/examples/components/FormComponents.js +1 -1
- package/examples/components/Headers.js +1 -1
- package/examples/components/NavigationBars.js +4 -4
- package/examples/components/Rows.js +1 -1
- package/examples/components/Stage.js +1 -1
- package/examples/components/Tiles.js +1 -1
- package/examples/components/Typography.js +1 -1
- package/examples/components/Videos.js +3 -3
- package/helpers/device-selector.js +3 -3
- package/html/Html.js +3 -3
- package/html/components/Image.js +1 -1
- package/html/components/SimpleHtml.js +9 -9
- package/html/elements/A.js +3 -3
- package/html/elements/Block.js +2 -2
- package/html/elements/Img.js +1 -1
- package/html/elements/Inline.js +5 -5
- package/html/elements/Text.js +2 -2
- package/html/elements/list/Ol.js +1 -1
- package/html/elements/list/Ul.js +1 -1
- package/html/elements/list/index.js +4 -4
- package/html/index.js +33 -33
- package/html/services/ElementRegistry.js +1 -1
- package/html/services/HtmlParser.js +2 -1
- package/package.json +18 -9
- package/scripts/add-native-deps.js +0 -1
- package/theme.js +7 -7
package/html/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
+
import Gallery from './components/Gallery';
|
|
2
|
+
import Image from './components/Image';
|
|
3
|
+
import SimpleHtml from './components/SimpleHtml';
|
|
4
|
+
import A from './elements/A';
|
|
5
|
+
import Block from './elements/Block';
|
|
6
|
+
import Br from './elements/Br';
|
|
7
|
+
import Img from './elements/Img';
|
|
8
|
+
import Inline, { InlineSettings } from './elements/Inline';
|
|
9
|
+
import { Bullet, Li, Number, Ol, Ul } from './elements/list';
|
|
10
|
+
import Text from './elements/Text';
|
|
11
|
+
import Video from './elements/Video';
|
|
12
|
+
import Virtual from './elements/Virtual';
|
|
1
13
|
import {
|
|
2
|
-
registerElement,
|
|
3
14
|
Display,
|
|
15
|
+
getElement,
|
|
4
16
|
getElementDisplay,
|
|
5
17
|
getElementProperty,
|
|
6
|
-
|
|
18
|
+
registerElement,
|
|
7
19
|
} from './services/ElementRegistry';
|
|
8
20
|
import Html, {
|
|
21
|
+
combineMappers,
|
|
9
22
|
customizeRenderElement,
|
|
10
23
|
ElementPropTypes,
|
|
11
24
|
hasBlockElement,
|
|
12
|
-
combineMappers,
|
|
13
25
|
mapElementProps,
|
|
14
26
|
renderChildElements,
|
|
15
27
|
renderChildren,
|
|
16
28
|
} from './Html';
|
|
17
|
-
import SimpleHtml from './components/SimpleHtml';
|
|
18
|
-
import Gallery from './components/Gallery';
|
|
19
|
-
import Image from './components/Image';
|
|
20
|
-
import Inline, { InlineSettings } from './elements/Inline';
|
|
21
|
-
import Virtual from './elements/Virtual';
|
|
22
|
-
import Block from './elements/Block';
|
|
23
|
-
import Text from './elements/Text';
|
|
24
|
-
import { Ul, Ol, Li, Bullet, Number } from './elements/list';
|
|
25
|
-
import Img from './elements/Img';
|
|
26
|
-
import A from './elements/A';
|
|
27
|
-
import Br from './elements/Br';
|
|
28
|
-
import Video from './elements/Video';
|
|
29
29
|
|
|
30
30
|
// Text elements with primary inline display
|
|
31
31
|
Html.registerElement('em', Inline, InlineSettings);
|
|
@@ -69,31 +69,31 @@ Html.registerElement('p', Block);
|
|
|
69
69
|
Html.registerElement('div', Block);
|
|
70
70
|
|
|
71
71
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
ElementPropTypes,
|
|
75
|
-
hasBlockElement,
|
|
72
|
+
A,
|
|
73
|
+
Block,
|
|
76
74
|
combineMappers,
|
|
77
|
-
|
|
78
|
-
renderChildElements,
|
|
79
|
-
renderChildren,
|
|
75
|
+
customizeRenderElement,
|
|
80
76
|
// Element Registry
|
|
81
77
|
Display,
|
|
82
|
-
|
|
78
|
+
ElementPropTypes,
|
|
79
|
+
// Components
|
|
80
|
+
Gallery,
|
|
81
|
+
getElement,
|
|
83
82
|
getElementDisplay,
|
|
84
83
|
getElementProperty,
|
|
85
|
-
|
|
84
|
+
hasBlockElement,
|
|
85
|
+
Html,
|
|
86
|
+
Image,
|
|
87
|
+
Img,
|
|
86
88
|
// Elements
|
|
87
89
|
Inline,
|
|
88
|
-
Block,
|
|
89
|
-
Img,
|
|
90
|
-
A,
|
|
91
|
-
Ul,
|
|
92
|
-
Ol,
|
|
93
90
|
Li,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
mapElementProps,
|
|
92
|
+
Ol,
|
|
93
|
+
registerElement,
|
|
94
|
+
renderChildElements,
|
|
95
|
+
renderChildren,
|
|
98
96
|
SimpleHtml,
|
|
97
|
+
Ul,
|
|
98
|
+
Virtual,
|
|
99
99
|
};
|
|
@@ -40,7 +40,8 @@ function stripNewLines(html) {
|
|
|
40
40
|
.replace(htmlNewLineRegex, match => {
|
|
41
41
|
if (newLineAfterClosingTagRegex.test(match)) {
|
|
42
42
|
return '>';
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
|
+
if (newLineBeforeOpeningTagRegex.test(match)) {
|
|
44
45
|
return '<';
|
|
45
46
|
}
|
|
46
47
|
return ' ';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoutem/ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "Styleable set of components for React Native applications",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "eslint .",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@react-native-community/datetimepicker": "3.5.2",
|
|
13
|
-
"@shoutem/animation": "
|
|
13
|
+
"@shoutem/animation": "~0.15.0",
|
|
14
14
|
"@shoutem/eslint-config-react": "~1.0.6",
|
|
15
|
-
"@shoutem/theme": "
|
|
15
|
+
"@shoutem/theme": "~0.13.0",
|
|
16
16
|
"auto-bind": "4.0.0",
|
|
17
17
|
"babel-plugin-transform-decorators-legacy": "1.3.5",
|
|
18
18
|
"buffer": "5.6.0",
|
|
@@ -47,16 +47,19 @@
|
|
|
47
47
|
"@babel/core": "7.16.7",
|
|
48
48
|
"@babel/register": "7.9.0",
|
|
49
49
|
"@babel/plugin-proposal-decorators": "7.16.7",
|
|
50
|
-
"
|
|
50
|
+
"@shoutem/eslint-config-react-native": "~1.0.2",
|
|
51
|
+
"babel-eslint": "10.1.0",
|
|
51
52
|
"chai": "4.2.0",
|
|
52
53
|
"deep-freeze": "0.0.1",
|
|
53
54
|
"eslint": "6.8.0",
|
|
54
55
|
"eslint-plugin-import": "2.25.4",
|
|
55
|
-
"eslint-plugin-jsx-a11y": "
|
|
56
|
+
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
56
57
|
"eslint-plugin-prettier": "3.1.3",
|
|
57
|
-
"eslint-plugin-react": "
|
|
58
|
-
"eslint-plugin-react-
|
|
59
|
-
"
|
|
58
|
+
"eslint-plugin-react": "7.28.0",
|
|
59
|
+
"eslint-plugin-react-hooks": "4.2.0",
|
|
60
|
+
"eslint-plugin-react-native": "3.11.0",
|
|
61
|
+
"eslint-plugin-simple-import-sort": "7.0.0",
|
|
62
|
+
"metro-react-native-babel-preset": "0.66.2",
|
|
60
63
|
"mocha": "7.1.2",
|
|
61
64
|
"prettier": "1.19.1",
|
|
62
65
|
"react-addons-test-utils": "15.6.2",
|
|
@@ -120,11 +123,17 @@
|
|
|
120
123
|
}
|
|
121
124
|
],
|
|
122
125
|
"eslintConfig": {
|
|
123
|
-
"extends": "@shoutem/react",
|
|
126
|
+
"extends": "@shoutem/react-native",
|
|
124
127
|
"parser": "babel-eslint",
|
|
125
128
|
"parserOptions": {
|
|
126
129
|
"ecmaVersion": 6,
|
|
127
130
|
"sourceType": "module"
|
|
128
131
|
}
|
|
132
|
+
},
|
|
133
|
+
"prettier": {
|
|
134
|
+
"bracketSpacing": true,
|
|
135
|
+
"jsxBracketSameLine": false,
|
|
136
|
+
"singleQuote": true,
|
|
137
|
+
"trailingComma": "all"
|
|
129
138
|
}
|
|
130
139
|
}
|
package/theme.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Dimensions,
|
|
1
|
+
import { Dimensions, Platform, StatusBar, StyleSheet } from 'react-native';
|
|
2
2
|
import {
|
|
3
|
-
INCLUDE,
|
|
4
|
-
createVariations,
|
|
5
|
-
createSharedStyle,
|
|
6
|
-
inverseColorBrightnessForAmount,
|
|
7
3
|
changeColorAlpha,
|
|
4
|
+
createSharedStyle,
|
|
5
|
+
createVariations,
|
|
8
6
|
getSizeRelativeToReference,
|
|
7
|
+
INCLUDE,
|
|
8
|
+
inverseColorBrightnessForAmount,
|
|
9
9
|
} from '@shoutem/theme';
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
IPHONE_X_HOME_INDICATOR_PADDING,
|
|
12
12
|
IPHONE_X_NOTCH_PADDING,
|
|
13
13
|
IPHONE_XR_NOTCH_PADDING,
|
|
14
|
-
|
|
14
|
+
NAVIGATION_HEADER_HEIGHT,
|
|
15
15
|
} from './const';
|
|
16
16
|
import { Device } from './helpers';
|
|
17
17
|
|