@nixxie-cms/auth 1.0.1
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/LICENSE +21 -0
- package/README.md +6 -0
- package/components/Navigation/dist/nixxie-cms-auth-components-Navigation.cjs.d.ts +3 -0
- package/components/Navigation/dist/nixxie-cms-auth-components-Navigation.cjs.js +147 -0
- package/components/Navigation/dist/nixxie-cms-auth-components-Navigation.esm.js +143 -0
- package/components/Navigation/package.json +4 -0
- package/dist/declarations/src/components/Navigation.d.ts +6 -0
- package/dist/declarations/src/components/Navigation.d.ts.map +1 -0
- package/dist/declarations/src/index.d.ts +15 -0
- package/dist/declarations/src/index.d.ts.map +1 -0
- package/dist/declarations/src/pages/InitPage.d.ts +9 -0
- package/dist/declarations/src/pages/InitPage.d.ts.map +1 -0
- package/dist/declarations/src/pages/SigninPage.d.ts +9 -0
- package/dist/declarations/src/pages/SigninPage.d.ts.map +1 -0
- package/dist/declarations/src/types.d.ts +49 -0
- package/dist/declarations/src/types.d.ts.map +1 -0
- package/dist/nixxie-cms-auth.cjs.d.ts +2 -0
- package/dist/nixxie-cms-auth.cjs.js +552 -0
- package/dist/nixxie-cms-auth.esm.js +548 -0
- package/dist/useFromRedirect-2de239a9.cjs.js +26 -0
- package/dist/useFromRedirect-b3deee00.esm.js +24 -0
- package/package.json +56 -0
- package/pages/InitPage/dist/nixxie-cms-auth-pages-InitPage.cjs.d.ts +3 -0
- package/pages/InitPage/dist/nixxie-cms-auth-pages-InitPage.cjs.js +274 -0
- package/pages/InitPage/dist/nixxie-cms-auth-pages-InitPage.esm.js +266 -0
- package/pages/InitPage/package.json +4 -0
- package/pages/SigninPage/dist/nixxie-cms-auth-pages-SigninPage.cjs.d.ts +3 -0
- package/pages/SigninPage/dist/nixxie-cms-auth-pages-SigninPage.cjs.js +319 -0
- package/pages/SigninPage/dist/nixxie-cms-auth-pages-SigninPage.esm.js +311 -0
- package/pages/SigninPage/package.json +4 -0
- package/src/components/Navigation.tsx +182 -0
- package/src/gql/getBaseAuthSchema.ts +129 -0
- package/src/gql/getInitFirstItemSchema.ts +87 -0
- package/src/index.ts +291 -0
- package/src/lib/useFromRedirect.ts +23 -0
- package/src/pages/InitPage.tsx +292 -0
- package/src/pages/SigninPage.tsx +331 -0
- package/src/schema.ts +84 -0
- package/src/templates/config.ts +9 -0
- package/src/templates/init.ts +22 -0
- package/src/templates/signin.ts +20 -0
- package/src/types.ts +57 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var NextHead = require('next/head');
|
|
6
|
+
var style = require('@keystar/ui/style');
|
|
7
|
+
var apollo = require('@nixxie-cms/core/admin-ui/apollo');
|
|
8
|
+
var components = require('@nixxie-cms/core/admin-ui/components');
|
|
9
|
+
var context = require('@nixxie-cms/core/admin-ui/context');
|
|
10
|
+
var router = require('@nixxie-cms/core/admin-ui/router');
|
|
11
|
+
var utils = require('@nixxie-cms/core/admin-ui/utils');
|
|
12
|
+
var useFromRedirect = require('../../../dist/useFromRedirect-2de239a9.cjs.js');
|
|
13
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
14
|
+
require('react');
|
|
15
|
+
|
|
16
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
17
|
+
|
|
18
|
+
var NextHead__default = /*#__PURE__*/_interopDefault(NextHead);
|
|
19
|
+
|
|
20
|
+
var InitPage = props => () => /*#__PURE__*/jsxRuntime.jsx(InitPage$1, {
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
function InitPage$1({
|
|
24
|
+
authGqlNames,
|
|
25
|
+
listKey,
|
|
26
|
+
fieldPaths
|
|
27
|
+
}) {
|
|
28
|
+
var _data$authenticate;
|
|
29
|
+
const router$1 = router.useRouter();
|
|
30
|
+
const redirect = useFromRedirect.useRedirect();
|
|
31
|
+
const list = context.useList(listKey);
|
|
32
|
+
const builder = utils.useBuildItem(list, fieldPaths);
|
|
33
|
+
const {
|
|
34
|
+
createInitialItem,
|
|
35
|
+
CreateInitialInput,
|
|
36
|
+
ItemAuthenticationWithPasswordSuccess: successTypename
|
|
37
|
+
} = authGqlNames;
|
|
38
|
+
const [tryCreateItem, {
|
|
39
|
+
loading,
|
|
40
|
+
error,
|
|
41
|
+
data
|
|
42
|
+
}] = apollo.useMutation(apollo.gql`
|
|
43
|
+
mutation NxAuthCreateFirstItem ($data: ${CreateInitialInput}!) {
|
|
44
|
+
authenticate: ${createInitialItem}(data: $data) {
|
|
45
|
+
... on ${successTypename} {
|
|
46
|
+
item {
|
|
47
|
+
id
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}`);
|
|
52
|
+
const onSubmit = async e => {
|
|
53
|
+
if (e.target !== e.currentTarget) return;
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
const builtItem = await builder.build();
|
|
56
|
+
if (!builtItem) return;
|
|
57
|
+
try {
|
|
58
|
+
await tryCreateItem({
|
|
59
|
+
variables: {
|
|
60
|
+
data: builtItem
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
} catch (e) {
|
|
64
|
+
console.error(e);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
router$1.push(redirect);
|
|
68
|
+
};
|
|
69
|
+
const pending = loading || (data === null || data === void 0 || (_data$authenticate = data.authenticate) === null || _data$authenticate === void 0 ? void 0 : _data$authenticate.__typename) === successTypename;
|
|
70
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
71
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(NextHead__default["default"], {
|
|
72
|
+
children: /*#__PURE__*/jsxRuntime.jsx("title", {
|
|
73
|
+
children: "Welcome to Nixxie CMS"
|
|
74
|
+
}, "title")
|
|
75
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
76
|
+
className: style.css({
|
|
77
|
+
display: 'flex',
|
|
78
|
+
minHeight: '100vh',
|
|
79
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
|
|
80
|
+
}),
|
|
81
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
82
|
+
className: style.css({
|
|
83
|
+
width: 420,
|
|
84
|
+
backgroundColor: '#000000',
|
|
85
|
+
display: 'flex',
|
|
86
|
+
flexDirection: 'column',
|
|
87
|
+
justifyContent: 'space-between',
|
|
88
|
+
padding: '48px',
|
|
89
|
+
flexShrink: 0,
|
|
90
|
+
'@media (max-width: 900px)': {
|
|
91
|
+
display: 'none'
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
95
|
+
className: style.css({
|
|
96
|
+
display: 'flex',
|
|
97
|
+
alignItems: 'center',
|
|
98
|
+
gap: 10
|
|
99
|
+
}),
|
|
100
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
101
|
+
className: style.css({
|
|
102
|
+
display: 'inline-flex',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
justifyContent: 'center',
|
|
105
|
+
width: 30,
|
|
106
|
+
height: 30,
|
|
107
|
+
borderRadius: 7,
|
|
108
|
+
border: '1.5px solid rgba(255,255,255,0.18)',
|
|
109
|
+
flexShrink: 0
|
|
110
|
+
}),
|
|
111
|
+
children: /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
112
|
+
width: "14",
|
|
113
|
+
height: "14",
|
|
114
|
+
viewBox: "0 0 14 14",
|
|
115
|
+
fill: "none",
|
|
116
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
117
|
+
d: "M2.5 11V3L11.5 11V3",
|
|
118
|
+
stroke: "white",
|
|
119
|
+
strokeWidth: "1.8",
|
|
120
|
+
strokeLinecap: "round",
|
|
121
|
+
strokeLinejoin: "round"
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
125
|
+
className: style.css({
|
|
126
|
+
fontSize: 15,
|
|
127
|
+
fontWeight: 600,
|
|
128
|
+
color: '#ffffff',
|
|
129
|
+
letterSpacing: '-0.03em',
|
|
130
|
+
lineHeight: 1
|
|
131
|
+
}),
|
|
132
|
+
children: "Nixxie"
|
|
133
|
+
})]
|
|
134
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
135
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("p", {
|
|
136
|
+
className: style.css({
|
|
137
|
+
margin: '0 0 16px',
|
|
138
|
+
fontSize: 34,
|
|
139
|
+
fontWeight: 700,
|
|
140
|
+
color: '#ffffff',
|
|
141
|
+
letterSpacing: '-0.04em',
|
|
142
|
+
lineHeight: 1.15
|
|
143
|
+
}),
|
|
144
|
+
children: ["Welcome", /*#__PURE__*/jsxRuntime.jsx("br", {}), "aboard."]
|
|
145
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("p", {
|
|
146
|
+
className: style.css({
|
|
147
|
+
margin: 0,
|
|
148
|
+
fontSize: 13.5,
|
|
149
|
+
color: 'rgba(255,255,255,0.38)',
|
|
150
|
+
lineHeight: 1.65
|
|
151
|
+
}),
|
|
152
|
+
children: ["Create your first admin account to", /*#__PURE__*/jsxRuntime.jsx("br", {}), "get started with Nixxie CMS."]
|
|
153
|
+
})]
|
|
154
|
+
}), /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
155
|
+
className: style.css({
|
|
156
|
+
margin: 0,
|
|
157
|
+
fontSize: 10.5,
|
|
158
|
+
color: 'rgba(255,255,255,0.18)',
|
|
159
|
+
letterSpacing: '0.06em',
|
|
160
|
+
textTransform: 'uppercase'
|
|
161
|
+
}),
|
|
162
|
+
children: "Nixxie CMS"
|
|
163
|
+
})]
|
|
164
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
165
|
+
className: style.css({
|
|
166
|
+
flex: 1,
|
|
167
|
+
backgroundColor: '#ffffff',
|
|
168
|
+
display: 'flex',
|
|
169
|
+
alignItems: 'center',
|
|
170
|
+
justifyContent: 'center',
|
|
171
|
+
padding: '48px 64px',
|
|
172
|
+
'@media (max-width: 600px)': {
|
|
173
|
+
padding: '32px 24px'
|
|
174
|
+
}
|
|
175
|
+
}),
|
|
176
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
177
|
+
className: style.css({
|
|
178
|
+
width: '100%',
|
|
179
|
+
maxWidth: 400
|
|
180
|
+
}),
|
|
181
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
182
|
+
className: style.css({
|
|
183
|
+
display: 'inline-flex',
|
|
184
|
+
alignItems: 'center',
|
|
185
|
+
justifyContent: 'center',
|
|
186
|
+
width: 36,
|
|
187
|
+
height: 36,
|
|
188
|
+
borderRadius: 8,
|
|
189
|
+
backgroundColor: '#000000',
|
|
190
|
+
marginBottom: 32
|
|
191
|
+
}),
|
|
192
|
+
children: /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
193
|
+
width: "16",
|
|
194
|
+
height: "16",
|
|
195
|
+
viewBox: "0 0 14 14",
|
|
196
|
+
fill: "none",
|
|
197
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
198
|
+
d: "M2.5 11V3L11.5 11V3",
|
|
199
|
+
stroke: "white",
|
|
200
|
+
strokeWidth: "1.8",
|
|
201
|
+
strokeLinecap: "round",
|
|
202
|
+
strokeLinejoin: "round"
|
|
203
|
+
})
|
|
204
|
+
})
|
|
205
|
+
}), /*#__PURE__*/jsxRuntime.jsx("h1", {
|
|
206
|
+
className: style.css({
|
|
207
|
+
margin: '0 0 6px',
|
|
208
|
+
fontSize: 23,
|
|
209
|
+
fontWeight: 700,
|
|
210
|
+
color: '#0a0a0a',
|
|
211
|
+
letterSpacing: '-0.03em',
|
|
212
|
+
lineHeight: 1.2
|
|
213
|
+
}),
|
|
214
|
+
children: "Create your first user"
|
|
215
|
+
}), /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
216
|
+
className: style.css({
|
|
217
|
+
margin: '0 0 28px',
|
|
218
|
+
fontSize: 13.5,
|
|
219
|
+
color: '#8a8a8a',
|
|
220
|
+
lineHeight: 1.5
|
|
221
|
+
}),
|
|
222
|
+
children: "Set up your admin account to start using Nixxie CMS."
|
|
223
|
+
}), /*#__PURE__*/jsxRuntime.jsx(components.GraphQLErrorNotice, {
|
|
224
|
+
errors: [error]
|
|
225
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("form", {
|
|
226
|
+
onSubmit: onSubmit,
|
|
227
|
+
className: style.css({
|
|
228
|
+
display: 'flex',
|
|
229
|
+
flexDirection: 'column',
|
|
230
|
+
gap: 16
|
|
231
|
+
}),
|
|
232
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(utils.Fields, {
|
|
233
|
+
...builder.props
|
|
234
|
+
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
235
|
+
type: "submit",
|
|
236
|
+
disabled: pending,
|
|
237
|
+
className: style.css({
|
|
238
|
+
marginTop: 4,
|
|
239
|
+
display: 'flex',
|
|
240
|
+
alignItems: 'center',
|
|
241
|
+
justifyContent: 'center',
|
|
242
|
+
paddingInline: 20,
|
|
243
|
+
paddingBlock: 11,
|
|
244
|
+
backgroundColor: '#000000',
|
|
245
|
+
color: '#ffffff',
|
|
246
|
+
borderRadius: 7,
|
|
247
|
+
fontSize: 14,
|
|
248
|
+
fontWeight: 600,
|
|
249
|
+
letterSpacing: '-0.01em',
|
|
250
|
+
cursor: pending ? 'default' : 'pointer',
|
|
251
|
+
opacity: pending ? 0.6 : 1,
|
|
252
|
+
transition: 'opacity 150ms, background-color 150ms',
|
|
253
|
+
width: '100%',
|
|
254
|
+
border: 'none',
|
|
255
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
256
|
+
'&:hover:not(:disabled)': {
|
|
257
|
+
backgroundColor: '#1a1a1a'
|
|
258
|
+
},
|
|
259
|
+
'&:focus-visible': {
|
|
260
|
+
outline: '2px solid #000',
|
|
261
|
+
outlineOffset: 3,
|
|
262
|
+
borderRadius: 7
|
|
263
|
+
}
|
|
264
|
+
}),
|
|
265
|
+
children: pending ? 'Setting up…' : 'Get started'
|
|
266
|
+
})]
|
|
267
|
+
})]
|
|
268
|
+
})
|
|
269
|
+
})]
|
|
270
|
+
})]
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
exports["default"] = InitPage;
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import NextHead from 'next/head';
|
|
2
|
+
import { css } from '@keystar/ui/style';
|
|
3
|
+
import { useMutation, gql } from '@nixxie-cms/core/admin-ui/apollo';
|
|
4
|
+
import { GraphQLErrorNotice } from '@nixxie-cms/core/admin-ui/components';
|
|
5
|
+
import { useList } from '@nixxie-cms/core/admin-ui/context';
|
|
6
|
+
import { useRouter } from '@nixxie-cms/core/admin-ui/router';
|
|
7
|
+
import { useBuildItem, Fields } from '@nixxie-cms/core/admin-ui/utils';
|
|
8
|
+
import { u as useRedirect } from '../../../dist/useFromRedirect-b3deee00.esm.js';
|
|
9
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
import 'react';
|
|
11
|
+
|
|
12
|
+
var InitPage = props => () => /*#__PURE__*/jsx(InitPage$1, {
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
function InitPage$1({
|
|
16
|
+
authGqlNames,
|
|
17
|
+
listKey,
|
|
18
|
+
fieldPaths
|
|
19
|
+
}) {
|
|
20
|
+
var _data$authenticate;
|
|
21
|
+
const router = useRouter();
|
|
22
|
+
const redirect = useRedirect();
|
|
23
|
+
const list = useList(listKey);
|
|
24
|
+
const builder = useBuildItem(list, fieldPaths);
|
|
25
|
+
const {
|
|
26
|
+
createInitialItem,
|
|
27
|
+
CreateInitialInput,
|
|
28
|
+
ItemAuthenticationWithPasswordSuccess: successTypename
|
|
29
|
+
} = authGqlNames;
|
|
30
|
+
const [tryCreateItem, {
|
|
31
|
+
loading,
|
|
32
|
+
error,
|
|
33
|
+
data
|
|
34
|
+
}] = useMutation(gql`
|
|
35
|
+
mutation NxAuthCreateFirstItem ($data: ${CreateInitialInput}!) {
|
|
36
|
+
authenticate: ${createInitialItem}(data: $data) {
|
|
37
|
+
... on ${successTypename} {
|
|
38
|
+
item {
|
|
39
|
+
id
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}`);
|
|
44
|
+
const onSubmit = async e => {
|
|
45
|
+
if (e.target !== e.currentTarget) return;
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
const builtItem = await builder.build();
|
|
48
|
+
if (!builtItem) return;
|
|
49
|
+
try {
|
|
50
|
+
await tryCreateItem({
|
|
51
|
+
variables: {
|
|
52
|
+
data: builtItem
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
} catch (e) {
|
|
56
|
+
console.error(e);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
router.push(redirect);
|
|
60
|
+
};
|
|
61
|
+
const pending = loading || (data === null || data === void 0 || (_data$authenticate = data.authenticate) === null || _data$authenticate === void 0 ? void 0 : _data$authenticate.__typename) === successTypename;
|
|
62
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
63
|
+
children: [/*#__PURE__*/jsx(NextHead, {
|
|
64
|
+
children: /*#__PURE__*/jsx("title", {
|
|
65
|
+
children: "Welcome to Nixxie CMS"
|
|
66
|
+
}, "title")
|
|
67
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
68
|
+
className: css({
|
|
69
|
+
display: 'flex',
|
|
70
|
+
minHeight: '100vh',
|
|
71
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
|
|
72
|
+
}),
|
|
73
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
74
|
+
className: css({
|
|
75
|
+
width: 420,
|
|
76
|
+
backgroundColor: '#000000',
|
|
77
|
+
display: 'flex',
|
|
78
|
+
flexDirection: 'column',
|
|
79
|
+
justifyContent: 'space-between',
|
|
80
|
+
padding: '48px',
|
|
81
|
+
flexShrink: 0,
|
|
82
|
+
'@media (max-width: 900px)': {
|
|
83
|
+
display: 'none'
|
|
84
|
+
}
|
|
85
|
+
}),
|
|
86
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
87
|
+
className: css({
|
|
88
|
+
display: 'flex',
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
gap: 10
|
|
91
|
+
}),
|
|
92
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
93
|
+
className: css({
|
|
94
|
+
display: 'inline-flex',
|
|
95
|
+
alignItems: 'center',
|
|
96
|
+
justifyContent: 'center',
|
|
97
|
+
width: 30,
|
|
98
|
+
height: 30,
|
|
99
|
+
borderRadius: 7,
|
|
100
|
+
border: '1.5px solid rgba(255,255,255,0.18)',
|
|
101
|
+
flexShrink: 0
|
|
102
|
+
}),
|
|
103
|
+
children: /*#__PURE__*/jsx("svg", {
|
|
104
|
+
width: "14",
|
|
105
|
+
height: "14",
|
|
106
|
+
viewBox: "0 0 14 14",
|
|
107
|
+
fill: "none",
|
|
108
|
+
children: /*#__PURE__*/jsx("path", {
|
|
109
|
+
d: "M2.5 11V3L11.5 11V3",
|
|
110
|
+
stroke: "white",
|
|
111
|
+
strokeWidth: "1.8",
|
|
112
|
+
strokeLinecap: "round",
|
|
113
|
+
strokeLinejoin: "round"
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
}), /*#__PURE__*/jsx("span", {
|
|
117
|
+
className: css({
|
|
118
|
+
fontSize: 15,
|
|
119
|
+
fontWeight: 600,
|
|
120
|
+
color: '#ffffff',
|
|
121
|
+
letterSpacing: '-0.03em',
|
|
122
|
+
lineHeight: 1
|
|
123
|
+
}),
|
|
124
|
+
children: "Nixxie"
|
|
125
|
+
})]
|
|
126
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
127
|
+
children: [/*#__PURE__*/jsxs("p", {
|
|
128
|
+
className: css({
|
|
129
|
+
margin: '0 0 16px',
|
|
130
|
+
fontSize: 34,
|
|
131
|
+
fontWeight: 700,
|
|
132
|
+
color: '#ffffff',
|
|
133
|
+
letterSpacing: '-0.04em',
|
|
134
|
+
lineHeight: 1.15
|
|
135
|
+
}),
|
|
136
|
+
children: ["Welcome", /*#__PURE__*/jsx("br", {}), "aboard."]
|
|
137
|
+
}), /*#__PURE__*/jsxs("p", {
|
|
138
|
+
className: css({
|
|
139
|
+
margin: 0,
|
|
140
|
+
fontSize: 13.5,
|
|
141
|
+
color: 'rgba(255,255,255,0.38)',
|
|
142
|
+
lineHeight: 1.65
|
|
143
|
+
}),
|
|
144
|
+
children: ["Create your first admin account to", /*#__PURE__*/jsx("br", {}), "get started with Nixxie CMS."]
|
|
145
|
+
})]
|
|
146
|
+
}), /*#__PURE__*/jsx("p", {
|
|
147
|
+
className: css({
|
|
148
|
+
margin: 0,
|
|
149
|
+
fontSize: 10.5,
|
|
150
|
+
color: 'rgba(255,255,255,0.18)',
|
|
151
|
+
letterSpacing: '0.06em',
|
|
152
|
+
textTransform: 'uppercase'
|
|
153
|
+
}),
|
|
154
|
+
children: "Nixxie CMS"
|
|
155
|
+
})]
|
|
156
|
+
}), /*#__PURE__*/jsx("div", {
|
|
157
|
+
className: css({
|
|
158
|
+
flex: 1,
|
|
159
|
+
backgroundColor: '#ffffff',
|
|
160
|
+
display: 'flex',
|
|
161
|
+
alignItems: 'center',
|
|
162
|
+
justifyContent: 'center',
|
|
163
|
+
padding: '48px 64px',
|
|
164
|
+
'@media (max-width: 600px)': {
|
|
165
|
+
padding: '32px 24px'
|
|
166
|
+
}
|
|
167
|
+
}),
|
|
168
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
169
|
+
className: css({
|
|
170
|
+
width: '100%',
|
|
171
|
+
maxWidth: 400
|
|
172
|
+
}),
|
|
173
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
174
|
+
className: css({
|
|
175
|
+
display: 'inline-flex',
|
|
176
|
+
alignItems: 'center',
|
|
177
|
+
justifyContent: 'center',
|
|
178
|
+
width: 36,
|
|
179
|
+
height: 36,
|
|
180
|
+
borderRadius: 8,
|
|
181
|
+
backgroundColor: '#000000',
|
|
182
|
+
marginBottom: 32
|
|
183
|
+
}),
|
|
184
|
+
children: /*#__PURE__*/jsx("svg", {
|
|
185
|
+
width: "16",
|
|
186
|
+
height: "16",
|
|
187
|
+
viewBox: "0 0 14 14",
|
|
188
|
+
fill: "none",
|
|
189
|
+
children: /*#__PURE__*/jsx("path", {
|
|
190
|
+
d: "M2.5 11V3L11.5 11V3",
|
|
191
|
+
stroke: "white",
|
|
192
|
+
strokeWidth: "1.8",
|
|
193
|
+
strokeLinecap: "round",
|
|
194
|
+
strokeLinejoin: "round"
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
}), /*#__PURE__*/jsx("h1", {
|
|
198
|
+
className: css({
|
|
199
|
+
margin: '0 0 6px',
|
|
200
|
+
fontSize: 23,
|
|
201
|
+
fontWeight: 700,
|
|
202
|
+
color: '#0a0a0a',
|
|
203
|
+
letterSpacing: '-0.03em',
|
|
204
|
+
lineHeight: 1.2
|
|
205
|
+
}),
|
|
206
|
+
children: "Create your first user"
|
|
207
|
+
}), /*#__PURE__*/jsx("p", {
|
|
208
|
+
className: css({
|
|
209
|
+
margin: '0 0 28px',
|
|
210
|
+
fontSize: 13.5,
|
|
211
|
+
color: '#8a8a8a',
|
|
212
|
+
lineHeight: 1.5
|
|
213
|
+
}),
|
|
214
|
+
children: "Set up your admin account to start using Nixxie CMS."
|
|
215
|
+
}), /*#__PURE__*/jsx(GraphQLErrorNotice, {
|
|
216
|
+
errors: [error]
|
|
217
|
+
}), /*#__PURE__*/jsxs("form", {
|
|
218
|
+
onSubmit: onSubmit,
|
|
219
|
+
className: css({
|
|
220
|
+
display: 'flex',
|
|
221
|
+
flexDirection: 'column',
|
|
222
|
+
gap: 16
|
|
223
|
+
}),
|
|
224
|
+
children: [/*#__PURE__*/jsx(Fields, {
|
|
225
|
+
...builder.props
|
|
226
|
+
}), /*#__PURE__*/jsx("button", {
|
|
227
|
+
type: "submit",
|
|
228
|
+
disabled: pending,
|
|
229
|
+
className: css({
|
|
230
|
+
marginTop: 4,
|
|
231
|
+
display: 'flex',
|
|
232
|
+
alignItems: 'center',
|
|
233
|
+
justifyContent: 'center',
|
|
234
|
+
paddingInline: 20,
|
|
235
|
+
paddingBlock: 11,
|
|
236
|
+
backgroundColor: '#000000',
|
|
237
|
+
color: '#ffffff',
|
|
238
|
+
borderRadius: 7,
|
|
239
|
+
fontSize: 14,
|
|
240
|
+
fontWeight: 600,
|
|
241
|
+
letterSpacing: '-0.01em',
|
|
242
|
+
cursor: pending ? 'default' : 'pointer',
|
|
243
|
+
opacity: pending ? 0.6 : 1,
|
|
244
|
+
transition: 'opacity 150ms, background-color 150ms',
|
|
245
|
+
width: '100%',
|
|
246
|
+
border: 'none',
|
|
247
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
248
|
+
'&:hover:not(:disabled)': {
|
|
249
|
+
backgroundColor: '#1a1a1a'
|
|
250
|
+
},
|
|
251
|
+
'&:focus-visible': {
|
|
252
|
+
outline: '2px solid #000',
|
|
253
|
+
outlineOffset: 3,
|
|
254
|
+
borderRadius: 7
|
|
255
|
+
}
|
|
256
|
+
}),
|
|
257
|
+
children: pending ? 'Setting up…' : 'Get started'
|
|
258
|
+
})]
|
|
259
|
+
})]
|
|
260
|
+
})
|
|
261
|
+
})]
|
|
262
|
+
})]
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export { InitPage as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from "../../../dist/declarations/src/pages/SigninPage.js";
|
|
2
|
+
export { default } from "../../../dist/declarations/src/pages/SigninPage.js";
|
|
3
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibml4eGllLWNtcy1hdXRoLXBhZ2VzLVNpZ25pblBhZ2UuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9kaXN0L2RlY2xhcmF0aW9ucy9zcmMvcGFnZXMvU2lnbmluUGFnZS5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
|