sapo-components-ui-rn 1.0.22 → 1.0.24
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/dist/assets/icon-close.svg +3 -0
- package/dist/assets/svg/icon-close.svg +3 -0
- package/dist/components/ChipBar/index.d.ts +3 -1
- package/dist/components/FloatingButton/index.d.ts +2 -0
- package/dist/components/Icon/index.d.ts +1 -1
- package/dist/components/Tag/index.d.ts +18 -0
- package/dist/icons/IconClose.d.ts +4 -0
- package/dist/index.esm.js +68 -66
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +68 -66
- package/dist/index.js.map +1 -1
- package/dist/styles/themes/tokens.d.ts +29 -0
- package/dist/theme/dimensions.d.ts +1 -0
- package/dist/types.d.ts +0 -8
- package/package.json +1 -1
- package/src/assets/svg/icon-close.svg +3 -0
- package/src/components/ChipBar/index.tsx +6 -0
- package/src/components/FloatingButton/index.tsx +19 -21
- package/src/components/Icon/index.tsx +5 -1
- package/src/components/Tag/index.tsx +122 -0
- package/src/components/View/index.tsx +10 -2
- package/src/icons/IconClose.tsx +14 -0
- package/src/styles/themes/DarkTheme.tsx +1 -9
- package/src/styles/themes/LightTheme.tsx +1 -9
- package/src/styles/themes/tokens.tsx +26 -11
- package/src/theme/dimensions.ts +1 -0
- package/src/theme/themes.tsx +2 -2
- package/src/types.ts +12 -8
- package/src/types.tsx +26 -35
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M19 6.40958L13.4102 12.0004L19 17.5902L17.5898 19.0004L12 13.4096L6.41016 19.0004L5 17.5902L10.5898 12.0004L5 6.40958L6.41016 5.0004L12 10.5902L17.5898 5.0004L19 6.40958Z" fill="#0088FF"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M19 6.40958L13.4102 12.0004L19 17.5902L17.5898 19.0004L12 13.4096L6.41016 19.0004L5 17.5902L10.5898 12.0004L5 6.40958L6.41016 5.0004L12 10.5902L17.5898 5.0004L19 6.40958Z" fill="#0088FF"/>
|
|
3
|
+
</svg>
|
|
@@ -11,6 +11,8 @@ interface ChipBarProps {
|
|
|
11
11
|
rightIcon?: React.ReactNode;
|
|
12
12
|
badge?: number;
|
|
13
13
|
isActive?: boolean;
|
|
14
|
+
ellipsizeMode?: "head" | "middle" | "tail" | "clip";
|
|
15
|
+
numberOfLines?: number;
|
|
14
16
|
}
|
|
15
|
-
declare const ChipBar: ({ style, borderRadius, title, textStyle, onPress, disabled, leftIcon, rightIcon, badge, isActive, }: ChipBarProps) => React.JSX.Element;
|
|
17
|
+
declare const ChipBar: ({ style, borderRadius, title, textStyle, onPress, disabled, leftIcon, rightIcon, badge, isActive, ellipsizeMode, numberOfLines, }: ChipBarProps) => React.JSX.Element;
|
|
16
18
|
export default ChipBar;
|
|
@@ -12,6 +12,8 @@ export interface FloatingButtonProps {
|
|
|
12
12
|
backgroundColor?: string;
|
|
13
13
|
top?: number;
|
|
14
14
|
right?: number;
|
|
15
|
+
left?: number;
|
|
16
|
+
bottom?: number;
|
|
15
17
|
}
|
|
16
18
|
declare const _default: React.MemoExoticComponent<React.ComponentType<FloatingButtonProps>>;
|
|
17
19
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { StyleProp, TextStyle } from "react-native";
|
|
3
3
|
export type IconType = "FontAwesome" | "Image" | "MaterialIcons" | "Feather" | "MaterialCommunityIcons" | "Svg";
|
|
4
4
|
export interface IconProps {
|
|
5
|
-
name: "IconCheckboxActive" | "IconCheckbox" | "IconRadio" | "IconRadioActive" | "IconRadioDisable" | "IconArrowDown" | "IconClearText" | "IconSearch";
|
|
5
|
+
name: "IconCheckboxActive" | "IconCheckbox" | "IconRadio" | "IconRadioActive" | "IconRadioDisable" | "IconArrowDown" | "IconClearText" | "IconSearch" | "IconClose";
|
|
6
6
|
backgroundColor?: string;
|
|
7
7
|
size?: number;
|
|
8
8
|
color?: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
3
|
+
interface TagProps {
|
|
4
|
+
style?: StyleProp<ViewStyle>;
|
|
5
|
+
title: string;
|
|
6
|
+
borderRadius?: number;
|
|
7
|
+
onPress?: (val?: any) => void;
|
|
8
|
+
textStyle?: StyleProp<TextStyle>;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
leftIcon?: React.ReactNode;
|
|
11
|
+
rightIcon?: React.ReactNode;
|
|
12
|
+
isActive?: boolean;
|
|
13
|
+
ellipsizeMode?: "head" | "middle" | "tail" | "clip";
|
|
14
|
+
numberOfLines?: number;
|
|
15
|
+
hideRightIcon?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const Tag: ({ style, borderRadius, title, textStyle, onPress, disabled, leftIcon, rightIcon, isActive, ellipsizeMode, numberOfLines, hideRightIcon, }: TagProps) => React.JSX.Element;
|
|
18
|
+
export default Tag;
|
package/dist/index.esm.js
CHANGED
|
@@ -219,12 +219,12 @@ var ref = {
|
|
|
219
219
|
dark: {
|
|
220
220
|
colors: {
|
|
221
221
|
primary: blue.BLUE100,
|
|
222
|
-
background:
|
|
223
|
-
card:
|
|
224
|
-
text:
|
|
225
|
-
border: ink.
|
|
222
|
+
background: white.WHITE100,
|
|
223
|
+
card: ink.INK100,
|
|
224
|
+
text: ink.INK100,
|
|
225
|
+
border: ink.INK40,
|
|
226
226
|
gray: ink.INK60,
|
|
227
|
-
backgroundLight: ink.
|
|
227
|
+
backgroundLight: ink.INK10,
|
|
228
228
|
//new theme colors
|
|
229
229
|
backgroundPrimary: ink.INK5,
|
|
230
230
|
backgroundSecondary: white.WHITE100,
|
|
@@ -238,7 +238,7 @@ var ref = {
|
|
|
238
238
|
borderPrimaryDisabled: ink.INK10,
|
|
239
239
|
borderPrimaryHovered: ink.INK20,
|
|
240
240
|
borderPrimaryInverseDefault: blue.BLUE100,
|
|
241
|
-
borderPrimaryPressed:
|
|
241
|
+
borderPrimaryPressed: ink.INK20,
|
|
242
242
|
borderSuccessDefault: green.GREEN100,
|
|
243
243
|
borderWarningDefault: yellow.YELLOW100,
|
|
244
244
|
iconBrandDefault: blue.BLUE100,
|
|
@@ -257,7 +257,7 @@ var ref = {
|
|
|
257
257
|
surfaceBrandDefault: blue.BLUE100,
|
|
258
258
|
surfaceBrandDisabled: ink.INK10,
|
|
259
259
|
surfaceBrandHover: blue.BLUE80,
|
|
260
|
-
surfaceBrandInverseDefault: blue.
|
|
260
|
+
surfaceBrandInverseDefault: blue.BLUE5,
|
|
261
261
|
surfaceBrandInverseHover: blue.BLUE20,
|
|
262
262
|
surfaceBrandInversePressed: blue.BLUE40,
|
|
263
263
|
surfaceBrandPressed: blue.BLUE120,
|
|
@@ -283,14 +283,14 @@ var ref = {
|
|
|
283
283
|
surfaceInfoInversePressed: blue.BLUE40,
|
|
284
284
|
surfaceInfoPressed: blue.BLUE120,
|
|
285
285
|
surfacePrimaryDefault: white.WHITE100,
|
|
286
|
-
surfacePrimaryDisabled: ink.
|
|
286
|
+
surfacePrimaryDisabled: ink.INK5,
|
|
287
287
|
surfacePrimaryHover: ink.INK5,
|
|
288
288
|
surfacePrimaryInverseDefault: ink.INK80,
|
|
289
289
|
surfacePrimaryInverseHover: ink.INK60,
|
|
290
290
|
surfacePrimaryInversePressed: ink.INK40,
|
|
291
291
|
surfacePrimaryPressed: ink.INK10,
|
|
292
292
|
surfaceSecondaryDefault: ink.INK5,
|
|
293
|
-
surfaceSecondaryDisabled: ink.
|
|
293
|
+
surfaceSecondaryDisabled: ink.INK5,
|
|
294
294
|
surfaceSecondaryHover: ink.INK10,
|
|
295
295
|
surfaceSecondaryPressed: ink.INK20,
|
|
296
296
|
surfaceSuccessDefault: green.GREEN100,
|
|
@@ -349,6 +349,13 @@ var ref = {
|
|
|
349
349
|
textWarningPressed: yellow.YELLOW_STATUS,
|
|
350
350
|
selectBackgroundDisabled: white.WHITE40,
|
|
351
351
|
selectIconDisabled: white.WHITE40,
|
|
352
|
+
borderCriticalInverseDefault: red.RED40,
|
|
353
|
+
borderCriticalInverseHover: red.RED20,
|
|
354
|
+
borderCriticalInversePressed: red.RED60,
|
|
355
|
+
borderErrorInverseDefault: red.RED40,
|
|
356
|
+
borderPrimaryFocused: blue.BLUE100,
|
|
357
|
+
borderWarningInverseDefault: yellow.YELLOW40,
|
|
358
|
+
borderSuccessInverseDefault: green.GREEN40,
|
|
352
359
|
},
|
|
353
360
|
},
|
|
354
361
|
light: {
|
|
@@ -373,7 +380,7 @@ var ref = {
|
|
|
373
380
|
borderPrimaryDisabled: ink.INK10,
|
|
374
381
|
borderPrimaryHovered: ink.INK20,
|
|
375
382
|
borderPrimaryInverseDefault: blue.BLUE100,
|
|
376
|
-
borderPrimaryPressed:
|
|
383
|
+
borderPrimaryPressed: ink.INK20,
|
|
377
384
|
borderSuccessDefault: green.GREEN100,
|
|
378
385
|
borderWarningDefault: yellow.YELLOW100,
|
|
379
386
|
iconBrandDefault: blue.BLUE100,
|
|
@@ -392,7 +399,7 @@ var ref = {
|
|
|
392
399
|
surfaceBrandDefault: blue.BLUE100,
|
|
393
400
|
surfaceBrandDisabled: ink.INK10,
|
|
394
401
|
surfaceBrandHover: blue.BLUE80,
|
|
395
|
-
surfaceBrandInverseDefault: blue.
|
|
402
|
+
surfaceBrandInverseDefault: blue.BLUE5,
|
|
396
403
|
surfaceBrandInverseHover: blue.BLUE20,
|
|
397
404
|
surfaceBrandInversePressed: blue.BLUE40,
|
|
398
405
|
surfaceBrandPressed: blue.BLUE120,
|
|
@@ -484,6 +491,13 @@ var ref = {
|
|
|
484
491
|
textWarningPressed: yellow.YELLOW_STATUS,
|
|
485
492
|
selectBackgroundDisabled: white.WHITE40,
|
|
486
493
|
selectIconDisabled: white.WHITE40,
|
|
494
|
+
borderCriticalInverseDefault: red.RED40,
|
|
495
|
+
borderCriticalInverseHover: red.RED20,
|
|
496
|
+
borderCriticalInversePressed: red.RED60,
|
|
497
|
+
borderErrorInverseDefault: red.RED40,
|
|
498
|
+
borderPrimaryFocused: blue.BLUE100,
|
|
499
|
+
borderWarningInverseDefault: yellow.YELLOW40,
|
|
500
|
+
borderSuccessInverseDefault: green.GREEN40,
|
|
487
501
|
},
|
|
488
502
|
},
|
|
489
503
|
},
|
|
@@ -544,6 +558,7 @@ var CONSTANTS = {
|
|
|
544
558
|
BUTTON_HEIGHT: 48,
|
|
545
559
|
BUTTON_HEIGHT_SMALL: 40,
|
|
546
560
|
RADIO_BUTTON_HEIGHT: 20,
|
|
561
|
+
BUTTON_ICON: 36,
|
|
547
562
|
SPACE_0: 0,
|
|
548
563
|
SPACE_2: 2,
|
|
549
564
|
SPACE_4: 4,
|
|
@@ -1119,14 +1134,6 @@ var LightTheme = {
|
|
|
1119
1134
|
border: ink.INK40,
|
|
1120
1135
|
gray: ink.INK60,
|
|
1121
1136
|
backgroundLight: ink.INK10,
|
|
1122
|
-
elevation: {
|
|
1123
|
-
level0: "transparent",
|
|
1124
|
-
level1: "rgb(247, 243, 249)",
|
|
1125
|
-
level2: "rgb(243, 237, 246)",
|
|
1126
|
-
level3: "rgb(238, 232, 244)",
|
|
1127
|
-
level4: "rgb(236, 230, 243)",
|
|
1128
|
-
level5: "rgb(233, 227, 241)",
|
|
1129
|
-
},
|
|
1130
1137
|
//new theme colors
|
|
1131
1138
|
backgroundPrimary: ink.INK5,
|
|
1132
1139
|
backgroundSecondary: white.WHITE100,
|
|
@@ -1159,7 +1166,7 @@ var LightTheme = {
|
|
|
1159
1166
|
surfaceBrandDefault: blue.BLUE100,
|
|
1160
1167
|
surfaceBrandDisabled: ink.INK10,
|
|
1161
1168
|
surfaceBrandHover: blue.BLUE80,
|
|
1162
|
-
surfaceBrandInverseDefault: blue.
|
|
1169
|
+
surfaceBrandInverseDefault: blue.BLUE5,
|
|
1163
1170
|
surfaceBrandInverseHover: blue.BLUE20,
|
|
1164
1171
|
surfaceBrandInversePressed: blue.BLUE40,
|
|
1165
1172
|
surfaceBrandPressed: blue.BLUE120,
|
|
@@ -1273,14 +1280,6 @@ var DarkTheme = __assign(__assign({}, LightTheme), { dark: true, mode: "adaptive
|
|
|
1273
1280
|
border: ink.INK40,
|
|
1274
1281
|
gray: ink.INK60,
|
|
1275
1282
|
backgroundLight: ink.INK10,
|
|
1276
|
-
elevation: {
|
|
1277
|
-
level0: "transparent",
|
|
1278
|
-
level1: "rgb(37, 35, 42)",
|
|
1279
|
-
level2: "rgb(44, 40, 49)",
|
|
1280
|
-
level3: "rgb(49, 44, 56)",
|
|
1281
|
-
level4: "rgb(51, 46, 58)",
|
|
1282
|
-
level5: "rgb(52, 49, 63)",
|
|
1283
|
-
},
|
|
1284
1283
|
//new theme colors
|
|
1285
1284
|
backgroundPrimary: ink.INK5,
|
|
1286
1285
|
backgroundSecondary: white.WHITE100,
|
|
@@ -1313,7 +1312,7 @@ var DarkTheme = __assign(__assign({}, LightTheme), { dark: true, mode: "adaptive
|
|
|
1313
1312
|
surfaceBrandDefault: blue.BLUE100,
|
|
1314
1313
|
surfaceBrandDisabled: ink.INK10,
|
|
1315
1314
|
surfaceBrandHover: blue.BLUE80,
|
|
1316
|
-
surfaceBrandInverseDefault: blue.
|
|
1315
|
+
surfaceBrandInverseDefault: blue.BLUE5,
|
|
1317
1316
|
surfaceBrandInverseHover: blue.BLUE20,
|
|
1318
1317
|
surfaceBrandInversePressed: blue.BLUE40,
|
|
1319
1318
|
surfaceBrandPressed: blue.BLUE120,
|
|
@@ -1921,7 +1920,9 @@ var styles$g = StyleSheet.create({
|
|
|
1921
1920
|
});
|
|
1922
1921
|
|
|
1923
1922
|
var ViewCustom = function (_a) {
|
|
1924
|
-
var row = _a.row, full = _a.full, justifyCenter = _a.justifyCenter, justifyBetween = _a.justifyBetween, alignCenter = _a.alignCenter, center = _a.center, color = _a.color, backgroundColor = _a.backgroundColor, width = _a.width, height = _a.height, padding = _a.padding, paddingHorizontal = _a.paddingHorizontal, paddingVertical = _a.paddingVertical, marginHorizontal = _a.marginHorizontal, marginVertical = _a.marginVertical, paddingLeft = _a.paddingLeft, paddingRight = _a.paddingRight, paddingTop = _a.paddingTop, alignEnd = _a.alignEnd, wrap = _a.wrap, borderBottomWidth = _a.borderBottomWidth, borderBottomColor = _a.borderBottomColor, borderRadius = _a.borderRadius, borderWidth = _a.borderWidth, borderColor = _a.borderColor, style = _a.style, onPress = _a.onPress,
|
|
1923
|
+
var row = _a.row, full = _a.full, justifyCenter = _a.justifyCenter, justifyBetween = _a.justifyBetween, alignCenter = _a.alignCenter, center = _a.center, color = _a.color, backgroundColor = _a.backgroundColor, width = _a.width, height = _a.height, padding = _a.padding, paddingHorizontal = _a.paddingHorizontal, paddingVertical = _a.paddingVertical, marginHorizontal = _a.marginHorizontal, marginVertical = _a.marginVertical, paddingLeft = _a.paddingLeft, paddingRight = _a.paddingRight, paddingTop = _a.paddingTop, alignEnd = _a.alignEnd, wrap = _a.wrap, borderBottomWidth = _a.borderBottomWidth, borderBottomColor = _a.borderBottomColor, borderRadius = _a.borderRadius, borderWidth = _a.borderWidth, borderColor = _a.borderColor, style = _a.style, onPress = _a.onPress, _b = _a.activeOpacity, activeOpacity = _b === void 0 ? 0.8 : _b, children = _a.children, disabled = _a.disabled, paddingBottom = _a.paddingBottom;
|
|
1924
|
+
var theme = useInternalTheme();
|
|
1925
|
+
var colors = theme.colors;
|
|
1925
1926
|
var getStyle = function () {
|
|
1926
1927
|
var styleCustom = {};
|
|
1927
1928
|
if (row) {
|
|
@@ -2007,7 +2008,11 @@ var ViewCustom = function (_a) {
|
|
|
2007
2008
|
};
|
|
2008
2009
|
var defaultStyle = getStyle();
|
|
2009
2010
|
var Component = onPress ? TouchableOpacity : View$1;
|
|
2010
|
-
return (React__default.createElement(Component, { activeOpacity: activeOpacity, onPress: onPress, disabled: disabled, style: [
|
|
2011
|
+
return (React__default.createElement(Component, { activeOpacity: activeOpacity, onPress: onPress, disabled: disabled, style: [
|
|
2012
|
+
{ backgroundColor: colors.backgroundPrimary },
|
|
2013
|
+
defaultStyle,
|
|
2014
|
+
style,
|
|
2015
|
+
] }, children));
|
|
2011
2016
|
};
|
|
2012
2017
|
var View = React__default.memo(ViewCustom);
|
|
2013
2018
|
|
|
@@ -2743,6 +2748,9 @@ var IconClearText = function (props) { return (React$3.createElement(Svg, __assi
|
|
|
2743
2748
|
var IconSearch = function (props) { return (React$3.createElement(Svg, __assign({ width: 16, height: 16, viewBox: "0 0 16 16", fill: "none" }, props),
|
|
2744
2749
|
React$3.createElement(Path, { d: "M15.7 14.3L11.5 10.1C11.3 9.9 11 9.8 10.7 9.8C11.5 8.8 12 7.4 12 6C12 2.7 9.3 0 6 0C2.7 0 0 2.7 0 6C0 9.3 2.7 12 6 12C7.4 12 8.8 11.5 9.8 10.6C9.8 10.9 9.8 11.2 10.1 11.4L14.3 15.6C14.5 15.8 14.8 15.9 15 15.9C15.2 15.9 15.5 15.8 15.7 15.6C16.1 15.3 16.1 14.7 15.7 14.3ZM6 10.5C3.5 10.5 1.5 8.5 1.5 6C1.5 3.5 3.5 1.5 6 1.5C8.5 1.5 10.5 3.5 10.5 6C10.5 8.5 8.5 10.5 6 10.5Z", fill: "currentColor" }))); };
|
|
2745
2750
|
|
|
2751
|
+
var IconClose = function (props) { return (React$3.createElement(Svg, __assign({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none" }, props),
|
|
2752
|
+
React$3.createElement(Path, { d: "M19 6.40958L13.4102 12.0004L19 17.5902L17.5898 19.0004L12 13.4096L6.41016 19.0004L5 17.5902L10.5898 12.0004L5 6.40958L6.41016 5.0004L12 10.5902L17.5898 5.0004L19 6.40958Z", fill: "currentColor" }))); };
|
|
2753
|
+
|
|
2746
2754
|
var getIconComponent = function (type) {
|
|
2747
2755
|
switch (type) {
|
|
2748
2756
|
case "MaterialIcons":
|
|
@@ -2777,6 +2785,8 @@ var Icon = function (_a) {
|
|
|
2777
2785
|
return IconClearText;
|
|
2778
2786
|
case "IconSearch":
|
|
2779
2787
|
return IconSearch;
|
|
2788
|
+
case "IconClose":
|
|
2789
|
+
return IconClose;
|
|
2780
2790
|
default:
|
|
2781
2791
|
return IconCheckbox;
|
|
2782
2792
|
}
|
|
@@ -6045,12 +6055,32 @@ var styles$8 = StyleSheet.create({
|
|
|
6045
6055
|
});
|
|
6046
6056
|
var index$2 = memoDeepEqual(ButtonIcon);
|
|
6047
6057
|
|
|
6058
|
+
Dimensions.get("window").height;
|
|
6059
|
+
Dimensions.get("window").width;
|
|
6060
|
+
var BUTTON_HEIGHT = 48;
|
|
6061
|
+
var BUTTON_HEIGHT_SMALL = 40;
|
|
6062
|
+
var SPACE_4 = 4;
|
|
6063
|
+
var SPACE_6 = 6;
|
|
6064
|
+
var SPACE_8 = 8;
|
|
6065
|
+
var SPACE_12 = 12;
|
|
6066
|
+
var SPACE_16 = 16;
|
|
6067
|
+
//MARK: Border radius
|
|
6068
|
+
var BORDER_RADIUS_6 = 6;
|
|
6069
|
+
//MARK: Border width
|
|
6070
|
+
StyleSheet.hairlineWidth; //0.3-0.5
|
|
6071
|
+
var BORDER_WIDTH_1 = 1;
|
|
6072
|
+
|
|
6048
6073
|
var FloatingButton = function (_a) {
|
|
6049
|
-
var isLoading = _a.isLoading, disabled = _a.disabled, onPress = _a.onPress, style = _a.style, _b = _a.hiddenBackground, hiddenBackground = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ?
|
|
6074
|
+
var isLoading = _a.isLoading, disabled = _a.disabled, onPress = _a.onPress, style = _a.style, _b = _a.hiddenBackground, hiddenBackground = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? BUTTON_HEIGHT : _c, children = _a.children, backgroundColor = _a.backgroundColor, props = _a.props, _d = _a.top, top = _d === void 0 ? 0 : _d, _e = _a.right, right = _e === void 0 ? 0 : _e, _f = _a.left, left = _f === void 0 ? 0 : _f, _g = _a.bottom, bottom = _g === void 0 ? 0 : _g;
|
|
6050
6075
|
var colors = useInternalTheme().colors;
|
|
6051
|
-
return (React__default.createElement(
|
|
6052
|
-
|
|
6053
|
-
|
|
6076
|
+
return (React__default.createElement(ScaleButton$1, __assign({ activeOpacity: 0.8, onPress: onPress }, props, { disabled: disabled || isLoading, style: [
|
|
6077
|
+
styles$7.btn,
|
|
6078
|
+
top > 0 && { top: top },
|
|
6079
|
+
right > 0 && { right: right },
|
|
6080
|
+
left > 0 && { left: left },
|
|
6081
|
+
bottom > 0 && { bottom: bottom },
|
|
6082
|
+
] }),
|
|
6083
|
+
React__default.createElement(View, __assign({ center: true, style: [
|
|
6054
6084
|
!hiddenBackground
|
|
6055
6085
|
? {
|
|
6056
6086
|
backgroundColor: backgroundColor || colors.surfaceBrandDefault,
|
|
@@ -6062,8 +6092,6 @@ var FloatingButton = function (_a) {
|
|
|
6062
6092
|
width: size,
|
|
6063
6093
|
height: size,
|
|
6064
6094
|
borderRadius: size / 2,
|
|
6065
|
-
top: top,
|
|
6066
|
-
right: right,
|
|
6067
6095
|
},
|
|
6068
6096
|
disabled && {
|
|
6069
6097
|
borderWidth: 0,
|
|
@@ -6075,17 +6103,6 @@ var FloatingButton = function (_a) {
|
|
|
6075
6103
|
var styles$7 = StyleSheet.create({
|
|
6076
6104
|
btn: {
|
|
6077
6105
|
position: "absolute",
|
|
6078
|
-
justifyContent: "center",
|
|
6079
|
-
alignItems: "center",
|
|
6080
|
-
shadowColor: "#000",
|
|
6081
|
-
shadowOffset: {
|
|
6082
|
-
width: 0,
|
|
6083
|
-
height: 2,
|
|
6084
|
-
},
|
|
6085
|
-
shadowOpacity: 0.25,
|
|
6086
|
-
shadowRadius: 3.84,
|
|
6087
|
-
elevation: 5,
|
|
6088
|
-
zIndex: 99,
|
|
6089
6106
|
},
|
|
6090
6107
|
});
|
|
6091
6108
|
var index$1 = memoDeepEqual(FloatingButton);
|
|
@@ -6446,21 +6463,6 @@ var Badge = function (_a) {
|
|
|
6446
6463
|
React__default.createElement(Text$1, { size: 12, color: textColor || colors.textSecondary, style: textStyle }, value))));
|
|
6447
6464
|
};
|
|
6448
6465
|
|
|
6449
|
-
Dimensions.get("window").height;
|
|
6450
|
-
Dimensions.get("window").width;
|
|
6451
|
-
var BUTTON_HEIGHT = 48;
|
|
6452
|
-
var BUTTON_HEIGHT_SMALL = 40;
|
|
6453
|
-
var SPACE_4 = 4;
|
|
6454
|
-
var SPACE_6 = 6;
|
|
6455
|
-
var SPACE_8 = 8;
|
|
6456
|
-
var SPACE_12 = 12;
|
|
6457
|
-
var SPACE_16 = 16;
|
|
6458
|
-
//MARK: Border radius
|
|
6459
|
-
var BORDER_RADIUS_6 = 6;
|
|
6460
|
-
//MARK: Border width
|
|
6461
|
-
StyleSheet.hairlineWidth; //0.3-0.5
|
|
6462
|
-
var BORDER_WIDTH_1 = 1;
|
|
6463
|
-
|
|
6464
6466
|
var containerStyles = StyleSheet.create({
|
|
6465
6467
|
container: { flex: 1 },
|
|
6466
6468
|
center: {
|
|
@@ -6596,10 +6598,10 @@ var styles$5 = StyleSheet.create(__assign(__assign({}, containerStyles), { conta
|
|
|
6596
6598
|
} }));
|
|
6597
6599
|
|
|
6598
6600
|
var ChipBar = function (_a) {
|
|
6599
|
-
var style = _a.style, _b = _a.borderRadius, borderRadius = _b === void 0 ? CONSTANTS.BORDER_RADIUS_ROUNDED : _b, _c = _a.title, title = _c === void 0 ? "content" : _c, textStyle = _a.textStyle, onPress = _a.onPress, _d = _a.disabled, disabled = _d === void 0 ? false : _d, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, _e = _a.badge, badge = _e === void 0 ? 0 : _e, _f = _a.isActive, isActive = _f === void 0 ? false : _f;
|
|
6601
|
+
var style = _a.style, _b = _a.borderRadius, borderRadius = _b === void 0 ? CONSTANTS.BORDER_RADIUS_ROUNDED : _b, _c = _a.title, title = _c === void 0 ? "content" : _c, textStyle = _a.textStyle, onPress = _a.onPress, _d = _a.disabled, disabled = _d === void 0 ? false : _d, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, _e = _a.badge, badge = _e === void 0 ? 0 : _e, _f = _a.isActive, isActive = _f === void 0 ? false : _f, _g = _a.ellipsizeMode, ellipsizeMode = _g === void 0 ? "tail" : _g, _h = _a.numberOfLines, numberOfLines = _h === void 0 ? 1 : _h;
|
|
6600
6602
|
var theme = useInternalTheme();
|
|
6601
6603
|
var colors = theme.colors;
|
|
6602
|
-
var
|
|
6604
|
+
var _j = useState(isActive), active = _j[0], setActive = _j[1];
|
|
6603
6605
|
var handlePressChipBar = useCallback(function () {
|
|
6604
6606
|
setActive(!active);
|
|
6605
6607
|
onPress === null || onPress === void 0 ? void 0 : onPress();
|
|
@@ -6619,7 +6621,7 @@ var ChipBar = function (_a) {
|
|
|
6619
6621
|
: colors.backgroundSecondary },
|
|
6620
6622
|
leftIcon && React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_4 }, leftIcon),
|
|
6621
6623
|
React__default.createElement(View, null,
|
|
6622
|
-
React__default.createElement(Text$1, { color: active ? colors.textBrandDefault : colors.textDefault, style: [
|
|
6624
|
+
React__default.createElement(Text$1, { numberOfLines: numberOfLines, ellipsizeMode: ellipsizeMode, color: active ? colors.textBrandDefault : colors.textDefault, style: [
|
|
6623
6625
|
styles$4.text14,
|
|
6624
6626
|
styles$4.textMedium,
|
|
6625
6627
|
disabled && {
|