@qiwi/pijma-mobile 1.158.0 → 1.159.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/package.json +1 -1
- package/target/dts/extended-progress-bar/ExtendedProgressBar.d.ts +1 -0
- package/target/dts/index.d.ts +1 -0
- package/target/es5/extended-progress-bar/ExtendedProgressBar.js +7 -7
- package/target/es5/index.js +1 -0
- package/target/es6/extended-progress-bar/ExtendedProgressBar.js +7 -7
- package/target/es6/index.js +1 -0
package/package.json
CHANGED
package/target/dts/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export * from './alert';
|
|
|
32
32
|
export * from './rating';
|
|
33
33
|
export * from './content-suggest';
|
|
34
34
|
export * from './progress-bar';
|
|
35
|
+
export * from './extended-progress-bar';
|
|
35
36
|
export * from './alert';
|
|
36
37
|
export * from './logo-block-link';
|
|
37
38
|
export * from './suggest-field';
|
|
@@ -14,7 +14,7 @@ var _pijmaCore = require("@qiwi/pijma-core");
|
|
|
14
14
|
var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
|
|
15
15
|
var _typography = require("../typography/index.js");
|
|
16
16
|
var ExtendedProgressBar = function(param) {
|
|
17
|
-
var value = param.value, _maxValue = param.maxValue, maxValue = _maxValue === void 0 ? 1 : _maxValue, titleStart = param.titleStart, titleEnd = param.titleEnd, _stub = param.stub, stub = _stub === void 0 ? false : _stub, formatValue = param.formatValue;
|
|
17
|
+
var value = param.value, _maxValue = param.maxValue, maxValue = _maxValue === void 0 ? 1 : _maxValue, titleStart = param.titleStart, titleEnd = param.titleEnd, _disabled = param.disabled, disabled = _disabled === void 0 ? false : _disabled, _stub = param.stub, stub = _stub === void 0 ? false : _stub, formatValue = param.formatValue;
|
|
18
18
|
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_pijmaCore.Spacer, {
|
|
19
19
|
size: "xxs",
|
|
20
20
|
children: [
|
|
@@ -23,7 +23,7 @@ var ExtendedProgressBar = function(param) {
|
|
|
23
23
|
children: [
|
|
24
24
|
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.FlexItem, {
|
|
25
25
|
width: stub ? 0.15 : undefined,
|
|
26
|
-
children: titleStart ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
26
|
+
children: titleStart && value !== undefined ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
27
27
|
size: "s",
|
|
28
28
|
bold: false,
|
|
29
29
|
stub: stub,
|
|
@@ -34,7 +34,7 @@ var ExtendedProgressBar = function(param) {
|
|
|
34
34
|
}),
|
|
35
35
|
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.FlexItem, {
|
|
36
36
|
width: stub ? 0.15 : undefined,
|
|
37
|
-
children: titleEnd ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
37
|
+
children: titleEnd && value !== undefined && maxValue !== undefined ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Text, {
|
|
38
38
|
size: "s",
|
|
39
39
|
bold: false,
|
|
40
40
|
stub: stub,
|
|
@@ -48,7 +48,7 @@ var ExtendedProgressBar = function(param) {
|
|
|
48
48
|
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_pijmaCore.Flex, {
|
|
49
49
|
children: [
|
|
50
50
|
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.FlexItem, {
|
|
51
|
-
width: stub ? 1 : value / maxValue,
|
|
51
|
+
width: stub || disabled || maxValue === 0 ? 1 : value / maxValue,
|
|
52
52
|
minWidth: "4px",
|
|
53
53
|
transition: "width 300ms cubic-bezier(0.4, 0.0, 0.2, 1)",
|
|
54
54
|
children: stub ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Stub, {
|
|
@@ -59,11 +59,11 @@ var ExtendedProgressBar = function(param) {
|
|
|
59
59
|
height: "4px",
|
|
60
60
|
width: 1,
|
|
61
61
|
r: 2,
|
|
62
|
-
bg: "#FF8C00"
|
|
62
|
+
bg: disabled ? "#E6E6E6" : maxValue === 0 ? "#F5F5F5" : "#FF8C00"
|
|
63
63
|
})
|
|
64
64
|
}),
|
|
65
|
-
!stub && value < maxValue ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.FlexItem, {
|
|
66
|
-
ml:
|
|
65
|
+
!stub && !disabled && value < maxValue ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.FlexItem, {
|
|
66
|
+
ml: 1,
|
|
67
67
|
grow: 1,
|
|
68
68
|
minWidth: "4px",
|
|
69
69
|
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Card, {
|
package/target/es5/index.js
CHANGED
|
@@ -51,6 +51,7 @@ _exportStar(require("./alert/index.js"), exports);
|
|
|
51
51
|
_exportStar(require("./rating/index.js"), exports);
|
|
52
52
|
_exportStar(require("./content-suggest/index.js"), exports);
|
|
53
53
|
_exportStar(require("./progress-bar/index.js"), exports);
|
|
54
|
+
_exportStar(require("./extended-progress-bar/index.js"), exports);
|
|
54
55
|
_exportStar(require("./logo-block-link/index.js"), exports);
|
|
55
56
|
_exportStar(require("./suggest-field/index.js"), exports);
|
|
56
57
|
_exportStar(require("./tabs/index.js"), exports);
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Card, Flex, FlexItem, Spacer, Stub } from '@qiwi/pijma-core';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Text } from '../typography/index.js';
|
|
5
|
-
export const ExtendedProgressBar = ({ value , maxValue =1 , titleStart , titleEnd , stub =false , formatValue , })=>/*#__PURE__*/ _jsxs(Spacer, {
|
|
5
|
+
export const ExtendedProgressBar = ({ value , maxValue =1 , titleStart , titleEnd , disabled =false , stub =false , formatValue , })=>/*#__PURE__*/ _jsxs(Spacer, {
|
|
6
6
|
size: "xxs",
|
|
7
7
|
children: [
|
|
8
8
|
titleStart || titleEnd ? /*#__PURE__*/ _jsxs(Flex, {
|
|
@@ -10,7 +10,7 @@ export const ExtendedProgressBar = ({ value , maxValue =1 , titleStart , titleEn
|
|
|
10
10
|
children: [
|
|
11
11
|
/*#__PURE__*/ _jsx(FlexItem, {
|
|
12
12
|
width: stub ? 0.15 : undefined,
|
|
13
|
-
children: titleStart ? /*#__PURE__*/ _jsx(Text, {
|
|
13
|
+
children: titleStart && value !== undefined ? /*#__PURE__*/ _jsx(Text, {
|
|
14
14
|
size: "s",
|
|
15
15
|
bold: false,
|
|
16
16
|
stub: stub,
|
|
@@ -21,7 +21,7 @@ export const ExtendedProgressBar = ({ value , maxValue =1 , titleStart , titleEn
|
|
|
21
21
|
}),
|
|
22
22
|
/*#__PURE__*/ _jsx(FlexItem, {
|
|
23
23
|
width: stub ? 0.15 : undefined,
|
|
24
|
-
children: titleEnd ? /*#__PURE__*/ _jsx(Text, {
|
|
24
|
+
children: titleEnd && value !== undefined && maxValue !== undefined ? /*#__PURE__*/ _jsx(Text, {
|
|
25
25
|
size: "s",
|
|
26
26
|
bold: false,
|
|
27
27
|
stub: stub,
|
|
@@ -35,7 +35,7 @@ export const ExtendedProgressBar = ({ value , maxValue =1 , titleStart , titleEn
|
|
|
35
35
|
/*#__PURE__*/ _jsxs(Flex, {
|
|
36
36
|
children: [
|
|
37
37
|
/*#__PURE__*/ _jsx(FlexItem, {
|
|
38
|
-
width: stub ? 1 : value / maxValue,
|
|
38
|
+
width: stub || disabled || maxValue === 0 ? 1 : value / maxValue,
|
|
39
39
|
minWidth: "4px",
|
|
40
40
|
transition: "width 300ms cubic-bezier(0.4, 0.0, 0.2, 1)",
|
|
41
41
|
children: stub ? /*#__PURE__*/ _jsx(Stub, {
|
|
@@ -46,11 +46,11 @@ export const ExtendedProgressBar = ({ value , maxValue =1 , titleStart , titleEn
|
|
|
46
46
|
height: "4px",
|
|
47
47
|
width: 1,
|
|
48
48
|
r: 2,
|
|
49
|
-
bg:
|
|
49
|
+
bg: disabled ? '#E6E6E6' : maxValue === 0 ? '#F5F5F5' : '#FF8C00'
|
|
50
50
|
})
|
|
51
51
|
}),
|
|
52
|
-
!stub && value < maxValue ? /*#__PURE__*/ _jsx(FlexItem, {
|
|
53
|
-
ml:
|
|
52
|
+
!stub && !disabled && value < maxValue ? /*#__PURE__*/ _jsx(FlexItem, {
|
|
53
|
+
ml: 1,
|
|
54
54
|
grow: 1,
|
|
55
55
|
minWidth: "4px",
|
|
56
56
|
children: /*#__PURE__*/ _jsx(Card, {
|
package/target/es6/index.js
CHANGED
|
@@ -32,6 +32,7 @@ export * from './alert/index.js';
|
|
|
32
32
|
export * from './rating/index.js';
|
|
33
33
|
export * from './content-suggest/index.js';
|
|
34
34
|
export * from './progress-bar/index.js';
|
|
35
|
+
export * from './extended-progress-bar/index.js';
|
|
35
36
|
export * from './alert/index.js';
|
|
36
37
|
export * from './logo-block-link/index.js';
|
|
37
38
|
export * from './suggest-field/index.js';
|