@sqrzro/admin 4.0.0-alpha.1 → 4.0.0-alpha.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.
@@ -0,0 +1,4 @@
1
+ import type { AuthProps } from '@sqrzro/auth';
2
+ type AdminAuthProps = Omit<AuthProps, 'classNameProps' | 'classNames'>;
3
+ declare function AdminAuth(props: AdminAuthProps): React.ReactElement;
4
+ export default AdminAuth;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Auth } from '@sqrzro/auth';
3
+ import { twx } from '@sqrzro/ui/styles';
4
+ const authClassNames = twx({
5
+ actions: 'mt-2 w-full',
6
+ footer: 'mt-2',
7
+ form: 'flex flex-col gap-6',
8
+ link: 'text-link font-semibold',
9
+ logo: 'row-start-2 mx-auto mx-auto flex h-12 w-32 w-48 items-end',
10
+ panel: 'row-start-3 flex w-screen max-w-sm flex-col gap-6 rounded-lg bg-white p-6 py-8 shadow-lg',
11
+ root: 'grid flex-1 grid-rows-[1fr_auto_auto_3fr] justify-center gap-8 bg-slate-800',
12
+ title: 'mb-1 text-lg font-semibold leading-none',
13
+ });
14
+ function AdminAuth(props) {
15
+ return _jsx(Auth, { classNames: authClassNames, ...props });
16
+ }
17
+ export default AdminAuth;
package/dist/config.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import { tw, twx } from '@sqrzro/ui/styles';
2
+ const showClosed = 'transition-discrete transition-all duration-100 invisible opacity-0 ease-in-out scale-90';
3
+ const showOpen = 'starting:opacity-0 starting:scale-90 visible opacity-100 scale-100';
2
4
  const classNames = twx({
3
5
  actionList: {
4
6
  root: tw('flex items-center gap-2 [&_li]:first:mr-auto'),
@@ -58,7 +60,7 @@ const classNames = twx({
58
60
  },
59
61
  modal: {
60
62
  root: 'starting:open:backdrop:opacity-0 py-16 backdrop:bg-slate-700/50 backdrop:transition-all backdrop:duration-500 open:backdrop:opacity-100',
61
- panel: 'show row-start-2 mx-auto flex w-full max-w-lg flex-col gap-6 rounded bg-white p-6 shadow-xl',
63
+ panel: `${showOpen} row-start-2 mx-auto flex w-full max-w-lg flex-col gap-6 rounded bg-white p-6 shadow-xl`,
62
64
  content: 'flex flex-col gap-6 [&_p]:text-pretty',
63
65
  icon: 'text-slate-400',
64
66
  title: 'flex items-center gap-2 border-b border-slate-200 pb-6 text-lg font-semibold',
@@ -75,7 +77,10 @@ const classNames = twx({
75
77
  navigation: 'inline-flex h-9 items-center justify-center gap-1 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium hover:bg-slate-100',
76
78
  },
77
79
  popover: {
78
- root: { default: 'w-full bg-red-500' },
80
+ root: {
81
+ default: `${showClosed} z-20 my-1.5 w-full rounded border border-slate-300 bg-white text-slate-700 shadow-md`,
82
+ focused: `${showOpen}`,
83
+ },
79
84
  },
80
85
  rootLayout: {
81
86
  root: 'overflow-x-hidden overflow-y-scroll bg-slate-50 font-sans text-sm text-slate-800 has-[[data-modal][open]]:overflow-hidden',
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './utility/interfaces';
2
2
  export { default as classNames } from './config';
3
3
  export { default as AdminAppLayout } from './components/AdminAppLayout';
4
+ export { default as AdminAuth } from './components/AdminAuth';
4
5
  export { default as AdminLayout } from './components/AdminLayout';
5
6
  export { default as AdminPage } from './components/AdminPage';
6
7
  export { default as AdminPageActions } from './components/AdminPageActions';
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './utility/interfaces';
2
2
  export { default as classNames } from './config';
3
3
  export { default as AdminAppLayout } from './components/AdminAppLayout';
4
+ export { default as AdminAuth } from './components/AdminAuth';
4
5
  export { default as AdminLayout } from './components/AdminLayout';
5
6
  export { default as AdminPage } from './components/AdminPage';
6
7
  export { default as AdminPageActions } from './components/AdminPageActions';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sqrzro/admin",
3
3
  "type": "module",
4
- "version": "4.0.0-alpha.1",
4
+ "version": "4.0.0-alpha.3",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "ISC",
@@ -12,8 +12,8 @@
12
12
  "next": "^16.1.6",
13
13
  "react": "^19.2.4",
14
14
  "react-dom": "^19.2.1",
15
- "@sqrzro/auth": "^4.0.0-alpha.1",
16
- "@sqrzro/ui": "^4.0.0-alpha.1"
15
+ "@sqrzro/auth": "^4.0.0-alpha.8",
16
+ "@sqrzro/ui": "^4.0.0-alpha.13"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/react": "^19.2.7",