uibee 2.17.5 → 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.
- package/README.md +34 -0
- package/dist/icons-lZYQ6Vlr.js +125 -0
- package/dist/src/components/index.d.ts +706 -30
- package/dist/src/components/index.js +3243 -44
- package/dist/src/hooks/index.d.ts +15 -3
- package/dist/src/hooks/index.js +44 -3
- package/dist/src/icons/index.d.ts +420 -0
- package/dist/src/icons/index.js +3 -0
- package/dist/src/styles/index.d.ts +1 -1
- package/dist/src/styles/index.js +2 -1
- package/dist/src/utils/index.d.ts +38 -5
- package/dist/src/utils/index.js +125 -6
- package/dist/{src/globals.css → style.css} +890 -678
- package/dist/useClickOutside-Cmp-RsP3.js +13 -0
- package/index.d.ts +0 -1
- package/package.json +22 -23
- package/src/components/alert/alert.tsx +20 -18
- package/src/components/buttons/button.tsx +28 -35
- package/src/components/confirm/confirmPopup.tsx +15 -17
- package/src/components/container/accordion.tsx +54 -0
- package/src/components/container/glassCard.tsx +14 -0
- package/src/components/container/iconBubble.tsx +30 -0
- package/src/components/container/leftBarPanel.tsx +15 -0
- package/src/components/container/pulseDot.tsx +31 -0
- package/src/components/container/statCard.tsx +24 -0
- package/src/components/container/tabs.tsx +64 -0
- package/src/components/footer/footer.tsx +124 -0
- package/src/components/footer/loginContent.tsx +70 -0
- package/src/components/index.ts +15 -0
- package/src/components/inputs/checkbox.tsx +4 -4
- package/src/components/inputs/input.tsx +11 -13
- package/src/components/inputs/multiSelect.tsx +144 -0
- package/src/components/inputs/radio.tsx +4 -4
- package/src/components/inputs/range.tsx +6 -5
- package/src/components/inputs/searchInput.tsx +1 -1
- package/src/components/inputs/select.tsx +19 -18
- package/src/components/inputs/shared/colorPickerPopup.tsx +5 -5
- package/src/components/inputs/shared/dateTimePickerPopup.tsx +9 -9
- package/src/components/inputs/shared/inputError.tsx +1 -1
- package/src/components/inputs/switch.tsx +7 -7
- package/src/components/inputs/tagInput.tsx +6 -7
- package/src/components/inputs/textarea.tsx +8 -10
- package/src/components/inputs/toggle.tsx +6 -6
- package/src/components/table/body.tsx +6 -6
- package/src/components/table/format.ts +1 -1
- package/src/components/table/header.tsx +1 -1
- package/src/components/table/pagination.tsx +17 -31
- package/src/components/table/table.tsx +2 -2
- package/src/components/version/version.tsx +1 -1
- package/src/components/vulnerability/constants.ts +6 -6
- package/src/components/vulnerability/severityPill.tsx +6 -7
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useClickOutside.ts +5 -22
- package/src/icons/icons.tsx +431 -0
- package/src/icons/index.ts +2 -0
- package/src/index.ts +0 -1
- package/src/types/hooks.d.ts +8 -2
- package/src/utils/index.ts +1 -1
- package/src/utils/logoConsoleOutput/logoConsoleOutput.ts +31 -0
- package/tsconfig.json +3 -2
- package/tsdown.config.ts +26 -0
- package/Readme.md +0 -29
- package/bun.lock +0 -662
- package/dist/src/components/alert/alert.d.ts +0 -8
- package/dist/src/components/alert/alert.js +0 -15
- package/dist/src/components/buttons/button.d.ts +0 -13
- package/dist/src/components/buttons/button.js +0 -30
- package/dist/src/components/confirm/confirmPopup.d.ts +0 -12
- package/dist/src/components/confirm/confirmPopup.js +0 -18
- package/dist/src/components/container/highlight.d.ts +0 -4
- package/dist/src/components/container/highlight.js +0 -4
- package/dist/src/components/container/page.d.ts +0 -8
- package/dist/src/components/container/page.js +0 -4
- package/dist/src/components/inputs/checkbox.d.ts +0 -17
- package/dist/src/components/inputs/checkbox.js +0 -37
- package/dist/src/components/inputs/input.d.ts +0 -12
- package/dist/src/components/inputs/input.js +0 -124
- package/dist/src/components/inputs/radio.d.ts +0 -17
- package/dist/src/components/inputs/radio.js +0 -27
- package/dist/src/components/inputs/range.d.ts +0 -11
- package/dist/src/components/inputs/range.js +0 -22
- package/dist/src/components/inputs/searchInput.d.ts +0 -6
- package/dist/src/components/inputs/searchInput.js +0 -42
- package/dist/src/components/inputs/select.d.ts +0 -23
- package/dist/src/components/inputs/select.js +0 -70
- package/dist/src/components/inputs/shared/colorPickerPopup.d.ts +0 -8
- package/dist/src/components/inputs/shared/colorPickerPopup.js +0 -191
- package/dist/src/components/inputs/shared/dateTimePickerPopup.d.ts +0 -9
- package/dist/src/components/inputs/shared/dateTimePickerPopup.js +0 -128
- package/dist/src/components/inputs/shared/fieldWrapper.d.ts +0 -14
- package/dist/src/components/inputs/shared/fieldWrapper.js +0 -8
- package/dist/src/components/inputs/shared/index.d.ts +0 -5
- package/dist/src/components/inputs/shared/index.js +0 -5
- package/dist/src/components/inputs/shared/inputError.d.ts +0 -6
- package/dist/src/components/inputs/shared/inputError.js +0 -6
- package/dist/src/components/inputs/shared/inputInfo.d.ts +0 -5
- package/dist/src/components/inputs/shared/inputInfo.js +0 -5
- package/dist/src/components/inputs/shared/inputLabel.d.ts +0 -9
- package/dist/src/components/inputs/shared/inputLabel.js +0 -4
- package/dist/src/components/inputs/switch.d.ts +0 -11
- package/dist/src/components/inputs/switch.js +0 -14
- package/dist/src/components/inputs/tagInput.d.ts +0 -15
- package/dist/src/components/inputs/tagInput.js +0 -40
- package/dist/src/components/inputs/textarea.d.ts +0 -11
- package/dist/src/components/inputs/textarea.js +0 -36
- package/dist/src/components/inputs/toggle.d.ts +0 -14
- package/dist/src/components/inputs/toggle.js +0 -12
- package/dist/src/components/login/loginPage.d.ts +0 -2
- package/dist/src/components/login/loginPage.js +0 -18
- package/dist/src/components/logo/logo.d.ts +0 -5
- package/dist/src/components/logo/logo.js +0 -6
- package/dist/src/components/logo/logoSmall.d.ts +0 -1
- package/dist/src/components/logo/logoSmall.js +0 -6
- package/dist/src/components/markdownrender/markdownRender.d.ts +0 -7
- package/dist/src/components/markdownrender/markdownRender.js +0 -26
- package/dist/src/components/navbar/bubble.d.ts +0 -14
- package/dist/src/components/navbar/bubble.js +0 -8
- package/dist/src/components/navbar/navbar.d.ts +0 -34
- package/dist/src/components/navbar/navbar.js +0 -36
- package/dist/src/components/navbar/navbarDropdown.d.ts +0 -7
- package/dist/src/components/navbar/navbarDropdown.js +0 -19
- package/dist/src/components/navbar/navbarItem.d.ts +0 -11
- package/dist/src/components/navbar/navbarItem.js +0 -12
- package/dist/src/components/table/body.d.ts +0 -15
- package/dist/src/components/table/body.js +0 -116
- package/dist/src/components/table/format.d.ts +0 -1
- package/dist/src/components/table/format.js +0 -27
- package/dist/src/components/table/header.d.ts +0 -8
- package/dist/src/components/table/header.js +0 -47
- package/dist/src/components/table/menu.d.ts +0 -17
- package/dist/src/components/table/menu.js +0 -30
- package/dist/src/components/table/pagination.d.ts +0 -6
- package/dist/src/components/table/pagination.js +0 -86
- package/dist/src/components/table/table.d.ts +0 -14
- package/dist/src/components/table/table.js +0 -14
- package/dist/src/components/toast/toastItem.d.ts +0 -2
- package/dist/src/components/toast/toastItem.js +0 -38
- package/dist/src/components/toast/toaster.d.ts +0 -9
- package/dist/src/components/toast/toaster.js +0 -86
- package/dist/src/components/toggle/language.d.ts +0 -4
- package/dist/src/components/toggle/language.js +0 -29
- package/dist/src/components/toggle/theme.d.ts +0 -3
- package/dist/src/components/toggle/theme.js +0 -30
- package/dist/src/components/version/version.d.ts +0 -7
- package/dist/src/components/version/version.js +0 -12
- package/dist/src/components/vulnerability/constants.d.ts +0 -4
- package/dist/src/components/vulnerability/constants.js +0 -14
- package/dist/src/components/vulnerability/severityPill.d.ts +0 -8
- package/dist/src/components/vulnerability/severityPill.js +0 -8
- package/dist/src/hooks/useClickOutside.d.ts +0 -2
- package/dist/src/hooks/useClickOutside.js +0 -27
- package/dist/src/hooks/useDarkMode.d.ts +0 -1
- package/dist/src/hooks/useDarkMode.js +0 -17
- package/dist/src/hooks/useVisibility.d.ts +0 -4
- package/dist/src/hooks/useVisibility.js +0 -23
- package/dist/src/index.d.ts +0 -5
- package/dist/src/index.js +0 -5
- package/dist/src/scripts/buildCss.d.ts +0 -1
- package/dist/src/scripts/buildCss.js +0 -22
- package/dist/src/scripts/index.d.ts +0 -1
- package/dist/src/scripts/index.js +0 -1
- package/dist/src/scripts/rewriteAlias.d.ts +0 -1
- package/dist/src/scripts/rewriteAlias.js +0 -31
- package/dist/src/utils/LogoConsoleOutput/LogoConsoleOutput.d.ts +0 -1
- package/dist/src/utils/LogoConsoleOutput/LogoConsoleOutput.js +0 -44
- package/dist/src/utils/auth/callback.d.ts +0 -2
- package/dist/src/utils/auth/callback.js +0 -63
- package/dist/src/utils/auth/getDomain.d.ts +0 -2
- package/dist/src/utils/auth/getDomain.js +0 -6
- package/dist/src/utils/auth/login.d.ts +0 -3
- package/dist/src/utils/auth/login.js +0 -14
- package/dist/src/utils/auth/logout.d.ts +0 -3
- package/dist/src/utils/auth/logout.js +0 -18
- package/dist/src/utils/auth/token.d.ts +0 -3
- package/dist/src/utils/auth/token.js +0 -33
- package/dist/tailwind.config.d.ts +0 -3
- package/dist/tailwind.config.js +0 -7
- package/src/scripts/buildCss.ts +0 -25
- package/src/scripts/index.ts +0 -1
- package/src/scripts/rewriteAlias.ts +0 -39
- 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,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
|
-
}
|
package/dist/tailwind.config.js
DELETED
package/src/scripts/buildCss.ts
DELETED
|
@@ -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
|
-
})
|
package/src/scripts/index.ts
DELETED
|
@@ -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
|
-
}
|