@qiwi/pijma-mobile 1.159.0 → 1.159.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qiwi/pijma-mobile",
3
- "version": "1.159.0",
3
+ "version": "1.159.2",
4
4
  "type": "module",
5
5
  "main": "./target/es5/index.js",
6
6
  "module": "./target/es6/index.js",
@@ -1 +1,3 @@
1
1
  export * from './SuggestField';
2
+ export * from './SuggestFieldProps';
3
+ export * from './SuggestFieldOptionModel';
@@ -14,7 +14,9 @@ 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, _disabled = param.disabled, disabled = _disabled === void 0 ? false : _disabled, _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, formatValue = _formatValue === void 0 ? function(v) {
18
+ return v;
19
+ } : _formatValue;
18
20
  return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_pijmaCore.Spacer, {
19
21
  size: "xxs",
20
22
  children: [
@@ -28,7 +30,7 @@ var ExtendedProgressBar = function(param) {
28
30
  bold: false,
29
31
  stub: stub,
30
32
  display: stub ? "block" : undefined,
31
- children: stub ? undefined : formatValue !== undefined ? formatValue(value) : value,
33
+ children: stub ? undefined : formatValue(value),
32
34
  compact: true
33
35
  }) : null
34
36
  }),
@@ -39,7 +41,7 @@ var ExtendedProgressBar = function(param) {
39
41
  bold: false,
40
42
  stub: stub,
41
43
  display: stub ? "block" : undefined,
42
- children: stub ? undefined : formatValue !== undefined ? formatValue(maxValue - value) : maxValue - value,
44
+ children: stub ? undefined : formatValue(Math.max(maxValue - value, 0)),
43
45
  compact: true
44
46
  }) : null
45
47
  })
@@ -48,7 +50,7 @@ var ExtendedProgressBar = function(param) {
48
50
  /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_pijmaCore.Flex, {
49
51
  children: [
50
52
  /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.FlexItem, {
51
- width: stub || disabled || maxValue === 0 ? 1 : value / maxValue,
53
+ width: stub || disabled || maxValue === 0 || value >= maxValue ? 1 : value / maxValue,
52
54
  minWidth: "4px",
53
55
  transition: "width 300ms cubic-bezier(0.4, 0.0, 0.2, 1)",
54
56
  children: stub ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Stub, {
@@ -4,3 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  var _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./SuggestField.js"), exports);
7
+ _exportStar(require("./SuggestFieldProps.js"), exports);
8
+ _exportStar(require("./SuggestFieldOptionModel.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 , disabled =false , stub =false , formatValue , })=>/*#__PURE__*/ _jsxs(Spacer, {
5
+ export const ExtendedProgressBar = ({ value , maxValue =1 , titleStart , titleEnd , disabled =false , stub =false , formatValue =(v)=>v , })=>/*#__PURE__*/ _jsxs(Spacer, {
6
6
  size: "xxs",
7
7
  children: [
8
8
  titleStart || titleEnd ? /*#__PURE__*/ _jsxs(Flex, {
@@ -15,7 +15,7 @@ export const ExtendedProgressBar = ({ value , maxValue =1 , titleStart , titleEn
15
15
  bold: false,
16
16
  stub: stub,
17
17
  display: stub ? 'block' : undefined,
18
- children: stub ? undefined : formatValue !== undefined ? formatValue(value) : value,
18
+ children: stub ? undefined : formatValue(value),
19
19
  compact: true
20
20
  }) : null
21
21
  }),
@@ -26,7 +26,7 @@ export const ExtendedProgressBar = ({ value , maxValue =1 , titleStart , titleEn
26
26
  bold: false,
27
27
  stub: stub,
28
28
  display: stub ? 'block' : undefined,
29
- children: stub ? undefined : formatValue !== undefined ? formatValue(maxValue - value) : maxValue - value,
29
+ children: stub ? undefined : formatValue(Math.max(maxValue - value, 0)),
30
30
  compact: true
31
31
  }) : null
32
32
  })
@@ -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 || disabled || maxValue === 0 ? 1 : value / maxValue,
38
+ width: stub || disabled || maxValue === 0 || value >= maxValue ? 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, {
@@ -1 +1,3 @@
1
1
  export * from './SuggestField.js';
2
+ export * from './SuggestFieldProps.js';
3
+ export * from './SuggestFieldOptionModel.js';