@invoicebox/ui 0.1.0-alpha.115 → 0.1.0-alpha.117
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/_helpers/StoryBorderWrapper/index.d.ts +1 -1
- package/dist/components/_helpers/StoryBorderWrapper/index.js +1 -1
- package/dist/components/common/AppCardLink/components/ApkRu.js +1 -1
- package/dist/components/common/AppCardLink/components/AppGalleryRu.js +1 -1
- package/dist/components/common/AppCardLink/components/GooglePlayRu.js +1 -1
- package/dist/components/common/AppCardLink/components/RuStoreRu.js +1 -1
- package/dist/components/common/AppCardLink/index.js +2 -2
- package/dist/components/common/AppCardLink/styles.d.ts +1 -1
- package/dist/components/common/AppCardLink/styles.js +1 -1
- 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/InvoiceboxLogo/components/LogoDarkRu.js +1 -1
- package/dist/components/common/InvoiceboxLogo/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 +41 -5
- 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 +4 -2
- 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/Autocomplete/components/Autocomplete/index.js +5 -5
- package/dist/components/form/Autocomplete/components/Autocomplete/index.stories.js +6 -6
- package/dist/components/form/Autocomplete/components/Autocomplete/styles.d.ts +5 -5
- package/dist/components/form/Autocomplete/components/Autocomplete/styles.js +1 -1
- package/dist/components/form/Autocomplete/components/AutocompleteDefaultOption/index.js +1 -1
- package/dist/components/form/Autocomplete/components/AutocompleteDefaultOption/index.stories.js +1 -1
- package/dist/components/form/Autocomplete/components/AutocompleteDefaultOption/palette.js +1 -1
- package/dist/components/form/Autocomplete/components/OrganizationAutocompleteItem/index.js +2 -2
- package/dist/components/form/Autocomplete/components/OrganizationAutocompleteItem/index.stories.js +1 -1
- package/dist/components/form/Autocomplete/components/OrganizationAutocompleteItem/palette.js +1 -1
- package/dist/components/form/Autocomplete/components/OrganizationAutocompleteItem/styles.d.ts +226 -10
- package/dist/components/form/Autocomplete/components/OrganizationAutocompleteItem/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 +5 -6
- 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 +10 -11
- 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 +40 -4
- package/dist/components/form/InputLabel/styles.js +1 -1
- package/dist/components/form/PhoneInput/externalPhoneLogic.js +5 -6
- package/dist/components/form/PhoneInput/hooks/useValidateInitialValue.js +7 -7
- package/dist/components/form/PhoneInput/index.js +6 -6
- package/dist/components/form/PhoneInput/index.stories.js +8 -8
- package/dist/components/form/PhoneInput/phoneInputLogic.js +6 -7
- 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 +38 -2
- 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 +78 -6
- package/dist/components/form/Select/styles.js +1 -1
- package/dist/components/form/TextInput/index.js +1 -1
- package/dist/components/form/TextInput/index.stories.js +6 -6
- package/dist/components/form/TextInput/styles.d.ts +2 -2
- package/dist/components/form/TextInput/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 +82 -10
- 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/index.d.ts +0 -3
- package/dist/index.js +0 -21
- 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 +2 -7
- package/dist/components/_helpers/StoryOneFieldForm/index.d.ts +0 -12
- package/dist/components/_helpers/StoryOneFieldForm/index.js +0 -39
- package/dist/components/common/Portal/index.d.ts +0 -5
- package/dist/components/common/Portal/index.js +0 -27
- package/dist/components/common/Portal/index.stories.d.ts +0 -10
- package/dist/components/common/Portal/index.stories.js +0 -26
- package/dist/components/formFields/RHFAutocomplete/index.d.ts +0 -6
- package/dist/components/formFields/RHFAutocomplete/index.js +0 -44
- package/dist/components/formFields/RHFAutocomplete/index.stories.d.ts +0 -5
- package/dist/components/formFields/RHFAutocomplete/index.stories.js +0 -40
- package/dist/components/formFields/RHFTextInput/index.d.ts +0 -6
- package/dist/components/formFields/RHFTextInput/index.js +0 -37
- package/dist/components/formFields/RHFTextInput/index.stories.d.ts +0 -5
- package/dist/components/formFields/RHFTextInput/index.stories.js +0 -38
|
@@ -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() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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 && {}.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() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
19
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
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(r) { if (Array.isArray(r)) return r; }
|
|
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(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
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 :
|
|
13
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : 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
|
-
_createClass(Logic, [{
|
|
25
|
+
return _createClass(Logic, [{
|
|
26
26
|
key: "getPlaceholder",
|
|
27
27
|
value: function getPlaceholder() {
|
|
28
28
|
return this.valueToString(this.today);
|
|
@@ -66,6 +66,5 @@ var Logic = /*#__PURE__*/function () {
|
|
|
66
66
|
}).join('/'));
|
|
67
67
|
}
|
|
68
68
|
}]);
|
|
69
|
-
return Logic;
|
|
70
69
|
}();
|
|
71
70
|
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/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const InputWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
+
export declare const Icon: import("styled-components/dist/types").IStyledComponentBase<"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
|
+
}>> & string;
|
|
8
|
+
export declare const Calendar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -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(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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 && {}.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(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
11
|
var meta = {
|
|
12
12
|
title: 'form/InputLabel',
|
|
13
13
|
component: _.InputLabel,
|
|
@@ -1,11 +1,47 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TInputLabelPalette } from './palette';
|
|
3
|
-
export declare const Label: import("styled-components").
|
|
3
|
+
export declare const Label: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit<{
|
|
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
|
+
}), {
|
|
4
40
|
$inFocus: boolean;
|
|
5
41
|
$palette: TInputLabelPalette;
|
|
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").
|
|
42
|
+
}>> & string & Omit<import("react").ForwardRefExoticComponent<import("../../common/Typography").TProps & import("react").RefAttributes<HTMLInputElement>>, keyof import("react").Component<any, {}, any>>;
|
|
43
|
+
export declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
8
44
|
$disabled: boolean;
|
|
9
45
|
$isLabel: boolean;
|
|
10
46
|
$palette: TInputLabelPalette;
|
|
11
|
-
}
|
|
47
|
+
}>> & string;
|
|
@@ -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 && {}.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"
|
|
@@ -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 :
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : 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
|
-
_createClass(ExternalPhoneLogic, [{
|
|
19
|
+
return _createClass(ExternalPhoneLogic, [{
|
|
20
20
|
key: "getIsValidPhone",
|
|
21
21
|
value: function getIsValidPhone(value, countries) {
|
|
22
22
|
var notFormattedValue = _phoneInputLogic.phoneInputLogic.getOnlyNumbersFromString(value);
|
|
@@ -33,6 +33,5 @@ var ExternalPhoneLogic = /*#__PURE__*/function () {
|
|
|
33
33
|
return _phoneInputLogic.phoneInputLogic.getIsValidPhoneInputByCountry(phone || '', _constants.allCountriesPhoneRules.RUS);
|
|
34
34
|
}
|
|
35
35
|
}]);
|
|
36
|
-
return ExternalPhoneLogic;
|
|
37
36
|
}();
|
|
38
37
|
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(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
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(r) { if (Array.isArray(r)) return r; }
|
|
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(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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 && {}.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(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
25
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
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(r) { if (Array.isArray(r)) return r; }
|
|
28
28
|
var PhoneInput = exports.PhoneInput = function PhoneInput(_ref) {
|
|
29
29
|
var onBlur = _ref.onBlur,
|
|
30
30
|
name = _ref.name,
|
|
@@ -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 && {}.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 :
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : 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() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
18
|
-
function _slicedToArray(
|
|
17
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
18
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
21
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
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(r) { if (Array.isArray(r)) return r; }
|
|
24
24
|
var meta = {
|
|
25
25
|
title: 'form/PhoneInput',
|
|
26
26
|
component: _.PhoneInput,
|
|
@@ -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 :
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : 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
|
-
_createClass(PhoneInputLogic, [{
|
|
22
|
+
return _createClass(PhoneInputLogic, [{
|
|
23
23
|
key: "getCaretPositionByRusValue",
|
|
24
24
|
value: function getCaretPositionByRusValue(value) {
|
|
25
25
|
var mask = _constants.allCountriesPhoneRules.RUS.mask.split('');
|
|
@@ -135,6 +135,5 @@ 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;
|
|
139
138
|
}();
|
|
140
139
|
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/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const InputLabelContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const InputLabelFloatWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -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(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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 && {}.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() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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 && {}.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() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
17
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
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(r) { if (Array.isArray(r)) return r; }
|
|
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/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const Arrow: import("styled-components/dist/types").IStyledComponentBase<"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
|
+
}>> & string;
|
|
6
|
+
export declare const ControlWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -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 && {}.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() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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 && {}.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(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
17
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
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(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
var generatePureInputPalette = exports.generatePureInputPalette = function generatePureInputPalette(abstractPalette) {
|
|
10
10
|
return {
|
|
11
11
|
text: abstractPalette.primary,
|