@hero-design/rn 8.16.1 → 8.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +9 -9
- package/es/index.js +204 -66
- package/lib/index.js +205 -65
- package/package.json +7 -5
- package/rollup.config.js +1 -0
- package/src/components/Error/index.tsx +6 -2
- package/src/components/Skeleton/StyledSkeleton.tsx +25 -0
- package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +498 -0
- package/src/components/Skeleton/__tests__/index.spec.tsx +30 -0
- package/src/components/Skeleton/index.tsx +134 -0
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +15 -0
- package/src/theme/components/skeleton.ts +22 -0
- package/src/theme/getTheme.ts +3 -0
- package/types/components/Skeleton/StyledSkeleton.d.ts +17 -0
- package/types/components/Skeleton/index.d.ts +13 -0
- package/types/index.d.ts +2 -1
- package/types/theme/components/skeleton.d.ts +17 -0
- package/types/theme/getTheme.d.ts +2 -0
package/lib/index.js
CHANGED
|
@@ -9,6 +9,7 @@ var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
|
9
9
|
var DateTimePicker = require('@react-native-community/datetimepicker');
|
|
10
10
|
var RnSlider = require('@react-native-community/slider');
|
|
11
11
|
var reactNativeGestureHandler = require('react-native-gesture-handler');
|
|
12
|
+
var LinearGradient = require('react-native-linear-gradient');
|
|
12
13
|
var PagerView = require('react-native-pager-view');
|
|
13
14
|
var events = require('events');
|
|
14
15
|
var reactNativeWebview = require('react-native-webview');
|
|
@@ -37,6 +38,7 @@ var reactNative__namespace = /*#__PURE__*/_interopNamespace(reactNative);
|
|
|
37
38
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
38
39
|
var DateTimePicker__default = /*#__PURE__*/_interopDefaultLegacy(DateTimePicker);
|
|
39
40
|
var RnSlider__default = /*#__PURE__*/_interopDefaultLegacy(RnSlider);
|
|
41
|
+
var LinearGradient__default = /*#__PURE__*/_interopDefaultLegacy(LinearGradient);
|
|
40
42
|
var PagerView__default = /*#__PURE__*/_interopDefaultLegacy(PagerView);
|
|
41
43
|
|
|
42
44
|
function ownKeys(object, enumerableOnly) {
|
|
@@ -1013,6 +1015,8 @@ var blue$1 = colorScales.blue,
|
|
|
1013
1015
|
dodgerBlueDark15: ultramarineBlue$3.darken15,
|
|
1014
1016
|
dodgerBlueDark30: ultramarineBlue$3.darken30,
|
|
1015
1017
|
dodgerBlueLight30: ultramarineBlue$3.lighten30,
|
|
1018
|
+
dodgerBlueLight45: ultramarineBlue$3.lighten45,
|
|
1019
|
+
dodgerBlueLight60: ultramarineBlue$3.lighten60,
|
|
1016
1020
|
dodgerBlueLight75: ultramarineBlue$3.lighten75,
|
|
1017
1021
|
dodgerBlueLight90: ultramarineBlue$3.lighten90,
|
|
1018
1022
|
green: green$1.base,
|
|
@@ -2606,6 +2610,26 @@ var getSelectTheme = function getSelectTheme(theme) {
|
|
|
2606
2610
|
};
|
|
2607
2611
|
};
|
|
2608
2612
|
|
|
2613
|
+
var getSkeletonTheme = function getSkeletonTheme(theme) {
|
|
2614
|
+
var colors = {
|
|
2615
|
+
lightBackground: theme.colors.neutralGlobalSurface,
|
|
2616
|
+
darkBackground: theme.colors.defaultGlobalSurface,
|
|
2617
|
+
lightGradientStart: theme.colors.neutralGlobalSurface,
|
|
2618
|
+
lightGradientEnd: theme.colors.archivedSurface,
|
|
2619
|
+
darkGradientStart: theme.colors.defaultGlobalSurface,
|
|
2620
|
+
darkGradientEnd: theme.colors.archivedSurface
|
|
2621
|
+
};
|
|
2622
|
+
var radii = {
|
|
2623
|
+
rectangular: 0,
|
|
2624
|
+
circular: theme.radii.rounded,
|
|
2625
|
+
rounded: theme.radii.xlarge
|
|
2626
|
+
};
|
|
2627
|
+
return {
|
|
2628
|
+
colors: colors,
|
|
2629
|
+
radii: radii
|
|
2630
|
+
};
|
|
2631
|
+
};
|
|
2632
|
+
|
|
2609
2633
|
var getSliderTheme = function getSliderTheme(theme) {
|
|
2610
2634
|
var colors = {
|
|
2611
2635
|
minimumTrackTint: theme.colors.primary,
|
|
@@ -3028,6 +3052,7 @@ var getTheme$1 = function getTheme() {
|
|
|
3028
3052
|
richTextEditor: getRichTextEditorTheme(globalTheme),
|
|
3029
3053
|
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
3030
3054
|
select: getSelectTheme(globalTheme),
|
|
3055
|
+
skeleton: getSkeletonTheme(globalTheme),
|
|
3031
3056
|
slider: getSliderTheme(globalTheme),
|
|
3032
3057
|
spinner: getSpinnerTheme(globalTheme),
|
|
3033
3058
|
swipeable: getSwipeableTheme(globalTheme),
|
|
@@ -6050,7 +6075,7 @@ var StyledText$3 = index$a(reactNative.Text)(function (_ref) {
|
|
|
6050
6075
|
});
|
|
6051
6076
|
});
|
|
6052
6077
|
|
|
6053
|
-
var _excluded$
|
|
6078
|
+
var _excluded$r = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
6054
6079
|
var Text = function Text(_ref) {
|
|
6055
6080
|
var children = _ref.children,
|
|
6056
6081
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -6063,7 +6088,7 @@ var Text = function Text(_ref) {
|
|
|
6063
6088
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6064
6089
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6065
6090
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6066
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6091
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
6067
6092
|
return /*#__PURE__*/React__default["default"].createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6068
6093
|
themeFontSize: fontSize,
|
|
6069
6094
|
themeFontWeight: fontWeight,
|
|
@@ -6584,10 +6609,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
|
|
|
6584
6609
|
};
|
|
6585
6610
|
});
|
|
6586
6611
|
|
|
6587
|
-
var _excluded$
|
|
6612
|
+
var _excluded$q = ["style"];
|
|
6588
6613
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
6589
6614
|
var style = _ref.style,
|
|
6590
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
6615
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$q);
|
|
6591
6616
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
6592
6617
|
React.useEffect(function () {
|
|
6593
6618
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(rotateAnimation.current, {
|
|
@@ -6693,7 +6718,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
6693
6718
|
}, content));
|
|
6694
6719
|
};
|
|
6695
6720
|
|
|
6696
|
-
var _excluded$
|
|
6721
|
+
var _excluded$p = ["key"];
|
|
6697
6722
|
var Accordion = function Accordion(_ref) {
|
|
6698
6723
|
var items = _ref.items,
|
|
6699
6724
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -6714,7 +6739,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
6714
6739
|
testID: testID
|
|
6715
6740
|
}, items.map(function (_ref2, index) {
|
|
6716
6741
|
var key = _ref2.key,
|
|
6717
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
6742
|
+
props = _objectWithoutProperties(_ref2, _excluded$p);
|
|
6718
6743
|
var open = _activeItemKey === key;
|
|
6719
6744
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
6720
6745
|
key: key
|
|
@@ -6829,7 +6854,7 @@ var Alert = function Alert(_ref2) {
|
|
|
6829
6854
|
})) : null);
|
|
6830
6855
|
};
|
|
6831
6856
|
|
|
6832
|
-
var StyledContainer$
|
|
6857
|
+
var StyledContainer$6 = index$a(reactNative.View)({
|
|
6833
6858
|
alignItems: 'center',
|
|
6834
6859
|
flexDirection: 'row'
|
|
6835
6860
|
});
|
|
@@ -6871,7 +6896,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
6871
6896
|
backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
|
|
6872
6897
|
style = _ref.style,
|
|
6873
6898
|
testID = _ref.testID;
|
|
6874
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
6899
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$6, {
|
|
6875
6900
|
testID: testID,
|
|
6876
6901
|
style: style
|
|
6877
6902
|
}, /*#__PURE__*/React__default["default"].createElement(StyledContentContainer$1, {
|
|
@@ -7111,7 +7136,7 @@ var StyledStatus = index$a(reactNative.Animated.View)(function (_ref3) {
|
|
|
7111
7136
|
};
|
|
7112
7137
|
});
|
|
7113
7138
|
|
|
7114
|
-
var _excluded$
|
|
7139
|
+
var _excluded$o = ["children", "visible", "intent", "style", "testID"];
|
|
7115
7140
|
var Status = function Status(_ref) {
|
|
7116
7141
|
var children = _ref.children,
|
|
7117
7142
|
_ref$visible = _ref.visible,
|
|
@@ -7120,7 +7145,7 @@ var Status = function Status(_ref) {
|
|
|
7120
7145
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7121
7146
|
style = _ref.style,
|
|
7122
7147
|
testID = _ref.testID,
|
|
7123
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7148
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
7124
7149
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
7125
7150
|
opacity = _React$useRef.current;
|
|
7126
7151
|
var isFirstRendering = React__default["default"].useRef(true);
|
|
@@ -7153,7 +7178,7 @@ var Status = function Status(_ref) {
|
|
|
7153
7178
|
}));
|
|
7154
7179
|
};
|
|
7155
7180
|
|
|
7156
|
-
var _excluded$
|
|
7181
|
+
var _excluded$n = ["content", "visible", "max", "intent", "style", "testID"];
|
|
7157
7182
|
var DEFAULT_MAX_NUMBER = 99;
|
|
7158
7183
|
var getPaddingState = function getPaddingState(content) {
|
|
7159
7184
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
@@ -7168,7 +7193,7 @@ var Badge = function Badge(_ref) {
|
|
|
7168
7193
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7169
7194
|
style = _ref.style,
|
|
7170
7195
|
testID = _ref.testID,
|
|
7171
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7196
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$n);
|
|
7172
7197
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
7173
7198
|
opacity = _React$useRef.current;
|
|
7174
7199
|
var isFirstRendering = React__default["default"].useRef(true);
|
|
@@ -7272,7 +7297,7 @@ function omit(keys, obj) {
|
|
|
7272
7297
|
return result;
|
|
7273
7298
|
}
|
|
7274
7299
|
|
|
7275
|
-
var _excluded$
|
|
7300
|
+
var _excluded$m = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
7276
7301
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
7277
7302
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
7278
7303
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -7283,7 +7308,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
7283
7308
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
7284
7309
|
selectedTabKey = _ref.selectedTabKey,
|
|
7285
7310
|
tabs = _ref.tabs,
|
|
7286
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7311
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
7287
7312
|
var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
7288
7313
|
/**
|
|
7289
7314
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -7370,13 +7395,13 @@ var StyledDivider = index$a(reactNative.View)(function (_ref) {
|
|
|
7370
7395
|
}, horizontalMargin), verticalMargin);
|
|
7371
7396
|
});
|
|
7372
7397
|
|
|
7373
|
-
var _excluded$
|
|
7398
|
+
var _excluded$l = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
7374
7399
|
var Divider = function Divider(_ref) {
|
|
7375
7400
|
var marginHorizontal = _ref.marginHorizontal,
|
|
7376
7401
|
marginVertical = _ref.marginVertical,
|
|
7377
7402
|
style = _ref.style,
|
|
7378
7403
|
testID = _ref.testID,
|
|
7379
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7404
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$l);
|
|
7380
7405
|
return /*#__PURE__*/React__default["default"].createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
7381
7406
|
themeMarginHorizontal: marginHorizontal,
|
|
7382
7407
|
themeMarginVertical: marginVertical,
|
|
@@ -7506,7 +7531,7 @@ var StyledLoadingDot = index$a(reactNative.View)(function (_ref2) {
|
|
|
7506
7531
|
}, themeStyling());
|
|
7507
7532
|
});
|
|
7508
7533
|
|
|
7509
|
-
var _excluded$
|
|
7534
|
+
var _excluded$k = ["count", "size", "testID", "themeVariant"];
|
|
7510
7535
|
var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
7511
7536
|
var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
|
|
7512
7537
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -7538,7 +7563,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
7538
7563
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
7539
7564
|
testID = _ref2.testID,
|
|
7540
7565
|
themeVariant = _ref2.themeVariant,
|
|
7541
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
7566
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$k);
|
|
7542
7567
|
var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
7543
7568
|
React.useEffect(function () {
|
|
7544
7569
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(progressAnimation.current, {
|
|
@@ -7968,11 +7993,11 @@ var Header = function Header(_ref) {
|
|
|
7968
7993
|
})) : null), showDivider ? /*#__PURE__*/React__default["default"].createElement(Divider, null) : null);
|
|
7969
7994
|
};
|
|
7970
7995
|
|
|
7971
|
-
var _excluded$
|
|
7996
|
+
var _excluded$j = ["scrollEventThrottle"];
|
|
7972
7997
|
var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
7973
7998
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
7974
7999
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
7975
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8000
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7976
8001
|
var _useContext = React.useContext(BottomSheetContext),
|
|
7977
8002
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
7978
8003
|
var onScrollBeginDrag = React.useCallback(function (e) {
|
|
@@ -8287,7 +8312,7 @@ var borderWidths = {
|
|
|
8287
8312
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
8288
8313
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
8289
8314
|
|
|
8290
|
-
var _excluded$
|
|
8315
|
+
var _excluded$i = ["theme"];
|
|
8291
8316
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
8292
8317
|
var propConfig = config[key];
|
|
8293
8318
|
var propValue = props[key];
|
|
@@ -8314,18 +8339,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
8314
8339
|
var configKeys = Object.keys(config);
|
|
8315
8340
|
var StyledBox = index$a(reactNative.View)(function (_ref5) {
|
|
8316
8341
|
var theme = _ref5.theme,
|
|
8317
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
8342
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$i);
|
|
8318
8343
|
var styleProps = pick(configKeys, otherProps);
|
|
8319
8344
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
8320
8345
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
8321
8346
|
});
|
|
8322
8347
|
|
|
8323
|
-
var _excluded$
|
|
8348
|
+
var _excluded$h = ["children", "style", "testID"];
|
|
8324
8349
|
var Box = function Box(_ref) {
|
|
8325
8350
|
var children = _ref.children,
|
|
8326
8351
|
style = _ref.style,
|
|
8327
8352
|
testID = _ref.testID,
|
|
8328
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8353
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
8329
8354
|
return /*#__PURE__*/React__default["default"].createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8330
8355
|
style: style,
|
|
8331
8356
|
testID: testID
|
|
@@ -10651,7 +10676,7 @@ function ContentNavigator(_ref) {
|
|
|
10651
10676
|
}));
|
|
10652
10677
|
}
|
|
10653
10678
|
|
|
10654
|
-
var StyledContainer$
|
|
10679
|
+
var StyledContainer$5 = index$a(reactNative.View)(function (_ref) {
|
|
10655
10680
|
var theme = _ref.theme;
|
|
10656
10681
|
return {
|
|
10657
10682
|
backgroundColor: theme.__hd__.calendar.colors.background
|
|
@@ -10834,7 +10859,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10834
10859
|
var disableNextButton = maxDate === undefined ? false : !daysOfNextMonth.some(function (date) {
|
|
10835
10860
|
return date !== undefined;
|
|
10836
10861
|
}) || maxDate <= lastDateOfMonth;
|
|
10837
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
10862
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$5, null, /*#__PURE__*/React__default["default"].createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default["default"].createElement(ContentNavigator, {
|
|
10838
10863
|
value: formatTime('MMMM yyyy', visibleDate),
|
|
10839
10864
|
onPreviousPress: onPreviousPress,
|
|
10840
10865
|
onNextPress: onNextPress,
|
|
@@ -10890,7 +10915,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10890
10915
|
})));
|
|
10891
10916
|
};
|
|
10892
10917
|
|
|
10893
|
-
var _excluded$
|
|
10918
|
+
var _excluded$g = ["rounded", "size", "testID", "style"];
|
|
10894
10919
|
var Image = function Image(_ref) {
|
|
10895
10920
|
var _ref$rounded = _ref.rounded,
|
|
10896
10921
|
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
@@ -10898,7 +10923,7 @@ var Image = function Image(_ref) {
|
|
|
10898
10923
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
10899
10924
|
testID = _ref.testID,
|
|
10900
10925
|
style = _ref.style,
|
|
10901
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10926
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
10902
10927
|
var theme = useTheme();
|
|
10903
10928
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
10904
10929
|
return /*#__PURE__*/React__default["default"].createElement(reactNative.Image, _extends$1({
|
|
@@ -11091,12 +11116,12 @@ var Indicator = index$a(reactNative.View)(function (_ref2) {
|
|
|
11091
11116
|
};
|
|
11092
11117
|
});
|
|
11093
11118
|
|
|
11094
|
-
var _excluded$
|
|
11119
|
+
var _excluded$f = ["intent", "children"];
|
|
11095
11120
|
var DataCard = function DataCard(_ref) {
|
|
11096
11121
|
var _ref$intent = _ref.intent,
|
|
11097
11122
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
11098
11123
|
children = _ref.children,
|
|
11099
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11124
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
11100
11125
|
return /*#__PURE__*/React__default["default"].createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default["default"].createElement(Indicator, {
|
|
11101
11126
|
themeIntent: intent,
|
|
11102
11127
|
testID: "data-card-indicator"
|
|
@@ -11114,11 +11139,11 @@ var StyledCard$1 = index$a(reactNative.View)(function (_ref) {
|
|
|
11114
11139
|
});
|
|
11115
11140
|
});
|
|
11116
11141
|
|
|
11117
|
-
var _excluded$
|
|
11142
|
+
var _excluded$e = ["intent", "children"];
|
|
11118
11143
|
var Card = function Card(_ref) {
|
|
11119
11144
|
var intent = _ref.intent,
|
|
11120
11145
|
children = _ref.children,
|
|
11121
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11146
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
11122
11147
|
return /*#__PURE__*/React__default["default"].createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
11123
11148
|
themeIntent: intent
|
|
11124
11149
|
}), children);
|
|
@@ -11306,7 +11331,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11306
11331
|
}));
|
|
11307
11332
|
});
|
|
11308
11333
|
|
|
11309
|
-
var _excluded$
|
|
11334
|
+
var _excluded$d = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination"];
|
|
11310
11335
|
function useStateFromProp(initialValue) {
|
|
11311
11336
|
var _useState = React.useState(initialValue),
|
|
11312
11337
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11328,7 +11353,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
11328
11353
|
shouldShowPagination = _ref$shouldShowPagina === void 0 ? function () {
|
|
11329
11354
|
return true;
|
|
11330
11355
|
} : _ref$shouldShowPagina,
|
|
11331
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11356
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$d);
|
|
11332
11357
|
var carouselRef = React.useRef(null);
|
|
11333
11358
|
var _useStateFromProp = useStateFromProp(selectedItemIndex),
|
|
11334
11359
|
_useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
|
|
@@ -11488,7 +11513,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
11488
11513
|
})));
|
|
11489
11514
|
};
|
|
11490
11515
|
|
|
11491
|
-
var StyledContainer$
|
|
11516
|
+
var StyledContainer$4 = index$a(reactNative.View)(function (_ref) {
|
|
11492
11517
|
var theme = _ref.theme;
|
|
11493
11518
|
return {
|
|
11494
11519
|
width: '100%',
|
|
@@ -11640,7 +11665,7 @@ var StyledErrorAndMaxLengthContainer = index$a(reactNative.View)(function () {
|
|
|
11640
11665
|
};
|
|
11641
11666
|
});
|
|
11642
11667
|
|
|
11643
|
-
var _excluded$
|
|
11668
|
+
var _excluded$c = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
|
|
11644
11669
|
var getVariant$1 = function getVariant(_ref) {
|
|
11645
11670
|
var disabled = _ref.disabled,
|
|
11646
11671
|
error = _ref.error,
|
|
@@ -11688,7 +11713,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
11688
11713
|
renderInputValue = _ref2.renderInputValue,
|
|
11689
11714
|
_ref2$allowFontScalin = _ref2.allowFontScaling,
|
|
11690
11715
|
allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
|
|
11691
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
11716
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$c);
|
|
11692
11717
|
var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
11693
11718
|
var isEmptyValue = displayText.length === 0;
|
|
11694
11719
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
@@ -11799,7 +11824,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
11799
11824
|
defaultValue: defaultValue,
|
|
11800
11825
|
placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
|
|
11801
11826
|
});
|
|
11802
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
11827
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$4, {
|
|
11803
11828
|
style: styleWithoutBackgroundColor,
|
|
11804
11829
|
pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
|
|
11805
11830
|
testID: testID
|
|
@@ -12017,7 +12042,7 @@ var DatePicker = function DatePicker(props) {
|
|
|
12017
12042
|
};
|
|
12018
12043
|
|
|
12019
12044
|
var AnimatedPressable = reactNative.Animated.createAnimatedComponent(reactNative.Pressable);
|
|
12020
|
-
var StyledContainer$
|
|
12045
|
+
var StyledContainer$3 = index$a(reactNative.View)(function (_ref) {
|
|
12021
12046
|
var theme = _ref.theme,
|
|
12022
12047
|
enableShadow = _ref.enableShadow;
|
|
12023
12048
|
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
@@ -12276,7 +12301,7 @@ var Drawer = function Drawer(_ref) {
|
|
|
12276
12301
|
return animation.stop();
|
|
12277
12302
|
};
|
|
12278
12303
|
}, [visible]);
|
|
12279
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
12304
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
|
|
12280
12305
|
testID: testID,
|
|
12281
12306
|
enableShadow: enableShadow,
|
|
12282
12307
|
pointerEvents: "box-none"
|
|
@@ -12445,7 +12470,7 @@ var StyledErrorDescription = index$a(Typography.Text)(function (_ref9) {
|
|
|
12445
12470
|
};
|
|
12446
12471
|
});
|
|
12447
12472
|
|
|
12448
|
-
var _excluded$
|
|
12473
|
+
var _excluded$b = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
|
|
12449
12474
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
12450
12475
|
var renderImage = function renderImage(image) {
|
|
12451
12476
|
if ( /*#__PURE__*/React.isValidElement(image)) {
|
|
@@ -12471,14 +12496,14 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
12471
12496
|
onCtaPress = _ref.onCtaPress,
|
|
12472
12497
|
secondaryCtaText = _ref.secondaryCtaText,
|
|
12473
12498
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
12474
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12499
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
12475
12500
|
var showCta = ctaText && onCtaPress !== undefined;
|
|
12476
12501
|
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
12477
12502
|
var showButtonContainer = showCta || showSecondaryCta;
|
|
12478
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$1, {
|
|
12503
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$1, _extends$1({
|
|
12479
12504
|
testID: testID,
|
|
12480
12505
|
themeVariant: variant
|
|
12481
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledErrorContent,
|
|
12506
|
+
}, nativeProps), /*#__PURE__*/React__default["default"].createElement(StyledErrorContent, null, image && /*#__PURE__*/React__default["default"].createElement(StyledErrorImageContainer, null, renderImage(image)), /*#__PURE__*/React__default["default"].createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React__default["default"].createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonPrimary, {
|
|
12482
12507
|
variant: "filled",
|
|
12483
12508
|
text: ctaText,
|
|
12484
12509
|
onPress: onCtaPress
|
|
@@ -12615,11 +12640,11 @@ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
|
|
|
12615
12640
|
};
|
|
12616
12641
|
});
|
|
12617
12642
|
|
|
12618
|
-
var _excluded$
|
|
12643
|
+
var _excluded$a = ["active"];
|
|
12619
12644
|
var AnimatedIcons = reactNative.Animated.createAnimatedComponent(StyledFABIcon);
|
|
12620
12645
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
12621
12646
|
var active = _ref.active,
|
|
12622
|
-
iconProps = _objectWithoutProperties(_ref, _excluded$
|
|
12647
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
12623
12648
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
|
|
12624
12649
|
React.useEffect(function () {
|
|
12625
12650
|
var animation = reactNative.Animated.timing(rotateAnimation.current, {
|
|
@@ -12745,7 +12770,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
12745
12770
|
}), /*#__PURE__*/React__default["default"].createElement(StyledActionItemText, null, title)));
|
|
12746
12771
|
};
|
|
12747
12772
|
|
|
12748
|
-
var StyledContainer$
|
|
12773
|
+
var StyledContainer$2 = index$a(reactNative.View)({
|
|
12749
12774
|
position: 'absolute',
|
|
12750
12775
|
left: 0,
|
|
12751
12776
|
right: 0,
|
|
@@ -12832,7 +12857,7 @@ var ActionGroup = function ActionGroup(_ref2) {
|
|
|
12832
12857
|
inputRange: [0, 1],
|
|
12833
12858
|
outputRange: [0, 1]
|
|
12834
12859
|
});
|
|
12835
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
12860
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$2, {
|
|
12836
12861
|
testID: testID,
|
|
12837
12862
|
pointerEvents: "box-none",
|
|
12838
12863
|
style: style
|
|
@@ -13292,7 +13317,7 @@ var THEME_INTENT_MAP = {
|
|
|
13292
13317
|
'archived-inverted': 'archivedInverted'
|
|
13293
13318
|
};
|
|
13294
13319
|
|
|
13295
|
-
var StyledContainer = index$a(reactNative.View)(function (_ref) {
|
|
13320
|
+
var StyledContainer$1 = index$a(reactNative.View)(function (_ref) {
|
|
13296
13321
|
var theme = _ref.theme;
|
|
13297
13322
|
return {
|
|
13298
13323
|
flexDirection: 'row',
|
|
@@ -13358,7 +13383,7 @@ var StyledStrokeEnd = index$a(reactNative.View)(function (_ref6) {
|
|
|
13358
13383
|
};
|
|
13359
13384
|
});
|
|
13360
13385
|
|
|
13361
|
-
var _excluded$
|
|
13386
|
+
var _excluded$9 = ["value", "renderValue", "intent", "style", "testID"];
|
|
13362
13387
|
var HalfCircle = function HalfCircle(_ref) {
|
|
13363
13388
|
var type = _ref.type,
|
|
13364
13389
|
themeIntent = _ref.themeIntent;
|
|
@@ -13379,7 +13404,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
13379
13404
|
intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
|
|
13380
13405
|
style = _ref2.style,
|
|
13381
13406
|
testID = _ref2.testID,
|
|
13382
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
13407
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$9);
|
|
13383
13408
|
var theme = useTheme$1();
|
|
13384
13409
|
var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
|
|
13385
13410
|
var progressAnimatedValue = React.useRef(new reactNative.Animated.Value(0));
|
|
@@ -13419,7 +13444,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
13419
13444
|
return /*#__PURE__*/React__default["default"].createElement(reactNative.View, _extends$1({}, nativeProps, {
|
|
13420
13445
|
testID: testID,
|
|
13421
13446
|
style: style
|
|
13422
|
-
}), /*#__PURE__*/React__default["default"].createElement(StyledContainer, null, /*#__PURE__*/React__default["default"].createElement(reactNative.View, null, /*#__PURE__*/React__default["default"].createElement(HalfCircle, {
|
|
13447
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledContainer$1, null, /*#__PURE__*/React__default["default"].createElement(reactNative.View, null, /*#__PURE__*/React__default["default"].createElement(HalfCircle, {
|
|
13423
13448
|
type: "foreground",
|
|
13424
13449
|
themeIntent: intent
|
|
13425
13450
|
}), /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
|
|
@@ -13496,14 +13521,14 @@ var StyledInner = index$a(reactNative.Animated.View)(function (_ref2) {
|
|
|
13496
13521
|
};
|
|
13497
13522
|
});
|
|
13498
13523
|
|
|
13499
|
-
var _excluded$
|
|
13524
|
+
var _excluded$8 = ["value", "intent", "style", "testID"];
|
|
13500
13525
|
var ProgressBar = function ProgressBar(_ref) {
|
|
13501
13526
|
var value = _ref.value,
|
|
13502
13527
|
_ref$intent = _ref.intent,
|
|
13503
13528
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13504
13529
|
style = _ref.style,
|
|
13505
13530
|
testID = _ref.testID,
|
|
13506
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13531
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
13507
13532
|
var _useState = React.useState(0),
|
|
13508
13533
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13509
13534
|
width = _useState2[0],
|
|
@@ -13694,14 +13719,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
|
|
|
13694
13719
|
}, dotProps))));
|
|
13695
13720
|
};
|
|
13696
13721
|
|
|
13697
|
-
var _excluded$
|
|
13722
|
+
var _excluded$7 = ["testID", "size", "intent"];
|
|
13698
13723
|
var Spinner = function Spinner(_ref) {
|
|
13699
13724
|
var testID = _ref.testID,
|
|
13700
13725
|
_ref$size = _ref.size,
|
|
13701
13726
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
13702
13727
|
_ref$intent = _ref.intent,
|
|
13703
13728
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13704
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13729
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
13705
13730
|
return /*#__PURE__*/React__default["default"].createElement(StyledView$1, nativeProps, /*#__PURE__*/React__default["default"].createElement(StyledSpinnerContainer, {
|
|
13706
13731
|
testID: testID
|
|
13707
13732
|
}, /*#__PURE__*/React__default["default"].createElement(AnimatedSpinner, {
|
|
@@ -13734,7 +13759,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
|
|
|
13734
13759
|
}, children);
|
|
13735
13760
|
};
|
|
13736
13761
|
|
|
13737
|
-
var _excluded$
|
|
13762
|
+
var _excluded$6 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
|
|
13738
13763
|
var renderActions = function renderActions(actions, width, progress, direction) {
|
|
13739
13764
|
var trans = progress.interpolate({
|
|
13740
13765
|
inputRange: [0, 1],
|
|
@@ -13759,7 +13784,7 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
13759
13784
|
leftActionsWidth = _ref.leftActionsWidth,
|
|
13760
13785
|
rightActions = _ref.rightActions,
|
|
13761
13786
|
rightActionsWidth = _ref.rightActionsWidth,
|
|
13762
|
-
swipeableProps = _objectWithoutProperties(_ref, _excluded$
|
|
13787
|
+
swipeableProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
13763
13788
|
var _useWindowDimensions = reactNative.useWindowDimensions(),
|
|
13764
13789
|
width = _useWindowDimensions.width;
|
|
13765
13790
|
var swipeableRef = React.useRef(null);
|
|
@@ -14064,7 +14089,7 @@ var StyledSectionList = index$a(reactNative.SectionList)(function (_ref4) {
|
|
|
14064
14089
|
};
|
|
14065
14090
|
});
|
|
14066
14091
|
|
|
14067
|
-
var _excluded$
|
|
14092
|
+
var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
|
|
14068
14093
|
var BaseOptionList = function BaseOptionList(_ref) {
|
|
14069
14094
|
var keyExtractor = _ref.keyExtractor,
|
|
14070
14095
|
loading = _ref.loading,
|
|
@@ -14073,7 +14098,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
14073
14098
|
sections = _ref.sections,
|
|
14074
14099
|
renderItem = _ref.renderItem,
|
|
14075
14100
|
sectionListRef = _ref.sectionListRef,
|
|
14076
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14101
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
14077
14102
|
var theme = useTheme$1();
|
|
14078
14103
|
var _useState = React.useState(false),
|
|
14079
14104
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14142,7 +14167,7 @@ var Option$2 = function Option(_ref) {
|
|
|
14142
14167
|
return highlighted === true ? /*#__PURE__*/React__default["default"].createElement(List.Item, props) : /*#__PURE__*/React__default["default"].createElement(List.BasicItem, props);
|
|
14143
14168
|
};
|
|
14144
14169
|
|
|
14145
|
-
var _excluded$
|
|
14170
|
+
var _excluded$4 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14146
14171
|
var OptionList$1 = function OptionList(_ref) {
|
|
14147
14172
|
var keyExtractor = _ref.keyExtractor,
|
|
14148
14173
|
loading = _ref.loading,
|
|
@@ -14153,7 +14178,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
14153
14178
|
renderOption = _ref.renderOption,
|
|
14154
14179
|
value = _ref.value,
|
|
14155
14180
|
sectionListRef = _ref.sectionListRef,
|
|
14156
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14181
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
14157
14182
|
var renderItem = function renderItem(info) {
|
|
14158
14183
|
var item = info.item;
|
|
14159
14184
|
var selected = value.includes(info.item.value);
|
|
@@ -14341,7 +14366,7 @@ var StyledOptionList = index$a(BaseOptionList)(function (_ref) {
|
|
|
14341
14366
|
};
|
|
14342
14367
|
});
|
|
14343
14368
|
|
|
14344
|
-
var _excluded$
|
|
14369
|
+
var _excluded$3 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14345
14370
|
var OptionList = function OptionList(_ref) {
|
|
14346
14371
|
var keyExtractor = _ref.keyExtractor,
|
|
14347
14372
|
loading = _ref.loading,
|
|
@@ -14352,7 +14377,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
14352
14377
|
renderOption = _ref.renderOption,
|
|
14353
14378
|
value = _ref.value,
|
|
14354
14379
|
sectionListRef = _ref.sectionListRef,
|
|
14355
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14380
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
14356
14381
|
var renderItem = function renderItem(info) {
|
|
14357
14382
|
var item = info.item;
|
|
14358
14383
|
var selected = item.value === value;
|
|
@@ -14499,6 +14524,120 @@ var index$4 = Object.assign(SingleSelect, {
|
|
|
14499
14524
|
Multi: MultiSelect
|
|
14500
14525
|
});
|
|
14501
14526
|
|
|
14527
|
+
var StyledContainer = index$a(Box)(function (_ref) {
|
|
14528
|
+
var theme = _ref.theme,
|
|
14529
|
+
themeIntent = _ref.themeIntent,
|
|
14530
|
+
themeVariant = _ref.themeVariant;
|
|
14531
|
+
return {
|
|
14532
|
+
backgroundColor: themeIntent === 'light' ? theme.__hd__.skeleton.colors.lightBackground : theme.__hd__.skeleton.colors.darkBackground,
|
|
14533
|
+
borderRadius: theme.__hd__.skeleton.radii[themeVariant]
|
|
14534
|
+
};
|
|
14535
|
+
});
|
|
14536
|
+
var StyledGradientContainer = index$a(Box)(function (_ref2) {
|
|
14537
|
+
var theme = _ref2.theme,
|
|
14538
|
+
themeVariant = _ref2.themeVariant;
|
|
14539
|
+
return {
|
|
14540
|
+
overflow: 'hidden',
|
|
14541
|
+
borderRadius: theme.__hd__.skeleton.radii[themeVariant]
|
|
14542
|
+
};
|
|
14543
|
+
});
|
|
14544
|
+
|
|
14545
|
+
var _excluded$2 = ["intent", "variant", "style", "onLayout"];
|
|
14546
|
+
var AnimatedLinearGradient = reactNative.Animated.createAnimatedComponent(LinearGradient__default["default"]);
|
|
14547
|
+
var gradientPositions = {
|
|
14548
|
+
start: {
|
|
14549
|
+
x: 0,
|
|
14550
|
+
y: 0
|
|
14551
|
+
},
|
|
14552
|
+
end: {
|
|
14553
|
+
x: 1,
|
|
14554
|
+
y: 0
|
|
14555
|
+
}
|
|
14556
|
+
};
|
|
14557
|
+
var getGradientColors = function getGradientColors(theme, intent) {
|
|
14558
|
+
switch (intent) {
|
|
14559
|
+
case 'light':
|
|
14560
|
+
{
|
|
14561
|
+
return [theme.__hd__.skeleton.colors.lightGradientStart, theme.__hd__.skeleton.colors.lightGradientEnd, theme.__hd__.skeleton.colors.lightGradientStart];
|
|
14562
|
+
}
|
|
14563
|
+
case 'dark':
|
|
14564
|
+
{
|
|
14565
|
+
return [theme.__hd__.skeleton.colors.darkGradientStart, theme.__hd__.skeleton.colors.darkGradientEnd, theme.__hd__.skeleton.colors.darkGradientStart];
|
|
14566
|
+
}
|
|
14567
|
+
}
|
|
14568
|
+
};
|
|
14569
|
+
var Skeleton = function Skeleton(_ref) {
|
|
14570
|
+
var _StyleSheet$flatten, _StyleSheet$flatten2;
|
|
14571
|
+
var _ref$intent = _ref.intent,
|
|
14572
|
+
intent = _ref$intent === void 0 ? 'light' : _ref$intent,
|
|
14573
|
+
_ref$variant = _ref.variant,
|
|
14574
|
+
variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
|
|
14575
|
+
style = _ref.style,
|
|
14576
|
+
onLayout = _ref.onLayout,
|
|
14577
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
14578
|
+
var theme = useTheme();
|
|
14579
|
+
var colors = React.useMemo(function () {
|
|
14580
|
+
return getGradientColors(theme, intent);
|
|
14581
|
+
}, [theme, intent]);
|
|
14582
|
+
var _useState = React.useState(Number((_StyleSheet$flatten = reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.width) || 0),
|
|
14583
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14584
|
+
containerWidth = _useState2[0],
|
|
14585
|
+
setContainerWidth = _useState2[1];
|
|
14586
|
+
var _useState3 = React.useState(Number((_StyleSheet$flatten2 = reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten2 === void 0 ? void 0 : _StyleSheet$flatten2.height) || 0),
|
|
14587
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14588
|
+
containerHeight = _useState4[0],
|
|
14589
|
+
setContainerHeight = _useState4[1];
|
|
14590
|
+
var _useState5 = React.useState(false),
|
|
14591
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
14592
|
+
shouldStartAnimation = _useState6[0],
|
|
14593
|
+
setShouldStartAnimation = _useState6[1];
|
|
14594
|
+
var animatedValue = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
14595
|
+
React.useEffect(function () {
|
|
14596
|
+
if (shouldStartAnimation) {
|
|
14597
|
+
reactNative.Animated.loop(reactNative.Animated.timing(animatedValue, {
|
|
14598
|
+
toValue: 1,
|
|
14599
|
+
duration: 1000,
|
|
14600
|
+
easing: reactNative.Easing.linear,
|
|
14601
|
+
useNativeDriver: reactNative.Platform.OS === 'ios' || reactNative.Platform.OS === 'android'
|
|
14602
|
+
})).start();
|
|
14603
|
+
}
|
|
14604
|
+
}, [shouldStartAnimation]);
|
|
14605
|
+
var translateX = animatedValue.interpolate({
|
|
14606
|
+
inputRange: [0, 1],
|
|
14607
|
+
outputRange: [-containerWidth, containerWidth]
|
|
14608
|
+
});
|
|
14609
|
+
var onContainerLayout = React.useCallback(function (e) {
|
|
14610
|
+
var _e$nativeEvent$layout = e.nativeEvent.layout,
|
|
14611
|
+
width = _e$nativeEvent$layout.width,
|
|
14612
|
+
height = _e$nativeEvent$layout.height;
|
|
14613
|
+
setContainerHeight(height);
|
|
14614
|
+
setContainerWidth(width);
|
|
14615
|
+
if (!shouldStartAnimation) {
|
|
14616
|
+
setShouldStartAnimation(true);
|
|
14617
|
+
}
|
|
14618
|
+
onLayout === null || onLayout === void 0 ? void 0 : onLayout(e);
|
|
14619
|
+
}, []);
|
|
14620
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer, _extends$1({
|
|
14621
|
+
style: style,
|
|
14622
|
+
themeVariant: variant,
|
|
14623
|
+
themeIntent: intent,
|
|
14624
|
+
onLayout: onContainerLayout
|
|
14625
|
+
}, props), /*#__PURE__*/React__default["default"].createElement(StyledGradientContainer, {
|
|
14626
|
+
themeVariant: variant
|
|
14627
|
+
}, /*#__PURE__*/React__default["default"].createElement(AnimatedLinearGradient, {
|
|
14628
|
+
start: gradientPositions.start,
|
|
14629
|
+
end: gradientPositions.end,
|
|
14630
|
+
style: {
|
|
14631
|
+
width: containerWidth,
|
|
14632
|
+
height: containerHeight,
|
|
14633
|
+
transform: [{
|
|
14634
|
+
translateX: translateX
|
|
14635
|
+
}]
|
|
14636
|
+
},
|
|
14637
|
+
colors: colors
|
|
14638
|
+
})));
|
|
14639
|
+
};
|
|
14640
|
+
|
|
14502
14641
|
var StyledWrapper$1 = index$a(reactNative.View)(function (_ref) {
|
|
14503
14642
|
var theme = _ref.theme;
|
|
14504
14643
|
return {
|
|
@@ -32082,7 +32221,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
32082
32221
|
break;
|
|
32083
32222
|
}
|
|
32084
32223
|
}, []);
|
|
32085
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
32224
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$4, {
|
|
32086
32225
|
testID: testID
|
|
32087
32226
|
}, /*#__PURE__*/React__default["default"].createElement(StyledTextInputContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledBorderBackDrop, {
|
|
32088
32227
|
themeVariant: variant,
|
|
@@ -32173,6 +32312,7 @@ exports.RefreshControl = RefreshControl;
|
|
|
32173
32312
|
exports.RichTextEditor = index;
|
|
32174
32313
|
exports.SectionHeading = SectionHeading;
|
|
32175
32314
|
exports.Select = index$4;
|
|
32315
|
+
exports.Skeleton = Skeleton;
|
|
32176
32316
|
exports.Slider = Slider;
|
|
32177
32317
|
exports.Spinner = Spinner;
|
|
32178
32318
|
exports.Swipeable = index$5;
|