@hero-design/rn-work-uikit 1.13.9 → 1.13.10
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/CHANGELOG.md +7 -0
- package/CLAUDE.md +1 -1
- package/es/index.js +66 -50
- package/lib/index.js +66 -50
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @hero-design/rn-work-uikit
|
|
2
2
|
|
|
3
|
+
## 1.13.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`8a8a649b3d2ad1fa030be516afb94841ac4d7fa9`](https://github.com/Thinkei/hero-design/commit/8a8a649b3d2ad1fa030be516afb94841ac4d7fa9), [`850eafeaec709444144e6cbe3cc15d53653c2088`](https://github.com/Thinkei/hero-design/commit/850eafeaec709444144e6cbe3cc15d53653c2088), [`16e0cb317529452f5a10523c10b60f66fcba6ee4`](https://github.com/Thinkei/hero-design/commit/16e0cb317529452f5a10523c10b60f66fcba6ee4)]:
|
|
8
|
+
- @hero-design/rn@8.128.1
|
|
9
|
+
|
|
3
10
|
## 1.13.9
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/CLAUDE.md
CHANGED
|
@@ -28,7 +28,7 @@ Work-specific React Native component library extending `@hero-design/rn` with wo
|
|
|
28
28
|
## Commands
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
yarn turbo run test --filter=@hero-design/rn-work-uikit --
|
|
31
|
+
yarn turbo run test --filter=@hero-design/rn-work-uikit -- ComponentName [--watch|--updateSnapshot]
|
|
32
32
|
yarn workspace @hero-design/rn-work-uikit lint
|
|
33
33
|
yarn workspace @hero-design/rn-work-uikit type-check
|
|
34
34
|
```
|
package/es/index.js
CHANGED
|
@@ -5283,7 +5283,7 @@ var swagLightGlobalPalette = _objectSpread2(_objectSpread2({}, globalPalette$1),
|
|
|
5283
5283
|
});
|
|
5284
5284
|
|
|
5285
5285
|
var ehWorkBrandSystemPalette = {
|
|
5286
|
-
primary: '#
|
|
5286
|
+
primary: '#7622d7',
|
|
5287
5287
|
onPrimary: '#fdfbff',
|
|
5288
5288
|
secondary: '#b382fd',
|
|
5289
5289
|
onSecondary: palette$4.white,
|
|
@@ -5312,6 +5312,7 @@ var swagSystemPalette = _objectSpread2(_objectSpread2({}, ehWorkSystemPalette),
|
|
|
5312
5312
|
|
|
5313
5313
|
var ehJobsSystemPalette = _objectSpread2(_objectSpread2({}, swagSystemPalette), {}, {
|
|
5314
5314
|
name: 'ehJobs',
|
|
5315
|
+
primary: '#7622d7',
|
|
5315
5316
|
secondary: '#40d1ff',
|
|
5316
5317
|
onSecondary: '#460078',
|
|
5317
5318
|
secondaryHighlightedSurface: '#ecfaff',
|
|
@@ -6684,19 +6685,19 @@ var getErrorTheme = function getErrorTheme(theme) {
|
|
|
6684
6685
|
|
|
6685
6686
|
var getFABTheme = function getFABTheme(theme) {
|
|
6686
6687
|
var colors = {
|
|
6687
|
-
buttonBackground: theme.colors.
|
|
6688
|
-
buttonPressedBackground: theme.colors.
|
|
6689
|
-
buttonActiveBackground: theme.colors.
|
|
6688
|
+
buttonBackground: theme.colors.primary,
|
|
6689
|
+
buttonPressedBackground: theme.colors.primary,
|
|
6690
|
+
buttonActiveBackground: theme.colors.primary,
|
|
6690
6691
|
icon: theme.colors.onDarkGlobalSurface,
|
|
6691
|
-
actionItemBackground: theme.colors.
|
|
6692
|
-
actionItemPressedBackground: theme.colors.
|
|
6692
|
+
actionItemBackground: theme.colors.defaultGlobalSurface,
|
|
6693
|
+
actionItemPressedBackground: theme.colors.defaultGlobalSurface,
|
|
6693
6694
|
backdropBackground: theme.colors.black,
|
|
6694
6695
|
titleText: theme.colors.onDarkGlobalSurface,
|
|
6695
|
-
actionItemText: theme.colors.
|
|
6696
|
+
actionItemText: theme.colors.onDefaultGlobalSurface
|
|
6696
6697
|
};
|
|
6697
6698
|
var sizes = {
|
|
6698
|
-
width: theme.sizes.
|
|
6699
|
-
height: theme.sizes.
|
|
6699
|
+
width: theme.sizes.xxxlarge,
|
|
6700
|
+
height: theme.sizes.xxxlarge,
|
|
6700
6701
|
iconContainerWidth: theme.sizes.large,
|
|
6701
6702
|
iconContainerHeight: theme.sizes.large,
|
|
6702
6703
|
fabPairHeight: theme.sizes.xxxlarge,
|
|
@@ -6704,11 +6705,11 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
6704
6705
|
};
|
|
6705
6706
|
var fonts = {
|
|
6706
6707
|
actionItemText: theme.fonts.neutral.regular,
|
|
6707
|
-
title: theme.fonts.neutral.
|
|
6708
|
+
title: theme.fonts.neutral.regular
|
|
6708
6709
|
};
|
|
6709
6710
|
var fontSizes = {
|
|
6710
6711
|
actionItemText: theme.fontSizes.large,
|
|
6711
|
-
title: theme.fontSizes.
|
|
6712
|
+
title: theme.fontSizes.medium
|
|
6712
6713
|
};
|
|
6713
6714
|
var lineHeights = {
|
|
6714
6715
|
actionItemText: theme.lineHeights.medium,
|
|
@@ -6725,7 +6726,7 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
6725
6726
|
actionItemTextPaddingLeft: theme.space.xsmall,
|
|
6726
6727
|
buttonMarginTop: theme.space.large,
|
|
6727
6728
|
buttonMarginRight: theme.space.large,
|
|
6728
|
-
containerPadding: theme.space.
|
|
6729
|
+
containerPadding: theme.space.smallMedium,
|
|
6729
6730
|
titleMarginHorizontal: theme.space.small,
|
|
6730
6731
|
fabPairMarginRight: theme.space.small
|
|
6731
6732
|
};
|
|
@@ -24856,21 +24857,14 @@ var StyledErrorButtonContainer = index$c(View)(function (_ref3) {
|
|
|
24856
24857
|
paddingVertical: theme.__hd__.error.space.button.wrapperVerticalPadding
|
|
24857
24858
|
};
|
|
24858
24859
|
});
|
|
24859
|
-
var
|
|
24860
|
+
var StyledErrorButtonSecondary = index$c(CompoundButton)(function (_ref4) {
|
|
24860
24861
|
var theme = _ref4.theme;
|
|
24861
24862
|
return {
|
|
24862
|
-
|
|
24863
|
+
marginTop: theme.__hd__.error.space.button.margin
|
|
24863
24864
|
};
|
|
24864
24865
|
});
|
|
24865
|
-
var
|
|
24866
|
+
var StyledErrorImageContainer = index$c(View)(function (_ref5) {
|
|
24866
24867
|
var theme = _ref5.theme;
|
|
24867
|
-
return {
|
|
24868
|
-
marginTop: theme.__hd__.error.space.button.margin,
|
|
24869
|
-
padding: theme.__hd__.error.space.button.padding
|
|
24870
|
-
};
|
|
24871
|
-
});
|
|
24872
|
-
var StyledErrorImageContainer = index$c(View)(function (_ref6) {
|
|
24873
|
-
var theme = _ref6.theme;
|
|
24874
24868
|
return {
|
|
24875
24869
|
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
24876
24870
|
width: theme.__hd__.error.sizes.image,
|
|
@@ -24878,8 +24872,8 @@ var StyledErrorImageContainer = index$c(View)(function (_ref6) {
|
|
|
24878
24872
|
alignItems: 'center'
|
|
24879
24873
|
};
|
|
24880
24874
|
});
|
|
24881
|
-
var StyledErrorIconContainer = index$c(View)(function (
|
|
24882
|
-
var theme =
|
|
24875
|
+
var StyledErrorIconContainer = index$c(View)(function (_ref6) {
|
|
24876
|
+
var theme = _ref6.theme;
|
|
24883
24877
|
return {
|
|
24884
24878
|
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
24885
24879
|
width: theme.__hd__.error.sizes.icon,
|
|
@@ -24887,8 +24881,8 @@ var StyledErrorIconContainer = index$c(View)(function (_ref7) {
|
|
|
24887
24881
|
alignItems: 'center'
|
|
24888
24882
|
};
|
|
24889
24883
|
});
|
|
24890
|
-
var StyledErrorImage = index$c(Image)(function (
|
|
24891
|
-
var theme =
|
|
24884
|
+
var StyledErrorImage = index$c(Image)(function (_ref7) {
|
|
24885
|
+
var theme = _ref7.theme;
|
|
24892
24886
|
return {
|
|
24893
24887
|
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
24894
24888
|
width: theme.__hd__.error.sizes.image,
|
|
@@ -24896,16 +24890,16 @@ var StyledErrorImage = index$c(Image)(function (_ref8) {
|
|
|
24896
24890
|
resizeMode: 'contain'
|
|
24897
24891
|
};
|
|
24898
24892
|
});
|
|
24899
|
-
var StyledErrorTitle = index$c(Typography.Title)(function (
|
|
24900
|
-
var theme =
|
|
24893
|
+
var StyledErrorTitle = index$c(Typography.Title)(function (_ref8) {
|
|
24894
|
+
var theme = _ref8.theme;
|
|
24901
24895
|
return {
|
|
24902
24896
|
textAlign: 'center',
|
|
24903
24897
|
marginBottom: theme.__hd__.error.space.titleMarginBottom,
|
|
24904
24898
|
color: theme.__hd__.error.colors.title
|
|
24905
24899
|
};
|
|
24906
24900
|
});
|
|
24907
|
-
var StyledErrorDescription = index$c(Typography.Body)(function (
|
|
24908
|
-
var theme =
|
|
24901
|
+
var StyledErrorDescription = index$c(Typography.Body)(function (_ref9) {
|
|
24902
|
+
var theme = _ref9.theme;
|
|
24909
24903
|
return {
|
|
24910
24904
|
textAlign: 'center',
|
|
24911
24905
|
color: theme.__hd__.error.colors.description
|
|
@@ -24968,7 +24962,7 @@ var ErrorPage = function ErrorPage(_ref2) {
|
|
|
24968
24962
|
typeface: "playful"
|
|
24969
24963
|
}, title), description && /*#__PURE__*/React__default.createElement(StyledErrorDescription, {
|
|
24970
24964
|
typeface: "playful"
|
|
24971
|
-
}, description)), showButtonContainer && /*#__PURE__*/React__default.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default.createElement(
|
|
24965
|
+
}, description)), showButtonContainer && /*#__PURE__*/React__default.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default.createElement(CompoundButton, {
|
|
24972
24966
|
variant: "filled",
|
|
24973
24967
|
text: ctaText,
|
|
24974
24968
|
onPress: onCtaPress
|
|
@@ -25100,8 +25094,9 @@ var StyledIcon$3 = index$c(Icon)(function (_ref3) {
|
|
|
25100
25094
|
var AnimatedTouchableHighlight = Animated.createAnimatedComponent(TouchableOpacity);
|
|
25101
25095
|
var StyledFAB$2 = index$c(AnimatedTouchableHighlight)(function (_ref) {
|
|
25102
25096
|
var theme = _ref.theme,
|
|
25103
|
-
themeActive = _ref.themeActive
|
|
25104
|
-
|
|
25097
|
+
themeActive = _ref.themeActive,
|
|
25098
|
+
themeIconOnly = _ref.themeIconOnly;
|
|
25099
|
+
return _objectSpread2(_objectSpread2({
|
|
25105
25100
|
backgroundColor: themeActive ? theme.__hd__.fab.colors.buttonActiveBackground : theme.__hd__.fab.colors.buttonBackground,
|
|
25106
25101
|
borderRadius: theme.radii.rounded,
|
|
25107
25102
|
alignItems: 'center',
|
|
@@ -25110,7 +25105,9 @@ var StyledFAB$2 = index$c(AnimatedTouchableHighlight)(function (_ref) {
|
|
|
25110
25105
|
padding: theme.__hd__.fab.space.containerPadding,
|
|
25111
25106
|
flexDirection: 'row',
|
|
25112
25107
|
height: theme.__hd__.fab.sizes.height
|
|
25113
|
-
},
|
|
25108
|
+
}, themeIconOnly && {
|
|
25109
|
+
width: theme.__hd__.fab.sizes.width
|
|
25110
|
+
}), theme.__hd__.fab.shadows["default"]);
|
|
25114
25111
|
});
|
|
25115
25112
|
var StyledFABIcon = index$c(Icon)(function (_ref2) {
|
|
25116
25113
|
var theme = _ref2.theme;
|
|
@@ -25218,6 +25215,9 @@ if (Platform.OS === 'android') {
|
|
|
25218
25215
|
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
25219
25216
|
}
|
|
25220
25217
|
}
|
|
25218
|
+
|
|
25219
|
+
// Extends FABProps with internal-only props. Not part of the public API.
|
|
25220
|
+
|
|
25221
25221
|
var IconOnlyContent = function IconOnlyContent(_ref) {
|
|
25222
25222
|
var icon = _ref.icon,
|
|
25223
25223
|
animated = _ref.animated,
|
|
@@ -25238,12 +25238,15 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
|
|
|
25238
25238
|
};
|
|
25239
25239
|
var IconWithTextContent = function IconWithTextContent(_ref2) {
|
|
25240
25240
|
var icon = _ref2.icon,
|
|
25241
|
-
title = _ref2.title
|
|
25241
|
+
title = _ref2.title,
|
|
25242
|
+
titleStyle = _ref2.titleStyle;
|
|
25242
25243
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__default.createElement(StyledFABIcon, {
|
|
25243
25244
|
size: "xsmall",
|
|
25244
25245
|
icon: icon,
|
|
25245
25246
|
testID: "styled-fab-icon"
|
|
25246
|
-
})), /*#__PURE__*/React__default.createElement(StyledFABText,
|
|
25247
|
+
})), /*#__PURE__*/React__default.createElement(StyledFABText, {
|
|
25248
|
+
style: titleStyle
|
|
25249
|
+
}, title));
|
|
25247
25250
|
};
|
|
25248
25251
|
var animateWidth = function animateWidth() {
|
|
25249
25252
|
LayoutAnimation.configureNext({
|
|
@@ -25254,7 +25257,10 @@ var animateWidth = function animateWidth() {
|
|
|
25254
25257
|
}
|
|
25255
25258
|
});
|
|
25256
25259
|
};
|
|
25257
|
-
|
|
25260
|
+
|
|
25261
|
+
// Full implementation — accepts InternalFABProps including titleStyle.
|
|
25262
|
+
// Exported as FABInternal for use by sibling HD components (e.g. FAB.Pair).
|
|
25263
|
+
var FABWithTitleStyle = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
25258
25264
|
var _StyleSheet$flatten, _StyleSheet$flatten2;
|
|
25259
25265
|
var onPress = _ref3.onPress,
|
|
25260
25266
|
title = _ref3.title,
|
|
@@ -25262,7 +25268,8 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
25262
25268
|
iconAnimated = _ref3.animated,
|
|
25263
25269
|
testID = _ref3.testID,
|
|
25264
25270
|
active = _ref3.active,
|
|
25265
|
-
style = _ref3.style
|
|
25271
|
+
style = _ref3.style,
|
|
25272
|
+
titleStyle = _ref3.titleStyle;
|
|
25266
25273
|
var theme = useTheme();
|
|
25267
25274
|
var _React$useState = React__default.useState({
|
|
25268
25275
|
hideTitle: false,
|
|
@@ -25367,6 +25374,7 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
25367
25374
|
},
|
|
25368
25375
|
activeOpacity: 0.8,
|
|
25369
25376
|
onPress: onPress,
|
|
25377
|
+
themeIconOnly: isIconOnly,
|
|
25370
25378
|
style: [style, {
|
|
25371
25379
|
bottom: displayState.hideButton ? -(marginBottom + theme.__hd__.fab.sizes.height * 2) : (_StyleSheet$flatten2 = StyleSheet$1.flatten(style)) === null || _StyleSheet$flatten2 === void 0 ? void 0 : _StyleSheet$flatten2.bottom,
|
|
25372
25380
|
transform: [{
|
|
@@ -25392,9 +25400,19 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
25392
25400
|
icon: active ? 'add' : icon
|
|
25393
25401
|
}) : /*#__PURE__*/React__default.createElement(IconWithTextContent, {
|
|
25394
25402
|
icon: icon,
|
|
25395
|
-
title: title
|
|
25403
|
+
title: title,
|
|
25404
|
+
titleStyle: titleStyle
|
|
25396
25405
|
})));
|
|
25397
25406
|
});
|
|
25407
|
+
FABWithTitleStyle.displayName = 'FAB';
|
|
25408
|
+
|
|
25409
|
+
// Public export — clean FABProps, no internal props exposed.
|
|
25410
|
+
// Docgen reads this component and sees only FABProps.
|
|
25411
|
+
var FAB$1 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
25412
|
+
return /*#__PURE__*/React__default.createElement(FABWithTitleStyle, _extends$1({}, props, {
|
|
25413
|
+
ref: ref
|
|
25414
|
+
}));
|
|
25415
|
+
});
|
|
25398
25416
|
FAB$1.displayName = 'FAB';
|
|
25399
25417
|
|
|
25400
25418
|
var StyledContainer$6 = index$c(View)({
|
|
@@ -25563,7 +25581,7 @@ var StyledFABPairWrapper = index$c(Box)({
|
|
|
25563
25581
|
justifyContent: 'center',
|
|
25564
25582
|
alignItems: 'center'
|
|
25565
25583
|
});
|
|
25566
|
-
var StyledFAB = index$c(
|
|
25584
|
+
var StyledFAB = index$c(FABWithTitleStyle)(function (_ref) {
|
|
25567
25585
|
var theme = _ref.theme,
|
|
25568
25586
|
_ref$iconOnly = _ref.iconOnly,
|
|
25569
25587
|
iconOnly = _ref$iconOnly === void 0 ? false : _ref$iconOnly,
|
|
@@ -25585,6 +25603,7 @@ var Pair = function Pair(_ref) {
|
|
|
25585
25603
|
title = fabConfig.title,
|
|
25586
25604
|
onPress = fabConfig.onPress,
|
|
25587
25605
|
testID = fabConfig.testID;
|
|
25606
|
+
var theme = useTheme();
|
|
25588
25607
|
return /*#__PURE__*/React__default.createElement(StyledFABPairWrapper, props, /*#__PURE__*/React__default.createElement(StyledFAB, {
|
|
25589
25608
|
icon: "cancel",
|
|
25590
25609
|
onPress: onCancel,
|
|
@@ -25596,7 +25615,11 @@ var Pair = function Pair(_ref) {
|
|
|
25596
25615
|
onPress: onPress,
|
|
25597
25616
|
testID: testID,
|
|
25598
25617
|
iconOnly: !title,
|
|
25599
|
-
isLast: true
|
|
25618
|
+
isLast: true,
|
|
25619
|
+
titleStyle: {
|
|
25620
|
+
fontSize: theme.fontSizes.medium,
|
|
25621
|
+
fontFamily: theme.fonts.neutral.regular
|
|
25622
|
+
}
|
|
25600
25623
|
}));
|
|
25601
25624
|
};
|
|
25602
25625
|
|
|
@@ -27862,16 +27885,9 @@ var StyledSuccessButtonContainer = index$c(View)(function (_ref8) {
|
|
|
27862
27885
|
paddingVertical: theme.__hd__.success.space.button.wrapperVerticalPadding
|
|
27863
27886
|
};
|
|
27864
27887
|
});
|
|
27865
|
-
var
|
|
27888
|
+
var StyledSuccessButtonSecondary = index$c(CompoundButton)(function (_ref9) {
|
|
27866
27889
|
var theme = _ref9.theme;
|
|
27867
27890
|
return {
|
|
27868
|
-
padding: theme.__hd__.success.space.button.padding
|
|
27869
|
-
};
|
|
27870
|
-
});
|
|
27871
|
-
var StyledSuccessButtonSecondary = index$c(CompoundButton)(function (_ref10) {
|
|
27872
|
-
var theme = _ref10.theme;
|
|
27873
|
-
return {
|
|
27874
|
-
padding: theme.__hd__.success.space.button.padding,
|
|
27875
27891
|
marginTop: theme.__hd__.success.space.button.secondaryCTAMarginTop
|
|
27876
27892
|
};
|
|
27877
27893
|
});
|
|
@@ -27932,7 +27948,7 @@ var SuccessPage = function SuccessPage(_ref2) {
|
|
|
27932
27948
|
}), /*#__PURE__*/React__default.createElement(StyledSuccessTitle, {
|
|
27933
27949
|
level: "h4",
|
|
27934
27950
|
typeface: "playful"
|
|
27935
|
-
}, title), typeof description === 'string' ? /*#__PURE__*/React__default.createElement(StyledSuccessDescription, null, description) : description), !!ctaText && /*#__PURE__*/React__default.createElement(StyledSuccessButtonContainer, null, /*#__PURE__*/React__default.createElement(
|
|
27951
|
+
}, title), typeof description === 'string' ? /*#__PURE__*/React__default.createElement(StyledSuccessDescription, null, description) : description), !!ctaText && /*#__PURE__*/React__default.createElement(StyledSuccessButtonContainer, null, /*#__PURE__*/React__default.createElement(CompoundButton, {
|
|
27936
27952
|
text: ctaText,
|
|
27937
27953
|
onPress: onCtaPress
|
|
27938
27954
|
}), !!showSecondaryButton && /*#__PURE__*/React__default.createElement(StyledSuccessButtonSecondary, {
|
package/lib/index.js
CHANGED
|
@@ -5313,7 +5313,7 @@ var swagLightGlobalPalette = _objectSpread2(_objectSpread2({}, globalPalette$1),
|
|
|
5313
5313
|
});
|
|
5314
5314
|
|
|
5315
5315
|
var ehWorkBrandSystemPalette = {
|
|
5316
|
-
primary: '#
|
|
5316
|
+
primary: '#7622d7',
|
|
5317
5317
|
onPrimary: '#fdfbff',
|
|
5318
5318
|
secondary: '#b382fd',
|
|
5319
5319
|
onSecondary: palette$4.white,
|
|
@@ -5342,6 +5342,7 @@ var swagSystemPalette = _objectSpread2(_objectSpread2({}, ehWorkSystemPalette),
|
|
|
5342
5342
|
|
|
5343
5343
|
var ehJobsSystemPalette = _objectSpread2(_objectSpread2({}, swagSystemPalette), {}, {
|
|
5344
5344
|
name: 'ehJobs',
|
|
5345
|
+
primary: '#7622d7',
|
|
5345
5346
|
secondary: '#40d1ff',
|
|
5346
5347
|
onSecondary: '#460078',
|
|
5347
5348
|
secondaryHighlightedSurface: '#ecfaff',
|
|
@@ -6714,19 +6715,19 @@ var getErrorTheme = function getErrorTheme(theme) {
|
|
|
6714
6715
|
|
|
6715
6716
|
var getFABTheme = function getFABTheme(theme) {
|
|
6716
6717
|
var colors = {
|
|
6717
|
-
buttonBackground: theme.colors.
|
|
6718
|
-
buttonPressedBackground: theme.colors.
|
|
6719
|
-
buttonActiveBackground: theme.colors.
|
|
6718
|
+
buttonBackground: theme.colors.primary,
|
|
6719
|
+
buttonPressedBackground: theme.colors.primary,
|
|
6720
|
+
buttonActiveBackground: theme.colors.primary,
|
|
6720
6721
|
icon: theme.colors.onDarkGlobalSurface,
|
|
6721
|
-
actionItemBackground: theme.colors.
|
|
6722
|
-
actionItemPressedBackground: theme.colors.
|
|
6722
|
+
actionItemBackground: theme.colors.defaultGlobalSurface,
|
|
6723
|
+
actionItemPressedBackground: theme.colors.defaultGlobalSurface,
|
|
6723
6724
|
backdropBackground: theme.colors.black,
|
|
6724
6725
|
titleText: theme.colors.onDarkGlobalSurface,
|
|
6725
|
-
actionItemText: theme.colors.
|
|
6726
|
+
actionItemText: theme.colors.onDefaultGlobalSurface
|
|
6726
6727
|
};
|
|
6727
6728
|
var sizes = {
|
|
6728
|
-
width: theme.sizes.
|
|
6729
|
-
height: theme.sizes.
|
|
6729
|
+
width: theme.sizes.xxxlarge,
|
|
6730
|
+
height: theme.sizes.xxxlarge,
|
|
6730
6731
|
iconContainerWidth: theme.sizes.large,
|
|
6731
6732
|
iconContainerHeight: theme.sizes.large,
|
|
6732
6733
|
fabPairHeight: theme.sizes.xxxlarge,
|
|
@@ -6734,11 +6735,11 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
6734
6735
|
};
|
|
6735
6736
|
var fonts = {
|
|
6736
6737
|
actionItemText: theme.fonts.neutral.regular,
|
|
6737
|
-
title: theme.fonts.neutral.
|
|
6738
|
+
title: theme.fonts.neutral.regular
|
|
6738
6739
|
};
|
|
6739
6740
|
var fontSizes = {
|
|
6740
6741
|
actionItemText: theme.fontSizes.large,
|
|
6741
|
-
title: theme.fontSizes.
|
|
6742
|
+
title: theme.fontSizes.medium
|
|
6742
6743
|
};
|
|
6743
6744
|
var lineHeights = {
|
|
6744
6745
|
actionItemText: theme.lineHeights.medium,
|
|
@@ -6755,7 +6756,7 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
6755
6756
|
actionItemTextPaddingLeft: theme.space.xsmall,
|
|
6756
6757
|
buttonMarginTop: theme.space.large,
|
|
6757
6758
|
buttonMarginRight: theme.space.large,
|
|
6758
|
-
containerPadding: theme.space.
|
|
6759
|
+
containerPadding: theme.space.smallMedium,
|
|
6759
6760
|
titleMarginHorizontal: theme.space.small,
|
|
6760
6761
|
fabPairMarginRight: theme.space.small
|
|
6761
6762
|
};
|
|
@@ -24886,21 +24887,14 @@ var StyledErrorButtonContainer = index$c(reactNative.View)(function (_ref3) {
|
|
|
24886
24887
|
paddingVertical: theme.__hd__.error.space.button.wrapperVerticalPadding
|
|
24887
24888
|
};
|
|
24888
24889
|
});
|
|
24889
|
-
var
|
|
24890
|
+
var StyledErrorButtonSecondary = index$c(CompoundButton)(function (_ref4) {
|
|
24890
24891
|
var theme = _ref4.theme;
|
|
24891
24892
|
return {
|
|
24892
|
-
|
|
24893
|
+
marginTop: theme.__hd__.error.space.button.margin
|
|
24893
24894
|
};
|
|
24894
24895
|
});
|
|
24895
|
-
var
|
|
24896
|
+
var StyledErrorImageContainer = index$c(reactNative.View)(function (_ref5) {
|
|
24896
24897
|
var theme = _ref5.theme;
|
|
24897
|
-
return {
|
|
24898
|
-
marginTop: theme.__hd__.error.space.button.margin,
|
|
24899
|
-
padding: theme.__hd__.error.space.button.padding
|
|
24900
|
-
};
|
|
24901
|
-
});
|
|
24902
|
-
var StyledErrorImageContainer = index$c(reactNative.View)(function (_ref6) {
|
|
24903
|
-
var theme = _ref6.theme;
|
|
24904
24898
|
return {
|
|
24905
24899
|
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
24906
24900
|
width: theme.__hd__.error.sizes.image,
|
|
@@ -24908,8 +24902,8 @@ var StyledErrorImageContainer = index$c(reactNative.View)(function (_ref6) {
|
|
|
24908
24902
|
alignItems: 'center'
|
|
24909
24903
|
};
|
|
24910
24904
|
});
|
|
24911
|
-
var StyledErrorIconContainer = index$c(reactNative.View)(function (
|
|
24912
|
-
var theme =
|
|
24905
|
+
var StyledErrorIconContainer = index$c(reactNative.View)(function (_ref6) {
|
|
24906
|
+
var theme = _ref6.theme;
|
|
24913
24907
|
return {
|
|
24914
24908
|
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
24915
24909
|
width: theme.__hd__.error.sizes.icon,
|
|
@@ -24917,8 +24911,8 @@ var StyledErrorIconContainer = index$c(reactNative.View)(function (_ref7) {
|
|
|
24917
24911
|
alignItems: 'center'
|
|
24918
24912
|
};
|
|
24919
24913
|
});
|
|
24920
|
-
var StyledErrorImage = index$c(Image)(function (
|
|
24921
|
-
var theme =
|
|
24914
|
+
var StyledErrorImage = index$c(Image)(function (_ref7) {
|
|
24915
|
+
var theme = _ref7.theme;
|
|
24922
24916
|
return {
|
|
24923
24917
|
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
24924
24918
|
width: theme.__hd__.error.sizes.image,
|
|
@@ -24926,16 +24920,16 @@ var StyledErrorImage = index$c(Image)(function (_ref8) {
|
|
|
24926
24920
|
resizeMode: 'contain'
|
|
24927
24921
|
};
|
|
24928
24922
|
});
|
|
24929
|
-
var StyledErrorTitle = index$c(Typography.Title)(function (
|
|
24930
|
-
var theme =
|
|
24923
|
+
var StyledErrorTitle = index$c(Typography.Title)(function (_ref8) {
|
|
24924
|
+
var theme = _ref8.theme;
|
|
24931
24925
|
return {
|
|
24932
24926
|
textAlign: 'center',
|
|
24933
24927
|
marginBottom: theme.__hd__.error.space.titleMarginBottom,
|
|
24934
24928
|
color: theme.__hd__.error.colors.title
|
|
24935
24929
|
};
|
|
24936
24930
|
});
|
|
24937
|
-
var StyledErrorDescription = index$c(Typography.Body)(function (
|
|
24938
|
-
var theme =
|
|
24931
|
+
var StyledErrorDescription = index$c(Typography.Body)(function (_ref9) {
|
|
24932
|
+
var theme = _ref9.theme;
|
|
24939
24933
|
return {
|
|
24940
24934
|
textAlign: 'center',
|
|
24941
24935
|
color: theme.__hd__.error.colors.description
|
|
@@ -24998,7 +24992,7 @@ var ErrorPage = function ErrorPage(_ref2) {
|
|
|
24998
24992
|
typeface: "playful"
|
|
24999
24993
|
}, title), description && /*#__PURE__*/React__namespace.default.createElement(StyledErrorDescription, {
|
|
25000
24994
|
typeface: "playful"
|
|
25001
|
-
}, description)), showButtonContainer && /*#__PURE__*/React__namespace.default.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__namespace.default.createElement(
|
|
24995
|
+
}, description)), showButtonContainer && /*#__PURE__*/React__namespace.default.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__namespace.default.createElement(CompoundButton, {
|
|
25002
24996
|
variant: "filled",
|
|
25003
24997
|
text: ctaText,
|
|
25004
24998
|
onPress: onCtaPress
|
|
@@ -25130,8 +25124,9 @@ var StyledIcon$3 = index$c(Icon)(function (_ref3) {
|
|
|
25130
25124
|
var AnimatedTouchableHighlight = reactNative.Animated.createAnimatedComponent(reactNative.TouchableOpacity);
|
|
25131
25125
|
var StyledFAB$2 = index$c(AnimatedTouchableHighlight)(function (_ref) {
|
|
25132
25126
|
var theme = _ref.theme,
|
|
25133
|
-
themeActive = _ref.themeActive
|
|
25134
|
-
|
|
25127
|
+
themeActive = _ref.themeActive,
|
|
25128
|
+
themeIconOnly = _ref.themeIconOnly;
|
|
25129
|
+
return _objectSpread2(_objectSpread2({
|
|
25135
25130
|
backgroundColor: themeActive ? theme.__hd__.fab.colors.buttonActiveBackground : theme.__hd__.fab.colors.buttonBackground,
|
|
25136
25131
|
borderRadius: theme.radii.rounded,
|
|
25137
25132
|
alignItems: 'center',
|
|
@@ -25140,7 +25135,9 @@ var StyledFAB$2 = index$c(AnimatedTouchableHighlight)(function (_ref) {
|
|
|
25140
25135
|
padding: theme.__hd__.fab.space.containerPadding,
|
|
25141
25136
|
flexDirection: 'row',
|
|
25142
25137
|
height: theme.__hd__.fab.sizes.height
|
|
25143
|
-
},
|
|
25138
|
+
}, themeIconOnly && {
|
|
25139
|
+
width: theme.__hd__.fab.sizes.width
|
|
25140
|
+
}), theme.__hd__.fab.shadows["default"]);
|
|
25144
25141
|
});
|
|
25145
25142
|
var StyledFABIcon = index$c(Icon)(function (_ref2) {
|
|
25146
25143
|
var theme = _ref2.theme;
|
|
@@ -25248,6 +25245,9 @@ if (reactNative.Platform.OS === 'android') {
|
|
|
25248
25245
|
reactNative.UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
25249
25246
|
}
|
|
25250
25247
|
}
|
|
25248
|
+
|
|
25249
|
+
// Extends FABProps with internal-only props. Not part of the public API.
|
|
25250
|
+
|
|
25251
25251
|
var IconOnlyContent = function IconOnlyContent(_ref) {
|
|
25252
25252
|
var icon = _ref.icon,
|
|
25253
25253
|
animated = _ref.animated,
|
|
@@ -25268,12 +25268,15 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
|
|
|
25268
25268
|
};
|
|
25269
25269
|
var IconWithTextContent = function IconWithTextContent(_ref2) {
|
|
25270
25270
|
var icon = _ref2.icon,
|
|
25271
|
-
title = _ref2.title
|
|
25271
|
+
title = _ref2.title,
|
|
25272
|
+
titleStyle = _ref2.titleStyle;
|
|
25272
25273
|
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
|
|
25273
25274
|
size: "xsmall",
|
|
25274
25275
|
icon: icon,
|
|
25275
25276
|
testID: "styled-fab-icon"
|
|
25276
|
-
})), /*#__PURE__*/React__namespace.default.createElement(StyledFABText,
|
|
25277
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledFABText, {
|
|
25278
|
+
style: titleStyle
|
|
25279
|
+
}, title));
|
|
25277
25280
|
};
|
|
25278
25281
|
var animateWidth = function animateWidth() {
|
|
25279
25282
|
reactNative.LayoutAnimation.configureNext({
|
|
@@ -25284,7 +25287,10 @@ var animateWidth = function animateWidth() {
|
|
|
25284
25287
|
}
|
|
25285
25288
|
});
|
|
25286
25289
|
};
|
|
25287
|
-
|
|
25290
|
+
|
|
25291
|
+
// Full implementation — accepts InternalFABProps including titleStyle.
|
|
25292
|
+
// Exported as FABInternal for use by sibling HD components (e.g. FAB.Pair).
|
|
25293
|
+
var FABWithTitleStyle = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
25288
25294
|
var _StyleSheet$flatten, _StyleSheet$flatten2;
|
|
25289
25295
|
var onPress = _ref3.onPress,
|
|
25290
25296
|
title = _ref3.title,
|
|
@@ -25292,7 +25298,8 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
25292
25298
|
iconAnimated = _ref3.animated,
|
|
25293
25299
|
testID = _ref3.testID,
|
|
25294
25300
|
active = _ref3.active,
|
|
25295
|
-
style = _ref3.style
|
|
25301
|
+
style = _ref3.style,
|
|
25302
|
+
titleStyle = _ref3.titleStyle;
|
|
25296
25303
|
var theme = useTheme();
|
|
25297
25304
|
var _React$useState = React__namespace.default.useState({
|
|
25298
25305
|
hideTitle: false,
|
|
@@ -25397,6 +25404,7 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
25397
25404
|
},
|
|
25398
25405
|
activeOpacity: 0.8,
|
|
25399
25406
|
onPress: onPress,
|
|
25407
|
+
themeIconOnly: isIconOnly,
|
|
25400
25408
|
style: [style, {
|
|
25401
25409
|
bottom: displayState.hideButton ? -(marginBottom + theme.__hd__.fab.sizes.height * 2) : (_StyleSheet$flatten2 = reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten2 === void 0 ? void 0 : _StyleSheet$flatten2.bottom,
|
|
25402
25410
|
transform: [{
|
|
@@ -25422,9 +25430,19 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
25422
25430
|
icon: active ? 'add' : icon
|
|
25423
25431
|
}) : /*#__PURE__*/React__namespace.default.createElement(IconWithTextContent, {
|
|
25424
25432
|
icon: icon,
|
|
25425
|
-
title: title
|
|
25433
|
+
title: title,
|
|
25434
|
+
titleStyle: titleStyle
|
|
25426
25435
|
})));
|
|
25427
25436
|
});
|
|
25437
|
+
FABWithTitleStyle.displayName = 'FAB';
|
|
25438
|
+
|
|
25439
|
+
// Public export — clean FABProps, no internal props exposed.
|
|
25440
|
+
// Docgen reads this component and sees only FABProps.
|
|
25441
|
+
var FAB$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
25442
|
+
return /*#__PURE__*/React__namespace.default.createElement(FABWithTitleStyle, _extends$1({}, props, {
|
|
25443
|
+
ref: ref
|
|
25444
|
+
}));
|
|
25445
|
+
});
|
|
25428
25446
|
FAB$1.displayName = 'FAB';
|
|
25429
25447
|
|
|
25430
25448
|
var StyledContainer$6 = index$c(reactNative.View)({
|
|
@@ -25593,7 +25611,7 @@ var StyledFABPairWrapper = index$c(Box)({
|
|
|
25593
25611
|
justifyContent: 'center',
|
|
25594
25612
|
alignItems: 'center'
|
|
25595
25613
|
});
|
|
25596
|
-
var StyledFAB = index$c(
|
|
25614
|
+
var StyledFAB = index$c(FABWithTitleStyle)(function (_ref) {
|
|
25597
25615
|
var theme = _ref.theme,
|
|
25598
25616
|
_ref$iconOnly = _ref.iconOnly,
|
|
25599
25617
|
iconOnly = _ref$iconOnly === void 0 ? false : _ref$iconOnly,
|
|
@@ -25615,6 +25633,7 @@ var Pair = function Pair(_ref) {
|
|
|
25615
25633
|
title = fabConfig.title,
|
|
25616
25634
|
onPress = fabConfig.onPress,
|
|
25617
25635
|
testID = fabConfig.testID;
|
|
25636
|
+
var theme = useTheme();
|
|
25618
25637
|
return /*#__PURE__*/React__namespace.default.createElement(StyledFABPairWrapper, props, /*#__PURE__*/React__namespace.default.createElement(StyledFAB, {
|
|
25619
25638
|
icon: "cancel",
|
|
25620
25639
|
onPress: onCancel,
|
|
@@ -25626,7 +25645,11 @@ var Pair = function Pair(_ref) {
|
|
|
25626
25645
|
onPress: onPress,
|
|
25627
25646
|
testID: testID,
|
|
25628
25647
|
iconOnly: !title,
|
|
25629
|
-
isLast: true
|
|
25648
|
+
isLast: true,
|
|
25649
|
+
titleStyle: {
|
|
25650
|
+
fontSize: theme.fontSizes.medium,
|
|
25651
|
+
fontFamily: theme.fonts.neutral.regular
|
|
25652
|
+
}
|
|
25630
25653
|
}));
|
|
25631
25654
|
};
|
|
25632
25655
|
|
|
@@ -27892,16 +27915,9 @@ var StyledSuccessButtonContainer = index$c(reactNative.View)(function (_ref8) {
|
|
|
27892
27915
|
paddingVertical: theme.__hd__.success.space.button.wrapperVerticalPadding
|
|
27893
27916
|
};
|
|
27894
27917
|
});
|
|
27895
|
-
var
|
|
27918
|
+
var StyledSuccessButtonSecondary = index$c(CompoundButton)(function (_ref9) {
|
|
27896
27919
|
var theme = _ref9.theme;
|
|
27897
27920
|
return {
|
|
27898
|
-
padding: theme.__hd__.success.space.button.padding
|
|
27899
|
-
};
|
|
27900
|
-
});
|
|
27901
|
-
var StyledSuccessButtonSecondary = index$c(CompoundButton)(function (_ref10) {
|
|
27902
|
-
var theme = _ref10.theme;
|
|
27903
|
-
return {
|
|
27904
|
-
padding: theme.__hd__.success.space.button.padding,
|
|
27905
27921
|
marginTop: theme.__hd__.success.space.button.secondaryCTAMarginTop
|
|
27906
27922
|
};
|
|
27907
27923
|
});
|
|
@@ -27962,7 +27978,7 @@ var SuccessPage = function SuccessPage(_ref2) {
|
|
|
27962
27978
|
}), /*#__PURE__*/React__namespace.default.createElement(StyledSuccessTitle, {
|
|
27963
27979
|
level: "h4",
|
|
27964
27980
|
typeface: "playful"
|
|
27965
|
-
}, title), typeof description === 'string' ? /*#__PURE__*/React__namespace.default.createElement(StyledSuccessDescription, null, description) : description), !!ctaText && /*#__PURE__*/React__namespace.default.createElement(StyledSuccessButtonContainer, null, /*#__PURE__*/React__namespace.default.createElement(
|
|
27981
|
+
}, title), typeof description === 'string' ? /*#__PURE__*/React__namespace.default.createElement(StyledSuccessDescription, null, description) : description), !!ctaText && /*#__PURE__*/React__namespace.default.createElement(StyledSuccessButtonContainer, null, /*#__PURE__*/React__namespace.default.createElement(CompoundButton, {
|
|
27966
27982
|
text: ctaText,
|
|
27967
27983
|
onPress: onCtaPress
|
|
27968
27984
|
}), !!showSecondaryButton && /*#__PURE__*/React__namespace.default.createElement(StyledSuccessButtonSecondary, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn-work-uikit",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@emotion/native": "^11.9.3",
|
|
25
25
|
"@emotion/react": "^11.9.3",
|
|
26
|
-
"@hero-design/rn": "8.128.
|
|
26
|
+
"@hero-design/rn": "8.128.1",
|
|
27
27
|
"hero-editor": "^1.17.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|