@akira-io/ui 1.3.1 → 2.0.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.
- package/README.md +2 -2
- package/dist/blocks.d.ts +100 -10
- package/dist/blocks.js +547 -270
- package/dist/blocks.js.map +1 -1
- package/dist/chunk-2V6HUWST.js +18 -5
- package/dist/chunk-2V6HUWST.js.map +1 -1
- package/dist/chunk-3Z2VGVPI.js +16 -6
- package/dist/chunk-3Z2VGVPI.js.map +1 -1
- package/dist/chunk-B3L6PRLX.js +207 -99
- package/dist/chunk-B3L6PRLX.js.map +1 -1
- package/dist/chunk-DE2AJ54R.js +458 -0
- package/dist/chunk-DE2AJ54R.js.map +1 -0
- package/dist/{chunk-QNF4LJVT.js → chunk-E26KKMGS.js} +8 -6
- package/dist/chunk-E26KKMGS.js.map +1 -0
- package/dist/{chunk-N2KIFFI7.js → chunk-EYPM6IMS.js} +30 -34
- package/dist/chunk-EYPM6IMS.js.map +1 -0
- package/dist/chunk-IQMRJXEO.js +5 -4
- package/dist/chunk-IQMRJXEO.js.map +1 -1
- package/dist/chunk-KHOA4TEI.js +53 -24
- package/dist/chunk-KHOA4TEI.js.map +1 -1
- package/dist/chunk-L2H5GIF7.js +5 -4
- package/dist/chunk-L2H5GIF7.js.map +1 -1
- package/dist/chunk-SZUXATOF.js +169 -75
- package/dist/chunk-SZUXATOF.js.map +1 -1
- package/dist/chunk-TM5MN3MI.js +29 -0
- package/dist/chunk-TM5MN3MI.js.map +1 -0
- package/dist/{chunk-I6VVCFZ2.js → chunk-UCJTM3UM.js} +254 -243
- package/dist/chunk-UCJTM3UM.js.map +1 -0
- package/dist/{chunk-IDNOI4OK.js → chunk-UXVI326F.js} +15 -8
- package/dist/chunk-UXVI326F.js.map +1 -0
- package/dist/chunk-VA6A4HZ2.js +394 -0
- package/dist/chunk-VA6A4HZ2.js.map +1 -0
- package/dist/chunk-YBXRJSR3.js +14 -6
- package/dist/chunk-YBXRJSR3.js.map +1 -1
- package/dist/code.d.ts +2 -2
- package/dist/code.js +96 -52
- package/dist/code.js.map +1 -1
- package/dist/{context-OwSoVEri.d.ts → context-Soro3B1I.d.ts} +5 -4
- package/dist/editor.d.ts +1 -1
- package/dist/editor.js +135 -52
- package/dist/editor.js.map +1 -1
- package/dist/{field-DWm5NXeV.d.ts → field-C1TdmC2t.d.ts} +1 -1
- package/dist/index.d.ts +14 -11
- package/dist/index.js +1105 -633
- package/dist/index.js.map +1 -1
- package/dist/inertia.d.ts +11 -3
- package/dist/inertia.js +66 -12
- package/dist/inertia.js.map +1 -1
- package/dist/{input-Dxnsxi-f.d.ts → input-B4uEClxB.d.ts} +1 -1
- package/dist/{json-viewer-BARA2RCW.d.ts → json-viewer-Bssv9mTD.d.ts} +1 -1
- package/dist/locales/pt.d.ts +9 -8
- package/dist/locales/pt.js +40 -3
- package/dist/locales/pt.js.map +1 -1
- package/dist/shells.d.ts +46 -5
- package/dist/shells.js +211 -71
- package/dist/shells.js.map +1 -1
- package/dist/{sidebar-Bp6Q46j-.d.ts → sidebar-BLL2tgTt.d.ts} +2 -2
- package/dist/types-1LUmNJf_.d.ts +41 -0
- package/dist/{types-cmBL8zOc.d.ts → types-CMZRvMV5.d.ts} +1 -1
- package/dist/{types-B-eGPoFD.d.ts → types-CfAUvz--.d.ts} +1 -1
- package/package.json +4 -2
- package/dist/chunk-I6VVCFZ2.js.map +0 -1
- package/dist/chunk-IDNOI4OK.js.map +0 -1
- package/dist/chunk-N2KIFFI7.js.map +0 -1
- package/dist/chunk-NGMG2UWX.js +0 -172
- package/dist/chunk-NGMG2UWX.js.map +0 -1
- package/dist/chunk-QNF4LJVT.js.map +0 -1
- package/dist/types-u1qfmJQi.d.ts +0 -28
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Alert,
|
|
3
|
+
AlertDescription,
|
|
4
|
+
Checkbox,
|
|
5
|
+
Field,
|
|
6
|
+
FieldControl,
|
|
7
|
+
FieldLabel,
|
|
8
|
+
PasswordInput
|
|
9
|
+
} from "./chunk-VA6A4HZ2.js";
|
|
10
|
+
import {
|
|
11
|
+
useUiLabels
|
|
12
|
+
} from "./chunk-E26KKMGS.js";
|
|
13
|
+
import {
|
|
14
|
+
Label
|
|
15
|
+
} from "./chunk-TM5MN3MI.js";
|
|
16
|
+
import {
|
|
17
|
+
resolveLink
|
|
18
|
+
} from "./chunk-L2H5GIF7.js";
|
|
19
|
+
import {
|
|
20
|
+
Input
|
|
21
|
+
} from "./chunk-3Z2VGVPI.js";
|
|
22
|
+
import {
|
|
23
|
+
Button,
|
|
24
|
+
cn
|
|
25
|
+
} from "./chunk-KHOA4TEI.js";
|
|
26
|
+
|
|
27
|
+
// src/blocks/login-form/types.ts
|
|
28
|
+
var loginFormLabels = {
|
|
29
|
+
emailLabel: "Email address",
|
|
30
|
+
emailPlaceholder: "email@example.com",
|
|
31
|
+
passwordLabel: "Password",
|
|
32
|
+
passwordPlaceholder: "Password",
|
|
33
|
+
forgotPasswordLabel: "Forgot your password?",
|
|
34
|
+
rememberLabel: "Remember me",
|
|
35
|
+
submitLabel: "Log in",
|
|
36
|
+
submittingLabel: "Signing in"
|
|
37
|
+
};
|
|
38
|
+
function fieldError(errors, field) {
|
|
39
|
+
const value = errors[field];
|
|
40
|
+
if (!value) {
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
const messages = Array.isArray(value) ? value : [value];
|
|
44
|
+
return messages.find(
|
|
45
|
+
(message) => typeof message === "string" && message.length > 0
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/blocks/login-form/context.tsx
|
|
50
|
+
import { createContext, useContext } from "react";
|
|
51
|
+
import { jsx } from "react/jsx-runtime";
|
|
52
|
+
var LoginFormContext = createContext({
|
|
53
|
+
errors: {},
|
|
54
|
+
processing: false
|
|
55
|
+
});
|
|
56
|
+
function useLoginFormContext() {
|
|
57
|
+
const context = useContext(LoginFormContext);
|
|
58
|
+
const labels = useUiLabels("loginForm", loginFormLabels, context.labels);
|
|
59
|
+
return { ...context, labels };
|
|
60
|
+
}
|
|
61
|
+
function LoginFormProvider({
|
|
62
|
+
errors = {},
|
|
63
|
+
processing = false,
|
|
64
|
+
linkComponent,
|
|
65
|
+
labels,
|
|
66
|
+
children
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
LoginFormContext.Provider,
|
|
70
|
+
{
|
|
71
|
+
value: {
|
|
72
|
+
errors,
|
|
73
|
+
processing,
|
|
74
|
+
linkComponent,
|
|
75
|
+
labels
|
|
76
|
+
},
|
|
77
|
+
children
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// src/blocks/login-form/parts.tsx
|
|
83
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
84
|
+
function LoginFormRoot({
|
|
85
|
+
errors,
|
|
86
|
+
processing,
|
|
87
|
+
linkComponent,
|
|
88
|
+
labels,
|
|
89
|
+
children,
|
|
90
|
+
className,
|
|
91
|
+
slotName = "login-form"
|
|
92
|
+
}) {
|
|
93
|
+
return /* @__PURE__ */ jsx2(
|
|
94
|
+
LoginFormProvider,
|
|
95
|
+
{
|
|
96
|
+
errors,
|
|
97
|
+
processing,
|
|
98
|
+
linkComponent,
|
|
99
|
+
labels,
|
|
100
|
+
children: /* @__PURE__ */ jsx2("div", { "data-slot": slotName, className: cn("gap-6 grid", className), children })
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
function LoginFormStatus({
|
|
105
|
+
message,
|
|
106
|
+
slotName = "login-form-status"
|
|
107
|
+
}) {
|
|
108
|
+
if (!message) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
return /* @__PURE__ */ jsx2(Alert, { slotName, children: /* @__PURE__ */ jsx2(AlertDescription, { children: message }) });
|
|
112
|
+
}
|
|
113
|
+
function LoginFormEmail({
|
|
114
|
+
id = "email",
|
|
115
|
+
name = "email",
|
|
116
|
+
label,
|
|
117
|
+
placeholder,
|
|
118
|
+
error,
|
|
119
|
+
tabIndex,
|
|
120
|
+
autoFocus = true,
|
|
121
|
+
required = true,
|
|
122
|
+
slotName = "login-form-email"
|
|
123
|
+
}) {
|
|
124
|
+
const { errors, labels } = useLoginFormContext();
|
|
125
|
+
const message = error ?? fieldError(errors, name);
|
|
126
|
+
return /* @__PURE__ */ jsxs(Field, { id, error: message, required, slotName, children: [
|
|
127
|
+
/* @__PURE__ */ jsx2(FieldLabel, { children: label ?? labels.emailLabel }),
|
|
128
|
+
/* @__PURE__ */ jsx2(FieldControl, { children: /* @__PURE__ */ jsx2(
|
|
129
|
+
Input,
|
|
130
|
+
{
|
|
131
|
+
name,
|
|
132
|
+
type: "email",
|
|
133
|
+
required,
|
|
134
|
+
autoFocus,
|
|
135
|
+
autoComplete: "email",
|
|
136
|
+
tabIndex,
|
|
137
|
+
placeholder: placeholder ?? labels.emailPlaceholder
|
|
138
|
+
}
|
|
139
|
+
) })
|
|
140
|
+
] });
|
|
141
|
+
}
|
|
142
|
+
function LoginFormPassword({
|
|
143
|
+
id = "password",
|
|
144
|
+
name = "password",
|
|
145
|
+
label,
|
|
146
|
+
placeholder,
|
|
147
|
+
error,
|
|
148
|
+
tabIndex,
|
|
149
|
+
autoFocus = false,
|
|
150
|
+
required = true,
|
|
151
|
+
forgotPasswordHref,
|
|
152
|
+
forgotPasswordLabel,
|
|
153
|
+
linkComponent,
|
|
154
|
+
slotName = "login-form-password"
|
|
155
|
+
}) {
|
|
156
|
+
const context = useLoginFormContext();
|
|
157
|
+
const message = error ?? fieldError(context.errors, name);
|
|
158
|
+
const Link = resolveLink(linkComponent ?? context.linkComponent);
|
|
159
|
+
return /* @__PURE__ */ jsxs(Field, { id, error: message, required, slotName, children: [
|
|
160
|
+
/* @__PURE__ */ jsx2(FieldLabel, { children: label ?? context.labels.passwordLabel }),
|
|
161
|
+
/* @__PURE__ */ jsx2(FieldControl, { children: /* @__PURE__ */ jsx2(
|
|
162
|
+
PasswordInput,
|
|
163
|
+
{
|
|
164
|
+
name,
|
|
165
|
+
required,
|
|
166
|
+
autoFocus,
|
|
167
|
+
autoComplete: "current-password",
|
|
168
|
+
tabIndex,
|
|
169
|
+
placeholder: placeholder ?? context.labels.passwordPlaceholder
|
|
170
|
+
}
|
|
171
|
+
) }),
|
|
172
|
+
forgotPasswordHref && /* @__PURE__ */ jsx2(
|
|
173
|
+
Link,
|
|
174
|
+
{
|
|
175
|
+
href: forgotPasswordHref,
|
|
176
|
+
className: "mr-1 text-xs font-medium self-end text-muted-foreground underline-offset-4 transition-colors hover:text-foreground hover:underline",
|
|
177
|
+
children: forgotPasswordLabel ?? context.labels.forgotPasswordLabel
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
] });
|
|
181
|
+
}
|
|
182
|
+
function LoginFormRemember({
|
|
183
|
+
id = "remember",
|
|
184
|
+
name = "remember",
|
|
185
|
+
label,
|
|
186
|
+
tabIndex,
|
|
187
|
+
slotName = "login-form-remember"
|
|
188
|
+
}) {
|
|
189
|
+
const { labels } = useLoginFormContext();
|
|
190
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": slotName, className: "gap-3 flex items-center", children: [
|
|
191
|
+
/* @__PURE__ */ jsx2(Checkbox, { id, name, tabIndex }),
|
|
192
|
+
/* @__PURE__ */ jsx2(Label, { htmlFor: id, children: label ?? labels.rememberLabel })
|
|
193
|
+
] });
|
|
194
|
+
}
|
|
195
|
+
function LoginFormSubmit({
|
|
196
|
+
label,
|
|
197
|
+
submittingLabel,
|
|
198
|
+
processing,
|
|
199
|
+
tabIndex,
|
|
200
|
+
slotName = "login-form-submit"
|
|
201
|
+
}) {
|
|
202
|
+
const context = useLoginFormContext();
|
|
203
|
+
const pending = processing ?? context.processing;
|
|
204
|
+
const pendingLabel = submittingLabel ?? context.labels.submittingLabel;
|
|
205
|
+
return /* @__PURE__ */ jsx2(
|
|
206
|
+
Button,
|
|
207
|
+
{
|
|
208
|
+
slotName,
|
|
209
|
+
type: "submit",
|
|
210
|
+
className: "w-full",
|
|
211
|
+
tabIndex,
|
|
212
|
+
"aria-label": pending ? pendingLabel : void 0,
|
|
213
|
+
loading: pending,
|
|
214
|
+
loadingLabel: pendingLabel,
|
|
215
|
+
children: pending ? pendingLabel : label ?? context.labels.submitLabel
|
|
216
|
+
}
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// src/blocks/login-form/preset.tsx
|
|
221
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
222
|
+
function LoginFormPreset({
|
|
223
|
+
errors,
|
|
224
|
+
processing,
|
|
225
|
+
linkComponent,
|
|
226
|
+
labels,
|
|
227
|
+
status,
|
|
228
|
+
forgotPasswordHref,
|
|
229
|
+
className,
|
|
230
|
+
slotName = "login-form"
|
|
231
|
+
}) {
|
|
232
|
+
return /* @__PURE__ */ jsxs2(
|
|
233
|
+
LoginFormRoot,
|
|
234
|
+
{
|
|
235
|
+
errors,
|
|
236
|
+
processing,
|
|
237
|
+
linkComponent,
|
|
238
|
+
labels,
|
|
239
|
+
className,
|
|
240
|
+
slotName,
|
|
241
|
+
children: [
|
|
242
|
+
/* @__PURE__ */ jsx3(LoginFormStatus, { message: status }),
|
|
243
|
+
/* @__PURE__ */ jsx3(LoginFormEmail, {}),
|
|
244
|
+
/* @__PURE__ */ jsx3(LoginFormPassword, { forgotPasswordHref }),
|
|
245
|
+
/* @__PURE__ */ jsx3(LoginFormRemember, {}),
|
|
246
|
+
/* @__PURE__ */ jsx3(LoginFormSubmit, {})
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// src/blocks/login-form/index.ts
|
|
253
|
+
var LoginForm = {
|
|
254
|
+
Root: LoginFormRoot,
|
|
255
|
+
Status: LoginFormStatus,
|
|
256
|
+
Email: LoginFormEmail,
|
|
257
|
+
Password: LoginFormPassword,
|
|
258
|
+
Remember: LoginFormRemember,
|
|
259
|
+
Submit: LoginFormSubmit
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
// src/blocks/tour/gate.ts
|
|
263
|
+
function stepsForBreakpoint(steps, breakpoint) {
|
|
264
|
+
return steps.filter(
|
|
265
|
+
(step) => !step.breakpoints || step.breakpoints.includes(breakpoint)
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
function resolveSteps(steps, isPresent) {
|
|
269
|
+
return steps.filter((step) => isPresent(step.target));
|
|
270
|
+
}
|
|
271
|
+
function shouldStartTour(input) {
|
|
272
|
+
if (input.resolvedStepCount === 0) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
if (input.force) {
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
278
|
+
return input.definition.version > (input.seen[input.definition.id] ?? 0);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// src/blocks/tour/types.ts
|
|
282
|
+
var DEFAULT_TOUR_LABELS = {
|
|
283
|
+
next: "Next",
|
|
284
|
+
previous: "Previous",
|
|
285
|
+
done: "Done",
|
|
286
|
+
progress: "{{current}} of {{total}}"
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// src/blocks/tour/tour.tsx
|
|
290
|
+
import { driver } from "driver.js";
|
|
291
|
+
import {
|
|
292
|
+
createContext as createContext2,
|
|
293
|
+
useCallback,
|
|
294
|
+
useContext as useContext2,
|
|
295
|
+
useEffect,
|
|
296
|
+
useMemo,
|
|
297
|
+
useRef
|
|
298
|
+
} from "react";
|
|
299
|
+
import "driver.js/dist/driver.css";
|
|
300
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
301
|
+
var TourContext = createContext2(null);
|
|
302
|
+
var MOBILE_BREAKPOINT = 768;
|
|
303
|
+
var WAIT_FOR_TARGET = 4e3;
|
|
304
|
+
function currentBreakpoint() {
|
|
305
|
+
return window.innerWidth < MOBILE_BREAKPOINT ? "mobile" : "desktop";
|
|
306
|
+
}
|
|
307
|
+
function outcomeOf(instance, highlighted) {
|
|
308
|
+
if (!highlighted) {
|
|
309
|
+
return "dismissed";
|
|
310
|
+
}
|
|
311
|
+
return instance.hasNextStep() ? "skipped" : "completed";
|
|
312
|
+
}
|
|
313
|
+
function TourProvider({
|
|
314
|
+
children,
|
|
315
|
+
seen,
|
|
316
|
+
onProgress,
|
|
317
|
+
labels
|
|
318
|
+
}) {
|
|
319
|
+
const seenRef = useRef(seen);
|
|
320
|
+
seenRef.current = seen;
|
|
321
|
+
const onProgressRef = useRef(onProgress);
|
|
322
|
+
onProgressRef.current = onProgress;
|
|
323
|
+
const driverRef = useRef(null);
|
|
324
|
+
const activeRef = useRef(null);
|
|
325
|
+
const { next, previous, done, progress } = useUiLabels(
|
|
326
|
+
"tour",
|
|
327
|
+
DEFAULT_TOUR_LABELS,
|
|
328
|
+
labels
|
|
329
|
+
);
|
|
330
|
+
const report = useCallback((outcome) => {
|
|
331
|
+
const active = activeRef.current;
|
|
332
|
+
if (!active) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
activeRef.current = null;
|
|
336
|
+
onProgressRef.current({
|
|
337
|
+
tour: active.definition.id,
|
|
338
|
+
version: active.definition.version,
|
|
339
|
+
lastStep: active.lastStep,
|
|
340
|
+
outcome
|
|
341
|
+
});
|
|
342
|
+
}, []);
|
|
343
|
+
const startTour = useCallback(
|
|
344
|
+
(definition, options) => {
|
|
345
|
+
const alreadyRunning = activeRef.current?.definition.id === definition.id;
|
|
346
|
+
if (alreadyRunning && !options?.force) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const steps = stepsForBreakpoint(
|
|
350
|
+
definition.steps,
|
|
351
|
+
currentBreakpoint()
|
|
352
|
+
);
|
|
353
|
+
const allowed = shouldStartTour({
|
|
354
|
+
definition,
|
|
355
|
+
seen: seenRef.current,
|
|
356
|
+
resolvedStepCount: steps.length,
|
|
357
|
+
force: options?.force
|
|
358
|
+
});
|
|
359
|
+
if (!allowed) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
driverRef.current?.destroy();
|
|
363
|
+
activeRef.current = { definition, lastStep: 0, highlighted: false };
|
|
364
|
+
const instance = driver({
|
|
365
|
+
showProgress: true,
|
|
366
|
+
progressText: progress,
|
|
367
|
+
nextBtnText: next,
|
|
368
|
+
prevBtnText: previous,
|
|
369
|
+
doneBtnText: done,
|
|
370
|
+
popoverClass: "akira-tour",
|
|
371
|
+
waitForElement: WAIT_FOR_TARGET,
|
|
372
|
+
skipMissingElement: true,
|
|
373
|
+
steps: steps.map((step) => ({
|
|
374
|
+
element: step.target,
|
|
375
|
+
popover: {
|
|
376
|
+
title: step.title,
|
|
377
|
+
description: step.description
|
|
378
|
+
}
|
|
379
|
+
})),
|
|
380
|
+
onHighlightStarted: () => {
|
|
381
|
+
if (activeRef.current) {
|
|
382
|
+
activeRef.current.lastStep = instance.getActiveIndex() ?? 0;
|
|
383
|
+
activeRef.current.highlighted = true;
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
onDestroyStarted: () => {
|
|
387
|
+
report(
|
|
388
|
+
outcomeOf(
|
|
389
|
+
instance,
|
|
390
|
+
activeRef.current?.highlighted ?? false
|
|
391
|
+
)
|
|
392
|
+
);
|
|
393
|
+
instance.destroy();
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
driverRef.current = instance;
|
|
397
|
+
instance.drive();
|
|
398
|
+
},
|
|
399
|
+
[report, next, previous, done, progress]
|
|
400
|
+
);
|
|
401
|
+
useEffect(
|
|
402
|
+
() => () => {
|
|
403
|
+
report("dismissed");
|
|
404
|
+
driverRef.current?.destroy();
|
|
405
|
+
driverRef.current = null;
|
|
406
|
+
},
|
|
407
|
+
[report]
|
|
408
|
+
);
|
|
409
|
+
const value = useMemo(() => ({ startTour }), [startTour]);
|
|
410
|
+
return /* @__PURE__ */ jsx4(TourContext.Provider, { value, children });
|
|
411
|
+
}
|
|
412
|
+
function useTourController() {
|
|
413
|
+
const context = useContext2(TourContext);
|
|
414
|
+
if (!context) {
|
|
415
|
+
throw new Error(
|
|
416
|
+
"useTourController must be used inside a TourProvider."
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
return context;
|
|
420
|
+
}
|
|
421
|
+
function useTour(definition, options) {
|
|
422
|
+
const { startTour } = useTourController();
|
|
423
|
+
const enabled = options?.enabled ?? true;
|
|
424
|
+
const definitionRef = useRef(definition);
|
|
425
|
+
definitionRef.current = definition;
|
|
426
|
+
useEffect(() => {
|
|
427
|
+
if (!enabled) {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
const frame = window.requestAnimationFrame(
|
|
431
|
+
() => startTour(definitionRef.current)
|
|
432
|
+
);
|
|
433
|
+
return () => window.cancelAnimationFrame(frame);
|
|
434
|
+
}, [definition.id, definition.version, enabled, startTour]);
|
|
435
|
+
return { restart: () => startTour(definitionRef.current, { force: true }) };
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export {
|
|
439
|
+
loginFormLabels,
|
|
440
|
+
useLoginFormContext,
|
|
441
|
+
LoginFormProvider,
|
|
442
|
+
LoginFormRoot,
|
|
443
|
+
LoginFormStatus,
|
|
444
|
+
LoginFormEmail,
|
|
445
|
+
LoginFormPassword,
|
|
446
|
+
LoginFormRemember,
|
|
447
|
+
LoginFormSubmit,
|
|
448
|
+
LoginFormPreset,
|
|
449
|
+
LoginForm,
|
|
450
|
+
stepsForBreakpoint,
|
|
451
|
+
resolveSteps,
|
|
452
|
+
shouldStartTour,
|
|
453
|
+
DEFAULT_TOUR_LABELS,
|
|
454
|
+
TourProvider,
|
|
455
|
+
useTourController,
|
|
456
|
+
useTour
|
|
457
|
+
};
|
|
458
|
+
//# sourceMappingURL=chunk-DE2AJ54R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/blocks/login-form/types.ts","../src/blocks/login-form/context.tsx","../src/blocks/login-form/parts.tsx","../src/blocks/login-form/preset.tsx","../src/blocks/login-form/index.ts","../src/blocks/tour/gate.ts","../src/blocks/tour/types.ts","../src/blocks/tour/tour.tsx"],"sourcesContent":["export interface LoginFormLabels {\n emailLabel: string;\n emailPlaceholder: string;\n passwordLabel: string;\n passwordPlaceholder: string;\n forgotPasswordLabel: string;\n rememberLabel: string;\n submitLabel: string;\n submittingLabel: string;\n}\n\nexport const loginFormLabels: LoginFormLabels = {\n emailLabel: 'Email address',\n emailPlaceholder: 'email@example.com',\n passwordLabel: 'Password',\n passwordPlaceholder: 'Password',\n forgotPasswordLabel: 'Forgot your password?',\n rememberLabel: 'Remember me',\n submitLabel: 'Log in',\n submittingLabel: 'Signing in',\n};\n\nexport type LoginFormErrors = Record<string, string | string[] | undefined>;\n\nexport function fieldError(\n errors: LoginFormErrors,\n field: string,\n): string | undefined {\n const value = errors[field];\n\n if (!value) {\n return undefined;\n }\n\n const messages = Array.isArray(value) ? value : [value];\n\n return messages.find(\n (message) => typeof message === 'string' && message.length > 0,\n );\n}\n","import {\n loginFormLabels,\n type LoginFormErrors,\n type LoginFormLabels,\n} from '@/blocks/login-form/types';\nimport { useUiLabels } from '@/locales/context';\nimport type { LinkComponent } from '@/types';\nimport { createContext, useContext, type ReactNode } from 'react';\n\nexport interface LoginFormContextValue {\n errors: LoginFormErrors;\n processing: boolean;\n linkComponent?: LinkComponent;\n labels?: Partial<LoginFormLabels>;\n}\n\nconst LoginFormContext = createContext<LoginFormContextValue>({\n errors: {},\n processing: false,\n});\n\nexport function useLoginFormContext(): LoginFormContextValue & {\n labels: LoginFormLabels;\n} {\n const context = useContext(LoginFormContext);\n const labels = useUiLabels('loginForm', loginFormLabels, context.labels);\n\n return { ...context, labels };\n}\n\nexport function LoginFormProvider({\n errors = {},\n processing = false,\n linkComponent,\n labels,\n children,\n}: {\n errors?: LoginFormErrors;\n processing?: boolean;\n linkComponent?: LinkComponent;\n labels?: Partial<LoginFormLabels>;\n children: ReactNode;\n}) {\n return (\n <LoginFormContext.Provider\n value={{\n errors,\n processing,\n linkComponent,\n labels,\n }}\n >\n {children}\n </LoginFormContext.Provider>\n );\n}\n","import {\n LoginFormProvider,\n useLoginFormContext,\n} from '@/blocks/login-form/context';\nimport {\n fieldError,\n type LoginFormErrors,\n type LoginFormLabels,\n} from '@/blocks/login-form/types';\nimport { Alert, AlertDescription } from '@/components/ui/alert';\nimport { Button } from '@/components/ui/button';\nimport { Checkbox } from '@/components/ui/checkbox';\nimport { Field, FieldControl, FieldLabel } from '@/components/ui/field';\nimport { Input } from '@/components/ui/input';\nimport { Label } from '@/components/ui/label';\nimport { PasswordInput } from '@/components/ui/password-input';\nimport { resolveLink } from '@/lib/href';\nimport { cn } from '@/lib/utils';\nimport type { LinkComponent, SlotNameProps, UrlLike } from '@/types';\nimport type { ReactNode } from 'react';\n\nexport interface LoginFormRootProps {\n errors?: LoginFormErrors;\n processing?: boolean;\n linkComponent?: LinkComponent;\n labels?: Partial<LoginFormLabels>;\n children: ReactNode;\n className?: string;\n}\n\nexport function LoginFormRoot({\n errors,\n processing,\n linkComponent,\n labels,\n children,\n className,\n slotName = 'login-form',\n}: LoginFormRootProps & SlotNameProps) {\n return (\n <LoginFormProvider\n errors={errors}\n processing={processing}\n linkComponent={linkComponent}\n labels={labels}\n >\n <div data-slot={slotName} className={cn('gap-6 grid', className)}>\n {children}\n </div>\n </LoginFormProvider>\n );\n}\n\nexport interface LoginFormStatusProps {\n message?: string;\n}\n\nexport function LoginFormStatus({\n message,\n slotName = 'login-form-status',\n}: LoginFormStatusProps & SlotNameProps) {\n if (!message) {\n return null;\n }\n\n return (\n <Alert slotName={slotName}>\n <AlertDescription>{message}</AlertDescription>\n </Alert>\n );\n}\n\nexport interface LoginFormEmailProps {\n id?: string;\n name?: string;\n label?: string;\n placeholder?: string;\n error?: string;\n tabIndex?: number;\n autoFocus?: boolean;\n required?: boolean;\n}\n\nexport function LoginFormEmail({\n id = 'email',\n name = 'email',\n label,\n placeholder,\n error,\n tabIndex,\n autoFocus = true,\n required = true,\n slotName = 'login-form-email',\n}: LoginFormEmailProps & SlotNameProps) {\n const { errors, labels } = useLoginFormContext();\n const message = error ?? fieldError(errors, name);\n\n return (\n <Field id={id} error={message} required={required} slotName={slotName}>\n <FieldLabel>{label ?? labels.emailLabel}</FieldLabel>\n <FieldControl>\n <Input\n name={name}\n type=\"email\"\n required={required}\n autoFocus={autoFocus}\n autoComplete=\"email\"\n tabIndex={tabIndex}\n placeholder={placeholder ?? labels.emailPlaceholder}\n />\n </FieldControl>\n </Field>\n );\n}\n\nexport interface LoginFormPasswordProps {\n id?: string;\n name?: string;\n label?: string;\n placeholder?: string;\n error?: string;\n tabIndex?: number;\n autoFocus?: boolean;\n required?: boolean;\n forgotPasswordHref?: UrlLike;\n forgotPasswordLabel?: string;\n linkComponent?: LinkComponent;\n}\n\nexport function LoginFormPassword({\n id = 'password',\n name = 'password',\n label,\n placeholder,\n error,\n tabIndex,\n autoFocus = false,\n required = true,\n forgotPasswordHref,\n forgotPasswordLabel,\n linkComponent,\n slotName = 'login-form-password',\n}: LoginFormPasswordProps & SlotNameProps) {\n const context = useLoginFormContext();\n const message = error ?? fieldError(context.errors, name);\n const Link = resolveLink(linkComponent ?? context.linkComponent);\n\n return (\n <Field id={id} error={message} required={required} slotName={slotName}>\n <FieldLabel>{label ?? context.labels.passwordLabel}</FieldLabel>\n <FieldControl>\n <PasswordInput\n name={name}\n required={required}\n autoFocus={autoFocus}\n autoComplete=\"current-password\"\n tabIndex={tabIndex}\n placeholder={\n placeholder ?? context.labels.passwordPlaceholder\n }\n />\n </FieldControl>\n {forgotPasswordHref && (\n <Link\n href={forgotPasswordHref}\n className=\"mr-1 text-xs font-medium self-end text-muted-foreground underline-offset-4 transition-colors hover:text-foreground hover:underline\"\n >\n {forgotPasswordLabel ?? context.labels.forgotPasswordLabel}\n </Link>\n )}\n </Field>\n );\n}\n\nexport interface LoginFormRememberProps {\n id?: string;\n name?: string;\n label?: string;\n tabIndex?: number;\n}\n\nexport function LoginFormRemember({\n id = 'remember',\n name = 'remember',\n label,\n tabIndex,\n slotName = 'login-form-remember',\n}: LoginFormRememberProps & SlotNameProps) {\n const { labels } = useLoginFormContext();\n\n return (\n <div data-slot={slotName} className=\"gap-3 flex items-center\">\n <Checkbox id={id} name={name} tabIndex={tabIndex} />\n <Label htmlFor={id}>{label ?? labels.rememberLabel}</Label>\n </div>\n );\n}\n\nexport interface LoginFormSubmitProps {\n label?: string;\n submittingLabel?: string;\n processing?: boolean;\n tabIndex?: number;\n}\n\nexport function LoginFormSubmit({\n label,\n submittingLabel,\n processing,\n tabIndex,\n slotName = 'login-form-submit',\n}: LoginFormSubmitProps & SlotNameProps) {\n const context = useLoginFormContext();\n const pending = processing ?? context.processing;\n const pendingLabel = submittingLabel ?? context.labels.submittingLabel;\n\n return (\n <Button\n slotName={slotName}\n type=\"submit\"\n className=\"w-full\"\n tabIndex={tabIndex}\n aria-label={pending ? pendingLabel : undefined}\n loading={pending}\n loadingLabel={pendingLabel}\n >\n {pending ? pendingLabel : (label ?? context.labels.submitLabel)}\n </Button>\n );\n}\n","import {\n LoginFormEmail,\n LoginFormPassword,\n LoginFormRemember,\n LoginFormRoot,\n LoginFormStatus,\n LoginFormSubmit,\n} from '@/blocks/login-form/parts';\nimport type {\n LoginFormErrors,\n LoginFormLabels,\n} from '@/blocks/login-form/types';\nimport type { LinkComponent, SlotNameProps, UrlLike } from '@/types';\n\nexport interface LoginFormPresetProps {\n errors?: LoginFormErrors;\n processing?: boolean;\n linkComponent?: LinkComponent;\n labels?: Partial<LoginFormLabels>;\n status?: string;\n forgotPasswordHref?: UrlLike;\n className?: string;\n}\n\nexport function LoginFormPreset({\n errors,\n processing,\n linkComponent,\n labels,\n status,\n forgotPasswordHref,\n className,\n slotName = 'login-form',\n}: LoginFormPresetProps & SlotNameProps) {\n return (\n <LoginFormRoot\n errors={errors}\n processing={processing}\n linkComponent={linkComponent}\n labels={labels}\n className={className}\n slotName={slotName}\n >\n <LoginFormStatus message={status} />\n <LoginFormEmail />\n <LoginFormPassword forgotPasswordHref={forgotPasswordHref} />\n <LoginFormRemember />\n <LoginFormSubmit />\n </LoginFormRoot>\n );\n}\n","import {\n LoginFormEmail,\n LoginFormPassword,\n LoginFormRemember,\n LoginFormRoot,\n LoginFormStatus,\n LoginFormSubmit,\n} from '@/blocks/login-form/parts';\n\nexport const LoginForm = {\n Root: LoginFormRoot,\n Status: LoginFormStatus,\n Email: LoginFormEmail,\n Password: LoginFormPassword,\n Remember: LoginFormRemember,\n Submit: LoginFormSubmit,\n};\n\nexport {\n LoginFormProvider,\n useLoginFormContext,\n type LoginFormContextValue,\n} from '@/blocks/login-form/context';\nexport {\n LoginFormEmail,\n LoginFormPassword,\n LoginFormRemember,\n LoginFormRoot,\n LoginFormStatus,\n LoginFormSubmit,\n type LoginFormEmailProps,\n type LoginFormPasswordProps,\n type LoginFormRememberProps,\n type LoginFormRootProps,\n type LoginFormStatusProps,\n type LoginFormSubmitProps,\n} from '@/blocks/login-form/parts';\nexport {\n LoginFormPreset,\n type LoginFormPresetProps,\n} from '@/blocks/login-form/preset';\nexport {\n loginFormLabels,\n type LoginFormErrors,\n type LoginFormLabels,\n} from '@/blocks/login-form/types';\n","import type {\n TourBreakpoint,\n TourDefinition,\n TourStep,\n} from '@/blocks/tour/types';\n\nexport function stepsForBreakpoint(\n steps: TourStep[],\n breakpoint: TourBreakpoint,\n): TourStep[] {\n return steps.filter(\n (step) => !step.breakpoints || step.breakpoints.includes(breakpoint),\n );\n}\n\nexport function resolveSteps(\n steps: TourStep[],\n isPresent: (target: string) => boolean,\n): TourStep[] {\n return steps.filter((step) => isPresent(step.target));\n}\n\nexport function shouldStartTour(input: {\n definition: TourDefinition;\n seen: Record<string, number>;\n resolvedStepCount: number;\n force?: boolean;\n}): boolean {\n if (input.resolvedStepCount === 0) {\n return false;\n }\n\n if (input.force) {\n return true;\n }\n\n return input.definition.version > (input.seen[input.definition.id] ?? 0);\n}\n","export type TourBreakpoint = 'mobile' | 'desktop';\n\nexport type TourOutcome = 'completed' | 'skipped' | 'dismissed';\n\nexport interface TourStep {\n target: string;\n title: string;\n description: string;\n breakpoints?: TourBreakpoint[];\n}\n\nexport interface TourDefinition {\n id: string;\n version: number;\n steps: TourStep[];\n}\n\nexport interface TourProgress {\n tour: string;\n version: number;\n lastStep: number;\n outcome: TourOutcome;\n}\n\nexport interface TourLabels {\n next: string;\n previous: string;\n done: string;\n progress: string;\n}\n\nexport const DEFAULT_TOUR_LABELS: TourLabels = {\n next: 'Next',\n previous: 'Previous',\n done: 'Done',\n progress: '{{current}} of {{total}}',\n};\n","import { driver, type Driver } from 'driver.js';\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n type PropsWithChildren,\n type ReactElement,\n} from 'react';\n\nimport 'driver.js/dist/driver.css';\n\nimport { shouldStartTour, stepsForBreakpoint } from '@/blocks/tour/gate';\nimport {\n DEFAULT_TOUR_LABELS,\n type TourBreakpoint,\n type TourDefinition,\n type TourLabels,\n type TourOutcome,\n type TourProgress,\n} from '@/blocks/tour/types';\nimport { useUiLabels } from '@/locales/context';\n\ninterface TourControllerValue {\n startTour: (\n definition: TourDefinition,\n options?: { force?: boolean },\n ) => void;\n}\n\nconst TourContext = createContext<TourControllerValue | null>(null);\n\nconst MOBILE_BREAKPOINT = 768;\n\nconst WAIT_FOR_TARGET = 4000;\n\nfunction currentBreakpoint(): TourBreakpoint {\n return window.innerWidth < MOBILE_BREAKPOINT ? 'mobile' : 'desktop';\n}\n\nfunction outcomeOf(instance: Driver, highlighted: boolean): TourOutcome {\n if (!highlighted) {\n return 'dismissed';\n }\n\n return instance.hasNextStep() ? 'skipped' : 'completed';\n}\n\nexport function TourProvider({\n children,\n seen,\n onProgress,\n labels,\n}: PropsWithChildren<{\n seen: Record<string, number>;\n onProgress: (progress: TourProgress) => void;\n labels?: Partial<TourLabels>;\n}>): ReactElement {\n const seenRef = useRef(seen);\n seenRef.current = seen;\n\n const onProgressRef = useRef(onProgress);\n onProgressRef.current = onProgress;\n\n const driverRef = useRef<Driver | null>(null);\n const activeRef = useRef<{\n definition: TourDefinition;\n lastStep: number;\n highlighted: boolean;\n } | null>(null);\n\n const { next, previous, done, progress } = useUiLabels(\n 'tour',\n DEFAULT_TOUR_LABELS,\n labels,\n );\n\n const report = useCallback((outcome: TourOutcome): void => {\n const active = activeRef.current;\n\n if (!active) {\n return;\n }\n\n activeRef.current = null;\n\n onProgressRef.current({\n tour: active.definition.id,\n version: active.definition.version,\n lastStep: active.lastStep,\n outcome,\n });\n }, []);\n\n const startTour = useCallback(\n (definition: TourDefinition, options?: { force?: boolean }): void => {\n const alreadyRunning =\n activeRef.current?.definition.id === definition.id;\n\n if (alreadyRunning && !options?.force) {\n return;\n }\n\n const steps = stepsForBreakpoint(\n definition.steps,\n currentBreakpoint(),\n );\n\n const allowed = shouldStartTour({\n definition,\n seen: seenRef.current,\n resolvedStepCount: steps.length,\n force: options?.force,\n });\n\n if (!allowed) {\n return;\n }\n\n driverRef.current?.destroy();\n activeRef.current = { definition, lastStep: 0, highlighted: false };\n\n const instance = driver({\n showProgress: true,\n progressText: progress,\n nextBtnText: next,\n prevBtnText: previous,\n doneBtnText: done,\n popoverClass: 'akira-tour',\n waitForElement: WAIT_FOR_TARGET,\n skipMissingElement: true,\n steps: steps.map((step) => ({\n element: step.target,\n popover: {\n title: step.title,\n description: step.description,\n },\n })),\n onHighlightStarted: () => {\n if (activeRef.current) {\n activeRef.current.lastStep =\n instance.getActiveIndex() ?? 0;\n activeRef.current.highlighted = true;\n }\n },\n onDestroyStarted: () => {\n report(\n outcomeOf(\n instance,\n activeRef.current?.highlighted ?? false,\n ),\n );\n instance.destroy();\n },\n });\n\n driverRef.current = instance;\n instance.drive();\n },\n [report, next, previous, done, progress],\n );\n\n useEffect(\n () => () => {\n report('dismissed');\n driverRef.current?.destroy();\n driverRef.current = null;\n },\n [report],\n );\n\n const value = useMemo(() => ({ startTour }), [startTour]);\n\n return (\n <TourContext.Provider value={value}>{children}</TourContext.Provider>\n );\n}\n\nexport function useTourController(): TourControllerValue {\n const context = useContext(TourContext);\n\n if (!context) {\n throw new Error(\n 'useTourController must be used inside a TourProvider.',\n );\n }\n\n return context;\n}\n\nexport function useTour(\n definition: TourDefinition,\n options?: { enabled?: boolean },\n): { restart: () => void } {\n const { startTour } = useTourController();\n const enabled = options?.enabled ?? true;\n\n const definitionRef = useRef(definition);\n definitionRef.current = definition;\n\n useEffect(() => {\n if (!enabled) {\n return;\n }\n\n const frame = window.requestAnimationFrame(() =>\n startTour(definitionRef.current),\n );\n\n return () => window.cancelAnimationFrame(frame);\n }, [definition.id, definition.version, enabled, startTour]);\n\n return { restart: () => startTour(definitionRef.current, { force: true }) };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,IAAM,kBAAmC;AAAA,EAC5C,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,iBAAiB;AACrB;AAIO,SAAS,WACZ,QACA,OACkB;AAClB,QAAM,QAAQ,OAAO,KAAK;AAE1B,MAAI,CAAC,OAAO;AACR,WAAO;AAAA,EACX;AAEA,QAAM,WAAW,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;AAEtD,SAAO,SAAS;AAAA,IACZ,CAAC,YAAY,OAAO,YAAY,YAAY,QAAQ,SAAS;AAAA,EACjE;AACJ;;;AChCA,SAAS,eAAe,kBAAkC;AAqClD;AA5BR,IAAM,mBAAmB,cAAqC;AAAA,EAC1D,QAAQ,CAAC;AAAA,EACT,YAAY;AAChB,CAAC;AAEM,SAAS,sBAEd;AACE,QAAM,UAAU,WAAW,gBAAgB;AAC3C,QAAM,SAAS,YAAY,aAAa,iBAAiB,QAAQ,MAAM;AAEvE,SAAO,EAAE,GAAG,SAAS,OAAO;AAChC;AAEO,SAAS,kBAAkB;AAAA,EAC9B,SAAS,CAAC;AAAA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AAU,MAAM,QAAQ;AAAA,EAC3C;AAEA;AAAA,IACI,MAAM,MAAM;AACR,aAAO,WAAW;AAClB,gBAAU,SAAS,QAAQ;AAC3B,gBAAU,UAAU;AAAA,IACxB;AAAA,IACA,CAAC,MAAM;AAAA,EACX;AAEA,QAAM,QAAQ,QAAQ,OAAO,EAAE,UAAU,IAAI,CAAC,SAAS,CAAC;AAExD,SACI,gBAAAD,KAAC,YAAY,UAAZ,EAAqB,OAAe,UAAS;AAEtD;AAEO,SAAS,oBAAyC;AACrD,QAAM,UAAUE,YAAW,WAAW;AAEtC,MAAI,CAAC,SAAS;AACV,UAAM,IAAI;AAAA,MACN;AAAA,IACJ;AAAA,EACJ;AAEA,SAAO;AACX;AAEO,SAAS,QACZ,YACA,SACuB;AACvB,QAAM,EAAE,UAAU,IAAI,kBAAkB;AACxC,QAAM,UAAU,SAAS,WAAW;AAEpC,QAAM,gBAAgB,OAAO,UAAU;AACvC,gBAAc,UAAU;AAExB,YAAU,MAAM;AACZ,QAAI,CAAC,SAAS;AACV;AAAA,IACJ;AAEA,UAAM,QAAQ,OAAO;AAAA,MAAsB,MACvC,UAAU,cAAc,OAAO;AAAA,IACnC;AAEA,WAAO,MAAM,OAAO,qBAAqB,KAAK;AAAA,EAClD,GAAG,CAAC,WAAW,IAAI,WAAW,SAAS,SAAS,SAAS,CAAC;AAE1D,SAAO,EAAE,SAAS,MAAM,UAAU,cAAc,SAAS,EAAE,OAAO,KAAK,CAAC,EAAE;AAC9E;","names":["jsx","jsx","jsxs","createContext","useContext","jsx","createContext","useContext"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
1
|
// src/locales/context.tsx
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
var EMPTY = {};
|
|
6
5
|
var UiLocaleContext = createContext(EMPTY);
|
|
7
6
|
function UiLocaleProvider({
|
|
@@ -30,6 +29,9 @@ function useUiLabels(section, defaults, overrides) {
|
|
|
30
29
|
};
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
export {
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
export {
|
|
33
|
+
UiLocaleProvider,
|
|
34
|
+
useUiLocale,
|
|
35
|
+
useUiLabels
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=chunk-E26KKMGS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/locales/context.tsx"],"sourcesContent":["import type { CommandPaletteLabels } from '@/blocks/command-palette';\nimport type {\n DateFilterLabels,\n DateFilterOption,\n} from '@/blocks/date-filter/types';\nimport type { LoginFormLabels } from '@/blocks/login-form/types';\nimport type { SettingsLabels } from '@/blocks/settings-page';\nimport type { TourLabels } from '@/blocks/tour/types';\nimport type { AlertLabels } from '@/components/ui/alert';\nimport type { AppearanceToggleLabels } from '@/components/ui/appearance-toggle';\nimport type { CodeBlockLabels } from '@/components/ui/code-block';\nimport type { ComboboxLabels } from '@/components/ui/combobox';\nimport type { ConfirmDialogLabels } from '@/components/ui/confirm-dialog';\nimport type { CopyButtonLabels } from '@/components/ui/copy-button';\nimport type { DataTableLabels } from '@/components/ui/data-table';\nimport type { DataTableFacetedFilterLabels } from '@/components/ui/data-table-faceted-filter';\nimport type { DatePickerLabels } from '@/components/ui/date-picker';\nimport type { DateRangeFilterLabels } from '@/components/ui/date-range-filter';\nimport type { FloatingSheetLabels } from '@/components/ui/floating-sheet-context';\nimport type { JsonViewerLabels } from '@/components/ui/json-viewer';\nimport type { PasswordInputLabels } from '@/components/ui/password-input';\nimport type { SaveStatusLabels } from '@/components/ui/save-status';\nimport { createContext, useContext, type ReactNode } from 'react';\n\nexport interface UiLabelSections {\n alert: AlertLabels;\n appearanceToggle: AppearanceToggleLabels;\n codeBlock: CodeBlockLabels;\n combobox: ComboboxLabels;\n commandPalette: CommandPaletteLabels;\n confirmDialog: ConfirmDialogLabels;\n copyButton: CopyButtonLabels;\n dataTable: DataTableLabels;\n dataTableFacetedFilter: DataTableFacetedFilterLabels;\n dateFilter: DateFilterLabels;\n datePicker: DatePickerLabels;\n dateRangeFilter: DateRangeFilterLabels;\n floatingSheet: FloatingSheetLabels;\n jsonViewer: JsonViewerLabels;\n loginForm: LoginFormLabels;\n passwordInput: PasswordInputLabels;\n saveStatus: SaveStatusLabels;\n settings: SettingsLabels;\n tour: TourLabels;\n}\n\nexport type UiLabels = {\n [Section in keyof UiLabelSections]?: Partial<UiLabelSections[Section]>;\n} & {\n dateFilterPresets?: DateFilterOption[];\n dateFilterOperators?: DateFilterOption[];\n dateFilterUnits?: DateFilterOption[];\n};\n\nconst EMPTY: UiLabels = {};\n\nconst UiLocaleContext = createContext<UiLabels>(EMPTY);\n\nexport function UiLocaleProvider({\n labels,\n children,\n}: {\n labels: UiLabels;\n children: ReactNode;\n}) {\n return (\n <UiLocaleContext.Provider value={labels}>\n {children}\n </UiLocaleContext.Provider>\n );\n}\n\nexport function useUiLocale(): UiLabels {\n return useContext(UiLocaleContext);\n}\n\nfunction defined(source: object | undefined): Record<string, unknown> {\n if (!source) {\n return {};\n }\n\n return Object.fromEntries(\n Object.entries(source).filter(([, value]) => value !== undefined),\n );\n}\n\nexport function useUiLabels<Section extends keyof UiLabelSections>(\n section: Section,\n defaults: UiLabelSections[Section],\n overrides?: Partial<UiLabelSections[Section]>,\n): UiLabelSections[Section] {\n const locale = useUiLocale();\n\n return {\n ...defaults,\n ...defined(locale[section]),\n ...defined(overrides),\n } as UiLabelSections[Section];\n}\n"],"mappings":";AAsBA,SAAS,eAAe,kBAAkC;AA4ClD;AAZR,IAAM,QAAkB,CAAC;AAEzB,IAAM,kBAAkB,cAAwB,KAAK;AAE9C,SAAS,iBAAiB;AAAA,EAC7B;AAAA,EACA;AACJ,GAGG;AACC,SACI,oBAAC,gBAAgB,UAAhB,EAAyB,OAAO,QAC5B,UACL;AAER;AAEO,SAAS,cAAwB;AACpC,SAAO,WAAW,eAAe;AACrC;AAEA,SAAS,QAAQ,QAAqD;AAClE,MAAI,CAAC,QAAQ;AACT,WAAO,CAAC;AAAA,EACZ;AAEA,SAAO,OAAO;AAAA,IACV,OAAO,QAAQ,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AAAA,EACpE;AACJ;AAEO,SAAS,YACZ,SACA,UACA,WACwB;AACxB,QAAM,SAAS,YAAY;AAE3B,SAAO;AAAA,IACH,GAAG;AAAA,IACH,GAAG,QAAQ,OAAO,OAAO,CAAC;AAAA,IAC1B,GAAG,QAAQ,SAAS;AAAA,EACxB;AACJ;","names":[]}
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
1
|
+
import {
|
|
2
|
+
cn,
|
|
3
|
+
modalSurface
|
|
4
|
+
} from "./chunk-KHOA4TEI.js";
|
|
6
5
|
|
|
6
|
+
// src/components/ui/dialog.tsx
|
|
7
|
+
import { XIcon } from "lucide-react";
|
|
8
|
+
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
10
|
function Dialog({
|
|
8
11
|
slotName = "dialog",
|
|
9
12
|
...props
|
|
10
13
|
}) {
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...props, "data-slot": slotName });
|
|
12
15
|
}
|
|
13
16
|
function DialogTrigger({
|
|
14
17
|
slotName = "dialog-trigger",
|
|
15
18
|
...props
|
|
16
19
|
}) {
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...props, "data-slot": slotName });
|
|
18
21
|
}
|
|
19
22
|
function DialogPortal({
|
|
20
23
|
slotName = "dialog-portal",
|
|
21
24
|
...props
|
|
22
25
|
}) {
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
26
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...props, "data-slot": slotName });
|
|
24
27
|
}
|
|
25
28
|
function DialogClose({
|
|
26
29
|
slotName = "dialog-close",
|
|
27
30
|
...props
|
|
28
31
|
}) {
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
32
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...props, "data-slot": slotName });
|
|
30
33
|
}
|
|
31
34
|
function DialogOverlay({
|
|
32
35
|
className,
|
|
@@ -34,7 +37,7 @@ function DialogOverlay({
|
|
|
34
37
|
...props
|
|
35
38
|
}) {
|
|
36
39
|
return /* @__PURE__ */ jsx(
|
|
37
|
-
|
|
40
|
+
DialogPrimitive.Overlay,
|
|
38
41
|
{
|
|
39
42
|
className: cn(
|
|
40
43
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 inset-0 bg-black/60 backdrop-blur-sm fixed z-50",
|
|
@@ -55,7 +58,7 @@ function DialogContent({
|
|
|
55
58
|
return /* @__PURE__ */ jsxs(DialogPortal, { slotName: "dialog-portal", children: [
|
|
56
59
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
57
60
|
/* @__PURE__ */ jsxs(
|
|
58
|
-
|
|
61
|
+
DialogPrimitive.Content,
|
|
59
62
|
{
|
|
60
63
|
className: cn(
|
|
61
64
|
`${modalSurface} data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 gap-6 p-6 sm:w-full sm:max-w-lg fixed top-[50%] left-[50%] z-50 grid w-[calc(100%-2rem)] max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] overflow-hidden duration-200`,
|
|
@@ -65,7 +68,7 @@ function DialogContent({
|
|
|
65
68
|
"data-slot": slotName,
|
|
66
69
|
children: [
|
|
67
70
|
children,
|
|
68
|
-
!hideCloseButton && /* @__PURE__ */ jsxs(
|
|
71
|
+
!hideCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "top-6 right-6 h-10 w-10 shadow-xs absolute z-50 flex items-center justify-center rounded-full border border-border bg-muted text-muted-foreground transition-colors hover:bg-accent hover:text-foreground", children: [
|
|
69
72
|
/* @__PURE__ */ jsx(XIcon, { className: "h-5 w-5" }),
|
|
70
73
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
71
74
|
] })
|
|
@@ -114,7 +117,7 @@ function DialogTitle({
|
|
|
114
117
|
...props
|
|
115
118
|
}) {
|
|
116
119
|
return /* @__PURE__ */ jsx(
|
|
117
|
-
|
|
120
|
+
DialogPrimitive.Title,
|
|
118
121
|
{
|
|
119
122
|
className: cn(
|
|
120
123
|
"text-2xl font-bold tracking-tight md:text-3xl text-foreground",
|
|
@@ -131,7 +134,7 @@ function DialogDescription({
|
|
|
131
134
|
...props
|
|
132
135
|
}) {
|
|
133
136
|
return /* @__PURE__ */ jsx(
|
|
134
|
-
|
|
137
|
+
DialogPrimitive.Description,
|
|
135
138
|
{
|
|
136
139
|
className: cn(
|
|
137
140
|
"text-base font-medium leading-relaxed text-muted-foreground",
|
|
@@ -142,24 +145,17 @@ function DialogDescription({
|
|
|
142
145
|
}
|
|
143
146
|
);
|
|
144
147
|
}
|
|
145
|
-
function Label({
|
|
146
|
-
className,
|
|
147
|
-
slotName = "label",
|
|
148
|
-
...props
|
|
149
|
-
}) {
|
|
150
|
-
return /* @__PURE__ */ jsx(
|
|
151
|
-
LabelPrimitive.Root,
|
|
152
|
-
{
|
|
153
|
-
className: cn(
|
|
154
|
-
"text-sm font-medium text-foreground select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
155
|
-
className
|
|
156
|
-
),
|
|
157
|
-
...props,
|
|
158
|
-
"data-slot": slotName
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
148
|
|
|
163
|
-
export {
|
|
164
|
-
|
|
165
|
-
|
|
149
|
+
export {
|
|
150
|
+
Dialog,
|
|
151
|
+
DialogTrigger,
|
|
152
|
+
DialogPortal,
|
|
153
|
+
DialogClose,
|
|
154
|
+
DialogOverlay,
|
|
155
|
+
DialogContent,
|
|
156
|
+
DialogHeader,
|
|
157
|
+
DialogFooter,
|
|
158
|
+
DialogTitle,
|
|
159
|
+
DialogDescription
|
|
160
|
+
};
|
|
161
|
+
//# sourceMappingURL=chunk-EYPM6IMS.js.map
|