uibee 2.9.2 → 2.9.3

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.
@@ -1,2 +1,2 @@
1
1
  import { LoginPageProps } from 'uibee/components';
2
- export default function LoginPage({ title, description, redirectURL, version, btg, handleSubmit, guestRedirectURL, guestText }: LoginPageProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function LoginPage({ title, description, redirectPath, version, btg, handleSubmit, guestRedirectPath, guestText }: LoginPageProps): import("react/jsx-runtime").JSX.Element;
@@ -2,17 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { LogIn } from 'lucide-react';
3
3
  import Logo from '../logo/logo';
4
4
  import Link from 'next/link';
5
- export default function LoginPage({ title, description, redirectURL, version, btg, handleSubmit, guestRedirectURL, guestText }) {
5
+ export default function LoginPage({ title, description, redirectPath, version, btg, handleSubmit, guestRedirectPath, guestText }) {
6
6
  return (_jsx("main", { className: 'w-full h-full flex items-center justify-center bg-login-800 p-8', children: _jsxs("div", { className: 'flex flex-col justify-center items-center bg-login-600 px-4 py-12 rounded-xl w-full max-w-md gap-4 md:gap-6', children: [_jsx("div", { className: 'relative aspect-3/1 w-full', children: _jsx(Logo, { className: 'object-contain px-6 sm:px-12' }) }), _jsxs("h1", { className: 'text-3xl font-extrabold text-login text-center tracking-tight', children: [title, " ", btg ? ' - Break the Glass' : ''] }), description && (_jsx("p", { className: 'text-center font-medium text-lg mb-2 max-w-xs', children: description })), btg ? (_jsxs("form", { className: 'w-full flex flex-col gap-3 max-w-xs', onSubmit: e => {
7
7
  e.preventDefault();
8
8
  handleSubmit?.(new FormData(e.currentTarget));
9
9
  e.currentTarget.reset();
10
10
  }, children: [_jsx("input", { type: 'text', name: 'name', placeholder: 'Name', className: 'py-2 px-3 rounded bg-login-900 font-medium focus:outline-none', required: true }), _jsx("input", { type: 'password', name: 'token', placeholder: 'Token', className: 'py-2 px-3 rounded bg-login-900 font-medium focus:outline-none', required: true }), _jsx("button", { type: 'submit', className: 'py-2 px-4 rounded-xl bg-login font-bold text-lg ' +
11
- 'hover:bg-login/80 transition-all duration-200 mt-2', children: "Login" })] })) : (_jsxs(Link, { href: redirectURL, className: `
11
+ 'hover:bg-login/80 transition-all duration-200 mt-2', children: "Login" })] })) : (_jsxs(Link, { href: redirectPath, className: `
12
12
  flex items-center justify-center gap-2 w-full
13
13
  max-w-xs py-3 px-6 rounded-xl bg-login font-bold
14
14
  text-lg hover:bg-login/80 transition-all
15
15
  duration-200 mb-2 mt-2 cursor-pointer
16
- `, children: ["Login", _jsx(LogIn, { className: 'w-6 h-6' })] })), guestRedirectURL &&
17
- _jsx(Link, { href: guestRedirectURL, className: 'text-sm font-semibold cursor-pointer opacity-50', children: guestText || 'Continue as guest' }), _jsxs("span", { className: 'text-sm mt-2', children: ["v", version] })] }) }));
16
+ `, children: ["Login", _jsx(LogIn, { className: 'w-6 h-6' })] })), guestRedirectPath &&
17
+ _jsx(Link, { href: guestRedirectPath, className: 'text-sm font-semibold cursor-pointer opacity-50', children: guestText || 'Continue as guest' }), _jsxs("span", { className: 'text-sm mt-2', children: ["v", version] })] }) }));
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uibee",
3
- "version": "2.9.2",
3
+ "version": "2.9.3",
4
4
  "description": "Shared components, functions and hooks for reuse across Login projects",
5
5
  "homepage": "https://github.com/Login-Linjeforening-for-IT/uibee#readme",
6
6
  "bugs": {
@@ -6,11 +6,11 @@ import Link from 'next/link'
6
6
  export default function LoginPage({
7
7
  title,
8
8
  description,
9
- redirectURL,
9
+ redirectPath,
10
10
  version,
11
11
  btg,
12
12
  handleSubmit,
13
- guestRedirectURL,
13
+ guestRedirectPath,
14
14
  guestText
15
15
  }: LoginPageProps) {
16
16
  return (
@@ -66,7 +66,7 @@ export default function LoginPage({
66
66
  </form>
67
67
  ) : (
68
68
  <Link
69
- href={redirectURL}
69
+ href={redirectPath}
70
70
  className={`
71
71
  flex items-center justify-center gap-2 w-full
72
72
  max-w-xs py-3 px-6 rounded-xl bg-login font-bold
@@ -78,9 +78,9 @@ export default function LoginPage({
78
78
  <LogIn className='w-6 h-6' />
79
79
  </Link>
80
80
  )}
81
- {guestRedirectURL &&
81
+ {guestRedirectPath &&
82
82
  <Link
83
- href={guestRedirectURL}
83
+ href={guestRedirectPath}
84
84
  className='text-sm font-semibold cursor-pointer opacity-50'
85
85
  >
86
86
  {guestText || 'Continue as guest'}
@@ -3,11 +3,11 @@ declare module 'uibee/components' {
3
3
  export interface LoginPageProps {
4
4
  title: string
5
5
  description?: string
6
- redirectURL: string
6
+ redirectPath: string
7
7
  version: string
8
8
  btg?: boolean
9
9
  handleSubmit?: (formData: FormData) => void
10
- guestRedirectURL?: string
10
+ guestRedirectPath?: string
11
11
  guestText?: string
12
12
  }
13
13