@tomny-dev/uzi 0.2.12 → 0.3.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.
Files changed (109) hide show
  1. package/README.md +9 -0
  2. package/dist/components/application-scaffolding.test.d.ts +2 -0
  3. package/dist/components/application-scaffolding.test.d.ts.map +1 -0
  4. package/dist/components/empty-state/EmptyState.d.ts +14 -0
  5. package/dist/components/empty-state/EmptyState.d.ts.map +1 -0
  6. package/dist/components/layout-primitives/LayoutPrimitives.d.ts +16 -0
  7. package/dist/components/layout-primitives/LayoutPrimitives.d.ts.map +1 -0
  8. package/dist/components/page-container/PageContainer.d.ts +10 -0
  9. package/dist/components/page-container/PageContainer.d.ts.map +1 -0
  10. package/dist/components/page-header/PageHeader.d.ts +11 -0
  11. package/dist/components/page-header/PageHeader.d.ts.map +1 -0
  12. package/dist/components/section-header/SectionHeader.d.ts +10 -0
  13. package/dist/components/section-header/SectionHeader.d.ts.map +1 -0
  14. package/dist/components/stat/Stat.d.ts +12 -0
  15. package/dist/components/stat/Stat.d.ts.map +1 -0
  16. package/dist/index.cjs +19 -5
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +12 -6
  20. package/dist/index41.js +12 -10
  21. package/dist/index41.js.map +1 -1
  22. package/dist/index42.cjs +14 -11
  23. package/dist/index42.cjs.map +1 -1
  24. package/dist/index42.js +14 -13
  25. package/dist/index42.js.map +1 -1
  26. package/dist/index43.cjs +14 -13
  27. package/dist/index43.cjs.map +1 -1
  28. package/dist/index43.js +15 -11
  29. package/dist/index43.js.map +1 -1
  30. package/dist/index44.cjs +21 -13
  31. package/dist/index44.cjs.map +1 -1
  32. package/dist/index44.js +28 -17
  33. package/dist/index44.js.map +1 -1
  34. package/dist/index45.cjs +27 -16
  35. package/dist/index45.cjs.map +1 -1
  36. package/dist/index45.js +13 -9
  37. package/dist/index45.js.map +1 -1
  38. package/dist/index46.cjs +18 -12
  39. package/dist/index46.cjs.map +1 -1
  40. package/dist/index46.js +22 -90
  41. package/dist/index46.js.map +1 -1
  42. package/dist/index47.cjs +21 -91
  43. package/dist/index47.cjs.map +1 -1
  44. package/dist/index47.js +17 -21
  45. package/dist/index47.js.map +1 -1
  46. package/dist/index48.cjs +24 -30
  47. package/dist/index48.cjs.map +1 -1
  48. package/dist/index48.js +30 -45
  49. package/dist/index48.js.map +1 -1
  50. package/dist/index49.cjs +29 -46
  51. package/dist/index49.cjs.map +1 -1
  52. package/dist/index49.js +14 -57
  53. package/dist/index49.js.map +1 -1
  54. package/dist/index50.cjs +17 -84
  55. package/dist/index50.cjs.map +1 -1
  56. package/dist/index50.js +24 -428
  57. package/dist/index50.js.map +1 -1
  58. package/dist/index51.cjs +24 -431
  59. package/dist/index51.cjs.map +1 -1
  60. package/dist/index51.js +21 -0
  61. package/dist/index51.js.map +1 -0
  62. package/dist/index52.cjs +26 -0
  63. package/dist/index52.cjs.map +1 -0
  64. package/dist/index52.js +35 -0
  65. package/dist/index52.js.map +1 -0
  66. package/dist/index53.cjs +36 -0
  67. package/dist/index53.cjs.map +1 -0
  68. package/dist/index53.js +14 -0
  69. package/dist/index53.js.map +1 -0
  70. package/dist/index54.cjs +15 -0
  71. package/dist/index54.cjs.map +1 -0
  72. package/dist/index54.js +21 -0
  73. package/dist/index54.js.map +1 -0
  74. package/dist/index55.cjs +21 -0
  75. package/dist/index55.cjs.map +1 -0
  76. package/dist/index55.js +15 -0
  77. package/dist/index55.js.map +1 -0
  78. package/dist/index56.cjs +17 -0
  79. package/dist/index56.cjs.map +1 -0
  80. package/dist/index56.js +24 -0
  81. package/dist/index56.js.map +1 -0
  82. package/dist/index57.cjs +24 -0
  83. package/dist/index57.cjs.map +1 -0
  84. package/dist/index57.js +13 -0
  85. package/dist/index57.js.map +1 -0
  86. package/dist/index58.cjs +16 -0
  87. package/dist/index58.cjs.map +1 -0
  88. package/dist/index58.js +96 -0
  89. package/dist/index58.js.map +1 -0
  90. package/dist/index59.cjs +98 -0
  91. package/dist/index59.cjs.map +1 -0
  92. package/dist/index59.js +25 -0
  93. package/dist/index59.js.map +1 -0
  94. package/dist/index60.cjs +34 -0
  95. package/dist/index60.cjs.map +1 -0
  96. package/dist/index60.js +50 -0
  97. package/dist/index60.js.map +1 -0
  98. package/dist/index61.cjs +52 -0
  99. package/dist/index61.cjs.map +1 -0
  100. package/dist/index61.js +61 -0
  101. package/dist/index61.js.map +1 -0
  102. package/dist/index62.cjs +88 -0
  103. package/dist/index62.cjs.map +1 -0
  104. package/dist/index62.js +439 -0
  105. package/dist/index62.js.map +1 -0
  106. package/dist/index63.cjs +443 -0
  107. package/dist/index63.cjs.map +1 -0
  108. package/dist/style.css +237 -0
  109. package/package.json +1 -1
package/dist/index50.js CHANGED
@@ -1,439 +1,35 @@
1
1
  import { cx } from "./index3.js";
2
- import auth_pages_module_default from "./index49.js";
3
- import * as React from "react";
4
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/auth-pages/AuthPages.tsx
6
- function EyeIcon({ open }) {
7
- if (open) return /* @__PURE__ */ jsxs("svg", {
8
- viewBox: "0 0 24 24",
9
- fill: "none",
10
- "aria-hidden": "true",
11
- className: auth_pages_module_default.eyeIcon,
12
- children: [/* @__PURE__ */ jsx("path", {
13
- d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z",
14
- stroke: "currentColor",
15
- strokeWidth: "2"
16
- }), /* @__PURE__ */ jsx("circle", {
17
- cx: "12",
18
- cy: "12",
19
- r: "3",
20
- stroke: "currentColor",
21
- strokeWidth: "2"
22
- })]
23
- });
24
- return /* @__PURE__ */ jsxs("svg", {
25
- viewBox: "0 0 24 24",
26
- fill: "none",
27
- "aria-hidden": "true",
28
- className: auth_pages_module_default.eyeIcon,
29
- children: [
30
- /* @__PURE__ */ jsx("path", {
31
- d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94",
32
- stroke: "currentColor",
33
- strokeWidth: "2"
34
- }),
35
- /* @__PURE__ */ jsx("path", {
36
- d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19",
37
- stroke: "currentColor",
38
- strokeWidth: "2"
39
- }),
40
- /* @__PURE__ */ jsx("line", {
41
- x1: "1",
42
- y1: "1",
43
- x2: "23",
44
- y2: "23",
45
- stroke: "currentColor",
46
- strokeWidth: "2"
47
- })
48
- ]
49
- });
50
- }
51
- function Field({ label, id, children, error }) {
52
- return /* @__PURE__ */ jsxs("div", {
53
- className: auth_pages_module_default.field,
54
- children: [
55
- /* @__PURE__ */ jsx("label", {
56
- htmlFor: id,
57
- className: auth_pages_module_default.label,
58
- children: label
59
- }),
60
- children,
61
- error && /* @__PURE__ */ jsx("span", {
62
- className: auth_pages_module_default.error,
63
- children: error
64
- })
65
- ]
66
- });
67
- }
68
- function PasswordField({ id, label, placeholder, value, onChange, error }) {
69
- const [show, setShow] = React.useState(false);
70
- const toggleRef = React.useRef(null);
71
- return /* @__PURE__ */ jsx(Field, {
72
- label: label ?? "Password",
73
- id,
74
- error,
75
- children: /* @__PURE__ */ jsxs("div", {
76
- className: auth_pages_module_default.passwordWrapper,
77
- children: [/* @__PURE__ */ jsx("input", {
78
- id,
79
- type: show ? "text" : "password",
80
- placeholder,
81
- value,
82
- onChange,
83
- className: auth_pages_module_default.input
84
- }), /* @__PURE__ */ jsx("button", {
85
- ref: toggleRef,
86
- type: "button",
87
- onClick: () => setShow((s) => !s),
88
- className: auth_pages_module_default.toggle,
89
- "aria-label": show ? "Hide password" : "Show password",
90
- children: /* @__PURE__ */ jsx(EyeIcon, { open: show })
91
- })]
92
- })
93
- });
94
- }
95
- function CheckboxRow({ label, linkText, linkHref, checked, onChange }) {
96
- if (!label) return null;
97
- return /* @__PURE__ */ jsxs("div", {
98
- className: auth_pages_module_default.checkboxRow,
99
- children: [/* @__PURE__ */ jsxs("label", {
100
- className: auth_pages_module_default.checkboxLabel,
101
- children: [/* @__PURE__ */ jsx("input", {
102
- type: "checkbox",
103
- className: auth_pages_module_default.checkbox,
104
- checked,
105
- onChange: (e) => onChange?.(e.target.checked)
106
- }), /* @__PURE__ */ jsx("span", { children: label })]
107
- }), linkHref && /* @__PURE__ */ jsx("a", {
108
- href: linkHref,
109
- className: auth_pages_module_default.forgotLink,
110
- children: linkText
111
- })]
112
- });
113
- }
114
- function SignInPage({ title = "Sign in", subtitle, footer, onSubmit, loading = false, brand, className, emailPlaceholder = "Email address", passwordPlaceholder = "Password", rememberLabel = "Remember me", forgotLinkText = "Forgot password?", forgotLinkHref }) {
115
- const id = React.useId();
116
- const [email, setEmail] = React.useState("");
117
- const [password, setPassword] = React.useState("");
118
- const [rememberMe, setRememberMe] = React.useState(false);
119
- const [errors, setErrors] = React.useState({});
120
- const [submitted, setSubmitted] = React.useState(false);
121
- const validate = () => {
122
- const newErrors = {};
123
- if (!email.trim()) newErrors.email = "Email is required";
124
- else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) newErrors.email = "Enter a valid email";
125
- if (!password) newErrors.password = "Password is required";
126
- setErrors(newErrors);
127
- return Object.keys(newErrors).length === 0;
128
- };
129
- const handleSubmit = (e) => {
130
- e.preventDefault();
131
- setSubmitted(true);
132
- if (!validate()) return;
133
- onSubmit?.({
134
- email,
135
- password,
136
- rememberMe
137
- });
138
- };
139
- return /* @__PURE__ */ jsx("div", {
140
- className: cx(auth_pages_module_default.authLayout, className),
141
- children: /* @__PURE__ */ jsxs("div", {
142
- className: auth_pages_module_default.authCard,
143
- children: [
144
- brand && /* @__PURE__ */ jsx("div", {
145
- className: auth_pages_module_default.authBrand,
146
- children: brand
147
- }),
148
- /* @__PURE__ */ jsxs("div", {
149
- className: auth_pages_module_default.authHeader,
150
- children: [/* @__PURE__ */ jsx("h1", {
151
- className: auth_pages_module_default.authTitle,
152
- children: title
153
- }), subtitle && /* @__PURE__ */ jsx("p", {
154
- className: auth_pages_module_default.authSubtitle,
155
- children: subtitle
156
- })]
157
- }),
158
- /* @__PURE__ */ jsxs("form", {
159
- onSubmit: handleSubmit,
160
- className: auth_pages_module_default.authForm,
161
- children: [
162
- /* @__PURE__ */ jsx(Field, {
163
- label: emailPlaceholder,
164
- id: id + "-email",
165
- error: submitted ? errors.email : void 0,
166
- children: /* @__PURE__ */ jsx("input", {
167
- id: id + "-email",
168
- type: "email",
169
- placeholder: "you@example.com",
170
- value: email,
171
- onChange: (e) => setEmail(e.target.value),
172
- className: auth_pages_module_default.input,
173
- autoComplete: "email",
174
- autoFocus: true
175
- })
176
- }),
177
- /* @__PURE__ */ jsx(PasswordField, {
178
- label: passwordPlaceholder,
179
- id: id + "-password",
180
- placeholder: passwordPlaceholder,
181
- value: password,
182
- onChange: (e) => {
183
- setPassword(e.target.value);
184
- if (submitted) setSubmitted(false);
185
- },
186
- error: submitted ? errors.password : void 0
187
- }),
188
- /* @__PURE__ */ jsx(CheckboxRow, {
189
- label: rememberLabel,
190
- linkText: forgotLinkText,
191
- linkHref: forgotLinkHref,
192
- checked: rememberMe,
193
- onChange: (c) => {
194
- setRememberMe(c);
195
- if (submitted) setSubmitted(false);
196
- }
197
- }),
198
- /* @__PURE__ */ jsx("button", {
199
- type: "submit",
200
- disabled: loading,
201
- className: auth_pages_module_default.submitButton,
202
- children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { className: auth_pages_module_default.spinner }), "Signing in..."] }) : "Sign in"
203
- })
204
- ]
205
- }),
206
- footer && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("hr", { className: auth_pages_module_default.divider }), /* @__PURE__ */ jsx("p", {
207
- className: auth_pages_module_default.authFooter,
208
- children: footer
209
- })] })
210
- ]
211
- })
212
- });
213
- }
214
- function SignUpPage({ title = "Create an account", subtitle, footer, onSubmit, loading = false, brand, className, emailPlaceholder = "Email address", passwordPlaceholder = "Password", confirmPasswordPlaceholder = "Confirm password", checkboxLabel, checkboxLinkText, checkboxLinkHref }) {
215
- const id = React.useId();
216
- const [email, setEmail] = React.useState("");
217
- const [password, setPassword] = React.useState("");
218
- const [confirmPassword, setConfirmPassword] = React.useState("");
219
- const [agreed, setAgreed] = React.useState(false);
220
- const [errors, setErrors] = React.useState({});
221
- const [submitted, setSubmitted] = React.useState(false);
222
- const validate = () => {
223
- const newErrors = {};
224
- if (!email.trim()) newErrors.email = "Email is required";
225
- else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) newErrors.email = "Enter a valid email";
226
- if (!password) newErrors.password = "Password is required";
227
- else if (password.length < 8) newErrors.password = "At least 8 characters";
228
- if (password !== confirmPassword) newErrors.confirmPassword = "Passwords do not match";
229
- if (!agreed) newErrors.agreed = "You must agree to continue";
230
- setErrors(newErrors);
231
- return Object.keys(newErrors).length === 0;
232
- };
233
- const handleSubmit = (e) => {
234
- e.preventDefault();
235
- setSubmitted(true);
236
- if (!validate()) return;
237
- onSubmit?.({
238
- email,
239
- password,
240
- agreed
241
- });
242
- };
2
+ import layout_primitives_module_default from "./index49.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/components/layout-primitives/LayoutPrimitives.tsx
5
+ var GAP_CLASS = {
6
+ xs: "gap-xs",
7
+ sm: "gap-sm",
8
+ md: "gap-md",
9
+ lg: "gap-lg",
10
+ xl: "gap-xl"
11
+ };
12
+ function Stack({ gap = "md", className, children, ...rest }) {
243
13
  return /* @__PURE__ */ jsx("div", {
244
- className: cx(auth_pages_module_default.authLayout, className),
245
- children: /* @__PURE__ */ jsxs("div", {
246
- className: auth_pages_module_default.authCard,
247
- children: [
248
- brand && /* @__PURE__ */ jsx("div", {
249
- className: auth_pages_module_default.authBrand,
250
- children: brand
251
- }),
252
- /* @__PURE__ */ jsxs("div", {
253
- className: auth_pages_module_default.authHeader,
254
- children: [/* @__PURE__ */ jsx("h1", {
255
- className: auth_pages_module_default.authTitle,
256
- children: title
257
- }), subtitle && /* @__PURE__ */ jsx("p", {
258
- className: auth_pages_module_default.authSubtitle,
259
- children: subtitle
260
- })]
261
- }),
262
- /* @__PURE__ */ jsxs("form", {
263
- onSubmit: handleSubmit,
264
- className: auth_pages_module_default.authForm,
265
- children: [
266
- /* @__PURE__ */ jsx(Field, {
267
- label: emailPlaceholder,
268
- id: id + "-email",
269
- error: submitted ? errors.email : void 0,
270
- children: /* @__PURE__ */ jsx("input", {
271
- id: id + "-email",
272
- type: "email",
273
- placeholder: "you@example.com",
274
- value: email,
275
- onChange: (e) => {
276
- setEmail(e.target.value);
277
- if (submitted) setSubmitted(false);
278
- },
279
- className: auth_pages_module_default.input,
280
- autoComplete: "email",
281
- autoFocus: true
282
- })
283
- }),
284
- /* @__PURE__ */ jsx(PasswordField, {
285
- label: passwordPlaceholder,
286
- id: id + "-password",
287
- placeholder: passwordPlaceholder,
288
- value: password,
289
- onChange: (e) => {
290
- setPassword(e.target.value);
291
- if (submitted) setSubmitted(false);
292
- },
293
- error: submitted ? errors.password : void 0
294
- }),
295
- /* @__PURE__ */ jsx(PasswordField, {
296
- label: confirmPasswordPlaceholder,
297
- id: id + "-confirm",
298
- placeholder: confirmPasswordPlaceholder,
299
- value: confirmPassword,
300
- onChange: (e) => {
301
- setConfirmPassword(e.target.value);
302
- if (submitted) setSubmitted(false);
303
- },
304
- error: submitted ? errors.confirmPassword : void 0
305
- }),
306
- checkboxLabel && /* @__PURE__ */ jsx("div", {
307
- className: auth_pages_module_default.checkboxRow,
308
- children: /* @__PURE__ */ jsxs("label", {
309
- className: auth_pages_module_default.checkboxLabel,
310
- children: [/* @__PURE__ */ jsx("input", {
311
- id: id + "-agreed",
312
- type: "checkbox",
313
- checked: agreed,
314
- onChange: (e) => {
315
- setAgreed(e.target.checked);
316
- if (submitted) setSubmitted(false);
317
- },
318
- className: auth_pages_module_default.checkbox
319
- }), /* @__PURE__ */ jsx("span", { children: checkboxLinkText ? /* @__PURE__ */ jsxs(Fragment, { children: [
320
- "I agree to the",
321
- " ",
322
- /* @__PURE__ */ jsx("a", {
323
- href: checkboxLinkHref,
324
- className: auth_pages_module_default.checkboxLink,
325
- children: checkboxLinkText
326
- })
327
- ] }) : checkboxLabel })]
328
- })
329
- }),
330
- submitted && errors.agreed && /* @__PURE__ */ jsx("span", {
331
- className: auth_pages_module_default.error,
332
- children: errors.agreed
333
- }),
334
- /* @__PURE__ */ jsx("button", {
335
- type: "submit",
336
- disabled: loading,
337
- className: auth_pages_module_default.submitButton,
338
- children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { className: auth_pages_module_default.spinner }), "Creating account..."] }) : "Create account"
339
- })
340
- ]
341
- }),
342
- footer && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("hr", { className: auth_pages_module_default.divider }), /* @__PURE__ */ jsx("p", {
343
- className: auth_pages_module_default.authFooter,
344
- children: footer
345
- })] })
346
- ]
347
- })
14
+ className: cx(layout_primitives_module_default.stack, layout_primitives_module_default[GAP_CLASS[gap]], className),
15
+ ...rest,
16
+ children
348
17
  });
349
18
  }
350
- function ForgotPasswordPage({ title = "Reset password", subtitle = "Enter your email and we'll send a reset link", footer, onSubmit, loading = false, brand, className, emailPlaceholder = "Email address", buttonText = "Send reset link", backLinkText = "Back to sign in", backLinkHref = "/signin" }) {
351
- const id = React.useId();
352
- const [email, setEmail] = React.useState("");
353
- const [error, setError] = React.useState("");
354
- const [sent, setSent] = React.useState(false);
355
- const handleSubmit = (e) => {
356
- e.preventDefault();
357
- if (!email.trim()) {
358
- setError("Email is required");
359
- return;
360
- }
361
- if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
362
- setError("Enter a valid email");
363
- return;
364
- }
365
- onSubmit?.({ email });
366
- setSent(true);
19
+ function Inline({ gap = "md", align = "center", justify = "start", wrap = true, className, children, style, ...rest }) {
20
+ const inlineStyle = {
21
+ ...style,
22
+ alignItems: align === "start" ? "flex-start" : align === "end" ? "flex-end" : align,
23
+ justifyContent: justify === "between" ? "space-between" : justify === "start" ? "flex-start" : justify === "end" ? "flex-end" : justify
367
24
  };
368
25
  return /* @__PURE__ */ jsx("div", {
369
- className: cx(auth_pages_module_default.authLayout, className),
370
- children: /* @__PURE__ */ jsxs("div", {
371
- className: auth_pages_module_default.authCard,
372
- children: [
373
- brand && /* @__PURE__ */ jsx("div", {
374
- className: auth_pages_module_default.authBrand,
375
- children: brand
376
- }),
377
- /* @__PURE__ */ jsxs("div", {
378
- className: auth_pages_module_default.authHeader,
379
- children: [/* @__PURE__ */ jsx("h1", {
380
- className: auth_pages_module_default.authTitle,
381
- children: title
382
- }), subtitle && /* @__PURE__ */ jsx("p", {
383
- className: auth_pages_module_default.authSubtitle,
384
- children: subtitle
385
- })]
386
- }),
387
- sent ? /* @__PURE__ */ jsxs("div", {
388
- className: auth_pages_module_default.sentMessage,
389
- children: [/* @__PURE__ */ jsxs("p", {
390
- className: auth_pages_module_default.sentText,
391
- children: [
392
- "If an account exists for ",
393
- /* @__PURE__ */ jsx("strong", { children: email }),
394
- ", you'll receive a reset link shortly."
395
- ]
396
- }), /* @__PURE__ */ jsx("a", {
397
- href: backLinkHref,
398
- className: auth_pages_module_default.backLink,
399
- children: backLinkText
400
- })]
401
- }) : /* @__PURE__ */ jsxs("form", {
402
- onSubmit: handleSubmit,
403
- className: auth_pages_module_default.authForm,
404
- children: [/* @__PURE__ */ jsx(Field, {
405
- label: emailPlaceholder,
406
- id: id + "-email",
407
- error,
408
- children: /* @__PURE__ */ jsx("input", {
409
- id: id + "-email",
410
- type: "email",
411
- placeholder: "you@example.com",
412
- value: email,
413
- onChange: (e) => {
414
- setEmail(e.target.value);
415
- setError("");
416
- },
417
- className: auth_pages_module_default.input,
418
- autoComplete: "email",
419
- autoFocus: true
420
- })
421
- }), /* @__PURE__ */ jsx("button", {
422
- type: "submit",
423
- disabled: loading,
424
- className: auth_pages_module_default.submitButton,
425
- children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { className: auth_pages_module_default.spinner }), "Sending..."] }) : buttonText
426
- })]
427
- }),
428
- footer && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("hr", { className: auth_pages_module_default.divider }), /* @__PURE__ */ jsx("p", {
429
- className: auth_pages_module_default.authFooter,
430
- children: footer
431
- })] })
432
- ]
433
- })
26
+ className: cx(layout_primitives_module_default.inline, layout_primitives_module_default[GAP_CLASS[gap]], !wrap && layout_primitives_module_default.nowrap, className),
27
+ style: inlineStyle,
28
+ ...rest,
29
+ children
434
30
  });
435
31
  }
436
32
  //#endregion
437
- export { ForgotPasswordPage, SignInPage, SignUpPage };
33
+ export { Inline, Stack };
438
34
 
439
35
  //# sourceMappingURL=index50.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index50.js","names":[],"sources":["../src/components/auth-pages/AuthPages.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./auth-pages.module.css\";\n\n// ── Eye icon (show/hide password) ──\nfunction EyeIcon({ open }: { open: boolean }) {\n if (open) {\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\" className={styles.eyeIcon}>\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" stroke=\"currentColor\" strokeWidth=\"2\" />\n </svg>\n );\n }\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\" className={styles.eyeIcon}>\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path d=\"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\" stroke=\"currentColor\" strokeWidth=\"2\" />\n </svg>\n );\n}\n\n// ── Internal reusable field ──\ninterface FieldProps {\n label: string;\n id: string;\n children: React.ReactNode;\n error?: string;\n}\n\nfunction Field({ label, id, children, error }: FieldProps) {\n return (\n <div className={styles.field}>\n <label htmlFor={id} className={styles.label}>\n {label}\n </label>\n {children}\n {error && <span className={styles.error}>{error}</span>}\n </div>\n );\n}\n\n// ── Password input with visibility toggle ──\ninterface PasswordFieldProps {\n id: string;\n label?: string;\n placeholder?: string;\n value?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n error?: string;\n}\n\nfunction PasswordField({ id, label, placeholder, value, onChange, error }: PasswordFieldProps) {\n const [show, setShow] = React.useState(false);\n const toggleRef = React.useRef<HTMLButtonElement>(null);\n\n return (\n <Field label={label ?? \"Password\"} id={id} error={error}>\n <div className={styles.passwordWrapper}>\n <input\n id={id}\n type={show ? \"text\" : \"password\"}\n placeholder={placeholder}\n value={value}\n onChange={onChange}\n className={styles.input}\n />\n <button\n ref={toggleRef}\n type=\"button\"\n onClick={() => setShow((s) => !s)}\n className={styles.toggle}\n aria-label={show ? \"Hide password\" : \"Show password\"}\n >\n <EyeIcon open={show} />\n </button>\n </div>\n </Field>\n );\n}\n\n// ── Checkbox row ──\ninterface CheckboxRowProps {\n label?: string;\n linkText: string;\n linkHref?: string;\n}\n\ninterface CheckboxRowPropsExtended extends CheckboxRowProps {\n checked?: boolean;\n onChange?: (checked: boolean) => void;\n}\n\nfunction CheckboxRow({ label, linkText, linkHref, checked, onChange }: CheckboxRowPropsExtended) {\n if (!label) return null;\n return (\n <div className={styles.checkboxRow}>\n <label className={styles.checkboxLabel}>\n <input\n type=\"checkbox\"\n className={styles.checkbox}\n checked={checked}\n onChange={(e) => onChange?.(e.target.checked)}\n />\n <span>{label}</span>\n </label>\n {linkHref && (\n <a href={linkHref} className={styles.forgotLink}>\n {linkText}\n </a>\n )}\n </div>\n );\n}\n\n// ── Shared props ──\ninterface BaseAuthPageProps {\n /** Page title */\n title: string;\n /** Page subtitle */\n subtitle?: string;\n /** Footer content (e.g., \"No account? Sign up\") */\n footer?: React.ReactNode;\n /** Called with form data on valid submit */\n onSubmit?: (data: Record<string, string | boolean>) => void;\n /** Loading state for the submit button */\n loading?: boolean;\n /** Optional brand/logo element */\n brand?: React.ReactNode;\n /** Extra class for the outer wrapper */\n className?: string;\n}\n\n// ── Sign In Page ──\nexport interface SignInPageProps extends BaseAuthPageProps {\n /** Email placeholder (default \"Email address\") */\n emailPlaceholder?: string;\n /** Password placeholder (default \"Password\") */\n passwordPlaceholder?: string;\n /** \"Remember me\" checkbox label */\n rememberLabel?: string;\n /** \"Forgot password\" link text */\n forgotLinkText?: string;\n /** \"Forgot password\" link href */\n forgotLinkHref?: string;\n}\n\nexport function SignInPage({\n title = \"Sign in\",\n subtitle,\n footer,\n onSubmit,\n loading = false,\n brand,\n className,\n emailPlaceholder = \"Email address\",\n passwordPlaceholder = \"Password\",\n rememberLabel = \"Remember me\",\n forgotLinkText = \"Forgot password?\",\n forgotLinkHref,\n}: SignInPageProps) {\n const id = React.useId();\n const [email, setEmail] = React.useState(\"\");\n const [password, setPassword] = React.useState(\"\");\n const [rememberMe, setRememberMe] = React.useState(false);\n const [errors, setErrors] = React.useState<Record<string, string>>({});\n const [submitted, setSubmitted] = React.useState(false);\n\n const validate = (): boolean => {\n const newErrors: Record<string, string> = {};\n if (!email.trim()) newErrors.email = \"Email is required\";\n else if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email)) newErrors.email = \"Enter a valid email\";\n if (!password) newErrors.password = \"Password is required\";\n setErrors(newErrors);\n return Object.keys(newErrors).length === 0;\n };\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setSubmitted(true);\n if (!validate()) return;\n onSubmit?.({ email, password, rememberMe });\n };\n\n return (\n <div className={cx(styles.authLayout, className)}>\n <div className={styles.authCard}>\n {brand && <div className={styles.authBrand}>{brand}</div>}\n <div className={styles.authHeader}>\n <h1 className={styles.authTitle}>{title}</h1>\n {subtitle && <p className={styles.authSubtitle}>{subtitle}</p>}\n </div>\n <form onSubmit={handleSubmit} className={styles.authForm}>\n <Field label={emailPlaceholder} id={id + \"-email\"} error={submitted ? errors.email : undefined}>\n <input\n id={id + \"-email\"}\n type=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n className={styles.input}\n autoComplete=\"email\"\n autoFocus\n />\n </Field>\n <PasswordField\n label={passwordPlaceholder}\n id={id + \"-password\"}\n placeholder={passwordPlaceholder}\n value={password}\n onChange={(e) => { setPassword(e.target.value); if (submitted) setSubmitted(false); }}\n error={submitted ? errors.password : undefined}\n />\n <CheckboxRow\n label={rememberLabel}\n linkText={forgotLinkText}\n linkHref={forgotLinkHref}\n checked={rememberMe}\n onChange={(c) => { setRememberMe(c); if (submitted) setSubmitted(false); }}\n />\n <button\n type=\"submit\"\n disabled={loading}\n className={styles.submitButton}\n >\n {loading ? (\n <>\n <span className={styles.spinner} />\n Signing in...\n </>\n ) : (\n \"Sign in\"\n )}\n </button>\n </form>\n {footer && (\n <>\n <hr className={styles.divider} />\n <p className={styles.authFooter}>{footer}</p>\n </>\n )}\n </div>\n </div>\n );\n}\n\n// ── Sign Up Page ──\nexport interface SignUpPageProps extends BaseAuthPageProps {\n /** Email placeholder */\n emailPlaceholder?: string;\n /** Password placeholder */\n passwordPlaceholder?: string;\n /** Confirm password placeholder */\n confirmPasswordPlaceholder?: string;\n /** Checkbox label (e.g., \"I agree to the Terms of Service\") */\n checkboxLabel?: string;\n /** Checkbox href */\n checkboxLinkText?: string;\n /** Checkbox href */\n checkboxLinkHref?: string;\n}\n\nexport function SignUpPage({\n title = \"Create an account\",\n subtitle,\n footer,\n onSubmit,\n loading = false,\n brand,\n className,\n emailPlaceholder = \"Email address\",\n passwordPlaceholder = \"Password\",\n confirmPasswordPlaceholder = \"Confirm password\",\n checkboxLabel,\n checkboxLinkText,\n checkboxLinkHref,\n}: SignUpPageProps) {\n const id = React.useId();\n const [email, setEmail] = React.useState(\"\");\n const [password, setPassword] = React.useState(\"\");\n const [confirmPassword, setConfirmPassword] = React.useState(\"\");\n const [agreed, setAgreed] = React.useState(false);\n const [errors, setErrors] = React.useState<Record<string, string>>({});\n const [submitted, setSubmitted] = React.useState(false);\n\n const validate = (): boolean => {\n const newErrors: Record<string, string> = {};\n if (!email.trim()) newErrors.email = \"Email is required\";\n else if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email)) newErrors.email = \"Enter a valid email\";\n if (!password) newErrors.password = \"Password is required\";\n else if (password.length < 8) newErrors.password = \"At least 8 characters\";\n if (password !== confirmPassword) newErrors.confirmPassword = \"Passwords do not match\";\n if (!agreed) newErrors.agreed = \"You must agree to continue\";\n setErrors(newErrors);\n return Object.keys(newErrors).length === 0;\n };\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setSubmitted(true);\n if (!validate()) return;\n onSubmit?.({ email, password, agreed });\n };\n\n return (\n <div className={cx(styles.authLayout, className)}>\n <div className={styles.authCard}>\n {brand && <div className={styles.authBrand}>{brand}</div>}\n <div className={styles.authHeader}>\n <h1 className={styles.authTitle}>{title}</h1>\n {subtitle && <p className={styles.authSubtitle}>{subtitle}</p>}\n </div>\n <form onSubmit={handleSubmit} className={styles.authForm}>\n <Field label={emailPlaceholder} id={id + \"-email\"} error={submitted ? errors.email : undefined}>\n <input\n id={id + \"-email\"}\n type=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={(e) => { setEmail(e.target.value); if (submitted) setSubmitted(false); }}\n className={styles.input}\n autoComplete=\"email\"\n autoFocus\n />\n </Field>\n <PasswordField\n label={passwordPlaceholder}\n id={id + \"-password\"}\n placeholder={passwordPlaceholder}\n value={password}\n onChange={(e) => { setPassword(e.target.value); if (submitted) setSubmitted(false); }}\n error={submitted ? errors.password : undefined}\n />\n <PasswordField\n label={confirmPasswordPlaceholder}\n id={id + \"-confirm\"}\n placeholder={confirmPasswordPlaceholder}\n value={confirmPassword}\n onChange={(e) => { setConfirmPassword(e.target.value); if (submitted) setSubmitted(false); }}\n error={submitted ? errors.confirmPassword : undefined}\n />\n {checkboxLabel && (\n <div className={styles.checkboxRow}>\n <label className={styles.checkboxLabel}>\n <input\n id={id + \"-agreed\"}\n type=\"checkbox\"\n checked={agreed}\n onChange={(e) => { setAgreed(e.target.checked); if (submitted) setSubmitted(false); }}\n className={styles.checkbox}\n />\n <span>\n {checkboxLinkText ? (\n <>\n I agree to the{\" \"}\n <a href={checkboxLinkHref} className={styles.checkboxLink}>\n {checkboxLinkText}\n </a>\n </>\n ) : (\n checkboxLabel\n )}\n </span>\n </label>\n </div>\n )}\n {submitted && errors.agreed && <span className={styles.error}>{errors.agreed}</span>}\n <button\n type=\"submit\"\n disabled={loading}\n className={styles.submitButton}\n >\n {loading ? (\n <>\n <span className={styles.spinner} />\n Creating account...\n </>\n ) : (\n \"Create account\"\n )}\n </button>\n </form>\n {footer && (\n <>\n <hr className={styles.divider} />\n <p className={styles.authFooter}>{footer}</p>\n </>\n )}\n </div>\n </div>\n );\n}\n\n// ── Forgot Password Page ──\nexport interface ForgotPasswordPageProps extends BaseAuthPageProps {\n /** Email placeholder */\n emailPlaceholder?: string;\n /** Button text */\n buttonText?: string;\n /** Back to sign in link text */\n backLinkText?: string;\n /** Back to sign in link href */\n backLinkHref?: string;\n}\n\nexport function ForgotPasswordPage({\n title = \"Reset password\",\n subtitle = \"Enter your email and we'll send a reset link\",\n footer,\n onSubmit,\n loading = false,\n brand,\n className,\n emailPlaceholder = \"Email address\",\n buttonText = \"Send reset link\",\n backLinkText = \"Back to sign in\",\n backLinkHref = \"/signin\",\n}: ForgotPasswordPageProps) {\n const id = React.useId();\n const [email, setEmail] = React.useState(\"\");\n const [error, setError] = React.useState(\"\");\n const [sent, setSent] = React.useState(false);\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n if (!email.trim()) { setError(\"Email is required\"); return; }\n if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email)) { setError(\"Enter a valid email\"); return; }\n onSubmit?.({ email });\n setSent(true);\n };\n\n return (\n <div className={cx(styles.authLayout, className)}>\n <div className={styles.authCard}>\n {brand && <div className={styles.authBrand}>{brand}</div>}\n <div className={styles.authHeader}>\n <h1 className={styles.authTitle}>{title}</h1>\n {subtitle && <p className={styles.authSubtitle}>{subtitle}</p>}\n </div>\n {sent ? (\n <div className={styles.sentMessage}>\n <p className={styles.sentText}>\n If an account exists for <strong>{email}</strong>, you'll receive a reset link shortly.\n </p>\n <a href={backLinkHref} className={styles.backLink}>\n {backLinkText}\n </a>\n </div>\n ) : (\n <form onSubmit={handleSubmit} className={styles.authForm}>\n <Field label={emailPlaceholder} id={id + \"-email\"} error={error}>\n <input\n id={id + \"-email\"}\n type=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={(e) => { setEmail(e.target.value); setError(\"\"); }}\n className={styles.input}\n autoComplete=\"email\"\n autoFocus\n />\n </Field>\n <button\n type=\"submit\"\n disabled={loading}\n className={styles.submitButton}\n >\n {loading ? (\n <>\n <span className={styles.spinner} />\n Sending...\n </>\n ) : (\n buttonText\n )}\n </button>\n </form>\n )}\n {footer && (\n <>\n <hr className={styles.divider} />\n <p className={styles.authFooter}>{footer}</p>\n </>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AAKA,SAAS,QAAQ,EAAE,QAA2B;CAC5C,IAAI,MACF,OACE,qBAAC,OAAD;EAAK,SAAQ;EAAY,MAAK;EAAO,eAAY;EAAO,WAAW,0BAAO;YAA1E,CACE,oBAAC,QAAD;GAAM,GAAE;GAA+C,QAAO;GAAe,aAAY;EAAK,CAAA,GAC9F,oBAAC,UAAD;GAAQ,IAAG;GAAK,IAAG;GAAK,GAAE;GAAI,QAAO;GAAe,aAAY;EAAK,CAAA,CAClE;;CAGT,OACE,qBAAC,OAAD;EAAK,SAAQ;EAAY,MAAK;EAAO,e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../src/components/layout-primitives/LayoutPrimitives.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes } from \"react\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./layout-primitives.module.css\";\n\nexport type LayoutGap = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type InlineAlign = \"start\" | \"center\" | \"end\" | \"baseline\";\nexport type InlineJustify = \"start\" | \"center\" | \"end\" | \"between\";\n\nconst GAP_CLASS: Record<LayoutGap, string> = {\n xs: \"gap-xs\",\n sm: \"gap-sm\",\n md: \"gap-md\",\n lg: \"gap-lg\",\n xl: \"gap-xl\",\n};\n\nexport type StackProps = HTMLAttributes<HTMLDivElement> & {\n gap?: LayoutGap;\n};\n\nexport function Stack({ gap = \"md\", className, children, ...rest }: StackProps) {\n return (\n <div className={cx(styles.stack, styles[GAP_CLASS[gap]], className)} {...rest}>\n {children}\n </div>\n );\n}\n\nexport type InlineProps = HTMLAttributes<HTMLDivElement> & {\n gap?: LayoutGap;\n align?: InlineAlign;\n justify?: InlineJustify;\n wrap?: boolean;\n};\n\nexport function Inline({\n gap = \"md\",\n align = \"center\",\n justify = \"start\",\n wrap = true,\n className,\n children,\n style,\n ...rest\n}: InlineProps) {\n const inlineStyle: CSSProperties = {\n ...style,\n alignItems: align === \"start\" ? \"flex-start\" : align === \"end\" ? \"flex-end\" : align,\n justifyContent:\n justify === \"between\" ? \"space-between\" : justify === \"start\" ? \"flex-start\" : justify === \"end\" ? \"flex-end\" : justify,\n };\n\n return (\n <div\n className={cx(styles.inline, styles[GAP_CLASS[gap]], !wrap && styles.nowrap, className)}\n style={inlineStyle}\n {...rest}\n >\n {children}\n </div>\n );\n}\n"],"mappings":";;;;AAQA,IAAM,YAAuC;CAC3C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAMA,SAAgB,MAAM,EAAE,MAAM,MAAM,WAAW,UAAU,GAAG,QAAoB;CAC9E,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,iCAAO,OAAO,iCAAO,UAAU,OAAO,SAAS;EAAG,GAAI;EACtE;CACE,CAAA;AAET;AASA,SAAgB,OAAO,EACrB,MAAM,MACN,QAAQ,UACR,UAAU,SACV,OAAO,MACP,WACA,UACA,OACA,GAAG,QACW;CACd,MAAM,cAA6B;EACjC,GAAG;EACH,YAAY,UAAU,UAAU,eAAe,UAAU,QAAQ,aAAa;EAC9E,gBACE,YAAY,YAAY,kBAAkB,YAAY,UAAU,eAAe,YAAY,QAAQ,aAAa;CACpH;CAEA,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,iCAAO,QAAQ,iCAAO,UAAU,OAAO,CAAC,QAAQ,iCAAO,QAAQ,SAAS;EACtF,OAAO;EACP,GAAI;EAEH;CACE,CAAA;AAET"}