@soul-refiner/design-system 0.1.38 → 0.1.39

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 (705) hide show
  1. package/package.json +12 -2
  2. package/public/logo.svg +0 -12
  3. package/src/common/colors.ts +0 -138
  4. package/src/common/date.ts +0 -30
  5. package/src/common/index.ts +0 -9
  6. package/src/common/styles.ts +0 -95
  7. package/src/components/actions/button/button.tsx +0 -364
  8. package/src/components/actions/button/index.ts +0 -2
  9. package/src/components/actions/dropdown/dropdown.tsx +0 -397
  10. package/src/components/actions/dropdown/index.ts +0 -6
  11. package/src/components/actions/index.ts +0 -14
  12. package/src/components/actions/rate/index.ts +0 -2
  13. package/src/components/actions/rate/rate.tsx +0 -90
  14. package/src/components/actions/switch/index.ts +0 -2
  15. package/src/components/actions/switch/switch.tsx +0 -118
  16. package/src/components/actions/toggle/index.ts +0 -1
  17. package/src/components/actions/toggle/toggle.tsx +0 -77
  18. package/src/components/actions/upload/index.ts +0 -2
  19. package/src/components/actions/upload/upload.tsx +0 -268
  20. package/src/components/atoms/box/box.tsx +0 -69
  21. package/src/components/atoms/box/index.ts +0 -2
  22. package/src/components/atoms/colors/colors.tsx +0 -58
  23. package/src/components/atoms/colors/index.ts +0 -1
  24. package/src/components/atoms/index.ts +0 -9
  25. package/src/components/atoms/typography/display.tsx +0 -37
  26. package/src/components/atoms/typography/heading.tsx +0 -71
  27. package/src/components/atoms/typography/index.ts +0 -8
  28. package/src/components/atoms/typography/paragraph.tsx +0 -48
  29. package/src/components/atoms/typography/typography.tsx +0 -49
  30. package/src/components/card/action/action.tsx +0 -108
  31. package/src/components/card/action/index.ts +0 -2
  32. package/src/components/card/audio/audio.tsx +0 -177
  33. package/src/components/card/audio/index.ts +0 -2
  34. package/src/components/card/card.tsx +0 -51
  35. package/src/components/card/feature/feature.tsx +0 -250
  36. package/src/components/card/feature/index.ts +0 -2
  37. package/src/components/card/index.ts +0 -2
  38. package/src/components/card/person/index.ts +0 -2
  39. package/src/components/card/person/person.tsx +0 -98
  40. package/src/components/card/price/index.ts +0 -2
  41. package/src/components/card/price/price.tsx +0 -112
  42. package/src/components/card/regular/index.ts +0 -2
  43. package/src/components/card/regular/regular.tsx +0 -54
  44. package/src/components/card/video/index.ts +0 -2
  45. package/src/components/card/video/video.tsx +0 -169
  46. package/src/components/card/written/index.ts +0 -2
  47. package/src/components/card/written/written.tsx +0 -178
  48. package/src/components/editor/constants.ts +0 -181
  49. package/src/components/editor/editor.tsx +0 -101
  50. package/src/components/editor/index.ts +0 -2
  51. package/src/components/editor/navbar/alignment_dropdown.tsx +0 -137
  52. package/src/components/editor/navbar/button_modal.tsx +0 -146
  53. package/src/components/editor/navbar/index.ts +0 -2
  54. package/src/components/editor/navbar/navbar.tsx +0 -350
  55. package/src/components/editor/navbar/style_dropdown.tsx +0 -107
  56. package/src/components/editor/plate.ts +0 -37
  57. package/src/components/editor/plugins/blockquote.tsx +0 -25
  58. package/src/components/editor/plugins/buttons.tsx +0 -140
  59. package/src/components/editor/plugins/exitBreak.ts +0 -39
  60. package/src/components/editor/plugins/image.tsx +0 -80
  61. package/src/components/editor/plugins/index.ts +0 -162
  62. package/src/components/editor/plugins/link.tsx +0 -144
  63. package/src/components/editor/plugins/list.tsx +0 -34
  64. package/src/components/editor/plugins/resetBlockType.ts +0 -29
  65. package/src/components/editor/plugins/selectOnBackspace.ts +0 -7
  66. package/src/components/editor/plugins/softBreak.ts +0 -19
  67. package/src/components/editor/plugins/text.tsx +0 -151
  68. package/src/components/feedback/badge/badge.tsx +0 -96
  69. package/src/components/feedback/badge/index.ts +0 -2
  70. package/src/components/feedback/banner/banner.tsx +0 -118
  71. package/src/components/feedback/banner/index.ts +0 -2
  72. package/src/components/feedback/chip/chip.tsx +0 -132
  73. package/src/components/feedback/chip/index.ts +0 -2
  74. package/src/components/feedback/index.ts +0 -14
  75. package/src/components/feedback/loader/index.ts +0 -2
  76. package/src/components/feedback/loader/loader.tsx +0 -64
  77. package/src/components/feedback/notification/index.ts +0 -2
  78. package/src/components/feedback/notification/notification.tsx +0 -129
  79. package/src/components/feedback/progress/index.ts +0 -2
  80. package/src/components/feedback/progress/progress.tsx +0 -169
  81. package/src/components/feedback/toast/index.ts +0 -2
  82. package/src/components/feedback/toast/toast.tsx +0 -103
  83. package/src/components/feedback/tooltip/index.ts +0 -2
  84. package/src/components/feedback/tooltip/tooltip.tsx +0 -42
  85. package/src/components/iconography/avatar/avatar.tsx +0 -298
  86. package/src/components/iconography/avatar/icons/approved.tsx +0 -20
  87. package/src/components/iconography/avatar/icons/busy.tsx +0 -20
  88. package/src/components/iconography/avatar/icons/declined.tsx +0 -20
  89. package/src/components/iconography/avatar/icons/default.tsx +0 -12
  90. package/src/components/iconography/avatar/icons/focus.tsx +0 -20
  91. package/src/components/iconography/avatar/icons/index.ts +0 -9
  92. package/src/components/iconography/avatar/icons/locked.tsx +0 -20
  93. package/src/components/iconography/avatar/icons/offline.tsx +0 -17
  94. package/src/components/iconography/avatar/icons/online.tsx +0 -16
  95. package/src/components/iconography/avatar/icons/subscribed.tsx +0 -33
  96. package/src/components/iconography/avatar/index.ts +0 -2
  97. package/src/components/iconography/icon/icon.tsx +0 -64
  98. package/src/components/iconography/icon/index.ts +0 -2
  99. package/src/components/iconography/index.ts +0 -4
  100. package/src/components/index.ts +0 -9
  101. package/src/components/input/checkbox/checkbox.tsx +0 -60
  102. package/src/components/input/checkbox/index.ts +0 -2
  103. package/src/components/input/date/date.tsx +0 -699
  104. package/src/components/input/date/index.ts +0 -2
  105. package/src/components/input/filter/filter.tsx +0 -307
  106. package/src/components/input/filter/index.ts +0 -2
  107. package/src/components/input/index.ts +0 -10
  108. package/src/components/input/radio/index.ts +0 -2
  109. package/src/components/input/radio/radio.tsx +0 -142
  110. package/src/components/input/search/index.ts +0 -2
  111. package/src/components/input/search/search.tsx +0 -225
  112. package/src/components/navigation/breadcrumb/breadcrumb.tsx +0 -174
  113. package/src/components/navigation/breadcrumb/index.ts +0 -2
  114. package/src/components/navigation/index.ts +0 -4
  115. package/src/components/navigation/tabs/index.ts +0 -2
  116. package/src/components/navigation/tabs/tabs.tsx +0 -248
  117. package/src/components/surfaces/accordion/accordion.tsx +0 -89
  118. package/src/components/surfaces/accordion/index.ts +0 -2
  119. package/src/components/surfaces/comment/comment.tsx +0 -245
  120. package/src/components/surfaces/comment/helpers.ts +0 -35
  121. package/src/components/surfaces/comment/index.ts +0 -2
  122. package/src/components/surfaces/drawer/drawer.tsx +0 -182
  123. package/src/components/surfaces/drawer/index.ts +0 -2
  124. package/src/components/surfaces/index.ts +0 -10
  125. package/src/components/surfaces/message/index.ts +0 -2
  126. package/src/components/surfaces/message/message.tsx +0 -124
  127. package/src/components/surfaces/modal/index.ts +0 -2
  128. package/src/components/surfaces/modal/modal.tsx +0 -178
  129. package/src/components/table/index.ts +0 -7
  130. package/src/components/table/table/index.ts +0 -7
  131. package/src/components/table/table/table.tsx +0 -385
  132. package/src/emoji/emojis.json +0 -17577
  133. package/src/icons/arrow/arrow_all.tsx +0 -14
  134. package/src/icons/arrow/arrow_all_diagonal.tsx +0 -14
  135. package/src/icons/arrow/arrow_both_downwards.tsx +0 -14
  136. package/src/icons/arrow/arrow_both_upwards.tsx +0 -14
  137. package/src/icons/arrow/arrow_circle_left.tsx +0 -14
  138. package/src/icons/arrow/arrow_circle_left_double.tsx +0 -14
  139. package/src/icons/arrow/arrow_circle_left_double_alert.tsx +0 -23
  140. package/src/icons/arrow/arrow_circle_right.tsx +0 -14
  141. package/src/icons/arrow/arrow_circle_right_double.tsx +0 -14
  142. package/src/icons/arrow/arrow_circle_right_double_alert.tsx +0 -14
  143. package/src/icons/arrow/arrow_diagonal_down_left.tsx +0 -14
  144. package/src/icons/arrow/arrow_diagonal_down_left_circle.tsx +0 -14
  145. package/src/icons/arrow/arrow_diagonal_down_right.tsx +0 -14
  146. package/src/icons/arrow/arrow_diagonal_down_right_circle.tsx +0 -14
  147. package/src/icons/arrow/arrow_diagonal_up_left.tsx +0 -14
  148. package/src/icons/arrow/arrow_diagonal_up_left_circle.tsx +0 -14
  149. package/src/icons/arrow/arrow_diagonal_up_right.tsx +0 -14
  150. package/src/icons/arrow/arrow_diagonal_up_right_circle.tsx +0 -14
  151. package/src/icons/arrow/arrow_down.tsx +0 -14
  152. package/src/icons/arrow/arrow_down_bold.tsx +0 -14
  153. package/src/icons/arrow/arrow_down_circle.tsx +0 -14
  154. package/src/icons/arrow/arrow_left.tsx +0 -14
  155. package/src/icons/arrow/arrow_left_bold.tsx +0 -14
  156. package/src/icons/arrow/arrow_left_circle.tsx +0 -14
  157. package/src/icons/arrow/arrow_left_curved.tsx +0 -14
  158. package/src/icons/arrow/arrow_left_curved_circle.tsx +0 -14
  159. package/src/icons/arrow/arrow_right.tsx +0 -14
  160. package/src/icons/arrow/arrow_right_bold.tsx +0 -14
  161. package/src/icons/arrow/arrow_right_circle.tsx +0 -14
  162. package/src/icons/arrow/arrow_right_curved.tsx +0 -14
  163. package/src/icons/arrow/arrow_right_curved_circle.tsx +0 -14
  164. package/src/icons/arrow/arrow_up.tsx +0 -14
  165. package/src/icons/arrow/arrow_up_bold.tsx +0 -14
  166. package/src/icons/arrow/arrow_up_circle.tsx +0 -14
  167. package/src/icons/arrow/chevron_down.tsx +0 -14
  168. package/src/icons/arrow/chevron_down_circle.tsx +0 -14
  169. package/src/icons/arrow/chevron_down_double.tsx +0 -14
  170. package/src/icons/arrow/chevron_down_double_circle.tsx +0 -14
  171. package/src/icons/arrow/chevron_left.tsx +0 -14
  172. package/src/icons/arrow/chevron_left_circle.tsx +0 -14
  173. package/src/icons/arrow/chevron_left_double.tsx +0 -14
  174. package/src/icons/arrow/chevron_left_double_circle.tsx +0 -14
  175. package/src/icons/arrow/chevron_right.tsx +0 -14
  176. package/src/icons/arrow/chevron_right_circle.tsx +0 -14
  177. package/src/icons/arrow/chevron_right_double.tsx +0 -14
  178. package/src/icons/arrow/chevron_right_double_circle.tsx +0 -14
  179. package/src/icons/arrow/chevron_scroll.tsx +0 -14
  180. package/src/icons/arrow/chevron_up.tsx +0 -14
  181. package/src/icons/arrow/chevron_up_circle.tsx +0 -14
  182. package/src/icons/arrow/chevron_up_double.tsx +0 -14
  183. package/src/icons/arrow/chevron_up_double_circle.tsx +0 -14
  184. package/src/icons/arrow/forward_all.tsx +0 -14
  185. package/src/icons/arrow/forward_all_bold.tsx +0 -14
  186. package/src/icons/arrow/forward_bold.tsx +0 -14
  187. package/src/icons/arrow/index.ts +0 -62
  188. package/src/icons/arrow/redo.tsx +0 -14
  189. package/src/icons/arrow/redo_bold.tsx +0 -14
  190. package/src/icons/arrow/reply.tsx +0 -14
  191. package/src/icons/arrow/reply_all.tsx +0 -14
  192. package/src/icons/arrow/reply_all_bold.tsx +0 -14
  193. package/src/icons/arrow/reply_bold.tsx +0 -14
  194. package/src/icons/arrow/undo.tsx +0 -14
  195. package/src/icons/arrow/undo_bold.tsx +0 -14
  196. package/src/icons/audio_video/drag_indicator.tsx +0 -10
  197. package/src/icons/audio_video/eject.tsx +0 -14
  198. package/src/icons/audio_video/equalizer.tsx +0 -14
  199. package/src/icons/audio_video/fast_forward.tsx +0 -14
  200. package/src/icons/audio_video/fast_forward_30.tsx +0 -10
  201. package/src/icons/audio_video/fullscreen.tsx +0 -10
  202. package/src/icons/audio_video/headphones.tsx +0 -10
  203. package/src/icons/audio_video/index.ts +0 -38
  204. package/src/icons/audio_video/library_add.tsx +0 -14
  205. package/src/icons/audio_video/library_delay.tsx +0 -14
  206. package/src/icons/audio_video/library_music.tsx +0 -14
  207. package/src/icons/audio_video/library_queue.tsx +0 -14
  208. package/src/icons/audio_video/microphone.tsx +0 -10
  209. package/src/icons/audio_video/musical_note.tsx +0 -14
  210. package/src/icons/audio_video/next.tsx +0 -14
  211. package/src/icons/audio_video/pause.tsx +0 -14
  212. package/src/icons/audio_video/pause_circle.tsx +0 -14
  213. package/src/icons/audio_video/play.tsx +0 -14
  214. package/src/icons/audio_video/play_circle.tsx +0 -14
  215. package/src/icons/audio_video/play_display.tsx +0 -10
  216. package/src/icons/audio_video/play_pause.tsx +0 -14
  217. package/src/icons/audio_video/play_solid.tsx +0 -10
  218. package/src/icons/audio_video/player_list.tsx +0 -14
  219. package/src/icons/audio_video/player_list_add.tsx +0 -14
  220. package/src/icons/audio_video/player_list_play.tsx +0 -14
  221. package/src/icons/audio_video/previous.tsx +0 -14
  222. package/src/icons/audio_video/radio.tsx +0 -14
  223. package/src/icons/audio_video/record.tsx +0 -14
  224. package/src/icons/audio_video/repeat.tsx +0 -14
  225. package/src/icons/audio_video/rewind.tsx +0 -14
  226. package/src/icons/audio_video/rewind_30.tsx +0 -10
  227. package/src/icons/audio_video/shuffle.tsx +0 -14
  228. package/src/icons/audio_video/sound_wave.tsx +0 -14
  229. package/src/icons/audio_video/stop.tsx +0 -14
  230. package/src/icons/audio_video/stop_circle.tsx +0 -14
  231. package/src/icons/audio_video/subscriptions.tsx +0 -10
  232. package/src/icons/audio_video/tuner.tsx +0 -14
  233. package/src/icons/audio_video/volume.tsx +0 -14
  234. package/src/icons/audio_video/volume_high.tsx +0 -14
  235. package/src/icons/audio_video/volume_low.tsx +0 -14
  236. package/src/icons/audio_video/volume_slash.tsx +0 -14
  237. package/src/icons/basic/aa_sansserif.tsx +0 -11
  238. package/src/icons/basic/aa_serif.tsx +0 -11
  239. package/src/icons/basic/anchor.tsx +0 -24
  240. package/src/icons/basic/bible.tsx +0 -14
  241. package/src/icons/basic/bold.tsx +0 -14
  242. package/src/icons/basic/book.tsx +0 -14
  243. package/src/icons/basic/book_open.tsx +0 -10
  244. package/src/icons/basic/bookmark.tsx +0 -14
  245. package/src/icons/basic/bookmark_add.tsx +0 -14
  246. package/src/icons/basic/bookmark_slash.tsx +0 -14
  247. package/src/icons/basic/bookmarks.tsx +0 -14
  248. package/src/icons/basic/books.tsx +0 -13
  249. package/src/icons/basic/box.tsx +0 -14
  250. package/src/icons/basic/briefcase.tsx +0 -14
  251. package/src/icons/basic/browse_activity.tsx +0 -10
  252. package/src/icons/basic/browser.tsx +0 -14
  253. package/src/icons/basic/browser_slash.tsx +0 -14
  254. package/src/icons/basic/calculator.tsx +0 -14
  255. package/src/icons/basic/camera.tsx +0 -14
  256. package/src/icons/basic/camera_add.tsx +0 -14
  257. package/src/icons/basic/camera_slash.tsx +0 -14
  258. package/src/icons/basic/checkmark.tsx +0 -14
  259. package/src/icons/basic/checkmark_circle.tsx +0 -23
  260. package/src/icons/basic/checkmark_filled.tsx +0 -10
  261. package/src/icons/basic/checkmarks.tsx +0 -14
  262. package/src/icons/basic/circle.tsx +0 -14
  263. package/src/icons/basic/circle_slash.tsx +0 -23
  264. package/src/icons/basic/clear_text_style.tsx +0 -14
  265. package/src/icons/basic/close.tsx +0 -10
  266. package/src/icons/basic/close_circle.tsx +0 -14
  267. package/src/icons/basic/close_filled.tsx +0 -10
  268. package/src/icons/basic/copy.tsx +0 -14
  269. package/src/icons/basic/delete.tsx +0 -14
  270. package/src/icons/basic/detail.tsx +0 -10
  271. package/src/icons/basic/dot.tsx +0 -10
  272. package/src/icons/basic/download.tsx +0 -14
  273. package/src/icons/basic/download_arrow.tsx +0 -14
  274. package/src/icons/basic/droplet.tsx +0 -23
  275. package/src/icons/basic/ellipsis_horizontal.tsx +0 -14
  276. package/src/icons/basic/ellipsis_horizontal_circle.tsx +0 -14
  277. package/src/icons/basic/ellipsis_vertical.tsx +0 -14
  278. package/src/icons/basic/ellipsis_vertical_circle.tsx +0 -14
  279. package/src/icons/basic/eye.tsx +0 -14
  280. package/src/icons/basic/eye_slash.tsx +0 -14
  281. package/src/icons/basic/fingerprint.tsx +0 -10
  282. package/src/icons/basic/flag.tsx +0 -14
  283. package/src/icons/basic/flag_wave.tsx +0 -10
  284. package/src/icons/basic/flag_wave_filled.tsx +0 -10
  285. package/src/icons/basic/flame.tsx +0 -14
  286. package/src/icons/basic/gauge.tsx +0 -14
  287. package/src/icons/basic/glasses.tsx +0 -14
  288. package/src/icons/basic/graduation_cap.tsx +0 -10
  289. package/src/icons/basic/hashmark.tsx +0 -10
  290. package/src/icons/basic/heart.tsx +0 -14
  291. package/src/icons/basic/heart_slash.tsx +0 -14
  292. package/src/icons/basic/highlighter.tsx +0 -10
  293. package/src/icons/basic/home.tsx +0 -14
  294. package/src/icons/basic/image.tsx +0 -14
  295. package/src/icons/basic/inbox.tsx +0 -14
  296. package/src/icons/basic/index.ts +0 -131
  297. package/src/icons/basic/italic.tsx +0 -10
  298. package/src/icons/basic/layers.tsx +0 -14
  299. package/src/icons/basic/lightening.tsx +0 -14
  300. package/src/icons/basic/lightening_slash.tsx +0 -14
  301. package/src/icons/basic/link.tsx +0 -14
  302. package/src/icons/basic/link_slash.tsx +0 -14
  303. package/src/icons/basic/loudspeaker.tsx +0 -10
  304. package/src/icons/basic/maximize.tsx +0 -14
  305. package/src/icons/basic/menu.tsx +0 -14
  306. package/src/icons/basic/menu_circle.tsx +0 -14
  307. package/src/icons/basic/menu_dots.tsx +0 -14
  308. package/src/icons/basic/microphone_slash.tsx +0 -14
  309. package/src/icons/basic/minimize.tsx +0 -14
  310. package/src/icons/basic/minus.tsx +0 -14
  311. package/src/icons/basic/minus_circle.tsx +0 -14
  312. package/src/icons/basic/move_item.tsx +0 -10
  313. package/src/icons/basic/new.tsx +0 -10
  314. package/src/icons/basic/newspaper.tsx +0 -14
  315. package/src/icons/basic/node.tsx +0 -14
  316. package/src/icons/basic/note_pad.tsx +0 -19
  317. package/src/icons/basic/options.tsx +0 -14
  318. package/src/icons/basic/paint_brush.tsx +0 -14
  319. package/src/icons/basic/paperclip.tsx +0 -14
  320. package/src/icons/basic/paperclip_slash.tsx +0 -14
  321. package/src/icons/basic/pencil.tsx +0 -14
  322. package/src/icons/basic/pencil_pad.tsx +0 -14
  323. package/src/icons/basic/plus.tsx +0 -14
  324. package/src/icons/basic/plus_circle.tsx +0 -14
  325. package/src/icons/basic/presentation.tsx +0 -14
  326. package/src/icons/basic/printer.tsx +0 -14
  327. package/src/icons/basic/profile.tsx +0 -14
  328. package/src/icons/basic/profile_check.tsx +0 -14
  329. package/src/icons/basic/pulse.tsx +0 -14
  330. package/src/icons/basic/qr_code.tsx +0 -14
  331. package/src/icons/basic/resize.tsx +0 -23
  332. package/src/icons/basic/scan.tsx +0 -14
  333. package/src/icons/basic/scissors.tsx +0 -14
  334. package/src/icons/basic/screenshot.tsx +0 -14
  335. package/src/icons/basic/search.tsx +0 -14
  336. package/src/icons/basic/select_item.tsx +0 -11
  337. package/src/icons/basic/settings.tsx +0 -14
  338. package/src/icons/basic/share.tsx +0 -14
  339. package/src/icons/basic/share_external.tsx +0 -14
  340. package/src/icons/basic/square.tsx +0 -14
  341. package/src/icons/basic/star.tsx +0 -14
  342. package/src/icons/basic/star_circle.tsx +0 -14
  343. package/src/icons/basic/star_filled.tsx +0 -10
  344. package/src/icons/basic/star_filled_half.tsx +0 -14
  345. package/src/icons/basic/star_slash.tsx +0 -14
  346. package/src/icons/basic/sticker.tsx +0 -14
  347. package/src/icons/basic/strikethrough.tsx +0 -10
  348. package/src/icons/basic/subtask.tsx +0 -21
  349. package/src/icons/basic/tax.tsx +0 -21
  350. package/src/icons/basic/text_bg_color.tsx +0 -14
  351. package/src/icons/basic/text_color.tsx +0 -14
  352. package/src/icons/basic/textbox.tsx +0 -10
  353. package/src/icons/basic/thumbs_down.tsx +0 -14
  354. package/src/icons/basic/thumbs_up.tsx +0 -14
  355. package/src/icons/basic/thumbs_up_filled.tsx +0 -10
  356. package/src/icons/basic/toggle_left.tsx +0 -14
  357. package/src/icons/basic/toggle_right.tsx +0 -14
  358. package/src/icons/basic/translate.tsx +0 -10
  359. package/src/icons/basic/trash.tsx +0 -14
  360. package/src/icons/basic/trash_slash.tsx +0 -14
  361. package/src/icons/basic/underline.tsx +0 -10
  362. package/src/icons/basic/upload.tsx +0 -14
  363. package/src/icons/basic/video.tsx +0 -14
  364. package/src/icons/basic/video_add.tsx +0 -15
  365. package/src/icons/basic/video_slash.tsx +0 -14
  366. package/src/icons/basic/wrench.tsx +0 -10
  367. package/src/icons/basic/zoom_in.tsx +0 -14
  368. package/src/icons/basic/zoom_out.tsx +0 -14
  369. package/src/icons/data/bar_chart.tsx +0 -10
  370. package/src/icons/data/bar_chart_downward.tsx +0 -10
  371. package/src/icons/data/bar_chart_downward_outline.tsx +0 -10
  372. package/src/icons/data/bar_chart_upward.tsx +0 -10
  373. package/src/icons/data/bar_chart_upward_outline.tsx +0 -14
  374. package/src/icons/data/candlestick_chart.tsx +0 -10
  375. package/src/icons/data/four_circles.tsx +0 -14
  376. package/src/icons/data/index.ts +0 -20
  377. package/src/icons/data/legend_toggle.tsx +0 -10
  378. package/src/icons/data/line_chart.tsx +0 -10
  379. package/src/icons/data/line_chart_area.tsx +0 -10
  380. package/src/icons/data/line_chart_area_shaded.tsx +0 -10
  381. package/src/icons/data/line_chart_double.tsx +0 -10
  382. package/src/icons/data/line_chart_downward.tsx +0 -10
  383. package/src/icons/data/line_chart_node.tsx +0 -10
  384. package/src/icons/data/line_chart_outline.tsx +0 -10
  385. package/src/icons/data/line_chart_search.tsx +0 -10
  386. package/src/icons/data/line_chart_stars.tsx +0 -10
  387. package/src/icons/data/line_chart_upward.tsx +0 -10
  388. package/src/icons/data/pie_chart.tsx +0 -19
  389. package/src/icons/data/tree.tsx +0 -10
  390. package/src/icons/email/index.ts +0 -8
  391. package/src/icons/email/mail.tsx +0 -14
  392. package/src/icons/email/mail_check.tsx +0 -14
  393. package/src/icons/email/mail_minus.tsx +0 -14
  394. package/src/icons/email/mail_send.tsx +0 -14
  395. package/src/icons/email/send.tsx +0 -14
  396. package/src/icons/email/send_close.tsx +0 -10
  397. package/src/icons/email/send_schedule.tsx +0 -10
  398. package/src/icons/email/send_text.tsx +0 -14
  399. package/src/icons/file/clipboard.tsx +0 -14
  400. package/src/icons/file/clipboard_check.tsx +0 -14
  401. package/src/icons/file/clipboard_close.tsx +0 -14
  402. package/src/icons/file/clipboard_minus.tsx +0 -14
  403. package/src/icons/file/clipboard_plus.tsx +0 -14
  404. package/src/icons/file/clipboard_text.tsx +0 -14
  405. package/src/icons/file/file.tsx +0 -14
  406. package/src/icons/file/file_add.tsx +0 -14
  407. package/src/icons/file/file_check.tsx +0 -14
  408. package/src/icons/file/file_close.tsx +0 -14
  409. package/src/icons/file/file_code.tsx +0 -14
  410. package/src/icons/file/file_download.tsx +0 -14
  411. package/src/icons/file/file_draft.tsx +0 -14
  412. package/src/icons/file/file_gear.tsx +0 -15
  413. package/src/icons/file/file_minus.tsx +0 -14
  414. package/src/icons/file/file_plus.tsx +0 -14
  415. package/src/icons/file/file_scan.tsx +0 -14
  416. package/src/icons/file/file_shred.tsx +0 -14
  417. package/src/icons/file/file_text.tsx +0 -14
  418. package/src/icons/file/file_upload.tsx +0 -14
  419. package/src/icons/file/folder.tsx +0 -14
  420. package/src/icons/file/folder_add.tsx +0 -14
  421. package/src/icons/file/folder_arrow.tsx +0 -14
  422. package/src/icons/file/folder_check.tsx +0 -14
  423. package/src/icons/file/folder_close.tsx +0 -14
  424. package/src/icons/file/folder_cloud.tsx +0 -14
  425. package/src/icons/file/folder_minus.tsx +0 -14
  426. package/src/icons/file/folder_music.tsx +0 -14
  427. package/src/icons/file/folder_open.tsx +0 -14
  428. package/src/icons/file/folder_plus.tsx +0 -14
  429. package/src/icons/file/folder_zip.tsx +0 -14
  430. package/src/icons/file/index.ts +0 -35
  431. package/src/icons/file/note.tsx +0 -14
  432. package/src/icons/file/note_text.tsx +0 -14
  433. package/src/icons/file/pdf.tsx +0 -10
  434. package/src/icons/file/photo.tsx +0 -14
  435. package/src/icons/finance/bitcoin.tsx +0 -14
  436. package/src/icons/finance/coins.tsx +0 -34
  437. package/src/icons/finance/credit_card.tsx +0 -14
  438. package/src/icons/finance/credit_card_add.tsx +0 -14
  439. package/src/icons/finance/credit_card_face.tsx +0 -14
  440. package/src/icons/finance/credit_card_member.tsx +0 -10
  441. package/src/icons/finance/credit_card_outcome.tsx +0 -14
  442. package/src/icons/finance/credit_card_scan.tsx +0 -14
  443. package/src/icons/finance/credit_card_share.tsx +0 -14
  444. package/src/icons/finance/credit_card_slash.tsx +0 -14
  445. package/src/icons/finance/currency_exchange.tsx +0 -10
  446. package/src/icons/finance/dollar.tsx +0 -10
  447. package/src/icons/finance/ethereum.tsx +0 -14
  448. package/src/icons/finance/index.ts +0 -16
  449. package/src/icons/finance/paypass.tsx +0 -14
  450. package/src/icons/finance/strongbox.tsx +0 -14
  451. package/src/icons/finance/wallet.tsx +0 -14
  452. package/src/icons/index.ts +0 -21
  453. package/src/icons/layout/block_align_bottom.tsx +0 -14
  454. package/src/icons/layout/block_align_center.tsx +0 -14
  455. package/src/icons/layout/block_align_left.tsx +0 -14
  456. package/src/icons/layout/block_align_middle.tsx +0 -14
  457. package/src/icons/layout/block_align_right.tsx +0 -14
  458. package/src/icons/layout/block_align_top.tsx +0 -14
  459. package/src/icons/layout/block_horizontal.tsx +0 -14
  460. package/src/icons/layout/block_vertical.tsx +0 -14
  461. package/src/icons/layout/edit_shape.tsx +0 -14
  462. package/src/icons/layout/elements.tsx +0 -10
  463. package/src/icons/layout/elements_add.tsx +0 -14
  464. package/src/icons/layout/elements_filled.tsx +0 -10
  465. package/src/icons/layout/elements_masonry.tsx +0 -14
  466. package/src/icons/layout/frame.tsx +0 -14
  467. package/src/icons/layout/frame_stack.tsx +0 -14
  468. package/src/icons/layout/grid.tsx +0 -14
  469. package/src/icons/layout/grid_column_three.tsx +0 -14
  470. package/src/icons/layout/grid_column_two.tsx +0 -14
  471. package/src/icons/layout/grid_dynamic.tsx +0 -14
  472. package/src/icons/layout/grid_frame.tsx +0 -14
  473. package/src/icons/layout/grid_row_three.tsx +0 -14
  474. package/src/icons/layout/grid_row_two.tsx +0 -14
  475. package/src/icons/layout/grid_six.tsx +0 -14
  476. package/src/icons/layout/grid_small.tsx +0 -14
  477. package/src/icons/layout/iframe.tsx +0 -14
  478. package/src/icons/layout/index.ts +0 -44
  479. package/src/icons/layout/kanban.tsx +0 -14
  480. package/src/icons/layout/layout.tsx +0 -14
  481. package/src/icons/layout/list.tsx +0 -14
  482. package/src/icons/layout/list_filled.tsx +0 -15
  483. package/src/icons/layout/padding.tsx +0 -14
  484. package/src/icons/layout/page_break.tsx +0 -14
  485. package/src/icons/layout/rotate_left.tsx +0 -14
  486. package/src/icons/layout/rotate_right.tsx +0 -14
  487. package/src/icons/layout/ruler.tsx +0 -14
  488. package/src/icons/layout/segment.tsx +0 -14
  489. package/src/icons/layout/select_area.tsx +0 -14
  490. package/src/icons/layout/select_boundary.tsx +0 -14
  491. package/src/icons/layout/sidebar_left.tsx +0 -14
  492. package/src/icons/layout/sidebar_right.tsx +0 -14
  493. package/src/icons/layout/slides.tsx +0 -14
  494. package/src/icons/layout/slides_horizontal.tsx +0 -14
  495. package/src/icons/layout/slides_vertical.tsx +0 -19
  496. package/src/icons/layout/stack.tsx +0 -14
  497. package/src/icons/layout/text.tsx +0 -14
  498. package/src/icons/maps/atlas.tsx +0 -14
  499. package/src/icons/maps/compass.tsx +0 -14
  500. package/src/icons/maps/direction.tsx +0 -14
  501. package/src/icons/maps/direction_angled.tsx +0 -14
  502. package/src/icons/maps/globe.tsx +0 -14
  503. package/src/icons/maps/globe_slash.tsx +0 -14
  504. package/src/icons/maps/index.ts +0 -22
  505. package/src/icons/maps/location.tsx +0 -14
  506. package/src/icons/maps/location_slash.tsx +0 -14
  507. package/src/icons/maps/map.tsx +0 -14
  508. package/src/icons/maps/marker.tsx +0 -14
  509. package/src/icons/maps/panorama.tsx +0 -14
  510. package/src/icons/maps/pin.tsx +0 -14
  511. package/src/icons/maps/pin_arrow.tsx +0 -14
  512. package/src/icons/maps/pin_location.tsx +0 -14
  513. package/src/icons/maps/pin_plus.tsx +0 -14
  514. package/src/icons/maps/pin_question.tsx +0 -14
  515. package/src/icons/maps/pin_slash.tsx +0 -14
  516. package/src/icons/maps/push_pin.tsx +0 -14
  517. package/src/icons/maps/push_pin_filled.tsx +0 -14
  518. package/src/icons/maps/push_pin_slash.tsx +0 -14
  519. package/src/icons/maps/radar.tsx +0 -14
  520. package/src/icons/maps/route.tsx +0 -14
  521. package/src/icons/message/bubble.tsx +0 -14
  522. package/src/icons/message/bubble_question.tsx +0 -14
  523. package/src/icons/message/comment.tsx +0 -14
  524. package/src/icons/message/comment_add.tsx +0 -14
  525. package/src/icons/message/comment_check.tsx +0 -14
  526. package/src/icons/message/comment_close.tsx +0 -14
  527. package/src/icons/message/comment_minus.tsx +0 -14
  528. package/src/icons/message/comment_text.tsx +0 -14
  529. package/src/icons/message/index.ts +0 -8
  530. package/src/icons/misc/advertisement.tsx +0 -14
  531. package/src/icons/misc/atom.tsx +0 -14
  532. package/src/icons/misc/bone.tsx +0 -14
  533. package/src/icons/misc/brightness_high.tsx +0 -14
  534. package/src/icons/misc/brightness_low.tsx +0 -14
  535. package/src/icons/misc/contrast.tsx +0 -14
  536. package/src/icons/misc/crosshairs.tsx +0 -14
  537. package/src/icons/misc/crown.tsx +0 -10
  538. package/src/icons/misc/footprint.tsx +0 -10
  539. package/src/icons/misc/form.tsx +0 -14
  540. package/src/icons/misc/funnel.tsx +0 -14
  541. package/src/icons/misc/index.ts +0 -25
  542. package/src/icons/misc/infinite.tsx +0 -14
  543. package/src/icons/misc/insert_button.tsx +0 -14
  544. package/src/icons/misc/light_bulb.tsx +0 -14
  545. package/src/icons/misc/moon.tsx +0 -14
  546. package/src/icons/misc/nut.tsx +0 -14
  547. package/src/icons/misc/planet.tsx +0 -14
  548. package/src/icons/misc/plus_thick.tsx +0 -14
  549. package/src/icons/misc/pocket.tsx +0 -14
  550. package/src/icons/misc/rocket.tsx +0 -14
  551. package/src/icons/misc/soup.tsx +0 -18
  552. package/src/icons/misc/sun.tsx +0 -14
  553. package/src/icons/misc/toy_horse.tsx +0 -14
  554. package/src/icons/misc/trophy.tsx +0 -14
  555. package/src/icons/misc/watercloset.tsx +0 -10
  556. package/src/icons/notifications/alert_circle.tsx +0 -14
  557. package/src/icons/notifications/alert_octogon.tsx +0 -14
  558. package/src/icons/notifications/alert_triangle.tsx +0 -14
  559. package/src/icons/notifications/app_notification.tsx +0 -14
  560. package/src/icons/notifications/bell.tsx +0 -14
  561. package/src/icons/notifications/bell_alert.tsx +0 -14
  562. package/src/icons/notifications/bell_checkmark.tsx +0 -14
  563. package/src/icons/notifications/bell_minus.tsx +0 -14
  564. package/src/icons/notifications/bell_plus.tsx +0 -14
  565. package/src/icons/notifications/bell_ring.tsx +0 -16
  566. package/src/icons/notifications/bell_slash.tsx +0 -14
  567. package/src/icons/notifications/close_octogon.tsx +0 -14
  568. package/src/icons/notifications/index.ts +0 -14
  569. package/src/icons/notifications/information.tsx +0 -14
  570. package/src/icons/notifications/minus_octogon.tsx +0 -14
  571. package/src/icons/notifications/question_circle.tsx +0 -14
  572. package/src/icons/people/group.tsx +0 -10
  573. package/src/icons/people/group_add.tsx +0 -10
  574. package/src/icons/people/group_chat.tsx +0 -20
  575. package/src/icons/people/group_remove.tsx +0 -10
  576. package/src/icons/people/group_send.tsx +0 -11
  577. package/src/icons/people/groups.tsx +0 -10
  578. package/src/icons/people/index.ts +0 -13
  579. package/src/icons/people/person.tsx +0 -10
  580. package/src/icons/people/person_add.tsx +0 -10
  581. package/src/icons/people/person_checkmark.tsx +0 -10
  582. package/src/icons/people/person_circle.tsx +0 -20
  583. package/src/icons/people/person_close.tsx +0 -20
  584. package/src/icons/people/person_remove.tsx +0 -10
  585. package/src/icons/people/person_slash.tsx +0 -24
  586. package/src/icons/phone/index.ts +0 -14
  587. package/src/icons/phone/keypad.tsx +0 -14
  588. package/src/icons/phone/phone.tsx +0 -14
  589. package/src/icons/phone/phone_add.tsx +0 -14
  590. package/src/icons/phone/phone_calling.tsx +0 -14
  591. package/src/icons/phone/phone_check.tsx +0 -14
  592. package/src/icons/phone/phone_close.tsx +0 -14
  593. package/src/icons/phone/phone_decline.tsx +0 -14
  594. package/src/icons/phone/phone_end.tsx +0 -14
  595. package/src/icons/phone/phone_forwarded.tsx +0 -14
  596. package/src/icons/phone/phone_hash.tsx +0 -14
  597. package/src/icons/phone/phone_incoming.tsx +0 -14
  598. package/src/icons/phone/phone_missed.tsx +0 -14
  599. package/src/icons/phone/phone_outgoing.tsx +0 -14
  600. package/src/icons/phone/phone_pause.tsx +0 -14
  601. package/src/icons/phone/phone_slash.tsx +0 -14
  602. package/src/icons/phone/voicemail.tsx +0 -14
  603. package/src/icons/security/index.ts +0 -11
  604. package/src/icons/security/key.tsx +0 -14
  605. package/src/icons/security/key_slash.tsx +0 -14
  606. package/src/icons/security/lock.tsx +0 -14
  607. package/src/icons/security/lock_circle.tsx +0 -14
  608. package/src/icons/security/lock_open.tsx +0 -14
  609. package/src/icons/security/lock_slash.tsx +0 -14
  610. package/src/icons/security/shield.tsx +0 -14
  611. package/src/icons/security/shield_checkmark.tsx +0 -14
  612. package/src/icons/security/shield_lock.tsx +0 -14
  613. package/src/icons/security/shield_slash.tsx +0 -14
  614. package/src/icons/security/verified.tsx +0 -14
  615. package/src/icons/shopping/basket.tsx +0 -14
  616. package/src/icons/shopping/cart.tsx +0 -14
  617. package/src/icons/shopping/cart_filled.tsx +0 -14
  618. package/src/icons/shopping/coupon.tsx +0 -14
  619. package/src/icons/shopping/coupon_cut.tsx +0 -14
  620. package/src/icons/shopping/delivery.tsx +0 -14
  621. package/src/icons/shopping/discount.tsx +0 -14
  622. package/src/icons/shopping/gift.tsx +0 -14
  623. package/src/icons/shopping/gift_bag.tsx +0 -14
  624. package/src/icons/shopping/index.ts +0 -15
  625. package/src/icons/shopping/inventory.tsx +0 -10
  626. package/src/icons/shopping/point_of_sale.tsx +0 -14
  627. package/src/icons/shopping/shirt.tsx +0 -10
  628. package/src/icons/shopping/tag.tsx +0 -14
  629. package/src/icons/shopping/tag_diagonal.tsx +0 -10
  630. package/src/icons/shopping/tote.tsx +0 -14
  631. package/src/icons/special/index.ts +0 -4
  632. package/src/icons/special/upload_audio.tsx +0 -58
  633. package/src/icons/special/upload_file.tsx +0 -50
  634. package/src/icons/special/upload_image.tsx +0 -52
  635. package/src/icons/special/upload_video.tsx +0 -61
  636. package/src/icons/symbols/at.tsx +0 -14
  637. package/src/icons/symbols/cc.tsx +0 -14
  638. package/src/icons/symbols/cmd.tsx +0 -14
  639. package/src/icons/symbols/facebook.tsx +0 -13
  640. package/src/icons/symbols/google.tsx +0 -33
  641. package/src/icons/symbols/hash.tsx +0 -14
  642. package/src/icons/symbols/index.ts +0 -9
  643. package/src/icons/symbols/instagram.tsx +0 -48
  644. package/src/icons/symbols/messenger.tsx +0 -30
  645. package/src/icons/symbols/twitter.tsx +0 -13
  646. package/src/icons/technology/battery.tsx +0 -14
  647. package/src/icons/technology/battery_100.tsx +0 -14
  648. package/src/icons/technology/battery_20.tsx +0 -14
  649. package/src/icons/technology/battery_40.tsx +0 -14
  650. package/src/icons/technology/battery_60.tsx +0 -14
  651. package/src/icons/technology/battery_80.tsx +0 -14
  652. package/src/icons/technology/battery_charging.tsx +0 -14
  653. package/src/icons/technology/battery_slash.tsx +0 -14
  654. package/src/icons/technology/devices.tsx +0 -14
  655. package/src/icons/technology/floppy_disk.tsx +0 -14
  656. package/src/icons/technology/index.ts +0 -17
  657. package/src/icons/technology/iphone.tsx +0 -14
  658. package/src/icons/technology/laptop.tsx +0 -14
  659. package/src/icons/technology/mobile.tsx +0 -14
  660. package/src/icons/technology/monitor.tsx +0 -14
  661. package/src/icons/technology/server.tsx +0 -14
  662. package/src/icons/technology/sim_card.tsx +0 -14
  663. package/src/icons/technology/usb_stick.tsx +0 -14
  664. package/src/icons/text/align_center.tsx +0 -14
  665. package/src/icons/text/align_justified.tsx +0 -14
  666. package/src/icons/text/align_left.tsx +0 -14
  667. package/src/icons/text/align_right.tsx +0 -14
  668. package/src/icons/text/code_block.tsx +0 -10
  669. package/src/icons/text/divider.tsx +0 -14
  670. package/src/icons/text/footnote.tsx +0 -12
  671. package/src/icons/text/indent_decrease.tsx +0 -10
  672. package/src/icons/text/indent_increase.tsx +0 -10
  673. package/src/icons/text/index.ts +0 -13
  674. package/src/icons/text/list_ordered.tsx +0 -10
  675. package/src/icons/text/list_unordered.tsx +0 -14
  676. package/src/icons/text/quote.tsx +0 -10
  677. package/src/icons/text/table.tsx +0 -14
  678. package/src/icons/time/alarm.tsx +0 -14
  679. package/src/icons/time/alarm_checkmark.tsx +0 -14
  680. package/src/icons/time/alarm_minus.tsx +0 -14
  681. package/src/icons/time/alarm_plus.tsx +0 -14
  682. package/src/icons/time/alarm_slash.tsx +0 -14
  683. package/src/icons/time/alarm_snooze.tsx +0 -14
  684. package/src/icons/time/calendar.tsx +0 -14
  685. package/src/icons/time/calendar_add.tsx +0 -14
  686. package/src/icons/time/calendar_checkmark.tsx +0 -14
  687. package/src/icons/time/calendar_close.tsx +0 -14
  688. package/src/icons/time/calendar_dates.tsx +0 -14
  689. package/src/icons/time/calendar_minus.tsx +0 -14
  690. package/src/icons/time/calendar_plus.tsx +0 -14
  691. package/src/icons/time/calendar_scroll.tsx +0 -16
  692. package/src/icons/time/clock.tsx +0 -14
  693. package/src/icons/time/clock_history.tsx +0 -14
  694. package/src/icons/time/index.ts +0 -19
  695. package/src/icons/time/stopwatch.tsx +0 -14
  696. package/src/icons/time/timer.tsx +0 -14
  697. package/src/icons/time/watch.tsx +0 -14
  698. package/src/index.ts +0 -2
  699. package/src/types/attributes.ts +0 -83
  700. package/src/types/index.ts +0 -17
  701. package/src/utils/date.ts +0 -118
  702. package/src/utils/function.ts +0 -4
  703. package/src/utils/index.ts +0 -14
  704. package/tsconfig.build.json +0 -29
  705. package/tsconfig.json +0 -29
@@ -1,699 +0,0 @@
1
- 'use client';
2
-
3
- import React from 'react';
4
- import styled from 'styled-components';
5
- import { MONTHS, WEEKDAYS } from '../../../common';
6
- import { Button, P } from '../../';
7
- import { ChevronLeft, ChevronRight, ArrowRight } from '../../../icons';
8
- import { buildCalendar, getMonthDays, zeroPad } from '../../../utils';
9
-
10
- export interface DatePickerProps {
11
- endDate?: Date;
12
- label?: React.ReactNode;
13
- onSelect: ({ type, value }: { type: 'end' | 'start'; value: Date }) => void;
14
- startDate: Date;
15
- }
16
-
17
- export const DatePicker = ({
18
- endDate,
19
- label,
20
- onSelect: parentOnSelect,
21
- startDate,
22
- }: DatePickerProps) => {
23
- const today = new Date();
24
- today.setHours(0);
25
- today.setMinutes(0);
26
- today.setSeconds(0);
27
- today.setMilliseconds(0);
28
- const firstOfMonth = new Date(today);
29
- firstOfMonth.setDate(1);
30
- const thisMonth = firstOfMonth.getMonth() + 1;
31
- const thisYear = firstOfMonth.getFullYear();
32
-
33
- const isSingleDate = !endDate;
34
-
35
- const pickerRef = React.useRef<HTMLDivElement>(null);
36
-
37
- const [show, setShow] = React.useState(false);
38
- const [displayDate, setDisplayDate] = React.useState(
39
- () => endDate?.toDateString() ?? startDate.toDateString()
40
- );
41
- const [componentStartDate, setComponentStartDate] = React.useState(() =>
42
- startDate.toDateString()
43
- );
44
- const [componentEndDate, setComponentEndDate] = React.useState(
45
- () => endDate?.toDateString() ?? startDate.toDateString()
46
- );
47
- const [firstClick, setFirstClick] = React.useState(true);
48
-
49
- React.useEffect(() => {
50
- setComponentStartDate(startDate.toDateString());
51
- }, [startDate]);
52
-
53
- React.useEffect(() => {
54
- setComponentEndDate((endDate ?? new Date())?.toDateString());
55
- }, [endDate]);
56
-
57
- React.useEffect(() => {
58
- if (
59
- !isSingleDate &&
60
- new Date(componentStartDate).getTime() >
61
- new Date(componentEndDate).getTime()
62
- ) {
63
- const tempStart = componentStartDate;
64
- setComponentStartDate(componentEndDate);
65
- setComponentEndDate(tempStart);
66
- }
67
- }, [componentEndDate, componentStartDate]);
68
-
69
- const handleShow = () => setShow((prev) => !prev);
70
-
71
- const handleBlur = (event: React.FocusEvent) => {
72
- if (
73
- pickerRef?.current &&
74
- !pickerRef?.current?.contains(event.relatedTarget)
75
- ) {
76
- setShow(false);
77
- }
78
- };
79
-
80
- const handlePreviousMonth = () => {
81
- setDisplayDate((prev) => {
82
- const newDate = new Date(prev);
83
- newDate.setMonth(newDate.getMonth() - 1);
84
- return newDate.toDateString();
85
- });
86
- };
87
-
88
- const handleNextMonth = () => {
89
- setDisplayDate((prev) => {
90
- const newDate = new Date(prev);
91
- newDate.setMonth(newDate.getMonth() + 1);
92
- return newDate.toDateString();
93
- });
94
- };
95
-
96
- const handleFirstClick = () =>
97
- !isSingleDate && setFirstClick((prev) => !prev);
98
-
99
- const onSelect = ({
100
- type,
101
- value,
102
- }: {
103
- type: 'start' | 'end';
104
- value: Date;
105
- }) => {
106
- if (type === 'start') {
107
- setComponentStartDate(value.toDateString());
108
- } else {
109
- setComponentEndDate(value.toDateString());
110
- }
111
- };
112
-
113
- const handleClick = (event: React.MouseEvent) => {
114
- handleFirstClick();
115
- const target = event.target as HTMLElement;
116
- const type = firstClick ? 'start' : 'end';
117
- const day = target.getAttribute('data-day');
118
- const month = target.getAttribute('data-month');
119
- const year = target.getAttribute('data-year');
120
- onSelect({ type, value: new Date(`${month}-${day}-${year}`) });
121
- };
122
-
123
- const handleApply = () => {
124
- parentOnSelect({ type: 'start', value: new Date(componentStartDate) });
125
- !isSingleDate &&
126
- parentOnSelect({ type: 'end', value: new Date(componentEndDate) });
127
- !isSingleDate && setFirstClick(true);
128
- setShow(false);
129
- };
130
-
131
- const handleCancel = () => {
132
- setComponentStartDate(startDate.toDateString());
133
- setComponentEndDate((endDate ?? new Date())?.toDateString());
134
- setFirstClick(true);
135
- setShow(false);
136
- };
137
-
138
- const handleSetToday = () => {
139
- onSelect({ type: 'start', value: today });
140
- onSelect({ type: 'end', value: today });
141
- setDisplayDate(today.toDateString());
142
- setFirstClick(true);
143
- };
144
-
145
- const handleSetYesterday = () => {
146
- const yesterday = new Date(
147
- today.getFullYear(),
148
- today.getMonth(),
149
- today.getDate() - 1
150
- );
151
- onSelect({ type: 'start', value: yesterday });
152
- onSelect({ type: 'end', value: yesterday });
153
- setDisplayDate(today.toDateString());
154
- setFirstClick(true);
155
- };
156
-
157
- const handleLastSevenDays = () => {
158
- const lastWeekDate = new Date(
159
- today.getFullYear(),
160
- today.getMonth(),
161
- today.getDate() - 7
162
- );
163
- onSelect({ type: 'start', value: lastWeekDate });
164
- onSelect({ type: 'end', value: today });
165
- setDisplayDate(today.toDateString());
166
- setFirstClick(true);
167
- };
168
-
169
- const handleLastThirtyDays = () => {
170
- const lastMonthDate = new Date(today);
171
- lastMonthDate.setMonth(thisMonth - 2);
172
- onSelect({ type: 'start', value: lastMonthDate });
173
- onSelect({ type: 'end', value: today });
174
- setDisplayDate(today.toDateString());
175
- setFirstClick(true);
176
- };
177
-
178
- const handleThisMonth = () => {
179
- onSelect({ type: 'start', value: firstOfMonth });
180
- onSelect({
181
- type: 'end',
182
- value: new Date(
183
- firstOfMonth.getFullYear(),
184
- firstOfMonth.getMonth(),
185
- getMonthDays()
186
- ),
187
- });
188
- setDisplayDate(today.toDateString());
189
- setFirstClick(true);
190
- };
191
-
192
- const handleLastMonth = () => {
193
- const lastMonthDate = new Date(firstOfMonth);
194
- lastMonthDate.setMonth(thisMonth - 2);
195
- onSelect({ type: 'start', value: lastMonthDate });
196
- onSelect({
197
- type: 'end',
198
- value: new Date(
199
- lastMonthDate.getFullYear(),
200
- lastMonthDate.getMonth(),
201
- getMonthDays(lastMonthDate.getMonth() + 1)
202
- ),
203
- });
204
- setDisplayDate(lastMonthDate.toDateString());
205
- setFirstClick(true);
206
- };
207
-
208
- const handleLastYear = () => {
209
- const lastYearDate = new Date(today);
210
- lastYearDate.setFullYear(thisYear - 1);
211
- onSelect({ type: 'start', value: lastYearDate });
212
- onSelect({ type: 'end', value: today });
213
- setDisplayDate(today.toDateString());
214
- setFirstClick(true);
215
- };
216
-
217
- const calendar = buildCalendar(
218
- new Date(displayDate).getMonth() + 1,
219
- new Date(displayDate).getFullYear()
220
- );
221
-
222
- const minRange = new Date(componentStartDate).getTime();
223
- const maxRange = new Date(componentEndDate).getTime();
224
-
225
- const displayDateObj = new Date(displayDate);
226
- const displayFirstOfMonth = new Date(displayDateObj);
227
- displayFirstOfMonth.setDate(1);
228
- const displayLastOfMonth = new Date(displayDateObj);
229
- displayLastOfMonth.setDate(getMonthDays(displayDateObj.getMonth() + 1));
230
-
231
- return (
232
- <Wrapper onBlurCapture={handleBlur} ref={pickerRef} tabIndex={0}>
233
- <Trigger onClick={handleShow}>
234
- {label && (
235
- <>
236
- {label}
237
- {' | '}
238
- </>
239
- )}
240
- <span>
241
- {startDate.toLocaleDateString('en-US').replaceAll('/', '-')}
242
- </span>
243
- {!!endDate && startDate.toDateString() !== endDate?.toDateString() && (
244
- <ArrowRight sx="padding: 0px 8px; margin-bottom: -2px;" />
245
- )}
246
- {startDate.toDateString() !== endDate?.toDateString() && (
247
- <span>
248
- {endDate?.toLocaleDateString('en-US').replaceAll('/', '-')}
249
- </span>
250
- )}
251
- </Trigger>
252
- {show && (
253
- <DateSelector>
254
- <InnerWrapper>
255
- {!!endDate && (
256
- <Left>
257
- <Button size="small" type="text" onClick={handleSetToday}>
258
- Today
259
- </Button>
260
- <Button size="small" type="text" onClick={handleSetYesterday}>
261
- Yesterday
262
- </Button>
263
- <Button size="small" type="text" onClick={handleLastSevenDays}>
264
- Last 7 days
265
- </Button>
266
- <Button size="small" type="text" onClick={handleLastThirtyDays}>
267
- Last 30 days
268
- </Button>
269
- <Button size="small" type="text" onClick={handleThisMonth}>
270
- This month
271
- </Button>
272
- <Button size="small" type="text" onClick={handleLastMonth}>
273
- Last month
274
- </Button>
275
- <Button size="small" type="text" onClick={handleLastYear}>
276
- Last Year
277
- </Button>
278
- </Left>
279
- )}
280
- <div>
281
- <MonthBar>
282
- <Arrow onClick={handlePreviousMonth}>
283
- <ChevronLeft size={24} />
284
- </Arrow>
285
- <P>
286
- {`${
287
- Object.values(MONTHS)[
288
- Math.max(
289
- 0,
290
- Math.min(new Date(displayDate).getMonth(), 11)
291
- )
292
- ]
293
- } ${new Date(displayDate).getFullYear()}`}
294
- </P>
295
- <Arrow onClick={handleNextMonth}>
296
- <ChevronRight size={24} />
297
- </Arrow>
298
- </MonthBar>
299
- <WeekdayWrapper>
300
- {Object.values(WEEKDAYS).map((day) => (
301
- <P key={day}>{day}</P>
302
- ))}
303
- </WeekdayWrapper>
304
- <Calendar>
305
- {calendar.map((week, index) => {
306
- return (
307
- <Week key={'week-' + index.toString(36)}>
308
- {week.map((day, dayIndex) => {
309
- const isCurrMonth =
310
- day[1] !==
311
- zeroPad(new Date(displayDate).getMonth() + 1, 2);
312
- const dateObj = new Date(
313
- `${day[1]}-${day[2]}-${day[0]}`
314
- );
315
- const isToday =
316
- Math.abs(dateObj.getTime() - today.getTime()) < 0.5;
317
- const time = dateObj.toDateString();
318
- const isStartDate = time === componentStartDate;
319
- const isEndDate =
320
- !isSingleDate && time === componentEndDate;
321
- const between =
322
- !isSingleDate &&
323
- minRange <= dateObj.getTime() &&
324
- dateObj.getTime() <= maxRange &&
325
- !isStartDate &&
326
- !isEndDate;
327
- const isFirstOfMonth =
328
- displayFirstOfMonth.toDateString() === time;
329
- const isLastOfMonth =
330
- displayLastOfMonth.toDateString() === time;
331
-
332
- return (
333
- <Day
334
- className={`${isToday ? 'today' : ''}${
335
- isCurrMonth ? ' not-current' : ''
336
- }${isStartDate ? ' start-date' : ''}${
337
- isEndDate ? ' end-date' : ''
338
- }${between ? ' between' : ''}${
339
- isFirstOfMonth ? ' first-of-month' : ''
340
- }${isLastOfMonth ? ' last-of-month' : ''}`.trim()}
341
- data-day={day[2]}
342
- data-month={day[1]}
343
- data-year={day[0]}
344
- key={'day-' + dayIndex.toString(36)}
345
- onClick={handleClick}
346
- >
347
- {`${day[2]}`.startsWith('0')
348
- ? `${day[2]}`[1]
349
- : day[2]}
350
- </Day>
351
- );
352
- })}
353
- </Week>
354
- );
355
- })}
356
- </Calendar>
357
- <BottomWrapper>
358
- <Button
359
- onClick={handleCancel}
360
- size="small"
361
- sx="width: 80px;"
362
- type="outlined"
363
- >
364
- Cancel
365
- </Button>
366
- <Button onClick={handleApply} size="small" sx="width: 80px;">
367
- Apply
368
- </Button>
369
- </BottomWrapper>
370
- </div>
371
- </InnerWrapper>
372
- </DateSelector>
373
- )}
374
- </Wrapper>
375
- );
376
- };
377
-
378
- const Wrapper = styled.div`
379
- position: relative;
380
- width: fit-content;
381
- font-family: Inter;
382
- `;
383
-
384
- const Trigger = styled.button`
385
- padding: 12px 24px;
386
- background-color: #ffffff;
387
- border: 1px solid var(--color-grey-6);
388
- border-radius: 24px;
389
- color: var(--color-grey-3);
390
- outline: none;
391
- line-height: 100%;
392
- font-family: Inter;
393
- font-size: 14px;
394
- line-height: 20px;
395
- cursor: pointer;
396
-
397
- span {
398
- line-height: 20px;
399
- color: var(--color-blue-5);
400
- }
401
-
402
- &:hover {
403
- background-color: var(--color-blue-5);
404
- border-color: var(--color-blue-5);
405
- color: #ffffff;
406
- span {
407
- color: #ffffff;
408
- }
409
- }
410
-
411
- &:active {
412
- background-color: var(--color-blue-3);
413
- border-color: var(--color-blue-3);
414
- }
415
- `;
416
-
417
- const DateSelector = styled.div`
418
- transform: translateY(26px);
419
- position: absolute;
420
- z-index: 5;
421
- background-color: #ffffff;
422
- border-radius: 25px;
423
- box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);
424
- `;
425
-
426
- const InnerWrapper = styled.div`
427
- display: flex;
428
- gap: 31px;
429
- padding: 30px;
430
- position: relative;
431
- border-radius: 25px;
432
-
433
- &::before {
434
- position: absolute;
435
- content: '';
436
- width: 24px;
437
- height: 24px;
438
- top: -12px;
439
- left: 48px;
440
- background-color: #ffffff;
441
- transform: rotate(45deg);
442
- box-shadow: -3px -3px 5px rgba(0, 0, 0, 0.1);
443
- }
444
- `;
445
-
446
- const Left = styled.div`
447
- display: flex;
448
- flex-flow: column nowrap;
449
- gap: 24px;
450
- align-items: flex-start;
451
- width: max-content;
452
- margin-bottom: 96px;
453
- padding-right: 48px;
454
- border-right: 1px solid var(--color-grey-8);
455
- user-select: none;
456
-
457
- button {
458
- padding: 0px;
459
-
460
- span {
461
- font-size: 16px;
462
- line-height: 24px;
463
- color: var(--color-grey-5);
464
- font-weight: 400;
465
- }
466
-
467
- &:hover {
468
- span {
469
- color: var(--color-primary-blue-2);
470
- }
471
- }
472
- }
473
- `;
474
-
475
- const MonthBar = styled.div`
476
- display: flex;
477
- justify-content: space-between;
478
- align-items: center;
479
- margin-bottom: 32px;
480
- user-select: none;
481
- `;
482
-
483
- const Arrow = styled.button`
484
- appearance: none;
485
- border: none;
486
- outline: none;
487
- padding: 12px;
488
- display: flex;
489
- justify-content: center;
490
- align-items: center;
491
- border-radius: 50%;
492
- cursor: pointer;
493
- background-color: transparent;
494
-
495
- &:hover {
496
- background-color: var(--color-primary-blue-2);
497
- border-color: #ffffff;
498
- svg {
499
- fill: #ffffff;
500
- }
501
- }
502
- `;
503
-
504
- const WeekdayWrapper = styled.div`
505
- display: flex;
506
- gap: 32px;
507
- user-select: none;
508
- `;
509
-
510
- const Calendar = styled.div`
511
- display: flex;
512
- flex-direction: column;
513
- gap: 32px;
514
- margin: 32px 0px;
515
- user-select: none;
516
- `;
517
-
518
- const Week = styled.div`
519
- display: flex;
520
- gap: 32px;
521
- border-radius: 24px;
522
- `;
523
-
524
- const Day = styled.button`
525
- outline: none;
526
- border: none;
527
- background: transparent;
528
- display: flex;
529
- align-items: center;
530
- justify-content: center;
531
- width: 32px;
532
- height: 32px;
533
- border-radius: 50%;
534
- cursor: pointer;
535
- font-family: Inter;
536
- font-size: 16px;
537
- line-height: 24px;
538
-
539
- &.today {
540
- color: var(--color-primary-blue-2);
541
- font-weight: 600;
542
- }
543
-
544
- &:hover:not(&[class~='start-date']):not(&[class~='end-date']) {
545
- background-color: var(--color-primary-blue-4);
546
- color: var(--color-primary-blue-1);
547
- }
548
-
549
- &[class~='not-current'] {
550
- color: var(--color-grey-9);
551
- cursor: default;
552
- pointer-events: none;
553
- }
554
-
555
- &[class~='start-date'],
556
- &[class~='end-date'] {
557
- background-color: var(--color-primary-blue-2);
558
- color: #ffffff;
559
-
560
- &[class~='not-current'] {
561
- background-color: var(--color-blue-9);
562
- }
563
- }
564
-
565
- &[class~='start-date'] + [class~='end-date'] {
566
- position: relative;
567
- &::before {
568
- content: '';
569
- position: absolute;
570
- z-index: -2;
571
- height: 32px;
572
- width: 64px;
573
- background-color: var(--color-primary-blue-3);
574
- right: 16px;
575
- top: 0;
576
- }
577
-
578
- &[class~='not-current'] {
579
- &::before {
580
- background-color: var(--color-blue-10);
581
- }
582
- }
583
- }
584
-
585
- &[class~='not-current'] {
586
- position: relative;
587
- &[class~='end-date']:not(:first-of-type):not(.start-date) {
588
- &::before {
589
- content: '';
590
- position: absolute;
591
- z-index: -2;
592
- height: 32px;
593
- width: 62px;
594
- background-color: var(--color-blue-10);
595
- right: 16px;
596
- top: 0;
597
- }
598
- }
599
- }
600
-
601
- &[class~='first-of-month'] {
602
- &[class~='end-date'] {
603
- &::before {
604
- background-color: var(--color-blue-10);
605
- }
606
- }
607
- }
608
-
609
- &[class~='between'] {
610
- position: relative;
611
-
612
- &::before {
613
- content: '';
614
- position: absolute;
615
- z-index: -2;
616
- height: 32px;
617
- width: 132px;
618
- background-color: var(--color-primary-blue-3);
619
- right: -48px;
620
- top: 0;
621
- }
622
-
623
- &:first-of-type::before {
624
- width: 80px;
625
- border-radius: 24px 0px 0px 24px;
626
- }
627
-
628
- &:last-of-type::before {
629
- width: 80px;
630
- right: 0px;
631
- border-radius: 0px 24px 24px 0px;
632
- }
633
-
634
- &[class~='not-current'] {
635
- &::before {
636
- background-color: var(--color-blue-10);
637
- }
638
- }
639
-
640
- &[class~='first-of-month']:not(:first-of-type) {
641
- &::before {
642
- width: 32px;
643
- border-top-left-radius: 24px;
644
- border-bottom-left-radius: 24px;
645
- }
646
- }
647
-
648
- &[class~='first-of-month']:not([class~='not-current']):not(
649
- :first-of-type
650
- ):not(:last-of-type) {
651
- &::before {
652
- width: 64px;
653
- border-top-left-radius: 24px;
654
- border-bottom-left-radius: 24px;
655
- background-color: var(--color-blue-10);
656
- right: 16px;
657
- }
658
- &::after {
659
- content: '';
660
- position: absolute;
661
- z-index: -2;
662
- height: 32px;
663
- width: 70px;
664
- background-color: var(--color-primary-blue-3);
665
- right: -32px;
666
- top: 0;
667
- border-top-left-radius: 24px;
668
- border-bottom-left-radius: 24px;
669
- }
670
- &:last-of-type {
671
- &::before {
672
- width: 32px;
673
- }
674
- }
675
- }
676
-
677
- &[class~='last-of-month']:not(&[class~='not-current']) {
678
- &::before {
679
- z-index: -1;
680
- border-radius: 0px 24px 24px 0px;
681
- width: 80px;
682
- right: 0px;
683
- }
684
- &:first-of-type {
685
- &::before {
686
- border-top-left-radius: 24px;
687
- border-bottom-left-radius: 24px;
688
- width: 32px;
689
- }
690
- }
691
- }
692
- }
693
- `;
694
-
695
- const BottomWrapper = styled.div`
696
- display: flex;
697
- justify-content: flex-end;
698
- gap: 18px;
699
- `;
@@ -1,2 +0,0 @@
1
- export { DatePicker } from './date';
2
- export type { DatePickerProps } from './date';