@qiwi/pijma-mobile 1.152.0 → 1.154.0
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/lib/dts/core/src/alert-block/AlertBlockControl.d.ts +21 -0
- package/lib/dts/core/src/alert-block/index.d.ts +1 -0
- package/lib/dts/core/src/index.d.ts +1 -0
- package/lib/dts/mobile/src/alert-block/AlertBlock.d.ts +8 -0
- package/lib/dts/mobile/src/alert-block/index.d.ts +1 -0
- package/lib/dts/mobile/src/details/Details.d.ts +16 -0
- package/lib/dts/mobile/src/details/index.d.ts +1 -0
- package/lib/dts/mobile/src/index.d.ts +1 -0
- package/lib/es5/alert-block/AlertBlock.js +129 -0
- package/lib/es5/alert-block/index.js +6 -0
- package/lib/es5/button/Button.js +1 -0
- package/lib/es5/details/Details.js +166 -0
- package/lib/es5/details/index.js +6 -0
- package/lib/es5/index.js +1 -0
- package/lib/es6/alert-block/AlertBlock.js +115 -0
- package/lib/es6/alert-block/index.js +1 -0
- package/lib/es6/button/Button.js +1 -0
- package/lib/es6/details/Details.js +146 -0
- package/lib/es6/details/index.js +1 -0
- package/lib/es6/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
export interface AlertBlockControlProps {
|
|
3
|
+
onHide?: () => void;
|
|
4
|
+
children: FC<{
|
|
5
|
+
closeHover: boolean;
|
|
6
|
+
onCloseClick: React.MouseEventHandler;
|
|
7
|
+
onCloseMouseEnter: React.MouseEventHandler;
|
|
8
|
+
onCloseMouseLeave: React.MouseEventHandler;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export interface AlertBlockControlState {
|
|
12
|
+
closeHover: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare class AlertBlockControl extends React.Component<AlertBlockControlProps> {
|
|
15
|
+
static displayName: string;
|
|
16
|
+
state: AlertBlockControlState;
|
|
17
|
+
private onCloseClick;
|
|
18
|
+
private onCloseMouseEnter;
|
|
19
|
+
private onCloseMouseLeave;
|
|
20
|
+
render(): React.ReactElement<any, any> | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AlertBlockControl';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface AlertBlockProps {
|
|
3
|
+
type: 'success' | 'warning' | 'waiting' | 'failure' | 'info' | 'promo';
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
onHide?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const AlertBlock: FC<AlertBlockProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AlertBlock';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Value } from '@qiwi/pijma-core';
|
|
2
|
+
import { FC, ReactElement } from 'react';
|
|
3
|
+
declare type DetailsText = ReactElement | string;
|
|
4
|
+
export interface DetailsProps {
|
|
5
|
+
children: {
|
|
6
|
+
title: DetailsText;
|
|
7
|
+
content: DetailsText | DetailsText[];
|
|
8
|
+
}[];
|
|
9
|
+
dots?: boolean;
|
|
10
|
+
titleWidth?: Value;
|
|
11
|
+
contentWidth?: Value;
|
|
12
|
+
size?: 's' | 'm';
|
|
13
|
+
stub?: boolean | number[];
|
|
14
|
+
}
|
|
15
|
+
export declare const Details: FC<DetailsProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Details';
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "AlertBlock", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return AlertBlock;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _pijmaCore = require("@qiwi/pijma-core");
|
|
14
|
+
var _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
15
|
+
var _typography = require("../typography/index.js");
|
|
16
|
+
var AlertBlockBackground = {
|
|
17
|
+
success: "#EDF8EF",
|
|
18
|
+
waiting: "#FFF8E6",
|
|
19
|
+
warning: "#FF8C001A",
|
|
20
|
+
failure: "#FAE6E8",
|
|
21
|
+
info: "#F5F5F5",
|
|
22
|
+
promo: "#2D3540"
|
|
23
|
+
};
|
|
24
|
+
var AlertBlockIcon = {
|
|
25
|
+
success: {
|
|
26
|
+
name: "success",
|
|
27
|
+
color: "#4BBD5C",
|
|
28
|
+
bg: "#fff"
|
|
29
|
+
},
|
|
30
|
+
waiting: {
|
|
31
|
+
name: "clock-solid",
|
|
32
|
+
color: "#FFB800",
|
|
33
|
+
bg: "#fff"
|
|
34
|
+
},
|
|
35
|
+
warning: {
|
|
36
|
+
name: "attention",
|
|
37
|
+
color: "#FF8C00",
|
|
38
|
+
bg: "#fff"
|
|
39
|
+
},
|
|
40
|
+
failure: {
|
|
41
|
+
name: "attention",
|
|
42
|
+
color: "#D0021B",
|
|
43
|
+
bg: "#fff"
|
|
44
|
+
},
|
|
45
|
+
info: {
|
|
46
|
+
name: "info",
|
|
47
|
+
color: "#E6E6E6",
|
|
48
|
+
bg: "#666666"
|
|
49
|
+
},
|
|
50
|
+
promo: {
|
|
51
|
+
name: "success",
|
|
52
|
+
color: "#4BBD5C",
|
|
53
|
+
bg: "#fff"
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var AlertBlock = function(param) {
|
|
57
|
+
var children = param.children, icon = param.icon, type = param.type, onHide = param.onHide;
|
|
58
|
+
var iconComponent = /*#__PURE__*/ (0, _react.isValidElement)(icon) ? icon : icon === undefined ? /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_pijmaCore.Pos, {
|
|
59
|
+
type: "relative",
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Pos, {
|
|
62
|
+
type: "absolute",
|
|
63
|
+
top: "4px",
|
|
64
|
+
left: "4px",
|
|
65
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Card, {
|
|
66
|
+
bg: AlertBlockIcon[type].bg,
|
|
67
|
+
width: 4,
|
|
68
|
+
height: 4,
|
|
69
|
+
r: 8
|
|
70
|
+
})
|
|
71
|
+
}),
|
|
72
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Pos, {
|
|
73
|
+
type: "relative",
|
|
74
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Icon, {
|
|
75
|
+
name: AlertBlockIcon[type].name,
|
|
76
|
+
size: 6,
|
|
77
|
+
color: AlertBlockIcon[type].color
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
}) : null;
|
|
82
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.AlertBlockControl, {
|
|
83
|
+
onHide: onHide,
|
|
84
|
+
children: function(renderProps) {
|
|
85
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Block, {
|
|
86
|
+
bg: AlertBlockBackground[type],
|
|
87
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_pijmaCore.FlexPos, {
|
|
88
|
+
display: "flex",
|
|
89
|
+
type: "relative",
|
|
90
|
+
py: 4,
|
|
91
|
+
pl: 4,
|
|
92
|
+
pr: onHide !== undefined ? 14 : 4,
|
|
93
|
+
children: [
|
|
94
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.FlexItem, {
|
|
95
|
+
mr: 2,
|
|
96
|
+
children: iconComponent
|
|
97
|
+
}),
|
|
98
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.FlexItem, {
|
|
99
|
+
my: "2px",
|
|
100
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Paragraph, {
|
|
101
|
+
size: "s",
|
|
102
|
+
bold: true,
|
|
103
|
+
color: type === "promo" ? "inverse" : "default",
|
|
104
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Breaker, {
|
|
105
|
+
children: children
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
}),
|
|
109
|
+
onHide !== undefined ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Pos, {
|
|
110
|
+
cursor: "pointer",
|
|
111
|
+
type: "absolute",
|
|
112
|
+
right: 4,
|
|
113
|
+
top: 4,
|
|
114
|
+
onClick: renderProps.onCloseClick,
|
|
115
|
+
onMouseEnter: renderProps.onCloseMouseEnter,
|
|
116
|
+
onMouseLeave: renderProps.onCloseMouseLeave,
|
|
117
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Icon, {
|
|
118
|
+
color: type === "promo" ? "#999" : "#666",
|
|
119
|
+
size: 6,
|
|
120
|
+
name: "cross-small"
|
|
121
|
+
})
|
|
122
|
+
}) : null
|
|
123
|
+
]
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
AlertBlock.displayName = "AlertBlock";
|
package/lib/es5/button/Button.js
CHANGED
|
@@ -157,6 +157,7 @@ var Button = function(props) {
|
|
|
157
157
|
width: iconSize[props.size],
|
|
158
158
|
height: iconSize[props.size],
|
|
159
159
|
transition: "all 300ms cubic-bezier(0.4, 0.0, 0.2, 1)",
|
|
160
|
+
transform: "translateZ(0)",
|
|
160
161
|
children: /*#__PURE__*/ _react.default.cloneElement(props.icon, {
|
|
161
162
|
color: props.disabled ? "#666" : props.kind === "brand" ? "#fff" : "#000",
|
|
162
163
|
size: 1
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "Details", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return Details;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _pijmaCore = require("@qiwi/pijma-core");
|
|
14
|
+
var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
|
|
15
|
+
var _typography = require("../typography/index.js");
|
|
16
|
+
var indentDots = {
|
|
17
|
+
s: "6px",
|
|
18
|
+
m: "8px"
|
|
19
|
+
};
|
|
20
|
+
var bottomDots = {
|
|
21
|
+
s: "5px",
|
|
22
|
+
m: "7px"
|
|
23
|
+
};
|
|
24
|
+
var Details = function(param) {
|
|
25
|
+
var children = param.children, dots = param.dots, titleWidth = param.titleWidth, contentWidth = param.contentWidth, _size = param.size, size = _size === void 0 ? "s" : _size, _stub = param.stub, stub = _stub === void 0 ? false : _stub;
|
|
26
|
+
return stub ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
|
|
27
|
+
as: "dl",
|
|
28
|
+
width: "100%",
|
|
29
|
+
display: "table",
|
|
30
|
+
children: (Array.isArray(stub) ? stub : [
|
|
31
|
+
0.4,
|
|
32
|
+
0.5,
|
|
33
|
+
0.3
|
|
34
|
+
]).map(function(width, i) {
|
|
35
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_pijmaCore.Box, {
|
|
36
|
+
css: {
|
|
37
|
+
display: "table-row"
|
|
38
|
+
},
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
|
|
41
|
+
as: "dt",
|
|
42
|
+
width: titleWidth || 0.5,
|
|
43
|
+
pt: i !== 0 ? 2 : undefined,
|
|
44
|
+
css: {
|
|
45
|
+
display: "table-cell",
|
|
46
|
+
verticalAlign: "bottom"
|
|
47
|
+
},
|
|
48
|
+
children: dots ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Pos, {
|
|
49
|
+
type: "relative",
|
|
50
|
+
overflow: "hidden",
|
|
51
|
+
css: {
|
|
52
|
+
":after": {
|
|
53
|
+
content: '""',
|
|
54
|
+
position: "absolute",
|
|
55
|
+
bottom: bottomDots[size],
|
|
56
|
+
borderBottom: "dashed 1px #e6e6e6",
|
|
57
|
+
width: "100%",
|
|
58
|
+
marginLeft: width * 100 + "%"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
|
|
62
|
+
width: width,
|
|
63
|
+
pr: indentDots[size],
|
|
64
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
65
|
+
display: "block",
|
|
66
|
+
size: size,
|
|
67
|
+
stub: true
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
}) : /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
|
|
71
|
+
width: width,
|
|
72
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
73
|
+
display: "block",
|
|
74
|
+
size: size,
|
|
75
|
+
stub: true
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
|
|
80
|
+
as: "dd",
|
|
81
|
+
width: contentWidth || 0.5,
|
|
82
|
+
pt: i !== 0 ? 2 : undefined,
|
|
83
|
+
css: {
|
|
84
|
+
display: "table-cell",
|
|
85
|
+
verticalAlign: "bottom"
|
|
86
|
+
},
|
|
87
|
+
pl: indentDots[size],
|
|
88
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
|
|
89
|
+
width: 1 - width,
|
|
90
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
91
|
+
display: "block",
|
|
92
|
+
size: size,
|
|
93
|
+
stub: true
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}, "" + i);
|
|
99
|
+
})
|
|
100
|
+
}) : /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
|
|
101
|
+
as: "dl",
|
|
102
|
+
width: "100%",
|
|
103
|
+
display: "table",
|
|
104
|
+
children: children.map(function(item, i) {
|
|
105
|
+
return [].concat(item.content).map(function(content, j) {
|
|
106
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_pijmaCore.Box, {
|
|
107
|
+
css: {
|
|
108
|
+
display: "table-row"
|
|
109
|
+
},
|
|
110
|
+
children: [
|
|
111
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
|
|
112
|
+
as: "dt",
|
|
113
|
+
width: titleWidth,
|
|
114
|
+
pt: j !== 0 || i !== 0 ? 2 : undefined,
|
|
115
|
+
css: {
|
|
116
|
+
display: "table-cell",
|
|
117
|
+
verticalAlign: "bottom"
|
|
118
|
+
},
|
|
119
|
+
children: j === 0 ? dots ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Pos, {
|
|
120
|
+
type: "relative",
|
|
121
|
+
overflow: "hidden",
|
|
122
|
+
css: {
|
|
123
|
+
":after": {
|
|
124
|
+
content: '""',
|
|
125
|
+
position: "absolute",
|
|
126
|
+
bottom: bottomDots[size],
|
|
127
|
+
borderBottom: "dashed 1px #e6e6e6",
|
|
128
|
+
width: "100%",
|
|
129
|
+
marginLeft: indentDots[size]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
133
|
+
bold: false,
|
|
134
|
+
size: size,
|
|
135
|
+
color: "support",
|
|
136
|
+
children: item.title
|
|
137
|
+
})
|
|
138
|
+
}) : /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
139
|
+
color: "support",
|
|
140
|
+
bold: false,
|
|
141
|
+
size: size,
|
|
142
|
+
children: item.title
|
|
143
|
+
}) : null
|
|
144
|
+
}),
|
|
145
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
|
|
146
|
+
as: "dd",
|
|
147
|
+
width: contentWidth,
|
|
148
|
+
pt: j !== 0 || i !== 0 ? 2 : undefined,
|
|
149
|
+
css: {
|
|
150
|
+
display: "table-cell",
|
|
151
|
+
verticalAlign: "bottom"
|
|
152
|
+
},
|
|
153
|
+
pl: indentDots[size],
|
|
154
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
155
|
+
bold: false,
|
|
156
|
+
size: size,
|
|
157
|
+
children: content
|
|
158
|
+
})
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
}, i + "." + j);
|
|
162
|
+
});
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
Details.displayName = "Details";
|
package/lib/es5/index.js
CHANGED
|
@@ -18,6 +18,7 @@ _export(exports, {
|
|
|
18
18
|
});
|
|
19
19
|
var _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
|
20
20
|
_exportStar(require("@qiwi/pijma-core"), exports);
|
|
21
|
+
_exportStar(require("./alert-block/index.js"), exports);
|
|
21
22
|
_exportStar(require("./button/index.js"), exports);
|
|
22
23
|
_exportStar(require("./actions/index.js"), exports);
|
|
23
24
|
var _textField = _exportStar(require("./text-field/index.js"), exports);
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AlertBlockControl, Block, Breaker, Card, FlexItem, FlexPos, Icon, Pos } from '@qiwi/pijma-core';
|
|
3
|
+
import React, { isValidElement } from 'react';
|
|
4
|
+
import { Paragraph } from '../typography/index.js';
|
|
5
|
+
const AlertBlockBackground = {
|
|
6
|
+
success: '#EDF8EF',
|
|
7
|
+
waiting: '#FFF8E6',
|
|
8
|
+
warning: '#FF8C001A',
|
|
9
|
+
failure: '#FAE6E8',
|
|
10
|
+
info: '#F5F5F5',
|
|
11
|
+
promo: '#2D3540'
|
|
12
|
+
};
|
|
13
|
+
const AlertBlockIcon = {
|
|
14
|
+
success: {
|
|
15
|
+
name: 'success',
|
|
16
|
+
color: '#4BBD5C',
|
|
17
|
+
bg: '#fff'
|
|
18
|
+
},
|
|
19
|
+
waiting: {
|
|
20
|
+
name: 'clock-solid',
|
|
21
|
+
color: '#FFB800',
|
|
22
|
+
bg: '#fff'
|
|
23
|
+
},
|
|
24
|
+
warning: {
|
|
25
|
+
name: 'attention',
|
|
26
|
+
color: '#FF8C00',
|
|
27
|
+
bg: '#fff'
|
|
28
|
+
},
|
|
29
|
+
failure: {
|
|
30
|
+
name: 'attention',
|
|
31
|
+
color: '#D0021B',
|
|
32
|
+
bg: '#fff'
|
|
33
|
+
},
|
|
34
|
+
info: {
|
|
35
|
+
name: 'info',
|
|
36
|
+
color: '#E6E6E6',
|
|
37
|
+
bg: '#666666'
|
|
38
|
+
},
|
|
39
|
+
promo: {
|
|
40
|
+
name: 'success',
|
|
41
|
+
color: '#4BBD5C',
|
|
42
|
+
bg: '#fff'
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
export const AlertBlock = ({ children , icon , type , onHide , })=>{
|
|
46
|
+
const iconComponent = /*#__PURE__*/ isValidElement(icon) ? icon : icon === undefined ? /*#__PURE__*/ _jsxs(Pos, {
|
|
47
|
+
type: "relative",
|
|
48
|
+
children: [
|
|
49
|
+
/*#__PURE__*/ _jsx(Pos, {
|
|
50
|
+
type: "absolute",
|
|
51
|
+
top: "4px",
|
|
52
|
+
left: "4px",
|
|
53
|
+
children: /*#__PURE__*/ _jsx(Card, {
|
|
54
|
+
bg: AlertBlockIcon[type].bg,
|
|
55
|
+
width: 4,
|
|
56
|
+
height: 4,
|
|
57
|
+
r: 8
|
|
58
|
+
})
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ _jsx(Pos, {
|
|
61
|
+
type: "relative",
|
|
62
|
+
children: /*#__PURE__*/ _jsx(Icon, {
|
|
63
|
+
name: AlertBlockIcon[type].name,
|
|
64
|
+
size: 6,
|
|
65
|
+
color: AlertBlockIcon[type].color
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}) : null;
|
|
70
|
+
return /*#__PURE__*/ _jsx(AlertBlockControl, {
|
|
71
|
+
onHide: onHide,
|
|
72
|
+
children: (renderProps)=>/*#__PURE__*/ _jsx(Block, {
|
|
73
|
+
bg: AlertBlockBackground[type],
|
|
74
|
+
children: /*#__PURE__*/ _jsxs(FlexPos, {
|
|
75
|
+
display: "flex",
|
|
76
|
+
type: "relative",
|
|
77
|
+
py: 4,
|
|
78
|
+
pl: 4,
|
|
79
|
+
pr: onHide !== undefined ? 14 : 4,
|
|
80
|
+
children: [
|
|
81
|
+
/*#__PURE__*/ _jsx(FlexItem, {
|
|
82
|
+
mr: 2,
|
|
83
|
+
children: iconComponent
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ _jsx(FlexItem, {
|
|
86
|
+
my: "2px",
|
|
87
|
+
children: /*#__PURE__*/ _jsx(Paragraph, {
|
|
88
|
+
size: "s",
|
|
89
|
+
bold: true,
|
|
90
|
+
color: type === 'promo' ? 'inverse' : 'default',
|
|
91
|
+
children: /*#__PURE__*/ _jsx(Breaker, {
|
|
92
|
+
children: children
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
}),
|
|
96
|
+
onHide !== undefined ? /*#__PURE__*/ _jsx(Pos, {
|
|
97
|
+
cursor: "pointer",
|
|
98
|
+
type: "absolute",
|
|
99
|
+
right: 4,
|
|
100
|
+
top: 4,
|
|
101
|
+
onClick: renderProps.onCloseClick,
|
|
102
|
+
onMouseEnter: renderProps.onCloseMouseEnter,
|
|
103
|
+
onMouseLeave: renderProps.onCloseMouseLeave,
|
|
104
|
+
children: /*#__PURE__*/ _jsx(Icon, {
|
|
105
|
+
color: type === 'promo' ? '#999' : '#666',
|
|
106
|
+
size: 6,
|
|
107
|
+
name: "cross-small"
|
|
108
|
+
})
|
|
109
|
+
}) : null
|
|
110
|
+
]
|
|
111
|
+
})
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
AlertBlock.displayName = 'AlertBlock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AlertBlock.js';
|
package/lib/es6/button/Button.js
CHANGED
|
@@ -144,6 +144,7 @@ export const Button = (props)=>{
|
|
|
144
144
|
width: iconSize[props.size],
|
|
145
145
|
height: iconSize[props.size],
|
|
146
146
|
transition: "all 300ms cubic-bezier(0.4, 0.0, 0.2, 1)",
|
|
147
|
+
transform: "translateZ(0)",
|
|
147
148
|
children: /*#__PURE__*/ React.cloneElement(props.icon, {
|
|
148
149
|
color: props.disabled ? '#666' : props.kind === 'brand' ? '#fff' : '#000',
|
|
149
150
|
size: 1
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Pos } from '@qiwi/pijma-core';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Text } from '../typography/index.js';
|
|
5
|
+
const indentDots = {
|
|
6
|
+
s: '6px',
|
|
7
|
+
m: '8px'
|
|
8
|
+
};
|
|
9
|
+
const bottomDots = {
|
|
10
|
+
s: '5px',
|
|
11
|
+
m: '7px'
|
|
12
|
+
};
|
|
13
|
+
export const Details = ({ children , dots , titleWidth , contentWidth , size ='s' , stub =false , })=>stub ? /*#__PURE__*/ _jsx(Box, {
|
|
14
|
+
as: "dl",
|
|
15
|
+
width: "100%",
|
|
16
|
+
display: "table",
|
|
17
|
+
children: (Array.isArray(stub) ? stub : [
|
|
18
|
+
0.4,
|
|
19
|
+
0.5,
|
|
20
|
+
0.3
|
|
21
|
+
]).map((width, i)=>/*#__PURE__*/ _jsxs(Box, {
|
|
22
|
+
css: {
|
|
23
|
+
display: 'table-row'
|
|
24
|
+
},
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
27
|
+
as: "dt",
|
|
28
|
+
width: titleWidth || 0.5,
|
|
29
|
+
pt: i !== 0 ? 2 : undefined,
|
|
30
|
+
css: {
|
|
31
|
+
display: 'table-cell',
|
|
32
|
+
verticalAlign: 'bottom'
|
|
33
|
+
},
|
|
34
|
+
children: dots ? /*#__PURE__*/ _jsx(Pos, {
|
|
35
|
+
type: "relative",
|
|
36
|
+
overflow: "hidden",
|
|
37
|
+
css: {
|
|
38
|
+
':after': {
|
|
39
|
+
content: '""',
|
|
40
|
+
position: 'absolute',
|
|
41
|
+
bottom: bottomDots[size],
|
|
42
|
+
borderBottom: 'dashed 1px #e6e6e6',
|
|
43
|
+
width: '100%',
|
|
44
|
+
marginLeft: width * 100 + '%'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
children: /*#__PURE__*/ _jsx(Box, {
|
|
48
|
+
width: width,
|
|
49
|
+
pr: indentDots[size],
|
|
50
|
+
children: /*#__PURE__*/ _jsx(Text, {
|
|
51
|
+
display: "block",
|
|
52
|
+
size: size,
|
|
53
|
+
stub: true
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
}) : /*#__PURE__*/ _jsx(Box, {
|
|
57
|
+
width: width,
|
|
58
|
+
children: /*#__PURE__*/ _jsx(Text, {
|
|
59
|
+
display: "block",
|
|
60
|
+
size: size,
|
|
61
|
+
stub: true
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
66
|
+
as: "dd",
|
|
67
|
+
width: contentWidth || 0.5,
|
|
68
|
+
pt: i !== 0 ? 2 : undefined,
|
|
69
|
+
css: {
|
|
70
|
+
display: 'table-cell',
|
|
71
|
+
verticalAlign: 'bottom'
|
|
72
|
+
},
|
|
73
|
+
pl: indentDots[size],
|
|
74
|
+
children: /*#__PURE__*/ _jsx(Box, {
|
|
75
|
+
width: 1 - width,
|
|
76
|
+
children: /*#__PURE__*/ _jsx(Text, {
|
|
77
|
+
display: "block",
|
|
78
|
+
size: size,
|
|
79
|
+
stub: true
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
}, `${i}`))
|
|
85
|
+
}) : /*#__PURE__*/ _jsx(Box, {
|
|
86
|
+
as: "dl",
|
|
87
|
+
width: "100%",
|
|
88
|
+
display: "table",
|
|
89
|
+
children: children.map((item, i)=>[].concat(item.content).map((content, j)=>/*#__PURE__*/ _jsxs(Box, {
|
|
90
|
+
css: {
|
|
91
|
+
display: 'table-row'
|
|
92
|
+
},
|
|
93
|
+
children: [
|
|
94
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
95
|
+
as: "dt",
|
|
96
|
+
width: titleWidth,
|
|
97
|
+
pt: j !== 0 || i !== 0 ? 2 : undefined,
|
|
98
|
+
css: {
|
|
99
|
+
display: 'table-cell',
|
|
100
|
+
verticalAlign: 'bottom'
|
|
101
|
+
},
|
|
102
|
+
children: j === 0 ? dots ? /*#__PURE__*/ _jsx(Pos, {
|
|
103
|
+
type: "relative",
|
|
104
|
+
overflow: "hidden",
|
|
105
|
+
css: {
|
|
106
|
+
':after': {
|
|
107
|
+
content: '""',
|
|
108
|
+
position: 'absolute',
|
|
109
|
+
bottom: bottomDots[size],
|
|
110
|
+
borderBottom: 'dashed 1px #e6e6e6',
|
|
111
|
+
width: '100%',
|
|
112
|
+
marginLeft: indentDots[size]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
children: /*#__PURE__*/ _jsx(Text, {
|
|
116
|
+
bold: false,
|
|
117
|
+
size: size,
|
|
118
|
+
color: "support",
|
|
119
|
+
children: item.title
|
|
120
|
+
})
|
|
121
|
+
}) : /*#__PURE__*/ _jsx(Text, {
|
|
122
|
+
color: "support",
|
|
123
|
+
bold: false,
|
|
124
|
+
size: size,
|
|
125
|
+
children: item.title
|
|
126
|
+
}) : null
|
|
127
|
+
}),
|
|
128
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
129
|
+
as: "dd",
|
|
130
|
+
width: contentWidth,
|
|
131
|
+
pt: j !== 0 || i !== 0 ? 2 : undefined,
|
|
132
|
+
css: {
|
|
133
|
+
display: 'table-cell',
|
|
134
|
+
verticalAlign: 'bottom'
|
|
135
|
+
},
|
|
136
|
+
pl: indentDots[size],
|
|
137
|
+
children: /*#__PURE__*/ _jsx(Text, {
|
|
138
|
+
bold: false,
|
|
139
|
+
size: size,
|
|
140
|
+
children: content
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
}, `${i}.${j}`)))
|
|
145
|
+
});
|
|
146
|
+
Details.displayName = 'Details';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Details.js';
|
package/lib/es6/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qiwi/pijma-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.154.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/es5/index.js",
|
|
6
6
|
"module": "./lib/es6/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"lib"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@qiwi/pijma-core": "1.
|
|
40
|
+
"@qiwi/pijma-core": "1.155.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@qiwi/pijma-infra": "1.9.0",
|