uibee 2.17.5 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) 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 +3244 -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} +904 -779
  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 +9 -10
  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/table/body.tsx +6 -6
  45. package/src/components/table/format.ts +1 -1
  46. package/src/components/table/header.tsx +1 -1
  47. package/src/components/table/pagination.tsx +17 -31
  48. package/src/components/table/table.tsx +2 -2
  49. package/src/components/version/version.tsx +1 -1
  50. package/src/components/vulnerability/constants.ts +6 -6
  51. package/src/components/vulnerability/severityPill.tsx +6 -7
  52. package/src/hooks/index.ts +1 -0
  53. package/src/hooks/useClickOutside.ts +5 -22
  54. package/src/icons/icons.tsx +431 -0
  55. package/src/icons/index.ts +2 -0
  56. package/src/index.ts +0 -1
  57. package/src/types/hooks.d.ts +8 -2
  58. package/src/utils/index.ts +1 -1
  59. package/src/utils/logoConsoleOutput/logoConsoleOutput.ts +31 -0
  60. package/tsconfig.json +3 -2
  61. package/tsdown.config.ts +26 -0
  62. package/Readme.md +0 -29
  63. package/bun.lock +0 -662
  64. package/dist/src/components/alert/alert.d.ts +0 -8
  65. package/dist/src/components/alert/alert.js +0 -15
  66. package/dist/src/components/buttons/button.d.ts +0 -13
  67. package/dist/src/components/buttons/button.js +0 -30
  68. package/dist/src/components/confirm/confirmPopup.d.ts +0 -12
  69. package/dist/src/components/confirm/confirmPopup.js +0 -18
  70. package/dist/src/components/container/highlight.d.ts +0 -4
  71. package/dist/src/components/container/highlight.js +0 -4
  72. package/dist/src/components/container/page.d.ts +0 -8
  73. package/dist/src/components/container/page.js +0 -4
  74. package/dist/src/components/inputs/checkbox.d.ts +0 -17
  75. package/dist/src/components/inputs/checkbox.js +0 -37
  76. package/dist/src/components/inputs/input.d.ts +0 -12
  77. package/dist/src/components/inputs/input.js +0 -124
  78. package/dist/src/components/inputs/radio.d.ts +0 -17
  79. package/dist/src/components/inputs/radio.js +0 -27
  80. package/dist/src/components/inputs/range.d.ts +0 -11
  81. package/dist/src/components/inputs/range.js +0 -22
  82. package/dist/src/components/inputs/searchInput.d.ts +0 -6
  83. package/dist/src/components/inputs/searchInput.js +0 -42
  84. package/dist/src/components/inputs/select.d.ts +0 -23
  85. package/dist/src/components/inputs/select.js +0 -70
  86. package/dist/src/components/inputs/shared/colorPickerPopup.d.ts +0 -8
  87. package/dist/src/components/inputs/shared/colorPickerPopup.js +0 -191
  88. package/dist/src/components/inputs/shared/dateTimePickerPopup.d.ts +0 -9
  89. package/dist/src/components/inputs/shared/dateTimePickerPopup.js +0 -128
  90. package/dist/src/components/inputs/shared/fieldWrapper.d.ts +0 -14
  91. package/dist/src/components/inputs/shared/fieldWrapper.js +0 -8
  92. package/dist/src/components/inputs/shared/index.d.ts +0 -5
  93. package/dist/src/components/inputs/shared/index.js +0 -5
  94. package/dist/src/components/inputs/shared/inputError.d.ts +0 -6
  95. package/dist/src/components/inputs/shared/inputError.js +0 -6
  96. package/dist/src/components/inputs/shared/inputInfo.d.ts +0 -5
  97. package/dist/src/components/inputs/shared/inputInfo.js +0 -5
  98. package/dist/src/components/inputs/shared/inputLabel.d.ts +0 -9
  99. package/dist/src/components/inputs/shared/inputLabel.js +0 -4
  100. package/dist/src/components/inputs/switch.d.ts +0 -11
  101. package/dist/src/components/inputs/switch.js +0 -14
  102. package/dist/src/components/inputs/tagInput.d.ts +0 -15
  103. package/dist/src/components/inputs/tagInput.js +0 -40
  104. package/dist/src/components/inputs/textarea.d.ts +0 -11
  105. package/dist/src/components/inputs/textarea.js +0 -36
  106. package/dist/src/components/inputs/toggle.d.ts +0 -14
  107. package/dist/src/components/inputs/toggle.js +0 -12
  108. package/dist/src/components/login/loginPage.d.ts +0 -2
  109. package/dist/src/components/login/loginPage.js +0 -18
  110. package/dist/src/components/logo/logo.d.ts +0 -5
  111. package/dist/src/components/logo/logo.js +0 -6
  112. package/dist/src/components/logo/logoSmall.d.ts +0 -1
  113. package/dist/src/components/logo/logoSmall.js +0 -6
  114. package/dist/src/components/markdownrender/markdownRender.d.ts +0 -7
  115. package/dist/src/components/markdownrender/markdownRender.js +0 -26
  116. package/dist/src/components/navbar/bubble.d.ts +0 -14
  117. package/dist/src/components/navbar/bubble.js +0 -8
  118. package/dist/src/components/navbar/navbar.d.ts +0 -34
  119. package/dist/src/components/navbar/navbar.js +0 -36
  120. package/dist/src/components/navbar/navbarDropdown.d.ts +0 -7
  121. package/dist/src/components/navbar/navbarDropdown.js +0 -19
  122. package/dist/src/components/navbar/navbarItem.d.ts +0 -11
  123. package/dist/src/components/navbar/navbarItem.js +0 -12
  124. package/dist/src/components/table/body.d.ts +0 -15
  125. package/dist/src/components/table/body.js +0 -116
  126. package/dist/src/components/table/format.d.ts +0 -1
  127. package/dist/src/components/table/format.js +0 -27
  128. package/dist/src/components/table/header.d.ts +0 -8
  129. package/dist/src/components/table/header.js +0 -47
  130. package/dist/src/components/table/menu.d.ts +0 -17
  131. package/dist/src/components/table/menu.js +0 -30
  132. package/dist/src/components/table/pagination.d.ts +0 -6
  133. package/dist/src/components/table/pagination.js +0 -86
  134. package/dist/src/components/table/table.d.ts +0 -14
  135. package/dist/src/components/table/table.js +0 -14
  136. package/dist/src/components/toast/toastItem.d.ts +0 -2
  137. package/dist/src/components/toast/toastItem.js +0 -38
  138. package/dist/src/components/toast/toaster.d.ts +0 -9
  139. package/dist/src/components/toast/toaster.js +0 -86
  140. package/dist/src/components/toggle/language.d.ts +0 -4
  141. package/dist/src/components/toggle/language.js +0 -29
  142. package/dist/src/components/toggle/theme.d.ts +0 -3
  143. package/dist/src/components/toggle/theme.js +0 -30
  144. package/dist/src/components/version/version.d.ts +0 -7
  145. package/dist/src/components/version/version.js +0 -12
  146. package/dist/src/components/vulnerability/constants.d.ts +0 -4
  147. package/dist/src/components/vulnerability/constants.js +0 -14
  148. package/dist/src/components/vulnerability/severityPill.d.ts +0 -8
  149. package/dist/src/components/vulnerability/severityPill.js +0 -8
  150. package/dist/src/hooks/useClickOutside.d.ts +0 -2
  151. package/dist/src/hooks/useClickOutside.js +0 -27
  152. package/dist/src/hooks/useDarkMode.d.ts +0 -1
  153. package/dist/src/hooks/useDarkMode.js +0 -17
  154. package/dist/src/hooks/useVisibility.d.ts +0 -4
  155. package/dist/src/hooks/useVisibility.js +0 -23
  156. package/dist/src/index.d.ts +0 -5
  157. package/dist/src/index.js +0 -5
  158. package/dist/src/scripts/buildCss.d.ts +0 -1
  159. package/dist/src/scripts/buildCss.js +0 -22
  160. package/dist/src/scripts/index.d.ts +0 -1
  161. package/dist/src/scripts/index.js +0 -1
  162. package/dist/src/scripts/rewriteAlias.d.ts +0 -1
  163. package/dist/src/scripts/rewriteAlias.js +0 -31
  164. package/dist/src/utils/LogoConsoleOutput/LogoConsoleOutput.d.ts +0 -1
  165. package/dist/src/utils/LogoConsoleOutput/LogoConsoleOutput.js +0 -44
  166. package/dist/src/utils/auth/callback.d.ts +0 -2
  167. package/dist/src/utils/auth/callback.js +0 -63
  168. package/dist/src/utils/auth/getDomain.d.ts +0 -2
  169. package/dist/src/utils/auth/getDomain.js +0 -6
  170. package/dist/src/utils/auth/login.d.ts +0 -3
  171. package/dist/src/utils/auth/login.js +0 -14
  172. package/dist/src/utils/auth/logout.d.ts +0 -3
  173. package/dist/src/utils/auth/logout.js +0 -18
  174. package/dist/src/utils/auth/token.d.ts +0 -3
  175. package/dist/src/utils/auth/token.js +0 -33
  176. package/dist/tailwind.config.d.ts +0 -3
  177. package/dist/tailwind.config.js +0 -7
  178. package/src/scripts/buildCss.ts +0 -25
  179. package/src/scripts/index.ts +0 -1
  180. package/src/scripts/rewriteAlias.ts +0 -39
  181. package/src/utils/LogoConsoleOutput/LogoConsoleOutput.ts +0 -61
@@ -137,7 +137,7 @@ export default function DateTimePickerPopup({
137
137
  onClick={() => handleDateSelect(i)}
138
138
  className={`
139
139
  w-8 h-8 flex items-center justify-center rounded-full text-sm
140
- hover:bg-login-500 transition-colors
140
+ hover:bg-login-600 transition-colors
141
141
  ${isSelected ? 'bg-login! text-white! hover:bg-login!' : ''}
142
142
  ${!isSelected && isToday ? 'text-login! font-bold' : ''}
143
143
  ${!isSelected && !isToday ? 'text-login-text!' : ''}
@@ -154,7 +154,7 @@ export default function DateTimePickerPopup({
154
154
  <button
155
155
  type='button'
156
156
  onClick={() => setCurrentDate(new Date(year, month - 1))}
157
- className='p-1 hover:bg-login-500 rounded-full text-login-text'
157
+ className='p-1 hover:bg-login-600 rounded-full text-login-text transition-colors'
158
158
  >
159
159
  <ChevronLeft className='w-4 h-4' />
160
160
  </button>
@@ -164,7 +164,7 @@ export default function DateTimePickerPopup({
164
164
  <button
165
165
  type='button'
166
166
  onClick={() => setCurrentDate(new Date(year, month + 1))}
167
- className='p-1 hover:bg-login-500 rounded-full text-login-text'
167
+ className='p-1 hover:bg-login-600 rounded-full text-login-text transition-colors'
168
168
  >
169
169
  <ChevronRight className='w-4 h-4' />
170
170
  </button>
@@ -185,7 +185,7 @@ export default function DateTimePickerPopup({
185
185
 
186
186
  function renderTimePicker() {
187
187
  return (
188
- <div className='p-2 border-t border-login-500 flex justify-center gap-2'>
188
+ <div className='p-2 border-t border-login-500/25 flex justify-center gap-2'>
189
189
  <div className='flex flex-col items-center'>
190
190
  <label className='text-xs text-login-200 mb-1'>Hour</label>
191
191
  <input
@@ -195,8 +195,8 @@ export default function DateTimePickerPopup({
195
195
  onChange={(e) => onTimeInputChange('hours', e.target.value)}
196
196
  onBlur={() => onTimeInputBlur('hours')}
197
197
  className={`
198
- w-16 p-1 bg-login-500 rounded text-center text-login-text
199
- border border-login-500 focus:border-login outline-none
198
+ w-16 p-1 bg-login-600 rounded text-center text-login-text text-sm
199
+ border border-login-500/50 focus:border-login/60 focus:ring-1 focus:ring-login/30 outline-none
200
200
  `}
201
201
  />
202
202
  </div>
@@ -210,8 +210,8 @@ export default function DateTimePickerPopup({
210
210
  onChange={(e) => onTimeInputChange('minutes', e.target.value)}
211
211
  onBlur={() => onTimeInputBlur('minutes')}
212
212
  className={`
213
- w-16 p-1 bg-login-500 rounded text-center text-login-text
214
- border border-login-500 focus:border-login outline-none
213
+ w-16 p-1 bg-login-600 rounded text-center text-login-text text-sm
214
+ border border-login-500/50 focus:border-login/60 focus:ring-1 focus:ring-login/30 outline-none
215
215
  `}
216
216
  />
217
217
  </div>
@@ -221,7 +221,7 @@ export default function DateTimePickerPopup({
221
221
 
222
222
  return (
223
223
  <div
224
- className='fixed z-50 bg-login-600 border border-login-500 rounded-md shadow-lg p-1 min-w-70 anchor-popup'
224
+ className='fixed z-50 bg-login-700 border border-login-500/50 rounded-md shadow-xl p-1 min-w-70 anchor-popup'
225
225
  style={{
226
226
  positionAnchor: anchorName,
227
227
  positionArea: 'bottom span-right',
@@ -10,7 +10,7 @@ export default function InputError({ error, id }: InputErrorProps) {
10
10
  <div className='h-4'>
11
11
  <span
12
12
  id={id}
13
- className='text-xs text-red-500 ml-1 truncate block'
13
+ className='text-xs text-red-400 ml-1 truncate block'
14
14
  role='alert'
15
15
  title={error}
16
16
  >
@@ -25,23 +25,22 @@ export default function Switch(props: SwitchProps) {
25
25
  textSize={textSize}
26
26
  className={className}
27
27
  >
28
- <label className={`relative inline-flex items-center cursor-pointer ${switchOnly ? 'h-fit' : 'h-10.5'}`}>
28
+ <label className={`group/sw inline-flex items-center cursor-pointer ${switchOnly ? 'h-fit' : 'h-10'}`}>
29
29
  <input
30
30
  {...inputProps}
31
31
  type='checkbox'
32
32
  id={name}
33
33
  name={name}
34
- className='sr-only peer'
34
+ className='sr-only'
35
35
  />
36
36
  <div className={`
37
- w-11 h-6 bg-login-500/50 rounded-full peer
38
- peer-checked:after:translate-x-full peer-checked:after:border-white
39
- after:content-[''] after:absolute ${switchOnly ? 'after:top-0.5' : 'after:top-2.75'} after:left-0.5
40
- after:bg-white after:border-gray-300 after:border after:rounded-full
41
- after:h-5 after:w-5 after:transition-all peer-checked:bg-login
42
- ${inputProps.disabled ? 'opacity-50 cursor-not-allowed' : ''}
43
- ${error ? 'ring-1 ring-red-500' : ''}
44
- `} />
37
+ relative flex items-center w-11 h-6 rounded-full transition-colors
38
+ bg-login-600 group-has-[input:checked]/sw:bg-login
39
+ ${inputProps.disabled ? 'opacity-40 cursor-not-allowed' : ''}
40
+ ${error ? 'ring-1 ring-red-500/60' : ''}
41
+ `}>
42
+ <span className='absolute inset-y-0 my-auto left-0.5 h-5 w-5 rounded-full bg-white shadow-sm transition-all group-has-[input:checked]/sw:translate-x-full' />
43
+ </div>
45
44
  </label>
46
45
  </FieldWrapper>
47
46
  )
@@ -69,18 +69,17 @@ export default function TagInput({
69
69
  >
70
70
  <div
71
71
  className={`
72
- flex flex-wrap gap-2 p-2 rounded-md bg-login-500/50 border border-login-500
73
- text-login-text min-h-10.5
74
- focus-within:border-login focus-within:ring-1 focus-within:ring-login
75
- disabled:opacity-50 disabled:cursor-not-allowed
76
- transition-all duration-200
77
- ${error ? 'border-red-500 focus-within:border-red-500 focus-within:ring-red-500' : ''}
72
+ flex flex-wrap gap-2 p-2 rounded-md bg-login-500/50 border border-login-500
73
+ text-login-text min-h-10
74
+ focus-within:border-login/60 focus-within:ring-1 focus-within:ring-login/30
75
+ transition-all duration-150
76
+ ${error ? 'border-red-500/70 focus-within:border-red-500/70 focus-within:ring-red-500/30' : ''}
78
77
  `}
79
78
  >
80
79
  {value.map((tag, index) => (
81
80
  <span
82
81
  key={index}
83
- className='flex items-center gap-1 px-2 py-1 bg-login rounded text-sm text-white'
82
+ className='flex items-center gap-1 px-2 py-0.5 bg-login-600 text-login-100 border border-login-500 rounded text-sm'
84
83
  >
85
84
  {tag}
86
85
  {!disabled && (
@@ -31,8 +31,6 @@ export default function Textarea(props: TextareaProps) {
31
31
  const jsonError = type === 'json' && value ? isValidJson(value as string) : undefined
32
32
  const displayError = jsonError || error
33
33
 
34
- console.log(value)
35
-
36
34
  return (
37
35
  <FieldWrapper
38
36
  label={label}
@@ -61,8 +59,8 @@ export default function Textarea(props: TextareaProps) {
61
59
  {type === 'markdown' && preview && (
62
60
  <div
63
61
  className={`
64
- w-full rounded-md bg-login-500/50 border border-login-500
65
- p-3 overflow-y-auto ${error ? 'border-red-500' : ''}
62
+ w-full rounded-md bg-login-500/50 border border-login-500
63
+ p-3 overflow-y-auto ${error ? 'border-red-500/70' : ''}
66
64
  `}
67
65
  >
68
66
  <MarkdownRender MDstr={String(value || '')} />
@@ -79,14 +77,14 @@ export default function Textarea(props: TextareaProps) {
79
77
  aria-describedby={error ? `${name}-error` : undefined}
80
78
  className={`
81
79
  ${type === 'markdown' && preview ? 'hidden' : ''}
82
- w-full rounded-md bg-login-500/50 border border-login-500
83
- text-login-text placeholder-login-200
84
- focus:outline-none focus:border-login focus:ring-1 focus:ring-login
85
- disabled:opacity-50 disabled:cursor-not-allowed
80
+ w-full rounded-md bg-login-500/50 border border-login-500
81
+ text-login-text placeholder-login-200 text-sm
82
+ focus:outline-none focus:border-login/60 focus:ring-1 focus:ring-login/30
83
+ disabled:opacity-40 disabled:cursor-not-allowed
86
84
  p-3 pr-10
87
- transition-all duration-200
85
+ transition-all duration-150
88
86
  resize-y
89
- ${error ? 'border-red-500 focus:border-red-500 focus:ring-red-500' : ''}
87
+ ${error ? 'border-red-500/70 focus:border-red-500/70 focus:ring-red-500/30' : ''}
90
88
  `}
91
89
  />
92
90
  </div>
@@ -18,9 +18,9 @@ export default function Toggle<T>({
18
18
  left,
19
19
  right,
20
20
  }: ToggleProps<T>) {
21
- const active = 'bg-login-200 text-login-950 shadow'
22
- const idle = 'text-login-200 hover:bg-login-50/10 hover:text-login-50'
23
- const base = 'flex items-center justify-center rounded-lg transition gap-1'
21
+ const active = 'bg-login text-white shadow-sm'
22
+ const idle = 'text-login-200 hover:text-login-50 hover:bg-login-500/50'
23
+ const base = 'flex items-center justify-center rounded-md px-3 h-7 transition-all duration-150 gap-1.5 text-sm'
24
24
 
25
25
  function renderContent(opt: ToggleOption<T>) {
26
26
  return (
@@ -35,13 +35,13 @@ export default function Toggle<T>({
35
35
  const isRightActive = value === right.value
36
36
 
37
37
  return (
38
- <div className='flex items-center border rounded-lg border-login-100/10 bg-login-50/5 p-1'>
38
+ <div className='flex items-center w-fit bg-login-500/50 border border-login-500 rounded-lg p-1 gap-0.5'>
39
39
  <button
40
40
  type='button'
41
41
  onClick={() => onChange(left.value)}
42
42
  aria-label={left.label ?? left.text}
43
43
  aria-pressed={isLeftActive}
44
- className={`${base} px-2 h-7 ${isLeftActive ? active : idle}`}
44
+ className={`${base} ${isLeftActive ? active : idle}`}
45
45
  >
46
46
  {renderContent(left)}
47
47
  </button>
@@ -51,7 +51,7 @@ export default function Toggle<T>({
51
51
  onClick={() => onChange(right.value)}
52
52
  aria-label={right.label ?? right.text}
53
53
  aria-pressed={isRightActive}
54
- className={`${base} px-2 h-7 ${isRightActive ? active : idle}`}
54
+ className={`${base} ${isRightActive ? active : idle}`}
55
55
  >
56
56
  {renderContent(right)}
57
57
  </button>
@@ -38,8 +38,8 @@ export default function Body({ list, columns, menuItems, redirectPath, variant =
38
38
  <tbody
39
39
  ref={tbodyRef}
40
40
  className={`
41
- divide-login-600 block overflow-y-auto flex-1 min-h-0
42
- ${variant === 'default' ? 'bg-login-500/50 divide-y' : 'bg-transparent divide-y'}
41
+ block overflow-y-auto flex-1 min-h-0 divide-y
42
+ ${variant === 'default' ? 'bg-login-800 divide-login-600/25' : 'bg-transparent divide-login-600/20'}
43
43
  `}
44
44
  >
45
45
  {list.map((item, index) => {
@@ -76,8 +76,8 @@ export default function Body({ list, columns, menuItems, redirectPath, variant =
76
76
  className={`
77
77
  flex w-full group/row transition-colors
78
78
  ${redirectConfig.path ? 'cursor-pointer' : ''}
79
- ${variant === 'default' && redirectConfig.path ? 'hover:bg-login-600/30' : ''}
80
- ${variant === 'minimal' ? 'hover:bg-white/5 border-b border-login-600/50 last:border-0' : ''}
79
+ ${variant === 'default' && redirectConfig.path ? 'hover:bg-login-600/80' : ''}
80
+ ${variant === 'minimal' ? 'hover:bg-login-600/70 border-b border-login-600/20 last:border-0' : ''}
81
81
  `}
82
82
  onMouseDown={() => {
83
83
  menuWasOpenOnMouseDown.current = openMenuId !== null
@@ -135,9 +135,9 @@ export default function Body({ list, columns, menuItems, redirectPath, variant =
135
135
  `}
136
136
  >
137
137
  <div className='relative w-full min-w-0'>
138
- <h1 className={`block max-w-full truncate ${badgeClass}`}>
138
+ <span className={`block max-w-full truncate ${badgeClass}`}>
139
139
  {formatValue(col.key, value as string | number)}
140
- </h1>
140
+ </span>
141
141
  </div>
142
142
  </td>
143
143
  )
@@ -4,7 +4,7 @@ const ISODateTimeReg = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/
4
4
  const ISODateReg = /^\d{4}-\d{2}-\d{2}$/
5
5
  const ISOTimeReg = /^\d{2}:\d{2}(:\d{2})?$/
6
6
 
7
- const OsloTZ = { timeZone: 'Europe/Oslo', second: undefined } as const
7
+ const OsloTZ = { timeZone: 'Europe/Oslo' } as const
8
8
  const OsloTime: Intl.DateTimeFormatOptions = { ...OsloTZ, hour: '2-digit', minute: '2-digit' }
9
9
  const OsloDateTime: Intl.DateTimeFormatOptions = { ...OsloTime, year: 'numeric', month: '2-digit', day: '2-digit' }
10
10
 
@@ -47,7 +47,7 @@ export default function Header({ columns, hideMenu, variant = 'default' }: Heade
47
47
  block w-full
48
48
  ${variant === 'default' ? 'bg-login-700' : 'bg-transparent border-b border-login-600'}
49
49
  `}>
50
- <tr className='flex w-full divide-x divide-transparent'>
50
+ <tr className='flex w-full'>
51
51
  {columns.map((col) => {
52
52
  const key = col.key
53
53
  const value = col.label || (
@@ -21,19 +21,16 @@ export default function Pagination({
21
21
  const initialPage = Math.max(1, Number.isNaN(rawPage) ? 1 : rawPage)
22
22
  const [current, setCurrent] = useState<number>(initialPage)
23
23
 
24
+ const totalPages = Math.max(
25
+ 1,
26
+ Math.ceil(totalRows !== undefined && pageSize > 0 ? totalRows / pageSize : 1)
27
+ )
28
+
24
29
  useEffect(() => {
25
30
  const raw = parseInt(searchParams.get('page') || '1', 10)
26
31
  const p = Math.max(1, Number.isNaN(raw) ? 1 : raw)
27
- const computedTotalPages = Math.max(
28
- 1,
29
- Math.ceil(
30
- totalRows !== undefined && pageSize > 0
31
- ? totalRows / pageSize
32
- : 1
33
- )
34
- )
35
- setCurrent(Math.max(1, Math.min(computedTotalPages, p)))
36
- }, [searchParams, totalRows, pageSize])
32
+ setCurrent(Math.max(1, Math.min(totalPages, p)))
33
+ }, [searchParams, totalPages])
37
34
 
38
35
  function updateQuery(p: number) {
39
36
  const params = new URLSearchParams(searchParams.toString())
@@ -48,15 +45,6 @@ export default function Pagination({
48
45
  updateQuery(next)
49
46
  }
50
47
 
51
- const totalPages = Math.max(
52
- 1,
53
- Math.ceil(
54
- totalRows !== undefined && pageSize > 0
55
- ? totalRows / pageSize
56
- : 1
57
- )
58
- )
59
-
60
48
  function goNext() {
61
49
  if (current >= totalPages) return
62
50
  const next = current + 1
@@ -121,8 +109,8 @@ export default function Pagination({
121
109
  disabled={current <= 1}
122
110
  className={`
123
111
  flex items-center gap-2 p-1 rounded-lg
124
- bg-login-50/5 hover:bg-login-500 disabled:opacity-50
125
- border-[0.10rem] border-login-200 text-sm
112
+ bg-login-700 hover:bg-login-600 disabled:opacity-40
113
+ border border-login-500/50 text-sm transition-colors duration-150
126
114
  `}
127
115
  >
128
116
  <ChevronLeft className='h-5 w-5' />
@@ -146,13 +134,11 @@ export default function Pagination({
146
134
  p === current ? 'page' : undefined
147
135
  }
148
136
  className={`
149
- px-3 py-1 rounded-lg text-sm
150
- border-[0.10rem] ${
151
- p === current
152
- ? 'bg-login-50/5 border-login-50'
153
- : `bg-login-50/0 border-login-200
154
- 'hover:bg-login-400`
155
- }
137
+ px-3 py-1 rounded-lg text-sm border transition-colors duration-150
138
+ ${p === current
139
+ ? 'bg-login text-white border-login'
140
+ : 'bg-login-700 border-login-500/50 hover:bg-login-600'
141
+ }
156
142
  `}
157
143
  >
158
144
  {p}
@@ -166,9 +152,9 @@ export default function Pagination({
166
152
  onClick={goNext}
167
153
  disabled={current >= totalPages}
168
154
  className={`
169
- flex items-center gap-2 p-1 rounded-lg bg-login-50/5
170
- hover:bg-login-500 disabled:opacity-50 select-none
171
- border-[0.10rem] border-login-200 text-sm
155
+ flex items-center gap-2 p-1 rounded-lg select-none
156
+ bg-login-700 hover:bg-login-600 disabled:opacity-40
157
+ border border-login-500/50 text-sm transition-colors duration-150
172
158
  `}
173
159
  >
174
160
  <ChevronRight className='h-5 w-5' />
@@ -21,10 +21,10 @@ export default function Table({ data, columns, menuItems, redirectPath, variant
21
21
  return (
22
22
  <div className={`
23
23
  flex-1 flex flex-col min-h-0 overflow-x-auto overflow-y-hidden h-full w-full
24
- ${variant === 'default' ? 'bg-login-500/50 rounded-lg shadow border border-login-600' : ''}
24
+ ${variant === 'default' ? 'bg-login-800 rounded-lg border border-login-600/30' : ''}
25
25
  ${variant === 'minimal' ? 'bg-transparent' : ''}
26
26
  `}>
27
- <table className='min-w-full w-max divide-y divide-login-600 flex flex-col flex-1 min-h-0'>
27
+ <table className='min-w-full w-max divide-y divide-login-600/30 flex flex-col flex-1 min-h-0'>
28
28
  <Header
29
29
  columns={columns}
30
30
  hideMenu={!menuItems}
@@ -12,7 +12,7 @@ export default function VersionTag({version, url, className}: VersionTagProps) {
12
12
  }
13
13
 
14
14
  const style =
15
- `w-fit bg-login-600 px-2 py-1 rounded-md text-white tracking-[0.05em] font-semibold text-lg ${className}`
15
+ `w-fit bg-login-700 text-login-100 border border-login-500/40 text-xs font-mono px-2 py-0.5 rounded ${className || ''}`
16
16
 
17
17
  if (url) {
18
18
  return (
@@ -1,4 +1,4 @@
1
- type SeverityLevel = 'critical' | 'high' | 'medium' | 'low' | 'unknown'
1
+ export type SeverityLevel = 'critical' | 'high' | 'medium' | 'low' | 'unknown'
2
2
 
3
3
  export const severityLabel: Record<SeverityLevel, string> = {
4
4
  critical: 'Critical',
@@ -9,9 +9,9 @@ export const severityLabel: Record<SeverityLevel, string> = {
9
9
  }
10
10
 
11
11
  export const severityClasses: Record<SeverityLevel, string> = {
12
- critical: 'border-red-400/25 bg-red-500/10 text-red-200',
13
- high: 'border-orange-400/25 bg-orange-500/10 text-orange-200',
14
- medium: 'border-amber-400/25 bg-amber-500/10 text-amber-200',
15
- low: 'border-sky-400/25 bg-sky-500/10 text-sky-200',
16
- unknown: 'border-login-100/10 bg-login-50/5 text-login-200',
12
+ critical: 'border-l-red-500',
13
+ high: 'border-l-orange-500',
14
+ medium: 'border-l-amber-500',
15
+ low: 'border-l-green-500',
16
+ unknown: 'border-l-login-400',
17
17
  }
@@ -1,6 +1,5 @@
1
- import { severityClasses, severityLabel } from './constants'
2
-
3
- type SeverityLevel = 'critical' | 'high' | 'medium' | 'low' | 'unknown'
1
+ import LeftBarPanel from '@components/container/leftBarPanel'
2
+ import { severityClasses, severityLabel, type SeverityLevel } from './constants'
4
3
 
5
4
  type SeverityPillProps = {
6
5
  severity: SeverityLevel
@@ -14,9 +13,9 @@ export default function SeverityPill({ severity, count, compact = false }: Sever
14
13
  }
15
14
 
16
15
  return (
17
- <div className={`rounded-xl border ${compact ? 'px-3 py-2' : 'p-3'} ${severityClasses[severity]}`}>
18
- <div className='text-[11px] font-medium uppercase tracking-[0.18em]'>{severityLabel[severity]}</div>
19
- <div className={`${compact ? 'mt-1 text-sm' : 'mt-2 text-lg'} font-semibold`}>{count}</div>
20
- </div>
16
+ <LeftBarPanel color={severityClasses[severity]} className={`flex items-center gap-2.5 ${compact ? 'px-2.5 py-1.5' : 'px-3 py-2'}`}>
17
+ <span className={`${compact ? 'text-sm' : 'text-base'} font-bold text-login-50`}>{count}</span>
18
+ <span className='text-[10px] font-semibold uppercase tracking-[0.15em] text-login-300'>{severityLabel[severity]}</span>
19
+ </LeftBarPanel>
21
20
  )
22
21
  }
@@ -1,3 +1,4 @@
1
+ 'use client'
1
2
  export { default as useVisibility } from './useVisibility'
2
3
  export { default as useDarkMode } from './useDarkMode'
3
4
  export { default as useClickOutside } from './useClickOutside'
@@ -1,33 +1,16 @@
1
- import { useEffect, useRef, RefObject } from 'react'
1
+ import { useEffect, type RefObject } from 'react'
2
2
 
3
3
  export default function useClickOutside<T extends HTMLElement>(
4
- refOrCallback: RefObject<T | null> | (() => void),
5
- maybeCallback?: () => void
4
+ ref: RefObject<T | null>,
5
+ callback: () => void
6
6
  ) {
7
- let ref: RefObject<T | null>
8
- let callback: () => void
9
-
10
- if (typeof refOrCallback === 'function') {
11
- ref = useRef<T>(null)
12
- callback = refOrCallback
13
- } else {
14
- ref = refOrCallback
15
- callback = maybeCallback as () => void
16
- }
17
-
18
7
  useEffect(() => {
19
8
  function handleClickOutside(event: MouseEvent) {
20
- if (ref && ref.current && !ref.current.contains(event.target as Node)) {
9
+ if (ref.current && !ref.current.contains(event.target as Node)) {
21
10
  callback()
22
11
  }
23
12
  }
24
-
25
13
  document.addEventListener('mousedown', handleClickOutside)
26
- return () => {
27
- document.removeEventListener('mousedown', handleClickOutside)
28
- }
14
+ return () => document.removeEventListener('mousedown', handleClickOutside)
29
15
  }, [ref, callback])
30
-
31
- if (typeof refOrCallback === 'function') return ref
32
- return undefined
33
16
  }