colibri-ui 0.7.34 → 0.7.36
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/Badge/Badge.module.scss.js +13 -0
- package/Badge/Control/Control.module.scss.js +13 -0
- package/Badge/Control/index.js +11 -7
- package/Badge/index.js +26 -20
- package/Button/Button.module.scss.js +13 -0
- package/Button/index.js +27 -23
- package/Button/index.props.d.ts +3 -34
- package/Checkbox/Checkbox.module.scss.js +13 -0
- package/Checkbox/index.js +38 -34
- package/Checkbox/index.props.d.ts +1 -19
- package/Counter/Counter.module.scss.js +13 -0
- package/Counter/index.d.ts +2 -2
- package/Counter/index.js +40 -33
- package/Counter/index.props.d.ts +1 -1
- package/DotsLoader/DotsLoader.module.scss.js +13 -0
- package/DotsLoader/index.js +44 -17
- package/Dropdown/Dropdown.module.scss.js +13 -0
- package/Dropdown/index.d.ts +2 -2
- package/Dropdown/index.js +28 -31
- package/Dropdown/index.props.d.ts +2 -2
- package/Grid/Grid.module.scss.js +13 -0
- package/Grid/Item/Grid-Item.module.scss.js +13 -0
- package/Grid/Item/index.js +15 -10
- package/Grid/index.js +18 -11
- package/Icons/Cart.d.ts +2 -2
- package/Icons/Cart.js +7 -6
- package/Icons/Chevron.d.ts +2 -2
- package/Icons/Chevron.js +11 -9
- package/Icons/Close.d.ts +2 -2
- package/Icons/Close.js +13 -11
- package/Icons/EyeClosed.d.ts +2 -2
- package/Icons/EyeClosed.js +8 -6
- package/Icons/EyeOpen.d.ts +2 -2
- package/Icons/EyeOpen.js +15 -13
- package/Icons/Help.d.ts +2 -2
- package/Icons/Help.js +11 -9
- package/Icons/Info.d.ts +2 -2
- package/Icons/Info.js +9 -7
- package/Icons/Minus.d.ts +2 -2
- package/Icons/Minus.js +9 -8
- package/Icons/More.d.ts +2 -2
- package/Icons/More.js +18 -16
- package/Icons/Plus.d.ts +2 -2
- package/Icons/Plus.js +14 -13
- package/Icons/Trash.d.ts +2 -2
- package/Icons/Trash.js +11 -9
- package/Icons/User.d.ts +2 -2
- package/Icons/User.js +16 -14
- package/Image/Image.module.scss.js +13 -0
- package/Image/index.d.ts +2 -2
- package/Image/index.js +27 -22
- package/Input/index.d.ts +2 -2
- package/Input/index.js +21 -23
- package/Input/index.props.d.ts +3 -3
- package/Menu/Menu.module.scss.js +13 -0
- package/Menu/components/MenuItem/MenuItem.module.scss.js +13 -0
- package/Menu/components/MenuItem/index.js +24 -14
- package/Menu/components/MenuItem/index.props.d.ts +1 -14
- package/Menu/index.js +10 -6
- package/Menu/index.props.d.ts +3 -21
- package/Modal/Modal.module.scss.js +13 -0
- package/Modal/components/Close/Close.module.scss.js +13 -0
- package/Modal/components/Close/index.js +12 -3
- package/Modal/components/Content/Content.module.scss.js +13 -0
- package/Modal/components/Content/index.js +11 -5
- package/Modal/components/Title/Title.module.scss.js +13 -0
- package/Modal/components/Title/index.d.ts +0 -2
- package/Modal/components/Title/index.js +15 -12
- package/Modal/index.js +40 -33
- package/Select/Select.module.scss.js +13 -0
- package/Select/index.d.ts +2 -1
- package/Select/index.js +55 -45
- package/Separator/Separator.module.scss.js +13 -0
- package/Separator/index.d.ts +6 -0
- package/Separator/index.js +21 -0
- package/Separator/package.json +6 -0
- package/Skeleton/Skeleton.module.scss.js +13 -0
- package/Skeleton/index.js +12 -6
- package/Switch/Switch.module.scss.js +13 -0
- package/Switch/index.d.ts +2 -2
- package/Switch/index.js +28 -12
- package/Switch/index.props.d.ts +2 -15
- package/Theme/index.d.ts +83 -234
- package/Theme/index.js +2 -15
- package/Theme/themes/buenos_aires.d.ts +9 -185
- package/Theme/themes/buenos_aires.js +9 -228
- package/Theme/themes/default.d.ts +79 -184
- package/Theme/themes/default.js +80 -226
- package/Typography/Typography.module.scss.js +13 -0
- package/Typography/index.d.ts +2 -2
- package/Typography/index.js +18 -27
- package/Typography/index.props.d.ts +3 -12
- package/base/BaseInput/BaseInput.module.scss.js +13 -0
- package/base/BaseInput/index.d.ts +4 -0
- package/base/BaseInput/index.js +30 -0
- package/base/BaseInput/index.props.d.ts +4 -0
- package/base/FormField/FormField.module.scss.js +13 -0
- package/base/FormField/index.d.ts +2 -2
- package/base/FormField/index.js +16 -14
- package/base/InputRoot/InputRoot.module.scss.js +13 -0
- package/base/InputRoot/index.d.ts +2 -2
- package/base/InputRoot/index.js +20 -16
- package/base/InputRoot/index.props.d.ts +5 -33
- package/esm/Badge/Badge.module.scss.js +8 -0
- package/esm/Badge/Control/Control.module.scss.js +8 -0
- package/esm/Badge/Control/index.js +6 -7
- package/esm/Badge/index.js +21 -20
- package/esm/Button/Button.module.scss.js +8 -0
- package/esm/Button/index.js +23 -24
- package/esm/Button/index.props.d.ts +3 -34
- package/esm/Checkbox/Checkbox.module.scss.js +8 -0
- package/esm/Checkbox/index.js +33 -34
- package/esm/Checkbox/index.props.d.ts +1 -19
- package/esm/Counter/Counter.module.scss.js +8 -0
- package/esm/Counter/index.d.ts +2 -2
- package/esm/Counter/index.js +36 -34
- package/esm/Counter/index.props.d.ts +1 -1
- package/esm/DotsLoader/DotsLoader.module.scss.js +8 -0
- package/esm/DotsLoader/index.js +39 -17
- package/esm/Dropdown/Dropdown.module.scss.js +8 -0
- package/esm/Dropdown/index.d.ts +2 -2
- package/esm/Dropdown/index.js +23 -31
- package/esm/Dropdown/index.props.d.ts +2 -2
- package/esm/Grid/Grid.module.scss.js +8 -0
- package/esm/Grid/Item/Grid-Item.module.scss.js +8 -0
- package/esm/Grid/Item/index.js +10 -10
- package/esm/Grid/index.js +13 -11
- package/esm/Icons/Cart.d.ts +2 -2
- package/esm/Icons/Cart.js +4 -7
- package/esm/Icons/Chevron.d.ts +2 -2
- package/esm/Icons/Chevron.js +8 -10
- package/esm/Icons/Close.d.ts +2 -2
- package/esm/Icons/Close.js +10 -12
- package/esm/Icons/EyeClosed.d.ts +2 -2
- package/esm/Icons/EyeClosed.js +5 -7
- package/esm/Icons/EyeOpen.d.ts +2 -2
- package/esm/Icons/EyeOpen.js +12 -14
- package/esm/Icons/Help.d.ts +2 -2
- package/esm/Icons/Help.js +8 -10
- package/esm/Icons/Info.d.ts +2 -2
- package/esm/Icons/Info.js +6 -8
- package/esm/Icons/Minus.d.ts +2 -2
- package/esm/Icons/Minus.js +6 -9
- package/esm/Icons/More.d.ts +2 -2
- package/esm/Icons/More.js +15 -17
- package/esm/Icons/Plus.d.ts +2 -2
- package/esm/Icons/Plus.js +11 -14
- package/esm/Icons/Trash.d.ts +2 -2
- package/esm/Icons/Trash.js +8 -10
- package/esm/Icons/User.d.ts +2 -2
- package/esm/Icons/User.js +13 -15
- package/esm/Image/Image.module.scss.js +8 -0
- package/esm/Image/index.d.ts +2 -2
- package/esm/Image/index.js +23 -23
- package/esm/Input/index.d.ts +2 -2
- package/esm/Input/index.js +18 -25
- package/esm/Input/index.props.d.ts +3 -3
- package/esm/Menu/Menu.module.scss.js +8 -0
- package/esm/Menu/components/MenuItem/MenuItem.module.scss.js +8 -0
- package/esm/Menu/components/MenuItem/index.js +19 -14
- package/esm/Menu/components/MenuItem/index.props.d.ts +1 -14
- package/esm/Menu/index.js +6 -7
- package/esm/Menu/index.props.d.ts +3 -21
- package/esm/Modal/Modal.module.scss.js +8 -0
- package/esm/Modal/components/Close/Close.module.scss.js +8 -0
- package/esm/Modal/components/Close/index.js +7 -3
- package/esm/Modal/components/Content/Content.module.scss.js +8 -0
- package/esm/Modal/components/Content/index.js +6 -5
- package/esm/Modal/components/Title/Title.module.scss.js +8 -0
- package/esm/Modal/components/Title/index.d.ts +0 -2
- package/esm/Modal/components/Title/index.js +10 -12
- package/esm/Modal/index.js +28 -26
- package/esm/Select/Select.module.scss.js +8 -0
- package/esm/Select/index.d.ts +2 -1
- package/esm/Select/index.js +49 -44
- package/esm/Separator/Separator.module.scss.js +8 -0
- package/esm/Separator/index.d.ts +6 -0
- package/esm/Separator/index.js +12 -0
- package/esm/Skeleton/Skeleton.module.scss.js +8 -0
- package/esm/Skeleton/index.js +7 -6
- package/esm/Switch/Switch.module.scss.js +8 -0
- package/esm/Switch/index.d.ts +2 -2
- package/esm/Switch/index.js +25 -14
- package/esm/Switch/index.props.d.ts +2 -15
- package/esm/Theme/index.d.ts +83 -234
- package/esm/Theme/index.js +3 -15
- package/esm/Theme/themes/buenos_aires.d.ts +9 -185
- package/esm/Theme/themes/buenos_aires.js +7 -222
- package/esm/Theme/themes/default.d.ts +79 -184
- package/esm/Theme/themes/default.js +78 -220
- package/esm/Typography/Typography.module.scss.js +8 -0
- package/esm/Typography/index.d.ts +2 -2
- package/esm/Typography/index.js +15 -29
- package/esm/Typography/index.props.d.ts +3 -12
- package/esm/base/BaseInput/BaseInput.module.scss.js +8 -0
- package/esm/base/BaseInput/index.d.ts +4 -0
- package/esm/base/BaseInput/index.js +21 -0
- package/esm/base/BaseInput/index.props.d.ts +4 -0
- package/esm/base/FormField/FormField.module.scss.js +8 -0
- package/esm/base/FormField/index.d.ts +2 -2
- package/esm/base/FormField/index.js +12 -15
- package/esm/base/InputRoot/InputRoot.module.scss.js +8 -0
- package/esm/base/InputRoot/index.d.ts +2 -2
- package/esm/base/InputRoot/index.js +16 -17
- package/esm/base/InputRoot/index.props.d.ts +5 -33
- package/esm/hooks/useMediaSizes/index.d.ts +1 -1
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -1
- package/esm/node_modules/style-inject/dist/style-inject.es.js +26 -0
- package/hooks/useMediaSizes/index.d.ts +1 -1
- package/index.d.ts +2 -1
- package/index.js +13 -12
- package/package.json +3 -51
- package/Badge/Control/styles.d.ts +0 -5
- package/Badge/Control/styles.js +0 -18
- package/Badge/styles.d.ts +0 -8
- package/Badge/styles.js +0 -31
- package/Button/styles.d.ts +0 -16
- package/Button/styles.js +0 -61
- package/Checkbox/styles.d.ts +0 -32
- package/Checkbox/styles.js +0 -75
- package/Counter/styles.d.ts +0 -17
- package/Counter/styles.js +0 -42
- package/DotsLoader/styles.d.ts +0 -15
- package/DotsLoader/styles.js +0 -41
- package/Dropdown/styles.d.ts +0 -9
- package/Dropdown/styles.js +0 -29
- package/Grid/Item/styles.d.ts +0 -7
- package/Grid/Item/styles.js +0 -21
- package/Grid/styles.d.ts +0 -13
- package/Grid/styles.js +0 -34
- package/Image/styles.d.ts +0 -5
- package/Image/styles.js +0 -18
- package/Menu/components/MenuItem/styles.d.ts +0 -10
- package/Menu/components/MenuItem/styles.js +0 -31
- package/Menu/styles.d.ts +0 -5
- package/Menu/styles.js +0 -24
- package/Modal/components/Close/styles.d.ts +0 -4
- package/Modal/components/Close/styles.js +0 -20
- package/Modal/components/Content/styles.d.ts +0 -5
- package/Modal/components/Content/styles.js +0 -18
- package/Modal/components/Title/styles.d.ts +0 -8
- package/Modal/components/Title/styles.js +0 -27
- package/Modal/styles.d.ts +0 -21
- package/Modal/styles.js +0 -61
- package/Select/styles.d.ts +0 -20
- package/Select/styles.js +0 -57
- package/Skeleton/styles.d.ts +0 -9
- package/Skeleton/styles.js +0 -31
- package/Switch/styles.d.ts +0 -19
- package/Switch/styles.js +0 -58
- package/Theme/global.d.ts +0 -2
- package/Theme/global.js +0 -14
- package/Theme/index.props.d.ts +0 -18
- package/Typography/styles.d.ts +0 -10
- package/Typography/styles.js +0 -78
- package/base/FormField/styles.d.ts +0 -5
- package/base/FormField/styles.js +0 -18
- package/base/InputRoot/styles.d.ts +0 -27
- package/base/InputRoot/styles.js +0 -82
- package/esm/Badge/Control/styles.d.ts +0 -5
- package/esm/Badge/Control/styles.js +0 -12
- package/esm/Badge/styles.d.ts +0 -8
- package/esm/Badge/styles.js +0 -25
- package/esm/Button/styles.d.ts +0 -16
- package/esm/Button/styles.js +0 -54
- package/esm/Checkbox/styles.d.ts +0 -32
- package/esm/Checkbox/styles.js +0 -64
- package/esm/Counter/styles.d.ts +0 -17
- package/esm/Counter/styles.js +0 -34
- package/esm/DotsLoader/styles.d.ts +0 -15
- package/esm/DotsLoader/styles.js +0 -34
- package/esm/Dropdown/styles.d.ts +0 -9
- package/esm/Dropdown/styles.js +0 -22
- package/esm/Grid/Item/styles.d.ts +0 -7
- package/esm/Grid/Item/styles.js +0 -15
- package/esm/Grid/styles.d.ts +0 -13
- package/esm/Grid/styles.js +0 -27
- package/esm/Image/styles.d.ts +0 -5
- package/esm/Image/styles.js +0 -12
- package/esm/Menu/components/MenuItem/styles.d.ts +0 -10
- package/esm/Menu/components/MenuItem/styles.js +0 -25
- package/esm/Menu/styles.d.ts +0 -5
- package/esm/Menu/styles.js +0 -18
- package/esm/Modal/components/Close/styles.d.ts +0 -4
- package/esm/Modal/components/Close/styles.js +0 -14
- package/esm/Modal/components/Content/styles.d.ts +0 -5
- package/esm/Modal/components/Content/styles.js +0 -12
- package/esm/Modal/components/Title/styles.d.ts +0 -8
- package/esm/Modal/components/Title/styles.js +0 -21
- package/esm/Modal/styles.d.ts +0 -21
- package/esm/Modal/styles.js +0 -51
- package/esm/Select/styles.d.ts +0 -20
- package/esm/Select/styles.js +0 -48
- package/esm/Skeleton/styles.d.ts +0 -9
- package/esm/Skeleton/styles.js +0 -24
- package/esm/Switch/styles.d.ts +0 -19
- package/esm/Switch/styles.js +0 -49
- package/esm/Theme/global.d.ts +0 -2
- package/esm/Theme/global.js +0 -10
- package/esm/Theme/index.props.d.ts +0 -18
- package/esm/Typography/styles.d.ts +0 -10
- package/esm/Typography/styles.js +0 -72
- package/esm/base/FormField/styles.d.ts +0 -5
- package/esm/base/FormField/styles.js +0 -12
- package/esm/base/InputRoot/styles.d.ts +0 -27
- package/esm/base/InputRoot/styles.js +0 -72
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styleInject_es = require('../node_modules/style-inject/dist/style-inject.es.js');
|
|
6
|
+
|
|
7
|
+
var css_248z = ".Badge-module_root__KSuIQ {\n position: absolute;\n z-index: 1;\n user-select: none;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: center;\n align-content: center;\n align-items: center;\n box-sizing: border-box;\n min-width: 20px;\n height: 20px;\n padding: 0 4px;\n font-size: 12px;\n border-radius: 10px;\n background-color: var(--palette-brand-default-1);\n color: var(--palette-white);\n}\n.Badge-module_root_direction_right__xv2eq {\n top: 0;\n right: 0;\n transform: scale(1) translate(60%, -50%);\n}\n.Badge-module_root_direction_left__EejAl {\n top: 0;\n left: 0;\n transform: scale(1) translate(-60%, -50%);\n}\n.Badge-module_root_invisible__A59Wf {\n transform: scale(0) translate(50%, -50%);\n}";
|
|
8
|
+
var styles = {"root":"Badge-module_root__KSuIQ","root_direction_right":"Badge-module_root_direction_right__xv2eq","root_direction_left":"Badge-module_root_direction_left__EejAl","root_invisible":"Badge-module_root_invisible__A59Wf"};
|
|
9
|
+
var stylesheet=".Badge-module_root__KSuIQ {\n position: absolute;\n z-index: 1;\n user-select: none;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: center;\n align-content: center;\n align-items: center;\n box-sizing: border-box;\n min-width: 20px;\n height: 20px;\n padding: 0 4px;\n font-size: 12px;\n border-radius: 10px;\n background-color: var(--palette-brand-default-1);\n color: var(--palette-white);\n}\n.Badge-module_root_direction_right__xv2eq {\n top: 0;\n right: 0;\n transform: scale(1) translate(60%, -50%);\n}\n.Badge-module_root_direction_left__EejAl {\n top: 0;\n left: 0;\n transform: scale(1) translate(-60%, -50%);\n}\n.Badge-module_root_invisible__A59Wf {\n transform: scale(0) translate(50%, -50%);\n}";
|
|
10
|
+
styleInject_es.default(css_248z);
|
|
11
|
+
|
|
12
|
+
exports.default = styles;
|
|
13
|
+
exports.stylesheet = stylesheet;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styleInject_es = require('../../node_modules/style-inject/dist/style-inject.es.js');
|
|
6
|
+
|
|
7
|
+
var css_248z = ".Control-module_root__wUlkm {\n position: relative;\n display: inline-flex;\n flex-shrink: 0;\n vertical-align: middle;\n}";
|
|
8
|
+
var styles = {"root":"Control-module_root__wUlkm"};
|
|
9
|
+
var stylesheet=".Control-module_root__wUlkm {\n position: relative;\n display: inline-flex;\n flex-shrink: 0;\n vertical-align: middle;\n}";
|
|
10
|
+
styleInject_es.default(css_248z);
|
|
11
|
+
|
|
12
|
+
exports.default = styles;
|
|
13
|
+
exports.stylesheet = stylesheet;
|
package/Badge/Control/index.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var classNames = require('classnames');
|
|
6
|
+
var Control_module = require('./Control.module.scss.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
6
12
|
|
|
7
13
|
var BadgeControl = function BadgeControl(_a) {
|
|
8
14
|
var className = _a.className,
|
|
9
15
|
children = _a.children,
|
|
10
16
|
props = tslib.__rest(_a, ["className", "children"]);
|
|
11
|
-
return
|
|
12
|
-
className: className
|
|
13
|
-
}, props,
|
|
14
|
-
children: children
|
|
15
|
-
}));
|
|
17
|
+
return /*#__PURE__*/React__default.default.createElement("span", tslib.__assign({
|
|
18
|
+
className: classNames__default.default(Control_module.default.root, className)
|
|
19
|
+
}, props), children);
|
|
16
20
|
};
|
|
17
21
|
|
|
18
22
|
exports.BadgeControl = BadgeControl;
|
package/Badge/index.js
CHANGED
|
@@ -3,22 +3,30 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
|
-
var
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var classNames = require('classnames/bind');
|
|
7
8
|
var index = require('./Control/index.js');
|
|
8
|
-
var
|
|
9
|
+
var Badge_module = require('./Badge.module.scss.js');
|
|
9
10
|
|
|
11
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
14
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
15
|
+
|
|
16
|
+
var clx = classNames__default.default.bind(Badge_module.default);
|
|
10
17
|
var Badge = function Badge(_a) {
|
|
18
|
+
var _b;
|
|
11
19
|
var className = _a.className,
|
|
12
20
|
content = _a.content,
|
|
13
21
|
children = _a.children,
|
|
14
22
|
invisibleProp = _a.invisible,
|
|
15
|
-
|
|
16
|
-
max =
|
|
17
|
-
|
|
18
|
-
showZero =
|
|
23
|
+
_c = _a.max,
|
|
24
|
+
max = _c === void 0 ? 99 : _c,
|
|
25
|
+
_d = _a.showZero,
|
|
26
|
+
showZero = _d === void 0 ? false : _d,
|
|
19
27
|
color = _a.color,
|
|
20
|
-
|
|
21
|
-
direction =
|
|
28
|
+
_e = _a.direction,
|
|
29
|
+
direction = _e === void 0 ? "right" : _e,
|
|
22
30
|
background = _a.background,
|
|
23
31
|
props = tslib.__rest(_a, ["className", "content", "children", "invisible", "max", "showZero", "color", "direction", "background"]);
|
|
24
32
|
var invisible = invisibleProp;
|
|
@@ -29,18 +37,16 @@ var Badge = function Badge(_a) {
|
|
|
29
37
|
if (content) {
|
|
30
38
|
displayValue = content > max ? "".concat(max, "+") : content;
|
|
31
39
|
}
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})]
|
|
43
|
-
}));
|
|
40
|
+
return /*#__PURE__*/React__default.default.createElement(index.BadgeControl, tslib.__assign({}, props), children, /*#__PURE__*/React__default.default.createElement("span", {
|
|
41
|
+
style: {
|
|
42
|
+
color: color,
|
|
43
|
+
backgroundColor: background
|
|
44
|
+
},
|
|
45
|
+
className: clx((_b = {
|
|
46
|
+
root: true
|
|
47
|
+
}, _b["root_direction_".concat(direction)] = !!direction, _b.root_invisible = invisible, _b), className),
|
|
48
|
+
"data-cy": "badge"
|
|
49
|
+
}, displayValue));
|
|
44
50
|
};
|
|
45
51
|
|
|
46
52
|
exports.default = Badge;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styleInject_es = require('../node_modules/style-inject/dist/style-inject.es.js');
|
|
6
|
+
|
|
7
|
+
var css_248z = ".Button-module_root__8RX49 {\n color: var(--palette-black);\n padding: 0 12px;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n gap: 8px;\n flex-shrink: 0;\n border: 1px solid;\n font-style: normal;\n font-weight: 400;\n height: 36px;\n font-size: 15px;\n line-height: 36px;\n transition: transform 0.1s ease-out;\n color: 0.15s linear;\n transform: scale(1);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n width: fit-content;\n border-radius: var(--button-border-radius);\n}\n.Button-module_root_icon__KAJGT {\n border-radius: 50%;\n width: 36px;\n}\n.Button-module_root_icon__KAJGT.Button-module_size_xs__iIFbj {\n width: 29px;\n}\n.Button-module_root_icon__KAJGT.Button-module_size_s__7A-Lo {\n width: 32px;\n}\n.Button-module_root_icon__KAJGT.Button-module_size_m__HuaqX {\n width: 36px;\n}\n.Button-module_root_icon__KAJGT.Button-module_size_l__2g-SP {\n width: 42px;\n}\n.Button-module_root_fullWidth__tPJ0T {\n width: 100%;\n}\n.Button-module_root_disabled__BFDIZ {\n cursor: not-allowed;\n pointer-events: none;\n color: var(--button-primary-color-disabled);\n background-color: var(--button-primary-background-color-disabled);\n border-color: var(--button-primary-border-color-disabled);\n}\n\n.Button-module_icon__xIuVv {\n display: flex;\n}\n\n.Button-module_size_xs__iIFbj {\n height: 29px;\n font-size: 12px;\n line-height: 29px;\n}\n.Button-module_size_s__7A-Lo {\n height: 32px;\n font-size: 13px;\n line-height: 32px;\n}\n.Button-module_size_m__HuaqX {\n height: 36px;\n font-size: 15px;\n line-height: 36px;\n}\n.Button-module_size_l__2g-SP {\n height: 42px;\n font-size: 18px;\n line-height: 42px;\n}\n\n.Button-module_variant_primary__pHnPB {\n color: var(--button-primary-color);\n background-color: var(--button-primary-background-color);\n border-color: var(--button-primary-border-color);\n}\n.Button-module_variant_primary__pHnPB:hover {\n color: var(--button-primary-color-hovered);\n background-color: var(--button-primary-background-color-hovered);\n border-color: var(--button-primary-border-color-hovered);\n}\n.Button-module_variant_primary__pHnPB:active {\n color: var(--button-primary-color-active);\n background-color: var(--button-primary-background-color-active);\n border-color: var(--button-primary-border-color-active);\n}\n.Button-module_variant_secondary__6Ude- {\n color: var(--button-secondary-color);\n background-color: var(--button-secondary-background-color);\n border-color: var(--button-secondary-border-color);\n}\n.Button-module_variant_secondary__6Ude-:hover {\n color: var(--button-secondary-color-hovered);\n background-color: var(--button-secondary-background-color-hovered);\n border-color: var(--button-secondary-border-color-hovered);\n}\n.Button-module_variant_secondary__6Ude-:active {\n color: var(--button-secondary-color-active);\n background-color: var(--button-secondary-background-color-active);\n border-color: var(--button-secondary-border-color-active);\n}\n.Button-module_variant_pseudo__yM1xM {\n color: var(--button-pseudo-color);\n background-color: var(--button-pseudo-background-color);\n border-color: var(--button-pseudo-border-color);\n}\n.Button-module_variant_pseudo__yM1xM:hover {\n color: var(--button-pseudo-color-hovered);\n background-color: var(--button-pseudo-background-color-hovered);\n border-color: var(--button-pseudo-border-color-hovered);\n}\n.Button-module_variant_pseudo__yM1xM:active {\n color: var(--button-pseudo-color-active);\n background-color: var(--button-pseudo-background-color-active);\n border-color: var(--button-pseudo-border-color-active);\n}\n.Button-module_variant_clear__WSMoZ {\n color: var(--button-clear-color);\n background-color: transparent;\n border-color: transparent;\n}\n.Button-module_variant_clear__WSMoZ:hover {\n color: var(--button-clear-color-hovered);\n}\n.Button-module_variant_clear__WSMoZ:active {\n color: var(--button-clear-color-active);\n}";
|
|
8
|
+
var styles = {"root":"Button-module_root__8RX49","root_icon":"Button-module_root_icon__KAJGT","size_xs":"Button-module_size_xs__iIFbj","size_s":"Button-module_size_s__7A-Lo","size_m":"Button-module_size_m__HuaqX","size_l":"Button-module_size_l__2g-SP","root_fullWidth":"Button-module_root_fullWidth__tPJ0T","root_disabled":"Button-module_root_disabled__BFDIZ","icon":"Button-module_icon__xIuVv","variant_primary":"Button-module_variant_primary__pHnPB","variant_secondary":"Button-module_variant_secondary__6Ude-","variant_pseudo":"Button-module_variant_pseudo__yM1xM","variant_clear":"Button-module_variant_clear__WSMoZ"};
|
|
9
|
+
var stylesheet=".Button-module_root__8RX49 {\n color: var(--palette-black);\n padding: 0 12px;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n gap: 8px;\n flex-shrink: 0;\n border: 1px solid;\n font-style: normal;\n font-weight: 400;\n height: 36px;\n font-size: 15px;\n line-height: 36px;\n transition: transform 0.1s ease-out;\n color: 0.15s linear;\n transform: scale(1);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n width: fit-content;\n border-radius: var(--button-border-radius);\n}\n.Button-module_root_icon__KAJGT {\n border-radius: 50%;\n width: 36px;\n}\n.Button-module_root_icon__KAJGT.Button-module_size_xs__iIFbj {\n width: 29px;\n}\n.Button-module_root_icon__KAJGT.Button-module_size_s__7A-Lo {\n width: 32px;\n}\n.Button-module_root_icon__KAJGT.Button-module_size_m__HuaqX {\n width: 36px;\n}\n.Button-module_root_icon__KAJGT.Button-module_size_l__2g-SP {\n width: 42px;\n}\n.Button-module_root_fullWidth__tPJ0T {\n width: 100%;\n}\n.Button-module_root_disabled__BFDIZ {\n cursor: not-allowed;\n pointer-events: none;\n color: var(--button-primary-color-disabled);\n background-color: var(--button-primary-background-color-disabled);\n border-color: var(--button-primary-border-color-disabled);\n}\n\n.Button-module_icon__xIuVv {\n display: flex;\n}\n\n.Button-module_size_xs__iIFbj {\n height: 29px;\n font-size: 12px;\n line-height: 29px;\n}\n.Button-module_size_s__7A-Lo {\n height: 32px;\n font-size: 13px;\n line-height: 32px;\n}\n.Button-module_size_m__HuaqX {\n height: 36px;\n font-size: 15px;\n line-height: 36px;\n}\n.Button-module_size_l__2g-SP {\n height: 42px;\n font-size: 18px;\n line-height: 42px;\n}\n\n.Button-module_variant_primary__pHnPB {\n color: var(--button-primary-color);\n background-color: var(--button-primary-background-color);\n border-color: var(--button-primary-border-color);\n}\n.Button-module_variant_primary__pHnPB:hover {\n color: var(--button-primary-color-hovered);\n background-color: var(--button-primary-background-color-hovered);\n border-color: var(--button-primary-border-color-hovered);\n}\n.Button-module_variant_primary__pHnPB:active {\n color: var(--button-primary-color-active);\n background-color: var(--button-primary-background-color-active);\n border-color: var(--button-primary-border-color-active);\n}\n.Button-module_variant_secondary__6Ude- {\n color: var(--button-secondary-color);\n background-color: var(--button-secondary-background-color);\n border-color: var(--button-secondary-border-color);\n}\n.Button-module_variant_secondary__6Ude-:hover {\n color: var(--button-secondary-color-hovered);\n background-color: var(--button-secondary-background-color-hovered);\n border-color: var(--button-secondary-border-color-hovered);\n}\n.Button-module_variant_secondary__6Ude-:active {\n color: var(--button-secondary-color-active);\n background-color: var(--button-secondary-background-color-active);\n border-color: var(--button-secondary-border-color-active);\n}\n.Button-module_variant_pseudo__yM1xM {\n color: var(--button-pseudo-color);\n background-color: var(--button-pseudo-background-color);\n border-color: var(--button-pseudo-border-color);\n}\n.Button-module_variant_pseudo__yM1xM:hover {\n color: var(--button-pseudo-color-hovered);\n background-color: var(--button-pseudo-background-color-hovered);\n border-color: var(--button-pseudo-border-color-hovered);\n}\n.Button-module_variant_pseudo__yM1xM:active {\n color: var(--button-pseudo-color-active);\n background-color: var(--button-pseudo-background-color-active);\n border-color: var(--button-pseudo-border-color-active);\n}\n.Button-module_variant_clear__WSMoZ {\n color: var(--button-clear-color);\n background-color: transparent;\n border-color: transparent;\n}\n.Button-module_variant_clear__WSMoZ:hover {\n color: var(--button-clear-color-hovered);\n}\n.Button-module_variant_clear__WSMoZ:active {\n color: var(--button-clear-color-active);\n}";
|
|
10
|
+
styleInject_es.default(css_248z);
|
|
11
|
+
|
|
12
|
+
exports.default = styles;
|
|
13
|
+
exports.stylesheet = stylesheet;
|
package/Button/index.js
CHANGED
|
@@ -3,16 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
|
-
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
7
6
|
var React = require('react');
|
|
8
|
-
var
|
|
7
|
+
var classNames = require('classnames/bind');
|
|
8
|
+
var Button_module = require('./Button.module.scss.js');
|
|
9
9
|
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
14
|
+
|
|
15
|
+
var clx = classNames__default.default.bind(Button_module.default);
|
|
10
16
|
var Button = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
17
|
+
var _b;
|
|
11
18
|
var className = _a.className,
|
|
12
|
-
|
|
13
|
-
fullWidth =
|
|
14
|
-
_c = _a.scale,
|
|
15
|
-
scale = _c === void 0 ? false : _c,
|
|
19
|
+
_c = _a.fullWidth,
|
|
20
|
+
fullWidth = _c === void 0 ? false : _c,
|
|
16
21
|
_d = _a.variant,
|
|
17
22
|
variant = _d === void 0 ? "primary" : _d,
|
|
18
23
|
iconStart = _a.iconStart,
|
|
@@ -20,27 +25,26 @@ var Button = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
20
25
|
icon = _a.icon,
|
|
21
26
|
size = _a.size,
|
|
22
27
|
children = _a.children,
|
|
28
|
+
disabled = _a.disabled,
|
|
23
29
|
onClick = _a.onClick,
|
|
24
|
-
props = tslib.__rest(_a, ["className", "fullWidth", "
|
|
25
|
-
return
|
|
30
|
+
props = tslib.__rest(_a, ["className", "fullWidth", "variant", "iconStart", "iconEnd", "icon", "size", "children", "disabled", "onClick"]);
|
|
31
|
+
return /*#__PURE__*/React__default.default.createElement("button", tslib.__assign({
|
|
26
32
|
onClick: onClick,
|
|
27
33
|
ref: ref,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
className: clx(Button_module.default.root, (_b = {
|
|
35
|
+
root_icon: !!icon,
|
|
36
|
+
root_disabled: disabled ? 1 : 0,
|
|
37
|
+
root_fullWidth: fullWidth ? 1 : 0
|
|
38
|
+
}, _b["size_".concat(size)] = !!size, _b["variant_".concat(variant)] = !!variant, _b), className),
|
|
39
|
+
disabled: disabled,
|
|
34
40
|
"data-cy": "button"
|
|
35
|
-
}, props, {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})]
|
|
43
|
-
}));
|
|
41
|
+
}, props), icon && /*#__PURE__*/React__default.default.createElement("span", {
|
|
42
|
+
className: clx(Button_module.default.icon)
|
|
43
|
+
}, icon), iconStart && /*#__PURE__*/React__default.default.createElement("span", {
|
|
44
|
+
className: clx(Button_module.default.icon)
|
|
45
|
+
}, iconStart), children && children, iconEnd && /*#__PURE__*/React__default.default.createElement("span", {
|
|
46
|
+
className: clx(Button_module.default.icon)
|
|
47
|
+
}, iconEnd));
|
|
44
48
|
});
|
|
45
49
|
|
|
46
50
|
exports.default = Button;
|
package/Button/index.props.d.ts
CHANGED
|
@@ -1,43 +1,12 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
type BaseStyles = {
|
|
4
|
-
color?: CSSObject["color"];
|
|
5
|
-
borderRadius: CSSObject["borderRadius"];
|
|
6
|
-
border?: CSSObject["border"];
|
|
7
|
-
};
|
|
8
|
-
type VariantStyles = {
|
|
9
|
-
color?: CSSObject["color"];
|
|
10
|
-
backgroundColor?: CSSObject["backgroundColor"];
|
|
11
|
-
borderColor?: CSSObject["borderColor"];
|
|
12
|
-
boxShadow?: CSSObject["boxShadow"];
|
|
13
|
-
borderWidth?: CSSObject["borderWidth"];
|
|
14
|
-
borderRadius?: CSSObject["borderRadius"];
|
|
15
|
-
border?: CSSObject["border"];
|
|
16
|
-
};
|
|
17
|
-
type VariantStates = {
|
|
18
|
-
normal?: VariantStyles;
|
|
19
|
-
hovered?: VariantStyles;
|
|
20
|
-
focused?: VariantStyles;
|
|
21
|
-
active?: VariantStyles;
|
|
22
|
-
disabled?: VariantStyles;
|
|
23
|
-
};
|
|
24
|
-
export type ButtonBase = {
|
|
25
|
-
base: BaseStyles;
|
|
26
|
-
};
|
|
27
|
-
export type ButtonVariant = {
|
|
28
|
-
primary: VariantStates;
|
|
29
|
-
secondary: VariantStates;
|
|
30
|
-
pseudo: VariantStates;
|
|
31
|
-
clear: VariantStates;
|
|
32
|
-
};
|
|
2
|
+
export type ButtonVariant = "primary" | "secondary" | "pseudo" | "clear";
|
|
33
3
|
export type ButtonSize = "xs" | "s" | "m" | "l";
|
|
34
4
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
35
|
-
variant?:
|
|
5
|
+
variant?: ButtonVariant;
|
|
36
6
|
fullWidth?: boolean;
|
|
37
7
|
icon?: ReactNode;
|
|
38
8
|
iconStart?: ReactNode;
|
|
39
9
|
iconEnd?: ReactNode;
|
|
40
10
|
size?: ButtonSize;
|
|
41
|
-
|
|
11
|
+
disabled?: boolean;
|
|
42
12
|
}
|
|
43
|
-
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styleInject_es = require('../node_modules/style-inject/dist/style-inject.es.js');
|
|
6
|
+
|
|
7
|
+
var css_248z = ".Checkbox-module_root__BS5dT {\n display: flex;\n flex-direction: column;\n}\n\n.Checkbox-module_wrapper__rznMS {\n display: flex;\n}\n\n.Checkbox-module_label__JBaRm {\n display: inline-flex;\n line-height: 18px;\n position: relative;\n cursor: pointer;\n}\n\n.Checkbox-module_text__usAwV {\n font-size: 16px;\n margin-block-start: -1px;\n margin-inline-start: 8px;\n}\n\n.Checkbox-module_fakeCheckbox__mMV2U {\n background-color: var(--palette-white);\n block-size: 16px;\n border: 1px solid var(--palette-bg-3);\n border-radius: 4px;\n box-sizing: border-box;\n direction: ltr;\n display: block;\n flex-shrink: 0;\n inline-size: 16px;\n position: relative;\n transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;\n}\n\n.Checkbox-module_checked__XfvkJ {\n border: 0;\n background-color: var(--checkbox-primary-background-color-checked);\n}\n.Checkbox-module_checked__XfvkJ::after {\n box-sizing: content-box;\n content: \"\";\n display: block;\n position: absolute;\n block-size: 8px;\n border-block-end: 2px solid var(--palette-black);\n border-inline-end: 2px solid var(--palette-black);\n inline-size: 4px;\n inset-block-start: 45%;\n inset-inline-start: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.Checkbox-module_variant_primary_error__jenG7 {\n border-color: red;\n box-shadow: 0 0 0 2px red;\n}\n.Checkbox-module_variant_primary_checked__Aoq0H::after {\n border-block-end: 2px solid var(--palette-white);\n border-inline-end: 2px solid var(--palette-white);\n}\n\n.Checkbox-module_control__QFHjF {\n inset-inline-start: -9999px;\n position: absolute;\n}\n.Checkbox-module_control__QFHjF:disabled + .Checkbox-module_fakeCheckbox__mMV2U::after {\n border-block-end: 2px solid var(--palette-bg-4);\n border-inline-end: 2px solid var(--palette-bg-4);\n}\n.Checkbox-module_control__QFHjF:hover:not(:disabled) + .Checkbox-module_fakeCheckbox__mMV2U {\n border-color: var(--palette-bg-3);\n}\n.Checkbox-module_control_variant_primary__v-gEp:focus:not(:disabled) + .Checkbox-module_fakeCheckbox__mMV2U {\n box-shadow: 0 0 0 2px var(--checkbox-primary-box-shadow-focused);\n}\n.Checkbox-module_control_variant_primary__v-gEp:hover:not(:disabled) + .Checkbox-module_fakeCheckbox__mMV2U {\n background-color: var(--checkbox-primary-background-color-hovered);\n}\n.Checkbox-module_control_variant_primary__v-gEp:active:not(:disabled) + .Checkbox-module_fakeCheckbox__mMV2U {\n background-color: var(--checkbox-primary-background-color-active);\n border-color: var(--checkbox-primary-border-color-active);\n box-shadow: var(--checkbox-primary-box-shadow-active);\n}\n.Checkbox-module_control_variant_primary__v-gEp:disabled + .Checkbox-module_fakeCheckbox__mMV2U {\n z-index: 1;\n background-color: var(--checkbox-primary-background-color-disabled);\n}";
|
|
8
|
+
var styles = {"root":"Checkbox-module_root__BS5dT","wrapper":"Checkbox-module_wrapper__rznMS","label":"Checkbox-module_label__JBaRm","text":"Checkbox-module_text__usAwV","fakeCheckbox":"Checkbox-module_fakeCheckbox__mMV2U","checked":"Checkbox-module_checked__XfvkJ","variant_primary_error":"Checkbox-module_variant_primary_error__jenG7","variant_primary_checked":"Checkbox-module_variant_primary_checked__Aoq0H","control":"Checkbox-module_control__QFHjF","control_variant_primary":"Checkbox-module_control_variant_primary__v-gEp"};
|
|
9
|
+
var stylesheet=".Checkbox-module_root__BS5dT {\n display: flex;\n flex-direction: column;\n}\n\n.Checkbox-module_wrapper__rznMS {\n display: flex;\n}\n\n.Checkbox-module_label__JBaRm {\n display: inline-flex;\n line-height: 18px;\n position: relative;\n cursor: pointer;\n}\n\n.Checkbox-module_text__usAwV {\n font-size: 16px;\n margin-block-start: -1px;\n margin-inline-start: 8px;\n}\n\n.Checkbox-module_fakeCheckbox__mMV2U {\n background-color: var(--palette-white);\n block-size: 16px;\n border: 1px solid var(--palette-bg-3);\n border-radius: 4px;\n box-sizing: border-box;\n direction: ltr;\n display: block;\n flex-shrink: 0;\n inline-size: 16px;\n position: relative;\n transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;\n}\n\n.Checkbox-module_checked__XfvkJ {\n border: 0;\n background-color: var(--checkbox-primary-background-color-checked);\n}\n.Checkbox-module_checked__XfvkJ::after {\n box-sizing: content-box;\n content: \"\";\n display: block;\n position: absolute;\n block-size: 8px;\n border-block-end: 2px solid var(--palette-black);\n border-inline-end: 2px solid var(--palette-black);\n inline-size: 4px;\n inset-block-start: 45%;\n inset-inline-start: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.Checkbox-module_variant_primary_error__jenG7 {\n border-color: red;\n box-shadow: 0 0 0 2px red;\n}\n.Checkbox-module_variant_primary_checked__Aoq0H::after {\n border-block-end: 2px solid var(--palette-white);\n border-inline-end: 2px solid var(--palette-white);\n}\n\n.Checkbox-module_control__QFHjF {\n inset-inline-start: -9999px;\n position: absolute;\n}\n.Checkbox-module_control__QFHjF:disabled + .Checkbox-module_fakeCheckbox__mMV2U::after {\n border-block-end: 2px solid var(--palette-bg-4);\n border-inline-end: 2px solid var(--palette-bg-4);\n}\n.Checkbox-module_control__QFHjF:hover:not(:disabled) + .Checkbox-module_fakeCheckbox__mMV2U {\n border-color: var(--palette-bg-3);\n}\n.Checkbox-module_control_variant_primary__v-gEp:focus:not(:disabled) + .Checkbox-module_fakeCheckbox__mMV2U {\n box-shadow: 0 0 0 2px var(--checkbox-primary-box-shadow-focused);\n}\n.Checkbox-module_control_variant_primary__v-gEp:hover:not(:disabled) + .Checkbox-module_fakeCheckbox__mMV2U {\n background-color: var(--checkbox-primary-background-color-hovered);\n}\n.Checkbox-module_control_variant_primary__v-gEp:active:not(:disabled) + .Checkbox-module_fakeCheckbox__mMV2U {\n background-color: var(--checkbox-primary-background-color-active);\n border-color: var(--checkbox-primary-border-color-active);\n box-shadow: var(--checkbox-primary-box-shadow-active);\n}\n.Checkbox-module_control_variant_primary__v-gEp:disabled + .Checkbox-module_fakeCheckbox__mMV2U {\n z-index: 1;\n background-color: var(--checkbox-primary-background-color-disabled);\n}";
|
|
10
|
+
styleInject_es.default(css_248z);
|
|
11
|
+
|
|
12
|
+
exports.default = styles;
|
|
13
|
+
exports.stylesheet = stylesheet;
|
package/Checkbox/index.js
CHANGED
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var classNames = require('classnames/bind');
|
|
6
7
|
var index = require('../Typography/index.js');
|
|
7
|
-
var
|
|
8
|
+
var Checkbox_module = require('./Checkbox.module.scss.js');
|
|
8
9
|
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
14
|
+
|
|
15
|
+
var clx = classNames__default.default.bind(Checkbox_module.default);
|
|
9
16
|
var Checkbox = function Checkbox(_a) {
|
|
17
|
+
var _b, _c;
|
|
10
18
|
var id = _a.id,
|
|
11
19
|
name = _a.name,
|
|
12
20
|
value = _a.value,
|
|
@@ -16,41 +24,37 @@ var Checkbox = function Checkbox(_a) {
|
|
|
16
24
|
onChange = _a.onChange,
|
|
17
25
|
onFocus = _a.onFocus,
|
|
18
26
|
onBlur = _a.onBlur,
|
|
19
|
-
|
|
20
|
-
variant =
|
|
27
|
+
_d = _a.variant,
|
|
28
|
+
variant = _d === void 0 ? "primary" : _d,
|
|
21
29
|
className = _a.className,
|
|
22
30
|
disabled = _a.disabled,
|
|
23
31
|
isError = _a.isError;
|
|
24
|
-
var control =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
tag: "span",
|
|
51
|
-
children: hint
|
|
52
|
-
})]
|
|
53
|
-
});
|
|
32
|
+
var control = /*#__PURE__*/React__default.default.createElement("label", {
|
|
33
|
+
className: clx(Checkbox_module.default.label)
|
|
34
|
+
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
35
|
+
className: clx(Checkbox_module.default.wrapper)
|
|
36
|
+
}, /*#__PURE__*/React__default.default.createElement("input", {
|
|
37
|
+
className: clx(Checkbox_module.default.control, (_b = {}, _b["control_variant_".concat(variant)] = !!variant, _b), className),
|
|
38
|
+
type: "checkbox",
|
|
39
|
+
id: id,
|
|
40
|
+
name: name,
|
|
41
|
+
value: value,
|
|
42
|
+
checked: checked,
|
|
43
|
+
onChange: onChange,
|
|
44
|
+
onFocus: onFocus,
|
|
45
|
+
onBlur: onBlur,
|
|
46
|
+
disabled: disabled
|
|
47
|
+
}), /*#__PURE__*/React__default.default.createElement("span", {
|
|
48
|
+
className: clx(Checkbox_module.default.fakeCheckbox, (_c = {}, _c["variant_".concat(variant, "_disabled")] = disabled ? 1 : 0, _c["variant_".concat(variant, "_error")] = isError ? 1 : 0, _c["variant_".concat(variant, "_checked")] = checked ? 1 : 0, _c.checked = checked ? 1 : 0, _c["variant_".concat(variant)] = !!variant, _c))
|
|
49
|
+
}), /*#__PURE__*/React__default.default.createElement("span", {
|
|
50
|
+
className: clx(Checkbox_module.default.text)
|
|
51
|
+
}, label)));
|
|
52
|
+
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
53
|
+
className: clx(Checkbox_module.default.root)
|
|
54
|
+
}, control, hint && ( /*#__PURE__*/React__default.default.createElement(index.default, {
|
|
55
|
+
variant: isError ? "alert" : "secondary",
|
|
56
|
+
tag: "span"
|
|
57
|
+
}, hint)));
|
|
54
58
|
};
|
|
55
59
|
|
|
56
60
|
exports.default = Checkbox;
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import type { CSSObject } from "@emotion/react";
|
|
3
|
-
type VariantStyles = {
|
|
4
|
-
backgroundColor?: CSSObject["backgroundColor"];
|
|
5
|
-
borderColor?: CSSObject["borderColor"];
|
|
6
|
-
boxShadow?: CSSObject["boxShadow"];
|
|
7
|
-
};
|
|
8
|
-
type VariantStates = {
|
|
9
|
-
normal?: VariantStyles;
|
|
10
|
-
hovered?: VariantStyles;
|
|
11
|
-
checked?: VariantStyles;
|
|
12
|
-
focused?: VariantStyles;
|
|
13
|
-
active?: VariantStyles;
|
|
14
|
-
disabled?: VariantStyles;
|
|
15
|
-
};
|
|
16
|
-
export type CheckboxVariant = {
|
|
17
|
-
primary: VariantStates;
|
|
18
|
-
};
|
|
19
2
|
export interface CheckboxProps {
|
|
20
|
-
variant?:
|
|
3
|
+
variant?: "primary";
|
|
21
4
|
size?: "s" | "m" | "l";
|
|
22
5
|
id?: string;
|
|
23
6
|
name?: string;
|
|
@@ -32,4 +15,3 @@ export interface CheckboxProps {
|
|
|
32
15
|
disabled?: boolean;
|
|
33
16
|
isError?: boolean;
|
|
34
17
|
}
|
|
35
|
-
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styleInject_es = require('../node_modules/style-inject/dist/style-inject.es.js');
|
|
6
|
+
|
|
7
|
+
var css_248z = ".Counter-module_root__OFEM- {\n background-color: var(--palette-white);\n border-radius: 4px;\n box-sizing: border-box;\n display: inline-block;\n font-size: 16px;\n max-block-size: 40px;\n min-block-size: 40px;\n min-inline-size: 96px;\n overflow: hidden;\n position: relative;\n}\n.Counter-module_root_fullWidth__yP-g9 {\n inline-size: 100%;\n}\n\n.Counter-module_control__z5Uxb {\n align-items: center;\n block-size: 38px;\n display: flex;\n justify-content: space-between;\n gap: 4px;\n}\n.Counter-module_control_fullWidth__cf8hN {\n inline-size: 100%;\n}\n\n.Counter-module_value__uELqN {\n font-weight: 500;\n font-size: 18px;\n inline-size: 24px;\n user-select: none;\n text-align: center;\n}";
|
|
8
|
+
var styles = {"root":"Counter-module_root__OFEM-","root_fullWidth":"Counter-module_root_fullWidth__yP-g9","control":"Counter-module_control__z5Uxb","control_fullWidth":"Counter-module_control_fullWidth__cf8hN","value":"Counter-module_value__uELqN"};
|
|
9
|
+
var stylesheet=".Counter-module_root__OFEM- {\n background-color: var(--palette-white);\n border-radius: 4px;\n box-sizing: border-box;\n display: inline-block;\n font-size: 16px;\n max-block-size: 40px;\n min-block-size: 40px;\n min-inline-size: 96px;\n overflow: hidden;\n position: relative;\n}\n.Counter-module_root_fullWidth__yP-g9 {\n inline-size: 100%;\n}\n\n.Counter-module_control__z5Uxb {\n align-items: center;\n block-size: 38px;\n display: flex;\n justify-content: space-between;\n gap: 4px;\n}\n.Counter-module_control_fullWidth__cf8hN {\n inline-size: 100%;\n}\n\n.Counter-module_value__uELqN {\n font-weight: 500;\n font-size: 18px;\n inline-size: 24px;\n user-select: none;\n text-align: center;\n}";
|
|
10
|
+
styleInject_es.default(css_248z);
|
|
11
|
+
|
|
12
|
+
exports.default = styles;
|
|
13
|
+
exports.stylesheet = stylesheet;
|
package/Counter/index.d.ts
CHANGED
package/Counter/index.js
CHANGED
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
6
5
|
var React = require('react');
|
|
6
|
+
var classNames = require('classnames/bind');
|
|
7
7
|
var index = require('../Button/index.js');
|
|
8
8
|
var Minus = require('../Icons/Minus.js');
|
|
9
9
|
var Plus = require('../Icons/Plus.js');
|
|
10
|
-
var
|
|
10
|
+
var Counter_module = require('./Counter.module.scss.js');
|
|
11
11
|
|
|
12
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
15
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
16
|
+
|
|
17
|
+
var clx = classNames__default.default.bind(Counter_module.default);
|
|
12
18
|
var Counter = function Counter(_a) {
|
|
13
19
|
var _b = _a.value,
|
|
14
20
|
value = _b === void 0 ? 1 : _b,
|
|
@@ -22,38 +28,39 @@ var Counter = function Counter(_a) {
|
|
|
22
28
|
var lastNumValue = React.useRef(value);
|
|
23
29
|
var minusDisabled = disabled || value <= min;
|
|
24
30
|
var plusDisabled = disabled || value >= max;
|
|
25
|
-
return
|
|
26
|
-
className:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
width: 16,
|
|
33
|
-
height: 16
|
|
34
|
-
}),
|
|
35
|
-
disabled: minusDisabled,
|
|
36
|
-
onClick: function onClick() {
|
|
37
|
-
onChange(value - 1);
|
|
38
|
-
lastNumValue.current = value - 1;
|
|
39
|
-
},
|
|
40
|
-
"aria-label": "decrease"
|
|
41
|
-
}), jsxRuntime.jsx(styles.Value, {
|
|
42
|
-
children: value
|
|
43
|
-
}), jsxRuntime.jsx(index.default, {
|
|
44
|
-
icon: jsxRuntime.jsx(Plus.default, {
|
|
45
|
-
width: 16,
|
|
46
|
-
height: 16
|
|
47
|
-
}),
|
|
48
|
-
disabled: plusDisabled,
|
|
49
|
-
onClick: function onClick() {
|
|
50
|
-
onChange(value + 1);
|
|
51
|
-
lastNumValue.current = value + 1;
|
|
52
|
-
},
|
|
53
|
-
"aria-label": "increase"
|
|
54
|
-
})]
|
|
31
|
+
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
32
|
+
className: clx(Counter_module.default.root, {
|
|
33
|
+
root_fullWidth: fullWidth ? 1 : 0
|
|
34
|
+
}, className)
|
|
35
|
+
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
36
|
+
className: clx(Counter_module.default.control, {
|
|
37
|
+
control_fullWidth: fullWidth ? 1 : 0
|
|
55
38
|
})
|
|
56
|
-
}
|
|
39
|
+
}, /*#__PURE__*/React__default.default.createElement(index.default, {
|
|
40
|
+
icon: /*#__PURE__*/React__default.default.createElement(Minus.default, {
|
|
41
|
+
width: 16,
|
|
42
|
+
height: 16
|
|
43
|
+
}),
|
|
44
|
+
disabled: minusDisabled,
|
|
45
|
+
onClick: function onClick() {
|
|
46
|
+
onChange(value - 1);
|
|
47
|
+
lastNumValue.current = value - 1;
|
|
48
|
+
},
|
|
49
|
+
"aria-label": "decrease"
|
|
50
|
+
}), /*#__PURE__*/React__default.default.createElement("div", {
|
|
51
|
+
className: clx(Counter_module.default.value)
|
|
52
|
+
}, value), /*#__PURE__*/React__default.default.createElement(index.default, {
|
|
53
|
+
icon: /*#__PURE__*/React__default.default.createElement(Plus.default, {
|
|
54
|
+
width: 16,
|
|
55
|
+
height: 16
|
|
56
|
+
}),
|
|
57
|
+
disabled: plusDisabled,
|
|
58
|
+
onClick: function onClick() {
|
|
59
|
+
onChange(value + 1);
|
|
60
|
+
lastNumValue.current = value + 1;
|
|
61
|
+
},
|
|
62
|
+
"aria-label": "increase"
|
|
63
|
+
})));
|
|
57
64
|
};
|
|
58
65
|
|
|
59
66
|
exports.default = Counter;
|
package/Counter/index.props.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styleInject_es = require('../node_modules/style-inject/dist/style-inject.es.js');
|
|
6
|
+
|
|
7
|
+
var css_248z = ".DotsLoader-module_wrapper__FhKIJ {\n display: flex;\n justify-content: space-between;\n width: 70px;\n}\n\n.DotsLoader-module_dot__oZoA0 {\n animation-duration: 1.6s;\n animation-iteration-count: infinite;\n animation-name: DotsLoader-module_pending__qL-8B;\n background-color: var(--palette-black);\n border-radius: 5px;\n height: 10px;\n transform: scale(0);\n width: 10px;\n}\n@keyframes DotsLoader-module_pending__qL-8B {\n 0% {\n transform: scale(0);\n }\n 50% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n}\n.DotsLoader-module_dot_first__6nsQ8 {\n animation-delay: 0s;\n}\n.DotsLoader-module_dot_second__p8BzX {\n animation-delay: 0.2s;\n}\n.DotsLoader-module_dot_third__1II0s {\n animation-delay: 0.4s;\n}\n.DotsLoader-module_dot_fourth__VR4zl {\n animation-delay: 0.6s;\n}";
|
|
8
|
+
var styles = {"wrapper":"DotsLoader-module_wrapper__FhKIJ","dot":"DotsLoader-module_dot__oZoA0","pending":"DotsLoader-module_pending__qL-8B","dot_first":"DotsLoader-module_dot_first__6nsQ8","dot_second":"DotsLoader-module_dot_second__p8BzX","dot_third":"DotsLoader-module_dot_third__1II0s","dot_fourth":"DotsLoader-module_dot_fourth__VR4zl"};
|
|
9
|
+
var stylesheet=".DotsLoader-module_wrapper__FhKIJ {\n display: flex;\n justify-content: space-between;\n width: 70px;\n}\n\n.DotsLoader-module_dot__oZoA0 {\n animation-duration: 1.6s;\n animation-iteration-count: infinite;\n animation-name: DotsLoader-module_pending__qL-8B;\n background-color: var(--palette-black);\n border-radius: 5px;\n height: 10px;\n transform: scale(0);\n width: 10px;\n}\n@keyframes DotsLoader-module_pending__qL-8B {\n 0% {\n transform: scale(0);\n }\n 50% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n}\n.DotsLoader-module_dot_first__6nsQ8 {\n animation-delay: 0s;\n}\n.DotsLoader-module_dot_second__p8BzX {\n animation-delay: 0.2s;\n}\n.DotsLoader-module_dot_third__1II0s {\n animation-delay: 0.4s;\n}\n.DotsLoader-module_dot_fourth__VR4zl {\n animation-delay: 0.6s;\n}";
|
|
10
|
+
styleInject_es.default(css_248z);
|
|
11
|
+
|
|
12
|
+
exports.default = styles;
|
|
13
|
+
exports.stylesheet = stylesheet;
|
package/DotsLoader/index.js
CHANGED
|
@@ -2,26 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var classNames = require('classnames/bind');
|
|
7
|
+
var DotsLoader_module = require('./DotsLoader.module.scss.js');
|
|
7
8
|
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
12
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
13
|
+
|
|
14
|
+
var clx = classNames__default.default.bind(DotsLoader_module.default);
|
|
8
15
|
var DotsLoader = function DotsLoader(_a) {
|
|
9
16
|
var color = _a.color;
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
17
|
+
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
18
|
+
className: clx("wrapper")
|
|
19
|
+
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
20
|
+
style: {
|
|
21
|
+
backgroundColor: color
|
|
22
|
+
},
|
|
23
|
+
className: clx({
|
|
24
|
+
dot: true,
|
|
25
|
+
dot_first: true
|
|
26
|
+
})
|
|
27
|
+
}), /*#__PURE__*/React__default.default.createElement("div", {
|
|
28
|
+
style: {
|
|
29
|
+
backgroundColor: color
|
|
30
|
+
},
|
|
31
|
+
className: clx({
|
|
32
|
+
dot: true,
|
|
33
|
+
dot_second: true
|
|
34
|
+
})
|
|
35
|
+
}), /*#__PURE__*/React__default.default.createElement("div", {
|
|
36
|
+
style: {
|
|
37
|
+
backgroundColor: color
|
|
38
|
+
},
|
|
39
|
+
className: clx({
|
|
40
|
+
dot: true,
|
|
41
|
+
dot_third: true
|
|
42
|
+
})
|
|
43
|
+
}), /*#__PURE__*/React__default.default.createElement("div", {
|
|
44
|
+
style: {
|
|
45
|
+
backgroundColor: color
|
|
46
|
+
},
|
|
47
|
+
className: clx({
|
|
48
|
+
dot: true,
|
|
49
|
+
dot_fourth: true
|
|
50
|
+
})
|
|
51
|
+
}));
|
|
25
52
|
};
|
|
26
53
|
|
|
27
54
|
exports.default = DotsLoader;
|