@hero-design/rn 7.20.0 → 7.21.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/.eslintrc.json +1 -0
- package/.turbo/turbo-build.log +2 -2
- package/es/index.js +410 -285
- package/lib/index.js +410 -282
- package/package.json +4 -2
- package/rollup.config.js +1 -0
- package/src/components/BottomSheet/index.tsx +6 -1
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +4 -4
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +13 -13
- package/src/components/Empty/StyledEmpty.tsx +1 -9
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +58 -5
- package/src/components/Empty/__tests__/index.spec.tsx +13 -0
- package/src/components/Empty/index.tsx +38 -18
- package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +81 -0
- package/src/components/Image/__tests__/index.spec.tsx +29 -0
- package/src/components/Image/index.tsx +46 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +5 -5
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +60 -60
- package/src/components/RichTextEditor/EditorToolbar.tsx +19 -18
- package/src/components/RichTextEditor/RichTextEditor.tsx +7 -2
- package/src/components/RichTextEditor/StyledRichTextEditor.ts +0 -2
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +7 -4
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +2 -2
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -12
- package/src/components/RichTextEditor/constants.ts +0 -11
- package/src/components/RichTextEditor/index.tsx +0 -3
- package/src/components/RichTextEditor/types.ts +9 -0
- package/src/components/Select/MultiSelect/OptionList.tsx +4 -6
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +21 -0
- package/src/components/Select/MultiSelect/index.tsx +33 -3
- package/src/components/Select/SingleSelect/OptionList.tsx +4 -5
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +16 -0
- package/src/components/Select/SingleSelect/index.tsx +34 -4
- package/src/components/Select/StyledOptionList.tsx +3 -9
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +43 -0
- package/src/components/Slider/__tests__/index.spec.tsx +33 -0
- package/src/components/Slider/index.tsx +89 -0
- package/src/components/Switch/StyledSwitch.tsx +4 -4
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +10 -10
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
- package/src/components/Switch/index.tsx +5 -4
- package/src/components/TextInput/index.tsx +43 -37
- package/src/index.ts +4 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +56 -11
- package/src/theme/components/alert.ts +1 -2
- package/src/theme/components/avatar.ts +8 -8
- package/src/theme/components/badge.ts +4 -4
- package/src/theme/components/bottomNavigation.ts +1 -1
- package/src/theme/components/bottomSheet.ts +2 -3
- package/src/theme/components/calendar.ts +9 -7
- package/src/theme/components/card.ts +1 -1
- package/src/theme/components/checkbox.ts +2 -5
- package/src/theme/components/datePicker.ts +3 -3
- package/src/theme/components/drawer.ts +2 -3
- package/src/theme/components/empty.ts +3 -8
- package/src/theme/components/fab.ts +2 -2
- package/src/theme/components/image.ts +12 -0
- package/src/theme/components/pinInput.ts +3 -3
- package/src/theme/components/progress.ts +2 -3
- package/src/theme/components/radio.ts +7 -3
- package/src/theme/components/richTextEditor.ts +4 -4
- package/src/theme/components/slider.ts +13 -0
- package/src/theme/components/switch.ts +16 -1
- package/src/theme/components/tabs.ts +1 -1
- package/src/theme/components/timePicker.ts +3 -3
- package/src/theme/components/toast.ts +1 -2
- package/src/theme/getTheme.ts +9 -2
- package/src/theme/global/colors/swag.ts +2 -0
- package/src/theme/global/colors/types.ts +2 -0
- package/src/theme/global/index.ts +3 -0
- package/src/theme/global/scale.ts +3 -0
- package/src/theme/global/sizes.ts +29 -0
- package/src/types.ts +0 -2
- package/testUtils/setup.tsx +14 -0
- package/types/components/BottomSheet/index.d.ts +5 -1
- package/types/components/Empty/StyledEmpty.d.ts +1 -7
- package/types/components/Empty/index.d.ts +8 -2
- package/types/components/Image/__tests__/index.spec.d.ts +1 -0
- package/types/components/Image/index.d.ts +17 -0
- package/types/components/RichTextEditor/EditorToolbar.d.ts +1 -1
- package/types/components/RichTextEditor/RichTextEditor.d.ts +4 -0
- package/types/components/RichTextEditor/constants.d.ts +0 -10
- package/types/components/RichTextEditor/index.d.ts +0 -2
- package/types/components/RichTextEditor/types.d.ts +1 -0
- package/types/components/Select/MultiSelect/OptionList.d.ts +5 -2
- package/types/components/Select/MultiSelect/index.d.ts +7 -1
- package/types/components/Select/SingleSelect/OptionList.d.ts +5 -2
- package/types/components/Select/SingleSelect/index.d.ts +8 -2
- package/types/components/Select/StyledOptionList.d.ts +4 -3
- package/types/components/Select/index.d.ts +1 -1
- package/types/components/Slider/__tests__/index.spec.d.ts +1 -0
- package/types/components/Slider/index.d.ts +52 -0
- package/types/components/TextInput/index.d.ts +2 -1
- package/types/index.d.ts +3 -1
- package/types/theme/components/datePicker.d.ts +2 -1
- package/types/theme/components/empty.d.ts +2 -5
- package/types/theme/components/image.d.ts +8 -0
- package/types/theme/components/slider.d.ts +9 -0
- package/types/theme/components/switch.d.ts +14 -1
- package/types/theme/components/timePicker.d.ts +2 -1
- package/types/theme/getTheme.d.ts +4 -0
- package/types/theme/global/colors/types.d.ts +2 -0
- package/types/theme/global/index.d.ts +3 -0
- package/types/theme/global/scale.d.ts +1 -0
- package/types/theme/global/sizes.d.ts +14 -0
- package/types/types.d.ts +1 -2
package/lib/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var reactNativeVectorIcons = require('react-native-vector-icons');
|
|
8
8
|
var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
9
9
|
var DateTimePicker = require('@react-native-community/datetimepicker');
|
|
10
|
+
var RnSlider = require('@react-native-community/slider');
|
|
10
11
|
var PagerView = require('react-native-pager-view');
|
|
11
12
|
var events = require('events');
|
|
12
13
|
var reactNativeWebview = require('react-native-webview');
|
|
@@ -34,6 +35,7 @@ function _interopNamespace(e) {
|
|
|
34
35
|
var reactNative__namespace = /*#__PURE__*/_interopNamespace(reactNative);
|
|
35
36
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
36
37
|
var DateTimePicker__default = /*#__PURE__*/_interopDefaultLegacy(DateTimePicker);
|
|
38
|
+
var RnSlider__default = /*#__PURE__*/_interopDefaultLegacy(RnSlider);
|
|
37
39
|
var PagerView__default = /*#__PURE__*/_interopDefaultLegacy(PagerView);
|
|
38
40
|
|
|
39
41
|
function ownKeys(object, enumerableOnly) {
|
|
@@ -300,12 +302,14 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
300
302
|
|
|
301
303
|
var BASE_BORDER_WIDTH = 1;
|
|
302
304
|
var BASE_SPACE = 8;
|
|
305
|
+
var BASE_SIZE = 8;
|
|
303
306
|
var BASE_FONT = 'BeVietnamPro';
|
|
304
307
|
var BASE_FONT_SIZE = 10;
|
|
305
308
|
var BASE_RADIUS = 4;
|
|
306
309
|
var scale$1 = {
|
|
307
310
|
borderWidth: BASE_BORDER_WIDTH,
|
|
308
311
|
space: BASE_SPACE,
|
|
312
|
+
size: BASE_SIZE,
|
|
309
313
|
font: BASE_FONT,
|
|
310
314
|
fontSize: BASE_FONT_SIZE,
|
|
311
315
|
radius: BASE_RADIUS
|
|
@@ -1337,6 +1341,7 @@ var swagSystemPalette = {
|
|
|
1337
1341
|
shadow: palette$5.greyLight45,
|
|
1338
1342
|
__alpha__globalPrimary: palette$5.maasstrichtBlue,
|
|
1339
1343
|
__alpha__globalSecondary1: palette$5.maasstrichtBlueLight30,
|
|
1344
|
+
__alpha__globalSecondary4: palette$5.maasstrichtBlueLight90,
|
|
1340
1345
|
__alpha__globalNeutral3: palette$5.greyLight90,
|
|
1341
1346
|
__alpha__globalLabel1: palette$5.vermilion,
|
|
1342
1347
|
__alpha__globalLabel2: palette$5.deepSaffron,
|
|
@@ -1347,6 +1352,7 @@ var swagSystemPalette = {
|
|
|
1347
1352
|
__alpha__globalLabel7: palette$5.seashell,
|
|
1348
1353
|
__alpha__globalLabel8: palette$5.honeydew,
|
|
1349
1354
|
__alpha__globalLabel9: palette$5.aliceBlue,
|
|
1355
|
+
__alpha__primary1: palette$2.scarletGum,
|
|
1350
1356
|
__alpha__primary2: palette$2.mauve,
|
|
1351
1357
|
__alpha__secondary1: palette$2.scarletGumLight30,
|
|
1352
1358
|
__alpha__secondary2: palette$2.scarletGumLight50,
|
|
@@ -1454,6 +1460,20 @@ var getSpace = function getSpace(baseSpace) {
|
|
|
1454
1460
|
};
|
|
1455
1461
|
};
|
|
1456
1462
|
|
|
1463
|
+
var getSizes = function getSizes(baseSize) {
|
|
1464
|
+
return _objectSpread2(_objectSpread2({}, getSpace(baseSize)), {}, {
|
|
1465
|
+
xxxxxlarge: scale(baseSize * 8),
|
|
1466
|
+
'6xlarge': scale(baseSize * 9),
|
|
1467
|
+
'7xlarge': scale(baseSize * 10),
|
|
1468
|
+
'9xlarge': scale(baseSize * 12),
|
|
1469
|
+
'14xlarge': scale(baseSize * 17),
|
|
1470
|
+
'15xlarge': scale(baseSize * 18),
|
|
1471
|
+
'18xlarge': scale(baseSize * 21),
|
|
1472
|
+
'19xlarge': scale(baseSize * 22) // 176
|
|
1473
|
+
|
|
1474
|
+
});
|
|
1475
|
+
};
|
|
1476
|
+
|
|
1457
1477
|
var getBorderWidths = function getBorderWidths(baseBorderWidth) {
|
|
1458
1478
|
return {
|
|
1459
1479
|
base: baseBorderWidth,
|
|
@@ -1479,6 +1499,7 @@ var getGlobalTheme = function getGlobalTheme(scale, systemPalette) {
|
|
|
1479
1499
|
var lineHeights = getLineHeights(fontSizes);
|
|
1480
1500
|
var borderWidths = getBorderWidths(scale.borderWidth);
|
|
1481
1501
|
var space = getSpace(scale.space);
|
|
1502
|
+
var sizes = getSizes(scale.size);
|
|
1482
1503
|
var radii = getRadii(scale.radius);
|
|
1483
1504
|
return {
|
|
1484
1505
|
colors: _objectSpread2({}, systemPalette),
|
|
@@ -1487,6 +1508,7 @@ var getGlobalTheme = function getGlobalTheme(scale, systemPalette) {
|
|
|
1487
1508
|
lineHeights: lineHeights,
|
|
1488
1509
|
borderWidths: borderWidths,
|
|
1489
1510
|
space: space,
|
|
1511
|
+
sizes: sizes,
|
|
1490
1512
|
radii: radii
|
|
1491
1513
|
};
|
|
1492
1514
|
};
|
|
@@ -1518,7 +1540,7 @@ var getAlertTheme = function getAlertTheme(theme) {
|
|
|
1518
1540
|
divider: theme.colors.outline
|
|
1519
1541
|
};
|
|
1520
1542
|
var sizes = {
|
|
1521
|
-
height:
|
|
1543
|
+
height: theme.sizes.xxxlarge
|
|
1522
1544
|
};
|
|
1523
1545
|
var space = {
|
|
1524
1546
|
contentPaddingHorizontal: theme.space.smallMedium,
|
|
@@ -1550,14 +1572,14 @@ var getAvatarTheme = function getAvatarTheme(theme) {
|
|
|
1550
1572
|
warning: theme.colors.warning
|
|
1551
1573
|
};
|
|
1552
1574
|
var sizes = {
|
|
1553
|
-
small: theme.
|
|
1554
|
-
medium: theme.
|
|
1555
|
-
large: theme.
|
|
1556
|
-
xlarge: theme.
|
|
1557
|
-
xxlarge: theme.
|
|
1558
|
-
xxxlarge: theme.
|
|
1559
|
-
xxxxlarge: theme.
|
|
1560
|
-
xxxxxlarge: theme.
|
|
1575
|
+
small: theme.sizes.xlarge,
|
|
1576
|
+
medium: theme.sizes.xxlarge,
|
|
1577
|
+
large: theme.sizes.xxxlarge,
|
|
1578
|
+
xlarge: theme.sizes.xxxxlarge,
|
|
1579
|
+
xxlarge: theme.sizes.xxxxxlarge,
|
|
1580
|
+
xxxlarge: theme.sizes['7xlarge'],
|
|
1581
|
+
xxxxlarge: theme.sizes['9xlarge'],
|
|
1582
|
+
xxxxxlarge: theme.sizes['14xlarge']
|
|
1561
1583
|
};
|
|
1562
1584
|
var fontSizes = {
|
|
1563
1585
|
small: theme.fontSizes.large,
|
|
@@ -1600,10 +1622,10 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
1600
1622
|
"default": theme.fontSizes.small
|
|
1601
1623
|
};
|
|
1602
1624
|
var sizes = {
|
|
1603
|
-
height: theme.fontSizes.small + theme.
|
|
1604
|
-
minWidth: theme.fontSizes.small + theme.
|
|
1605
|
-
statusHeight: theme.
|
|
1606
|
-
statusWidth: theme.
|
|
1625
|
+
height: theme.fontSizes.small + theme.sizes.small,
|
|
1626
|
+
minWidth: theme.fontSizes.small + theme.sizes.small,
|
|
1627
|
+
statusHeight: theme.sizes.small,
|
|
1628
|
+
statusWidth: theme.sizes.small
|
|
1607
1629
|
};
|
|
1608
1630
|
var space = {
|
|
1609
1631
|
horizontalPadding: theme.space.small,
|
|
@@ -1625,7 +1647,7 @@ var getBottomNavigationTheme = function getBottomNavigationTheme(theme) {
|
|
|
1625
1647
|
background: theme.colors.platformBackground
|
|
1626
1648
|
};
|
|
1627
1649
|
var sizes = {
|
|
1628
|
-
height:
|
|
1650
|
+
height: theme.sizes['6xlarge']
|
|
1629
1651
|
};
|
|
1630
1652
|
var shadows = {
|
|
1631
1653
|
offset: {
|
|
@@ -1654,8 +1676,8 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
|
|
|
1654
1676
|
backdrop: theme.colors.backgroundDark
|
|
1655
1677
|
};
|
|
1656
1678
|
var sizes = {
|
|
1657
|
-
sectionHeight:
|
|
1658
|
-
closeIcon:
|
|
1679
|
+
sectionHeight: theme.sizes.xxxxxlarge,
|
|
1680
|
+
closeIcon: theme.sizes.xxxlarge
|
|
1659
1681
|
};
|
|
1660
1682
|
var space = {
|
|
1661
1683
|
headerWrapperVerticalPadding: theme.space.small,
|
|
@@ -1758,13 +1780,15 @@ var getCalendarTheme = function getCalendarTheme(theme) {
|
|
|
1758
1780
|
primary: theme.colors.primary,
|
|
1759
1781
|
inverted: theme.colors.invertedText
|
|
1760
1782
|
};
|
|
1783
|
+
var cellSize = theme.sizes.xxxlarge;
|
|
1784
|
+
var markSize = theme.sizes.xsmall;
|
|
1761
1785
|
var sizes = {
|
|
1762
|
-
cellWidth:
|
|
1763
|
-
cellHeight:
|
|
1764
|
-
cellCircleWidth:
|
|
1765
|
-
cellCircleHeight:
|
|
1766
|
-
markWidth:
|
|
1767
|
-
markHeight:
|
|
1786
|
+
cellWidth: cellSize,
|
|
1787
|
+
cellHeight: cellSize,
|
|
1788
|
+
cellCircleWidth: cellSize - markSize,
|
|
1789
|
+
cellCircleHeight: cellSize - markSize,
|
|
1790
|
+
markWidth: markSize,
|
|
1791
|
+
markHeight: markSize
|
|
1768
1792
|
};
|
|
1769
1793
|
var space = {
|
|
1770
1794
|
rowVerticalPadding: theme.space.medium,
|
|
@@ -1793,7 +1817,7 @@ var getCardTheme = function getCardTheme(theme) {
|
|
|
1793
1817
|
archived: theme.colors.archivedLight
|
|
1794
1818
|
};
|
|
1795
1819
|
var sizes = {
|
|
1796
|
-
indicatorWidth: theme.
|
|
1820
|
+
indicatorWidth: theme.sizes.medium
|
|
1797
1821
|
};
|
|
1798
1822
|
var radii = {
|
|
1799
1823
|
"default": theme.radii.large
|
|
@@ -1811,14 +1835,12 @@ var getCheckboxTheme = function getCheckboxTheme(theme) {
|
|
|
1811
1835
|
disabledBorder: theme.colors.globalPrimaryLight
|
|
1812
1836
|
};
|
|
1813
1837
|
var space = {
|
|
1814
|
-
|
|
1815
|
-
// and also to center the check mark
|
|
1816
|
-
iconTop: -scale(3),
|
|
1838
|
+
iconTop: 0,
|
|
1817
1839
|
wrapperPadding: theme.space.medium,
|
|
1818
1840
|
iconDescriptionPadding: theme.space.smallMedium
|
|
1819
1841
|
};
|
|
1820
1842
|
var sizes = {
|
|
1821
|
-
icon:
|
|
1843
|
+
icon: theme.sizes.large
|
|
1822
1844
|
};
|
|
1823
1845
|
var radii = {
|
|
1824
1846
|
wrapper: theme.radii.medium,
|
|
@@ -1846,9 +1868,9 @@ var getContentNavigatorTheme = function getContentNavigatorTheme(theme) {
|
|
|
1846
1868
|
};
|
|
1847
1869
|
};
|
|
1848
1870
|
|
|
1849
|
-
var getDatePickerTheme = function getDatePickerTheme() {
|
|
1871
|
+
var getDatePickerTheme = function getDatePickerTheme(theme) {
|
|
1850
1872
|
var sizes = {
|
|
1851
|
-
height:
|
|
1873
|
+
height: theme.sizes['19xlarge']
|
|
1852
1874
|
};
|
|
1853
1875
|
return {
|
|
1854
1876
|
sizes: sizes
|
|
@@ -1891,8 +1913,8 @@ var getDrawerTheme = function getDrawerTheme(theme) {
|
|
|
1891
1913
|
handlerPaddingVertical: theme.space.small
|
|
1892
1914
|
};
|
|
1893
1915
|
var sizes = {
|
|
1894
|
-
handlerWidth:
|
|
1895
|
-
handlerHeight:
|
|
1916
|
+
handlerWidth: theme.sizes.xxxxlarge,
|
|
1917
|
+
handlerHeight: theme.sizes.xsmall
|
|
1896
1918
|
};
|
|
1897
1919
|
var shadows = {
|
|
1898
1920
|
offset: {
|
|
@@ -1915,14 +1937,11 @@ var getDrawerTheme = function getDrawerTheme(theme) {
|
|
|
1915
1937
|
var getEmptyTheme = function getEmptyTheme(theme) {
|
|
1916
1938
|
var space = {
|
|
1917
1939
|
titleMargin: theme.space.medium,
|
|
1918
|
-
|
|
1940
|
+
imageMargin: theme.space.large,
|
|
1919
1941
|
wrapperPadding: theme.space.medium
|
|
1920
1942
|
};
|
|
1921
1943
|
var sizes = {
|
|
1922
|
-
|
|
1923
|
-
};
|
|
1924
|
-
var radii = {
|
|
1925
|
-
illustration: theme.radii.rounded
|
|
1944
|
+
image: theme.sizes['18xlarge']
|
|
1926
1945
|
};
|
|
1927
1946
|
var colors = {
|
|
1928
1947
|
text: theme.colors.text,
|
|
@@ -1943,8 +1962,7 @@ var getEmptyTheme = function getEmptyTheme(theme) {
|
|
|
1943
1962
|
colors: colors,
|
|
1944
1963
|
sizes: sizes,
|
|
1945
1964
|
space: space,
|
|
1946
|
-
fonts: fonts
|
|
1947
|
-
radii: radii
|
|
1965
|
+
fonts: fonts
|
|
1948
1966
|
};
|
|
1949
1967
|
};
|
|
1950
1968
|
|
|
@@ -1959,8 +1977,8 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
1959
1977
|
actionItemText: theme.colors.invertedText
|
|
1960
1978
|
};
|
|
1961
1979
|
var sizes = {
|
|
1962
|
-
width:
|
|
1963
|
-
height:
|
|
1980
|
+
width: theme.sizes.xxxxxlarge,
|
|
1981
|
+
height: theme.sizes.xxxxxlarge
|
|
1964
1982
|
};
|
|
1965
1983
|
var fonts = {
|
|
1966
1984
|
header: theme.fonts.semiBold,
|
|
@@ -2032,6 +2050,16 @@ var getIconTheme = function getIconTheme(theme) {
|
|
|
2032
2050
|
};
|
|
2033
2051
|
};
|
|
2034
2052
|
|
|
2053
|
+
var getImageTheme = function getImageTheme(theme) {
|
|
2054
|
+
var sizes = {
|
|
2055
|
+
'6xlarge': theme.sizes['6xlarge'],
|
|
2056
|
+
'15xlarge': theme.sizes['15xlarge']
|
|
2057
|
+
};
|
|
2058
|
+
return {
|
|
2059
|
+
sizes: sizes
|
|
2060
|
+
};
|
|
2061
|
+
};
|
|
2062
|
+
|
|
2035
2063
|
var getListTheme = function getListTheme(theme) {
|
|
2036
2064
|
var colors = {
|
|
2037
2065
|
checkedListItemContainerBackground: theme.colors.primaryBackground,
|
|
@@ -2101,9 +2129,9 @@ var getPinInputTheme = function getPinInputTheme(theme) {
|
|
|
2101
2129
|
errorMessage: theme.fontSizes.small
|
|
2102
2130
|
};
|
|
2103
2131
|
var sizes = {
|
|
2104
|
-
cellWidth: theme.
|
|
2105
|
-
cellHeight: theme.
|
|
2106
|
-
mask: theme.
|
|
2132
|
+
cellWidth: theme.sizes.xxlarge,
|
|
2133
|
+
cellHeight: theme.sizes.xxxlarge,
|
|
2134
|
+
mask: theme.sizes.medium
|
|
2107
2135
|
};
|
|
2108
2136
|
var space = {
|
|
2109
2137
|
spacer: theme.space.medium,
|
|
@@ -2135,8 +2163,8 @@ var getProgressTheme = function getProgressTheme(theme) {
|
|
|
2135
2163
|
innerBackground: theme.colors.platformBackground
|
|
2136
2164
|
};
|
|
2137
2165
|
var sizes = {
|
|
2138
|
-
circleWidth:
|
|
2139
|
-
barHeight:
|
|
2166
|
+
circleWidth: theme.sizes['6xlarge'],
|
|
2167
|
+
barHeight: theme.sizes.xsmall
|
|
2140
2168
|
};
|
|
2141
2169
|
var radii = {
|
|
2142
2170
|
"default": theme.radii.rounded
|
|
@@ -2156,9 +2184,13 @@ var getRadioTheme = function getRadioTheme(theme) {
|
|
|
2156
2184
|
circleLeftMargin: theme.space.small,
|
|
2157
2185
|
groupTopMargin: theme.space.xsmall
|
|
2158
2186
|
};
|
|
2187
|
+
var boundingBoxSize = theme.sizes.large;
|
|
2188
|
+
var innerPadding = theme.space.xsmall;
|
|
2189
|
+
var circle = boundingBoxSize - innerPadding;
|
|
2190
|
+
var innerCircle = circle / 2;
|
|
2159
2191
|
var sizes = {
|
|
2160
|
-
circle:
|
|
2161
|
-
innerCircle:
|
|
2192
|
+
circle: circle,
|
|
2193
|
+
innerCircle: innerCircle
|
|
2162
2194
|
};
|
|
2163
2195
|
var borderWidths = {
|
|
2164
2196
|
circle: theme.borderWidths.medium
|
|
@@ -2181,10 +2213,10 @@ var getRichTextEditorTheme = function getRichTextEditorTheme(theme) {
|
|
|
2181
2213
|
webViewBorderBottomWidth: 0.8
|
|
2182
2214
|
};
|
|
2183
2215
|
var sizes = {
|
|
2184
|
-
editorMinHeight:
|
|
2185
|
-
toolbarButtonSize: theme.
|
|
2186
|
-
toolbarSeparatorWidth:
|
|
2187
|
-
toolbarSeparatorHeight: theme.
|
|
2216
|
+
editorMinHeight: theme.sizes.large,
|
|
2217
|
+
toolbarButtonSize: theme.sizes.xxxlarge,
|
|
2218
|
+
toolbarSeparatorWidth: theme.sizes.xxsmall,
|
|
2219
|
+
toolbarSeparatorHeight: theme.sizes.medium
|
|
2188
2220
|
};
|
|
2189
2221
|
var fontSizes = {
|
|
2190
2222
|
editor: theme.fontSizes.medium
|
|
@@ -2242,6 +2274,17 @@ var getSelectTheme = function getSelectTheme(theme) {
|
|
|
2242
2274
|
};
|
|
2243
2275
|
};
|
|
2244
2276
|
|
|
2277
|
+
var getSliderTheme = function getSliderTheme(theme) {
|
|
2278
|
+
var colors = {
|
|
2279
|
+
minimumTrackTint: theme.colors.__alpha__primary1,
|
|
2280
|
+
thumbTint: theme.colors.__alpha__globalSecondary4,
|
|
2281
|
+
maximumTrackTint: theme.colors.__alpha__secondary4
|
|
2282
|
+
};
|
|
2283
|
+
return {
|
|
2284
|
+
colors: colors
|
|
2285
|
+
};
|
|
2286
|
+
};
|
|
2287
|
+
|
|
2245
2288
|
var getSpinnerTheme = function getSpinnerTheme(theme) {
|
|
2246
2289
|
var colors = {
|
|
2247
2290
|
dot1: theme.colors.__alpha__secondary1,
|
|
@@ -2295,16 +2338,30 @@ var getSwitchTheme = function getSwitchTheme(theme) {
|
|
|
2295
2338
|
small: theme.space.large,
|
|
2296
2339
|
medium: theme.space.large * 1.2
|
|
2297
2340
|
};
|
|
2341
|
+
var sizes = {
|
|
2342
|
+
thumbs: {
|
|
2343
|
+
small: theme.sizes.medium,
|
|
2344
|
+
medium: theme.sizes.large
|
|
2345
|
+
},
|
|
2346
|
+
widths: {
|
|
2347
|
+
small: theme.sizes.xxxlarge,
|
|
2348
|
+
medium: theme.sizes.xxxxxlarge
|
|
2349
|
+
},
|
|
2350
|
+
heights: {
|
|
2351
|
+
small: theme.sizes.large,
|
|
2352
|
+
medium: theme.sizes.xlarge
|
|
2353
|
+
}
|
|
2354
|
+
};
|
|
2298
2355
|
var spaces = {
|
|
2299
2356
|
small: theme.space.xsmall,
|
|
2300
|
-
medium: theme.space.xsmall
|
|
2301
|
-
inactive: 0
|
|
2357
|
+
medium: theme.space.xsmall
|
|
2302
2358
|
};
|
|
2303
2359
|
var radii = {
|
|
2304
2360
|
rounded: theme.radii.rounded
|
|
2305
2361
|
};
|
|
2306
2362
|
return {
|
|
2307
2363
|
colors: colors,
|
|
2364
|
+
sizes: sizes,
|
|
2308
2365
|
thumbSizes: thumbSizes,
|
|
2309
2366
|
widths: widths,
|
|
2310
2367
|
heights: heights,
|
|
@@ -2336,7 +2393,7 @@ var getTabsTheme = function getTabsTheme(theme) {
|
|
|
2336
2393
|
headerBottom: theme.borderWidths.base
|
|
2337
2394
|
};
|
|
2338
2395
|
var sizes = {
|
|
2339
|
-
indicator: theme.
|
|
2396
|
+
indicator: theme.sizes.xxsmall
|
|
2340
2397
|
};
|
|
2341
2398
|
return {
|
|
2342
2399
|
borderWidths: borderWidths,
|
|
@@ -2479,9 +2536,9 @@ var getTextInputTheme = function getTextInputTheme(theme) {
|
|
|
2479
2536
|
};
|
|
2480
2537
|
};
|
|
2481
2538
|
|
|
2482
|
-
var getTimePickerTheme = function getTimePickerTheme() {
|
|
2539
|
+
var getTimePickerTheme = function getTimePickerTheme(theme) {
|
|
2483
2540
|
var sizes = {
|
|
2484
|
-
height:
|
|
2541
|
+
height: theme.sizes['19xlarge']
|
|
2485
2542
|
};
|
|
2486
2543
|
return {
|
|
2487
2544
|
sizes: sizes
|
|
@@ -2500,7 +2557,7 @@ var getToastTheme = function getToastTheme(theme) {
|
|
|
2500
2557
|
shadow: theme.colors.backgroundDark
|
|
2501
2558
|
};
|
|
2502
2559
|
var sizes = {
|
|
2503
|
-
height:
|
|
2560
|
+
height: theme.sizes.xxxlarge
|
|
2504
2561
|
};
|
|
2505
2562
|
var space = {
|
|
2506
2563
|
wrapperVerticalPadding: theme.space.large,
|
|
@@ -2617,12 +2674,13 @@ var getTheme$1 = function getTheme() {
|
|
|
2617
2674
|
card: getCardTheme(globalTheme),
|
|
2618
2675
|
checkbox: getCheckboxTheme(globalTheme),
|
|
2619
2676
|
contentNavigator: getContentNavigatorTheme(globalTheme),
|
|
2620
|
-
datePicker: getDatePickerTheme(),
|
|
2677
|
+
datePicker: getDatePickerTheme(globalTheme),
|
|
2621
2678
|
divider: getDividerTheme(globalTheme),
|
|
2622
2679
|
drawer: getDrawerTheme(globalTheme),
|
|
2623
2680
|
empty: getEmptyTheme(globalTheme),
|
|
2624
2681
|
fab: getFABTheme(globalTheme),
|
|
2625
2682
|
icon: getIconTheme(globalTheme),
|
|
2683
|
+
image: getImageTheme(globalTheme),
|
|
2626
2684
|
list: getListTheme(globalTheme),
|
|
2627
2685
|
pinInput: getPinInputTheme(globalTheme),
|
|
2628
2686
|
progress: getProgressTheme(globalTheme),
|
|
@@ -2630,12 +2688,13 @@ var getTheme$1 = function getTheme() {
|
|
|
2630
2688
|
richTextEditor: getRichTextEditorTheme(globalTheme),
|
|
2631
2689
|
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
2632
2690
|
select: getSelectTheme(globalTheme),
|
|
2691
|
+
slider: getSliderTheme(globalTheme),
|
|
2633
2692
|
spinner: getSpinnerTheme(globalTheme),
|
|
2634
2693
|
"switch": getSwitchTheme(globalTheme),
|
|
2635
2694
|
tabs: getTabsTheme(globalTheme),
|
|
2636
2695
|
tag: getTagTheme(globalTheme),
|
|
2637
2696
|
textInput: getTextInputTheme(globalTheme),
|
|
2638
|
-
timePicker: getTimePickerTheme(),
|
|
2697
|
+
timePicker: getTimePickerTheme(globalTheme),
|
|
2639
2698
|
toast: getToastTheme(globalTheme),
|
|
2640
2699
|
toolbar: getToolbarTheme(globalTheme),
|
|
2641
2700
|
typography: getTypographyTheme(globalTheme)
|
|
@@ -6005,7 +6064,7 @@ var StyledText$3 = index$7(reactNative.Text)(function (_ref) {
|
|
|
6005
6064
|
});
|
|
6006
6065
|
});
|
|
6007
6066
|
|
|
6008
|
-
var _excluded$
|
|
6067
|
+
var _excluded$i = ["children", "fontSize", "fontWeight", "intent"];
|
|
6009
6068
|
|
|
6010
6069
|
var Text = function Text(_ref) {
|
|
6011
6070
|
var children = _ref.children,
|
|
@@ -6015,7 +6074,7 @@ var Text = function Text(_ref) {
|
|
|
6015
6074
|
fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
|
|
6016
6075
|
_ref$intent = _ref.intent,
|
|
6017
6076
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
6018
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6077
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$i);
|
|
6019
6078
|
|
|
6020
6079
|
return /*#__PURE__*/React__default["default"].createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6021
6080
|
themeFontSize: fontSize,
|
|
@@ -14560,11 +14619,11 @@ var StyledHeroIcon = index$7(HeroIcon)(function (_ref) {
|
|
|
14560
14619
|
};
|
|
14561
14620
|
});
|
|
14562
14621
|
|
|
14563
|
-
var _excluded$
|
|
14622
|
+
var _excluded$h = ["style"];
|
|
14564
14623
|
|
|
14565
14624
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
14566
14625
|
var style = _ref.style,
|
|
14567
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
14626
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
14568
14627
|
|
|
14569
14628
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
14570
14629
|
React.useEffect(function () {
|
|
@@ -14654,7 +14713,7 @@ function usePropsOrInternalState(initialState, state, setState) {
|
|
|
14654
14713
|
return [state || internalState, setState || setInternalState];
|
|
14655
14714
|
}
|
|
14656
14715
|
|
|
14657
|
-
var _excluded$
|
|
14716
|
+
var _excluded$g = ["key"];
|
|
14658
14717
|
|
|
14659
14718
|
var Accordion = function Accordion(_ref) {
|
|
14660
14719
|
var items = _ref.items,
|
|
@@ -14678,7 +14737,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
14678
14737
|
testID: testID
|
|
14679
14738
|
}, items.map(function (_ref2, index) {
|
|
14680
14739
|
var key = _ref2.key,
|
|
14681
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
14740
|
+
props = _objectWithoutProperties(_ref2, _excluded$g);
|
|
14682
14741
|
|
|
14683
14742
|
var open = _activeItemKey === key;
|
|
14684
14743
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
@@ -14920,7 +14979,7 @@ var StyledStatus = index$7(reactNative.Animated.View)(function (_ref3) {
|
|
|
14920
14979
|
};
|
|
14921
14980
|
});
|
|
14922
14981
|
|
|
14923
|
-
var _excluded$
|
|
14982
|
+
var _excluded$f = ["children", "visible", "intent", "style", "testID"];
|
|
14924
14983
|
|
|
14925
14984
|
var Status = function Status(_ref) {
|
|
14926
14985
|
var children = _ref.children,
|
|
@@ -14930,7 +14989,7 @@ var Status = function Status(_ref) {
|
|
|
14930
14989
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
14931
14990
|
style = _ref.style,
|
|
14932
14991
|
testID = _ref.testID,
|
|
14933
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
14992
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
14934
14993
|
|
|
14935
14994
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
14936
14995
|
opacity = _React$useRef.current;
|
|
@@ -14966,7 +15025,7 @@ var Status = function Status(_ref) {
|
|
|
14966
15025
|
}));
|
|
14967
15026
|
};
|
|
14968
15027
|
|
|
14969
|
-
var _excluded$
|
|
15028
|
+
var _excluded$e = ["content", "visible", "max", "intent", "style", "testID"];
|
|
14970
15029
|
var DEFAULT_MAX_NUMBER = 99;
|
|
14971
15030
|
|
|
14972
15031
|
var getPaddingState = function getPaddingState(content) {
|
|
@@ -14983,7 +15042,7 @@ var Badge = function Badge(_ref) {
|
|
|
14983
15042
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
14984
15043
|
style = _ref.style,
|
|
14985
15044
|
testID = _ref.testID,
|
|
14986
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
15045
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
14987
15046
|
|
|
14988
15047
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
14989
15048
|
opacity = _React$useRef.current;
|
|
@@ -15079,7 +15138,7 @@ var StyledBottomBarText = index$7(Typography.Text)(function (_ref3) {
|
|
|
15079
15138
|
var isIOS = reactNative.Platform.OS === 'ios';
|
|
15080
15139
|
var isAndroid = reactNative.Platform.OS === 'android';
|
|
15081
15140
|
|
|
15082
|
-
var _excluded$
|
|
15141
|
+
var _excluded$d = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
15083
15142
|
|
|
15084
15143
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
15085
15144
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
@@ -15092,7 +15151,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
15092
15151
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
15093
15152
|
selectedTabKey = _ref.selectedTabKey,
|
|
15094
15153
|
tabs = _ref.tabs,
|
|
15095
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
15154
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$d);
|
|
15096
15155
|
|
|
15097
15156
|
var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
15098
15157
|
/**
|
|
@@ -15183,14 +15242,14 @@ var StyledDivider = index$7(reactNative.View)(function (_ref) {
|
|
|
15183
15242
|
}, horizontalMargin), verticalMargin);
|
|
15184
15243
|
});
|
|
15185
15244
|
|
|
15186
|
-
var _excluded$
|
|
15245
|
+
var _excluded$c = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
15187
15246
|
|
|
15188
15247
|
var Divider = function Divider(_ref) {
|
|
15189
15248
|
var marginHorizontal = _ref.marginHorizontal,
|
|
15190
15249
|
marginVertical = _ref.marginVertical,
|
|
15191
15250
|
style = _ref.style,
|
|
15192
15251
|
testID = _ref.testID,
|
|
15193
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
15252
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
15194
15253
|
|
|
15195
15254
|
return /*#__PURE__*/React__default["default"].createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
15196
15255
|
themeMarginHorizontal: marginHorizontal,
|
|
@@ -15322,7 +15381,7 @@ var StyledLoadingDot = index$7(reactNative.View)(function (_ref2) {
|
|
|
15322
15381
|
}, themeStyling());
|
|
15323
15382
|
});
|
|
15324
15383
|
|
|
15325
|
-
var _excluded$
|
|
15384
|
+
var _excluded$b = ["count", "size", "testID", "themeVariant"];
|
|
15326
15385
|
var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
15327
15386
|
var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
|
|
15328
15387
|
|
|
@@ -15356,7 +15415,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
15356
15415
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
15357
15416
|
testID = _ref2.testID,
|
|
15358
15417
|
themeVariant = _ref2.themeVariant,
|
|
15359
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
15418
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$b);
|
|
15360
15419
|
|
|
15361
15420
|
var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
15362
15421
|
React.useEffect(function () {
|
|
@@ -15896,6 +15955,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
15896
15955
|
header = _ref.header,
|
|
15897
15956
|
footer = _ref.footer,
|
|
15898
15957
|
children = _ref.children,
|
|
15958
|
+
onAnimationEnd = _ref.onAnimationEnd,
|
|
15899
15959
|
onOpen = _ref.onOpen,
|
|
15900
15960
|
onRequestClose = _ref.onRequestClose,
|
|
15901
15961
|
onDismiss = _ref.onDismiss,
|
|
@@ -15948,7 +16008,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
15948
16008
|
easing: reactNative.Easing.inOut(reactNative.Easing.cubic),
|
|
15949
16009
|
useNativeDriver: true
|
|
15950
16010
|
});
|
|
15951
|
-
animation.start();
|
|
16011
|
+
animation.start(onAnimationEnd);
|
|
15952
16012
|
return function () {
|
|
15953
16013
|
return animation.stop();
|
|
15954
16014
|
};
|
|
@@ -16182,7 +16242,7 @@ var pick = function pick(keys, props) {
|
|
|
16182
16242
|
}, {});
|
|
16183
16243
|
};
|
|
16184
16244
|
|
|
16185
|
-
var _excluded$
|
|
16245
|
+
var _excluded$a = ["theme"];
|
|
16186
16246
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
16187
16247
|
var propConfig = config[key];
|
|
16188
16248
|
var propValue = props[key];
|
|
@@ -16215,20 +16275,20 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
16215
16275
|
var configKeys = Object.keys(config);
|
|
16216
16276
|
var StyledBox = index$7(reactNative.View)(function (_ref5) {
|
|
16217
16277
|
var theme = _ref5.theme,
|
|
16218
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
16278
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$a);
|
|
16219
16279
|
|
|
16220
16280
|
var styleProps = pick(configKeys, otherProps);
|
|
16221
16281
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
16222
16282
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
16223
16283
|
});
|
|
16224
16284
|
|
|
16225
|
-
var _excluded$
|
|
16285
|
+
var _excluded$9 = ["children", "style", "testID"];
|
|
16226
16286
|
|
|
16227
16287
|
var Box = function Box(_ref) {
|
|
16228
16288
|
var children = _ref.children,
|
|
16229
16289
|
style = _ref.style,
|
|
16230
16290
|
testID = _ref.testID,
|
|
16231
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
16291
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$9);
|
|
16232
16292
|
|
|
16233
16293
|
return /*#__PURE__*/React__default["default"].createElement(StyledBox, _extends$1({}, otherProps, {
|
|
16234
16294
|
style: style,
|
|
@@ -18943,13 +19003,13 @@ var Indicator = index$7(reactNative.View)(function (_ref2) {
|
|
|
18943
19003
|
};
|
|
18944
19004
|
});
|
|
18945
19005
|
|
|
18946
|
-
var _excluded$
|
|
19006
|
+
var _excluded$8 = ["intent", "children"];
|
|
18947
19007
|
|
|
18948
19008
|
var DataCard = function DataCard(_ref) {
|
|
18949
19009
|
var _ref$intent = _ref.intent,
|
|
18950
19010
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
18951
19011
|
children = _ref.children,
|
|
18952
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
19012
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
18953
19013
|
|
|
18954
19014
|
return /*#__PURE__*/React__default["default"].createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default["default"].createElement(Indicator, {
|
|
18955
19015
|
themeIntent: intent,
|
|
@@ -18980,14 +19040,14 @@ var LeftDataCard = index$7(reactNative.View)(function (_ref2) {
|
|
|
18980
19040
|
};
|
|
18981
19041
|
});
|
|
18982
19042
|
|
|
18983
|
-
var _excluded$
|
|
19043
|
+
var _excluded$7 = ["variant", "intent", "children"];
|
|
18984
19044
|
|
|
18985
19045
|
var Card = function Card(_ref) {
|
|
18986
19046
|
var _ref$variant = _ref.variant,
|
|
18987
19047
|
variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
|
|
18988
19048
|
intent = _ref.intent,
|
|
18989
19049
|
children = _ref.children,
|
|
18990
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
19050
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
18991
19051
|
|
|
18992
19052
|
return /*#__PURE__*/React__default["default"].createElement(StyledCard, _extends$1({}, nativeProps, {
|
|
18993
19053
|
themeVariant: variant,
|
|
@@ -19219,7 +19279,7 @@ var StyledErrorAndMaxLengthContainer = index$7(reactNative.View)(function () {
|
|
|
19219
19279
|
};
|
|
19220
19280
|
});
|
|
19221
19281
|
|
|
19222
|
-
var _excluded$
|
|
19282
|
+
var _excluded$6 = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue"];
|
|
19223
19283
|
var getVariant$1 = function getVariant(_ref) {
|
|
19224
19284
|
var disabled = _ref.disabled,
|
|
19225
19285
|
error = _ref.error,
|
|
@@ -19273,9 +19333,9 @@ var TextInput = function TextInput(_ref2) {
|
|
|
19273
19333
|
helpText = _ref2.helpText,
|
|
19274
19334
|
value = _ref2.value,
|
|
19275
19335
|
defaultValue = _ref2.defaultValue,
|
|
19276
|
-
|
|
19336
|
+
renderInputValue = _ref2.renderInputValue,
|
|
19337
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$6);
|
|
19277
19338
|
|
|
19278
|
-
var textInputReference = React.useRef(null);
|
|
19279
19339
|
var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
19280
19340
|
var isEmptyValue = displayText.length === 0;
|
|
19281
19341
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
@@ -19295,6 +19355,42 @@ var TextInput = function TextInput(_ref2) {
|
|
|
19295
19355
|
});
|
|
19296
19356
|
var shouldShowMaxLength = maxLength !== undefined;
|
|
19297
19357
|
var theme = useTheme();
|
|
19358
|
+
|
|
19359
|
+
var nativeInputProps = _objectSpread2(_objectSpread2({
|
|
19360
|
+
style: reactNative.StyleSheet.flatten([{
|
|
19361
|
+
color: theme.__hd__.textInput.colors.text
|
|
19362
|
+
}, textStyle]),
|
|
19363
|
+
testID: 'text-input',
|
|
19364
|
+
accessibilityState: {
|
|
19365
|
+
disabled: variant === 'disabled' || variant === 'readonly'
|
|
19366
|
+
},
|
|
19367
|
+
// @ts-ignore
|
|
19368
|
+
accessibilityLabelledBy: accessibilityLabelledBy
|
|
19369
|
+
}, nativeProps), {}, {
|
|
19370
|
+
onFocus: function onFocus(event) {
|
|
19371
|
+
var _nativeProps$onFocus;
|
|
19372
|
+
|
|
19373
|
+
setIsFocused(true);
|
|
19374
|
+
(_nativeProps$onFocus = nativeProps.onFocus) === null || _nativeProps$onFocus === void 0 ? void 0 : _nativeProps$onFocus.call(nativeProps, event);
|
|
19375
|
+
},
|
|
19376
|
+
onBlur: function onBlur(event) {
|
|
19377
|
+
var _nativeProps$onBlur;
|
|
19378
|
+
|
|
19379
|
+
setIsFocused(false);
|
|
19380
|
+
(_nativeProps$onBlur = nativeProps.onBlur) === null || _nativeProps$onBlur === void 0 ? void 0 : _nativeProps$onBlur.call(nativeProps, event);
|
|
19381
|
+
},
|
|
19382
|
+
editable: editable,
|
|
19383
|
+
maxLength: maxLength,
|
|
19384
|
+
value: value,
|
|
19385
|
+
onChangeText: function onChangeText(text) {
|
|
19386
|
+
var _nativeProps$onChange;
|
|
19387
|
+
|
|
19388
|
+
(_nativeProps$onChange = nativeProps.onChangeText) === null || _nativeProps$onChange === void 0 ? void 0 : _nativeProps$onChange.call(nativeProps, text);
|
|
19389
|
+
},
|
|
19390
|
+
defaultValue: defaultValue,
|
|
19391
|
+
placeholder: variant === 'focused' ? nativeProps.placeholder : undefined
|
|
19392
|
+
});
|
|
19393
|
+
|
|
19298
19394
|
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
|
|
19299
19395
|
style: style,
|
|
19300
19396
|
pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
|
|
@@ -19325,43 +19421,7 @@ var TextInput = function TextInput(_ref2) {
|
|
|
19325
19421
|
testID: "input-label",
|
|
19326
19422
|
fontSize: "medium",
|
|
19327
19423
|
themeVariant: variant
|
|
19328
|
-
}, label)), /*#__PURE__*/React__default["default"].createElement(StyledTextInput
|
|
19329
|
-
// hence, adding this to make the text color the same as iOS
|
|
19330
|
-
, _extends$1({
|
|
19331
|
-
style: reactNative.StyleSheet.flatten([{
|
|
19332
|
-
color: theme.__hd__.textInput.colors.text
|
|
19333
|
-
}, textStyle]),
|
|
19334
|
-
testID: "text-input",
|
|
19335
|
-
accessibilityState: {
|
|
19336
|
-
disabled: variant === 'disabled' || variant === 'readonly'
|
|
19337
|
-
} // @ts-ignore
|
|
19338
|
-
,
|
|
19339
|
-
accessibilityLabelledBy: accessibilityLabelledBy
|
|
19340
|
-
}, nativeProps, {
|
|
19341
|
-
onFocus: function onFocus(event) {
|
|
19342
|
-
var _nativeProps$onFocus;
|
|
19343
|
-
|
|
19344
|
-
setIsFocused(true);
|
|
19345
|
-
(_nativeProps$onFocus = nativeProps.onFocus) === null || _nativeProps$onFocus === void 0 ? void 0 : _nativeProps$onFocus.call(nativeProps, event);
|
|
19346
|
-
},
|
|
19347
|
-
onBlur: function onBlur(event) {
|
|
19348
|
-
var _nativeProps$onBlur;
|
|
19349
|
-
|
|
19350
|
-
setIsFocused(false);
|
|
19351
|
-
(_nativeProps$onBlur = nativeProps.onBlur) === null || _nativeProps$onBlur === void 0 ? void 0 : _nativeProps$onBlur.call(nativeProps, event);
|
|
19352
|
-
},
|
|
19353
|
-
ref: textInputReference,
|
|
19354
|
-
editable: editable,
|
|
19355
|
-
maxLength: maxLength,
|
|
19356
|
-
value: value,
|
|
19357
|
-
onChangeText: function onChangeText(text) {
|
|
19358
|
-
var _nativeProps$onChange;
|
|
19359
|
-
|
|
19360
|
-
(_nativeProps$onChange = nativeProps.onChangeText) === null || _nativeProps$onChange === void 0 ? void 0 : _nativeProps$onChange.call(nativeProps, text);
|
|
19361
|
-
},
|
|
19362
|
-
defaultValue: defaultValue,
|
|
19363
|
-
placeholder: variant === 'focused' ? nativeProps.placeholder : undefined
|
|
19364
|
-
}))), typeof actualSuffix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
19424
|
+
}, label)), renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/React__default["default"].createElement(StyledTextInput, nativeInputProps)), typeof actualSuffix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
19365
19425
|
intent: variant === 'disabled' ? 'disabled-text' : 'text',
|
|
19366
19426
|
testID: "input-suffix",
|
|
19367
19427
|
icon: actualSuffix,
|
|
@@ -19843,19 +19903,9 @@ var StyledWrapper$4 = index$7(reactNative.View)(function (_ref) {
|
|
|
19843
19903
|
padding: theme.__hd__.empty.space.wrapperPadding
|
|
19844
19904
|
};
|
|
19845
19905
|
});
|
|
19846
|
-
var
|
|
19847
|
-
var theme = _ref2.theme
|
|
19848
|
-
|
|
19849
|
-
height: theme.__hd__.empty.sizes.illustration,
|
|
19850
|
-
width: theme.__hd__.empty.sizes.illustration,
|
|
19851
|
-
borderRadius: theme.__hd__.empty.radii.illustration,
|
|
19852
|
-
backgroundColor: theme.__hd__.empty.colors.illustrationBackground,
|
|
19853
|
-
marginBottom: theme.__hd__.empty.space.illustrationMargin
|
|
19854
|
-
};
|
|
19855
|
-
});
|
|
19856
|
-
var StyledTitle = index$7(reactNative.Text)(function (_ref3) {
|
|
19857
|
-
var theme = _ref3.theme,
|
|
19858
|
-
themeVariant = _ref3.themeVariant;
|
|
19906
|
+
var StyledTitle = index$7(reactNative.Text)(function (_ref2) {
|
|
19907
|
+
var theme = _ref2.theme,
|
|
19908
|
+
themeVariant = _ref2.themeVariant;
|
|
19859
19909
|
return {
|
|
19860
19910
|
fontFamily: theme.__hd__.empty.fonts.title,
|
|
19861
19911
|
fontSize: theme.__hd__.empty.fontSizes.title,
|
|
@@ -19864,9 +19914,9 @@ var StyledTitle = index$7(reactNative.Text)(function (_ref3) {
|
|
|
19864
19914
|
color: themeVariant === 'dark' ? theme.__hd__.empty.colors.invertedText : theme.__hd__.empty.colors.text
|
|
19865
19915
|
};
|
|
19866
19916
|
});
|
|
19867
|
-
var StyledDescription = index$7(reactNative.Text)(function (
|
|
19868
|
-
var theme =
|
|
19869
|
-
themeVariant =
|
|
19917
|
+
var StyledDescription = index$7(reactNative.Text)(function (_ref3) {
|
|
19918
|
+
var theme = _ref3.theme,
|
|
19919
|
+
themeVariant = _ref3.themeVariant;
|
|
19870
19920
|
return {
|
|
19871
19921
|
fontFamily: theme.__hd__.empty.fonts.description,
|
|
19872
19922
|
fontSize: theme.__hd__.empty.fontSizes.description,
|
|
@@ -19876,16 +19926,22 @@ var StyledDescription = index$7(reactNative.Text)(function (_ref4) {
|
|
|
19876
19926
|
});
|
|
19877
19927
|
|
|
19878
19928
|
var Empty = function Empty(_ref) {
|
|
19879
|
-
var
|
|
19929
|
+
var image = _ref.image,
|
|
19930
|
+
title = _ref.title,
|
|
19880
19931
|
description = _ref.description,
|
|
19881
19932
|
style = _ref.style,
|
|
19882
19933
|
testID = _ref.testID,
|
|
19883
19934
|
_ref$variant = _ref.variant,
|
|
19884
19935
|
variant = _ref$variant === void 0 ? 'light' : _ref$variant;
|
|
19936
|
+
var theme = useTheme();
|
|
19885
19937
|
return /*#__PURE__*/React__default["default"].createElement(StyledWrapper$4, {
|
|
19886
19938
|
style: style,
|
|
19887
19939
|
testID: testID
|
|
19888
|
-
}, /*#__PURE__*/React__default["default"].
|
|
19940
|
+
}, image !== undefined && /*#__PURE__*/React__default["default"].cloneElement(image, _objectSpread2(_objectSpread2({}, image.props), {}, {
|
|
19941
|
+
style: [{
|
|
19942
|
+
marginBottom: theme.__hd__.empty.space.imageMargin
|
|
19943
|
+
}, image.props.style]
|
|
19944
|
+
})), /*#__PURE__*/React__default["default"].createElement(StyledTitle, {
|
|
19889
19945
|
themeVariant: variant
|
|
19890
19946
|
}, title), !!description && /*#__PURE__*/React__default["default"].createElement(StyledDescription, {
|
|
19891
19947
|
themeVariant: variant
|
|
@@ -19928,12 +19984,12 @@ var StyledFABText = index$7(reactNative.Text)(function (_ref3) {
|
|
|
19928
19984
|
};
|
|
19929
19985
|
});
|
|
19930
19986
|
|
|
19931
|
-
var _excluded$
|
|
19987
|
+
var _excluded$5 = ["active"];
|
|
19932
19988
|
var AnimatedIcons = reactNative.Animated.createAnimatedComponent(StyledFABIcon);
|
|
19933
19989
|
|
|
19934
19990
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
19935
19991
|
var active = _ref.active,
|
|
19936
|
-
iconProps = _objectWithoutProperties(_ref, _excluded$
|
|
19992
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
19937
19993
|
|
|
19938
19994
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
|
|
19939
19995
|
React.useEffect(function () {
|
|
@@ -20186,6 +20242,29 @@ var index$4 = Object.assign(FAB, {
|
|
|
20186
20242
|
ActionGroup: ActionGroup
|
|
20187
20243
|
});
|
|
20188
20244
|
|
|
20245
|
+
var _excluded$4 = ["rounded", "size", "testID", "style"];
|
|
20246
|
+
|
|
20247
|
+
var Image = function Image(_ref) {
|
|
20248
|
+
var _ref$rounded = _ref.rounded,
|
|
20249
|
+
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
20250
|
+
_ref$size = _ref.size,
|
|
20251
|
+
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
20252
|
+
testID = _ref.testID,
|
|
20253
|
+
style = _ref.style,
|
|
20254
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$4);
|
|
20255
|
+
|
|
20256
|
+
var theme = useTheme();
|
|
20257
|
+
var imageSize = theme.__hd__.image.sizes[size];
|
|
20258
|
+
return /*#__PURE__*/React__default["default"].createElement(reactNative.Image, _extends$1({
|
|
20259
|
+
testID: testID,
|
|
20260
|
+
style: [{
|
|
20261
|
+
width: imageSize,
|
|
20262
|
+
height: imageSize,
|
|
20263
|
+
borderRadius: rounded ? imageSize / 2 : 0
|
|
20264
|
+
}, style]
|
|
20265
|
+
}, imageNativeProps));
|
|
20266
|
+
};
|
|
20267
|
+
|
|
20189
20268
|
var StyledListItemContainer$1 = index$7(reactNative.TouchableHighlight)(function (_ref) {
|
|
20190
20269
|
var theme = _ref.theme,
|
|
20191
20270
|
_ref$themeSelected = _ref.themeSelected,
|
|
@@ -20860,6 +20939,40 @@ var Progress = {
|
|
|
20860
20939
|
Bar: ProgressBar
|
|
20861
20940
|
};
|
|
20862
20941
|
|
|
20942
|
+
var Slider = function Slider(_ref) {
|
|
20943
|
+
var _ref$minimumValue = _ref.minimumValue,
|
|
20944
|
+
minimumValue = _ref$minimumValue === void 0 ? 0 : _ref$minimumValue,
|
|
20945
|
+
_ref$maximumValue = _ref.maximumValue,
|
|
20946
|
+
maximumValue = _ref$maximumValue === void 0 ? 1 : _ref$maximumValue,
|
|
20947
|
+
_ref$step = _ref.step,
|
|
20948
|
+
step = _ref$step === void 0 ? 0 : _ref$step,
|
|
20949
|
+
_ref$value = _ref.value,
|
|
20950
|
+
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
20951
|
+
onValueChange = _ref.onValueChange,
|
|
20952
|
+
onSlidingStart = _ref.onSlidingStart,
|
|
20953
|
+
onSlidingComplete = _ref.onSlidingComplete,
|
|
20954
|
+
_ref$disabled = _ref.disabled,
|
|
20955
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
20956
|
+
style = _ref.style,
|
|
20957
|
+
testID = _ref.testID;
|
|
20958
|
+
var theme = useTheme();
|
|
20959
|
+
return /*#__PURE__*/React__default["default"].createElement(RnSlider__default["default"], {
|
|
20960
|
+
minimumValue: minimumValue,
|
|
20961
|
+
maximumValue: maximumValue,
|
|
20962
|
+
step: step,
|
|
20963
|
+
value: value,
|
|
20964
|
+
onValueChange: onValueChange,
|
|
20965
|
+
onSlidingStart: onSlidingStart,
|
|
20966
|
+
onSlidingComplete: onSlidingComplete,
|
|
20967
|
+
disabled: disabled,
|
|
20968
|
+
minimumTrackTintColor: theme.__hd__.slider.colors.minimumTrackTint,
|
|
20969
|
+
thumbTintColor: theme.__hd__.slider.colors.thumbTint,
|
|
20970
|
+
maximumTrackTintColor: theme.__hd__.slider.colors.maximumTrackTint,
|
|
20971
|
+
style: style,
|
|
20972
|
+
testID: testID
|
|
20973
|
+
});
|
|
20974
|
+
};
|
|
20975
|
+
|
|
20863
20976
|
var StyledView$1 = index$7(reactNative.View)();
|
|
20864
20977
|
var StyledSpinnerContainer = index$7(reactNative.View)({
|
|
20865
20978
|
height: '100%',
|
|
@@ -21182,72 +21295,6 @@ var Footer = function Footer(_ref) {
|
|
|
21182
21295
|
}, label));
|
|
21183
21296
|
};
|
|
21184
21297
|
|
|
21185
|
-
var isSections = function isSections(options) {
|
|
21186
|
-
var firstOption = options[0];
|
|
21187
|
-
return firstOption !== undefined && firstOption.category !== undefined;
|
|
21188
|
-
};
|
|
21189
|
-
var toSections = function toSections(options) {
|
|
21190
|
-
if (isSections(options)) {
|
|
21191
|
-
return options;
|
|
21192
|
-
}
|
|
21193
|
-
|
|
21194
|
-
return [{
|
|
21195
|
-
category: '',
|
|
21196
|
-
data: options
|
|
21197
|
-
}];
|
|
21198
|
-
};
|
|
21199
|
-
var toFlatOptions = function toFlatOptions(options) {
|
|
21200
|
-
if (isSections(options)) {
|
|
21201
|
-
return options.flatMap(function (opt) {
|
|
21202
|
-
return opt.data;
|
|
21203
|
-
});
|
|
21204
|
-
}
|
|
21205
|
-
|
|
21206
|
-
return options;
|
|
21207
|
-
};
|
|
21208
|
-
var getScrollParams = function getScrollParams(value, sections) {
|
|
21209
|
-
var itemIndex = -1;
|
|
21210
|
-
var sectionIndex = sections.findIndex(function (section) {
|
|
21211
|
-
itemIndex = section.data.findIndex(function (opt) {
|
|
21212
|
-
return opt.value === value;
|
|
21213
|
-
});
|
|
21214
|
-
return itemIndex !== -1;
|
|
21215
|
-
});
|
|
21216
|
-
return {
|
|
21217
|
-
sectionIndex: sectionIndex < 0 ? 0 : sectionIndex,
|
|
21218
|
-
itemIndex: itemIndex < 0 ? 0 : itemIndex
|
|
21219
|
-
};
|
|
21220
|
-
};
|
|
21221
|
-
var useKeyboard = function useKeyboard() {
|
|
21222
|
-
var _useState = React.useState(false),
|
|
21223
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
21224
|
-
isKeyboardVisible = _useState2[0],
|
|
21225
|
-
setKeyboardVisible = _useState2[1];
|
|
21226
|
-
|
|
21227
|
-
var _useState3 = React.useState(0),
|
|
21228
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
21229
|
-
keyboardHeight = _useState4[0],
|
|
21230
|
-
setKeyboardHeight = _useState4[1];
|
|
21231
|
-
|
|
21232
|
-
React.useEffect(function () {
|
|
21233
|
-
var keyboardWillShowListener = reactNative.Keyboard.addListener('keyboardWillShow', function (e) {
|
|
21234
|
-
setKeyboardVisible(true);
|
|
21235
|
-
setKeyboardHeight(e.endCoordinates.height);
|
|
21236
|
-
});
|
|
21237
|
-
var keyboardWillHideListener = reactNative.Keyboard.addListener('keyboardWillHide', function () {
|
|
21238
|
-
setKeyboardVisible(false);
|
|
21239
|
-
});
|
|
21240
|
-
return function () {
|
|
21241
|
-
keyboardWillShowListener.remove();
|
|
21242
|
-
keyboardWillHideListener.remove();
|
|
21243
|
-
};
|
|
21244
|
-
}, []);
|
|
21245
|
-
return {
|
|
21246
|
-
isKeyboardVisible: isKeyboardVisible,
|
|
21247
|
-
keyboardHeight: keyboardHeight
|
|
21248
|
-
};
|
|
21249
|
-
};
|
|
21250
|
-
|
|
21251
21298
|
var StyledOptionList = function StyledOptionList(_ref) {
|
|
21252
21299
|
var keyExtractor = _ref.keyExtractor,
|
|
21253
21300
|
loading = _ref.loading,
|
|
@@ -21255,9 +21302,8 @@ var StyledOptionList = function StyledOptionList(_ref) {
|
|
|
21255
21302
|
onQueryChange = _ref.onQueryChange,
|
|
21256
21303
|
sections = _ref.sections,
|
|
21257
21304
|
renderItem = _ref.renderItem,
|
|
21258
|
-
|
|
21305
|
+
sectionListRef = _ref.sectionListRef;
|
|
21259
21306
|
var theme = useTheme$1();
|
|
21260
|
-
var sectionListRef = React.useRef(null);
|
|
21261
21307
|
|
|
21262
21308
|
var _useState = React.useState(false),
|
|
21263
21309
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -21276,11 +21322,6 @@ var StyledOptionList = function StyledOptionList(_ref) {
|
|
|
21276
21322
|
return setOnEndReachedCalled(true);
|
|
21277
21323
|
},
|
|
21278
21324
|
onScrollToIndexFailed: function onScrollToIndexFailed() {},
|
|
21279
|
-
onContentSizeChange: function onContentSizeChange() {
|
|
21280
|
-
var _sectionListRef$curre;
|
|
21281
|
-
|
|
21282
|
-
return sections.length && ((_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams));
|
|
21283
|
-
},
|
|
21284
21325
|
onMomentumScrollBegin: function onMomentumScrollBegin() {
|
|
21285
21326
|
if (onEndReached && onEndReachedCalled && !loading) onEndReached();
|
|
21286
21327
|
setOnEndReachedCalled(false);
|
|
@@ -21334,9 +21375,8 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
21334
21375
|
onQueryChange = _ref.onQueryChange,
|
|
21335
21376
|
sections = _ref.sections,
|
|
21336
21377
|
renderOption = _ref.renderOption,
|
|
21337
|
-
value = _ref.value
|
|
21338
|
-
|
|
21339
|
-
var scrollParams = getScrollParams(firstValue, sections);
|
|
21378
|
+
value = _ref.value,
|
|
21379
|
+
sectionListRef = _ref.sectionListRef;
|
|
21340
21380
|
|
|
21341
21381
|
var renderItem = function renderItem(info) {
|
|
21342
21382
|
var item = info.item;
|
|
@@ -21370,10 +21410,76 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
21370
21410
|
onQueryChange: onQueryChange,
|
|
21371
21411
|
sections: sections,
|
|
21372
21412
|
renderItem: renderItem,
|
|
21373
|
-
|
|
21413
|
+
sectionListRef: sectionListRef
|
|
21374
21414
|
});
|
|
21375
21415
|
};
|
|
21376
21416
|
|
|
21417
|
+
var isSections = function isSections(options) {
|
|
21418
|
+
var firstOption = options[0];
|
|
21419
|
+
return firstOption !== undefined && firstOption.category !== undefined;
|
|
21420
|
+
};
|
|
21421
|
+
var toSections = function toSections(options) {
|
|
21422
|
+
if (isSections(options)) {
|
|
21423
|
+
return options;
|
|
21424
|
+
}
|
|
21425
|
+
|
|
21426
|
+
return [{
|
|
21427
|
+
category: '',
|
|
21428
|
+
data: options
|
|
21429
|
+
}];
|
|
21430
|
+
};
|
|
21431
|
+
var toFlatOptions = function toFlatOptions(options) {
|
|
21432
|
+
if (isSections(options)) {
|
|
21433
|
+
return options.flatMap(function (opt) {
|
|
21434
|
+
return opt.data;
|
|
21435
|
+
});
|
|
21436
|
+
}
|
|
21437
|
+
|
|
21438
|
+
return options;
|
|
21439
|
+
};
|
|
21440
|
+
var getScrollParams = function getScrollParams(value, sections) {
|
|
21441
|
+
var itemIndex = -1;
|
|
21442
|
+
var sectionIndex = sections.findIndex(function (section) {
|
|
21443
|
+
itemIndex = section.data.findIndex(function (opt) {
|
|
21444
|
+
return opt.value === value;
|
|
21445
|
+
});
|
|
21446
|
+
return itemIndex !== -1;
|
|
21447
|
+
});
|
|
21448
|
+
return {
|
|
21449
|
+
sectionIndex: sectionIndex < 0 ? 0 : sectionIndex,
|
|
21450
|
+
itemIndex: itemIndex < 0 ? 0 : itemIndex
|
|
21451
|
+
};
|
|
21452
|
+
};
|
|
21453
|
+
var useKeyboard = function useKeyboard() {
|
|
21454
|
+
var _useState = React.useState(false),
|
|
21455
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21456
|
+
isKeyboardVisible = _useState2[0],
|
|
21457
|
+
setKeyboardVisible = _useState2[1];
|
|
21458
|
+
|
|
21459
|
+
var _useState3 = React.useState(0),
|
|
21460
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21461
|
+
keyboardHeight = _useState4[0],
|
|
21462
|
+
setKeyboardHeight = _useState4[1];
|
|
21463
|
+
|
|
21464
|
+
React.useEffect(function () {
|
|
21465
|
+
var keyboardWillShowListener = reactNative.Keyboard.addListener('keyboardWillShow', function (e) {
|
|
21466
|
+
setKeyboardVisible(true);
|
|
21467
|
+
setKeyboardHeight(e.endCoordinates.height);
|
|
21468
|
+
});
|
|
21469
|
+
var keyboardWillHideListener = reactNative.Keyboard.addListener('keyboardWillHide', function () {
|
|
21470
|
+
setKeyboardVisible(false);
|
|
21471
|
+
});
|
|
21472
|
+
return function () {
|
|
21473
|
+
keyboardWillShowListener.remove();
|
|
21474
|
+
keyboardWillHideListener.remove();
|
|
21475
|
+
};
|
|
21476
|
+
}, []);
|
|
21477
|
+
return {
|
|
21478
|
+
isKeyboardVisible: isKeyboardVisible,
|
|
21479
|
+
keyboardHeight: keyboardHeight
|
|
21480
|
+
};
|
|
21481
|
+
};
|
|
21482
|
+
|
|
21377
21483
|
function MultiSelect(_ref) {
|
|
21378
21484
|
var footerLabel = _ref.footerLabel,
|
|
21379
21485
|
label = _ref.label,
|
|
@@ -21386,6 +21492,7 @@ function MultiSelect(_ref) {
|
|
|
21386
21492
|
onQueryChange = _ref.onQueryChange,
|
|
21387
21493
|
options = _ref.options,
|
|
21388
21494
|
renderOption = _ref.renderOption,
|
|
21495
|
+
renderSelectedValue = _ref.renderSelectedValue,
|
|
21389
21496
|
query = _ref.query,
|
|
21390
21497
|
error = _ref.error,
|
|
21391
21498
|
_ref$editable = _ref.editable,
|
|
@@ -21411,6 +21518,7 @@ function MultiSelect(_ref) {
|
|
|
21411
21518
|
selectingValue = _useState4[0],
|
|
21412
21519
|
setSelectingValue = _useState4[1];
|
|
21413
21520
|
|
|
21521
|
+
var sectionListRef = React.useRef(null);
|
|
21414
21522
|
var sections = toSections(options);
|
|
21415
21523
|
var flatOptions = toFlatOptions(options);
|
|
21416
21524
|
var displayedValue = flatOptions.filter(function (opt) {
|
|
@@ -21438,7 +21546,10 @@ function MultiSelect(_ref) {
|
|
|
21438
21546
|
numberOfLines: numberOfLines,
|
|
21439
21547
|
pointerEvents: "none",
|
|
21440
21548
|
style: style,
|
|
21441
|
-
testID: testID
|
|
21549
|
+
testID: testID,
|
|
21550
|
+
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
21551
|
+
return renderSelectedValue(value, props);
|
|
21552
|
+
} : undefined
|
|
21442
21553
|
})))), /*#__PURE__*/React__default["default"].createElement(BottomSheet, {
|
|
21443
21554
|
open: open,
|
|
21444
21555
|
onRequestClose: function onRequestClose() {
|
|
@@ -21455,7 +21566,15 @@ function MultiSelect(_ref) {
|
|
|
21455
21566
|
setOpen(false);
|
|
21456
21567
|
onConfirm(selectingValue);
|
|
21457
21568
|
}
|
|
21458
|
-
})
|
|
21569
|
+
}),
|
|
21570
|
+
onAnimationEnd: function onAnimationEnd() {
|
|
21571
|
+
if (open === true) {
|
|
21572
|
+
var _sectionListRef$curre;
|
|
21573
|
+
|
|
21574
|
+
var scrollParams = getScrollParams(value === null || value === void 0 ? void 0 : value[0], sections);
|
|
21575
|
+
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
21576
|
+
}
|
|
21577
|
+
}
|
|
21459
21578
|
}, onQueryChange && /*#__PURE__*/React__default["default"].createElement(StyledSearchBar, null, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
21460
21579
|
editable: true,
|
|
21461
21580
|
placeholder: "Search",
|
|
@@ -21469,7 +21588,8 @@ function MultiSelect(_ref) {
|
|
|
21469
21588
|
sections: sections,
|
|
21470
21589
|
renderOption: renderOption,
|
|
21471
21590
|
value: selectingValue,
|
|
21472
|
-
onPress: setSelectingValue
|
|
21591
|
+
onPress: setSelectingValue,
|
|
21592
|
+
sectionListRef: sectionListRef
|
|
21473
21593
|
})));
|
|
21474
21594
|
}
|
|
21475
21595
|
|
|
@@ -21499,8 +21619,8 @@ var OptionList = function OptionList(_ref) {
|
|
|
21499
21619
|
onQueryChange = _ref.onQueryChange,
|
|
21500
21620
|
sections = _ref.sections,
|
|
21501
21621
|
renderOption = _ref.renderOption,
|
|
21502
|
-
value = _ref.value
|
|
21503
|
-
|
|
21622
|
+
value = _ref.value,
|
|
21623
|
+
sectionListRef = _ref.sectionListRef;
|
|
21504
21624
|
|
|
21505
21625
|
var renderItem = function renderItem(info) {
|
|
21506
21626
|
var item = info.item;
|
|
@@ -21532,7 +21652,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
21532
21652
|
onQueryChange: onQueryChange,
|
|
21533
21653
|
sections: sections,
|
|
21534
21654
|
renderItem: renderItem,
|
|
21535
|
-
|
|
21655
|
+
sectionListRef: sectionListRef
|
|
21536
21656
|
});
|
|
21537
21657
|
};
|
|
21538
21658
|
|
|
@@ -21549,6 +21669,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
21549
21669
|
onQueryChange = _ref.onQueryChange,
|
|
21550
21670
|
options = _ref.options,
|
|
21551
21671
|
renderOption = _ref.renderOption,
|
|
21672
|
+
renderSelectedValue = _ref.renderSelectedValue,
|
|
21552
21673
|
query = _ref.query,
|
|
21553
21674
|
error = _ref.error,
|
|
21554
21675
|
_ref$editable = _ref.editable,
|
|
@@ -21569,6 +21690,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
21569
21690
|
open = _useState2[0],
|
|
21570
21691
|
setOpen = _useState2[1];
|
|
21571
21692
|
|
|
21693
|
+
var sectionListRef = React.useRef(null);
|
|
21572
21694
|
var sections = toSections(options);
|
|
21573
21695
|
var flatOptions = toFlatOptions(options);
|
|
21574
21696
|
var displayedValue = (_flatOptions$find = flatOptions.find(function (opt) {
|
|
@@ -21594,7 +21716,10 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
21594
21716
|
numberOfLines: numberOfLines,
|
|
21595
21717
|
pointerEvents: "none",
|
|
21596
21718
|
style: style,
|
|
21597
|
-
testID: testID
|
|
21719
|
+
testID: testID,
|
|
21720
|
+
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
21721
|
+
return renderSelectedValue(value, props);
|
|
21722
|
+
} : undefined
|
|
21598
21723
|
})))), /*#__PURE__*/React__default["default"].createElement(BottomSheet, {
|
|
21599
21724
|
open: open,
|
|
21600
21725
|
onRequestClose: function onRequestClose() {
|
|
@@ -21604,6 +21729,14 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
21604
21729
|
header: label,
|
|
21605
21730
|
style: {
|
|
21606
21731
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
21732
|
+
},
|
|
21733
|
+
onAnimationEnd: function onAnimationEnd() {
|
|
21734
|
+
if (open === true) {
|
|
21735
|
+
var _sectionListRef$curre;
|
|
21736
|
+
|
|
21737
|
+
var scrollParams = getScrollParams(value, sections);
|
|
21738
|
+
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
21739
|
+
}
|
|
21607
21740
|
}
|
|
21608
21741
|
}, onQueryChange && /*#__PURE__*/React__default["default"].createElement(StyledSearchBar, null, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
21609
21742
|
editable: true,
|
|
@@ -21621,7 +21754,8 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
21621
21754
|
onPress: function onPress(selectedValue) {
|
|
21622
21755
|
setOpen(false);
|
|
21623
21756
|
onConfirm(selectedValue);
|
|
21624
|
-
}
|
|
21757
|
+
},
|
|
21758
|
+
sectionListRef: sectionListRef
|
|
21625
21759
|
})));
|
|
21626
21760
|
};
|
|
21627
21761
|
|
|
@@ -21634,8 +21768,8 @@ var StyledWrapper = index$7(reactNative.View)(function (_ref) {
|
|
|
21634
21768
|
themeVariant = _ref.themeVariant,
|
|
21635
21769
|
themeSize = _ref.themeSize;
|
|
21636
21770
|
return {
|
|
21637
|
-
height: theme.__hd__["switch"].heights[themeSize],
|
|
21638
|
-
width: theme.__hd__["switch"].widths[themeSize],
|
|
21771
|
+
height: theme.__hd__["switch"].sizes.heights[themeSize],
|
|
21772
|
+
width: theme.__hd__["switch"].sizes.widths[themeSize],
|
|
21639
21773
|
paddingHorizontal: theme.__hd__["switch"].spaces[themeSize],
|
|
21640
21774
|
borderRadius: theme.__hd__["switch"].radii.rounded,
|
|
21641
21775
|
backgroundColor: theme.__hd__["switch"].colors.backgroundColors[themeVariant],
|
|
@@ -21647,8 +21781,8 @@ var StyledKnot = index$7(reactNative.Animated.View)(function (_ref2) {
|
|
|
21647
21781
|
var theme = _ref2.theme,
|
|
21648
21782
|
themeSize = _ref2.themeSize;
|
|
21649
21783
|
return {
|
|
21650
|
-
width: theme.__hd__["switch"].
|
|
21651
|
-
height: theme.__hd__["switch"].
|
|
21784
|
+
width: theme.__hd__["switch"].sizes.thumbs[themeSize],
|
|
21785
|
+
height: theme.__hd__["switch"].sizes.thumbs[themeSize],
|
|
21652
21786
|
backgroundColor: theme.__hd__["switch"].colors.thumb,
|
|
21653
21787
|
borderRadius: theme.__hd__["switch"].radii.rounded
|
|
21654
21788
|
};
|
|
@@ -21680,7 +21814,7 @@ var Switch = function Switch(_ref2) {
|
|
|
21680
21814
|
disabled: disabled,
|
|
21681
21815
|
checked: checked
|
|
21682
21816
|
});
|
|
21683
|
-
var offset = checked ? theme.__hd__["switch"].widths[size] - theme.__hd__["switch"].
|
|
21817
|
+
var offset = checked ? (theme.__hd__["switch"].sizes.widths[size] - theme.__hd__["switch"].sizes.thumbs[size]) / 2 + theme.__hd__["switch"].sizes.thumbs[size] / 2 : 0;
|
|
21684
21818
|
|
|
21685
21819
|
var _useState = React.useState(function () {
|
|
21686
21820
|
return new reactNative.Animated.Value(offset);
|
|
@@ -22808,19 +22942,6 @@ var ToolbarEvents;
|
|
|
22808
22942
|
ToolbarEvents["HeadingTwo"] = "heading-two";
|
|
22809
22943
|
})(ToolbarEvents || (ToolbarEvents = {}));
|
|
22810
22944
|
|
|
22811
|
-
var ToolbarButtonName;
|
|
22812
|
-
|
|
22813
|
-
(function (ToolbarButtonName) {
|
|
22814
|
-
ToolbarButtonName["Bold"] = "bold";
|
|
22815
|
-
ToolbarButtonName["Italic"] = "italic";
|
|
22816
|
-
ToolbarButtonName["Underline"] = "underline";
|
|
22817
|
-
ToolbarButtonName["BulletedList"] = "bulletedList";
|
|
22818
|
-
ToolbarButtonName["NumberedList"] = "numberedList";
|
|
22819
|
-
ToolbarButtonName["HeadingOne"] = "headingOne";
|
|
22820
|
-
ToolbarButtonName["HeadingTwo"] = "headingTwo";
|
|
22821
|
-
ToolbarButtonName["Seperator"] = "|";
|
|
22822
|
-
})(ToolbarButtonName || (ToolbarButtonName = {}));
|
|
22823
|
-
|
|
22824
22945
|
var emitter = new events.EventEmitter();
|
|
22825
22946
|
emitter.setMaxListeners(20);
|
|
22826
22947
|
|
|
@@ -22868,8 +22989,6 @@ var on = function on(emitter, eventName, listener) {
|
|
|
22868
22989
|
};
|
|
22869
22990
|
};
|
|
22870
22991
|
|
|
22871
|
-
var _buttonConfigs;
|
|
22872
|
-
|
|
22873
22992
|
var ToolbarButton = function ToolbarButton(_ref) {
|
|
22874
22993
|
var icon = _ref.icon,
|
|
22875
22994
|
onPress = _ref.onPress,
|
|
@@ -22885,33 +23004,41 @@ var ToolbarButton = function ToolbarButton(_ref) {
|
|
|
22885
23004
|
}));
|
|
22886
23005
|
};
|
|
22887
23006
|
|
|
22888
|
-
var buttonConfigs =
|
|
22889
|
-
|
|
22890
|
-
|
|
22891
|
-
|
|
22892
|
-
|
|
22893
|
-
|
|
22894
|
-
|
|
22895
|
-
|
|
22896
|
-
|
|
22897
|
-
|
|
22898
|
-
|
|
22899
|
-
|
|
22900
|
-
|
|
22901
|
-
|
|
22902
|
-
|
|
22903
|
-
|
|
22904
|
-
|
|
22905
|
-
}
|
|
22906
|
-
|
|
22907
|
-
|
|
22908
|
-
|
|
22909
|
-
|
|
22910
|
-
|
|
22911
|
-
|
|
22912
|
-
|
|
22913
|
-
|
|
22914
|
-
|
|
23007
|
+
var buttonConfigs = {
|
|
23008
|
+
bold: {
|
|
23009
|
+
icon: 'format-bold',
|
|
23010
|
+
eventName: ToolbarEvents.Bold
|
|
23011
|
+
},
|
|
23012
|
+
italic: {
|
|
23013
|
+
icon: 'format-italic',
|
|
23014
|
+
eventName: ToolbarEvents.Italic
|
|
23015
|
+
},
|
|
23016
|
+
underline: {
|
|
23017
|
+
icon: 'format-underlined',
|
|
23018
|
+
eventName: ToolbarEvents.Underline
|
|
23019
|
+
},
|
|
23020
|
+
bulletedList: {
|
|
23021
|
+
icon: 'format-list-bulleted',
|
|
23022
|
+
eventName: ToolbarEvents.BulletedList,
|
|
23023
|
+
standalone: true
|
|
23024
|
+
},
|
|
23025
|
+
numberedList: {
|
|
23026
|
+
icon: 'format-list-numbered',
|
|
23027
|
+
eventName: ToolbarEvents.NumberedList,
|
|
23028
|
+
standalone: true
|
|
23029
|
+
},
|
|
23030
|
+
headingOne: {
|
|
23031
|
+
icon: 'format-heading1',
|
|
23032
|
+
eventName: ToolbarEvents.HeadingOne,
|
|
23033
|
+
standalone: true
|
|
23034
|
+
},
|
|
23035
|
+
headingTwo: {
|
|
23036
|
+
icon: 'format-heading2',
|
|
23037
|
+
eventName: ToolbarEvents.HeadingTwo,
|
|
23038
|
+
standalone: true
|
|
23039
|
+
}
|
|
23040
|
+
};
|
|
23041
|
+
var defaultButtons = ['bold', 'italic', 'underline', '|', 'bulletedList', 'numberedList', '|', 'headingOne', 'headingTwo'];
|
|
22915
23042
|
|
|
22916
23043
|
var EditorToolbar = function EditorToolbar(_ref2) {
|
|
22917
23044
|
var name = _ref2.name,
|
|
@@ -22975,7 +23102,7 @@ var EditorToolbar = function EditorToolbar(_ref2) {
|
|
|
22975
23102
|
}, []);
|
|
22976
23103
|
var toolbarButtons = React.useMemo(function () {
|
|
22977
23104
|
return toolbarButtonArray.map(function (button) {
|
|
22978
|
-
if (button.buttonName ===
|
|
23105
|
+
if (button.buttonName === '|') {
|
|
22979
23106
|
return /*#__PURE__*/React__default["default"].createElement(StyledSeparator, {
|
|
22980
23107
|
key: button.id
|
|
22981
23108
|
});
|
|
@@ -40826,8 +40953,6 @@ var StyledWebView = index$7(reactNativeWebview.WebView)(function (_ref2) {
|
|
|
40826
40953
|
backgroundColor: 'transparent',
|
|
40827
40954
|
textAlignVertical: 'center',
|
|
40828
40955
|
fontSize: theme.__hd__.textInput.fontSizes.text,
|
|
40829
|
-
alignSelf: 'stretch',
|
|
40830
|
-
flexGrow: 2,
|
|
40831
40956
|
marginHorizontal: theme.__hd__.textInput.space.inputHorizontalMargin
|
|
40832
40957
|
};
|
|
40833
40958
|
});
|
|
@@ -40853,7 +40978,9 @@ var defaultValue = [{
|
|
|
40853
40978
|
}];
|
|
40854
40979
|
|
|
40855
40980
|
var RichTextEditor = function RichTextEditor(_ref) {
|
|
40856
|
-
var
|
|
40981
|
+
var _ref$autoFocus = _ref.autoFocus,
|
|
40982
|
+
autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
|
|
40983
|
+
name = _ref.name,
|
|
40857
40984
|
_ref$placeholder = _ref.placeholder,
|
|
40858
40985
|
placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
|
|
40859
40986
|
_ref$onChange = _ref.onChange,
|
|
@@ -40927,7 +41054,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
40927
41054
|
}, []);
|
|
40928
41055
|
var html = React.useMemo(function () {
|
|
40929
41056
|
var initialValueString = JSON.stringify(value);
|
|
40930
|
-
return "\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0\">\n <style>\n body {\n margin: 0;\n }\n </style>\n </head>\n <body>\n <div id=\"root\"></div>\n <script>\n window.__editorConfigs = {\n placeholder: \"".concat(placeholder, "\",\n initialValue: ").concat(initialValueString, ",\n isAndroid: ").concat(isAndroid ? 'true' : 'false', ",\n autoFocus:
|
|
41057
|
+
return "\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0\">\n <style>\n body {\n margin: 0;\n }\n </style>\n </head>\n <body>\n <div id=\"root\"></div>\n <script>\n window.__editorConfigs = {\n placeholder: \"".concat(placeholder, "\",\n initialValue: ").concat(initialValueString, ",\n isAndroid: ").concat(isAndroid ? 'true' : 'false', ",\n autoFocus: ").concat(autoFocus, ",\n style: {\n padding: '0 !important',\n fontSize: ").concat(theme.__hd__.richTextEditor.fontSizes.editor, "\n }\n };\n ").concat(heroEditorApp, "\n </script>\n </body>\n </html>\n ");
|
|
40931
41058
|
}, []);
|
|
40932
41059
|
var requestBlur = React.useCallback(function () {
|
|
40933
41060
|
if (webview.current) {
|
|
@@ -41013,7 +41140,6 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
41013
41140
|
}
|
|
41014
41141
|
}, []);
|
|
41015
41142
|
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
|
|
41016
|
-
style: style,
|
|
41017
41143
|
testID: testID
|
|
41018
41144
|
}, /*#__PURE__*/React__default["default"].createElement(StyledTextInputContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledBorderBackDrop, {
|
|
41019
41145
|
themeVariant: variant
|
|
@@ -41091,6 +41217,7 @@ exports.Drawer = index$5;
|
|
|
41091
41217
|
exports.Empty = Empty;
|
|
41092
41218
|
exports.FAB = index$4;
|
|
41093
41219
|
exports.Icon = Icon;
|
|
41220
|
+
exports.Image = Image;
|
|
41094
41221
|
exports.List = List;
|
|
41095
41222
|
exports.PinInput = PinInput;
|
|
41096
41223
|
exports.Progress = Progress;
|
|
@@ -41098,6 +41225,7 @@ exports.Radio = CompoundRadio;
|
|
|
41098
41225
|
exports.RichTextEditor = index;
|
|
41099
41226
|
exports.SectionHeading = SectionHeading;
|
|
41100
41227
|
exports.Select = index$3;
|
|
41228
|
+
exports.Slider = Slider;
|
|
41101
41229
|
exports.Spinner = Spinner;
|
|
41102
41230
|
exports.Switch = Switch;
|
|
41103
41231
|
exports.Tabs = index$2;
|