colibri-ui 0.8.0 → 0.8.1

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 (817) hide show
  1. package/.babelrc +7 -0
  2. package/.config/jest/__mocks__/noop.js +1 -0
  3. package/.config/jest/jest.config.ts +207 -0
  4. package/.config/jest/jest.setup.ts +4 -0
  5. package/.prettierignore +5 -0
  6. package/.prettierrc +8 -0
  7. package/.storybook/AddonThemesSwitcher/constants.ts +7 -0
  8. package/.storybook/AddonThemesSwitcher/index.ts +45 -0
  9. package/.storybook/AddonThemesSwitcher/register.tsx +79 -0
  10. package/.storybook/main.ts +18 -0
  11. package/.storybook/manager.tsx +1 -0
  12. package/.storybook/preview-head.html +19 -0
  13. package/.storybook/preview.tsx +14 -0
  14. package/.stylelintrc.json +17 -0
  15. package/@types/image.d.ts +5 -0
  16. package/@types/typings.d.ts +2 -0
  17. package/eslint.config.mjs +83 -0
  18. package/package.json +86 -4
  19. package/rollup.config.js +81 -0
  20. package/scripts/buildSass.js +23 -0
  21. package/scripts/copyFiles.js +32 -0
  22. package/scripts/postbuild.js +52 -0
  23. package/scripts/transformCSS.js +35 -0
  24. package/scripts/updateImports.js +16 -0
  25. package/scripts/variables.ts +29 -0
  26. package/{Accordion/Accordion.module.css → src/components/Accordion/Accordion.module.scss} +9 -7
  27. package/src/components/Accordion/Accordion.stories.tsx +47 -0
  28. package/src/components/Accordion/index.tsx +71 -0
  29. package/{Avatar/Avatar.module.css → src/components/Avatar/Avatar.module.scss} +4 -3
  30. package/src/components/Avatar/assets/org-circle.svg +1 -0
  31. package/src/components/Avatar/assets/user-circle.svg +1 -0
  32. package/src/components/Avatar/constants.ts +7 -0
  33. package/src/components/Avatar/index.props.ts +17 -0
  34. package/src/components/Avatar/index.stories.tsx +36 -0
  35. package/src/components/Avatar/index.tsx +49 -0
  36. package/{esm/Badge/Badge.module.css → src/components/Badge/Badge.module.scss} +16 -13
  37. package/{esm/Badge/Control/Control.module.css → src/components/Badge/Control/Control.module.scss} +1 -1
  38. package/{esm/Badge/Control/index.props.d.ts → src/components/Badge/Control/index.props.ts} +1 -1
  39. package/src/components/Badge/Control/index.tsx +16 -0
  40. package/src/components/Badge/__tests__/Badge.test.tsx +27 -0
  41. package/src/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap +28 -0
  42. package/src/components/Badge/index.props.ts +12 -0
  43. package/src/components/Badge/index.stories.tsx +68 -0
  44. package/src/components/Badge/index.tsx +60 -0
  45. package/src/components/Button/Button.module.scss +265 -0
  46. package/src/components/Button/index.props.ts +23 -0
  47. package/src/components/Button/index.stories.tsx +109 -0
  48. package/src/components/Button/index.tsx +50 -0
  49. package/src/components/Calendar/components/ContinueButton/index.module.scss +6 -0
  50. package/src/components/Calendar/components/ContinueButton/index.tsx +45 -0
  51. package/src/components/Calendar/components/Month/Month.tsx +172 -0
  52. package/{esm/Calendar/components/Month/index.module.css → src/components/Calendar/components/Month/index.module.scss} +62 -48
  53. package/{esm/Calendar/components/Presets/index.module.css → src/components/Calendar/components/Presets/index.module.scss} +14 -11
  54. package/src/components/Calendar/components/Presets/index.tsx +48 -0
  55. package/{Calendar/index.module.css → src/components/Calendar/index.module.scss} +51 -37
  56. package/src/components/Calendar/index.props.ts +34 -0
  57. package/src/components/Calendar/index.stories.tsx +45 -0
  58. package/src/components/Calendar/index.tsx +251 -0
  59. package/src/components/Calendar/utils/__tests__/getNumberOfMonthsBetweenDates.test.ts +27 -0
  60. package/src/components/Calendar/utils/getMonthWeeks.ts +135 -0
  61. package/src/components/Calendar/utils/getNumberOfMonthsBetweenDates.ts +28 -0
  62. package/src/components/Calendar/utils/getPresets.ts +114 -0
  63. package/src/components/Calendar/utils/getStartMonth.ts +19 -0
  64. package/src/components/Checkbox/Checkbox.module.scss +106 -0
  65. package/src/components/Checkbox/index.props.ts +18 -0
  66. package/src/components/Checkbox/index.stories.tsx +76 -0
  67. package/src/components/Checkbox/index.tsx +61 -0
  68. package/src/components/Chip/Chip.module.scss +93 -0
  69. package/src/components/Chip/index.props.ts +10 -0
  70. package/src/components/Chip/index.stories.tsx +97 -0
  71. package/src/components/Chip/index.tsx +52 -0
  72. package/src/components/ClickOutside/index.tsx +36 -0
  73. package/{esm/Counter/Counter.module.css → src/components/Counter/Counter.module.scss} +9 -7
  74. package/src/components/Counter/index.props.ts +9 -0
  75. package/src/components/Counter/index.stories.tsx +40 -0
  76. package/src/components/Counter/index.tsx +67 -0
  77. package/{esm/Datepicker/Datepicker.module.css → src/components/Datepicker/Datepicker.module.scss} +1 -1
  78. package/{esm/Datepicker/components/DatePicker/index.module.css → src/components/Datepicker/components/DatePicker/index.module.scss} +2 -0
  79. package/src/components/Datepicker/components/DatePicker/index.props.ts +5 -0
  80. package/src/components/Datepicker/components/DatePicker/index.tsx +75 -0
  81. package/src/components/Datepicker/components/TimePicker/Label/index.tsx +20 -0
  82. package/src/components/Datepicker/components/TimePicker/helpers.ts +42 -0
  83. package/{esm/Datepicker/components/TimePicker/index.module.css → src/components/Datepicker/components/TimePicker/index.module.scss} +1 -1
  84. package/src/components/Datepicker/components/TimePicker/index.props.ts +8 -0
  85. package/src/components/Datepicker/components/TimePicker/index.tsx +60 -0
  86. package/src/components/Datepicker/index.props.ts +7 -0
  87. package/src/components/Datepicker/index.stories.tsx +29 -0
  88. package/src/components/Datepicker/index.tsx +23 -0
  89. package/{esm/DotsLoader/DotsLoader.module.css → src/components/DotsLoader/DotsLoader.module.scss} +19 -12
  90. package/src/components/DotsLoader/index.stories.tsx +26 -0
  91. package/src/components/DotsLoader/index.tsx +29 -0
  92. package/{esm/Dropdown/Dropdown.module.css → src/components/Dropdown/Dropdown.module.scss} +1 -1
  93. package/src/components/Dropdown/__tests__/Dropdown.test.tsx +75 -0
  94. package/src/components/Dropdown/index.props.ts +27 -0
  95. package/src/components/Dropdown/index.stories.tsx +40 -0
  96. package/src/components/Dropdown/index.tsx +210 -0
  97. package/{esm/Grid/Grid.module.css → src/components/Grid/Grid.module.scss} +2 -1
  98. package/{Grid/Item/Grid-Item.module.css → src/components/Grid/Item/Grid-Item.module.scss} +2 -2
  99. package/{esm/Grid/Item/index.props.d.ts → src/components/Grid/Item/index.props.ts} +4 -3
  100. package/src/components/Grid/Item/index.tsx +21 -0
  101. package/src/components/Grid/index.props.ts +6 -0
  102. package/src/components/Grid/index.stories.tsx +56 -0
  103. package/src/components/Grid/index.tsx +26 -0
  104. package/src/components/Icons/ArrowNext.tsx +27 -0
  105. package/src/components/Icons/Cart.tsx +23 -0
  106. package/src/components/Icons/Check.tsx +32 -0
  107. package/src/components/Icons/Chevron.tsx +27 -0
  108. package/src/components/Icons/Close.tsx +21 -0
  109. package/src/components/Icons/CrossFill.tsx +22 -0
  110. package/src/components/Icons/Edit.tsx +25 -0
  111. package/src/components/Icons/Exit.tsx +26 -0
  112. package/src/components/Icons/EyeClosed.tsx +22 -0
  113. package/src/components/Icons/EyeOpen.tsx +30 -0
  114. package/src/components/Icons/Help.tsx +20 -0
  115. package/src/components/Icons/Info.tsx +25 -0
  116. package/src/components/Icons/Minus.tsx +26 -0
  117. package/src/components/Icons/More.tsx +24 -0
  118. package/src/components/Icons/Plus.tsx +25 -0
  119. package/src/components/Icons/Setting.tsx +28 -0
  120. package/src/components/Icons/Trash.tsx +27 -0
  121. package/src/components/Icons/User.tsx +33 -0
  122. package/{esm/Icons/index.props.d.ts → src/components/Icons/index.props.ts} +5 -4
  123. package/src/components/Icons/index.stories.tsx +71 -0
  124. package/src/components/Image/Image.module.scss +16 -0
  125. package/src/components/Image/index.props.ts +14 -0
  126. package/src/components/Image/index.stories.tsx +23 -0
  127. package/src/components/Image/index.tsx +67 -0
  128. package/src/components/Input/index.props.ts +25 -0
  129. package/src/components/Input/index.stories.tsx +70 -0
  130. package/src/components/Input/index.tsx +49 -0
  131. package/src/components/InputRadio/InputRadio.module.scss +117 -0
  132. package/src/components/InputRadio/index.tsx +108 -0
  133. package/{Menu/Menu.module.css → src/components/Menu/Menu.module.scss} +1 -1
  134. package/src/components/Menu/__tests__/Menu.test.tsx +46 -0
  135. package/src/components/Menu/components/MenuItem/MenuItem.module.scss +44 -0
  136. package/src/components/Menu/components/MenuItem/index.props.ts +11 -0
  137. package/src/components/Menu/components/MenuItem/index.tsx +41 -0
  138. package/src/components/Menu/index.props.ts +13 -0
  139. package/src/components/Menu/index.stories.tsx +36 -0
  140. package/src/components/Menu/index.tsx +49 -0
  141. package/{esm/Modal/Modal.module.css → src/components/Modal/Modal.module.scss} +14 -12
  142. package/{esm/Modal/components/Close/Close.module.css → src/components/Modal/components/Close/Close.module.scss} +1 -1
  143. package/src/components/Modal/components/Close/index.tsx +12 -0
  144. package/{Modal/components/Content/Content.module.css → src/components/Modal/components/Content/Content.module.scss} +1 -1
  145. package/src/components/Modal/components/Content/index.tsx +10 -0
  146. package/{esm/Modal/components/Title/Title.module.css → src/components/Modal/components/Title/Title.module.scss} +1 -1
  147. package/src/components/Modal/components/Title/index.tsx +15 -0
  148. package/src/components/Modal/index.props.ts +5 -0
  149. package/src/components/Modal/index.stories.tsx +32 -0
  150. package/src/components/Modal/index.tsx +76 -0
  151. package/{esm/MultiSelect/components/MenuOverlay/index.module.css → src/components/MultiSelect/components/MenuOverlay/index.module.scss} +1 -1
  152. package/src/components/MultiSelect/components/MenuOverlay/index.tsx +120 -0
  153. package/src/components/MultiSelect/components/MenuOverlayItem/index.tsx +28 -0
  154. package/{esm/MultiSelect/index.module.css → src/components/MultiSelect/index.module.scss} +9 -6
  155. package/src/components/MultiSelect/index.props.ts +37 -0
  156. package/src/components/MultiSelect/index.stories.tsx +62 -0
  157. package/src/components/MultiSelect/index.tsx +171 -0
  158. package/src/components/MultiSelect/utils/index.ts +6 -0
  159. package/src/components/Portal/index.tsx +18 -0
  160. package/src/components/RadioGroup/Radio.tsx +56 -0
  161. package/src/components/RadioGroup/RadioGroup.module.scss +37 -0
  162. package/src/components/RadioGroup/RadioGroup.stories.tsx +101 -0
  163. package/src/components/RadioGroup/index.tsx +92 -0
  164. package/src/components/Select/__tests__/Select.test.tsx +37 -0
  165. package/{Select/components/MenuOverlay/index.module.css → src/components/Select/components/MenuOverlay/index.module.scss} +1 -1
  166. package/src/components/Select/components/MenuOverlay/index.tsx +66 -0
  167. package/src/components/Select/components/MenuOverlayItem/index.tsx +53 -0
  168. package/{Select/index.module.css → src/components/Select/index.module.scss} +15 -11
  169. package/src/components/Select/index.props.ts +32 -0
  170. package/src/components/Select/index.stories.tsx +52 -0
  171. package/src/components/Select/index.tsx +106 -0
  172. package/{Separator/Separator.module.css → src/components/Separator/Separator.module.scss} +1 -1
  173. package/src/components/Separator/Separator.stories.tsx +12 -0
  174. package/src/components/Separator/index.tsx +14 -0
  175. package/src/components/Skeleton/Skeleton.module.scss +39 -0
  176. package/src/components/Skeleton/index.props.ts +12 -0
  177. package/src/components/Skeleton/index.stories.tsx +45 -0
  178. package/src/components/Skeleton/index.tsx +24 -0
  179. package/src/components/Status/index.module.scss +54 -0
  180. package/src/components/Status/index.props.ts +14 -0
  181. package/src/components/Status/index.stories.tsx +42 -0
  182. package/src/components/Status/index.tsx +22 -0
  183. package/{esm/Switch/Switch.module.css → src/components/Switch/Switch.module.scss} +21 -15
  184. package/src/components/Switch/index.props.ts +8 -0
  185. package/src/components/Switch/index.stories.tsx +27 -0
  186. package/src/components/Switch/index.tsx +40 -0
  187. package/src/components/TabsMenu/Tab/Tab.module.scss +78 -0
  188. package/src/components/TabsMenu/Tab/Tab.props.ts +20 -0
  189. package/src/components/TabsMenu/Tab/Tab.tsx +40 -0
  190. package/{TabsMenu/TabsMenu.module.css → src/components/TabsMenu/TabsMenu.module.scss} +1 -1
  191. package/src/components/TabsMenu/index.props.ts +13 -0
  192. package/src/components/TabsMenu/index.stories.tsx +40 -0
  193. package/src/components/TabsMenu/index.tsx +110 -0
  194. package/src/components/TabsPanes/Pane/Pane.tsx +14 -0
  195. package/src/components/TabsPanes/Pane/index.props.ts +8 -0
  196. package/src/components/TabsPanes/__tests__/TabsPanes.test.tsx +39 -0
  197. package/src/components/TabsPanes/__tests__/__snapshots__/TabsPanes.test.tsx.snap +189 -0
  198. package/{TabsPanes/index.props.d.ts → src/components/TabsPanes/index.props.ts} +5 -4
  199. package/src/components/TabsPanes/index.stories.tsx +29 -0
  200. package/src/components/TabsPanes/index.tsx +37 -0
  201. package/{esm/TextArea/TextArea.module.css → src/components/TextArea/TextArea.module.scss} +4 -3
  202. package/src/components/TextArea/index.props.ts +23 -0
  203. package/src/components/TextArea/index.stories.tsx +33 -0
  204. package/src/components/TextArea/index.tsx +56 -0
  205. package/src/components/Theme/breakpoints.ts +52 -0
  206. package/src/components/Theme/colors/common.ts +31 -0
  207. package/src/components/Theme/colors/index.ts +9 -0
  208. package/{esm/Theme/colors/theme_buenos_aires.js → src/components/Theme/colors/theme_buenos_aires.ts} +23 -14
  209. package/{esm/Theme/colors/theme_default.js → src/components/Theme/colors/theme_default.ts} +19 -12
  210. package/src/components/Theme/global.scss +59 -0
  211. package/src/components/Theme/index.stories.tsx +70 -0
  212. package/src/components/Theme/index.tsx +7 -0
  213. package/{esm/Theme/themes/buenos_aires.js → src/components/Theme/themes/buenos_aires.ts} +18 -5
  214. package/{esm/Theme/themes/default.js → src/components/Theme/themes/default.ts} +17 -5
  215. package/src/components/TimeSelect/Label/index.tsx +20 -0
  216. package/src/components/TimeSelect/helpers.ts +37 -0
  217. package/src/components/TimeSelect/index.props.ts +4 -0
  218. package/src/components/TimeSelect/index.stories.tsx +64 -0
  219. package/src/components/TimeSelect/index.tsx +66 -0
  220. package/src/components/Tooltip/Tooltip.module.scss +148 -0
  221. package/src/components/Tooltip/__tests__/Tooltip.test.tsx +55 -0
  222. package/src/components/Tooltip/index.props.ts +27 -0
  223. package/src/components/Tooltip/index.stories.tsx +50 -0
  224. package/src/components/Tooltip/index.tsx +151 -0
  225. package/src/components/Typography/Typography.module.scss +83 -0
  226. package/src/components/Typography/index.props.ts +37 -0
  227. package/src/components/Typography/index.stories.tsx +70 -0
  228. package/src/components/Typography/index.tsx +35 -0
  229. package/{esm/base/BaseInput/BaseInput.module.css → src/components/base/BaseInput/BaseInput.module.scss} +4 -3
  230. package/src/components/base/BaseInput/index.props.ts +7 -0
  231. package/src/components/base/BaseInput/index.tsx +21 -0
  232. package/src/components/base/FormField/FormField.module.scss +12 -0
  233. package/src/components/base/FormField/index.props.ts +11 -0
  234. package/src/components/base/FormField/index.tsx +36 -0
  235. package/src/components/base/InputRoot/InputRoot.module.scss +93 -0
  236. package/src/components/base/InputRoot/index.props.ts +18 -0
  237. package/src/components/base/InputRoot/index.tsx +39 -0
  238. package/src/components/helpers/__tests__/generateUniqID.test.ts +7 -0
  239. package/src/components/helpers/date/index.ts +76 -0
  240. package/src/components/helpers/generateUniqID.ts +6 -0
  241. package/src/components/helpers/on.ts +13 -0
  242. package/src/components/hooks/useMediaSizes/index.ts +50 -0
  243. package/src/components/hooks/useOnClickOutside/index.ts +39 -0
  244. package/src/components/hooks/useScrollLock/index.ts +26 -0
  245. package/src/components/hooks/useTrapFocus/index.ts +49 -0
  246. package/src/components/lib/keyboard.ts +46 -0
  247. package/src/components/libs/numbers/__tests__/leadingZeros.test.ts +10 -0
  248. package/{esm/libs/numbers/leadingZeros.js → src/components/libs/numbers/leadingZeros.ts} +4 -4
  249. package/{libs/requestIdleCallback/index.js → src/components/libs/requestIdleCallback/index.ts} +5 -5
  250. package/tsconfig.json +49 -0
  251. package/Accordion/index.d.ts +0 -9
  252. package/Accordion/index.js +0 -67
  253. package/Accordion/package.json +0 -6
  254. package/Avatar/assets/org-circle.svg.js +0 -64
  255. package/Avatar/assets/user-circle.svg.js +0 -43
  256. package/Avatar/constants.d.ts +0 -7
  257. package/Avatar/constants.js +0 -10
  258. package/Avatar/index.d.ts +0 -4
  259. package/Avatar/index.js +0 -49
  260. package/Avatar/index.props.d.ts +0 -15
  261. package/Avatar/index.props.js +0 -7
  262. package/Avatar/package.json +0 -6
  263. package/Badge/Badge.module.css +0 -30
  264. package/Badge/Control/Control.module.css +0 -6
  265. package/Badge/Control/index.d.ts +0 -3
  266. package/Badge/Control/index.js +0 -23
  267. package/Badge/Control/index.props.d.ts +0 -3
  268. package/Badge/index.d.ts +0 -4
  269. package/Badge/index.js +0 -48
  270. package/Badge/index.props.d.ts +0 -11
  271. package/Badge/package.json +0 -6
  272. package/Button/Button.module.css +0 -225
  273. package/Button/index.d.ts +0 -4
  274. package/Button/index.js +0 -56
  275. package/Button/index.props.d.ts +0 -14
  276. package/Button/package.json +0 -6
  277. package/Calendar/components/ContinueButton/index.d.ts +0 -10
  278. package/Calendar/components/ContinueButton/index.js +0 -45
  279. package/Calendar/components/ContinueButton/index.module.css +0 -4
  280. package/Calendar/components/Month/Month.d.ts +0 -17
  281. package/Calendar/components/Month/Month.js +0 -144
  282. package/Calendar/components/Month/index.module.css +0 -143
  283. package/Calendar/components/Presets/index.d.ts +0 -19
  284. package/Calendar/components/Presets/index.js +0 -68
  285. package/Calendar/components/Presets/index.module.css +0 -28
  286. package/Calendar/index.d.ts +0 -4
  287. package/Calendar/index.js +0 -222
  288. package/Calendar/index.props.d.ts +0 -21
  289. package/Calendar/package.json +0 -6
  290. package/Calendar/utils/getMonthWeeks.d.ts +0 -20
  291. package/Calendar/utils/getMonthWeeks.js +0 -81
  292. package/Calendar/utils/getNumberOfMonthsBetweenDates.d.ts +0 -4
  293. package/Calendar/utils/getNumberOfMonthsBetweenDates.js +0 -21
  294. package/Calendar/utils/getPresets.d.ts +0 -10
  295. package/Calendar/utils/getStartMonth.d.ts +0 -6
  296. package/Calendar/utils/getStartMonth.js +0 -15
  297. package/Checkbox/Checkbox.module.css +0 -89
  298. package/Checkbox/index.d.ts +0 -4
  299. package/Checkbox/index.js +0 -59
  300. package/Checkbox/index.props.d.ts +0 -17
  301. package/Checkbox/package.json +0 -6
  302. package/Chip/Chip.module.css +0 -83
  303. package/Chip/index.d.ts +0 -4
  304. package/Chip/index.js +0 -56
  305. package/Chip/index.props.d.ts +0 -10
  306. package/Chip/package.json +0 -6
  307. package/ClickOutside/index.d.ts +0 -5
  308. package/ClickOutside/index.js +0 -36
  309. package/ClickOutside/package.json +0 -6
  310. package/Counter/Counter.module.css +0 -34
  311. package/Counter/index.d.ts +0 -4
  312. package/Counter/index.js +0 -71
  313. package/Counter/index.props.d.ts +0 -9
  314. package/Counter/package.json +0 -6
  315. package/Datepicker/Datepicker.module.css +0 -4
  316. package/Datepicker/components/DatePicker/index.d.ts +0 -4
  317. package/Datepicker/components/DatePicker/index.js +0 -74
  318. package/Datepicker/components/DatePicker/index.module.css +0 -56
  319. package/Datepicker/components/DatePicker/index.props.d.ts +0 -5
  320. package/Datepicker/components/TimePicker/Label/index.d.ts +0 -8
  321. package/Datepicker/components/TimePicker/Label/index.js +0 -27
  322. package/Datepicker/components/TimePicker/helpers.d.ts +0 -12
  323. package/Datepicker/components/TimePicker/helpers.js +0 -41
  324. package/Datepicker/components/TimePicker/index.d.ts +0 -4
  325. package/Datepicker/components/TimePicker/index.js +0 -67
  326. package/Datepicker/components/TimePicker/index.module.css +0 -58
  327. package/Datepicker/components/TimePicker/index.props.d.ts +0 -8
  328. package/Datepicker/index.d.ts +0 -4
  329. package/Datepicker/index.js +0 -35
  330. package/Datepicker/index.props.d.ts +0 -7
  331. package/Datepicker/package.json +0 -6
  332. package/DotsLoader/DotsLoader.module.css +0 -39
  333. package/DotsLoader/index.d.ts +0 -5
  334. package/DotsLoader/index.js +0 -55
  335. package/DotsLoader/package.json +0 -6
  336. package/Dropdown/Dropdown.module.css +0 -14
  337. package/Dropdown/index.d.ts +0 -4
  338. package/Dropdown/index.js +0 -165
  339. package/Dropdown/index.props.d.ts +0 -20
  340. package/Dropdown/package.json +0 -6
  341. package/Grid/Grid.module.css +0 -15
  342. package/Grid/Item/index.d.ts +0 -4
  343. package/Grid/Item/index.js +0 -28
  344. package/Grid/Item/index.props.d.ts +0 -6
  345. package/Grid/index.d.ts +0 -4
  346. package/Grid/index.js +0 -34
  347. package/Grid/index.props.d.ts +0 -6
  348. package/Grid/package.json +0 -6
  349. package/Icons/ArrowNext.d.ts +0 -4
  350. package/Icons/ArrowNext.js +0 -36
  351. package/Icons/Cart.d.ts +0 -4
  352. package/Icons/Cart.js +0 -34
  353. package/Icons/Check.d.ts +0 -4
  354. package/Icons/Check.js +0 -42
  355. package/Icons/Chevron.d.ts +0 -4
  356. package/Icons/Chevron.js +0 -37
  357. package/Icons/Close.d.ts +0 -4
  358. package/Icons/Close.js +0 -35
  359. package/Icons/CrossFill.d.ts +0 -4
  360. package/Icons/CrossFill.js +0 -33
  361. package/Icons/Edit.d.ts +0 -4
  362. package/Icons/Edit.js +0 -35
  363. package/Icons/Exit.d.ts +0 -4
  364. package/Icons/Exit.js +0 -36
  365. package/Icons/EyeClosed.d.ts +0 -4
  366. package/Icons/EyeClosed.js +0 -34
  367. package/Icons/EyeOpen.d.ts +0 -4
  368. package/Icons/EyeOpen.js +0 -41
  369. package/Icons/Help.d.ts +0 -4
  370. package/Icons/Help.js +0 -34
  371. package/Icons/Info.d.ts +0 -4
  372. package/Icons/Info.js +0 -35
  373. package/Icons/Minus.d.ts +0 -4
  374. package/Icons/Minus.js +0 -35
  375. package/Icons/More.d.ts +0 -4
  376. package/Icons/More.js +0 -44
  377. package/Icons/Plus.d.ts +0 -4
  378. package/Icons/Plus.js +0 -34
  379. package/Icons/Setting.d.ts +0 -4
  380. package/Icons/Setting.js +0 -43
  381. package/Icons/Trash.d.ts +0 -4
  382. package/Icons/Trash.js +0 -37
  383. package/Icons/User.d.ts +0 -4
  384. package/Icons/User.js +0 -42
  385. package/Icons/index.js +0 -39
  386. package/Icons/index.props.d.ts +0 -7
  387. package/Icons/package.json +0 -6
  388. package/Image/Image.module.css +0 -14
  389. package/Image/index.d.ts +0 -4
  390. package/Image/index.js +0 -72
  391. package/Image/index.props.d.ts +0 -10
  392. package/Image/package.json +0 -6
  393. package/Input/index.d.ts +0 -4
  394. package/Input/index.js +0 -55
  395. package/Input/index.props.d.ts +0 -16
  396. package/Input/package.json +0 -6
  397. package/InputRadio/InputRadio.module.css +0 -95
  398. package/InputRadio/index.d.ts +0 -23
  399. package/InputRadio/index.js +0 -80
  400. package/InputRadio/package.json +0 -6
  401. package/Menu/components/MenuItem/MenuItem.module.css +0 -35
  402. package/Menu/components/MenuItem/index.d.ts +0 -5
  403. package/Menu/components/MenuItem/index.js +0 -43
  404. package/Menu/components/MenuItem/index.props.d.ts +0 -10
  405. package/Menu/index.d.ts +0 -4
  406. package/Menu/index.js +0 -48
  407. package/Menu/index.props.d.ts +0 -11
  408. package/Menu/package.json +0 -6
  409. package/Modal/Modal.module.css +0 -51
  410. package/Modal/components/Close/Close.module.css +0 -4
  411. package/Modal/components/Close/index.d.ts +0 -5
  412. package/Modal/components/Close/index.js +0 -29
  413. package/Modal/components/Content/index.d.ts +0 -3
  414. package/Modal/components/Content/index.js +0 -23
  415. package/Modal/components/Title/Title.module.css +0 -9
  416. package/Modal/components/Title/index.d.ts +0 -3
  417. package/Modal/components/Title/index.js +0 -29
  418. package/Modal/index.d.ts +0 -4
  419. package/Modal/index.js +0 -71
  420. package/Modal/index.props.d.ts +0 -5
  421. package/Modal/package.json +0 -6
  422. package/MultiSelect/components/MenuOverlay/index.d.ts +0 -19
  423. package/MultiSelect/components/MenuOverlay/index.js +0 -103
  424. package/MultiSelect/components/MenuOverlay/index.module.css +0 -9
  425. package/MultiSelect/components/MenuOverlayItem/index.d.ts +0 -13
  426. package/MultiSelect/components/MenuOverlayItem/index.js +0 -28
  427. package/MultiSelect/index.d.ts +0 -4
  428. package/MultiSelect/index.js +0 -169
  429. package/MultiSelect/index.module.css +0 -49
  430. package/MultiSelect/index.props.d.ts +0 -32
  431. package/MultiSelect/package.json +0 -6
  432. package/MultiSelect/utils/index.d.ts +0 -1
  433. package/MultiSelect/utils/index.js +0 -7
  434. package/Portal/index.d.ts +0 -5
  435. package/Portal/index.js +0 -24
  436. package/Portal/package.json +0 -6
  437. package/RadioGroup/Radio.d.ts +0 -19
  438. package/RadioGroup/Radio.js +0 -45
  439. package/RadioGroup/RadioGroup.module.css +0 -31
  440. package/RadioGroup/index.d.ts +0 -26
  441. package/RadioGroup/index.js +0 -65
  442. package/RadioGroup/package.json +0 -6
  443. package/Select/components/MenuOverlay/index.d.ts +0 -11
  444. package/Select/components/MenuOverlay/index.js +0 -65
  445. package/Select/components/MenuOverlayItem/index.d.ts +0 -14
  446. package/Select/components/MenuOverlayItem/index.js +0 -47
  447. package/Select/index.d.ts +0 -4
  448. package/Select/index.js +0 -108
  449. package/Select/index.props.d.ts +0 -28
  450. package/Select/package.json +0 -6
  451. package/Separator/index.d.ts +0 -6
  452. package/Separator/index.js +0 -22
  453. package/Separator/package.json +0 -6
  454. package/Skeleton/Skeleton.module.css +0 -33
  455. package/Skeleton/index.d.ts +0 -4
  456. package/Skeleton/index.js +0 -41
  457. package/Skeleton/index.props.d.ts +0 -11
  458. package/Skeleton/package.json +0 -6
  459. package/Status/index.d.ts +0 -5
  460. package/Status/index.js +0 -28
  461. package/Status/index.module.css +0 -45
  462. package/Status/index.props.d.ts +0 -12
  463. package/Status/package.json +0 -6
  464. package/Switch/Switch.module.css +0 -56
  465. package/Switch/index.d.ts +0 -4
  466. package/Switch/index.js +0 -40
  467. package/Switch/index.props.d.ts +0 -6
  468. package/Switch/package.json +0 -6
  469. package/TabsMenu/Tab/Tab.d.ts +0 -4
  470. package/TabsMenu/Tab/Tab.js +0 -39
  471. package/TabsMenu/Tab/Tab.module.css +0 -66
  472. package/TabsMenu/Tab/Tab.props.d.ts +0 -14
  473. package/TabsMenu/index.d.ts +0 -4
  474. package/TabsMenu/index.js +0 -93
  475. package/TabsMenu/index.props.d.ts +0 -11
  476. package/TabsMenu/package.json +0 -6
  477. package/TabsPanes/Pane/Pane.d.ts +0 -3
  478. package/TabsPanes/Pane/Pane.js +0 -22
  479. package/TabsPanes/Pane/index.props.d.ts +0 -7
  480. package/TabsPanes/index.d.ts +0 -4
  481. package/TabsPanes/index.js +0 -35
  482. package/TabsPanes/package.json +0 -6
  483. package/TextArea/TextArea.module.css +0 -16
  484. package/TextArea/index.d.ts +0 -4
  485. package/TextArea/index.js +0 -62
  486. package/TextArea/index.props.d.ts +0 -13
  487. package/TextArea/package.json +0 -6
  488. package/Theme/breakpoints.d.ts +0 -18
  489. package/Theme/breakpoints.js +0 -38
  490. package/Theme/colors/common.d.ts +0 -39
  491. package/Theme/colors/common.js +0 -34
  492. package/Theme/colors/index.d.ts +0 -64
  493. package/Theme/colors/index.js +0 -12
  494. package/Theme/colors/theme_buenos_aires.d.ts +0 -69
  495. package/Theme/colors/theme_buenos_aires.js +0 -53
  496. package/Theme/colors/theme_default.d.ts +0 -47
  497. package/Theme/colors/theme_default.js +0 -40
  498. package/Theme/global.css +0 -50
  499. package/Theme/index.d.ts +0 -296
  500. package/Theme/index.js +0 -11
  501. package/Theme/package.json +0 -6
  502. package/Theme/themes/buenos_aires.d.ts +0 -152
  503. package/Theme/themes/buenos_aires.js +0 -159
  504. package/Theme/themes/default.d.ts +0 -144
  505. package/Theme/themes/default.js +0 -151
  506. package/TimeSelect/Label/index.d.ts +0 -8
  507. package/TimeSelect/Label/index.js +0 -27
  508. package/TimeSelect/helpers.d.ts +0 -9
  509. package/TimeSelect/helpers.js +0 -41
  510. package/TimeSelect/index.d.ts +0 -11
  511. package/TimeSelect/index.js +0 -53
  512. package/TimeSelect/index.props.d.ts +0 -4
  513. package/TimeSelect/package.json +0 -6
  514. package/Tooltip/Tooltip.module.css +0 -122
  515. package/Tooltip/index.d.ts +0 -4
  516. package/Tooltip/index.js +0 -114
  517. package/Tooltip/index.props.d.ts +0 -11
  518. package/Tooltip/package.json +0 -6
  519. package/Typography/Typography.module.css +0 -64
  520. package/Typography/index.d.ts +0 -4
  521. package/Typography/index.js +0 -36
  522. package/Typography/index.props.d.ts +0 -13
  523. package/Typography/package.json +0 -6
  524. package/base/BaseInput/BaseInput.module.css +0 -13
  525. package/base/BaseInput/index.d.ts +0 -4
  526. package/base/BaseInput/index.js +0 -31
  527. package/base/BaseInput/index.props.d.ts +0 -5
  528. package/base/FormField/FormField.module.css +0 -11
  529. package/base/FormField/index.d.ts +0 -4
  530. package/base/FormField/index.js +0 -37
  531. package/base/FormField/index.props.d.ts +0 -10
  532. package/base/InputRoot/InputRoot.module.css +0 -76
  533. package/base/InputRoot/index.d.ts +0 -4
  534. package/base/InputRoot/index.js +0 -41
  535. package/base/InputRoot/index.props.d.ts +0 -15
  536. package/esm/Accordion/Accordion.module.css +0 -51
  537. package/esm/Accordion/index.d.ts +0 -9
  538. package/esm/Accordion/index.js +0 -57
  539. package/esm/Avatar/Avatar.module.css +0 -15
  540. package/esm/Avatar/assets/org-circle.svg.js +0 -39
  541. package/esm/Avatar/assets/user-circle.svg.js +0 -18
  542. package/esm/Avatar/constants.d.ts +0 -7
  543. package/esm/Avatar/constants.js +0 -10
  544. package/esm/Avatar/index.d.ts +0 -4
  545. package/esm/Avatar/index.js +0 -39
  546. package/esm/Avatar/index.props.d.ts +0 -15
  547. package/esm/Avatar/index.props.js +0 -7
  548. package/esm/Badge/Control/index.d.ts +0 -3
  549. package/esm/Badge/Control/index.js +0 -15
  550. package/esm/Badge/index.d.ts +0 -4
  551. package/esm/Badge/index.js +0 -38
  552. package/esm/Badge/index.props.d.ts +0 -11
  553. package/esm/Button/Button.module.css +0 -225
  554. package/esm/Button/index.d.ts +0 -4
  555. package/esm/Button/index.js +0 -46
  556. package/esm/Button/index.props.d.ts +0 -14
  557. package/esm/Calendar/components/ContinueButton/index.d.ts +0 -10
  558. package/esm/Calendar/components/ContinueButton/index.js +0 -37
  559. package/esm/Calendar/components/ContinueButton/index.module.css +0 -4
  560. package/esm/Calendar/components/Month/Month.d.ts +0 -17
  561. package/esm/Calendar/components/Month/Month.js +0 -118
  562. package/esm/Calendar/components/Presets/index.d.ts +0 -19
  563. package/esm/Calendar/components/Presets/index.js +0 -42
  564. package/esm/Calendar/index.d.ts +0 -4
  565. package/esm/Calendar/index.js +0 -212
  566. package/esm/Calendar/index.module.css +0 -92
  567. package/esm/Calendar/index.props.d.ts +0 -21
  568. package/esm/Calendar/utils/getMonthWeeks.d.ts +0 -20
  569. package/esm/Calendar/utils/getMonthWeeks.js +0 -79
  570. package/esm/Calendar/utils/getNumberOfMonthsBetweenDates.d.ts +0 -4
  571. package/esm/Calendar/utils/getNumberOfMonthsBetweenDates.js +0 -19
  572. package/esm/Calendar/utils/getPresets.d.ts +0 -10
  573. package/esm/Calendar/utils/getStartMonth.d.ts +0 -6
  574. package/esm/Calendar/utils/getStartMonth.js +0 -13
  575. package/esm/Checkbox/Checkbox.module.css +0 -89
  576. package/esm/Checkbox/index.d.ts +0 -4
  577. package/esm/Checkbox/index.js +0 -49
  578. package/esm/Checkbox/index.props.d.ts +0 -17
  579. package/esm/Chip/Chip.module.css +0 -83
  580. package/esm/Chip/index.d.ts +0 -4
  581. package/esm/Chip/index.js +0 -46
  582. package/esm/Chip/index.props.d.ts +0 -10
  583. package/esm/ClickOutside/index.d.ts +0 -5
  584. package/esm/ClickOutside/index.js +0 -27
  585. package/esm/Counter/index.d.ts +0 -4
  586. package/esm/Counter/index.js +0 -61
  587. package/esm/Counter/index.props.d.ts +0 -9
  588. package/esm/Datepicker/components/DatePicker/index.d.ts +0 -4
  589. package/esm/Datepicker/components/DatePicker/index.js +0 -64
  590. package/esm/Datepicker/components/DatePicker/index.props.d.ts +0 -5
  591. package/esm/Datepicker/components/TimePicker/Label/index.d.ts +0 -8
  592. package/esm/Datepicker/components/TimePicker/Label/index.js +0 -19
  593. package/esm/Datepicker/components/TimePicker/helpers.d.ts +0 -12
  594. package/esm/Datepicker/components/TimePicker/helpers.js +0 -35
  595. package/esm/Datepicker/components/TimePicker/index.d.ts +0 -4
  596. package/esm/Datepicker/components/TimePicker/index.js +0 -57
  597. package/esm/Datepicker/components/TimePicker/index.props.d.ts +0 -8
  598. package/esm/Datepicker/index.d.ts +0 -4
  599. package/esm/Datepicker/index.js +0 -25
  600. package/esm/Datepicker/index.props.d.ts +0 -7
  601. package/esm/DotsLoader/index.d.ts +0 -5
  602. package/esm/DotsLoader/index.js +0 -45
  603. package/esm/Dropdown/index.d.ts +0 -4
  604. package/esm/Dropdown/index.js +0 -155
  605. package/esm/Dropdown/index.props.d.ts +0 -20
  606. package/esm/Grid/Item/Grid-Item.module.css +0 -9
  607. package/esm/Grid/Item/index.d.ts +0 -4
  608. package/esm/Grid/Item/index.js +0 -18
  609. package/esm/Grid/index.d.ts +0 -4
  610. package/esm/Grid/index.js +0 -24
  611. package/esm/Grid/index.props.d.ts +0 -6
  612. package/esm/Icons/ArrowNext.d.ts +0 -4
  613. package/esm/Icons/ArrowNext.js +0 -28
  614. package/esm/Icons/Cart.d.ts +0 -4
  615. package/esm/Icons/Cart.js +0 -26
  616. package/esm/Icons/Check.d.ts +0 -4
  617. package/esm/Icons/Check.js +0 -34
  618. package/esm/Icons/Chevron.d.ts +0 -4
  619. package/esm/Icons/Chevron.js +0 -29
  620. package/esm/Icons/Close.d.ts +0 -4
  621. package/esm/Icons/Close.js +0 -27
  622. package/esm/Icons/CrossFill.d.ts +0 -4
  623. package/esm/Icons/CrossFill.js +0 -25
  624. package/esm/Icons/Edit.d.ts +0 -4
  625. package/esm/Icons/Edit.js +0 -27
  626. package/esm/Icons/Exit.d.ts +0 -4
  627. package/esm/Icons/Exit.js +0 -28
  628. package/esm/Icons/EyeClosed.d.ts +0 -4
  629. package/esm/Icons/EyeClosed.js +0 -26
  630. package/esm/Icons/EyeOpen.d.ts +0 -4
  631. package/esm/Icons/EyeOpen.js +0 -33
  632. package/esm/Icons/Help.d.ts +0 -4
  633. package/esm/Icons/Help.js +0 -26
  634. package/esm/Icons/Info.d.ts +0 -4
  635. package/esm/Icons/Info.js +0 -27
  636. package/esm/Icons/Minus.d.ts +0 -4
  637. package/esm/Icons/Minus.js +0 -27
  638. package/esm/Icons/More.d.ts +0 -4
  639. package/esm/Icons/More.js +0 -36
  640. package/esm/Icons/Plus.d.ts +0 -4
  641. package/esm/Icons/Plus.js +0 -26
  642. package/esm/Icons/Setting.d.ts +0 -4
  643. package/esm/Icons/Setting.js +0 -35
  644. package/esm/Icons/Trash.d.ts +0 -4
  645. package/esm/Icons/Trash.js +0 -29
  646. package/esm/Icons/User.d.ts +0 -4
  647. package/esm/Icons/User.js +0 -34
  648. package/esm/Icons/index.d.ts +0 -17
  649. package/esm/Icons/index.js +0 -17
  650. package/esm/Image/Image.module.css +0 -14
  651. package/esm/Image/index.d.ts +0 -4
  652. package/esm/Image/index.js +0 -62
  653. package/esm/Image/index.props.d.ts +0 -10
  654. package/esm/Input/index.d.ts +0 -4
  655. package/esm/Input/index.js +0 -46
  656. package/esm/Input/index.props.d.ts +0 -16
  657. package/esm/InputRadio/InputRadio.module.css +0 -95
  658. package/esm/InputRadio/index.d.ts +0 -23
  659. package/esm/InputRadio/index.js +0 -70
  660. package/esm/Menu/Menu.module.css +0 -8
  661. package/esm/Menu/components/MenuItem/MenuItem.module.css +0 -35
  662. package/esm/Menu/components/MenuItem/index.d.ts +0 -5
  663. package/esm/Menu/components/MenuItem/index.js +0 -33
  664. package/esm/Menu/components/MenuItem/index.props.d.ts +0 -10
  665. package/esm/Menu/index.d.ts +0 -4
  666. package/esm/Menu/index.js +0 -38
  667. package/esm/Menu/index.props.d.ts +0 -11
  668. package/esm/Modal/components/Close/index.d.ts +0 -5
  669. package/esm/Modal/components/Close/index.js +0 -19
  670. package/esm/Modal/components/Content/Content.module.css +0 -6
  671. package/esm/Modal/components/Content/index.d.ts +0 -3
  672. package/esm/Modal/components/Content/index.js +0 -13
  673. package/esm/Modal/components/Title/index.d.ts +0 -3
  674. package/esm/Modal/components/Title/index.js +0 -19
  675. package/esm/Modal/index.d.ts +0 -4
  676. package/esm/Modal/index.js +0 -61
  677. package/esm/Modal/index.props.d.ts +0 -5
  678. package/esm/MultiSelect/components/MenuOverlay/index.d.ts +0 -19
  679. package/esm/MultiSelect/components/MenuOverlay/index.js +0 -93
  680. package/esm/MultiSelect/components/MenuOverlayItem/index.d.ts +0 -13
  681. package/esm/MultiSelect/components/MenuOverlayItem/index.js +0 -20
  682. package/esm/MultiSelect/index.d.ts +0 -4
  683. package/esm/MultiSelect/index.js +0 -159
  684. package/esm/MultiSelect/index.props.d.ts +0 -32
  685. package/esm/MultiSelect/utils/index.d.ts +0 -1
  686. package/esm/MultiSelect/utils/index.js +0 -5
  687. package/esm/Portal/index.d.ts +0 -5
  688. package/esm/Portal/index.js +0 -16
  689. package/esm/RadioGroup/Radio.d.ts +0 -19
  690. package/esm/RadioGroup/Radio.js +0 -37
  691. package/esm/RadioGroup/RadioGroup.module.css +0 -31
  692. package/esm/RadioGroup/index.d.ts +0 -26
  693. package/esm/RadioGroup/index.js +0 -55
  694. package/esm/Select/components/MenuOverlay/index.d.ts +0 -11
  695. package/esm/Select/components/MenuOverlay/index.js +0 -55
  696. package/esm/Select/components/MenuOverlay/index.module.css +0 -4
  697. package/esm/Select/components/MenuOverlayItem/index.d.ts +0 -14
  698. package/esm/Select/components/MenuOverlayItem/index.js +0 -39
  699. package/esm/Select/index.d.ts +0 -4
  700. package/esm/Select/index.js +0 -98
  701. package/esm/Select/index.module.css +0 -37
  702. package/esm/Select/index.props.d.ts +0 -28
  703. package/esm/Separator/Separator.module.css +0 -5
  704. package/esm/Separator/index.d.ts +0 -6
  705. package/esm/Separator/index.js +0 -12
  706. package/esm/Skeleton/Skeleton.module.css +0 -33
  707. package/esm/Skeleton/index.d.ts +0 -4
  708. package/esm/Skeleton/index.js +0 -32
  709. package/esm/Skeleton/index.props.d.ts +0 -11
  710. package/esm/Status/index.d.ts +0 -5
  711. package/esm/Status/index.js +0 -18
  712. package/esm/Status/index.module.css +0 -45
  713. package/esm/Status/index.props.d.ts +0 -12
  714. package/esm/Switch/index.d.ts +0 -4
  715. package/esm/Switch/index.js +0 -30
  716. package/esm/Switch/index.props.d.ts +0 -6
  717. package/esm/TabsMenu/Tab/Tab.d.ts +0 -4
  718. package/esm/TabsMenu/Tab/Tab.js +0 -29
  719. package/esm/TabsMenu/Tab/Tab.module.css +0 -66
  720. package/esm/TabsMenu/Tab/Tab.props.d.ts +0 -14
  721. package/esm/TabsMenu/TabsMenu.module.css +0 -8
  722. package/esm/TabsMenu/index.d.ts +0 -4
  723. package/esm/TabsMenu/index.js +0 -83
  724. package/esm/TabsMenu/index.props.d.ts +0 -11
  725. package/esm/TabsPanes/Pane/Pane.d.ts +0 -3
  726. package/esm/TabsPanes/Pane/Pane.js +0 -15
  727. package/esm/TabsPanes/Pane/index.props.d.ts +0 -7
  728. package/esm/TabsPanes/index.d.ts +0 -4
  729. package/esm/TabsPanes/index.js +0 -26
  730. package/esm/TabsPanes/index.props.d.ts +0 -8
  731. package/esm/TextArea/index.d.ts +0 -4
  732. package/esm/TextArea/index.js +0 -51
  733. package/esm/TextArea/index.props.d.ts +0 -13
  734. package/esm/Theme/breakpoints.d.ts +0 -18
  735. package/esm/Theme/breakpoints.js +0 -34
  736. package/esm/Theme/colors/common.d.ts +0 -39
  737. package/esm/Theme/colors/common.js +0 -26
  738. package/esm/Theme/colors/index.d.ts +0 -64
  739. package/esm/Theme/colors/index.js +0 -8
  740. package/esm/Theme/colors/theme_buenos_aires.d.ts +0 -69
  741. package/esm/Theme/colors/theme_default.d.ts +0 -47
  742. package/esm/Theme/global.css +0 -50
  743. package/esm/Theme/index.d.ts +0 -296
  744. package/esm/Theme/index.js +0 -9
  745. package/esm/Theme/themes/buenos_aires.d.ts +0 -152
  746. package/esm/Theme/themes/default.d.ts +0 -144
  747. package/esm/TimeSelect/Label/index.d.ts +0 -8
  748. package/esm/TimeSelect/Label/index.js +0 -19
  749. package/esm/TimeSelect/helpers.d.ts +0 -9
  750. package/esm/TimeSelect/helpers.js +0 -35
  751. package/esm/TimeSelect/index.d.ts +0 -11
  752. package/esm/TimeSelect/index.js +0 -45
  753. package/esm/TimeSelect/index.props.d.ts +0 -4
  754. package/esm/Tooltip/Tooltip.module.css +0 -122
  755. package/esm/Tooltip/index.d.ts +0 -4
  756. package/esm/Tooltip/index.js +0 -104
  757. package/esm/Tooltip/index.props.d.ts +0 -11
  758. package/esm/Typography/Typography.module.css +0 -64
  759. package/esm/Typography/index.d.ts +0 -4
  760. package/esm/Typography/index.js +0 -26
  761. package/esm/Typography/index.props.d.ts +0 -13
  762. package/esm/base/BaseInput/index.d.ts +0 -4
  763. package/esm/base/BaseInput/index.js +0 -21
  764. package/esm/base/BaseInput/index.props.d.ts +0 -5
  765. package/esm/base/FormField/FormField.module.css +0 -11
  766. package/esm/base/FormField/index.d.ts +0 -4
  767. package/esm/base/FormField/index.js +0 -27
  768. package/esm/base/FormField/index.props.d.ts +0 -10
  769. package/esm/base/InputRoot/InputRoot.module.css +0 -76
  770. package/esm/base/InputRoot/index.d.ts +0 -4
  771. package/esm/base/InputRoot/index.js +0 -31
  772. package/esm/base/InputRoot/index.props.d.ts +0 -15
  773. package/esm/helpers/date/index.d.ts +0 -12
  774. package/esm/helpers/date/index.js +0 -73
  775. package/esm/helpers/generateUniqID.d.ts +0 -2
  776. package/esm/helpers/on.d.ts +0 -1
  777. package/esm/helpers/on.js +0 -10
  778. package/esm/hooks/useMediaSizes/index.d.ts +0 -5
  779. package/esm/hooks/useMediaSizes/index.js +0 -36
  780. package/esm/hooks/useOnClickOutside/index.d.ts +0 -3
  781. package/esm/hooks/useOnClickOutside/index.js +0 -28
  782. package/esm/hooks/useScrollLock/index.d.ts +0 -2
  783. package/esm/hooks/useScrollLock/index.js +0 -22
  784. package/esm/hooks/useTrapFocus/index.d.ts +0 -3
  785. package/esm/hooks/useTrapFocus/index.js +0 -30
  786. package/esm/index.js +0 -54
  787. package/esm/lib/keyboard.d.ts +0 -4
  788. package/esm/lib/keyboard.js +0 -25
  789. package/esm/libs/numbers/leadingZeros.d.ts +0 -4
  790. package/esm/libs/requestIdleCallback/index.d.ts +0 -5
  791. package/esm/libs/requestIdleCallback/index.js +0 -11
  792. package/esm/theme_ba_variables.css +0 -151
  793. package/esm/theme_default_variables.css +0 -143
  794. package/helpers/date/index.d.ts +0 -12
  795. package/helpers/date/index.js +0 -84
  796. package/helpers/generateUniqID.d.ts +0 -2
  797. package/helpers/on.d.ts +0 -1
  798. package/helpers/on.js +0 -12
  799. package/hooks/useMediaSizes/index.d.ts +0 -5
  800. package/hooks/useMediaSizes/index.js +0 -40
  801. package/hooks/useOnClickOutside/index.d.ts +0 -3
  802. package/hooks/useOnClickOutside/index.js +0 -32
  803. package/hooks/useScrollLock/index.d.ts +0 -2
  804. package/hooks/useScrollLock/index.js +0 -26
  805. package/hooks/useTrapFocus/index.d.ts +0 -3
  806. package/hooks/useTrapFocus/index.js +0 -34
  807. package/index.d.ts +0 -37
  808. package/index.js +0 -113
  809. package/lib/keyboard.d.ts +0 -4
  810. package/lib/keyboard.js +0 -28
  811. package/libs/numbers/leadingZeros.d.ts +0 -4
  812. package/libs/numbers/leadingZeros.js +0 -14
  813. package/libs/requestIdleCallback/index.d.ts +0 -5
  814. package/theme_ba_variables.css +0 -151
  815. package/theme_default_variables.css +0 -143
  816. /package/{Icons/index.d.ts → src/components/Icons/index.tsx} +0 -0
  817. /package/{esm/index.d.ts → src/components/index.ts} +0 -0
@@ -0,0 +1,81 @@
1
+ import typescript from "@rollup/plugin-typescript";
2
+ import babel from "@rollup/plugin-babel";
3
+ import url from "@rollup/plugin-url";
4
+ import { nodeResolve } from "@rollup/plugin-node-resolve";
5
+ import commonjs from "@rollup/plugin-commonjs";
6
+ import svgr from "@svgr/rollup";
7
+ import { DEFAULT_EXTENSIONS } from "@babel/core";
8
+
9
+ const external = (id) =>
10
+ (!id.startsWith(".") && !id.startsWith("/")) || id.endsWith(".scss");
11
+
12
+ const getBabelOptions = ({ value }) => ({
13
+ babelrc: false,
14
+ presets: [
15
+ ["@babel/preset-env", { modules: false }],
16
+ "@babel/preset-react",
17
+ "@babel/preset-typescript",
18
+ ],
19
+ plugins: [["@babel/transform-runtime", { useESModules: value }]],
20
+ babelHelpers: "runtime",
21
+ exclude: "/node_modules/**",
22
+ extensions: [...DEFAULT_EXTENSIONS, ".ts", ".tsx"],
23
+ });
24
+
25
+ export default [
26
+ {
27
+ input: "./src/components/index.ts",
28
+ output: [
29
+ {
30
+ dir: "dist/esm",
31
+ format: "esm",
32
+ preserveModules: true,
33
+ preserveModulesRoot: "src/components",
34
+ interop: "auto",
35
+ },
36
+ ],
37
+ external,
38
+ treeshake: false,
39
+ plugins: [
40
+ url(),
41
+ svgr(),
42
+ nodeResolve({
43
+ preferBuiltins: true,
44
+ extensions: [".ts", ".tsx"],
45
+ }),
46
+ typescript(),
47
+ commonjs({
48
+ include: "node_modules/**",
49
+ }),
50
+ babel(getBabelOptions(true)),
51
+ ],
52
+ },
53
+ {
54
+ input: "./src/components/index.ts",
55
+ output: [
56
+ {
57
+ dir: "dist",
58
+ format: "cjs",
59
+ preserveModules: true,
60
+ preserveModulesRoot: "src/components",
61
+ exports: "named",
62
+ interop: "auto",
63
+ },
64
+ ],
65
+ external,
66
+ treeshake: false,
67
+ plugins: [
68
+ url(),
69
+ svgr(),
70
+ nodeResolve({
71
+ preferBuiltins: true,
72
+ extensions: [".ts", ".tsx"],
73
+ }),
74
+ typescript({ outDir: "dist", declarationDir: "dist" }),
75
+ commonjs({
76
+ include: "node_modules/**",
77
+ }),
78
+ babel(getBabelOptions(false)),
79
+ ],
80
+ },
81
+ ];
@@ -0,0 +1,23 @@
1
+ const { writeFile, mkdir } = require('fs-extra');
2
+ const { relative, join, dirname } = require("path");
3
+ const fg = require("fast-glob");
4
+ const sass = require('sass')
5
+
6
+ const inputDir = './src';
7
+ const distPaths = ["dist", "dist/esm"];
8
+
9
+ async function compileSass() {
10
+ const files = await fg(`${inputDir}/**/*.scss`);
11
+ files.forEach(async (fileName) => {
12
+ const relativePath = relative(`${inputDir}/components`, fileName);
13
+ const result = sass.compile(fileName);
14
+
15
+ for (const outputDir of distPaths) {
16
+ const outputFilePath = join(outputDir, relativePath.replace(/\.scss$/, '.css'));
17
+ await mkdir(dirname(outputFilePath), { recursive: true });
18
+ await writeFile(outputFilePath, result.css);
19
+ }
20
+ })
21
+ }
22
+
23
+ compileSass().catch(err => console.error(err));
@@ -0,0 +1,32 @@
1
+ const path = require("path");
2
+ const { existsSync, writeFileSync } = require("fs");
3
+ const { execSync } = require("child_process");
4
+
5
+ const existPackageJson = existsSync("package.json");
6
+ const existReadme = existsSync("README.md");
7
+
8
+ if (existPackageJson) {
9
+ try {
10
+ execSync("cp package.json dist", { stdio: "inherit" });
11
+ const packageJsonPath = path.join(
12
+ path.resolve(__dirname, "../dist"),
13
+ "package.json",
14
+ );
15
+ const packageJson = require(packageJsonPath);
16
+ packageJson.scripts = {};
17
+ packageJson.devDependencies = {};
18
+ writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
19
+ } catch (err) {
20
+ throw new Error(
21
+ `Could not copy package.json file because of an error: ${err}`,
22
+ );
23
+ }
24
+ }
25
+
26
+ if (existReadme) {
27
+ try {
28
+ execSync("cp README.md dist", { stdio: "inherit" });
29
+ } catch (err) {
30
+ throw new Error(`Could not copy .npmrc file because of an error: ${err}`);
31
+ }
32
+ }
@@ -0,0 +1,52 @@
1
+ const path = require("path");
2
+ const {
3
+ promises: { readdir },
4
+ writeFileSync,
5
+ } = require("fs");
6
+
7
+ const generatePackageJsons = async () => {
8
+ try {
9
+ const components = (
10
+ await readdir(path.resolve(__dirname, "../dist"), { withFileTypes: true })
11
+ )
12
+ .filter((dir) => dir.isDirectory())
13
+ .filter((dir) => {
14
+ if (dir.name[0].toUpperCase() == dir.name[0]) {
15
+ return dir.name;
16
+ }
17
+ })
18
+ .map((dir) => dir.name);
19
+
20
+ for (let item of components) {
21
+ const packageJsonContent = {
22
+ sideEffects: false,
23
+ module: `../esm/${item}/index.js`,
24
+ main: "./index.js",
25
+ types: "./index.d.ts",
26
+ };
27
+ const componentPath = path.join(
28
+ path.resolve(__dirname, `../dist/`),
29
+ item,
30
+ );
31
+ writeFileSync(
32
+ `${componentPath}/package.json`,
33
+ JSON.stringify(packageJsonContent, null, 2),
34
+ );
35
+ }
36
+ } catch (err) {
37
+ throw new Error(
38
+ `Could not create package.json file because of an error: ${err}`,
39
+ );
40
+ }
41
+ };
42
+
43
+ async function run() {
44
+ try {
45
+ await generatePackageJsons();
46
+ } catch (err) {
47
+ console.error(err);
48
+ process.exit(1);
49
+ }
50
+ }
51
+
52
+ run();
@@ -0,0 +1,35 @@
1
+ const { dirname, relative, resolve } = require("path");
2
+ const { readFile, writeFile, ensureDir } = require('fs-extra');
3
+ const fg = require("fast-glob");
4
+ const postcss = require('postcss')
5
+
6
+ const inputDir = './src';
7
+ const distPaths = ["dist", "dist/esm"];
8
+
9
+ const plugins = [
10
+ require('postcss-import')(),
11
+ require('autoprefixer'),
12
+ ];
13
+
14
+ const transformCSS = async () => {
15
+ const files = await fg(`${inputDir}/**/*.scss`);
16
+ const firstDistPath = distPaths[0];
17
+ const postcssProcessor = postcss([
18
+ ...plugins
19
+ ]);
20
+
21
+ files.forEach(async (fileName) => {
22
+ const css = await readFile(fileName);
23
+ const distFilename = resolve(firstDistPath, relative(inputDir, fileName));
24
+ const processedCss = await postcssProcessor.process(css, { from: fileName, to: distFilename });
25
+ for (const outputDir of distPaths) {
26
+ const relativePath = relative(`${inputDir}/components`, fileName);
27
+ const newPath = resolve(outputDir, relativePath);
28
+ await ensureDir(dirname(newPath));
29
+ writeFile(newPath, processedCss.css);
30
+ console.log(`Compiled ${newPath} to SASS.`);
31
+ }
32
+ });
33
+ };
34
+
35
+ transformCSS().catch(err => console.error(err));
@@ -0,0 +1,16 @@
1
+ const { writeFile, readFile } = require('fs-extra');
2
+ const fg = require("fast-glob");
3
+
4
+ const inputDir = 'dist';
5
+
6
+ async function updateTsImports() {
7
+ const files = await fg(`${inputDir}/**/*.js`);
8
+
9
+ for (const file of files) {
10
+ const fileContent = await readFile(file, 'utf-8');
11
+ const updatedTsFileContent = fileContent.replace(/\.scss/g, '.css');
12
+ await writeFile(file, updatedTsFileContent);
13
+ }
14
+ }
15
+
16
+ updateTsImports().catch(err => console.error(err));
@@ -0,0 +1,29 @@
1
+ const { writeFile, ensureDir } = require('fs-extra');
2
+ const { resolve, dirname } = require("path");
3
+ const { THEMES } = require('../src/components/Theme');
4
+
5
+ const inputDir = './src';
6
+ const distPaths = ["dist", "dist/esm"];
7
+
8
+ async function variables() {
9
+ let themeDefault = "";
10
+ let themeBA = "";
11
+ Object.entries(THEMES.DEFAULT).forEach(([key, value]) => {
12
+ themeDefault += `--${key}: ${value};\r\n`;
13
+ });
14
+ Object.entries(THEMES.BA).forEach(([key, value]) => {
15
+ themeBA += `--${key}: ${value};\r\n`;
16
+ });
17
+ const defaultContent = `.theme {\r\n${themeDefault}}`;
18
+ const baContent = `.theme {\r\n${themeBA}}`;
19
+
20
+ for (const outputDir of distPaths) {
21
+ const defaultPath = resolve(outputDir, 'theme_default_variables.css');
22
+ const baPath = resolve(outputDir, 'theme_ba_variables.css');
23
+ await ensureDir(dirname(defaultPath));
24
+ await writeFile(defaultPath, defaultContent);
25
+ await writeFile(baPath, baContent);
26
+ }
27
+ }
28
+
29
+ variables().catch(err => console.error(err));
@@ -21,9 +21,10 @@
21
21
  inline-size: 100%;
22
22
  outline: none;
23
23
  padding: 0;
24
- }
25
- .button svg {
26
- flex: none;
24
+
25
+ & svg {
26
+ flex: none;
27
+ }
27
28
  }
28
29
 
29
30
  .text {
@@ -38,9 +39,10 @@
38
39
 
39
40
  .chevron {
40
41
  transition: transform 0.2s ease-in-out;
41
- }
42
- .chevron_open {
43
- transform: rotate(180deg);
42
+
43
+ &_open {
44
+ transform: rotate(180deg);
45
+ }
44
46
  }
45
47
 
46
48
  .line {
@@ -48,4 +50,4 @@
48
50
  block-size: 1px;
49
51
  flex: 1;
50
52
  margin-inline-start: 8px;
51
- }
53
+ }
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ import Accordion from '.';
3
+ import { Meta } from '@storybook/react';
4
+
5
+ const meta: Meta<typeof Accordion> = {
6
+ title: "UI/Accordion",
7
+ parameters: {
8
+ },
9
+ argTypes: {
10
+ boldTitle: {
11
+ control: { type: "boolean" },
12
+ options: [true, false],
13
+ },
14
+ },
15
+ args: {
16
+ title: "Accordion title",
17
+ },
18
+ component: Accordion,
19
+ } satisfies Meta<typeof Accordion>;
20
+
21
+ export default meta;
22
+
23
+ const wrapperStyles = {
24
+ height: '400px',
25
+ width: '600px',
26
+ backgroundColor: '#DFE7FA',
27
+ };
28
+
29
+ export const Default = (args): React.ReactElement => {
30
+ return (
31
+ <div style={wrapperStyles}>
32
+ <Accordion {...args}>
33
+ <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
34
+ </Accordion>
35
+ </div>
36
+ );
37
+ };
38
+
39
+ export const BoldTitle = (args): React.ReactElement => {
40
+ return (
41
+ <div style={wrapperStyles}>
42
+ <Accordion boldTitle {...args}>
43
+ <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
44
+ </Accordion>
45
+ </div>
46
+ );
47
+ };
@@ -0,0 +1,71 @@
1
+ import React, { useState, useEffect, useRef } from "react";
2
+
3
+ import classNames from "classnames/bind";
4
+ import { Chevron } from "../Icons";
5
+ import Typography from "../Typography";
6
+ import styles from "./Accordion.module.scss";
7
+ import type { FC, ReactNode, PropsWithChildren } from "react";
8
+
9
+ const clx = classNames.bind(styles);
10
+
11
+ type Props = {
12
+ title: ReactNode;
13
+ className?: string;
14
+ boldTitle?: boolean;
15
+ tabIndex?: number;
16
+ };
17
+
18
+ const Accordion: FC<PropsWithChildren<Props>> = ({
19
+ title,
20
+ boldTitle = false,
21
+ children,
22
+ className,
23
+ tabIndex,
24
+ }) => {
25
+ const [isOpen, setIsOpen] = useState(false);
26
+ const contentRef = useRef<HTMLDivElement>(null);
27
+
28
+ const toggleAccordion = () => setIsOpen(!isOpen);
29
+
30
+ useEffect(() => {
31
+ if (contentRef.current) {
32
+ contentRef.current.style.blockSize = isOpen
33
+ ? `${contentRef.current.scrollHeight}px`
34
+ : "0px";
35
+ }
36
+ }, [isOpen]);
37
+
38
+ return (
39
+ <div className={clx("root", className)}>
40
+ <div className={clx("header")}>
41
+ <button
42
+ className={clx("button")}
43
+ onClick={toggleAccordion}
44
+ type="button"
45
+ role="button"
46
+ aria-expanded={isOpen}
47
+ tabIndex={tabIndex}
48
+ aria-label="Toggle"
49
+ >
50
+ <Chevron
51
+ className={clx("chevron", { chevron_open: isOpen })}
52
+ width={20}
53
+ height={20}
54
+ />
55
+ <Typography
56
+ className={clx("text")}
57
+ fontWeight={boldTitle ? "bold" : "normal"}
58
+ >
59
+ {title}
60
+ </Typography>
61
+ <div className={clx("line")} />
62
+ </button>
63
+ </div>
64
+ <div ref={contentRef} className={clx("content")}>
65
+ {children}
66
+ </div>
67
+ </div>
68
+ );
69
+ };
70
+
71
+ export default Accordion;
@@ -9,7 +9,8 @@
9
9
  background-color: var(--palette-white);
10
10
  border: 3px solid var(--palette-bg-2);
11
11
  padding: 3px;
12
+
13
+ &:hover {
14
+ border-color: var(--palette-bg-4);
15
+ }
12
16
  }
13
- .avatar_bordered:hover {
14
- border-color: var(--palette-bg-4);
15
- }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" fill="none" viewBox="0 0 42 42"><circle cx="21" cy="21" r="21" fill="#eceef2"/><mask id="org-circle_svg__a" width="42" height="42" x="0" y="0" maskUnits="userSpaceOnUse"><circle cx="21" cy="21" r="21" fill="#eceef2"/></mask><g mask="url(#org-circle_svg__a)"><path fill="#bcc1cc" fill-rule="evenodd" d="M19.103 27.36V34H9V12.062L22.567 6v21.36h-3.464zm-6.64 0v1.733h3.176V27.36h-3.175zm0-6.638v1.732h6.64v-1.732h-6.64zm0-4.042v1.732h6.64V16.68h-6.64zM32.67 27.36h-6.062v1.733h6.062V34h-9.526V18.124h9.526v9.237z" clip-rule="evenodd"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="42" height="39" fill="none"><path fill="#ECEEF2" fillRule="evenodd" d="M33.6 37.997c-2.9-1.709-7-4.725-8.6-4.725h-3.802c-.9 0-2.8-.805-3-1.507-.199-.503-.199-1.408-.1-2.212 0-.1.303-.1.402 0 .8.905 1.099 1.508 1.9 1.508h1.8c.7 0 3.1-2.111 4.099-4.725.2-.603.4-1.608.5-2.713 0-.1.1-.202.1-.1.1.501.3 1.105.4 1.105.3.201.7-.603 1.2-1.709.5-1.006.5-1.608.7-2.413.3-1.105-.1-1.91-.4-1.91a.91.91 0 0 0-.7.302c-.1 0-.2 0-.2-.1 0-.704.1-1.81.9-2.413-1.1-1.005-.4-2.714-.4-2.714.4.2.4 0 .4 0l-.2-1.106c.6-.1 1.1-.603 1.1-.603s-1.6-.402-2.4-1.005c.7-.202 1.117-.957 1.117-.957S27 9.952 26 9.65c.9-.904.3-2.15.3-2.15s-1.6.441-4.7.441c-2.2-.1-3-.402-4.6 1.207-1.9 1.909-1.9 2.412-3.1 2.412 1 1.407.5 2.814.5 2.814l-.1 2.112.1.401s0 .1.1.302c0 .101 0 .303.1.402l.3 1.61s-.1.1-.2 0a1.42 1.42 0 0 0-1.2-.604c-.3 0-.8.805-.4 1.91.3.804.6 1.306.9 2.412s.9 1.91 1.2 1.71q.15-.153.3-.906c0-.1.1 0 .2.102.1 1.004.3 1.908.5 2.411.2.302.4.703.6 1.005-.2 1.709-.4 3.82-.8 5.428-2.6.704-6.6 1.91-10 2.714C2.2 31.967 0 26.74 0 21.11 0 9.45 9.4 0 21 0s21 9.45 21 21.11c0 6.936-3.3 13.066-8.4 16.887" clipRule="evenodd"/></svg>
@@ -0,0 +1,7 @@
1
+ export enum AvatarSizes {
2
+ S = 30,
3
+ M = 34,
4
+ L = 42,
5
+ XL = 80,
6
+ XXL = 96,
7
+ }
@@ -0,0 +1,17 @@
1
+ import type { CSSProperties } from "react";
2
+ import type { AvatarSizes } from "./constants";
3
+
4
+ export enum AccountType {
5
+ Person = "person",
6
+ Organization = "org",
7
+ }
8
+
9
+ export type AvatarProps = {
10
+ accountType?: AccountType;
11
+ style?: CSSProperties;
12
+ alt?: string;
13
+ size?: AvatarSizes | number;
14
+ avatarURL?: string;
15
+ bordered?: boolean;
16
+ className?: string;
17
+ };
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ import Avatar from ".";
3
+ import type { Meta } from "@storybook/react";
4
+ import { AccountType } from "./index.props";
5
+ import { AvatarSizes } from "./constants";
6
+
7
+ const meta: Meta<typeof Avatar> = {
8
+ title: "UI/Avatar",
9
+ parameters: {
10
+ layout: 'centered'
11
+ },
12
+ argTypes: {
13
+ accountType: {
14
+ control: { type: "select" },
15
+ options: Object.values(AccountType),
16
+ },
17
+ size: {
18
+ control: { type: "select" },
19
+ options: [AvatarSizes.S, AvatarSizes.M, AvatarSizes.L, AvatarSizes.XL, AvatarSizes.XXL],
20
+ },
21
+ },
22
+ args: {
23
+ size: AvatarSizes.XXL
24
+ },
25
+ component: Avatar,
26
+ } satisfies Meta<typeof Avatar>;
27
+
28
+ export default meta;
29
+
30
+ export const Default = (args) => {
31
+ return <Avatar {...args}/>;
32
+ };
33
+
34
+ export const Bordered = (args) => {
35
+ return <Avatar bordered {...args}/>;
36
+ };
@@ -0,0 +1,49 @@
1
+ import React, { memo } from "react";
2
+
3
+ import classNames from "classnames/bind";
4
+ import { AvatarSizes } from "./constants";
5
+ import userCircleUrl from "./assets/user-circle.svg";
6
+ import orgCircleUrl from "./assets/org-circle.svg";
7
+ import styles from "./Avatar.module.scss";
8
+ import { AccountType } from "./index.props";
9
+ import type { AvatarProps } from "./index.props";
10
+ import type { FC } from "react";
11
+
12
+ const clx = classNames.bind(styles);
13
+
14
+ const getStubImage = (type: AccountType) =>
15
+ type === AccountType.Organization ? orgCircleUrl : userCircleUrl;
16
+
17
+ const Avatar: FC<AvatarProps> = memo((props) => {
18
+ const {
19
+ avatarURL,
20
+ style,
21
+ size = AvatarSizes.M,
22
+ className,
23
+ bordered,
24
+ alt = "profile image",
25
+ accountType = AccountType.Organization,
26
+ ...rest
27
+ } = props;
28
+ const stubImageURL = getStubImage(accountType);
29
+
30
+ return (
31
+ <img
32
+ alt={alt}
33
+ src={(avatarURL || stubImageURL) as string}
34
+ width={size}
35
+ height={size}
36
+ style={style}
37
+ className={clx(
38
+ "avatar",
39
+ {
40
+ avatar_bordered: !!bordered,
41
+ },
42
+ [className],
43
+ )}
44
+ {...rest}
45
+ />
46
+ );
47
+ });
48
+
49
+ export default Avatar;
@@ -14,17 +14,20 @@
14
14
  position: absolute;
15
15
  user-select: none;
16
16
  z-index: 1;
17
+
18
+ &_direction_right {
19
+ right: 0;
20
+ top: 0;
21
+ transform: scale(1) translate(60%, -50%);
22
+ }
23
+
24
+ &_direction_left {
25
+ left: 0;
26
+ top: 0;
27
+ transform: scale(1) translate(-60%, -50%);
28
+ }
29
+
30
+ &_invisible {
31
+ transform: scale(0) translate(50%, -50%);
32
+ }
17
33
  }
18
- .root_direction_right {
19
- right: 0;
20
- top: 0;
21
- transform: scale(1) translate(60%, -50%);
22
- }
23
- .root_direction_left {
24
- left: 0;
25
- top: 0;
26
- transform: scale(1) translate(-60%, -50%);
27
- }
28
- .root_invisible {
29
- transform: scale(0) translate(50%, -50%);
30
- }
@@ -3,4 +3,4 @@
3
3
  flex-shrink: 0;
4
4
  position: relative;
5
5
  vertical-align: middle;
6
- }
6
+ }
@@ -1,3 +1,3 @@
1
1
  export interface ControlProps {
2
- className?: string;
2
+ className?: string;
3
3
  }
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import classNames from "classnames";
3
+ import styles from "./Control.module.scss";
4
+ import type { FC, PropsWithChildren } from "react";
5
+
6
+ import type { ControlProps } from "./index.props";
7
+
8
+ export const BadgeControl: FC<PropsWithChildren<ControlProps>> = ({
9
+ className,
10
+ children,
11
+ ...props
12
+ }) => (
13
+ <span className={classNames(styles.root, className)} {...props}>
14
+ {children}
15
+ </span>
16
+ );
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import '@testing-library/jest-dom';
3
+ import { render, screen } from '@testing-library/react';
4
+ import Cart from "../../Icons/Cart";
5
+ import Badge from "..";
6
+
7
+ describe("<Badge />", () => {
8
+ it('should render correctly', () => {
9
+ const { container } = render(
10
+ <Badge content={3}>
11
+ <Cart />
12
+ </Badge>,
13
+ );
14
+ expect(container).toMatchSnapshot();
15
+ });
16
+
17
+ it('has the correct number', () => {
18
+ render(
19
+ <Badge content={3}>
20
+ <Cart />
21
+ </Badge>
22
+ );
23
+
24
+ const badge = screen.getByTestId('badge');
25
+ expect(badge).toHaveTextContent('3');
26
+ });
27
+ });