@via-profit/ui-kit 0.1.0-rc.1 → 0.1.0-rc.11
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/Button/ButtonAccent.d.ts +11 -0
- package/Button/ButtonAccent.js +45 -0
- package/Button/ButtonBase.d.ts +12 -0
- package/{dist/Button → Button}/ButtonBase.js +11 -6
- package/Button/ButtonStandard.d.ts +11 -0
- package/Button/ButtonStandard.js +52 -0
- package/Button/components/EndIconWrapper.js +10 -0
- package/Button/components/StartIconWrapper.js +10 -0
- package/Button/components/TextWrapper.js +12 -0
- package/Button/index.d.ts +14 -0
- package/{dist/Calendar → Calendar}/CalendarCell.js +8 -10
- package/{dist/Calendar → Calendar}/CalendarMonthControl.js +4 -4
- package/{dist/Calendar → Calendar}/CalendarPaper.js +2 -3
- package/{dist/Calendar → Calendar}/CalendarWeekDayLabel.js +1 -1
- package/{dist/color → Color}/Color.js +23 -8
- package/Color/index.d.ts +27 -0
- package/{dist/Menu → Menu}/MenuItemInner.js +4 -4
- package/{dist/Menu → Menu}/MenuWrapper.js +7 -8
- package/{dist/Modal → Modal}/ModalConfirmBox.js +2 -2
- package/{dist/Modal → Modal}/ModalDialog.js +1 -1
- package/{dist/Modal → Modal}/ModalDrawer.js +3 -3
- package/{dist/Modal → Modal}/ModalMessageBox.js +2 -2
- package/{dist/PhoneField → PhoneField}/CountryFlag.js +1 -1
- package/{dist/PhoneField → PhoneField}/flags/UnknownFlag.js +2 -2
- package/README.md +37 -4
- package/{dist/SelectBox → SelectBox}/SelectButton.js +4 -6
- package/{dist/TextField → TextField}/TextFieldErrorText.js +1 -1
- package/{dist/TextField → TextField}/TextFieldLabelAsterisk.js +1 -1
- package/{dist/TextField → TextField}/TextFieldWrapper.js +9 -9
- package/ThemeProvider/createTheme.js +39 -0
- package/ThemeProvider/index.d.ts +5 -0
- package/{dist/Typography → Typography}/Base.js +1 -0
- package/{dist/Typography → Typography}/Blockquote.js +2 -2
- package/{dist/Typography → Typography}/Del.js +1 -0
- package/{dist/Typography → Typography}/Em.js +1 -0
- package/{dist/Typography → Typography}/H1.js +1 -0
- package/{dist/Typography → Typography}/H2.js +1 -0
- package/{dist/Typography → Typography}/H3.js +1 -0
- package/{dist/Typography → Typography}/H4.js +1 -0
- package/{dist/Typography → Typography}/H5.js +1 -0
- package/{dist/Typography → Typography}/List.js +3 -0
- package/{dist/Typography → Typography}/Paragraph.js +1 -0
- package/{dist/Typography → Typography}/Span.js +1 -0
- package/{dist/Typography → Typography}/Strong.js +1 -0
- package/{dist → Typography}/index.js +3 -4
- package/index.d.ts +49 -0
- package/package.json +3 -9
- package/CONTRIBUTING.md +0 -0
- package/dist/Autocomplete/index.d.ts +0 -46
- package/dist/Autocomplete/popper-options.d.ts +0 -4
- package/dist/Button/ButtonAccent.d.ts +0 -10
- package/dist/Button/ButtonAccent.js +0 -48
- package/dist/Button/ButtonBase.d.ts +0 -4
- package/dist/Button/ButtonStandard.d.ts +0 -19
- package/dist/Button/ButtonStandard.js +0 -50
- package/dist/Button/index.d.ts +0 -9
- package/dist/Calendar/CalendarBottomBar.d.ts +0 -4
- package/dist/Calendar/CalendarCell.d.ts +0 -8
- package/dist/Calendar/CalendarDateContainer.d.ts +0 -6
- package/dist/Calendar/CalendarEmptyCell.d.ts +0 -4
- package/dist/Calendar/CalendarMonthControl.d.ts +0 -6
- package/dist/Calendar/CalendarPaper.d.ts +0 -6
- package/dist/Calendar/CalendarTopBar.d.ts +0 -4
- package/dist/Calendar/CalendarWeekDayLabel.d.ts +0 -6
- package/dist/Calendar/CalendarWeekDaysBar.d.ts +0 -10
- package/dist/Calendar/CalendarWeekRow.d.ts +0 -6
- package/dist/Calendar/IconChevronLeft.d.ts +0 -3
- package/dist/Calendar/IconChevronRight.d.ts +0 -3
- package/dist/Calendar/index.d.ts +0 -18
- package/dist/Calendar/use-calendar.d.ts +0 -50
- package/dist/DatePicker/index.d.ts +0 -3
- package/dist/ErrorBoundary/index.d.ts +0 -19
- package/dist/Image/index.d.ts +0 -7
- package/dist/MaskedField/index.d.ts +0 -33
- package/dist/MaskedField/templates.d.ts +0 -11
- package/dist/MaskedField/useMasked.d.ts +0 -18
- package/dist/Menu/MenuItem.d.ts +0 -10
- package/dist/Menu/MenuItemInner.d.ts +0 -7
- package/dist/Menu/MenuWrapper.d.ts +0 -10
- package/dist/Menu/index.d.ts +0 -196
- package/dist/Menu/popper-options.d.ts +0 -4
- package/dist/Menu/reducer.d.ts +0 -14
- package/dist/Modal/CloseIcon.d.ts +0 -3
- package/dist/Modal/ModalConfirmBox.d.ts +0 -9
- package/dist/Modal/ModalDialog.d.ts +0 -7
- package/dist/Modal/ModalDrawer.d.ts +0 -11
- package/dist/Modal/ModalMessageBox.d.ts +0 -8
- package/dist/Modal/index.d.ts +0 -12
- package/dist/NoSSR/index.d.ts +0 -7
- package/dist/PhoneField/CountryFlag.d.ts +0 -6
- package/dist/PhoneField/flags/BYFlag.d.ts +0 -3
- package/dist/PhoneField/flags/JPFlag.d.ts +0 -3
- package/dist/PhoneField/flags/KZFlag.d.ts +0 -3
- package/dist/PhoneField/flags/RUFlag.d.ts +0 -3
- package/dist/PhoneField/flags/UAFlag.d.ts +0 -3
- package/dist/PhoneField/flags/USFlag.d.ts +0 -3
- package/dist/PhoneField/flags/UnknownFlag.d.ts +0 -3
- package/dist/PhoneField/index.d.ts +0 -49
- package/dist/PhoneField/templates.d.ts +0 -3
- package/dist/PhoneField/usePhoneUtils.d.ts +0 -65
- package/dist/SelectBox/IconChevronDown.d.ts +0 -3
- package/dist/SelectBox/SelectButton.d.ts +0 -10
- package/dist/SelectBox/index.d.ts +0 -40
- package/dist/SelectBox/popper-options.d.ts +0 -4
- package/dist/TextField/TextFieldContainer.d.ts +0 -7
- package/dist/TextField/TextFieldErrorText.d.ts +0 -8
- package/dist/TextField/TextFieldIconWrapper.d.ts +0 -8
- package/dist/TextField/TextFieldInput.d.ts +0 -7
- package/dist/TextField/TextFieldLabel.d.ts +0 -7
- package/dist/TextField/TextFieldLabelAsterisk.d.ts +0 -7
- package/dist/TextField/TextFieldWrapper.d.ts +0 -14
- package/dist/TextField/index.d.ts +0 -14
- package/dist/ThemeProvider/createTheme.d.ts +0 -36
- package/dist/ThemeProvider/createTheme.js +0 -34
- package/dist/ThemeProvider/index.d.ts +0 -8
- package/dist/Typography/Base.d.ts +0 -6
- package/dist/Typography/Blockquote.d.ts +0 -6
- package/dist/Typography/Del.d.ts +0 -6
- package/dist/Typography/Em.d.ts +0 -6
- package/dist/Typography/H1.d.ts +0 -6
- package/dist/Typography/H2.d.ts +0 -6
- package/dist/Typography/H3.d.ts +0 -6
- package/dist/Typography/H4.d.ts +0 -6
- package/dist/Typography/H5.d.ts +0 -6
- package/dist/Typography/List.d.ts +0 -14
- package/dist/Typography/Paragraph.d.ts +0 -6
- package/dist/Typography/SectionDescription.d.ts +0 -8
- package/dist/Typography/SectionTitle.d.ts +0 -8
- package/dist/Typography/Span.d.ts +0 -6
- package/dist/Typography/Strong.d.ts +0 -6
- package/dist/Typography/U.d.ts +0 -6
- package/dist/color/Color.d.ts +0 -44
- package/dist/color/index.d.ts +0 -3
- package/dist/index.d.ts +0 -4
- /package/{dist/Autocomplete → Autocomplete}/index.js +0 -0
- /package/{dist/Autocomplete → Autocomplete}/popper-options.js +0 -0
- /package/{dist/Button → Button}/index.js +0 -0
- /package/{dist/Calendar → Calendar}/CalendarBottomBar.js +0 -0
- /package/{dist/Calendar → Calendar}/CalendarDateContainer.js +0 -0
- /package/{dist/Calendar → Calendar}/CalendarEmptyCell.js +0 -0
- /package/{dist/Calendar → Calendar}/CalendarTopBar.js +0 -0
- /package/{dist/Calendar → Calendar}/CalendarWeekDaysBar.js +0 -0
- /package/{dist/Calendar → Calendar}/CalendarWeekRow.js +0 -0
- /package/{dist/Calendar → Calendar}/IconChevronLeft.js +0 -0
- /package/{dist/Calendar → Calendar}/IconChevronRight.js +0 -0
- /package/{dist/Calendar → Calendar}/index.js +0 -0
- /package/{dist/Calendar → Calendar}/use-calendar.js +0 -0
- /package/{dist/color → Color}/index.js +0 -0
- /package/{dist/DatePicker → DatePicker}/index.js +0 -0
- /package/{dist/ErrorBoundary → ErrorBoundary}/index.js +0 -0
- /package/{dist/Image → Image}/index.js +0 -0
- /package/{dist/MaskedField → MaskedField}/index.js +0 -0
- /package/{dist/MaskedField → MaskedField}/templates.js +0 -0
- /package/{dist/MaskedField → MaskedField}/useMasked.js +0 -0
- /package/{dist/Menu → Menu}/MenuItem.js +0 -0
- /package/{dist/Menu → Menu}/index.js +0 -0
- /package/{dist/Menu → Menu}/popper-options.js +0 -0
- /package/{dist/Menu → Menu}/reducer.js +0 -0
- /package/{dist/Modal → Modal}/CloseIcon.js +0 -0
- /package/{dist/Modal → Modal}/index.js +0 -0
- /package/{dist/NoSSR → NoSSR}/index.js +0 -0
- /package/{dist/PhoneField → PhoneField}/flags/BYFlag.js +0 -0
- /package/{dist/PhoneField → PhoneField}/flags/JPFlag.js +0 -0
- /package/{dist/PhoneField → PhoneField}/flags/KZFlag.js +0 -0
- /package/{dist/PhoneField → PhoneField}/flags/RUFlag.js +0 -0
- /package/{dist/PhoneField → PhoneField}/flags/UAFlag.js +0 -0
- /package/{dist/PhoneField → PhoneField}/flags/USFlag.js +0 -0
- /package/{dist/PhoneField → PhoneField}/index.js +0 -0
- /package/{dist/PhoneField → PhoneField}/templates.js +0 -0
- /package/{dist/PhoneField → PhoneField}/usePhoneUtils.js +0 -0
- /package/{dist/SelectBox → SelectBox}/IconChevronDown.js +0 -0
- /package/{dist/SelectBox → SelectBox}/index.js +0 -0
- /package/{dist/SelectBox → SelectBox}/popper-options.js +0 -0
- /package/{dist/TextField → TextField}/TextFieldContainer.js +0 -0
- /package/{dist/TextField → TextField}/TextFieldIconWrapper.js +0 -0
- /package/{dist/TextField → TextField}/TextFieldInput.js +0 -0
- /package/{dist/TextField → TextField}/TextFieldLabel.js +0 -0
- /package/{dist/TextField → TextField}/index.js +0 -0
- /package/{dist/ThemeProvider → ThemeProvider}/index.js +0 -0
- /package/{dist/Typography → Typography}/SectionDescription.js +0 -0
- /package/{dist/Typography → Typography}/SectionTitle.js +0 -0
- /package/{dist/Typography → Typography}/U.js +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare module '@via-profit/ui-kit/Button/ButtonAccent' {
|
|
2
|
+
import '@via-profit/ui-kit';
|
|
3
|
+
|
|
4
|
+
import { ButtonBaseProps } from '@via-profit/ui-kit/Button/ButtonBase';
|
|
5
|
+
|
|
6
|
+
export type ButtonAccentProps = ButtonBaseProps;
|
|
7
|
+
|
|
8
|
+
const ButtonAccent: React.FC<ButtonAccentProps>;
|
|
9
|
+
|
|
10
|
+
export default ButtonAccent;
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
const react_1 = __importDefault(require("react"));
|
|
18
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
19
|
+
const react_2 = require("@emotion/react");
|
|
20
|
+
const ButtonBase_1 = __importDefault(require("./ButtonBase"));
|
|
21
|
+
const Button = (0, styled_1.default)(ButtonBase_1.default) `
|
|
22
|
+
color: ${({ theme, disabled }) => disabled
|
|
23
|
+
? theme.colors.textPrimary.alpha(0.4).toString()
|
|
24
|
+
: theme.colors.accentPrimaryContrast.toString()};
|
|
25
|
+
background-color: ${({ theme, disabled }) => disabled ? theme.colors.surface.darken(30).toString() : theme.colors.accentPrimary.toString()};
|
|
26
|
+
|
|
27
|
+
${({ disabled, theme }) => !disabled &&
|
|
28
|
+
(0, react_2.css) `
|
|
29
|
+
box-shadow: 0 2px 12px ${theme.colors.accentPrimary.darken(60).alpha(0.3).toString()};
|
|
30
|
+
&:hover {
|
|
31
|
+
background-color: ${theme.colors.accentPrimary.darken(20).toString()};
|
|
32
|
+
}
|
|
33
|
+
&:active {
|
|
34
|
+
background-color: ${theme.colors.accentPrimary.darken(30).toString()};
|
|
35
|
+
}
|
|
36
|
+
&:focus-visible {
|
|
37
|
+
outline: 2px solid ${theme.colors.accentPrimary.darken(20).toString()};
|
|
38
|
+
}
|
|
39
|
+
`};
|
|
40
|
+
`;
|
|
41
|
+
const ButtonAccent = (props, ref) => {
|
|
42
|
+
const { children } = props, restProps = __rest(props, ["children"]);
|
|
43
|
+
return (react_1.default.createElement(Button, Object.assign({}, restProps, { ref: ref }), children));
|
|
44
|
+
};
|
|
45
|
+
exports.default = react_1.default.forwardRef(ButtonAccent);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare module '@via-profit/ui-kit/Button/ButtonBase' {
|
|
2
|
+
import '@via-profit/ui-kit';
|
|
3
|
+
|
|
4
|
+
export interface ButtonBaseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
readonly startIcon?: JSX.Element;
|
|
6
|
+
readonly endIcon?: JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const ButtonBase: React.FC<ButtonBaseProps>;
|
|
10
|
+
|
|
11
|
+
export default ButtonBase;
|
|
12
|
+
}
|
|
@@ -16,23 +16,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
18
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
19
|
+
const StartIconWrapper_1 = __importDefault(require("./components/StartIconWrapper"));
|
|
20
|
+
const EndIconWrapper_1 = __importDefault(require("./components/EndIconWrapper"));
|
|
21
|
+
const TextWrapper_1 = __importDefault(require("./components/TextWrapper"));
|
|
19
22
|
const Button = styled_1.default.button `
|
|
20
23
|
border-radius: ${({ theme }) => theme.shape.radiusFactor * 2}em;
|
|
21
24
|
padding: 0.8em 1em;
|
|
22
|
-
|
|
25
|
+
font-size: 0.8rem;
|
|
26
|
+
cursor: ${({ disabled }) => (disabled ? 'default' : 'pointer')};
|
|
23
27
|
font-size: 1em;
|
|
24
28
|
border: 0;
|
|
25
29
|
outline: transparent;
|
|
26
30
|
transition: all 180ms ease-out 0s;
|
|
27
31
|
background: none;
|
|
28
32
|
color: currentColor;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
font-size: 0.86em;
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
32
35
|
`;
|
|
33
36
|
const ButtonBase = (props, ref) => {
|
|
34
|
-
const { children } = props, otherProps = __rest(props, ["children"]);
|
|
37
|
+
const { children, startIcon, endIcon } = props, otherProps = __rest(props, ["children", "startIcon", "endIcon"]);
|
|
35
38
|
return (react_1.default.createElement(Button, Object.assign({}, otherProps, { ref: ref }),
|
|
36
|
-
react_1.default.createElement(
|
|
39
|
+
typeof startIcon !== 'undefined' && startIcon !== null && (react_1.default.createElement(StartIconWrapper_1.default, null, startIcon)),
|
|
40
|
+
react_1.default.createElement(TextWrapper_1.default, null, children),
|
|
41
|
+
typeof endIcon !== 'undefined' && endIcon !== null && (react_1.default.createElement(EndIconWrapper_1.default, null, endIcon))));
|
|
37
42
|
};
|
|
38
43
|
exports.default = react_1.default.forwardRef(ButtonBase);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare module '@via-profit/ui-kit/Button/ButtonStandard' {
|
|
2
|
+
import '@via-profit/ui-kit';
|
|
3
|
+
|
|
4
|
+
import { ButtonBaseProps } from '@via-profit/ui-kit/Button/ButtonBase';
|
|
5
|
+
|
|
6
|
+
export type ButtonStandardProps = ButtonBaseProps;
|
|
7
|
+
|
|
8
|
+
const ButtonStandard: React.FC<ButtonStandardProps>;
|
|
9
|
+
|
|
10
|
+
export default ButtonStandard;
|
|
11
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
const react_1 = __importDefault(require("react"));
|
|
18
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
19
|
+
const react_2 = require("@emotion/react");
|
|
20
|
+
const ButtonBase_1 = __importDefault(require("./ButtonBase"));
|
|
21
|
+
/**
|
|
22
|
+
* Standard
|
|
23
|
+
*/
|
|
24
|
+
const StyledButtonBase = (0, styled_1.default)(ButtonBase_1.default) `
|
|
25
|
+
color: ${({ theme, disabled }) => disabled
|
|
26
|
+
? theme.colors.textPrimary.alpha(0.4).toString()
|
|
27
|
+
: theme.colors.textPrimary.toString()};
|
|
28
|
+
background-color: ${({ theme, disabled }) => disabled
|
|
29
|
+
? theme.colors.surface.darken(10).toString()
|
|
30
|
+
: theme.isDark
|
|
31
|
+
? theme.colors.surface.toString()
|
|
32
|
+
: theme.colors.surface.toString()};
|
|
33
|
+
|
|
34
|
+
${({ disabled, theme }) => !disabled &&
|
|
35
|
+
(0, react_2.css) `
|
|
36
|
+
box-shadow: 0 2px 12px ${theme.colors.surface.darken(40).alpha(0.6).toString()};
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: ${theme.colors.surface.darken(20).toString()};
|
|
39
|
+
}
|
|
40
|
+
&:active {
|
|
41
|
+
background-color: ${theme.colors.surface.darken(40).toString()};
|
|
42
|
+
}
|
|
43
|
+
&:focus-visible {
|
|
44
|
+
outline: 2px solid ${theme.colors.accentPrimary.toString()};
|
|
45
|
+
}
|
|
46
|
+
`}
|
|
47
|
+
`;
|
|
48
|
+
const ButtonStandard = (props, ref) => {
|
|
49
|
+
const { children, disabled } = props, restProps = __rest(props, ["children", "disabled"]);
|
|
50
|
+
return (react_1.default.createElement(StyledButtonBase, Object.assign({ disabled: disabled }, restProps, { ref: ref }), children));
|
|
51
|
+
};
|
|
52
|
+
exports.default = react_1.default.forwardRef(ButtonStandard);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
7
|
+
const EndIconWrapper = styled_1.default.span `
|
|
8
|
+
margin-left: 0.8em;
|
|
9
|
+
`;
|
|
10
|
+
exports.default = EndIconWrapper;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
7
|
+
const StartIconWrapper = styled_1.default.span `
|
|
8
|
+
margin-right: 0.8em;
|
|
9
|
+
`;
|
|
10
|
+
exports.default = StartIconWrapper;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
7
|
+
const TextWrapper = styled_1.default.span `
|
|
8
|
+
font-size: 0.86em;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
`;
|
|
12
|
+
exports.default = TextWrapper;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare module '@via-profit/ui-kit/Button' {
|
|
2
|
+
import { ButtonAccentProps } from '@via-profit/ui-kit/Button/ButtonAccent';
|
|
3
|
+
import { ButtonStandardProps } from '@via-profit/ui-kit/Button/ButtonStandard';
|
|
4
|
+
|
|
5
|
+
export interface BaseProps {
|
|
6
|
+
readonly variant?: 'standard' | 'accent';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type ButtonProps = (ButtonStandardProps | ButtonAccentProps) & BaseProps;
|
|
10
|
+
|
|
11
|
+
const Button: React.FC<ButtonProps>;
|
|
12
|
+
|
|
13
|
+
export default Button;
|
|
14
|
+
}
|
|
@@ -28,29 +28,27 @@ const Btn = styled_1.default.button `
|
|
|
28
28
|
outline: none;
|
|
29
29
|
cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};
|
|
30
30
|
border: 1px solid transparent;
|
|
31
|
-
background-color: ${({ theme, $isSelected }) => $isSelected
|
|
32
|
-
? theme.colors.accentPrimary().toString()
|
|
33
|
-
: theme.colors.backgroundPrimary().toString()};
|
|
31
|
+
background-color: ${({ theme, $isSelected }) => $isSelected ? theme.colors.accentPrimary.toString() : theme.colors.surface.toString()};
|
|
34
32
|
border-radius: ${({ theme }) => theme.shape.radiusFactor * 3}em;
|
|
35
33
|
color: ${({ $isToday, theme, $isSelected, $isDisabled }) => {
|
|
36
34
|
if ($isDisabled) {
|
|
37
|
-
return theme.colors.textSecondary
|
|
35
|
+
return theme.colors.textSecondary.toString();
|
|
38
36
|
}
|
|
39
37
|
if ($isSelected) {
|
|
40
|
-
return theme.colors.accentPrimaryContrast
|
|
38
|
+
return theme.colors.accentPrimaryContrast.toString();
|
|
41
39
|
}
|
|
42
40
|
if ($isToday) {
|
|
43
|
-
return theme.colors.accentPrimary
|
|
41
|
+
return theme.colors.accentPrimary.toString();
|
|
44
42
|
}
|
|
45
|
-
return theme.colors.textPrimary
|
|
43
|
+
return theme.colors.textPrimary.toString();
|
|
46
44
|
}};
|
|
47
45
|
&:hover {
|
|
48
46
|
background-color: ${({ theme, $isSelected }) => $isSelected
|
|
49
|
-
? theme.colors.accentPrimary
|
|
50
|
-
: theme.colors.
|
|
47
|
+
? theme.colors.accentPrimary.darken(10).toString()
|
|
48
|
+
: theme.colors.surface.darken(10).toString()};
|
|
51
49
|
}
|
|
52
50
|
&:focus-visible {
|
|
53
|
-
border-color: ${({ theme, $isDisabled }) => $isDisabled ? 'transparent' : theme.colors.accentPrimary
|
|
51
|
+
border-color: ${({ theme, $isDisabled }) => $isDisabled ? 'transparent' : theme.colors.accentPrimary.toString()};
|
|
54
52
|
}
|
|
55
53
|
opacity: ${({ $isDisabled }) => ($isDisabled ? 0.4 : 1)};
|
|
56
54
|
`;
|
|
@@ -31,14 +31,14 @@ const Btn = styled_1.default.button `
|
|
|
31
31
|
outline: none;
|
|
32
32
|
cursor: pointer;
|
|
33
33
|
border: 1px solid transparent;
|
|
34
|
-
background-color: ${({ theme }) => theme.colors.
|
|
34
|
+
background-color: ${({ theme }) => theme.colors.surface.toString()};
|
|
35
35
|
border-radius: ${({ theme }) => theme.shape.radiusFactor * 3}em;
|
|
36
|
-
color: ${({ theme }) => theme.colors.textPrimary
|
|
36
|
+
color: ${({ theme }) => theme.colors.textPrimary.toString()};
|
|
37
37
|
&:hover {
|
|
38
|
-
background-color: ${({ theme }) => theme.colors.
|
|
38
|
+
background-color: ${({ theme }) => theme.colors.surface.darken(0.1).toString()};
|
|
39
39
|
}
|
|
40
40
|
&:focus-visible {
|
|
41
|
-
border-color: ${({ theme }) => theme.colors.accentPrimary
|
|
41
|
+
border-color: ${({ theme }) => theme.colors.accentPrimary.toString()};
|
|
42
42
|
}
|
|
43
43
|
opacity: ${({ disabled }) => (disabled ? 0.4 : 1)};
|
|
44
44
|
`;
|
|
@@ -9,12 +9,11 @@ const CalendarPaper = styled_1.default.div `
|
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
justify-content: stretch;
|
|
12
|
-
background-color: ${({ theme }) => theme.colors.
|
|
12
|
+
background-color: ${({ theme }) => theme.colors.surface.toString()};
|
|
13
13
|
border-radius: ${({ theme }) => theme.shape.radiusFactor * 1}em;
|
|
14
14
|
padding: 0.4em;
|
|
15
15
|
max-width: 17.6em;
|
|
16
16
|
max-height: 20.4em;
|
|
17
|
-
box-shadow: 0 4px 24px
|
|
18
|
-
${({ theme }) => theme.colors.backgroundPrimary().darken(0.5).alpha(0.6).toString()};
|
|
17
|
+
box-shadow: 0 4px 24px ${({ theme }) => theme.colors.surface.darken(50).alpha(0.6).toString()};
|
|
19
18
|
`;
|
|
20
19
|
exports.default = CalendarPaper;
|
|
@@ -12,6 +12,6 @@ const CalendarWeekDayLabel = styled_1.default.div `
|
|
|
12
12
|
user-select: none;
|
|
13
13
|
width: 3em;
|
|
14
14
|
height: 3em;
|
|
15
|
-
color: ${({ theme }) => theme.colors.textSecondary
|
|
15
|
+
color: ${({ theme }) => theme.colors.textSecondary.toString()};
|
|
16
16
|
`;
|
|
17
17
|
exports.default = react_1.default.memo(CalendarWeekDayLabel);
|
|
@@ -10,12 +10,19 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _Color_color;
|
|
13
|
+
var _Color_color, _Color_cache;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
class Color {
|
|
16
16
|
constructor(value) {
|
|
17
17
|
_Color_color.set(this, void 0);
|
|
18
|
-
|
|
18
|
+
_Color_cache.set(this, void 0);
|
|
19
|
+
if (value instanceof Color) {
|
|
20
|
+
__classPrivateFieldSet(this, _Color_color, Object.assign({}, value.rgb()), "f");
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
__classPrivateFieldSet(this, _Color_color, this.parseColor(value), "f");
|
|
24
|
+
}
|
|
25
|
+
__classPrivateFieldSet(this, _Color_cache, Object.assign({}, __classPrivateFieldGet(this, _Color_color, "f")), "f");
|
|
19
26
|
return this;
|
|
20
27
|
}
|
|
21
28
|
lighten(decimal) {
|
|
@@ -61,20 +68,28 @@ class Color {
|
|
|
61
68
|
return this;
|
|
62
69
|
}
|
|
63
70
|
rgb() {
|
|
64
|
-
|
|
71
|
+
const result = Object.assign({}, __classPrivateFieldGet(this, _Color_color, "f"));
|
|
72
|
+
__classPrivateFieldSet(this, _Color_color, Object.assign({}, __classPrivateFieldGet(this, _Color_cache, "f")), "f");
|
|
73
|
+
return result;
|
|
65
74
|
}
|
|
66
75
|
toString() {
|
|
67
|
-
|
|
76
|
+
const result = this.rgbString();
|
|
77
|
+
__classPrivateFieldSet(this, _Color_color, Object.assign({}, __classPrivateFieldGet(this, _Color_cache, "f")), "f");
|
|
78
|
+
return result;
|
|
68
79
|
}
|
|
69
80
|
rgbString() {
|
|
70
|
-
|
|
81
|
+
const result = `rgba(${__classPrivateFieldGet(this, _Color_color, "f").r}, ${__classPrivateFieldGet(this, _Color_color, "f").g}, ${__classPrivateFieldGet(this, _Color_color, "f").b}, ${__classPrivateFieldGet(this, _Color_color, "f").a})`;
|
|
82
|
+
__classPrivateFieldSet(this, _Color_color, Object.assign({}, __classPrivateFieldGet(this, _Color_cache, "f")), "f");
|
|
83
|
+
return result;
|
|
71
84
|
}
|
|
72
85
|
hexString() {
|
|
73
86
|
const colorToHex = (color) => {
|
|
74
87
|
const hexadecimal = color.toString(16);
|
|
75
88
|
return hexadecimal.length === 1 ? `0${hexadecimal}` : hexadecimal;
|
|
76
89
|
};
|
|
77
|
-
|
|
90
|
+
const result = '#' + colorToHex(__classPrivateFieldGet(this, _Color_color, "f").r) + colorToHex(__classPrivateFieldGet(this, _Color_color, "f").g) + colorToHex(__classPrivateFieldGet(this, _Color_color, "f").b);
|
|
91
|
+
__classPrivateFieldSet(this, _Color_color, Object.assign({}, __classPrivateFieldGet(this, _Color_cache, "f")), "f");
|
|
92
|
+
return result;
|
|
78
93
|
}
|
|
79
94
|
parseColor(value) {
|
|
80
95
|
const inputColor = value.trim().toLowerCase();
|
|
@@ -131,7 +146,7 @@ class Color {
|
|
|
131
146
|
if (webHex) {
|
|
132
147
|
return this.parseColor(webHex);
|
|
133
148
|
}
|
|
134
|
-
throw new Error(
|
|
149
|
+
throw new Error(`Failed to parse color value «${value}»`);
|
|
135
150
|
}
|
|
136
151
|
hslToRgb(value) {
|
|
137
152
|
const hsl = value.match(/(\d+(\.\d+)?)/g);
|
|
@@ -342,5 +357,5 @@ class Color {
|
|
|
342
357
|
return webColors[v];
|
|
343
358
|
}
|
|
344
359
|
}
|
|
345
|
-
_Color_color = new WeakMap();
|
|
360
|
+
_Color_color = new WeakMap(), _Color_cache = new WeakMap();
|
|
346
361
|
exports.default = Color;
|
package/Color/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare module '@via-profit/ui-kit/Color' {
|
|
2
|
+
export type ParsedColor = {
|
|
3
|
+
r: number;
|
|
4
|
+
g: number;
|
|
5
|
+
b: number;
|
|
6
|
+
a: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export interface ColorInterface {
|
|
10
|
+
parseColor(value: string | Color): ParsedColor;
|
|
11
|
+
shade(decimal: number): this;
|
|
12
|
+
alpha(decimal: number): this;
|
|
13
|
+
lighten(decimal: number): this;
|
|
14
|
+
darken(decimal: number): this;
|
|
15
|
+
getHextByWebColor(value: string): string;
|
|
16
|
+
rgb(): ParsedColor;
|
|
17
|
+
rgbString(): string;
|
|
18
|
+
hexString(): string;
|
|
19
|
+
toString(): string;
|
|
20
|
+
luminance(): number;
|
|
21
|
+
contrast(rgb2: string | Color): number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface Color extends ColorInterface {}
|
|
25
|
+
|
|
26
|
+
class Color implements Color {}
|
|
27
|
+
}
|
|
@@ -24,19 +24,19 @@ const InnerContainer = styled_1.default.div `
|
|
|
24
24
|
border-radius: ${({ theme }) => theme.shape.radiusFactor * 1}em;
|
|
25
25
|
background-color: ${({ theme, selected, hovered }) => {
|
|
26
26
|
if (selected && hovered) {
|
|
27
|
-
return theme.colors.accentPrimary
|
|
27
|
+
return theme.colors.accentPrimary.darken(0.1).toString();
|
|
28
28
|
}
|
|
29
29
|
if (selected) {
|
|
30
|
-
return theme.colors.accentPrimary
|
|
30
|
+
return theme.colors.accentPrimary.toString();
|
|
31
31
|
}
|
|
32
32
|
if (hovered) {
|
|
33
|
-
return theme.colors.
|
|
33
|
+
return theme.colors.surface.darken(40).toString();
|
|
34
34
|
}
|
|
35
35
|
return 'inherit';
|
|
36
36
|
}};
|
|
37
37
|
color: ${({ theme, selected }) => {
|
|
38
38
|
if (selected) {
|
|
39
|
-
return theme.colors.accentPrimaryContrast
|
|
39
|
+
return theme.colors.accentPrimaryContrast.toString();
|
|
40
40
|
}
|
|
41
41
|
return 'inherit';
|
|
42
42
|
}};
|
|
@@ -25,10 +25,9 @@ const StyledMenuWrapper = styled_1.default.div `
|
|
|
25
25
|
transition: visibility 120ms ease-out, opacity 120ms ease-out;
|
|
26
26
|
opacity: ${props => (props.$isOpen ? 1 : 0)};
|
|
27
27
|
visibility: ${props => (props.$isOpen ? 'visible' : 'hidden')};
|
|
28
|
-
background-color: ${({ theme }) => theme.colors.
|
|
28
|
+
background-color: ${({ theme }) => theme.colors.surface.toString()};
|
|
29
29
|
border-radius: ${({ theme }) => theme.shape.radiusFactor * 2}em;
|
|
30
|
-
box-shadow: 0 4px 24px
|
|
31
|
-
${({ theme }) => theme.colors.backgroundPrimary().darken(0.5).alpha(0.6).toString()};
|
|
30
|
+
box-shadow: 0 4px 24px ${({ theme }) => theme.colors.surface.darken(50).alpha(0.6).toString()};
|
|
32
31
|
&:focus {
|
|
33
32
|
outline: none;
|
|
34
33
|
}
|
|
@@ -43,20 +42,20 @@ const StyledMenuWrapper = styled_1.default.div `
|
|
|
43
42
|
|
|
44
43
|
& ::-webkit-scrollbar-track {
|
|
45
44
|
background: ${({ theme }) => theme.isDark
|
|
46
|
-
? theme.colors.backgroundPrimary
|
|
47
|
-
: theme.colors.backgroundPrimary
|
|
45
|
+
? theme.colors.backgroundPrimary.darken(10).toString()
|
|
46
|
+
: theme.colors.backgroundPrimary.darken(5).toString()};
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
& ::-webkit-scrollbar-thumb {
|
|
51
50
|
background: ${({ theme }) => theme.isDark
|
|
52
|
-
? theme.colors.backgroundSecondary
|
|
53
|
-
: theme.colors.backgroundSecondary
|
|
51
|
+
? theme.colors.backgroundSecondary.lighten(30).toString()
|
|
52
|
+
: theme.colors.backgroundSecondary.darken(30).toString()};
|
|
54
53
|
border-radius: 0.3rem;
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
& ::-webkit-scrollbar-thumb:horizontal:hover,
|
|
58
57
|
& ::-webkit-scrollbar-thumb:vertical:hover {
|
|
59
|
-
background: ${({ theme }) => theme.colors.accentPrimary
|
|
58
|
+
background: ${({ theme }) => theme.colors.accentPrimary.toString()};
|
|
60
59
|
}
|
|
61
60
|
`;
|
|
62
61
|
const MenuWrapperInner = styled_1.default.div `
|
|
@@ -41,7 +41,7 @@ const React = __importStar(require("react"));
|
|
|
41
41
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
42
|
const react_1 = require("@emotion/react");
|
|
43
43
|
const react_modal_1 = __importDefault(require("react-modal"));
|
|
44
|
-
const Button_1 = __importDefault(require("
|
|
44
|
+
const Button_1 = __importDefault(require("../Button"));
|
|
45
45
|
const Container = styled_1.default.div `
|
|
46
46
|
display: flex;
|
|
47
47
|
flex-flow: column;
|
|
@@ -127,7 +127,7 @@ const ModalConfirmBox = (props, ref) => {
|
|
|
127
127
|
overflow: auto;
|
|
128
128
|
-webkit-overflow-scrolling: touch;
|
|
129
129
|
outline: none;
|
|
130
|
-
background: ${theme.colors.
|
|
130
|
+
background: ${theme.colors.surface.toString()};
|
|
131
131
|
border-radius: 1em;
|
|
132
132
|
transform: translate(-50%, -40%);
|
|
133
133
|
transition: transform 100ms ease-in-out, opacity 100ms ease-in-out;
|
|
@@ -78,7 +78,7 @@ const ModalDialog = (props, ref) => {
|
|
|
78
78
|
overflow: auto;
|
|
79
79
|
-webkit-overflow-scrolling: touch;
|
|
80
80
|
outline: none;
|
|
81
|
-
background: ${theme.colors.
|
|
81
|
+
background: ${theme.colors.surface.toString()};
|
|
82
82
|
border-radius: 1em;
|
|
83
83
|
transform: translate(-50%, -40%);
|
|
84
84
|
transition: transform 100ms ease-in-out, opacity 100ms ease-in-out;
|
|
@@ -41,7 +41,7 @@ const React = __importStar(require("react"));
|
|
|
41
41
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
42
|
const react_1 = require("@emotion/react");
|
|
43
43
|
const react_modal_1 = __importDefault(require("react-modal"));
|
|
44
|
-
const Button_1 = __importDefault(require("
|
|
44
|
+
const Button_1 = __importDefault(require("../Button"));
|
|
45
45
|
const CloseIcon_1 = __importDefault(require("./CloseIcon"));
|
|
46
46
|
const Container = styled_1.default.div `
|
|
47
47
|
min-height: 2rem;
|
|
@@ -76,7 +76,7 @@ const Inner = styled_1.default.div `
|
|
|
76
76
|
`;
|
|
77
77
|
const CloseButton = (0, styled_1.default)(Button_1.default) `
|
|
78
78
|
margin-left: ${props => (props.$withToolbar ? '1em' : 0)};
|
|
79
|
-
color: ${props => props.theme.colors.textPrimary
|
|
79
|
+
color: ${props => props.theme.colors.textPrimary.toString()};
|
|
80
80
|
background: none;
|
|
81
81
|
width: auto;
|
|
82
82
|
height: auto;
|
|
@@ -131,7 +131,7 @@ const ModalDrawer = (props, ref) => {
|
|
|
131
131
|
overflow: auto;
|
|
132
132
|
-webkit-overflow-scrolling: touch;
|
|
133
133
|
outline: none;
|
|
134
|
-
background: ${theme.colors.
|
|
134
|
+
background: ${theme.colors.surface.toString()};
|
|
135
135
|
border-radius: 1em 1em 0 0;
|
|
136
136
|
transform: translate(0, 100%);
|
|
137
137
|
transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
@@ -41,7 +41,7 @@ const React = __importStar(require("react"));
|
|
|
41
41
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
42
|
const react_1 = require("@emotion/react");
|
|
43
43
|
const react_modal_1 = __importDefault(require("react-modal"));
|
|
44
|
-
const Button_1 = __importDefault(require("
|
|
44
|
+
const Button_1 = __importDefault(require("../Button"));
|
|
45
45
|
const Container = styled_1.default.div `
|
|
46
46
|
display: flex;
|
|
47
47
|
flex-flow: column;
|
|
@@ -126,7 +126,7 @@ const ModalMessageBox = (props, ref) => {
|
|
|
126
126
|
overflow: auto;
|
|
127
127
|
-webkit-overflow-scrolling: touch;
|
|
128
128
|
outline: none;
|
|
129
|
-
background: ${theme.colors.
|
|
129
|
+
background: ${theme.colors.surface.toString()};
|
|
130
130
|
border-radius: 1em;
|
|
131
131
|
transform: translate(-50%, -40%);
|
|
132
132
|
transition: transform 100ms ease-in-out, opacity 100ms ease-in-out;
|
|
@@ -32,7 +32,7 @@ const CountryFlagContainer = styled_1.default.span `
|
|
|
32
32
|
overflow: hidden;
|
|
33
33
|
margin-left: 0.5em;
|
|
34
34
|
margin-right: 0.5em;
|
|
35
|
-
border: 1px solid ${({ theme }) => theme.colors.textPrimary
|
|
35
|
+
border: 1px solid ${({ theme }) => theme.colors.textPrimary.alpha(0.8).toString()};
|
|
36
36
|
`;
|
|
37
37
|
const CountryFlag = props => {
|
|
38
38
|
const { countryCode } = props, otherProps = __rest(props, ["countryCode"]);
|
|
@@ -28,7 +28,7 @@ const react_1 = require("@emotion/react");
|
|
|
28
28
|
const UnknownFlag = (props, ref) => {
|
|
29
29
|
const { colors } = (0, react_1.useTheme)();
|
|
30
30
|
return (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 512 512", ref: ref }, props),
|
|
31
|
-
React.createElement("path", { transform: "translate(78.682 31.951)", d: "m-78.682-31.951h512v512h-512z", fill: colors.
|
|
32
|
-
React.createElement("path", { transform: "translate(78.682 31.951)", d: "m177.32 288.09q-4.915 0-8.0953-3.1803-3.1803-3.4694-3.1803-8.3844 0-11.854 5.7824-25.153 5.7823-13.299 15.612-22.551l7.2279-6.6497q9.83-9.2518 15.323-15.323 5.4932-6.3606 8.9626-15.034 3.7585-8.9626 3.7585-20.527 0-11.276-5.4932-20.527-5.4932-9.5409-15.612-15.034-10.119-5.4932-23.129-5.4932-21.395 0-34.116 13.01-12.432 12.721-12.432 33.248 0 4.915-3.1803 8.0953-2.8912 2.8912-7.8062 2.8912t-8.0953-2.8912q-3.1803-3.1803-3.1803-8.0953 0-19.66 8.6735-34.983 8.6735-15.323 24.286-23.997 15.612-8.6735 35.851-8.6735 19.082 0 34.116 8.3844 15.323 8.0953 23.708 22.551 8.6735 14.456 8.6735 32.67 0 14.167-4.6259 24.864-4.6259 10.408-11.854 18.503-6.9388 8.0953-19.949 19.949l-5.2041 4.6259q-8.0953 7.2279-11.565 17.058-3.1803 9.5409-3.1803 19.082 0 4.915-3.1803 8.3844-3.1803 3.1803-8.0953 3.1803zm0 51.174q-7.2279 0-12.143-4.915-4.6259-4.915-4.6259-11.854 0-7.2279 4.915-12.143 4.915-4.915 11.854-4.915t11.854 4.915q5.2041 4.915 5.2041 12.143 0 6.9388-5.2041 11.854-4.915 4.915-11.854 4.915z", fill: colors.textPrimary
|
|
31
|
+
React.createElement("path", { transform: "translate(78.682 31.951)", d: "m-78.682-31.951h512v512h-512z", fill: colors.surface.toString(), strokeLinejoin: "round", strokeWidth: "2.176" }),
|
|
32
|
+
React.createElement("path", { transform: "translate(78.682 31.951)", d: "m177.32 288.09q-4.915 0-8.0953-3.1803-3.1803-3.4694-3.1803-8.3844 0-11.854 5.7824-25.153 5.7823-13.299 15.612-22.551l7.2279-6.6497q9.83-9.2518 15.323-15.323 5.4932-6.3606 8.9626-15.034 3.7585-8.9626 3.7585-20.527 0-11.276-5.4932-20.527-5.4932-9.5409-15.612-15.034-10.119-5.4932-23.129-5.4932-21.395 0-34.116 13.01-12.432 12.721-12.432 33.248 0 4.915-3.1803 8.0953-2.8912 2.8912-7.8062 2.8912t-8.0953-2.8912q-3.1803-3.1803-3.1803-8.0953 0-19.66 8.6735-34.983 8.6735-15.323 24.286-23.997 15.612-8.6735 35.851-8.6735 19.082 0 34.116 8.3844 15.323 8.0953 23.708 22.551 8.6735 14.456 8.6735 32.67 0 14.167-4.6259 24.864-4.6259 10.408-11.854 18.503-6.9388 8.0953-19.949 19.949l-5.2041 4.6259q-8.0953 7.2279-11.565 17.058-3.1803 9.5409-3.1803 19.082 0 4.915-3.1803 8.3844-3.1803 3.1803-8.0953 3.1803zm0 51.174q-7.2279 0-12.143-4.915-4.6259-4.915-4.6259-11.854 0-7.2279 4.915-12.143 4.915-4.915 11.854-4.915t11.854 4.915q5.2041 4.915 5.2041 12.143 0 6.9388-5.2041 11.854-4.915 4.915-11.854 4.915z", fill: colors.textPrimary.toString(), strokeWidth: ".72279" })));
|
|
33
33
|
};
|
|
34
34
|
exports.default = React.forwardRef(UnknownFlag);
|
package/README.md
CHANGED
|
@@ -1,17 +1,50 @@
|
|
|
1
|
+
## Установка.
|
|
1
2
|
|
|
3
|
+
для работы требуются следующие модули:
|
|
4
|
+
|
|
5
|
+
- react
|
|
6
|
+
- react-dom
|
|
7
|
+
- @emotion/styled - CSS In JS
|
|
8
|
+
- @emotion/react - CSS In JS React
|
|
9
|
+
- react-modal - Мобальные окна и дроверы
|
|
10
|
+
- react-popper - Выпадающие меню
|
|
11
|
+
- react-window - Виртуализированный список
|
|
2
12
|
|
|
3
13
|
```bash
|
|
4
14
|
$ npm install @emotion/react @emotion/styled react react-dom react-modal react-popper react-window
|
|
5
15
|
|
|
6
16
|
```
|
|
7
17
|
|
|
8
|
-
|
|
18
|
+
## Темы
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
import { UITheme } from '@via-profit/ui-kit';
|
|
20
|
+
Для переопределения темы оформления в пакете `@emotion/styled` создайте, например в директории `@types`, файл `emotion.d.ts` со следующим содержимым:
|
|
12
21
|
|
|
22
|
+
```ts
|
|
13
23
|
declare module '@emotion/react' {
|
|
24
|
+
import { UITheme } from '@via-profit/ui-kit';
|
|
25
|
+
|
|
14
26
|
export interface Theme extends UITheme {}
|
|
15
27
|
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Для переопределения темы оформления в пакете `@via-profit/ui-kit` создайте, например в директории `@types`, файл `ui-kit.d.ts` со следующим содержимым:
|
|
16
31
|
|
|
17
|
-
|
|
32
|
+
_@types/emotion.d.ts_
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
declare module '@via-profit/ui-kit' {
|
|
36
|
+
import {
|
|
37
|
+
UIThemeOverrideColor as Colors,
|
|
38
|
+
UIThemeOverrideZIndex as ZIndexes,
|
|
39
|
+
} from '@via-profit/ui-kit';
|
|
40
|
+
|
|
41
|
+
export interface UIThemeOverrideColor extends Colors {
|
|
42
|
+
readonly drawer: string;
|
|
43
|
+
readonly drawerContrast: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface UIThemeOverrideZIndex extends ZIndexes {
|
|
47
|
+
readonly notifications: number;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|