@ozen-ui/kit 0.25.1 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Calendar/package.json +5 -0
- package/DatePicker/package.json +5 -0
- package/__inner__/cjs/components/FilePicker/FilePicker.js +2 -2
- package/__inner__/cjs/components/FilePicker/constants.d.ts +0 -2
- package/__inner__/cjs/components/FilePicker/constants.js +1 -3
- package/__inner__/cjs/components/Loader/Loader.js +1 -1
- package/__inner__/cjs/components/ThemeProvider/index.d.ts +0 -1
- package/__inner__/cjs/components/ThemeProvider/index.js +0 -1
- package/__inner__/cjs/components/ThemeProvider/themes/themeBBusinessDark.js +4 -5
- package/__inner__/cjs/components/ThemeProvider/themes/themeBBusinessDefault.js +4 -5
- package/__inner__/cjs/components/ThemeProvider/themes/themeOzenDark.js +4 -5
- package/__inner__/cjs/components/ThemeProvider/themes/themeOzenDefault.js +4 -5
- package/__inner__/cjs/locale/index.d.ts +1 -0
- package/__inner__/cjs/locale/index.js +4 -0
- package/__inner__/cjs/locale/locale.d.ts +5 -0
- package/__inner__/cjs/locale/locale.js +36 -0
- package/__inner__/cjs/utils/capitalizeFirstLetter/capitalizeFirstLetter.d.ts +2 -0
- package/__inner__/cjs/utils/capitalizeFirstLetter/capitalizeFirstLetter.js +8 -0
- package/__inner__/cjs/utils/capitalizeFirstLetter/index.d.ts +1 -0
- package/__inner__/cjs/utils/capitalizeFirstLetter/index.js +4 -0
- package/__inner__/esm/components/FilePicker/FilePicker.js +3 -3
- package/__inner__/esm/components/FilePicker/constants.d.ts +0 -2
- package/__inner__/esm/components/FilePicker/constants.js +0 -2
- package/__inner__/esm/components/Loader/Loader.js +1 -1
- package/__inner__/esm/components/ThemeProvider/index.d.ts +0 -1
- package/__inner__/esm/components/ThemeProvider/index.js +0 -1
- package/__inner__/esm/components/ThemeProvider/themes/themeBBusinessDark.js +4 -5
- package/__inner__/esm/components/ThemeProvider/themes/themeBBusinessDefault.js +4 -5
- package/__inner__/esm/components/ThemeProvider/themes/themeOzenDark.js +4 -5
- package/__inner__/esm/components/ThemeProvider/themes/themeOzenDefault.js +4 -5
- package/__inner__/esm/locale/index.d.ts +1 -0
- package/__inner__/esm/locale/index.js +1 -0
- package/__inner__/esm/locale/locale.d.ts +5 -0
- package/__inner__/esm/locale/locale.js +33 -0
- package/__inner__/esm/utils/capitalizeFirstLetter/capitalizeFirstLetter.d.ts +2 -0
- package/__inner__/esm/utils/capitalizeFirstLetter/capitalizeFirstLetter.js +4 -0
- package/__inner__/esm/utils/capitalizeFirstLetter/index.d.ts +1 -0
- package/__inner__/esm/utils/capitalizeFirstLetter/index.js +1 -0
- package/locale/package.json +5 -0
- package/package.json +1 -1
- package/__inner__/cjs/components/ThemeProvider/localization/localization.d.ts +0 -4
- package/__inner__/cjs/components/ThemeProvider/localization/localization.js +0 -36
- package/__inner__/esm/components/ThemeProvider/localization/localization.d.ts +0 -4
- package/__inner__/esm/components/ThemeProvider/localization/localization.js +0 -33
|
@@ -20,11 +20,11 @@ exports.FilePicker = (0, react_1.forwardRef)(function (inProps, ref) {
|
|
|
20
20
|
var _a = (0, useThemeProps_1.useThemeProps)({
|
|
21
21
|
props: inProps,
|
|
22
22
|
name: 'FilePicker',
|
|
23
|
-
}), _b = _a.size, size = _b === void 0 ? constants_1.FILE_PICKER_DEFAULT_SIZE : _b, _c = _a.
|
|
23
|
+
}), _b = _a.size, size = _b === void 0 ? constants_1.FILE_PICKER_DEFAULT_SIZE : _b, _c = _a.disabled, disabled = _c === void 0 ? constants_1.FILE_PICKER_DEFAULT_DISABLED : _c, _d = _a.required, required = _d === void 0 ? constants_1.FILE_PICKER_DEFAULT_REQUIRED : _d, _e = _a.fullWidth, fullWidth = _e === void 0 ? constants_1.FILE_PICKER_DEFAULT_FULL_WIDTH : _e, _f = _a.disableTruncate, disableTruncate = _f === void 0 ? constants_1.FILE_PICKER_DEFAULT_DISABLE_TRUNCATE : _f, _g = _a.multiple, multiple = _g === void 0 ? constants_1.FILE_PICKER_DEFAULT_MULTIPLE : _g, placeholder = _a.placeholder, clearText = _a.clearText, _h = _a.renderRight, renderRight = _h === void 0 ? icons_1.AttachmentIcon : _h, renderValueProp = _a.renderValue, onChangeProp = _a.onChange, onClearProp = _a.onClear, inputRefProp = _a.inputRef, fileList = _a.fileList, accept = _a.accept, id = _a.id, name = _a.name, label = _a.label, autoFocus = _a.autoFocus, error = _a.error, hint = _a.hint, renderLeft = _a.renderLeft, labelProps = _a.labelProps, inputProps = _a.inputProps, labelRef = _a.labelRef, className = _a.className, other = tslib_1.__rest(_a, ["size", "disabled", "required", "fullWidth", "disableTruncate", "multiple", "placeholder", "clearText", "renderRight", "renderValue", "onChange", "onClear", "inputRef", "fileList", "accept", "id", "name", "label", "autoFocus", "error", "hint", "renderLeft", "labelProps", "inputProps", "labelRef", "className"]);
|
|
24
24
|
var fieldRef = (0, react_1.useRef)(null);
|
|
25
25
|
var inputRef = (0, react_1.useRef)(null);
|
|
26
26
|
var clearRef = (0, react_1.useRef)(null);
|
|
27
|
-
var
|
|
27
|
+
var _j = tslib_1.__read((0, react_1.useState)(false), 2), focused = _j[0], setFocused = _j[1];
|
|
28
28
|
var handleFocus = function (e) {
|
|
29
29
|
var _a;
|
|
30
30
|
(_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(inputProps, e);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export declare const FILE_PICKER_DEFAULT_SIZE = "m";
|
|
2
|
-
export declare const FILE_PICKER_DEFAULT_PLACEHOLDER = "\u0424\u0430\u0439\u043B \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D";
|
|
3
2
|
export declare const FILE_PICKER_DEFAULT_DISABLED = false;
|
|
4
3
|
export declare const FILE_PICKER_DEFAULT_REQUIRED = false;
|
|
5
4
|
export declare const FILE_PICKER_DEFAULT_FULL_WIDTH = false;
|
|
6
5
|
export declare const FILE_PICKER_DEFAULT_DISABLE_TRUNCATE = false;
|
|
7
6
|
export declare const FILE_PICKER_DEFAULT_MULTIPLE = false;
|
|
8
|
-
export declare const FILE_PICKER_DEFAULT_MULTIPLE_CLEAR_TEXT = "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043F\u043E\u043B\u0435";
|
|
9
7
|
export declare const FILE_PICKER_DEFAULT_VALUE_RENDERER: (files: File[], disableTruncate?: boolean) => string;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FILE_PICKER_DEFAULT_VALUE_RENDERER = exports.
|
|
3
|
+
exports.FILE_PICKER_DEFAULT_VALUE_RENDERER = exports.FILE_PICKER_DEFAULT_MULTIPLE = exports.FILE_PICKER_DEFAULT_DISABLE_TRUNCATE = exports.FILE_PICKER_DEFAULT_FULL_WIDTH = exports.FILE_PICKER_DEFAULT_REQUIRED = exports.FILE_PICKER_DEFAULT_DISABLED = exports.FILE_PICKER_DEFAULT_SIZE = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
exports.FILE_PICKER_DEFAULT_SIZE = 'm';
|
|
6
|
-
exports.FILE_PICKER_DEFAULT_PLACEHOLDER = 'Файл не выбран';
|
|
7
6
|
exports.FILE_PICKER_DEFAULT_DISABLED = false;
|
|
8
7
|
exports.FILE_PICKER_DEFAULT_REQUIRED = false;
|
|
9
8
|
exports.FILE_PICKER_DEFAULT_FULL_WIDTH = false;
|
|
10
9
|
exports.FILE_PICKER_DEFAULT_DISABLE_TRUNCATE = false;
|
|
11
10
|
exports.FILE_PICKER_DEFAULT_MULTIPLE = false;
|
|
12
|
-
exports.FILE_PICKER_DEFAULT_MULTIPLE_CLEAR_TEXT = 'Очистить поле';
|
|
13
11
|
var FILE_PICKER_DEFAULT_VALUE_RENDERER = function (files, disableTruncate) {
|
|
14
12
|
if (disableTruncate === void 0) { disableTruncate = false; }
|
|
15
13
|
if (Array.isArray(files) && files.length > 1) {
|
|
@@ -10,7 +10,7 @@ var cnLoader = (0, classname_1.cn)('Loader');
|
|
|
10
10
|
exports.loaderSizeVariant = ['s', 'm', 'l', 'xl'];
|
|
11
11
|
exports.Loader = (0, react_1.forwardRef)(function (inProps, ref) {
|
|
12
12
|
var props = (0, useThemeProps_1.useThemeProps)({ props: inProps, name: 'Loader' });
|
|
13
|
-
var _a = props.size, size = _a === void 0 ? 'm' : _a, className = props.className, color = props.color,
|
|
13
|
+
var _a = props.size, size = _a === void 0 ? 'm' : _a, className = props.className, color = props.color, ariaLabel = props["aria-label"], other = tslib_1.__rest(props, ["size", "className", "color", 'aria-label']);
|
|
14
14
|
return (react_1.default.createElement("div", tslib_1.__assign({ className: cnLoader({ size: size }, [className]) }, other, { "aria-label": ariaLabel, ref: ref, style: { '--loader-color': color } })));
|
|
15
15
|
});
|
|
16
16
|
exports.Loader.displayName = 'Loader';
|
|
@@ -5,6 +5,5 @@ export * from './themes/themeBBusinessDefault';
|
|
|
5
5
|
export * from './themes/themeBBusinessDark';
|
|
6
6
|
export * as themeHelper from './themes/helper';
|
|
7
7
|
export { useTheme } from './ThemeProviderContext';
|
|
8
|
-
export * from './localization/localization';
|
|
9
8
|
export * from './utils';
|
|
10
9
|
export * from './types';
|
|
@@ -10,6 +10,5 @@ tslib_1.__exportStar(require("./themes/themeBBusinessDark"), exports);
|
|
|
10
10
|
exports.themeHelper = tslib_1.__importStar(require("./themes/helper"));
|
|
11
11
|
var ThemeProviderContext_1 = require("./ThemeProviderContext");
|
|
12
12
|
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return ThemeProviderContext_1.useTheme; } });
|
|
13
|
-
tslib_1.__exportStar(require("./localization/localization"), exports);
|
|
14
13
|
tslib_1.__exportStar(require("./utils"), exports);
|
|
15
14
|
tslib_1.__exportStar(require("./types"), exports);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.themeBBusinessDark = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
4
5
|
require("@ozen-ui/fonts");
|
|
6
|
+
var locale_1 = require("../../../locale");
|
|
5
7
|
require("../_color/Theme_color_bBusinessDark.css");
|
|
6
8
|
require("../_typography/Theme_typography_ozenDefault.css");
|
|
7
9
|
require("../_borderRadius/Theme_borderRadius_ozenDefault.css");
|
|
@@ -13,8 +15,7 @@ require("../_breakpoint/Theme_breakpoint_ozenDefault.css");
|
|
|
13
15
|
require("../_borderWidth/Theme_borderWidth_ozenDefault.css");
|
|
14
16
|
require("../_zIndex/Theme_zIndex_ozenDefault.css");
|
|
15
17
|
require("../_transition/Theme_transition_ozenDefault.css");
|
|
16
|
-
exports.themeBBusinessDark = {
|
|
17
|
-
tokens: {
|
|
18
|
+
exports.themeBBusinessDark = tslib_1.__assign({ tokens: {
|
|
18
19
|
color: 'bBusinessDark',
|
|
19
20
|
space: 'ozenDefault',
|
|
20
21
|
spacing: 'ozenDefault',
|
|
@@ -26,6 +27,4 @@ exports.themeBBusinessDark = {
|
|
|
26
27
|
breakpoint: 'ozenDefault',
|
|
27
28
|
zIndex: 'ozenDefault',
|
|
28
29
|
transition: 'ozenDefault',
|
|
29
|
-
},
|
|
30
|
-
defaultProps: {},
|
|
31
|
-
};
|
|
30
|
+
} }, locale_1.ruRU);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.themeBBusinessDefault = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
4
5
|
require("@ozen-ui/fonts");
|
|
6
|
+
var locale_1 = require("../../../locale");
|
|
5
7
|
require("../_color/Theme_color_bBusinessDefault.css");
|
|
6
8
|
require("../_typography/Theme_typography_ozenDefault.css");
|
|
7
9
|
require("../_borderRadius/Theme_borderRadius_ozenDefault.css");
|
|
@@ -13,8 +15,7 @@ require("../_breakpoint/Theme_breakpoint_ozenDefault.css");
|
|
|
13
15
|
require("../_borderWidth/Theme_borderWidth_ozenDefault.css");
|
|
14
16
|
require("../_zIndex/Theme_zIndex_ozenDefault.css");
|
|
15
17
|
require("../_transition/Theme_transition_ozenDefault.css");
|
|
16
|
-
exports.themeBBusinessDefault = {
|
|
17
|
-
tokens: {
|
|
18
|
+
exports.themeBBusinessDefault = tslib_1.__assign({ tokens: {
|
|
18
19
|
color: 'bBusinessDefault',
|
|
19
20
|
space: 'ozenDefault',
|
|
20
21
|
spacing: 'ozenDefault',
|
|
@@ -26,6 +27,4 @@ exports.themeBBusinessDefault = {
|
|
|
26
27
|
breakpoint: 'ozenDefault',
|
|
27
28
|
zIndex: 'ozenDefault',
|
|
28
29
|
transition: 'ozenDefault',
|
|
29
|
-
},
|
|
30
|
-
defaultProps: {},
|
|
31
|
-
};
|
|
30
|
+
} }, locale_1.ruRU);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.themeOzenDark = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
4
5
|
require("@ozen-ui/fonts");
|
|
6
|
+
var locale_1 = require("../../../locale");
|
|
5
7
|
require("../_color/Theme_color_ozenDark.css");
|
|
6
8
|
require("../_typography/Theme_typography_ozenDefault.css");
|
|
7
9
|
require("../_borderRadius/Theme_borderRadius_ozenDefault.css");
|
|
@@ -13,8 +15,7 @@ require("../_breakpoint/Theme_breakpoint_ozenDefault.css");
|
|
|
13
15
|
require("../_borderWidth/Theme_borderWidth_ozenDefault.css");
|
|
14
16
|
require("../_zIndex/Theme_zIndex_ozenDefault.css");
|
|
15
17
|
require("../_transition/Theme_transition_ozenDefault.css");
|
|
16
|
-
exports.themeOzenDark = {
|
|
17
|
-
tokens: {
|
|
18
|
+
exports.themeOzenDark = tslib_1.__assign({ tokens: {
|
|
18
19
|
color: 'ozenDark',
|
|
19
20
|
space: 'ozenDefault',
|
|
20
21
|
spacing: 'ozenDefault',
|
|
@@ -26,6 +27,4 @@ exports.themeOzenDark = {
|
|
|
26
27
|
breakpoint: 'ozenDefault',
|
|
27
28
|
zIndex: 'ozenDefault',
|
|
28
29
|
transition: 'ozenDefault',
|
|
29
|
-
},
|
|
30
|
-
defaultProps: {},
|
|
31
|
-
};
|
|
30
|
+
} }, locale_1.ruRU);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.themeOzenDefault = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
4
5
|
require("@ozen-ui/fonts");
|
|
6
|
+
var locale_1 = require("../../../locale");
|
|
5
7
|
require("../_color/Theme_color_ozenDefault.css");
|
|
6
8
|
require("../_typography/Theme_typography_ozenDefault.css");
|
|
7
9
|
require("../_borderRadius/Theme_borderRadius_ozenDefault.css");
|
|
@@ -13,8 +15,7 @@ require("../_breakpoint/Theme_breakpoint_ozenDefault.css");
|
|
|
13
15
|
require("../_borderWidth/Theme_borderWidth_ozenDefault.css");
|
|
14
16
|
require("../_zIndex/Theme_zIndex_ozenDefault.css");
|
|
15
17
|
require("../_transition/Theme_transition_ozenDefault.css");
|
|
16
|
-
exports.themeOzenDefault = {
|
|
17
|
-
tokens: {
|
|
18
|
+
exports.themeOzenDefault = tslib_1.__assign({ tokens: {
|
|
18
19
|
color: 'ozenDefault',
|
|
19
20
|
space: 'ozenDefault',
|
|
20
21
|
spacing: 'ozenDefault',
|
|
@@ -26,6 +27,4 @@ exports.themeOzenDefault = {
|
|
|
26
27
|
breakpoint: 'ozenDefault',
|
|
27
28
|
zIndex: 'ozenDefault',
|
|
28
29
|
transition: 'ozenDefault',
|
|
29
|
-
},
|
|
30
|
-
defaultProps: {},
|
|
31
|
-
};
|
|
30
|
+
} }, locale_1.ruRU);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './locale';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enUS = exports.kkKZ = exports.ruRU = void 0;
|
|
4
|
+
exports.ruRU = {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
Loader: {
|
|
7
|
+
'aria-label': 'Загрузка',
|
|
8
|
+
},
|
|
9
|
+
FilePicker: {
|
|
10
|
+
placeholder: 'Файл не выбран',
|
|
11
|
+
clearText: 'Очистить поле',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
exports.kkKZ = {
|
|
16
|
+
defaultProps: {
|
|
17
|
+
Loader: {
|
|
18
|
+
'aria-label': 'Жүктеу',
|
|
19
|
+
},
|
|
20
|
+
FilePicker: {
|
|
21
|
+
placeholder: 'Файл таңдалмаған',
|
|
22
|
+
clearText: 'Өрісті тазалаңыз',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
exports.enUS = {
|
|
27
|
+
defaultProps: {
|
|
28
|
+
Loader: {
|
|
29
|
+
'aria-label': 'Loading',
|
|
30
|
+
},
|
|
31
|
+
FilePicker: {
|
|
32
|
+
placeholder: 'No file selected',
|
|
33
|
+
clearText: 'Clear field',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.capitalizeFirstLetter = void 0;
|
|
4
|
+
/** Делает первый символ слова заглавным */
|
|
5
|
+
function capitalizeFirstLetter(string) {
|
|
6
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
7
|
+
}
|
|
8
|
+
exports.capitalizeFirstLetter = capitalizeFirstLetter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './capitalizeFirstLetter';
|
|
@@ -11,17 +11,17 @@ import { FieldIcon } from '../FieldIcon';
|
|
|
11
11
|
import { FieldLabel } from '../FieldLabel';
|
|
12
12
|
import { Fieldset } from '../Fieldset';
|
|
13
13
|
import { IconButton } from '../IconButton';
|
|
14
|
-
import { FILE_PICKER_DEFAULT_SIZE,
|
|
14
|
+
import { FILE_PICKER_DEFAULT_SIZE, FILE_PICKER_DEFAULT_DISABLED, FILE_PICKER_DEFAULT_REQUIRED, FILE_PICKER_DEFAULT_FULL_WIDTH, FILE_PICKER_DEFAULT_DISABLE_TRUNCATE, FILE_PICKER_DEFAULT_VALUE_RENDERER, FILE_PICKER_DEFAULT_MULTIPLE, } from './constants';
|
|
15
15
|
export var cnFilePicker = cn('FilePicker');
|
|
16
16
|
export var FilePicker = forwardRef(function (inProps, ref) {
|
|
17
17
|
var _a = useThemeProps({
|
|
18
18
|
props: inProps,
|
|
19
19
|
name: 'FilePicker',
|
|
20
|
-
}), _b = _a.size, size = _b === void 0 ? FILE_PICKER_DEFAULT_SIZE : _b, _c = _a.
|
|
20
|
+
}), _b = _a.size, size = _b === void 0 ? FILE_PICKER_DEFAULT_SIZE : _b, _c = _a.disabled, disabled = _c === void 0 ? FILE_PICKER_DEFAULT_DISABLED : _c, _d = _a.required, required = _d === void 0 ? FILE_PICKER_DEFAULT_REQUIRED : _d, _e = _a.fullWidth, fullWidth = _e === void 0 ? FILE_PICKER_DEFAULT_FULL_WIDTH : _e, _f = _a.disableTruncate, disableTruncate = _f === void 0 ? FILE_PICKER_DEFAULT_DISABLE_TRUNCATE : _f, _g = _a.multiple, multiple = _g === void 0 ? FILE_PICKER_DEFAULT_MULTIPLE : _g, placeholder = _a.placeholder, clearText = _a.clearText, _h = _a.renderRight, renderRight = _h === void 0 ? AttachmentIcon : _h, renderValueProp = _a.renderValue, onChangeProp = _a.onChange, onClearProp = _a.onClear, inputRefProp = _a.inputRef, fileList = _a.fileList, accept = _a.accept, id = _a.id, name = _a.name, label = _a.label, autoFocus = _a.autoFocus, error = _a.error, hint = _a.hint, renderLeft = _a.renderLeft, labelProps = _a.labelProps, inputProps = _a.inputProps, labelRef = _a.labelRef, className = _a.className, other = __rest(_a, ["size", "disabled", "required", "fullWidth", "disableTruncate", "multiple", "placeholder", "clearText", "renderRight", "renderValue", "onChange", "onClear", "inputRef", "fileList", "accept", "id", "name", "label", "autoFocus", "error", "hint", "renderLeft", "labelProps", "inputProps", "labelRef", "className"]);
|
|
21
21
|
var fieldRef = useRef(null);
|
|
22
22
|
var inputRef = useRef(null);
|
|
23
23
|
var clearRef = useRef(null);
|
|
24
|
-
var
|
|
24
|
+
var _j = __read(useState(false), 2), focused = _j[0], setFocused = _j[1];
|
|
25
25
|
var handleFocus = function (e) {
|
|
26
26
|
var _a;
|
|
27
27
|
(_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(inputProps, e);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export declare const FILE_PICKER_DEFAULT_SIZE = "m";
|
|
2
|
-
export declare const FILE_PICKER_DEFAULT_PLACEHOLDER = "\u0424\u0430\u0439\u043B \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D";
|
|
3
2
|
export declare const FILE_PICKER_DEFAULT_DISABLED = false;
|
|
4
3
|
export declare const FILE_PICKER_DEFAULT_REQUIRED = false;
|
|
5
4
|
export declare const FILE_PICKER_DEFAULT_FULL_WIDTH = false;
|
|
6
5
|
export declare const FILE_PICKER_DEFAULT_DISABLE_TRUNCATE = false;
|
|
7
6
|
export declare const FILE_PICKER_DEFAULT_MULTIPLE = false;
|
|
8
|
-
export declare const FILE_PICKER_DEFAULT_MULTIPLE_CLEAR_TEXT = "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043F\u043E\u043B\u0435";
|
|
9
7
|
export declare const FILE_PICKER_DEFAULT_VALUE_RENDERER: (files: File[], disableTruncate?: boolean) => string;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { __read } from "tslib";
|
|
2
2
|
export var FILE_PICKER_DEFAULT_SIZE = 'm';
|
|
3
|
-
export var FILE_PICKER_DEFAULT_PLACEHOLDER = 'Файл не выбран';
|
|
4
3
|
export var FILE_PICKER_DEFAULT_DISABLED = false;
|
|
5
4
|
export var FILE_PICKER_DEFAULT_REQUIRED = false;
|
|
6
5
|
export var FILE_PICKER_DEFAULT_FULL_WIDTH = false;
|
|
7
6
|
export var FILE_PICKER_DEFAULT_DISABLE_TRUNCATE = false;
|
|
8
7
|
export var FILE_PICKER_DEFAULT_MULTIPLE = false;
|
|
9
|
-
export var FILE_PICKER_DEFAULT_MULTIPLE_CLEAR_TEXT = 'Очистить поле';
|
|
10
8
|
export var FILE_PICKER_DEFAULT_VALUE_RENDERER = function (files, disableTruncate) {
|
|
11
9
|
if (disableTruncate === void 0) { disableTruncate = false; }
|
|
12
10
|
if (Array.isArray(files) && files.length > 1) {
|
|
@@ -7,7 +7,7 @@ var cnLoader = cn('Loader');
|
|
|
7
7
|
export var loaderSizeVariant = ['s', 'm', 'l', 'xl'];
|
|
8
8
|
export var Loader = forwardRef(function (inProps, ref) {
|
|
9
9
|
var props = useThemeProps({ props: inProps, name: 'Loader' });
|
|
10
|
-
var _a = props.size, size = _a === void 0 ? 'm' : _a, className = props.className, color = props.color,
|
|
10
|
+
var _a = props.size, size = _a === void 0 ? 'm' : _a, className = props.className, color = props.color, ariaLabel = props["aria-label"], other = __rest(props, ["size", "className", "color", 'aria-label']);
|
|
11
11
|
return (React.createElement("div", __assign({ className: cnLoader({ size: size }, [className]) }, other, { "aria-label": ariaLabel, ref: ref, style: { '--loader-color': color } })));
|
|
12
12
|
});
|
|
13
13
|
Loader.displayName = 'Loader';
|
|
@@ -5,6 +5,5 @@ export * from './themes/themeBBusinessDefault';
|
|
|
5
5
|
export * from './themes/themeBBusinessDark';
|
|
6
6
|
export * as themeHelper from './themes/helper';
|
|
7
7
|
export { useTheme } from './ThemeProviderContext';
|
|
8
|
-
export * from './localization/localization';
|
|
9
8
|
export * from './utils';
|
|
10
9
|
export * from './types';
|
|
@@ -6,6 +6,5 @@ export * from './themes/themeBBusinessDark';
|
|
|
6
6
|
import * as themeHelper_1 from './themes/helper';
|
|
7
7
|
export { themeHelper_1 as themeHelper };
|
|
8
8
|
export { useTheme } from './ThemeProviderContext';
|
|
9
|
-
export * from './localization/localization';
|
|
10
9
|
export * from './utils';
|
|
11
10
|
export * from './types';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
1
2
|
import '@ozen-ui/fonts';
|
|
3
|
+
import { ruRU } from '../../../locale';
|
|
2
4
|
import '../_color/Theme_color_bBusinessDark.css';
|
|
3
5
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
4
6
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
@@ -10,8 +12,7 @@ import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
|
10
12
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
11
13
|
import '../_zIndex/Theme_zIndex_ozenDefault.css';
|
|
12
14
|
import '../_transition/Theme_transition_ozenDefault.css';
|
|
13
|
-
export var themeBBusinessDark = {
|
|
14
|
-
tokens: {
|
|
15
|
+
export var themeBBusinessDark = __assign({ tokens: {
|
|
15
16
|
color: 'bBusinessDark',
|
|
16
17
|
space: 'ozenDefault',
|
|
17
18
|
spacing: 'ozenDefault',
|
|
@@ -23,6 +24,4 @@ export var themeBBusinessDark = {
|
|
|
23
24
|
breakpoint: 'ozenDefault',
|
|
24
25
|
zIndex: 'ozenDefault',
|
|
25
26
|
transition: 'ozenDefault',
|
|
26
|
-
},
|
|
27
|
-
defaultProps: {},
|
|
28
|
-
};
|
|
27
|
+
} }, ruRU);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
1
2
|
import '@ozen-ui/fonts';
|
|
3
|
+
import { ruRU } from '../../../locale';
|
|
2
4
|
import '../_color/Theme_color_bBusinessDefault.css';
|
|
3
5
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
4
6
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
@@ -10,8 +12,7 @@ import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
|
10
12
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
11
13
|
import '../_zIndex/Theme_zIndex_ozenDefault.css';
|
|
12
14
|
import '../_transition/Theme_transition_ozenDefault.css';
|
|
13
|
-
export var themeBBusinessDefault = {
|
|
14
|
-
tokens: {
|
|
15
|
+
export var themeBBusinessDefault = __assign({ tokens: {
|
|
15
16
|
color: 'bBusinessDefault',
|
|
16
17
|
space: 'ozenDefault',
|
|
17
18
|
spacing: 'ozenDefault',
|
|
@@ -23,6 +24,4 @@ export var themeBBusinessDefault = {
|
|
|
23
24
|
breakpoint: 'ozenDefault',
|
|
24
25
|
zIndex: 'ozenDefault',
|
|
25
26
|
transition: 'ozenDefault',
|
|
26
|
-
},
|
|
27
|
-
defaultProps: {},
|
|
28
|
-
};
|
|
27
|
+
} }, ruRU);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
1
2
|
import '@ozen-ui/fonts';
|
|
3
|
+
import { ruRU } from '../../../locale';
|
|
2
4
|
import '../_color/Theme_color_ozenDark.css';
|
|
3
5
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
4
6
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
@@ -10,8 +12,7 @@ import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
|
10
12
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
11
13
|
import '../_zIndex/Theme_zIndex_ozenDefault.css';
|
|
12
14
|
import '../_transition/Theme_transition_ozenDefault.css';
|
|
13
|
-
export var themeOzenDark = {
|
|
14
|
-
tokens: {
|
|
15
|
+
export var themeOzenDark = __assign({ tokens: {
|
|
15
16
|
color: 'ozenDark',
|
|
16
17
|
space: 'ozenDefault',
|
|
17
18
|
spacing: 'ozenDefault',
|
|
@@ -23,6 +24,4 @@ export var themeOzenDark = {
|
|
|
23
24
|
breakpoint: 'ozenDefault',
|
|
24
25
|
zIndex: 'ozenDefault',
|
|
25
26
|
transition: 'ozenDefault',
|
|
26
|
-
},
|
|
27
|
-
defaultProps: {},
|
|
28
|
-
};
|
|
27
|
+
} }, ruRU);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
1
2
|
import '@ozen-ui/fonts';
|
|
3
|
+
import { ruRU } from '../../../locale';
|
|
2
4
|
import '../_color/Theme_color_ozenDefault.css';
|
|
3
5
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
4
6
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
@@ -10,8 +12,7 @@ import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
|
10
12
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
11
13
|
import '../_zIndex/Theme_zIndex_ozenDefault.css';
|
|
12
14
|
import '../_transition/Theme_transition_ozenDefault.css';
|
|
13
|
-
export var themeOzenDefault = {
|
|
14
|
-
tokens: {
|
|
15
|
+
export var themeOzenDefault = __assign({ tokens: {
|
|
15
16
|
color: 'ozenDefault',
|
|
16
17
|
space: 'ozenDefault',
|
|
17
18
|
spacing: 'ozenDefault',
|
|
@@ -23,6 +24,4 @@ export var themeOzenDefault = {
|
|
|
23
24
|
breakpoint: 'ozenDefault',
|
|
24
25
|
zIndex: 'ozenDefault',
|
|
25
26
|
transition: 'ozenDefault',
|
|
26
|
-
},
|
|
27
|
-
defaultProps: {},
|
|
28
|
-
};
|
|
27
|
+
} }, ruRU);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './locale';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './locale';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export var ruRU = {
|
|
2
|
+
defaultProps: {
|
|
3
|
+
Loader: {
|
|
4
|
+
'aria-label': 'Загрузка',
|
|
5
|
+
},
|
|
6
|
+
FilePicker: {
|
|
7
|
+
placeholder: 'Файл не выбран',
|
|
8
|
+
clearText: 'Очистить поле',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export var kkKZ = {
|
|
13
|
+
defaultProps: {
|
|
14
|
+
Loader: {
|
|
15
|
+
'aria-label': 'Жүктеу',
|
|
16
|
+
},
|
|
17
|
+
FilePicker: {
|
|
18
|
+
placeholder: 'Файл таңдалмаған',
|
|
19
|
+
clearText: 'Өрісті тазалаңыз',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export var enUS = {
|
|
24
|
+
defaultProps: {
|
|
25
|
+
Loader: {
|
|
26
|
+
'aria-label': 'Loading',
|
|
27
|
+
},
|
|
28
|
+
FilePicker: {
|
|
29
|
+
placeholder: 'No file selected',
|
|
30
|
+
clearText: 'Clear field',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './capitalizeFirstLetter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './capitalizeFirstLetter';
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '../index';
|
|
2
|
-
export declare const localizationLanguageVariant: readonly ["RU", "ENG", "KZN"];
|
|
3
|
-
export type LocalizationLanguageVariant = (typeof localizationLanguageVariant)[number];
|
|
4
|
-
export declare const localization: Record<LocalizationLanguageVariant, Partial<Theme>>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.localization = exports.localizationLanguageVariant = void 0;
|
|
4
|
-
exports.localizationLanguageVariant = ['RU', 'ENG', 'KZN'];
|
|
5
|
-
exports.localization = {
|
|
6
|
-
RU: {
|
|
7
|
-
defaultProps: {
|
|
8
|
-
Loader: {
|
|
9
|
-
'aria-label': 'Загрузка',
|
|
10
|
-
},
|
|
11
|
-
FilePicker: {
|
|
12
|
-
clearText: 'Очистить поле',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
KZN: {
|
|
17
|
-
defaultProps: {
|
|
18
|
-
Loader: {
|
|
19
|
-
'aria-label': 'Жүктеу',
|
|
20
|
-
},
|
|
21
|
-
FilePicker: {
|
|
22
|
-
clearText: 'Өрісті тазалаңыз',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
ENG: {
|
|
27
|
-
defaultProps: {
|
|
28
|
-
Loader: {
|
|
29
|
-
'aria-label': 'Loading',
|
|
30
|
-
},
|
|
31
|
-
FilePicker: {
|
|
32
|
-
clearText: 'Clear field',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '../index';
|
|
2
|
-
export declare const localizationLanguageVariant: readonly ["RU", "ENG", "KZN"];
|
|
3
|
-
export type LocalizationLanguageVariant = (typeof localizationLanguageVariant)[number];
|
|
4
|
-
export declare const localization: Record<LocalizationLanguageVariant, Partial<Theme>>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export var localizationLanguageVariant = ['RU', 'ENG', 'KZN'];
|
|
2
|
-
export var localization = {
|
|
3
|
-
RU: {
|
|
4
|
-
defaultProps: {
|
|
5
|
-
Loader: {
|
|
6
|
-
'aria-label': 'Загрузка',
|
|
7
|
-
},
|
|
8
|
-
FilePicker: {
|
|
9
|
-
clearText: 'Очистить поле',
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
KZN: {
|
|
14
|
-
defaultProps: {
|
|
15
|
-
Loader: {
|
|
16
|
-
'aria-label': 'Жүктеу',
|
|
17
|
-
},
|
|
18
|
-
FilePicker: {
|
|
19
|
-
clearText: 'Өрісті тазалаңыз',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
ENG: {
|
|
24
|
-
defaultProps: {
|
|
25
|
-
Loader: {
|
|
26
|
-
'aria-label': 'Loading',
|
|
27
|
-
},
|
|
28
|
-
FilePicker: {
|
|
29
|
-
clearText: 'Clear field',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
};
|