@hero-design/rn 8.12.0 → 8.12.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 +121 -34
- package/lib/index.js +120 -33
- package/package.json +5 -5
- package/src/components/Button/Button.tsx +42 -2
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +1 -1
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +1 -1
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Button/StyledButton.tsx +21 -14
- package/src/components/Button/__tests__/Button.spec.tsx +46 -1
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +1564 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +126 -110
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +24 -22
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +17 -3
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +29 -12
- package/src/components/FAB/ActionGroup/ActionItem.tsx +17 -6
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +15 -17
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +170 -160
- package/src/components/FAB/FAB.tsx +3 -1
- package/src/components/List/BasicListItem.tsx +6 -0
- package/src/components/List/ListItem.tsx +6 -0
- package/src/components/List/StyledBasicListItem.tsx +2 -2
- package/src/components/List/StyledListItem.tsx +2 -2
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +22 -18
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +32 -28
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +44 -36
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +50 -46
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +22 -18
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +33 -27
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -9
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +132 -108
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +268 -166
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -9
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +132 -108
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +232 -139
- package/src/components/TextInput/StyledTextInput.tsx +3 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +466 -28
- package/src/components/TextInput/__tests__/index.spec.tsx +32 -0
- package/src/components/TextInput/index.tsx +32 -4
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +34 -6
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +46 -15
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +18 -0
- package/src/theme/components/button.ts +16 -2
- package/src/theme/components/fab.ts +2 -0
- package/src/theme/components/textInput.ts +1 -0
- package/src/theme/global/borders.ts +2 -0
- package/types/components/Button/Button.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +4 -3
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +3 -3
- package/types/components/List/StyledBasicListItem.d.ts +3 -3
- package/types/components/List/StyledListItem.d.ts +3 -3
- package/types/theme/components/button.d.ts +14 -0
- package/types/theme/components/fab.d.ts +2 -0
- package/types/theme/components/textInput.d.ts +1 -0
- package/types/theme/global/borders.d.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
1
|
+
[34m@hero-design/rn:build[0m: cache hit, replaying output [2m11fbf9e3773167e6[0m
|
|
2
|
+
[34m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
|
+
[34m@hero-design/rn:build: [0m$ rollup -c
|
|
4
|
+
[34m@hero-design/rn:build: [0m[36m
|
|
5
|
+
[34m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
|
+
[34m@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
|
+
[34m@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
|
+
[34m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m24.8s[22m[39m
|
|
9
|
+
[34m@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, FlatList, useWindowDimensions, TextInput as TextInput$1, PanResponder,
|
|
2
|
+
import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, Easing, TouchableOpacity, Text as Text$1, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, TouchableHighlight, ScrollView, Modal, FlatList, useWindowDimensions, TextInput as TextInput$1, PanResponder, 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';
|
|
@@ -1590,7 +1590,8 @@ var getRadii = function getRadii(baseRadius) {
|
|
|
1590
1590
|
large: baseRadius * 3,
|
|
1591
1591
|
xlarge: baseRadius * 4,
|
|
1592
1592
|
xxlarge: baseRadius * 5,
|
|
1593
|
-
xxxlarge: baseRadius * 6
|
|
1593
|
+
xxxlarge: baseRadius * 6,
|
|
1594
|
+
'5xlarge': baseRadius * 8 // 32
|
|
1594
1595
|
};
|
|
1595
1596
|
};
|
|
1596
1597
|
|
|
@@ -1853,6 +1854,7 @@ var getButtonTheme = function getButtonTheme(theme) {
|
|
|
1853
1854
|
};
|
|
1854
1855
|
var space = {
|
|
1855
1856
|
buttonPadding: theme.space.medium,
|
|
1857
|
+
textButtonPadding: theme.space.smallMedium,
|
|
1856
1858
|
iconPadding: theme.space.smallMedium,
|
|
1857
1859
|
utilityPadding: theme.space.small
|
|
1858
1860
|
};
|
|
@@ -1860,8 +1862,9 @@ var getButtonTheme = function getButtonTheme(theme) {
|
|
|
1860
1862
|
iconSize: theme.fontSizes.xxlarge
|
|
1861
1863
|
};
|
|
1862
1864
|
var radii = {
|
|
1863
|
-
"default": theme.
|
|
1864
|
-
utilityRadii: theme.
|
|
1865
|
+
"default": theme.radii['5xlarge'],
|
|
1866
|
+
utilityRadii: theme.radii.medium,
|
|
1867
|
+
text: theme.radii.base
|
|
1865
1868
|
};
|
|
1866
1869
|
var colors = {
|
|
1867
1870
|
primary: theme.colors.primary,
|
|
@@ -1872,7 +1875,19 @@ var getButtonTheme = function getButtonTheme(theme) {
|
|
|
1872
1875
|
disabledBorder: theme.colors.disabledOnDefaultGlobalSurface,
|
|
1873
1876
|
disabledBackground: theme.colors.disabledOnDefaultGlobalSurface,
|
|
1874
1877
|
invertedText: theme.colors.onDarkGlobalSurface,
|
|
1875
|
-
utilityBackground: theme.colors.neutralGlobalSurface
|
|
1878
|
+
utilityBackground: theme.colors.neutralGlobalSurface,
|
|
1879
|
+
textLoadingBackground: theme.colors.highlightedSurface,
|
|
1880
|
+
pressedBackground: {
|
|
1881
|
+
filledPrimary: theme.colors.pressedSurface,
|
|
1882
|
+
filledSecondary: theme.colors.pressedSurface,
|
|
1883
|
+
filledDanger: theme.colors.errorSurface,
|
|
1884
|
+
outlinedPrimary: theme.colors.highlightedSurface,
|
|
1885
|
+
outlinedSecondary: theme.colors.highlightedSurface,
|
|
1886
|
+
outlineDanger: theme.colors.errorSurface,
|
|
1887
|
+
textPrimary: theme.colors.highlightedSurface,
|
|
1888
|
+
textSecondary: theme.colors.highlightedSurface,
|
|
1889
|
+
textDanger: theme.colors.errorSurface
|
|
1890
|
+
}
|
|
1876
1891
|
};
|
|
1877
1892
|
return {
|
|
1878
1893
|
borderWidth: borderWidth,
|
|
@@ -2137,9 +2152,11 @@ var getEmptyTheme = function getEmptyTheme(theme) {
|
|
|
2137
2152
|
var getFABTheme = function getFABTheme(theme) {
|
|
2138
2153
|
var colors = {
|
|
2139
2154
|
buttonBackground: theme.colors.primary,
|
|
2155
|
+
buttonPressedBackground: theme.colors.pressedSurface,
|
|
2140
2156
|
icon: theme.colors.onPrimary,
|
|
2141
2157
|
headerText: theme.colors.onDefaultGlobalSurface,
|
|
2142
2158
|
actionItemBackground: theme.colors.primary,
|
|
2159
|
+
actionItemPressedBackground: theme.colors.pressedSurface,
|
|
2143
2160
|
backdropBackground: theme.colors.overlayGlobalSurface,
|
|
2144
2161
|
titleText: theme.colors.onPrimary,
|
|
2145
2162
|
actionItemText: theme.colors.onPrimary
|
|
@@ -2674,6 +2691,7 @@ var getTagTheme = function getTagTheme(theme) {
|
|
|
2674
2691
|
var getTextInputTheme = function getTextInputTheme(theme) {
|
|
2675
2692
|
var colors = {
|
|
2676
2693
|
labelBackground: theme.colors.defaultGlobalSurface,
|
|
2694
|
+
containerBackground: theme.colors.defaultGlobalSurface,
|
|
2677
2695
|
asterisks: {
|
|
2678
2696
|
"default": theme.colors.onErrorSurface,
|
|
2679
2697
|
error: theme.colors.onErrorSurface,
|
|
@@ -7342,8 +7360,8 @@ var StyledLoadingDot = index$a(View)(function (_ref2) {
|
|
|
7342
7360
|
backgroundColor: theme.__hd__.button.colors.invertedText
|
|
7343
7361
|
};
|
|
7344
7362
|
case 'outlined-primary':
|
|
7345
|
-
case 'text-primary':
|
|
7346
7363
|
return genLoadingIndicatorStyles(theme, 'primary');
|
|
7364
|
+
case 'text-primary':
|
|
7347
7365
|
case 'outlined-secondary':
|
|
7348
7366
|
case 'text-secondary':
|
|
7349
7367
|
return genLoadingIndicatorStyles(theme, 'secondary');
|
|
@@ -7425,9 +7443,9 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
7425
7443
|
}, nativeProps), Array.from(new Array(count), renderLoadingDot, themeVariant));
|
|
7426
7444
|
};
|
|
7427
7445
|
|
|
7428
|
-
var genFilledContainerStyles = function genFilledContainerStyles(theme, intent, disabled) {
|
|
7446
|
+
var genFilledContainerStyles = function genFilledContainerStyles(theme, intent, disabled, loading) {
|
|
7429
7447
|
var backgroundColorStyling = function backgroundColorStyling() {
|
|
7430
|
-
if (disabled) {
|
|
7448
|
+
if (!loading && disabled) {
|
|
7431
7449
|
return {
|
|
7432
7450
|
backgroundColor: theme.__hd__.button.colors.disabledBorder
|
|
7433
7451
|
};
|
|
@@ -7445,9 +7463,9 @@ var genFilledContainerStyles = function genFilledContainerStyles(theme, intent,
|
|
|
7445
7463
|
borderRadius: theme.__hd__.button.radii["default"]
|
|
7446
7464
|
}, backgroundColorStyling());
|
|
7447
7465
|
};
|
|
7448
|
-
var genOutlineContainerStyles = function genOutlineContainerStyles(theme, intent, disabled) {
|
|
7466
|
+
var genOutlineContainerStyles = function genOutlineContainerStyles(theme, intent, disabled, loading) {
|
|
7449
7467
|
var borderColorStyling = function borderColorStyling() {
|
|
7450
|
-
if (disabled) {
|
|
7468
|
+
if (!loading && disabled) {
|
|
7451
7469
|
return {
|
|
7452
7470
|
borderColor: theme.__hd__.button.colors.disabledBorder
|
|
7453
7471
|
};
|
|
@@ -7499,33 +7517,37 @@ var genTextVariantTextStyles = function genTextVariantTextStyles(theme, intent,
|
|
|
7499
7517
|
lineHeight: theme.__hd__.button.lineHeight["default"]
|
|
7500
7518
|
}, textColorStyling());
|
|
7501
7519
|
};
|
|
7502
|
-
var StyledButtonContainer = index$a(
|
|
7520
|
+
var StyledButtonContainer = index$a(TouchableHighlight)(function (_ref) {
|
|
7503
7521
|
var _ref$disabled = _ref.disabled,
|
|
7504
7522
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
7523
|
+
_ref$loading = _ref.loading,
|
|
7524
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
7505
7525
|
themeVariant = _ref.themeVariant,
|
|
7506
7526
|
theme = _ref.theme;
|
|
7507
7527
|
switch (themeVariant) {
|
|
7508
7528
|
case 'filled-primary':
|
|
7509
|
-
return genFilledContainerStyles(theme, 'primary', disabled);
|
|
7529
|
+
return genFilledContainerStyles(theme, 'primary', disabled, loading);
|
|
7510
7530
|
case 'filled-secondary':
|
|
7511
|
-
return genFilledContainerStyles(theme, 'secondary', disabled);
|
|
7531
|
+
return genFilledContainerStyles(theme, 'secondary', disabled, loading);
|
|
7512
7532
|
case 'filled-danger':
|
|
7513
|
-
return genFilledContainerStyles(theme, 'danger', disabled);
|
|
7533
|
+
return genFilledContainerStyles(theme, 'danger', disabled, loading);
|
|
7514
7534
|
case 'outlined-primary':
|
|
7515
|
-
return genOutlineContainerStyles(theme, 'primary', disabled);
|
|
7535
|
+
return genOutlineContainerStyles(theme, 'primary', disabled, loading);
|
|
7516
7536
|
case 'outlined-secondary':
|
|
7517
|
-
return genOutlineContainerStyles(theme, 'secondary', disabled);
|
|
7537
|
+
return genOutlineContainerStyles(theme, 'secondary', disabled, loading);
|
|
7518
7538
|
case 'outlined-danger':
|
|
7519
|
-
return genOutlineContainerStyles(theme, 'danger', disabled);
|
|
7539
|
+
return genOutlineContainerStyles(theme, 'danger', disabled, loading);
|
|
7520
7540
|
case 'text-primary':
|
|
7521
7541
|
case 'text-secondary':
|
|
7522
7542
|
case 'text-danger':
|
|
7523
7543
|
return {
|
|
7544
|
+
borderRadius: theme.__hd__.button.radii.text,
|
|
7524
7545
|
flexDirection: 'row',
|
|
7525
7546
|
justifyContent: 'center',
|
|
7526
7547
|
alignItems: 'center',
|
|
7527
|
-
padding: theme.__hd__.button.space.
|
|
7528
|
-
borderWidth: 0
|
|
7548
|
+
padding: theme.__hd__.button.space.textButtonPadding,
|
|
7549
|
+
borderWidth: 0,
|
|
7550
|
+
backgroundColor: loading ? theme.__hd__.button.colors.textLoadingBackground : 'transparent'
|
|
7529
7551
|
};
|
|
7530
7552
|
}
|
|
7531
7553
|
});
|
|
@@ -7633,6 +7655,29 @@ var getThemeVariant = function getThemeVariant(variant, intent) {
|
|
|
7633
7655
|
return TEXT_VARIANTS[intent];
|
|
7634
7656
|
}
|
|
7635
7657
|
};
|
|
7658
|
+
var getUnderlayColor = function getUnderlayColor(theme, themeVariant) {
|
|
7659
|
+
switch (themeVariant) {
|
|
7660
|
+
case 'filled-primary':
|
|
7661
|
+
return theme.__hd__.button.colors.pressedBackground.filledPrimary;
|
|
7662
|
+
case 'filled-secondary':
|
|
7663
|
+
return theme.__hd__.button.colors.pressedBackground.filledSecondary;
|
|
7664
|
+
case 'filled-danger':
|
|
7665
|
+
return theme.__hd__.button.colors.pressedBackground.filledDanger;
|
|
7666
|
+
case 'outlined-primary':
|
|
7667
|
+
return theme.__hd__.button.colors.pressedBackground.outlinedPrimary;
|
|
7668
|
+
case 'outlined-secondary':
|
|
7669
|
+
return theme.__hd__.button.colors.pressedBackground.outlinedSecondary;
|
|
7670
|
+
case 'outlined-danger':
|
|
7671
|
+
return theme.__hd__.button.colors.pressedBackground.outlineDanger;
|
|
7672
|
+
case 'text-primary':
|
|
7673
|
+
return theme.__hd__.button.colors.pressedBackground.textPrimary;
|
|
7674
|
+
case 'text-secondary':
|
|
7675
|
+
return theme.__hd__.button.colors.pressedBackground.textSecondary;
|
|
7676
|
+
case 'text-danger':
|
|
7677
|
+
return theme.__hd__.button.colors.pressedBackground.textDanger;
|
|
7678
|
+
}
|
|
7679
|
+
};
|
|
7680
|
+
var deprecatedVariants = ['filled-secondary', 'filled-danger', 'outlined-secondary', 'outlined-danger'];
|
|
7636
7681
|
var Button = function Button(_ref) {
|
|
7637
7682
|
var accessibilityHint = _ref.accessibilityHint,
|
|
7638
7683
|
accessibilityLabel = _ref.accessibilityLabel,
|
|
@@ -7651,14 +7696,21 @@ var Button = function Button(_ref) {
|
|
|
7651
7696
|
_ref$variant = _ref.variant,
|
|
7652
7697
|
variant = _ref$variant === void 0 ? 'filled' : _ref$variant;
|
|
7653
7698
|
var themeVariant = getThemeVariant(variant, intent);
|
|
7699
|
+
var theme = useTheme();
|
|
7700
|
+
var underlayColor = useMemo(function () {
|
|
7701
|
+
return getUnderlayColor(theme, themeVariant);
|
|
7702
|
+
}, [theme, themeVariant]);
|
|
7703
|
+
useDeprecation("Button variant ".concat(deprecatedVariants.join(', '), " are deprecated."), deprecatedVariants.includes(themeVariant));
|
|
7654
7704
|
return /*#__PURE__*/React.createElement(StyledButtonContainer, {
|
|
7655
7705
|
accessibilityHint: accessibilityHint,
|
|
7656
7706
|
accessibilityLabel: accessibilityLabel,
|
|
7657
7707
|
disabled: disabled || loading,
|
|
7708
|
+
loading: loading,
|
|
7658
7709
|
onPress: onPress,
|
|
7659
7710
|
testID: testID,
|
|
7660
7711
|
themeVariant: themeVariant,
|
|
7661
|
-
style: style
|
|
7712
|
+
style: style,
|
|
7713
|
+
underlayColor: underlayColor
|
|
7662
7714
|
}, loading === true ? /*#__PURE__*/React.createElement(LoadingIndicator, {
|
|
7663
7715
|
testID: "".concat(testID, "-loading-indicator"),
|
|
7664
7716
|
themeVariant: themeVariant
|
|
@@ -11434,7 +11486,9 @@ var StyledTextInputContainer = index$a(View)(function (_ref13) {
|
|
|
11434
11486
|
return {
|
|
11435
11487
|
flexDirection: 'row',
|
|
11436
11488
|
alignItems: 'center',
|
|
11437
|
-
padding: theme.__hd__.textInput.space.containerPadding
|
|
11489
|
+
padding: theme.__hd__.textInput.space.containerPadding,
|
|
11490
|
+
backgroundColor: theme.__hd__.textInput.colors.containerBackground,
|
|
11491
|
+
borderRadius: theme.__hd__.textInput.radii.container
|
|
11438
11492
|
};
|
|
11439
11493
|
});
|
|
11440
11494
|
var StyledTextInputAndLabelContainer = index$a(View)(function () {
|
|
@@ -11568,8 +11622,24 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11568
11622
|
}, [textStyle]),
|
|
11569
11623
|
borderStyle = _useMemo.borderStyle,
|
|
11570
11624
|
textStyleWithoutBorderStyle = _useMemo.textStyleWithoutBorderStyle;
|
|
11625
|
+
var _useMemo2 = useMemo(function () {
|
|
11626
|
+
var _flattenTextStyle$bac;
|
|
11627
|
+
if (!style) {
|
|
11628
|
+
return {
|
|
11629
|
+
backgroundColor: theme.__hd__.textInput.colors.containerBackground
|
|
11630
|
+
};
|
|
11631
|
+
}
|
|
11632
|
+
var flattenTextStyle = StyleSheet$1.flatten(style);
|
|
11633
|
+
return {
|
|
11634
|
+
backgroundColor: (_flattenTextStyle$bac = flattenTextStyle.backgroundColor) !== null && _flattenTextStyle$bac !== void 0 ? _flattenTextStyle$bac : theme.__hd__.textInput.colors.containerBackground,
|
|
11635
|
+
styleWithoutBackgroundColor: omit(['backgroundColor'], flattenTextStyle)
|
|
11636
|
+
};
|
|
11637
|
+
}, [style, theme]),
|
|
11638
|
+
backgroundColor = _useMemo2.backgroundColor,
|
|
11639
|
+
styleWithoutBackgroundColor = _useMemo2.styleWithoutBackgroundColor;
|
|
11571
11640
|
var nativeInputProps = _objectSpread2(_objectSpread2({
|
|
11572
11641
|
style: StyleSheet$1.flatten([{
|
|
11642
|
+
backgroundColor: backgroundColor,
|
|
11573
11643
|
color: theme.__hd__.textInput.colors.text
|
|
11574
11644
|
}, textStyleWithoutBorderStyle]),
|
|
11575
11645
|
testID: 'text-input',
|
|
@@ -11601,15 +11671,22 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11601
11671
|
placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
|
|
11602
11672
|
});
|
|
11603
11673
|
return /*#__PURE__*/React.createElement(StyledContainer$3, {
|
|
11604
|
-
style:
|
|
11674
|
+
style: styleWithoutBackgroundColor,
|
|
11605
11675
|
pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
|
|
11606
11676
|
testID: testID
|
|
11607
11677
|
}, /*#__PURE__*/React.createElement(StyledTextInputContainer, null, /*#__PURE__*/React.createElement(StyledBorderBackDrop, {
|
|
11608
11678
|
themeFocused: isFocused,
|
|
11609
11679
|
themeVariant: variant,
|
|
11610
|
-
|
|
11680
|
+
testID: "text-input-border",
|
|
11681
|
+
style: [{
|
|
11682
|
+
backgroundColor: backgroundColor
|
|
11683
|
+
}, borderStyle]
|
|
11611
11684
|
}), (isFocused || label && !isEmptyValue) && /*#__PURE__*/React.createElement(StyledLabelContainer, {
|
|
11612
|
-
pointerEvents: "none"
|
|
11685
|
+
pointerEvents: "none",
|
|
11686
|
+
testID: "label-container",
|
|
11687
|
+
style: {
|
|
11688
|
+
backgroundColor: backgroundColor
|
|
11689
|
+
}
|
|
11613
11690
|
}, required && /*#__PURE__*/React.createElement(StyledAsteriskLabel, {
|
|
11614
11691
|
themeVariant: variant,
|
|
11615
11692
|
fontSize: "small"
|
|
@@ -11617,7 +11694,10 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11617
11694
|
nativeID: accessibilityLabelledBy,
|
|
11618
11695
|
testID: "input-label",
|
|
11619
11696
|
fontSize: "small",
|
|
11620
|
-
themeVariant: variant
|
|
11697
|
+
themeVariant: variant,
|
|
11698
|
+
style: {
|
|
11699
|
+
backgroundColor: backgroundColor
|
|
11700
|
+
}
|
|
11621
11701
|
}, label)), typeof prefix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
|
|
11622
11702
|
intent: variant === 'disabled' ? 'disabled-text' : 'text',
|
|
11623
11703
|
testID: "input-prefix",
|
|
@@ -12249,11 +12329,12 @@ var FAB = function FAB(_ref3) {
|
|
|
12249
12329
|
active = _ref3.active,
|
|
12250
12330
|
style = _ref3.style;
|
|
12251
12331
|
var isIconOnly = !title;
|
|
12332
|
+
var theme = useTheme();
|
|
12252
12333
|
return /*#__PURE__*/React.createElement(StyledFABContainer, {
|
|
12334
|
+
underlayColor: theme.__hd__.fab.colors.buttonPressedBackground,
|
|
12253
12335
|
testID: testID,
|
|
12254
12336
|
style: style,
|
|
12255
|
-
onPress: onPress
|
|
12256
|
-
activeOpacity: 0.6
|
|
12337
|
+
onPress: onPress
|
|
12257
12338
|
}, isIconOnly ? /*#__PURE__*/React.createElement(IconOnlyContent, {
|
|
12258
12339
|
animated: animated,
|
|
12259
12340
|
active: active,
|
|
@@ -12264,7 +12345,7 @@ var FAB = function FAB(_ref3) {
|
|
|
12264
12345
|
}));
|
|
12265
12346
|
};
|
|
12266
12347
|
|
|
12267
|
-
var StyledActionItem = index$a(
|
|
12348
|
+
var StyledActionItem = index$a(TouchableHighlight)(function (_ref) {
|
|
12268
12349
|
var theme = _ref.theme;
|
|
12269
12350
|
return {
|
|
12270
12351
|
paddingLeft: theme.__hd__.fab.space.actionItemPaddingLeft,
|
|
@@ -12304,13 +12385,15 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
12304
12385
|
onPress = _ref.onPress,
|
|
12305
12386
|
style = _ref.style,
|
|
12306
12387
|
testID = _ref.testID;
|
|
12388
|
+
var theme = useTheme();
|
|
12307
12389
|
return /*#__PURE__*/React.createElement(StyledActionItem, {
|
|
12390
|
+
underlayColor: theme.__hd__.fab.colors.actionItemPressedBackground,
|
|
12308
12391
|
style: style,
|
|
12309
12392
|
onPress: onPress,
|
|
12310
12393
|
testID: testID
|
|
12311
|
-
}, /*#__PURE__*/React.createElement(StyledIcon, {
|
|
12394
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledIcon, {
|
|
12312
12395
|
icon: icon
|
|
12313
|
-
}), /*#__PURE__*/React.createElement(StyledActionItemText, null, title));
|
|
12396
|
+
}), /*#__PURE__*/React.createElement(StyledActionItemText, null, title)));
|
|
12314
12397
|
};
|
|
12315
12398
|
|
|
12316
12399
|
var StyledContainer$1 = index$a(View)({
|
|
@@ -12437,7 +12520,7 @@ var index$6 = Object.assign(FAB, {
|
|
|
12437
12520
|
ActionGroup: ActionGroup
|
|
12438
12521
|
});
|
|
12439
12522
|
|
|
12440
|
-
var StyledListItemContainer$1 = index$a(
|
|
12523
|
+
var StyledListItemContainer$1 = index$a(TouchableHighlight)(function (_ref) {
|
|
12441
12524
|
var theme = _ref.theme,
|
|
12442
12525
|
_ref$themeSelected = _ref.themeSelected,
|
|
12443
12526
|
themeSelected = _ref$themeSelected === void 0 ? false : _ref$themeSelected,
|
|
@@ -12523,13 +12606,15 @@ var ListItem = function ListItem(_ref) {
|
|
|
12523
12606
|
onPress = _ref.onPress,
|
|
12524
12607
|
_ref$disabled = _ref.disabled,
|
|
12525
12608
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
12609
|
+
var theme = useTheme();
|
|
12526
12610
|
return /*#__PURE__*/React.createElement(StyledListItemContainer$1, {
|
|
12527
12611
|
style: style,
|
|
12528
12612
|
testID: testID,
|
|
12529
12613
|
themeSelected: selected,
|
|
12530
12614
|
themeVariant: variant,
|
|
12531
12615
|
onPress: onPress,
|
|
12532
|
-
disabled: disabled
|
|
12616
|
+
disabled: disabled,
|
|
12617
|
+
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
12533
12618
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, leadingStatus && /*#__PURE__*/React.createElement(StyledLeadingStatus, {
|
|
12534
12619
|
themeLeadingStatusIntent: leadingStatus,
|
|
12535
12620
|
testID: "leadingStatus"
|
|
@@ -12571,7 +12656,7 @@ var StyledTitleContainer = index$a(View)(function () {
|
|
|
12571
12656
|
flex: 1
|
|
12572
12657
|
};
|
|
12573
12658
|
});
|
|
12574
|
-
var StyledListItemContainer = index$a(
|
|
12659
|
+
var StyledListItemContainer = index$a(TouchableHighlight)(function (_ref3) {
|
|
12575
12660
|
var theme = _ref3.theme,
|
|
12576
12661
|
themeSelected = _ref3.themeSelected,
|
|
12577
12662
|
themeDisabled = _ref3.themeDisabled;
|
|
@@ -12597,13 +12682,15 @@ var BasicListItem = function BasicListItem(_ref) {
|
|
|
12597
12682
|
_ref$disabled = _ref.disabled,
|
|
12598
12683
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12599
12684
|
onPress = _ref.onPress;
|
|
12685
|
+
var theme = useTheme();
|
|
12600
12686
|
return /*#__PURE__*/React.createElement(StyledListItemContainer, {
|
|
12601
12687
|
style: style,
|
|
12602
12688
|
testID: testID,
|
|
12603
12689
|
themeSelected: selected,
|
|
12604
12690
|
themeDisabled: disabled,
|
|
12605
12691
|
onPress: onPress,
|
|
12606
|
-
disabled: disabled
|
|
12692
|
+
disabled: disabled,
|
|
12693
|
+
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
12607
12694
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, prefix && /*#__PURE__*/React.createElement(StyledPrefixContainer, null, typeof prefix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
|
|
12608
12695
|
icon: prefix,
|
|
12609
12696
|
intent: disabled ? 'disabled-text' : 'primary'
|