@invoicebox/ui 0.1.0-alpha.318 → 0.1.0-alpha.319
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/AppCardLink/index.js +1 -2
- package/dist/components/common/Arrow/components/StyledSvg/index.js +3 -2
- package/dist/components/common/BgCard/index.js +1 -2
- package/dist/components/common/BgCard/styles.js +1 -2
- package/dist/components/common/Calendar/index.js +1 -2
- package/dist/components/common/Calendar/index.stories.js +1 -2
- package/dist/components/common/Calendar/styles.js +1 -2
- package/dist/components/common/Divider/index.js +1 -2
- package/dist/components/common/Drawer/index.js +3 -3
- package/dist/components/common/Drawer/index.stories.js +1 -2
- package/dist/components/common/Drawer/styles.js +6 -6
- package/dist/components/common/Dropdown/index.d.ts +1 -0
- package/dist/components/common/Dropdown/index.js +4 -3
- package/dist/components/common/Dropdown/styles.js +11 -11
- package/dist/components/common/EntityAutocompleteOptionsDrawer/index.js +1 -2
- package/dist/components/common/EntityAutocompleteOptionsDrawer/index.stories.js +1 -2
- package/dist/components/common/ErrorBoundary/index.d.ts +15 -0
- package/dist/components/common/ErrorBoundary/index.js +64 -0
- package/dist/components/common/Flag/components/AreFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/AreFlag/index.js +37 -0
- package/dist/components/common/Flag/components/AreFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/AreFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/AusFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/AusFlag/index.js +87 -0
- package/dist/components/common/Flag/components/AusFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/AusFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/DeuFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/DeuFlag/index.js +32 -0
- package/dist/components/common/Flag/components/DeuFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/DeuFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/EcuFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/EcuFlag/index.js +42 -0
- package/dist/components/common/Flag/components/EcuFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/EcuFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/FraFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/FraFlag/index.js +32 -0
- package/dist/components/common/Flag/components/FraFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/FraFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/IndFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/IndFlag/index.js +47 -0
- package/dist/components/common/Flag/components/IndFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/IndFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/SauFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/SauFlag/index.js +37 -0
- package/dist/components/common/Flag/components/SauFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/SauFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/SrbFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/SrbFlag/index.js +42 -0
- package/dist/components/common/Flag/components/SrbFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/SrbFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/SvkFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/SvkFlag/index.js +47 -0
- package/dist/components/common/Flag/components/SvkFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/SvkFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/SvnFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/SvnFlag/index.js +42 -0
- package/dist/components/common/Flag/components/SvnFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/SvnFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/components/TurFlag/index.d.ts +1 -0
- package/dist/components/common/Flag/components/TurFlag/index.js +32 -0
- package/dist/components/common/Flag/components/TurFlag/index.stories.d.ts +5 -0
- package/dist/components/common/Flag/components/TurFlag/index.stories.js +14 -0
- package/dist/components/common/Flag/index.d.ts +2 -2
- package/dist/components/common/Flag/index.js +24 -3
- package/dist/components/common/Flag/index.stories.d.ts +1 -0
- package/dist/components/common/Flag/index.stories.js +26 -1
- package/dist/components/common/Flag/styles.js +1 -2
- package/dist/components/common/InvoiceboxSpinner/index.js +1 -2
- package/dist/components/common/InvoiceboxSpinner/styles.js +1 -2
- package/dist/components/common/PointsLoader/index.js +1 -2
- package/dist/components/common/QRCode/index.js +2 -2
- package/dist/components/common/ReadOnlyLabelValueField/index.js +1 -2
- package/dist/components/common/Scrollbar/index.js +1 -2
- package/dist/components/common/Scrollbar/styles.js +1 -2
- package/dist/components/common/SecondaryButton/index.js +3 -4
- package/dist/components/common/SecondaryButton/styles.js +4 -4
- package/dist/components/common/Skeleton/index.js +1 -2
- package/dist/components/common/Skeleton/styles.js +4 -4
- package/dist/components/common/Toast/index.d.ts +6 -2
- package/dist/components/common/Toast/index.js +12 -4
- package/dist/components/common/Tooltip/index.js +12 -3
- package/dist/components/common/Typography/index.js +3 -4
- package/dist/components/common/WarningIcon/index.js +1 -2
- package/dist/components/form/Autocomplete/components/Autocomplete/index.js +16 -4
- package/dist/components/form/Autocomplete/components/Autocomplete/index.stories.js +1 -2
- package/dist/components/form/Autocomplete/components/AutocompleteDefaultOption/index.js +3 -2
- package/dist/components/form/Autocomplete/components/OrganizationAutocompleteItem/index.js +1 -2
- package/dist/components/form/Checkbox/index.js +3 -4
- package/dist/components/form/Checkbox/index.stories.js +1 -2
- package/dist/components/form/Checkbox/styles.js +11 -4
- package/dist/components/form/CodeInput/index.js +4 -3
- package/dist/components/form/CodeInput/index.stories.js +1 -2
- package/dist/components/form/CountrySelect/components/CountryItem/index.js +1 -2
- package/dist/components/form/CountrySelect/index.js +3 -4
- package/dist/components/form/CurrencyInput/CoreCurrencyInput/index.js +1 -2
- package/dist/components/form/CurrencyInput/CoreCurrencyInput/index.stories.js +1 -2
- package/dist/components/form/CurrencyInput/CurrencyInputNumber/index.js +2 -2
- package/dist/components/form/CurrencyInput/CurrencyInputNumber/index.stories.js +1 -2
- package/dist/components/form/CurrencyInput/CurrencyInputString/index.js +2 -2
- package/dist/components/form/CurrencyInput/CurrencyInputString/index.stories.js +1 -2
- package/dist/components/form/DateInput/components/CalendarIcon/index.js +1 -2
- package/dist/components/form/DateInput/components/MobileDrawerDateCalendar/index.js +1 -2
- package/dist/components/form/DateInput/components/MobileDrawerDateCalendar/index.stories.js +1 -2
- package/dist/components/form/DateInput/index.js +3 -3
- package/dist/components/form/DateInput/index.stories.js +1 -2
- package/dist/components/form/DateTimeInput/components/MobileDrawerDateTimeCalendar/index.js +1 -2
- package/dist/components/form/DateTimeInput/components/MobileDrawerDateTimeCalendar/index.stories.js +1 -2
- package/dist/components/form/DateTimeInput/components/MobileNumbersColumn/index.js +1 -2
- package/dist/components/form/DateTimeInput/components/MobileNumbersColumn/styles.js +4 -4
- package/dist/components/form/DateTimeInput/components/TimePicker/index.js +1 -2
- package/dist/components/form/DateTimeInput/components/TimePicker/index.stories.js +1 -2
- package/dist/components/form/DateTimeInput/index.js +3 -3
- package/dist/components/form/DateTimeInput/index.stories.js +1 -2
- package/dist/components/form/InputLabel/index.js +1 -2
- package/dist/components/form/InputLabel/styles.js +4 -4
- package/dist/components/form/ModernPlaceholder/index.js +1 -2
- package/dist/components/form/ModernPlaceholder/styles.js +3 -2
- package/dist/components/form/PhoneInput/constants.js +98 -0
- package/dist/components/form/PhoneInput/index.js +4 -3
- package/dist/components/form/PhoneInput/index.stories.js +43 -2
- package/dist/components/form/PhoneInput/phoneInputLogic.d.ts +2 -2
- package/dist/components/form/PhoneInput/types.d.ts +1 -1
- package/dist/components/form/PhoneInput/types.js +1 -1
- package/dist/components/form/PositiveIntegerInput/index.js +1 -2
- package/dist/components/form/PositiveIntegerInput/index.stories.js +1 -2
- package/dist/components/form/PositiveIntegerInput/styles.js +1 -2
- package/dist/components/form/PureInput/index.js +3 -4
- package/dist/components/form/PureInput/styles.js +5 -4
- package/dist/components/form/ResetButton/index.js +1 -2
- package/dist/components/form/SearchInput/index.js +4 -3
- package/dist/components/form/SearchInput/index.stories.js +1 -2
- package/dist/components/form/SearchInput/styles.js +3 -2
- package/dist/components/form/Select/components/Input/index.d.ts +2 -0
- package/dist/components/form/Select/components/Input/index.js +8 -4
- package/dist/components/form/Select/components/Loader/index.js +1 -2
- package/dist/components/form/Select/components/MultipleValue/index.js +1 -2
- package/dist/components/form/Select/components/MultipleValue/styles.js +1 -2
- package/dist/components/form/Select/index.js +111 -11
- package/dist/components/form/Select/index.stories.js +1 -2
- package/dist/components/form/Select/styles.d.ts +1 -0
- package/dist/components/form/Select/styles.js +18 -14
- package/dist/components/form/TagsInput/index.js +1 -2
- package/dist/components/form/TagsInput/index.stories.js +1 -2
- package/dist/components/form/TagsInput/styles.js +2 -2
- package/dist/components/form/TextInput/index.d.ts +1 -1
- package/dist/components/form/TextInput/index.js +4 -3
- package/dist/components/form/TextInput/index.stories.js +1 -2
- package/dist/components/form/Toggle/index.js +4 -4
- package/dist/components/form/Toggle/index.stories.js +1 -2
- package/dist/components/form/Toggle/styles.js +14 -10
- package/dist/components/form/_hooks/useInputStyles.js +1 -2
- package/dist/components/form/common/DrawerHeader/index.js +1 -2
- package/dist/esm/components/common/Arrow/components/StyledSvg/index.js +3 -2
- package/dist/esm/components/common/Drawer/index.js +2 -1
- package/dist/esm/components/common/Drawer/styles.js +5 -4
- package/dist/esm/components/common/Dropdown/index.js +3 -1
- package/dist/esm/components/common/Dropdown/styles.js +11 -9
- package/dist/esm/components/common/ErrorBoundary/index.js +58 -0
- package/dist/esm/components/common/Flag/components/AreFlag/index.js +30 -0
- package/dist/esm/components/common/Flag/components/AreFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/AusFlag/index.js +80 -0
- package/dist/esm/components/common/Flag/components/AusFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/DeuFlag/index.js +25 -0
- package/dist/esm/components/common/Flag/components/DeuFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/EcuFlag/index.js +35 -0
- package/dist/esm/components/common/Flag/components/EcuFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/FraFlag/index.js +25 -0
- package/dist/esm/components/common/Flag/components/FraFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/IndFlag/index.js +40 -0
- package/dist/esm/components/common/Flag/components/IndFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/SauFlag/index.js +30 -0
- package/dist/esm/components/common/Flag/components/SauFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/SrbFlag/index.js +35 -0
- package/dist/esm/components/common/Flag/components/SrbFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/SvkFlag/index.js +40 -0
- package/dist/esm/components/common/Flag/components/SvkFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/SvnFlag/index.js +35 -0
- package/dist/esm/components/common/Flag/components/SvnFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/components/TurFlag/index.js +25 -0
- package/dist/esm/components/common/Flag/components/TurFlag/index.stories.js +8 -0
- package/dist/esm/components/common/Flag/index.js +23 -1
- package/dist/esm/components/common/Flag/index.stories.js +24 -0
- package/dist/esm/components/common/QRCode/index.js +2 -2
- package/dist/esm/components/common/SecondaryButton/index.js +2 -2
- package/dist/esm/components/common/SecondaryButton/styles.js +3 -2
- package/dist/esm/components/common/Skeleton/styles.js +3 -2
- package/dist/esm/components/common/Toast/index.js +11 -2
- package/dist/esm/components/common/Tooltip/index.js +12 -2
- package/dist/esm/components/common/Typography/index.js +2 -2
- package/dist/esm/components/form/Autocomplete/components/Autocomplete/index.js +15 -2
- package/dist/esm/components/form/Autocomplete/components/AutocompleteDefaultOption/index.js +3 -2
- package/dist/esm/components/form/Checkbox/index.js +2 -2
- package/dist/esm/components/form/Checkbox/styles.js +11 -4
- package/dist/esm/components/form/CodeInput/index.js +3 -1
- package/dist/esm/components/form/CountrySelect/index.js +2 -2
- package/dist/esm/components/form/CurrencyInput/CurrencyInputNumber/index.js +2 -2
- package/dist/esm/components/form/CurrencyInput/CurrencyInputString/index.js +2 -2
- package/dist/esm/components/form/DateInput/index.js +2 -1
- package/dist/esm/components/form/DateTimeInput/components/MobileNumbersColumn/styles.js +3 -2
- package/dist/esm/components/form/DateTimeInput/index.js +2 -1
- package/dist/esm/components/form/InputLabel/styles.js +3 -2
- package/dist/esm/components/form/ModernPlaceholder/styles.js +3 -2
- package/dist/esm/components/form/PhoneInput/constants.js +98 -0
- package/dist/esm/components/form/PhoneInput/index.js +3 -1
- package/dist/esm/components/form/PhoneInput/index.stories.js +42 -0
- package/dist/esm/components/form/PhoneInput/types.js +1 -1
- package/dist/esm/components/form/PureInput/index.js +2 -2
- package/dist/esm/components/form/PureInput/styles.js +5 -4
- package/dist/esm/components/form/SearchInput/index.js +3 -1
- package/dist/esm/components/form/SearchInput/styles.js +3 -2
- package/dist/esm/components/form/Select/components/Input/index.js +7 -2
- package/dist/esm/components/form/Select/index.js +111 -10
- package/dist/esm/components/form/Select/styles.js +17 -12
- package/dist/esm/components/form/TagsInput/styles.js +2 -2
- package/dist/esm/components/form/TextInput/index.js +3 -1
- package/dist/esm/components/form/Toggle/index.js +3 -2
- package/dist/esm/components/form/Toggle/styles.js +14 -10
- package/dist/esm/utils/reducedMotion.js +8 -0
- package/dist/esm/utils/transformColorByHsl.js +117 -4
- package/dist/esm/utils/transformColorByHsl.test.js +49 -0
- package/dist/hooks/useUnupdatableHandler/index.stories.js +1 -2
- package/dist/palette/context.js +46 -46
- package/dist/palette/provider.js +47 -48
- package/dist/utils/reducedMotion.d.ts +1 -0
- package/dist/utils/reducedMotion.js +13 -0
- package/dist/utils/transformColorByHsl.js +117 -4
- package/dist/utils/transformColorByHsl.test.d.ts +1 -0
- package/dist/utils/transformColorByHsl.test.js +50 -0
- package/package.json +2 -1
|
@@ -12,8 +12,19 @@ import { UzbFlag } from './components/UzbFlag';
|
|
|
12
12
|
import { ChnFlag } from './components/ChnFlag';
|
|
13
13
|
import { EngFlag } from './components/EngFlag';
|
|
14
14
|
import { EspFlag } from './components/EspFlag';
|
|
15
|
+
import { AreFlag } from './components/AreFlag';
|
|
16
|
+
import { AusFlag } from './components/AusFlag';
|
|
17
|
+
import { DeuFlag } from './components/DeuFlag';
|
|
18
|
+
import { EcuFlag } from './components/EcuFlag';
|
|
19
|
+
import { FraFlag } from './components/FraFlag';
|
|
20
|
+
import { IndFlag } from './components/IndFlag';
|
|
21
|
+
import { SauFlag } from './components/SauFlag';
|
|
22
|
+
import { SrbFlag } from './components/SrbFlag';
|
|
23
|
+
import { SvkFlag } from './components/SvkFlag';
|
|
24
|
+
import { SvnFlag } from './components/SvnFlag';
|
|
25
|
+
import { TurFlag } from './components/TurFlag';
|
|
15
26
|
import { UnknownFlag } from './components/UnknownFlag';
|
|
16
|
-
var flagKeys = ['RUS', 'BLR', 'KAZ', 'AZE', 'ARM', 'KGZ', 'MDA', 'TJK', 'UZB', 'CHN', 'ENG', 'ESP', 'UNKNOWN'];
|
|
27
|
+
var flagKeys = ['RUS', 'BLR', 'KAZ', 'AZE', 'ARM', 'KGZ', 'MDA', 'TJK', 'UZB', 'CHN', 'ENG', 'ESP', 'ARE', 'AUS', 'DEU', 'ECU', 'FRA', 'IND', 'SAU', 'SRB', 'SVK', 'SVN', 'TUR', 'UNKNOWN'];
|
|
17
28
|
var map = {
|
|
18
29
|
RUS: /*#__PURE__*/React.createElement(RusFlag, null),
|
|
19
30
|
KAZ: /*#__PURE__*/React.createElement(KazFlag, null),
|
|
@@ -27,6 +38,17 @@ var map = {
|
|
|
27
38
|
CHN: /*#__PURE__*/React.createElement(ChnFlag, null),
|
|
28
39
|
ENG: /*#__PURE__*/React.createElement(EngFlag, null),
|
|
29
40
|
ESP: /*#__PURE__*/React.createElement(EspFlag, null),
|
|
41
|
+
ARE: /*#__PURE__*/React.createElement(AreFlag, null),
|
|
42
|
+
AUS: /*#__PURE__*/React.createElement(AusFlag, null),
|
|
43
|
+
DEU: /*#__PURE__*/React.createElement(DeuFlag, null),
|
|
44
|
+
ECU: /*#__PURE__*/React.createElement(EcuFlag, null),
|
|
45
|
+
FRA: /*#__PURE__*/React.createElement(FraFlag, null),
|
|
46
|
+
IND: /*#__PURE__*/React.createElement(IndFlag, null),
|
|
47
|
+
SAU: /*#__PURE__*/React.createElement(SauFlag, null),
|
|
48
|
+
SRB: /*#__PURE__*/React.createElement(SrbFlag, null),
|
|
49
|
+
SVK: /*#__PURE__*/React.createElement(SvkFlag, null),
|
|
50
|
+
SVN: /*#__PURE__*/React.createElement(SvnFlag, null),
|
|
51
|
+
TUR: /*#__PURE__*/React.createElement(TurFlag, null),
|
|
30
52
|
UNKNOWN: /*#__PURE__*/React.createElement(UnknownFlag, null)
|
|
31
53
|
};
|
|
32
54
|
export var Flag = function Flag(_ref) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { Flag } from '.';
|
|
2
3
|
var meta = {
|
|
3
4
|
title: 'common/Flag',
|
|
@@ -13,4 +14,27 @@ export var Default = {
|
|
|
13
14
|
flag: 'RUS',
|
|
14
15
|
isSmall: false
|
|
15
16
|
}
|
|
17
|
+
};
|
|
18
|
+
export var AllFlags = {
|
|
19
|
+
render: function render() {
|
|
20
|
+
return /*#__PURE__*/React.createElement('div', {
|
|
21
|
+
style: {
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexWrap: 'wrap',
|
|
24
|
+
gap: 16
|
|
25
|
+
}
|
|
26
|
+
}, Flag.flags.map(function (flag) {
|
|
27
|
+
return /*#__PURE__*/React.createElement('div', {
|
|
28
|
+
key: flag,
|
|
29
|
+
style: {
|
|
30
|
+
textAlign: 'center',
|
|
31
|
+
fontFamily: 'sans-serif',
|
|
32
|
+
fontSize: 12
|
|
33
|
+
}
|
|
34
|
+
}, /*#__PURE__*/React.createElement(Flag, {
|
|
35
|
+
flag: flag,
|
|
36
|
+
isSmall: false
|
|
37
|
+
}), /*#__PURE__*/React.createElement('div', null, flag));
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
16
40
|
};
|
|
@@ -6,8 +6,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
8
|
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); }
|
|
9
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
10
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import QRCodeFromLibrary from 'qrcode.react';
|
|
13
13
|
export var QRCode = function QRCode(_ref) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["element", "isLoading", "fullWidth", "disabled", "borderRadius", "padding", "className", "children"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
4
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import * as S from './styles';
|
|
7
7
|
import { InvoiceboxSpinner } from '../InvoiceboxSpinner';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { Typography } from '../Typography';
|
|
3
|
+
import { reducedMotion } from '../../../utils/reducedMotion';
|
|
3
4
|
export var Inner = styled(Typography).withConfig({
|
|
4
5
|
displayName: "styles__Inner",
|
|
5
6
|
componentId: "sc-ln4oiu-0"
|
|
@@ -10,7 +11,7 @@ export var Inner = styled(Typography).withConfig({
|
|
|
10
11
|
export var Wrapper = styled.button.withConfig({
|
|
11
12
|
displayName: "styles__Wrapper",
|
|
12
13
|
componentId: "sc-ln4oiu-1"
|
|
13
|
-
})(["appearance:none;display:inline-block;text-decoration:none;text-align:center;position:relative;border:none;border-radius:", ";cursor:pointer;padding:", ";color:", ";background-color:", ";transition:background-color 0.2s ease-in-out 0s;box-sizing:border-box;", " &:hover{", "}&:active{", "}", ""], function (_ref2) {
|
|
14
|
+
})(["appearance:none;display:inline-block;text-decoration:none;text-align:center;position:relative;border:none;border-radius:", ";cursor:pointer;padding:", ";color:", ";background-color:", ";transition:background-color 0.2s ease-in-out 0s;box-sizing:border-box;", " &:hover{", "}&:active{", "}", " ", ""], function (_ref2) {
|
|
14
15
|
var $borderRadius = _ref2.$borderRadius;
|
|
15
16
|
return $borderRadius;
|
|
16
17
|
}, function (_ref3) {
|
|
@@ -36,7 +37,7 @@ export var Wrapper = styled.button.withConfig({
|
|
|
36
37
|
}, function (_ref9) {
|
|
37
38
|
var $disabled = _ref9.$disabled;
|
|
38
39
|
return $disabled && css(["pointer-events:none;", "{opacity:0.5;}"], Inner);
|
|
39
|
-
});
|
|
40
|
+
}, reducedMotion);
|
|
40
41
|
export var LoaderWrapper = styled.div.withConfig({
|
|
41
42
|
displayName: "styles__LoaderWrapper",
|
|
42
43
|
componentId: "sc-ln4oiu-2"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled, { keyframes } from 'styled-components';
|
|
2
|
+
import { reducedMotion } from '../../../utils/reducedMotion';
|
|
2
3
|
var shine = keyframes(["0%{left:calc(0% - 200px);}100%{left:calc(100% + 200px);}"]);
|
|
3
4
|
export var Wrapper = styled.div.withConfig({
|
|
4
5
|
displayName: "styles__Wrapper",
|
|
@@ -16,7 +17,7 @@ export var Wrapper = styled.div.withConfig({
|
|
|
16
17
|
export var Inner = styled.div.withConfig({
|
|
17
18
|
displayName: "styles__Inner",
|
|
18
19
|
componentId: "sc-mb3gd0-1"
|
|
19
|
-
})(["position:absolute;top:0;bottom:0;width:100px;background-image:linear-gradient( 90deg,", " 0px,", " 50px,", " 100px );animation:", " 3s infinite linear;"], function (_ref4) {
|
|
20
|
+
})(["position:absolute;top:0;bottom:0;width:100px;background-image:linear-gradient( 90deg,", " 0px,", " 50px,", " 100px );animation:", " 3s infinite linear;", ""], function (_ref4) {
|
|
20
21
|
var $palette = _ref4.$palette;
|
|
21
22
|
return $palette.bg;
|
|
22
23
|
}, function (_ref5) {
|
|
@@ -25,4 +26,4 @@ export var Inner = styled.div.withConfig({
|
|
|
25
26
|
}, function (_ref6) {
|
|
26
27
|
var $palette = _ref6.$palette;
|
|
27
28
|
return $palette.bg;
|
|
28
|
-
}, shine);
|
|
29
|
+
}, shine, reducedMotion);
|
|
@@ -3,19 +3,28 @@ import * as S from './styles';
|
|
|
3
3
|
import { useComponentPalette } from '../../../palette';
|
|
4
4
|
import { toast as libToast } from 'react-toastify';
|
|
5
5
|
import { Typography } from '../Typography';
|
|
6
|
+
// toastId по умолчанию выводится из текста: пока тост с таким id виден,
|
|
7
|
+
// повторные вызовы с тем же сообщением игнорируются react-toastify —
|
|
8
|
+
// одинаковые ошибки не стекаются в «бурю тостов»
|
|
6
9
|
export var toast = {
|
|
7
|
-
error: function error(message) {
|
|
10
|
+
error: function error(message, options) {
|
|
11
|
+
var _options$toastId;
|
|
8
12
|
libToast.error(function () {
|
|
9
13
|
return /*#__PURE__*/React.createElement(Typography, {
|
|
10
14
|
variant: "bodyMRegular"
|
|
11
15
|
}, message);
|
|
16
|
+
}, {
|
|
17
|
+
toastId: (_options$toastId = options === null || options === void 0 ? void 0 : options.toastId) !== null && _options$toastId !== void 0 ? _options$toastId : "error:".concat(message)
|
|
12
18
|
});
|
|
13
19
|
},
|
|
14
|
-
success: function success(message) {
|
|
20
|
+
success: function success(message, options) {
|
|
21
|
+
var _options$toastId2;
|
|
15
22
|
libToast.success(function () {
|
|
16
23
|
return /*#__PURE__*/React.createElement(Typography, {
|
|
17
24
|
variant: "bodyMRegular"
|
|
18
25
|
}, message);
|
|
26
|
+
}, {
|
|
27
|
+
toastId: (_options$toastId2 = options === null || options === void 0 ? void 0 : options.toastId) !== null && _options$toastId2 !== void 0 ? _options$toastId2 : "success:".concat(message)
|
|
19
28
|
});
|
|
20
29
|
}
|
|
21
30
|
};
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
4
4
|
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; }
|
|
5
5
|
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; } }
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
-
import React, { useCallback, useRef, useState } from 'react';
|
|
7
|
+
import React, { useCallback, useId, useRef, useState } from 'react';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import { Typography } from '../Typography';
|
|
10
10
|
import { useComponentPalette } from '../../../palette';
|
|
@@ -22,6 +22,7 @@ export var Tooltip = function Tooltip(_ref) {
|
|
|
22
22
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23
23
|
coords = _useState2[0],
|
|
24
24
|
setCoords = _useState2[1];
|
|
25
|
+
var tooltipId = useId();
|
|
25
26
|
var show = useCallback(function () {
|
|
26
27
|
var el = triggerRef.current;
|
|
27
28
|
if (!el || !overlay) return;
|
|
@@ -34,13 +35,22 @@ export var Tooltip = function Tooltip(_ref) {
|
|
|
34
35
|
var hide = useCallback(function () {
|
|
35
36
|
return setCoords(null);
|
|
36
37
|
}, []);
|
|
38
|
+
|
|
39
|
+
// WAI-ARIA tooltip: Escape закрывает тултип, не убирая фокус с триггера
|
|
40
|
+
var handleKeyDown = useCallback(function (event) {
|
|
41
|
+
if (event.key === 'Escape') hide();
|
|
42
|
+
}, [hide]);
|
|
37
43
|
return /*#__PURE__*/React.createElement(S.Trigger, {
|
|
38
44
|
ref: triggerRef,
|
|
39
45
|
onMouseEnter: show,
|
|
40
46
|
onMouseLeave: hide,
|
|
41
47
|
onFocus: show,
|
|
42
|
-
onBlur: hide
|
|
48
|
+
onBlur: hide,
|
|
49
|
+
onKeyDown: handleKeyDown,
|
|
50
|
+
"aria-describedby": coords ? tooltipId : undefined
|
|
43
51
|
}, children, coords && /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement(S.Overlay, {
|
|
52
|
+
id: tooltipId,
|
|
53
|
+
role: "tooltip",
|
|
44
54
|
$palette: palette,
|
|
45
55
|
$top: coords.top,
|
|
46
56
|
$left: coords.left,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _excluded = ["variant", "element"],
|
|
2
2
|
_excluded2 = ["variant", "element"];
|
|
3
3
|
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); }
|
|
4
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
5
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
4
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
5
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
6
6
|
import React, { forwardRef } from 'react';
|
|
7
7
|
import * as S from './styles';
|
|
8
8
|
export var Typography = function Typography(_ref) {
|
|
@@ -12,6 +12,7 @@ import { Skeleton } from '../../../../common/Skeleton';
|
|
|
12
12
|
import { useMobile } from '../../../../../hooks/useMedia';
|
|
13
13
|
import { useInputFocus } from '../../../../../hooks/useInputFocus';
|
|
14
14
|
import { useOutsideClick } from '../../../../../hooks/useOutsideClick';
|
|
15
|
+
import { ErrorBoundary } from '../../../../common/ErrorBoundary';
|
|
15
16
|
import { InputLabel } from '../../../InputLabel';
|
|
16
17
|
import { PureInput } from '../../../PureInput';
|
|
17
18
|
import { Dropdown } from '../../../../common/Dropdown';
|
|
@@ -27,7 +28,7 @@ var DefaultSkeletonItem = function DefaultSkeletonItem() {
|
|
|
27
28
|
}));
|
|
28
29
|
};
|
|
29
30
|
var MAX_LIST_HEIGHT = 294;
|
|
30
|
-
|
|
31
|
+
var AutocompleteInner = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
31
32
|
var options = _ref.options,
|
|
32
33
|
value = _ref.value,
|
|
33
34
|
onChange = _ref.onChange,
|
|
@@ -204,7 +205,9 @@ export var Autocomplete = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
204
205
|
disabled: disabled,
|
|
205
206
|
paddingLeft: inputPaddingLeft,
|
|
206
207
|
maxLength: inputMaxLength,
|
|
207
|
-
isOnlyNumbers: isInputOnlyNumbers
|
|
208
|
+
isOnlyNumbers: isInputOnlyNumbers
|
|
209
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus -- проп прокидывается потребителю, решение об автофокусе за ним
|
|
210
|
+
,
|
|
208
211
|
autoFocus: autoFocus,
|
|
209
212
|
readOnly: readOnly,
|
|
210
213
|
useModernStyles: useModernStyles,
|
|
@@ -254,4 +257,14 @@ export var Autocomplete = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
254
257
|
}, option.value))));
|
|
255
258
|
})))));
|
|
256
259
|
});
|
|
260
|
+
AutocompleteInner.displayName = 'AutocompleteInner';
|
|
261
|
+
|
|
262
|
+
// Граница ошибок снаружи: renderOption/optionsLoader потребителя вызываются в
|
|
263
|
+
// рендере AutocompleteInner — исключение колбэка иначе валило бы всё дерево
|
|
264
|
+
// приложения (RES-001). Fallback — null: поле исчезает, страница живёт.
|
|
265
|
+
export var Autocomplete = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
266
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(AutocompleteInner, _extends({}, props, {
|
|
267
|
+
ref: ref
|
|
268
|
+
})));
|
|
269
|
+
});
|
|
257
270
|
Autocomplete.displayName = 'Autocomplete';
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { typography } from '../../../../common/Typography/typography';
|
|
4
4
|
import { Typography } from '../../../../common/Typography';
|
|
5
|
+
import { reducedMotion } from '../../../../../utils/reducedMotion';
|
|
5
6
|
export var AutocompleteDefaultOption = function AutocompleteDefaultOption(_ref) {
|
|
6
7
|
var children = _ref.children,
|
|
7
8
|
_ref$usePadding = _ref.usePadding,
|
|
@@ -15,7 +16,7 @@ export var AutocompleteDefaultOption = function AutocompleteDefaultOption(_ref)
|
|
|
15
16
|
var Wrapper = styled(Typography).withConfig({
|
|
16
17
|
displayName: "AutocompleteDefaultOption__Wrapper",
|
|
17
18
|
componentId: "sc-1a61mvs-0"
|
|
18
|
-
})(["overflow:hidden;display:flex;width:100%;text-align:left;flex-direction:column;padding:", ";transition:all 0.2s ease-in-out;", " box-sizing:border-box;"], function (_ref2) {
|
|
19
|
+
})(["overflow:hidden;display:flex;width:100%;text-align:left;flex-direction:column;padding:", ";transition:all 0.2s ease-in-out;", " box-sizing:border-box;", ""], function (_ref2) {
|
|
19
20
|
var $usePadding = _ref2.$usePadding;
|
|
20
21
|
return $usePadding ? '12px' : '12px 20px';
|
|
21
|
-
}, typography.bodyMRegular);
|
|
22
|
+
}, typography.bodyMRegular, reducedMotion);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["disabled", "className", "checked", "disabledText", "label"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
4
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
import { Typography } from '../../common/Typography';
|
|
7
7
|
import { Tooltip } from '../../common/Tooltip';
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { CheckIcon } from './CheckIcon';
|
|
3
|
+
import { reducedMotion } from '../../../utils/reducedMotion';
|
|
3
4
|
var TRANSITION = 'all .2s ease-in-out';
|
|
4
5
|
var BORDER_RADIUS_MIN = 4;
|
|
5
6
|
export var CheckboxContainer = styled.div.withConfig({
|
|
6
7
|
displayName: "styles__CheckboxContainer",
|
|
7
8
|
componentId: "sc-11prdl0-0"
|
|
8
9
|
})(["display:inline-block;vertical-align:middle;"]);
|
|
10
|
+
|
|
11
|
+
// Инпут скрыт визуально, но остаётся в дереве доступности и фокусируем с
|
|
12
|
+
// клавиатуры (display: none выключал и то и другое) — паттерн visually hidden
|
|
9
13
|
export var HiddenCheckbox = styled.input.withConfig({
|
|
10
14
|
displayName: "styles__HiddenCheckbox",
|
|
11
15
|
componentId: "sc-11prdl0-1"
|
|
12
|
-
})(["
|
|
16
|
+
})(["position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;"]);
|
|
13
17
|
export var CheckboxIcon = styled(CheckIcon).withConfig({
|
|
14
18
|
displayName: "styles__CheckboxIcon",
|
|
15
19
|
componentId: "sc-11prdl0-2"
|
|
16
|
-
})(["transition:", ";"], TRANSITION);
|
|
20
|
+
})(["transition:", ";", ""], TRANSITION, reducedMotion);
|
|
17
21
|
export var StyledCheckbox = styled.div.withConfig({
|
|
18
22
|
displayName: "styles__StyledCheckbox",
|
|
19
23
|
componentId: "sc-11prdl0-3"
|
|
20
|
-
})(["display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:", "px;transition:", ";"], BORDER_RADIUS_MIN, TRANSITION);
|
|
24
|
+
})(["display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:", "px;transition:", ";", ""], BORDER_RADIUS_MIN, TRANSITION, reducedMotion);
|
|
21
25
|
var getStylesCheckbox = function getStylesCheckbox(palette, disabled, checked) {
|
|
22
26
|
if (disabled) {
|
|
23
27
|
if (checked) {
|
|
@@ -45,7 +49,7 @@ var getHoverStylesCheckbox = function getHoverStylesCheckbox(palette, disabled,
|
|
|
45
49
|
export var CheckboxLabel = styled.label.withConfig({
|
|
46
50
|
displayName: "styles__CheckboxLabel",
|
|
47
51
|
componentId: "sc-11prdl0-4"
|
|
48
|
-
})(["display:flex;align-items:center;grid-column-gap:10px;user-select:none;width:fit-content;cursor:pointer;color:", ";", "{", ";", "{opacity:", ";}}&:hover{", "{", ";}}"], function (_ref) {
|
|
52
|
+
})(["display:flex;align-items:center;grid-column-gap:10px;user-select:none;width:fit-content;cursor:pointer;color:", ";", "{", ";", "{opacity:", ";}}&:hover{", "{", ";}}", ":focus-visible + ", "{outline:2px solid ", ";outline-offset:2px;}"], function (_ref) {
|
|
49
53
|
var $palette = _ref.$palette;
|
|
50
54
|
return $palette.labelColor;
|
|
51
55
|
}, StyledCheckbox, function (_ref2) {
|
|
@@ -61,4 +65,7 @@ export var CheckboxLabel = styled.label.withConfig({
|
|
|
61
65
|
$disabled = _ref4.$disabled,
|
|
62
66
|
$palette = _ref4.$palette;
|
|
63
67
|
return getHoverStylesCheckbox($palette, $disabled, $checked);
|
|
68
|
+
}, HiddenCheckbox, StyledCheckbox, function (_ref5) {
|
|
69
|
+
var $palette = _ref5.$palette;
|
|
70
|
+
return $palette.borderHover;
|
|
64
71
|
});
|
|
@@ -84,7 +84,9 @@ export var CodeInput = function CodeInput(_ref) {
|
|
|
84
84
|
onFocus: handleFocus,
|
|
85
85
|
placeholder: "-",
|
|
86
86
|
$hasError: hasError,
|
|
87
|
-
disabled: !!disabled
|
|
87
|
+
disabled: !!disabled
|
|
88
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus -- проп прокидывается потребителю, решение об автофокусе за ним
|
|
89
|
+
,
|
|
88
90
|
autoFocus: autoFocus,
|
|
89
91
|
autoComplete: 'one-time-code',
|
|
90
92
|
type: "text"
|
|
@@ -10,8 +10,8 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
10
10
|
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; }
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
14
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
13
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
14
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
15
15
|
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
16
16
|
import * as S from './stlyes';
|
|
17
17
|
import { CountryItem } from './components/CountryItem';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["onChange"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
4
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { CoreCurrencyInput } from '../CoreCurrencyInput';
|
|
7
7
|
export var CurrencyInputNumber = function CurrencyInputNumber(_ref) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["onChange"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
4
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { CoreCurrencyInput } from '../CoreCurrencyInput';
|
|
7
7
|
export var CurrencyInputString = function CurrencyInputString(_ref) {
|
|
@@ -148,7 +148,8 @@ export var DateInput = function DateInput(_ref) {
|
|
|
148
148
|
}) : /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
149
149
|
ref: dropdownRef,
|
|
150
150
|
isOpen: isOpen,
|
|
151
|
-
isAutoPosition: true
|
|
151
|
+
isAutoPosition: true,
|
|
152
|
+
role: "dialog"
|
|
152
153
|
}, dropdownProps), /*#__PURE__*/React.createElement(S.CalendarWrapper, null, /*#__PURE__*/React.createElement(Calendar, {
|
|
153
154
|
value: value,
|
|
154
155
|
onChange: handleCalendarChange,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
+
import { reducedMotion } from '../../../../../utils/reducedMotion';
|
|
2
3
|
export var Wrapper = styled.div.withConfig({
|
|
3
4
|
displayName: "styles__Wrapper",
|
|
4
5
|
componentId: "sc-jqg7lg-0"
|
|
@@ -6,7 +7,7 @@ export var Wrapper = styled.div.withConfig({
|
|
|
6
7
|
export var Number = styled.div.withConfig({
|
|
7
8
|
displayName: "styles__Number",
|
|
8
9
|
componentId: "sc-jqg7lg-1"
|
|
9
|
-
})(["opacity:", ";width:28px;height:28px;flex-shrink:0;transform:translateZ(0) rotateX(", "deg);backface-visibility:hidden;will-change:transform,opacity;transition:all 0.1s ease;", ""], function (_ref) {
|
|
10
|
+
})(["opacity:", ";width:28px;height:28px;flex-shrink:0;transform:translateZ(0) rotateX(", "deg);backface-visibility:hidden;will-change:transform,opacity;transition:all 0.1s ease;", " ", ""], function (_ref) {
|
|
10
11
|
var $opacity = _ref.$opacity;
|
|
11
12
|
return $opacity;
|
|
12
13
|
}, function (_ref2) {
|
|
@@ -15,4 +16,4 @@ export var Number = styled.div.withConfig({
|
|
|
15
16
|
}, function (_ref3) {
|
|
16
17
|
var $isActive = _ref3.$isActive;
|
|
17
18
|
return $isActive && css(["margin:4px 0;"]);
|
|
18
|
-
});
|
|
19
|
+
}, reducedMotion);
|
|
@@ -168,7 +168,8 @@ export var DateTimeInput = function DateTimeInput(_ref) {
|
|
|
168
168
|
}, /*#__PURE__*/React.createElement(CalendarIcon, null)))), !isMobile ? /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
169
169
|
ref: dropdownRef,
|
|
170
170
|
isOpen: isOpen,
|
|
171
|
-
isAutoPosition: true
|
|
171
|
+
isAutoPosition: true,
|
|
172
|
+
role: "dialog"
|
|
172
173
|
}, dropdownProps), /*#__PURE__*/React.createElement(S.CalendarWithTimePicker, {
|
|
173
174
|
$dividerColor: palette.divider
|
|
174
175
|
}, /*#__PURE__*/React.createElement(S.CalendarWrapper, {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import styled, { css, keyframes } from 'styled-components';
|
|
2
2
|
import { Typography } from '../../common/Typography';
|
|
3
3
|
import { LABEL_PADDING } from './constants';
|
|
4
|
+
import { reducedMotion } from '../../../utils/reducedMotion';
|
|
4
5
|
var labelFadeIn = keyframes(["from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}"]);
|
|
5
6
|
export var Label = styled(Typography).withConfig({
|
|
6
7
|
displayName: "styles__Label",
|
|
7
8
|
componentId: "sc-1prrc3p-0"
|
|
8
|
-
})(["border-radius:10px;position:absolute;top:", ";left:", ";background-color:", ";padding:0 ", "px;z-index:2;transition:color 0.2s ease-in-out 0s;animation:", " 0.15s ease;color:", ";", ""], function (_ref) {
|
|
9
|
+
})(["border-radius:10px;position:absolute;top:", ";left:", ";background-color:", ";padding:0 ", "px;z-index:2;transition:color 0.2s ease-in-out 0s;animation:", " 0.15s ease;color:", ";", " ", ""], function (_ref) {
|
|
9
10
|
var $top = _ref.$top;
|
|
10
11
|
return $top ? "".concat($top, "px") : 0;
|
|
11
12
|
}, function (_ref2) {
|
|
@@ -19,7 +20,7 @@ export var Label = styled(Typography).withConfig({
|
|
|
19
20
|
var $inFocus = _ref4.$inFocus,
|
|
20
21
|
$palette = _ref4.$palette;
|
|
21
22
|
return $inFocus ? $palette.textHighlight : $palette.text;
|
|
22
|
-
}, function (_ref5) {
|
|
23
|
+
}, reducedMotion, function (_ref5) {
|
|
23
24
|
var $required = _ref5.$required,
|
|
24
25
|
$palette = _ref5.$palette;
|
|
25
26
|
return $required && css(["&::after{content:\" *\";color:", ";"], function () {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { Typography } from '../../common/Typography';
|
|
3
|
+
import { reducedMotion } from '../../../utils/reducedMotion';
|
|
3
4
|
export var Wrapper = styled(Typography).withConfig({
|
|
4
5
|
displayName: "styles__Wrapper",
|
|
5
6
|
componentId: "sc-1f4olgp-0"
|
|
6
|
-
})(["position:absolute;top:0;left:0;right:0;padding-left:", "px;padding-right:", "px;padding-top:", "px;pointer-events:none;z-index:1;display:flex;align-items:flex-start;overflow:hidden;opacity:", ";transform:translateY(", ");transition:opacity 0.15s ease,transform 0.15s ease;color:", ";"], function (_ref) {
|
|
7
|
+
})(["position:absolute;top:0;left:0;right:0;padding-left:", "px;padding-right:", "px;padding-top:", "px;pointer-events:none;z-index:1;display:flex;align-items:flex-start;overflow:hidden;opacity:", ";transform:translateY(", ");transition:opacity 0.15s ease,transform 0.15s ease;color:", ";", ""], function (_ref) {
|
|
7
8
|
var $paddingLeft = _ref.$paddingLeft;
|
|
8
9
|
return $paddingLeft;
|
|
9
10
|
}, function (_ref2) {
|
|
@@ -21,7 +22,7 @@ export var Wrapper = styled(Typography).withConfig({
|
|
|
21
22
|
}, function (_ref6) {
|
|
22
23
|
var $color = _ref6.$color;
|
|
23
24
|
return $color;
|
|
24
|
-
});
|
|
25
|
+
}, reducedMotion);
|
|
25
26
|
export var TextContent = styled.span.withConfig({
|
|
26
27
|
displayName: "styles__TextContent",
|
|
27
28
|
componentId: "sc-1f4olgp-1"
|
|
@@ -57,6 +57,104 @@ export var getAllCountriesPhoneRules = function getAllCountriesPhoneRules(isSupp
|
|
|
57
57
|
regexp: /\+?998\d{9}/,
|
|
58
58
|
flag: 'UZB'
|
|
59
59
|
},
|
|
60
|
+
CHN: {
|
|
61
|
+
placeholder: '+86 XXX XXXX XXXX',
|
|
62
|
+
mask: '+99 999 9999 9999',
|
|
63
|
+
startSubsequence: '86',
|
|
64
|
+
regexp: /^\+?861[3-9]\d{9}$/,
|
|
65
|
+
flag: 'CHN'
|
|
66
|
+
},
|
|
67
|
+
ESP: {
|
|
68
|
+
placeholder: '+34 XXX XXX XXX',
|
|
69
|
+
mask: '+99 999 999 999',
|
|
70
|
+
startSubsequence: '34',
|
|
71
|
+
regexp: /^\+?34\d{9}$/,
|
|
72
|
+
flag: 'ESP'
|
|
73
|
+
},
|
|
74
|
+
GBR: {
|
|
75
|
+
placeholder: '+44 XXXX XXXXXX',
|
|
76
|
+
mask: '+99 9999 999999',
|
|
77
|
+
startSubsequence: '44',
|
|
78
|
+
regexp: /^\+?44\d{10}$/,
|
|
79
|
+
flag: 'ENG'
|
|
80
|
+
},
|
|
81
|
+
ARE: {
|
|
82
|
+
placeholder: '+971 XX XXX XXXX',
|
|
83
|
+
mask: '+999 99 999 9999',
|
|
84
|
+
startSubsequence: '971',
|
|
85
|
+
regexp: /^\+?971\d{8,9}$/,
|
|
86
|
+
flag: 'ARE'
|
|
87
|
+
},
|
|
88
|
+
FRA: {
|
|
89
|
+
placeholder: '+33 X XX XX XX XX',
|
|
90
|
+
mask: '+99 9 99 99 99 99',
|
|
91
|
+
startSubsequence: '33',
|
|
92
|
+
regexp: /^\+?33\d{9}$/,
|
|
93
|
+
flag: 'FRA'
|
|
94
|
+
},
|
|
95
|
+
SRB: {
|
|
96
|
+
placeholder: '+381 XX XXX XXXX',
|
|
97
|
+
mask: '+999 99 999 9999',
|
|
98
|
+
startSubsequence: '381',
|
|
99
|
+
regexp: /^\+?381\d{8,9}$/,
|
|
100
|
+
flag: 'SRB'
|
|
101
|
+
},
|
|
102
|
+
IND: {
|
|
103
|
+
placeholder: '+91 XXXXX XXXXX',
|
|
104
|
+
mask: '+99 99999 99999',
|
|
105
|
+
startSubsequence: '91',
|
|
106
|
+
regexp: /^\+?91\d{10}$/,
|
|
107
|
+
flag: 'IND'
|
|
108
|
+
},
|
|
109
|
+
TUR: {
|
|
110
|
+
placeholder: '+90 XXX XXX XX XX',
|
|
111
|
+
mask: '+99 999 999 99 99',
|
|
112
|
+
startSubsequence: '90',
|
|
113
|
+
regexp: /^\+?90\d{10}$/,
|
|
114
|
+
flag: 'TUR'
|
|
115
|
+
},
|
|
116
|
+
SVN: {
|
|
117
|
+
placeholder: '+386 XX XXX XXX',
|
|
118
|
+
mask: '+999 99 999 999',
|
|
119
|
+
startSubsequence: '386',
|
|
120
|
+
regexp: /^\+?386\d{8}$/,
|
|
121
|
+
flag: 'SVN'
|
|
122
|
+
},
|
|
123
|
+
SVK: {
|
|
124
|
+
placeholder: '+421 XXX XXX XXX',
|
|
125
|
+
mask: '+999 999 999 999',
|
|
126
|
+
startSubsequence: '421',
|
|
127
|
+
regexp: /^\+?421\d{9}$/,
|
|
128
|
+
flag: 'SVK'
|
|
129
|
+
},
|
|
130
|
+
ECU: {
|
|
131
|
+
placeholder: '+593 XX XXX XXXX',
|
|
132
|
+
mask: '+999 99 999 9999',
|
|
133
|
+
startSubsequence: '593',
|
|
134
|
+
regexp: /^\+?593\d{8,9}$/,
|
|
135
|
+
flag: 'ECU'
|
|
136
|
+
},
|
|
137
|
+
DEU: {
|
|
138
|
+
placeholder: '+49 XXX XXXXXXXX',
|
|
139
|
+
mask: '+99 999 99999999',
|
|
140
|
+
startSubsequence: '49',
|
|
141
|
+
regexp: /^\+?49\d{10,11}$/,
|
|
142
|
+
flag: 'DEU'
|
|
143
|
+
},
|
|
144
|
+
AUS: {
|
|
145
|
+
placeholder: '+61 XXX XXX XXX',
|
|
146
|
+
mask: '+99 999 999 999',
|
|
147
|
+
startSubsequence: '61',
|
|
148
|
+
regexp: /^\+?61\d{9}$/,
|
|
149
|
+
flag: 'AUS'
|
|
150
|
+
},
|
|
151
|
+
SAU: {
|
|
152
|
+
placeholder: '+966 XX XXX XXXX',
|
|
153
|
+
mask: '+999 99 999 9999',
|
|
154
|
+
startSubsequence: '966',
|
|
155
|
+
regexp: /^\+?966\d{9}$/,
|
|
156
|
+
flag: 'SAU'
|
|
157
|
+
},
|
|
60
158
|
// для всех непредусмотренных стран
|
|
61
159
|
UNKNOWN: {
|
|
62
160
|
placeholder: '',
|
|
@@ -224,7 +224,9 @@ export var PhoneInput = function PhoneInput(_ref) {
|
|
|
224
224
|
// for disable autocomplete
|
|
225
225
|
,
|
|
226
226
|
autoComplete: 'new-password',
|
|
227
|
-
inputMode: "numeric"
|
|
227
|
+
inputMode: "numeric"
|
|
228
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus -- проп прокидывается потребителю, решение об автофокусе за ним
|
|
229
|
+
,
|
|
228
230
|
autoFocus: autoFocus
|
|
229
231
|
}, paddingAndVariantOptions, {
|
|
230
232
|
useModernStyles: useModernStyles
|