@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.
Files changed (106) hide show
  1. package/.eslintrc.json +1 -0
  2. package/.turbo/turbo-build.log +2 -2
  3. package/es/index.js +410 -285
  4. package/lib/index.js +410 -282
  5. package/package.json +4 -2
  6. package/rollup.config.js +1 -0
  7. package/src/components/BottomSheet/index.tsx +6 -1
  8. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +4 -4
  9. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +13 -13
  10. package/src/components/Empty/StyledEmpty.tsx +1 -9
  11. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +58 -5
  12. package/src/components/Empty/__tests__/index.spec.tsx +13 -0
  13. package/src/components/Empty/index.tsx +38 -18
  14. package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +81 -0
  15. package/src/components/Image/__tests__/index.spec.tsx +29 -0
  16. package/src/components/Image/index.tsx +46 -0
  17. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +5 -5
  18. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +60 -60
  19. package/src/components/RichTextEditor/EditorToolbar.tsx +19 -18
  20. package/src/components/RichTextEditor/RichTextEditor.tsx +7 -2
  21. package/src/components/RichTextEditor/StyledRichTextEditor.ts +0 -2
  22. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +7 -4
  23. package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +2 -2
  24. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -12
  25. package/src/components/RichTextEditor/constants.ts +0 -11
  26. package/src/components/RichTextEditor/index.tsx +0 -3
  27. package/src/components/RichTextEditor/types.ts +9 -0
  28. package/src/components/Select/MultiSelect/OptionList.tsx +4 -6
  29. package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +21 -0
  30. package/src/components/Select/MultiSelect/index.tsx +33 -3
  31. package/src/components/Select/SingleSelect/OptionList.tsx +4 -5
  32. package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +16 -0
  33. package/src/components/Select/SingleSelect/index.tsx +34 -4
  34. package/src/components/Select/StyledOptionList.tsx +3 -9
  35. package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +43 -0
  36. package/src/components/Slider/__tests__/index.spec.tsx +33 -0
  37. package/src/components/Slider/index.tsx +89 -0
  38. package/src/components/Switch/StyledSwitch.tsx +4 -4
  39. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +10 -10
  40. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
  41. package/src/components/Switch/index.tsx +5 -4
  42. package/src/components/TextInput/index.tsx +43 -37
  43. package/src/index.ts +4 -0
  44. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +56 -11
  45. package/src/theme/components/alert.ts +1 -2
  46. package/src/theme/components/avatar.ts +8 -8
  47. package/src/theme/components/badge.ts +4 -4
  48. package/src/theme/components/bottomNavigation.ts +1 -1
  49. package/src/theme/components/bottomSheet.ts +2 -3
  50. package/src/theme/components/calendar.ts +9 -7
  51. package/src/theme/components/card.ts +1 -1
  52. package/src/theme/components/checkbox.ts +2 -5
  53. package/src/theme/components/datePicker.ts +3 -3
  54. package/src/theme/components/drawer.ts +2 -3
  55. package/src/theme/components/empty.ts +3 -8
  56. package/src/theme/components/fab.ts +2 -2
  57. package/src/theme/components/image.ts +12 -0
  58. package/src/theme/components/pinInput.ts +3 -3
  59. package/src/theme/components/progress.ts +2 -3
  60. package/src/theme/components/radio.ts +7 -3
  61. package/src/theme/components/richTextEditor.ts +4 -4
  62. package/src/theme/components/slider.ts +13 -0
  63. package/src/theme/components/switch.ts +16 -1
  64. package/src/theme/components/tabs.ts +1 -1
  65. package/src/theme/components/timePicker.ts +3 -3
  66. package/src/theme/components/toast.ts +1 -2
  67. package/src/theme/getTheme.ts +9 -2
  68. package/src/theme/global/colors/swag.ts +2 -0
  69. package/src/theme/global/colors/types.ts +2 -0
  70. package/src/theme/global/index.ts +3 -0
  71. package/src/theme/global/scale.ts +3 -0
  72. package/src/theme/global/sizes.ts +29 -0
  73. package/src/types.ts +0 -2
  74. package/testUtils/setup.tsx +14 -0
  75. package/types/components/BottomSheet/index.d.ts +5 -1
  76. package/types/components/Empty/StyledEmpty.d.ts +1 -7
  77. package/types/components/Empty/index.d.ts +8 -2
  78. package/types/components/Image/__tests__/index.spec.d.ts +1 -0
  79. package/types/components/Image/index.d.ts +17 -0
  80. package/types/components/RichTextEditor/EditorToolbar.d.ts +1 -1
  81. package/types/components/RichTextEditor/RichTextEditor.d.ts +4 -0
  82. package/types/components/RichTextEditor/constants.d.ts +0 -10
  83. package/types/components/RichTextEditor/index.d.ts +0 -2
  84. package/types/components/RichTextEditor/types.d.ts +1 -0
  85. package/types/components/Select/MultiSelect/OptionList.d.ts +5 -2
  86. package/types/components/Select/MultiSelect/index.d.ts +7 -1
  87. package/types/components/Select/SingleSelect/OptionList.d.ts +5 -2
  88. package/types/components/Select/SingleSelect/index.d.ts +8 -2
  89. package/types/components/Select/StyledOptionList.d.ts +4 -3
  90. package/types/components/Select/index.d.ts +1 -1
  91. package/types/components/Slider/__tests__/index.spec.d.ts +1 -0
  92. package/types/components/Slider/index.d.ts +52 -0
  93. package/types/components/TextInput/index.d.ts +2 -1
  94. package/types/index.d.ts +3 -1
  95. package/types/theme/components/datePicker.d.ts +2 -1
  96. package/types/theme/components/empty.d.ts +2 -5
  97. package/types/theme/components/image.d.ts +8 -0
  98. package/types/theme/components/slider.d.ts +9 -0
  99. package/types/theme/components/switch.d.ts +14 -1
  100. package/types/theme/components/timePicker.d.ts +2 -1
  101. package/types/theme/getTheme.d.ts +4 -0
  102. package/types/theme/global/colors/types.d.ts +2 -0
  103. package/types/theme/global/index.d.ts +3 -0
  104. package/types/theme/global/scale.d.ts +1 -0
  105. package/types/theme/global/sizes.d.ts +14 -0
  106. package/types/types.d.ts +1 -2
package/es/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import * as reactNative from 'react-native';
2
- import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, Easing, TouchableOpacity, Text as Text$1, Image, TouchableWithoutFeedback, Pressable, SafeAreaView, TouchableHighlight, Modal, TextInput as TextInput$1, PanResponder, InteractionManager, Keyboard, SectionList, FlatList, LayoutAnimation } from 'react-native';
2
+ import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, Easing, TouchableOpacity, Text as Text$1, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, TouchableHighlight, Modal, TextInput as TextInput$1, PanResponder, InteractionManager, SectionList, Keyboard, FlatList, LayoutAnimation } from 'react-native';
3
3
  import React, { useContext, createContext, createElement, forwardRef, useEffect, useCallback, useRef, useMemo, useState, useLayoutEffect, useImperativeHandle } from 'react';
4
4
  import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import DateTimePicker from '@react-native-community/datetimepicker';
7
+ import RnSlider from '@react-native-community/slider';
7
8
  import PagerView from 'react-native-pager-view';
8
9
  import { EventEmitter } from 'events';
9
10
  import { WebView } from 'react-native-webview';
@@ -272,12 +273,14 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
272
273
 
273
274
  var BASE_BORDER_WIDTH = 1;
274
275
  var BASE_SPACE = 8;
276
+ var BASE_SIZE = 8;
275
277
  var BASE_FONT = 'BeVietnamPro';
276
278
  var BASE_FONT_SIZE = 10;
277
279
  var BASE_RADIUS = 4;
278
280
  var scale$1 = {
279
281
  borderWidth: BASE_BORDER_WIDTH,
280
282
  space: BASE_SPACE,
283
+ size: BASE_SIZE,
281
284
  font: BASE_FONT,
282
285
  fontSize: BASE_FONT_SIZE,
283
286
  radius: BASE_RADIUS
@@ -1309,6 +1312,7 @@ var swagSystemPalette = {
1309
1312
  shadow: palette$5.greyLight45,
1310
1313
  __alpha__globalPrimary: palette$5.maasstrichtBlue,
1311
1314
  __alpha__globalSecondary1: palette$5.maasstrichtBlueLight30,
1315
+ __alpha__globalSecondary4: palette$5.maasstrichtBlueLight90,
1312
1316
  __alpha__globalNeutral3: palette$5.greyLight90,
1313
1317
  __alpha__globalLabel1: palette$5.vermilion,
1314
1318
  __alpha__globalLabel2: palette$5.deepSaffron,
@@ -1319,6 +1323,7 @@ var swagSystemPalette = {
1319
1323
  __alpha__globalLabel7: palette$5.seashell,
1320
1324
  __alpha__globalLabel8: palette$5.honeydew,
1321
1325
  __alpha__globalLabel9: palette$5.aliceBlue,
1326
+ __alpha__primary1: palette$2.scarletGum,
1322
1327
  __alpha__primary2: palette$2.mauve,
1323
1328
  __alpha__secondary1: palette$2.scarletGumLight30,
1324
1329
  __alpha__secondary2: palette$2.scarletGumLight50,
@@ -1426,6 +1431,20 @@ var getSpace = function getSpace(baseSpace) {
1426
1431
  };
1427
1432
  };
1428
1433
 
1434
+ var getSizes = function getSizes(baseSize) {
1435
+ return _objectSpread2(_objectSpread2({}, getSpace(baseSize)), {}, {
1436
+ xxxxxlarge: scale(baseSize * 8),
1437
+ '6xlarge': scale(baseSize * 9),
1438
+ '7xlarge': scale(baseSize * 10),
1439
+ '9xlarge': scale(baseSize * 12),
1440
+ '14xlarge': scale(baseSize * 17),
1441
+ '15xlarge': scale(baseSize * 18),
1442
+ '18xlarge': scale(baseSize * 21),
1443
+ '19xlarge': scale(baseSize * 22) // 176
1444
+
1445
+ });
1446
+ };
1447
+
1429
1448
  var getBorderWidths = function getBorderWidths(baseBorderWidth) {
1430
1449
  return {
1431
1450
  base: baseBorderWidth,
@@ -1451,6 +1470,7 @@ var getGlobalTheme = function getGlobalTheme(scale, systemPalette) {
1451
1470
  var lineHeights = getLineHeights(fontSizes);
1452
1471
  var borderWidths = getBorderWidths(scale.borderWidth);
1453
1472
  var space = getSpace(scale.space);
1473
+ var sizes = getSizes(scale.size);
1454
1474
  var radii = getRadii(scale.radius);
1455
1475
  return {
1456
1476
  colors: _objectSpread2({}, systemPalette),
@@ -1459,6 +1479,7 @@ var getGlobalTheme = function getGlobalTheme(scale, systemPalette) {
1459
1479
  lineHeights: lineHeights,
1460
1480
  borderWidths: borderWidths,
1461
1481
  space: space,
1482
+ sizes: sizes,
1462
1483
  radii: radii
1463
1484
  };
1464
1485
  };
@@ -1490,7 +1511,7 @@ var getAlertTheme = function getAlertTheme(theme) {
1490
1511
  divider: theme.colors.outline
1491
1512
  };
1492
1513
  var sizes = {
1493
- height: scale(48)
1514
+ height: theme.sizes.xxxlarge
1494
1515
  };
1495
1516
  var space = {
1496
1517
  contentPaddingHorizontal: theme.space.smallMedium,
@@ -1522,14 +1543,14 @@ var getAvatarTheme = function getAvatarTheme(theme) {
1522
1543
  warning: theme.colors.warning
1523
1544
  };
1524
1545
  var sizes = {
1525
- small: theme.space.xlarge,
1526
- medium: theme.space.xxlarge,
1527
- large: theme.space.xxxlarge,
1528
- xlarge: theme.space.xxxxlarge,
1529
- xxlarge: theme.space.xlarge * 2,
1530
- xxxlarge: theme.space.xxlarge * 2,
1531
- xxxxlarge: theme.space.xxxlarge * 2,
1532
- xxxxxlarge: theme.space.small * 17
1546
+ small: theme.sizes.xlarge,
1547
+ medium: theme.sizes.xxlarge,
1548
+ large: theme.sizes.xxxlarge,
1549
+ xlarge: theme.sizes.xxxxlarge,
1550
+ xxlarge: theme.sizes.xxxxxlarge,
1551
+ xxxlarge: theme.sizes['7xlarge'],
1552
+ xxxxlarge: theme.sizes['9xlarge'],
1553
+ xxxxxlarge: theme.sizes['14xlarge']
1533
1554
  };
1534
1555
  var fontSizes = {
1535
1556
  small: theme.fontSizes.large,
@@ -1572,10 +1593,10 @@ var getBadgeTheme = function getBadgeTheme(theme) {
1572
1593
  "default": theme.fontSizes.small
1573
1594
  };
1574
1595
  var sizes = {
1575
- height: theme.fontSizes.small + theme.space.small,
1576
- minWidth: theme.fontSizes.small + theme.space.small,
1577
- statusHeight: theme.space.small,
1578
- statusWidth: theme.space.small
1596
+ height: theme.fontSizes.small + theme.sizes.small,
1597
+ minWidth: theme.fontSizes.small + theme.sizes.small,
1598
+ statusHeight: theme.sizes.small,
1599
+ statusWidth: theme.sizes.small
1579
1600
  };
1580
1601
  var space = {
1581
1602
  horizontalPadding: theme.space.small,
@@ -1597,7 +1618,7 @@ var getBottomNavigationTheme = function getBottomNavigationTheme(theme) {
1597
1618
  background: theme.colors.platformBackground
1598
1619
  };
1599
1620
  var sizes = {
1600
- height: 72
1621
+ height: theme.sizes['6xlarge']
1601
1622
  };
1602
1623
  var shadows = {
1603
1624
  offset: {
@@ -1626,8 +1647,8 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
1626
1647
  backdrop: theme.colors.backgroundDark
1627
1648
  };
1628
1649
  var sizes = {
1629
- sectionHeight: scale(64),
1630
- closeIcon: scale(48)
1650
+ sectionHeight: theme.sizes.xxxxxlarge,
1651
+ closeIcon: theme.sizes.xxxlarge
1631
1652
  };
1632
1653
  var space = {
1633
1654
  headerWrapperVerticalPadding: theme.space.small,
@@ -1730,13 +1751,15 @@ var getCalendarTheme = function getCalendarTheme(theme) {
1730
1751
  primary: theme.colors.primary,
1731
1752
  inverted: theme.colors.invertedText
1732
1753
  };
1754
+ var cellSize = theme.sizes.xxxlarge;
1755
+ var markSize = theme.sizes.xsmall;
1733
1756
  var sizes = {
1734
- cellWidth: scale(48),
1735
- cellHeight: scale(48),
1736
- cellCircleWidth: scale(44),
1737
- cellCircleHeight: scale(44),
1738
- markWidth: scale(4),
1739
- markHeight: scale(4)
1757
+ cellWidth: cellSize,
1758
+ cellHeight: cellSize,
1759
+ cellCircleWidth: cellSize - markSize,
1760
+ cellCircleHeight: cellSize - markSize,
1761
+ markWidth: markSize,
1762
+ markHeight: markSize
1740
1763
  };
1741
1764
  var space = {
1742
1765
  rowVerticalPadding: theme.space.medium,
@@ -1765,7 +1788,7 @@ var getCardTheme = function getCardTheme(theme) {
1765
1788
  archived: theme.colors.archivedLight
1766
1789
  };
1767
1790
  var sizes = {
1768
- indicatorWidth: theme.space.medium
1791
+ indicatorWidth: theme.sizes.medium
1769
1792
  };
1770
1793
  var radii = {
1771
1794
  "default": theme.radii.large
@@ -1783,14 +1806,12 @@ var getCheckboxTheme = function getCheckboxTheme(theme) {
1783
1806
  disabledBorder: theme.colors.globalPrimaryLight
1784
1807
  };
1785
1808
  var space = {
1786
- // to remove the empty space above the check icon
1787
- // and also to center the check mark
1788
- iconTop: -scale(3),
1809
+ iconTop: 0,
1789
1810
  wrapperPadding: theme.space.medium,
1790
1811
  iconDescriptionPadding: theme.space.smallMedium
1791
1812
  };
1792
1813
  var sizes = {
1793
- icon: scale(20)
1814
+ icon: theme.sizes.large
1794
1815
  };
1795
1816
  var radii = {
1796
1817
  wrapper: theme.radii.medium,
@@ -1818,9 +1839,9 @@ var getContentNavigatorTheme = function getContentNavigatorTheme(theme) {
1818
1839
  };
1819
1840
  };
1820
1841
 
1821
- var getDatePickerTheme = function getDatePickerTheme() {
1842
+ var getDatePickerTheme = function getDatePickerTheme(theme) {
1822
1843
  var sizes = {
1823
- height: scale(176)
1844
+ height: theme.sizes['19xlarge']
1824
1845
  };
1825
1846
  return {
1826
1847
  sizes: sizes
@@ -1863,8 +1884,8 @@ var getDrawerTheme = function getDrawerTheme(theme) {
1863
1884
  handlerPaddingVertical: theme.space.small
1864
1885
  };
1865
1886
  var sizes = {
1866
- handlerWidth: scale(56),
1867
- handlerHeight: scale(4)
1887
+ handlerWidth: theme.sizes.xxxxlarge,
1888
+ handlerHeight: theme.sizes.xsmall
1868
1889
  };
1869
1890
  var shadows = {
1870
1891
  offset: {
@@ -1887,14 +1908,11 @@ var getDrawerTheme = function getDrawerTheme(theme) {
1887
1908
  var getEmptyTheme = function getEmptyTheme(theme) {
1888
1909
  var space = {
1889
1910
  titleMargin: theme.space.medium,
1890
- illustrationMargin: theme.space.large,
1911
+ imageMargin: theme.space.large,
1891
1912
  wrapperPadding: theme.space.medium
1892
1913
  };
1893
1914
  var sizes = {
1894
- illustration: scale(168)
1895
- };
1896
- var radii = {
1897
- illustration: theme.radii.rounded
1915
+ image: theme.sizes['18xlarge']
1898
1916
  };
1899
1917
  var colors = {
1900
1918
  text: theme.colors.text,
@@ -1915,8 +1933,7 @@ var getEmptyTheme = function getEmptyTheme(theme) {
1915
1933
  colors: colors,
1916
1934
  sizes: sizes,
1917
1935
  space: space,
1918
- fonts: fonts,
1919
- radii: radii
1936
+ fonts: fonts
1920
1937
  };
1921
1938
  };
1922
1939
 
@@ -1931,8 +1948,8 @@ var getFABTheme = function getFABTheme(theme) {
1931
1948
  actionItemText: theme.colors.invertedText
1932
1949
  };
1933
1950
  var sizes = {
1934
- width: 64,
1935
- height: 64
1951
+ width: theme.sizes.xxxxxlarge,
1952
+ height: theme.sizes.xxxxxlarge
1936
1953
  };
1937
1954
  var fonts = {
1938
1955
  header: theme.fonts.semiBold,
@@ -2004,6 +2021,16 @@ var getIconTheme = function getIconTheme(theme) {
2004
2021
  };
2005
2022
  };
2006
2023
 
2024
+ var getImageTheme = function getImageTheme(theme) {
2025
+ var sizes = {
2026
+ '6xlarge': theme.sizes['6xlarge'],
2027
+ '15xlarge': theme.sizes['15xlarge']
2028
+ };
2029
+ return {
2030
+ sizes: sizes
2031
+ };
2032
+ };
2033
+
2007
2034
  var getListTheme = function getListTheme(theme) {
2008
2035
  var colors = {
2009
2036
  checkedListItemContainerBackground: theme.colors.primaryBackground,
@@ -2073,9 +2100,9 @@ var getPinInputTheme = function getPinInputTheme(theme) {
2073
2100
  errorMessage: theme.fontSizes.small
2074
2101
  };
2075
2102
  var sizes = {
2076
- cellWidth: theme.space.xxlarge,
2077
- cellHeight: theme.space.xxxlarge,
2078
- mask: theme.space.medium
2103
+ cellWidth: theme.sizes.xxlarge,
2104
+ cellHeight: theme.sizes.xxxlarge,
2105
+ mask: theme.sizes.medium
2079
2106
  };
2080
2107
  var space = {
2081
2108
  spacer: theme.space.medium,
@@ -2107,8 +2134,8 @@ var getProgressTheme = function getProgressTheme(theme) {
2107
2134
  innerBackground: theme.colors.platformBackground
2108
2135
  };
2109
2136
  var sizes = {
2110
- circleWidth: scale(76),
2111
- barHeight: scale(4)
2137
+ circleWidth: theme.sizes['6xlarge'],
2138
+ barHeight: theme.sizes.xsmall
2112
2139
  };
2113
2140
  var radii = {
2114
2141
  "default": theme.radii.rounded
@@ -2128,9 +2155,13 @@ var getRadioTheme = function getRadioTheme(theme) {
2128
2155
  circleLeftMargin: theme.space.small,
2129
2156
  groupTopMargin: theme.space.xsmall
2130
2157
  };
2158
+ var boundingBoxSize = theme.sizes.large;
2159
+ var innerPadding = theme.space.xsmall;
2160
+ var circle = boundingBoxSize - innerPadding;
2161
+ var innerCircle = circle / 2;
2131
2162
  var sizes = {
2132
- circle: scale(20),
2133
- innerCircle: scale(10)
2163
+ circle: circle,
2164
+ innerCircle: innerCircle
2134
2165
  };
2135
2166
  var borderWidths = {
2136
2167
  circle: theme.borderWidths.medium
@@ -2153,10 +2184,10 @@ var getRichTextEditorTheme = function getRichTextEditorTheme(theme) {
2153
2184
  webViewBorderBottomWidth: 0.8
2154
2185
  };
2155
2186
  var sizes = {
2156
- editorMinHeight: 21,
2157
- toolbarButtonSize: theme.space.xxxlarge,
2158
- toolbarSeparatorWidth: 1,
2159
- toolbarSeparatorHeight: theme.space.medium
2187
+ editorMinHeight: theme.sizes.large,
2188
+ toolbarButtonSize: theme.sizes.xxxlarge,
2189
+ toolbarSeparatorWidth: theme.sizes.xxsmall,
2190
+ toolbarSeparatorHeight: theme.sizes.medium
2160
2191
  };
2161
2192
  var fontSizes = {
2162
2193
  editor: theme.fontSizes.medium
@@ -2214,6 +2245,17 @@ var getSelectTheme = function getSelectTheme(theme) {
2214
2245
  };
2215
2246
  };
2216
2247
 
2248
+ var getSliderTheme = function getSliderTheme(theme) {
2249
+ var colors = {
2250
+ minimumTrackTint: theme.colors.__alpha__primary1,
2251
+ thumbTint: theme.colors.__alpha__globalSecondary4,
2252
+ maximumTrackTint: theme.colors.__alpha__secondary4
2253
+ };
2254
+ return {
2255
+ colors: colors
2256
+ };
2257
+ };
2258
+
2217
2259
  var getSpinnerTheme = function getSpinnerTheme(theme) {
2218
2260
  var colors = {
2219
2261
  dot1: theme.colors.__alpha__secondary1,
@@ -2267,16 +2309,30 @@ var getSwitchTheme = function getSwitchTheme(theme) {
2267
2309
  small: theme.space.large,
2268
2310
  medium: theme.space.large * 1.2
2269
2311
  };
2312
+ var sizes = {
2313
+ thumbs: {
2314
+ small: theme.sizes.medium,
2315
+ medium: theme.sizes.large
2316
+ },
2317
+ widths: {
2318
+ small: theme.sizes.xxxlarge,
2319
+ medium: theme.sizes.xxxxxlarge
2320
+ },
2321
+ heights: {
2322
+ small: theme.sizes.large,
2323
+ medium: theme.sizes.xlarge
2324
+ }
2325
+ };
2270
2326
  var spaces = {
2271
2327
  small: theme.space.xsmall,
2272
- medium: theme.space.xsmall,
2273
- inactive: 0
2328
+ medium: theme.space.xsmall
2274
2329
  };
2275
2330
  var radii = {
2276
2331
  rounded: theme.radii.rounded
2277
2332
  };
2278
2333
  return {
2279
2334
  colors: colors,
2335
+ sizes: sizes,
2280
2336
  thumbSizes: thumbSizes,
2281
2337
  widths: widths,
2282
2338
  heights: heights,
@@ -2308,7 +2364,7 @@ var getTabsTheme = function getTabsTheme(theme) {
2308
2364
  headerBottom: theme.borderWidths.base
2309
2365
  };
2310
2366
  var sizes = {
2311
- indicator: theme.space.xxsmall
2367
+ indicator: theme.sizes.xxsmall
2312
2368
  };
2313
2369
  return {
2314
2370
  borderWidths: borderWidths,
@@ -2451,9 +2507,9 @@ var getTextInputTheme = function getTextInputTheme(theme) {
2451
2507
  };
2452
2508
  };
2453
2509
 
2454
- var getTimePickerTheme = function getTimePickerTheme() {
2510
+ var getTimePickerTheme = function getTimePickerTheme(theme) {
2455
2511
  var sizes = {
2456
- height: scale(176)
2512
+ height: theme.sizes['19xlarge']
2457
2513
  };
2458
2514
  return {
2459
2515
  sizes: sizes
@@ -2472,7 +2528,7 @@ var getToastTheme = function getToastTheme(theme) {
2472
2528
  shadow: theme.colors.backgroundDark
2473
2529
  };
2474
2530
  var sizes = {
2475
- height: scale(48)
2531
+ height: theme.sizes.xxxlarge
2476
2532
  };
2477
2533
  var space = {
2478
2534
  wrapperVerticalPadding: theme.space.large,
@@ -2589,12 +2645,13 @@ var getTheme$1 = function getTheme() {
2589
2645
  card: getCardTheme(globalTheme),
2590
2646
  checkbox: getCheckboxTheme(globalTheme),
2591
2647
  contentNavigator: getContentNavigatorTheme(globalTheme),
2592
- datePicker: getDatePickerTheme(),
2648
+ datePicker: getDatePickerTheme(globalTheme),
2593
2649
  divider: getDividerTheme(globalTheme),
2594
2650
  drawer: getDrawerTheme(globalTheme),
2595
2651
  empty: getEmptyTheme(globalTheme),
2596
2652
  fab: getFABTheme(globalTheme),
2597
2653
  icon: getIconTheme(globalTheme),
2654
+ image: getImageTheme(globalTheme),
2598
2655
  list: getListTheme(globalTheme),
2599
2656
  pinInput: getPinInputTheme(globalTheme),
2600
2657
  progress: getProgressTheme(globalTheme),
@@ -2602,12 +2659,13 @@ var getTheme$1 = function getTheme() {
2602
2659
  richTextEditor: getRichTextEditorTheme(globalTheme),
2603
2660
  sectionHeading: getSectionHeadingTheme(globalTheme),
2604
2661
  select: getSelectTheme(globalTheme),
2662
+ slider: getSliderTheme(globalTheme),
2605
2663
  spinner: getSpinnerTheme(globalTheme),
2606
2664
  "switch": getSwitchTheme(globalTheme),
2607
2665
  tabs: getTabsTheme(globalTheme),
2608
2666
  tag: getTagTheme(globalTheme),
2609
2667
  textInput: getTextInputTheme(globalTheme),
2610
- timePicker: getTimePickerTheme(),
2668
+ timePicker: getTimePickerTheme(globalTheme),
2611
2669
  toast: getToastTheme(globalTheme),
2612
2670
  toolbar: getToolbarTheme(globalTheme),
2613
2671
  typography: getTypographyTheme(globalTheme)
@@ -5977,7 +6035,7 @@ var StyledText$3 = index$7(Text$1)(function (_ref) {
5977
6035
  });
5978
6036
  });
5979
6037
 
5980
- var _excluded$h = ["children", "fontSize", "fontWeight", "intent"];
6038
+ var _excluded$i = ["children", "fontSize", "fontWeight", "intent"];
5981
6039
 
5982
6040
  var Text = function Text(_ref) {
5983
6041
  var children = _ref.children,
@@ -5987,7 +6045,7 @@ var Text = function Text(_ref) {
5987
6045
  fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
5988
6046
  _ref$intent = _ref.intent,
5989
6047
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
5990
- nativeProps = _objectWithoutProperties(_ref, _excluded$h);
6048
+ nativeProps = _objectWithoutProperties(_ref, _excluded$i);
5991
6049
 
5992
6050
  return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
5993
6051
  themeFontSize: fontSize,
@@ -14532,11 +14590,11 @@ var StyledHeroIcon = index$7(HeroIcon)(function (_ref) {
14532
14590
  };
14533
14591
  });
14534
14592
 
14535
- var _excluded$g = ["style"];
14593
+ var _excluded$h = ["style"];
14536
14594
 
14537
14595
  var AnimatedIcon = function AnimatedIcon(_ref) {
14538
14596
  var style = _ref.style,
14539
- otherProps = _objectWithoutProperties(_ref, _excluded$g);
14597
+ otherProps = _objectWithoutProperties(_ref, _excluded$h);
14540
14598
 
14541
14599
  var rotateAnimation = useRef(new Animated.Value(0));
14542
14600
  useEffect(function () {
@@ -14626,7 +14684,7 @@ function usePropsOrInternalState(initialState, state, setState) {
14626
14684
  return [state || internalState, setState || setInternalState];
14627
14685
  }
14628
14686
 
14629
- var _excluded$f = ["key"];
14687
+ var _excluded$g = ["key"];
14630
14688
 
14631
14689
  var Accordion = function Accordion(_ref) {
14632
14690
  var items = _ref.items,
@@ -14650,7 +14708,7 @@ var Accordion = function Accordion(_ref) {
14650
14708
  testID: testID
14651
14709
  }, items.map(function (_ref2, index) {
14652
14710
  var key = _ref2.key,
14653
- props = _objectWithoutProperties(_ref2, _excluded$f);
14711
+ props = _objectWithoutProperties(_ref2, _excluded$g);
14654
14712
 
14655
14713
  var open = _activeItemKey === key;
14656
14714
  return /*#__PURE__*/React.createElement(React.Fragment, {
@@ -14817,7 +14875,7 @@ var StyledText$2 = index$7(Text$1)(function (_ref3) {
14817
14875
  overflow: 'hidden'
14818
14876
  };
14819
14877
  });
14820
- var StyledImage = index$7(Image)(function (_ref4) {
14878
+ var StyledImage = index$7(Image$1)(function (_ref4) {
14821
14879
  var themeSize = _ref4.themeSize,
14822
14880
  theme = _ref4.theme;
14823
14881
  return {
@@ -14892,7 +14950,7 @@ var StyledStatus = index$7(Animated.View)(function (_ref3) {
14892
14950
  };
14893
14951
  });
14894
14952
 
14895
- var _excluded$e = ["children", "visible", "intent", "style", "testID"];
14953
+ var _excluded$f = ["children", "visible", "intent", "style", "testID"];
14896
14954
 
14897
14955
  var Status = function Status(_ref) {
14898
14956
  var children = _ref.children,
@@ -14902,7 +14960,7 @@ var Status = function Status(_ref) {
14902
14960
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
14903
14961
  style = _ref.style,
14904
14962
  testID = _ref.testID,
14905
- nativeProps = _objectWithoutProperties(_ref, _excluded$e);
14963
+ nativeProps = _objectWithoutProperties(_ref, _excluded$f);
14906
14964
 
14907
14965
  var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
14908
14966
  opacity = _React$useRef.current;
@@ -14938,7 +14996,7 @@ var Status = function Status(_ref) {
14938
14996
  }));
14939
14997
  };
14940
14998
 
14941
- var _excluded$d = ["content", "visible", "max", "intent", "style", "testID"];
14999
+ var _excluded$e = ["content", "visible", "max", "intent", "style", "testID"];
14942
15000
  var DEFAULT_MAX_NUMBER = 99;
14943
15001
 
14944
15002
  var getPaddingState = function getPaddingState(content) {
@@ -14955,7 +15013,7 @@ var Badge = function Badge(_ref) {
14955
15013
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
14956
15014
  style = _ref.style,
14957
15015
  testID = _ref.testID,
14958
- nativeProps = _objectWithoutProperties(_ref, _excluded$d);
15016
+ nativeProps = _objectWithoutProperties(_ref, _excluded$e);
14959
15017
 
14960
15018
  var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
14961
15019
  opacity = _React$useRef.current;
@@ -15051,7 +15109,7 @@ var StyledBottomBarText = index$7(Typography.Text)(function (_ref3) {
15051
15109
  var isIOS = Platform.OS === 'ios';
15052
15110
  var isAndroid = Platform.OS === 'android';
15053
15111
 
15054
- var _excluded$c = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
15112
+ var _excluded$d = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
15055
15113
 
15056
15114
  var getInactiveIcon = function getInactiveIcon(icon) {
15057
15115
  var inactiveIcon = "".concat(icon, "-outlined");
@@ -15064,7 +15122,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
15064
15122
  renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
15065
15123
  selectedTabKey = _ref.selectedTabKey,
15066
15124
  tabs = _ref.tabs,
15067
- nativeProps = _objectWithoutProperties(_ref, _excluded$c);
15125
+ nativeProps = _objectWithoutProperties(_ref, _excluded$d);
15068
15126
 
15069
15127
  var insets = useSafeAreaInsets();
15070
15128
  /**
@@ -15155,14 +15213,14 @@ var StyledDivider = index$7(View)(function (_ref) {
15155
15213
  }, horizontalMargin), verticalMargin);
15156
15214
  });
15157
15215
 
15158
- var _excluded$b = ["marginHorizontal", "marginVertical", "style", "testID"];
15216
+ var _excluded$c = ["marginHorizontal", "marginVertical", "style", "testID"];
15159
15217
 
15160
15218
  var Divider = function Divider(_ref) {
15161
15219
  var marginHorizontal = _ref.marginHorizontal,
15162
15220
  marginVertical = _ref.marginVertical,
15163
15221
  style = _ref.style,
15164
15222
  testID = _ref.testID,
15165
- nativeProps = _objectWithoutProperties(_ref, _excluded$b);
15223
+ nativeProps = _objectWithoutProperties(_ref, _excluded$c);
15166
15224
 
15167
15225
  return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({}, nativeProps, {
15168
15226
  themeMarginHorizontal: marginHorizontal,
@@ -15294,7 +15352,7 @@ var StyledLoadingDot = index$7(View)(function (_ref2) {
15294
15352
  }, themeStyling());
15295
15353
  });
15296
15354
 
15297
- var _excluded$a = ["count", "size", "testID", "themeVariant"];
15355
+ var _excluded$b = ["count", "size", "testID", "themeVariant"];
15298
15356
  var AnimatedLoadingIndicatorWrapper = Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
15299
15357
  var AnimatedLoadingDot = Animated.createAnimatedComponent(StyledLoadingDot);
15300
15358
 
@@ -15328,7 +15386,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
15328
15386
  size = _ref2$size === void 0 ? 12 : _ref2$size,
15329
15387
  testID = _ref2.testID,
15330
15388
  themeVariant = _ref2.themeVariant,
15331
- nativeProps = _objectWithoutProperties(_ref2, _excluded$a);
15389
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$b);
15332
15390
 
15333
15391
  var progressAnimation = useRef(new Animated.Value(0));
15334
15392
  useEffect(function () {
@@ -15868,6 +15926,7 @@ var BottomSheet = function BottomSheet(_ref) {
15868
15926
  header = _ref.header,
15869
15927
  footer = _ref.footer,
15870
15928
  children = _ref.children,
15929
+ onAnimationEnd = _ref.onAnimationEnd,
15871
15930
  onOpen = _ref.onOpen,
15872
15931
  onRequestClose = _ref.onRequestClose,
15873
15932
  onDismiss = _ref.onDismiss,
@@ -15920,7 +15979,7 @@ var BottomSheet = function BottomSheet(_ref) {
15920
15979
  easing: Easing.inOut(Easing.cubic),
15921
15980
  useNativeDriver: true
15922
15981
  });
15923
- animation.start();
15982
+ animation.start(onAnimationEnd);
15924
15983
  return function () {
15925
15984
  return animation.stop();
15926
15985
  };
@@ -16154,7 +16213,7 @@ var pick = function pick(keys, props) {
16154
16213
  }, {});
16155
16214
  };
16156
16215
 
16157
- var _excluded$9 = ["theme"];
16216
+ var _excluded$a = ["theme"];
16158
16217
  var getThemeValue = function getThemeValue(theme, key, props) {
16159
16218
  var propConfig = config[key];
16160
16219
  var propValue = props[key];
@@ -16187,20 +16246,20 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
16187
16246
  var configKeys = Object.keys(config);
16188
16247
  var StyledBox = index$7(View)(function (_ref5) {
16189
16248
  var theme = _ref5.theme,
16190
- otherProps = _objectWithoutProperties(_ref5, _excluded$9);
16249
+ otherProps = _objectWithoutProperties(_ref5, _excluded$a);
16191
16250
 
16192
16251
  var styleProps = pick(configKeys, otherProps);
16193
16252
  var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
16194
16253
  return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
16195
16254
  });
16196
16255
 
16197
- var _excluded$8 = ["children", "style", "testID"];
16256
+ var _excluded$9 = ["children", "style", "testID"];
16198
16257
 
16199
16258
  var Box = function Box(_ref) {
16200
16259
  var children = _ref.children,
16201
16260
  style = _ref.style,
16202
16261
  testID = _ref.testID,
16203
- otherProps = _objectWithoutProperties(_ref, _excluded$8);
16262
+ otherProps = _objectWithoutProperties(_ref, _excluded$9);
16204
16263
 
16205
16264
  return /*#__PURE__*/React.createElement(StyledBox, _extends$1({}, otherProps, {
16206
16265
  style: style,
@@ -18915,13 +18974,13 @@ var Indicator = index$7(View)(function (_ref2) {
18915
18974
  };
18916
18975
  });
18917
18976
 
18918
- var _excluded$7 = ["intent", "children"];
18977
+ var _excluded$8 = ["intent", "children"];
18919
18978
 
18920
18979
  var DataCard = function DataCard(_ref) {
18921
18980
  var _ref$intent = _ref.intent,
18922
18981
  intent = _ref$intent === void 0 ? 'info' : _ref$intent,
18923
18982
  children = _ref.children,
18924
- nativeProps = _objectWithoutProperties(_ref, _excluded$7);
18983
+ nativeProps = _objectWithoutProperties(_ref, _excluded$8);
18925
18984
 
18926
18985
  return /*#__PURE__*/React.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React.createElement(Indicator, {
18927
18986
  themeIntent: intent,
@@ -18952,14 +19011,14 @@ var LeftDataCard = index$7(View)(function (_ref2) {
18952
19011
  };
18953
19012
  });
18954
19013
 
18955
- var _excluded$6 = ["variant", "intent", "children"];
19014
+ var _excluded$7 = ["variant", "intent", "children"];
18956
19015
 
18957
19016
  var Card = function Card(_ref) {
18958
19017
  var _ref$variant = _ref.variant,
18959
19018
  variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
18960
19019
  intent = _ref.intent,
18961
19020
  children = _ref.children,
18962
- nativeProps = _objectWithoutProperties(_ref, _excluded$6);
19021
+ nativeProps = _objectWithoutProperties(_ref, _excluded$7);
18963
19022
 
18964
19023
  return /*#__PURE__*/React.createElement(StyledCard, _extends$1({}, nativeProps, {
18965
19024
  themeVariant: variant,
@@ -19191,7 +19250,7 @@ var StyledErrorAndMaxLengthContainer = index$7(View)(function () {
19191
19250
  };
19192
19251
  });
19193
19252
 
19194
- var _excluded$5 = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue"];
19253
+ var _excluded$6 = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue"];
19195
19254
  var getVariant$1 = function getVariant(_ref) {
19196
19255
  var disabled = _ref.disabled,
19197
19256
  error = _ref.error,
@@ -19245,9 +19304,9 @@ var TextInput = function TextInput(_ref2) {
19245
19304
  helpText = _ref2.helpText,
19246
19305
  value = _ref2.value,
19247
19306
  defaultValue = _ref2.defaultValue,
19248
- nativeProps = _objectWithoutProperties(_ref2, _excluded$5);
19307
+ renderInputValue = _ref2.renderInputValue,
19308
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$6);
19249
19309
 
19250
- var textInputReference = useRef(null);
19251
19310
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
19252
19311
  var isEmptyValue = displayText.length === 0;
19253
19312
  var actualSuffix = loading ? 'loading' : suffix;
@@ -19267,6 +19326,42 @@ var TextInput = function TextInput(_ref2) {
19267
19326
  });
19268
19327
  var shouldShowMaxLength = maxLength !== undefined;
19269
19328
  var theme = useTheme();
19329
+
19330
+ var nativeInputProps = _objectSpread2(_objectSpread2({
19331
+ style: StyleSheet$1.flatten([{
19332
+ color: theme.__hd__.textInput.colors.text
19333
+ }, textStyle]),
19334
+ testID: 'text-input',
19335
+ accessibilityState: {
19336
+ disabled: variant === 'disabled' || variant === 'readonly'
19337
+ },
19338
+ // @ts-ignore
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
+ editable: editable,
19354
+ maxLength: maxLength,
19355
+ value: value,
19356
+ onChangeText: function onChangeText(text) {
19357
+ var _nativeProps$onChange;
19358
+
19359
+ (_nativeProps$onChange = nativeProps.onChangeText) === null || _nativeProps$onChange === void 0 ? void 0 : _nativeProps$onChange.call(nativeProps, text);
19360
+ },
19361
+ defaultValue: defaultValue,
19362
+ placeholder: variant === 'focused' ? nativeProps.placeholder : undefined
19363
+ });
19364
+
19270
19365
  return /*#__PURE__*/React.createElement(StyledContainer$3, {
19271
19366
  style: style,
19272
19367
  pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
@@ -19297,43 +19392,7 @@ var TextInput = function TextInput(_ref2) {
19297
19392
  testID: "input-label",
19298
19393
  fontSize: "medium",
19299
19394
  themeVariant: variant
19300
- }, label)), /*#__PURE__*/React.createElement(StyledTextInput // when input is not editable on Android, the text color is gray
19301
- // hence, adding this to make the text color the same as iOS
19302
- , _extends$1({
19303
- style: StyleSheet$1.flatten([{
19304
- color: theme.__hd__.textInput.colors.text
19305
- }, textStyle]),
19306
- testID: "text-input",
19307
- accessibilityState: {
19308
- disabled: variant === 'disabled' || variant === 'readonly'
19309
- } // @ts-ignore
19310
- ,
19311
- accessibilityLabelledBy: accessibilityLabelledBy
19312
- }, nativeProps, {
19313
- onFocus: function onFocus(event) {
19314
- var _nativeProps$onFocus;
19315
-
19316
- setIsFocused(true);
19317
- (_nativeProps$onFocus = nativeProps.onFocus) === null || _nativeProps$onFocus === void 0 ? void 0 : _nativeProps$onFocus.call(nativeProps, event);
19318
- },
19319
- onBlur: function onBlur(event) {
19320
- var _nativeProps$onBlur;
19321
-
19322
- setIsFocused(false);
19323
- (_nativeProps$onBlur = nativeProps.onBlur) === null || _nativeProps$onBlur === void 0 ? void 0 : _nativeProps$onBlur.call(nativeProps, event);
19324
- },
19325
- ref: textInputReference,
19326
- editable: editable,
19327
- maxLength: maxLength,
19328
- value: value,
19329
- onChangeText: function onChangeText(text) {
19330
- var _nativeProps$onChange;
19331
-
19332
- (_nativeProps$onChange = nativeProps.onChangeText) === null || _nativeProps$onChange === void 0 ? void 0 : _nativeProps$onChange.call(nativeProps, text);
19333
- },
19334
- defaultValue: defaultValue,
19335
- placeholder: variant === 'focused' ? nativeProps.placeholder : undefined
19336
- }))), typeof actualSuffix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
19395
+ }, label)), renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/React.createElement(StyledTextInput, nativeInputProps)), typeof actualSuffix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
19337
19396
  intent: variant === 'disabled' ? 'disabled-text' : 'text',
19338
19397
  testID: "input-suffix",
19339
19398
  icon: actualSuffix,
@@ -19815,19 +19874,9 @@ var StyledWrapper$4 = index$7(View)(function (_ref) {
19815
19874
  padding: theme.__hd__.empty.space.wrapperPadding
19816
19875
  };
19817
19876
  });
19818
- var StyledIllustration = index$7(View)(function (_ref2) {
19819
- var theme = _ref2.theme;
19820
- return {
19821
- height: theme.__hd__.empty.sizes.illustration,
19822
- width: theme.__hd__.empty.sizes.illustration,
19823
- borderRadius: theme.__hd__.empty.radii.illustration,
19824
- backgroundColor: theme.__hd__.empty.colors.illustrationBackground,
19825
- marginBottom: theme.__hd__.empty.space.illustrationMargin
19826
- };
19827
- });
19828
- var StyledTitle = index$7(Text$1)(function (_ref3) {
19829
- var theme = _ref3.theme,
19830
- themeVariant = _ref3.themeVariant;
19877
+ var StyledTitle = index$7(Text$1)(function (_ref2) {
19878
+ var theme = _ref2.theme,
19879
+ themeVariant = _ref2.themeVariant;
19831
19880
  return {
19832
19881
  fontFamily: theme.__hd__.empty.fonts.title,
19833
19882
  fontSize: theme.__hd__.empty.fontSizes.title,
@@ -19836,9 +19885,9 @@ var StyledTitle = index$7(Text$1)(function (_ref3) {
19836
19885
  color: themeVariant === 'dark' ? theme.__hd__.empty.colors.invertedText : theme.__hd__.empty.colors.text
19837
19886
  };
19838
19887
  });
19839
- var StyledDescription = index$7(Text$1)(function (_ref4) {
19840
- var theme = _ref4.theme,
19841
- themeVariant = _ref4.themeVariant;
19888
+ var StyledDescription = index$7(Text$1)(function (_ref3) {
19889
+ var theme = _ref3.theme,
19890
+ themeVariant = _ref3.themeVariant;
19842
19891
  return {
19843
19892
  fontFamily: theme.__hd__.empty.fonts.description,
19844
19893
  fontSize: theme.__hd__.empty.fontSizes.description,
@@ -19848,16 +19897,22 @@ var StyledDescription = index$7(Text$1)(function (_ref4) {
19848
19897
  });
19849
19898
 
19850
19899
  var Empty = function Empty(_ref) {
19851
- var title = _ref.title,
19900
+ var image = _ref.image,
19901
+ title = _ref.title,
19852
19902
  description = _ref.description,
19853
19903
  style = _ref.style,
19854
19904
  testID = _ref.testID,
19855
19905
  _ref$variant = _ref.variant,
19856
19906
  variant = _ref$variant === void 0 ? 'light' : _ref$variant;
19907
+ var theme = useTheme();
19857
19908
  return /*#__PURE__*/React.createElement(StyledWrapper$4, {
19858
19909
  style: style,
19859
19910
  testID: testID
19860
- }, /*#__PURE__*/React.createElement(StyledIllustration, null), /*#__PURE__*/React.createElement(StyledTitle, {
19911
+ }, image !== undefined && /*#__PURE__*/React.cloneElement(image, _objectSpread2(_objectSpread2({}, image.props), {}, {
19912
+ style: [{
19913
+ marginBottom: theme.__hd__.empty.space.imageMargin
19914
+ }, image.props.style]
19915
+ })), /*#__PURE__*/React.createElement(StyledTitle, {
19861
19916
  themeVariant: variant
19862
19917
  }, title), !!description && /*#__PURE__*/React.createElement(StyledDescription, {
19863
19918
  themeVariant: variant
@@ -19900,12 +19955,12 @@ var StyledFABText = index$7(Text$1)(function (_ref3) {
19900
19955
  };
19901
19956
  });
19902
19957
 
19903
- var _excluded$4 = ["active"];
19958
+ var _excluded$5 = ["active"];
19904
19959
  var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
19905
19960
 
19906
19961
  var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
19907
19962
  var active = _ref.active,
19908
- iconProps = _objectWithoutProperties(_ref, _excluded$4);
19963
+ iconProps = _objectWithoutProperties(_ref, _excluded$5);
19909
19964
 
19910
19965
  var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
19911
19966
  useEffect(function () {
@@ -20158,6 +20213,29 @@ var index$4 = Object.assign(FAB, {
20158
20213
  ActionGroup: ActionGroup
20159
20214
  });
20160
20215
 
20216
+ var _excluded$4 = ["rounded", "size", "testID", "style"];
20217
+
20218
+ var Image = function Image(_ref) {
20219
+ var _ref$rounded = _ref.rounded,
20220
+ rounded = _ref$rounded === void 0 ? false : _ref$rounded,
20221
+ _ref$size = _ref.size,
20222
+ size = _ref$size === void 0 ? '6xlarge' : _ref$size,
20223
+ testID = _ref.testID,
20224
+ style = _ref.style,
20225
+ imageNativeProps = _objectWithoutProperties(_ref, _excluded$4);
20226
+
20227
+ var theme = useTheme();
20228
+ var imageSize = theme.__hd__.image.sizes[size];
20229
+ return /*#__PURE__*/React.createElement(Image$1, _extends$1({
20230
+ testID: testID,
20231
+ style: [{
20232
+ width: imageSize,
20233
+ height: imageSize,
20234
+ borderRadius: rounded ? imageSize / 2 : 0
20235
+ }, style]
20236
+ }, imageNativeProps));
20237
+ };
20238
+
20161
20239
  var StyledListItemContainer$1 = index$7(TouchableHighlight)(function (_ref) {
20162
20240
  var theme = _ref.theme,
20163
20241
  _ref$themeSelected = _ref.themeSelected,
@@ -20832,6 +20910,40 @@ var Progress = {
20832
20910
  Bar: ProgressBar
20833
20911
  };
20834
20912
 
20913
+ var Slider = function Slider(_ref) {
20914
+ var _ref$minimumValue = _ref.minimumValue,
20915
+ minimumValue = _ref$minimumValue === void 0 ? 0 : _ref$minimumValue,
20916
+ _ref$maximumValue = _ref.maximumValue,
20917
+ maximumValue = _ref$maximumValue === void 0 ? 1 : _ref$maximumValue,
20918
+ _ref$step = _ref.step,
20919
+ step = _ref$step === void 0 ? 0 : _ref$step,
20920
+ _ref$value = _ref.value,
20921
+ value = _ref$value === void 0 ? 0 : _ref$value,
20922
+ onValueChange = _ref.onValueChange,
20923
+ onSlidingStart = _ref.onSlidingStart,
20924
+ onSlidingComplete = _ref.onSlidingComplete,
20925
+ _ref$disabled = _ref.disabled,
20926
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
20927
+ style = _ref.style,
20928
+ testID = _ref.testID;
20929
+ var theme = useTheme();
20930
+ return /*#__PURE__*/React.createElement(RnSlider, {
20931
+ minimumValue: minimumValue,
20932
+ maximumValue: maximumValue,
20933
+ step: step,
20934
+ value: value,
20935
+ onValueChange: onValueChange,
20936
+ onSlidingStart: onSlidingStart,
20937
+ onSlidingComplete: onSlidingComplete,
20938
+ disabled: disabled,
20939
+ minimumTrackTintColor: theme.__hd__.slider.colors.minimumTrackTint,
20940
+ thumbTintColor: theme.__hd__.slider.colors.thumbTint,
20941
+ maximumTrackTintColor: theme.__hd__.slider.colors.maximumTrackTint,
20942
+ style: style,
20943
+ testID: testID
20944
+ });
20945
+ };
20946
+
20835
20947
  var StyledView$1 = index$7(View)();
20836
20948
  var StyledSpinnerContainer = index$7(View)({
20837
20949
  height: '100%',
@@ -21154,72 +21266,6 @@ var Footer = function Footer(_ref) {
21154
21266
  }, label));
21155
21267
  };
21156
21268
 
21157
- var isSections = function isSections(options) {
21158
- var firstOption = options[0];
21159
- return firstOption !== undefined && firstOption.category !== undefined;
21160
- };
21161
- var toSections = function toSections(options) {
21162
- if (isSections(options)) {
21163
- return options;
21164
- }
21165
-
21166
- return [{
21167
- category: '',
21168
- data: options
21169
- }];
21170
- };
21171
- var toFlatOptions = function toFlatOptions(options) {
21172
- if (isSections(options)) {
21173
- return options.flatMap(function (opt) {
21174
- return opt.data;
21175
- });
21176
- }
21177
-
21178
- return options;
21179
- };
21180
- var getScrollParams = function getScrollParams(value, sections) {
21181
- var itemIndex = -1;
21182
- var sectionIndex = sections.findIndex(function (section) {
21183
- itemIndex = section.data.findIndex(function (opt) {
21184
- return opt.value === value;
21185
- });
21186
- return itemIndex !== -1;
21187
- });
21188
- return {
21189
- sectionIndex: sectionIndex < 0 ? 0 : sectionIndex,
21190
- itemIndex: itemIndex < 0 ? 0 : itemIndex
21191
- };
21192
- };
21193
- var useKeyboard = function useKeyboard() {
21194
- var _useState = useState(false),
21195
- _useState2 = _slicedToArray(_useState, 2),
21196
- isKeyboardVisible = _useState2[0],
21197
- setKeyboardVisible = _useState2[1];
21198
-
21199
- var _useState3 = useState(0),
21200
- _useState4 = _slicedToArray(_useState3, 2),
21201
- keyboardHeight = _useState4[0],
21202
- setKeyboardHeight = _useState4[1];
21203
-
21204
- useEffect(function () {
21205
- var keyboardWillShowListener = Keyboard.addListener('keyboardWillShow', function (e) {
21206
- setKeyboardVisible(true);
21207
- setKeyboardHeight(e.endCoordinates.height);
21208
- });
21209
- var keyboardWillHideListener = Keyboard.addListener('keyboardWillHide', function () {
21210
- setKeyboardVisible(false);
21211
- });
21212
- return function () {
21213
- keyboardWillShowListener.remove();
21214
- keyboardWillHideListener.remove();
21215
- };
21216
- }, []);
21217
- return {
21218
- isKeyboardVisible: isKeyboardVisible,
21219
- keyboardHeight: keyboardHeight
21220
- };
21221
- };
21222
-
21223
21269
  var StyledOptionList = function StyledOptionList(_ref) {
21224
21270
  var keyExtractor = _ref.keyExtractor,
21225
21271
  loading = _ref.loading,
@@ -21227,9 +21273,8 @@ var StyledOptionList = function StyledOptionList(_ref) {
21227
21273
  onQueryChange = _ref.onQueryChange,
21228
21274
  sections = _ref.sections,
21229
21275
  renderItem = _ref.renderItem,
21230
- scrollParams = _ref.scrollParams;
21276
+ sectionListRef = _ref.sectionListRef;
21231
21277
  var theme = useTheme$1();
21232
- var sectionListRef = useRef(null);
21233
21278
 
21234
21279
  var _useState = useState(false),
21235
21280
  _useState2 = _slicedToArray(_useState, 2),
@@ -21248,11 +21293,6 @@ var StyledOptionList = function StyledOptionList(_ref) {
21248
21293
  return setOnEndReachedCalled(true);
21249
21294
  },
21250
21295
  onScrollToIndexFailed: function onScrollToIndexFailed() {},
21251
- onContentSizeChange: function onContentSizeChange() {
21252
- var _sectionListRef$curre;
21253
-
21254
- return sections.length && ((_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams));
21255
- },
21256
21296
  onMomentumScrollBegin: function onMomentumScrollBegin() {
21257
21297
  if (onEndReached && onEndReachedCalled && !loading) onEndReached();
21258
21298
  setOnEndReachedCalled(false);
@@ -21306,9 +21346,8 @@ var OptionList$1 = function OptionList(_ref) {
21306
21346
  onQueryChange = _ref.onQueryChange,
21307
21347
  sections = _ref.sections,
21308
21348
  renderOption = _ref.renderOption,
21309
- value = _ref.value;
21310
- var firstValue = value === null || value === void 0 ? void 0 : value[0];
21311
- var scrollParams = getScrollParams(firstValue, sections);
21349
+ value = _ref.value,
21350
+ sectionListRef = _ref.sectionListRef;
21312
21351
 
21313
21352
  var renderItem = function renderItem(info) {
21314
21353
  var item = info.item;
@@ -21342,10 +21381,76 @@ var OptionList$1 = function OptionList(_ref) {
21342
21381
  onQueryChange: onQueryChange,
21343
21382
  sections: sections,
21344
21383
  renderItem: renderItem,
21345
- scrollParams: scrollParams
21384
+ sectionListRef: sectionListRef
21346
21385
  });
21347
21386
  };
21348
21387
 
21388
+ var isSections = function isSections(options) {
21389
+ var firstOption = options[0];
21390
+ return firstOption !== undefined && firstOption.category !== undefined;
21391
+ };
21392
+ var toSections = function toSections(options) {
21393
+ if (isSections(options)) {
21394
+ return options;
21395
+ }
21396
+
21397
+ return [{
21398
+ category: '',
21399
+ data: options
21400
+ }];
21401
+ };
21402
+ var toFlatOptions = function toFlatOptions(options) {
21403
+ if (isSections(options)) {
21404
+ return options.flatMap(function (opt) {
21405
+ return opt.data;
21406
+ });
21407
+ }
21408
+
21409
+ return options;
21410
+ };
21411
+ var getScrollParams = function getScrollParams(value, sections) {
21412
+ var itemIndex = -1;
21413
+ var sectionIndex = sections.findIndex(function (section) {
21414
+ itemIndex = section.data.findIndex(function (opt) {
21415
+ return opt.value === value;
21416
+ });
21417
+ return itemIndex !== -1;
21418
+ });
21419
+ return {
21420
+ sectionIndex: sectionIndex < 0 ? 0 : sectionIndex,
21421
+ itemIndex: itemIndex < 0 ? 0 : itemIndex
21422
+ };
21423
+ };
21424
+ var useKeyboard = function useKeyboard() {
21425
+ var _useState = useState(false),
21426
+ _useState2 = _slicedToArray(_useState, 2),
21427
+ isKeyboardVisible = _useState2[0],
21428
+ setKeyboardVisible = _useState2[1];
21429
+
21430
+ var _useState3 = useState(0),
21431
+ _useState4 = _slicedToArray(_useState3, 2),
21432
+ keyboardHeight = _useState4[0],
21433
+ setKeyboardHeight = _useState4[1];
21434
+
21435
+ useEffect(function () {
21436
+ var keyboardWillShowListener = Keyboard.addListener('keyboardWillShow', function (e) {
21437
+ setKeyboardVisible(true);
21438
+ setKeyboardHeight(e.endCoordinates.height);
21439
+ });
21440
+ var keyboardWillHideListener = Keyboard.addListener('keyboardWillHide', function () {
21441
+ setKeyboardVisible(false);
21442
+ });
21443
+ return function () {
21444
+ keyboardWillShowListener.remove();
21445
+ keyboardWillHideListener.remove();
21446
+ };
21447
+ }, []);
21448
+ return {
21449
+ isKeyboardVisible: isKeyboardVisible,
21450
+ keyboardHeight: keyboardHeight
21451
+ };
21452
+ };
21453
+
21349
21454
  function MultiSelect(_ref) {
21350
21455
  var footerLabel = _ref.footerLabel,
21351
21456
  label = _ref.label,
@@ -21358,6 +21463,7 @@ function MultiSelect(_ref) {
21358
21463
  onQueryChange = _ref.onQueryChange,
21359
21464
  options = _ref.options,
21360
21465
  renderOption = _ref.renderOption,
21466
+ renderSelectedValue = _ref.renderSelectedValue,
21361
21467
  query = _ref.query,
21362
21468
  error = _ref.error,
21363
21469
  _ref$editable = _ref.editable,
@@ -21383,6 +21489,7 @@ function MultiSelect(_ref) {
21383
21489
  selectingValue = _useState4[0],
21384
21490
  setSelectingValue = _useState4[1];
21385
21491
 
21492
+ var sectionListRef = useRef(null);
21386
21493
  var sections = toSections(options);
21387
21494
  var flatOptions = toFlatOptions(options);
21388
21495
  var displayedValue = flatOptions.filter(function (opt) {
@@ -21410,7 +21517,10 @@ function MultiSelect(_ref) {
21410
21517
  numberOfLines: numberOfLines,
21411
21518
  pointerEvents: "none",
21412
21519
  style: style,
21413
- testID: testID
21520
+ testID: testID,
21521
+ renderInputValue: renderSelectedValue !== undefined ? function (props) {
21522
+ return renderSelectedValue(value, props);
21523
+ } : undefined
21414
21524
  })))), /*#__PURE__*/React.createElement(BottomSheet, {
21415
21525
  open: open,
21416
21526
  onRequestClose: function onRequestClose() {
@@ -21427,7 +21537,15 @@ function MultiSelect(_ref) {
21427
21537
  setOpen(false);
21428
21538
  onConfirm(selectingValue);
21429
21539
  }
21430
- })
21540
+ }),
21541
+ onAnimationEnd: function onAnimationEnd() {
21542
+ if (open === true) {
21543
+ var _sectionListRef$curre;
21544
+
21545
+ var scrollParams = getScrollParams(value === null || value === void 0 ? void 0 : value[0], sections);
21546
+ (_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
21547
+ }
21548
+ }
21431
21549
  }, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput, {
21432
21550
  editable: true,
21433
21551
  placeholder: "Search",
@@ -21441,7 +21559,8 @@ function MultiSelect(_ref) {
21441
21559
  sections: sections,
21442
21560
  renderOption: renderOption,
21443
21561
  value: selectingValue,
21444
- onPress: setSelectingValue
21562
+ onPress: setSelectingValue,
21563
+ sectionListRef: sectionListRef
21445
21564
  })));
21446
21565
  }
21447
21566
 
@@ -21471,8 +21590,8 @@ var OptionList = function OptionList(_ref) {
21471
21590
  onQueryChange = _ref.onQueryChange,
21472
21591
  sections = _ref.sections,
21473
21592
  renderOption = _ref.renderOption,
21474
- value = _ref.value;
21475
- var scrollParams = getScrollParams(value, sections);
21593
+ value = _ref.value,
21594
+ sectionListRef = _ref.sectionListRef;
21476
21595
 
21477
21596
  var renderItem = function renderItem(info) {
21478
21597
  var item = info.item;
@@ -21504,7 +21623,7 @@ var OptionList = function OptionList(_ref) {
21504
21623
  onQueryChange: onQueryChange,
21505
21624
  sections: sections,
21506
21625
  renderItem: renderItem,
21507
- scrollParams: scrollParams
21626
+ sectionListRef: sectionListRef
21508
21627
  });
21509
21628
  };
21510
21629
 
@@ -21521,6 +21640,7 @@ var SingleSelect = function SingleSelect(_ref) {
21521
21640
  onQueryChange = _ref.onQueryChange,
21522
21641
  options = _ref.options,
21523
21642
  renderOption = _ref.renderOption,
21643
+ renderSelectedValue = _ref.renderSelectedValue,
21524
21644
  query = _ref.query,
21525
21645
  error = _ref.error,
21526
21646
  _ref$editable = _ref.editable,
@@ -21541,6 +21661,7 @@ var SingleSelect = function SingleSelect(_ref) {
21541
21661
  open = _useState2[0],
21542
21662
  setOpen = _useState2[1];
21543
21663
 
21664
+ var sectionListRef = useRef(null);
21544
21665
  var sections = toSections(options);
21545
21666
  var flatOptions = toFlatOptions(options);
21546
21667
  var displayedValue = (_flatOptions$find = flatOptions.find(function (opt) {
@@ -21566,7 +21687,10 @@ var SingleSelect = function SingleSelect(_ref) {
21566
21687
  numberOfLines: numberOfLines,
21567
21688
  pointerEvents: "none",
21568
21689
  style: style,
21569
- testID: testID
21690
+ testID: testID,
21691
+ renderInputValue: renderSelectedValue !== undefined ? function (props) {
21692
+ return renderSelectedValue(value, props);
21693
+ } : undefined
21570
21694
  })))), /*#__PURE__*/React.createElement(BottomSheet, {
21571
21695
  open: open,
21572
21696
  onRequestClose: function onRequestClose() {
@@ -21576,6 +21700,14 @@ var SingleSelect = function SingleSelect(_ref) {
21576
21700
  header: label,
21577
21701
  style: {
21578
21702
  paddingBottom: isKeyboardVisible ? keyboardHeight : 0
21703
+ },
21704
+ onAnimationEnd: function onAnimationEnd() {
21705
+ if (open === true) {
21706
+ var _sectionListRef$curre;
21707
+
21708
+ var scrollParams = getScrollParams(value, sections);
21709
+ (_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
21710
+ }
21579
21711
  }
21580
21712
  }, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput, {
21581
21713
  editable: true,
@@ -21593,7 +21725,8 @@ var SingleSelect = function SingleSelect(_ref) {
21593
21725
  onPress: function onPress(selectedValue) {
21594
21726
  setOpen(false);
21595
21727
  onConfirm(selectedValue);
21596
- }
21728
+ },
21729
+ sectionListRef: sectionListRef
21597
21730
  })));
21598
21731
  };
21599
21732
 
@@ -21606,8 +21739,8 @@ var StyledWrapper = index$7(View)(function (_ref) {
21606
21739
  themeVariant = _ref.themeVariant,
21607
21740
  themeSize = _ref.themeSize;
21608
21741
  return {
21609
- height: theme.__hd__["switch"].heights[themeSize],
21610
- width: theme.__hd__["switch"].widths[themeSize],
21742
+ height: theme.__hd__["switch"].sizes.heights[themeSize],
21743
+ width: theme.__hd__["switch"].sizes.widths[themeSize],
21611
21744
  paddingHorizontal: theme.__hd__["switch"].spaces[themeSize],
21612
21745
  borderRadius: theme.__hd__["switch"].radii.rounded,
21613
21746
  backgroundColor: theme.__hd__["switch"].colors.backgroundColors[themeVariant],
@@ -21619,8 +21752,8 @@ var StyledKnot = index$7(Animated.View)(function (_ref2) {
21619
21752
  var theme = _ref2.theme,
21620
21753
  themeSize = _ref2.themeSize;
21621
21754
  return {
21622
- width: theme.__hd__["switch"].thumbSizes[themeSize],
21623
- height: theme.__hd__["switch"].thumbSizes[themeSize],
21755
+ width: theme.__hd__["switch"].sizes.thumbs[themeSize],
21756
+ height: theme.__hd__["switch"].sizes.thumbs[themeSize],
21624
21757
  backgroundColor: theme.__hd__["switch"].colors.thumb,
21625
21758
  borderRadius: theme.__hd__["switch"].radii.rounded
21626
21759
  };
@@ -21652,7 +21785,7 @@ var Switch = function Switch(_ref2) {
21652
21785
  disabled: disabled,
21653
21786
  checked: checked
21654
21787
  });
21655
- var offset = checked ? theme.__hd__["switch"].widths[size] - theme.__hd__["switch"].thumbSizes[size] - theme.__hd__["switch"].spaces[size] * 2 : theme.__hd__["switch"].spaces.inactive;
21788
+ var offset = checked ? (theme.__hd__["switch"].sizes.widths[size] - theme.__hd__["switch"].sizes.thumbs[size]) / 2 + theme.__hd__["switch"].sizes.thumbs[size] / 2 : 0;
21656
21789
 
21657
21790
  var _useState = useState(function () {
21658
21791
  return new Animated.Value(offset);
@@ -22780,19 +22913,6 @@ var ToolbarEvents;
22780
22913
  ToolbarEvents["HeadingTwo"] = "heading-two";
22781
22914
  })(ToolbarEvents || (ToolbarEvents = {}));
22782
22915
 
22783
- var ToolbarButtonName;
22784
-
22785
- (function (ToolbarButtonName) {
22786
- ToolbarButtonName["Bold"] = "bold";
22787
- ToolbarButtonName["Italic"] = "italic";
22788
- ToolbarButtonName["Underline"] = "underline";
22789
- ToolbarButtonName["BulletedList"] = "bulletedList";
22790
- ToolbarButtonName["NumberedList"] = "numberedList";
22791
- ToolbarButtonName["HeadingOne"] = "headingOne";
22792
- ToolbarButtonName["HeadingTwo"] = "headingTwo";
22793
- ToolbarButtonName["Seperator"] = "|";
22794
- })(ToolbarButtonName || (ToolbarButtonName = {}));
22795
-
22796
22916
  var emitter = new EventEmitter();
22797
22917
  emitter.setMaxListeners(20);
22798
22918
 
@@ -22840,8 +22960,6 @@ var on = function on(emitter, eventName, listener) {
22840
22960
  };
22841
22961
  };
22842
22962
 
22843
- var _buttonConfigs;
22844
-
22845
22963
  var ToolbarButton = function ToolbarButton(_ref) {
22846
22964
  var icon = _ref.icon,
22847
22965
  onPress = _ref.onPress,
@@ -22857,33 +22975,41 @@ var ToolbarButton = function ToolbarButton(_ref) {
22857
22975
  }));
22858
22976
  };
22859
22977
 
22860
- var buttonConfigs = (_buttonConfigs = {}, _defineProperty(_buttonConfigs, ToolbarButtonName.Bold, {
22861
- icon: 'format-bold',
22862
- eventName: ToolbarEvents.Bold
22863
- }), _defineProperty(_buttonConfigs, ToolbarButtonName.Italic, {
22864
- icon: 'format-italic',
22865
- eventName: ToolbarEvents.Italic
22866
- }), _defineProperty(_buttonConfigs, ToolbarButtonName.Underline, {
22867
- icon: 'format-underlined',
22868
- eventName: ToolbarEvents.Underline
22869
- }), _defineProperty(_buttonConfigs, ToolbarButtonName.BulletedList, {
22870
- icon: 'format-list-bulleted',
22871
- eventName: ToolbarEvents.BulletedList,
22872
- standalone: true
22873
- }), _defineProperty(_buttonConfigs, ToolbarButtonName.NumberedList, {
22874
- icon: 'format-list-numbered',
22875
- eventName: ToolbarEvents.NumberedList,
22876
- standalone: true
22877
- }), _defineProperty(_buttonConfigs, ToolbarButtonName.HeadingOne, {
22878
- icon: 'format-heading1',
22879
- eventName: ToolbarEvents.HeadingOne,
22880
- standalone: true
22881
- }), _defineProperty(_buttonConfigs, ToolbarButtonName.HeadingTwo, {
22882
- icon: 'format-heading2',
22883
- eventName: ToolbarEvents.HeadingTwo,
22884
- standalone: true
22885
- }), _buttonConfigs);
22886
- var defaultButtons = [ToolbarButtonName.Bold, ToolbarButtonName.Italic, ToolbarButtonName.Underline, ToolbarButtonName.Seperator, ToolbarButtonName.BulletedList, ToolbarButtonName.NumberedList, ToolbarButtonName.Seperator, ToolbarButtonName.HeadingOne, ToolbarButtonName.HeadingTwo];
22978
+ var buttonConfigs = {
22979
+ bold: {
22980
+ icon: 'format-bold',
22981
+ eventName: ToolbarEvents.Bold
22982
+ },
22983
+ italic: {
22984
+ icon: 'format-italic',
22985
+ eventName: ToolbarEvents.Italic
22986
+ },
22987
+ underline: {
22988
+ icon: 'format-underlined',
22989
+ eventName: ToolbarEvents.Underline
22990
+ },
22991
+ bulletedList: {
22992
+ icon: 'format-list-bulleted',
22993
+ eventName: ToolbarEvents.BulletedList,
22994
+ standalone: true
22995
+ },
22996
+ numberedList: {
22997
+ icon: 'format-list-numbered',
22998
+ eventName: ToolbarEvents.NumberedList,
22999
+ standalone: true
23000
+ },
23001
+ headingOne: {
23002
+ icon: 'format-heading1',
23003
+ eventName: ToolbarEvents.HeadingOne,
23004
+ standalone: true
23005
+ },
23006
+ headingTwo: {
23007
+ icon: 'format-heading2',
23008
+ eventName: ToolbarEvents.HeadingTwo,
23009
+ standalone: true
23010
+ }
23011
+ };
23012
+ var defaultButtons = ['bold', 'italic', 'underline', '|', 'bulletedList', 'numberedList', '|', 'headingOne', 'headingTwo'];
22887
23013
 
22888
23014
  var EditorToolbar = function EditorToolbar(_ref2) {
22889
23015
  var name = _ref2.name,
@@ -22947,7 +23073,7 @@ var EditorToolbar = function EditorToolbar(_ref2) {
22947
23073
  }, []);
22948
23074
  var toolbarButtons = useMemo(function () {
22949
23075
  return toolbarButtonArray.map(function (button) {
22950
- if (button.buttonName === ToolbarButtonName.Seperator) {
23076
+ if (button.buttonName === '|') {
22951
23077
  return /*#__PURE__*/React.createElement(StyledSeparator, {
22952
23078
  key: button.id
22953
23079
  });
@@ -40798,8 +40924,6 @@ var StyledWebView = index$7(WebView)(function (_ref2) {
40798
40924
  backgroundColor: 'transparent',
40799
40925
  textAlignVertical: 'center',
40800
40926
  fontSize: theme.__hd__.textInput.fontSizes.text,
40801
- alignSelf: 'stretch',
40802
- flexGrow: 2,
40803
40927
  marginHorizontal: theme.__hd__.textInput.space.inputHorizontalMargin
40804
40928
  };
40805
40929
  });
@@ -40825,7 +40949,9 @@ var defaultValue = [{
40825
40949
  }];
40826
40950
 
40827
40951
  var RichTextEditor = function RichTextEditor(_ref) {
40828
- var name = _ref.name,
40952
+ var _ref$autoFocus = _ref.autoFocus,
40953
+ autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
40954
+ name = _ref.name,
40829
40955
  _ref$placeholder = _ref.placeholder,
40830
40956
  placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
40831
40957
  _ref$onChange = _ref.onChange,
@@ -40899,7 +41025,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
40899
41025
  }, []);
40900
41026
  var html = useMemo(function () {
40901
41027
  var initialValueString = JSON.stringify(value);
40902
- 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: true,\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 ");
41028
+ 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 ");
40903
41029
  }, []);
40904
41030
  var requestBlur = useCallback(function () {
40905
41031
  if (webview.current) {
@@ -40985,7 +41111,6 @@ var RichTextEditor = function RichTextEditor(_ref) {
40985
41111
  }
40986
41112
  }, []);
40987
41113
  return /*#__PURE__*/React.createElement(StyledContainer$3, {
40988
- style: style,
40989
41114
  testID: testID
40990
41115
  }, /*#__PURE__*/React.createElement(StyledTextInputContainer, null, /*#__PURE__*/React.createElement(StyledBorderBackDrop, {
40991
41116
  themeVariant: variant
@@ -41044,4 +41169,4 @@ var index = Object.assign(RichTextEditor$1, {
41044
41169
  Toolbar: EditorToolbar
41045
41170
  });
41046
41171
 
41047
- export { Accordion, Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, Box, CompoundButton as Button, Calendar, index$6 as Card, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$5 as Drawer, Empty, index$4 as FAB, Icon, List, PinInput, Progress, CompoundRadio as Radio, index as RichTextEditor, SectionHeading, index$3 as Select, Spinner, Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, TimePicker, Toast, index$1 as Toolbar, Typography, getTheme$1 as getTheme, scale, swagSystemPalette, defaultTheme as theme, useTheme, workSystemPalette };
41172
+ export { Accordion, Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, Box, CompoundButton as Button, Calendar, index$6 as Card, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$5 as Drawer, Empty, index$4 as FAB, Icon, Image, List, PinInput, Progress, CompoundRadio as Radio, index as RichTextEditor, SectionHeading, index$3 as Select, Slider, Spinner, Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, TimePicker, Toast, index$1 as Toolbar, Typography, getTheme$1 as getTheme, scale, swagSystemPalette, defaultTheme as theme, useTheme, workSystemPalette };