@hero-design/rn 7.10.2 → 7.11.2
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/.turbo/turbo-build.log +8 -8
- package/es/index.js +353 -79
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +352 -77
- package/package.json +2 -2
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/FAB/ActionGroup/index.tsx +16 -5
- package/src/components/PinInput/PinCell.tsx +34 -0
- package/src/components/PinInput/StyledPinInput.tsx +88 -0
- package/src/components/PinInput/__tests__/PinCell.spec.tsx +48 -0
- package/src/components/PinInput/__tests__/StyledPinInput.spec.tsx +22 -0
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +186 -0
- package/src/components/PinInput/__tests__/__snapshots__/StyledPinInput.spec.tsx.snap +58 -0
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +1028 -0
- package/src/components/PinInput/__tests__/index.spec.tsx +91 -0
- package/src/components/PinInput/index.tsx +173 -0
- package/src/components/TextInput/__tests__/index.spec.tsx +15 -0
- package/src/components/TextInput/index.tsx +20 -16
- package/src/components/Typography/Text/StyledText.tsx +1 -1
- package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +22 -0
- package/src/components/Typography/Text/index.tsx +1 -1
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +35 -0
- package/src/theme/components/pinInput.ts +45 -0
- package/src/theme/components/typography.ts +2 -0
- package/src/theme/global/colors.ts +1 -1
- package/src/theme/global/space.ts +10 -10
- package/src/theme/index.ts +6 -3
- package/types/components/Alert/StyledAlert.d.ts +0 -0
- package/types/components/Alert/__tests__/index.spec.d.ts +0 -0
- package/types/components/Alert/index.d.ts +0 -0
- package/types/components/Avatar/StyledAvatar.d.ts +0 -0
- package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -0
- package/types/components/Avatar/__tests__/index.spec.d.ts +0 -0
- package/types/components/Avatar/index.d.ts +0 -0
- package/types/components/Badge/Status.d.ts +0 -0
- package/types/components/Badge/StyledBadge.d.ts +0 -0
- package/types/components/Badge/__tests__/Badge.spec.d.ts +0 -0
- package/types/components/Badge/__tests__/Status.spec.d.ts +0 -0
- package/types/components/Badge/index.d.ts +0 -0
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
- package/types/components/BottomNavigation/__tests__/index.spec.d.ts +0 -0
- package/types/components/BottomNavigation/index.d.ts +0 -0
- package/types/components/BottomSheet/Footer.d.ts +0 -0
- package/types/components/BottomSheet/Header.d.ts +0 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
- package/types/components/BottomSheet/__tests__/index.spec.d.ts +0 -0
- package/types/components/BottomSheet/index.d.ts +0 -0
- package/types/components/Button/Button.d.ts +0 -0
- package/types/components/Button/IconButton.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
- package/types/components/Button/StyledButton.d.ts +0 -0
- package/types/components/Button/UtilityButton/__tests__/index.spec.d.ts +0 -0
- package/types/components/Button/UtilityButton/index.d.ts +0 -0
- package/types/components/Button/UtilityButton/styled.d.ts +0 -0
- package/types/components/Button/__tests__/Button.spec.d.ts +0 -0
- package/types/components/Button/__tests__/IconButton.spec.d.ts +0 -0
- package/types/components/Button/__tests__/StyledButton.spec.d.ts +0 -0
- package/types/components/Button/index.d.ts +0 -0
- package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
- package/types/components/Card/DataCard/__tests__/StyledDataCard.spec.d.ts +0 -0
- package/types/components/Card/DataCard/__tests__/index.spec.d.ts +0 -0
- package/types/components/Card/DataCard/index.d.ts +0 -0
- package/types/components/Card/StyledCard.d.ts +0 -0
- package/types/components/Card/__tests__/StyledCard.spec.d.ts +0 -0
- package/types/components/Card/__tests__/index.spec.d.ts +0 -0
- package/types/components/Card/index.d.ts +0 -0
- package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
- package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +0 -0
- package/types/components/Checkbox/__tests__/index.spec.d.ts +0 -0
- package/types/components/Checkbox/index.d.ts +0 -0
- package/types/components/Collapse/StyledCollapse.d.ts +0 -0
- package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -0
- package/types/components/Collapse/__tests__/index.spec.d.ts +0 -0
- package/types/components/Collapse/index.d.ts +0 -0
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
- package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +0 -0
- package/types/components/ContentNavigator/__tests__/index.spec.d.ts +0 -0
- package/types/components/ContentNavigator/index.d.ts +0 -0
- package/types/components/Divider/StyledDivider.d.ts +0 -0
- package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -0
- package/types/components/Divider/index.d.ts +0 -0
- package/types/components/Drawer/StyledDrawer.d.ts +0 -0
- package/types/components/Drawer/__tests__/index.spec.d.ts +0 -0
- package/types/components/Drawer/index.d.ts +0 -0
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -0
- package/types/components/FAB/ActionGroup/index.d.ts +0 -0
- package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
- package/types/components/FAB/FAB.d.ts +0 -0
- package/types/components/FAB/StyledFAB.d.ts +0 -0
- package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -0
- package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -0
- package/types/components/FAB/__tests__/index.spec.d.ts +0 -0
- package/types/components/FAB/index.d.ts +0 -0
- package/types/components/Icon/HeroIcon/index.d.ts +0 -0
- package/types/components/Icon/IconList.d.ts +0 -0
- package/types/components/Icon/__tests__/index.spec.d.ts +0 -0
- package/types/components/Icon/index.d.ts +0 -0
- package/types/components/Icon/utils.d.ts +0 -0
- package/types/components/List/BasicListItem.d.ts +0 -0
- package/types/components/List/ListItem.d.ts +0 -0
- package/types/components/List/StyledBasicListItem.d.ts +0 -0
- package/types/components/List/StyledListItem.d.ts +0 -0
- package/types/components/List/__tests__/BasicListItem.spec.d.ts +0 -0
- package/types/components/List/__tests__/ListItem.spec.d.ts +0 -0
- package/types/components/List/__tests__/StyledBasicListItem.spec.d.ts +0 -0
- package/types/components/List/__tests__/StyledListItem.spec.d.ts +0 -0
- package/types/components/List/index.d.ts +0 -0
- package/types/components/PinInput/PinCell.d.ts +8 -0
- package/types/components/PinInput/StyledPinInput.d.ts +73 -0
- package/types/components/PinInput/__tests__/PinCell.spec.d.ts +1 -0
- package/types/components/PinInput/__tests__/StyledPinInput.spec.d.ts +1 -0
- package/types/components/PinInput/__tests__/index.spec.d.ts +1 -0
- package/types/components/PinInput/index.d.ts +48 -0
- package/types/components/Progress/ProgressBar.d.ts +0 -0
- package/types/components/Progress/ProgressCircle.d.ts +0 -0
- package/types/components/Progress/StyledProgressBar.d.ts +0 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
- package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
- package/types/components/Progress/index.d.ts +0 -0
- package/types/components/Progress/types.d.ts +0 -0
- package/types/components/Radio/Radio.d.ts +0 -0
- package/types/components/Radio/RadioGroup.d.ts +0 -0
- package/types/components/Radio/StyledRadio.d.ts +0 -0
- package/types/components/Radio/__tests__/Radio.spec.d.ts +0 -0
- package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +0 -0
- package/types/components/Radio/__tests__/StyledRadio.spec.d.ts +0 -0
- package/types/components/Radio/index.d.ts +0 -0
- package/types/components/Radio/types.d.ts +0 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
- package/types/components/SectionHeading/__tests__/StyledHeading.spec.d.ts +0 -0
- package/types/components/SectionHeading/__tests__/index.spec.d.ts +0 -0
- package/types/components/SectionHeading/index.d.ts +0 -0
- package/types/components/Select/Footer.d.ts +0 -0
- package/types/components/Select/MultiSelect/Option.d.ts +0 -0
- package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
- package/types/components/Select/MultiSelect/__tests__/Option.spec.d.ts +0 -0
- package/types/components/Select/MultiSelect/__tests__/OptionList.spec.d.ts +0 -0
- package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +0 -0
- package/types/components/Select/MultiSelect/index.d.ts +0 -0
- package/types/components/Select/SingleSelect/Option.d.ts +0 -0
- package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
- package/types/components/Select/SingleSelect/__tests__/Option.spec.d.ts +0 -0
- package/types/components/Select/SingleSelect/__tests__/OptionList.spec.d.ts +0 -0
- package/types/components/Select/SingleSelect/__tests__/index.spec.d.ts +0 -0
- package/types/components/Select/SingleSelect/index.d.ts +0 -0
- package/types/components/Select/StyledSelect.d.ts +0 -0
- package/types/components/Select/__tests__/StyledSelect.spec.d.ts +0 -0
- package/types/components/Select/helpers.d.ts +0 -0
- package/types/components/Select/index.d.ts +0 -0
- package/types/components/Select/types.d.ts +0 -0
- package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
- package/types/components/Spinner/StyledSpinner.d.ts +0 -0
- package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +0 -0
- package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +0 -0
- package/types/components/Spinner/__tests__/index.spec.d.ts +0 -0
- package/types/components/Spinner/index.d.ts +0 -0
- package/types/components/Switch/StyledSwitch.d.ts +0 -0
- package/types/components/Switch/__tests__/StyledHeading.spec.d.ts +0 -0
- package/types/components/Switch/__tests__/index.spec.d.ts +0 -0
- package/types/components/Switch/index.d.ts +0 -0
- package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
- package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledTabs.d.ts +0 -0
- package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -0
- package/types/components/Tabs/__tests__/index.spec.d.ts +0 -0
- package/types/components/Tabs/index.d.ts +0 -0
- package/types/components/Tabs/utils.d.ts +0 -0
- package/types/components/Tag/StyledTag.d.ts +0 -0
- package/types/components/Tag/__tests__/Tag.spec.d.ts +0 -0
- package/types/components/Tag/index.d.ts +0 -0
- package/types/components/TextInput/StyledTextInput.d.ts +0 -0
- package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +0 -0
- package/types/components/TextInput/__tests__/index.spec.d.ts +0 -0
- package/types/components/TextInput/index.d.ts +0 -0
- package/types/components/Toast/StyledToast.d.ts +0 -0
- package/types/components/Toast/Toast.d.ts +0 -0
- package/types/components/Toast/ToastContainer.d.ts +0 -0
- package/types/components/Toast/ToastContext.d.ts +0 -0
- package/types/components/Toast/ToastProvider.d.ts +0 -0
- package/types/components/Toast/__tests__/Toast.spec.d.ts +0 -0
- package/types/components/Toast/__tests__/ToastContainer.spec.d.ts +0 -0
- package/types/components/Toast/index.d.ts +0 -0
- package/types/components/Toast/types.d.ts +0 -0
- package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
- package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
- package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
- package/types/components/Toolbar/__tests__/ToolbarGroup.spec.d.ts +0 -0
- package/types/components/Toolbar/__tests__/ToolbarItem.spec.d.ts +0 -0
- package/types/components/Toolbar/index.d.ts +0 -0
- package/types/components/Typography/Text/StyledText.d.ts +1 -1
- package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -0
- package/types/components/Typography/Text/__tests__/index.spec.d.ts +0 -0
- package/types/components/Typography/Text/index.d.ts +1 -1
- package/types/components/Typography/index.d.ts +0 -0
- package/types/index.d.ts +2 -1
- package/types/testHelpers/renderWithTheme.d.ts +0 -0
- package/types/theme/__tests__/index.spec.d.ts +0 -0
- package/types/theme/components/alert.d.ts +0 -0
- package/types/theme/components/avatar.d.ts +0 -0
- package/types/theme/components/badge.d.ts +0 -0
- package/types/theme/components/bottomNavigation.d.ts +0 -0
- package/types/theme/components/bottomSheet.d.ts +0 -0
- package/types/theme/components/button.d.ts +0 -0
- package/types/theme/components/card.d.ts +0 -0
- package/types/theme/components/checkbox.d.ts +0 -0
- package/types/theme/components/contentNavigator.d.ts +0 -0
- package/types/theme/components/divider.d.ts +0 -0
- package/types/theme/components/drawer.d.ts +0 -0
- package/types/theme/components/fab.d.ts +0 -0
- package/types/theme/components/icon.d.ts +0 -0
- package/types/theme/components/list.d.ts +0 -0
- package/types/theme/components/pinInput.d.ts +35 -0
- package/types/theme/components/progress.d.ts +0 -0
- package/types/theme/components/radio.d.ts +0 -0
- package/types/theme/components/sectionHeading.d.ts +0 -0
- package/types/theme/components/select.d.ts +0 -0
- package/types/theme/components/spinner.d.ts +0 -0
- package/types/theme/components/switch.d.ts +0 -0
- package/types/theme/components/tabs.d.ts +0 -0
- package/types/theme/components/tag.d.ts +0 -0
- package/types/theme/components/textInput.d.ts +0 -0
- package/types/theme/components/toast.d.ts +0 -0
- package/types/theme/components/toolbar.d.ts +0 -0
- package/types/theme/components/typography.d.ts +2 -0
- package/types/theme/global/borders.d.ts +0 -0
- package/types/theme/global/colors.d.ts +0 -0
- package/types/theme/global/index.d.ts +0 -0
- package/types/theme/global/scale.d.ts +0 -0
- package/types/theme/global/space.d.ts +0 -0
- package/types/theme/global/typography.d.ts +0 -0
- package/types/theme/index.d.ts +4 -2
- package/types/types.d.ts +0 -0
- package/types/utils/__tests__/scale.spec.d.ts +0 -0
- package/types/utils/helpers.d.ts +0 -0
- package/types/utils/hooks.d.ts +0 -0
- package/types/utils/scale.d.ts +0 -0
- package/src/components/TextInput/__tests__/.log/ti-10343.log +0 -62
- package/src/components/TextInput/__tests__/.log/tsserver.log +0 -15584
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
1
|
+
[32m@hero-design/rn:build[0m: cache hit, replaying output [2m1396195302ee8846[0m
|
|
2
|
+
[32m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
|
+
[32m@hero-design/rn:build: [0m$ rollup -c
|
|
4
|
+
[32m@hero-design/rn:build: [0m[36m
|
|
5
|
+
[32m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
|
+
[32m@hero-design/rn:build: [0m[1m[33m(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
7
|
+
[32m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m19.4s[22m[39m
|
|
8
|
+
[32m@hero-design/rn:build: [0m$ tsc --noEmit false --emitDeclarationOnly
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ReactNative from 'react-native';
|
|
2
|
-
import ReactNative__default, { Dimensions, StyleSheet as StyleSheet$1, Text as Text$1, View, TouchableOpacity, Image, Animated, Platform, TouchableWithoutFeedback, Pressable, Easing, Modal, TouchableHighlight, TextInput as TextInput$1, requireNativeComponent, UIManager, I18nManager, Keyboard, FlatList, LayoutAnimation } from 'react-native';
|
|
2
|
+
import ReactNative__default, { Dimensions, StyleSheet as StyleSheet$1, Text as Text$1, View, TouchableOpacity, Image, Animated, Platform, TouchableWithoutFeedback, Pressable, Easing, Modal, TouchableHighlight, TextInput as TextInput$1, InteractionManager, requireNativeComponent, UIManager, I18nManager, Keyboard, FlatList, LayoutAnimation } from 'react-native';
|
|
3
3
|
import React, { useContext, createContext, createElement, forwardRef, useRef, useEffect, useState, useCallback, Children, useLayoutEffect, useImperativeHandle, useMemo } from 'react';
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
|
|
@@ -1296,21 +1296,6 @@ function prefixer(element, index, children, callback) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
1298
|
|
|
1299
|
-
var weakMemoize = function weakMemoize(func) {
|
|
1300
|
-
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
1301
|
-
var cache = new WeakMap();
|
|
1302
|
-
return function (arg) {
|
|
1303
|
-
if (cache.has(arg)) {
|
|
1304
|
-
// $FlowFixMe
|
|
1305
|
-
return cache.get(arg);
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
var ret = func(arg);
|
|
1309
|
-
cache.set(arg, ret);
|
|
1310
|
-
return ret;
|
|
1311
|
-
};
|
|
1312
|
-
};
|
|
1313
|
-
|
|
1314
1299
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
1315
1300
|
var previous = 0;
|
|
1316
1301
|
var character = 0;
|
|
@@ -1548,6 +1533,21 @@ function _extends$2() {
|
|
|
1548
1533
|
return _extends$2.apply(this, arguments);
|
|
1549
1534
|
}
|
|
1550
1535
|
|
|
1536
|
+
var weakMemoize = function weakMemoize(func) {
|
|
1537
|
+
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
1538
|
+
var cache = new WeakMap();
|
|
1539
|
+
return function (arg) {
|
|
1540
|
+
if (cache.has(arg)) {
|
|
1541
|
+
// $FlowFixMe
|
|
1542
|
+
return cache.get(arg);
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
var ret = func(arg);
|
|
1546
|
+
cache.set(arg, ret);
|
|
1547
|
+
return ret;
|
|
1548
|
+
};
|
|
1549
|
+
};
|
|
1550
|
+
|
|
1551
1551
|
var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1552
1552
|
// because this module is primarily intended for the browser and node
|
|
1553
1553
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -2713,7 +2713,8 @@ var getSpace = function getSpace(baseSpace) {
|
|
|
2713
2713
|
xlarge: scale(baseSpace * 4),
|
|
2714
2714
|
xxlarge: scale(baseSpace * 5),
|
|
2715
2715
|
xxxlarge: scale(baseSpace * 6),
|
|
2716
|
-
xxxxlarge: scale(baseSpace * 7)
|
|
2716
|
+
xxxxlarge: scale(baseSpace * 7) // 56
|
|
2717
|
+
|
|
2717
2718
|
};
|
|
2718
2719
|
};
|
|
2719
2720
|
|
|
@@ -3162,6 +3163,96 @@ var getIconTheme = function getIconTheme(theme) {
|
|
|
3162
3163
|
};
|
|
3163
3164
|
};
|
|
3164
3165
|
|
|
3166
|
+
var getListTheme = function getListTheme(theme) {
|
|
3167
|
+
var colors = {
|
|
3168
|
+
checkedListItemContainerBackground: theme.colors.primaryBackground,
|
|
3169
|
+
listItemContainerBackground: theme.colors.platformBackground,
|
|
3170
|
+
leadingStatus: {
|
|
3171
|
+
danger: theme.colors.danger,
|
|
3172
|
+
info: theme.colors.infoLight,
|
|
3173
|
+
success: theme.colors.successDark,
|
|
3174
|
+
warning: theme.colors.warningLight,
|
|
3175
|
+
archived: theme.colors.archived
|
|
3176
|
+
}
|
|
3177
|
+
};
|
|
3178
|
+
var space = {
|
|
3179
|
+
listItemContainerPadding: theme.space.medium,
|
|
3180
|
+
leadingStatusMarginRight: theme.space.small,
|
|
3181
|
+
prefixContainerMarginRight: theme.space.small,
|
|
3182
|
+
suffixContainerMarginLeft: theme.space.small
|
|
3183
|
+
};
|
|
3184
|
+
var radii = {
|
|
3185
|
+
card: theme.radii.medium,
|
|
3186
|
+
cardShadow: theme.radii.base,
|
|
3187
|
+
leadingStatus: theme.radii.rounded
|
|
3188
|
+
};
|
|
3189
|
+
var offsets = {
|
|
3190
|
+
cardShadow: {
|
|
3191
|
+
width: 0,
|
|
3192
|
+
height: 2
|
|
3193
|
+
}
|
|
3194
|
+
};
|
|
3195
|
+
var widths = {
|
|
3196
|
+
leadingStatus: 8
|
|
3197
|
+
};
|
|
3198
|
+
var opacity = {
|
|
3199
|
+
disabled: 0.38,
|
|
3200
|
+
enabled: 1,
|
|
3201
|
+
cardShadow: 1
|
|
3202
|
+
};
|
|
3203
|
+
return {
|
|
3204
|
+
colors: colors,
|
|
3205
|
+
space: space,
|
|
3206
|
+
radii: radii,
|
|
3207
|
+
offsets: offsets,
|
|
3208
|
+
widths: widths,
|
|
3209
|
+
opacity: opacity
|
|
3210
|
+
};
|
|
3211
|
+
};
|
|
3212
|
+
|
|
3213
|
+
var getPinInputTheme = function getPinInputTheme(theme) {
|
|
3214
|
+
var borderWidths = {
|
|
3215
|
+
"default": theme.borderWidths.base,
|
|
3216
|
+
focused: theme.borderWidths.medium
|
|
3217
|
+
};
|
|
3218
|
+
var colors = {
|
|
3219
|
+
"default": theme.colors.text,
|
|
3220
|
+
mask: theme.colors.subduedText,
|
|
3221
|
+
error: theme.colors.danger,
|
|
3222
|
+
disabled: theme.colors.archivedDark
|
|
3223
|
+
};
|
|
3224
|
+
var fonts = {
|
|
3225
|
+
cellText: theme.fonts.semiBold,
|
|
3226
|
+
errorMessage: theme.fonts.regular
|
|
3227
|
+
};
|
|
3228
|
+
var fontSizes = {
|
|
3229
|
+
cellText: theme.fontSizes.xxxxlarge,
|
|
3230
|
+
errorMessage: theme.fontSizes.small
|
|
3231
|
+
};
|
|
3232
|
+
var sizes = {
|
|
3233
|
+
cellWidth: theme.space.xxlarge,
|
|
3234
|
+
cellHeight: theme.space.xxxlarge,
|
|
3235
|
+
mask: theme.space.medium
|
|
3236
|
+
};
|
|
3237
|
+
var space = {
|
|
3238
|
+
spacer: theme.space.medium,
|
|
3239
|
+
errorMessagePadding: theme.space.xsmall
|
|
3240
|
+
};
|
|
3241
|
+
var radii = {
|
|
3242
|
+
cell: theme.radii.medium,
|
|
3243
|
+
mask: theme.radii.rounded
|
|
3244
|
+
};
|
|
3245
|
+
return {
|
|
3246
|
+
borderWidths: borderWidths,
|
|
3247
|
+
colors: colors,
|
|
3248
|
+
fonts: fonts,
|
|
3249
|
+
fontSizes: fontSizes,
|
|
3250
|
+
sizes: sizes,
|
|
3251
|
+
space: space,
|
|
3252
|
+
radii: radii
|
|
3253
|
+
};
|
|
3254
|
+
};
|
|
3255
|
+
|
|
3165
3256
|
var getProgressTheme = function getProgressTheme(theme) {
|
|
3166
3257
|
var colors = {
|
|
3167
3258
|
primary: theme.colors.primary,
|
|
@@ -3547,13 +3638,15 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
3547
3638
|
small: theme.fontSizes.small,
|
|
3548
3639
|
medium: theme.fontSizes.medium,
|
|
3549
3640
|
large: theme.fontSizes.large,
|
|
3550
|
-
xlarge: theme.fontSizes.xlarge
|
|
3641
|
+
xlarge: theme.fontSizes.xlarge,
|
|
3642
|
+
xxxxxlarge: theme.fontSizes.xxxxxlarge
|
|
3551
3643
|
};
|
|
3552
3644
|
var lineHeights = {
|
|
3553
3645
|
small: theme.lineHeights.small,
|
|
3554
3646
|
medium: theme.lineHeights.medium,
|
|
3555
3647
|
large: theme.lineHeights.large,
|
|
3556
|
-
xlarge: theme.lineHeights.xlarge
|
|
3648
|
+
xlarge: theme.lineHeights.xlarge,
|
|
3649
|
+
xxxxxlarge: theme.lineHeights.xxxxxlarge
|
|
3557
3650
|
};
|
|
3558
3651
|
return {
|
|
3559
3652
|
colors: colors,
|
|
@@ -3563,53 +3656,6 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
3563
3656
|
};
|
|
3564
3657
|
};
|
|
3565
3658
|
|
|
3566
|
-
var getListTheme = function getListTheme(theme) {
|
|
3567
|
-
var colors = {
|
|
3568
|
-
checkedListItemContainerBackground: theme.colors.primaryBackground,
|
|
3569
|
-
listItemContainerBackground: theme.colors.platformBackground,
|
|
3570
|
-
leadingStatus: {
|
|
3571
|
-
danger: theme.colors.danger,
|
|
3572
|
-
info: theme.colors.infoLight,
|
|
3573
|
-
success: theme.colors.successDark,
|
|
3574
|
-
warning: theme.colors.warningLight,
|
|
3575
|
-
archived: theme.colors.archived
|
|
3576
|
-
}
|
|
3577
|
-
};
|
|
3578
|
-
var space = {
|
|
3579
|
-
listItemContainerPadding: theme.space.medium,
|
|
3580
|
-
leadingStatusMarginRight: theme.space.small,
|
|
3581
|
-
prefixContainerMarginRight: theme.space.small,
|
|
3582
|
-
suffixContainerMarginLeft: theme.space.small
|
|
3583
|
-
};
|
|
3584
|
-
var radii = {
|
|
3585
|
-
card: theme.radii.medium,
|
|
3586
|
-
cardShadow: theme.radii.base,
|
|
3587
|
-
leadingStatus: theme.radii.rounded
|
|
3588
|
-
};
|
|
3589
|
-
var offsets = {
|
|
3590
|
-
cardShadow: {
|
|
3591
|
-
width: 0,
|
|
3592
|
-
height: 2
|
|
3593
|
-
}
|
|
3594
|
-
};
|
|
3595
|
-
var widths = {
|
|
3596
|
-
leadingStatus: 8
|
|
3597
|
-
};
|
|
3598
|
-
var opacity = {
|
|
3599
|
-
disabled: 0.38,
|
|
3600
|
-
enabled: 1,
|
|
3601
|
-
cardShadow: 1
|
|
3602
|
-
};
|
|
3603
|
-
return {
|
|
3604
|
-
colors: colors,
|
|
3605
|
-
space: space,
|
|
3606
|
-
radii: radii,
|
|
3607
|
-
offsets: offsets,
|
|
3608
|
-
widths: widths,
|
|
3609
|
-
opacity: opacity
|
|
3610
|
-
};
|
|
3611
|
-
};
|
|
3612
|
-
|
|
3613
3659
|
var getTheme = function getTheme() {
|
|
3614
3660
|
var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : scale$1;
|
|
3615
3661
|
var systemPallete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : systemPalette;
|
|
@@ -3629,6 +3675,8 @@ var getTheme = function getTheme() {
|
|
|
3629
3675
|
drawer: getDrawerTheme(globalTheme),
|
|
3630
3676
|
fab: getFABTheme(globalTheme),
|
|
3631
3677
|
icon: getIconTheme(globalTheme),
|
|
3678
|
+
list: getListTheme(globalTheme),
|
|
3679
|
+
pinInput: getPinInputTheme(globalTheme),
|
|
3632
3680
|
progress: getProgressTheme(globalTheme),
|
|
3633
3681
|
radio: getRadioTheme(globalTheme),
|
|
3634
3682
|
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
@@ -3640,8 +3688,7 @@ var getTheme = function getTheme() {
|
|
|
3640
3688
|
textInput: getTextInputTheme(globalTheme),
|
|
3641
3689
|
toast: getToastTheme(globalTheme),
|
|
3642
3690
|
toolbar: getToolbarTheme(globalTheme),
|
|
3643
|
-
typography: getTypographyTheme(globalTheme)
|
|
3644
|
-
list: getListTheme(globalTheme)
|
|
3691
|
+
typography: getTypographyTheme(globalTheme)
|
|
3645
3692
|
}
|
|
3646
3693
|
});
|
|
3647
3694
|
};
|
|
@@ -16102,7 +16149,7 @@ var Divider = function Divider(_ref) {
|
|
|
16102
16149
|
};
|
|
16103
16150
|
|
|
16104
16151
|
var AnimatedPressable$1 = Animated.createAnimatedComponent(Pressable);
|
|
16105
|
-
var StyledWrapper$
|
|
16152
|
+
var StyledWrapper$6 = index$5(View)(_objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
16106
16153
|
flexDirection: 'column-reverse'
|
|
16107
16154
|
}));
|
|
16108
16155
|
var StyledBottomSheet = index$5(Animated.View)(function (_ref) {
|
|
@@ -16864,7 +16911,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
16864
16911
|
transparent: true,
|
|
16865
16912
|
testID: testID,
|
|
16866
16913
|
onShow: onOpen
|
|
16867
|
-
}, /*#__PURE__*/React.createElement(StyledWrapper$
|
|
16914
|
+
}, /*#__PURE__*/React.createElement(StyledWrapper$6, {
|
|
16868
16915
|
pointerEvents: "box-none"
|
|
16869
16916
|
}, /*#__PURE__*/React.createElement(StyledBackdrop$2, {
|
|
16870
16917
|
style: {
|
|
@@ -16972,7 +17019,7 @@ var index$4 = Object.assign(Card, {
|
|
|
16972
17019
|
Data: DataCard
|
|
16973
17020
|
});
|
|
16974
17021
|
|
|
16975
|
-
var StyledWrapper$
|
|
17022
|
+
var StyledWrapper$5 = index$5(Animated.View)(function () {
|
|
16976
17023
|
return {
|
|
16977
17024
|
margin: 0,
|
|
16978
17025
|
padding: 0,
|
|
@@ -17032,7 +17079,7 @@ var Collapse = function Collapse(_ref) {
|
|
|
17032
17079
|
var height = _ref2.height;
|
|
17033
17080
|
setContentHeight(height);
|
|
17034
17081
|
}, [contentHeight]);
|
|
17035
|
-
return /*#__PURE__*/React.createElement(StyledWrapper$
|
|
17082
|
+
return /*#__PURE__*/React.createElement(StyledWrapper$5, {
|
|
17036
17083
|
style: [style, {
|
|
17037
17084
|
height: collapseAnim
|
|
17038
17085
|
}],
|
|
@@ -17044,7 +17091,7 @@ var Collapse = function Collapse(_ref) {
|
|
|
17044
17091
|
}, children)));
|
|
17045
17092
|
};
|
|
17046
17093
|
|
|
17047
|
-
var StyledWrapper$
|
|
17094
|
+
var StyledWrapper$4 = index$5(TouchableOpacity)(function (_ref) {
|
|
17048
17095
|
var theme = _ref.theme,
|
|
17049
17096
|
disabled = _ref.disabled;
|
|
17050
17097
|
return {
|
|
@@ -17066,7 +17113,7 @@ var CheckBox = function CheckBox(_ref) {
|
|
|
17066
17113
|
onPress = _ref.onPress,
|
|
17067
17114
|
style = _ref.style,
|
|
17068
17115
|
testID = _ref.testID;
|
|
17069
|
-
return /*#__PURE__*/React.createElement(StyledWrapper$
|
|
17116
|
+
return /*#__PURE__*/React.createElement(StyledWrapper$4, {
|
|
17070
17117
|
onPress: onPress,
|
|
17071
17118
|
disabled: disabled,
|
|
17072
17119
|
style: style,
|
|
@@ -17455,10 +17502,14 @@ var ActionGroup = function ActionGroup(_ref2) {
|
|
|
17455
17502
|
inputRange: [0, 1],
|
|
17456
17503
|
outputRange: [400, 0]
|
|
17457
17504
|
});
|
|
17458
|
-
var
|
|
17505
|
+
var interpolatedBackdropOpacityAnimation = tranlateXAnimation.current.interpolate({
|
|
17459
17506
|
inputRange: [0, 1],
|
|
17460
17507
|
outputRange: [0, 0.9]
|
|
17461
17508
|
});
|
|
17509
|
+
var interpolatedActionGroupOpacityAnimation = tranlateXAnimation.current.interpolate({
|
|
17510
|
+
inputRange: [0, 1],
|
|
17511
|
+
outputRange: [0, 1]
|
|
17512
|
+
});
|
|
17462
17513
|
return /*#__PURE__*/React.createElement(StyledContainer$1, {
|
|
17463
17514
|
testID: testID,
|
|
17464
17515
|
pointerEvents: "box-none",
|
|
@@ -17467,11 +17518,13 @@ var ActionGroup = function ActionGroup(_ref2) {
|
|
|
17467
17518
|
pointerEvents: active ? 'auto' : 'box-none',
|
|
17468
17519
|
testID: "back-drop",
|
|
17469
17520
|
style: {
|
|
17470
|
-
opacity:
|
|
17521
|
+
opacity: interpolatedBackdropOpacityAnimation
|
|
17471
17522
|
}
|
|
17472
17523
|
}), /*#__PURE__*/React.createElement(StyledActionGroupContainer, {
|
|
17524
|
+
pointerEvents: active ? 'auto' : 'none',
|
|
17473
17525
|
testID: "action-group",
|
|
17474
17526
|
style: {
|
|
17527
|
+
opacity: interpolatedActionGroupOpacityAnimation,
|
|
17475
17528
|
transform: [{
|
|
17476
17529
|
translateX: interpolatedTranlateXAnimation
|
|
17477
17530
|
}]
|
|
@@ -17683,6 +17736,227 @@ var List = {
|
|
|
17683
17736
|
BasicItem: BasicListItem
|
|
17684
17737
|
};
|
|
17685
17738
|
|
|
17739
|
+
var StyledWrapper$3 = index$5(View)(function () {
|
|
17740
|
+
return {
|
|
17741
|
+
alignContent: 'flex-start'
|
|
17742
|
+
};
|
|
17743
|
+
});
|
|
17744
|
+
var StyledPinWrapper = index$5(View)(function () {
|
|
17745
|
+
return {
|
|
17746
|
+
flexDirection: 'row'
|
|
17747
|
+
};
|
|
17748
|
+
});
|
|
17749
|
+
var StyledCell = index$5(View)(function (_ref) {
|
|
17750
|
+
var theme = _ref.theme,
|
|
17751
|
+
themeFocused = _ref.themeFocused,
|
|
17752
|
+
themeState = _ref.themeState;
|
|
17753
|
+
return {
|
|
17754
|
+
justifyContent: 'center',
|
|
17755
|
+
alignItems: 'center',
|
|
17756
|
+
width: theme.__hd__.pinInput.sizes.cellWidth,
|
|
17757
|
+
height: theme.__hd__.pinInput.sizes.cellHeight,
|
|
17758
|
+
borderWidth: themeFocused ? theme.__hd__.pinInput.borderWidths.focused : theme.__hd__.pinInput.borderWidths["default"],
|
|
17759
|
+
borderRadius: theme.__hd__.pinInput.radii.cell,
|
|
17760
|
+
borderColor: theme.__hd__.pinInput.colors[themeState]
|
|
17761
|
+
};
|
|
17762
|
+
});
|
|
17763
|
+
var StyledCellText = index$5(Text$1)(function (_ref2) {
|
|
17764
|
+
var theme = _ref2.theme,
|
|
17765
|
+
themeState = _ref2.themeState;
|
|
17766
|
+
return {
|
|
17767
|
+
fontFamily: theme.__hd__.pinInput.fonts.cellText,
|
|
17768
|
+
fontSize: theme.__hd__.pinInput.fontSizes.cellText,
|
|
17769
|
+
color: theme.__hd__.pinInput.colors[themeState]
|
|
17770
|
+
};
|
|
17771
|
+
});
|
|
17772
|
+
var StyledSpacer = index$5(View)(function (_ref3) {
|
|
17773
|
+
var theme = _ref3.theme;
|
|
17774
|
+
return {
|
|
17775
|
+
marginLeft: theme.__hd__.pinInput.space.spacer
|
|
17776
|
+
};
|
|
17777
|
+
});
|
|
17778
|
+
var StyledMask = index$5(View)(function (_ref4) {
|
|
17779
|
+
var theme = _ref4.theme,
|
|
17780
|
+
themeState = _ref4.themeState;
|
|
17781
|
+
return {
|
|
17782
|
+
width: theme.__hd__.pinInput.sizes.mask,
|
|
17783
|
+
height: theme.__hd__.pinInput.sizes.mask,
|
|
17784
|
+
borderWidth: theme.__hd__.pinInput.borderWidths["default"],
|
|
17785
|
+
borderRadius: theme.__hd__.pinInput.radii.mask,
|
|
17786
|
+
borderColor: theme.__hd__.pinInput.colors[themeState]
|
|
17787
|
+
};
|
|
17788
|
+
});
|
|
17789
|
+
var StyledFilledMask = index$5(View)(function (_ref5) {
|
|
17790
|
+
var theme = _ref5.theme,
|
|
17791
|
+
themeState = _ref5.themeState;
|
|
17792
|
+
return {
|
|
17793
|
+
width: theme.__hd__.pinInput.sizes.mask,
|
|
17794
|
+
height: theme.__hd__.pinInput.sizes.mask,
|
|
17795
|
+
borderWidth: theme.__hd__.pinInput.borderWidths["default"],
|
|
17796
|
+
borderRadius: theme.__hd__.pinInput.radii.mask,
|
|
17797
|
+
borderColor: theme.__hd__.pinInput.colors[themeState],
|
|
17798
|
+
backgroundColor: theme.__hd__.pinInput.colors[themeState]
|
|
17799
|
+
};
|
|
17800
|
+
});
|
|
17801
|
+
var StyledHiddenInput = index$5(TextInput$1)(function (_ref6) {
|
|
17802
|
+
var themePinLength = _ref6.themePinLength,
|
|
17803
|
+
theme = _ref6.theme;
|
|
17804
|
+
var cellWidth = theme.__hd__.pinInput.sizes.cellWidth;
|
|
17805
|
+
var spacerWidth = theme.__hd__.pinInput.space.spacer;
|
|
17806
|
+
return {
|
|
17807
|
+
position: 'absolute',
|
|
17808
|
+
opacity: 0,
|
|
17809
|
+
left: 0,
|
|
17810
|
+
top: 0,
|
|
17811
|
+
width: themePinLength * cellWidth + (themePinLength - 1) * spacerWidth,
|
|
17812
|
+
height: '100%'
|
|
17813
|
+
};
|
|
17814
|
+
});
|
|
17815
|
+
var StyledErrorContainer$1 = index$5(View)(function (_ref7) {
|
|
17816
|
+
var theme = _ref7.theme;
|
|
17817
|
+
return {
|
|
17818
|
+
flexDirection: 'row',
|
|
17819
|
+
paddingTop: theme.__hd__.pinInput.space.errorMessagePadding
|
|
17820
|
+
};
|
|
17821
|
+
});
|
|
17822
|
+
var StyledErrorMessage = index$5(Text$1)(function (_ref8) {
|
|
17823
|
+
var theme = _ref8.theme;
|
|
17824
|
+
return {
|
|
17825
|
+
fontFamily: theme.__hd__.pinInput.fonts.errorMessage,
|
|
17826
|
+
fontSize: theme.__hd__.pinInput.fontSizes.errorMessage,
|
|
17827
|
+
color: theme.__hd__.pinInput.colors.error,
|
|
17828
|
+
paddingLeft: theme.__hd__.pinInput.space.errorMessagePadding
|
|
17829
|
+
};
|
|
17830
|
+
});
|
|
17831
|
+
|
|
17832
|
+
function PinCell(_ref) {
|
|
17833
|
+
var value = _ref.value,
|
|
17834
|
+
_ref$secure = _ref.secure,
|
|
17835
|
+
secure = _ref$secure === void 0 ? true : _ref$secure,
|
|
17836
|
+
_ref$focused = _ref.focused,
|
|
17837
|
+
focused = _ref$focused === void 0 ? false : _ref$focused,
|
|
17838
|
+
_ref$state = _ref.state,
|
|
17839
|
+
state = _ref$state === void 0 ? 'default' : _ref$state;
|
|
17840
|
+
return /*#__PURE__*/React.createElement(StyledCell, {
|
|
17841
|
+
themeFocused: focused,
|
|
17842
|
+
themeState: state
|
|
17843
|
+
}, value === '' && /*#__PURE__*/React.createElement(StyledMask, {
|
|
17844
|
+
themeState: state,
|
|
17845
|
+
testID: "pin-cell-mask"
|
|
17846
|
+
}), value !== '' && secure && /*#__PURE__*/React.createElement(StyledFilledMask, {
|
|
17847
|
+
themeState: state,
|
|
17848
|
+
testID: "pin-cell-filled-mask"
|
|
17849
|
+
}), value !== '' && !secure && /*#__PURE__*/React.createElement(StyledCellText, {
|
|
17850
|
+
themeState: state
|
|
17851
|
+
}, value));
|
|
17852
|
+
}
|
|
17853
|
+
|
|
17854
|
+
function getState(_ref) {
|
|
17855
|
+
var disabled = _ref.disabled,
|
|
17856
|
+
error = _ref.error;
|
|
17857
|
+
|
|
17858
|
+
if (disabled) {
|
|
17859
|
+
return 'disabled';
|
|
17860
|
+
}
|
|
17861
|
+
|
|
17862
|
+
if (error) {
|
|
17863
|
+
return 'error';
|
|
17864
|
+
}
|
|
17865
|
+
|
|
17866
|
+
return 'default';
|
|
17867
|
+
}
|
|
17868
|
+
|
|
17869
|
+
function PinInput(_ref2) {
|
|
17870
|
+
var _ref2$value = _ref2.value,
|
|
17871
|
+
value = _ref2$value === void 0 ? '' : _ref2$value,
|
|
17872
|
+
onChangeText = _ref2.onChangeText,
|
|
17873
|
+
onFulfill = _ref2.onFulfill,
|
|
17874
|
+
_ref2$length = _ref2.length,
|
|
17875
|
+
length = _ref2$length === void 0 ? 4 : _ref2$length,
|
|
17876
|
+
_ref2$disabled = _ref2.disabled,
|
|
17877
|
+
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
17878
|
+
_ref2$secure = _ref2.secure,
|
|
17879
|
+
secure = _ref2$secure === void 0 ? true : _ref2$secure,
|
|
17880
|
+
_ref2$autoFocus = _ref2.autoFocus,
|
|
17881
|
+
autoFocus = _ref2$autoFocus === void 0 ? false : _ref2$autoFocus,
|
|
17882
|
+
error = _ref2.error,
|
|
17883
|
+
style = _ref2.style,
|
|
17884
|
+
testID = _ref2.testID;
|
|
17885
|
+
var inputRef = useRef(null);
|
|
17886
|
+
|
|
17887
|
+
var _useState = useState(autoFocus),
|
|
17888
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17889
|
+
focused = _useState2[0],
|
|
17890
|
+
setFocused = _useState2[1];
|
|
17891
|
+
|
|
17892
|
+
var state = getState({
|
|
17893
|
+
disabled: disabled,
|
|
17894
|
+
error: error
|
|
17895
|
+
});
|
|
17896
|
+
var focus = useCallback(function () {
|
|
17897
|
+
if (inputRef !== null && inputRef !== void 0 && inputRef.current) {
|
|
17898
|
+
inputRef.current.focus();
|
|
17899
|
+
setFocused(true);
|
|
17900
|
+
}
|
|
17901
|
+
}, []);
|
|
17902
|
+
var blur = useCallback(function () {
|
|
17903
|
+
if (inputRef !== null && inputRef !== void 0 && inputRef.current) {
|
|
17904
|
+
inputRef.current.blur();
|
|
17905
|
+
setFocused(false);
|
|
17906
|
+
}
|
|
17907
|
+
}, []);
|
|
17908
|
+
var changeText = useCallback(function (text) {
|
|
17909
|
+
var pin = (text.match(/[0-9]/g) || []).join('');
|
|
17910
|
+
|
|
17911
|
+
if (onChangeText) {
|
|
17912
|
+
onChangeText(pin);
|
|
17913
|
+
}
|
|
17914
|
+
|
|
17915
|
+
if (pin.length === length && onFulfill) {
|
|
17916
|
+
onFulfill(pin);
|
|
17917
|
+
}
|
|
17918
|
+
}, []);
|
|
17919
|
+
useEffect(function () {
|
|
17920
|
+
// Must run after animations for keyboard to automatically open
|
|
17921
|
+
if (autoFocus) {
|
|
17922
|
+
InteractionManager.runAfterInteractions(focus);
|
|
17923
|
+
}
|
|
17924
|
+
}, [inputRef]);
|
|
17925
|
+
return /*#__PURE__*/React.createElement(StyledWrapper$3, {
|
|
17926
|
+
style: style,
|
|
17927
|
+
testID: testID
|
|
17928
|
+
}, /*#__PURE__*/React.createElement(StyledPinWrapper, null, _toConsumableArray$1(Array(length).keys()).map(function (index) {
|
|
17929
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
17930
|
+
key: index
|
|
17931
|
+
}, index !== 0 && /*#__PURE__*/React.createElement(StyledSpacer, null), /*#__PURE__*/React.createElement(PinCell, {
|
|
17932
|
+
value: value.charAt(index),
|
|
17933
|
+
secure: secure,
|
|
17934
|
+
focused: focused && index === value.length,
|
|
17935
|
+
state: state
|
|
17936
|
+
}));
|
|
17937
|
+
})), state === 'error' && /*#__PURE__*/React.createElement(StyledErrorContainer$1, null, /*#__PURE__*/React.createElement(Icon, {
|
|
17938
|
+
icon: "circle-info",
|
|
17939
|
+
size: "xsmall",
|
|
17940
|
+
intent: "danger",
|
|
17941
|
+
testID: "pin-error-icon"
|
|
17942
|
+
}), /*#__PURE__*/React.createElement(StyledErrorMessage, null, error)), /*#__PURE__*/React.createElement(StyledHiddenInput, {
|
|
17943
|
+
themePinLength: length,
|
|
17944
|
+
ref: inputRef,
|
|
17945
|
+
value: value,
|
|
17946
|
+
onChangeText: changeText,
|
|
17947
|
+
secureTextEntry: secure,
|
|
17948
|
+
editable: !disabled,
|
|
17949
|
+
autoFocus: autoFocus,
|
|
17950
|
+
onFocus: focus,
|
|
17951
|
+
onBlur: blur,
|
|
17952
|
+
maxLength: length,
|
|
17953
|
+
keyboardType: "numeric",
|
|
17954
|
+
contextMenuHidden: true,
|
|
17955
|
+
caretHidden: true,
|
|
17956
|
+
testID: "pin-hidden-input"
|
|
17957
|
+
}));
|
|
17958
|
+
}
|
|
17959
|
+
|
|
17686
17960
|
var HalfCircleWrapper = index$5(View)(function (_ref) {
|
|
17687
17961
|
var theme = _ref.theme;
|
|
17688
17962
|
return {
|
|
@@ -18538,7 +18812,7 @@ var TextInput = function TextInput(_ref2) {
|
|
|
18538
18812
|
}, required && /*#__PURE__*/React.createElement(StyledAsteriskLabel, {
|
|
18539
18813
|
themeVariant: variant,
|
|
18540
18814
|
fontSize: "small"
|
|
18541
|
-
}, "*"), /*#__PURE__*/React.createElement(StyledLabel, {
|
|
18815
|
+
}, "*"), !!label && /*#__PURE__*/React.createElement(StyledLabel, {
|
|
18542
18816
|
nativeID: accessibilityLabelledBy,
|
|
18543
18817
|
testID: "input-label",
|
|
18544
18818
|
fontSize: "small",
|
|
@@ -18552,7 +18826,7 @@ var TextInput = function TextInput(_ref2) {
|
|
|
18552
18826
|
pointerEvents: "none"
|
|
18553
18827
|
}, required && /*#__PURE__*/React.createElement(StyledAsteriskLabelInsideTextInput, {
|
|
18554
18828
|
themeVariant: variant
|
|
18555
|
-
}, "*"), /*#__PURE__*/React.createElement(StyledLabelInsideTextInput, {
|
|
18829
|
+
}, "*"), !!label && /*#__PURE__*/React.createElement(StyledLabelInsideTextInput, {
|
|
18556
18830
|
nativeID: accessibilityLabelledBy,
|
|
18557
18831
|
testID: "input-label",
|
|
18558
18832
|
fontSize: "medium",
|
|
@@ -19915,4 +20189,4 @@ var index = Object.assign(Toolbar, {
|
|
|
19915
20189
|
Group: ToolbarGroup
|
|
19916
20190
|
});
|
|
19917
20191
|
|
|
19918
|
-
export { Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, CompoundButton as Button, index$4 as Card, CheckBox as Checkbox, Collapse, ContentNavigator, Divider, Drawer, index$3 as FAB, Icon, List, Progress, CompoundRadio as Radio, SectionHeading, index$2 as Select, Spinner, Switch, index$1 as Tabs, Tag, TextInput, ThemeProvider, Toast, index as Toolbar, Typography, getTheme, scale, theme, useTheme };
|
|
20192
|
+
export { Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, CompoundButton as Button, index$4 as Card, CheckBox as Checkbox, Collapse, ContentNavigator, Divider, Drawer, index$3 as FAB, Icon, List, PinInput, Progress, CompoundRadio as Radio, SectionHeading, index$2 as Select, Spinner, Switch, index$1 as Tabs, Tag, TextInput, ThemeProvider, Toast, index as Toolbar, Typography, getTheme, scale, theme, useTheme };
|
|
File without changes
|