@invoicebox/ui 0.1.0-alpha.105 → 0.1.0-alpha.109
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/dist/components/common/Arrow/components/StyledSvg/index.d.ts +2 -2
- package/dist/components/common/Arrow/components/StyledSvg/index.js +1 -1
- package/dist/components/common/Arrow/components/Svg/index.js +1 -1
- package/dist/components/common/Arrow/index.js +1 -1
- package/dist/components/common/Arrow/palette.js +1 -1
- package/dist/components/common/BgCard/index.js +2 -2
- package/dist/components/common/BgCard/index.stories.js +1 -1
- package/dist/components/common/BgCard/styles.d.ts +2 -2
- package/dist/components/common/BgCard/styles.js +1 -1
- package/dist/components/common/Calendar/docs.stories.js +1 -1
- package/dist/components/common/Calendar/index.js +2 -2
- package/dist/components/common/Calendar/index.stories.js +5 -5
- package/dist/components/common/Calendar/palette.js +1 -1
- package/dist/components/common/Divider/index.js +2 -2
- package/dist/components/common/Divider/styles.d.ts +2 -2
- package/dist/components/common/Divider/styles.js +1 -1
- package/dist/components/common/Dropdown/index.js +5 -5
- package/dist/components/common/Dropdown/index.stories.js +3 -3
- package/dist/components/common/Dropdown/palette.js +1 -1
- package/dist/components/common/Dropdown/styles.d.ts +2 -2
- package/dist/components/common/Dropdown/styles.js +1 -1
- package/dist/components/common/Flag/components/ArmFlag/index.js +1 -1
- package/dist/components/common/Flag/components/AzeFlag/index.js +1 -1
- package/dist/components/common/Flag/components/BlrFlag/index.js +1 -1
- package/dist/components/common/Flag/components/ChnFlag/index.js +1 -1
- package/dist/components/common/Flag/components/EngFlag/index.js +1 -1
- package/dist/components/common/Flag/components/EspFlag/index.js +1 -1
- package/dist/components/common/Flag/components/KazFlag/index.js +1 -1
- package/dist/components/common/Flag/components/KgzFlag/index.js +1 -1
- package/dist/components/common/Flag/components/MdaFlag/index.js +1 -1
- package/dist/components/common/Flag/components/RusFlag/index.js +1 -1
- package/dist/components/common/Flag/components/TjkFlag/index.js +1 -1
- package/dist/components/common/Flag/components/UnknownFlag/index.js +1 -1
- package/dist/components/common/Flag/components/UzbFlag/index.js +1 -1
- package/dist/components/common/Flag/index.js +2 -2
- package/dist/components/common/Flag/styles.d.ts +2 -2
- package/dist/components/common/Flag/styles.js +1 -1
- package/dist/components/common/InvoiceboxLoader/index.js +1 -1
- package/dist/components/common/InvoiceboxSpinner/index.js +2 -2
- package/dist/components/common/InvoiceboxSpinner/styles.d.ts +2 -2
- package/dist/components/common/InvoiceboxSpinner/styles.js +1 -1
- package/dist/components/common/Scrollbar/index.js +2 -2
- package/dist/components/common/Scrollbar/index.stories.js +1 -1
- package/dist/components/common/SecondaryButton/index.js +5 -5
- package/dist/components/common/SecondaryButton/index.stories.js +2 -2
- package/dist/components/common/SecondaryButton/styles.d.ts +5 -41
- package/dist/components/common/SecondaryButton/styles.js +1 -1
- package/dist/components/common/Skeleton/index.js +2 -2
- package/dist/components/common/Skeleton/index.stories.js +1 -1
- package/dist/components/common/Skeleton/styles.d.ts +4 -4
- package/dist/components/common/Skeleton/styles.js +1 -1
- package/dist/components/common/Toast/docs.stories.js +1 -1
- package/dist/components/common/Toast/index.js +4 -4
- package/dist/components/common/Toast/index.stories.js +1 -1
- package/dist/components/common/Toast/styles.d.ts +2 -4
- package/dist/components/common/Toast/styles.js +1 -1
- package/dist/components/common/Typography/index.js +4 -4
- package/dist/components/common/Typography/index.stories.js +1 -1
- package/dist/components/common/Typography/styles.d.ts +2 -2
- package/dist/components/common/Typography/styles.js +1 -1
- package/dist/components/common/WarningIcon/components/Icon.js +1 -1
- package/dist/components/common/WarningIcon/index.js +2 -2
- package/dist/components/common/WarningIcon/styles.d.ts +2 -2
- package/dist/components/common/WarningIcon/styles.js +1 -1
- package/dist/components/form/CountrySelect/components/CountryItem/index.js +1 -1
- package/dist/components/form/CountrySelect/components/CountryItem/index.stories.js +2 -2
- package/dist/components/form/CountrySelect/components/CountryItem/stlyes.d.ts +4 -4
- package/dist/components/form/CountrySelect/components/CountryItem/stlyes.js +1 -1
- package/dist/components/form/CountrySelect/index.js +11 -11
- package/dist/components/form/CountrySelect/index.stories.js +6 -6
- package/dist/components/form/CountrySelect/logic.js +6 -5
- package/dist/components/form/CountrySelect/palette.js +1 -1
- package/dist/components/form/CountrySelect/stlyes.d.ts +5 -5
- package/dist/components/form/CountrySelect/stlyes.js +1 -1
- package/dist/components/form/DateInput/components/Icon/index.js +1 -1
- package/dist/components/form/DateInput/docs.stories.js +1 -1
- package/dist/components/form/DateInput/index.js +5 -5
- package/dist/components/form/DateInput/index.stories.js +6 -6
- package/dist/components/form/DateInput/logic.js +11 -10
- package/dist/components/form/DateInput/styles.d.ts +5 -5
- package/dist/components/form/DateInput/styles.js +1 -1
- package/dist/components/form/InputLabel/index.js +2 -2
- package/dist/components/form/InputLabel/index.stories.js +1 -1
- package/dist/components/form/InputLabel/styles.d.ts +4 -40
- package/dist/components/form/InputLabel/styles.js +1 -1
- package/dist/components/form/PhoneInput/constants.js +9 -9
- package/dist/components/form/PhoneInput/externalPhoneLogic.js +6 -5
- package/dist/components/form/PhoneInput/hooks/useValidateInitialValue.js +7 -7
- package/dist/components/form/PhoneInput/index.js +7 -7
- package/dist/components/form/PhoneInput/index.stories.js +11 -8
- package/dist/components/form/PhoneInput/phoneInputLogic.js +7 -6
- package/dist/components/form/PhoneInput/styles.d.ts +3 -3
- package/dist/components/form/PhoneInput/styles.js +1 -1
- package/dist/components/form/PositiveIntegerInput/index.js +1 -1
- package/dist/components/form/PositiveIntegerInput/index.stories.js +6 -6
- package/dist/components/form/PositiveIntegerInput/styles.d.ts +4 -4
- package/dist/components/form/PositiveIntegerInput/styles.js +1 -1
- package/dist/components/form/PureInput/index.js +5 -5
- package/dist/components/form/PureInput/palette.js +1 -1
- package/dist/components/form/PureInput/styles.d.ts +2 -38
- package/dist/components/form/PureInput/styles.js +1 -1
- package/dist/components/form/SearchInput/components/CrossIcon/index.js +1 -1
- package/dist/components/form/SearchInput/components/SearchIcon/index.js +1 -1
- package/dist/components/form/SearchInput/index.js +1 -1
- package/dist/components/form/SearchInput/index.stories.js +6 -6
- package/dist/components/form/SearchInput/styles.d.ts +3 -3
- package/dist/components/form/SearchInput/styles.js +1 -1
- package/dist/components/form/Select/components/Input/index.js +2 -2
- package/dist/components/form/Select/components/Input/styles.d.ts +2 -2
- package/dist/components/form/Select/components/Input/styles.js +1 -1
- package/dist/components/form/Select/index.js +5 -5
- package/dist/components/form/Select/index.stories.js +6 -6
- package/dist/components/form/Select/palette.js +1 -1
- package/dist/components/form/Select/styles.d.ts +6 -78
- package/dist/components/form/Select/styles.js +1 -1
- package/dist/components/payment/PaymentCard/components/DefaultLogo.js +1 -1
- package/dist/components/payment/PaymentCard/components/SelectedRadioIcon.js +1 -1
- package/dist/components/payment/PaymentCard/components/UnselectedRadioIcon.js +1 -1
- package/dist/components/payment/PaymentCard/index.js +2 -2
- package/dist/components/payment/PaymentCard/index.stories.js +1 -1
- package/dist/components/payment/PaymentCard/palette.js +1 -1
- package/dist/components/payment/PaymentCard/styles.d.ts +10 -82
- package/dist/components/payment/PaymentCard/styles.js +1 -1
- package/dist/hooks/useCss/index.stories.js +5 -5
- package/dist/hooks/useInputFocus/index.js +4 -4
- package/dist/hooks/useInputFocus/index.stories.js +1 -1
- package/dist/hooks/useMedia/index.stories.js +1 -1
- package/dist/hooks/useOutsideClick/index.stories.js +1 -1
- package/dist/hooks/useUnupdatableHandler/index.stories.js +5 -5
- package/dist/palette/colors.stories.js +1 -1
- package/dist/palette/index.stories.js +1 -1
- package/dist/palette/provider.js +3 -3
- package/dist/palette/useComponentPalette.js +2 -2
- package/package.json +1 -1
|
@@ -11,14 +11,14 @@ var _ = require(".");
|
|
|
11
11
|
require("react-calendar/dist/Calendar.css");
|
|
12
12
|
require("../../common/Calendar/index.css");
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
15
|
-
function _extends() {
|
|
16
|
-
function _slicedToArray(
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
17
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
-
function _unsupportedIterableToArray(
|
|
19
|
-
function _arrayLikeToArray(
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20
20
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
21
|
-
function _arrayWithHoles(
|
|
21
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
var meta = {
|
|
23
23
|
title: 'form/DateInput',
|
|
24
24
|
component: _.DateInput,
|
|
@@ -5,24 +5,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.logic = void 0;
|
|
7
7
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
-
function _slicedToArray(
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _unsupportedIterableToArray(
|
|
11
|
-
function _arrayLikeToArray(
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
12
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
-
function _arrayWithHoles(
|
|
14
|
-
function _classCallCheck(
|
|
15
|
-
function _defineProperties(
|
|
16
|
-
function _createClass(
|
|
17
|
-
function _defineProperty(
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
19
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
20
|
var Logic = /*#__PURE__*/function () {
|
|
21
21
|
function Logic() {
|
|
22
22
|
_classCallCheck(this, Logic);
|
|
23
23
|
_defineProperty(this, "today", new Date());
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
_createClass(Logic, [{
|
|
26
26
|
key: "getPlaceholder",
|
|
27
27
|
value: function getPlaceholder() {
|
|
28
28
|
return this.valueToString(this.today);
|
|
@@ -66,5 +66,6 @@ var Logic = /*#__PURE__*/function () {
|
|
|
66
66
|
}).join('/'));
|
|
67
67
|
}
|
|
68
68
|
}]);
|
|
69
|
+
return Logic;
|
|
69
70
|
}();
|
|
70
71
|
var logic = exports.logic = new Logic();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TDateInputPalette } from './palette';
|
|
3
|
-
export declare const Wrapper: import("styled-components
|
|
4
|
-
export declare const InputWrapper: import("styled-components
|
|
5
|
-
export declare const Icon: import("styled-components
|
|
3
|
+
export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
4
|
+
export declare const InputWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
5
|
+
export declare const Icon: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
6
|
$palette: TDateInputPalette;
|
|
7
|
-
}
|
|
8
|
-
export declare const Calendar: import("styled-components
|
|
7
|
+
}>>;
|
|
8
|
+
export declare const Calendar: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Wrapper = exports.InputWrapper = exports.Icon = exports.Calendar = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _breakpoints = require("../../../breakpoints");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
10
|
var Wrapper = exports.Wrapper = _styledComponents["default"].div.withConfig({
|
|
11
11
|
displayName: "styles__Wrapper",
|
|
12
12
|
componentId: "sc-7tnmvh-0"
|
|
@@ -9,8 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var S = _interopRequireWildcard(require("./styles"));
|
|
10
10
|
var _palette = require("../../../palette");
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
13
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
14
|
var InputLabel = exports.InputLabel = function InputLabel(_ref) {
|
|
15
15
|
var _ref$disabled = _ref.disabled,
|
|
16
16
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -7,7 +7,7 @@ exports["default"] = exports.Default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _ = require(".");
|
|
9
9
|
var _Typography = require("../../common/Typography");
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
11
|
var meta = {
|
|
12
12
|
title: 'form/InputLabel',
|
|
13
13
|
component: _.InputLabel,
|
|
@@ -1,47 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TInputLabelPalette } from './palette';
|
|
3
|
-
export declare const Label: import("styled-components
|
|
4
|
-
variant: "headline1" | "headline2" | "headline3" | "headline4" | "headline5" | "headline6" | "headerText" | "buttonL" | "bodyL" | "bodyLUnderlined" | "buttonM" | "bodyMRegular" | "bodyMBold" | "bodyMUnderlined" | "captionRegular" | "captionSRegular" | "captionUnderlined" | "smallMedium" | "labelsAndHints";
|
|
5
|
-
} & {
|
|
6
|
-
element?: "div" | undefined;
|
|
7
|
-
} & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
|
|
8
|
-
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
9
|
-
}) | (Omit<{
|
|
10
|
-
variant: "headline1" | "headline2" | "headline3" | "headline4" | "headline5" | "headline6" | "headerText" | "buttonL" | "bodyL" | "bodyLUnderlined" | "buttonM" | "bodyMRegular" | "bodyMBold" | "bodyMUnderlined" | "captionRegular" | "captionSRegular" | "captionUnderlined" | "smallMedium" | "labelsAndHints";
|
|
11
|
-
} & {
|
|
12
|
-
element: "p";
|
|
13
|
-
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
|
|
14
|
-
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
15
|
-
}) | (Omit<{
|
|
16
|
-
variant: "headline1" | "headline2" | "headline3" | "headline4" | "headline5" | "headline6" | "headerText" | "buttonL" | "bodyL" | "bodyLUnderlined" | "buttonM" | "bodyMRegular" | "bodyMBold" | "bodyMUnderlined" | "captionRegular" | "captionSRegular" | "captionUnderlined" | "smallMedium" | "labelsAndHints";
|
|
17
|
-
} & {
|
|
18
|
-
element: "span";
|
|
19
|
-
} & import("react").HTMLAttributes<HTMLSpanElement> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
|
|
20
|
-
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
21
|
-
}) | (Omit<{
|
|
22
|
-
variant: "headline1" | "headline2" | "headline3" | "headline4" | "headline5" | "headline6" | "headerText" | "buttonL" | "bodyL" | "bodyLUnderlined" | "buttonM" | "bodyMRegular" | "bodyMBold" | "bodyMUnderlined" | "captionRegular" | "captionSRegular" | "captionUnderlined" | "smallMedium" | "labelsAndHints";
|
|
23
|
-
} & {
|
|
24
|
-
element: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
25
|
-
} & import("react").HTMLAttributes<HTMLHeadingElement> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
|
|
26
|
-
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
27
|
-
}) | (Omit<{
|
|
28
|
-
variant: "headline1" | "headline2" | "headline3" | "headline4" | "headline5" | "headline6" | "headerText" | "buttonL" | "bodyL" | "bodyLUnderlined" | "buttonM" | "bodyMRegular" | "bodyMBold" | "bodyMUnderlined" | "captionRegular" | "captionSRegular" | "captionUnderlined" | "smallMedium" | "labelsAndHints";
|
|
29
|
-
} & {
|
|
30
|
-
element: "button";
|
|
31
|
-
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
|
|
32
|
-
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
33
|
-
}) | (Omit<{
|
|
34
|
-
variant: "headline1" | "headline2" | "headline3" | "headline4" | "headline5" | "headline6" | "headerText" | "buttonL" | "bodyL" | "bodyLUnderlined" | "buttonM" | "bodyMRegular" | "bodyMBold" | "bodyMUnderlined" | "captionRegular" | "captionSRegular" | "captionUnderlined" | "smallMedium" | "labelsAndHints";
|
|
35
|
-
} & {
|
|
36
|
-
element: "input";
|
|
37
|
-
} & import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
|
|
38
|
-
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
39
|
-
}), {
|
|
3
|
+
export declare const Label: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("../../common/Typography").TProps & import("react").RefAttributes<HTMLInputElement>, {
|
|
40
4
|
$inFocus: boolean;
|
|
41
5
|
$palette: TInputLabelPalette;
|
|
42
|
-
}>> &
|
|
43
|
-
export declare const Wrapper: import("styled-components
|
|
6
|
+
}>> & Omit<import("react").ForwardRefExoticComponent<import("../../common/Typography").TProps & import("react").RefAttributes<HTMLInputElement>>, keyof import("react").Component<any, {}, any>>;
|
|
7
|
+
export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
44
8
|
$disabled: boolean;
|
|
45
9
|
$isLabel: boolean;
|
|
46
10
|
$palette: TInputLabelPalette;
|
|
47
|
-
}
|
|
11
|
+
}>>;
|
|
@@ -8,7 +8,7 @@ exports.Wrapper = exports.Label = void 0;
|
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _Typography = require("../../common/Typography");
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
12
|
var Label = exports.Label = (0, _styledComponents["default"])(_Typography.Typography).withConfig({
|
|
13
13
|
displayName: "styles__Label",
|
|
14
14
|
componentId: "sc-1prrc3p-0"
|
|
@@ -6,13 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.allCountriesPhoneRules = exports.MASK_DIGIT_ITEM = void 0;
|
|
7
7
|
var MASK_DIGIT_ITEM = exports.MASK_DIGIT_ITEM = '9';
|
|
8
8
|
var allCountriesPhoneRules = exports.allCountriesPhoneRules = {
|
|
9
|
-
RUS: {
|
|
10
|
-
placeholder: '+7 (XXX) XXX-XX-XX',
|
|
11
|
-
mask: '+9 (999) 999-99-99',
|
|
12
|
-
startSubsequence: '7',
|
|
13
|
-
regexp: /^\+?7(9\d{9})$/,
|
|
14
|
-
flag: 'RUS'
|
|
15
|
-
},
|
|
16
9
|
BLR: {
|
|
17
10
|
placeholder: '+375 XX XXX-XX-XX',
|
|
18
11
|
mask: '+999 99 999-99-99',
|
|
@@ -37,10 +30,17 @@ var allCountriesPhoneRules = exports.allCountriesPhoneRules = {
|
|
|
37
30
|
KAZ: {
|
|
38
31
|
placeholder: '+7 (XXX) XXX-XX-XX',
|
|
39
32
|
mask: '+9 (999) 999-99-99',
|
|
40
|
-
startSubsequence: '
|
|
41
|
-
regexp: /^
|
|
33
|
+
startSubsequence: '77',
|
|
34
|
+
regexp: /^77\d{9}$/,
|
|
42
35
|
flag: 'KAZ'
|
|
43
36
|
},
|
|
37
|
+
RUS: {
|
|
38
|
+
placeholder: '+7 (XXX) XXX-XX-XX',
|
|
39
|
+
mask: '+9 (999) 999-99-99',
|
|
40
|
+
startSubsequence: '7',
|
|
41
|
+
regexp: /^\+?7(9\d{9})$/,
|
|
42
|
+
flag: 'RUS'
|
|
43
|
+
},
|
|
44
44
|
KGZ: {
|
|
45
45
|
placeholder: '+996 XXX-XX-XX-XX',
|
|
46
46
|
mask: '+999 999-99-99-99',
|
|
@@ -7,16 +7,16 @@ exports.phoneLogic = void 0;
|
|
|
7
7
|
var _constants = require("./constants");
|
|
8
8
|
var _phoneInputLogic = require("./phoneInputLogic");
|
|
9
9
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _classCallCheck(
|
|
11
|
-
function _defineProperties(
|
|
12
|
-
function _createClass(
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
10
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
var ExternalPhoneLogic = /*#__PURE__*/function () {
|
|
16
16
|
function ExternalPhoneLogic() {
|
|
17
17
|
_classCallCheck(this, ExternalPhoneLogic);
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
_createClass(ExternalPhoneLogic, [{
|
|
20
20
|
key: "getIsValidPhone",
|
|
21
21
|
value: function getIsValidPhone(value, countries) {
|
|
22
22
|
var notFormattedValue = _phoneInputLogic.phoneInputLogic.getOnlyNumbersFromString(value);
|
|
@@ -33,5 +33,6 @@ var ExternalPhoneLogic = /*#__PURE__*/function () {
|
|
|
33
33
|
return _phoneInputLogic.phoneInputLogic.getIsValidPhoneInputByCountry(phone || '', _constants.allCountriesPhoneRules.RUS);
|
|
34
34
|
}
|
|
35
35
|
}]);
|
|
36
|
+
return ExternalPhoneLogic;
|
|
36
37
|
}();
|
|
37
38
|
var phoneLogic = exports.phoneLogic = new ExternalPhoneLogic();
|
|
@@ -8,12 +8,12 @@ var _react = require("react");
|
|
|
8
8
|
var _phoneInputLogic = require("../phoneInputLogic");
|
|
9
9
|
var _constants = require("../constants");
|
|
10
10
|
var _types = require("../types");
|
|
11
|
-
function _slicedToArray(
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(
|
|
14
|
-
function _arrayLikeToArray(
|
|
13
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
15
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
16
|
-
function _arrayWithHoles(
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
var useValidateInitialValue = exports.useValidateInitialValue = function useValidateInitialValue(initialValue, currentCountriesPhoneRules, onValid, onUnValid) {
|
|
18
18
|
var _useState = (0, _react.useState)(false),
|
|
19
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -26,12 +26,12 @@ var useValidateInitialValue = exports.useValidateInitialValue = function useVali
|
|
|
26
26
|
var currentCountry = Object.entries(currentCountriesPhoneRules).find(function (item) {
|
|
27
27
|
return _phoneInputLogic.phoneInputLogic.getIsHaveStartSequenceInString(notFormattedValue, item[1].startSubsequence);
|
|
28
28
|
});
|
|
29
|
-
var
|
|
29
|
+
var _countryCode = currentCountry ? currentCountry[0] : _types.RUS_COUNTRY_CODE;
|
|
30
30
|
var isValidInputValue = _phoneInputLogic.phoneInputLogic.getIsValidPhoneInputByCountry(notFormattedValue, currentCountry ? currentCountry[1] : _constants.allCountriesPhoneRules.RUS);
|
|
31
31
|
if (isValidInputValue) {
|
|
32
|
-
onValid(notFormattedValue,
|
|
32
|
+
onValid(notFormattedValue, _countryCode);
|
|
33
33
|
} else {
|
|
34
|
-
onUnValid(
|
|
34
|
+
onUnValid(_countryCode);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
setIsInitialValidateDone(true);
|
|
@@ -16,15 +16,15 @@ var _InputLabel = require("../InputLabel");
|
|
|
16
16
|
var _PureInput = require("../PureInput");
|
|
17
17
|
var _CountrySelect = require("../CountrySelect");
|
|
18
18
|
var _useMedia = require("../../../hooks/useMedia");
|
|
19
|
-
function _interopRequireDefault(
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
20
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
22
|
-
function _slicedToArray(
|
|
21
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
23
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
|
-
function _unsupportedIterableToArray(
|
|
25
|
-
function _arrayLikeToArray(
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
26
26
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
27
|
-
function _arrayWithHoles(
|
|
27
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
var PhoneInput = exports.PhoneInput = function PhoneInput(_ref) {
|
|
29
29
|
var onBlur = _ref.onBlur,
|
|
30
30
|
name = _ref.name,
|
|
@@ -92,7 +92,7 @@ var PhoneInput = exports.PhoneInput = function PhoneInput(_ref) {
|
|
|
92
92
|
var getNewCountryByInputValue = (0, _react.useCallback)(function (currentValue) {
|
|
93
93
|
var currentCountry = currentCountriesPhoneRules[country];
|
|
94
94
|
var newCountry = Object.entries(currentCountriesPhoneRules).find(function (item) {
|
|
95
|
-
return _phoneInputLogic.phoneInputLogic.getIsHaveStartSequenceInString(currentValue, item[1].startSubsequence)
|
|
95
|
+
return _phoneInputLogic.phoneInputLogic.getIsHaveStartSequenceInString(currentValue, item[1].startSubsequence);
|
|
96
96
|
});
|
|
97
97
|
var isNeedChangeCountry = _phoneInputLogic.phoneInputLogic.getIsNeedChangeCountry(currentValue, currentCountry, newCountry);
|
|
98
98
|
var isNeedAndCanChangeCountry = isNeedChangeCountry && !!newCountry;
|
|
@@ -8,19 +8,19 @@ exports["default"] = exports.MultiCountryWithUnknown = exports.MultiCountry = ex
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _ = require(".");
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
13
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
-
function _defineProperty(
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
-
function _extends() {
|
|
18
|
-
function _slicedToArray(
|
|
17
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
19
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
|
-
function _unsupportedIterableToArray(
|
|
21
|
-
function _arrayLikeToArray(
|
|
20
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
22
22
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
23
|
-
function _arrayWithHoles(
|
|
23
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
24
|
var meta = {
|
|
25
25
|
title: 'form/PhoneInput',
|
|
26
26
|
component: _.PhoneInput,
|
|
@@ -95,6 +95,9 @@ var MultiCountryWithUnknown = exports.MultiCountryWithUnknown = {
|
|
|
95
95
|
countries: [{
|
|
96
96
|
label: 'Россия',
|
|
97
97
|
value: 'RUS'
|
|
98
|
+
}, {
|
|
99
|
+
label: 'Казахстан',
|
|
100
|
+
value: 'KAZ'
|
|
98
101
|
}, {
|
|
99
102
|
label: 'Армения',
|
|
100
103
|
value: 'ARM'
|
|
@@ -9,17 +9,17 @@ var _constants = require("./constants");
|
|
|
9
9
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
-
function _defineProperty(
|
|
13
|
-
function _classCallCheck(
|
|
14
|
-
function _defineProperties(
|
|
15
|
-
function _createClass(
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
17
17
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
18
|
var PhoneInputLogic = /*#__PURE__*/function () {
|
|
19
19
|
function PhoneInputLogic() {
|
|
20
20
|
_classCallCheck(this, PhoneInputLogic);
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
_createClass(PhoneInputLogic, [{
|
|
23
23
|
key: "getCaretPositionByRusValue",
|
|
24
24
|
value: function getCaretPositionByRusValue(value) {
|
|
25
25
|
var mask = _constants.allCountriesPhoneRules.RUS.mask.split('');
|
|
@@ -135,5 +135,6 @@ var PhoneInputLogic = /*#__PURE__*/function () {
|
|
|
135
135
|
return newCountry && currentCountry.startSubsequence !== newCountry[1].startSubsequence && inputValue && (newCountry[0] === _types.UNKNOWN_COUNTRY_CODE ? !this.getIsHaveStartSequenceInString(inputValue, currentCountry.startSubsequence) : true);
|
|
136
136
|
}
|
|
137
137
|
}]);
|
|
138
|
+
return PhoneInputLogic;
|
|
138
139
|
}();
|
|
139
140
|
var phoneInputLogic = exports.phoneInputLogic = new PhoneInputLogic();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const CountrySelectWrapper: import("styled-components
|
|
3
|
-
export declare const InputLabelContent: import("styled-components
|
|
4
|
-
export declare const InputLabelFloatWrapper: import("styled-components
|
|
2
|
+
export declare const CountrySelectWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
3
|
+
export declare const InputLabelContent: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
4
|
+
export declare const InputLabelFloatWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.InputLabelFloatWrapper = exports.InputLabelContent = exports.CountrySelectWrapper = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
9
|
var CountrySelectWrapper = exports.CountrySelectWrapper = _styledComponents["default"].div.withConfig({
|
|
10
10
|
displayName: "styles__CountrySelectWrapper",
|
|
11
11
|
componentId: "sc-pqm10s-0"
|
|
@@ -16,7 +16,7 @@ var _useNormalizers2 = require("./hooks/useNormalizers");
|
|
|
16
16
|
var _useIncrement2 = require("./hooks/useIncrement");
|
|
17
17
|
var _useIncrementDisabledFlags = require("./hooks/useIncrementDisabledFlags");
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
20
20
|
var PositiveIntegerInput = exports.PositiveIntegerInput = function PositiveIntegerInput(_ref) {
|
|
21
21
|
var value = _ref.value,
|
|
22
22
|
onChange = _ref.onChange,
|
|
@@ -9,14 +9,14 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _addonActions = require("@storybook/addon-actions");
|
|
10
10
|
var _ = require(".");
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
13
|
-
function _extends() {
|
|
14
|
-
function _slicedToArray(
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
13
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
15
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
-
function _unsupportedIterableToArray(
|
|
17
|
-
function _arrayLikeToArray(
|
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
18
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
19
|
-
function _arrayWithHoles(
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
var meta = {
|
|
21
21
|
title: 'form/PositiveIntegerInput',
|
|
22
22
|
component: _.PositiveIntegerInput,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Arrows: import("styled-components
|
|
3
|
-
export declare const Arrow: import("styled-components
|
|
2
|
+
export declare const Arrows: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
3
|
+
export declare const Arrow: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
4
|
$disabled: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const ControlWrapper: import("styled-components
|
|
5
|
+
}>>;
|
|
6
|
+
export declare const ControlWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.ControlWrapper = exports.Arrows = exports.Arrow = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
11
11
|
var Arrows = exports.Arrows = _styledComponents["default"].div.withConfig({
|
|
12
12
|
displayName: "styles__Arrows",
|
|
13
13
|
componentId: "sc-ctutr8-0"
|
|
@@ -10,11 +10,11 @@ var S = _interopRequireWildcard(require("./styles"));
|
|
|
10
10
|
var _palette = require("../../../palette");
|
|
11
11
|
var _excluded = ["paddingLeft", "paddingRight", "hasError", "inFocus", "hasBorder", "className"];
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function _extends() {
|
|
16
|
-
function _objectWithoutProperties(
|
|
17
|
-
function _objectWithoutPropertiesLoose(
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
18
|
var PureInput = exports.PureInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
19
19
|
var _ref$paddingLeft = _ref.paddingLeft,
|
|
20
20
|
paddingLeft = _ref$paddingLeft === void 0 ? 18 : _ref$paddingLeft,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.generatePureInputPalette = void 0;
|
|
7
7
|
var _hexToRgba = _interopRequireDefault(require("hex-to-rgba"));
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
9
|
var generatePureInputPalette = exports.generatePureInputPalette = function generatePureInputPalette(abstractPalette) {
|
|
10
10
|
return {
|
|
11
11
|
text: abstractPalette.primary,
|