@artsy/palette-mobile 13.2.30 → 13.2.32
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/elements/Button/Button.d.ts +13 -9
- package/dist/elements/Button/Button.js +308 -100
- package/dist/elements/Button/Button.stories.d.ts +1 -7
- package/dist/elements/Button/Button.stories.js +8 -29
- package/dist/elements/Button/FollowButton.js +1 -2
- package/dist/elements/Button/LinkButton.d.ts +3 -0
- package/dist/elements/Button/LinkButton.js +8 -0
- package/dist/elements/Button/colors.d.ts +1 -2
- package/dist/elements/Button/colors.js +9 -57
- package/dist/elements/Button/index.d.ts +1 -0
- package/dist/elements/Button/index.js +1 -0
- package/dist/elements/ButtonNew/Button.d.ts +34 -0
- package/dist/elements/ButtonNew/Button.js +132 -0
- package/dist/elements/ButtonNew/Button.stories.d.ts +18 -0
- package/dist/elements/ButtonNew/Button.stories.js +66 -0
- package/dist/elements/ButtonNew/CTAButton.d.ts +3 -0
- package/dist/elements/ButtonNew/CTAButton.js +7 -0
- package/dist/elements/ButtonNew/FollowButton.d.ts +9 -0
- package/dist/elements/ButtonNew/FollowButton.js +12 -0
- package/dist/elements/ButtonNew/LinkButton.d.ts +3 -0
- package/dist/elements/ButtonNew/LinkButton.js +8 -0
- package/dist/elements/ButtonNew/colors.d.ts +9 -0
- package/dist/elements/ButtonNew/colors.js +78 -0
- package/dist/elements/ButtonNew/index.d.ts +4 -0
- package/dist/elements/ButtonNew/index.js +20 -0
- package/dist/elements/Input/helpers.d.ts +1 -1
- package/dist/elements/Screen/hooks/useListenForScreenScroll.d.ts +1 -1
- package/dist/elements/Screen/index.d.ts +1 -1
- package/package.json +2 -2
- /package/dist/elements/{Button → ButtonNew}/Button.tests.d.ts +0 -0
- /package/dist/elements/{Button → ButtonNew}/Button.tests.js +0 -0
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { TextVariant } from "@artsy/palette-tokens/dist/typography/v3";
|
|
2
3
|
import { PressableProps } from "react-native";
|
|
3
4
|
import { HapticFeedbackTypes } from "react-native-haptic-feedback";
|
|
4
5
|
import { BoxProps } from "../Box";
|
|
5
|
-
type ButtonSize = "small" | "large";
|
|
6
|
-
type ButtonVariant = "fillDark" | "fillLight" | "fillGray" | "fillSuccess" | "outline" | "outlineGray" | "outlineLight" | "text";
|
|
7
6
|
export interface ButtonProps extends BoxProps {
|
|
8
7
|
children: React.ReactNode;
|
|
9
|
-
size?:
|
|
10
|
-
variant?:
|
|
8
|
+
size?: "small" | "large";
|
|
9
|
+
variant?: "fillDark" | "fillLight" | "fillGray" | "fillSuccess" | "outline" | "outlineGray" | "outlineLight" | "text";
|
|
11
10
|
onPress?: PressableProps["onPress"];
|
|
12
|
-
onPressIn?: PressableProps["onPressIn"];
|
|
13
|
-
onPressOut?: PressableProps["onPressOut"];
|
|
14
11
|
icon?: React.ReactNode;
|
|
15
12
|
iconPosition?: "left" | "left-start" | "right";
|
|
16
13
|
/**
|
|
@@ -30,7 +27,14 @@ export interface ButtonProps extends BoxProps {
|
|
|
30
27
|
/** Pass the longest text to the button for the button to keep longest text width */
|
|
31
28
|
longestText?: string;
|
|
32
29
|
/** Used only for tests and stories */
|
|
33
|
-
|
|
30
|
+
testOnly_state?: DisplayState;
|
|
31
|
+
textVariant?: TextVariant;
|
|
34
32
|
}
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
declare enum DisplayState {
|
|
34
|
+
Enabled = "enabled",
|
|
35
|
+
Disabled = "disabled",
|
|
36
|
+
Loading = "loading",
|
|
37
|
+
Pressed = "pressed"
|
|
38
|
+
}
|
|
39
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
40
|
+
export { DisplayState as _test_DisplayState };
|
|
@@ -1,134 +1,342 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Button = void 0;
|
|
6
|
+
exports._test_DisplayState = exports.Button = void 0;
|
|
30
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
8
|
const react_1 = require("react");
|
|
32
9
|
const react_native_1 = require("react-native");
|
|
33
10
|
const react_native_haptic_feedback_1 = __importDefault(require("react-native-haptic-feedback"));
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const
|
|
11
|
+
const react_spring_1 = require("react-spring");
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
const renderprops_native_1 = require("react-spring/renderprops-native");
|
|
14
|
+
const native_1 = __importDefault(require("styled-components/native"));
|
|
15
|
+
const hooks_1 = require("../../utils/hooks");
|
|
37
16
|
const Box_1 = require("../Box");
|
|
38
|
-
const Flex_1 = require("../Flex");
|
|
17
|
+
const Flex_1 = require("../Flex/Flex");
|
|
18
|
+
const MeasuredView_1 = require("../MeasuredView");
|
|
39
19
|
const Spacer_1 = require("../Spacer");
|
|
40
20
|
const Spinner_1 = require("../Spinner");
|
|
41
|
-
const Text_1 = require("../Text");
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const textStyle = (0, Text_1.useTextStyleForPalette)(size === "small" ? "xs" : "sm");
|
|
21
|
+
const Text_1 = require("../Text/Text");
|
|
22
|
+
const helpers_1 = require("../Text/helpers");
|
|
23
|
+
var DisplayState;
|
|
24
|
+
(function (DisplayState) {
|
|
25
|
+
DisplayState["Enabled"] = "enabled";
|
|
26
|
+
DisplayState["Disabled"] = "disabled";
|
|
27
|
+
DisplayState["Loading"] = "loading";
|
|
28
|
+
DisplayState["Pressed"] = "pressed";
|
|
29
|
+
})(DisplayState || (DisplayState = {}));
|
|
30
|
+
exports._test_DisplayState = DisplayState;
|
|
31
|
+
const Button = ({ children, disabled, haptic, icon, iconPosition = "left", loading, longestText, onPress, size = "large", variant = "fillDark", testOnly_state, testID, textVariant, hitSlop, ...rest }) => {
|
|
32
|
+
const textVariantBySize = size === "small" ? "xs" : "sm";
|
|
33
|
+
const textStyle = (0, helpers_1.useTextStyleForPalette)(textVariant ?? textVariantBySize);
|
|
34
|
+
const [innerDisplayState, setInnerDisplayState] = (0, react_1.useState)(DisplayState.Enabled);
|
|
56
35
|
const [longestTextMeasurements, setLongestTextMeasurements] = (0, react_1.useState)({
|
|
57
36
|
width: 0,
|
|
58
37
|
height: 0,
|
|
59
38
|
});
|
|
60
|
-
const
|
|
39
|
+
const displayState = testOnly_state ?? // if we use the test prop, use that
|
|
40
|
+
(loading // if we have loading or disabled in props, they are used
|
|
41
|
+
? DisplayState.Loading
|
|
42
|
+
: disabled
|
|
43
|
+
? DisplayState.Disabled
|
|
44
|
+
: innerDisplayState); // otherwise use the inner state for pressed or enabled
|
|
45
|
+
const getSize = () => {
|
|
61
46
|
switch (size) {
|
|
62
47
|
case "small":
|
|
63
|
-
return 30;
|
|
48
|
+
return { height: 30, mx: "15px" };
|
|
64
49
|
case "large":
|
|
65
|
-
return 50;
|
|
50
|
+
return { height: 50, mx: "30px" };
|
|
66
51
|
}
|
|
67
|
-
}
|
|
52
|
+
};
|
|
68
53
|
const handlePress = (event) => {
|
|
69
54
|
if (onPress === undefined || onPress === null) {
|
|
70
55
|
return;
|
|
71
56
|
}
|
|
72
|
-
if (
|
|
57
|
+
if (displayState === DisplayState.Loading || displayState === DisplayState.Disabled) {
|
|
73
58
|
return;
|
|
74
59
|
}
|
|
60
|
+
// Did someone tap really fast? Flick the highlighted state
|
|
61
|
+
if (displayState === DisplayState.Enabled) {
|
|
62
|
+
setInnerDisplayState(DisplayState.Pressed);
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
setInnerDisplayState(DisplayState.Enabled);
|
|
65
|
+
}, 0.3);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
// Was already selected
|
|
69
|
+
setInnerDisplayState(DisplayState.Enabled);
|
|
70
|
+
}
|
|
75
71
|
if (haptic !== undefined) {
|
|
76
72
|
react_native_haptic_feedback_1.default.trigger(haptic === true ? "impactLight" : haptic);
|
|
77
73
|
}
|
|
78
74
|
onPress(event);
|
|
79
75
|
};
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
return {
|
|
106
|
-
color: (0, react_native_reanimated_1.interpolateColor)(pressAnimationProgress.value, [0, 1], [colors.active.text, colors.pressed.text]),
|
|
107
|
-
textDecorationLine: pressAnimationProgress.value > 0 ? "underline" : "none",
|
|
108
|
-
};
|
|
109
|
-
});
|
|
110
|
-
const loaderColor = colorsForVariantAndState[variant].loading.loader;
|
|
111
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { disabled: disabled, onPressIn: (e) => {
|
|
112
|
-
onPressIn?.(e);
|
|
113
|
-
setPressed(true);
|
|
114
|
-
}, onPressOut: (e) => {
|
|
115
|
-
onPressOut?.(e);
|
|
116
|
-
setPressed(false);
|
|
117
|
-
}, onPress: handlePress, testID: testID, testOnly_pressed: testOnly_pressed, hitSlop: hitSlop, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ...restProps, height: height, width: block ? "100%" : undefined, borderRadius: 50, overflow: "hidden", children: (0, jsx_runtime_1.jsx)(AFlex, { borderWidth: 1, borderRadius: 50, overflow: "hidden", style: containerColorsAnim, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { height: "100%", mx: "25px", flexDirection: "row", alignItems: "center", justifyContent: "center", children: [iconPosition === "left-start" && !!icon ? ((0, jsx_runtime_1.jsxs)(Box_1.Box, { position: "absolute", left: 0, children: [icon, (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 0.5 })] })) : null, iconPosition === "left" && !!icon ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [icon, (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 0.5 })] })) : null, (0, jsx_runtime_1.jsx)(AText, { style: [{ width: Math.ceil(longestTextMeasurements.width) }, textStyle, textAnim], textAlign: "center", selectable: false, children: children }), (0, jsx_runtime_1.jsx)(MeasuredView_1.MeasuredView, { setMeasuredState: setLongestTextMeasurements, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "red", style: textStyle, children: longestText ? longestText : children }) }), iconPosition === "right" && !!icon && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 0.5 }), icon] })), loading && ((0, jsx_runtime_1.jsx)(Box_1.Box, { position: "absolute", width: "100%", height: "100%", alignItems: "center", justifyContent: "center", children: (0, jsx_runtime_1.jsx)(Spinner_1.Spinner, { size: size, color: loaderColor }) }))] }) }) }) }) }));
|
|
76
|
+
const containerSize = getSize();
|
|
77
|
+
const to = useStyleForVariantAndState(variant, testOnly_state ?? displayState);
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(renderprops_native_1.Spring, { native: true, to: to, config: react_spring_1.config.stiff, children: (springProps) => ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { hitSlop: hitSlop, testOnly_pressed: testOnly_state === DisplayState.Pressed, disabled: testOnly_state === DisplayState.Disabled || disabled, onPressIn: () => {
|
|
79
|
+
if (displayState === DisplayState.Loading) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
setInnerDisplayState(DisplayState.Pressed);
|
|
83
|
+
}, onPressOut: () => {
|
|
84
|
+
if (displayState === DisplayState.Loading) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
setInnerDisplayState(DisplayState.Enabled);
|
|
88
|
+
}, onPress: handlePress, testID: testID, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", children: (0, jsx_runtime_1.jsx)(AnimatedContainer, { ...rest, style: {
|
|
89
|
+
backgroundColor: springProps.backgroundColor,
|
|
90
|
+
borderColor: springProps.borderColor,
|
|
91
|
+
height: containerSize.height,
|
|
92
|
+
}, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { mx: containerSize.mx, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { height: "100%", flexDirection: "row", alignItems: "center", justifyContent: "center", children: [iconPosition === "left-start" && !!icon ? ((0, jsx_runtime_1.jsxs)(Box_1.Box, { position: "absolute", left: 0, children: [icon, (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 0.5 })] })) : null, iconPosition === "left" && !!icon ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [icon, (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 0.5 })] })) : null, !__TEST__ && longestText && ((0, jsx_runtime_1.jsx)(MeasuredView_1.MeasuredView, { setMeasuredState: setLongestTextMeasurements, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "red", style: textStyle, children: longestText ? longestText : children }) })), (0, jsx_runtime_1.jsx)(AnimatedText, { style: [
|
|
93
|
+
{
|
|
94
|
+
width: longestText ? Math.ceil(longestTextMeasurements.width) : "auto",
|
|
95
|
+
color: springProps.textColor,
|
|
96
|
+
textDecorationLine: springProps.textDecorationLine,
|
|
97
|
+
},
|
|
98
|
+
textStyle,
|
|
99
|
+
], textAlign: "center", children: children }), iconPosition === "right" && !!icon && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 0.5 }), icon] }))] }), displayState === DisplayState.Loading && ((0, jsx_runtime_1.jsx)(SpinnerContainer, { children: (0, jsx_runtime_1.jsx)(Spinner_1.Spinner, { size: size, color: to.loaderColor }) }))] }) }) }) })) }));
|
|
118
100
|
};
|
|
119
101
|
exports.Button = Button;
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
102
|
+
const useStyleForVariantAndState = (variant, state) => {
|
|
103
|
+
const color = (0, hooks_1.useColor)();
|
|
104
|
+
const retval = {
|
|
105
|
+
textDecorationLine: "none",
|
|
106
|
+
};
|
|
107
|
+
switch (variant) {
|
|
108
|
+
case "fillDark":
|
|
109
|
+
retval.textColor = color("white100");
|
|
110
|
+
switch (state) {
|
|
111
|
+
case DisplayState.Enabled:
|
|
112
|
+
retval.backgroundColor = color("black100");
|
|
113
|
+
retval.borderColor = color("black100");
|
|
114
|
+
break;
|
|
115
|
+
case DisplayState.Disabled:
|
|
116
|
+
retval.backgroundColor = color("black30");
|
|
117
|
+
retval.borderColor = color("black30");
|
|
118
|
+
break;
|
|
119
|
+
case DisplayState.Loading:
|
|
120
|
+
retval.backgroundColor = color("black100");
|
|
121
|
+
retval.borderColor = color("black100");
|
|
122
|
+
retval.textColor = "rgba(0, 0, 0, 0)";
|
|
123
|
+
retval.loaderColor = "white100";
|
|
124
|
+
break;
|
|
125
|
+
case DisplayState.Pressed:
|
|
126
|
+
retval.backgroundColor = color("blue100");
|
|
127
|
+
retval.borderColor = color("blue100");
|
|
128
|
+
retval.textDecorationLine = "underline";
|
|
129
|
+
break;
|
|
130
|
+
default:
|
|
131
|
+
null;
|
|
132
|
+
}
|
|
133
|
+
break;
|
|
134
|
+
case "fillLight":
|
|
135
|
+
switch (state) {
|
|
136
|
+
case DisplayState.Enabled:
|
|
137
|
+
retval.backgroundColor = color("white100");
|
|
138
|
+
retval.borderColor = color("white100");
|
|
139
|
+
retval.textColor = color("black100");
|
|
140
|
+
break;
|
|
141
|
+
case DisplayState.Disabled:
|
|
142
|
+
retval.backgroundColor = color("black30");
|
|
143
|
+
retval.borderColor = color("black30");
|
|
144
|
+
retval.textColor = color("white100");
|
|
145
|
+
break;
|
|
146
|
+
case DisplayState.Loading:
|
|
147
|
+
retval.backgroundColor = color("white100");
|
|
148
|
+
retval.borderColor = color("white100");
|
|
149
|
+
retval.textColor = "rgba(0, 0, 0, 0)";
|
|
150
|
+
retval.loaderColor = "black100";
|
|
151
|
+
break;
|
|
152
|
+
case DisplayState.Pressed:
|
|
153
|
+
retval.backgroundColor = color("blue100");
|
|
154
|
+
retval.borderColor = color("blue100");
|
|
155
|
+
retval.textColor = color("white100");
|
|
156
|
+
retval.textDecorationLine = "underline";
|
|
157
|
+
break;
|
|
158
|
+
default:
|
|
159
|
+
null;
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
case "fillGray":
|
|
163
|
+
switch (state) {
|
|
164
|
+
case DisplayState.Enabled:
|
|
165
|
+
retval.backgroundColor = color("black10");
|
|
166
|
+
retval.borderColor = color("black10");
|
|
167
|
+
retval.textColor = color("black100");
|
|
168
|
+
break;
|
|
169
|
+
case DisplayState.Disabled:
|
|
170
|
+
retval.backgroundColor = color("black30");
|
|
171
|
+
retval.borderColor = color("black30");
|
|
172
|
+
retval.textColor = color("white100");
|
|
173
|
+
break;
|
|
174
|
+
case DisplayState.Loading:
|
|
175
|
+
retval.backgroundColor = color("black10");
|
|
176
|
+
retval.borderColor = color("black10");
|
|
177
|
+
retval.textColor = "rgba(0, 0, 0, 0)";
|
|
178
|
+
retval.loaderColor = "black100";
|
|
179
|
+
break;
|
|
180
|
+
case DisplayState.Pressed:
|
|
181
|
+
retval.backgroundColor = color("blue100");
|
|
182
|
+
retval.borderColor = color("blue100");
|
|
183
|
+
retval.textColor = color("white100");
|
|
184
|
+
retval.textDecorationLine = "underline";
|
|
185
|
+
break;
|
|
186
|
+
default:
|
|
187
|
+
null;
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
case "fillSuccess":
|
|
191
|
+
retval.textColor = color("white100");
|
|
192
|
+
switch (state) {
|
|
193
|
+
case DisplayState.Enabled:
|
|
194
|
+
retval.backgroundColor = color("blue100");
|
|
195
|
+
retval.borderColor = color("blue100");
|
|
196
|
+
break;
|
|
197
|
+
case DisplayState.Disabled:
|
|
198
|
+
retval.backgroundColor = color("blue100");
|
|
199
|
+
retval.borderColor = color("blue100");
|
|
200
|
+
break;
|
|
201
|
+
case DisplayState.Loading:
|
|
202
|
+
retval.backgroundColor = color("blue100");
|
|
203
|
+
retval.borderColor = color("blue100");
|
|
204
|
+
retval.textColor = "rgba(0, 0, 0, 0)";
|
|
205
|
+
retval.loaderColor = "white100";
|
|
206
|
+
break;
|
|
207
|
+
case DisplayState.Pressed:
|
|
208
|
+
retval.backgroundColor = color("blue10");
|
|
209
|
+
retval.borderColor = color("blue10");
|
|
210
|
+
retval.textDecorationLine = "underline";
|
|
211
|
+
break;
|
|
212
|
+
default:
|
|
213
|
+
null;
|
|
214
|
+
}
|
|
215
|
+
break;
|
|
216
|
+
case "outline":
|
|
217
|
+
switch (state) {
|
|
218
|
+
case DisplayState.Enabled:
|
|
219
|
+
retval.backgroundColor = color("white100");
|
|
220
|
+
retval.borderColor = color("black60");
|
|
221
|
+
retval.textColor = color("black100");
|
|
222
|
+
break;
|
|
223
|
+
case DisplayState.Disabled:
|
|
224
|
+
retval.backgroundColor = color("white100");
|
|
225
|
+
retval.borderColor = color("black30");
|
|
226
|
+
retval.textColor = color("black30");
|
|
227
|
+
break;
|
|
228
|
+
case DisplayState.Loading:
|
|
229
|
+
retval.backgroundColor = color("white100");
|
|
230
|
+
retval.borderColor = color("black60");
|
|
231
|
+
retval.textColor = "rgba(0, 0, 0, 0)";
|
|
232
|
+
retval.loaderColor = "black100";
|
|
233
|
+
break;
|
|
234
|
+
case DisplayState.Pressed:
|
|
235
|
+
retval.backgroundColor = color("blue100");
|
|
236
|
+
retval.borderColor = color("blue100");
|
|
237
|
+
retval.textColor = color("white100");
|
|
238
|
+
retval.textDecorationLine = "underline";
|
|
239
|
+
break;
|
|
240
|
+
default:
|
|
241
|
+
null;
|
|
242
|
+
}
|
|
243
|
+
break;
|
|
244
|
+
case "outlineGray":
|
|
245
|
+
switch (state) {
|
|
246
|
+
case DisplayState.Enabled:
|
|
247
|
+
retval.backgroundColor = color("white100");
|
|
248
|
+
retval.borderColor = color("black30");
|
|
249
|
+
retval.textColor = color("black100");
|
|
250
|
+
break;
|
|
251
|
+
case DisplayState.Disabled:
|
|
252
|
+
retval.backgroundColor = color("white100");
|
|
253
|
+
retval.borderColor = color("black30");
|
|
254
|
+
retval.textColor = color("black30");
|
|
255
|
+
break;
|
|
256
|
+
case DisplayState.Loading:
|
|
257
|
+
retval.backgroundColor = color("white100");
|
|
258
|
+
retval.borderColor = color("black30");
|
|
259
|
+
retval.textColor = "rgba(0, 0, 0, 0)";
|
|
260
|
+
retval.loaderColor = "black100";
|
|
261
|
+
break;
|
|
262
|
+
case DisplayState.Pressed:
|
|
263
|
+
retval.backgroundColor = color("blue100");
|
|
264
|
+
retval.borderColor = color("blue100");
|
|
265
|
+
retval.textColor = color("white100");
|
|
266
|
+
retval.textDecorationLine = "underline";
|
|
267
|
+
break;
|
|
268
|
+
default:
|
|
269
|
+
null;
|
|
270
|
+
}
|
|
271
|
+
break;
|
|
272
|
+
case "outlineLight":
|
|
273
|
+
switch (state) {
|
|
274
|
+
case DisplayState.Enabled:
|
|
275
|
+
retval.backgroundColor = "rgba(0, 0, 0, 0)";
|
|
276
|
+
retval.borderColor = color("white100");
|
|
277
|
+
retval.textColor = color("white100");
|
|
278
|
+
break;
|
|
279
|
+
case DisplayState.Disabled:
|
|
280
|
+
retval.backgroundColor = "rgba(0, 0, 0, 0)";
|
|
281
|
+
retval.borderColor = color("black30");
|
|
282
|
+
retval.textColor = color("black30");
|
|
283
|
+
break;
|
|
284
|
+
case DisplayState.Loading:
|
|
285
|
+
retval.backgroundColor = "rgba(0, 0, 0, 0)";
|
|
286
|
+
retval.borderColor = color("white100");
|
|
287
|
+
retval.textColor = "rgba(0, 0, 0, 0)";
|
|
288
|
+
retval.loaderColor = "white100";
|
|
289
|
+
break;
|
|
290
|
+
case DisplayState.Pressed:
|
|
291
|
+
retval.backgroundColor = color("blue100");
|
|
292
|
+
retval.borderColor = color("blue100");
|
|
293
|
+
retval.textColor = "rgba(0, 0, 0, 0)";
|
|
294
|
+
retval.textDecorationLine = "underline";
|
|
295
|
+
break;
|
|
296
|
+
default:
|
|
297
|
+
null;
|
|
298
|
+
}
|
|
299
|
+
break;
|
|
300
|
+
case "text":
|
|
301
|
+
retval.backgroundColor = "rgba(0, 0, 0, 0)";
|
|
302
|
+
retval.borderColor = "rgba(0, 0, 0, 0)";
|
|
303
|
+
switch (state) {
|
|
304
|
+
case DisplayState.Enabled:
|
|
305
|
+
retval.textColor = color("black100");
|
|
306
|
+
break;
|
|
307
|
+
case DisplayState.Disabled:
|
|
308
|
+
retval.textColor = color("black30");
|
|
309
|
+
break;
|
|
310
|
+
case DisplayState.Loading:
|
|
311
|
+
retval.textColor = "rgba(0, 0, 0, 0)";
|
|
312
|
+
retval.loaderColor = "blue100";
|
|
313
|
+
break;
|
|
314
|
+
case DisplayState.Pressed:
|
|
315
|
+
retval.textColor = color("blue100");
|
|
316
|
+
retval.textDecorationLine = "underline";
|
|
317
|
+
break;
|
|
318
|
+
default:
|
|
319
|
+
null;
|
|
320
|
+
}
|
|
321
|
+
break;
|
|
322
|
+
default:
|
|
323
|
+
null;
|
|
324
|
+
}
|
|
325
|
+
return retval;
|
|
134
326
|
};
|
|
327
|
+
const Container = (0, native_1.default)(Box_1.Box) `
|
|
328
|
+
position: relative;
|
|
329
|
+
border-width: 1px;
|
|
330
|
+
border-radius: 50px;
|
|
331
|
+
width: ${(p) => (p.block ? "100%" : "auto")};
|
|
332
|
+
overflow: hidden;
|
|
333
|
+
`;
|
|
334
|
+
const SpinnerContainer = (0, native_1.default)(Box_1.Box) `
|
|
335
|
+
position: absolute;
|
|
336
|
+
width: 100%;
|
|
337
|
+
height: 100%;
|
|
338
|
+
align-items: center;
|
|
339
|
+
justify-content: center;
|
|
340
|
+
`;
|
|
341
|
+
const AnimatedContainer = (0, renderprops_native_1.animated)(Container);
|
|
342
|
+
const AnimatedText = (0, renderprops_native_1.animated)(Text_1.Text);
|
|
@@ -2,16 +2,10 @@
|
|
|
2
2
|
import { ButtonProps } from "./Button";
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import("react").FC<ButtonProps>;
|
|
6
6
|
};
|
|
7
7
|
export default _default;
|
|
8
8
|
export declare const Sizes: () => JSX.Element;
|
|
9
9
|
export declare const States: () => JSX.Element;
|
|
10
10
|
export declare const Variants: () => JSX.Element;
|
|
11
11
|
export declare const VariantsLoading: () => JSX.Element;
|
|
12
|
-
export declare const VariantsDisabled: () => JSX.Element;
|
|
13
|
-
export declare const TheFollowButton: () => JSX.Element;
|
|
14
|
-
export declare const TheCTAButton: () => JSX.Element;
|
|
15
|
-
export declare const Miscellaneous: () => JSX.Element;
|
|
16
|
-
export declare const Playground: () => JSX.Element;
|
|
17
|
-
export declare const SpacingAround: () => JSX.Element;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.VariantsLoading = exports.Variants = exports.States = exports.Sizes = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
const react_native_1 = require("react-native");
|
|
8
7
|
const Button_1 = require("./Button");
|
|
9
|
-
const CTAButton_1 = require("./CTAButton");
|
|
10
|
-
const FollowButton_1 = require("./FollowButton");
|
|
11
8
|
const helpers_1 = require("../../storybook/helpers");
|
|
12
|
-
const svgs_1 = require("../../svgs");
|
|
13
9
|
const Wrap_1 = require("../../utils/Wrap");
|
|
14
|
-
const Box_1 = require("../Box");
|
|
15
10
|
const Flex_1 = require("../Flex");
|
|
16
|
-
const Spacer_1 = require("../Spacer");
|
|
17
11
|
const Text_1 = require("../Text");
|
|
18
12
|
const sizes = ["small", "large"];
|
|
19
13
|
const variants = [
|
|
@@ -34,30 +28,15 @@ const Sizes = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data: sizes, r
|
|
|
34
28
|
exports.Sizes = Sizes;
|
|
35
29
|
const States = () => {
|
|
36
30
|
const [variant, setVariant] = (0, react_1.useState)("fillDark");
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", flexWrap: "wrap", px: 2, children: variants.map((v) => ((0, jsx_runtime_1.jsx)(Text_1.LinkText, { color: "orange", onPress: () => setVariant(v), mr: "2", children: v }))) }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), longestText: "Regular YEA", children: "Regular" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), disabled: true, children: "Disabled" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), loading: true, children: "Loading" })
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", flexWrap: "wrap", px: 2, children: variants.map((v) => ((0, jsx_runtime_1.jsx)(Text_1.LinkText, { color: "orange", onPress: () => setVariant(v), mr: "2", children: v }))) }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), longestText: "Regular YEA", children: "Regular" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), disabled: true, children: "Disabled" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), loading: true, children: "Loading" })] }));
|
|
38
32
|
};
|
|
39
33
|
exports.States = States;
|
|
40
34
|
const Variants = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data: variants, renderItem: ({ item: variant }) => ((0, jsx_runtime_1.jsx)(Wrap_1.Wrap, { if: variant === "outlineLight" || variant === "fillLight", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { backgroundColor: "pink", p: 1, children: (0, jsx_runtime_1.jsx)(Wrap_1.Wrap.Content, { children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped ${variant}`), children: variant }) }) }) })) }));
|
|
41
35
|
exports.Variants = Variants;
|
|
42
|
-
const VariantsLoading = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data: variants, renderItem: ({ item: variant }) =>
|
|
36
|
+
const VariantsLoading = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data: variants, renderItem: ({ item: variant }) => {
|
|
37
|
+
if (variant !== "outlineLight") {
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, loading: true, onPress: () => console.log(`tapped ${variant}`), children: variant }));
|
|
39
|
+
}
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { backgroundColor: "pink", py: 0.5, children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, loading: true, onPress: () => console.log(`tapped ${variant}`), children: variant }) }));
|
|
41
|
+
} }));
|
|
43
42
|
exports.VariantsLoading = VariantsLoading;
|
|
44
|
-
const VariantsDisabled = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data: variants, renderItem: ({ item: variant }) => ((0, jsx_runtime_1.jsx)(Wrap_1.Wrap, { if: variant === "outlineLight", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { backgroundColor: "black100", p: 1, children: (0, jsx_runtime_1.jsx)(Wrap_1.Wrap.Content, { children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, disabled: true, onPress: () => console.log(`tapped ${variant}`), children: variant }) }) }) })) }));
|
|
45
|
-
exports.VariantsDisabled = VariantsDisabled;
|
|
46
|
-
const TheFollowButton = () => {
|
|
47
|
-
const [follow, setFollow] = (0, react_1.useState)(true);
|
|
48
|
-
return ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { loading: true, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 4, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 40, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 4000, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 400000, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 40000000, isFollowed: follow, onPress: () => setFollow((v) => !v) })] }));
|
|
49
|
-
};
|
|
50
|
-
exports.TheFollowButton = TheFollowButton;
|
|
51
|
-
const TheCTAButton = () => ((0, jsx_runtime_1.jsx)(helpers_1.List, { children: (0, jsx_runtime_1.jsx)(CTAButton_1.CTAButton, { onPress: () => console.log("pressed"), children: "cta button" }) }));
|
|
52
|
-
exports.TheCTAButton = TheCTAButton;
|
|
53
|
-
const Miscellaneous = () => ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { loading: true, disabled: true, children: "loading and disabled" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { loading: true, disabled: true, icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, {}), children: "loading and disabled with icon" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { block: true, children: "block" }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { backgroundColor: "orange", width: 400, height: 80, alignItems: "center", justifyContent: "center", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "fillLight", icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, {}), children: "left icon" }) }), (0, jsx_runtime_1.jsx)(Button_1.Button, { icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), iconPosition: "right", children: "right icon" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { size: "small", icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), iconPosition: "right", children: "Right Icon Small" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "fillDark", size: "small", icon: (0, jsx_runtime_1.jsx)(svgs_1.BellIcon, { fill: "white100", width: "16px", height: "16px" }), children: "Create Alert" }), (0, jsx_runtime_1.jsxs)(Box_1.Box, { flexDirection: "row", children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { width: 2, height: "100%", backgroundColor: "green100" }), (0, jsx_runtime_1.jsxs)(Box_1.Box, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { size: "small", icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), iconPosition: "right", longestText: "this is a very long text", children: "shortest text" }), (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { y: 1 }), (0, jsx_runtime_1.jsx)(Button_1.Button, { size: "small", icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), iconPosition: "right", longestText: "this is a very long text", children: "this is a very long text" })] }), (0, jsx_runtime_1.jsx)(Box_1.Box, { width: 2, height: "100%", backgroundColor: "green100" })] }), (0, jsx_runtime_1.jsx)(Button_1.Button, { icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), block: true, iconPosition: "left-start", children: "left-start aligned icon" })] }));
|
|
54
|
-
exports.Miscellaneous = Miscellaneous;
|
|
55
|
-
const Playground = () => {
|
|
56
|
-
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
57
|
-
const [disabled, setDisabled] = (0, react_1.useState)(true);
|
|
58
|
-
const [block, setBlock] = (0, react_1.useState)(false);
|
|
59
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_native_1.Button, { title: "loading", onPress: () => setLoading((v) => !v) }), (0, jsx_runtime_1.jsx)(react_native_1.Button, { title: "disabled", onPress: () => setDisabled((v) => !v) }), (0, jsx_runtime_1.jsx)(react_native_1.Button, { title: "block", onPress: () => setBlock((v) => !v) }), (0, jsx_runtime_1.jsx)(helpers_1.List, { children: (0, jsx_runtime_1.jsxs)(Button_1.Button, { loading: loading, disabled: disabled, block: block, longestText: "loading false, disabled false, block false", children: ["loading ", loading ? "true" : "false", ", disabled ", disabled ? "true" : "false", ", block", " ", block ? "true" : "false"] }) })] }));
|
|
60
|
-
};
|
|
61
|
-
exports.Playground = Playground;
|
|
62
|
-
const SpacingAround = () => ((0, jsx_runtime_1.jsxs)(Box_1.Box, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { m: 2, children: "wow 1" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { children: "wow 2" })] }));
|
|
63
|
-
exports.SpacingAround = SpacingAround;
|
|
@@ -7,7 +7,6 @@ const formatLargeNumber_1 = require("../../utils/formatLargeNumber");
|
|
|
7
7
|
const Button_1 = require("../Button");
|
|
8
8
|
const Text_1 = require("../Text");
|
|
9
9
|
const FollowButton = ({ isFollowed, followCount, longestText, loading, ...restProps }) => {
|
|
10
|
-
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: isFollowed ? "outline" : "outlineGray", size: "small", longestText: longestText ? longestText : "Following", icon: isFollowed && !loading && (0, jsx_runtime_1.jsx)(CheckIcon_1.CheckIcon, { fill: "black60", width: "16px", height: "16px" }), loading: loading, ...restProps, children: !!loading ? (`${label} ${followCount && followCount > 1 ? (0, formatLargeNumber_1.formatLargeNumber)(followCount, 1) : ""}`) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", children: label }), !!followCount && followCount > 1 && ((0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: "black60", children: " " + (0, formatLargeNumber_1.formatLargeNumber)(followCount, 1) }))] })) }));
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: isFollowed ? "outline" : "outlineGray", size: "small", longestText: longestText ? longestText : "Following", icon: isFollowed && !loading && (0, jsx_runtime_1.jsx)(CheckIcon_1.CheckIcon, { fill: "black60", width: "16px", height: "16px" }), loading: loading, ...restProps, children: !loading && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", children: isFollowed ? "Following" : "Follow" }), !!followCount && followCount > 1 && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: "black60", children: " " + (0, formatLargeNumber_1.formatLargeNumber)(followCount, 1) }) }))] })) }));
|
|
12
11
|
};
|
|
13
12
|
exports.FollowButton = FollowButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LinkButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Text_1 = require("../Text");
|
|
6
|
+
const Touchable_1 = require("../Touchable");
|
|
7
|
+
const LinkButton = (props) => ((0, jsx_runtime_1.jsx)(Touchable_1.Touchable, { onPress: props.onPress, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { underline: true, ...props }) }));
|
|
8
|
+
exports.LinkButton = LinkButton;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ButtonProps } from "./Button";
|
|
2
2
|
import { NoUndefined } from "../../utils/types";
|
|
3
|
-
type State = "disabled" | "pressed" | "active"
|
|
3
|
+
type State = "disabled" | "pressed" | "active";
|
|
4
4
|
export declare const useColorsForVariantAndState: () => Record<NoUndefined<ButtonProps["variant"]>, Record<State, {
|
|
5
5
|
bg: string;
|
|
6
6
|
border: string;
|
|
7
7
|
text: string;
|
|
8
|
-
loader?: string;
|
|
9
8
|
}>>;
|
|
10
9
|
export {};
|