@sellout/ui 0.0.65 → 0.0.67
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/build/components/Icon.d.ts +4 -4
- package/build/components/Icons.d.ts +4 -4
- package/build/stories/Button.stories.d.ts +9 -0
- package/build/stories/Counter.stories.d.ts +7 -0
- package/build/stories/Icon.stories.d.ts +7 -0
- package/build/stories/Input.stories.d.ts +9 -0
- package/build/stories/Loader.stories.d.ts +11 -0
- package/build/stories/Product.stories.d.ts +8 -0
- package/package.json +13 -4
- package/build/components/InputOld.js +0 -83
- package/build/components/VerticalUserInfo.d.ts +0 -12
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Colors } from "../Colors";
|
|
3
3
|
export declare const Icons: {
|
|
4
|
-
Amex: import("@fortawesome/
|
|
5
|
-
Discover: import("@fortawesome/
|
|
6
|
-
Mastercard: import("@fortawesome/
|
|
7
|
-
Visa: import("@fortawesome/
|
|
4
|
+
Amex: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
5
|
+
Discover: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
6
|
+
Mastercard: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
7
|
+
Visa: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
8
8
|
AnalyticsLight: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
9
9
|
BellLight: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
10
10
|
BoxOfficeLight: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const IconEnum: {
|
|
2
|
-
Amex: import("@fortawesome/
|
|
3
|
-
Discover: import("@fortawesome/
|
|
4
|
-
Mastercard: import("@fortawesome/
|
|
5
|
-
Visa: import("@fortawesome/
|
|
2
|
+
Amex: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
3
|
+
Discover: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
4
|
+
Mastercard: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
5
|
+
Visa: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
6
6
|
AnalyticsLight: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
7
7
|
BellLight: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
8
8
|
BoxOfficeLight: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { OldButton as component };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export function Text(): JSX.Element;
|
|
7
|
+
export function Loading(): JSX.Element;
|
|
8
|
+
export function MaxWidth(): JSX.Element;
|
|
9
|
+
import OldButton from "../components/Button";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { Input as component };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export function Clear(): JSX.Element;
|
|
7
|
+
export function Submit(): JSX.Element;
|
|
8
|
+
export function Loading(): JSX.Element;
|
|
9
|
+
import Input from "../components/Input";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { Loader as component };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export function VerySmall(): JSX.Element;
|
|
7
|
+
export function Small(): JSX.Element;
|
|
8
|
+
export function Medium(): JSX.Element;
|
|
9
|
+
export function Large(): JSX.Element;
|
|
10
|
+
export function Colored(): JSX.Element;
|
|
11
|
+
import Loader from "../components/Loader";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"module": "build/index.es.js",
|
|
6
6
|
"files": [
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
"typescript": "^3.7.5"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
+
"@apollo/client": "^3.0.0-beta.41",
|
|
47
|
+
"@apollo/react-hooks": "^3.1.3",
|
|
46
48
|
"@fortawesome/fontawesome-svg-core": "^1.2.27",
|
|
47
49
|
"@fortawesome/free-brands-svg-icons": "^5.14.0",
|
|
48
50
|
"@fortawesome/free-regular-svg-icons": "^5.12.1",
|
|
@@ -52,16 +54,23 @@
|
|
|
52
54
|
"@fortawesome/pro-solid-svg-icons": "^5.12.1",
|
|
53
55
|
"@fortawesome/react-fontawesome": "^0.1.9",
|
|
54
56
|
"@hapi/joi": "^17.1.1",
|
|
55
|
-
"@
|
|
57
|
+
"@react-pdf/primitives": "^2.0.0-beta.11",
|
|
58
|
+
"@react-pdf/renderer": "^2.0.0-beta.14",
|
|
59
|
+
"@sellout/models": "^0.0.67",
|
|
60
|
+
"@sellout/utils": "^0.0.67",
|
|
56
61
|
"@types/escape-html": "^1.0.0",
|
|
57
62
|
"@types/hapi__joi": "^16.0.12",
|
|
63
|
+
"@types/react-pdf": "^4.0.6",
|
|
64
|
+
"@types/shortid": "0.0.29",
|
|
58
65
|
"csvtojson": "^2.0.10",
|
|
59
66
|
"framer-motion": "^2.3.0",
|
|
60
67
|
"polished": "^3.4.4",
|
|
61
68
|
"react-animate-height": "^2.0.20",
|
|
62
|
-
"react-phone-input-2": "^2.13.7"
|
|
69
|
+
"react-phone-input-2": "^2.13.7",
|
|
70
|
+
"rollup-plugin-url": "^3.0.1",
|
|
71
|
+
"shortid": "^2.2.15"
|
|
63
72
|
},
|
|
64
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "c54371e8d53146a1650b287c69e6d4d585256c3d",
|
|
65
74
|
"peerDependencies": {
|
|
66
75
|
"react": "^16.13.0",
|
|
67
76
|
"react-dom": "^16.13.0",
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { Colors } from '../Colors.js';
|
|
2
|
-
import { __makeTemplateObject } from '../_virtual/_tslib.js';
|
|
3
|
-
import React, { useState, Fragment } from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import { lighten, darken } from 'polished';
|
|
6
|
-
import Icon, { Icons } from './Icon.js';
|
|
7
|
-
import Loader, { LoaderSizes } from './Loader.js';
|
|
8
|
-
|
|
9
|
-
var Form = styled.form(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n display: flex;\n flex-direction: row;\n position: relative;\n border-radius: 10px;\n transition: all 0.2s;\n border: 1px solid\n ", ";\n"], ["\n width: ", ";\n display: flex;\n flex-direction: row;\n position: relative;\n border-radius: 10px;\n transition: all 0.2s;\n border: 1px solid\n ",
|
|
10
|
-
";\n"])), function (props) { return props.width; }, function (props) {
|
|
11
|
-
if (props.focused)
|
|
12
|
-
return Colors.Grey3;
|
|
13
|
-
if (props.hovered)
|
|
14
|
-
return Colors.Grey4;
|
|
15
|
-
return Colors.Grey5;
|
|
16
|
-
});
|
|
17
|
-
var Button = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n height: 50px;\n width: 50px;\n border-radius: 0 10px 10px 0;\n top: -1px;\n right: -1px;\n transition: all 0.2s;\n background-color: ", ";\n\n &:hover {\n cursor: ", ";\n background-color: ", ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ", ";\n }\n"], ["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n height: 50px;\n width: 50px;\n border-radius: 0 10px 10px 0;\n top: -1px;\n right: -1px;\n transition: all 0.2s;\n background-color: ",
|
|
18
|
-
";\n\n &:hover {\n cursor: ", ";\n background-color: ",
|
|
19
|
-
";\n }\n\n &:active {\n cursor: ", ";\n background-color: ",
|
|
20
|
-
";\n }\n"])), Colors.White, function (props) {
|
|
21
|
-
return props.canSubmit ? Colors.Orange : Colors.Grey6;
|
|
22
|
-
}, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
|
|
23
|
-
return props.canSubmit ? lighten(0.025, Colors.Orange) : null;
|
|
24
|
-
}, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
|
|
25
|
-
return props.canSubmit ? darken(0.025, Colors.Orange) : null;
|
|
26
|
-
});
|
|
27
|
-
var LeftContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 15px;\n top: 0px;\n left: 0px;\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 15px;\n top: 0px;\n left: 0px;\n"])));
|
|
28
|
-
var RightContainer = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 50px;\n width: 50px;\n top: -1px;\n right: -1px;\n\n &:hover {\n cursor: ", ";\n }\n"], ["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 50px;\n width: 50px;\n top: -1px;\n right: -1px;\n\n &:hover {\n cursor: ", ";\n }\n"])), function (props) { return (props.onClick ? "pointer" : null); });
|
|
29
|
-
var Spacer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 50px;\n"], ["\n width: 50px;\n"])));
|
|
30
|
-
var InputStyled = styled.input(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n outline: none;\n border: 0px;\n border-radius: 10px;\n height: 48px;\n width: fill-available;\n font-size: 1.4rem;\n font-weight: 500;\n padding: 0 0 0 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n \n ::placeholder {\n color: ", ";\n }\n"], ["\n background-color: ", ";\n color: ", ";\n outline: none;\n border: 0px;\n border-radius: 10px;\n height: 48px;\n width: fill-available;\n font-size: 1.4rem;\n font-weight: 500;\n padding: 0 0 0 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n \n ::placeholder {\n color: ", ";\n }\n"])), Colors.White, Colors.Grey1, function (props) { return props.margin; }, function (props) { return props.padding; }, Colors.Grey4);
|
|
31
|
-
function Input(_a) {
|
|
32
|
-
var inputRef = _a.inputRef, autoFocus = _a.autoFocus, placeholder = _a.placeholder, value = _a.value, defaultValue = _a.defaultValue, icon = _a.icon, _b = _a.type, type = _b === void 0 ? 'text' : _b, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, onSubmit = _a.onSubmit, onClear = _a.onClear, _c = _a.canSubmit, canSubmit = _c === void 0 ? true : _c, loading = _a.loading, margin = _a.margin, padding = _a.padding, width = _a.width;
|
|
33
|
-
var _d = useState(false), hovered = _d[0], setHovered = _d[1];
|
|
34
|
-
var _e = useState(false), focused = _e[0], setFocused = _e[1];
|
|
35
|
-
var submit = function (event) {
|
|
36
|
-
event.preventDefault();
|
|
37
|
-
if (onSubmit && canSubmit && !loading) {
|
|
38
|
-
onSubmit();
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
return (React.createElement(Form, { hovered: hovered, focused: focused, onSubmit: function (event) { return submit(event); }, width: width },
|
|
42
|
-
icon && (React.createElement(LeftContainer, null,
|
|
43
|
-
React.createElement(Icon, { icon: icon, size: 16, color: focused ? Colors.Grey1 : Colors.Grey4 }))),
|
|
44
|
-
React.createElement(InputStyled, { ref: inputRef, autoFocus: autoFocus, placeholder: placeholder, value: value, defaultValue: defaultValue, type: type, onChange: onChange, onFocus: function (event) {
|
|
45
|
-
setFocused(true);
|
|
46
|
-
if (onFocus)
|
|
47
|
-
onFocus(event);
|
|
48
|
-
}, onBlur: function (event) {
|
|
49
|
-
setFocused(false);
|
|
50
|
-
if (onFocus)
|
|
51
|
-
onBlur(event);
|
|
52
|
-
}, onMouseEnter: function (event) {
|
|
53
|
-
setHovered(true);
|
|
54
|
-
if (onMouseEnter)
|
|
55
|
-
onMouseEnter(event);
|
|
56
|
-
}, onMouseLeave: function (event) {
|
|
57
|
-
setHovered(false);
|
|
58
|
-
if (onMouseLeave)
|
|
59
|
-
onMouseLeave(event);
|
|
60
|
-
}, margin: margin, padding: padding }),
|
|
61
|
-
(function () {
|
|
62
|
-
if (onSubmit) {
|
|
63
|
-
return (React.createElement(Fragment, null,
|
|
64
|
-
React.createElement(Spacer, null),
|
|
65
|
-
React.createElement(Button, { canSubmit: canSubmit, onClick: function (event) { return submit(event); } }, (function () {
|
|
66
|
-
if (loading) {
|
|
67
|
-
return React.createElement(Loader, { size: LoaderSizes.VerySmall });
|
|
68
|
-
}
|
|
69
|
-
return (React.createElement(Icon, { icon: Icons.RightChevronCircle, color: canSubmit ? Colors.White : Colors.Grey4, size: 16 }));
|
|
70
|
-
})())));
|
|
71
|
-
}
|
|
72
|
-
if (Boolean(value) && onClear) {
|
|
73
|
-
return (React.createElement(Fragment, null,
|
|
74
|
-
React.createElement(Spacer, null),
|
|
75
|
-
React.createElement(RightContainer, { onClick: function () { return onClear(); } },
|
|
76
|
-
React.createElement(Icon, { icon: Icons.CancelCircle, color: Colors.Grey3, size: 16 }))));
|
|
77
|
-
}
|
|
78
|
-
return React.createElement(Spacer, null);
|
|
79
|
-
})()));
|
|
80
|
-
}
|
|
81
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
82
|
-
|
|
83
|
-
export default Input;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare enum UserInfoSizeEnum {
|
|
3
|
-
Regular = "Regular",
|
|
4
|
-
Large = "Large"
|
|
5
|
-
}
|
|
6
|
-
declare type UserInfoPropTypes = {
|
|
7
|
-
user?: any;
|
|
8
|
-
size?: UserInfoSizeEnum;
|
|
9
|
-
invert?: boolean;
|
|
10
|
-
};
|
|
11
|
-
declare const VerticalUserInfo: React.FC<UserInfoPropTypes>;
|
|
12
|
-
export default VerticalUserInfo;
|