@via-profit/ui-kit 0.1.0-rc.66 → 0.1.0-rc.68
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/Avatar/AvatarStandard.js +4 -2
- package/Avatar/index.js +0 -1
- package/Calendar/CalendarWeekDayLabel.d.ts +1 -1
- package/PhoneField/templates.js +4 -4
- package/Table/Table.js +55 -0
- package/Typography/Base.d.ts +1 -1
- package/Typography/Blockquote.d.ts +1 -1
- package/Typography/List.d.ts +3 -3
- package/Typography/U.d.ts +1 -1
- package/package.json +32 -32
package/Avatar/AvatarStandard.js
CHANGED
|
@@ -22,6 +22,8 @@ const AvatarBase_1 = __importDefault(require("./AvatarBase"));
|
|
|
22
22
|
const AvatarOnlineBadge_1 = __importDefault(require("./AvatarOnlineBadge"));
|
|
23
23
|
const Container = styled_1.default.span `
|
|
24
24
|
position: relative;
|
|
25
|
+
width: ${({ size }) => (size ? size : '2.5em')};
|
|
26
|
+
height: ${({ size }) => (size ? size : '2.5em')};
|
|
25
27
|
`;
|
|
26
28
|
const StyledStandardAvatar = (0, styled_1.default)(AvatarBase_1.default) `
|
|
27
29
|
color: ${({ $color }) => $color.toString()};
|
|
@@ -65,7 +67,7 @@ const StyledStandardAvatar = (0, styled_1.default)(AvatarBase_1.default) `
|
|
|
65
67
|
}}
|
|
66
68
|
`;
|
|
67
69
|
const AvatarStandard = (props, ref) => {
|
|
68
|
-
const { children, color, onClick, isOnline } = props, restProps = __rest(props, ["children", "color", "onClick", "isOnline"]);
|
|
70
|
+
const { children, color, onClick, isOnline, size } = props, restProps = __rest(props, ["children", "color", "onClick", "isOnline", "size"]);
|
|
69
71
|
const theme = (0, react_2.useTheme)();
|
|
70
72
|
const clickable = react_1.default.useMemo(() => typeof onClick === 'function', [onClick]);
|
|
71
73
|
const { $background, $color } = react_1.default.useMemo(() => {
|
|
@@ -111,7 +113,7 @@ const AvatarStandard = (props, ref) => {
|
|
|
111
113
|
}
|
|
112
114
|
}, [color, theme.color]);
|
|
113
115
|
return (react_1.default.createElement(Container, null,
|
|
114
|
-
react_1.default.createElement(StyledStandardAvatar, Object.assign({ variant: "circular", "$clickable": clickable, "$color": $color, "$background": $background, color: color, onClick: onClick }, restProps, { tabIndex: clickable ? 0 : -1, ref: ref }), children),
|
|
116
|
+
react_1.default.createElement(StyledStandardAvatar, Object.assign({ variant: "circular", "$clickable": clickable, "$color": $color, "$background": $background, color: color, onClick: onClick, size: size }, restProps, { tabIndex: clickable ? 0 : -1, ref: ref }), children),
|
|
115
117
|
isOnline && react_1.default.createElement(AvatarOnlineBadge_1.default, null)));
|
|
116
118
|
};
|
|
117
119
|
exports.default = react_1.default.forwardRef(AvatarStandard);
|
package/Avatar/index.js
CHANGED
|
@@ -5,6 +5,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const AvatarStandard_1 = __importDefault(require("./AvatarStandard"));
|
|
8
|
-
//TODO add documentation
|
|
9
8
|
const Avatar = (props, ref) => (react_1.default.createElement(AvatarStandard_1.default, Object.assign({}, props, { ref: ref })));
|
|
10
9
|
exports.default = react_1.default.forwardRef(Avatar);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const _default: React.NamedExoticComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: React.ElementType<any> | undefined;
|
|
4
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
5
5
|
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>>;
|
|
6
6
|
export default _default;
|
package/PhoneField/templates.js
CHANGED
|
@@ -15,8 +15,8 @@ const US_1 = __importDefault(require("../CountryFlags/US"));
|
|
|
15
15
|
const IL_1 = __importDefault(require("../CountryFlags/IL"));
|
|
16
16
|
exports.templates = [
|
|
17
17
|
// Russian template
|
|
18
|
-
['RU', react_1.default.createElement(RU_1.default, { key: "ru-1" }), '7', '+x (xxx) xxx-xx-xx', '+7 (987) 654-32-10', /^\+$/],
|
|
19
|
-
['RU', react_1.default.createElement(RU_1.default, { key: "ru-2" }), '7', '8 (xxx) xxx-xx-xx', '8 (987) 654-32-10', /^8[^1]{0,}/],
|
|
18
|
+
['RU', react_1.default.createElement(RU_1.default, { key: "ru-1" }), '7', '+x (xxx) xxx-xx-xx', '+7 (987) 654-32-10', /^\+$/], // must be at first (Default RU)
|
|
19
|
+
['RU', react_1.default.createElement(RU_1.default, { key: "ru-2" }), '7', '8 (xxx) xxx-xx-xx', '8 (987) 654-32-10', /^8[^1]{0,}/], // 8912...
|
|
20
20
|
[
|
|
21
21
|
'RU',
|
|
22
22
|
react_1.default.createElement(RU_1.default, { key: "ru-3" }),
|
|
@@ -24,7 +24,7 @@ exports.templates = [
|
|
|
24
24
|
'+7 (xxx) xxx-xx-xx',
|
|
25
25
|
'+7 (987) 654-32-10',
|
|
26
26
|
/^\+{0,1}7([0-5]|[8-9])[0-9][0-9]/,
|
|
27
|
-
],
|
|
27
|
+
], // +79...
|
|
28
28
|
// Other fucking countries
|
|
29
29
|
['BY', react_1.default.createElement(BY_1.default, { key: "by" }), '375', '+375 (xx) xxx-xx-xx', '+375 (98) 765-43-21', /^\+{0,1}375/],
|
|
30
30
|
['KZ', react_1.default.createElement(KZ_1.default, { key: "kz-1" }), '7', '+997 (xx) xxx-xx-xx', '+997 (98) 765-43-21', /^\+{0,1}997/],
|
|
@@ -35,7 +35,7 @@ exports.templates = [
|
|
|
35
35
|
'+7 (xxx) xxx-xx-xx',
|
|
36
36
|
'+7 (600) 765-43-21',
|
|
37
37
|
/^\+{0,1}7[6-7][0-9][0-9]/,
|
|
38
|
-
],
|
|
38
|
+
], // +7600 - +7700
|
|
39
39
|
['UA', react_1.default.createElement(UA_1.default, { key: "ua" }), '380', '+380 (xx) xxx-xxxx', '+380 (98) 765-4321', /^\+{0,1}380/],
|
|
40
40
|
['JP', react_1.default.createElement(JP_1.default, { key: "jp" }), '81', '+81 (xx) xxx-xxxx', '+81 (98) 765-4321', /^\+{0,1}81/],
|
|
41
41
|
['US', react_1.default.createElement(US_1.default, { key: "us" }), '1', '+1 xxx xxx-xx-xx', '+1 987 654-32-10', /^\+{0,1}1/],
|
package/Table/Table.js
CHANGED
|
@@ -37,6 +37,61 @@ const StyledTable = styled_1.default.table `
|
|
|
37
37
|
(0, react_2.css) `
|
|
38
38
|
width: 100%;
|
|
39
39
|
`};
|
|
40
|
+
|
|
41
|
+
@media only screen and (max-width: 1200px) {
|
|
42
|
+
/* Force table to not be like tables anymore */
|
|
43
|
+
table,
|
|
44
|
+
thead,
|
|
45
|
+
tbody,
|
|
46
|
+
th,
|
|
47
|
+
td,
|
|
48
|
+
tr {
|
|
49
|
+
display: block;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Hide table headers (but not display: none;, for accessibility) */
|
|
53
|
+
thead tr {
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: -9999px;
|
|
56
|
+
left: -9999px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
tr {
|
|
60
|
+
margin: 0 0 1rem 0;
|
|
61
|
+
background: ${({ theme }) => theme.color.surface.toString()};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
tr:nth-of-type(odd) {
|
|
65
|
+
background: ${({ theme }) => theme.color.surface.darken(30).toString()};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
td {
|
|
69
|
+
/* Behave like a "row" */
|
|
70
|
+
border: none;
|
|
71
|
+
border-bottom: 1px solid
|
|
72
|
+
${({ theme }) => theme.color.surface.darken(20).alpha(0.8).toString()};
|
|
73
|
+
position: relative;
|
|
74
|
+
padding-left: 50%;
|
|
75
|
+
text-align: left !important;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
tr:nth-of-type(odd) td {
|
|
79
|
+
border-bottom: 1px solid
|
|
80
|
+
${({ theme }) => theme.color.surface.darken(50).alpha(0.8).toString()};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
td:before {
|
|
84
|
+
/* Now like a table header */
|
|
85
|
+
position: absolute;
|
|
86
|
+
/* Top/left values mimic padding */
|
|
87
|
+
top: 50%;
|
|
88
|
+
transform: translateY(-50%);
|
|
89
|
+
left: 1em;
|
|
90
|
+
width: 45%;
|
|
91
|
+
padding-right: 1em;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
40
95
|
`;
|
|
41
96
|
const Table = (props, ref) => {
|
|
42
97
|
const { children, fullWidth } = props, nativeProps = __rest(props, ["children", "fullWidth"]);
|
package/Typography/Base.d.ts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
declare const Base: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
8
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
10
10
|
export default Base;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const Blockquote: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, {}>;
|
|
6
6
|
export default Blockquote;
|
package/Typography/List.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Ul: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
|
|
6
6
|
export declare const Ol: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
8
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, {}>;
|
|
10
10
|
export declare const Li: import("@emotion/styled").StyledComponent<{
|
|
11
11
|
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
12
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
13
13
|
}, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
14
14
|
export default Ul;
|
package/Typography/U.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const U: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
6
6
|
export default U;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@via-profit/ui-kit",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.68",
|
|
4
4
|
"description": "UI Kit",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,71 +28,71 @@
|
|
|
28
28
|
"react-dom": "^18.2.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@babel/cli": "^7.23.
|
|
32
|
-
"@babel/core": "^7.23.
|
|
31
|
+
"@babel/cli": "^7.23.4",
|
|
32
|
+
"@babel/core": "^7.23.6",
|
|
33
33
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
34
34
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
35
35
|
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
36
36
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
37
|
-
"@babel/plugin-transform-runtime": "^7.23.
|
|
38
|
-
"@babel/plugin-transform-typescript": "^7.
|
|
39
|
-
"@babel/preset-env": "^7.23.
|
|
40
|
-
"@babel/preset-react": "^7.
|
|
41
|
-
"@babel/preset-typescript": "^7.23.
|
|
42
|
-
"@babel/runtime": "^7.23.
|
|
37
|
+
"@babel/plugin-transform-runtime": "^7.23.6",
|
|
38
|
+
"@babel/plugin-transform-typescript": "^7.23.6",
|
|
39
|
+
"@babel/preset-env": "^7.23.6",
|
|
40
|
+
"@babel/preset-react": "^7.23.3",
|
|
41
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
42
|
+
"@babel/runtime": "^7.23.6",
|
|
43
43
|
"@emotion/babel-plugin": "^11.11.0",
|
|
44
|
-
"@emotion/react": "^11.11.
|
|
44
|
+
"@emotion/react": "^11.11.3",
|
|
45
45
|
"@emotion/styled": "^11.11.0",
|
|
46
46
|
"@loadable/babel-plugin": "^5.16.1",
|
|
47
47
|
"@loadable/webpack-plugin": "^5.15.2",
|
|
48
48
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
49
|
-
"@types/node": "^20.
|
|
50
|
-
"@types/nodemon": "^1.19.
|
|
51
|
-
"@types/react": "^18.2.
|
|
52
|
-
"@types/react-dom": "^18.2.
|
|
53
|
-
"@types/react-slick": "^0.23.
|
|
54
|
-
"@types/webpack-bundle-analyzer": "^4.6.
|
|
55
|
-
"@types/webpack-env": "^1.18.
|
|
56
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
57
|
-
"@typescript-eslint/parser": "^6.
|
|
49
|
+
"@types/node": "^20.10.5",
|
|
50
|
+
"@types/nodemon": "^1.19.6",
|
|
51
|
+
"@types/react": "^18.2.45",
|
|
52
|
+
"@types/react-dom": "^18.2.18",
|
|
53
|
+
"@types/react-slick": "^0.23.13",
|
|
54
|
+
"@types/webpack-bundle-analyzer": "^4.6.3",
|
|
55
|
+
"@types/webpack-env": "^1.18.4",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
|
57
|
+
"@typescript-eslint/parser": "^6.16.0",
|
|
58
58
|
"babel-loader": "^9.1.3",
|
|
59
59
|
"concurrently": "^8.2.2",
|
|
60
60
|
"cross-env": "^7.0.3",
|
|
61
61
|
"dotenv": "^16.3.1",
|
|
62
|
-
"eslint": "^8.
|
|
63
|
-
"eslint-config-prettier": "^9.
|
|
62
|
+
"eslint": "^8.56.0",
|
|
63
|
+
"eslint-config-prettier": "^9.1.0",
|
|
64
64
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
65
65
|
"eslint-import-resolver-node": "^0.3.9",
|
|
66
66
|
"eslint-import-resolver-webpack": "^0.13.8",
|
|
67
67
|
"eslint-plugin-file-progress": "^1.3.0",
|
|
68
|
-
"eslint-plugin-formatjs": "^4.11.
|
|
69
|
-
"eslint-plugin-import": "^2.29.
|
|
68
|
+
"eslint-plugin-formatjs": "^4.11.3",
|
|
69
|
+
"eslint-plugin-import": "^2.29.1",
|
|
70
70
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
71
71
|
"eslint-plugin-node": "^11.1.0",
|
|
72
|
-
"eslint-plugin-prettier": "^5.
|
|
72
|
+
"eslint-plugin-prettier": "^5.1.2",
|
|
73
73
|
"eslint-plugin-promise": "^6.1.1",
|
|
74
74
|
"eslint-plugin-react": "^7.33.2",
|
|
75
75
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
76
76
|
"html-loader": "^4.2.0",
|
|
77
|
-
"html-webpack-plugin": "^5.
|
|
78
|
-
"nodemon": "^3.0.
|
|
77
|
+
"html-webpack-plugin": "^5.6.0",
|
|
78
|
+
"nodemon": "^3.0.2",
|
|
79
79
|
"nodemon-webpack-plugin": "^4.8.2",
|
|
80
80
|
"npm-run-all": "^4.1.5",
|
|
81
|
-
"prettier": "^3.
|
|
81
|
+
"prettier": "^3.1.1",
|
|
82
82
|
"raw-loader": "^4.0.2",
|
|
83
83
|
"react": "^18.2.0",
|
|
84
84
|
"react-dom": "^18.2.0",
|
|
85
85
|
"react-refresh": "^0.14.0",
|
|
86
|
-
"react-router-dom": "^6.
|
|
86
|
+
"react-router-dom": "^6.21.1",
|
|
87
87
|
"react-test-renderer": "^18.2.0",
|
|
88
88
|
"shebang-loader": "^0.0.1",
|
|
89
89
|
"terser-webpack-plugin": "^5.3.9",
|
|
90
|
-
"ts-node": "^10.9.
|
|
91
|
-
"type-fest": "^4.
|
|
92
|
-
"typescript": "^5.
|
|
90
|
+
"ts-node": "^10.9.2",
|
|
91
|
+
"type-fest": "^4.8.3",
|
|
92
|
+
"typescript": "^5.3.3",
|
|
93
93
|
"url-loader": "^4.1.1",
|
|
94
94
|
"webpack": "^5.89.0",
|
|
95
|
-
"webpack-bundle-analyzer": "^4.
|
|
95
|
+
"webpack-bundle-analyzer": "^4.10.1",
|
|
96
96
|
"webpack-cli": "^5.1.4",
|
|
97
97
|
"webpack-dev-server": "^4.15.1"
|
|
98
98
|
}
|