@quen-ui/components 0.0.14 → 1.0.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 (403) hide show
  1. package/README.md +2 -2
  2. package/dist/Accordion/Accordion.cjs.js +88 -0
  3. package/dist/Accordion/Accordion.d.ts +3 -0
  4. package/dist/Accordion/Accordion.es.js +89 -0
  5. package/dist/Accordion/AccordionGroup.cjs.js +82 -0
  6. package/dist/Accordion/AccordionGroup.d.ts +12 -0
  7. package/dist/Accordion/AccordionGroup.es.js +82 -0
  8. package/dist/Accordion/AccordionItem.cjs.js +71 -0
  9. package/dist/Accordion/AccordionItem.d.ts +3 -0
  10. package/dist/Accordion/AccordionItem.es.js +72 -0
  11. package/dist/Accordion/helpers.cjs.js +24 -0
  12. package/dist/Accordion/helpers.d.ts +25 -0
  13. package/dist/Accordion/helpers.es.js +24 -0
  14. package/dist/Accordion/index.cjs.js +7 -0
  15. package/dist/Accordion/index.d.ts +8 -0
  16. package/dist/Accordion/index.es.js +7 -0
  17. package/dist/Accordion/styles.cjs.js +97 -0
  18. package/dist/Accordion/styles.d.ts +23 -0
  19. package/dist/Accordion/styles.es.js +97 -0
  20. package/dist/Accordion/types.d.ts +142 -0
  21. package/dist/Accordion/useAccordionState.cjs.js +34 -0
  22. package/dist/Accordion/useAccordionState.d.ts +12 -0
  23. package/dist/Accordion/useAccordionState.es.js +34 -0
  24. package/dist/Alert/Alert.cjs.js +1 -1
  25. package/dist/Alert/Alert.es.js +1 -1
  26. package/dist/Alert/styles.cjs.js +14 -10
  27. package/dist/Alert/styles.es.js +14 -10
  28. package/dist/Avatar/styles.cjs.js +16 -11
  29. package/dist/Avatar/styles.es.js +16 -11
  30. package/dist/Badge/styles.cjs.js +7 -7
  31. package/dist/Badge/styles.es.js +7 -7
  32. package/dist/Breadcrumbs/BreadcrumbItem.cjs.js +6 -6
  33. package/dist/Breadcrumbs/BreadcrumbItem.es.js +6 -6
  34. package/dist/Breadcrumbs/Breadcrumbs.cjs.js +2 -3
  35. package/dist/Breadcrumbs/Breadcrumbs.es.js +2 -3
  36. package/dist/Breadcrumbs/styles.cjs.js +15 -15
  37. package/dist/Breadcrumbs/styles.es.js +15 -15
  38. package/dist/Button/Button.cjs.js +3 -3
  39. package/dist/Button/Button.es.js +6 -6
  40. package/dist/Button/index.d.ts +1 -1
  41. package/dist/Button/styles.cjs.js +49 -54
  42. package/dist/Button/styles.es.js +50 -55
  43. package/dist/Button/types.d.ts +2 -3
  44. package/dist/Calendar/Calendar.cjs.js +200 -0
  45. package/dist/Calendar/Calendar.d.ts +4 -0
  46. package/dist/Calendar/Calendar.es.js +201 -0
  47. package/dist/Calendar/DaysLevel.cjs.js +93 -0
  48. package/dist/Calendar/DaysLevel.d.ts +3 -0
  49. package/dist/Calendar/DaysLevel.es.js +94 -0
  50. package/dist/Calendar/MonthLevel.cjs.js +23 -0
  51. package/dist/Calendar/MonthLevel.d.ts +3 -0
  52. package/dist/Calendar/MonthLevel.es.js +24 -0
  53. package/dist/Calendar/YearsLevel.cjs.js +24 -0
  54. package/dist/Calendar/YearsLevel.d.ts +3 -0
  55. package/dist/Calendar/YearsLevel.es.js +25 -0
  56. package/dist/Calendar/helpers.cjs.js +60 -0
  57. package/dist/Calendar/helpers.d.ts +9 -0
  58. package/dist/Calendar/helpers.es.js +60 -0
  59. package/dist/Calendar/index.d.ts +2 -0
  60. package/dist/Calendar/styles.cjs.js +116 -0
  61. package/dist/Calendar/styles.d.ts +16 -0
  62. package/dist/Calendar/styles.es.js +116 -0
  63. package/dist/Calendar/types.d.ts +115 -0
  64. package/dist/Card/Card.cjs.js +4 -2
  65. package/dist/Card/Card.d.ts +1 -1
  66. package/dist/Card/Card.es.js +4 -2
  67. package/dist/Card/styles.cjs.js +2 -2
  68. package/dist/Card/styles.es.js +2 -2
  69. package/dist/Card/types.d.ts +2 -0
  70. package/dist/Checkbox/Checkbox.cjs.js +1 -1
  71. package/dist/Checkbox/Checkbox.es.js +1 -1
  72. package/dist/Checkbox/CheckboxGroup.cjs.js +22 -25
  73. package/dist/Checkbox/CheckboxGroup.es.js +22 -25
  74. package/dist/Checkbox/styles.cjs.js +24 -23
  75. package/dist/Checkbox/styles.es.js +24 -23
  76. package/dist/ColorPicker/ColorPicker.cjs.js +404 -0
  77. package/dist/ColorPicker/ColorPicker.d.ts +3 -0
  78. package/dist/ColorPicker/ColorPicker.es.js +405 -0
  79. package/dist/ColorPicker/InputColor.cjs.js +94 -0
  80. package/dist/ColorPicker/InputColor.d.ts +3 -0
  81. package/dist/ColorPicker/InputColor.es.js +95 -0
  82. package/dist/ColorPicker/InputsColor.cjs.js +177 -0
  83. package/dist/ColorPicker/InputsColor.d.ts +3 -0
  84. package/dist/ColorPicker/InputsColor.es.js +178 -0
  85. package/dist/ColorPicker/helpers.cjs.js +32 -0
  86. package/dist/ColorPicker/helpers.d.ts +4 -0
  87. package/dist/ColorPicker/helpers.es.js +32 -0
  88. package/dist/ColorPicker/index.cjs.js +7 -0
  89. package/dist/ColorPicker/index.d.ts +8 -0
  90. package/dist/ColorPicker/index.es.js +7 -0
  91. package/dist/ColorPicker/styles.cjs.js +234 -0
  92. package/dist/ColorPicker/styles.d.ts +43 -0
  93. package/dist/ColorPicker/styles.es.js +234 -0
  94. package/dist/ColorPicker/types.d.ts +56 -0
  95. package/dist/Divider/styles.cjs.js +12 -10
  96. package/dist/Divider/styles.es.js +12 -10
  97. package/dist/Drawer/Drawer.cjs.js +5 -1
  98. package/dist/Drawer/Drawer.es.js +5 -1
  99. package/dist/Drawer/styles.cjs.js +4 -5
  100. package/dist/Drawer/styles.es.js +4 -5
  101. package/dist/Dropdown/Dropdown.cjs.js +31 -2
  102. package/dist/Dropdown/Dropdown.d.ts +2 -2
  103. package/dist/Dropdown/Dropdown.es.js +32 -3
  104. package/dist/Dropdown/DropdownItem.cjs.js +4 -5
  105. package/dist/Dropdown/DropdownItem.es.js +4 -5
  106. package/dist/Dropdown/DropdownList.cjs.js +3 -2
  107. package/dist/Dropdown/DropdownList.es.js +6 -5
  108. package/dist/Dropdown/DropdownPortal.cjs.js +8 -5
  109. package/dist/Dropdown/DropdownPortal.d.ts +5 -3
  110. package/dist/Dropdown/DropdownPortal.es.js +9 -6
  111. package/dist/Dropdown/helpers.cjs.js +1 -1
  112. package/dist/Dropdown/helpers.es.js +1 -1
  113. package/dist/Dropdown/styles.cjs.js +28 -27
  114. package/dist/Dropdown/styles.d.ts +2 -0
  115. package/dist/Dropdown/styles.es.js +28 -27
  116. package/dist/EmptyState/EmptyState.cjs.js +51 -0
  117. package/dist/EmptyState/EmptyState.d.ts +3 -0
  118. package/dist/EmptyState/EmptyState.es.js +52 -0
  119. package/dist/EmptyState/index.d.ts +2 -0
  120. package/dist/EmptyState/types.d.ts +10 -0
  121. package/dist/Flex/Flex.d.ts +1 -1
  122. package/dist/Flex/types.d.ts +1 -0
  123. package/dist/Form/Field.cjs.js +175 -0
  124. package/dist/Form/Field.d.ts +3 -0
  125. package/dist/Form/Field.es.js +176 -0
  126. package/dist/Form/FieldArray.cjs.js +24 -0
  127. package/dist/Form/FieldArray.d.ts +3 -0
  128. package/dist/Form/FieldArray.es.js +25 -0
  129. package/dist/Form/Form.cjs.js +69 -0
  130. package/dist/Form/Form.d.ts +3 -0
  131. package/dist/Form/Form.es.js +69 -0
  132. package/dist/Form/defaultValidateMessages.cjs.js +51 -0
  133. package/dist/Form/defaultValidateMessages.d.ts +47 -0
  134. package/dist/Form/defaultValidateMessages.es.js +51 -0
  135. package/dist/Form/helpers.cjs.js +8 -0
  136. package/dist/Form/helpers.d.ts +1 -0
  137. package/dist/Form/helpers.es.js +8 -0
  138. package/dist/Form/index.cjs.js +13 -0
  139. package/dist/Form/index.d.ts +14 -0
  140. package/dist/Form/index.es.js +13 -0
  141. package/dist/Form/types.d.ts +147 -0
  142. package/dist/Form/useForm.cjs.js +230 -0
  143. package/dist/Form/useForm.d.ts +2 -0
  144. package/dist/Form/useForm.es.js +230 -0
  145. package/dist/Form/useWatch.cjs.js +14 -0
  146. package/dist/Form/useWatch.d.ts +3 -0
  147. package/dist/Form/useWatch.es.js +14 -0
  148. package/dist/Highlight/Highlight.cjs.js +113 -0
  149. package/dist/Highlight/Highlight.d.ts +3 -0
  150. package/dist/Highlight/Highlight.es.js +114 -0
  151. package/dist/Highlight/helpers.cjs.js +147 -0
  152. package/dist/Highlight/helpers.d.ts +27 -0
  153. package/dist/Highlight/helpers.es.js +147 -0
  154. package/dist/Highlight/index.d.ts +2 -0
  155. package/dist/Highlight/styles.cjs.js +11 -0
  156. package/dist/Highlight/styles.d.ts +4 -0
  157. package/dist/Highlight/styles.es.js +11 -0
  158. package/dist/Highlight/types.d.ts +53 -0
  159. package/dist/Image/styles.cjs.js +4 -5
  160. package/dist/Image/styles.es.js +4 -5
  161. package/dist/InputBase/InputBase.cjs.js +32 -0
  162. package/dist/InputBase/InputBase.d.ts +4 -0
  163. package/dist/InputBase/InputBase.es.js +33 -0
  164. package/dist/InputBase/index.d.ts +2 -0
  165. package/dist/InputBase/styles.cjs.js +61 -0
  166. package/dist/InputBase/styles.d.ts +7 -0
  167. package/dist/InputBase/styles.es.js +61 -0
  168. package/dist/InputBase/types.d.ts +25 -0
  169. package/dist/InputDate/InputDate.cjs.js +344 -0
  170. package/dist/InputDate/InputDate.d.ts +4 -0
  171. package/dist/InputDate/InputDate.es.js +345 -0
  172. package/dist/InputDate/helpers.cjs.js +78 -0
  173. package/dist/InputDate/helpers.d.ts +5 -0
  174. package/dist/InputDate/helpers.es.js +78 -0
  175. package/dist/InputDate/index.d.ts +2 -0
  176. package/dist/InputDate/styles.cjs.js +35 -0
  177. package/dist/InputDate/styles.d.ts +5 -0
  178. package/dist/InputDate/styles.es.js +35 -0
  179. package/dist/InputDate/types.d.ts +23 -0
  180. package/dist/InputNumber/InputNumber.cjs.js +70 -73
  181. package/dist/InputNumber/InputNumber.d.ts +1 -1
  182. package/dist/InputNumber/InputNumber.es.js +72 -75
  183. package/dist/InputNumber/styles.cjs.js +20 -60
  184. package/dist/InputNumber/styles.d.ts +4 -8
  185. package/dist/InputNumber/styles.es.js +21 -61
  186. package/dist/InputNumber/types.d.ts +2 -18
  187. package/dist/Layout/Header.cjs.js +27 -23
  188. package/dist/Layout/Header.d.ts +1 -1
  189. package/dist/Layout/Header.es.js +28 -24
  190. package/dist/Layout/Sidebar.cjs.js +24 -25
  191. package/dist/Layout/Sidebar.d.ts +1 -1
  192. package/dist/Layout/Sidebar.es.js +25 -26
  193. package/dist/Layout/index.d.ts +2 -2
  194. package/dist/Layout/styles.cjs.js +16 -52
  195. package/dist/Layout/styles.d.ts +2 -15
  196. package/dist/Layout/styles.es.js +16 -52
  197. package/dist/Layout/types.d.ts +7 -22
  198. package/dist/Loader/styles.cjs.js +5 -4
  199. package/dist/Loader/styles.es.js +5 -4
  200. package/dist/LoadingOverlay/LoadingOverlay.cjs.js +22 -0
  201. package/dist/LoadingOverlay/LoadingOverlay.d.ts +3 -0
  202. package/dist/LoadingOverlay/LoadingOverlay.es.js +23 -0
  203. package/dist/LoadingOverlay/index.d.ts +2 -0
  204. package/dist/LoadingOverlay/styles.cjs.js +28 -0
  205. package/dist/LoadingOverlay/styles.d.ts +5 -0
  206. package/dist/LoadingOverlay/styles.es.js +28 -0
  207. package/dist/LoadingOverlay/types.d.ts +16 -0
  208. package/dist/Menu/Menu.cjs.js +42 -0
  209. package/dist/Menu/Menu.d.ts +3 -0
  210. package/dist/Menu/Menu.es.js +43 -0
  211. package/dist/Menu/MenuItem.cjs.js +112 -0
  212. package/dist/Menu/MenuItem.d.ts +3 -0
  213. package/dist/Menu/MenuItem.es.js +113 -0
  214. package/dist/Menu/helpers.cjs.js +20 -0
  215. package/dist/Menu/helpers.d.ts +17 -0
  216. package/dist/Menu/helpers.es.js +20 -0
  217. package/dist/Menu/index.d.ts +2 -0
  218. package/dist/Menu/styles.cjs.js +98 -0
  219. package/dist/Menu/styles.d.ts +16 -0
  220. package/dist/Menu/styles.es.js +98 -0
  221. package/dist/Menu/types.d.ts +85 -0
  222. package/dist/Modal/Modal.cjs.js +15 -5
  223. package/dist/Modal/Modal.d.ts +1 -1
  224. package/dist/Modal/Modal.es.js +16 -6
  225. package/dist/Modal/styles.cjs.js +39 -9
  226. package/dist/Modal/styles.d.ts +4 -0
  227. package/dist/Modal/styles.es.js +40 -10
  228. package/dist/Modal/types.d.ts +2 -0
  229. package/dist/Notification/Notification.cjs.js +3 -3
  230. package/dist/Notification/Notification.es.js +3 -3
  231. package/dist/Notification/NotificationInstance.cjs.js +8 -15
  232. package/dist/Notification/NotificationInstance.es.js +8 -15
  233. package/dist/Notification/NotificationsStore.cjs.js +2 -7
  234. package/dist/Notification/NotificationsStore.es.js +2 -7
  235. package/dist/Notification/styles.cjs.js +6 -6
  236. package/dist/Notification/styles.es.js +6 -6
  237. package/dist/Pagination/Pagination.cjs.js +114 -0
  238. package/dist/Pagination/Pagination.d.ts +3 -0
  239. package/dist/Pagination/Pagination.es.js +115 -0
  240. package/dist/Pagination/index.d.ts +2 -0
  241. package/dist/Pagination/styles.cjs.js +54 -0
  242. package/dist/Pagination/styles.d.ts +2 -0
  243. package/dist/Pagination/styles.es.js +54 -0
  244. package/dist/Pagination/types.d.ts +49 -0
  245. package/dist/Progress/Progress.cjs.js +1 -1
  246. package/dist/Progress/Progress.es.js +1 -1
  247. package/dist/Progress/styles.cjs.js +5 -50
  248. package/dist/Progress/styles.es.js +5 -50
  249. package/dist/Progress/types.d.ts +1 -0
  250. package/dist/RadioButton/RadioButton.cjs.js +1 -1
  251. package/dist/RadioButton/RadioButton.es.js +1 -1
  252. package/dist/RadioButton/RadioButtonGroup.cjs.js +19 -22
  253. package/dist/RadioButton/RadioButtonGroup.es.js +19 -22
  254. package/dist/RadioButton/styles.cjs.js +11 -13
  255. package/dist/RadioButton/styles.es.js +11 -13
  256. package/dist/RichTextEditor/RichTextEditor.cjs.js +289 -0
  257. package/dist/RichTextEditor/RichTextEditor.d.ts +4 -0
  258. package/dist/RichTextEditor/RichTextEditor.es.js +290 -0
  259. package/dist/RichTextEditor/RichTextEditorColorControl.cjs.js +38 -0
  260. package/dist/RichTextEditor/RichTextEditorColorControl.d.ts +3 -0
  261. package/dist/RichTextEditor/RichTextEditorColorControl.es.js +39 -0
  262. package/dist/RichTextEditor/RichTextEditorTableControl.cjs.js +62 -0
  263. package/dist/RichTextEditor/RichTextEditorTableControl.d.ts +3 -0
  264. package/dist/RichTextEditor/RichTextEditorTableControl.es.js +63 -0
  265. package/dist/RichTextEditor/helpers.cjs.js +151 -0
  266. package/dist/RichTextEditor/helpers.d.ts +10 -0
  267. package/dist/RichTextEditor/helpers.es.js +151 -0
  268. package/dist/RichTextEditor/index.d.ts +2 -0
  269. package/dist/RichTextEditor/plugins.cjs.js +548 -0
  270. package/dist/RichTextEditor/plugins.d.ts +2 -0
  271. package/dist/RichTextEditor/plugins.es.js +548 -0
  272. package/dist/RichTextEditor/styles.cjs.js +60 -0
  273. package/dist/RichTextEditor/styles.d.ts +7 -0
  274. package/dist/RichTextEditor/styles.es.js +60 -0
  275. package/dist/RichTextEditor/types.d.ts +79 -0
  276. package/dist/Select/Select.cjs.js +30 -18
  277. package/dist/Select/Select.es.js +30 -18
  278. package/dist/Select/helpers.cjs.js +1 -1
  279. package/dist/Select/helpers.d.ts +24 -24
  280. package/dist/Select/helpers.es.js +1 -1
  281. package/dist/Select/styles.cjs.js +91 -118
  282. package/dist/Select/styles.d.ts +4 -5
  283. package/dist/Select/styles.es.js +91 -118
  284. package/dist/Select/types.d.ts +3 -23
  285. package/dist/Select/useSelect.cjs.js +8 -14
  286. package/dist/Select/useSelect.d.ts +20 -20
  287. package/dist/Select/useSelect.es.js +8 -14
  288. package/dist/Skeleton/Skeleton.cjs.js +35 -0
  289. package/dist/Skeleton/Skeleton.d.ts +3 -0
  290. package/dist/Skeleton/Skeleton.es.js +36 -0
  291. package/dist/Skeleton/SkeletonAvatar.cjs.js +17 -0
  292. package/dist/Skeleton/SkeletonAvatar.d.ts +3 -0
  293. package/dist/Skeleton/SkeletonAvatar.es.js +18 -0
  294. package/dist/Skeleton/SkeletonButton.cjs.js +21 -0
  295. package/dist/Skeleton/SkeletonButton.d.ts +3 -0
  296. package/dist/Skeleton/SkeletonButton.es.js +22 -0
  297. package/dist/Skeleton/SkeletonCard.cjs.js +15 -0
  298. package/dist/Skeleton/SkeletonCard.d.ts +3 -0
  299. package/dist/Skeleton/SkeletonCard.es.js +16 -0
  300. package/dist/Skeleton/SkeletonLayout.cjs.js +60 -0
  301. package/dist/Skeleton/SkeletonLayout.d.ts +3 -0
  302. package/dist/Skeleton/SkeletonLayout.es.js +61 -0
  303. package/dist/Skeleton/SkeletonList.cjs.js +39 -0
  304. package/dist/Skeleton/SkeletonList.d.ts +3 -0
  305. package/dist/Skeleton/SkeletonList.es.js +40 -0
  306. package/dist/Skeleton/SkeletonTextBlock.cjs.js +7 -0
  307. package/dist/Skeleton/SkeletonTextBlock.d.ts +5 -0
  308. package/dist/Skeleton/SkeletonTextBlock.es.js +8 -0
  309. package/dist/Skeleton/index.cjs.js +17 -0
  310. package/dist/Skeleton/index.d.ts +18 -0
  311. package/dist/Skeleton/index.es.js +17 -0
  312. package/dist/Skeleton/styles.cjs.js +59 -0
  313. package/dist/Skeleton/styles.d.ts +3 -0
  314. package/dist/Skeleton/styles.es.js +59 -0
  315. package/dist/Skeleton/types.d.ts +74 -0
  316. package/dist/Slider/Slider.cjs.js +282 -0
  317. package/dist/Slider/Slider.d.ts +3 -0
  318. package/dist/Slider/Slider.es.js +283 -0
  319. package/dist/Slider/index.d.ts +2 -0
  320. package/dist/Slider/styles.cjs.js +156 -0
  321. package/dist/Slider/styles.d.ts +35 -0
  322. package/dist/Slider/styles.es.js +156 -0
  323. package/dist/Slider/types.d.ts +53 -0
  324. package/dist/Spoiler/Spoiler.cjs.js +62 -0
  325. package/dist/Spoiler/Spoiler.d.ts +3 -0
  326. package/dist/Spoiler/Spoiler.es.js +63 -0
  327. package/dist/Spoiler/index.d.ts +2 -0
  328. package/dist/Spoiler/styles.cjs.js +15 -0
  329. package/dist/Spoiler/styles.d.ts +4 -0
  330. package/dist/Spoiler/styles.es.js +15 -0
  331. package/dist/Spoiler/types.d.ts +23 -0
  332. package/dist/Switch/Switch.cjs.js +32 -6
  333. package/dist/Switch/Switch.d.ts +2 -2
  334. package/dist/Switch/Switch.es.js +33 -7
  335. package/dist/Switch/styles.cjs.js +24 -7
  336. package/dist/Switch/styles.d.ts +4 -0
  337. package/dist/Switch/styles.es.js +24 -7
  338. package/dist/Switch/types.d.ts +3 -0
  339. package/dist/Tabs/Tab.cjs.js +8 -8
  340. package/dist/Tabs/Tab.es.js +8 -8
  341. package/dist/Tabs/TabPanel.cjs.js +3 -3
  342. package/dist/Tabs/TabPanel.es.js +3 -3
  343. package/dist/Tabs/Tabs.cjs.js +5 -4
  344. package/dist/Tabs/Tabs.d.ts +1 -1
  345. package/dist/Tabs/Tabs.es.js +5 -4
  346. package/dist/Tabs/TabsList.cjs.js +25 -1
  347. package/dist/Tabs/TabsList.d.ts +2 -2
  348. package/dist/Tabs/TabsList.es.js +25 -1
  349. package/dist/Tabs/styles.cjs.js +104 -34
  350. package/dist/Tabs/styles.d.ts +2 -0
  351. package/dist/Tabs/styles.es.js +104 -34
  352. package/dist/Tabs/types.d.ts +7 -3
  353. package/dist/Tag/Tag.cjs.js +4 -1
  354. package/dist/Tag/Tag.d.ts +1 -1
  355. package/dist/Tag/Tag.es.js +4 -1
  356. package/dist/Tag/styles.cjs.js +14 -9
  357. package/dist/Tag/styles.d.ts +2 -0
  358. package/dist/Tag/styles.es.js +14 -9
  359. package/dist/Tag/types.d.ts +6 -0
  360. package/dist/TextField/TextField.cjs.js +57 -56
  361. package/dist/TextField/TextField.d.ts +1 -1
  362. package/dist/TextField/TextField.es.js +58 -57
  363. package/dist/TextField/styles.cjs.js +9 -50
  364. package/dist/TextField/styles.d.ts +3 -8
  365. package/dist/TextField/styles.es.js +10 -51
  366. package/dist/TextField/types.d.ts +2 -20
  367. package/dist/Textarea/Textarea.cjs.js +57 -56
  368. package/dist/Textarea/Textarea.d.ts +1 -1
  369. package/dist/Textarea/Textarea.es.js +58 -57
  370. package/dist/Textarea/styles.cjs.js +10 -62
  371. package/dist/Textarea/styles.d.ts +3 -8
  372. package/dist/Textarea/styles.es.js +12 -64
  373. package/dist/Textarea/types.d.ts +2 -21
  374. package/dist/Tooltip/Tooltip.cjs.js +3 -1
  375. package/dist/Tooltip/Tooltip.d.ts +1 -1
  376. package/dist/Tooltip/Tooltip.es.js +3 -1
  377. package/dist/Tooltip/types.d.ts +3 -0
  378. package/dist/assets/box.svg.cjs.js +21 -0
  379. package/dist/assets/box.svg.es.js +5 -0
  380. package/dist/index.cjs.js +30 -0
  381. package/dist/index.d.ts +17 -2
  382. package/dist/index.es.js +30 -0
  383. package/dist/message/Message.cjs.js +42 -0
  384. package/dist/message/Message.d.ts +3 -0
  385. package/dist/message/Message.es.js +43 -0
  386. package/dist/message/MessageContext.cjs.js +101 -0
  387. package/dist/message/MessageContext.d.ts +4 -0
  388. package/dist/message/MessageContext.es.js +101 -0
  389. package/dist/message/index.cjs.js +8 -0
  390. package/dist/message/index.d.ts +6 -0
  391. package/dist/message/index.es.js +8 -0
  392. package/dist/message/styles.cjs.js +79 -0
  393. package/dist/message/styles.d.ts +11 -0
  394. package/dist/message/styles.es.js +79 -0
  395. package/dist/message/types.d.ts +42 -0
  396. package/dist/typography/Text/Text.es.js +3 -3
  397. package/dist/typography/Title/Title.cjs.js +2 -0
  398. package/dist/typography/Title/Title.d.ts +1 -1
  399. package/dist/typography/Title/Title.es.js +2 -0
  400. package/dist/typography/Title/styles.cjs.js +3 -0
  401. package/dist/typography/Title/styles.es.js +3 -0
  402. package/dist/typography/Title/types.d.ts +1 -0
  403. package/package.json +17 -13
@@ -1,7 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useState, useEffect, useLayoutEffect } from "react";
2
+ import { useState, useRef, useEffect, useLayoutEffect } from "react";
3
3
  import { createPortal } from "react-dom";
4
4
  import { useTransitionState } from "react-transition-state";
5
+ import { useOnClickOutside } from "@quen-ui/hooks";
5
6
  import { DropdownWrapper } from "./styles.es.js";
6
7
  import DropdownPortal from "./DropdownPortal.es.js";
7
8
  import { DEFAULT_RECT_ELEMENT, calculateRectElement } from "./helpers.es.js";
@@ -11,20 +12,37 @@ const Dropdown = ({
11
12
  direction = "bottom",
12
13
  width,
13
14
  anchorRef,
15
+ onClickClose,
14
16
  ...props
15
17
  }) => {
16
18
  const [anchorRect, setAnchorRect] = useState(DEFAULT_RECT_ELEMENT);
19
+ const dropdownRef = useRef(null);
17
20
  const [containerDropdown, setContainerDropdown] = useState(null);
18
21
  const [state, toggle] = useTransitionState({
19
22
  timeout: 500,
20
23
  unmountOnExit: true,
21
24
  initialEntered: open
22
25
  });
26
+ useOnClickOutside(
27
+ anchorRef,
28
+ () => {
29
+ if (typeof open === "undefined") {
30
+ toggle(false);
31
+ onClickClose?.();
32
+ }
33
+ },
34
+ {
35
+ excludeRef: dropdownRef
36
+ }
37
+ );
23
38
  const calculateAnchorRect = () => {
24
39
  if (anchorRef && anchorRef.current) {
25
40
  setAnchorRect(calculateRectElement(anchorRef.current));
26
41
  }
27
42
  };
43
+ const handleClickAnchorRef = () => {
44
+ toggle();
45
+ };
28
46
  useEffect(() => {
29
47
  window.addEventListener("resize", calculateAnchorRect);
30
48
  window.addEventListener("scroll", calculateAnchorRect, true);
@@ -34,7 +52,17 @@ const Dropdown = ({
34
52
  };
35
53
  }, [anchorRect]);
36
54
  useEffect(() => {
37
- toggle(open);
55
+ if (typeof open === "undefined") {
56
+ anchorRef.current?.addEventListener("click", handleClickAnchorRef);
57
+ }
58
+ return () => {
59
+ anchorRef.current?.removeEventListener("click", handleClickAnchorRef);
60
+ };
61
+ }, [anchorRef]);
62
+ useEffect(() => {
63
+ if (typeof open !== "undefined") {
64
+ toggle(open);
65
+ }
38
66
  }, [open]);
39
67
  useLayoutEffect(() => {
40
68
  calculateAnchorRect();
@@ -55,7 +83,8 @@ const Dropdown = ({
55
83
  transitionStatus: state.status,
56
84
  anchorRef,
57
85
  anchorRect,
58
- width: width || "max-content"
86
+ width: width || "max-content",
87
+ ref: dropdownRef
59
88
  }
60
89
  ),
61
90
  containerDropdown
@@ -11,19 +11,18 @@ const DropdownItem = ({
11
11
  size
12
12
  }) => {
13
13
  const handleClick = (event) => {
14
- var _a;
15
14
  event.preventDefault();
16
- (_a = getItemOnClick == null ? void 0 : getItemOnClick(item)) == null ? void 0 : _a(item, event);
17
- onItemClick == null ? void 0 : onItemClick(item, event);
15
+ getItemOnClick?.(item)?.(item, event);
16
+ onItemClick?.(item, event);
18
17
  };
19
18
  return /* @__PURE__ */ jsxRuntime.jsxs(
20
19
  styles.DropdownItemStyled,
21
20
  {
22
21
  size,
23
- isDisabled: getItemDisabled == null ? void 0 : getItemDisabled(item),
22
+ disabled: getItemDisabled?.(item),
24
23
  onClick: handleClick,
25
24
  children: [
26
- getItemLeftContent == null ? void 0 : getItemLeftContent(item),
25
+ getItemLeftContent?.(item),
27
26
  getItemLabel(item)
28
27
  ]
29
28
  }
@@ -10,19 +10,18 @@ const DropdownItem = ({
10
10
  size
11
11
  }) => {
12
12
  const handleClick = (event) => {
13
- var _a;
14
13
  event.preventDefault();
15
- (_a = getItemOnClick == null ? void 0 : getItemOnClick(item)) == null ? void 0 : _a(item, event);
16
- onItemClick == null ? void 0 : onItemClick(item, event);
14
+ getItemOnClick?.(item)?.(item, event);
15
+ onItemClick?.(item, event);
17
16
  };
18
17
  return /* @__PURE__ */ jsxs(
19
18
  DropdownItemStyled,
20
19
  {
21
20
  size,
22
- isDisabled: getItemDisabled == null ? void 0 : getItemDisabled(item),
21
+ disabled: getItemDisabled?.(item),
23
22
  onClick: handleClick,
24
23
  children: [
25
- getItemLeftContent == null ? void 0 : getItemLeftContent(item),
24
+ getItemLeftContent?.(item),
26
25
  getItemLabel(item)
27
26
  ]
28
27
  }
@@ -61,6 +61,7 @@ const DropdownList = (props, ref) => {
61
61
  direction,
62
62
  className,
63
63
  width,
64
+ isContent: Boolean(content),
64
65
  ...otherProps,
65
66
  children: content ? content : groups.map((groupItems, index) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
66
67
  /* @__PURE__ */ jsxRuntime.jsx(styles.DropdownItemsWrapper, { children: groupItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -74,10 +75,10 @@ const DropdownList = (props, ref) => {
74
75
  getItemOnClick,
75
76
  onItemClick: otherProps.onItemClick
76
77
  },
77
- getItemKey == null ? void 0 : getItemKey(item)
78
+ getItemKey?.(item)
78
79
  )) }),
79
80
  index !== groups.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(Divider, { direction: "horizontal" })
80
- ] }, getItemGroupId == null ? void 0 : getItemGroupId(groupItems[0])))
81
+ ] }, getItemGroupId?.(groupItems[0])))
81
82
  }
82
83
  );
83
84
  };
@@ -5,7 +5,7 @@ import Divider from "../Divider/Divider.es.js";
5
5
  import { DropdownListWrapper, DropdownItemsWrapper } from "./styles.es.js";
6
6
  import { withDefaultGetters } from "./helpers.es.js";
7
7
  import DropdownItem from "./DropdownItem.es.js";
8
- const DropdownList = (props, ref) => {
8
+ const DropdownList$1 = (props, ref) => {
9
9
  const {
10
10
  items = [],
11
11
  sortGroup,
@@ -60,6 +60,7 @@ const DropdownList = (props, ref) => {
60
60
  direction,
61
61
  className,
62
62
  width,
63
+ isContent: Boolean(content),
63
64
  ...otherProps,
64
65
  children: content ? content : groups.map((groupItems, index) => /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
65
66
  /* @__PURE__ */ jsx(DropdownItemsWrapper, { children: groupItems.map((item) => /* @__PURE__ */ jsx(
@@ -73,14 +74,14 @@ const DropdownList = (props, ref) => {
73
74
  getItemOnClick,
74
75
  onItemClick: otherProps.onItemClick
75
76
  },
76
- getItemKey == null ? void 0 : getItemKey(item)
77
+ getItemKey?.(item)
77
78
  )) }),
78
79
  index !== groups.length - 1 && /* @__PURE__ */ jsx(Divider, { direction: "horizontal" })
79
- ] }, getItemGroupId == null ? void 0 : getItemGroupId(groupItems[0])))
80
+ ] }, getItemGroupId?.(groupItems[0])))
80
81
  }
81
82
  );
82
83
  };
83
- const DropdownList$1 = forwardRef(DropdownList);
84
+ const DropdownList = forwardRef(DropdownList$1);
84
85
  export {
85
- DropdownList$1 as default
86
+ DropdownList as default
86
87
  };
@@ -9,19 +9,18 @@ const DropdownPortal = ({
9
9
  height,
10
10
  transitionStatus,
11
11
  ...props
12
- }) => {
12
+ }, ref) => {
13
13
  const [dropdownRect, setDropdownRect] = React.useState(helpers.DEFAULT_RECT_ELEMENT);
14
14
  const maxHeight = React.useMemo(
15
15
  () => document.documentElement.scrollHeight - anchorRect.height - anchorRect.y - 8,
16
16
  [anchorRect]
17
17
  );
18
- const dropdownRef = React.useRef(null);
19
18
  const portalDirection = React.useMemo(
20
19
  () => helpers.getDirection({ anchorRect, direction, dropdownRect, offset: 8 }),
21
20
  [dropdownRect, direction]
22
21
  );
23
22
  React.useLayoutEffect(() => {
24
- setDropdownRect(helpers.calculateRectElement(dropdownRef.current));
23
+ setDropdownRect(helpers.calculateRectElement(ref.current));
25
24
  }, []);
26
25
  return /* @__PURE__ */ jsxRuntime.jsx(
27
26
  styles.DropdownListStyled,
@@ -31,11 +30,15 @@ const DropdownPortal = ({
31
30
  anchorRect,
32
31
  dropdownRect,
33
32
  maxHeight,
34
- ref: dropdownRef,
33
+ ref,
35
34
  height,
36
35
  minWidth: anchorRect.width,
36
+ isContent: Boolean(props.content),
37
37
  ...props
38
38
  }
39
39
  );
40
40
  };
41
- module.exports = DropdownPortal;
41
+ const DropdownPortal$1 = React.forwardRef(
42
+ DropdownPortal
43
+ );
44
+ module.exports = DropdownPortal$1;
@@ -1,4 +1,6 @@
1
- import { default as React } from 'react';
1
+ import { ReactElement, RefAttributes } from 'react';
2
2
  import { TDropdownPortalProps } from './types';
3
- declare const DropdownPortal: <ITEM>({ direction, anchorRect, height, transitionStatus, ...props }: TDropdownPortalProps<ITEM>) => React.ReactElement;
4
- export default DropdownPortal;
3
+ declare const _default: {
4
+ <T>(props: TDropdownPortalProps<T> & RefAttributes<HTMLDivElement>): ReactElement;
5
+ };
6
+ export default _default;
@@ -1,26 +1,25 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useState, useMemo, useRef, useLayoutEffect } from "react";
2
+ import { forwardRef, useState, useMemo, useLayoutEffect } from "react";
3
3
  import { DEFAULT_RECT_ELEMENT, getDirection, calculateRectElement } from "./helpers.es.js";
4
4
  import { DropdownListStyled } from "./styles.es.js";
5
- const DropdownPortal = ({
5
+ const DropdownPortal$1 = ({
6
6
  direction,
7
7
  anchorRect,
8
8
  height,
9
9
  transitionStatus,
10
10
  ...props
11
- }) => {
11
+ }, ref) => {
12
12
  const [dropdownRect, setDropdownRect] = useState(DEFAULT_RECT_ELEMENT);
13
13
  const maxHeight = useMemo(
14
14
  () => document.documentElement.scrollHeight - anchorRect.height - anchorRect.y - 8,
15
15
  [anchorRect]
16
16
  );
17
- const dropdownRef = useRef(null);
18
17
  const portalDirection = useMemo(
19
18
  () => getDirection({ anchorRect, direction, dropdownRect, offset: 8 }),
20
19
  [dropdownRect, direction]
21
20
  );
22
21
  useLayoutEffect(() => {
23
- setDropdownRect(calculateRectElement(dropdownRef.current));
22
+ setDropdownRect(calculateRectElement(ref.current));
24
23
  }, []);
25
24
  return /* @__PURE__ */ jsx(
26
25
  DropdownListStyled,
@@ -30,13 +29,17 @@ const DropdownPortal = ({
30
29
  anchorRect,
31
30
  dropdownRect,
32
31
  maxHeight,
33
- ref: dropdownRef,
32
+ ref,
34
33
  height,
35
34
  minWidth: anchorRect.width,
35
+ isContent: Boolean(props.content),
36
36
  ...props
37
37
  }
38
38
  );
39
39
  };
40
+ const DropdownPortal = forwardRef(
41
+ DropdownPortal$1
42
+ );
40
43
  export {
41
44
  DropdownPortal as default
42
45
  };
@@ -17,7 +17,7 @@ const defaultGetItemLeadContent = (item) => item.leftContent;
17
17
  const defaultGetItemDisabled = (item) => item.disabled;
18
18
  const defaultGetItemLabel = (item) => item.label;
19
19
  const defaultGetItemOnClick = (item) => item.onClick;
20
- const defaultGetItemGroupId = (item) => item == null ? void 0 : item.groupId;
20
+ const defaultGetItemGroupId = (item) => item?.groupId;
21
21
  function withDefaultGetters(props) {
22
22
  return {
23
23
  ...props,
@@ -15,7 +15,7 @@ const defaultGetItemLeadContent = (item) => item.leftContent;
15
15
  const defaultGetItemDisabled = (item) => item.disabled;
16
16
  const defaultGetItemLabel = (item) => item.label;
17
17
  const defaultGetItemOnClick = (item) => item.onClick;
18
- const defaultGetItemGroupId = (item) => item == null ? void 0 : item.groupId;
18
+ const defaultGetItemGroupId = (item) => item?.groupId;
19
19
  function withDefaultGetters(props) {
20
20
  return {
21
21
  ...props,
@@ -54,18 +54,19 @@ const getDirectionStyles = ({
54
54
  return styled.css``;
55
55
  }
56
56
  };
57
- const getBorderRadius = (direction) => {
57
+ const getBorderRadius = (direction, theme) => {
58
+ const { radius } = theme.components.Dropdown;
58
59
  switch (direction) {
59
60
  case "bottomLeft":
60
- return "0 0.5rem 0.5rem 0.5rem";
61
+ return `0 ${radius} ${radius} ${radius}`;
61
62
  case "bottomRight":
62
- return "0.5rem 0 0.5rem 0.5rem";
63
+ return `${radius} 0 ${radius} ${radius}`;
63
64
  case "topLeft":
64
- return "0.5rem 0.5rem 0.5rem 0";
65
+ return `${radius} ${radius} ${radius} 0`;
65
66
  case "topRight":
66
- return "0.5rem 0.5rem 0 0.5rem";
67
+ return `${radius} ${radius} 0 ${radius}`;
67
68
  default:
68
- return "0.5rem";
69
+ return radius;
69
70
  }
70
71
  };
71
72
  const DropdownWrapper = styled.div`
@@ -74,14 +75,14 @@ const DropdownWrapper = styled.div`
74
75
  height: max-content;
75
76
  `;
76
77
  const DropdownListWrapper = styled.div.withConfig({
77
- shouldForwardProp: (prop) => !["anchorRef", "width", "height", "direction"].includes(prop)
78
+ shouldForwardProp: (prop) => !["anchorRef", "width", "height", "direction", "isContent"].includes(prop)
78
79
  })`
79
- ${({ theme, direction }) => styled.css`
80
- background: ${theme.colors.grayViolet[3]};
81
- padding-top: 0.5rem;
82
- padding-bottom: 0.5rem;
83
- border-radius: ${getBorderRadius(direction)};
84
- border: 1px solid ${theme.colors.grayViolet[9]};
80
+ ${({ theme, direction, isContent }) => styled.css`
81
+ background: ${theme.components.Dropdown.background};
82
+ padding-top: ${!isContent && "0.5rem"};
83
+ padding-bottom: ${!isContent && "0.5rem"};
84
+ border-radius: ${getBorderRadius(direction, theme)};
85
+ border: 1px solid ${theme.components.Dropdown.borderColor};
85
86
  `};
86
87
  ${({ width }) => width && styled.css`
87
88
  width: ${width};
@@ -101,7 +102,8 @@ const DropdownListStyled = styled(DropdownList).withConfig({
101
102
  "anchorRect",
102
103
  "dropdownRect",
103
104
  "maxHeight",
104
- "minWidth"
105
+ "minWidth",
106
+ "isContent"
105
107
  ].includes(prop)
106
108
  })`
107
109
  position: absolute;
@@ -109,7 +111,7 @@ const DropdownListStyled = styled(DropdownList).withConfig({
109
111
  max-height: ${({ maxHeight }) => maxHeight}px;
110
112
  height: ${({ height }) => height || "max-content"};
111
113
  width: ${({ width }) => width || "max-content"};
112
- min-width: ${({ minWidth }) => `${minWidth}px`};
114
+ min-width: ${({ minWidth, isContent }) => isContent ? "max-content" : `${minWidth}px`};
113
115
 
114
116
  ${({ transitionStatus }) => (transitionStatus === "preEnter" || transitionStatus === "exiting") && styled.css`
115
117
  opacity: 0;
@@ -126,22 +128,21 @@ const DropdownItemsWrapper = styled.div`
126
128
  `;
127
129
  const DropdownItemStyled = styled(Text)`
128
130
  justify-content: flex-start;
129
- cursor: ${({ isDisabled }) => isDisabled ? "not-allowed" : "pointer"};
131
+ cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
130
132
  padding: 0.25rem;
131
133
  display: flex;
132
134
  gap: 0.25rem;
133
-
135
+
134
136
  ${({ disabled }) => disabled ? styled.css`
135
- background: ${({ theme }) => theme.colors.gray[3]};
136
- color: ${({ theme }) => theme.colors.grayViolet[1]};
137
- ` : styled.css`
138
- &:hover {
139
- padding-left: calc(0.25rem - 2px);
140
- background: ${({ theme }) => theme.colors.grayViolet[5]};
141
- border-left: 2px solid
142
- ${({ theme }) => theme.colors.violet[9]};
143
- }
144
- `}
137
+ background: ${({ theme }) => theme.components.Dropdown.disabledBackground};
138
+ color: ${({ theme }) => theme.components.Dropdown.disabledColor};
139
+ ` : styled.css`
140
+ &:hover {
141
+ padding-left: calc(0.25rem - 2px);
142
+ background: ${({ theme }) => theme.components.Dropdown.hoverBackground};
143
+ border-left: 2px solid ${({ theme }) => theme.components.Dropdown.borderLeftColor};
144
+ }
145
+ `}
145
146
  `;
146
147
  exports.DropdownItemStyled = DropdownItemStyled;
147
148
  exports.DropdownItemsWrapper = DropdownItemsWrapper;
@@ -13,11 +13,13 @@ type TDropdownListStyledProps<ITEM> = TDropdownListProps<ITEM> & {
13
13
  height?: string;
14
14
  transitionStatus: TransitionStatus;
15
15
  minWidth: number;
16
+ isContent?: boolean;
16
17
  };
17
18
  type TDropdownStyledProps = Required<Pick<IDropdownProps, "direction">> & {
18
19
  top?: number;
19
20
  left?: number;
20
21
  width?: string;
22
+ isContent?: boolean;
21
23
  };
22
24
  export declare const DropdownWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
23
25
  export declare const DropdownListWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, TDropdownStyledProps>> & string;
@@ -52,18 +52,19 @@ const getDirectionStyles = ({
52
52
  return css``;
53
53
  }
54
54
  };
55
- const getBorderRadius = (direction) => {
55
+ const getBorderRadius = (direction, theme) => {
56
+ const { radius } = theme.components.Dropdown;
56
57
  switch (direction) {
57
58
  case "bottomLeft":
58
- return "0 0.5rem 0.5rem 0.5rem";
59
+ return `0 ${radius} ${radius} ${radius}`;
59
60
  case "bottomRight":
60
- return "0.5rem 0 0.5rem 0.5rem";
61
+ return `${radius} 0 ${radius} ${radius}`;
61
62
  case "topLeft":
62
- return "0.5rem 0.5rem 0.5rem 0";
63
+ return `${radius} ${radius} ${radius} 0`;
63
64
  case "topRight":
64
- return "0.5rem 0.5rem 0 0.5rem";
65
+ return `${radius} ${radius} 0 ${radius}`;
65
66
  default:
66
- return "0.5rem";
67
+ return radius;
67
68
  }
68
69
  };
69
70
  const DropdownWrapper = styled.div`
@@ -72,14 +73,14 @@ const DropdownWrapper = styled.div`
72
73
  height: max-content;
73
74
  `;
74
75
  const DropdownListWrapper = styled.div.withConfig({
75
- shouldForwardProp: (prop) => !["anchorRef", "width", "height", "direction"].includes(prop)
76
+ shouldForwardProp: (prop) => !["anchorRef", "width", "height", "direction", "isContent"].includes(prop)
76
77
  })`
77
- ${({ theme, direction }) => css`
78
- background: ${theme.colors.grayViolet[3]};
79
- padding-top: 0.5rem;
80
- padding-bottom: 0.5rem;
81
- border-radius: ${getBorderRadius(direction)};
82
- border: 1px solid ${theme.colors.grayViolet[9]};
78
+ ${({ theme, direction, isContent }) => css`
79
+ background: ${theme.components.Dropdown.background};
80
+ padding-top: ${!isContent && "0.5rem"};
81
+ padding-bottom: ${!isContent && "0.5rem"};
82
+ border-radius: ${getBorderRadius(direction, theme)};
83
+ border: 1px solid ${theme.components.Dropdown.borderColor};
83
84
  `};
84
85
  ${({ width }) => width && css`
85
86
  width: ${width};
@@ -99,7 +100,8 @@ const DropdownListStyled = styled(DropdownList).withConfig({
99
100
  "anchorRect",
100
101
  "dropdownRect",
101
102
  "maxHeight",
102
- "minWidth"
103
+ "minWidth",
104
+ "isContent"
103
105
  ].includes(prop)
104
106
  })`
105
107
  position: absolute;
@@ -107,7 +109,7 @@ const DropdownListStyled = styled(DropdownList).withConfig({
107
109
  max-height: ${({ maxHeight }) => maxHeight}px;
108
110
  height: ${({ height }) => height || "max-content"};
109
111
  width: ${({ width }) => width || "max-content"};
110
- min-width: ${({ minWidth }) => `${minWidth}px`};
112
+ min-width: ${({ minWidth, isContent }) => isContent ? "max-content" : `${minWidth}px`};
111
113
 
112
114
  ${({ transitionStatus }) => (transitionStatus === "preEnter" || transitionStatus === "exiting") && css`
113
115
  opacity: 0;
@@ -124,22 +126,21 @@ const DropdownItemsWrapper = styled.div`
124
126
  `;
125
127
  const DropdownItemStyled = styled(Text)`
126
128
  justify-content: flex-start;
127
- cursor: ${({ isDisabled }) => isDisabled ? "not-allowed" : "pointer"};
129
+ cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
128
130
  padding: 0.25rem;
129
131
  display: flex;
130
132
  gap: 0.25rem;
131
-
133
+
132
134
  ${({ disabled }) => disabled ? css`
133
- background: ${({ theme }) => theme.colors.gray[3]};
134
- color: ${({ theme }) => theme.colors.grayViolet[1]};
135
- ` : css`
136
- &:hover {
137
- padding-left: calc(0.25rem - 2px);
138
- background: ${({ theme }) => theme.colors.grayViolet[5]};
139
- border-left: 2px solid
140
- ${({ theme }) => theme.colors.violet[9]};
141
- }
142
- `}
135
+ background: ${({ theme }) => theme.components.Dropdown.disabledBackground};
136
+ color: ${({ theme }) => theme.components.Dropdown.disabledColor};
137
+ ` : css`
138
+ &:hover {
139
+ padding-left: calc(0.25rem - 2px);
140
+ background: ${({ theme }) => theme.components.Dropdown.hoverBackground};
141
+ border-left: 2px solid ${({ theme }) => theme.components.Dropdown.borderLeftColor};
142
+ }
143
+ `}
143
144
  `;
144
145
  export {
145
146
  DropdownItemStyled,
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const React = require("react");
4
+ const Flex = require("../Flex/Flex.cjs.js");
5
+ const Title = require("../typography/Title/Title.cjs.js");
6
+ const Text = require("../typography/Text/Text.cjs.js");
7
+ const box = require("../assets/box.svg.cjs.js");
8
+ const EmptyState = ({
9
+ image,
10
+ imageStyle,
11
+ className,
12
+ style,
13
+ title = "No data",
14
+ description = "There is no data",
15
+ children
16
+ }) => {
17
+ const Image = React.useMemo(() => {
18
+ if (image) {
19
+ if (typeof image === "string") {
20
+ return /* @__PURE__ */ jsxRuntime.jsx(
21
+ "img",
22
+ {
23
+ src: image,
24
+ alt: title,
25
+ style: imageStyle || { width: "64px", height: "64px" }
26
+ }
27
+ );
28
+ }
29
+ return image;
30
+ }
31
+ return /* @__PURE__ */ jsxRuntime.jsx(box, { width: 64, height: 64, style: imageStyle });
32
+ }, [image]);
33
+ return /* @__PURE__ */ jsxRuntime.jsxs(
34
+ Flex,
35
+ {
36
+ direction: "column",
37
+ className,
38
+ style,
39
+ align: "center",
40
+ justify: "center",
41
+ gap: "xs",
42
+ children: [
43
+ Image,
44
+ /* @__PURE__ */ jsxRuntime.jsx(Title, { size: "s", children: title }),
45
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { children: description }),
46
+ children
47
+ ]
48
+ }
49
+ );
50
+ };
51
+ module.exports = EmptyState;
@@ -0,0 +1,3 @@
1
+ import { IEmptyStateProps } from './types';
2
+ declare const EmptyState: ({ image, imageStyle, className, style, title, description, children }: IEmptyStateProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default EmptyState;
@@ -0,0 +1,52 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import Flex from "../Flex/Flex.es.js";
4
+ import Title from "../typography/Title/Title.es.js";
5
+ import Text from "../typography/Text/Text.es.js";
6
+ import SvgBox from "../assets/box.svg.es.js";
7
+ const EmptyState = ({
8
+ image,
9
+ imageStyle,
10
+ className,
11
+ style,
12
+ title = "No data",
13
+ description = "There is no data",
14
+ children
15
+ }) => {
16
+ const Image = useMemo(() => {
17
+ if (image) {
18
+ if (typeof image === "string") {
19
+ return /* @__PURE__ */ jsx(
20
+ "img",
21
+ {
22
+ src: image,
23
+ alt: title,
24
+ style: imageStyle || { width: "64px", height: "64px" }
25
+ }
26
+ );
27
+ }
28
+ return image;
29
+ }
30
+ return /* @__PURE__ */ jsx(SvgBox, { width: 64, height: 64, style: imageStyle });
31
+ }, [image]);
32
+ return /* @__PURE__ */ jsxs(
33
+ Flex,
34
+ {
35
+ direction: "column",
36
+ className,
37
+ style,
38
+ align: "center",
39
+ justify: "center",
40
+ gap: "xs",
41
+ children: [
42
+ Image,
43
+ /* @__PURE__ */ jsx(Title, { size: "s", children: title }),
44
+ /* @__PURE__ */ jsx(Text, { children: description }),
45
+ children
46
+ ]
47
+ }
48
+ );
49
+ };
50
+ export {
51
+ EmptyState as default
52
+ };
@@ -0,0 +1,2 @@
1
+ export { default as EmptyState } from './EmptyState';
2
+ export type { IEmptyStateProps } from './types';
@@ -0,0 +1,10 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export interface IEmptyStateProps {
3
+ title?: string;
4
+ description?: ReactNode;
5
+ image?: ReactNode;
6
+ imageStyle?: CSSProperties;
7
+ className?: string;
8
+ style?: CSSProperties;
9
+ children?: ReactNode;
10
+ }
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { IFlexProps } from './types';
3
- declare const Flex: React.ForwardRefExoticComponent<IFlexProps & React.RefAttributes<unknown>>;
3
+ declare const Flex: React.ForwardRefExoticComponent<Omit<IFlexProps, "ref"> & React.RefAttributes<unknown>>;
4
4
  export default Flex;
@@ -20,4 +20,5 @@ export interface IFlexProps {
20
20
  /** Main-axis alignment (justify-content) */
21
21
  justify?: "start" | "center" | "end" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
22
22
  wrap?: "wrap" | "wrap-reverse" | "no-wrap";
23
+ [key: string]: any;
23
24
  }