colibri-ui 0.8.65 → 0.8.67
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/Accordion/Accordion.module.css +8 -7
- package/Accordion/index.js +1 -1
- package/Avatar/Avatar.module.css +50 -33
- package/Avatar/index.js +74 -37
- package/Badge/Badge.module.css +7 -7
- package/Badge/index.js +3 -9
- package/Badge/index.props.d.ts +0 -2
- package/Button/Button.module.css +95 -135
- package/Calendar/components/Month/Month.js +3 -5
- package/Calendar/components/Month/index.module.css +20 -19
- package/Calendar/components/Presets/index.module.css +4 -4
- package/Calendar/index.module.css +26 -23
- package/Calendar/utils/getPresets.js +2 -2
- package/Card/Card.d.ts +25 -0
- package/Card/Card.js +70 -0
- package/Card/Card.module.css +90 -0
- package/Card/index.d.ts +2 -0
- package/Card/index.js +9 -0
- package/Card/package.json +6 -0
- package/Checkbox/Checkbox.module.css +38 -28
- package/Checkbox/index.js +1 -0
- package/Chip/Chip.module.css +34 -24
- package/CodeField/CodeField.d.ts +29 -0
- package/CodeField/CodeField.js +316 -0
- package/CodeField/CodeField.module.css +211 -0
- package/CodeField/index.d.ts +2 -0
- package/CodeField/index.js +13 -0
- package/CodeField/package.json +6 -0
- package/Counter/Counter.module.css +11 -10
- package/Datepicker/Datepicker.module.css +1 -1
- package/Datepicker/components/DatePicker/index.module.css +22 -16
- package/Datepicker/components/TimePicker/index.module.css +21 -15
- package/DotsLoader/DotsLoader.module.css +5 -5
- package/DotsLoader/index.d.ts +1 -3
- package/DotsLoader/index.js +1 -14
- package/Drawer/Drawer.d.ts +43 -0
- package/Drawer/Drawer.js +227 -0
- package/Drawer/Drawer.module.css +280 -0
- package/Drawer/index.d.ts +2 -0
- package/Drawer/index.js +10 -0
- package/Drawer/package.json +6 -0
- package/Dropdown/Dropdown.module.css +6 -6
- package/Dropdown/index.js +26 -17
- package/Dropdown/index.props.d.ts +7 -6
- package/Dropzone/Dropzone.d.ts +30 -0
- package/Dropzone/Dropzone.js +258 -0
- package/Dropzone/Dropzone.module.css +164 -0
- package/Dropzone/index.d.ts +2 -0
- package/Dropzone/index.js +7 -0
- package/Dropzone/package.json +6 -0
- package/Editable/Editable.d.ts +18 -0
- package/Editable/Editable.js +166 -0
- package/Editable/Editable.module.css +61 -0
- package/Editable/index.d.ts +2 -0
- package/Editable/index.js +10 -0
- package/Editable/package.json +6 -0
- package/Grid/Grid.module.css +2 -2
- package/Grid/Item/Grid-Item.module.css +3 -3
- package/Grid/index.js +9 -6
- package/Grid/index.props.d.ts +4 -3
- package/Icons/Check.js +1 -1
- package/InputRadio/InputRadio.module.css +37 -34
- package/Menu/Menu.module.css +2 -2
- package/Menu/components/MenuItem/MenuItem.module.css +8 -8
- package/Modal/Modal.module.css +11 -11
- package/Modal/components/Close/Close.module.css +1 -1
- package/Modal/components/Content/Content.module.css +1 -1
- package/MultiSelect/components/MenuOverlay/index.js +2 -4
- package/MultiSelect/components/MenuOverlay/index.module.css +3 -3
- package/MultiSelect/index.js +1 -0
- package/MultiSelect/index.module.css +5 -5
- package/Progress/Progress.d.ts +20 -0
- package/Progress/Progress.js +109 -0
- package/Progress/Progress.module.css +191 -0
- package/Progress/index.d.ts +2 -0
- package/Progress/index.js +7 -0
- package/Progress/package.json +6 -0
- package/README.md +91 -2
- package/RadioGroup/RadioGroup.module.css +4 -4
- package/Rating/Rating.d.ts +24 -0
- package/Rating/Rating.js +131 -0
- package/Rating/Rating.module.css +219 -0
- package/Rating/index.d.ts +2 -0
- package/Rating/index.js +10 -0
- package/Rating/package.json +6 -0
- package/Select/components/MenuOverlay/index.module.css +1 -1
- package/Select/index.js +1 -0
- package/Select/index.module.css +3 -3
- package/Separator/Separator.module.css +2 -2
- package/Skeleton/Skeleton.module.css +4 -4
- package/Skeleton/index.js +10 -6
- package/Skeleton/index.props.d.ts +2 -2
- package/Status/index.module.css +18 -17
- package/Switch/Switch.module.css +41 -26
- package/Switch/index.js +1 -0
- package/TabsMenu/Tab/Tab.module.css +29 -26
- package/TabsMenu/TabsMenu.module.css +1 -1
- package/TextArea/TextArea.module.css +2 -2
- package/Theme/colors/index.d.ts +190 -38
- package/Theme/colors/theme_buenos_aires.d.ts +211 -31
- package/Theme/colors/theme_buenos_aires.js +139 -34
- package/Theme/colors/theme_jaipur.d.ts +251 -0
- package/Theme/colors/theme_jaipur.js +157 -0
- package/Theme/global.css +1 -1
- package/Theme/index.d.ts +973 -13
- package/Theme/index.js +2 -2
- package/Theme/themes/buenos_aires.d.ts +476 -0
- package/Theme/themes/buenos_aires.js +626 -150
- package/Theme/themes/jaipur.d.ts +628 -0
- package/Theme/themes/jaipur.js +635 -0
- package/Tooltip/Tooltip.module.css +8 -8
- package/Tooltip/index.js +4 -3
- package/Typography/Typography.module.css +151 -26
- package/Typography/index.props.d.ts +3 -3
- package/base/BaseInput/BaseInput.module.css +2 -2
- package/base/FormField/FormField.module.css +6 -2
- package/base/FormField/index.js +1 -0
- package/base/InputRoot/InputRoot.module.css +33 -26
- package/base/InputRoot/index.d.ts +1 -1
- package/base/InputRoot/index.js +3 -2
- package/base/InputRoot/index.props.d.ts +1 -0
- package/esm/Accordion/Accordion.module.css +8 -7
- package/esm/Accordion/index.js +1 -1
- package/esm/Avatar/Avatar.module.css +50 -33
- package/esm/Avatar/index.js +74 -37
- package/esm/Badge/Badge.module.css +7 -7
- package/esm/Badge/index.js +3 -9
- package/esm/Badge/index.props.d.ts +0 -2
- package/esm/Button/Button.module.css +95 -135
- package/esm/Calendar/components/Month/Month.js +3 -5
- package/esm/Calendar/components/Month/index.module.css +20 -19
- package/esm/Calendar/components/Presets/index.module.css +4 -4
- package/esm/Calendar/index.module.css +26 -23
- package/esm/Calendar/utils/getPresets.js +2 -2
- package/esm/Card/Card.d.ts +25 -0
- package/esm/Card/Card.js +61 -0
- package/esm/Card/Card.module.css +90 -0
- package/esm/Card/index.d.ts +2 -0
- package/esm/Checkbox/Checkbox.module.css +38 -28
- package/esm/Checkbox/index.js +1 -0
- package/esm/Chip/Chip.module.css +34 -24
- package/esm/CodeField/CodeField.d.ts +29 -0
- package/esm/CodeField/CodeField.js +303 -0
- package/esm/CodeField/CodeField.module.css +211 -0
- package/esm/CodeField/index.d.ts +2 -0
- package/esm/Counter/Counter.module.css +11 -10
- package/esm/Datepicker/Datepicker.module.css +1 -1
- package/esm/Datepicker/components/DatePicker/index.module.css +22 -16
- package/esm/Datepicker/components/TimePicker/index.module.css +21 -15
- package/esm/DotsLoader/DotsLoader.module.css +5 -5
- package/esm/DotsLoader/index.d.ts +1 -3
- package/esm/DotsLoader/index.js +1 -14
- package/esm/Drawer/Drawer.d.ts +43 -0
- package/esm/Drawer/Drawer.js +216 -0
- package/esm/Drawer/Drawer.module.css +280 -0
- package/esm/Drawer/index.d.ts +2 -0
- package/esm/Dropdown/Dropdown.module.css +6 -6
- package/esm/Dropdown/index.js +27 -18
- package/esm/Dropdown/index.props.d.ts +7 -6
- package/esm/Dropzone/Dropzone.d.ts +30 -0
- package/esm/Dropzone/Dropzone.js +248 -0
- package/esm/Dropzone/Dropzone.module.css +164 -0
- package/esm/Dropzone/index.d.ts +2 -0
- package/esm/Editable/Editable.d.ts +18 -0
- package/esm/Editable/Editable.js +157 -0
- package/esm/Editable/Editable.module.css +61 -0
- package/esm/Editable/index.d.ts +2 -0
- package/esm/Grid/Grid.module.css +2 -2
- package/esm/Grid/Item/Grid-Item.module.css +3 -3
- package/esm/Grid/index.js +9 -6
- package/esm/Grid/index.props.d.ts +4 -3
- package/esm/Icons/Check.js +1 -1
- package/esm/InputRadio/InputRadio.module.css +37 -34
- package/esm/Menu/Menu.module.css +2 -2
- package/esm/Menu/components/MenuItem/MenuItem.module.css +8 -8
- package/esm/Modal/Modal.module.css +11 -11
- package/esm/Modal/components/Close/Close.module.css +1 -1
- package/esm/Modal/components/Content/Content.module.css +1 -1
- package/esm/MultiSelect/components/MenuOverlay/index.js +2 -4
- package/esm/MultiSelect/components/MenuOverlay/index.module.css +3 -3
- package/esm/MultiSelect/index.js +1 -0
- package/esm/MultiSelect/index.module.css +5 -5
- package/esm/Progress/Progress.d.ts +20 -0
- package/esm/Progress/Progress.js +102 -0
- package/esm/Progress/Progress.module.css +191 -0
- package/esm/Progress/index.d.ts +2 -0
- package/esm/RadioGroup/RadioGroup.module.css +4 -4
- package/esm/Rating/Rating.d.ts +24 -0
- package/esm/Rating/Rating.js +121 -0
- package/esm/Rating/Rating.module.css +219 -0
- package/esm/Rating/index.d.ts +2 -0
- package/esm/Select/components/MenuOverlay/index.module.css +1 -1
- package/esm/Select/index.js +1 -0
- package/esm/Select/index.module.css +3 -3
- package/esm/Separator/Separator.module.css +2 -2
- package/esm/Skeleton/Skeleton.module.css +4 -4
- package/esm/Skeleton/index.js +10 -6
- package/esm/Skeleton/index.props.d.ts +2 -2
- package/esm/Status/index.module.css +18 -17
- package/esm/Switch/Switch.module.css +41 -26
- package/esm/Switch/index.js +1 -0
- package/esm/TabsMenu/Tab/Tab.module.css +29 -26
- package/esm/TabsMenu/TabsMenu.module.css +1 -1
- package/esm/TextArea/TextArea.module.css +2 -2
- package/esm/Theme/colors/index.d.ts +190 -38
- package/esm/Theme/colors/theme_buenos_aires.d.ts +211 -31
- package/esm/Theme/colors/theme_buenos_aires.js +132 -34
- package/esm/Theme/colors/theme_jaipur.d.ts +251 -0
- package/esm/Theme/colors/theme_jaipur.js +140 -0
- package/esm/Theme/global.css +1 -1
- package/esm/Theme/index.d.ts +973 -13
- package/esm/Theme/index.js +2 -2
- package/esm/Theme/themes/buenos_aires.d.ts +476 -0
- package/esm/Theme/themes/buenos_aires.js +618 -142
- package/esm/Theme/themes/jaipur.d.ts +628 -0
- package/esm/Theme/themes/jaipur.js +631 -0
- package/esm/Tooltip/Tooltip.module.css +8 -8
- package/esm/Tooltip/index.js +4 -3
- package/esm/Typography/Typography.module.css +151 -26
- package/esm/Typography/index.props.d.ts +3 -3
- package/esm/base/BaseInput/BaseInput.module.css +2 -2
- package/esm/base/FormField/FormField.module.css +6 -2
- package/esm/base/FormField/index.js +1 -0
- package/esm/base/InputRoot/InputRoot.module.css +33 -26
- package/esm/base/InputRoot/index.d.ts +1 -1
- package/esm/base/InputRoot/index.js +3 -2
- package/esm/base/InputRoot/index.props.d.ts +1 -0
- package/esm/hooks/useOnClickOutside/index.d.ts +1 -1
- package/esm/hooks/useOnClickOutside/index.js +2 -2
- package/esm/index.d.ts +12 -0
- package/esm/index.js +7 -0
- package/esm/theme_ba_variables.css +625 -149
- package/esm/theme_jaipur_variables.css +627 -0
- package/hooks/useOnClickOutside/index.d.ts +1 -1
- package/hooks/useOnClickOutside/index.js +2 -2
- package/index.d.ts +12 -0
- package/index.js +26 -0
- package/package.json +1 -1
- package/theme_ba_variables.css +625 -149
- package/theme_jaipur_variables.css +627 -0
- package/Avatar/assets/org-circle.svg.js +0 -64
- package/Avatar/assets/user-circle.svg.js +0 -43
- package/Theme/colors/common.d.ts +0 -39
- package/Theme/colors/common.js +0 -32
- package/Theme/colors/index.js +0 -11
- package/Theme/colors/theme_default.d.ts +0 -47
- package/Theme/colors/theme_default.js +0 -38
- package/Theme/themes/default.d.ts +0 -144
- package/Theme/themes/default.js +0 -151
- package/esm/Avatar/assets/org-circle.svg.js +0 -5
- package/esm/Avatar/assets/user-circle.svg.js +0 -5
- package/esm/Theme/colors/common.d.ts +0 -39
- package/esm/Theme/colors/common.js +0 -24
- package/esm/Theme/colors/index.js +0 -7
- package/esm/Theme/colors/theme_default.d.ts +0 -47
- package/esm/Theme/colors/theme_default.js +0 -29
- package/esm/Theme/themes/default.d.ts +0 -144
- package/esm/Theme/themes/default.js +0 -147
- package/esm/theme_default_variables.css +0 -143
- package/theme_default_variables.css +0 -143
package/Card/Card.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var styles = require('./Card.module.css');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
10
|
+
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
11
|
+
|
|
12
|
+
var cx = function cx() {
|
|
13
|
+
for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14
|
+
classNames[_key] = arguments[_key];
|
|
15
|
+
}
|
|
16
|
+
return classNames.filter(Boolean).join(" ");
|
|
17
|
+
};
|
|
18
|
+
/** Root card container. */
|
|
19
|
+
var Card = /*#__PURE__*/React.forwardRef(function CardRoot(_a, ref) {
|
|
20
|
+
var _a$size = _a.size,
|
|
21
|
+
size = _a$size === void 0 ? "m" : _a$size,
|
|
22
|
+
_a$view = _a.view,
|
|
23
|
+
view = _a$view === void 0 ? "default" : _a$view,
|
|
24
|
+
_a$orientation = _a.orientation,
|
|
25
|
+
orientation = _a$orientation === void 0 ? "horizontal" : _a$orientation,
|
|
26
|
+
_a$selected = _a.selected,
|
|
27
|
+
selected = _a$selected === void 0 ? false : _a$selected,
|
|
28
|
+
_a$backgroundType = _a.backgroundType,
|
|
29
|
+
backgroundType = _a$backgroundType === void 0 ? "none" : _a$backgroundType,
|
|
30
|
+
className = _a.className,
|
|
31
|
+
children = _a.children,
|
|
32
|
+
rest = tslib.__rest(_a, ["size", "view", "orientation", "selected", "backgroundType", "className", "children"]);
|
|
33
|
+
return /*#__PURE__*/React__default.default.createElement("div", Object.assign({}, rest, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
className: cx(styles__default.default.card, styles__default.default[size], styles__default.default[view], styles__default.default[orientation], selected && styles__default.default.selected, backgroundType === "solid" && styles__default.default.solid, className)
|
|
36
|
+
}), children);
|
|
37
|
+
});
|
|
38
|
+
/** Clipped card area that normally contains media and CardInnerContent. */
|
|
39
|
+
var CardContent = /*#__PURE__*/React.forwardRef(function CardContentRoot(_a, ref) {
|
|
40
|
+
var aspectRatio = _a.aspectRatio,
|
|
41
|
+
_a$orientation2 = _a.orientation,
|
|
42
|
+
orientation = _a$orientation2 === void 0 ? "horizontal" : _a$orientation2,
|
|
43
|
+
className = _a.className,
|
|
44
|
+
style = _a.style,
|
|
45
|
+
children = _a.children,
|
|
46
|
+
rest = tslib.__rest(_a, ["aspectRatio", "orientation", "className", "style", "children"]);
|
|
47
|
+
return /*#__PURE__*/React__default.default.createElement("div", Object.assign({}, rest, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
className: cx(styles__default.default.content, styles__default.default[orientation], className),
|
|
50
|
+
style: Object.assign(Object.assign({}, style), {
|
|
51
|
+
aspectRatio: aspectRatio
|
|
52
|
+
})
|
|
53
|
+
}), children);
|
|
54
|
+
});
|
|
55
|
+
/** Content layer rendered over an image or another CardContent background. */
|
|
56
|
+
var CardInnerContent = /*#__PURE__*/React.forwardRef(function CardInnerContentRoot(_a, ref) {
|
|
57
|
+
var _a$orientation3 = _a.orientation,
|
|
58
|
+
orientation = _a$orientation3 === void 0 ? "horizontal" : _a$orientation3,
|
|
59
|
+
className = _a.className,
|
|
60
|
+
children = _a.children,
|
|
61
|
+
rest = tslib.__rest(_a, ["orientation", "className", "children"]);
|
|
62
|
+
return /*#__PURE__*/React__default.default.createElement("div", Object.assign({}, rest, {
|
|
63
|
+
ref: ref,
|
|
64
|
+
className: cx(styles__default.default["inner-content"], styles__default.default[orientation], className)
|
|
65
|
+
}), children);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
exports.Card = Card;
|
|
69
|
+
exports.CardContent = CardContent;
|
|
70
|
+
exports.CardInnerContent = CardInnerContent;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.card {
|
|
2
|
+
--card-outline-width: var(--space-2);
|
|
3
|
+
--card-border-radius: var(--component-card-radius);
|
|
4
|
+
--card-content-border-radius: var(--radius-xs);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
position: relative;
|
|
8
|
+
z-index: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.s {
|
|
12
|
+
--card-outline-width: var(--space-2);
|
|
13
|
+
--card-border-radius: var(--radius-md);
|
|
14
|
+
--card-content-border-radius: var(--radius-xs);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.m {
|
|
18
|
+
--card-outline-width: var(--space-3);
|
|
19
|
+
--card-border-radius: var(--component-card-radius);
|
|
20
|
+
--card-content-border-radius: var(--radius-xs);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.l {
|
|
24
|
+
--card-outline-width: var(--space-4);
|
|
25
|
+
--card-border-radius: var(--radius-lg);
|
|
26
|
+
--card-content-border-radius: var(--radius-sm);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.vertical {
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.horizontal {
|
|
34
|
+
flex-direction: row;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.solid {
|
|
38
|
+
background: var(--component-card-bg);
|
|
39
|
+
border-radius: var(--card-border-radius);
|
|
40
|
+
padding: var(--card-outline-width);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.selected::after {
|
|
44
|
+
border: var(--border-width-hairline) solid var(--color-border-focus);
|
|
45
|
+
border-radius: var(--card-border-radius);
|
|
46
|
+
content: "";
|
|
47
|
+
inset: calc(-1 * var(--border-width-hairline));
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
position: absolute;
|
|
50
|
+
z-index: -1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.content {
|
|
54
|
+
border-radius: var(--card-content-border-radius);
|
|
55
|
+
display: flex;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
position: relative;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.card:not(.solid) > .content {
|
|
62
|
+
border-radius: var(--card-border-radius);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.content.horizontal {
|
|
66
|
+
align-items: center;
|
|
67
|
+
flex-direction: row;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.content.vertical {
|
|
72
|
+
align-items: center;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.inner-content {
|
|
78
|
+
display: flex;
|
|
79
|
+
inset: 0;
|
|
80
|
+
position: absolute;
|
|
81
|
+
z-index: 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.inner-content.horizontal {
|
|
85
|
+
flex-direction: row;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.inner-content.vertical {
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
}
|
package/Card/index.d.ts
ADDED
package/Card/index.js
ADDED
|
@@ -6,42 +6,47 @@
|
|
|
6
6
|
.label {
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
display: inline-flex;
|
|
9
|
-
line-height:
|
|
9
|
+
line-height: var(--component-control-line-height);
|
|
10
10
|
position: relative;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.text {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
margin-
|
|
14
|
+
color: var(--component-control-text);
|
|
15
|
+
font-size: var(--component-control-font-size);
|
|
16
|
+
margin-block-start: calc(var(--border-width-hairline) * -1);
|
|
17
|
+
margin-inline-start: var(--space-2);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.hint_error {
|
|
21
|
+
color: var(--component-control-helper-error);
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
.fake-checkbox {
|
|
20
|
-
background-color: var(--
|
|
21
|
-
block-size:
|
|
22
|
-
border:
|
|
23
|
-
border-radius:
|
|
25
|
+
background-color: var(--component-control-bg);
|
|
26
|
+
block-size: var(--component-control-size);
|
|
27
|
+
border: var(--border-width-hairline) solid var(--component-control-border);
|
|
28
|
+
border-radius: var(--radius-xs);
|
|
24
29
|
box-sizing: border-box;
|
|
25
30
|
direction: ltr;
|
|
26
31
|
display: block;
|
|
27
32
|
flex-shrink: 0;
|
|
28
|
-
inline-size:
|
|
33
|
+
inline-size: var(--component-control-size);
|
|
29
34
|
position: relative;
|
|
30
35
|
transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
.checked {
|
|
34
|
-
background-color: var(--
|
|
39
|
+
background-color: var(--component-control-bg-checked);
|
|
35
40
|
border: 0;
|
|
36
41
|
}
|
|
37
42
|
.checked::after {
|
|
38
|
-
block-size:
|
|
39
|
-
border-block-end:
|
|
40
|
-
border-inline-end:
|
|
43
|
+
block-size: var(--component-checkbox-check-block-size);
|
|
44
|
+
border-block-end: var(--component-checkbox-check-border-width) solid var(--component-control-check);
|
|
45
|
+
border-inline-end: var(--component-checkbox-check-border-width) solid var(--component-control-check);
|
|
41
46
|
box-sizing: content-box;
|
|
42
47
|
content: "";
|
|
43
48
|
display: block;
|
|
44
|
-
inline-size:
|
|
49
|
+
inline-size: var(--component-checkbox-check-inline-size);
|
|
45
50
|
inset-block-start: 45%;
|
|
46
51
|
inset-inline-start: 50%;
|
|
47
52
|
position: absolute;
|
|
@@ -49,41 +54,46 @@
|
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
.variant_primary_error {
|
|
52
|
-
border-color: var(--
|
|
53
|
-
box-shadow: 0 0 0 2px var(--palette-alert);
|
|
57
|
+
border-color: var(--component-control-border-error);
|
|
54
58
|
}
|
|
55
59
|
.variant_primary_checked::after {
|
|
56
|
-
border-block-end:
|
|
57
|
-
border-inline-end:
|
|
60
|
+
border-block-end: var(--component-checkbox-check-border-width) solid var(--component-control-check);
|
|
61
|
+
border-inline-end: var(--component-checkbox-check-border-width) solid var(--component-control-check);
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
.control {
|
|
61
|
-
inset-inline-start: -
|
|
65
|
+
inset-inline-start: var(--component-control-visually-hidden-offset);
|
|
62
66
|
position: absolute;
|
|
63
67
|
}
|
|
64
68
|
.control:disabled + .fake-checkbox::after {
|
|
65
|
-
border-block-end:
|
|
66
|
-
border-inline-end:
|
|
69
|
+
border-block-end: var(--component-checkbox-check-border-width) solid var(--component-control-text-disabled);
|
|
70
|
+
border-inline-end: var(--component-checkbox-check-border-width) solid var(--component-control-text-disabled);
|
|
67
71
|
}
|
|
68
72
|
.control:hover:not(:disabled) + .fake-checkbox {
|
|
69
|
-
border-color: var(--
|
|
73
|
+
border-color: var(--component-control-border-hover);
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
.control_variant_primary:focus:not(:disabled) + .fake-checkbox {
|
|
73
|
-
|
|
77
|
+
border-color: var(--component-control-border-focus);
|
|
78
|
+
box-shadow: 0 0 0 var(--focus-ring-width) var(--component-control-focus-ring);
|
|
74
79
|
}
|
|
75
80
|
.control_variant_primary {
|
|
76
81
|
/* stylelint-disable-next-line no-descending-specificity */
|
|
77
82
|
}
|
|
78
83
|
.control_variant_primary:disabled + .fake-checkbox {
|
|
79
|
-
background-color: var(--
|
|
84
|
+
background-color: var(--component-control-bg-disabled);
|
|
85
|
+
border: var(--border-width-hairline) solid var(--component-control-border-disabled);
|
|
86
|
+
border-color: var(--component-control-border-disabled);
|
|
80
87
|
z-index: 1;
|
|
81
88
|
}
|
|
82
89
|
.control_variant_primary:hover:not(:disabled) + .fake-checkbox {
|
|
83
|
-
background-color: var(--
|
|
90
|
+
background-color: var(--component-control-bg-hover);
|
|
84
91
|
}
|
|
85
92
|
.control_variant_primary:active:not(:disabled) + .fake-checkbox {
|
|
86
|
-
background-color: var(--
|
|
87
|
-
border-color: var(--
|
|
88
|
-
|
|
93
|
+
background-color: var(--component-control-bg-checked);
|
|
94
|
+
border-color: var(--component-control-border-checked);
|
|
95
|
+
}
|
|
96
|
+
.control_variant_primary:checked:hover:not(:disabled) + .fake-checkbox {
|
|
97
|
+
background-color: var(--component-control-bg-checked);
|
|
98
|
+
border-color: var(--component-control-border-checked);
|
|
89
99
|
}
|
package/Checkbox/index.js
CHANGED
|
@@ -51,6 +51,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
51
51
|
}), /*#__PURE__*/React__default.default.createElement("span", {
|
|
52
52
|
className: styles__default.default.text
|
|
53
53
|
}, label)), hint && (/*#__PURE__*/React__default.default.createElement(index.default, {
|
|
54
|
+
className: clsx__default.default(_defineProperty__default.default({}, styles__default.default.hint_error, hasError)),
|
|
54
55
|
variant: hasError ? "alert" : "secondary",
|
|
55
56
|
tag: "span"
|
|
56
57
|
}, hint)));
|
package/Chip/Chip.module.css
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
.inner {
|
|
7
7
|
box-sizing: border-box;
|
|
8
|
+
color: var(--component-chip-text);
|
|
8
9
|
display: flex;
|
|
9
10
|
font: inherit;
|
|
10
11
|
min-width: 0;
|
|
@@ -14,53 +15,55 @@
|
|
|
14
15
|
transition-timing-function: ease;
|
|
15
16
|
}
|
|
16
17
|
.inner_active {
|
|
17
|
-
background: var(--
|
|
18
|
+
background: var(--component-chip-bg-active);
|
|
19
|
+
color: var(--component-chip-text-active, var(--component-chip-text));
|
|
18
20
|
}
|
|
19
21
|
.inner_inactive {
|
|
20
|
-
background: var(--
|
|
21
|
-
box-shadow:
|
|
22
|
+
background: var(--component-chip-bg);
|
|
23
|
+
box-shadow: var(--shadow-raised);
|
|
22
24
|
}
|
|
23
25
|
.inner_inactive:hover {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
background: var(--component-chip-bg-hover);
|
|
27
|
+
box-shadow: var(--shadow-raised);
|
|
28
|
+
transform: translateY(calc(var(--focus-ring-width) * -1));
|
|
26
29
|
}
|
|
27
30
|
.inner_inactive:active {
|
|
28
|
-
background:
|
|
29
|
-
box-shadow:
|
|
31
|
+
background: var(--component-chip-bg-pressed);
|
|
32
|
+
box-shadow: var(--shadow-pressed);
|
|
30
33
|
outline: 0;
|
|
31
34
|
transition-duration: 0.15s;
|
|
32
35
|
}
|
|
33
36
|
@media (hover: none) {
|
|
34
37
|
.inner_inactive:hover {
|
|
35
|
-
box-shadow:
|
|
38
|
+
box-shadow: var(--shadow-raised);
|
|
36
39
|
transform: translateY(0);
|
|
37
40
|
}
|
|
38
41
|
.inner_inactive:active {
|
|
39
|
-
box-shadow:
|
|
42
|
+
box-shadow: var(--shadow-pressed);
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
.inner[data-size=s] {
|
|
43
|
-
border-radius:
|
|
44
|
-
font-size:
|
|
45
|
-
line-height:
|
|
46
|
+
border-radius: var(--component-chip-radius);
|
|
47
|
+
font-size: var(--component-chip-font-size-s);
|
|
48
|
+
line-height: var(--component-chip-line-height-s);
|
|
46
49
|
}
|
|
47
50
|
.inner[data-size=m] {
|
|
48
|
-
border-radius:
|
|
49
|
-
font-size:
|
|
50
|
-
line-height:
|
|
51
|
+
border-radius: var(--component-chip-radius);
|
|
52
|
+
font-size: var(--component-chip-font-size-m);
|
|
53
|
+
line-height: var(--component-chip-line-height-m);
|
|
51
54
|
}
|
|
52
55
|
.inner[data-size=l] {
|
|
53
|
-
border-radius:
|
|
54
|
-
font-size:
|
|
55
|
-
line-height:
|
|
56
|
+
border-radius: var(--component-chip-radius);
|
|
57
|
+
font-size: var(--component-chip-font-size-l);
|
|
58
|
+
line-height: var(--component-chip-line-height-l);
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
.content {
|
|
59
62
|
align-items: center;
|
|
60
63
|
display: flex;
|
|
61
64
|
justify-content: flex-start;
|
|
62
|
-
max-width:
|
|
63
|
-
padding: 0
|
|
65
|
+
max-width: var(--component-tooltip-max-width);
|
|
66
|
+
padding: 0 var(--space-4);
|
|
64
67
|
user-select: none;
|
|
65
68
|
}
|
|
66
69
|
|
|
@@ -72,12 +75,19 @@
|
|
|
72
75
|
|
|
73
76
|
.icon-right {
|
|
74
77
|
align-items: center;
|
|
75
|
-
color: var(--
|
|
78
|
+
color: var(--component-chip-icon);
|
|
76
79
|
display: flex;
|
|
77
80
|
justify-content: center;
|
|
78
|
-
margin-left: -
|
|
79
|
-
padding-right:
|
|
81
|
+
margin-left: calc(var(--space-3) * -1);
|
|
82
|
+
padding-right: var(--space-3);
|
|
80
83
|
}
|
|
81
84
|
.icon-right:hover {
|
|
82
|
-
color: var(--
|
|
85
|
+
color: var(--component-chip-icon-hover);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.inner_active .icon-right {
|
|
89
|
+
color: var(--component-chip-icon-active, currentcolor);
|
|
90
|
+
}
|
|
91
|
+
.inner_active .icon-right:hover {
|
|
92
|
+
color: var(--component-chip-icon-active-hover, currentcolor);
|
|
83
93
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { type Dispatch, type InputHTMLAttributes, type MouseEventHandler, type ReactNode, type SetStateAction } from "react";
|
|
2
|
+
export declare const ONLY_DIGITS_PATTERN = "^\\d+$";
|
|
3
|
+
export declare const ONLY_CHARS_PATTERN = "^[a-zA-Z]+$";
|
|
4
|
+
export declare const ONLY_DIGITS_AND_CHARS_PATTERN = "^[a-zA-Z0-9]+$";
|
|
5
|
+
export type CodeFieldSize = "m" | "l" | "xl";
|
|
6
|
+
export type CodeFieldShape = "default" | "segmented";
|
|
7
|
+
export type ItemErrorBehavior = "remove-symbol" | "keep" | "forbid-enter";
|
|
8
|
+
export type CodeErrorBehavior = "remove-code" | "keep";
|
|
9
|
+
export interface CodeFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "onClick" | "size" | "width" | "value"> {
|
|
10
|
+
value?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
codeLength?: 4 | 5 | 6;
|
|
13
|
+
caption?: ReactNode;
|
|
14
|
+
captionAlign?: "left" | "center";
|
|
15
|
+
width?: string | number;
|
|
16
|
+
view?: string;
|
|
17
|
+
shape?: CodeFieldShape;
|
|
18
|
+
size?: CodeFieldSize;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
isError?: boolean;
|
|
21
|
+
setIsError?: Dispatch<SetStateAction<boolean>>;
|
|
22
|
+
allowedSymbols?: string | RegExp;
|
|
23
|
+
itemErrorBehavior?: ItemErrorBehavior;
|
|
24
|
+
codeErrorBehavior?: CodeErrorBehavior;
|
|
25
|
+
onChange?: (value: string) => void;
|
|
26
|
+
onFullCodeEnter?: (code: string) => void;
|
|
27
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
28
|
+
}
|
|
29
|
+
export declare const CodeField: React.ForwardRefExoticComponent<CodeFieldProps & React.RefAttributes<HTMLInputElement>>;
|