@hero-design/rn 8.21.0 → 8.22.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 +2 -2
- package/es/index.js +95 -31
- package/lib/index.js +95 -31
- package/package.json +5 -5
- package/src/components/Carousel/StyledCarousel.tsx +1 -2
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +6 -12
- package/src/components/Carousel/index.tsx +1 -1
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +180 -138
- package/src/components/FAB/FAB.tsx +17 -12
- package/src/components/FAB/StyledFAB.tsx +13 -4
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +13 -21
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +214 -151
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +10 -0
- package/src/theme/components/fab.ts +18 -1
- package/src/theme/global/colors/__tests__/__snapshots__/globalDark.spec.ts.snap +19 -19
- package/src/theme/global/colors/__tests__/__snapshots__/swagDark.spec.ts.snap +19 -19
- package/src/theme/global/colors/globalDark.ts +24 -24
- package/types/components/FAB/StyledFAB.d.ts +7 -3
- package/types/theme/components/fab.d.ts +10 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[32m@hero-design/rn:build[0m: cache hit, replaying output [
|
|
1
|
+
[32m@hero-design/rn:build[0m: cache hit, replaying output [2mebe8623fbd3e3933[0m
|
|
2
2
|
[32m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
3
|
[32m@hero-design/rn:build: [0m$ rollup -c
|
|
4
4
|
[32m@hero-design/rn:build: [0m[36m
|
|
5
5
|
[32m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
6
|
[32m@hero-design/rn:build: [0m[1m[33m(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
7
7
|
[32m@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
|
-
[32m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
8
|
+
[32m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m26.8s[22m[39m
|
|
9
9
|
[32m@hero-design/rn:build: [0m$ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
|
package/es/index.js
CHANGED
|
@@ -914,13 +914,18 @@ var BASE_COLORS = {
|
|
|
914
914
|
aliceBlue: '#ecf0ff',
|
|
915
915
|
antiFlashWhite: '#f1f2f3',
|
|
916
916
|
apple: '#e3602a',
|
|
917
|
+
bigStone: '#344348',
|
|
917
918
|
blue1: '#5a68e2',
|
|
918
919
|
blue: '#1dbeee',
|
|
920
|
+
blueOblivion: '#23438f',
|
|
921
|
+
blazingBonfire: '#ffa234',
|
|
919
922
|
cornflowerBlue: '#5d80f0',
|
|
920
923
|
currant: '#48000a',
|
|
921
924
|
darkBlue: '#25006e',
|
|
922
925
|
deepSaffron: '#ffa234',
|
|
926
|
+
deepIntoTheJungle: '#004e48',
|
|
923
927
|
emerald: '#5ace7d',
|
|
928
|
+
flagstone: '#acacaf',
|
|
924
929
|
frenchSky: '#8999ff',
|
|
925
930
|
gold: '#ffd500',
|
|
926
931
|
green: '#01b39c',
|
|
@@ -928,13 +933,17 @@ var BASE_COLORS = {
|
|
|
928
933
|
grotesqueGreen: '#6af293',
|
|
929
934
|
hitPink: '#ffad79',
|
|
930
935
|
honeydew: '#f0fef4',
|
|
936
|
+
indianDance: '#f89076',
|
|
931
937
|
jordyBlue: '#92abfc',
|
|
932
938
|
linen: '#fcebe7',
|
|
933
939
|
maasstrichtBlue: '#001f23',
|
|
934
940
|
mauve: '#c38cee',
|
|
941
|
+
moussaka: '#6f2a17',
|
|
935
942
|
mellowApricot: '#ffbe71',
|
|
943
|
+
mintLeaf: '#01cbb0',
|
|
936
944
|
nightBlue: '#353957',
|
|
937
945
|
pastelRed: '#f46363',
|
|
946
|
+
pastelBlue: '#a1b5fc',
|
|
938
947
|
paua: '#130066',
|
|
939
948
|
peach: '#f8ac7d',
|
|
940
949
|
pineGreen: '#017d6d',
|
|
@@ -952,6 +961,8 @@ var BASE_COLORS = {
|
|
|
952
961
|
violet1: '#8505a2',
|
|
953
962
|
violet: '#7622d7',
|
|
954
963
|
vodka: '#b5c3fd',
|
|
964
|
+
theatreGold: '#a56822',
|
|
965
|
+
uniformGreen: '#4d4628',
|
|
955
966
|
yellow: '#fadb14'
|
|
956
967
|
};
|
|
957
968
|
var colorScales = Object.entries(BASE_COLORS).reduce(function (acc, _ref16) {
|
|
@@ -1122,13 +1133,19 @@ var palette$8 = {
|
|
|
1122
1133
|
var aliceBlue = colorScales.aliceBlue,
|
|
1123
1134
|
antiFlashWhite = colorScales.antiFlashWhite,
|
|
1124
1135
|
apple$2 = colorScales.apple,
|
|
1136
|
+
blazingBonfire = colorScales.blazingBonfire,
|
|
1137
|
+
bigStone = colorScales.bigStone,
|
|
1138
|
+
flagstone = colorScales.flagstone,
|
|
1125
1139
|
deepSaffron$1 = colorScales.deepSaffron,
|
|
1140
|
+
deepIntoTheJungle = colorScales.deepIntoTheJungle,
|
|
1126
1141
|
emerald$1 = colorScales.emerald,
|
|
1127
1142
|
grey$3 = colorScales.grey,
|
|
1128
1143
|
honeydew$2 = colorScales.honeydew,
|
|
1144
|
+
indianDance = colorScales.indianDance,
|
|
1129
1145
|
linen$2 = colorScales.linen,
|
|
1130
1146
|
maasstrichtBlue$2 = colorScales.maasstrichtBlue,
|
|
1131
1147
|
mellowApricot = colorScales.mellowApricot,
|
|
1148
|
+
moussaka = colorScales.moussaka,
|
|
1132
1149
|
pastelRed$1 = colorScales.pastelRed,
|
|
1133
1150
|
pineGreen$1 = colorScales.pineGreen,
|
|
1134
1151
|
seashell$2 = colorScales.seashell,
|
|
@@ -1136,7 +1153,12 @@ var aliceBlue = colorScales.aliceBlue,
|
|
|
1136
1153
|
sonicSilver$1 = colorScales.sonicSilver,
|
|
1137
1154
|
ultramarineBlue$1 = colorScales.ultramarineBlue,
|
|
1138
1155
|
vermilion$1 = colorScales.vermilion,
|
|
1139
|
-
vodka = colorScales.vodka
|
|
1156
|
+
vodka = colorScales.vodka,
|
|
1157
|
+
theatreGold = colorScales.theatreGold,
|
|
1158
|
+
uniformGreen = colorScales.uniformGreen,
|
|
1159
|
+
mintLeaf = colorScales.mintLeaf,
|
|
1160
|
+
blueOblivion = colorScales.blueOblivion,
|
|
1161
|
+
pastelBlue = colorScales.pastelBlue;
|
|
1140
1162
|
var palette$7 = {
|
|
1141
1163
|
black: '#000000',
|
|
1142
1164
|
white: '#ffffff',
|
|
@@ -1161,17 +1183,29 @@ var palette$7 = {
|
|
|
1161
1183
|
pastelRedLight20: pastelRed$1.lighten20,
|
|
1162
1184
|
mellowApricot: mellowApricot.base,
|
|
1163
1185
|
mellowApricotLight20: mellowApricot.lighten20,
|
|
1186
|
+
moussaka: moussaka.base,
|
|
1164
1187
|
emerald: emerald$1.base,
|
|
1165
1188
|
emeraldLight20: emerald$1.lighten20,
|
|
1166
1189
|
emeraldDark20: emerald$1.darken20,
|
|
1167
1190
|
vodka: vodka.base,
|
|
1168
1191
|
vodkaLight20: vodka.lighten20,
|
|
1169
1192
|
vermilion: vermilion$1.base,
|
|
1193
|
+
vermilionLight20: vermilion$1.lighten20,
|
|
1194
|
+
vermilionDark10: vermilion$1.darken10,
|
|
1170
1195
|
deepSaffron: deepSaffron$1.base,
|
|
1171
1196
|
deepSaffronDark20: deepSaffron$1.darken20,
|
|
1197
|
+
indianDance: indianDance.base,
|
|
1198
|
+
theatreGold: theatreGold.base,
|
|
1199
|
+
theatreGoldLight20: theatreGold.lighten20,
|
|
1172
1200
|
pineGreen: pineGreen$1.base,
|
|
1201
|
+
pineGreenLight20: pineGreen$1.lighten20,
|
|
1202
|
+
pineGreenDark10: pineGreen$1.darken10,
|
|
1173
1203
|
ultramarineBlue: ultramarineBlue$1.base,
|
|
1204
|
+
ultramarineBlueLight20: ultramarineBlue$1.lighten20,
|
|
1205
|
+
ultramarineBlueDark10: ultramarineBlue$1.darken10,
|
|
1174
1206
|
sonicSilver: sonicSilver$1.base,
|
|
1207
|
+
sonicSilverLight50: sonicSilver$1.lighten45,
|
|
1208
|
+
sonicSilverDark10: sonicSilver$1.darken10,
|
|
1175
1209
|
linen: linen$2.base,
|
|
1176
1210
|
seashell: seashell$2.base,
|
|
1177
1211
|
honeydew: honeydew$2.base,
|
|
@@ -1179,7 +1213,15 @@ var palette$7 = {
|
|
|
1179
1213
|
antiFlashWhite: antiFlashWhite.base,
|
|
1180
1214
|
apple: apple$2.base,
|
|
1181
1215
|
silverChalice: silverChalice.base,
|
|
1182
|
-
silverChaliceLight20: silverChalice.lighten20
|
|
1216
|
+
silverChaliceLight20: silverChalice.lighten20,
|
|
1217
|
+
uniformGreen: uniformGreen.base,
|
|
1218
|
+
blazingBonfire: blazingBonfire.base,
|
|
1219
|
+
deepIntoTheJungle: deepIntoTheJungle.base,
|
|
1220
|
+
mintLeaf: mintLeaf.base,
|
|
1221
|
+
blueOblivion: blueOblivion.base,
|
|
1222
|
+
pastelBlue: pastelBlue.base,
|
|
1223
|
+
bigStone: bigStone.base,
|
|
1224
|
+
flagstone: flagstone.base
|
|
1183
1225
|
};
|
|
1184
1226
|
var currant$1 = colorScales.currant,
|
|
1185
1227
|
sonicSilver = colorScales.sonicSilver,
|
|
@@ -1385,26 +1427,26 @@ var globalPalette = {
|
|
|
1385
1427
|
inactiveOutline: palette$7.maasstrichtBlueLight60,
|
|
1386
1428
|
disabledOutline: palette$7.greyDark20,
|
|
1387
1429
|
// Accents
|
|
1388
|
-
error: palette$7.
|
|
1389
|
-
mutedError: palette$7.
|
|
1390
|
-
errorSurface: palette$7.
|
|
1391
|
-
onErrorSurface: palette$7.
|
|
1392
|
-
warning: palette$7.
|
|
1393
|
-
mutedWarning: palette$7.
|
|
1394
|
-
warningSurface: palette$7.
|
|
1395
|
-
onWarningSurface: palette$7.
|
|
1396
|
-
success: palette$7.
|
|
1397
|
-
mutedSuccess: palette$7.
|
|
1398
|
-
successSurface: palette$7.
|
|
1399
|
-
onSuccessSurface: palette$7.
|
|
1400
|
-
info: palette$7.
|
|
1401
|
-
mutedInfo: palette$7.
|
|
1402
|
-
infoSurface: palette$7.
|
|
1403
|
-
onInfoSurface: palette$7.
|
|
1404
|
-
archived: palette$7.
|
|
1405
|
-
mutedArchived: palette$7.
|
|
1406
|
-
archivedSurface: palette$7.
|
|
1407
|
-
onArchivedSurface: palette$7.
|
|
1430
|
+
error: palette$7.vermilionDark10,
|
|
1431
|
+
mutedError: palette$7.vermilionLight20,
|
|
1432
|
+
errorSurface: palette$7.moussaka,
|
|
1433
|
+
onErrorSurface: palette$7.indianDance,
|
|
1434
|
+
warning: palette$7.theatreGold,
|
|
1435
|
+
mutedWarning: palette$7.theatreGoldLight20,
|
|
1436
|
+
warningSurface: palette$7.uniformGreen,
|
|
1437
|
+
onWarningSurface: palette$7.blazingBonfire,
|
|
1438
|
+
success: palette$7.pineGreenDark10,
|
|
1439
|
+
mutedSuccess: palette$7.pineGreenLight20,
|
|
1440
|
+
successSurface: palette$7.deepIntoTheJungle,
|
|
1441
|
+
onSuccessSurface: palette$7.mintLeaf,
|
|
1442
|
+
info: palette$7.ultramarineBlueDark10,
|
|
1443
|
+
mutedInfo: palette$7.ultramarineBlueLight20,
|
|
1444
|
+
infoSurface: palette$7.blueOblivion,
|
|
1445
|
+
onInfoSurface: palette$7.pastelBlue,
|
|
1446
|
+
archived: palette$7.sonicSilverDark10,
|
|
1447
|
+
mutedArchived: palette$7.sonicSilverLight50,
|
|
1448
|
+
archivedSurface: palette$7.bigStone,
|
|
1449
|
+
onArchivedSurface: palette$7.flagstone
|
|
1408
1450
|
// End of Updated 21 / Nov / 22
|
|
1409
1451
|
};
|
|
1410
1452
|
|
|
@@ -2217,7 +2259,8 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
2217
2259
|
actionItemPressedBackground: theme.colors.pressedSurface,
|
|
2218
2260
|
backdropBackground: theme.colors.overlayGlobalSurface,
|
|
2219
2261
|
titleText: theme.colors.onPrimary,
|
|
2220
|
-
actionItemText: theme.colors.onPrimary
|
|
2262
|
+
actionItemText: theme.colors.onPrimary,
|
|
2263
|
+
shadow: theme.colors.primaryOutline
|
|
2221
2264
|
};
|
|
2222
2265
|
var sizes = {
|
|
2223
2266
|
width: theme.sizes.xxxxxlarge,
|
|
@@ -2239,6 +2282,15 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
2239
2282
|
title: theme.lineHeights.large,
|
|
2240
2283
|
icon: theme.lineHeights.large
|
|
2241
2284
|
};
|
|
2285
|
+
var shadows = {
|
|
2286
|
+
offset: {
|
|
2287
|
+
width: 0,
|
|
2288
|
+
height: 2
|
|
2289
|
+
},
|
|
2290
|
+
opacity: 0.12,
|
|
2291
|
+
radius: theme.radii.medium,
|
|
2292
|
+
elevation: 2
|
|
2293
|
+
};
|
|
2242
2294
|
var space = {
|
|
2243
2295
|
actionItemPaddingLeft: theme.space.medium,
|
|
2244
2296
|
actionItemPaddingRight: theme.space.medium,
|
|
@@ -2265,6 +2317,7 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
2265
2317
|
colors: colors,
|
|
2266
2318
|
sizes: sizes,
|
|
2267
2319
|
lineHeights: lineHeights,
|
|
2320
|
+
shadows: shadows,
|
|
2268
2321
|
space: space
|
|
2269
2322
|
};
|
|
2270
2323
|
};
|
|
@@ -10988,6 +11041,7 @@ var StyledCarouselHeading = index$a(Typography.Text)(function (_ref2) {
|
|
|
10988
11041
|
});
|
|
10989
11042
|
var StyledCarouselImage = index$a(Image)(function () {
|
|
10990
11043
|
return {
|
|
11044
|
+
flexGrow: 2,
|
|
10991
11045
|
flex: 1,
|
|
10992
11046
|
width: '100%',
|
|
10993
11047
|
resizeMode: 'contain'
|
|
@@ -11008,8 +11062,7 @@ var StyledCustomSizeCarouselImage = index$a(Image)(function (_ref3) {
|
|
|
11008
11062
|
var StyledCarouselContentWrapper = index$a(Box)(function (_ref4) {
|
|
11009
11063
|
var width = _ref4.width;
|
|
11010
11064
|
return {
|
|
11011
|
-
width: width
|
|
11012
|
-
minHeight: scale(250)
|
|
11065
|
+
width: width
|
|
11013
11066
|
};
|
|
11014
11067
|
});
|
|
11015
11068
|
var StyledCarouselFooterWrapper = index$a(View)(function (_ref5) {
|
|
@@ -11338,7 +11391,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
11338
11391
|
pageControlPosition = _ref$pageControlPosit === void 0 ? 'bottom' : _ref$pageControlPosit,
|
|
11339
11392
|
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
11340
11393
|
useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
|
|
11341
|
-
useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition
|
|
11394
|
+
useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
|
|
11342
11395
|
var carouselRef = useRef(null);
|
|
11343
11396
|
var _useStateFromProp = useStateFromProp(selectedItemIndex),
|
|
11344
11397
|
_useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
|
|
@@ -12703,7 +12756,7 @@ var Error$1 = function Error(_ref2) {
|
|
|
12703
12756
|
}, nativeProps));
|
|
12704
12757
|
};
|
|
12705
12758
|
|
|
12706
|
-
var
|
|
12759
|
+
var StyledFAB$1 = index$a(TouchableHighlight)(function (_ref) {
|
|
12707
12760
|
var theme = _ref.theme;
|
|
12708
12761
|
return {
|
|
12709
12762
|
backgroundColor: theme.__hd__.fab.colors.buttonBackground,
|
|
@@ -12714,7 +12767,8 @@ var StyledFABContainer = index$a(TouchableHighlight)(function (_ref) {
|
|
|
12714
12767
|
alignSelf: 'flex-start',
|
|
12715
12768
|
paddingHorizontal: theme.__hd__.fab.space.containerPaddingHorizontal,
|
|
12716
12769
|
paddingVertical: theme.__hd__.fab.space.containerPaddingVertical,
|
|
12717
|
-
flexDirection: 'row'
|
|
12770
|
+
flexDirection: 'row',
|
|
12771
|
+
elevation: theme.__hd__.fab.shadows.elevation
|
|
12718
12772
|
};
|
|
12719
12773
|
});
|
|
12720
12774
|
var StyledFABIcon = index$a(Icon)(function (_ref2) {
|
|
@@ -12738,6 +12792,15 @@ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
|
|
|
12738
12792
|
marginHorizontal: theme.__hd__.fab.space.titleMarginHorizontal
|
|
12739
12793
|
};
|
|
12740
12794
|
});
|
|
12795
|
+
var StyledFABContainer = index$a(Box)(function (_ref4) {
|
|
12796
|
+
var theme = _ref4.theme;
|
|
12797
|
+
return {
|
|
12798
|
+
shadowColor: theme.__hd__.fab.colors.shadow,
|
|
12799
|
+
shadowOffset: theme.__hd__.fab.shadows.offset,
|
|
12800
|
+
shadowRadius: theme.__hd__.fab.shadows.radius,
|
|
12801
|
+
shadowOpacity: theme.__hd__.fab.shadows.opacity
|
|
12802
|
+
};
|
|
12803
|
+
});
|
|
12741
12804
|
|
|
12742
12805
|
var _excluded$a = ["active"];
|
|
12743
12806
|
var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
|
|
@@ -12804,9 +12867,10 @@ var FAB = function FAB(_ref3) {
|
|
|
12804
12867
|
var isIconOnly = !title;
|
|
12805
12868
|
var theme = useTheme();
|
|
12806
12869
|
return /*#__PURE__*/React.createElement(StyledFABContainer, {
|
|
12807
|
-
underlayColor: theme.__hd__.fab.colors.buttonPressedBackground,
|
|
12808
|
-
testID: testID,
|
|
12809
12870
|
style: style,
|
|
12871
|
+
testID: testID
|
|
12872
|
+
}, /*#__PURE__*/React.createElement(StyledFAB$1, {
|
|
12873
|
+
underlayColor: theme.__hd__.fab.colors.buttonPressedBackground,
|
|
12810
12874
|
onPress: onPress
|
|
12811
12875
|
}, isIconOnly ? /*#__PURE__*/React.createElement(IconOnlyContent, {
|
|
12812
12876
|
animated: animated,
|
|
@@ -12815,7 +12879,7 @@ var FAB = function FAB(_ref3) {
|
|
|
12815
12879
|
}) : /*#__PURE__*/React.createElement(IconWithTextContent, {
|
|
12816
12880
|
icon: icon,
|
|
12817
12881
|
title: title
|
|
12818
|
-
}));
|
|
12882
|
+
})));
|
|
12819
12883
|
};
|
|
12820
12884
|
|
|
12821
12885
|
var StyledActionItem = index$a(TouchableHighlight)(function (_ref) {
|
package/lib/index.js
CHANGED
|
@@ -944,13 +944,18 @@ var BASE_COLORS = {
|
|
|
944
944
|
aliceBlue: '#ecf0ff',
|
|
945
945
|
antiFlashWhite: '#f1f2f3',
|
|
946
946
|
apple: '#e3602a',
|
|
947
|
+
bigStone: '#344348',
|
|
947
948
|
blue1: '#5a68e2',
|
|
948
949
|
blue: '#1dbeee',
|
|
950
|
+
blueOblivion: '#23438f',
|
|
951
|
+
blazingBonfire: '#ffa234',
|
|
949
952
|
cornflowerBlue: '#5d80f0',
|
|
950
953
|
currant: '#48000a',
|
|
951
954
|
darkBlue: '#25006e',
|
|
952
955
|
deepSaffron: '#ffa234',
|
|
956
|
+
deepIntoTheJungle: '#004e48',
|
|
953
957
|
emerald: '#5ace7d',
|
|
958
|
+
flagstone: '#acacaf',
|
|
954
959
|
frenchSky: '#8999ff',
|
|
955
960
|
gold: '#ffd500',
|
|
956
961
|
green: '#01b39c',
|
|
@@ -958,13 +963,17 @@ var BASE_COLORS = {
|
|
|
958
963
|
grotesqueGreen: '#6af293',
|
|
959
964
|
hitPink: '#ffad79',
|
|
960
965
|
honeydew: '#f0fef4',
|
|
966
|
+
indianDance: '#f89076',
|
|
961
967
|
jordyBlue: '#92abfc',
|
|
962
968
|
linen: '#fcebe7',
|
|
963
969
|
maasstrichtBlue: '#001f23',
|
|
964
970
|
mauve: '#c38cee',
|
|
971
|
+
moussaka: '#6f2a17',
|
|
965
972
|
mellowApricot: '#ffbe71',
|
|
973
|
+
mintLeaf: '#01cbb0',
|
|
966
974
|
nightBlue: '#353957',
|
|
967
975
|
pastelRed: '#f46363',
|
|
976
|
+
pastelBlue: '#a1b5fc',
|
|
968
977
|
paua: '#130066',
|
|
969
978
|
peach: '#f8ac7d',
|
|
970
979
|
pineGreen: '#017d6d',
|
|
@@ -982,6 +991,8 @@ var BASE_COLORS = {
|
|
|
982
991
|
violet1: '#8505a2',
|
|
983
992
|
violet: '#7622d7',
|
|
984
993
|
vodka: '#b5c3fd',
|
|
994
|
+
theatreGold: '#a56822',
|
|
995
|
+
uniformGreen: '#4d4628',
|
|
985
996
|
yellow: '#fadb14'
|
|
986
997
|
};
|
|
987
998
|
var colorScales = Object.entries(BASE_COLORS).reduce(function (acc, _ref16) {
|
|
@@ -1152,13 +1163,19 @@ var palette$8 = {
|
|
|
1152
1163
|
var aliceBlue = colorScales.aliceBlue,
|
|
1153
1164
|
antiFlashWhite = colorScales.antiFlashWhite,
|
|
1154
1165
|
apple$2 = colorScales.apple,
|
|
1166
|
+
blazingBonfire = colorScales.blazingBonfire,
|
|
1167
|
+
bigStone = colorScales.bigStone,
|
|
1168
|
+
flagstone = colorScales.flagstone,
|
|
1155
1169
|
deepSaffron$1 = colorScales.deepSaffron,
|
|
1170
|
+
deepIntoTheJungle = colorScales.deepIntoTheJungle,
|
|
1156
1171
|
emerald$1 = colorScales.emerald,
|
|
1157
1172
|
grey$3 = colorScales.grey,
|
|
1158
1173
|
honeydew$2 = colorScales.honeydew,
|
|
1174
|
+
indianDance = colorScales.indianDance,
|
|
1159
1175
|
linen$2 = colorScales.linen,
|
|
1160
1176
|
maasstrichtBlue$2 = colorScales.maasstrichtBlue,
|
|
1161
1177
|
mellowApricot = colorScales.mellowApricot,
|
|
1178
|
+
moussaka = colorScales.moussaka,
|
|
1162
1179
|
pastelRed$1 = colorScales.pastelRed,
|
|
1163
1180
|
pineGreen$1 = colorScales.pineGreen,
|
|
1164
1181
|
seashell$2 = colorScales.seashell,
|
|
@@ -1166,7 +1183,12 @@ var aliceBlue = colorScales.aliceBlue,
|
|
|
1166
1183
|
sonicSilver$1 = colorScales.sonicSilver,
|
|
1167
1184
|
ultramarineBlue$1 = colorScales.ultramarineBlue,
|
|
1168
1185
|
vermilion$1 = colorScales.vermilion,
|
|
1169
|
-
vodka = colorScales.vodka
|
|
1186
|
+
vodka = colorScales.vodka,
|
|
1187
|
+
theatreGold = colorScales.theatreGold,
|
|
1188
|
+
uniformGreen = colorScales.uniformGreen,
|
|
1189
|
+
mintLeaf = colorScales.mintLeaf,
|
|
1190
|
+
blueOblivion = colorScales.blueOblivion,
|
|
1191
|
+
pastelBlue = colorScales.pastelBlue;
|
|
1170
1192
|
var palette$7 = {
|
|
1171
1193
|
black: '#000000',
|
|
1172
1194
|
white: '#ffffff',
|
|
@@ -1191,17 +1213,29 @@ var palette$7 = {
|
|
|
1191
1213
|
pastelRedLight20: pastelRed$1.lighten20,
|
|
1192
1214
|
mellowApricot: mellowApricot.base,
|
|
1193
1215
|
mellowApricotLight20: mellowApricot.lighten20,
|
|
1216
|
+
moussaka: moussaka.base,
|
|
1194
1217
|
emerald: emerald$1.base,
|
|
1195
1218
|
emeraldLight20: emerald$1.lighten20,
|
|
1196
1219
|
emeraldDark20: emerald$1.darken20,
|
|
1197
1220
|
vodka: vodka.base,
|
|
1198
1221
|
vodkaLight20: vodka.lighten20,
|
|
1199
1222
|
vermilion: vermilion$1.base,
|
|
1223
|
+
vermilionLight20: vermilion$1.lighten20,
|
|
1224
|
+
vermilionDark10: vermilion$1.darken10,
|
|
1200
1225
|
deepSaffron: deepSaffron$1.base,
|
|
1201
1226
|
deepSaffronDark20: deepSaffron$1.darken20,
|
|
1227
|
+
indianDance: indianDance.base,
|
|
1228
|
+
theatreGold: theatreGold.base,
|
|
1229
|
+
theatreGoldLight20: theatreGold.lighten20,
|
|
1202
1230
|
pineGreen: pineGreen$1.base,
|
|
1231
|
+
pineGreenLight20: pineGreen$1.lighten20,
|
|
1232
|
+
pineGreenDark10: pineGreen$1.darken10,
|
|
1203
1233
|
ultramarineBlue: ultramarineBlue$1.base,
|
|
1234
|
+
ultramarineBlueLight20: ultramarineBlue$1.lighten20,
|
|
1235
|
+
ultramarineBlueDark10: ultramarineBlue$1.darken10,
|
|
1204
1236
|
sonicSilver: sonicSilver$1.base,
|
|
1237
|
+
sonicSilverLight50: sonicSilver$1.lighten45,
|
|
1238
|
+
sonicSilverDark10: sonicSilver$1.darken10,
|
|
1205
1239
|
linen: linen$2.base,
|
|
1206
1240
|
seashell: seashell$2.base,
|
|
1207
1241
|
honeydew: honeydew$2.base,
|
|
@@ -1209,7 +1243,15 @@ var palette$7 = {
|
|
|
1209
1243
|
antiFlashWhite: antiFlashWhite.base,
|
|
1210
1244
|
apple: apple$2.base,
|
|
1211
1245
|
silverChalice: silverChalice.base,
|
|
1212
|
-
silverChaliceLight20: silverChalice.lighten20
|
|
1246
|
+
silverChaliceLight20: silverChalice.lighten20,
|
|
1247
|
+
uniformGreen: uniformGreen.base,
|
|
1248
|
+
blazingBonfire: blazingBonfire.base,
|
|
1249
|
+
deepIntoTheJungle: deepIntoTheJungle.base,
|
|
1250
|
+
mintLeaf: mintLeaf.base,
|
|
1251
|
+
blueOblivion: blueOblivion.base,
|
|
1252
|
+
pastelBlue: pastelBlue.base,
|
|
1253
|
+
bigStone: bigStone.base,
|
|
1254
|
+
flagstone: flagstone.base
|
|
1213
1255
|
};
|
|
1214
1256
|
var currant$1 = colorScales.currant,
|
|
1215
1257
|
sonicSilver = colorScales.sonicSilver,
|
|
@@ -1415,26 +1457,26 @@ var globalPalette = {
|
|
|
1415
1457
|
inactiveOutline: palette$7.maasstrichtBlueLight60,
|
|
1416
1458
|
disabledOutline: palette$7.greyDark20,
|
|
1417
1459
|
// Accents
|
|
1418
|
-
error: palette$7.
|
|
1419
|
-
mutedError: palette$7.
|
|
1420
|
-
errorSurface: palette$7.
|
|
1421
|
-
onErrorSurface: palette$7.
|
|
1422
|
-
warning: palette$7.
|
|
1423
|
-
mutedWarning: palette$7.
|
|
1424
|
-
warningSurface: palette$7.
|
|
1425
|
-
onWarningSurface: palette$7.
|
|
1426
|
-
success: palette$7.
|
|
1427
|
-
mutedSuccess: palette$7.
|
|
1428
|
-
successSurface: palette$7.
|
|
1429
|
-
onSuccessSurface: palette$7.
|
|
1430
|
-
info: palette$7.
|
|
1431
|
-
mutedInfo: palette$7.
|
|
1432
|
-
infoSurface: palette$7.
|
|
1433
|
-
onInfoSurface: palette$7.
|
|
1434
|
-
archived: palette$7.
|
|
1435
|
-
mutedArchived: palette$7.
|
|
1436
|
-
archivedSurface: palette$7.
|
|
1437
|
-
onArchivedSurface: palette$7.
|
|
1460
|
+
error: palette$7.vermilionDark10,
|
|
1461
|
+
mutedError: palette$7.vermilionLight20,
|
|
1462
|
+
errorSurface: palette$7.moussaka,
|
|
1463
|
+
onErrorSurface: palette$7.indianDance,
|
|
1464
|
+
warning: palette$7.theatreGold,
|
|
1465
|
+
mutedWarning: palette$7.theatreGoldLight20,
|
|
1466
|
+
warningSurface: palette$7.uniformGreen,
|
|
1467
|
+
onWarningSurface: palette$7.blazingBonfire,
|
|
1468
|
+
success: palette$7.pineGreenDark10,
|
|
1469
|
+
mutedSuccess: palette$7.pineGreenLight20,
|
|
1470
|
+
successSurface: palette$7.deepIntoTheJungle,
|
|
1471
|
+
onSuccessSurface: palette$7.mintLeaf,
|
|
1472
|
+
info: palette$7.ultramarineBlueDark10,
|
|
1473
|
+
mutedInfo: palette$7.ultramarineBlueLight20,
|
|
1474
|
+
infoSurface: palette$7.blueOblivion,
|
|
1475
|
+
onInfoSurface: palette$7.pastelBlue,
|
|
1476
|
+
archived: palette$7.sonicSilverDark10,
|
|
1477
|
+
mutedArchived: palette$7.sonicSilverLight50,
|
|
1478
|
+
archivedSurface: palette$7.bigStone,
|
|
1479
|
+
onArchivedSurface: palette$7.flagstone
|
|
1438
1480
|
// End of Updated 21 / Nov / 22
|
|
1439
1481
|
};
|
|
1440
1482
|
|
|
@@ -2247,7 +2289,8 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
2247
2289
|
actionItemPressedBackground: theme.colors.pressedSurface,
|
|
2248
2290
|
backdropBackground: theme.colors.overlayGlobalSurface,
|
|
2249
2291
|
titleText: theme.colors.onPrimary,
|
|
2250
|
-
actionItemText: theme.colors.onPrimary
|
|
2292
|
+
actionItemText: theme.colors.onPrimary,
|
|
2293
|
+
shadow: theme.colors.primaryOutline
|
|
2251
2294
|
};
|
|
2252
2295
|
var sizes = {
|
|
2253
2296
|
width: theme.sizes.xxxxxlarge,
|
|
@@ -2269,6 +2312,15 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
2269
2312
|
title: theme.lineHeights.large,
|
|
2270
2313
|
icon: theme.lineHeights.large
|
|
2271
2314
|
};
|
|
2315
|
+
var shadows = {
|
|
2316
|
+
offset: {
|
|
2317
|
+
width: 0,
|
|
2318
|
+
height: 2
|
|
2319
|
+
},
|
|
2320
|
+
opacity: 0.12,
|
|
2321
|
+
radius: theme.radii.medium,
|
|
2322
|
+
elevation: 2
|
|
2323
|
+
};
|
|
2272
2324
|
var space = {
|
|
2273
2325
|
actionItemPaddingLeft: theme.space.medium,
|
|
2274
2326
|
actionItemPaddingRight: theme.space.medium,
|
|
@@ -2295,6 +2347,7 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
2295
2347
|
colors: colors,
|
|
2296
2348
|
sizes: sizes,
|
|
2297
2349
|
lineHeights: lineHeights,
|
|
2350
|
+
shadows: shadows,
|
|
2298
2351
|
space: space
|
|
2299
2352
|
};
|
|
2300
2353
|
};
|
|
@@ -11018,6 +11071,7 @@ var StyledCarouselHeading = index$a(Typography.Text)(function (_ref2) {
|
|
|
11018
11071
|
});
|
|
11019
11072
|
var StyledCarouselImage = index$a(Image)(function () {
|
|
11020
11073
|
return {
|
|
11074
|
+
flexGrow: 2,
|
|
11021
11075
|
flex: 1,
|
|
11022
11076
|
width: '100%',
|
|
11023
11077
|
resizeMode: 'contain'
|
|
@@ -11038,8 +11092,7 @@ var StyledCustomSizeCarouselImage = index$a(Image)(function (_ref3) {
|
|
|
11038
11092
|
var StyledCarouselContentWrapper = index$a(Box)(function (_ref4) {
|
|
11039
11093
|
var width = _ref4.width;
|
|
11040
11094
|
return {
|
|
11041
|
-
width: width
|
|
11042
|
-
minHeight: scale(250)
|
|
11095
|
+
width: width
|
|
11043
11096
|
};
|
|
11044
11097
|
});
|
|
11045
11098
|
var StyledCarouselFooterWrapper = index$a(reactNative.View)(function (_ref5) {
|
|
@@ -11368,7 +11421,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
11368
11421
|
pageControlPosition = _ref$pageControlPosit === void 0 ? 'bottom' : _ref$pageControlPosit,
|
|
11369
11422
|
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
11370
11423
|
useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
|
|
11371
|
-
useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition
|
|
11424
|
+
useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
|
|
11372
11425
|
var carouselRef = React.useRef(null);
|
|
11373
11426
|
var _useStateFromProp = useStateFromProp(selectedItemIndex),
|
|
11374
11427
|
_useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
|
|
@@ -12733,7 +12786,7 @@ var Error$1 = function Error(_ref2) {
|
|
|
12733
12786
|
}, nativeProps));
|
|
12734
12787
|
};
|
|
12735
12788
|
|
|
12736
|
-
var
|
|
12789
|
+
var StyledFAB$1 = index$a(reactNative.TouchableHighlight)(function (_ref) {
|
|
12737
12790
|
var theme = _ref.theme;
|
|
12738
12791
|
return {
|
|
12739
12792
|
backgroundColor: theme.__hd__.fab.colors.buttonBackground,
|
|
@@ -12744,7 +12797,8 @@ var StyledFABContainer = index$a(reactNative.TouchableHighlight)(function (_ref)
|
|
|
12744
12797
|
alignSelf: 'flex-start',
|
|
12745
12798
|
paddingHorizontal: theme.__hd__.fab.space.containerPaddingHorizontal,
|
|
12746
12799
|
paddingVertical: theme.__hd__.fab.space.containerPaddingVertical,
|
|
12747
|
-
flexDirection: 'row'
|
|
12800
|
+
flexDirection: 'row',
|
|
12801
|
+
elevation: theme.__hd__.fab.shadows.elevation
|
|
12748
12802
|
};
|
|
12749
12803
|
});
|
|
12750
12804
|
var StyledFABIcon = index$a(Icon)(function (_ref2) {
|
|
@@ -12768,6 +12822,15 @@ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
|
|
|
12768
12822
|
marginHorizontal: theme.__hd__.fab.space.titleMarginHorizontal
|
|
12769
12823
|
};
|
|
12770
12824
|
});
|
|
12825
|
+
var StyledFABContainer = index$a(Box)(function (_ref4) {
|
|
12826
|
+
var theme = _ref4.theme;
|
|
12827
|
+
return {
|
|
12828
|
+
shadowColor: theme.__hd__.fab.colors.shadow,
|
|
12829
|
+
shadowOffset: theme.__hd__.fab.shadows.offset,
|
|
12830
|
+
shadowRadius: theme.__hd__.fab.shadows.radius,
|
|
12831
|
+
shadowOpacity: theme.__hd__.fab.shadows.opacity
|
|
12832
|
+
};
|
|
12833
|
+
});
|
|
12771
12834
|
|
|
12772
12835
|
var _excluded$a = ["active"];
|
|
12773
12836
|
var AnimatedIcons = reactNative.Animated.createAnimatedComponent(StyledFABIcon);
|
|
@@ -12834,9 +12897,10 @@ var FAB = function FAB(_ref3) {
|
|
|
12834
12897
|
var isIconOnly = !title;
|
|
12835
12898
|
var theme = useTheme();
|
|
12836
12899
|
return /*#__PURE__*/React__default["default"].createElement(StyledFABContainer, {
|
|
12837
|
-
underlayColor: theme.__hd__.fab.colors.buttonPressedBackground,
|
|
12838
|
-
testID: testID,
|
|
12839
12900
|
style: style,
|
|
12901
|
+
testID: testID
|
|
12902
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledFAB$1, {
|
|
12903
|
+
underlayColor: theme.__hd__.fab.colors.buttonPressedBackground,
|
|
12840
12904
|
onPress: onPress
|
|
12841
12905
|
}, isIconOnly ? /*#__PURE__*/React__default["default"].createElement(IconOnlyContent, {
|
|
12842
12906
|
animated: animated,
|
|
@@ -12845,7 +12909,7 @@ var FAB = function FAB(_ref3) {
|
|
|
12845
12909
|
}) : /*#__PURE__*/React__default["default"].createElement(IconWithTextContent, {
|
|
12846
12910
|
icon: icon,
|
|
12847
12911
|
title: title
|
|
12848
|
-
}));
|
|
12912
|
+
})));
|
|
12849
12913
|
};
|
|
12850
12914
|
|
|
12851
12915
|
var StyledActionItem = index$a(reactNative.TouchableHighlight)(function (_ref) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.22.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@emotion/native": "^11.9.3",
|
|
23
23
|
"@emotion/react": "^11.9.3",
|
|
24
|
-
"@hero-design/colors": "8.
|
|
24
|
+
"@hero-design/colors": "8.22.0",
|
|
25
25
|
"date-fns": "^2.16.1",
|
|
26
26
|
"events": "^3.2.0",
|
|
27
27
|
"hero-editor": "^1.9.21"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@babel/preset-typescript": "^7.17.12",
|
|
46
46
|
"@babel/runtime": "^7.18.9",
|
|
47
47
|
"@emotion/jest": "^11.9.3",
|
|
48
|
-
"@hero-design/eslint-plugin": "8.
|
|
48
|
+
"@hero-design/eslint-plugin": "8.22.0",
|
|
49
49
|
"@react-native-community/datetimepicker": "^3.5.2",
|
|
50
50
|
"@react-native-community/slider": "4.1.12",
|
|
51
51
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@types/react-native": "^0.67.7",
|
|
62
62
|
"@types/react-native-vector-icons": "^6.4.10",
|
|
63
63
|
"babel-plugin-inline-import": "^3.0.0",
|
|
64
|
-
"eslint-config-hd": "8.
|
|
64
|
+
"eslint-config-hd": "8.22.0",
|
|
65
65
|
"jest": "^27.3.1",
|
|
66
|
-
"prettier-config-hd": "8.
|
|
66
|
+
"prettier-config-hd": "8.22.0",
|
|
67
67
|
"react": "18.0.0",
|
|
68
68
|
"react-native": "0.69.7",
|
|
69
69
|
"react-native-gesture-handler": "~2.1.0",
|
|
@@ -3,7 +3,6 @@ import styled from '@emotion/native';
|
|
|
3
3
|
import Typography from '../Typography';
|
|
4
4
|
import Image from '../Image';
|
|
5
5
|
import Box from '../Box';
|
|
6
|
-
import { scale } from '../../utils/scale';
|
|
7
6
|
import PageControl from '../PageControl';
|
|
8
7
|
|
|
9
8
|
const StyledBackDrop = styled(View)<{
|
|
@@ -31,6 +30,7 @@ const StyledCarouselHeading = styled(Typography.Text)(({ theme }) => ({
|
|
|
31
30
|
}));
|
|
32
31
|
|
|
33
32
|
const StyledCarouselImage = styled(Image)(() => ({
|
|
33
|
+
flexGrow: 2,
|
|
34
34
|
flex: 1,
|
|
35
35
|
width: '100%',
|
|
36
36
|
resizeMode: 'contain',
|
|
@@ -51,7 +51,6 @@ const StyledCarouselContentWrapper = styled(Box)<{
|
|
|
51
51
|
width: number;
|
|
52
52
|
}>(({ width }) => ({
|
|
53
53
|
width,
|
|
54
|
-
minHeight: scale(250),
|
|
55
54
|
}));
|
|
56
55
|
|
|
57
56
|
const StyledCarouselFooterWrapper = styled(View)(({ theme }) => ({
|