colibri-ui 0.7.35 → 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.
Files changed (310) hide show
  1. package/Badge/Badge.module.scss.js +13 -0
  2. package/Badge/Control/Control.module.scss.js +13 -0
  3. package/Badge/Control/index.js +11 -7
  4. package/Badge/index.js +26 -20
  5. package/Button/Button.module.scss.js +13 -0
  6. package/Button/index.js +27 -23
  7. package/Button/index.props.d.ts +3 -34
  8. package/Checkbox/Checkbox.module.scss.js +13 -0
  9. package/Checkbox/index.js +38 -34
  10. package/Checkbox/index.props.d.ts +1 -19
  11. package/Counter/Counter.module.scss.js +13 -0
  12. package/Counter/index.d.ts +2 -2
  13. package/Counter/index.js +40 -33
  14. package/Counter/index.props.d.ts +1 -1
  15. package/DotsLoader/DotsLoader.module.scss.js +13 -0
  16. package/DotsLoader/index.js +44 -17
  17. package/Dropdown/Dropdown.module.scss.js +13 -0
  18. package/Dropdown/index.d.ts +2 -2
  19. package/Dropdown/index.js +28 -31
  20. package/Dropdown/index.props.d.ts +2 -2
  21. package/Grid/Grid.module.scss.js +13 -0
  22. package/Grid/Item/Grid-Item.module.scss.js +13 -0
  23. package/Grid/Item/index.js +15 -10
  24. package/Grid/index.js +18 -11
  25. package/Icons/Cart.d.ts +2 -2
  26. package/Icons/Cart.js +7 -6
  27. package/Icons/Chevron.d.ts +2 -2
  28. package/Icons/Chevron.js +11 -9
  29. package/Icons/Close.d.ts +2 -2
  30. package/Icons/Close.js +13 -11
  31. package/Icons/EyeClosed.d.ts +2 -2
  32. package/Icons/EyeClosed.js +8 -6
  33. package/Icons/EyeOpen.d.ts +2 -2
  34. package/Icons/EyeOpen.js +15 -13
  35. package/Icons/Help.d.ts +2 -2
  36. package/Icons/Help.js +11 -9
  37. package/Icons/Info.d.ts +2 -2
  38. package/Icons/Info.js +9 -7
  39. package/Icons/Minus.d.ts +2 -2
  40. package/Icons/Minus.js +9 -8
  41. package/Icons/More.d.ts +2 -2
  42. package/Icons/More.js +18 -16
  43. package/Icons/Plus.d.ts +2 -2
  44. package/Icons/Plus.js +14 -13
  45. package/Icons/Trash.d.ts +2 -2
  46. package/Icons/Trash.js +11 -9
  47. package/Icons/User.d.ts +2 -2
  48. package/Icons/User.js +16 -14
  49. package/Image/Image.module.scss.js +13 -0
  50. package/Image/index.d.ts +2 -2
  51. package/Image/index.js +27 -22
  52. package/Input/index.d.ts +2 -2
  53. package/Input/index.js +21 -23
  54. package/Input/index.props.d.ts +3 -3
  55. package/Menu/Menu.module.scss.js +13 -0
  56. package/Menu/components/MenuItem/MenuItem.module.scss.js +13 -0
  57. package/Menu/components/MenuItem/index.js +24 -14
  58. package/Menu/components/MenuItem/index.props.d.ts +1 -14
  59. package/Menu/index.js +10 -6
  60. package/Menu/index.props.d.ts +3 -21
  61. package/Modal/Modal.module.scss.js +13 -0
  62. package/Modal/components/Close/Close.module.scss.js +13 -0
  63. package/Modal/components/Close/index.js +12 -3
  64. package/Modal/components/Content/Content.module.scss.js +13 -0
  65. package/Modal/components/Content/index.js +11 -5
  66. package/Modal/components/Title/Title.module.scss.js +13 -0
  67. package/Modal/components/Title/index.d.ts +0 -2
  68. package/Modal/components/Title/index.js +15 -12
  69. package/Modal/index.js +40 -33
  70. package/Select/Select.module.scss.js +13 -0
  71. package/Select/index.d.ts +2 -1
  72. package/Select/index.js +55 -45
  73. package/Separator/Separator.module.scss.js +13 -0
  74. package/Separator/index.d.ts +3 -3
  75. package/Separator/index.js +10 -4
  76. package/Skeleton/Skeleton.module.scss.js +13 -0
  77. package/Skeleton/index.js +12 -6
  78. package/Switch/Switch.module.scss.js +13 -0
  79. package/Switch/index.d.ts +2 -2
  80. package/Switch/index.js +28 -12
  81. package/Switch/index.props.d.ts +2 -15
  82. package/Theme/index.d.ts +83 -234
  83. package/Theme/index.js +2 -15
  84. package/Theme/themes/buenos_aires.d.ts +9 -185
  85. package/Theme/themes/buenos_aires.js +9 -228
  86. package/Theme/themes/default.d.ts +79 -184
  87. package/Theme/themes/default.js +80 -226
  88. package/Typography/Typography.module.scss.js +13 -0
  89. package/Typography/index.d.ts +2 -2
  90. package/Typography/index.js +18 -27
  91. package/Typography/index.props.d.ts +3 -12
  92. package/base/BaseInput/BaseInput.module.scss.js +13 -0
  93. package/base/BaseInput/index.d.ts +4 -0
  94. package/base/BaseInput/index.js +30 -0
  95. package/base/BaseInput/index.props.d.ts +4 -0
  96. package/base/FormField/FormField.module.scss.js +13 -0
  97. package/base/FormField/index.d.ts +2 -2
  98. package/base/FormField/index.js +16 -14
  99. package/base/InputRoot/InputRoot.module.scss.js +13 -0
  100. package/base/InputRoot/index.d.ts +2 -2
  101. package/base/InputRoot/index.js +20 -16
  102. package/base/InputRoot/index.props.d.ts +5 -33
  103. package/esm/Badge/Badge.module.scss.js +8 -0
  104. package/esm/Badge/Control/Control.module.scss.js +8 -0
  105. package/esm/Badge/Control/index.js +6 -7
  106. package/esm/Badge/index.js +21 -20
  107. package/esm/Button/Button.module.scss.js +8 -0
  108. package/esm/Button/index.js +23 -24
  109. package/esm/Button/index.props.d.ts +3 -34
  110. package/esm/Checkbox/Checkbox.module.scss.js +8 -0
  111. package/esm/Checkbox/index.js +33 -34
  112. package/esm/Checkbox/index.props.d.ts +1 -19
  113. package/esm/Counter/Counter.module.scss.js +8 -0
  114. package/esm/Counter/index.d.ts +2 -2
  115. package/esm/Counter/index.js +36 -34
  116. package/esm/Counter/index.props.d.ts +1 -1
  117. package/esm/DotsLoader/DotsLoader.module.scss.js +8 -0
  118. package/esm/DotsLoader/index.js +39 -17
  119. package/esm/Dropdown/Dropdown.module.scss.js +8 -0
  120. package/esm/Dropdown/index.d.ts +2 -2
  121. package/esm/Dropdown/index.js +23 -31
  122. package/esm/Dropdown/index.props.d.ts +2 -2
  123. package/esm/Grid/Grid.module.scss.js +8 -0
  124. package/esm/Grid/Item/Grid-Item.module.scss.js +8 -0
  125. package/esm/Grid/Item/index.js +10 -10
  126. package/esm/Grid/index.js +13 -11
  127. package/esm/Icons/Cart.d.ts +2 -2
  128. package/esm/Icons/Cart.js +4 -7
  129. package/esm/Icons/Chevron.d.ts +2 -2
  130. package/esm/Icons/Chevron.js +8 -10
  131. package/esm/Icons/Close.d.ts +2 -2
  132. package/esm/Icons/Close.js +10 -12
  133. package/esm/Icons/EyeClosed.d.ts +2 -2
  134. package/esm/Icons/EyeClosed.js +5 -7
  135. package/esm/Icons/EyeOpen.d.ts +2 -2
  136. package/esm/Icons/EyeOpen.js +12 -14
  137. package/esm/Icons/Help.d.ts +2 -2
  138. package/esm/Icons/Help.js +8 -10
  139. package/esm/Icons/Info.d.ts +2 -2
  140. package/esm/Icons/Info.js +6 -8
  141. package/esm/Icons/Minus.d.ts +2 -2
  142. package/esm/Icons/Minus.js +6 -9
  143. package/esm/Icons/More.d.ts +2 -2
  144. package/esm/Icons/More.js +15 -17
  145. package/esm/Icons/Plus.d.ts +2 -2
  146. package/esm/Icons/Plus.js +11 -14
  147. package/esm/Icons/Trash.d.ts +2 -2
  148. package/esm/Icons/Trash.js +8 -10
  149. package/esm/Icons/User.d.ts +2 -2
  150. package/esm/Icons/User.js +13 -15
  151. package/esm/Image/Image.module.scss.js +8 -0
  152. package/esm/Image/index.d.ts +2 -2
  153. package/esm/Image/index.js +23 -23
  154. package/esm/Input/index.d.ts +2 -2
  155. package/esm/Input/index.js +18 -25
  156. package/esm/Input/index.props.d.ts +3 -3
  157. package/esm/Menu/Menu.module.scss.js +8 -0
  158. package/esm/Menu/components/MenuItem/MenuItem.module.scss.js +8 -0
  159. package/esm/Menu/components/MenuItem/index.js +19 -14
  160. package/esm/Menu/components/MenuItem/index.props.d.ts +1 -14
  161. package/esm/Menu/index.js +6 -7
  162. package/esm/Menu/index.props.d.ts +3 -21
  163. package/esm/Modal/Modal.module.scss.js +8 -0
  164. package/esm/Modal/components/Close/Close.module.scss.js +8 -0
  165. package/esm/Modal/components/Close/index.js +7 -3
  166. package/esm/Modal/components/Content/Content.module.scss.js +8 -0
  167. package/esm/Modal/components/Content/index.js +6 -5
  168. package/esm/Modal/components/Title/Title.module.scss.js +8 -0
  169. package/esm/Modal/components/Title/index.d.ts +0 -2
  170. package/esm/Modal/components/Title/index.js +10 -12
  171. package/esm/Modal/index.js +28 -26
  172. package/esm/Select/Select.module.scss.js +8 -0
  173. package/esm/Select/index.d.ts +2 -1
  174. package/esm/Select/index.js +49 -44
  175. package/esm/Separator/Separator.module.scss.js +8 -0
  176. package/esm/Separator/index.d.ts +3 -3
  177. package/esm/Separator/index.js +5 -4
  178. package/esm/Skeleton/Skeleton.module.scss.js +8 -0
  179. package/esm/Skeleton/index.js +7 -6
  180. package/esm/Switch/Switch.module.scss.js +8 -0
  181. package/esm/Switch/index.d.ts +2 -2
  182. package/esm/Switch/index.js +25 -14
  183. package/esm/Switch/index.props.d.ts +2 -15
  184. package/esm/Theme/index.d.ts +83 -234
  185. package/esm/Theme/index.js +3 -15
  186. package/esm/Theme/themes/buenos_aires.d.ts +9 -185
  187. package/esm/Theme/themes/buenos_aires.js +7 -222
  188. package/esm/Theme/themes/default.d.ts +79 -184
  189. package/esm/Theme/themes/default.js +78 -220
  190. package/esm/Typography/Typography.module.scss.js +8 -0
  191. package/esm/Typography/index.d.ts +2 -2
  192. package/esm/Typography/index.js +15 -29
  193. package/esm/Typography/index.props.d.ts +3 -12
  194. package/esm/base/BaseInput/BaseInput.module.scss.js +8 -0
  195. package/esm/base/BaseInput/index.d.ts +4 -0
  196. package/esm/base/BaseInput/index.js +21 -0
  197. package/esm/base/BaseInput/index.props.d.ts +4 -0
  198. package/esm/base/FormField/FormField.module.scss.js +8 -0
  199. package/esm/base/FormField/index.d.ts +2 -2
  200. package/esm/base/FormField/index.js +12 -15
  201. package/esm/base/InputRoot/InputRoot.module.scss.js +8 -0
  202. package/esm/base/InputRoot/index.d.ts +2 -2
  203. package/esm/base/InputRoot/index.js +16 -17
  204. package/esm/base/InputRoot/index.props.d.ts +5 -33
  205. package/esm/hooks/useMediaSizes/index.d.ts +1 -1
  206. package/esm/index.d.ts +1 -1
  207. package/esm/index.js +1 -1
  208. package/esm/node_modules/style-inject/dist/style-inject.es.js +26 -0
  209. package/hooks/useMediaSizes/index.d.ts +1 -1
  210. package/index.d.ts +1 -1
  211. package/index.js +0 -1
  212. package/package.json +3 -51
  213. package/Badge/Control/styles.d.ts +0 -5
  214. package/Badge/Control/styles.js +0 -18
  215. package/Badge/styles.d.ts +0 -8
  216. package/Badge/styles.js +0 -31
  217. package/Button/styles.d.ts +0 -16
  218. package/Button/styles.js +0 -61
  219. package/Checkbox/styles.d.ts +0 -32
  220. package/Checkbox/styles.js +0 -75
  221. package/Counter/styles.d.ts +0 -17
  222. package/Counter/styles.js +0 -42
  223. package/DotsLoader/styles.d.ts +0 -15
  224. package/DotsLoader/styles.js +0 -41
  225. package/Dropdown/styles.d.ts +0 -9
  226. package/Dropdown/styles.js +0 -29
  227. package/Grid/Item/styles.d.ts +0 -7
  228. package/Grid/Item/styles.js +0 -21
  229. package/Grid/styles.d.ts +0 -13
  230. package/Grid/styles.js +0 -34
  231. package/Image/styles.d.ts +0 -5
  232. package/Image/styles.js +0 -18
  233. package/Menu/components/MenuItem/styles.d.ts +0 -10
  234. package/Menu/components/MenuItem/styles.js +0 -31
  235. package/Menu/styles.d.ts +0 -5
  236. package/Menu/styles.js +0 -24
  237. package/Modal/components/Close/styles.d.ts +0 -4
  238. package/Modal/components/Close/styles.js +0 -20
  239. package/Modal/components/Content/styles.d.ts +0 -5
  240. package/Modal/components/Content/styles.js +0 -18
  241. package/Modal/components/Title/styles.d.ts +0 -8
  242. package/Modal/components/Title/styles.js +0 -27
  243. package/Modal/styles.d.ts +0 -21
  244. package/Modal/styles.js +0 -61
  245. package/Select/styles.d.ts +0 -20
  246. package/Select/styles.js +0 -57
  247. package/Separator/styles.d.ts +0 -5
  248. package/Separator/styles.js +0 -21
  249. package/Skeleton/styles.d.ts +0 -9
  250. package/Skeleton/styles.js +0 -31
  251. package/Switch/styles.d.ts +0 -19
  252. package/Switch/styles.js +0 -58
  253. package/Theme/global.d.ts +0 -2
  254. package/Theme/global.js +0 -14
  255. package/Theme/index.props.d.ts +0 -18
  256. package/Typography/styles.d.ts +0 -10
  257. package/Typography/styles.js +0 -78
  258. package/base/FormField/styles.d.ts +0 -5
  259. package/base/FormField/styles.js +0 -18
  260. package/base/InputRoot/styles.d.ts +0 -27
  261. package/base/InputRoot/styles.js +0 -82
  262. package/esm/Badge/Control/styles.d.ts +0 -5
  263. package/esm/Badge/Control/styles.js +0 -12
  264. package/esm/Badge/styles.d.ts +0 -8
  265. package/esm/Badge/styles.js +0 -25
  266. package/esm/Button/styles.d.ts +0 -16
  267. package/esm/Button/styles.js +0 -54
  268. package/esm/Checkbox/styles.d.ts +0 -32
  269. package/esm/Checkbox/styles.js +0 -64
  270. package/esm/Counter/styles.d.ts +0 -17
  271. package/esm/Counter/styles.js +0 -34
  272. package/esm/DotsLoader/styles.d.ts +0 -15
  273. package/esm/DotsLoader/styles.js +0 -34
  274. package/esm/Dropdown/styles.d.ts +0 -9
  275. package/esm/Dropdown/styles.js +0 -22
  276. package/esm/Grid/Item/styles.d.ts +0 -7
  277. package/esm/Grid/Item/styles.js +0 -15
  278. package/esm/Grid/styles.d.ts +0 -13
  279. package/esm/Grid/styles.js +0 -27
  280. package/esm/Image/styles.d.ts +0 -5
  281. package/esm/Image/styles.js +0 -12
  282. package/esm/Menu/components/MenuItem/styles.d.ts +0 -10
  283. package/esm/Menu/components/MenuItem/styles.js +0 -25
  284. package/esm/Menu/styles.d.ts +0 -5
  285. package/esm/Menu/styles.js +0 -18
  286. package/esm/Modal/components/Close/styles.d.ts +0 -4
  287. package/esm/Modal/components/Close/styles.js +0 -14
  288. package/esm/Modal/components/Content/styles.d.ts +0 -5
  289. package/esm/Modal/components/Content/styles.js +0 -12
  290. package/esm/Modal/components/Title/styles.d.ts +0 -8
  291. package/esm/Modal/components/Title/styles.js +0 -21
  292. package/esm/Modal/styles.d.ts +0 -21
  293. package/esm/Modal/styles.js +0 -51
  294. package/esm/Select/styles.d.ts +0 -20
  295. package/esm/Select/styles.js +0 -48
  296. package/esm/Separator/styles.d.ts +0 -5
  297. package/esm/Separator/styles.js +0 -15
  298. package/esm/Skeleton/styles.d.ts +0 -9
  299. package/esm/Skeleton/styles.js +0 -24
  300. package/esm/Switch/styles.d.ts +0 -19
  301. package/esm/Switch/styles.js +0 -49
  302. package/esm/Theme/global.d.ts +0 -2
  303. package/esm/Theme/global.js +0 -10
  304. package/esm/Theme/index.props.d.ts +0 -18
  305. package/esm/Typography/styles.d.ts +0 -10
  306. package/esm/Typography/styles.js +0 -72
  307. package/esm/base/FormField/styles.d.ts +0 -5
  308. package/esm/base/FormField/styles.js +0 -12
  309. package/esm/base/InputRoot/styles.d.ts +0 -27
  310. 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 = ".Modal-module_root__hXsmO {\n position: fixed;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: 1000;\n}\n\n.Modal-module_titleWrapper__V74OF {\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--palette-bg-2);\n}\n\n.Modal-module_closeWrapper__DmIkN {\n display: flex;\n justify-content: flex-end;\n}\n\n.Modal-module_modalOverlay__rI8Wz {\n position: fixed;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.25);\n}\n\n.Modal-module_modalWrapper__M8-7F {\n overflow: hidden;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n background-color: var(--palette-white);\n}\n.Modal-module_modalWrapper_mobile__Py1hW {\n height: 100%;\n width: 100%;\n}\n.Modal-module_modalWrapper_desktop__xScot {\n max-height: calc(100vh - 100px);\n max-width: calc(100vw - 100px);\n min-width: 515px;\n border: solid 1px var(--palette-bg-2);\n border-radius: 8px;\n}";
8
+ var styles = {"root":"Modal-module_root__hXsmO","titleWrapper":"Modal-module_titleWrapper__V74OF","closeWrapper":"Modal-module_closeWrapper__DmIkN","modalOverlay":"Modal-module_modalOverlay__rI8Wz","modalWrapper":"Modal-module_modalWrapper__M8-7F","modalWrapper_mobile":"Modal-module_modalWrapper_mobile__Py1hW","modalWrapper_desktop":"Modal-module_modalWrapper_desktop__xScot"};
9
+ var stylesheet=".Modal-module_root__hXsmO {\n position: fixed;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: 1000;\n}\n\n.Modal-module_titleWrapper__V74OF {\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--palette-bg-2);\n}\n\n.Modal-module_closeWrapper__DmIkN {\n display: flex;\n justify-content: flex-end;\n}\n\n.Modal-module_modalOverlay__rI8Wz {\n position: fixed;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.25);\n}\n\n.Modal-module_modalWrapper__M8-7F {\n overflow: hidden;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n background-color: var(--palette-white);\n}\n.Modal-module_modalWrapper_mobile__Py1hW {\n height: 100%;\n width: 100%;\n}\n.Modal-module_modalWrapper_desktop__xScot {\n max-height: calc(100vh - 100px);\n max-width: calc(100vw - 100px);\n min-width: 515px;\n border: solid 1px var(--palette-bg-2);\n border-radius: 8px;\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 = ".Close-module_close__zHsuU {\n cursor: pointer;\n margin-right: 16px;\n}";
8
+ var styles = {"close":"Close-module_close__zHsuU"};
9
+ var stylesheet=".Close-module_close__zHsuU {\n cursor: pointer;\n margin-right: 16px;\n}";
10
+ styleInject_es.default(css_248z);
11
+
12
+ exports.default = styles;
13
+ exports.stylesheet = stylesheet;
@@ -2,12 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var jsxRuntime = require('@emotion/react/jsx-runtime');
6
- var styles = require('./styles.js');
5
+ var React = require('react');
6
+ var classNames = require('classnames');
7
+ require('../../../Icons/index.js');
8
+ var Close_module = require('./Close.module.scss.js');
9
+ var Close$1 = require('../../../Icons/Close.js');
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);
7
15
 
8
16
  var Close = function Close(_a) {
9
17
  var onClick = _a.onClick;
10
- return jsxRuntime.jsx(styles.Root, {
18
+ return /*#__PURE__*/React__default.default.createElement(Close$1.default, {
19
+ className: classNames__default.default(Close_module.default.close),
11
20
  onClick: onClick
12
21
  });
13
22
  };
@@ -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 = ".Content-module_root__V5vMS {\n overflow-y: auto;\n display: flex;\n min-height: 100%;\n padding: 10px;\n}";
8
+ var styles = {"root":"Content-module_root__V5vMS"};
9
+ var stylesheet=".Content-module_root__V5vMS {\n overflow-y: auto;\n display: flex;\n min-height: 100%;\n padding: 10px;\n}";
10
+ styleInject_es.default(css_248z);
11
+
12
+ exports.default = styles;
13
+ exports.stylesheet = stylesheet;
@@ -2,14 +2,20 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var jsxRuntime = require('@emotion/react/jsx-runtime');
6
- var styles = require('./styles.js');
5
+ var classNames = require('classnames');
6
+ var React = require('react');
7
+ var Content_module = require('./Content.module.scss.js');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var classNames__default = /*#__PURE__*/_interopDefault(classNames);
12
+ var React__default = /*#__PURE__*/_interopDefault(React);
7
13
 
8
14
  var Content = function Content(_a) {
9
15
  var children = _a.children;
10
- return jsxRuntime.jsx(styles.Wrapper, {
11
- children: children
12
- });
16
+ return /*#__PURE__*/React__default.default.createElement("div", {
17
+ className: classNames__default.default(Content_module.default.root)
18
+ }, children);
13
19
  };
14
20
 
15
21
  exports.default = Content;
@@ -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 = ".Title-module_wrapper__b1LKk {\n display: flex;\n padding: 16px;\n}";
8
+ var styles = {"wrapper":"Title-module_wrapper__b1LKk"};
9
+ var stylesheet=".Title-module_wrapper__b1LKk {\n display: flex;\n padding: 16px;\n}";
10
+ styleInject_es.default(css_248z);
11
+
12
+ exports.default = styles;
13
+ exports.stylesheet = stylesheet;
@@ -1,7 +1,5 @@
1
- import type { CSSObject } from "@emotion/react";
2
1
  import type { FC, ReactNode } from "react";
3
2
  declare const Title: FC<{
4
3
  children: ReactNode;
5
- justifyContent?: CSSObject["justifyContent"];
6
4
  }>;
7
5
  export default Title;
@@ -2,22 +2,25 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var jsxRuntime = require('@emotion/react/jsx-runtime');
5
+ var React = require('react');
6
+ var classNames = require('classnames/bind');
6
7
  var index = require('../../../Typography/index.js');
7
- var styles = require('./styles.js');
8
+ var Title_module = require('./Title.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(Title_module.default);
9
16
  var Title = function Title(_a) {
10
- var children = _a.children,
11
- _b = _a.justifyContent,
12
- justifyContent = _b === void 0 ? "flex-start" : _b;
13
- return jsxRuntime.jsx(index.default, {
17
+ var children = _a.children;
18
+ return /*#__PURE__*/React__default.default.createElement(index.default, {
14
19
  tag: "h3",
15
- size: "h3",
16
- children: jsxRuntime.jsx(styles.Wrapper, {
17
- justifyContent: justifyContent,
18
- children: children
19
- })
20
- });
20
+ size: "h3"
21
+ }, /*#__PURE__*/React__default.default.createElement("div", {
22
+ className: clx(Title_module.default.wrapper)
23
+ }, children));
21
24
  };
22
25
 
23
26
  exports.default = Title;
package/Modal/index.js CHANGED
@@ -2,29 +2,39 @@
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');
7
- var index = require('../hooks/useScrollLock/index.js');
8
- var index$1 = require('../hooks/useTrapFocus/index.js');
9
- var index$2 = require('../Portal/index.js');
10
- var index$5 = require('./components/Content/index.js');
11
- var index$4 = require('./components/Close/index.js');
12
- var index$3 = require('./components/Title/index.js');
13
- var styles = require('./styles.js');
6
+ var classNames = require('classnames/bind');
7
+ var index$1 = require('../hooks/useScrollLock/index.js');
8
+ var index$2 = require('../hooks/useTrapFocus/index.js');
9
+ var index$3 = require('../Portal/index.js');
10
+ var index = require('../hooks/useMediaSizes/index.js');
11
+ var index$6 = require('./components/Content/index.js');
12
+ var index$5 = require('./components/Close/index.js');
13
+ var index$4 = require('./components/Title/index.js');
14
+ var Modal_module = require('./Modal.module.scss.js');
14
15
 
16
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
17
+
18
+ var React__default = /*#__PURE__*/_interopDefault(React);
19
+ var classNames__default = /*#__PURE__*/_interopDefault(classNames);
20
+
21
+ var clx = classNames__default.default.bind(Modal_module.default);
15
22
  var Modal = function Modal(_a) {
16
23
  var children = _a.children,
17
24
  className = _a.className,
18
25
  onClose = _a.onClose,
19
26
  title = _a.title;
20
27
  var modalRef = React.useRef(null);
28
+ var isDesktop = index.default(function (bp) {
29
+ return bp.up("lg");
30
+ });
21
31
  var onCloseHandler = React.useMemo(function () {
22
32
  return onClose || function () {
23
33
  return {};
24
34
  };
25
35
  }, [onClose]);
26
- index.default();
27
- index$1.default(modalRef);
36
+ index$1.default();
37
+ index$2.default(modalRef);
28
38
  React.useEffect(function () {
29
39
  var onEsc = function onEsc(e) {
30
40
  if (!modalRef.current || e.code !== "Escape") return;
@@ -35,29 +45,26 @@ var Modal = function Modal(_a) {
35
45
  document.removeEventListener("keydown", onEsc);
36
46
  };
37
47
  }, [onCloseHandler]);
38
- return jsxRuntime.jsx(index$2.default, {
39
- children: jsxRuntime.jsxs(styles.Root, {
40
- children: [jsxRuntime.jsx(styles.ModalOverlay, {
41
- onClick: onCloseHandler
42
- }), jsxRuntime.jsxs(styles.ModalWrapper, {
43
- className: className,
44
- ref: modalRef,
45
- children: [title ? jsxRuntime.jsxs(styles.TitleWrapper, {
46
- children: [jsxRuntime.jsx(index$3.default, {
47
- children: title
48
- }), jsxRuntime.jsx(index$4.default, {
49
- onClick: onCloseHandler
50
- })]
51
- }) : jsxRuntime.jsx(styles.CloseWrapper, {
52
- children: jsxRuntime.jsx(index$4.default, {
53
- onClick: onCloseHandler
54
- })
55
- }), jsxRuntime.jsx(index$5.default, {
56
- children: children
57
- })]
58
- })]
59
- })
60
- });
48
+ return /*#__PURE__*/React__default.default.createElement(index$3.default, null, /*#__PURE__*/React__default.default.createElement("div", {
49
+ className: clx(Modal_module.default.root)
50
+ }, /*#__PURE__*/React__default.default.createElement("div", {
51
+ className: clx(Modal_module.default.modalOverlay),
52
+ onClick: onCloseHandler
53
+ }), /*#__PURE__*/React__default.default.createElement("div", {
54
+ className: clx(Modal_module.default.modalWrapper, {
55
+ modalWrapper_desktop: isDesktop ? 1 : 0,
56
+ modalWrapper_mobile: !isDesktop ? 1 : 0
57
+ }, className),
58
+ ref: modalRef
59
+ }, title ? ( /*#__PURE__*/React__default.default.createElement("div", {
60
+ className: clx(Modal_module.default.titleWrapper)
61
+ }, /*#__PURE__*/React__default.default.createElement(index$4.default, null, title), /*#__PURE__*/React__default.default.createElement(index$5.default, {
62
+ onClick: onCloseHandler
63
+ }))) : ( /*#__PURE__*/React__default.default.createElement("div", {
64
+ className: clx(Modal_module.default.closeWrapper)
65
+ }, /*#__PURE__*/React__default.default.createElement(index$5.default, {
66
+ onClick: onCloseHandler
67
+ }))), /*#__PURE__*/React__default.default.createElement(index$6.default, null, children))));
61
68
  };
62
69
 
63
70
  exports.default = Modal;
@@ -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 = ".Select-module_menuWrapper__WO-FX {\n max-height: 140px;\n overflow-y: auto;\n}\n\n.Select-module_icon_isOpen__cR4u7 {\n transform: rotate(180deg);\n}\n\n.Select-module_inputRoot__Mlsmy {\n cursor: pointer;\n}\n\n.Select-module_formField_fullWidth__-oeve {\n width: 100%;\n}\n\n.Select-module_baseInput__PRg7- {\n margin: 7px 0;\n background: transparent;\n border: none;\n outline: none;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.Select-module_baseInput__PRg7- ::placeholder {\n color: var(--palette-bg-2);\n}\n\n.Select-module_placeholder__tYT40 {\n user-select: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n display: block;\n color: var(--input-primary-plaseholder-color);\n}";
8
+ var styles = {"menuWrapper":"Select-module_menuWrapper__WO-FX","icon_isOpen":"Select-module_icon_isOpen__cR4u7","inputRoot":"Select-module_inputRoot__Mlsmy","formField_fullWidth":"Select-module_formField_fullWidth__-oeve","baseInput":"Select-module_baseInput__PRg7-","placeholder":"Select-module_placeholder__tYT40"};
9
+ var stylesheet=".Select-module_menuWrapper__WO-FX {\n max-height: 140px;\n overflow-y: auto;\n}\n\n.Select-module_icon_isOpen__cR4u7 {\n transform: rotate(180deg);\n}\n\n.Select-module_inputRoot__Mlsmy {\n cursor: pointer;\n}\n\n.Select-module_formField_fullWidth__-oeve {\n width: 100%;\n}\n\n.Select-module_baseInput__PRg7- {\n margin: 7px 0;\n background: transparent;\n border: none;\n outline: none;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.Select-module_baseInput__PRg7- ::placeholder {\n color: var(--palette-bg-2);\n}\n\n.Select-module_placeholder__tYT40 {\n user-select: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n display: block;\n color: var(--input-primary-plaseholder-color);\n}";
10
+ styleInject_es.default(css_248z);
11
+
12
+ exports.default = styles;
13
+ exports.stylesheet = stylesheet;
package/Select/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { SelectProps } from "./index.props";
2
- declare const Select: <T extends string | number>({ options, value, zIndex, label, hint, error, placeholder, disabled, listHeight, fullWidth, onChange, }: SelectProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ declare const Select: <T extends string | number>({ options, value, zIndex, label, hint, error, placeholder, disabled, listHeight, fullWidth, onChange, }: SelectProps<T>) => React.JSX.Element;
3
4
  export default Select;
package/Select/index.js CHANGED
@@ -2,13 +2,21 @@
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');
7
- var styles$1 = require('../base/InputRoot/styles.js');
8
- var index = require('../Dropdown/index.js');
9
- var index$1 = require('../Menu/index.js');
10
- var styles = require('./styles.js');
6
+ var Chevron = require('../Icons/Chevron.js');
7
+ var index$3 = require('../base/InputRoot/index.js');
8
+ var index = require('../base/FormField/index.js');
9
+ var index$1 = require('../Dropdown/index.js');
10
+ var index$2 = require('../Menu/index.js');
11
+ var Select_module = require('./Select.module.scss.js');
12
+ var classNames = require('classnames/bind');
11
13
 
14
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
+
16
+ var React__default = /*#__PURE__*/_interopDefault(React);
17
+ var classNames__default = /*#__PURE__*/_interopDefault(classNames);
18
+
19
+ var clx = classNames__default.default.bind(Select_module.default);
12
20
  var Select = function Select(_a) {
13
21
  var _b = _a.options,
14
22
  options = _b === void 0 ? [] : _b,
@@ -49,50 +57,52 @@ var Select = function Select(_a) {
49
57
  var lvalue = _a.value;
50
58
  onChange(lvalue);
51
59
  }, [onChange]);
52
- return jsxRuntime.jsx(styles.StyledFormField, {
53
- fullWidth: fullWidth,
60
+ return /*#__PURE__*/React__default.default.createElement(index.default, {
61
+ className: clx(Select_module.default.formField, {
62
+ formField_fullWidth: fullWidth ? 1 : 0
63
+ }),
54
64
  label: label,
55
65
  hint: hint,
66
+ error: error
67
+ }, /*#__PURE__*/React__default.default.createElement(index$1.default, {
68
+ placement: "bottom-start",
69
+ onVisibleChange: setIsOpen,
70
+ trigger: ["click"],
71
+ zIndex: zIndex,
72
+ disabled: !!disabled,
73
+ overlay: /*#__PURE__*/React__default.default.createElement("div", {
74
+ className: clx(Select_module.default.menuWrapper),
75
+ style: {
76
+ maxHeight: "".concat(listHeight, "px")
77
+ }
78
+ }, /*#__PURE__*/React__default.default.createElement(index$2.default, null, preparedOptions.map(function (option, i) {
79
+ return /*#__PURE__*/React__default.default.createElement(index$2.default.Item, {
80
+ key: "".concat(option.label, "-").concat(i),
81
+ onClick: function onClick() {
82
+ return handleSelect(option);
83
+ },
84
+ isSelected: option.selected
85
+ }, option.label);
86
+ }))),
87
+ samewidth: true
88
+ }, /*#__PURE__*/React__default.default.createElement(index$3.default, {
56
89
  error: error,
57
- children: jsxRuntime.jsx(index.default, {
58
- placement: "bottom-start",
59
- onVisibleChange: setIsOpen,
60
- trigger: ["click"],
61
- zIndex: zIndex,
62
- disabled: !!disabled,
63
- overlay: jsxRuntime.jsx(styles.MenuWrapper, {
64
- listHeight: listHeight,
65
- children: jsxRuntime.jsx(index$1.default, {
66
- children: preparedOptions.map(function (option, i) {
67
- return jsxRuntime.jsx(index$1.default.Item, {
68
- onClick: function onClick() {
69
- return handleSelect(option);
70
- },
71
- isSelected: option.selected,
72
- children: option.label
73
- }, "".concat(option.label, "-").concat(i));
74
- })
75
- })
76
- }),
77
- samewidth: true,
78
- children: jsxRuntime.jsxs(styles.StyledBaseInputRoot, {
79
- error: error,
80
- endIcon: jsxRuntime.jsx(styles.SelectIcon, {
81
- isOpen: isOpen
82
- }),
83
- disabled: !!disabled,
84
- children: [jsxRuntime.jsx(styles$1.BaseInput, {
85
- children: prepraredLabel !== null && prepraredLabel !== void 0 ? prepraredLabel : jsxRuntime.jsx(styles$1.BasePlaceholder, {
86
- children: placeholder
87
- })
88
- }), jsxRuntime.jsx("input", {
89
- type: "hidden",
90
- tabIndex: -1,
91
- value: value
92
- })]
90
+ className: clx(Select_module.default.inputRoot),
91
+ endIcon: /*#__PURE__*/React__default.default.createElement(Chevron.default, {
92
+ className: clx(Select_module.default.icon, {
93
+ icon_isOpen: isOpen ? 1 : 0
93
94
  })
94
- })
95
- });
95
+ }),
96
+ disabled: !!disabled
97
+ }, /*#__PURE__*/React__default.default.createElement("div", {
98
+ className: clx(Select_module.default.baseInput)
99
+ }, prepraredLabel !== null && prepraredLabel !== void 0 ? prepraredLabel : ( /*#__PURE__*/React__default.default.createElement("span", {
100
+ className: clx(Select_module.default.placeholder)
101
+ }, placeholder))), /*#__PURE__*/React__default.default.createElement("input", {
102
+ type: "hidden",
103
+ tabIndex: -1,
104
+ value: value
105
+ }))));
96
106
  };
97
107
 
98
108
  exports.default = Select;
@@ -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 = ".Separator-module_root__eQtZe {\n background-color: var(--palette-bg-3);\n block-size: 1px;\n inline-size: 100%;\n}";
8
+ var styles = {"root":"Separator-module_root__eQtZe"};
9
+ var stylesheet=".Separator-module_root__eQtZe {\n background-color: var(--palette-bg-3);\n block-size: 1px;\n inline-size: 100%;\n}";
10
+ styleInject_es.default(css_248z);
11
+
12
+ exports.default = styles;
13
+ exports.stylesheet = stylesheet;
@@ -1,6 +1,6 @@
1
- import { FC } from 'react';
2
- type SeparatorProps = {
1
+ import type { FC } from "react";
2
+ type Props = {
3
3
  className?: string;
4
4
  };
5
- declare const Separator: FC<SeparatorProps>;
5
+ declare const Separator: FC<Props>;
6
6
  export default Separator;
@@ -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
- var styles = require('./styles.js');
5
+ var React = require('react');
6
+ var classNames = require('classnames');
7
+ var Separator_module = require('./Separator.module.scss.js');
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);
7
13
 
8
14
  var Separator = function Separator(_a) {
9
15
  var className = _a.className;
10
- return jsxRuntime.jsx(styles.Root, {
11
- className: className
16
+ return /*#__PURE__*/React__default.default.createElement("div", {
17
+ className: classNames__default.default(Separator_module.default.root, className)
12
18
  });
13
19
  };
14
20
 
@@ -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 = ".Skeleton-module_rect__8lO4C {\n background-color: var(--palette-bg-2);\n animation: Skeleton-module_skeleton-loading__oZsSZ 1.5s ease-in-out infinite;\n}\n@keyframes Skeleton-module_skeleton-loading__oZsSZ {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.Skeleton-module_text__4oj9n {\n height: 12px;\n border-radius: 6px;\n background-color: var(--palette-bg-2);\n animation: Skeleton-module_skeleton-loading__oZsSZ 1.5s ease-in-out infinite;\n}\n@keyframes Skeleton-module_skeleton-loading__oZsSZ {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}";
8
+ var styles = {"rect":"Skeleton-module_rect__8lO4C","skeleton-loading":"Skeleton-module_skeleton-loading__oZsSZ","text":"Skeleton-module_text__4oj9n"};
9
+ var stylesheet=".Skeleton-module_rect__8lO4C {\n background-color: var(--palette-bg-2);\n animation: Skeleton-module_skeleton-loading__oZsSZ 1.5s ease-in-out infinite;\n}\n@keyframes Skeleton-module_skeleton-loading__oZsSZ {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.Skeleton-module_text__4oj9n {\n height: 12px;\n border-radius: 6px;\n background-color: var(--palette-bg-2);\n animation: Skeleton-module_skeleton-loading__oZsSZ 1.5s ease-in-out infinite;\n}\n@keyframes Skeleton-module_skeleton-loading__oZsSZ {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}";
10
+ styleInject_es.default(css_248z);
11
+
12
+ exports.default = styles;
13
+ exports.stylesheet = stylesheet;
package/Skeleton/index.js CHANGED
@@ -1,15 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var jsxRuntime = require('@emotion/react/jsx-runtime');
4
- var styles = require('./styles.js');
3
+ var React = require('react');
4
+ var classNames = require('classnames');
5
+ var Skeleton_module = require('./Skeleton.module.scss.js');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefault(React);
10
+ var classNames__default = /*#__PURE__*/_interopDefault(classNames);
5
11
 
6
12
  var SkeletonRect = function SkeletonRect(_a) {
7
13
  var className = _a.className,
8
14
  width = _a.width,
9
15
  height = _a.height,
10
16
  borderRadius = _a.borderRadius;
11
- return jsxRuntime.jsx(styles.StyledRect, {
12
- className: className,
17
+ return /*#__PURE__*/React__default.default.createElement("div", {
18
+ className: classNames__default.default(Skeleton_module.default.rect, className),
13
19
  style: {
14
20
  width: width,
15
21
  height: height,
@@ -21,8 +27,8 @@ var SkeletonText = function SkeletonText(_a) {
21
27
  var className = _a.className,
22
28
  width = _a.width,
23
29
  size = _a.size;
24
- return jsxRuntime.jsx(styles.StyledText, {
25
- className: className,
30
+ return /*#__PURE__*/React__default.default.createElement("div", {
31
+ className: classNames__default.default(Skeleton_module.default.text, className),
26
32
  style: {
27
33
  width: width,
28
34
  height: size
@@ -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 = ".Switch-module_root__DmzxH {\n position: relative;\n display: inline-flex;\n padding: 6px;\n}\n.Switch-module_root_disabled__aNYhM {\n opacity: 0.7;\n pointer-events: none;\n}\n\n.Switch-module_wrapper__Eg-Lm {\n width: 40px;\n height: 22px;\n position: relative;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-radius: 17px;\n}\n.Switch-module_wrapper_variant_primary__DSO-3 {\n border-color: var(--switch-primary-border-color);\n background-color: var(--switch-primary-background-color);\n}\n\n.Switch-module_baseSwitch__bE-cQ {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n position: absolute;\n top: 2px;\n left: 2px;\n transition: transform 150ms;\n background: var(--palette-white);\n}\n\n.Switch-module_checkbox__QYS0C {\n position: absolute;\n z-index: 1;\n left: 0px;\n top: 0px;\n width: 100%;\n height: 100%;\n cursor: pointer;\n opacity: 0;\n margin: 0;\n border: none;\n outline: none;\n padding: 0;\n}\n.Switch-module_checkbox__QYS0C:checked + .Switch-module_wrapper__Eg-Lm {\n border-color: var(--switch-primary-border-color-checked);\n background-color: var(--switch-primary-background-color-checked);\n}\n.Switch-module_checkbox__QYS0C:checked + .Switch-module_wrapper__Eg-Lm .Switch-module_baseSwitch__bE-cQ {\n transform: translateX(18px);\n}";
8
+ var styles = {"root":"Switch-module_root__DmzxH","root_disabled":"Switch-module_root_disabled__aNYhM","wrapper":"Switch-module_wrapper__Eg-Lm","wrapper_variant_primary":"Switch-module_wrapper_variant_primary__DSO-3","baseSwitch":"Switch-module_baseSwitch__bE-cQ","checkbox":"Switch-module_checkbox__QYS0C"};
9
+ var stylesheet=".Switch-module_root__DmzxH {\n position: relative;\n display: inline-flex;\n padding: 6px;\n}\n.Switch-module_root_disabled__aNYhM {\n opacity: 0.7;\n pointer-events: none;\n}\n\n.Switch-module_wrapper__Eg-Lm {\n width: 40px;\n height: 22px;\n position: relative;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-radius: 17px;\n}\n.Switch-module_wrapper_variant_primary__DSO-3 {\n border-color: var(--switch-primary-border-color);\n background-color: var(--switch-primary-background-color);\n}\n\n.Switch-module_baseSwitch__bE-cQ {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n position: absolute;\n top: 2px;\n left: 2px;\n transition: transform 150ms;\n background: var(--palette-white);\n}\n\n.Switch-module_checkbox__QYS0C {\n position: absolute;\n z-index: 1;\n left: 0px;\n top: 0px;\n width: 100%;\n height: 100%;\n cursor: pointer;\n opacity: 0;\n margin: 0;\n border: none;\n outline: none;\n padding: 0;\n}\n.Switch-module_checkbox__QYS0C:checked + .Switch-module_wrapper__Eg-Lm {\n border-color: var(--switch-primary-border-color-checked);\n background-color: var(--switch-primary-background-color-checked);\n}\n.Switch-module_checkbox__QYS0C:checked + .Switch-module_wrapper__Eg-Lm .Switch-module_baseSwitch__bE-cQ {\n transform: translateX(18px);\n}";
10
+ styleInject_es.default(css_248z);
11
+
12
+ exports.default = styles;
13
+ exports.stylesheet = stylesheet;
package/Switch/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SwitchProps } from "./index.props";
3
- declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
3
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
4
4
  export default Switch;
package/Switch/index.js CHANGED
@@ -3,20 +3,36 @@
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 styles = require('./styles.js');
7
+ var classNames = require('classnames/bind');
8
+ var Switch_module = require('./Switch.module.scss.js');
9
9
 
10
- var Switch = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
- return jsxRuntime.jsxs(styles.BaseContainer, {
12
- disabled: !!props.disabled,
13
- children: [jsxRuntime.jsx(styles.BaseInput, tslib.__assign({
14
- ref: ref,
15
- type: "checkbox"
16
- }, props)), jsxRuntime.jsx(styles.BaseSwitchContainer, {
17
- children: jsxRuntime.jsx(styles.BaseSwitch, {})
18
- })]
19
- });
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(Switch_module.default);
16
+ var Switch = /*#__PURE__*/React.forwardRef(function (_a, ref) {
17
+ var _b;
18
+ var disabled = _a.disabled,
19
+ className = _a.className,
20
+ _c = _a.variant,
21
+ variant = _c === void 0 ? "primary" : _c,
22
+ props = tslib.__rest(_a, ["disabled", "className", "variant"]);
23
+ return /*#__PURE__*/React__default.default.createElement("div", {
24
+ className: clx(Switch_module.default.root, {
25
+ root_disabled: disabled ? 1 : 0
26
+ }, className)
27
+ }, /*#__PURE__*/React__default.default.createElement("input", tslib.__assign({
28
+ className: clx(Switch_module.default.checkbox),
29
+ ref: ref,
30
+ type: "checkbox"
31
+ }, props)), /*#__PURE__*/React__default.default.createElement("div", {
32
+ className: clx(Switch_module.default.wrapper, (_b = {}, _b["wrapper_variant_".concat(variant)] = variant ? 1 : 0, _b))
33
+ }, /*#__PURE__*/React__default.default.createElement("div", {
34
+ className: clx(Switch_module.default.baseSwitch)
35
+ })));
20
36
  });
21
37
 
22
38
  exports.default = Switch;
@@ -1,18 +1,5 @@
1
- import type { CSSObject } from "@emotion/react";
2
1
  import type { InputHTMLAttributes } from "react";
3
- type SwitchStyle = {
4
- backgroundColor?: CSSObject["backgroundColor"];
5
- borderColor?: CSSObject["borderColor"];
6
- };
7
- export type SwitchStates = {
8
- circle: {
9
- backgroundColor?: CSSObject["backgroundColor"];
10
- };
11
- state: {
12
- normal: SwitchStyle;
13
- checked: SwitchStyle;
14
- };
15
- };
16
2
  export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
3
+ variant?: "primary";
4
+ disabled?: boolean;
17
5
  }
18
- export {};