@sqrzro/admin 4.0.0-alpha.3 → 4.0.0-alpha.5
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/dist/components/AdminAuth/index.js +2 -2
- package/dist/config.js +42 -28
- package/package.json +3 -3
|
@@ -3,13 +3,13 @@ import { Auth } from '@sqrzro/auth';
|
|
|
3
3
|
import { twx } from '@sqrzro/ui/styles';
|
|
4
4
|
const authClassNames = twx({
|
|
5
5
|
actions: 'mt-2 w-full',
|
|
6
|
-
footer: 'mt-2',
|
|
6
|
+
footer: 'mt-2 text-center',
|
|
7
7
|
form: 'flex flex-col gap-6',
|
|
8
8
|
link: 'text-link font-semibold',
|
|
9
9
|
logo: 'row-start-2 mx-auto mx-auto flex h-12 w-32 w-48 items-end',
|
|
10
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
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',
|
|
12
|
+
title: 'mb-1 text-center text-lg font-semibold leading-none',
|
|
13
13
|
});
|
|
14
14
|
function AdminAuth(props) {
|
|
15
15
|
return _jsx(Auth, { classNames: authClassNames, ...props });
|
package/dist/config.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
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';
|
|
1
|
+
import { twx } from '@sqrzro/ui/styles';
|
|
4
2
|
const classNames = twx({
|
|
5
3
|
actionList: {
|
|
6
|
-
root:
|
|
4
|
+
root: 'flex items-center gap-2 [&_li]:first:mr-auto',
|
|
7
5
|
},
|
|
8
6
|
appNavigation: {
|
|
9
7
|
root: 'h-full pl-6',
|
|
@@ -11,15 +9,18 @@ const classNames = twx({
|
|
|
11
9
|
item: { default: 'relative h-full' },
|
|
12
10
|
link: {
|
|
13
11
|
default: 'relative flex h-full items-center px-1 font-semibold text-white/80 hover:text-white',
|
|
14
|
-
|
|
12
|
+
states: {
|
|
13
|
+
isHighlighted: 'before:bg-primary text-white before:absolute before:bottom-0 before:left-0 before:right-0 before:h-1',
|
|
14
|
+
},
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
button: {
|
|
18
18
|
root: {
|
|
19
|
-
danger: 'border-red-500 bg-white text-red-500',
|
|
20
19
|
default: 'h-10 rounded border border-slate-300 bg-white px-5 text-sm text-slate-600',
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
props: {
|
|
21
|
+
isDanger: 'border-red-500 bg-white text-red-500',
|
|
22
|
+
isPrimary: 'bg-button-bg hover:bg-button-bg-hover text-button-text border-none font-semibold transition-colors',
|
|
23
|
+
},
|
|
23
24
|
},
|
|
24
25
|
icon: '-ml-1.5 h-4 w-4',
|
|
25
26
|
},
|
|
@@ -29,7 +30,7 @@ const classNames = twx({
|
|
|
29
30
|
dropdown: {
|
|
30
31
|
item: {
|
|
31
32
|
default: 'block border-b border-slate-100 p-3 text-sm text-slate-700',
|
|
32
|
-
|
|
33
|
+
states: { isSelected: 'bg-slate-100' },
|
|
33
34
|
},
|
|
34
35
|
},
|
|
35
36
|
editableForm: {
|
|
@@ -55,12 +56,19 @@ const classNames = twx({
|
|
|
55
56
|
optional: 'pl-2 text-xs font-normal leading-none text-slate-500',
|
|
56
57
|
error: 'text-error mt-2 flex items-start gap-1.5 before:mt-0.5 before:h-4 before:w-4 before:flex-none before:rounded-full before:bg-[url(/admin/images/danger.svg)] before:bg-contain',
|
|
57
58
|
},
|
|
59
|
+
list: {
|
|
60
|
+
root: 'flex flex-col gap-4',
|
|
61
|
+
},
|
|
58
62
|
listItem: {
|
|
59
|
-
root:
|
|
63
|
+
root: 'rounded bg-white p-4 shadow',
|
|
64
|
+
title: 'text-base font-semibold',
|
|
65
|
+
},
|
|
66
|
+
listItemMeta: {
|
|
67
|
+
root: 'mt-1.5 flex flex-wrap items-center gap-x-4 gap-y-1 text-slate-500',
|
|
60
68
|
},
|
|
61
69
|
modal: {
|
|
62
70
|
root: 'starting:open:backdrop:opacity-0 py-16 backdrop:bg-slate-700/50 backdrop:transition-all backdrop:duration-500 open:backdrop:opacity-100',
|
|
63
|
-
panel:
|
|
71
|
+
panel: 'show-open row-start-2 mx-auto flex w-full max-w-lg flex-col gap-6 rounded bg-white p-6 shadow-xl',
|
|
64
72
|
content: 'flex flex-col gap-6 [&_p]:text-pretty',
|
|
65
73
|
icon: 'text-slate-400',
|
|
66
74
|
title: 'flex items-center gap-2 border-b border-slate-200 pb-6 text-lg font-semibold',
|
|
@@ -71,43 +79,49 @@ const classNames = twx({
|
|
|
71
79
|
list: 'mx-auto flex flex-row items-center gap-1',
|
|
72
80
|
link: {
|
|
73
81
|
default: 'inline-flex h-9 w-9 items-center justify-center whitespace-nowrap rounded-md border border-transparent text-sm font-medium hover:bg-slate-100 disabled:pointer-events-none disabled:opacity-30',
|
|
74
|
-
|
|
82
|
+
states: { isHighlighted: 'border-slate-200 bg-white shadow-sm' },
|
|
75
83
|
},
|
|
76
84
|
gap: 'flex h-9 w-9 items-center justify-center text-xs text-slate-400',
|
|
77
85
|
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',
|
|
78
86
|
},
|
|
79
87
|
popover: {
|
|
80
88
|
root: {
|
|
81
|
-
default:
|
|
82
|
-
|
|
89
|
+
default: 'show-closed z-20 my-1.5 w-full rounded border border-slate-300 bg-white text-slate-700 shadow-md',
|
|
90
|
+
states: { isFocused: 'show-open' },
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
reference: {
|
|
94
|
+
root: { default: 'flex items-center gap-2', props: { isTitle: 'gap-4' } },
|
|
95
|
+
reference: {
|
|
96
|
+
default: 'rounded bg-slate-200 px-2 py-1 text-[70%]',
|
|
97
|
+
props: { isTitle: 'bg-slate-50 text-[60%] text-slate-800' },
|
|
83
98
|
},
|
|
84
99
|
},
|
|
85
100
|
rootLayout: {
|
|
86
|
-
root: '
|
|
87
|
-
content: 'flex min-h-screen flex-col',
|
|
101
|
+
root: 'bg-slate-50 font-sans text-sm text-slate-800',
|
|
88
102
|
},
|
|
89
103
|
staticTextInput: {
|
|
90
104
|
root: {
|
|
91
105
|
default: 'text-md flex min-h-10 flex-col justify-center rounded border border-slate-300 bg-white p-3',
|
|
92
|
-
|
|
106
|
+
states: { isError: 'border-red-500' },
|
|
93
107
|
},
|
|
94
108
|
label: 'block leading-none',
|
|
95
|
-
|
|
109
|
+
details: 'mt-1.5 block text-xs leading-none text-slate-500',
|
|
96
110
|
placeholder: 'block leading-none text-slate-400',
|
|
97
111
|
},
|
|
98
112
|
switch: {
|
|
99
|
-
root:
|
|
100
|
-
control:
|
|
113
|
+
root: 'flex gap-4',
|
|
114
|
+
control: 'relative h-6 w-10 flex-none',
|
|
101
115
|
input: {
|
|
102
|
-
default:
|
|
103
|
-
|
|
116
|
+
default: 'block h-full w-full cursor-pointer rounded-full bg-slate-300 transition-colors',
|
|
117
|
+
states: { isChecked: 'bg-primary' },
|
|
104
118
|
},
|
|
105
119
|
icon: {
|
|
106
|
-
default:
|
|
107
|
-
|
|
120
|
+
default: 'pointer-events-none absolute left-1 top-1/2 h-4 w-4 -translate-y-1/2 translate-x-0 transform rounded-full bg-white shadow-md transition-transform duration-100',
|
|
121
|
+
states: { isChecked: 'translate-x-full' },
|
|
108
122
|
},
|
|
109
|
-
label: 'flex min-h-6 flex-col justify-center',
|
|
110
|
-
details: 'mt-1 block text-xs text-slate-500',
|
|
123
|
+
// label: 'flex min-h-6 flex-col justify-center',
|
|
124
|
+
// details: 'mt-1 block text-xs text-slate-500',
|
|
111
125
|
},
|
|
112
126
|
table: {
|
|
113
127
|
root: 'rounded bg-white p-8 shadow',
|
|
@@ -121,13 +135,13 @@ const classNames = twx({
|
|
|
121
135
|
list: 'flex gap-4',
|
|
122
136
|
link: {
|
|
123
137
|
default: 'block border-b-4 border-transparent px-1 pb-2 font-semibold opacity-80 hover:opacity-100',
|
|
124
|
-
|
|
138
|
+
states: { isHighlighted: 'border-primary opacity-100' },
|
|
125
139
|
},
|
|
126
140
|
},
|
|
127
141
|
textInput: {
|
|
128
142
|
root: {
|
|
129
143
|
default: 'text-md focus:border-primary h-10 rounded border border-slate-300 px-3 placeholder-slate-400',
|
|
130
|
-
|
|
144
|
+
states: { isError: 'border-red-500' },
|
|
131
145
|
},
|
|
132
146
|
prefix: {
|
|
133
147
|
default: 'peer-focus:border-primary relative -mr-1 rounded-l border border-slate-300 bg-white px-3 text-sm text-slate-600',
|
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.
|
|
4
|
+
"version": "4.0.0-alpha.5",
|
|
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.
|
|
16
|
-
"@sqrzro/ui": "^4.0.0-alpha.
|
|
15
|
+
"@sqrzro/auth": "^4.0.0-alpha.10",
|
|
16
|
+
"@sqrzro/ui": "^4.0.0-alpha.20"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/react": "^19.2.7",
|