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.
Files changed (260) hide show
  1. package/Accordion/Accordion.module.css +8 -7
  2. package/Accordion/index.js +1 -1
  3. package/Avatar/Avatar.module.css +50 -33
  4. package/Avatar/index.js +74 -37
  5. package/Badge/Badge.module.css +7 -7
  6. package/Badge/index.js +3 -9
  7. package/Badge/index.props.d.ts +0 -2
  8. package/Button/Button.module.css +95 -135
  9. package/Calendar/components/Month/Month.js +3 -5
  10. package/Calendar/components/Month/index.module.css +20 -19
  11. package/Calendar/components/Presets/index.module.css +4 -4
  12. package/Calendar/index.module.css +26 -23
  13. package/Calendar/utils/getPresets.js +2 -2
  14. package/Card/Card.d.ts +25 -0
  15. package/Card/Card.js +70 -0
  16. package/Card/Card.module.css +90 -0
  17. package/Card/index.d.ts +2 -0
  18. package/Card/index.js +9 -0
  19. package/Card/package.json +6 -0
  20. package/Checkbox/Checkbox.module.css +38 -28
  21. package/Checkbox/index.js +1 -0
  22. package/Chip/Chip.module.css +34 -24
  23. package/CodeField/CodeField.d.ts +29 -0
  24. package/CodeField/CodeField.js +316 -0
  25. package/CodeField/CodeField.module.css +211 -0
  26. package/CodeField/index.d.ts +2 -0
  27. package/CodeField/index.js +13 -0
  28. package/CodeField/package.json +6 -0
  29. package/Counter/Counter.module.css +11 -10
  30. package/Datepicker/Datepicker.module.css +1 -1
  31. package/Datepicker/components/DatePicker/index.module.css +22 -16
  32. package/Datepicker/components/TimePicker/index.module.css +21 -15
  33. package/DotsLoader/DotsLoader.module.css +5 -5
  34. package/DotsLoader/index.d.ts +1 -3
  35. package/DotsLoader/index.js +1 -14
  36. package/Drawer/Drawer.d.ts +43 -0
  37. package/Drawer/Drawer.js +227 -0
  38. package/Drawer/Drawer.module.css +280 -0
  39. package/Drawer/index.d.ts +2 -0
  40. package/Drawer/index.js +10 -0
  41. package/Drawer/package.json +6 -0
  42. package/Dropdown/Dropdown.module.css +6 -6
  43. package/Dropdown/index.js +26 -17
  44. package/Dropdown/index.props.d.ts +7 -6
  45. package/Dropzone/Dropzone.d.ts +30 -0
  46. package/Dropzone/Dropzone.js +258 -0
  47. package/Dropzone/Dropzone.module.css +164 -0
  48. package/Dropzone/index.d.ts +2 -0
  49. package/Dropzone/index.js +7 -0
  50. package/Dropzone/package.json +6 -0
  51. package/Editable/Editable.d.ts +18 -0
  52. package/Editable/Editable.js +166 -0
  53. package/Editable/Editable.module.css +61 -0
  54. package/Editable/index.d.ts +2 -0
  55. package/Editable/index.js +10 -0
  56. package/Editable/package.json +6 -0
  57. package/Grid/Grid.module.css +2 -2
  58. package/Grid/Item/Grid-Item.module.css +3 -3
  59. package/Grid/index.js +9 -6
  60. package/Grid/index.props.d.ts +4 -3
  61. package/Icons/Check.js +1 -1
  62. package/InputRadio/InputRadio.module.css +37 -34
  63. package/Menu/Menu.module.css +2 -2
  64. package/Menu/components/MenuItem/MenuItem.module.css +8 -8
  65. package/Modal/Modal.module.css +11 -11
  66. package/Modal/components/Close/Close.module.css +1 -1
  67. package/Modal/components/Content/Content.module.css +1 -1
  68. package/MultiSelect/components/MenuOverlay/index.js +2 -4
  69. package/MultiSelect/components/MenuOverlay/index.module.css +3 -3
  70. package/MultiSelect/index.js +1 -0
  71. package/MultiSelect/index.module.css +5 -5
  72. package/Progress/Progress.d.ts +20 -0
  73. package/Progress/Progress.js +109 -0
  74. package/Progress/Progress.module.css +191 -0
  75. package/Progress/index.d.ts +2 -0
  76. package/Progress/index.js +7 -0
  77. package/Progress/package.json +6 -0
  78. package/README.md +91 -2
  79. package/RadioGroup/RadioGroup.module.css +4 -4
  80. package/Rating/Rating.d.ts +24 -0
  81. package/Rating/Rating.js +131 -0
  82. package/Rating/Rating.module.css +219 -0
  83. package/Rating/index.d.ts +2 -0
  84. package/Rating/index.js +10 -0
  85. package/Rating/package.json +6 -0
  86. package/Select/components/MenuOverlay/index.module.css +1 -1
  87. package/Select/index.js +1 -0
  88. package/Select/index.module.css +3 -3
  89. package/Separator/Separator.module.css +2 -2
  90. package/Skeleton/Skeleton.module.css +4 -4
  91. package/Skeleton/index.js +10 -6
  92. package/Skeleton/index.props.d.ts +2 -2
  93. package/Status/index.module.css +18 -17
  94. package/Switch/Switch.module.css +41 -26
  95. package/Switch/index.js +1 -0
  96. package/TabsMenu/Tab/Tab.module.css +29 -26
  97. package/TabsMenu/TabsMenu.module.css +1 -1
  98. package/TextArea/TextArea.module.css +2 -2
  99. package/Theme/colors/index.d.ts +190 -38
  100. package/Theme/colors/theme_buenos_aires.d.ts +211 -31
  101. package/Theme/colors/theme_buenos_aires.js +139 -34
  102. package/Theme/colors/theme_jaipur.d.ts +251 -0
  103. package/Theme/colors/theme_jaipur.js +157 -0
  104. package/Theme/global.css +1 -1
  105. package/Theme/index.d.ts +973 -13
  106. package/Theme/index.js +2 -2
  107. package/Theme/themes/buenos_aires.d.ts +476 -0
  108. package/Theme/themes/buenos_aires.js +626 -150
  109. package/Theme/themes/jaipur.d.ts +628 -0
  110. package/Theme/themes/jaipur.js +635 -0
  111. package/Tooltip/Tooltip.module.css +8 -8
  112. package/Tooltip/index.js +4 -3
  113. package/Typography/Typography.module.css +151 -26
  114. package/Typography/index.props.d.ts +3 -3
  115. package/base/BaseInput/BaseInput.module.css +2 -2
  116. package/base/FormField/FormField.module.css +6 -2
  117. package/base/FormField/index.js +1 -0
  118. package/base/InputRoot/InputRoot.module.css +33 -26
  119. package/base/InputRoot/index.d.ts +1 -1
  120. package/base/InputRoot/index.js +3 -2
  121. package/base/InputRoot/index.props.d.ts +1 -0
  122. package/esm/Accordion/Accordion.module.css +8 -7
  123. package/esm/Accordion/index.js +1 -1
  124. package/esm/Avatar/Avatar.module.css +50 -33
  125. package/esm/Avatar/index.js +74 -37
  126. package/esm/Badge/Badge.module.css +7 -7
  127. package/esm/Badge/index.js +3 -9
  128. package/esm/Badge/index.props.d.ts +0 -2
  129. package/esm/Button/Button.module.css +95 -135
  130. package/esm/Calendar/components/Month/Month.js +3 -5
  131. package/esm/Calendar/components/Month/index.module.css +20 -19
  132. package/esm/Calendar/components/Presets/index.module.css +4 -4
  133. package/esm/Calendar/index.module.css +26 -23
  134. package/esm/Calendar/utils/getPresets.js +2 -2
  135. package/esm/Card/Card.d.ts +25 -0
  136. package/esm/Card/Card.js +61 -0
  137. package/esm/Card/Card.module.css +90 -0
  138. package/esm/Card/index.d.ts +2 -0
  139. package/esm/Checkbox/Checkbox.module.css +38 -28
  140. package/esm/Checkbox/index.js +1 -0
  141. package/esm/Chip/Chip.module.css +34 -24
  142. package/esm/CodeField/CodeField.d.ts +29 -0
  143. package/esm/CodeField/CodeField.js +303 -0
  144. package/esm/CodeField/CodeField.module.css +211 -0
  145. package/esm/CodeField/index.d.ts +2 -0
  146. package/esm/Counter/Counter.module.css +11 -10
  147. package/esm/Datepicker/Datepicker.module.css +1 -1
  148. package/esm/Datepicker/components/DatePicker/index.module.css +22 -16
  149. package/esm/Datepicker/components/TimePicker/index.module.css +21 -15
  150. package/esm/DotsLoader/DotsLoader.module.css +5 -5
  151. package/esm/DotsLoader/index.d.ts +1 -3
  152. package/esm/DotsLoader/index.js +1 -14
  153. package/esm/Drawer/Drawer.d.ts +43 -0
  154. package/esm/Drawer/Drawer.js +216 -0
  155. package/esm/Drawer/Drawer.module.css +280 -0
  156. package/esm/Drawer/index.d.ts +2 -0
  157. package/esm/Dropdown/Dropdown.module.css +6 -6
  158. package/esm/Dropdown/index.js +27 -18
  159. package/esm/Dropdown/index.props.d.ts +7 -6
  160. package/esm/Dropzone/Dropzone.d.ts +30 -0
  161. package/esm/Dropzone/Dropzone.js +248 -0
  162. package/esm/Dropzone/Dropzone.module.css +164 -0
  163. package/esm/Dropzone/index.d.ts +2 -0
  164. package/esm/Editable/Editable.d.ts +18 -0
  165. package/esm/Editable/Editable.js +157 -0
  166. package/esm/Editable/Editable.module.css +61 -0
  167. package/esm/Editable/index.d.ts +2 -0
  168. package/esm/Grid/Grid.module.css +2 -2
  169. package/esm/Grid/Item/Grid-Item.module.css +3 -3
  170. package/esm/Grid/index.js +9 -6
  171. package/esm/Grid/index.props.d.ts +4 -3
  172. package/esm/Icons/Check.js +1 -1
  173. package/esm/InputRadio/InputRadio.module.css +37 -34
  174. package/esm/Menu/Menu.module.css +2 -2
  175. package/esm/Menu/components/MenuItem/MenuItem.module.css +8 -8
  176. package/esm/Modal/Modal.module.css +11 -11
  177. package/esm/Modal/components/Close/Close.module.css +1 -1
  178. package/esm/Modal/components/Content/Content.module.css +1 -1
  179. package/esm/MultiSelect/components/MenuOverlay/index.js +2 -4
  180. package/esm/MultiSelect/components/MenuOverlay/index.module.css +3 -3
  181. package/esm/MultiSelect/index.js +1 -0
  182. package/esm/MultiSelect/index.module.css +5 -5
  183. package/esm/Progress/Progress.d.ts +20 -0
  184. package/esm/Progress/Progress.js +102 -0
  185. package/esm/Progress/Progress.module.css +191 -0
  186. package/esm/Progress/index.d.ts +2 -0
  187. package/esm/RadioGroup/RadioGroup.module.css +4 -4
  188. package/esm/Rating/Rating.d.ts +24 -0
  189. package/esm/Rating/Rating.js +121 -0
  190. package/esm/Rating/Rating.module.css +219 -0
  191. package/esm/Rating/index.d.ts +2 -0
  192. package/esm/Select/components/MenuOverlay/index.module.css +1 -1
  193. package/esm/Select/index.js +1 -0
  194. package/esm/Select/index.module.css +3 -3
  195. package/esm/Separator/Separator.module.css +2 -2
  196. package/esm/Skeleton/Skeleton.module.css +4 -4
  197. package/esm/Skeleton/index.js +10 -6
  198. package/esm/Skeleton/index.props.d.ts +2 -2
  199. package/esm/Status/index.module.css +18 -17
  200. package/esm/Switch/Switch.module.css +41 -26
  201. package/esm/Switch/index.js +1 -0
  202. package/esm/TabsMenu/Tab/Tab.module.css +29 -26
  203. package/esm/TabsMenu/TabsMenu.module.css +1 -1
  204. package/esm/TextArea/TextArea.module.css +2 -2
  205. package/esm/Theme/colors/index.d.ts +190 -38
  206. package/esm/Theme/colors/theme_buenos_aires.d.ts +211 -31
  207. package/esm/Theme/colors/theme_buenos_aires.js +132 -34
  208. package/esm/Theme/colors/theme_jaipur.d.ts +251 -0
  209. package/esm/Theme/colors/theme_jaipur.js +140 -0
  210. package/esm/Theme/global.css +1 -1
  211. package/esm/Theme/index.d.ts +973 -13
  212. package/esm/Theme/index.js +2 -2
  213. package/esm/Theme/themes/buenos_aires.d.ts +476 -0
  214. package/esm/Theme/themes/buenos_aires.js +618 -142
  215. package/esm/Theme/themes/jaipur.d.ts +628 -0
  216. package/esm/Theme/themes/jaipur.js +631 -0
  217. package/esm/Tooltip/Tooltip.module.css +8 -8
  218. package/esm/Tooltip/index.js +4 -3
  219. package/esm/Typography/Typography.module.css +151 -26
  220. package/esm/Typography/index.props.d.ts +3 -3
  221. package/esm/base/BaseInput/BaseInput.module.css +2 -2
  222. package/esm/base/FormField/FormField.module.css +6 -2
  223. package/esm/base/FormField/index.js +1 -0
  224. package/esm/base/InputRoot/InputRoot.module.css +33 -26
  225. package/esm/base/InputRoot/index.d.ts +1 -1
  226. package/esm/base/InputRoot/index.js +3 -2
  227. package/esm/base/InputRoot/index.props.d.ts +1 -0
  228. package/esm/hooks/useOnClickOutside/index.d.ts +1 -1
  229. package/esm/hooks/useOnClickOutside/index.js +2 -2
  230. package/esm/index.d.ts +12 -0
  231. package/esm/index.js +7 -0
  232. package/esm/theme_ba_variables.css +625 -149
  233. package/esm/theme_jaipur_variables.css +627 -0
  234. package/hooks/useOnClickOutside/index.d.ts +1 -1
  235. package/hooks/useOnClickOutside/index.js +2 -2
  236. package/index.d.ts +12 -0
  237. package/index.js +26 -0
  238. package/package.json +1 -1
  239. package/theme_ba_variables.css +625 -149
  240. package/theme_jaipur_variables.css +627 -0
  241. package/Avatar/assets/org-circle.svg.js +0 -64
  242. package/Avatar/assets/user-circle.svg.js +0 -43
  243. package/Theme/colors/common.d.ts +0 -39
  244. package/Theme/colors/common.js +0 -32
  245. package/Theme/colors/index.js +0 -11
  246. package/Theme/colors/theme_default.d.ts +0 -47
  247. package/Theme/colors/theme_default.js +0 -38
  248. package/Theme/themes/default.d.ts +0 -144
  249. package/Theme/themes/default.js +0 -151
  250. package/esm/Avatar/assets/org-circle.svg.js +0 -5
  251. package/esm/Avatar/assets/user-circle.svg.js +0 -5
  252. package/esm/Theme/colors/common.d.ts +0 -39
  253. package/esm/Theme/colors/common.js +0 -24
  254. package/esm/Theme/colors/index.js +0 -7
  255. package/esm/Theme/colors/theme_default.d.ts +0 -47
  256. package/esm/Theme/colors/theme_default.js +0 -29
  257. package/esm/Theme/themes/default.d.ts +0 -144
  258. package/esm/Theme/themes/default.js +0 -147
  259. package/esm/theme_default_variables.css +0 -143
  260. 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
+ }
@@ -0,0 +1,2 @@
1
+ export { Card, CardContent, CardInnerContent } from "./Card";
2
+ export type { CardProps, CardContentProps, CardInnerContentProps, CardSize, CardOrientation, CardBackgroundType, } from "./Card";
package/Card/index.js ADDED
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var Card = require('./Card.js');
4
+
5
+
6
+
7
+ exports.Card = Card.Card;
8
+ exports.CardContent = Card.CardContent;
9
+ exports.CardInnerContent = Card.CardInnerContent;
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "../esm/Card/index.js",
4
+ "main": "./index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -6,42 +6,47 @@
6
6
  .label {
7
7
  cursor: pointer;
8
8
  display: inline-flex;
9
- line-height: 18px;
9
+ line-height: var(--component-control-line-height);
10
10
  position: relative;
11
11
  }
12
12
 
13
13
  .text {
14
- font-size: 16px;
15
- margin-block-start: -1px;
16
- margin-inline-start: 8px;
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(--palette-white);
21
- block-size: 16px;
22
- border: 1px solid var(--palette-bg-3);
23
- border-radius: 4px;
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: 16px;
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(--checkbox-bg-checked);
39
+ background-color: var(--component-control-bg-checked);
35
40
  border: 0;
36
41
  }
37
42
  .checked::after {
38
- block-size: 8px;
39
- border-block-end: 2px solid var(--palette-black);
40
- border-inline-end: 2px solid var(--palette-black);
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: 4px;
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(--palette-alert);
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: 2px solid var(--palette-black);
57
- border-inline-end: 2px solid var(--palette-black);
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: -9999px;
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: 2px solid var(--palette-bg-4);
66
- border-inline-end: 2px solid var(--palette-bg-4);
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(--palette-bg-3);
73
+ border-color: var(--component-control-border-hover);
70
74
  }
71
75
 
72
76
  .control_variant_primary:focus:not(:disabled) + .fake-checkbox {
73
- box-shadow: 0 0 0 2px var(--checkbox-box-shadow-focused);
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(--checkbox-bg-disabled);
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(--checkbox-bg-hovered);
90
+ background-color: var(--component-control-bg-hover);
84
91
  }
85
92
  .control_variant_primary:active:not(:disabled) + .fake-checkbox {
86
- background-color: var(--checkbox-bg-active);
87
- border-color: var(--checkbox-border-color-active);
88
- box-shadow: var(--checkbox-box-shadow-active);
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)));
@@ -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(--palette-bg-1);
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(--palette-white);
21
- box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
22
+ background: var(--component-chip-bg);
23
+ box-shadow: var(--shadow-raised);
22
24
  }
23
25
  .inner_inactive:hover {
24
- box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
25
- transform: translateY(-2px);
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: rgba(0, 0, 0, 0.02);
29
- box-shadow: rgba(193, 193, 193, 0.4) 0 1px 3px;
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: rgba(193, 193, 193, 0.4) 0 5px 20px;
38
+ box-shadow: var(--shadow-raised);
36
39
  transform: translateY(0);
37
40
  }
38
41
  .inner_inactive:active {
39
- box-shadow: rgba(193, 193, 193, 0.4) 0 1px 3px;
42
+ box-shadow: var(--shadow-pressed);
40
43
  }
41
44
  }
42
45
  .inner[data-size=s] {
43
- border-radius: 32px;
44
- font-size: 0.875rem;
45
- line-height: 2.2;
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: 36px;
49
- font-size: 1rem;
50
- line-height: 2.3;
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: 44px;
54
- font-size: 1.15rem;
55
- line-height: 2.4;
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: 200px;
63
- padding: 0 1rem;
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(--palette-bg-5);
78
+ color: var(--component-chip-icon);
76
79
  display: flex;
77
80
  justify-content: center;
78
- margin-left: -11px;
79
- padding-right: 0.8rem;
81
+ margin-left: calc(var(--space-3) * -1);
82
+ padding-right: var(--space-3);
80
83
  }
81
84
  .icon-right:hover {
82
- color: var(--palette-black);
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>>;