@harjs/react-ui 1.0.0

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 (425) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/assets/css/components/charts/gantt/styles.css +62 -0
  4. package/dist/assets/css/components/charts/pie/pie.css +90 -0
  5. package/dist/assets/css/components/data-display/calendar/styles.css +15 -0
  6. package/dist/assets/css/components/data-display/calendar/styles.week-view.css +144 -0
  7. package/dist/assets/css/components/data-display/card/statuses.css +377 -0
  8. package/dist/assets/css/components/data-display/card/styles.css +26 -0
  9. package/dist/assets/css/components/data-display/chip/chip.css +13 -0
  10. package/dist/assets/css/components/data-display/diagram/styles.css +125 -0
  11. package/dist/assets/css/components/data-display/divider/divider.css +8 -0
  12. package/dist/assets/css/components/data-display/dnd/animations.css +11 -0
  13. package/dist/assets/css/components/data-display/dnd/shadow.css +26 -0
  14. package/dist/assets/css/components/data-display/dnd/styles.css +72 -0
  15. package/dist/assets/css/components/data-display/grid-system/column/position.css +21 -0
  16. package/dist/assets/css/components/data-display/grid-system/column/styles.css +379 -0
  17. package/dist/assets/css/components/data-display/grid-system/row/styles.css +35 -0
  18. package/dist/assets/css/components/data-display/grid-system/styles.css +6 -0
  19. package/dist/assets/css/components/data-display/kanban-board/styles.css +371 -0
  20. package/dist/assets/css/components/data-display/paper/styles.css +49 -0
  21. package/dist/assets/css/components/data-display/syntax-highlighter/core/jsx.template.css +65 -0
  22. package/dist/assets/css/components/data-display/syntax-highlighter/syntax-highlighter.css +58 -0
  23. package/dist/assets/css/components/data-display/table/filter-popup.css +11 -0
  24. package/dist/assets/css/components/data-display/table/properties-popup.css +42 -0
  25. package/dist/assets/css/components/data-display/table/scroll.css +208 -0
  26. package/dist/assets/css/components/data-display/table/styles.css +867 -0
  27. package/dist/assets/css/components/data-display/tabs/tabs.css +245 -0
  28. package/dist/assets/css/components/data-display/typography/paragraph/align.css +13 -0
  29. package/dist/assets/css/components/data-display/typography/paragraph/color.css +51 -0
  30. package/dist/assets/css/components/data-display/typography/paragraph/core.css +6 -0
  31. package/dist/assets/css/components/data-display/typography/paragraph/size.css +13 -0
  32. package/dist/assets/css/components/data-display/typography/title/align.css +13 -0
  33. package/dist/assets/css/components/data-display/typography/title/color.css +0 -0
  34. package/dist/assets/css/components/data-display/typography/title/core.css +5 -0
  35. package/dist/assets/css/components/data-display/typography/title/size.css +41 -0
  36. package/dist/assets/css/components/data-display/typography/typography.css +11 -0
  37. package/dist/assets/css/components/feedback/alert/statuses.css +224 -0
  38. package/dist/assets/css/components/feedback/alert/styles.css +61 -0
  39. package/dist/assets/css/components/feedback/drawer/content.css +7 -0
  40. package/dist/assets/css/components/feedback/drawer/header.css +56 -0
  41. package/dist/assets/css/components/feedback/drawer/styles.css +85 -0
  42. package/dist/assets/css/components/feedback/loading/loading.css +54 -0
  43. package/dist/assets/css/components/feedback/modal/content.css +6 -0
  44. package/dist/assets/css/components/feedback/modal/footer.css +9 -0
  45. package/dist/assets/css/components/feedback/modal/header.css +56 -0
  46. package/dist/assets/css/components/feedback/modal/media-queries/medium.css +11 -0
  47. package/dist/assets/css/components/feedback/modal/media-queries/small.css +11 -0
  48. package/dist/assets/css/components/feedback/modal/media-queries/x-large.css +5 -0
  49. package/dist/assets/css/components/feedback/modal/styles.css +53 -0
  50. package/dist/assets/css/components/feedback/notification/notification.css +157 -0
  51. package/dist/assets/css/components/feedback/popover/styles.css +53 -0
  52. package/dist/assets/css/components/feedback/popup-confirm/styles.css +165 -0
  53. package/dist/assets/css/components/feedback/progress/animations.css +10 -0
  54. package/dist/assets/css/components/feedback/progress/progress.css +50 -0
  55. package/dist/assets/css/components/feedback/progress/statuses.css +188 -0
  56. package/dist/assets/css/components/feedback/tooltip/styles.css +60 -0
  57. package/dist/assets/css/components/form/button/core/icon.css +37 -0
  58. package/dist/assets/css/components/form/button/core/position.css +19 -0
  59. package/dist/assets/css/components/form/button/core/shape.css +13 -0
  60. package/dist/assets/css/components/form/button/core/size.css +14 -0
  61. package/dist/assets/css/components/form/button/styles.css +32 -0
  62. package/dist/assets/css/components/form/button-action/styles.css +24 -0
  63. package/dist/assets/css/components/form/button-group/styles.css +26 -0
  64. package/dist/assets/css/components/form/checkbox/checkbox.css +53 -0
  65. package/dist/assets/css/components/form/checkbox/core/border.css +252 -0
  66. package/dist/assets/css/components/form/date-picker/calendar/calendar.css +14 -0
  67. package/dist/assets/css/components/form/date-picker/calendar/content.css +62 -0
  68. package/dist/assets/css/components/form/date-picker/calendar/footer.css +10 -0
  69. package/dist/assets/css/components/form/date-picker/calendar/header.css +86 -0
  70. package/dist/assets/css/components/form/date-picker/clock/clock.css +14 -0
  71. package/dist/assets/css/components/form/date-picker/clock/content.css +48 -0
  72. package/dist/assets/css/components/form/date-picker/clock/footer.css +6 -0
  73. package/dist/assets/css/components/form/date-picker/clock/header.css +8 -0
  74. package/dist/assets/css/components/form/date-picker/date-picker.css +36 -0
  75. package/dist/assets/css/components/form/input/core/addon.css +11 -0
  76. package/dist/assets/css/components/form/input/core/border.css +114 -0
  77. package/dist/assets/css/components/form/input/core/button.css +34 -0
  78. package/dist/assets/css/components/form/input/core/icon.css +22 -0
  79. package/dist/assets/css/components/form/input/otp/styles.css +20 -0
  80. package/dist/assets/css/components/form/input/phone/styles.css +50 -0
  81. package/dist/assets/css/components/form/input/styles.css +120 -0
  82. package/dist/assets/css/components/form/radio/core/border.css +252 -0
  83. package/dist/assets/css/components/form/radio/radio.css +69 -0
  84. package/dist/assets/css/components/form/select/options.css +117 -0
  85. package/dist/assets/css/components/form/select/styles.css +184 -0
  86. package/dist/assets/css/components/form/switch/core/border.css +208 -0
  87. package/dist/assets/css/components/form/switch/styles.css +61 -0
  88. package/dist/assets/css/components/form/text-editor/styles.css +130 -0
  89. package/dist/assets/css/components/form/upload/dropzone.css +166 -0
  90. package/dist/assets/css/components/form/upload/list-and-gird.css +183 -0
  91. package/dist/assets/css/components/form/upload/styles.css +215 -0
  92. package/dist/assets/css/components/layout/layout.css +130 -0
  93. package/dist/assets/css/components/layout/media-queries/large.css +19 -0
  94. package/dist/assets/css/components/layout/media-queries/medium.css +19 -0
  95. package/dist/assets/css/components/layout/media-queries/small.css +19 -0
  96. package/dist/assets/css/components/layout/media-queries/x-large.css +19 -0
  97. package/dist/assets/css/components/layout/media-queries/x-small.css +3 -0
  98. package/dist/assets/css/components/layout/media-queries/xx-large.css +19 -0
  99. package/dist/assets/css/components/layout/media-queries/xxx-large.css +20 -0
  100. package/dist/assets/css/components/navigation/breadcrumb/styles.css +0 -0
  101. package/dist/assets/css/components/navigation/menu/core/open-or-close.css +12 -0
  102. package/dist/assets/css/components/navigation/menu/styles.css +163 -0
  103. package/dist/assets/css/components/navigation/menu/variant/horizontal.css +3 -0
  104. package/dist/assets/css/components/navigation/menu/variant/vertical.css +3 -0
  105. package/dist/assets/css/components/navigation/pagination/styles.css +169 -0
  106. package/dist/assets/css/components/navigation/steps/animation.css +8 -0
  107. package/dist/assets/css/components/navigation/steps/styles.css +146 -0
  108. package/dist/assets/css/core/animation.css +164 -0
  109. package/dist/assets/css/core/ar-core.css +192 -0
  110. package/dist/assets/css/core/color-palette.css +111 -0
  111. package/dist/assets/css/core/utils.css +16 -0
  112. package/dist/assets/css/core/variants/animation.css +164 -0
  113. package/dist/assets/css/core/variants/border.css +18 -0
  114. package/dist/assets/css/core/variants/borderless.css +362 -0
  115. package/dist/assets/css/core/variants/dashed.css +362 -0
  116. package/dist/assets/css/core/variants/filled.css +428 -0
  117. package/dist/assets/css/core/variants/outlined.css +439 -0
  118. package/dist/assets/css/core/variants/surface.css +252 -0
  119. package/dist/assets/fonts/JetBrainsMono-Bold.ttf +0 -0
  120. package/dist/assets/fonts/JetBrainsMono-Regular.ttf +0 -0
  121. package/dist/components/charts/gantt/IProps.d.ts +24 -0
  122. package/dist/components/charts/gantt/IProps.js +1 -0
  123. package/dist/components/charts/gantt/index.d.ts +5 -0
  124. package/dist/components/charts/gantt/index.js +308 -0
  125. package/dist/components/charts/index.d.ts +2 -0
  126. package/dist/components/charts/index.js +2 -0
  127. package/dist/components/charts/pie/IProps.d.ts +7 -0
  128. package/dist/components/charts/pie/IProps.js +1 -0
  129. package/dist/components/charts/pie/index.d.ts +5 -0
  130. package/dist/components/charts/pie/index.js +56 -0
  131. package/dist/components/data-display/calendar/Body.d.ts +23 -0
  132. package/dist/components/data-display/calendar/Body.js +14 -0
  133. package/dist/components/data-display/calendar/Header.d.ts +20 -0
  134. package/dist/components/data-display/calendar/Header.js +26 -0
  135. package/dist/components/data-display/calendar/IProps.d.ts +14 -0
  136. package/dist/components/data-display/calendar/IProps.js +1 -0
  137. package/dist/components/data-display/calendar/index.d.ts +8 -0
  138. package/dist/components/data-display/calendar/index.js +27 -0
  139. package/dist/components/data-display/calendar/views/Day.d.ts +3 -0
  140. package/dist/components/data-display/calendar/views/Day.js +5 -0
  141. package/dist/components/data-display/calendar/views/Month.d.ts +3 -0
  142. package/dist/components/data-display/calendar/views/Month.js +5 -0
  143. package/dist/components/data-display/calendar/views/Week.d.ts +19 -0
  144. package/dist/components/data-display/calendar/views/Week.js +173 -0
  145. package/dist/components/data-display/card/IProps.d.ts +10 -0
  146. package/dist/components/data-display/card/IProps.js +1 -0
  147. package/dist/components/data-display/card/index.d.ts +5 -0
  148. package/dist/components/data-display/card/index.js +14 -0
  149. package/dist/components/data-display/chip/IProps.d.ts +6 -0
  150. package/dist/components/data-display/chip/IProps.js +1 -0
  151. package/dist/components/data-display/chip/index.d.ts +5 -0
  152. package/dist/components/data-display/chip/index.js +17 -0
  153. package/dist/components/data-display/diagram/IProps.d.ts +6 -0
  154. package/dist/components/data-display/diagram/IProps.js +1 -0
  155. package/dist/components/data-display/diagram/index.d.ts +5 -0
  156. package/dist/components/data-display/diagram/index.js +298 -0
  157. package/dist/components/data-display/divider/IProps.d.ts +6 -0
  158. package/dist/components/data-display/divider/IProps.js +1 -0
  159. package/dist/components/data-display/divider/index.d.ts +5 -0
  160. package/dist/components/data-display/divider/index.js +5 -0
  161. package/dist/components/data-display/dnd/IProps.d.ts +12 -0
  162. package/dist/components/data-display/dnd/IProps.js +1 -0
  163. package/dist/components/data-display/dnd/index.d.ts +5 -0
  164. package/dist/components/data-display/dnd/index.js +125 -0
  165. package/dist/components/data-display/grid-system/box/Box.d.ts +6 -0
  166. package/dist/components/data-display/grid-system/box/Box.js +13 -0
  167. package/dist/components/data-display/grid-system/column/Column.d.ts +4 -0
  168. package/dist/components/data-display/grid-system/column/Column.js +21 -0
  169. package/dist/components/data-display/grid-system/column/IProps.d.ts +13 -0
  170. package/dist/components/data-display/grid-system/column/IProps.js +1 -0
  171. package/dist/components/data-display/grid-system/index.d.ts +10 -0
  172. package/dist/components/data-display/grid-system/index.js +11 -0
  173. package/dist/components/data-display/grid-system/row/IProps.d.ts +4 -0
  174. package/dist/components/data-display/grid-system/row/IProps.js +1 -0
  175. package/dist/components/data-display/grid-system/row/Row.d.ts +4 -0
  176. package/dist/components/data-display/grid-system/row/Row.js +6 -0
  177. package/dist/components/data-display/kanban-board/IProps.d.ts +31 -0
  178. package/dist/components/data-display/kanban-board/IProps.js +1 -0
  179. package/dist/components/data-display/kanban-board/filter/DateFilters.d.ts +25 -0
  180. package/dist/components/data-display/kanban-board/filter/DateFilters.js +55 -0
  181. package/dist/components/data-display/kanban-board/filter/SelectFilters.d.ts +27 -0
  182. package/dist/components/data-display/kanban-board/filter/SelectFilters.js +43 -0
  183. package/dist/components/data-display/kanban-board/filter/index.d.ts +36 -0
  184. package/dist/components/data-display/kanban-board/filter/index.js +47 -0
  185. package/dist/components/data-display/kanban-board/index.d.ts +5 -0
  186. package/dist/components/data-display/kanban-board/index.js +309 -0
  187. package/dist/components/data-display/paper/IProps.d.ts +6 -0
  188. package/dist/components/data-display/paper/IProps.js +1 -0
  189. package/dist/components/data-display/paper/index.d.ts +5 -0
  190. package/dist/components/data-display/paper/index.js +12 -0
  191. package/dist/components/data-display/syntax-highlighter/Import.d.ts +4 -0
  192. package/dist/components/data-display/syntax-highlighter/Import.js +5 -0
  193. package/dist/components/data-display/syntax-highlighter/classes/Compiler.d.ts +7 -0
  194. package/dist/components/data-display/syntax-highlighter/classes/Compiler.js +92 -0
  195. package/dist/components/data-display/syntax-highlighter/classes/Parser.d.ts +9 -0
  196. package/dist/components/data-display/syntax-highlighter/classes/Parser.js +99 -0
  197. package/dist/components/data-display/syntax-highlighter/index.d.ts +11 -0
  198. package/dist/components/data-display/syntax-highlighter/index.js +41 -0
  199. package/dist/components/data-display/table/FilterPopup.d.ts +20 -0
  200. package/dist/components/data-display/table/FilterPopup.js +54 -0
  201. package/dist/components/data-display/table/Helpers.d.ts +2 -0
  202. package/dist/components/data-display/table/Helpers.js +10 -0
  203. package/dist/components/data-display/table/IProps.d.ts +99 -0
  204. package/dist/components/data-display/table/IProps.js +1 -0
  205. package/dist/components/data-display/table/PropertiesPopup.d.ts +31 -0
  206. package/dist/components/data-display/table/PropertiesPopup.js +90 -0
  207. package/dist/components/data-display/table/THeadCell.d.ts +34 -0
  208. package/dist/components/data-display/table/THeadCell.js +67 -0
  209. package/dist/components/data-display/table/body/Editable.d.ts +12 -0
  210. package/dist/components/data-display/table/body/Editable.js +59 -0
  211. package/dist/components/data-display/table/body/TBody.d.ts +36 -0
  212. package/dist/components/data-display/table/body/TBody.js +184 -0
  213. package/dist/components/data-display/table/header/ActionButtons.d.ts +14 -0
  214. package/dist/components/data-display/table/header/ActionButtons.js +65 -0
  215. package/dist/components/data-display/table/header/Header.d.ts +15 -0
  216. package/dist/components/data-display/table/header/Header.js +10 -0
  217. package/dist/components/data-display/table/index.d.ts +7 -0
  218. package/dist/components/data-display/table/index.js +639 -0
  219. package/dist/components/data-display/tabs/IProps.d.ts +9 -0
  220. package/dist/components/data-display/tabs/IProps.js +1 -0
  221. package/dist/components/data-display/tabs/index.d.ts +5 -0
  222. package/dist/components/data-display/tabs/index.js +110 -0
  223. package/dist/components/data-display/tabs/skeleton.d.ts +4 -0
  224. package/dist/components/data-display/tabs/skeleton.js +14 -0
  225. package/dist/components/data-display/typography/index.d.ts +6 -0
  226. package/dist/components/data-display/typography/index.js +9 -0
  227. package/dist/components/data-display/typography/paragraph/IProps.d.ts +7 -0
  228. package/dist/components/data-display/typography/paragraph/IProps.js +1 -0
  229. package/dist/components/data-display/typography/paragraph/Paragraph.d.ts +4 -0
  230. package/dist/components/data-display/typography/paragraph/Paragraph.js +14 -0
  231. package/dist/components/data-display/typography/title/IProps.d.ts +7 -0
  232. package/dist/components/data-display/typography/title/IProps.js +1 -0
  233. package/dist/components/data-display/typography/title/Title.d.ts +4 -0
  234. package/dist/components/data-display/typography/title/Title.js +13 -0
  235. package/dist/components/feedback/alert/IProps.d.ts +11 -0
  236. package/dist/components/feedback/alert/IProps.js +1 -0
  237. package/dist/components/feedback/alert/index.d.ts +5 -0
  238. package/dist/components/feedback/alert/index.js +50 -0
  239. package/dist/components/feedback/drawer/IProps.d.ts +18 -0
  240. package/dist/components/feedback/drawer/IProps.js +1 -0
  241. package/dist/components/feedback/drawer/index.d.ts +5 -0
  242. package/dist/components/feedback/drawer/index.js +94 -0
  243. package/dist/components/feedback/loading/index.d.ts +4 -0
  244. package/dist/components/feedback/loading/index.js +7 -0
  245. package/dist/components/feedback/modal/IProps.d.ts +14 -0
  246. package/dist/components/feedback/modal/IProps.js +1 -0
  247. package/dist/components/feedback/modal/index.d.ts +5 -0
  248. package/dist/components/feedback/modal/index.js +91 -0
  249. package/dist/components/feedback/notification/IProps.d.ts +9 -0
  250. package/dist/components/feedback/notification/IProps.js +1 -0
  251. package/dist/components/feedback/notification/index.d.ts +5 -0
  252. package/dist/components/feedback/notification/index.js +96 -0
  253. package/dist/components/feedback/popover/IProps.d.ts +16 -0
  254. package/dist/components/feedback/popover/IProps.js +1 -0
  255. package/dist/components/feedback/popover/index.d.ts +5 -0
  256. package/dist/components/feedback/popover/index.js +91 -0
  257. package/dist/components/feedback/popup-confirm/IProps.d.ts +10 -0
  258. package/dist/components/feedback/popup-confirm/IProps.js +1 -0
  259. package/dist/components/feedback/popup-confirm/index.d.ts +5 -0
  260. package/dist/components/feedback/popup-confirm/index.js +98 -0
  261. package/dist/components/feedback/progress/IProps.d.ts +6 -0
  262. package/dist/components/feedback/progress/IProps.js +1 -0
  263. package/dist/components/feedback/progress/index.d.ts +5 -0
  264. package/dist/components/feedback/progress/index.js +26 -0
  265. package/dist/components/feedback/tooltip/IProps.d.ts +6 -0
  266. package/dist/components/feedback/tooltip/IProps.js +1 -0
  267. package/dist/components/feedback/tooltip/index.d.ts +5 -0
  268. package/dist/components/feedback/tooltip/index.js +129 -0
  269. package/dist/components/form/button/IProps.d.ts +10 -0
  270. package/dist/components/form/button/IProps.js +1 -0
  271. package/dist/components/form/button/index.d.ts +5 -0
  272. package/dist/components/form/button/index.js +41 -0
  273. package/dist/components/form/button-action/IProps.d.ts +8 -0
  274. package/dist/components/form/button-action/IProps.js +1 -0
  275. package/dist/components/form/button-action/index.d.ts +5 -0
  276. package/dist/components/form/button-action/index.js +68 -0
  277. package/dist/components/form/button-group/index.d.ts +7 -0
  278. package/dist/components/form/button-group/index.js +31 -0
  279. package/dist/components/form/checkbox/IProps.d.ts +5 -0
  280. package/dist/components/form/checkbox/IProps.js +1 -0
  281. package/dist/components/form/checkbox/index.d.ts +5 -0
  282. package/dist/components/form/checkbox/index.js +24 -0
  283. package/dist/components/form/date-picker/DATE.d.ts +12 -0
  284. package/dist/components/form/date-picker/DATE.js +27 -0
  285. package/dist/components/form/date-picker/Props.d.ts +10 -0
  286. package/dist/components/form/date-picker/Props.js +1 -0
  287. package/dist/components/form/date-picker/index.d.ts +5 -0
  288. package/dist/components/form/date-picker/index.js +365 -0
  289. package/dist/components/form/input/IProps.d.ts +12 -0
  290. package/dist/components/form/input/IProps.js +1 -0
  291. package/dist/components/form/input/decimal/Decimal.d.ts +4 -0
  292. package/dist/components/form/input/decimal/Decimal.js +54 -0
  293. package/dist/components/form/input/decimal/IProps.d.ts +8 -0
  294. package/dist/components/form/input/decimal/IProps.js +1 -0
  295. package/dist/components/form/input/formatted-decimal/FormattedDecimal.d.ts +4 -0
  296. package/dist/components/form/input/formatted-decimal/FormattedDecimal.js +73 -0
  297. package/dist/components/form/input/formatted-decimal/IProps.d.ts +12 -0
  298. package/dist/components/form/input/formatted-decimal/IProps.js +1 -0
  299. package/dist/components/form/input/index.d.ts +15 -0
  300. package/dist/components/form/input/index.js +152 -0
  301. package/dist/components/form/input/otp/IProps.d.ts +6 -0
  302. package/dist/components/form/input/otp/IProps.js +1 -0
  303. package/dist/components/form/input/otp/Otp.d.ts +7 -0
  304. package/dist/components/form/input/otp/Otp.js +122 -0
  305. package/dist/components/form/input/phone/IProps.d.ts +11 -0
  306. package/dist/components/form/input/phone/IProps.js +1 -0
  307. package/dist/components/form/input/phone/Phone.d.ts +4 -0
  308. package/dist/components/form/input/phone/Phone.js +41 -0
  309. package/dist/components/form/radio/IProps.d.ts +12 -0
  310. package/dist/components/form/radio/IProps.js +1 -0
  311. package/dist/components/form/radio/index.d.ts +5 -0
  312. package/dist/components/form/radio/index.js +38 -0
  313. package/dist/components/form/select/Props.d.ts +35 -0
  314. package/dist/components/form/select/Props.js +1 -0
  315. package/dist/components/form/select/index.d.ts +5 -0
  316. package/dist/components/form/select/index.js +312 -0
  317. package/dist/components/form/switch/IProps.d.ts +5 -0
  318. package/dist/components/form/switch/IProps.js +1 -0
  319. package/dist/components/form/switch/index.d.ts +5 -0
  320. package/dist/components/form/switch/index.js +36 -0
  321. package/dist/components/form/text-editor/IProps.d.ts +18 -0
  322. package/dist/components/form/text-editor/IProps.js +1 -0
  323. package/dist/components/form/text-editor/index.d.ts +5 -0
  324. package/dist/components/form/text-editor/index.js +300 -0
  325. package/dist/components/form/upload/Buttons.d.ts +8 -0
  326. package/dist/components/form/upload/Buttons.js +27 -0
  327. package/dist/components/form/upload/Dropzone.d.ts +10 -0
  328. package/dist/components/form/upload/Dropzone.js +55 -0
  329. package/dist/components/form/upload/List.d.ts +12 -0
  330. package/dist/components/form/upload/List.js +21 -0
  331. package/dist/components/form/upload/Props.d.ts +16 -0
  332. package/dist/components/form/upload/Props.js +1 -0
  333. package/dist/components/form/upload/index.d.ts +9 -0
  334. package/dist/components/form/upload/index.js +184 -0
  335. package/dist/components/icons/Compiler.d.ts +9 -0
  336. package/dist/components/icons/Compiler.js +156 -0
  337. package/dist/components/icons/index.d.ts +10 -0
  338. package/dist/components/icons/index.js +6 -0
  339. package/dist/components/layout/Footer.d.ts +3 -0
  340. package/dist/components/layout/Footer.js +8 -0
  341. package/dist/components/layout/Header.d.ts +4 -0
  342. package/dist/components/layout/Header.js +8 -0
  343. package/dist/components/layout/IProps.d.ts +20 -0
  344. package/dist/components/layout/IProps.js +1 -0
  345. package/dist/components/layout/LSider.d.ts +4 -0
  346. package/dist/components/layout/LSider.js +53 -0
  347. package/dist/components/layout/Main.d.ts +4 -0
  348. package/dist/components/layout/Main.js +4 -0
  349. package/dist/components/layout/RSider.d.ts +3 -0
  350. package/dist/components/layout/RSider.js +13 -0
  351. package/dist/components/layout/Section.d.ts +4 -0
  352. package/dist/components/layout/Section.js +10 -0
  353. package/dist/components/layout/index.d.ts +12 -0
  354. package/dist/components/layout/index.js +32 -0
  355. package/dist/components/navigation/breadcrumb/IProps.d.ts +3 -0
  356. package/dist/components/navigation/breadcrumb/IProps.js +1 -0
  357. package/dist/components/navigation/breadcrumb/index.d.ts +5 -0
  358. package/dist/components/navigation/breadcrumb/index.js +8 -0
  359. package/dist/components/navigation/menu/IProps.d.ts +14 -0
  360. package/dist/components/navigation/menu/IProps.js +1 -0
  361. package/dist/components/navigation/menu/index.d.ts +5 -0
  362. package/dist/components/navigation/menu/index.js +89 -0
  363. package/dist/components/navigation/pagination/IProps.d.ts +8 -0
  364. package/dist/components/navigation/pagination/IProps.js +1 -0
  365. package/dist/components/navigation/pagination/index.d.ts +5 -0
  366. package/dist/components/navigation/pagination/index.js +74 -0
  367. package/dist/components/navigation/steps/IProps.d.ts +16 -0
  368. package/dist/components/navigation/steps/IProps.js +1 -0
  369. package/dist/components/navigation/steps/index.d.ts +5 -0
  370. package/dist/components/navigation/steps/index.js +102 -0
  371. package/dist/libs/core/application/contexts/Config.d.ts +26 -0
  372. package/dist/libs/core/application/contexts/Config.js +20 -0
  373. package/dist/libs/core/application/contexts/Language.d.ts +7 -0
  374. package/dist/libs/core/application/contexts/Language.js +7 -0
  375. package/dist/libs/core/application/contexts/Loading.d.ts +11 -0
  376. package/dist/libs/core/application/contexts/Loading.js +13 -0
  377. package/dist/libs/core/application/contexts/Notification.d.ts +25 -0
  378. package/dist/libs/core/application/contexts/Notification.js +29 -0
  379. package/dist/libs/core/application/contexts/index.d.ts +5 -0
  380. package/dist/libs/core/application/contexts/index.js +5 -0
  381. package/dist/libs/core/application/hooks/index.d.ts +41 -0
  382. package/dist/libs/core/application/hooks/index.js +17 -0
  383. package/dist/libs/core/application/hooks/useNotification.d.ts +16 -0
  384. package/dist/libs/core/application/hooks/useNotification.js +23 -0
  385. package/dist/libs/core/application/hooks/useTranslation.d.ts +9 -0
  386. package/dist/libs/core/application/hooks/useTranslation.js +25 -0
  387. package/dist/libs/core/application/hooks/useValidation.d.ts +7 -0
  388. package/dist/libs/core/application/hooks/useValidation.js +151 -0
  389. package/dist/libs/core/application/locales/index.d.ts +4 -0
  390. package/dist/libs/core/application/locales/index.js +3 -0
  391. package/dist/libs/core/application/locales/kanban-board/IKanbanBoardLocale.d.ts +5 -0
  392. package/dist/libs/core/application/locales/kanban-board/IKanbanBoardLocale.js +1 -0
  393. package/dist/libs/core/application/locales/kanban-board/en.d.ts +3 -0
  394. package/dist/libs/core/application/locales/kanban-board/en.js +5 -0
  395. package/dist/libs/core/application/locales/kanban-board/tr.d.ts +3 -0
  396. package/dist/libs/core/application/locales/kanban-board/tr.js +5 -0
  397. package/dist/libs/core/application/locales/notification/INotificationLocale.d.ts +59 -0
  398. package/dist/libs/core/application/locales/notification/INotificationLocale.js +1 -0
  399. package/dist/libs/core/application/locales/notification/en.d.ts +3 -0
  400. package/dist/libs/core/application/locales/notification/en.js +85 -0
  401. package/dist/libs/core/application/locales/notification/tr.d.ts +3 -0
  402. package/dist/libs/core/application/locales/notification/tr.js +85 -0
  403. package/dist/libs/core/application/locales/table/ITableLocale.d.ts +18 -0
  404. package/dist/libs/core/application/locales/table/ITableLocale.js +1 -0
  405. package/dist/libs/core/application/locales/table/en.d.ts +3 -0
  406. package/dist/libs/core/application/locales/table/en.js +22 -0
  407. package/dist/libs/core/application/locales/table/tr.d.ts +3 -0
  408. package/dist/libs/core/application/locales/table/tr.js +22 -0
  409. package/dist/libs/infrastructure/shared/DATE.d.ts +74 -0
  410. package/dist/libs/infrastructure/shared/DATE.js +148 -0
  411. package/dist/libs/infrastructure/shared/Enums.d.ts +18 -0
  412. package/dist/libs/infrastructure/shared/Enums.js +21 -0
  413. package/dist/libs/infrastructure/shared/NUMBER.d.ts +8 -0
  414. package/dist/libs/infrastructure/shared/NUMBER.js +10 -0
  415. package/dist/libs/infrastructure/shared/PHONE.d.ts +8 -0
  416. package/dist/libs/infrastructure/shared/PHONE.js +126 -0
  417. package/dist/libs/infrastructure/shared/Utils.d.ts +20 -0
  418. package/dist/libs/infrastructure/shared/Utils.js +349 -0
  419. package/dist/libs/infrastructure/shared/_old_DATE.d.ts +28 -0
  420. package/dist/libs/infrastructure/shared/_old_DATE.js +68 -0
  421. package/dist/libs/infrastructure/types/IGlobalProps.d.ts +183 -0
  422. package/dist/libs/infrastructure/types/IGlobalProps.js +1 -0
  423. package/dist/libs/infrastructure/types/index.d.ts +155 -0
  424. package/dist/libs/infrastructure/types/index.js +1 -0
  425. package/package.json +48 -0
@@ -0,0 +1,96 @@
1
+ "use client";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import React from "react";
4
+ import "../../../assets/css/components/feedback/notification/notification.css";
5
+ const Notification = ({ title, message, status, direction = "bottom-left", trigger }) => {
6
+ const _firstLoad = useRef(false);
7
+ const _notificationItems = useRef([]);
8
+ const [items, setItems] = useState([]);
9
+ // useEffects
10
+ useEffect(() => {
11
+ if (!_firstLoad.current) {
12
+ _firstLoad.current = true;
13
+ return;
14
+ }
15
+ if (typeof status === "number") {
16
+ if (status >= 100 && status < 200) {
17
+ status = "information";
18
+ }
19
+ else if (status >= 200 && status < 300) {
20
+ status = "success";
21
+ }
22
+ else if (status >= 300 && status < 400) {
23
+ status = "warning";
24
+ }
25
+ else if (status >= 400 && status < 500) {
26
+ status = "error";
27
+ }
28
+ else if (status >= 500 && status < 600) {
29
+ status = "error";
30
+ }
31
+ }
32
+ setItems((prev) => [...prev, { id: Math.random(), title, message, status, direction }]);
33
+ }, [trigger]);
34
+ useEffect(() => {
35
+ let clearTimeoutId = undefined;
36
+ items.forEach((item) => {
37
+ if (!item.timeoutId) {
38
+ const timeoutId = setTimeout(() => {
39
+ clearTimeoutId = item.timeoutId;
40
+ setItems((prev) => prev.filter((_item) => _item.id !== item.id));
41
+ }, 3000);
42
+ // Öncesinde timeoutId değerinin tanımlanması yapılıyor.
43
+ setItems((prev) => prev.map((prevItem) => (prevItem.id === item.id ? { ...prevItem, timeoutId } : prevItem)));
44
+ }
45
+ });
46
+ return () => {
47
+ if (items.length === 0)
48
+ return;
49
+ const item = items.find((x) => x.timeoutId == clearTimeoutId);
50
+ if (item) {
51
+ clearTimeout(item.timeoutId);
52
+ clearTimeoutId = undefined;
53
+ }
54
+ };
55
+ }, [items]);
56
+ const getBottomPosition = (index) => {
57
+ let bottom = 30; // Başlangıçta 30px'lik bir boşluk ekliyoruz.
58
+ // Önceki öğenin yüksekliğini dikkate alarak bottom hesaplanıyor.
59
+ if (_notificationItems.current[index - 1]) {
60
+ bottom = _notificationItems.current.slice(0, index).reduce((acc, el) => {
61
+ const rect = el.getBoundingClientRect();
62
+ return acc + rect.height + 20; // +20 değeri ara boşluğu arttırıyor.
63
+ }, 30); // 30px'lik boşluğu başlangıçta ekliyoruz.
64
+ }
65
+ return bottom;
66
+ };
67
+ return items.map((item, index) => {
68
+ const bottom = getBottomPosition(index);
69
+ return (React.createElement("div", { key: item.id, ref: (element) => {
70
+ if (!element)
71
+ return;
72
+ _notificationItems.current[index] = element;
73
+ }, className: "ar-notification-item", style: items.length > 5
74
+ ? {
75
+ backgroundColor: `rgba(var(--white-rgb), ${index === items.length - 1 ? 1 : 0.1})`,
76
+ backdropFilter: "blur(10px)",
77
+ bottom: (index === 0 ? 30 : 10) * (index + 1),
78
+ }
79
+ : { bottom } },
80
+ React.createElement("div", { className: "icon" },
81
+ React.createElement("span", { className: String(item.status) }),
82
+ React.createElement("span", { className: String(item.status) }),
83
+ React.createElement("span", { className: String(item.status) }),
84
+ React.createElement("span", { className: String(item.status) }),
85
+ React.createElement("span", { className: String(item.status) })),
86
+ React.createElement("div", { className: "content" },
87
+ React.createElement("span", { className: "title" }, item.title),
88
+ React.createElement("span", { className: "message" }, item.message)),
89
+ React.createElement("div", { className: "close", onClick: () => {
90
+ if (item.timeoutId)
91
+ clearTimeout(item.timeoutId);
92
+ setItems((prev) => prev.filter((_item) => _item.id !== item.id));
93
+ } })));
94
+ });
95
+ };
96
+ export default Notification;
@@ -0,0 +1,16 @@
1
+ import { IChildrenProps } from "../../../libs/infrastructure/types/IGlobalProps";
2
+ interface IProps extends IChildrenProps {
3
+ title?: string;
4
+ message?: string;
5
+ content?: React.JSX.Element;
6
+ onConfirm?: (confirm: boolean) => void;
7
+ windowBlur?: boolean;
8
+ fullWidth?: boolean;
9
+ config?: {
10
+ buttons: {
11
+ okay: string;
12
+ cancel?: string;
13
+ };
14
+ };
15
+ }
16
+ export default IProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import "../../../assets/css/components/feedback/popover/styles.css";
3
+ import IProps from "./IProps";
4
+ declare const Popover: React.FC<IProps>;
5
+ export default Popover;
@@ -0,0 +1,91 @@
1
+ "use client";
2
+ import React, { useEffect, useRef, useState } from "react";
3
+ import "../../../assets/css/components/feedback/popover/styles.css";
4
+ import Button from "../../form/button";
5
+ import Typography from "../../data-display/typography";
6
+ import ReactDOM from "react-dom";
7
+ const { Title } = Typography;
8
+ const Popover = ({ children, title, message, content, onConfirm, windowBlur, fullWidth, config }) => {
9
+ // refs
10
+ const _arPopoverWrapper = useRef(null);
11
+ const _arPopover = useRef(null);
12
+ const _arPopoverElement = useRef(null);
13
+ const _arPopoverClassName = ["ar-popover-wrapper"];
14
+ if (fullWidth)
15
+ _arPopoverClassName.push("full-width");
16
+ // states
17
+ const [open, setOpen] = useState(false);
18
+ const [mounted, setMounted] = useState(false);
19
+ // methods
20
+ const handleClickOutSide = (event) => {
21
+ const target = event.target;
22
+ const isArSelectOptions = document.getElementsByClassName("ar-select-options").length === 0;
23
+ const isArCalendar = document.getElementsByClassName("ar-date-calendar").length === 0;
24
+ if (_arPopover.current && !_arPopover.current.contains(target) && isArCalendar && isArSelectOptions)
25
+ setOpen(false);
26
+ };
27
+ const handleKeys = (event) => {
28
+ const key = event.key;
29
+ const isArSelectOptions = document.getElementsByClassName("ar-select-options").length === 0;
30
+ const isArCalendar = document.getElementsByClassName("ar-date-calendar").length === 0;
31
+ if (key === "Escape" && isArCalendar && isArSelectOptions)
32
+ setOpen(false);
33
+ };
34
+ const handlePosition = () => {
35
+ if (_arPopoverWrapper.current && _arPopover.current && _arPopoverElement.current) {
36
+ const popoverRect = _arPopover.current.getBoundingClientRect();
37
+ const elementRect = _arPopoverElement.current.getBoundingClientRect();
38
+ if (elementRect) {
39
+ const screenCenterX = window.innerWidth / 2;
40
+ const screenCenterY = window.innerHeight / 2;
41
+ const sx = window.scrollX || document.documentElement.scrollLeft;
42
+ const sy = window.scrollY || document.documentElement.scrollTop;
43
+ _arPopover.current.style.visibility = "visible";
44
+ _arPopover.current.style.opacity = "1";
45
+ _arPopover.current.style.top = `${(elementRect.top > screenCenterY
46
+ ? elementRect.top - popoverRect.height + elementRect.height
47
+ : elementRect.top) + sy}px`;
48
+ _arPopover.current.style.left = `${(elementRect.left > screenCenterX
49
+ ? elementRect.right - (elementRect.width + 7.5) - popoverRect.width
50
+ : elementRect.left + elementRect.width + 7.5) + sx}px`;
51
+ }
52
+ }
53
+ };
54
+ // useEffects
55
+ useEffect(() => {
56
+ if (open) {
57
+ setTimeout(() => handlePosition(), 0);
58
+ !windowBlur && window.addEventListener("blur", () => setOpen(false));
59
+ document.addEventListener("click", handleClickOutSide);
60
+ document.addEventListener("keydown", handleKeys);
61
+ }
62
+ return () => {
63
+ !windowBlur && window.removeEventListener("blur", () => setOpen(false));
64
+ document.removeEventListener("click", handleClickOutSide);
65
+ document.removeEventListener("keydown", handleKeys);
66
+ };
67
+ }, [open]);
68
+ useEffect(() => {
69
+ setMounted(true);
70
+ return () => setMounted(false);
71
+ }, []);
72
+ return (React.createElement("div", { ref: _arPopoverWrapper, className: _arPopoverClassName.map((c) => c).join(" "), role: "dialog" },
73
+ open &&
74
+ mounted &&
75
+ ReactDOM.createPortal(React.createElement("div", { ref: _arPopover, className: "ar-popover" },
76
+ title && (React.createElement("div", { className: "title" },
77
+ React.createElement(Title, { Level: "h4" }, title))),
78
+ message && React.createElement("p", { className: "message" }, message),
79
+ content && React.createElement("div", { className: "content" }, content),
80
+ onConfirm && (React.createElement("div", { className: "footer" },
81
+ React.createElement(Button, { color: "green", size: "small", onClick: () => {
82
+ onConfirm(true);
83
+ setOpen(false);
84
+ } }, config?.buttons.okay ?? "Evet"),
85
+ React.createElement(Button, { size: "small", onClick: () => {
86
+ onConfirm(false);
87
+ setOpen(false);
88
+ } }, config?.buttons.cancel ?? "Hayır")))), document.body),
89
+ React.createElement("div", { ref: _arPopoverElement, onClick: () => setOpen((prev) => !prev) }, children)));
90
+ };
91
+ export default Popover;
@@ -0,0 +1,10 @@
1
+ import { PopupButtonConfig, Status } from "../../../libs/core/application/contexts/Notification";
2
+ interface IProps {
3
+ title: string;
4
+ message?: string;
5
+ status: (Status | "save" | "delete") | number;
6
+ isOpen: boolean;
7
+ buttons?: PopupButtonConfig | null;
8
+ onConfirm?: ((confirm: boolean) => void) | null;
9
+ }
10
+ export default IProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import IProps from "./IProps";
3
+ import "../../../assets/css/components/feedback/popup-confirm/styles.css";
4
+ declare const PopupConfirm: ({ title, message, status, isOpen, buttons, onConfirm }: IProps) => false | React.ReactPortal;
5
+ export default PopupConfirm;
@@ -0,0 +1,98 @@
1
+ "use client";
2
+ import React, { useContext, useEffect, useRef, useState } from "react";
3
+ import "../../../assets/css/components/feedback/popup-confirm/styles.css";
4
+ import Button from "../../form/button";
5
+ import ReactDOM from "react-dom";
6
+ import { NotificationContext } from "../../../libs/core/application/contexts/Notification";
7
+ import { ARIcon } from "../../icons";
8
+ import Row from "../../data-display/grid-system/row/Row";
9
+ import Column from "../../data-display/grid-system/column/Column";
10
+ const PopupConfirm = ({ title, message, status, isOpen, buttons, onConfirm }) => {
11
+ // contexts
12
+ const { setIsPopupOpen } = useContext(NotificationContext);
13
+ // refs
14
+ const _arNotificationPopupWrapper = useRef(null);
15
+ const _arNotificationPopup = useRef(null);
16
+ // states
17
+ const _notificaitonPopupWrapperClassName = ["ar-notification-popup-wrapper"];
18
+ const [className, setClassName] = useState(["ar-notification-popup", ""]);
19
+ // methods
20
+ const buttonColor = () => {
21
+ switch (status) {
22
+ case "success":
23
+ case "save":
24
+ return "green";
25
+ case "warning":
26
+ return "orange";
27
+ case "information":
28
+ return "cyan";
29
+ case "error":
30
+ case "delete":
31
+ return "red";
32
+ default:
33
+ return "light";
34
+ }
35
+ };
36
+ const buttonIcons = () => {
37
+ switch (status) {
38
+ case "success":
39
+ return React.createElement(ARIcon, { icon: "CheckAll", fill: "var(--success)", size: 24 });
40
+ case "save":
41
+ return React.createElement(ARIcon, { icon: "Floppy-Fill", fill: "var(--success)", size: 24 });
42
+ case "warning":
43
+ return React.createElement(ARIcon, { icon: "ExclamationDiamond-Fill", fill: "var(--warning)", size: 24 });
44
+ case "information":
45
+ return React.createElement(ARIcon, { icon: "Information-Circle-Fill", fill: "var(--information)", size: 24 });
46
+ case "error":
47
+ return React.createElement(ARIcon, { icon: "XCircle-Fill", fill: "var(--danger)", size: 24 });
48
+ case "delete":
49
+ return React.createElement(ARIcon, { icon: "Trash-Fill", fill: "var(--danger)", size: 24 });
50
+ default:
51
+ return "light";
52
+ }
53
+ };
54
+ // useEffects
55
+ useEffect(() => {
56
+ setClassName((prev) => {
57
+ const updated = [...prev.slice(0, -1), isOpen ? "open" : ""];
58
+ return updated;
59
+ });
60
+ if (isOpen)
61
+ document.body.style.overflow = "hidden";
62
+ return () => {
63
+ document.body.style.removeProperty("overflow");
64
+ };
65
+ }, [isOpen]);
66
+ return (isOpen &&
67
+ ReactDOM.createPortal(React.createElement("div", { ref: _arNotificationPopupWrapper, className: _notificaitonPopupWrapperClassName.map((c) => c).join(" ") },
68
+ React.createElement("div", { className: "ar-notification-popup-bg", onMouseDown: (event) => {
69
+ event.stopPropagation();
70
+ const target = event.target;
71
+ if (_arNotificationPopup.current && !_arNotificationPopup.current.contains(target)) {
72
+ setClassName((prev) => {
73
+ const updated = [...prev.slice(0, -1), isOpen ? "open" : ""];
74
+ return updated;
75
+ });
76
+ }
77
+ } }),
78
+ React.createElement("div", { ref: _arNotificationPopup, className: className.map((c) => c).join(" ") },
79
+ React.createElement("div", { className: `icon ${status}` }, buttonIcons()),
80
+ React.createElement("div", { className: "content" },
81
+ React.createElement("span", { className: `title ${status}` }, title),
82
+ React.createElement("span", { className: "message" }, message)),
83
+ React.createElement("div", { className: "footer" },
84
+ React.createElement(Row, null,
85
+ React.createElement(Column, { size: buttons?.cancel ? 6 : 12 },
86
+ React.createElement(Button, { color: buttonColor(), onClick: (event) => {
87
+ buttons?.okay?.onClick?.(event);
88
+ onConfirm?.(true);
89
+ setIsPopupOpen?.((prev) => !prev);
90
+ }, fullWidth: true }, buttons?.okay?.children ?? "Tamam")),
91
+ buttons?.cancel && (React.createElement(Column, { size: 6 },
92
+ React.createElement(Button, { variant: "outlined", color: buttons.cancel.color ?? "gray", onClick: (event) => {
93
+ buttons?.cancel?.onClick?.(event);
94
+ onConfirm?.(false);
95
+ setIsPopupOpen?.((prev) => !prev);
96
+ }, fullWidth: true }, buttons.cancel.children ?? "Vazgeç"))))))), document.body));
97
+ };
98
+ export default PopupConfirm;
@@ -0,0 +1,6 @@
1
+ interface IProps {
2
+ value: number;
3
+ reverse?: boolean;
4
+ isVisibleValue?: boolean;
5
+ }
6
+ export default IProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import IProps from "./IProps";
3
+ import "../../../assets/css/components/feedback/progress/progress.css";
4
+ declare const Progress: React.FC<IProps>;
5
+ export default Progress;
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import Utils from "../../../libs/infrastructure/shared/Utils";
3
+ import "../../../assets/css/components/feedback/progress/progress.css";
4
+ const Progress = ({ value, reverse, isVisibleValue = false }) => {
5
+ // variables
6
+ let _status = undefined;
7
+ const _arProgressClassName = [];
8
+ if (value >= 0 && value <= 25)
9
+ _status = !reverse ? "danger" : "success";
10
+ else if (value >= 26 && value <= 50)
11
+ _status = !reverse ? "warning" : "primary";
12
+ else if (value >= 51 && value <= 75)
13
+ _status = !reverse ? "primary" : "warning";
14
+ else if (value >= 76 && value <= 100)
15
+ _status = !reverse ? "success" : "danger";
16
+ _arProgressClassName.push(...Utils.GetClassName("filled", _status, undefined, { radius: "pill" }, undefined, undefined, undefined));
17
+ return (React.createElement("div", { className: "ar-progress" },
18
+ React.createElement("div", { className: `ar-progress-bar ${_arProgressClassName.map((c) => c).join(" ")}` }),
19
+ React.createElement("div", { className: `ar-progress-value ${_arProgressClassName.map((c) => c).join(" ")}`, style: {
20
+ width: `${value}%`,
21
+ transition: "width 250ms ease-in-out",
22
+ } }, !isVisibleValue && React.createElement("span", null,
23
+ "%",
24
+ value))));
25
+ };
26
+ export default Progress;
@@ -0,0 +1,6 @@
1
+ import { IChildrenProps } from "../../../libs/infrastructure/types/IGlobalProps";
2
+ interface IProps extends IChildrenProps {
3
+ text: string | string[];
4
+ direction?: "top" | "right" | "left" | "bottom";
5
+ }
6
+ export default IProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import IProps from "./IProps";
3
+ import "../../../assets/css/components/feedback/tooltip/styles.css";
4
+ declare const Tooltip: React.FC<IProps>;
5
+ export default Tooltip;
@@ -0,0 +1,129 @@
1
+ "use client";
2
+ import React, { useCallback, useEffect, useRef, useState } from "react";
3
+ import ReactDOM from "react-dom";
4
+ import "../../../assets/css/components/feedback/tooltip/styles.css";
5
+ const Tooltip = ({ children, text, direction = "top" }) => {
6
+ // refs
7
+ const _arTooltip = useRef(null);
8
+ const _children = useRef(null);
9
+ // states
10
+ const [mouseEnter, setMouseEnter] = useState(false);
11
+ const [_direction, setDirection] = useState(direction);
12
+ // 💡 Donma ve sonsuz döngüyü engellemek için dışarıdan seçilen ana yönü bir ref'te saklıyoruz
13
+ const currentInitialDirection = useRef(direction);
14
+ useEffect(() => {
15
+ currentInitialDirection.current = direction;
16
+ setDirection(direction); // Storybook panelinden elle yön değiştiğinde senkronize et
17
+ }, [direction]);
18
+ // methods
19
+ const handlePosition = useCallback(() => {
20
+ const child = _children.current;
21
+ const tooltip = _arTooltip.current;
22
+ if (!child || !tooltip)
23
+ return;
24
+ const margin = 17.5;
25
+ const windowWidth = window.innerWidth;
26
+ const windowHeight = window.innerHeight;
27
+ const childRect = child.getBoundingClientRect();
28
+ const tooltipRect = tooltip.getBoundingClientRect();
29
+ const spaceTop = childRect.top;
30
+ const spaceBottom = windowHeight - childRect.bottom;
31
+ const spaceLeft = childRect.left;
32
+ const spaceRight = windowWidth - childRect.right;
33
+ // 💡 Hesaplamaya state'ten değil, doğrudan orijinal seçilen yönden başlıyoruz
34
+ let finalDirection = currentInitialDirection.current;
35
+ // Sıkışma durumlarına göre yönü dinamik değiştir
36
+ if (finalDirection === "top" && spaceTop < tooltipRect.height + margin) {
37
+ finalDirection = "bottom";
38
+ }
39
+ else if (finalDirection === "bottom" && spaceBottom < tooltipRect.height + margin) {
40
+ finalDirection = "top";
41
+ }
42
+ else if (finalDirection === "left" && spaceLeft < tooltipRect.width + margin) {
43
+ finalDirection = "right";
44
+ }
45
+ else if (finalDirection === "right" && spaceRight < tooltipRect.width + margin) {
46
+ finalDirection = "left";
47
+ }
48
+ // Eğer hala hiçbir yere sığmıyorsa en geniş boşluğu bul
49
+ const maxSpace = Math.max(spaceTop, spaceBottom, spaceLeft, spaceRight);
50
+ if ((finalDirection === "top" && spaceTop < tooltipRect.height + margin) ||
51
+ (finalDirection === "bottom" && spaceBottom < tooltipRect.height + margin) ||
52
+ (finalDirection === "left" && spaceLeft < tooltipRect.width + margin) ||
53
+ (finalDirection === "right" && spaceRight < tooltipRect.width + margin)) {
54
+ if (maxSpace === spaceTop)
55
+ finalDirection = "top";
56
+ else if (maxSpace === spaceBottom)
57
+ finalDirection = "bottom";
58
+ else if (maxSpace === spaceLeft)
59
+ finalDirection = "left";
60
+ else if (maxSpace === spaceRight)
61
+ finalDirection = "right";
62
+ }
63
+ let top = 0;
64
+ let left = 0;
65
+ switch (finalDirection) {
66
+ case "top":
67
+ top = childRect.top - tooltipRect.height - margin;
68
+ left = childRect.left + childRect.width / 2 - tooltipRect.width / 2;
69
+ break;
70
+ case "right":
71
+ top = childRect.top + childRect.height / 2 - tooltipRect.height / 2;
72
+ left = childRect.right + margin;
73
+ break;
74
+ case "bottom":
75
+ top = childRect.bottom + margin;
76
+ left = childRect.left + childRect.width / 2 - tooltipRect.width / 2;
77
+ break;
78
+ case "left":
79
+ top = childRect.top + childRect.height / 2 - tooltipRect.height / 2;
80
+ left = childRect.left - tooltipRect.width - margin;
81
+ break;
82
+ }
83
+ // Ekran taşma koruması
84
+ if (left < 10)
85
+ left = 10;
86
+ if (left + tooltipRect.width > windowWidth - 10) {
87
+ left = windowWidth - tooltipRect.width - 10;
88
+ }
89
+ tooltip.style.top = `${top}px`;
90
+ tooltip.style.left = `${left}px`;
91
+ // 💡 KRİTİK DEĞİŞİKLİK: Sadece yön gerçekten değiştiyse state güncellenir.
92
+ // Bu kontrol MutationObserver'ın yarattığı kısır döngüyü anında kırar.
93
+ setDirection((prev) => {
94
+ if (prev !== finalDirection)
95
+ return finalDirection;
96
+ return prev;
97
+ });
98
+ }, []); // Bağımlılık dizisini boş bırakarak fonksiyonun kimliğini sabitliyoruz
99
+ // useEffects
100
+ useEffect(() => {
101
+ window.addEventListener("resize", handlePosition);
102
+ window.addEventListener("scroll", handlePosition, { passive: true });
103
+ const observer = new MutationObserver(() => {
104
+ handlePosition();
105
+ });
106
+ observer.observe(document.body, {
107
+ attributes: true,
108
+ childList: true,
109
+ subtree: true,
110
+ });
111
+ return () => {
112
+ window.removeEventListener("resize", handlePosition);
113
+ window.removeEventListener("scroll", handlePosition);
114
+ observer.disconnect();
115
+ };
116
+ }, [handlePosition]);
117
+ useEffect(() => {
118
+ if (mouseEnter)
119
+ setTimeout(() => handlePosition(), 0);
120
+ }, [mouseEnter, handlePosition]);
121
+ return (React.createElement("div", { className: "ar-tooltip-wrapper" },
122
+ React.createElement("div", { ref: _children, onMouseEnter: () => setMouseEnter(true), onMouseLeave: () => setMouseEnter(false) }, children),
123
+ mouseEnter &&
124
+ ReactDOM.createPortal(React.createElement("div", { ref: _arTooltip, className: `ar-tooltip ${_direction}` }, Array.isArray(text) ? (text.map((t, index) => (React.createElement("span", { key: index, className: "text" },
125
+ React.createElement("span", { className: "bullet" }, "\u2022"),
126
+ React.createElement("span", null, t))))) : (React.createElement("span", { className: "text" }, text))), document.body)));
127
+ };
128
+ Tooltip.displayName = "Tooltip";
129
+ export default Tooltip;
@@ -0,0 +1,10 @@
1
+ import { IBorderProps, IChildrenProps, IColorProps, IIconProps, ISizeProps, IUpperCaseProps, IVariantProps } from "../../../libs/infrastructure/types/IGlobalProps";
2
+ interface IProps extends IChildrenProps, IVariantProps, IColorProps, IBorderProps, IIconProps, ISizeProps, IUpperCaseProps, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color"> {
3
+ shape?: "circle" | "square";
4
+ position?: {
5
+ type: "fixed" | "absolute";
6
+ inset: ("top" | "right" | "bottom" | "left")[];
7
+ };
8
+ fullWidth?: boolean;
9
+ }
10
+ export default IProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import "../../../assets/css/components/form/button/styles.css";
3
+ import IProps from "./IProps";
4
+ declare const Button: React.FC<IProps>;
5
+ export default Button;
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import React, { useRef } from "react";
3
+ import "../../../assets/css/components/form/button/styles.css";
4
+ import Utils from "../../../libs/infrastructure/shared/Utils";
5
+ const Button = ({ children, variant = "filled", shape, color = "light", border = { radius: "sm" }, size = "normal", position, fullWidth, icon, upperCase, ...attributes }) => {
6
+ // refs
7
+ const _button = useRef(null);
8
+ const _arButtonClassName = ["ar-button"];
9
+ _arButtonClassName.push(...Utils.GetClassName(variant, undefined, color, border, size, icon, attributes.className));
10
+ if (!children)
11
+ _arButtonClassName.push("no-content");
12
+ if (fullWidth)
13
+ _arButtonClassName.push("full-width");
14
+ if (shape)
15
+ _arButtonClassName.push(`ar-button-shape ${shape}`);
16
+ if (position) {
17
+ _arButtonClassName.push(position.type);
18
+ _arButtonClassName.push(position.inset.map((_inset) => _inset).join(" "));
19
+ }
20
+ return (React.createElement("button", { ref: _button, ...attributes, type: attributes.type ?? "button", className: _arButtonClassName.map((c) => c).join(" "), onClick: (event) => {
21
+ // Disabled gelmesi durumunda işlem yapmasına izin verme...
22
+ if (attributes.disabled)
23
+ return;
24
+ (() => {
25
+ const _current = _button.current;
26
+ const addClass = "active";
27
+ if (_current && !_current.classList.contains(addClass)) {
28
+ // Sınıf ekleniyor...
29
+ _current.classList.add(addClass);
30
+ // Sınıf 500 milisaniye sonra kaldırlacak.
31
+ setTimeout(() => _current.classList.remove(addClass), 750);
32
+ }
33
+ })();
34
+ (() => attributes.onClick && attributes.onClick(event))();
35
+ } },
36
+ React.createElement("span", { className: "text" },
37
+ icon?.element,
38
+ React.createElement("span", null, !shape ? (typeof children === "string" && upperCase ? children.toLocaleUpperCase() : children) : ""))));
39
+ };
40
+ Button.displayName = "Button";
41
+ export default Button;
@@ -0,0 +1,8 @@
1
+ import { IColorProps, IIconProps } from "../../../libs/infrastructure/types/IGlobalProps";
2
+ interface IProps {
3
+ buttons: ({
4
+ text: string;
5
+ onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
6
+ } & IColorProps & IIconProps)[];
7
+ }
8
+ export default IProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import "../../../assets/css/components/form/button-action/styles.css";
3
+ import IProps from "./IProps";
4
+ declare const ButtonAction: React.FC<IProps>;
5
+ export default ButtonAction;