@hero-design/rn 8.3.0 → 8.3.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 +9 -9
- package/es/index.js +88 -88
- package/lib/index.js +85 -85
- package/package.json +5 -5
- package/src/components/Carousel/CarouselItem.tsx +1 -6
- package/src/components/Carousel/CarouselPaginator/StyledCarouselPaginator.tsx +10 -9
- package/src/components/Carousel/CarouselPaginator/index.tsx +2 -3
- package/src/components/Carousel/StyledCarousel.tsx +9 -6
- package/src/components/Carousel/__tests__/StyledCarousel.spec.tsx +3 -3
- package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +1 -2
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +600 -0
- package/src/components/Carousel/__tests__/index.spec.tsx +15 -7
- package/src/components/Carousel/index.tsx +65 -84
- package/src/components/TextInput/index.tsx +199 -197
- package/src/components/Typography/Text/StyledText.tsx +1 -0
- package/src/components/Typography/Text/index.tsx +1 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +9 -2
- package/src/theme/components/carousel.ts +5 -2
- package/src/theme/components/typography.ts +2 -0
- package/src/theme/global/typography.ts +3 -0
- package/types/components/Carousel/CarouselItem.d.ts +1 -2
- package/types/components/Carousel/CarouselPaginator/StyledCarouselPaginator.d.ts +0 -2
- package/types/components/Carousel/StyledCarousel.d.ts +6 -4
- package/types/components/Carousel/index.d.ts +9 -23
- package/types/components/TextInput/index.d.ts +2 -2
- package/types/components/Typography/Text/StyledText.d.ts +1 -1
- package/types/components/Typography/Text/index.d.ts +1 -1
- package/types/theme/components/carousel.d.ts +3 -0
- package/types/theme/components/typography.d.ts +2 -0
- package/types/theme/global/typography.d.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
1
|
+
[33m@hero-design/rn:build[0m: cache hit, replaying output [2m5e986a2b883ef3bb[0m
|
|
2
|
+
[33m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
|
+
[33m@hero-design/rn:build: [0m$ rollup -c
|
|
4
|
+
[33m@hero-design/rn:build: [0m[36m
|
|
5
|
+
[33m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
|
+
[33m@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
|
+
[33m@hero-design/rn:build: [0m[1m[33m(!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning[39m[22m
|
|
8
|
+
[33m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m28.6s[22m[39m
|
|
9
|
+
[33m@hero-design/rn:build: [0m$ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, ScrollView, Modal, useWindowDimensions, FlatList, TextInput as TextInput$
|
|
2
|
+
import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, Easing, TouchableOpacity, Text as Text$1, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, ScrollView, Modal, useWindowDimensions, FlatList, TextInput as TextInput$1, PanResponder, TouchableHighlight, InteractionManager, Keyboard, SectionList, LayoutAnimation, RefreshControl as RefreshControl$1 } from 'react-native';
|
|
3
3
|
import React, { useContext, createContext, createElement, useMemo, forwardRef, useEffect, useCallback, useRef, useState, useLayoutEffect, useImperativeHandle } from 'react';
|
|
4
4
|
import { createIconSet } from 'react-native-vector-icons';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
@@ -1376,6 +1376,7 @@ var getFontSizes = function getFontSizes(baseFontSize) {
|
|
|
1376
1376
|
});
|
|
1377
1377
|
return {
|
|
1378
1378
|
'7xlarge': scale(fontSizes[10]),
|
|
1379
|
+
'6xlarge': scale(fontSizes[9]),
|
|
1379
1380
|
xxxxxlarge: scale(fontSizes[8]),
|
|
1380
1381
|
xxxxlarge: scale(fontSizes[7]),
|
|
1381
1382
|
xxxlarge: scale(fontSizes[6]),
|
|
@@ -1392,6 +1393,7 @@ var getLineHeights = function getLineHeights(fontSizes) {
|
|
|
1392
1393
|
var additionalSpace = 8;
|
|
1393
1394
|
return {
|
|
1394
1395
|
'7xlarge': fontSizes['7xlarge'] + additionalSpace,
|
|
1396
|
+
'6xlarge': fontSizes['6xlarge'] + additionalSpace,
|
|
1395
1397
|
xxxxxlarge: fontSizes.xxxxxlarge + additionalSpace,
|
|
1396
1398
|
xxxxlarge: fontSizes.xxxxlarge + additionalSpace,
|
|
1397
1399
|
xxxlarge: fontSizes.xxxlarge + additionalSpace,
|
|
@@ -1804,7 +1806,10 @@ var getCarouselTheme = function getCarouselTheme(theme) {
|
|
|
1804
1806
|
var space = {
|
|
1805
1807
|
headingMarginTop: theme.space.small,
|
|
1806
1808
|
headingMarginBottom: theme.space.medium,
|
|
1807
|
-
paginatorMarginHorizontal: theme.space.small
|
|
1809
|
+
paginatorMarginHorizontal: theme.space.small,
|
|
1810
|
+
footerPaddingHorizontal: theme.space.large,
|
|
1811
|
+
footerPaddingVertical: theme.space.medium,
|
|
1812
|
+
footerMarginBottom: theme.space.large
|
|
1808
1813
|
};
|
|
1809
1814
|
var sizes = {
|
|
1810
1815
|
indicatorWidth: theme.sizes.medium,
|
|
@@ -1815,13 +1820,13 @@ var getCarouselTheme = function getCarouselTheme(theme) {
|
|
|
1815
1820
|
paginatorBorderRadius: theme.radii.rounded
|
|
1816
1821
|
};
|
|
1817
1822
|
var fontSizes = {
|
|
1818
|
-
heading: theme.fontSizes
|
|
1823
|
+
heading: theme.fontSizes['6xlarge']
|
|
1819
1824
|
};
|
|
1820
1825
|
var fonts = {
|
|
1821
1826
|
heading: theme.fonts.playful.semiBold
|
|
1822
1827
|
};
|
|
1823
1828
|
var lineHeights = {
|
|
1824
|
-
heading: theme.lineHeights
|
|
1829
|
+
heading: theme.lineHeights['6xlarge']
|
|
1825
1830
|
};
|
|
1826
1831
|
return {
|
|
1827
1832
|
colors: colors,
|
|
@@ -2669,6 +2674,7 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
2669
2674
|
xlarge: theme.fontSizes.xlarge,
|
|
2670
2675
|
xxxlarge: theme.fontSizes.xxxlarge,
|
|
2671
2676
|
xxxxxlarge: theme.fontSizes.xxxxxlarge,
|
|
2677
|
+
'6xlarge': theme.fontSizes['6xlarge'],
|
|
2672
2678
|
'7xlarge': theme.fontSizes['7xlarge']
|
|
2673
2679
|
};
|
|
2674
2680
|
var lineHeights = {
|
|
@@ -2678,6 +2684,7 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
2678
2684
|
xlarge: theme.lineHeights.xlarge,
|
|
2679
2685
|
xxxlarge: theme.lineHeights.xxxlarge,
|
|
2680
2686
|
xxxxxlarge: theme.lineHeights.xxxxxlarge,
|
|
2687
|
+
'6xlarge': theme.lineHeights['6xlarge'],
|
|
2681
2688
|
'7xlarge': theme.lineHeights['7xlarge']
|
|
2682
2689
|
};
|
|
2683
2690
|
return {
|
|
@@ -10489,7 +10496,8 @@ var Calendar = function Calendar(_ref) {
|
|
|
10489
10496
|
var StyledCarouselPaginator = index$a(View)(function () {
|
|
10490
10497
|
return {
|
|
10491
10498
|
flexDirection: 'row',
|
|
10492
|
-
alignItems: 'center'
|
|
10499
|
+
alignItems: 'center',
|
|
10500
|
+
marginStart: 'auto'
|
|
10493
10501
|
};
|
|
10494
10502
|
});
|
|
10495
10503
|
var StyledCarouselPaginatorAnimatedView = index$a(Animated.View)(function (_ref) {
|
|
@@ -10510,7 +10518,7 @@ var CarouselPaginator = function CarouselPaginator(_ref) {
|
|
|
10510
10518
|
width = _useWindowDimensions.width;
|
|
10511
10519
|
var theme = useTheme();
|
|
10512
10520
|
return /*#__PURE__*/React.createElement(StyledCarouselPaginator, null, new Array(numberOfSlides).fill('').map(function (_, index) {
|
|
10513
|
-
var inputRange = [(index - 1) * width, index * width, (index + 1) * width];
|
|
10521
|
+
var inputRange = [(index - 1) * width - 1, index * width - 1, (index + 1) * width];
|
|
10514
10522
|
var indicatorWidth = scrollX.interpolate({
|
|
10515
10523
|
inputRange: inputRange,
|
|
10516
10524
|
outputRange: [theme.space.small, theme.space.large, theme.space.small],
|
|
@@ -10522,7 +10530,6 @@ var CarouselPaginator = function CarouselPaginator(_ref) {
|
|
|
10522
10530
|
extrapolate: 'clamp'
|
|
10523
10531
|
});
|
|
10524
10532
|
return /*#__PURE__*/React.createElement(StyledCarouselPaginatorAnimatedView, {
|
|
10525
|
-
indicatorWidth: indicatorWidth,
|
|
10526
10533
|
style: [{
|
|
10527
10534
|
width: indicatorWidth,
|
|
10528
10535
|
opacity: opacity
|
|
@@ -10553,10 +10560,9 @@ var Image = function Image(_ref) {
|
|
|
10553
10560
|
}, imageNativeProps));
|
|
10554
10561
|
};
|
|
10555
10562
|
|
|
10556
|
-
var
|
|
10563
|
+
var StyledBackDrop = index$a(View)(function (_ref) {
|
|
10557
10564
|
var themeSlideBackground = _ref.themeSlideBackground;
|
|
10558
10565
|
return {
|
|
10559
|
-
zIndex: 99999,
|
|
10560
10566
|
position: 'absolute',
|
|
10561
10567
|
backgroundColor: themeSlideBackground,
|
|
10562
10568
|
top: 0,
|
|
@@ -10567,8 +10573,8 @@ var StyledCarousel = index$a(View)(function (_ref) {
|
|
|
10567
10573
|
});
|
|
10568
10574
|
var StyledCarouselView = index$a(View)(function () {
|
|
10569
10575
|
return {
|
|
10570
|
-
|
|
10571
|
-
|
|
10576
|
+
flexGrow: 2,
|
|
10577
|
+
justifyContent: 'space-between'
|
|
10572
10578
|
};
|
|
10573
10579
|
});
|
|
10574
10580
|
var StyledCarouselHeading = index$a(Typography.Text)(function (_ref2) {
|
|
@@ -10594,9 +10600,14 @@ var StyledCarouselContentWrapper = index$a(Box)(function (_ref3) {
|
|
|
10594
10600
|
width: width
|
|
10595
10601
|
};
|
|
10596
10602
|
});
|
|
10597
|
-
var StyledCarouselFooterWrapper = index$a(
|
|
10603
|
+
var StyledCarouselFooterWrapper = index$a(View)(function (_ref4) {
|
|
10604
|
+
var theme = _ref4.theme;
|
|
10598
10605
|
return {
|
|
10599
|
-
|
|
10606
|
+
paddingHorizontal: theme.__hd__.carousel.space.footerPaddingHorizontal,
|
|
10607
|
+
flexDirection: 'row',
|
|
10608
|
+
justifyContent: 'space-between',
|
|
10609
|
+
paddingVertical: theme.__hd__.carousel.space.footerPaddingVertical,
|
|
10610
|
+
marginBottom: theme.__hd__.carousel.space.footerMarginBottom
|
|
10600
10611
|
};
|
|
10601
10612
|
});
|
|
10602
10613
|
|
|
@@ -10605,8 +10616,7 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
10605
10616
|
image = _ref.image,
|
|
10606
10617
|
content = _ref.content,
|
|
10607
10618
|
heading = _ref.heading,
|
|
10608
|
-
body = _ref.body
|
|
10609
|
-
minHeight = _ref.minHeight;
|
|
10619
|
+
body = _ref.body;
|
|
10610
10620
|
return /*#__PURE__*/React.createElement(Box, {
|
|
10611
10621
|
style: {
|
|
10612
10622
|
width: width
|
|
@@ -10618,67 +10628,71 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
10618
10628
|
}), /*#__PURE__*/React.createElement(StyledCarouselContentWrapper, {
|
|
10619
10629
|
paddingHorizontal: "large",
|
|
10620
10630
|
marginTop: "large",
|
|
10621
|
-
width: width
|
|
10622
|
-
|
|
10623
|
-
minHeight: minHeight
|
|
10624
|
-
}
|
|
10625
|
-
}, content, /*#__PURE__*/React.createElement(StyledCarouselHeading, null, heading), body ? /*#__PURE__*/React.createElement(Typography.Text, {
|
|
10626
|
-
fontSize: "large"
|
|
10627
|
-
}, body) : null));
|
|
10631
|
+
width: width
|
|
10632
|
+
}, content, /*#__PURE__*/React.createElement(StyledCarouselHeading, null, heading), body ? /*#__PURE__*/React.createElement(Typography.Text, null, body) : null));
|
|
10628
10633
|
};
|
|
10629
10634
|
|
|
10630
|
-
var _excluded$9 = ["items", "
|
|
10635
|
+
var _excluded$9 = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style"];
|
|
10636
|
+
function useStateFromProp(initialValue) {
|
|
10637
|
+
var _useState = useState(initialValue),
|
|
10638
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
10639
|
+
value = _useState2[0],
|
|
10640
|
+
setValue = _useState2[1];
|
|
10641
|
+
useEffect(function () {
|
|
10642
|
+
return setValue(initialValue);
|
|
10643
|
+
}, [initialValue]);
|
|
10644
|
+
return [value, setValue];
|
|
10645
|
+
}
|
|
10631
10646
|
var Carousel = function Carousel(_ref) {
|
|
10632
10647
|
var items = _ref.items,
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
_ref$
|
|
10637
|
-
|
|
10638
|
-
_ref$skipButtonLabel = _ref.skipButtonLabel,
|
|
10639
|
-
skipButtonLabel = _ref$skipButtonLabel === void 0 ? 'Skip' : _ref$skipButtonLabel,
|
|
10640
|
-
_ref$footerHeight = _ref.footerHeight,
|
|
10641
|
-
footerHeight = _ref$footerHeight === void 0 ? 70 : _ref$footerHeight,
|
|
10642
|
-
_ref$minContentHeight = _ref.minContentHeight,
|
|
10643
|
-
minContentHeight = _ref$minContentHeight === void 0 ? 250 : _ref$minContentHeight,
|
|
10648
|
+
onItemIndexChange = _ref.onItemIndexChange,
|
|
10649
|
+
renderActions = _ref.renderActions,
|
|
10650
|
+
_ref$selectedItemInde = _ref.selectedItemIndex,
|
|
10651
|
+
selectedItemIndex = _ref$selectedItemInde === void 0 ? 0 : _ref$selectedItemInde,
|
|
10652
|
+
style = _ref.style,
|
|
10644
10653
|
nativeProps = _objectWithoutProperties(_ref, _excluded$9);
|
|
10645
10654
|
var carouselRef = useRef(null);
|
|
10646
|
-
var
|
|
10647
|
-
|
|
10648
|
-
currentSlideIndex =
|
|
10649
|
-
setCurrentSlideIndex =
|
|
10655
|
+
var _useStateFromProp = useStateFromProp(selectedItemIndex),
|
|
10656
|
+
_useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
|
|
10657
|
+
currentSlideIndex = _useStateFromProp2[0],
|
|
10658
|
+
setCurrentSlideIndex = _useStateFromProp2[1];
|
|
10659
|
+
var internalOnItemIndexChange = useCallback(function (index) {
|
|
10660
|
+
setCurrentSlideIndex(index);
|
|
10661
|
+
if (onItemIndexChange) {
|
|
10662
|
+
onItemIndexChange(index);
|
|
10663
|
+
}
|
|
10664
|
+
}, [setCurrentSlideIndex, onItemIndexChange]);
|
|
10650
10665
|
var _useWindowDimensions = useWindowDimensions(),
|
|
10651
10666
|
width = _useWindowDimensions.width;
|
|
10652
10667
|
var scrollX = useRef(new Animated.Value(0)).current;
|
|
10668
|
+
useEffect(function () {
|
|
10669
|
+
// must use setTimeout since when layout is mounted, the pagination dots are not set correct scrollX
|
|
10670
|
+
var handle = setTimeout(function () {
|
|
10671
|
+
var _carouselRef$current;
|
|
10672
|
+
scrollX.setValue(currentSlideIndex * width);
|
|
10673
|
+
(_carouselRef$current = carouselRef.current) === null || _carouselRef$current === void 0 ? void 0 : _carouselRef$current.scrollToOffset({
|
|
10674
|
+
offset: currentSlideIndex * width,
|
|
10675
|
+
animated: true
|
|
10676
|
+
});
|
|
10677
|
+
}, 100);
|
|
10678
|
+
return function () {
|
|
10679
|
+
clearTimeout(handle);
|
|
10680
|
+
};
|
|
10681
|
+
}, [currentSlideIndex, carouselRef]);
|
|
10653
10682
|
var visibleSlideChanged = useCallback(function (_ref2) {
|
|
10654
10683
|
var viewableItems = _ref2.viewableItems;
|
|
10655
10684
|
if (!viewableItems || viewableItems && !viewableItems.length) return;
|
|
10656
|
-
var
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
if (onSlideChange) {
|
|
10660
|
-
onSlideChange(currentSlide);
|
|
10661
|
-
}
|
|
10662
|
-
}, [items, onSlideChange]);
|
|
10663
|
-
var skipCarousel = useCallback(function () {
|
|
10664
|
-
var currentSlide = items[currentSlideIndex];
|
|
10665
|
-
if (onSkipPress) {
|
|
10666
|
-
onSkipPress(currentSlide);
|
|
10667
|
-
}
|
|
10668
|
-
}, [currentSlideIndex, onSkipPress, items]);
|
|
10669
|
-
var finishCarousel = useCallback(function () {
|
|
10670
|
-
var currentSlide = items[currentSlideIndex];
|
|
10671
|
-
if (onFinishPress) {
|
|
10672
|
-
onFinishPress(currentSlide);
|
|
10673
|
-
}
|
|
10674
|
-
}, [onFinishPress, items, currentSlideIndex]);
|
|
10685
|
+
var index = viewableItems[0].index;
|
|
10686
|
+
internalOnItemIndexChange(index);
|
|
10687
|
+
}, []);
|
|
10675
10688
|
var viewConfig = useRef({
|
|
10676
10689
|
viewAreaCoveragePercentThreshold: 50
|
|
10677
10690
|
}).current;
|
|
10678
|
-
|
|
10679
|
-
|
|
10691
|
+
return /*#__PURE__*/React.createElement(View, _extends$1({
|
|
10692
|
+
style: style
|
|
10693
|
+
}, nativeProps), /*#__PURE__*/React.createElement(StyledBackDrop, {
|
|
10680
10694
|
themeSlideBackground: items[currentSlideIndex].background
|
|
10681
|
-
}
|
|
10695
|
+
}), /*#__PURE__*/React.createElement(StyledCarouselView, null, /*#__PURE__*/React.createElement(FlatList, {
|
|
10682
10696
|
horizontal: true,
|
|
10683
10697
|
showsHorizontalScrollIndicator: false,
|
|
10684
10698
|
pagingEnabled: true,
|
|
@@ -10709,23 +10723,10 @@ var Carousel = function Carousel(_ref) {
|
|
|
10709
10723
|
heading: heading,
|
|
10710
10724
|
body: body,
|
|
10711
10725
|
content: content,
|
|
10712
|
-
minHeight: minContentHeight,
|
|
10713
10726
|
width: width
|
|
10714
10727
|
});
|
|
10715
10728
|
}
|
|
10716
|
-
}), /*#__PURE__*/React.createElement(StyledCarouselFooterWrapper, {
|
|
10717
|
-
paddingHorizontal: "large",
|
|
10718
|
-
flexDirection: "row",
|
|
10719
|
-
justifyContent: "space-between",
|
|
10720
|
-
style: {
|
|
10721
|
-
height: footerHeight
|
|
10722
|
-
}
|
|
10723
|
-
}, /*#__PURE__*/React.createElement(CompoundButton, {
|
|
10724
|
-
variant: isLastSlide ? 'filled' : 'text',
|
|
10725
|
-
intent: "primary",
|
|
10726
|
-
onPress: isLastSlide ? finishCarousel : skipCarousel,
|
|
10727
|
-
text: isLastSlide ? finishButtonLabel : skipButtonLabel
|
|
10728
|
-
}), /*#__PURE__*/React.createElement(CarouselPaginator, {
|
|
10729
|
+
}), /*#__PURE__*/React.createElement(StyledCarouselFooterWrapper, null, renderActions && renderActions(currentSlideIndex), /*#__PURE__*/React.createElement(CarouselPaginator, {
|
|
10729
10730
|
numberOfSlides: items.length,
|
|
10730
10731
|
scrollX: scrollX
|
|
10731
10732
|
}))));
|
|
@@ -10957,7 +10958,7 @@ var StyledHelperText = index$a(Typography.Text)(function (_ref10) {
|
|
|
10957
10958
|
fontSize: theme.__hd__.textInput.fontSizes.error
|
|
10958
10959
|
};
|
|
10959
10960
|
});
|
|
10960
|
-
var StyledTextInput = index$a(TextInput$
|
|
10961
|
+
var StyledTextInput = index$a(TextInput$1)(function (_ref11) {
|
|
10961
10962
|
var theme = _ref11.theme;
|
|
10962
10963
|
return {
|
|
10963
10964
|
textAlignVertical: 'center',
|
|
@@ -11034,7 +11035,7 @@ var getVariant$1 = function getVariant(_ref) {
|
|
|
11034
11035
|
// Fix issue: Placeholder is not shown on iOS when multiline is true
|
|
11035
11036
|
// https://github.com/callstack/react-native-paper/pull/3331
|
|
11036
11037
|
var EMPTY_PLACEHOLDER_VALUE = ' ';
|
|
11037
|
-
var TextInput = function
|
|
11038
|
+
var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
11038
11039
|
var _ref3;
|
|
11039
11040
|
var label = _ref2.label,
|
|
11040
11041
|
prefix = _ref2.prefix,
|
|
@@ -11203,8 +11204,7 @@ var TextInput = function TextInput(_ref2, ref) {
|
|
|
11203
11204
|
themeVariant: variant,
|
|
11204
11205
|
fontSize: "small"
|
|
11205
11206
|
}, displayText.length, "/", maxLength)), !!helpText && /*#__PURE__*/React.createElement(StyledHelperText, null, helpText)));
|
|
11206
|
-
};
|
|
11207
|
-
var TextInput$1 = /*#__PURE__*/React.forwardRef(TextInput);
|
|
11207
|
+
});
|
|
11208
11208
|
|
|
11209
11209
|
var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
11210
11210
|
var value = _ref.value,
|
|
@@ -11236,7 +11236,7 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
|
11236
11236
|
}, /*#__PURE__*/React.createElement(View, {
|
|
11237
11237
|
pointerEvents: "none",
|
|
11238
11238
|
testID: "datePickerInputAndroid"
|
|
11239
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
11239
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
11240
11240
|
label: label,
|
|
11241
11241
|
value: displayValue,
|
|
11242
11242
|
suffix: "calendar-dates-outlined",
|
|
@@ -11304,7 +11304,7 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
11304
11304
|
}, /*#__PURE__*/React.createElement(View, {
|
|
11305
11305
|
pointerEvents: "none",
|
|
11306
11306
|
testID: "datePickerInputIOS"
|
|
11307
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
11307
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
11308
11308
|
label: label,
|
|
11309
11309
|
value: displayValue,
|
|
11310
11310
|
suffix: "calendar-dates-outlined",
|
|
@@ -12237,7 +12237,7 @@ var StyledFilledMask = index$a(View)(function (_ref5) {
|
|
|
12237
12237
|
backgroundColor: theme.__hd__.pinInput.colors[themeState]
|
|
12238
12238
|
};
|
|
12239
12239
|
});
|
|
12240
|
-
var StyledHiddenInput = index$a(TextInput$
|
|
12240
|
+
var StyledHiddenInput = index$a(TextInput$1)(function (_ref6) {
|
|
12241
12241
|
var themePinLength = _ref6.themePinLength,
|
|
12242
12242
|
theme = _ref6.theme;
|
|
12243
12243
|
var cellWidth = theme.__hd__.pinInput.sizes.cellWidth;
|
|
@@ -13349,7 +13349,7 @@ function MultiSelect(_ref) {
|
|
|
13349
13349
|
}
|
|
13350
13350
|
}, /*#__PURE__*/React.createElement(View, {
|
|
13351
13351
|
pointerEvents: "none"
|
|
13352
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
13352
|
+
}, /*#__PURE__*/React.createElement(TextInput, _extends$1({}, inputProps, {
|
|
13353
13353
|
label: label,
|
|
13354
13354
|
value: displayedValue,
|
|
13355
13355
|
suffix: "arrow-down",
|
|
@@ -13397,7 +13397,7 @@ function MultiSelect(_ref) {
|
|
|
13397
13397
|
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
13398
13398
|
}
|
|
13399
13399
|
}
|
|
13400
|
-
}, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput
|
|
13400
|
+
}, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput, {
|
|
13401
13401
|
editable: true,
|
|
13402
13402
|
placeholder: "Search",
|
|
13403
13403
|
suffix: "search-outlined",
|
|
@@ -13525,7 +13525,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
13525
13525
|
}
|
|
13526
13526
|
}, /*#__PURE__*/React.createElement(View, {
|
|
13527
13527
|
pointerEvents: "none"
|
|
13528
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
13528
|
+
}, /*#__PURE__*/React.createElement(TextInput, _extends$1({}, inputProps, {
|
|
13529
13529
|
label: label,
|
|
13530
13530
|
value: displayedValue,
|
|
13531
13531
|
suffix: "arrow-down",
|
|
@@ -13557,7 +13557,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
13557
13557
|
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
13558
13558
|
}
|
|
13559
13559
|
}
|
|
13560
|
-
}, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput
|
|
13560
|
+
}, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput, {
|
|
13561
13561
|
editable: true,
|
|
13562
13562
|
placeholder: "Search",
|
|
13563
13563
|
suffix: "search-outlined",
|
|
@@ -14298,7 +14298,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
14298
14298
|
}, /*#__PURE__*/React.createElement(View, {
|
|
14299
14299
|
pointerEvents: "none",
|
|
14300
14300
|
testID: "timePickerInputAndroid"
|
|
14301
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
14301
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
14302
14302
|
label: label,
|
|
14303
14303
|
value: displayValue,
|
|
14304
14304
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -14366,7 +14366,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
14366
14366
|
}, /*#__PURE__*/React.createElement(View, {
|
|
14367
14367
|
pointerEvents: "none",
|
|
14368
14368
|
testID: "timePickerInputIOS"
|
|
14369
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
14369
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
14370
14370
|
label: label,
|
|
14371
14371
|
value: displayValue,
|
|
14372
14372
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -31209,4 +31209,4 @@ var index = Object.assign(RichTextEditor$1, {
|
|
|
31209
31209
|
Toolbar: EditorToolbar
|
|
31210
31210
|
});
|
|
31211
31211
|
|
|
31212
|
-
export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, index$8 as Card, Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, index$6 as FAB, Icon, Image, List, PinInput, Progress, CompoundRadio as Radio, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Slider, Spinner, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput
|
|
31212
|
+
export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, index$8 as Card, Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, index$6 as FAB, Icon, Image, List, PinInput, Progress, CompoundRadio as Radio, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Slider, Spinner, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, workSystemPalette };
|