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,18 +0,0 @@
1
- import { NextResponse } from 'next/server';
2
- import { getDomain } from './getDomain';
3
- export default async function AuthLogout({ req, path }) {
4
- const domain = getDomain(req);
5
- const response = NextResponse.redirect(new URL(path || '/', domain));
6
- const cookiesToRemove = [
7
- 'access_token',
8
- 'user_id',
9
- 'user_name',
10
- 'user_nickname',
11
- 'user_email',
12
- 'user_groups'
13
- ];
14
- cookiesToRemove.forEach(cookieName => {
15
- response.cookies.delete(cookieName);
16
- });
17
- return response;
18
- }
@@ -1,3 +0,0 @@
1
- import { NextResponse } from 'next/server';
2
- import type { AuthTokenProps } from 'uibee/utils';
3
- export default function AuthToken({ req, redirectPath }: AuthTokenProps): Promise<NextResponse<unknown>>;
@@ -1,33 +0,0 @@
1
- import { NextResponse } from 'next/server';
2
- import { getDomain } from './getDomain';
3
- export default async function AuthToken({ req, redirectPath }) {
4
- const domain = getDomain(req);
5
- const url = new URL(req.url);
6
- const token = url.searchParams.get('access_token');
7
- const btg = url.searchParams.get('btg');
8
- const redirectCookie = req.cookies.get('redirect_after_login');
9
- const redirect = redirectCookie ? redirectCookie.value : redirectPath || '/';
10
- if (!token) {
11
- return NextResponse.json({ error: 'No access token provided' }, { status: 400 });
12
- }
13
- if (btg) {
14
- return NextResponse.redirect(new URL(redirect, domain));
15
- }
16
- const accessToken = url.searchParams.get('access_token');
17
- const userID = url.searchParams.get('id');
18
- const username = url.searchParams.get('name');
19
- const userNickname = url.searchParams.get('username');
20
- const userEmail = url.searchParams.get('email');
21
- const userGroups = url.searchParams.get('groups');
22
- const response = NextResponse.redirect(new URL(redirect, domain));
23
- response.cookies.set('access_token', accessToken);
24
- response.cookies.set('user_id', userID);
25
- response.cookies.set('user_name', username);
26
- response.cookies.set('user_nickname', userNickname);
27
- response.cookies.set('user_email', userEmail);
28
- response.cookies.set('user_groups', userGroups);
29
- if (redirectCookie) {
30
- response.cookies.delete('redirect_after_login');
31
- }
32
- return response;
33
- }
@@ -1,3 +0,0 @@
1
- import type { Config } from 'tailwindcss';
2
- declare const tailwindConfig: Config;
3
- export default tailwindConfig;
@@ -1,7 +0,0 @@
1
- import typography from '@tailwindcss/typography';
2
- const tailwindConfig = {
3
- content: ['./app/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
4
- theme: { extend: {} },
5
- plugins: [typography],
6
- };
7
- export default tailwindConfig;
@@ -1,25 +0,0 @@
1
- import { mkdirSync, readFileSync, writeFileSync } from 'fs'
2
- import * as path from 'path'
3
- import postcss from 'postcss'
4
-
5
- export default async function buildCss() {
6
- const tailwindModule = await import(new URL('../../tailwind.config.ts', import.meta.url).href)
7
- const tailwindConfig = tailwindModule.default ?? tailwindModule
8
- const tailwindPostcss = (await import('@tailwindcss/postcss')).default
9
- const inputPath = path.resolve('./src/globals.css')
10
- const outputPath = path.resolve('./dist/src/globals.css')
11
- const inputCss = readFileSync(inputPath, 'utf-8')
12
- const result = await postcss([tailwindPostcss(tailwindConfig)]).process(inputCss, {
13
- from: inputPath,
14
- to: outputPath,
15
- })
16
-
17
- mkdirSync(path.dirname(outputPath), { recursive: true })
18
- writeFileSync(outputPath, result.css)
19
- console.log('🐝 CSS generated successfully')
20
- }
21
-
22
- buildCss().catch(err => {
23
- console.error(err)
24
- process.exit(1)
25
- })
@@ -1 +0,0 @@
1
- export { default as buildCss } from './buildCss'
@@ -1,39 +0,0 @@
1
- import fs from 'fs'
2
- import path from 'path'
3
- import { globSync } from 'glob'
4
-
5
- const DIST_DIR = path.resolve('dist')
6
- const SRC_DIR = path.join(DIST_DIR, 'src')
7
-
8
- const jsFiles = globSync(`${DIST_DIR}/**/*.js`, { nodir: true })
9
-
10
- jsFiles.forEach((file) => {
11
- let content = fs.readFileSync(file, 'utf-8')
12
- const fileDir = path.dirname(file)
13
-
14
- // Handle @utils/* imports
15
- content = content.replace(/from ['"]@utils\/(.*?)['"]/g, (_, p1) => {
16
- const targetPath = path.join(SRC_DIR, 'utils', p1)
17
- const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/')
18
- return `from '${relative}'`
19
- })
20
-
21
- // Handle @components/* imports
22
- content = content.replace(/from ['"]@components\/(.*?)['"]/g, (_, p1) => {
23
- const targetPath = path.join(SRC_DIR, 'components', p1)
24
- const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/')
25
- return `from '${relative}'`
26
- })
27
-
28
- // Handle @hooks/* imports
29
- content = content.replace(/from ['"]@hooks\/(.*?)['"]/g, (_, p1) => {
30
- const targetPath = path.join(SRC_DIR, 'hooks', p1)
31
- const relative = path.relative(fileDir, targetPath).replace(/\\/g, '/')
32
- return `from '${relative}'`
33
- })
34
-
35
- fs.writeFileSync(file, content, 'utf-8')
36
- })
37
-
38
- console.log('🐝 All path aliases rewritten')
39
- console.log('🐝 Build complete')
@@ -1,61 +0,0 @@
1
- export function LogoConsoleOutput() {
2
-
3
- const chromeStr =
4
- '%c███████╗ ███████╗\n' +
5
- '██╔════╝ ╚════██║\n' +
6
- '██║%c ██╗ ██████╗ ██████╗ ██╗███╗ ██╗ %c██║\n' +
7
- '╚═╝%c ██║ ██╔═══██╗██╔════╝ ██║████╗ ██║ %c╚═╝%c\n' +
8
- ' ██║ ██║ ██║██║ ███╗██║██╔██╗ ██║\n' +
9
- ' ██║ ██║ ██║██║ ██║██║██║╚██╗██║\n' +
10
- '%c██╗%c ██████╗╚██████╔╝╚██████╔╝██║██║ ╚████║ %c██╗\n' +
11
- '██║%c ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝╚═╝ ╚═══╝ %c██║\n' +
12
- '███████╗%c %c███████║\n' +
13
- '╚══════╝ ╚══════╝%c\n\n' +
14
- ' - Laget av TekKom med 🍕 og ❤️'
15
-
16
- const safariStr =
17
- '\n' +
18
- '%c███████╗\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ███████╗\n' +
19
- '██╔═════╝\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t╚════██║\n' +
20
- '██║%c ██╗\t\t\t\t ██████╗\t \t ╔██████╗\t ██╗ \t ███╗ \t\t ██╗%c\t ██║\n' +
21
- ' ╚═╝%c \t██║\t\t\t ██╔════██╗\t ██╔════╝\t ██║ \t ████╗\t ██║%c\t ╚═╝%c\n' +
22
- ' \t\t██║\t\t\t ██║\t\t\t ██║\t ██║\t ███╗ ██║\t\t ██╔██╗ ██║\n' +
23
- ' \t\t██║\t\t\t ██║\t\t\t ██║\t ██║\t\t ██║ ██║\t\t ██║╚██╗ ██║\n' +
24
- '%c██╗%c ██████╗\t╚██████╝\t\t ╚██████╝\t ██║ ██║\t\t ╚███║ \t %c██╗\n' +
25
- '██║%c\t ╚═════╝\t\t ╚════╝\t\t\t\t╚═════╝\t\t ╚═╝\t\t ╚═╝\t\t ╚═══╝\t\t %c██║\n' +
26
- '███████╗%c\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t %c███████║\n' +
27
- ' ╚══════╝\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t╚══════╝%c\n\n' +
28
- '\t\t\t\t\t\t\t\t\t\t\t\t\t- Laget av TekKom med 🍕 og ❤️'
29
-
30
- let str = ''
31
-
32
- if(navigator.userAgent.indexOf('Chrome') != -1) {
33
- str = chromeStr
34
- } else if (navigator.userAgent.indexOf('Firefox') != -1) {
35
- str = chromeStr
36
- } else if (navigator.userAgent.indexOf('Safari') != -1) {
37
- str = safariStr
38
- } else {
39
- return (console.log('Login - Linjeforeningen for IT'))
40
- }
41
-
42
- // each string is the CSS to apply for each consecutive %c
43
- console.log(str,
44
- // applies orange color
45
- 'color: #fd8738',
46
- // clears the style for every non orange part
47
- '',
48
- 'color: #fd8738',
49
- '',
50
- 'color: #fd8738',
51
- '',
52
- 'color: #fd8738',
53
- '',
54
- 'color: #fd8738',
55
- '',
56
- 'color: #fd8738',
57
- '',
58
- 'color: #fd8738',
59
- ''
60
- )
61
- }