uibee 2.17.4 → 3.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 (183) hide show
  1. package/README.md +34 -0
  2. package/dist/icons-lZYQ6Vlr.js +125 -0
  3. package/dist/src/components/index.d.ts +706 -30
  4. package/dist/src/components/index.js +3243 -44
  5. package/dist/src/hooks/index.d.ts +15 -3
  6. package/dist/src/hooks/index.js +44 -3
  7. package/dist/src/icons/index.d.ts +420 -0
  8. package/dist/src/icons/index.js +3 -0
  9. package/dist/src/styles/index.d.ts +1 -1
  10. package/dist/src/styles/index.js +2 -1
  11. package/dist/src/utils/index.d.ts +38 -5
  12. package/dist/src/utils/index.js +125 -6
  13. package/dist/{src/globals.css → style.css} +1226 -607
  14. package/dist/useClickOutside-Cmp-RsP3.js +13 -0
  15. package/index.d.ts +0 -1
  16. package/package.json +22 -23
  17. package/src/components/alert/alert.tsx +20 -18
  18. package/src/components/buttons/button.tsx +28 -35
  19. package/src/components/confirm/confirmPopup.tsx +15 -17
  20. package/src/components/container/accordion.tsx +54 -0
  21. package/src/components/container/glassCard.tsx +14 -0
  22. package/src/components/container/iconBubble.tsx +30 -0
  23. package/src/components/container/leftBarPanel.tsx +15 -0
  24. package/src/components/container/pulseDot.tsx +31 -0
  25. package/src/components/container/statCard.tsx +24 -0
  26. package/src/components/container/tabs.tsx +64 -0
  27. package/src/components/footer/footer.tsx +124 -0
  28. package/src/components/footer/loginContent.tsx +70 -0
  29. package/src/components/index.ts +15 -0
  30. package/src/components/inputs/checkbox.tsx +4 -4
  31. package/src/components/inputs/input.tsx +11 -13
  32. package/src/components/inputs/multiSelect.tsx +144 -0
  33. package/src/components/inputs/radio.tsx +4 -4
  34. package/src/components/inputs/range.tsx +6 -5
  35. package/src/components/inputs/searchInput.tsx +1 -1
  36. package/src/components/inputs/select.tsx +19 -18
  37. package/src/components/inputs/shared/colorPickerPopup.tsx +5 -5
  38. package/src/components/inputs/shared/dateTimePickerPopup.tsx +9 -9
  39. package/src/components/inputs/shared/inputError.tsx +1 -1
  40. package/src/components/inputs/switch.tsx +7 -7
  41. package/src/components/inputs/tagInput.tsx +6 -7
  42. package/src/components/inputs/textarea.tsx +8 -10
  43. package/src/components/inputs/toggle.tsx +6 -6
  44. package/src/components/markdownrender/markdownRender.tsx +4 -2
  45. package/src/components/table/body.tsx +6 -6
  46. package/src/components/table/format.ts +1 -1
  47. package/src/components/table/header.tsx +1 -1
  48. package/src/components/table/pagination.tsx +17 -31
  49. package/src/components/table/table.tsx +2 -2
  50. package/src/components/version/version.tsx +1 -1
  51. package/src/components/vulnerability/constants.ts +6 -6
  52. package/src/components/vulnerability/severityPill.tsx +6 -7
  53. package/src/globals.css +12 -1
  54. package/src/hooks/index.ts +1 -0
  55. package/src/hooks/useClickOutside.ts +5 -22
  56. package/src/icons/icons.tsx +431 -0
  57. package/src/icons/index.ts +2 -0
  58. package/src/index.ts +0 -1
  59. package/src/types/hooks.d.ts +8 -2
  60. package/src/utils/index.ts +1 -1
  61. package/src/utils/logoConsoleOutput/logoConsoleOutput.ts +31 -0
  62. package/tsconfig.json +3 -2
  63. package/tsdown.config.ts +26 -0
  64. package/Readme.md +0 -29
  65. package/bun.lock +0 -662
  66. package/dist/src/components/alert/alert.d.ts +0 -8
  67. package/dist/src/components/alert/alert.js +0 -15
  68. package/dist/src/components/buttons/button.d.ts +0 -13
  69. package/dist/src/components/buttons/button.js +0 -30
  70. package/dist/src/components/confirm/confirmPopup.d.ts +0 -12
  71. package/dist/src/components/confirm/confirmPopup.js +0 -18
  72. package/dist/src/components/container/highlight.d.ts +0 -4
  73. package/dist/src/components/container/highlight.js +0 -4
  74. package/dist/src/components/container/page.d.ts +0 -8
  75. package/dist/src/components/container/page.js +0 -4
  76. package/dist/src/components/inputs/checkbox.d.ts +0 -17
  77. package/dist/src/components/inputs/checkbox.js +0 -37
  78. package/dist/src/components/inputs/input.d.ts +0 -12
  79. package/dist/src/components/inputs/input.js +0 -124
  80. package/dist/src/components/inputs/radio.d.ts +0 -17
  81. package/dist/src/components/inputs/radio.js +0 -27
  82. package/dist/src/components/inputs/range.d.ts +0 -11
  83. package/dist/src/components/inputs/range.js +0 -22
  84. package/dist/src/components/inputs/searchInput.d.ts +0 -6
  85. package/dist/src/components/inputs/searchInput.js +0 -42
  86. package/dist/src/components/inputs/select.d.ts +0 -23
  87. package/dist/src/components/inputs/select.js +0 -70
  88. package/dist/src/components/inputs/shared/colorPickerPopup.d.ts +0 -8
  89. package/dist/src/components/inputs/shared/colorPickerPopup.js +0 -191
  90. package/dist/src/components/inputs/shared/dateTimePickerPopup.d.ts +0 -9
  91. package/dist/src/components/inputs/shared/dateTimePickerPopup.js +0 -128
  92. package/dist/src/components/inputs/shared/fieldWrapper.d.ts +0 -14
  93. package/dist/src/components/inputs/shared/fieldWrapper.js +0 -8
  94. package/dist/src/components/inputs/shared/index.d.ts +0 -5
  95. package/dist/src/components/inputs/shared/index.js +0 -5
  96. package/dist/src/components/inputs/shared/inputError.d.ts +0 -6
  97. package/dist/src/components/inputs/shared/inputError.js +0 -6
  98. package/dist/src/components/inputs/shared/inputInfo.d.ts +0 -5
  99. package/dist/src/components/inputs/shared/inputInfo.js +0 -5
  100. package/dist/src/components/inputs/shared/inputLabel.d.ts +0 -9
  101. package/dist/src/components/inputs/shared/inputLabel.js +0 -4
  102. package/dist/src/components/inputs/switch.d.ts +0 -11
  103. package/dist/src/components/inputs/switch.js +0 -14
  104. package/dist/src/components/inputs/tagInput.d.ts +0 -15
  105. package/dist/src/components/inputs/tagInput.js +0 -40
  106. package/dist/src/components/inputs/textarea.d.ts +0 -11
  107. package/dist/src/components/inputs/textarea.js +0 -36
  108. package/dist/src/components/inputs/toggle.d.ts +0 -14
  109. package/dist/src/components/inputs/toggle.js +0 -12
  110. package/dist/src/components/login/loginPage.d.ts +0 -2
  111. package/dist/src/components/login/loginPage.js +0 -18
  112. package/dist/src/components/logo/logo.d.ts +0 -5
  113. package/dist/src/components/logo/logo.js +0 -6
  114. package/dist/src/components/logo/logoSmall.d.ts +0 -1
  115. package/dist/src/components/logo/logoSmall.js +0 -6
  116. package/dist/src/components/markdownrender/markdownRender.d.ts +0 -6
  117. package/dist/src/components/markdownrender/markdownRender.js +0 -25
  118. package/dist/src/components/navbar/bubble.d.ts +0 -14
  119. package/dist/src/components/navbar/bubble.js +0 -8
  120. package/dist/src/components/navbar/navbar.d.ts +0 -34
  121. package/dist/src/components/navbar/navbar.js +0 -36
  122. package/dist/src/components/navbar/navbarDropdown.d.ts +0 -7
  123. package/dist/src/components/navbar/navbarDropdown.js +0 -19
  124. package/dist/src/components/navbar/navbarItem.d.ts +0 -11
  125. package/dist/src/components/navbar/navbarItem.js +0 -12
  126. package/dist/src/components/table/body.d.ts +0 -15
  127. package/dist/src/components/table/body.js +0 -116
  128. package/dist/src/components/table/format.d.ts +0 -1
  129. package/dist/src/components/table/format.js +0 -27
  130. package/dist/src/components/table/header.d.ts +0 -8
  131. package/dist/src/components/table/header.js +0 -47
  132. package/dist/src/components/table/menu.d.ts +0 -17
  133. package/dist/src/components/table/menu.js +0 -30
  134. package/dist/src/components/table/pagination.d.ts +0 -6
  135. package/dist/src/components/table/pagination.js +0 -86
  136. package/dist/src/components/table/table.d.ts +0 -14
  137. package/dist/src/components/table/table.js +0 -14
  138. package/dist/src/components/toast/toastItem.d.ts +0 -2
  139. package/dist/src/components/toast/toastItem.js +0 -38
  140. package/dist/src/components/toast/toaster.d.ts +0 -9
  141. package/dist/src/components/toast/toaster.js +0 -86
  142. package/dist/src/components/toggle/language.d.ts +0 -4
  143. package/dist/src/components/toggle/language.js +0 -29
  144. package/dist/src/components/toggle/theme.d.ts +0 -3
  145. package/dist/src/components/toggle/theme.js +0 -30
  146. package/dist/src/components/version/version.d.ts +0 -7
  147. package/dist/src/components/version/version.js +0 -12
  148. package/dist/src/components/vulnerability/constants.d.ts +0 -4
  149. package/dist/src/components/vulnerability/constants.js +0 -14
  150. package/dist/src/components/vulnerability/severityPill.d.ts +0 -8
  151. package/dist/src/components/vulnerability/severityPill.js +0 -8
  152. package/dist/src/hooks/useClickOutside.d.ts +0 -2
  153. package/dist/src/hooks/useClickOutside.js +0 -27
  154. package/dist/src/hooks/useDarkMode.d.ts +0 -1
  155. package/dist/src/hooks/useDarkMode.js +0 -17
  156. package/dist/src/hooks/useVisibility.d.ts +0 -4
  157. package/dist/src/hooks/useVisibility.js +0 -23
  158. package/dist/src/index.d.ts +0 -5
  159. package/dist/src/index.js +0 -5
  160. package/dist/src/scripts/buildCss.d.ts +0 -1
  161. package/dist/src/scripts/buildCss.js +0 -22
  162. package/dist/src/scripts/index.d.ts +0 -1
  163. package/dist/src/scripts/index.js +0 -1
  164. package/dist/src/scripts/rewriteAlias.d.ts +0 -1
  165. package/dist/src/scripts/rewriteAlias.js +0 -31
  166. package/dist/src/utils/LogoConsoleOutput/LogoConsoleOutput.d.ts +0 -1
  167. package/dist/src/utils/LogoConsoleOutput/LogoConsoleOutput.js +0 -44
  168. package/dist/src/utils/auth/callback.d.ts +0 -2
  169. package/dist/src/utils/auth/callback.js +0 -63
  170. package/dist/src/utils/auth/getDomain.d.ts +0 -2
  171. package/dist/src/utils/auth/getDomain.js +0 -6
  172. package/dist/src/utils/auth/login.d.ts +0 -3
  173. package/dist/src/utils/auth/login.js +0 -14
  174. package/dist/src/utils/auth/logout.d.ts +0 -3
  175. package/dist/src/utils/auth/logout.js +0 -18
  176. package/dist/src/utils/auth/token.d.ts +0 -3
  177. package/dist/src/utils/auth/token.js +0 -33
  178. package/dist/tailwind.config.d.ts +0 -3
  179. package/dist/tailwind.config.js +0 -7
  180. package/src/scripts/buildCss.ts +0 -25
  181. package/src/scripts/index.ts +0 -1
  182. package/src/scripts/rewriteAlias.ts +0 -39
  183. package/src/utils/LogoConsoleOutput/LogoConsoleOutput.ts +0 -61
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export default function Logo({ className }) {
3
- const corner = 'fill-[var(--foreground)] transition-all duration-1000';
4
- const letter = 'fill-none stroke-[var(--color-login)] stroke-[3.5px]';
5
- return (_jsxs("svg", { className: `block w-full max-w-2xl mx-auto ${className || ''}`, viewBox: '0 0 147.02299 59.20511', children: [_jsx("path", { className: corner, d: 'm 28.77713,58.37738 v 0.76465 H 25.531 v -5.61816 h 0.91309 v 4.85351 z' }), _jsx("path", { className: corner, d: 'm 30.47831,59.142 h -0.917 v -5.61813 h 0.917 z' }), _jsx("path", { className: corner, d: 'M 36.46268,53.52387 V 59.142 H 35.99881 A 0.36347,0.36347 0 0 1 35.6785,58.98185 L 32.59256,55.018 c 0.0078,0.07617 0.01368,0.15039 0.01758,0.22461 0.0039,0.07422 0.0059,0.14258 0.0059,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.09864,0.0059 0.3128,0.3128 0 0 1 0.07617,0.02148 0.22919,0.22919 0 0 1 0.0664,0.04688 0.63781,0.63781 0 0 1 0.06641,0.07812 l 3.08984,3.96779 c -0.0078,-0.08105 -0.01367,-0.16015 -0.01757,-0.23828 -0.0039,-0.07813 -0.0059,-0.15039 -0.0059,-0.21875 v -3.6631 z' }), _jsx("path", { className: corner, d: 'm 39.84549,57.1684 a 2.91264,2.91264 0 0 1 -0.11523,0.84765 1.748,1.748 0 0 1 -0.34375,0.64063 1.52483,1.52483 0 0 1 -0.56543,0.40527 2.00691,2.00691 0 0 1 -0.78223,0.14258 3.23707,3.23707 0 0 1 -0.40234,-0.0254 3.44454,3.44454 0 0 1 -0.41309,-0.0801 l 0.04688,-0.5459 a 0.2079,0.2079 0 0 1 0.06055,-0.125 0.19754,0.19754 0 0 1 0.14257,-0.0469 0.74035,0.74035 0 0 1 0.18067,0.0293 1.36468,1.36468 0 0 0 0.71387,-0.041 0.74722,0.74722 0 0 0 0.3125,-0.2207 0.9864,0.9864 0 0 0 0.1914,-0.38574 2.19551,2.19551 0 0 0 0.06445,-0.57227 v -3.667 h 0.90918 z' }), _jsx("path", { className: corner, d: 'm 44.6326,58.40473 -0.0039,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z' }), _jsx("path", { className: corner, d: 'M 46.53592,54.26117 V 56.06 h 2.19629 v 0.7373 h -2.19629 v 2.3447 h -0.917 v -5.61813 h 3.50391 v 0.7373 z' }), _jsx("path", { className: corner, d: 'm 55.25956,56.33344 a 3.18179,3.18179 0 0 1 -0.20215,1.15039 2.6634,2.6634 0 0 1 -0.57227,0.90722 2.59685,2.59685 0 0 1 -0.88476,0.59473 3.17156,3.17156 0 0 1 -2.29492,0 2.62415,2.62415 0 0 1 -0.88672,-0.59473 2.65327,2.65327 0 0 1 -0.57422,-0.90722 3.37717,3.37717 0 0 1 0,-2.30176 2.67118,2.67118 0 0 1 0.57422,-0.90918 2.61491,2.61491 0 0 1 0.88672,-0.59668 3.1717,3.1717 0 0 1 2.29492,0 2.58781,2.58781 0 0 1 0.88476,0.59668 2.68144,2.68144 0 0 1 0.57227,0.90918 3.1871,3.1871 0 0 1 0.20215,1.15137 z m -0.93164,0 a 2.706,2.706 0 0 0 -0.13086,-0.87012 1.821,1.821 0 0 0 -0.375,-0.65527 1.63008,1.63008 0 0 0 -0.59082,-0.41407 2.16795,2.16795 0 0 0 -1.55664,0 1.65415,1.65415 0 0 0 -0.59278,0.41407 1.84212,1.84212 0 0 0 -0.3789,0.65527 2.92611,2.92611 0 0 0 0,1.74316 1.83766,1.83766 0 0 0 0.3789,0.6543 1.64222,1.64222 0 0 0 0.59278,0.40918 2.19564,2.19564 0 0 0 1.55664,0 1.61838,1.61838 0 0 0 0.59082,-0.40918 1.81652,1.81652 0 0 0 0.375,-0.6543 2.71589,2.71589 0 0 0 0.13086,-0.87304 z' }), _jsx("path", { className: corner, d: 'm 60.534,59.142 h -0.81543 a 0.377,0.377 0 0 1 -0.35156,-0.1875 l -1.31055,-1.8916 a 0.4267,0.4267 0 0 0 -0.14453,-0.14063 0.50286,0.50286 0 0 0 -0.23437,-0.043 H 57.17072 V 59.142 H 56.2576 v -5.61813 h 1.6543 a 3.54427,3.54427 0 0 1 0.9541,0.11328 1.80649,1.80649 0 0 1 0.65723,0.32226 1.25606,1.25606 0 0 1 0.37988,0.501 1.76427,1.76427 0 0 1 0.03516,1.19727 1.50418,1.50418 0 0 1 -0.25293,0.46093 1.61283,1.61283 0 0 1 -0.40821,0.3584 2.04861,2.04861 0 0 1 -0.5498,0.23828 0.92346,0.92346 0 0 1 0.28906,0.28516 z m -2.64551,-2.92578 a 1.763,1.763 0 0 0 0.5459,-0.07617 1.11007,1.11007 0 0 0 0.39063,-0.21289 0.87892,0.87892 0 0 0 0.23437,-0.3252 1.10093,1.10093 0 0 0 0.07715,-0.41992 0.84276,0.84276 0 0 0 -0.30371,-0.70215 1.46527,1.46527 0 0 0 -0.9209,-0.24219 h -0.74121 v 1.97852 z' }), _jsx("path", { className: corner, d: 'm 64.72049,58.40473 -0.0039,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z' }), _jsx("path", { className: corner, d: 'M 70.35721,53.52387 V 59.142 H 69.89335 A 0.36347,0.36347 0 0 1 69.57303,58.98185 L 66.4871,55.018 c 0.0078,0.07617 0.01367,0.15039 0.01757,0.22461 0.0039,0.07422 0.0059,0.14258 0.0059,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.09864,0.0059 0.3128,0.3128 0 0 1 0.07617,0.02148 0.22936,0.22936 0 0 1 0.06641,0.04688 0.63869,0.63869 0 0 1 0.0664,0.07812 l 3.08985,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z' }), _jsx("path", { className: corner, d: 'm 72.6121,59.142 h -0.917 v -5.61813 h 0.917 z' }), _jsx("path", { className: corner, d: 'M 78.59794,53.52387 V 59.142 H 78.13358 A 0.36344,0.36344 0 0 1 77.81327,58.98185 L 74.72733,55.018 c 0.008,0.07617 0.0137,0.15039 0.0176,0.22461 0.004,0.07422 0.006,0.14258 0.006,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.713,0.713 0 0 1 0.0986,0.0059 0.31254,0.31254 0 0 1 0.0762,0.02148 0.22936,0.22936 0 0 1 0.0664,0.04688 0.63869,0.63869 0 0 1 0.0664,0.07812 l 3.08984,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z' }), _jsx("path", { className: corner, d: 'M 84.53544,56.37641 V 58.6 a 3.24425,3.24425 0 0 1 -1.9502,0.60449 3.419,3.419 0 0 1 -1.23535,-0.21289 2.7275,2.7275 0 0 1 -0.94141,-0.59277 2.59231,2.59231 0 0 1 -0.60156,-0.90723 3.08634,3.08634 0 0 1 -0.21,-1.1582 3.23536,3.23536 0 0 1 0.20215,-1.165 2.5484,2.5484 0 0 1 1.49414,-1.498 3.29189,3.29189 0 0 1 1.20215,-0.209 3.52605,3.52605 0 0 1 0.62988,0.05273 3.11559,3.11559 0 0 1 0.54,0.14649 2.535,2.535 0 0 1 0.84668,0.52246 l -0.26074,0.418 a 0.26545,0.26545 0 0 1 -0.16016,0.12109 0.27377,0.27377 0 0 1 -0.21094,-0.04688 c -0.0752,-0.04492 -0.15527,-0.09082 -0.24023,-0.14062 a 2.01137,2.01137 0 0 0 -0.29,-0.13867 2.127,2.127 0 0 0 -0.37891,-0.10547 2.72656,2.72656 0 0 0 -0.50683,-0.041 2.09434,2.09434 0 0 0 -0.80176,0.14649 1.70173,1.70173 0 0 0 -0.61035,0.418 1.84692,1.84692 0 0 0 -0.39063,0.65722 2.5766,2.5766 0 0 0 -0.13672,0.86231 2.62333,2.62333 0 0 0 0.14453,0.89844 1.88731,1.88731 0 0 0 0.41016,0.67187 1.74772,1.74772 0 0 0 0.6416,0.419 2.55647,2.55647 0 0 0 1.459,0.0703 2.80344,2.80344 0 0 0 0.53222,-0.207 V 57.07074 H 82.928 a 0.19287,0.19287 0 0 1 -0.13964,-0.04883 0.16848,0.16848 0 0 1 -0.0508,-0.12695 v -0.51855 z' }), _jsx("path", { className: corner, d: 'm 89.1243,58.40473 -0.004,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z' }), _jsx("path", { className: corner, d: 'M 94.761,53.52387 V 59.142 H 94.29713 A 0.36347,0.36347 0 0 1 93.97682,58.98185 L 90.8909,55.018 c 0.008,0.07617 0.0137,0.15039 0.0176,0.22461 0.004,0.07422 0.006,0.14258 0.006,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.0986,0.0059 0.3128,0.3128 0 0 1 0.0762,0.02148 0.22919,0.22919 0 0 1 0.0664,0.04688 0.63781,0.63781 0 0 1 0.0664,0.07812 l 3.08984,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z' }), _jsx("path", { className: corner, d: 'M 98.95829,54.26117 V 56.06 h 2.19629 v 0.7373 h -2.19629 v 2.3447 h -0.917 v -5.61813 h 3.5039 v 0.7373 z' }), _jsx("path", { className: corner, d: 'm 107.68192,56.33344 a 3.18158,3.18158 0 0 1 -0.20215,1.15039 2.66353,2.66353 0 0 1 -0.57226,0.90722 2.597,2.597 0 0 1 -0.88477,0.59473 3.17156,3.17156 0 0 1 -2.29492,0 2.62415,2.62415 0 0 1 -0.88672,-0.59473 2.65327,2.65327 0 0 1 -0.57422,-0.90722 3.37717,3.37717 0 0 1 0,-2.30176 2.67118,2.67118 0 0 1 0.57422,-0.90918 2.61491,2.61491 0 0 1 0.88672,-0.59668 3.1717,3.1717 0 0 1 2.29492,0 2.588,2.588 0 0 1 0.88477,0.59668 2.68157,2.68157 0 0 1 0.57226,0.90918 3.18689,3.18689 0 0 1 0.20215,1.15137 z m -0.93164,0 a 2.706,2.706 0 0 0 -0.13086,-0.87012 1.82066,1.82066 0 0 0 -0.375,-0.65527 1.63,1.63 0 0 0 -0.59082,-0.41407 2.16795,2.16795 0 0 0 -1.55664,0 1.65411,1.65411 0 0 0 -0.59277,0.41407 1.84214,1.84214 0 0 0 -0.37891,0.65527 2.92632,2.92632 0 0 0 0,1.74316 1.83768,1.83768 0 0 0 0.37891,0.6543 1.64218,1.64218 0 0 0 0.59277,0.40918 2.19564,2.19564 0 0 0 1.55664,0 1.61829,1.61829 0 0 0 0.59082,-0.40918 1.81623,1.81623 0 0 0 0.375,-0.6543 2.71589,2.71589 0 0 0 0.13086,-0.87304 z' }), _jsx("path", { className: corner, d: 'm 112.95731,59.142 h -0.81543 a 0.377,0.377 0 0 1 -0.35156,-0.1875 l -1.31055,-1.8916 a 0.4267,0.4267 0 0 0 -0.14453,-0.14063 0.50286,0.50286 0 0 0 -0.23437,-0.043 H 109.594 V 59.142 h -0.91309 v -5.61813 h 1.6543 a 3.54427,3.54427 0 0 1 0.9541,0.11328 1.80649,1.80649 0 0 1 0.65723,0.32226 1.25606,1.25606 0 0 1 0.37988,0.501 1.76427,1.76427 0 0 1 0.0352,1.19727 1.50418,1.50418 0 0 1 -0.25293,0.46093 1.61283,1.61283 0 0 1 -0.40821,0.3584 2.04861,2.04861 0 0 1 -0.5498,0.23828 0.92346,0.92346 0 0 1 0.28906,0.28516 z m -2.64551,-2.92578 a 1.763,1.763 0 0 0 0.5459,-0.07617 1.11007,1.11007 0 0 0 0.39063,-0.21289 0.87892,0.87892 0 0 0 0.23437,-0.3252 1.10093,1.10093 0 0 0 0.0772,-0.41992 0.84276,0.84276 0 0 0 -0.30371,-0.70215 1.46527,1.46527 0 0 0 -0.9209,-0.24219 H 109.594 v 1.97852 z' }), _jsx("path", { className: corner, d: 'm 116.4954,59.142 h -0.917 v -5.61813 h 0.917 z' }), _jsx("path", { className: corner, d: 'm 121.69559,54.28461 h -1.75195 V 59.142 h -0.9082 v -4.85739 h -1.75586 v -0.76074 h 4.416 z' }), _jsx("polyline", { className: letter, style: { strokeMiterlimit: 10 }, points: '47.871 98.1 33.189 98.1 33.189 83.418', transform: 'translate(-31.392,-41.894)' }), _jsx("polyline", { className: letter, style: { strokeMiterlimit: 10 }, points: '33.142 58.326 33.142 43.644 47.824 43.644', transform: 'translate(-31.392,-41.894)' }), _jsx("polyline", { className: letter, style: { strokeMiterlimit: 10 }, points: '161.983 98.122 176.665 98.122 176.665 83.44', transform: 'translate(-31.392,-41.894)' }), _jsx("polyline", { className: letter, style: { strokeMiterlimit: 10 }, points: '176.665 58.372 176.665 43.69 161.983 43.69', transform: 'translate(-31.392,-41.894)' }), _jsx("path", { className: corner, d: 'm 30.02449,40.19351 v 4.12842 H 12.4991 V 13.99038 h 4.92871 v 26.20313 z' }), _jsx("path", { className: corner, d: 'm 61.53523,29.1564 a 17.15942,17.15942 0 0 1 -1.09473,6.21338 14.35971,14.35971 0 0 1 -3.08593,4.89746 14.091,14.091 0 0 1 -4.78125,3.21191 17.1289,17.1289 0 0 1 -12.38575,0 13.98317,13.98317 0 0 1 -7.88867,-8.10937 18.18161,18.18161 0 0 1 0,-12.42725 14.39119,14.39119 0 0 1 3.09668,-4.90771 14.13157,14.13157 0 0 1 4.792,-3.22315 17.13565,17.13565 0 0 1 12.38575,0 14.02046,14.02046 0 0 1 4.78125,3.22315 14.47032,14.47032 0 0 1 3.08593,4.90771 17.16209,17.16209 0 0 1 1.09472,6.21387 z m -5.03418,0 a 14.62587,14.62587 0 0 0 -0.70508,-4.69727 9.9446,9.9446 0 0 0 -2.02246,-3.53906 8.80545,8.80545 0 0 0 -3.1914,-2.23242 11.719,11.719 0 0 0 -8.4043,0 8.90077,8.90077 0 0 0 -3.20117,2.23242 9.96735,9.96735 0 0 0 -2.043,3.53906 15.81644,15.81644 0 0 0 0,9.415 9.847,9.847 0 0 0 2.043,3.52832 8.85094,8.85094 0 0 0 3.20117,2.21192 11.87213,11.87213 0 0 0 8.4043,0 8.75623,8.75623 0 0 0 3.1914,-2.21192 9.82454,9.82454 0 0 0 2.02249,-3.52828 14.69371,14.69371 0 0 0 0.70505,-4.71777 z' }), _jsx("path", { className: corner, d: 'm 91.76082,29.38784 v 12.00635 a 17.5354,17.5354 0 0 1 -10.53125,3.26465 18.41512,18.41512 0 0 1 -6.667,-1.148 14.80254,14.80254 0 0 1 -5.08691,-3.20166 14.0148,14.0148 0 0 1 -3.24316,-4.897 16.691,16.691 0 0 1 -1.1377,-6.25586 17.42935,17.42935 0 0 1 1.09473,-6.2876 13.74023,13.74023 0 0 1 8.06738,-8.08838 17.7222,17.7222 0 0 1 6.48828,-1.127 19.10354,19.10354 0 0 1 3.40137,0.28418 16.85244,16.85244 0 0 1 2.917,0.79 13.68442,13.68442 0 0 1 2.48633,1.22168 13.95372,13.95372 0 0 1 2.085,1.60058 l -1.41113,2.25391 a 1.40229,1.40229 0 0 1 -0.86426,0.65283 1.47784,1.47784 0 0 1 -1.13672,-0.25244 q -0.6123,-0.35816 -1.2959,-0.7583 a 11.33129,11.33129 0 0 0 -1.56933,-0.748 11.53387,11.53387 0 0 0 -2.043,-0.56836 14.78335,14.78335 0 0 0 -2.73828,-0.22119 11.32128,11.32128 0 0 0 -4.32813,0.78955 9.26752,9.26752 0 0 0 -3.29687,2.25391 9.99164,9.99164 0 0 0 -2.10645,3.54931 13.90267,13.90267 0 0 0 -0.7373,4.65528 14.11731,14.11731 0 0 0 0.77929,4.855 10.1425,10.1425 0 0 0 2.21192,3.62305 9.43419,9.43419 0 0 0 3.46484,2.26416 13.81975,13.81975 0 0 0 7.87793,0.3789 15.14816,15.14816 0 0 0 2.875,-1.11621 v -6.02383 h -4.2334 a 1.04883,1.04883 0 0 1 -0.75879,-0.26367 0.90553,0.90553 0 0 1 -0.27343,-0.68457 v -2.80127 z' }), _jsx("path", { className: corner, d: 'M 102.546,44.32193 H 97.59581 V 13.99038 h 4.95019 z' }), _jsx("path", { className: corner, d: 'm 134.8575,13.99038 v 30.33155 h -2.50684 a 2.14219,2.14219 0 0 1 -0.96875,-0.2002 2.26108,2.26108 0 0 1 -0.75879,-0.66357 L 113.962,22.05777 q 0.063,0.61083 0.0947,1.21093 0.0322,0.60058 0.0322,1.106 v 19.94723 h -4.3398 V 13.99038 h 2.57031 a 3.89092,3.89092 0 0 1 0.53711,0.03174 1.53328,1.53328 0 0 1 0.41016,0.11572 1.18964,1.18964 0 0 1 0.35839,0.25293 4.01792,4.01792 0 0 1 0.3584,0.4209 l 16.68164,21.42188 q -0.063,-0.65259 -0.0947,-1.28467 -0.0308,-0.63208 -0.0312,-1.17969 V 13.99038 Z' })] }));
6
- }
@@ -1 +0,0 @@
1
- export default function LogoSmall(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export default function LogoSmall() {
3
- const corner = 'fill-login';
4
- const letter = 'fill-[var(--foreground)] transition-all duration-1000';
5
- return (_jsxs("svg", { className: 'block h-full', viewBox: '0 0 100 100', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', children: [_jsx("path", { className: corner, d: 'M0 0H6.6667V28.3333H0V0Z' }), _jsx("path", { className: corner, d: 'M28.3333 0V6.6667H0V0H28.3333Z' }), _jsx("path", { className: corner, d: 'M100 0V6.6667H71.6667V0H100Z' }), _jsx("path", { className: corner, d: 'M100 28.3333H93.3333V0H100V28.3333Z' }), _jsx("path", { className: corner, d: 'M0 100V93.3333H28.3333V100H0Z' }), _jsx("path", { className: corner, d: 'M0 71.6667H6.6667V100H0V71.6667Z' }), _jsx("path", { className: corner, d: 'M100 100H93.3333V71.6667H100V100Z' }), _jsx("path", { className: corner, d: 'M71.6667 100V93.3333H100V100H71.6667Z' }), _jsx("path", { className: letter, d: 'M31.6667 18.3333H43.3334V81.6666H31.6667V18.3333Z' }), _jsx("path", { className: letter, d: 'M31.6667 70H68.3334V81.6667H31.6667V70Z' })] }));
6
- }
@@ -1,6 +0,0 @@
1
- import { Components } from 'react-markdown';
2
- export default function MarkdownRender({ MDstr, components, className }: {
3
- MDstr: string;
4
- components?: Components;
5
- className?: string;
6
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,25 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Markdown from 'react-markdown';
3
- import remarkGfm from 'remark-gfm';
4
- import rehypeHighlight from 'rehype-highlight';
5
- import { ExternalLink } from 'lucide-react';
6
- function makeDefaultComponents() {
7
- return {
8
- h1: ({ ...props }) => _jsx("h2", { ...props }),
9
- input({ type, checked }) {
10
- if (type !== 'checkbox')
11
- return _jsx("input", { type: type });
12
- return (_jsx("span", { "data-task-checkbox": true, className: `inline-flex items-center justify-center w-4 h-4 rounded-xs border-2 shrink-0 align-middle
13
- ${checked ? 'bg-login border-login' : 'border-login/50'}`, children: checked && (_jsx("svg", { viewBox: '0 0 10 8', className: 'w-2.5 h-2.5 fill-none stroke-white stroke-2', children: _jsx("polyline", { points: '1,4 4,7 9,1', strokeLinecap: 'round', strokeLinejoin: 'round' }) })) }));
14
- },
15
- a({ href, children }) {
16
- return (_jsxs("a", { href: href, target: '_blank', rel: 'noopener noreferrer', className: 'inline-flex items-center gap-1 text-login hover:text-login/80 underline underline-offset-2 transition-colors', children: [children, _jsx(ExternalLink, { className: 'w-3 h-3 shrink-0 opacity-70' })] }));
17
- },
18
- pre({ children }) {
19
- return (_jsx("pre", { className: 'block rounded-lg overflow-auto whitespace-pre-wrap wrap-break-word w-full', children: children }));
20
- },
21
- };
22
- }
23
- export default function MarkdownRender({ MDstr, components, className }) {
24
- return (_jsx("div", { className: className ?? 'prose prose-sm prose-custom max-w-none', children: _jsx(Markdown, { components: { ...makeDefaultComponents(), ...components }, remarkPlugins: [remarkGfm], rehypePlugins: [rehypeHighlight], children: MDstr.replace(/\\n/g, '\n') }) }));
25
- }
@@ -1,14 +0,0 @@
1
- type BubbleText = {
2
- href: string;
3
- className: string;
4
- fill: string;
5
- stroke: string;
6
- text: string;
7
- x: string;
8
- hide: boolean;
9
- handleHide: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
10
- };
11
- export default function Bubble({ bubble }: {
12
- bubble: BubbleText;
13
- }): import("react/jsx-runtime").JSX.Element | null;
14
- export {};
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { X } from 'lucide-react';
3
- export default function Bubble({ bubble }) {
4
- if (bubble.hide) {
5
- return null;
6
- }
7
- return (_jsxs("a", { href: bubble.href, className: `absolute top-13 min-w-40 ${bubble.className}`, children: [_jsxs("svg", { viewBox: '0 0 24 12', className: 'absolute -top-3 h-3 w-6', "aria-hidden": 'true', children: [_jsx("path", { d: 'M12 0 24 12H0Z', fill: bubble.fill, stroke: bubble.stroke, strokeWidth: '1.5', strokeLinejoin: 'round' }), _jsx("path", { d: 'M12 0 24 12H0Z', fill: bubble.fill })] }), _jsxs("div", { className: 'flex justify-between', children: [_jsx("span", { className: 'min-w-40', children: bubble.text }), _jsx(X, { onClick: bubble.handleHide, className: bubble.x })] })] }));
8
- }
@@ -1,34 +0,0 @@
1
- import React from 'react';
2
- import { Language } from 'uibee/components';
3
- export type NavbarProps = {
4
- children: React.ReactNode;
5
- bubble?: {
6
- lang?: BubbleContent;
7
- theme?: BubbleContent;
8
- login?: BubbleContent;
9
- };
10
- className?: string;
11
- disableLanguageToggle?: boolean;
12
- disableThemeToggle?: boolean;
13
- innerClassName?: string;
14
- lang?: Language;
15
- loginPath: string;
16
- logoutPath: string;
17
- onlyLogo?: boolean;
18
- profilePath?: string;
19
- theme?: string;
20
- token?: string | null;
21
- };
22
- type BubbleContent = {
23
- condition: boolean;
24
- href: string;
25
- className: string;
26
- text: string;
27
- fill: string;
28
- stroke: string;
29
- x: string;
30
- hide: boolean;
31
- handleHide: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
32
- };
33
- export default function Navbar({ children, bubble, className, disableLanguageToggle, disableThemeToggle, innerClassName, lang, loginPath, logoutPath, onlyLogo, profilePath, token }: NavbarProps): import("react/jsx-runtime").JSX.Element;
34
- export {};
@@ -1,36 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import React, { useState } from 'react';
4
- import Link from 'next/link';
5
- import LogoSmall from '../logo/logoSmall';
6
- import LanguageToggle from '../toggle/language';
7
- import ThemeToggle from '../toggle/theme';
8
- import { LogOut, User } from 'lucide-react';
9
- import Bubble from './bubble';
10
- export default function Navbar({ children, bubble, className, disableLanguageToggle, disableThemeToggle, innerClassName, lang, loginPath, logoutPath, onlyLogo, profilePath, token }) {
11
- const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
12
- return (_jsx("div", { className: `${isMobileMenuOpen ? 'bg-[#181818f0]' : 'bg-[#18181899]'} backdrop-blur-xl fixed top-0 z-900 w-full ${className}`, children: _jsxs("div", { className: `flex w-full max-w-6xl m-auto p-2 transition duration-500 800px:justify-between 800px:p-4 ${isMobileMenuOpen ? 'h-screen bg-login-900/20 800px:h-20' : ''} ${innerClassName}
13
- `, children: [_jsx("div", { className: 'block h-12 p-1 800px:p-0', children: _jsx(Link, { href: '/', onClick: () => setIsMobileMenuOpen(false), children: _jsx(LogoSmall, {}) }) }), onlyLogo ? null : (_jsxs(_Fragment, { children: [_jsx("nav", { className: 'hidden 800px:flex 800px:justify-between 800px:items-center 800px:w-fill max-w-200', children: children }), _jsxs("nav", { className: 'flex w-[calc(100vw-8rem)] justify-end h-12 800px:w-fit', children: [_jsxs("div", { className: 'relative grid gap-2', children: [!disableThemeToggle &&
14
- _jsx(ThemeToggle, {}), bubble?.theme?.condition && _jsx(Bubble, { bubble: bubble.theme })] }), _jsxs("div", { className: 'relative grid gap-2', children: [!disableLanguageToggle &&
15
- _jsx(LanguageToggle, { language: lang }), bubble?.lang?.condition && _jsx(Bubble, { bubble: bubble.lang })] }), _jsxs("div", { className: 'relative grid gap-2', children: [loginPath && logoutPath &&
16
- _jsx(AuthButton, { profilePath: profilePath, token: token, loginPath: loginPath, logoutPath: logoutPath }), bubble?.login?.condition && _jsx(Bubble, { bubble: bubble.login })] })] }), _jsxs("button", { className: 'w-12 h-12 relative cursor-pointer bg-none border-none 800px:hidden', onClick: () => setIsMobileMenuOpen(!isMobileMenuOpen), children: [_jsx("div", { className: hamburgerStyle(isMobileMenuOpen) }), _jsx("div", { className: hamburgerStyle(isMobileMenuOpen, true) })] }), _jsx("nav", { className: `fixed top-16 w-[calc(100%-2rem)] max-w-140 mx-auto left-0 right-0 800px:hidden
17
- transition-all duration-500 ease-in-out overflow-hidden
18
- ${isMobileMenuOpen ? 'max-h-[calc(100vh-4rem)] opacity-100' : 'max-h-0 opacity-0'}`, onClick: () => setIsMobileMenuOpen(false), children: React.Children.map(children, (child, index) => (_jsx("div", { className: `transition-all duration-500 ease-out ${isMobileMenuOpen
19
- ? 'opacity-100 transform translate-y-0'
20
- : 'opacity-0 transform -translate-y-4'}`, style: {
21
- transitionDelay: isMobileMenuOpen ? `${index * 80}ms` : '0ms'
22
- }, children: child }, index))) })] }))] }) }));
23
- }
24
- function AuthButton({ profilePath, logoutPath, loginPath, token }) {
25
- return (_jsx("div", { className: 'rounded-[0.3rem] hover:bg-login-300/20 h-12 w-12', children: token ? (_jsxs(_Fragment, { children: [logoutPath &&
26
- _jsx(Link, { href: logoutPath, prefetch: false, onClick: (e) => {
27
- e.preventDefault();
28
- window.location.href = logoutPath;
29
- }, className: 'grid items-center justify-center h-full w-full', children: _jsx(LogOut, { size: 24 }) }), profilePath &&
30
- _jsx(Link, { href: profilePath, className: 'grid items-center justify-center h-full w-full', children: _jsx(User, { size: 24 }) })] })) : (_jsx(Link, { href: loginPath, className: 'grid items-center justify-center h-full w-full', children: _jsx(User, { size: 24 }) })) }));
31
- }
32
- function hamburgerStyle(isOpen, isSecond) {
33
- return `bg-login-50 h-0.5 absolute w-8 transition-all duration-[400ms] left-2 ${isOpen
34
- ? `top-6 ${isSecond ? 'rotate-45' : '-rotate-45'}`
35
- : isSecond ? 'top-7' : 'top-4'}`;
36
- }
@@ -1,7 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export type NavDropdownProps = {
3
- children: ReactNode;
4
- title: string;
5
- className?: string;
6
- };
7
- export default function NavDropdown({ children, title, className }: NavDropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { ChevronDown } from 'lucide-react';
4
- import React, { useRef, useState } from 'react';
5
- export default function NavDropdown({ children, title, className }) {
6
- const [isMobileDropdownOpen, setIsMobileDropdownOpen] = useState(false);
7
- const [isDesktopOpen, setIsDesktopOpen] = useState(false);
8
- const navItemRef = useRef(null);
9
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: 'relative hidden 800px:block', children: _jsxs("div", { className: 'outline-none', tabIndex: 0, ref: navItemRef, onMouseEnter: () => setIsDesktopOpen(true), onMouseLeave: () => setIsDesktopOpen(false), onFocus: () => setIsDesktopOpen(true), onBlur: () => setIsDesktopOpen(false), children: [_jsxs("div", { className: `list-none no-underline text-base leading-4 p-3 font-bold cursor-pointer flex flex-row items-center
10
- transition-colors`, children: [title, _jsx(ChevronDown, { className: 'w-6 h-6 stroke-login ml-1 text-2xl transition-transform duration-300 ease-in-out' })] }), _jsx("div", { className: `absolute pt-2 -ml-4 transition-all duration-200 ease-in-out z-10 ${isDesktopOpen ? 'opacity-100 pointer-events-auto translate-y-0' : 'opacity-0 pointer-events-none -translate-y-4'}`, children: _jsx("ul", { className: `p-3 px-6 pb-4 rounded-[0.4rem] shadow-[0_0.1rem_0.5rem_rgba(3,3,3,0.5)] bg-login-700/98 ${className || ''}`, onClick: () => setIsDesktopOpen(false), children: React.Children.map(children, (child, index) => (_jsx("div", { onClick: () => setIsDesktopOpen(false), className: 'group dropdown', children: child }, index))) }) })] }) }), _jsxs("div", { className: 'block 800px:hidden!', children: [_jsx("button", { className: 'bg-none border-none cursor-pointer w-full text-left', onClick: (e) => {
11
- e.stopPropagation();
12
- setIsMobileDropdownOpen(!isMobileDropdownOpen);
13
- }, children: _jsxs("li", { className: `list-none no-underline text-2xl leading-6 overflow-hidden
14
- w-full pl-4 pr-4 rounded-[0.3rem] transition-all duration-600
15
- flex items-center gap-2 opacity-100 min-h-16 py-5 `, children: [_jsx("span", { children: title }), _jsx(ChevronDown, { className: `w-6 h-6 transition-transform duration-400 shrink-0
16
- ${isMobileDropdownOpen ? 'rotate-180' : ''}` })] }) }), _jsx("div", { className: `list-none no-underline text-xl px-6 ${isMobileDropdownOpen ? 'pb-4' : ''}`, children: React.Children.map(children, (child, index) => (_jsx("div", { className: `leading-6 transition-all duration-500 group dropdown
17
- ${isMobileDropdownOpen ? 'h-11 opacity-100' : 'h-0 opacity-0'}
18
- `, children: child }, index))) })] })] }));
19
- }
@@ -1,11 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export type NavItemProps = {
3
- href: string;
4
- children: ReactNode;
5
- external?: boolean;
6
- target?: string;
7
- rel?: string;
8
- title?: string;
9
- icon?: ReactNode;
10
- };
11
- export default function NavItem({ href, children, external, target, rel, title, icon }: NavItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { ArrowUpRight } from 'lucide-react';
4
- import Link from 'next/link';
5
- const commonStyling = 'list-none flex no-underline items-center gap-2 whitespace-nowrap cursor-pointer';
6
- export default function NavItem({ href, children, external = false, target, rel, title, icon }) {
7
- const linkProps = { href, target, rel, title };
8
- return (_jsxs(_Fragment, { children: [_jsx(Link, { ...linkProps, className: 'hidden 800px:flex', children: _jsxs("li", { className: `${commonStyling} text-base leading-4 p-3 font-bold transition-colors link-corner-hover
9
- group-[.dropdown]:p-2.5 group-[.dropdown]:pr-3 group-[.dropdown]:pl-1`, children: [icon, children, external && _jsx(ArrowUpRight, { className: 'w-6 h-6 stroke-login' })] }) }), _jsx(Link, { ...linkProps, className: '800px:hidden', children: _jsxs("li", { className: `${commonStyling} text-2xl leading-6 overflow-hidden w-auto pl-4 rounded-[0.3rem] transition-all
10
- duration-600 opacity-100 h-16 py-5 group-[.dropdown]:p-0 group-[.dropdown]:text-lg group-[.dropdown]:h-auto
11
- group-[.dropdown]:py-2.5 group-[.dropdown]:pl-4`, children: [children, external && _jsx(ArrowUpRight, { className: 'w-6 h-6 stroke-login' })] }) })] }));
12
- }
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import type { Column } from 'uibee/components';
3
- type BodyProps = {
4
- list: object[];
5
- columns: Column[];
6
- menuItems?: (data: object, id: string) => React.ReactNode;
7
- redirectPath?: string | {
8
- path: string;
9
- key?: string;
10
- };
11
- variant?: 'default' | 'minimal';
12
- idKey?: string;
13
- };
14
- export default function Body({ list, columns, menuItems, redirectPath, variant, idKey }: BodyProps): import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -1,116 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { EllipsisVertical } from 'lucide-react';
3
- import { useRouter } from 'next/navigation';
4
- import { useState, useRef, useEffect } from 'react';
5
- import useClickOutside from '../../hooks/useClickOutside';
6
- import Menu from './menu';
7
- import { formatValue } from './format';
8
- export default function Body({ list, columns, menuItems, redirectPath, variant = 'default', idKey }) {
9
- const [openMenuId, setOpenMenuId] = useState(null);
10
- const [anchor, setAnchor] = useState(null);
11
- const router = useRouter();
12
- const menuRef = useRef(null);
13
- const tbodyRef = useRef(null);
14
- const menuWasOpenOnMouseDown = useRef(false);
15
- useClickOutside(menuRef, () => setOpenMenuId(null));
16
- useEffect(() => {
17
- const el = tbodyRef.current;
18
- if (!el)
19
- return;
20
- const close = () => setOpenMenuId(null);
21
- el.addEventListener('scroll', close);
22
- return () => el.removeEventListener('scroll', close);
23
- }, []);
24
- return (_jsx("tbody", { ref: tbodyRef, className: `
25
- divide-login-600 block overflow-y-auto flex-1 min-h-0
26
- ${variant === 'default' ? 'bg-login-500/50 divide-y' : 'bg-transparent divide-y'}
27
- `, children: list.map((item, index) => {
28
- const itemRecord = item;
29
- let id = '';
30
- if (idKey && itemRecord[idKey] !== undefined) {
31
- id = String(itemRecord[idKey]);
32
- }
33
- else if (itemRecord['id'] !== undefined) {
34
- id = String(itemRecord['id']);
35
- }
36
- else {
37
- const firstKey = columns[0]?.key || Object.keys(itemRecord)[0];
38
- id = String(itemRecord[firstKey]);
39
- }
40
- const redirectConfig = (typeof redirectPath === 'object' && redirectPath) ? redirectPath : { path: redirectPath };
41
- const redirectId = redirectConfig.key ? String(itemRecord[redirectConfig.key]) : id;
42
- const menuButtonColors = variant === 'minimal'
43
- ? {
44
- active: 'bg-login-600 text-login-100',
45
- inactive: 'hover:bg-login-600 text-login-200 hover:text-login-100'
46
- }
47
- : {
48
- active: 'bg-login-400 text-login-100',
49
- inactive: 'hover:bg-login-400 text-login-200 hover:text-login-100'
50
- };
51
- const buttonClass = openMenuId === id ? menuButtonColors.active : menuButtonColors.inactive;
52
- return (_jsxs("tr", { className: `
53
- flex w-full group/row transition-colors
54
- ${redirectConfig.path ? 'cursor-pointer' : ''}
55
- ${variant === 'default' && redirectConfig.path ? 'hover:bg-login-600/30' : ''}
56
- ${variant === 'minimal' ? 'hover:bg-white/5 border-b border-login-600/50 last:border-0' : ''}
57
- `, onMouseDown: () => {
58
- menuWasOpenOnMouseDown.current = openMenuId !== null;
59
- }, onClick: () => {
60
- if (menuWasOpenOnMouseDown.current) {
61
- menuWasOpenOnMouseDown.current = false;
62
- return;
63
- }
64
- if (redirectConfig.path) {
65
- if (redirectConfig.path.includes('?')) {
66
- router.push(`${redirectConfig.path}${redirectId}`);
67
- }
68
- else {
69
- router.push(`${redirectConfig.path}/${redirectId}`);
70
- }
71
- }
72
- }, onContextMenu: (e) => {
73
- e.preventDefault();
74
- setAnchor({ top: e.clientY, right: window.innerWidth - e.clientX });
75
- setOpenMenuId(id);
76
- }, children: [columns.map((col) => {
77
- const val = itemRecord[col.key];
78
- const value = val;
79
- let badgeClass = '';
80
- if (col.highlight) {
81
- const highlightKey = String(value);
82
- const colorName = col.highlight[highlightKey] || col.highlight.default;
83
- if (colorName) {
84
- switch (colorName) {
85
- case 'green':
86
- badgeClass = 'bg-green-500/20 text-green-400';
87
- break;
88
- case 'yellow':
89
- badgeClass = 'bg-yellow-500/20 text-yellow-400';
90
- break;
91
- case 'red':
92
- badgeClass = 'bg-red-500/20 text-red-400';
93
- break;
94
- case 'blue':
95
- badgeClass = 'bg-blue-500/20 text-blue-400';
96
- break;
97
- case 'gray':
98
- badgeClass = 'bg-gray-500/20 text-gray-400';
99
- break;
100
- }
101
- badgeClass += ' px-2 py-1 rounded';
102
- }
103
- }
104
- return (_jsx("td", { className: `
105
- flex-1 min-w-0 px-6 py-4 whitespace-nowrap text-sm flex items-center text-login-100
106
- ${variant === 'minimal' ? 'px-4! py-2!' : ''}
107
- `, children: _jsx("div", { className: 'relative w-full min-w-0', children: _jsx("h1", { className: `block max-w-full truncate ${badgeClass}`, children: formatValue(col.key, value) }) }) }, col.key));
108
- }), menuItems && (_jsx("td", { className: 'shrink-0 w-16 flex flex-row items-center justify-end p-2 px-4\n whitespace-nowrap text-right text-sm font-medium', children: _jsxs("div", { className: 'relative', children: [_jsx("button", { type: 'button', className: `p-1.5 rounded flex items-center justify-center transition-colors ${buttonClass}`, onMouseDown: (e) => e.nativeEvent.stopImmediatePropagation(), onClick: (e) => {
109
- e.stopPropagation();
110
- const rect = e.currentTarget.getBoundingClientRect();
111
- const coords = { top: rect.bottom + 4, right: window.innerWidth - rect.right };
112
- setAnchor(openMenuId === id ? null : coords);
113
- setOpenMenuId(openMenuId === id ? null : id);
114
- }, children: _jsx("span", { className: 'text-xl leading-none select-none', children: _jsx(EllipsisVertical, { className: 'h-5 w-5' }) }) }), openMenuId === id && anchor && (_jsx(Menu, { ref: menuRef, anchor: anchor, onClose: () => setOpenMenuId(null), children: menuItems?.(item, id) }))] }) }))] }, index));
115
- }) }));
116
- }
@@ -1 +0,0 @@
1
- export declare function formatValue(key: string, value: string | number): string | number;
@@ -1,27 +0,0 @@
1
- const nullableTimeKeys = ['date', 'last_sent', 'time'];
2
- const ISODateTimeReg = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
3
- const ISODateReg = /^\d{4}-\d{2}-\d{2}$/;
4
- const ISOTimeReg = /^\d{2}:\d{2}(:\d{2})?$/;
5
- const OsloTZ = { timeZone: 'Europe/Oslo', second: undefined };
6
- const OsloTime = { ...OsloTZ, hour: '2-digit', minute: '2-digit' };
7
- const OsloDateTime = { ...OsloTime, year: 'numeric', month: '2-digit', day: '2-digit' };
8
- export function formatValue(key, value) {
9
- if (nullableTimeKeys.includes(key) && !value) {
10
- return 'Never';
11
- }
12
- if (typeof value === 'string') {
13
- if (ISODateTimeReg.test(value)) {
14
- return new Date(value).toLocaleString('nb-NO', OsloDateTime);
15
- }
16
- if (ISODateReg.test(value)) {
17
- return new Date(value).toLocaleDateString('nb-NO', OsloTZ);
18
- }
19
- if (ISOTimeReg.test(value)) {
20
- return new Date(`1970-01-01T${value}`).toLocaleTimeString('nb-NO', OsloTime);
21
- }
22
- }
23
- if (key.includes('capacity')) {
24
- return value === 0 ? 'Unlimited' : value;
25
- }
26
- return value;
27
- }
@@ -1,8 +0,0 @@
1
- import type { Column } from 'uibee/components';
2
- type HeaderProps = {
3
- columns: Column[];
4
- hideMenu?: boolean;
5
- variant?: 'default' | 'minimal';
6
- };
7
- export default function Header({ columns, hideMenu, variant }: HeaderProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,47 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ChevronDown, ChevronUp } from 'lucide-react';
3
- import { usePathname, useRouter, useSearchParams } from 'next/navigation';
4
- import { useEffect, useState } from 'react';
5
- function parseOrder(value) {
6
- return value === 'asc' || value === 'desc' ? value : undefined;
7
- }
8
- export default function Header({ columns, hideMenu, variant = 'default' }) {
9
- const router = useRouter();
10
- const pathname = usePathname();
11
- const searchParams = useSearchParams();
12
- const [column, setColumn] = useState(searchParams.get('column') ?? '');
13
- const [order, setOrder] = useState(parseOrder(searchParams.get('order')));
14
- useEffect(() => {
15
- if (!column || !order) {
16
- return;
17
- }
18
- const params = new URLSearchParams(searchParams.toString());
19
- if (searchParams.get('order') !== order ||
20
- searchParams.get('column') !== column) {
21
- params.set('order', order);
22
- params.set('column', column);
23
- params.set('page', '1');
24
- router.push(`${pathname}?${params.toString()}`);
25
- }
26
- }, [order, column, pathname, router, searchParams]);
27
- function handleChange(key) {
28
- setColumn(key);
29
- setOrder((prev) => (key === column && prev === 'asc' ? 'desc' : 'asc'));
30
- }
31
- return (_jsx("thead", { className: `
32
- block w-full
33
- ${variant === 'default' ? 'bg-login-700' : 'bg-transparent border-b border-login-600'}
34
- `, children: _jsxs("tr", { className: 'flex w-full divide-x divide-transparent', children: [columns.map((col) => {
35
- const key = col.key;
36
- const value = col.label || (key.length < 3
37
- ? key.toUpperCase()
38
- : `${key[0].toUpperCase()}${key
39
- .slice(1)
40
- .replaceAll('_', ' ')}`);
41
- return (_jsx("th", { className: `
42
- flex-1 min-w-0 px-6 py-3 text-xs font-medium uppercase tracking-wider text-left
43
- ${variant === 'default' ? 'text-login-200' : 'text-login-100'}
44
- ${variant === 'minimal' ? 'px-4!' : ''}
45
- `, children: _jsxs("button", { className: 'flex w-full min-w-0 flex-row items-center gap-2 group uppercase whitespace-nowrap', onClick: () => handleChange(key), children: [_jsx("span", { className: 'min-w-0 truncate', children: value }), _jsx("span", { className: 'flex flex-col', children: column === key ? (order === 'asc' ? (_jsx(ChevronUp, { className: 'h-4 w-4' })) : (_jsx(ChevronDown, { className: 'h-4 w-4' }))) : (_jsx(ChevronUp, { className: 'h-4 w-4 stroke-login-200 opacity-0 group-hover:opacity-100' })) })] }) }, key));
46
- }), !hideMenu && _jsx("th", { className: 'shrink-0 w-16 px-6 py-3' })] }) }));
47
- }
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- export default function Menu({ ref, children, anchor, onClose }: {
3
- ref: React.RefObject<HTMLDivElement | null>;
4
- children: React.ReactNode;
5
- anchor: {
6
- top: number;
7
- right: number;
8
- };
9
- onClose?: () => void;
10
- }): React.ReactPortal;
11
- export declare function MenuButton({ icon, text, hotKey, onClick, className, }: {
12
- icon: React.ReactNode;
13
- text: string;
14
- hotKey?: string;
15
- onClick: () => void;
16
- className?: string;
17
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,30 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React, { createContext, useContext, useEffect } from 'react';
4
- import { createPortal } from 'react-dom';
5
- const MenuContext = createContext({});
6
- export default function Menu({ ref, children, anchor, onClose }) {
7
- return createPortal(_jsx("div", { ref: ref, style: { top: anchor.top, right: anchor.right }, className: 'fixed bg-login-500 border border-login-600 rounded-lg shadow-lg z-9999 w-44', children: _jsx(MenuContext.Provider, { value: { onClose }, children: children }) }), document.body);
8
- }
9
- export function MenuButton({ icon, text, hotKey, onClick, className, }) {
10
- const { onClose } = useContext(MenuContext);
11
- useEffect(() => {
12
- if (!hotKey)
13
- return;
14
- function handleKeyDown(e) {
15
- if (e.key.toLowerCase() === hotKey.toLowerCase()) {
16
- e.preventDefault();
17
- onClick();
18
- onClose?.();
19
- }
20
- }
21
- window.addEventListener('keydown', handleKeyDown);
22
- return () => window.removeEventListener('keydown', handleKeyDown);
23
- }, [hotKey, onClick, onClose]);
24
- return (_jsxs("button", { onClick: () => {
25
- onClick();
26
- onClose?.();
27
- }, className: `flex items-center justify-between w-full px-3 py-2 text-sm hover:bg-login-600 cursor-pointer
28
- ${className || ''}
29
- `, children: [_jsxs("div", { className: 'flex items-center', children: [React.cloneElement(icon, { className: 'w-4 h-4 mr-2' }), text] }), _jsx("span", { className: 'text-xs opacity-50 font-mono', children: hotKey })] }));
30
- }
@@ -1,6 +0,0 @@
1
- type PaginationProps = {
2
- pageSize?: number;
3
- totalRows?: number;
4
- };
5
- export default function Pagination({ pageSize, totalRows, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,86 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ChevronLeft, ChevronRight } from 'lucide-react';
4
- import { usePathname, useRouter, useSearchParams } from 'next/navigation';
5
- import { useEffect, useState } from 'react';
6
- export default function Pagination({ pageSize = 10, totalRows, }) {
7
- const router = useRouter();
8
- const pathname = usePathname();
9
- const searchParams = useSearchParams();
10
- const rawPage = parseInt(searchParams.get('page') || '1', 10);
11
- const initialPage = Math.max(1, Number.isNaN(rawPage) ? 1 : rawPage);
12
- const [current, setCurrent] = useState(initialPage);
13
- useEffect(() => {
14
- const raw = parseInt(searchParams.get('page') || '1', 10);
15
- const p = Math.max(1, Number.isNaN(raw) ? 1 : raw);
16
- const computedTotalPages = Math.max(1, Math.ceil(totalRows !== undefined && pageSize > 0
17
- ? totalRows / pageSize
18
- : 1));
19
- setCurrent(Math.max(1, Math.min(computedTotalPages, p)));
20
- }, [searchParams, totalRows, pageSize]);
21
- function updateQuery(p) {
22
- const params = new URLSearchParams(searchParams.toString());
23
- params.set('page', String(p));
24
- router.push(`${pathname}?${params.toString()}`);
25
- }
26
- function goPrevious() {
27
- if (current <= 1)
28
- return;
29
- const next = current - 1;
30
- setCurrent(next);
31
- updateQuery(next);
32
- }
33
- const totalPages = Math.max(1, Math.ceil(totalRows !== undefined && pageSize > 0
34
- ? totalRows / pageSize
35
- : 1));
36
- function goNext() {
37
- if (current >= totalPages)
38
- return;
39
- const next = current + 1;
40
- setCurrent(next);
41
- updateQuery(next);
42
- }
43
- function setPage(p) {
44
- if (p === current)
45
- return;
46
- setCurrent(p);
47
- updateQuery(p);
48
- }
49
- function getPages(curr, total) {
50
- const delta = 2;
51
- const left = Math.max(1, curr - delta);
52
- const right = Math.min(total, curr + delta);
53
- const pages = [];
54
- if (left > 1) {
55
- pages.push(1);
56
- if (left > 2)
57
- pages.push('...');
58
- }
59
- for (let i = left; i <= right; i++)
60
- pages.push(i);
61
- if (right < total) {
62
- if (right < total - 1)
63
- pages.push('...');
64
- pages.push(total);
65
- }
66
- return pages;
67
- }
68
- const pages = getPages(current, totalPages);
69
- const start = Math.max(1, (current - 1) * pageSize + 1);
70
- const end = Math.min(current * pageSize, totalRows !== undefined ? totalRows : current * pageSize);
71
- return (_jsxs("div", { className: 'flex items-center justify-between w-full pt-4', children: [_jsx("div", { className: 'text-sm /70', children: totalRows !== undefined ? (totalRows === 0 ? (_jsx("span", { children: "Showing 0 results" })) : (_jsxs("span", { children: ["Showing ", start, " to ", end, " of ", totalRows, " results"] }))) : null }), _jsxs("div", { className: 'flex items-center gap-3', children: [_jsx("button", { type: 'button', onClick: goPrevious, disabled: current <= 1, className: `
72
- flex items-center gap-2 p-1 rounded-lg
73
- bg-login-50/5 hover:bg-login-500 disabled:opacity-50
74
- border-[0.10rem] border-login-200 text-sm
75
- `, children: _jsx(ChevronLeft, { className: 'h-5 w-5' }) }), _jsx("nav", { className: 'flex items-center gap-1', "aria-label": 'Pagination', children: pages.map((p, i) => typeof p === 'string' ? (_jsx("span", { className: 'px-3 py-1 text-sm', children: p }, `e-${i}`)) : (_jsx("button", { type: 'button', onClick: () => setPage(p), "aria-current": p === current ? 'page' : undefined, className: `
76
- px-3 py-1 rounded-lg text-sm
77
- border-[0.10rem] ${p === current
78
- ? 'bg-login-50/5 border-login-50'
79
- : `bg-login-50/0 border-login-200
80
- 'hover:bg-login-400`}
81
- `, children: p }, p))) }), _jsx("button", { type: 'button', onClick: goNext, disabled: current >= totalPages, className: `
82
- flex items-center gap-2 p-1 rounded-lg bg-login-50/5
83
- hover:bg-login-500 disabled:opacity-50 select-none
84
- border-[0.10rem] border-login-200 text-sm
85
- `, children: _jsx(ChevronRight, { className: 'h-5 w-5' }) })] })] }));
86
- }
@@ -1,14 +0,0 @@
1
- import type { Column } from 'uibee/components';
2
- type TableProps = {
3
- data: object[];
4
- columns: Column[];
5
- menuItems?: (data: object, id: string) => React.ReactNode;
6
- redirectPath?: string | {
7
- path: string;
8
- key?: string;
9
- };
10
- variant?: 'default' | 'minimal';
11
- idKey?: string;
12
- };
13
- export default function Table({ data, columns, menuItems, redirectPath, variant, idKey }: TableProps): import("react/jsx-runtime").JSX.Element;
14
- export {};