@qiwi/pijma-mobile 1.154.2 → 1.156.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.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/lib/dts/actions/Actions.d.ts +2 -2
  3. package/lib/dts/block-accordion/BlockAccordion.d.ts +2 -2
  4. package/lib/dts/button/Button.d.ts +2 -2
  5. package/lib/dts/checkbox/Checkbox.d.ts +2 -2
  6. package/lib/dts/checkbox-field/CheckboxField.d.ts +2 -2
  7. package/lib/dts/code-field/CodeField.d.ts +2 -2
  8. package/lib/dts/drop-up/DropUp.d.ts +3 -3
  9. package/lib/dts/hint/Hint.d.ts +8 -0
  10. package/lib/dts/hint/index.d.ts +1 -0
  11. package/lib/dts/input-modal/InputModal.d.ts +3 -3
  12. package/lib/dts/list/List.d.ts +2 -2
  13. package/lib/dts/modal/SimpleModal.d.ts +2 -2
  14. package/lib/dts/pagination/Pagination.d.ts +2 -2
  15. package/lib/dts/password-field/PasswordField.d.ts +2 -2
  16. package/lib/dts/phone-field/PhoneField.d.ts +2 -2
  17. package/lib/dts/radio-field/RadioField.d.ts +2 -2
  18. package/lib/dts/select-field/SelectField.d.ts +2 -2
  19. package/lib/dts/switch/Switch.d.ts +2 -2
  20. package/lib/dts/switch-field/SwitchField.d.ts +2 -2
  21. package/lib/dts/text-area-field/TextAreaField.d.ts +2 -2
  22. package/lib/dts/text-field/TextField.d.ts +2 -2
  23. package/lib/dts/typography/Caption.d.ts +2 -2
  24. package/lib/dts/typography/Heading.d.ts +2 -2
  25. package/lib/dts/typography/Paragraph.d.ts +2 -2
  26. package/lib/dts/typography/Text.d.ts +2 -2
  27. package/lib/dts/typography/Title.d.ts +2 -2
  28. package/lib/es5/button/Button.js +1 -1
  29. package/lib/es5/code-field/CodeField.js +5 -15
  30. package/lib/es5/drop-up/DropUp.js +26 -29
  31. package/lib/es5/header/HeaderMenu.js +7 -11
  32. package/lib/es5/hint/Hint.js +45 -0
  33. package/lib/es5/hint/index.js +6 -0
  34. package/lib/es5/input-modal/InputModal.js +20 -21
  35. package/lib/es5/markdown/Markdown.js +2 -2
  36. package/lib/es5/modal/SimpleModal.js +38 -40
  37. package/lib/es5/suggest-field/SuggestField.js +4 -4
  38. package/lib/es6/button/Button.js +2 -2
  39. package/lib/es6/code-field/CodeField.js +5 -5
  40. package/lib/es6/drop-up/DropUp.js +23 -25
  41. package/lib/es6/header/HeaderMenu.js +11 -11
  42. package/lib/es6/hint/Hint.js +29 -0
  43. package/lib/es6/hint/index.js +1 -0
  44. package/lib/es6/input-modal/InputModal.js +15 -17
  45. package/lib/es6/markdown/Markdown.js +3 -3
  46. package/lib/es6/modal/SimpleModal.js +28 -32
  47. package/lib/es6/suggest-field/SuggestField.js +5 -5
  48. package/package.json +10 -13
package/README.md CHANGED
@@ -16,7 +16,7 @@ yarn add @qiwi/pijma-mobile
16
16
  import React from 'react'
17
17
  import {cache, themes, fonts, reset, CacheProvider, ThemeProvider, Global, Button, TextField} from '@qiwi/pijma-mobile'
18
18
 
19
- export const App: React.FC = () => (
19
+ export const App = () => (
20
20
  <CacheProvider value={cache}>
21
21
  <ThemeProvider theme={themes.orange}>
22
22
  <Global styles={[reset, fonts]}/>
@@ -1,6 +1,6 @@
1
- import { FunctionComponent, ReactNode } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface ActionsProps {
3
3
  size: 'accent' | 'normal' | 'minor';
4
4
  children?: ReactNode;
5
5
  }
6
- export declare const Actions: FunctionComponent<ActionsProps>;
6
+ export declare const Actions: FC<ActionsProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface BlockAccordionProps<I> {
3
3
  items: I[];
4
4
  opened: number[];
@@ -9,4 +9,4 @@ export interface BlockAccordionItemModel {
9
9
  title: string;
10
10
  content: ReactNode;
11
11
  }
12
- export declare const BlockAccordion: FunctionComponent<BlockAccordionProps<BlockAccordionItemModel>>;
12
+ export declare const BlockAccordion: FC<BlockAccordionProps<BlockAccordionItemModel>>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactElement } from 'react';
1
+ import { FC, ReactElement } from 'react';
2
2
  export interface ButtonProps {
3
3
  onClick?: () => void;
4
4
  onFocus?: () => void;
@@ -14,4 +14,4 @@ export interface ButtonProps {
14
14
  stub?: boolean;
15
15
  radius?: number;
16
16
  }
17
- export declare const Button: FunctionComponent<ButtonProps>;
17
+ export declare const Button: FC<ButtonProps>;
@@ -1,3 +1,3 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FC } from 'react';
2
2
  import { CheckboxProps } from './CheckboxProps';
3
- export declare const Checkbox: FunctionComponent<CheckboxProps>;
3
+ export declare const Checkbox: FC<CheckboxProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FC } from 'react';
2
2
  import { CheckboxFieldOptionModel } from './CheckboxFieldOptionModel';
3
3
  import { CheckboxFieldProps } from './CheckboxFieldProps';
4
- export declare const CheckboxField: FunctionComponent<CheckboxFieldProps<CheckboxFieldOptionModel<any>, any>>;
4
+ export declare const CheckboxField: FC<CheckboxFieldProps<CheckboxFieldOptionModel<any>, any>>;
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ import { FC } from 'react';
2
2
  import { CodeFieldProps } from './CodeFieldProps';
3
- export declare const CodeField: React.FC<CodeFieldProps>;
3
+ export declare const CodeField: FC<CodeFieldProps>;
@@ -1,4 +1,4 @@
1
- import React, { FunctionComponent, ReactNode } from 'react';
1
+ import { FC, KeyboardEventHandler, ReactNode } from 'react';
2
2
  export interface DropUpProps {
3
3
  show: boolean;
4
4
  onShow?: () => void;
@@ -8,7 +8,7 @@ export interface DropUpProps {
8
8
  title: string;
9
9
  footer?: ReactNode;
10
10
  autoFocus?: boolean;
11
- onKeyDown?: React.KeyboardEventHandler;
11
+ onKeyDown?: KeyboardEventHandler;
12
12
  children?: ReactNode;
13
13
  }
14
- export declare const DropUp: FunctionComponent<DropUpProps>;
14
+ export declare const DropUp: FC<DropUpProps>;
@@ -0,0 +1,8 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface HintProps {
3
+ show: boolean;
4
+ children: ReactNode;
5
+ onShow: () => void;
6
+ onHide: () => void;
7
+ }
8
+ export declare const Hint: FC<HintProps>;
@@ -0,0 +1 @@
1
+ export * from './Hint';
@@ -1,4 +1,4 @@
1
- import React, { ChangeEventHandler, FocusEventHandler, FunctionComponent, KeyboardEventHandler, MouseEventHandler, ReactNode, RefObject } from 'react';
1
+ import { ChangeEventHandler, FC, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, ReactNode, RefObject } from 'react';
2
2
  interface InputModalProps {
3
3
  value: string;
4
4
  tabIndex?: number;
@@ -15,10 +15,10 @@ interface InputModalProps {
15
15
  onBlur?: FocusEventHandler;
16
16
  onBack?: MouseEventHandler;
17
17
  onSubmit?: MouseEventHandler;
18
- onShow?: React.MouseEventHandler;
18
+ onShow?: () => void;
19
19
  onHide?: () => void;
20
20
  onEscape?: () => void;
21
21
  children?: ReactNode;
22
22
  }
23
- export declare const InputModal: FunctionComponent<InputModalProps>;
23
+ export declare const InputModal: FC<InputModalProps>;
24
24
  export {};
@@ -1,8 +1,8 @@
1
- import { FunctionComponent, ReactNode } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface ListProps {
3
3
  children: ReactNode[];
4
4
  type: 'step' | 'number' | 'bullet';
5
5
  size?: 's' | 'm' | 'l';
6
6
  stub?: boolean;
7
7
  }
8
- export declare const List: FunctionComponent<ListProps>;
8
+ export declare const List: FC<ListProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  interface SimpleModalProps {
3
3
  show: boolean;
4
4
  closable?: boolean;
@@ -10,5 +10,5 @@ interface SimpleModalProps {
10
10
  onHide?: () => void;
11
11
  children?: ReactNode;
12
12
  }
13
- export declare const SimpleModal: FunctionComponent<SimpleModalProps>;
13
+ export declare const SimpleModal: FC<SimpleModalProps>;
14
14
  export {};
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FC } from 'react';
2
2
  export interface PaginationProps {
3
3
  total: number;
4
4
  active: number;
@@ -8,4 +8,4 @@ export interface PaginationProps {
8
8
  stub?: boolean;
9
9
  onChange?: (index: number) => void;
10
10
  }
11
- export declare const Pagination: FunctionComponent<PaginationProps>;
11
+ export declare const Pagination: FC<PaginationProps>;
@@ -1,3 +1,3 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FC } from 'react';
2
2
  import { PasswordFieldProps } from './PasswordFieldProps';
3
- export declare const PasswordField: FunctionComponent<PasswordFieldProps>;
3
+ export declare const PasswordField: FC<PasswordFieldProps>;
@@ -1,3 +1,3 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FC } from 'react';
2
2
  import { PhoneFieldProps } from './PhoneFieldProps';
3
- export declare const PhoneField: FunctionComponent<PhoneFieldProps>;
3
+ export declare const PhoneField: FC<PhoneFieldProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FC } from 'react';
2
2
  import { RadioFieldOptionModel } from './RadioFieldOptionModel';
3
3
  import { RadioFieldProps } from './RadioFieldProps';
4
- export declare const RadioField: FunctionComponent<RadioFieldProps<RadioFieldOptionModel<any>, any>>;
4
+ export declare const RadioField: FC<RadioFieldProps<RadioFieldOptionModel<any>, any>>;
@@ -1,5 +1,5 @@
1
1
  import { OptionModel } from '@qiwi/pijma-core';
2
- import { FunctionComponent, ReactNode } from 'react';
2
+ import { FC, ReactNode } from 'react';
3
3
  export interface SelectFieldProps<I extends OptionModel<V>, V> {
4
4
  items: I[];
5
5
  title: string;
@@ -20,4 +20,4 @@ export interface SelectFieldProps<I extends OptionModel<V>, V> {
20
20
  export interface SelectFieldItemModel<V> extends OptionModel<V> {
21
21
  text: string;
22
22
  }
23
- export declare const SelectField: FunctionComponent<SelectFieldProps<SelectFieldItemModel<any>, any>>;
23
+ export declare const SelectField: FC<SelectFieldProps<SelectFieldItemModel<any>, any>>;
@@ -1,3 +1,3 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FC } from 'react';
2
2
  import { SwitchProps } from './SwitchProps';
3
- export declare const Switch: FunctionComponent<SwitchProps>;
3
+ export declare const Switch: FC<SwitchProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FC } from 'react';
2
2
  import { SwitchFieldOptionModel } from './SwitchFieldOptionModel';
3
3
  import { SwitchFieldProps } from './SwitchFieldProps';
4
- export declare const SwitchField: FunctionComponent<SwitchFieldProps<SwitchFieldOptionModel<any>, any>>;
4
+ export declare const SwitchField: FC<SwitchFieldProps<SwitchFieldOptionModel<any>, any>>;
@@ -16,7 +16,7 @@ export interface TextAreaFieldProps {
16
16
  onChange?: (value: string) => void;
17
17
  onFocus?: () => void;
18
18
  onBlur?: () => void;
19
- onKeyDown?: (event: KeyboardEvent) => boolean;
20
- onKeyUp?: (event: KeyboardEvent) => boolean;
19
+ onKeyDown?: (event: KeyboardEvent<HTMLTextAreaElement>) => boolean;
20
+ onKeyUp?: (event: KeyboardEvent<HTMLTextAreaElement>) => boolean;
21
21
  }
22
22
  export declare const TextAreaField: FC<TextAreaFieldProps>;
@@ -1,3 +1,3 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FC } from 'react';
2
2
  import { TextFieldProps } from './TextFieldProps';
3
- export declare const TextField: FunctionComponent<TextFieldProps>;
3
+ export declare const TextField: FC<TextFieldProps>;
@@ -1,5 +1,5 @@
1
1
  import { TypoProps } from '@qiwi/pijma-core';
2
- import { FunctionComponent, ReactNode } from 'react';
2
+ import { FC, ReactNode } from 'react';
3
3
  export interface CaptionProps {
4
4
  color?: 'default' | 'support' | 'inverse';
5
5
  align?: TypoProps['align'];
@@ -7,4 +7,4 @@ export interface CaptionProps {
7
7
  stub?: boolean;
8
8
  children?: ReactNode;
9
9
  }
10
- export declare const Caption: FunctionComponent<CaptionProps>;
10
+ export declare const Caption: FC<CaptionProps>;
@@ -1,5 +1,5 @@
1
1
  import { TypoProps } from '@qiwi/pijma-core';
2
- import { FunctionComponent, ReactNode } from 'react';
2
+ import { FC, ReactNode } from 'react';
3
3
  export interface HeadingProps {
4
4
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
5
5
  size: '1' | '2' | '3' | '4';
@@ -9,4 +9,4 @@ export interface HeadingProps {
9
9
  stub?: boolean;
10
10
  children?: ReactNode;
11
11
  }
12
- export declare const Heading: FunctionComponent<HeadingProps>;
12
+ export declare const Heading: FC<HeadingProps>;
@@ -1,5 +1,5 @@
1
1
  import { TypoProps } from '@qiwi/pijma-core';
2
- import { FunctionComponent, ReactNode } from 'react';
2
+ import { FC, ReactNode } from 'react';
3
3
  export interface ParagraphProps {
4
4
  size?: 's' | 'm' | 'l';
5
5
  bold?: boolean;
@@ -11,4 +11,4 @@ export interface ParagraphProps {
11
11
  stub?: boolean;
12
12
  children?: ReactNode;
13
13
  }
14
- export declare const Paragraph: FunctionComponent<ParagraphProps>;
14
+ export declare const Paragraph: FC<ParagraphProps>;
@@ -1,5 +1,5 @@
1
1
  import { TypoProps } from '@qiwi/pijma-core';
2
- import { FunctionComponent, ReactNode } from 'react';
2
+ import { FC, ReactNode } from 'react';
3
3
  export interface TextProps {
4
4
  display?: 'block' | 'inline' | 'inline-block';
5
5
  size?: 's' | 'm' | 'l';
@@ -14,4 +14,4 @@ export interface TextProps {
14
14
  stub?: boolean;
15
15
  children?: ReactNode;
16
16
  }
17
- export declare const Text: FunctionComponent<TextProps>;
17
+ export declare const Text: FC<TextProps>;
@@ -1,5 +1,5 @@
1
1
  import { TypoProps } from '@qiwi/pijma-core';
2
- import { FunctionComponent, ReactNode } from 'react';
2
+ import { FC, ReactNode } from 'react';
3
3
  export interface TitleProps {
4
4
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
5
5
  size: '1' | '2';
@@ -9,4 +9,4 @@ export interface TitleProps {
9
9
  clamp?: number;
10
10
  children?: ReactNode;
11
11
  }
12
- export declare const Title: FunctionComponent<TitleProps>;
12
+ export declare const Title: FC<TitleProps>;
@@ -158,7 +158,7 @@ var Button = function(props) {
158
158
  height: iconSize[props.size],
159
159
  transition: "all 300ms cubic-bezier(0.4, 0.0, 0.2, 1)",
160
160
  transform: "translateZ(0)",
161
- children: /*#__PURE__*/ _react.default.cloneElement(props.icon, {
161
+ children: /*#__PURE__*/ (0, _react.cloneElement)(props.icon, {
162
162
  color: props.disabled ? "#666" : props.kind === "brand" ? "#fff" : "#000",
163
163
  size: 1
164
164
  })
@@ -84,21 +84,11 @@ var CodeField = function(_param) {
84
84
  disabled: props.disabled || loading,
85
85
  ref: item.ref,
86
86
  value: loading ? "" : props.value[index],
87
- onChange: function(e) {
88
- return item.onChange(e, index);
89
- },
90
- onClick: function(e) {
91
- return item.onClick(e, index);
92
- },
93
- onFocus: function(e) {
94
- return item.onFocus(e, index);
95
- },
96
- onBlur: function(e) {
97
- return item.onBlur(e, index);
98
- },
99
- onKeyDown: function(e) {
100
- return renderProps.onKeyDown(e, index);
101
- }
87
+ onChange: item.onChange,
88
+ onClick: item.onClick,
89
+ onFocus: item.onFocus,
90
+ onBlur: item.onBlur,
91
+ onKeyDown: item.onKeyDown
102
92
  })
103
93
  }, index);
104
94
  })
@@ -14,14 +14,6 @@ var _jsxRuntime = require("react/jsx-runtime");
14
14
  var _pijmaCore = require("@qiwi/pijma-core");
15
15
  var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
16
16
  var _typography = require("../typography/index.js");
17
- var ContentTransitionVertical = function(props) {
18
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
19
- };
20
- ContentTransitionVertical.displayName = "ContentTransitionVertical";
21
- var ContentTransitionHorizontal = function(props) {
22
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
23
- };
24
- ContentTransitionHorizontal.displayName = "ContentTransitionHorizontal";
25
17
  var translate3d = {
26
18
  vertical: "0, 100%, 0",
27
19
  horizontal: "100%, 0, 0"
@@ -48,30 +40,35 @@ var defaultProps = function(direction) {
48
40
  }
49
41
  };
50
42
  };
51
- ContentTransitionVertical.defaultProps = defaultProps("vertical");
52
- ContentTransitionHorizontal.defaultProps = defaultProps("horizontal");
43
+ var ContentTransitionVertical = function(props) {
44
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, defaultProps("vertical")));
45
+ };
46
+ ContentTransitionVertical.displayName = "ContentTransitionVertical";
47
+ var ContentTransitionHorizontal = function(props) {
48
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, defaultProps("horizontal")));
49
+ };
50
+ ContentTransitionHorizontal.displayName = "ContentTransitionHorizontal";
53
51
  var BackdropTransition = function(props) {
54
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
52
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, {
53
+ timeout: {
54
+ enter: 370,
55
+ exit: 250
56
+ },
57
+ enterClassName: function(timeout) {
58
+ return (0, _pijmaCore.css)({
59
+ opacity: 1,
60
+ transition: "opacity " + timeout + "ms ease"
61
+ });
62
+ },
63
+ exitClassName: function(timeout) {
64
+ return (0, _pijmaCore.css)({
65
+ opacity: 0,
66
+ transition: "opacity " + timeout + "ms ease"
67
+ });
68
+ }
69
+ }));
55
70
  };
56
71
  BackdropTransition.displayName = "BackdropTransition";
57
- BackdropTransition.defaultProps = {
58
- timeout: {
59
- enter: 370,
60
- exit: 250
61
- },
62
- enterClassName: function(timeout) {
63
- return (0, _pijmaCore.css)({
64
- opacity: 1,
65
- transition: "opacity " + timeout + "ms ease"
66
- });
67
- },
68
- exitClassName: function(timeout) {
69
- return (0, _pijmaCore.css)({
70
- opacity: 0,
71
- transition: "opacity " + timeout + "ms ease"
72
- });
73
- }
74
- };
75
72
  var FlexPosCard = (0, _pijmaCore.styled)(_pijmaCore.FlexPos)().withComponent(_pijmaCore.Card);
76
73
  FlexPosCard.displayName = "FlexPosCard";
77
74
  var DropUp = function(props) {
@@ -43,25 +43,21 @@ var defaultProps = function(direction) {
43
43
  };
44
44
  };
45
45
  var ContentTransitionTop = function(props) {
46
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
46
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, defaultProps("top")));
47
47
  };
48
+ ContentTransitionTop.displayName = "ContentTransitionTop";
48
49
  var ContentTransitionRight = function(props) {
49
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
50
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, defaultProps("right")));
50
51
  };
52
+ ContentTransitionRight.displayName = "ContentTransitionRight";
51
53
  var ContentTransitionBottom = function(props) {
52
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
54
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, defaultProps("bottom")));
53
55
  };
56
+ ContentTransitionBottom.displayName = "ContentTransitionBottom";
54
57
  var ContentTransitionLeft = function(props) {
55
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
58
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, defaultProps("left")));
56
59
  };
57
- ContentTransitionTop.displayName = "ContentTransitionTop";
58
- ContentTransitionRight.displayName = "ContentTransitionRight";
59
- ContentTransitionBottom.displayName = "ContentTransitionBottom";
60
60
  ContentTransitionLeft.displayName = "ContentTransitionLeft";
61
- ContentTransitionTop.defaultProps = defaultProps("top");
62
- ContentTransitionRight.defaultProps = defaultProps("right");
63
- ContentTransitionBottom.defaultProps = defaultProps("bottom");
64
- ContentTransitionLeft.defaultProps = defaultProps("left");
65
61
  var ContentTransition = {
66
62
  top: ContentTransitionTop,
67
63
  right: ContentTransitionRight,
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Hint", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Hint;
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 _modal = require("../modal/index.js");
16
+ var _typography = require("../typography/index.js");
17
+ var Hint = function(param) {
18
+ var children = param.children, show = param.show, onShow = param.onShow, onHide = param.onHide;
19
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.HintControl, {
20
+ show: show,
21
+ onShow: onShow,
22
+ children: function(renderProps) {
23
+ return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_react.Fragment, {
24
+ children: [
25
+ /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
26
+ cursor: "pointer",
27
+ onClick: renderProps.onClick,
28
+ ref: renderProps.target,
29
+ width: 6,
30
+ height: 6,
31
+ children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.QuestionIcon, {})
32
+ }),
33
+ /*#__PURE__*/ (0, _jsxRuntime.jsx)(_modal.SimpleModal, {
34
+ closable: true,
35
+ show: renderProps.show,
36
+ onHide: onHide,
37
+ children: typeof children === "string" ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Paragraph, {
38
+ children: children
39
+ }) : children
40
+ })
41
+ ]
42
+ });
43
+ }
44
+ });
45
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ var _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./Hint.js"), exports);
@@ -14,29 +14,28 @@ var _jsxRuntime = require("react/jsx-runtime");
14
14
  var _pijmaCore = require("@qiwi/pijma-core");
15
15
  var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
16
16
  var ContentTransition = function(props) {
17
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
17
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, {
18
+ timeout: {
19
+ enter: 370,
20
+ exit: 250
21
+ },
22
+ enterClassName: function(timeout) {
23
+ return (0, _pijmaCore.css)({
24
+ opacity: 1,
25
+ transform: "translate3d(0, 0, 0)",
26
+ transition: "opacity " + timeout + "ms ease, transform " + timeout + "ms ease"
27
+ });
28
+ },
29
+ exitClassName: function(timeout) {
30
+ return (0, _pijmaCore.css)({
31
+ opacity: 0,
32
+ transform: "translate3d(0, -100%, 0)",
33
+ transition: "opacity " + timeout + "ms ease, transform " + timeout + "ms ease"
34
+ });
35
+ }
36
+ }));
18
37
  };
19
38
  ContentTransition.displayName = "ContentTransition";
20
- ContentTransition.defaultProps = {
21
- timeout: {
22
- enter: 370,
23
- exit: 250
24
- },
25
- enterClassName: function(timeout) {
26
- return (0, _pijmaCore.css)({
27
- opacity: 1,
28
- transform: "translate3d(0, 0, 0)",
29
- transition: "opacity " + timeout + "ms ease, transform " + timeout + "ms ease"
30
- });
31
- },
32
- exitClassName: function(timeout) {
33
- return (0, _pijmaCore.css)({
34
- opacity: 0,
35
- transform: "translate3d(0, -100%, 0)",
36
- transition: "opacity " + timeout + "ms ease, transform " + timeout + "ms ease"
37
- });
38
- }
39
- };
40
39
  var PosFlexCard = (0, _pijmaCore.styled)(_pijmaCore.CardPos)().withComponent(_pijmaCore.Flex);
41
40
  PosFlexCard.displayName = "PosFlexCard";
42
41
  var InputModal = function(props) {
@@ -120,8 +120,8 @@ var del = function(param) {
120
120
  del.displayName = "del";
121
121
  var li = function(param) {
122
122
  var size = param.size, children = param.children;
123
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_react.default.Fragment, {
124
- children: _react.default.Children.map(children, function(child, i) {
123
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_react.Fragment, {
124
+ children: _react.Children.map(children, function(child, i) {
125
125
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(MarkdownBox, {
126
126
  mt: SizeMargin[size],
127
127
  children: typeof child === "string" ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_typography.Paragraph, {
@@ -14,51 +14,49 @@ var _jsxRuntime = require("react/jsx-runtime");
14
14
  var _pijmaCore = require("@qiwi/pijma-core");
15
15
  var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
16
16
  var ContentTransition = function(props) {
17
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
17
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, {
18
+ timeout: {
19
+ enter: 370,
20
+ exit: 250
21
+ },
22
+ enterClassName: function(timeout) {
23
+ return (0, _pijmaCore.css)({
24
+ opacity: 1,
25
+ transform: "translate3d(0, 0, 0)",
26
+ transition: "opacity " + timeout + "ms ease, transform " + timeout + "ms ease"
27
+ });
28
+ },
29
+ exitClassName: function(timeout) {
30
+ return (0, _pijmaCore.css)({
31
+ opacity: 0,
32
+ transform: "translate3d(0, -100%, 0)",
33
+ transition: "opacity " + timeout + "ms ease, transform " + timeout + "ms ease"
34
+ });
35
+ }
36
+ }));
18
37
  };
19
38
  ContentTransition.displayName = "ContentTransition";
20
- ContentTransition.defaultProps = {
21
- timeout: {
22
- enter: 370,
23
- exit: 250
24
- },
25
- enterClassName: function(timeout) {
26
- return (0, _pijmaCore.css)({
27
- opacity: 1,
28
- transform: "translate3d(0, 0, 0)",
29
- transition: "opacity " + timeout + "ms ease, transform " + timeout + "ms ease"
30
- });
31
- },
32
- exitClassName: function(timeout) {
33
- return (0, _pijmaCore.css)({
34
- opacity: 0,
35
- transform: "translate3d(0, -100%, 0)",
36
- transition: "opacity " + timeout + "ms ease, transform " + timeout + "ms ease"
37
- });
38
- }
39
- };
40
39
  var BackdropTransition = function(props) {
41
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props));
40
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.SimpleTransition, _extends({}, props, {
41
+ timeout: {
42
+ enter: 370,
43
+ exit: 250
44
+ },
45
+ enterClassName: function(timeout) {
46
+ return (0, _pijmaCore.css)({
47
+ opacity: 1,
48
+ transition: "opacity " + timeout + "ms ease"
49
+ });
50
+ },
51
+ exitClassName: function(timeout) {
52
+ return (0, _pijmaCore.css)({
53
+ opacity: 0,
54
+ transition: "opacity " + timeout + "ms ease"
55
+ });
56
+ }
57
+ }));
42
58
  };
43
59
  BackdropTransition.displayName = "BackdropTransition";
44
- BackdropTransition.defaultProps = {
45
- timeout: {
46
- enter: 370,
47
- exit: 250
48
- },
49
- enterClassName: function(timeout) {
50
- return (0, _pijmaCore.css)({
51
- opacity: 1,
52
- transition: "opacity " + timeout + "ms ease"
53
- });
54
- },
55
- exitClassName: function(timeout) {
56
- return (0, _pijmaCore.css)({
57
- opacity: 0,
58
- transition: "opacity " + timeout + "ms ease"
59
- });
60
- }
61
- };
62
60
  var SimpleModal = function(param) {
63
61
  var stub = param.stub, children = param.children, show = param.show, escapeClose = param.escapeClose, onShow = param.onShow, onHide = param.onHide, backdropClose = param.backdropClose, _zIndex = param.zIndex, zIndex = _zIndex === void 0 ? 10050 : _zIndex, closable = param.closable;
64
62
  return stub ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
@@ -37,8 +37,8 @@ var SuggestField = function(_param) {
37
37
  value: props.value,
38
38
  suggest: props.suggest,
39
39
  items: props.items,
40
- total: /*#__PURE__*/ _react.default.isValidElement(props.total) || typeof props.total === "string" ? undefined : props.total,
41
- empty: /*#__PURE__*/ _react.default.isValidElement(props.empty) || typeof props.empty === "string" ? undefined : props.empty,
40
+ total: /*#__PURE__*/ (0, _react.isValidElement)(props.total) || typeof props.total === "string" ? undefined : props.total,
41
+ empty: /*#__PURE__*/ (0, _react.isValidElement)(props.empty) || typeof props.empty === "string" ? undefined : props.empty,
42
42
  equals: equals,
43
43
  onRequest: props.onRequest,
44
44
  onChange: props.onChange,
@@ -140,7 +140,7 @@ var SuggestField = function(_param) {
140
140
  }) : null,
141
141
  props.total && menuRenderProps.items.length > 0 ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
142
142
  px: 6,
143
- children: /*#__PURE__*/ _react.default.isValidElement(props.total) ? props.total : typeof props.total === "string" ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_markdown.Markdown, {
143
+ children: /*#__PURE__*/ (0, _react.isValidElement)(props.total) ? props.total : typeof props.total === "string" ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_markdown.Markdown, {
144
144
  children: props.total
145
145
  }) : /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_typography.Paragraph, {
146
146
  children: [
@@ -158,7 +158,7 @@ var SuggestField = function(_param) {
158
158
  })
159
159
  }) : props.empty && menuRenderProps.items.length === 0 && props.items !== undefined ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Box, {
160
160
  px: 6,
161
- children: /*#__PURE__*/ _react.default.isValidElement(props.empty) ? props.empty : typeof props.empty === "string" ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_markdown.Markdown, {
161
+ children: /*#__PURE__*/ (0, _react.isValidElement)(props.empty) ? props.empty : typeof props.empty === "string" ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_markdown.Markdown, {
162
162
  children: props.empty
163
163
  }) : /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_typography.Paragraph, {
164
164
  children: [
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Btn, ButtonControl, Card, Flex, FlexItem, Pos, Spinner, Stub, Typo, useTheme } from '@qiwi/pijma-core';
3
- import React, { Fragment } from 'react';
3
+ import React, { cloneElement, Fragment } from 'react';
4
4
  const buttonSize = {
5
5
  accent: 12,
6
6
  normal: 10,
@@ -145,7 +145,7 @@ export const Button = (props)=>{
145
145
  height: iconSize[props.size],
146
146
  transition: "all 300ms cubic-bezier(0.4, 0.0, 0.2, 1)",
147
147
  transform: "translateZ(0)",
148
- children: /*#__PURE__*/ React.cloneElement(props.icon, {
148
+ children: /*#__PURE__*/ cloneElement(props.icon, {
149
149
  color: props.disabled ? '#666' : props.kind === 'brand' ? '#fff' : '#000',
150
150
  size: 1
151
151
  })
@@ -60,11 +60,11 @@ export const CodeField = ({ length =4 , autoFocus =false , loading =false , type
60
60
  disabled: props.disabled || loading,
61
61
  ref: item.ref,
62
62
  value: loading ? '' : props.value[index],
63
- onChange: (e)=>item.onChange(e, index),
64
- onClick: (e)=>item.onClick(e, index),
65
- onFocus: (e)=>item.onFocus(e, index),
66
- onBlur: (e)=>item.onBlur(e, index),
67
- onKeyDown: (e)=>renderProps.onKeyDown(e, index)
63
+ onChange: item.onChange,
64
+ onClick: item.onClick,
65
+ onFocus: item.onFocus,
66
+ onBlur: item.onBlur,
67
+ onKeyDown: item.onKeyDown
68
68
  })
69
69
  }, index))
70
70
  }),
@@ -2,14 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Card, css, Flex, FlexItem, FlexPos, Icon, Modal, Pos, SimpleTransition, styled } from '@qiwi/pijma-core';
3
3
  import React from 'react';
4
4
  import { Paragraph } from '../typography/index.js';
5
- const ContentTransitionVertical = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
6
- ...props
7
- });
8
- ContentTransitionVertical.displayName = 'ContentTransitionVertical';
9
- const ContentTransitionHorizontal = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
10
- ...props
11
- });
12
- ContentTransitionHorizontal.displayName = 'ContentTransitionHorizontal';
13
5
  const translate3d = {
14
6
  vertical: '0, 100%, 0',
15
7
  horizontal: '100%, 0, 0'
@@ -30,26 +22,32 @@ const defaultProps = (direction)=>({
30
22
  transition: `opacity ${timeout}ms ease, transform ${timeout}ms ease`
31
23
  })
32
24
  });
33
- ContentTransitionVertical.defaultProps = defaultProps('vertical');
34
- ContentTransitionHorizontal.defaultProps = defaultProps('horizontal');
25
+ const ContentTransitionVertical = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
26
+ ...props,
27
+ ...defaultProps('vertical')
28
+ });
29
+ ContentTransitionVertical.displayName = 'ContentTransitionVertical';
30
+ const ContentTransitionHorizontal = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
31
+ ...props,
32
+ ...defaultProps('horizontal')
33
+ });
34
+ ContentTransitionHorizontal.displayName = 'ContentTransitionHorizontal';
35
35
  const BackdropTransition = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
36
- ...props
36
+ ...props,
37
+ timeout: {
38
+ enter: 370,
39
+ exit: 250
40
+ },
41
+ enterClassName: (timeout)=>css({
42
+ opacity: 1,
43
+ transition: `opacity ${timeout}ms ease`
44
+ }),
45
+ exitClassName: (timeout)=>css({
46
+ opacity: 0,
47
+ transition: `opacity ${timeout}ms ease`
48
+ })
37
49
  });
38
50
  BackdropTransition.displayName = 'BackdropTransition';
39
- BackdropTransition.defaultProps = {
40
- timeout: {
41
- enter: 370,
42
- exit: 250
43
- },
44
- enterClassName: (timeout)=>css({
45
- opacity: 1,
46
- transition: `opacity ${timeout}ms ease`
47
- }),
48
- exitClassName: (timeout)=>css({
49
- opacity: 0,
50
- transition: `opacity ${timeout}ms ease`
51
- })
52
- };
53
51
  const FlexPosCard = styled(FlexPos)().withComponent(Card);
54
52
  FlexPosCard.displayName = 'FlexPosCard';
55
53
  export const DropUp = (props)=>/*#__PURE__*/ _jsx(Modal, {
@@ -25,25 +25,25 @@ const defaultProps = (direction)=>({
25
25
  })
26
26
  });
27
27
  const ContentTransitionTop = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
28
- ...props
28
+ ...props,
29
+ ...defaultProps('top')
29
30
  });
31
+ ContentTransitionTop.displayName = 'ContentTransitionTop';
30
32
  const ContentTransitionRight = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
31
- ...props
33
+ ...props,
34
+ ...defaultProps('right')
32
35
  });
36
+ ContentTransitionRight.displayName = 'ContentTransitionRight';
33
37
  const ContentTransitionBottom = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
34
- ...props
38
+ ...props,
39
+ ...defaultProps('bottom')
35
40
  });
41
+ ContentTransitionBottom.displayName = 'ContentTransitionBottom';
36
42
  const ContentTransitionLeft = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
37
- ...props
43
+ ...props,
44
+ ...defaultProps('left')
38
45
  });
39
- ContentTransitionTop.displayName = 'ContentTransitionTop';
40
- ContentTransitionRight.displayName = 'ContentTransitionRight';
41
- ContentTransitionBottom.displayName = 'ContentTransitionBottom';
42
46
  ContentTransitionLeft.displayName = 'ContentTransitionLeft';
43
- ContentTransitionTop.defaultProps = defaultProps('top');
44
- ContentTransitionRight.defaultProps = defaultProps('right');
45
- ContentTransitionBottom.defaultProps = defaultProps('bottom');
46
- ContentTransitionLeft.defaultProps = defaultProps('left');
47
47
  const ContentTransition = {
48
48
  top: ContentTransitionTop,
49
49
  right: ContentTransitionRight,
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, HintControl, QuestionIcon } from '@qiwi/pijma-core';
3
+ import React, { Fragment } from 'react';
4
+ import { SimpleModal } from '../modal/index.js';
5
+ import { Paragraph } from '../typography/index.js';
6
+ export const Hint = ({ children , show , onShow , onHide })=>/*#__PURE__*/ _jsx(HintControl, {
7
+ show: show,
8
+ onShow: onShow,
9
+ children: (renderProps)=>/*#__PURE__*/ _jsxs(Fragment, {
10
+ children: [
11
+ /*#__PURE__*/ _jsx(Box, {
12
+ cursor: "pointer",
13
+ onClick: renderProps.onClick,
14
+ ref: renderProps.target,
15
+ width: 6,
16
+ height: 6,
17
+ children: /*#__PURE__*/ _jsx(QuestionIcon, {})
18
+ }),
19
+ /*#__PURE__*/ _jsx(SimpleModal, {
20
+ closable: true,
21
+ show: renderProps.show,
22
+ onHide: onHide,
23
+ children: typeof children === 'string' ? /*#__PURE__*/ _jsx(Paragraph, {
24
+ children: children
25
+ }) : children
26
+ })
27
+ ]
28
+ })
29
+ });
@@ -0,0 +1 @@
1
+ export * from './Hint.js';
@@ -2,25 +2,23 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { BoxPos, Card, CardPos, css, Flex, FlexItem, Icon, Input, Modal, Pos, SimpleTransition, styled } from '@qiwi/pijma-core';
3
3
  import React from 'react';
4
4
  const ContentTransition = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
5
- ...props
5
+ ...props,
6
+ timeout: {
7
+ enter: 370,
8
+ exit: 250
9
+ },
10
+ enterClassName: (timeout)=>css({
11
+ opacity: 1,
12
+ transform: 'translate3d(0, 0, 0)',
13
+ transition: `opacity ${timeout}ms ease, transform ${timeout}ms ease`
14
+ }),
15
+ exitClassName: (timeout)=>css({
16
+ opacity: 0,
17
+ transform: 'translate3d(0, -100%, 0)',
18
+ transition: `opacity ${timeout}ms ease, transform ${timeout}ms ease`
19
+ })
6
20
  });
7
21
  ContentTransition.displayName = 'ContentTransition';
8
- ContentTransition.defaultProps = {
9
- timeout: {
10
- enter: 370,
11
- exit: 250
12
- },
13
- enterClassName: (timeout)=>css({
14
- opacity: 1,
15
- transform: 'translate3d(0, 0, 0)',
16
- transition: `opacity ${timeout}ms ease, transform ${timeout}ms ease`
17
- }),
18
- exitClassName: (timeout)=>css({
19
- opacity: 0,
20
- transform: 'translate3d(0, -100%, 0)',
21
- transition: `opacity ${timeout}ms ease, transform ${timeout}ms ease`
22
- })
23
- };
24
22
  const PosFlexCard = styled(CardPos)().withComponent(Flex);
25
23
  PosFlexCard.displayName = 'PosFlexCard';
26
24
  export const InputModal = (props)=>/*#__PURE__*/ _jsx(Modal, {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Box, Image, MarkdownToJSX, styled } from '@qiwi/pijma-core';
3
- import React, { Children } from 'react';
3
+ import React, { Children, Fragment } from 'react';
4
4
  import { Link } from '../link/index.js';
5
5
  import { List } from '../list/index.js';
6
6
  import { Heading, Paragraph, Text } from '../typography/index.js';
@@ -79,8 +79,8 @@ const del = ({ children })=>/*#__PURE__*/ _jsx(Text, {
79
79
  children: children
80
80
  });
81
81
  del.displayName = 'del';
82
- const li = ({ size , children })=>/*#__PURE__*/ _jsx(React.Fragment, {
83
- children: React.Children.map(children, (child, i)=>/*#__PURE__*/ _jsx(MarkdownBox, {
82
+ const li = ({ size , children })=>/*#__PURE__*/ _jsx(Fragment, {
83
+ children: Children.map(children, (child, i)=>/*#__PURE__*/ _jsx(MarkdownBox, {
84
84
  mt: SizeMargin[size],
85
85
  children: typeof child === 'string' ? /*#__PURE__*/ _jsx(Paragraph, {
86
86
  size: size,
@@ -2,43 +2,39 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Card, css, Icon, Modal, Pos, SimpleTransition } from '@qiwi/pijma-core';
3
3
  import React from 'react';
4
4
  const ContentTransition = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
5
- ...props
5
+ ...props,
6
+ timeout: {
7
+ enter: 370,
8
+ exit: 250
9
+ },
10
+ enterClassName: (timeout)=>css({
11
+ opacity: 1,
12
+ transform: 'translate3d(0, 0, 0)',
13
+ transition: `opacity ${timeout}ms ease, transform ${timeout}ms ease`
14
+ }),
15
+ exitClassName: (timeout)=>css({
16
+ opacity: 0,
17
+ transform: 'translate3d(0, -100%, 0)',
18
+ transition: `opacity ${timeout}ms ease, transform ${timeout}ms ease`
19
+ })
6
20
  });
7
21
  ContentTransition.displayName = 'ContentTransition';
8
- ContentTransition.defaultProps = {
9
- timeout: {
10
- enter: 370,
11
- exit: 250
12
- },
13
- enterClassName: (timeout)=>css({
14
- opacity: 1,
15
- transform: 'translate3d(0, 0, 0)',
16
- transition: `opacity ${timeout}ms ease, transform ${timeout}ms ease`
17
- }),
18
- exitClassName: (timeout)=>css({
19
- opacity: 0,
20
- transform: 'translate3d(0, -100%, 0)',
21
- transition: `opacity ${timeout}ms ease, transform ${timeout}ms ease`
22
- })
23
- };
24
22
  const BackdropTransition = (props)=>/*#__PURE__*/ _jsx(SimpleTransition, {
25
- ...props
23
+ ...props,
24
+ timeout: {
25
+ enter: 370,
26
+ exit: 250
27
+ },
28
+ enterClassName: (timeout)=>css({
29
+ opacity: 1,
30
+ transition: `opacity ${timeout}ms ease`
31
+ }),
32
+ exitClassName: (timeout)=>css({
33
+ opacity: 0,
34
+ transition: `opacity ${timeout}ms ease`
35
+ })
26
36
  });
27
37
  BackdropTransition.displayName = 'BackdropTransition';
28
- BackdropTransition.defaultProps = {
29
- timeout: {
30
- enter: 370,
31
- exit: 250
32
- },
33
- enterClassName: (timeout)=>css({
34
- opacity: 1,
35
- transition: `opacity ${timeout}ms ease`
36
- }),
37
- exitClassName: (timeout)=>css({
38
- opacity: 0,
39
- transition: `opacity ${timeout}ms ease`
40
- })
41
- };
42
38
  export const SimpleModal = ({ stub , children , show , escapeClose , onShow , onHide , backdropClose , zIndex =10050 , closable , })=>stub ? /*#__PURE__*/ _jsx(Box, {
43
39
  display: "none",
44
40
  children: children
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { BasicInput, Box, Card, Image, InputField, MenuControl, Pos, Spacer, styled, SuggestControl } from '@qiwi/pijma-core';
3
- import React, { Fragment } from 'react';
3
+ import React, { Fragment, isValidElement } from 'react';
4
4
  import { InputModal } from '../input-modal/index.js';
5
5
  import { Link } from '../link/index.js';
6
6
  import { Markdown } from '../markdown/index.js';
@@ -19,8 +19,8 @@ export const SuggestField = ({ equals =(a, b)=>a === b , ...props })=>props.stub
19
19
  value: props.value,
20
20
  suggest: props.suggest,
21
21
  items: props.items,
22
- total: /*#__PURE__*/ React.isValidElement(props.total) || typeof props.total === 'string' ? undefined : props.total,
23
- empty: /*#__PURE__*/ React.isValidElement(props.empty) || typeof props.empty === 'string' ? undefined : props.empty,
22
+ total: /*#__PURE__*/ isValidElement(props.total) || typeof props.total === 'string' ? undefined : props.total,
23
+ empty: /*#__PURE__*/ isValidElement(props.empty) || typeof props.empty === 'string' ? undefined : props.empty,
24
24
  equals: equals,
25
25
  onRequest: props.onRequest,
26
26
  onChange: props.onChange,
@@ -116,7 +116,7 @@ export const SuggestField = ({ equals =(a, b)=>a === b , ...props })=>props.stub
116
116
  }) : null,
117
117
  props.total && menuRenderProps.items.length > 0 ? /*#__PURE__*/ _jsx(Box, {
118
118
  px: 6,
119
- children: /*#__PURE__*/ React.isValidElement(props.total) ? props.total : typeof props.total === 'string' ? /*#__PURE__*/ _jsx(Markdown, {
119
+ children: /*#__PURE__*/ isValidElement(props.total) ? props.total : typeof props.total === 'string' ? /*#__PURE__*/ _jsx(Markdown, {
120
120
  children: props.total
121
121
  }) : /*#__PURE__*/ _jsxs(Paragraph, {
122
122
  children: [
@@ -134,7 +134,7 @@ export const SuggestField = ({ equals =(a, b)=>a === b , ...props })=>props.stub
134
134
  })
135
135
  }) : props.empty && menuRenderProps.items.length === 0 && props.items !== undefined ? /*#__PURE__*/ _jsx(Box, {
136
136
  px: 6,
137
- children: /*#__PURE__*/ React.isValidElement(props.empty) ? props.empty : typeof props.empty === 'string' ? /*#__PURE__*/ _jsx(Markdown, {
137
+ children: /*#__PURE__*/ isValidElement(props.empty) ? props.empty : typeof props.empty === 'string' ? /*#__PURE__*/ _jsx(Markdown, {
138
138
  children: props.empty
139
139
  }) : /*#__PURE__*/ _jsxs(Paragraph, {
140
140
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qiwi/pijma-mobile",
3
- "version": "1.154.2",
3
+ "version": "1.156.0",
4
4
  "type": "module",
5
5
  "main": "./lib/es5/index.js",
6
6
  "module": "./lib/es6/index.js",
@@ -37,27 +37,24 @@
37
37
  "lib"
38
38
  ],
39
39
  "dependencies": {
40
- "@qiwi/pijma-core": "1.155.2"
40
+ "@qiwi/pijma-core": "1.157.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@qiwi/pijma-infra": "1.9.1",
44
- "concurrently": "7.2.2",
45
- "css-loader": "4.3.0",
46
- "eslint": "8.19.0",
47
- "eslint-config-qiwi": "1.17.3",
43
+ "@qiwi/pijma-infra": "1.10.0",
44
+ "concurrently": "7.3.0",
45
+ "css-loader": "6.7.1",
46
+ "eslint": "8.21.0",
47
+ "eslint-config-qiwi": "1.17.4",
48
48
  "fast-glob": "3.2.11",
49
49
  "file-loader": "6.2.0",
50
- "husky": "8.0.1",
51
- "minimist": "1.2.6",
52
50
  "prettier": "2.7.1",
53
51
  "prettier-config-qiwi": "1.7.2",
54
52
  "react-docgen-typescript": "patch:react-docgen-typescript@npm%3A2.2.2#~/.yarn/patches/react-docgen-typescript-npm-2.2.2-afb9698a32.patch",
55
53
  "react-styleguidist": "11.2.0",
56
54
  "react-styleguidist-visual": "patch:react-styleguidist-visual@npm%3A0.9.0#~/.yarn/patches/react-styleguidist-visual-npm-0.9.0-c05bb39789.patch",
57
- "style-loader": "2.0.0",
58
- "ts-patch": "2.0.1",
59
- "tsc-esm-fix": "2.18.0",
60
- "typescript": "4.4.4",
55
+ "style-loader": "3.3.1",
56
+ "tsc-esm-fix": "2.20.0",
57
+ "typescript": "4.7.4",
61
58
  "wait-on": "6.0.1",
62
59
  "webpack": "4.46.0"
63
60
  },